mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
GCS Input config: Change the layout a bit to make the spacing between rows
regular, and move some of the layout to the .ui file.
This commit is contained in:
parent
8c91522e54
commit
d496f81c68
@ -46,7 +46,7 @@
|
||||
#define STICK_MIN_MOVE -8
|
||||
#define STICK_MAX_MOVE 8
|
||||
|
||||
ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent),wizardStep(wizardWelcome),loop(NULL),skipflag(false),goWizard(NULL)
|
||||
ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent),wizardStep(wizardWelcome),loop(NULL),skipflag(false)
|
||||
{
|
||||
manualCommandObj = ManualControlCommand::GetInstance(getObjectManager());
|
||||
manualSettingsObj = ManualControlSettings::GetInstance(getObjectManager());
|
||||
@ -60,7 +60,7 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
foreach(QString name,manualSettingsObj->getFields().at(0)->getElementNames())
|
||||
{
|
||||
inputChannelForm * inp=new inputChannelForm(this,index==0);
|
||||
m_config->advancedPage->layout()->addWidget(inp);
|
||||
m_config->channelSettings->layout()->addWidget(inp);
|
||||
inp->ui->channelName->setText(name);
|
||||
addUAVObjectToWidgetRelation("ManualControlSettings","ChannelGroups",inp->ui->channelGroup,index);
|
||||
addUAVObjectToWidgetRelation("ManualControlSettings","ChannelNumber",inp->ui->channelNumber,index);
|
||||
@ -69,12 +69,8 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
addUAVObjectToWidgetRelation("ManualControlSettings","ChannelMax",inp->ui->channelMax,index);
|
||||
++index;
|
||||
}
|
||||
goWizard=new QPushButton(tr("Start Wizard"),this);
|
||||
m_config->advancedPage->layout()->addWidget(goWizard);
|
||||
connect(goWizard,SIGNAL(clicked()),this,SLOT(goToNormalWizard()));
|
||||
goSimpleWizard=new QPushButton(tr("Start Simple Wizard"),this);
|
||||
m_config->advancedPage->layout()->addWidget(goSimpleWizard);
|
||||
connect(goSimpleWizard,SIGNAL(clicked()),this,SLOT(goToSimpleWizard()));
|
||||
|
||||
connect(m_config->configurationWizard,SIGNAL(clicked()),this,SLOT(goToNormalWizard()));
|
||||
|
||||
connect(m_config->wzNext,SIGNAL(clicked()),this,SLOT(wzNext()));
|
||||
connect(m_config->wzCancel,SIGNAL(clicked()),this,SLOT(wzCancel()));
|
||||
@ -98,8 +94,6 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
addUAVObjectToWidgetRelation("ManualControlSettings","Arming",m_config->armControl);
|
||||
addUAVObjectToWidgetRelation("ManualControlSettings","ArmedTimeout",m_config->armTimeout,0,1000);
|
||||
connect( ManualControlCommand::GetInstance(getObjectManager()),SIGNAL(objectUpdated(UAVObject*)),this,SLOT(moveFMSlider()));
|
||||
addWidget(goWizard);
|
||||
addWidget(goSimpleWizard);
|
||||
enableControls(false);
|
||||
|
||||
populateWidgets();
|
||||
@ -912,11 +906,9 @@ void ConfigInputWidget::dimOtherControls(bool value)
|
||||
|
||||
void ConfigInputWidget::enableControls(bool enable)
|
||||
{
|
||||
if(goWizard)
|
||||
{
|
||||
goWizard->setEnabled(enable);
|
||||
goSimpleWizard->setEnabled(enable);
|
||||
}
|
||||
m_config->configurationWizard->setEnabled(enable);
|
||||
m_config->runCalibration->setEnabled(enable);
|
||||
|
||||
ConfigTaskWidget::enableControls(enable);
|
||||
|
||||
}
|
||||
|
@ -116,8 +116,6 @@ private:
|
||||
QTimer * animate;
|
||||
void resetTxControls();
|
||||
void setMoveFromCommand(int command);
|
||||
QPushButton * goWizard;
|
||||
QPushButton * goSimpleWizard;
|
||||
bool isSimple;
|
||||
void goToWizard();
|
||||
private slots:
|
||||
|
@ -27,10 +27,41 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="advancedPage">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4"/>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="channelSettings"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="configurationWizard">
|
||||
<property name="text">
|
||||
<string>Start Configuration Wizard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="runCalibration">
|
||||
<property name="text">
|
||||
<string>Run Calibration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="wizard">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>43</height>
|
||||
<width>449</width>
|
||||
<height>48</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -26,46 +26,6 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="legend2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="legend3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Min</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="legend0">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Function</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="legend1">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Group</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="channelName">
|
||||
<property name="sizePolicy">
|
||||
@ -95,16 +55,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="legend4">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QSpinBox" name="channelMin">
|
||||
<property name="maximum">
|
||||
@ -112,13 +62,43 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QSpinBox" name="channelNeutral">
|
||||
<item row="1" column="6">
|
||||
<widget class="QSpinBox" name="channelMax">
|
||||
<property name="maximum">
|
||||
<number>9999</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="legend0">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Function</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="legend2">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="legend1">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Receiver type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QLabel" name="legend5">
|
||||
<property name="enabled">
|
||||
@ -129,10 +109,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QSpinBox" name="channelMax">
|
||||
<property name="maximum">
|
||||
<number>9999</number>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="legend3">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Min</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QLabel" name="legend4">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Neutral</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QSlider" name="channelNeutral">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user