Commit 652fce85 authored by Bryant's avatar Bryant

Whoops. Look like you can't inherit from QToolBar using Qt Designer. Restored...

Whoops. Look like you can't inherit from QToolBar using Qt Designer. Restored last set of code. Also, changed one of the QToolButtons to a QLabel in QGCToolbar.
parent ff66b8cd
......@@ -70,6 +70,10 @@ QDockWidget::title {
height: 14px;
}
QGCToolBar {
min-height: 60px;
}
QGCToolWidgetItem {
border: 1px solid #666;
border-radius: 3px;
......@@ -408,6 +412,43 @@ QToolBar {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #CCC, stop: 1 #888);
}
QToolButton#symbolButton {
margin-left: 10px;
background-color: #050508;
color: #DDD;
background-clip: border;
}
QLabel#toolBarTimeoutLabel { margin: 3px 2px; padding: 2px; padding-left: 4px; padding-right: 4px; font: 14px;
border-radius: 4px;
}
QLabel#toolBarBatteryVoltageLabel {
margin: 0 0 0 4px; font: 14px;
}
QLabel#toolBarWpLabel { margin: 3px 2px; font: 18px; color: #ACEBFE; }
QLabel#toolBarMessageLabel { margin: 3px 2px; font: 14px; color: #ACEBFE; }
QPushButton#connectButton {min-height: 20px; color: #222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5AAA49, stop: 1 #106B38); margin-left: 4px; margin-right: 4px; border-radius: 4px; border: 1px solid #085B35; }
QPushButton:checked#connectButton { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #FF9000, stop: 1 #FFD450); color: #222; border-color: #D1892A}
QLabel#toolBarSafetyLabel { margin: 3px 2px; padding: 2px; padding-left: 4px; padding-right: 4px; font: 14px; color: #14C814; }
QLabel#toolBarModeLabel { margin: 3px 2px; font: 14px; color: #ACEBFE; }
QLabel#toolBarStateLabel { margin: 3px 2px; font: 14px; color: #FEC654; }
QToolButton#firstAction { min-width: 60px; color: #222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); margin-left: 8px; margin-right: 0px; padding-left: 4px; padding-right: 8px; border-radius: 0px; border : 0px solid blue; border-bottom-left-radius: 6px; border-top-left-radius: 6px; border-left: 1px solid #484848; border-top: 1px solid #484848; border-bottom: 1px solid #484848; }
QToolButton:checked#firstAction { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDD; }
QGCToolBar QToolButton { min-width: 60px; color: #222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); margin-left: -2px; margin-right: -2px; padding-left: 0px; padding-right: 0px; border-radius: 0px; border-top: 1px solid #484848; border-bottom: 1px solid #484848; }
QGCToolBar QToolButton:checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDD; }
QPushButton#advancedButton { min-width: 60px; font-weight: bold; text-align: left; color: #222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); margin-left: 0px; margin-right: 13px; padding-left: 4px; padding-right: 8px; border-radius: 0px; border : 0px solid blue; border-bottom-right-radius: 6px; border-top-right-radius: 6px; border-right: 1px solid #484848; border-top: 1px solid #484848; border-bottom: 1px solid #484848; }
QPushButton:checked#advancedButton { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDD; }
QGCToolBar QMenu { font-weight: bold; min-width: 70px; color: #222; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #A2A3A4, stop: 1 #B6B7B8); border: 1px solid #484848; }
QGCToolBar QMenu::item:checked { background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #555555, stop: 1 #787878); color: #DDD; }
QGCToolBar .QWidget {
margin: 0px;
background-color: transparent;
min-height: 24px;
background-color: #F00;
}
QToolTip {
background-color: #F6F6F6;
border:0 solid #379AC3;
......
......@@ -226,8 +226,7 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCHilXPlaneConfiguration.ui \
src/ui/designer/QGCComboBox.ui \
src/ui/designer/QGCTextLabel.ui \
src/ui/uas/UASQuickView.ui \
src/ui/QGCToolBar.ui
src/ui/uas/UASQuickView.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
......
This diff is collapsed.
......@@ -32,7 +32,6 @@ This file is part of the QGROUNDCONTROL project
#include <QProgressBar>
#include "UASInterface.h"
#include "QGCMAVLinkLogPlayer.h"
#include "ui_QGCToolBar.h"
class QGCToolBar : public QToolBar
{
......@@ -91,7 +90,7 @@ protected:
void createUI();
UASInterface* mav;
QToolButton* symbolButton;
QLabel* symbolLabel;
QLabel* toolBarNameLabel;
QLabel* toolBarTimeoutLabel;
QLabel* toolBarSafetyLabel;
......@@ -122,8 +121,6 @@ protected:
QAction* firstAction;
QPushButton *advancedButton;
QButtonGroup *group;
private:
Ui::QGCToolBar *m_ui;
};
#endif // QGCTOOLBAR_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCToolBar</class>
<widget class="QWidget" name="QGCToolBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>66</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="symbolLabel">
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../qgroundcontrol.qrc">:/files/images/mavs/unknown.svg</pixmap>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarNameLabel">
<property name="toolTip">
<string>Currently controlled vehicle</string>
</property>
<property name="text">
<string>------</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarSafetyLabel">
<property name="toolTip">
<string>Vehicle safety state</string>
</property>
<property name="text">
<string>SAFE</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarTimeoutLabel">
<property name="toolTip">
<string>System timed out, interval since last message</string>
</property>
<property name="text">
<string>UNCONNECTED</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarModeLabel">
<property name="toolTip">
<string>Vehicle mode</string>
</property>
<property name="text">
<string>------</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarStateLabel">
<property name="toolTip">
<string>Vehicle state</string>
</property>
<property name="text">
<string>------</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="toolBarBatteryBar">
<property name="toolTip">
<string>Battery charge level</string>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarBatteryVoltageLabel">
<property name="toolTip">
<string>Battery voltage</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string>xx.x V</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarStateLabel_2">
<property name="toolTip">
<string>Most recent system message</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarWpLabel">
<property name="toolTip">
<string>Current waypoint</string>
</property>
<property name="text">
<string>WP--</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarDistLabel">
<property name="toolTip">
<string>Distance to current waypoint</string>
</property>
<property name="text">
<string>-- ---- m</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="toolBarMessageLabel">
<property name="toolTip">
<string>Most recent system message</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::MinimumExpanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>24</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="connectButton">
<property name="toolTip">
<string>Connect wireless link to MAV</string>
</property>
<property name="text">
<string>Connect</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../qgroundcontrol.qrc"/>
</resources>
<connections/>
</ui>
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