Commit 7048ce94 authored by Lorenz Meier's avatar Lorenz Meier

Checkpoint: This is looking sweet

parent 1aa7b9b9
......@@ -358,6 +358,16 @@ QPushButton, QToolButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #777, stop: 1 #333);
}
QPushButton#advancedMenuButton, QPushButton#airframeMenuButton, QPushButton#firmwareMenuButton,
QPushButton#generalMenuButton, QPushButton#rcMenuButton, QPushButton#sensorMenuButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #333, stop: 1 #111);
border-radius: 5px;
min-height: 64px;
max-height: 64px;
min-width: 80px;
border: 1px solid #000000;
}
QPushButton#planePushButton, QPushButton#flyingWingPushButton, QPushButton#quadXPushButton,
QPushButton#quadPlusPushButton, QPushButton#hexaXPushButton, QPushButton#hexaPlusPushButton,
QPushButton#octoXPushButton, QPushButton#octoPlusPushButton, QPushButton#hPushButton {
......@@ -392,6 +402,12 @@ QWidget#containerWidget {
border: 2px solid #CCCCCC;
}
QWidget#navBarWidget {
background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #404040, stop:1 #727272);
border-radius: 0px;
border: 1px solid #222222;
}
QPushButton#connectButton, QPushButton#controlButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #73D95D, stop: 1 #18A154);
}
......
......@@ -175,6 +175,11 @@
<file>files/images/px4/calibration/accel_z-.png</file>
<file>files/images/px4/calibration/accel_y+.png</file>
<file>files/images/px4/calibration/mag_calibration_figure8.png</file>
<file>files/images/px4/menu/sensors.png</file>
<file>files/images/px4/menu/firmware_upgrade.png</file>
<file>files/images/px4/menu/plane.png</file>
<file>files/images/px4/menu/remote.png</file>
<file>files/images/px4/menu/cogwheels.png</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
......
......@@ -18,8 +18,14 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
// The config screens are required for firmware uploading
if (MainWindow::instance()->getCustomMode() == MainWindow::CUSTOM_MODE_PX4) {
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
delete ui->waitingLabel;
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
} else {
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
......@@ -37,6 +43,16 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
if (mav == uas)
return;
int type = -1;
if (mav)
type = mav->getAutopilotType();
mav = uas;
if (NULL != uas && type != uas->getAutopilotType()) {
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
//remove all child widgets since they could contain stale data
//for example, when we switch from one PX4 UAS to another UAS
foreach (QObject* obj, ui->gridLayout->children()) {
......@@ -49,11 +65,6 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
}
}
mav = uas;
if (NULL != mav) {
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
int autopilotType = mav->getAutopilotType();
switch (autopilotType) {
case MAV_AUTOPILOT_PX4:
......
......@@ -14,6 +14,9 @@
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="waitingLabel">
<property name="text">
......
......@@ -89,6 +89,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
ui->airframeMenuButton->setEnabled(false);
ui->sensorMenuButton->setEnabled(false);
ui->rcMenuButton->setEnabled(false);
ui->generalMenuButton->hide();
px4AirframeConfig = new QGCPX4AirframeConfig(this);
ui->airframeLayout->addWidget(px4AirframeConfig);
......@@ -554,7 +555,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load tabs for general configuration
foreach (QString dir,generaldir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{
QPushButton *button = new QPushButton(ui->leftNavScrollAreaWidgetContents);
QPushButton *button = new QPushButton(this);
connect(button,SIGNAL(clicked()),this,SLOT(menuButtonClicked()));
ui->navBarLayout->insertWidget(2,button);
button->setMinimumHeight(75);
......@@ -598,7 +599,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load additional tabs for vehicle specific configuration
foreach (QString dir,vehicledir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{
QPushButton *button = new QPushButton(ui->leftNavScrollAreaWidgetContents);
QPushButton *button = new QPushButton(this);
connect(button,SIGNAL(clicked()),this,SLOT(menuButtonClicked()));
ui->navBarLayout->insertWidget(2,button);
......
......@@ -19,45 +19,49 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QScrollArea" name="leftNavScrollArea">
<property name="minimumSize">
<size>
<width>135</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>135</width>
<height>16777215</height>
</size>
</property>
<property name="widgetResizable">
<bool>true</bool>
<layout class="QHBoxLayout" name="horizontalLayout_11" stretch="0,0">
<property name="margin">
<number>0</number>
</property>
<widget class="QWidget" name="leftNavScrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>133</width>
<height>886</height>
</rect>
<item>
<widget class="QWidget" name="navBarWidget" native="true">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<layout class="QVBoxLayout" name="navBarLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinAndMaxSize</enum>
</property>
<property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>24</number>
</property>
<property name="bottomMargin">
<number>12</number>
</property>
<item>
<widget class="QPushButton" name="firmwareMenuButton">
<property name="text">
<string>Firmware
Upgrade</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/firmware_upgrade.png</normaloff>:/files/images/px4/menu/firmware_upgrade.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -75,9 +79,19 @@ Upgrade</string>
</size>
</property>
<property name="text">
<string>RC
<string>Radio
Calibration</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/remote.png</normaloff>:/files/images/px4/menu/remote.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -92,6 +106,16 @@ Calibration</string>
<string>Sensor
Calibration</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/sensors.png</normaloff>:/files/images/px4/menu/sensors.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -100,6 +124,16 @@ Calibration</string>
<string>Airframe
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/plane.png</normaloff>:/files/images/px4/menu/plane.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -114,6 +148,16 @@ Config</string>
<string>General
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/cogwheels.png</normaloff>:/files/images/px4/menu/cogwheels.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -128,6 +172,16 @@ Config</string>
<string>Advanced
Config</string>
</property>
<property name="icon">
<iconset resource="../../qgroundcontrol.qrc">
<normaloff>:/files/images/px4/menu/cogwheels.png</normaloff>:/files/images/px4/menu/cogwheels.png</iconset>
</property>
<property name="iconSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
</widget>
</item>
<item>
......@@ -147,14 +201,13 @@ Config</string>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>2</number>
<number>5</number>
</property>
<widget class="QWidget" name="firmwareTab">
<layout class="QVBoxLayout" name="firmwareLayout">
......@@ -1123,8 +1176,8 @@ Config</string>
<rect>
<x>0</x>
<y>0</y>
<width>597</width>
<height>740</height>
<width>571</width>
<height>764</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
......@@ -1253,6 +1306,8 @@ Config</string>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<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