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 {
......@@ -6,6 +6,8 @@ background-color: #050508;
color: #DDDDDF;
background-clip: border;
font-size: 11px;
border: 0px;
padding: 1px;
}
QGroupBox {
......@@ -186,7 +188,8 @@ QPushButton {
min-height: 20px;
/*min-width: 24px;*/
max-height: 20px;
border: 0px solid #59666f;
border: 1px solid #465158;
margin: 1px;
border-radius: 2px;
padding-left: 8px;
padding-right: 8px;
......@@ -194,13 +197,11 @@ QPushButton {
}
QPushButton:checked {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #404040, stop: 1 #808080);
border: 0px solid #379AC3;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09A2B2, stop: 1 #414B52);
}
QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0);
border: 0px solid #379AC3;
}
QToolButton {
......@@ -208,21 +209,20 @@ QToolButton {
min-height: 20px;
/*min-width: 24px;*/
max-height: 20px;
border: 0px solid #4A4A4F;
border: 1px solid #4A4A4F;
margin: 1px;
border-radius: 2px;
padding-left: 3px;
padding-left: 3px;
padding-right: 3px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #59666f, stop: 1 #414B52);
}
QToolButton:checked {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #090909, stop: 1 #353535);
border: 2px solid #379AC3;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #09A2B2, stop: 1 #414B52);
}
QToolButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #bbbbbb, stop: 1 #b0b0b0);
border: 2px solid #379AC3;
}
QToolTip {
......@@ -259,6 +259,10 @@ QMenuBar::item:disabled:pressed {
border: none;
}
QSlider {
background-color: transparent;
}
QSlider::groove:horizontal {
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 */
......@@ -266,6 +270,13 @@ QSlider::groove:horizontal {
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 {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #232228, stop: 1 #020208);
border: 2px solid #379AC3;
......@@ -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 */
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 {
border: 1px solid #999999;
......
This diff is collapsed.
......@@ -135,6 +135,12 @@ MainWindow::MainWindow(QWidget *parent):
ui.setupUi(this);
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
setDockOptions(AnimatedDocks | AllowTabbedDocks | AllowNestedDocks);
......@@ -153,10 +159,14 @@ MainWindow::MainWindow(QWidget *parent):
toolBar = new QGCToolBar(this);
this->addToolBar(toolBar);
// Add actions (inverted order due to insert)
toolBar->addPerspectiveChangeAction(ui.actionSimulation_View);
toolBar->addPerspectiveChangeAction(ui.actionEngineersView);
toolBar->addPerspectiveChangeAction(ui.actionPilotsView);
toolBar->addPerspectiveChangeAction(ui.actionOperatorsView);
QList<QAction*> actions;
actions << ui.actionOperatorsView;
actions << ui.actionPilotsView;
actions << ui.actionEngineersView;
actions << ui.actionSimulation_View;
toolBar->setPerspectiveChangeActions(actions);
customStatusBar = new QGCStatusBar(this);
setStatusBar(customStatusBar);
......@@ -1272,6 +1282,10 @@ void MainWindow::UASSpecsChanged(int 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
//if (uas != NULL)
......
......@@ -141,14 +141,6 @@
<string>Main Widget</string>
</property>
</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="menuNetwork"/>
<addaction name="menuConnected_Systems"/>
......@@ -156,7 +148,6 @@
<addaction name="menuPerspectives"/>
<addaction name="menuMain"/>
<addaction name="menuTools"/>
<addaction name="menuPlugins"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusBar"/>
......@@ -338,7 +329,7 @@
<normaloff>:/files/images/apps/utilities-system-monitor.svg</normaloff>:/files/images/apps/utilities-system-monitor.svg</iconset>
</property>
<property name="text">
<string>Development</string>
<string>Plot</string>
</property>
<property name="shortcut">
<string>Meta+E</string>
......
......@@ -44,6 +44,11 @@ QGCMAVLinkLogPlayer::QGCMAVLinkLogPlayer(MAVLinkProtocol* mavlink, QWidget *pare
setAccelerationFactorInt(49);
ui->speedSlider->setValue(49);
ui->positionSlider->setValue(ui->positionSlider->minimum());
ui->playButton->setEnabled(false);
ui->speedSlider->setEnabled(false);
ui->positionSlider->setEnabled(false);
loadSettings();
}
......@@ -254,6 +259,11 @@ void QGCMAVLinkLogPlayer::setAccelerationFactorInt(int factor)
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
if (mavlink->loggingEnabled())
{
......
......@@ -14,22 +14,22 @@
<string>Form</string>
</property>
<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>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QSlider" name="positionSlider">
<property name="maximum">
<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>
<widget class="QLabel" name="logStatsLabel">
<property name="text">
<string>No logfile selected..</string>
</property>
</widget>
</item>
......@@ -57,9 +57,18 @@
</widget>
</item>
<item>
<widget class="QLabel" name="logStatsLabel">
<property name="text">
<string>No logfile selected..</string>
<widget class="QSlider" name="positionSlider">
<property name="maximum">
<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>
</widget>
</item>
......@@ -110,7 +119,7 @@
<item>
<widget class="QLabel" name="logFileNameLabel">
<property name="text">
<string>Please choose logfile</string>
<string>-</string>
</property>
</widget>
</item>
......
......@@ -40,9 +40,11 @@ QGCStatusBar::QGCStatusBar(QWidget *parent) :
toggleLoggingButton = new QPushButton("Logging", this);
toggleLoggingButton->setCheckable(true);
addWidget(toggleLoggingButton);
addPermanentWidget(toggleLoggingButton);
loadSettings();
setStyleSheet("QStatusBar {margin: 1px; border-bottom: 1px solid #252525; border-top: 1px solid #969696; padding: 1px");
}
void QGCStatusBar::setLogPlayer(QGCMAVLinkLogPlayer* player)
......
This diff is collapsed.
......@@ -39,7 +39,7 @@ class QGCToolBar : public QToolBar
public:
explicit QGCToolBar(QWidget* parent = 0);
void addPerspectiveChangeAction(QAction* action);
void setPerspectiveChangeActions(const QList<QAction*> &action);
~QGCToolBar();
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 @@
<string>Form</string>
</property>
<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">
<number>2</number>
<number>3</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QGCMapWidget" name="map" native="true"/>
</item>
......
......@@ -6,16 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>695</width>
<width>809</width>
<height>35</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</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">
<number>12</number>
<number>2</number>
</property>
<property name="margin">
<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