Commit 5322c774 authored by Lorenz Meier's avatar Lorenz Meier

Final toolbar tweaks

parent 85485285
...@@ -78,6 +78,7 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms) ...@@ -78,6 +78,7 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms)
toolBarTimeoutLabel->setText(tr("CONNECTION LOST: %1 s").arg((ms / 1000.0f), 2, 'f', 1, ' ')); toolBarTimeoutLabel->setText(tr("CONNECTION LOST: %1 s").arg((ms / 1000.0f), 2, 'f', 1, ' '));
toolBarTimeoutAction->setVisible(true); toolBarTimeoutAction->setVisible(true);
toolBarMessageAction->setVisible(false); toolBarMessageAction->setVisible(false);
toolBarBatteryBarAction->setVisible(false);
} }
else else
{ {
...@@ -86,6 +87,7 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms) ...@@ -86,6 +87,7 @@ void QGCToolBar::heartbeatTimeout(bool timeout, unsigned int ms)
{ {
toolBarTimeoutAction->setVisible(false); toolBarTimeoutAction->setVisible(false);
toolBarMessageAction->setVisible(true); toolBarMessageAction->setVisible(true);
toolBarBatteryBarAction->setVisible(true);
} }
} }
} }
...@@ -136,13 +138,13 @@ void QGCToolBar::createUI() ...@@ -136,13 +138,13 @@ void QGCToolBar::createUI()
toolBarBatteryBar->setToolTip(tr("Battery charge level")); toolBarBatteryBar->setToolTip(tr("Battery charge level"));
toolBarBatteryBar->setObjectName("toolBarBatteryBar"); toolBarBatteryBar->setObjectName("toolBarBatteryBar");
toolBarBatteryBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding); toolBarBatteryBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
addWidget(toolBarBatteryBar); toolBarBatteryBarAction = addWidget(toolBarBatteryBar);
toolBarBatteryVoltageLabel = new QLabel(this); toolBarBatteryVoltageLabel = new QLabel(this);
toolBarBatteryVoltageLabel->setToolTip(tr("Battery voltage")); toolBarBatteryVoltageLabel->setToolTip(tr("Battery voltage"));
toolBarBatteryVoltageLabel->setObjectName("toolBarBatteryVoltageLabel"); toolBarBatteryVoltageLabel->setObjectName("toolBarBatteryVoltageLabel");
toolBarBatteryVoltageLabel->setAlignment(Qt::AlignCenter); toolBarBatteryVoltageLabel->setAlignment(Qt::AlignCenter);
addWidget(toolBarBatteryVoltageLabel); toolBarBatteryVoltageAction = addWidget(toolBarBatteryVoltageLabel);
toolBarWpLabel = new QLabel(this); toolBarWpLabel = new QLabel(this);
toolBarWpLabel->setToolTip(tr("Current waypoint")); toolBarWpLabel->setToolTip(tr("Current waypoint"));
......
...@@ -113,6 +113,8 @@ protected: ...@@ -113,6 +113,8 @@ protected:
QAction* toolBarPortAction; QAction* toolBarPortAction;
QAction* toolBarBaudAction; QAction* toolBarBaudAction;
QAction* toolBarWpAction; QAction* toolBarWpAction;
QAction* toolBarBatteryBarAction;
QAction* toolBarBatteryVoltageAction;
QLabel* toolBarSafetyLabel; QLabel* toolBarSafetyLabel;
QLabel* toolBarModeLabel; QLabel* toolBarModeLabel;
QLabel* toolBarStateLabel; QLabel* toolBarStateLabel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment