Commit c23ac709 authored by Lorenz Meier's avatar Lorenz Meier

Visual cleanups in various places, fits now better small screens

parent 05cb3c23
......@@ -2485,36 +2485,39 @@ QString UAS::getShortModeTextFor(int id)
{
mode += "AUTO";
}
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_GUIDED)
else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_GUIDED)
{
mode += "|GUID";
mode += "|STABILIZED";
}
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_STABILIZE)
// if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_STABILIZE)
// {
// mode += "|STAB";
// }
else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_TEST)
{
mode += "|STAB";
mode += "|TEST";
}
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_TEST)
else if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_MANUAL)
{
mode += "|TEST";
mode += "|MANUAL";
}
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_MANUAL)
else if (modeid == 0)
{
mode += "|MAN";
mode = "|PREFLIGHT";
}
if (modeid == 0)
else
{
mode = "PREFLIGHT";
mode = "|UNKNOWN";
}
// ARMED STATE DECODING
if (modeid & (uint8_t)MAV_MODE_FLAG_DECODE_POSITION_SAFETY)
{
mode.prepend("A/");
mode.prepend("A");
}
else
{
mode.prepend("D/");
mode.prepend("D");
}
// HARDWARE IN THE LOOP DECODING
......
......@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>833</width>
<width>1337</width>
<height>585</height>
</rect>
</property>
......@@ -28,208 +28,177 @@
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="5,0,0">
<item row="0" column="0" rowspan="3">
<widget class="QGroupBox" name="curveGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>6</number>
</property>
<item>
<widget class="QSplitter" name="splitter">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>200</height>
</size>
<property name="midLineWidth">
<number>1</number>
</property>
<property name="maximumSize">
<size>
<width>370</width>
<height>16777215</height>
</size>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="styleSheet">
<string notr="true"/>
<property name="handleWidth">
<number>10</number>
</property>
<property name="title">
<string>Curve Selection</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,0">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QScrollArea" name="curveListWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>150</height>
</size>
</property>
<property name="baseSize">
<size>
<width>60</width>
<height>150</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>368</width>
<height>488</height>
</rect>
<widget class="QWidget" name="curveGroupBox" native="true">
<layout class="QGridLayout" name="gridLayout" rowstretch="50,1">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>6</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QScrollArea" name="curveListWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QComboBox" name="uasSelectionBox">
<item>
<property name="text">
<string>All MAVs</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<property name="spacing">
<number>0</number>
<property name="minimumSize">
<size>
<width>60</width>
<height>150</height>
</size>
</property>
<property name="baseSize">
<size>
<width>60</width>
<height>150</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>202</width>
<height>488</height>
</rect>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<item>
<widget class="QComboBox" name="uasSelectionBox">
<item>
<property name="text">
<string>All MAVs</string>
</property>
<item>
<widget class="QCheckBox" name="shortNameCheckBox">
<property name="toolTip">
<string>Display only variable names in curve list</string>
</property>
<property name="text">
<string>Short names</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showUnitsCheckBox">
<property name="toolTip">
<string>Display variable units in curve list</string>
</property>
<property name="whatsThis">
<string>Display variable units in curve list</string>
</property>
<property name="text">
<string>Show units</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="recolorButton">
<property name="toolTip">
<string>Rotate color scheme for all curves</string>
</property>
<property name="text">
<string>Recolor</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="2" rowspan="3">
<widget class="QGroupBox" name="diagramGroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>200</width>
<height>200</height>
</size>
</property>
<property name="baseSize">
<size>
<width>800</width>
<height>300</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="title">
<string>Diagram</string>
</property>
</item>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QCheckBox" name="shortNameCheckBox">
<property name="toolTip">
<string>Display only variable names in curve list</string>
</property>
<property name="text">
<string>Short names</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="showUnitsCheckBox">
<property name="toolTip">
<string>Display variable units in curve list</string>
</property>
<property name="whatsThis">
<string>Display variable units in curve list</string>
</property>
<property name="text">
<string>Show units</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QPushButton" name="recolorButton">
<property name="toolTip">
<string>Rotate color scheme for all curves</string>
</property>
<property name="text">
<string>Recolor</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="diagramGroupBox" native="true"/>
</widget>
</item>
</layout>
......
......@@ -6,43 +6,25 @@
<rect>
<x>0</x>
<y>0</y>
<width>335</width>
<height>300</height>
<width>707</width>
<height>572</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="2,0">
<property name="horizontalSpacing">
<number>5</number>
</property>
<property name="verticalSpacing">
<number>2</number>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="100,1">
<property name="margin">
<number>6</number>
<number>0</number>
</property>
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Onboard Parameters</string>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>-1</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>3</number>
</property>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>-1</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item>
<widget class="QStackedWidget" name="sensorSettings">
<property name="currentIndex">
<number>-1</number>
......
......@@ -58,7 +58,7 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) :
tree = new QTreeWidget(this);
statusLabel = new QLabel();
statusLabel->setAutoFillBackground(true);
tree->setColumnWidth(0, 175);
tree->setColumnWidth(70, 30);
// Set tree widget as widget onto this component
QGridLayout* horizontalLayout;
......@@ -67,8 +67,8 @@ QGCParamWidget::QGCParamWidget(UASInterface* uas, QWidget *parent) :
horizontalLayout->setHorizontalSpacing(6);
horizontalLayout->setVerticalSpacing(6);
horizontalLayout->setMargin(0);
//horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize);
horizontalLayout->setSizeConstraint( QLayout::SetFixedSize );
horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize);
//horizontalLayout->setSizeConstraint( QLayout::SetFixedSize );
// Parameter tree
horizontalLayout->addWidget(tree, 0, 0, 1, 3);
......
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