diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index aa2f892c7..3be59f710 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -122,8 +122,8 @@ <rect> <x>0</x> <y>0</y> - <width>676</width> - <height>674</height> + <width>674</width> + <height>677</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> @@ -655,6 +655,9 @@ Leave at 50Hz for fixed wing.</string> <layout class="QVBoxLayout" name="verticalLayout"> <item> <layout class="QVBoxLayout" name="channelLayout"> + <property name="spacing"> + <number>6</number> + </property> <property name="sizeConstraint"> <enum>QLayout::SetDefaultConstraint</enum> </property> diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index a69a88bf9..259655158 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -29,49 +29,42 @@ #include "configoutputwidget.h" OutputChannelForm::OutputChannelForm(const int index, QWidget *parent, const bool showLegend) : - ConfigTaskWidget(parent), - ui(), - m_index(index), - m_inChannelTest(false) + ConfigTaskWidget(parent), ui(), m_index(index), m_inChannelTest(false) { ui.setupUi(this); if (!showLegend) { - // Remove legend - QGridLayout *grid_layout = dynamic_cast<QGridLayout *>(layout()); - Q_ASSERT(grid_layout); - for (int col = 0; col < grid_layout->columnCount(); col++) { // remove every item in first row - QLayoutItem *item = grid_layout->itemAtPosition(0, col); + QLayout *legendLayout = layout()->itemAt(0)->layout(); + Q_ASSERT(legendLayout); + // remove every item + while (legendLayout->count()) { + QLayoutItem *item = legendLayout->takeAt(0); if (!item) { continue; } // get widget from layout item - QWidget *legend_widget = item->widget(); - if (!legend_widget) { + QWidget *widget = item->widget(); + if (widget) { + delete widget; continue; } - // delete widget - grid_layout->removeWidget(legend_widget); - delete legend_widget; } + // and finally remove and delete the legend layout + layout()->removeItem(legendLayout); + delete legendLayout; } // The convention for OP is Channel 1 to Channel 10. ui.actuatorNumber->setText(QString("%1:").arg(m_index + 1)); // Register for ActuatorSettings changes: - connect(ui.actuatorMin, SIGNAL(editingFinished()), - this, SLOT(setChannelRange())); - connect(ui.actuatorMax, SIGNAL(editingFinished()), - this, SLOT(setChannelRange())); - connect(ui.actuatorRev, SIGNAL(toggled(bool)), - this, SLOT(reverseChannel(bool))); + connect(ui.actuatorMin, SIGNAL(editingFinished()), this, SLOT(setChannelRange())); + connect(ui.actuatorMax, SIGNAL(editingFinished()), this, SLOT(setChannelRange())); + connect(ui.actuatorRev, SIGNAL(toggled(bool)), this, SLOT(reverseChannel(bool))); // Now connect the channel out sliders to our signal to send updates in test mode - connect(ui.actuatorNeutral, SIGNAL(valueChanged(int)), - this, SLOT(sendChannelTest(int))); + connect(ui.actuatorNeutral, SIGNAL(valueChanged(int)), this, SLOT(sendChannelTest(int))); ui.actuatorLink->setChecked(false); - connect(ui.actuatorLink, SIGNAL(toggled(bool)), - this, SLOT(linkToggled(bool))); + connect(ui.actuatorLink, SIGNAL(toggled(bool)), this, SLOT(linkToggled(bool))); disableMouseWheelEvents(); } @@ -194,19 +187,6 @@ void OutputChannelForm::neutral(int value) void OutputChannelForm::setAssignment(const QString &assignment) { ui.actuatorName->setText(assignment); - QFontMetrics metrics(ui.actuatorName->font()); - int width = metrics.width(assignment) + 1; - foreach(OutputChannelForm * form, parent()->findChildren<OutputChannelForm *>()) { - if (form == this) { - continue; - } - if (form->ui.actuatorName->minimumSize().width() < width) { - form->ui.actuatorName->setMinimumSize(width, 0); - } else { - width = form->ui.actuatorName->minimumSize().width(); - } - } - ui.actuatorName->setMinimumSize(width, 0); } /** @@ -220,7 +200,7 @@ void OutputChannelForm::setChannelRange() { int oldMini = ui.actuatorNeutral->minimum(); -// int oldMaxi = ui.actuatorNeutral->maximum(); + // int oldMaxi = ui.actuatorNeutral->maximum(); if (ui.actuatorMin->value() < ui.actuatorMax->value()) { ui.actuatorNeutral->setRange(ui.actuatorMin->value(), ui.actuatorMax->value()); @@ -234,8 +214,9 @@ void OutputChannelForm::setChannelRange() ui.actuatorNeutral->setValue(ui.actuatorNeutral->minimum()); } -// if (ui.actuatorNeutral->value() == oldMaxi) -// ui.actuatorNeutral->setValue(ui.actuatorNeutral->maximum()); // this can be dangerous if it happens to be controlling a motor at the time! + // if (ui.actuatorNeutral->value() == oldMaxi) + // this can be dangerous if it happens to be controlling a motor at the time! + // ui.actuatorNeutral->setValue(ui.actuatorNeutral->maximum()); } /** @@ -252,8 +233,7 @@ void OutputChannelForm::reverseChannel(bool state) return; } - // Now, swap the min & max values (only on the spinboxes, the slider - // does not change! + // Now, swap the min & max values (only on the spinboxes, the slider does not change!) int temp = ui.actuatorMax->value(); ui.actuatorMax->setValue(ui.actuatorMin->value()); ui.actuatorMin->setValue(temp); @@ -286,12 +266,14 @@ void OutputChannelForm::sendChannelTest(int value) } if (ui.actuatorRev->isChecked()) { - value = ui.actuatorMin->value() - value + ui.actuatorMax->value(); // the channel is reversed + // the channel is reversed + value = ui.actuatorMin->value() - value + ui.actuatorMax->value(); } // update the label ui.actuatorValue->setText(QString::number(value)); - if (ui.actuatorLink->checkState() && parent()) { // the channel is linked to other channels + if (ui.actuatorLink->checkState() && parent()) { + // the channel is linked to other channels QList<OutputChannelForm *> outputChannelForms = parent()->findChildren<OutputChannelForm *>(); // set the linked channels of the parent widget to the same value foreach(OutputChannelForm * outputChannelForm, outputChannelForms) { @@ -320,7 +302,8 @@ void OutputChannelForm::sendChannelTest(int value) } if (!m_inChannelTest) { - return; // we are not in Test Output mode + // we are not in Test Output mode + return; } emit channelChanged(index(), value); } diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui index abe5d04dd..9e0c7fa1b 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui @@ -6,554 +6,747 @@ <rect> <x>0</x> <y>0</y> - <width>825</width> - <height>58</height> + <width>772</width> + <height>57</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> - <layout class="QGridLayout" name="gridLayout"> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>6</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> <property name="topMargin"> - <number>1</number> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> </property> <property name="bottomMargin"> - <number>1</number> + <number>0</number> </property> - <property name="horizontalSpacing"> - <number>12</number> - </property> - <item row="0" column="11"> - <widget class="QLabel" name="legend5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <item> + <layout class="QHBoxLayout" name="legendLayout"> + <property name="spacing"> + <number>12</number> </property> - <property name="minimumSize"> - <size> - <width>45</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + <item> + <widget class="QLabel" name="legend6"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Link</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="8"> - <widget class="QSpinBox" name="actuatorMax"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>25</height> - </size> - </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> - </property> - <property name="toolTip"> - <string>Maximum PWM value, beware of not overdriving your servo.</string> - </property> - <property name="maximum"> - <number>9999</number> - </property> - </widget> - </item> - <item row="0" column="4" colspan="2"> - <widget class="QLabel" name="legend2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>#</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="margin"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="legend0"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>110</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Neutral (slowest for motor)</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="legend6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="layoutDirection"> - <enum>Qt::LeftToRight</enum> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>Assignment</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="legend1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>55</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>#</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="margin"> - <number>0</number> - </property> - </widget> - </item> - <item row="1" column="6"> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>5</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="1"> - <widget class="QLabel" name="legend0"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>Min</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="legend2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>20</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Assignment</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QSpinBox" name="actuatorMin"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>25</height> - </size> - </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> - </property> - <property name="toolTip"> - <string>Minimum PWM value, beware of not overdriving your servo.</string> - </property> - <property name="maximum"> - <number>9999</number> - </property> - </widget> - </item> - <item row="1" column="4"> - <widget class="QSlider" name="actuatorNeutral"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>25</height> - </size> - </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> - </property> - <property name="maximum"> - <number>9999</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - <item row="0" column="8"> - <widget class="QLabel" name="legend3"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>Neutral (slowest for motor)</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_4"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QLabel" name="legend3"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>55</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Max</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="actuatorNumber"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>20</width> - <height>25</height> - </size> - </property> - <property name="toolTip"> - <string>Channel Number</string> - </property> - <property name="text"> - <string>TextLabel</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="3"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>5</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="actuatorName"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>110</width> - <height>25</height> - </size> - </property> - <property name="text"> - <string>TextLabel</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="0" column="9"> - <widget class="QLabel" name="legend4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>Max</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="legend4"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Reversed</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> - </item> - <item row="1" column="5"> - <widget class="QLabel" name="actuatorValue"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>25</height> - </size> - </property> - <property name="toolTip"> - <string>Current value of slider.</string> - </property> - <property name="text"> - <string>0000</string> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="legend1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="font"> - <font> - <weight>75</weight> - <italic>false</italic> - <bold>true</bold> - </font> - </property> - <property name="styleSheet"> - <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); + </property> + <property name="text"> + <string>Reversed</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="legend5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>20</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="font"> + <font> + <pointsize>-1</pointsize> + <weight>75</weight> + <italic>false</italic> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); color: rgb(255, 255, 255); border-radius: 5; -font:bold; +font: bold 12px; margin:1px;</string> - </property> - <property name="text"> - <string>Min</string> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - </widget> + </property> + <property name="text"> + <string>Link</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> </item> - <item row="1" column="9"> - <widget class="QFrame" name="frame"> - <property name="minimumSize"> - <size> - <width>75</width> - <height>0</height> - </size> + <item> + <layout class="QHBoxLayout" name="lineLayout"> + <property name="spacing"> + <number>12</number> </property> - <layout class="QGridLayout" name="gridLayout_2"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0"> - <widget class="QCheckBox" name="actuatorRev"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <item> + <widget class="QLabel" name="actuatorNumber"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>20</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>20</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Channel Number</string> + </property> + <property name="text"> + <string>0:</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="actuatorName"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>110</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>110</width> + <height>16777215</height> + </size> + </property> + <property name="text"> + <string>-</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item> + <widget class="QSpinBox" name="actuatorMin"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>55</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>55</width> + <height>16777215</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Minimum PWM value, beware of not overdriving your servo.</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="maximum"> + <number>9999</number> + </property> + <property name="value"> + <number>0</number> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QFrame" name="frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <property name="leftMargin"> + <number>0</number> </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> + <property name="topMargin"> + <number>0</number> </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> + <property name="rightMargin"> + <number>0</number> </property> - <property name="toolTip"> - <string>Check to invert the channel.</string> + <property name="bottomMargin"> + <number>0</number> </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="1" column="11"> - <widget class="QFrame" name="frame_1"> - <property name="minimumSize"> - <size> - <width>45</width> - <height>0</height> - </size> - </property> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <property name="spacing"> - <number>0</number> - </property> - <item row="0" column="0" alignment="Qt::AlignHCenter"> - <widget class="QCheckBox" name="actuatorLink"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <item> + <widget class="QSlider" name="actuatorNeutral"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>50</width> + <height>0</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="maximum"> + <number>9999</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="actuatorValue"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>24</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>24</width> + <height>16777215</height> + </size> + </property> + <property name="toolTip"> + <string>Current value of slider.</string> + </property> + <property name="text"> + <string>0000</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>5</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QSpinBox" name="actuatorMax"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>55</width> + <height>25</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>55</width> + <height>16777215</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Maximum PWM value, beware of not overdriving your servo.</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + <property name="maximum"> + <number>9999</number> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>75</width> + <height>0</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="spacing"> + <number>0</number> </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> + <property name="leftMargin"> + <number>0</number> </property> - <property name="focusPolicy"> - <enum>Qt::StrongFocus</enum> + <property name="topMargin"> + <number>0</number> </property> - <property name="toolTip"> - <string>Output mode</string> + <property name="rightMargin"> + <number>0</number> </property> - </widget> - </item> - </layout> - </widget> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignHCenter"> + <widget class="QCheckBox" name="actuatorRev"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Check to invert the channel.</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>25</height> + </size> + </property> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Plain</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignHCenter"> + <widget class="QCheckBox" name="actuatorLink"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <property name="toolTip"> + <string>Output mode</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> </item> </layout> </widget> <tabstops> <tabstop>actuatorMin</tabstop> - <tabstop>actuatorNeutral</tabstop> <tabstop>actuatorMax</tabstop> </tabstops> <resources/>