From c23ac709ee5184139a83a428adbc0e3d1fa34cba Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 13 Aug 2012 18:27:10 +0200 Subject: [PATCH] Visual cleanups in various places, fits now better small screens --- src/uas/UAS.cc | 29 +-- src/ui/Linechart.ui | 361 ++++++++++++++++------------------- src/ui/ParameterInterface.ui | 36 +--- src/ui/QGCParamWidget.cc | 6 +- 4 files changed, 193 insertions(+), 239 deletions(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 9b9df3262..6891f2095 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -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 diff --git a/src/ui/Linechart.ui b/src/ui/Linechart.ui index 58449dac5..0e6b0fd74 100644 --- a/src/ui/Linechart.ui +++ b/src/ui/Linechart.ui @@ -6,7 +6,7 @@ 0 0 - 833 + 1337 585 @@ -28,208 +28,177 @@ - - - - - - 1 - 0 - + + + 6 + + + + + QFrame::NoFrame - - - 90 - 200 - + + 1 - - - 370 - 16777215 - + + Qt::Horizontal - - + + 10 - - Curve Selection - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - 2 - - - 0 - - - - - - 0 - 0 - - - - - 60 - 150 - - - - - 60 - 150 - - - - false - - - - - - QFrame::NoFrame - - - QFrame::Sunken - - - true - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - - - 0 - 0 - 368 - 488 - + + + + 6 + + + 6 + + + 6 + + + 3 + + + + + + 0 + 0 + - - - - - - - 2 - - - - - - All MAVs - - - - - - - - 0 + + + 60 + 150 + + + + + 60 + 150 + + + + false + + + + + + QFrame::NoFrame + + + QFrame::Sunken + + + true + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + + + 0 + 0 + 202 + 488 + - - - - 0 + + + + + + + 2 + + + + + + All MAVs - - - - Display only variable names in curve list - - - Short names - - - - - - - Display variable units in curve list - - - Display variable units in curve list - - - Show units - - - true - - - - - - - - - - - Rotate color scheme for all curves - - - Recolor - - - - - - - Qt::Vertical - - - QSizePolicy::Minimum - - - - 20 - 0 - - - - - - - - - - - - - - - - - - 0 - 0 - - - - - 200 - 200 - - - - - 800 - 300 - - - - - - - Diagram - + + + + + + + 0 + + + + + 0 + + + + + Display only variable names in curve list + + + Short names + + + + + + + Display variable units in curve list + + + Display variable units in curve list + + + Show units + + + true + + + + + + + + + + + Rotate color scheme for all curves + + + Recolor + + + + + + + Qt::Vertical + + + QSizePolicy::Minimum + + + + 20 + 0 + + + + + + + + + + + + + diff --git a/src/ui/ParameterInterface.ui b/src/ui/ParameterInterface.ui index 167f00641..d911a49d8 100644 --- a/src/ui/ParameterInterface.ui +++ b/src/ui/ParameterInterface.ui @@ -6,43 +6,25 @@ 0 0 - 335 - 300 + 707 + 572 Form - - - 5 - - - 2 - + - 6 + 0 - - - - Onboard Parameters + + + + -1 - - - 3 - - - - - -1 - - - - - + -1 diff --git a/src/ui/QGCParamWidget.cc b/src/ui/QGCParamWidget.cc index 185383cfa..eecae3ba1 100644 --- a/src/ui/QGCParamWidget.cc +++ b/src/ui/QGCParamWidget.cc @@ -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); -- 2.22.0