Commit da66c5a8 authored by Lorenz Meier's avatar Lorenz Meier

Improved visual quality

parent 304b3999
* { font-family: "Bitstream Vera Sans"; font: "Roman"; font-size: 12px; } * { font-family: "Bitstream Vera Sans"; font: "Roman"; font-size: 12px; border: 0px solid; }
QWidget#colorIcon {} QWidget#colorIcon {}
QWidget { QWidget {
...@@ -6,6 +6,8 @@ background-color: #050508; ...@@ -6,6 +6,8 @@ background-color: #050508;
color: #DDDDDF; color: #DDDDDF;
background-clip: border; background-clip: border;
font-size: 11px; font-size: 11px;
border: 0px;
padding: 1px;
} }
QGroupBox { QGroupBox {
...@@ -186,7 +188,8 @@ QPushButton { ...@@ -186,7 +188,8 @@ QPushButton {
min-height: 20px; min-height: 20px;
/*min-width: 24px;*/ /*min-width: 24px;*/
max-height: 20px; max-height: 20px;
border: 0px solid #59666f; border: 1px solid #465158;
margin: 1px;
border-radius: 2px; border-radius: 2px;
padding-left: 8px; padding-left: 8px;
padding-right: 8px; padding-right: 8px;
...@@ -194,13 +197,11 @@ QPushButton { ...@@ -194,13 +197,11 @@ QPushButton {
} }
QPushButton:checked { QPushButton:checked {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #404040, stop: 1 #808080); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09A2B2, stop: 1 #414B52);
border: 0px solid #379AC3;
} }
QPushButton:pressed { QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0);
border: 0px solid #379AC3;
} }
QToolButton { QToolButton {
...@@ -208,21 +209,20 @@ QToolButton { ...@@ -208,21 +209,20 @@ QToolButton {
min-height: 20px; min-height: 20px;
/*min-width: 24px;*/ /*min-width: 24px;*/
max-height: 20px; max-height: 20px;
border: 0px solid #4A4A4F; border: 1px solid #4A4A4F;
margin: 1px;
border-radius: 2px; border-radius: 2px;
padding-left: 3px; padding-left: 3px;
padding-right: 3px; padding-right: 3px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52);
} }
QToolButton:checked { QToolButton:checked {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #090909, stop: 1 #353535); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09A2B2, stop: 1 #414B52);
border: 2px solid #379AC3;
} }
QToolButton:pressed { QToolButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0);
border: 2px solid #379AC3;
} }
QToolTip { QToolTip {
...@@ -259,6 +259,10 @@ QMenuBar::item:disabled:pressed { ...@@ -259,6 +259,10 @@ QMenuBar::item:disabled:pressed {
border: none; border: none;
} }
QSlider {
background-color: transparent;
}
QSlider::groove:horizontal { QSlider::groove:horizontal {
border: 1px solid #999999; border: 1px solid #999999;
height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */ height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
...@@ -266,6 +270,13 @@ QSlider::groove:horizontal { ...@@ -266,6 +270,13 @@ QSlider::groove:horizontal {
margin: 2px 0; margin: 2px 0;
} }
QSlider::groove:disabled:horizontal {
border: 1px solid #AAAAAA;
height: 4px; /* the groove expands to the size of the slider by default. by giving it a height, it has a fixed size */
background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #6A6A6F, stop:1 #6A6A6F);
margin: 2px 0;
}
QSlider::handle:horizontal { QSlider::handle:horizontal {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #232228, stop: 1 #020208); background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #232228, stop: 1 #020208);
border: 2px solid #379AC3; border: 2px solid #379AC3;
...@@ -273,6 +284,14 @@ QSlider::groove:horizontal { ...@@ -273,6 +284,14 @@ QSlider::groove:horizontal {
margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */ margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 3px; border-radius: 3px;
} }
QSlider::handle:disabled:horizontal {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #535258, stop: 1 #050508);
border: 2px solid #444444;
width: 18px;
margin: -5px 0; /* handle is placed by default on the contents rect of the groove. Expand outside the groove */
border-radius: 3px;
}
QSlider::groove:vertical { QSlider::groove:vertical {
border: 1px solid #999999; border: 1px solid #999999;
......
This diff is collapsed.
...@@ -135,6 +135,12 @@ MainWindow::MainWindow(QWidget *parent): ...@@ -135,6 +135,12 @@ MainWindow::MainWindow(QWidget *parent):
ui.setupUi(this); ui.setupUi(this);
hide(); hide();
// We only need this menu if we have more than one system
ui.menuConnected_Systems->setEnabled(false);
// XXX This menu probably doesn't make sense and should go, not just hide
ui.menuUnmanned_System->setEnabled(false);
// Set dock options // Set dock options
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks); setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
...@@ -153,10 +159,14 @@ MainWindow::MainWindow(QWidget *parent): ...@@ -153,10 +159,14 @@ MainWindow::MainWindow(QWidget *parent):
toolBar = new QGCToolBar(this); toolBar = new QGCToolBar(this);
this->addToolBar(toolBar); this->addToolBar(toolBar);
// Add actions (inverted order due to insert) // Add actions (inverted order due to insert)
toolBar->addPerspectiveChangeAction(ui.actionSimulation_View);
toolBar->addPerspectiveChangeAction(ui.actionEngineersView); QList<QAction*> actions;
toolBar->addPerspectiveChangeAction(ui.actionPilotsView);
toolBar->addPerspectiveChangeAction(ui.actionOperatorsView); actions << ui.actionOperatorsView;
actions << ui.actionPilotsView;
actions << ui.actionEngineersView;
actions << ui.actionSimulation_View;
toolBar->setPerspectiveChangeActions(actions);
customStatusBar = new QGCStatusBar(this); customStatusBar = new QGCStatusBar(this);
setStatusBar(customStatusBar); setStatusBar(customStatusBar);
...@@ -1272,6 +1282,10 @@ void MainWindow::UASSpecsChanged(int uas) ...@@ -1272,6 +1282,10 @@ void MainWindow::UASSpecsChanged(int uas)
void MainWindow::UASCreated(UASInterface* uas) void MainWindow::UASCreated(UASInterface* uas)
{ {
// Check if this is the 2nd system and we need a switch menu
if (UASManager::instance()->getUASList().count() > 1)
ui.menuConnected_Systems->setEnabled(true);
// Connect the UAS to the full user interface // Connect the UAS to the full user interface
//if (uas != NULL) //if (uas != NULL)
......
...@@ -141,14 +141,6 @@ ...@@ -141,14 +141,6 @@
<string>Main Widget</string> <string>Main Widget</string>
</property> </property>
</widget> </widget>
<widget class="QMenu" name="menuPlugins">
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>Plugins</string>
</property>
</widget>
<addaction name="menuMGround"/> <addaction name="menuMGround"/>
<addaction name="menuNetwork"/> <addaction name="menuNetwork"/>
<addaction name="menuConnected_Systems"/> <addaction name="menuConnected_Systems"/>
...@@ -156,7 +148,6 @@ ...@@ -156,7 +148,6 @@
<addaction name="menuPerspectives"/> <addaction name="menuPerspectives"/>
<addaction name="menuMain"/> <addaction name="menuMain"/>
<addaction name="menuTools"/> <addaction name="menuTools"/>
<addaction name="menuPlugins"/>
<addaction name="menuHelp"/> <addaction name="menuHelp"/>
</widget> </widget>
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusBar"/>
...@@ -338,7 +329,7 @@ ...@@ -338,7 +329,7 @@
<normaloff>:/files/images/apps/utilities-system-monitor.svg</normaloff>:/files/images/apps/utilities-system-monitor.svg</iconset> <normaloff>:/files/images/apps/utilities-system-monitor.svg</normaloff>:/files/images/apps/utilities-system-monitor.svg</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Development</string> <string>Plot</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Meta+E</string> <string>Meta+E</string>
......
...@@ -44,6 +44,11 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(MAVLinkProtocol* mavlink, QWidget *pare ...@@ -44,6 +44,11 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(MAVLinkProtocol* mavlink, QWidget *pare
setAccelerationFactorInt(49); setAccelerationFactorInt(49);
ui->speedSlider->setValue(49); ui->speedSlider->setValue(49);
ui->positionSlider->setValue(ui->positionSlider->minimum()); ui->positionSlider->setValue(ui->positionSlider->minimum());
ui->playButton->setEnabled(false);
ui->speedSlider->setEnabled(false);
ui->positionSlider->setEnabled(false);
loadSettings(); loadSettings();
} }
...@@ -254,6 +259,11 @@ void QGCMAVLinkLogPlayer::setAccelerationFactorInt(int factor) ...@@ -254,6 +259,11 @@ void QGCMAVLinkLogPlayer::setAccelerationFactorInt(int factor)
bool QGCMAVLinkLogPlayer::loadLogFile(const QString& file) bool QGCMAVLinkLogPlayer::loadLogFile(const QString& file)
{ {
// Enable controls
ui->playButton->setEnabled(true);
ui->speedSlider->setEnabled(true);
ui->positionSlider->setEnabled(true);
// Check if logging is still enabled // Check if logging is still enabled
if (mavlink->loggingEnabled()) if (mavlink->loggingEnabled())
{ {
......
...@@ -14,22 +14,22 @@ ...@@ -14,22 +14,22 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin"> <property name="leftMargin">
<number>12</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>4</number> <number>4</number>
</property> </property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QSlider" name="positionSlider"> <widget class="QLabel" name="logStatsLabel">
<property name="maximum"> <property name="text">
<number>10000</number> <string>No logfile selected..</string>
</property>
<property name="pageStep">
<number>100</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -57,9 +57,18 @@ ...@@ -57,9 +57,18 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="logStatsLabel"> <widget class="QSlider" name="positionSlider">
<property name="text"> <property name="maximum">
<string>No logfile selected..</string> <number>10000</number>
</property>
<property name="pageStep">
<number>100</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property> </property>
</widget> </widget>
</item> </item>
...@@ -110,7 +119,7 @@ ...@@ -110,7 +119,7 @@
<item> <item>
<widget class="QLabel" name="logFileNameLabel"> <widget class="QLabel" name="logFileNameLabel">
<property name="text"> <property name="text">
<string>Please choose logfile</string> <string>-</string>
</property> </property>
</widget> </widget>
</item> </item>
......
...@@ -40,9 +40,11 @@ QGCStatusBar::QGCStatusBar(QWidget *parent) : ...@@ -40,9 +40,11 @@ QGCStatusBar::QGCStatusBar(QWidget *parent) :
toggleLoggingButton = new QPushButton("Logging", this); toggleLoggingButton = new QPushButton("Logging", this);
toggleLoggingButton->setCheckable(true); toggleLoggingButton->setCheckable(true);
addWidget(toggleLoggingButton); addPermanentWidget(toggleLoggingButton);
loadSettings(); loadSettings();
setStyleSheet("QStatusBar {margin: 1px; border-bottom: 1px solid #252525; border-top: 1px solid #969696; padding: 1px");
} }
void QGCStatusBar::setLogPlayer(QGCMAVLinkLogPlayer* player) void QGCStatusBar::setLogPlayer(QGCMAVLinkLogPlayer* player)
......
This diff is collapsed.
...@@ -39,7 +39,7 @@ class QGCToolBar : public QToolBar ...@@ -39,7 +39,7 @@ class QGCToolBar : public QToolBar
public: public:
explicit QGCToolBar(QWidget* parent = 0); explicit QGCToolBar(QWidget* parent = 0);
void addPerspectiveChangeAction(QAction* action); void setPerspectiveChangeActions(const QList<QAction*> &action);
~QGCToolBar(); ~QGCToolBar();
public slots: public slots:
......
#include "QGCWelcomeWidget.h"
#include "ui_QGCWelcomeWidget.h"
QGCWelcomeWidget::QGCWelcomeWidget(QWidget *parent) :
QWidget(parent),
ui(new Ui::QGCWelcomeWidget)
{
ui->setupUi(this);
}
QGCWelcomeWidget::~QGCWelcomeWidget()
{
delete ui;
}
#ifndef QGCWELCOMEWIDGET_H
#define QGCWELCOMEWIDGET_H
#include <QWidget>
namespace Ui {
class QGCWelcomeWidget;
}
class QGCWelcomeWidget : public QWidget
{
Q_OBJECT
public:
explicit QGCWelcomeWidget(QWidget *parent = 0);
~QGCWelcomeWidget();
private:
Ui::QGCWelcomeWidget *ui;
};
#endif // QGCWELCOMEWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCWelcomeWidget</class>
<widget class="QWidget" name="QGCWelcomeWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>30</number>
</property>
<property name="rightMargin">
<number>30</number>
</property>
<item row="0" column="0">
<widget class="QToolButton" name="connectButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QToolButton" name="logreplayButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="demoButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
...@@ -14,24 +14,15 @@ ...@@ -14,24 +14,15 @@
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout" rowstretch="100,1"> <layout class="QGridLayout" name="gridLayout" rowstretch="100,1">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>4</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<property name="horizontalSpacing"> <property name="horizontalSpacing">
<number>2</number> <number>3</number>
</property> </property>
<property name="verticalSpacing"> <property name="verticalSpacing">
<number>0</number> <number>0</number>
</property> </property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGCMapWidget" name="map" native="true"/> <widget class="QGCMapWidget" name="map" native="true"/>
</item> </item>
......
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>695</width> <width>809</width>
<height>35</height> <height>35</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Form</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,0,1,100,20,1"> <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,1,1,1,30,1">
<property name="spacing"> <property name="spacing">
<number>12</number> <number>2</number>
</property> </property>
<property name="margin"> <property name="margin">
<number>4</number> <number>4</number>
......
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