Commit c54da926 authored by Michael Carpenter's avatar Michael Carpenter

New ComboBox param configuration UI element, and qgw widgets for general

APM configuration, battery and extra sensors
parent 87de0f5b
[Heading%20PID%20Tuning]
QGC_TOOL_WIDGET_ITEMS\1\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_DESCRIPTION=Heading D Gain
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_PARAMID=HDNG2RLL_D
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_COMPONENTID=200
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\2\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_DESCRIPTION=Heading P Gain
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_PARAMID=HDNG2RLL_P
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_COMPONENTID=200
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MAX=5
QGC_TOOL_WIDGET_ITEMS\3\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_DESCRIPTION=Heading I Gain
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_PARAMID=HDNG2RLL_I
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_COMPONENTID=200
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\4\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_DESCRIPTION=Heading I Limit
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_PARAMID=HDNG2RLL_IMAX
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_COMPONENTID=200
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MAX=3000
QGC_TOOL_WIDGET_ITEMS\size=4
[Battery%20Monitor]
QGC_TOOL_WIDGET_ITEMS\1\TYPE=COMBO
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_DESCRIPTION=Battery Monitor
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_PARAMID=BATT_MONITOR
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_MIN=0
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_MAX=4
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_COUNT=3
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_0_TEXT=Disabled
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_0_VAL=0
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_1_TEXT=Voltage Only
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_1_VAL=3
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_2_TEXT=Voltage And Current
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_COMBOBOX_ITEM_2_VAL=4
QGC_TOOL_WIDGET_ITEMS\4\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_DESCRIPTION=APM Input Voltage
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_PARAMID=INPUT_VOLTS
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MAX=24
QGC_TOOL_WIDGET_ITEMS\2\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_DESCRIPTION=Sensor Type
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_PARAMID=CMB_batmon
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MAX=4
QGC_TOOL_WIDGET_ITEMS\5\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_DESCRIPTION=Measured Volts
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_PARAMID=INPUT_VOLTS
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_MAX=24
QGC_TOOL_WIDGET_ITEMS\3\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_DESCRIPTION=APM Version
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_PARAMID=CMB_apmversion
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MAX=2
QGC_TOOL_WIDGET_ITEMS\6\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_DESCRIPTION=Battery Capacity
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_PARAMID=BATT_CAPACITY
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_MAX=10000
QGC_TOOL_WIDGET_ITEMS\7\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_DESCRIPTION=Voltage Divider
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_PARAMID=VOLT_DIVIDER
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_MAX=10
QGC_TOOL_WIDGET_ITEMS\8\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_DESCRIPTION=Amps per Volt
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_PARAMID=AMP_PER_VOLT
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_MAX=100
QGC_TOOL_WIDGET_ITEMS\size=8
[Extra%20Sensors]
QGC_TOOL_WIDGET_ITEMS\1\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_DESCRIPTION=Compass Enable
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_PARAMID=MAG_ENABLE
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\2\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_DESCRIPTION=Auto Declination
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_PARAMID=COMPASS_AUTODEC
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\2\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\3\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_DESCRIPTION=Compass Declination
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_PARAMID=COMPASS_DEC
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\3\QGC_PARAM_SLIDER_MAX=100
QGC_TOOL_WIDGET_ITEMS\4\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_DESCRIPTION=Sonar Enable
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_PARAMID=SONAR_ENABLE
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\4\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\5\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_DESCRIPTION=Sonar Type
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_PARAMID=SONAR_TYPE
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\5\QGC_PARAM_SLIDER_MAX=5
QGC_TOOL_WIDGET_ITEMS\6\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_DESCRIPTION=Air Speed Enable
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_PARAMID=ARSPD_ENABLE
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\6\QGC_PARAM_SLIDER_MAX=2
QGC_TOOL_WIDGET_ITEMS\7\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_DESCRIPTION=Use Air Speed
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_PARAMID=ARSPD_USE
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\7\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\8\TYPE=SLIDER
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_DESCRIPTION=Optical Flow Enable
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_PARAMID=FLOW_ENABLE
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_COMPONENTID=1
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_MIN=0
QGC_TOOL_WIDGET_ITEMS\8\QGC_PARAM_SLIDER_MAX=1
QGC_TOOL_WIDGET_ITEMS\size=8
......@@ -227,7 +227,8 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCHilConfiguration.ui \
src/ui/QGCHilFlightGearConfiguration.ui \
src/ui/QGCHilJSBSimConfiguration.ui \
src/ui/QGCHilXPlaneConfiguration.ui
src/ui/QGCHilXPlaneConfiguration.ui \
src/ui/designer/QGCComboBox.ui
INCLUDEPATH += src \
src/ui \
src/ui/linechart \
......@@ -370,7 +371,8 @@ HEADERS += src/MG.h \
src/ui/QGCHilConfiguration.h \
src/ui/QGCHilFlightGearConfiguration.h \
src/ui/QGCHilJSBSimConfiguration.h \
src/ui/QGCHilXPlaneConfiguration.h
src/ui/QGCHilXPlaneConfiguration.h \
src/ui/designer/QGCComboBox.h
# Google Earth is only supported on Mac OS and Windows with Visual Studio Compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::HEADERS += src/ui/map3D/QGCGoogleEarthView.h
......@@ -532,7 +534,8 @@ SOURCES += src/main.cc \
src/ui/QGCHilConfiguration.cc \
src/ui/QGCHilFlightGearConfiguration.cc \
src/ui/QGCHilJSBSimConfiguration.cc \
src/ui/QGCHilXPlaneConfiguration.cc
src/ui/QGCHilXPlaneConfiguration.cc \
src/ui/designer/QGCComboBox.cc
# Enable Google Earth only on Mac OS and Windows with Visual Studio compiler
macx|macx-g++|macx-g++42|win32-msvc2008|win32-msvc2010::SOURCES += src/ui/map3D/QGCGoogleEarthView.cc
......@@ -666,3 +669,4 @@ win32-msvc2008|win32-msvc2010 {
}
unix:!macx:!symbian: LIBS += -losg
>>>>>>> New ComboBox param configuration UI element, and qgw widgets for general
......@@ -205,7 +205,7 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
qDebug() << autopilotdir.absolutePath();
qDebug() << generaldir.absolutePath();
qDebug() << vehicledir.absolutePath();
int left = true;
foreach (QString file,generaldir.entryList(QDir::Files | QDir::NoDotAndDotDot))
{
if (file.toLower().endsWith(".qgw")) {
......@@ -218,13 +218,22 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
box->setTitle(tool->objectName());
box->setLayout(new QVBoxLayout());
box->layout()->addWidget(tool);
ui->multiRotorAttitudeLayout->addWidget(box);
if (left)
{
left = false;
ui->leftGeneralLayout->addWidget(box);
}
else
{
left = true;
ui->rightGeneralLayout->addWidget(box);
}
} else {
delete tool;
}
}
}
left = true;
foreach (QString file,vehicledir.entryList(QDir::Files | QDir::NoDotAndDotDot))
{
if (file.toLower().endsWith(".qgw")) {
......@@ -237,7 +246,17 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
box->setTitle(tool->objectName());
box->setLayout(new QVBoxLayout());
box->layout()->addWidget(tool);
ui->fixedWingAttitudeLayout->addWidget(box);
if (left)
{
left = false;
ui->leftHWSpecificLayout->addWidget(box);
}
else
{
left = true;
ui->rightHWSpecificLayout->addWidget(box);
}
} else {
delete tool;
}
......
This diff is collapsed.
This diff is collapsed.
#ifndef QGCCOMBOBOX_H
#define QGCCOMBOBOX_H
#include <QWidget>
#include <QAction>
#include <QtDesigner/QDesignerExportWidget>
#include "QGCToolWidgetItem.h"
namespace Ui
{
class QGCComboBox;
}
class QGCComboBox : public QGCToolWidgetItem
{
Q_OBJECT
public:
explicit QGCComboBox(QWidget *parent = 0);
~QGCComboBox();
public slots:
void startEditMode();
void endEditMode();
/** @brief Send the parameter to the MAV */
void sendParameter();
/** @brief Update the UI with the new parameter value */
void setParameterValue(int uas, int component, int paramCount, int paramIndex, QString parameterName, const QVariant value);
void writeSettings(QSettings& settings);
void readSettings(const QSettings& settings);
void refreshParamList();
void setActiveUAS(UASInterface *uas);
void selectComponent(int componentIndex);
void selectParameter(int paramIndex);
/** @brief Show descriptive text next to slider */
void showInfo(bool enable);
/** @brief Show tool tip of calling element */
void showTooltip();
protected slots:
/** @brief Request the parameter of this widget from the MAV */
void requestParameter();
/** @brief Button click to add a new item to the combobox */
void addButtonClicked();
/** @brief Button click to remove the currently selected item from the combobox */
void delButtonClicked();
/** @brief Updates current parameter based on new combobox value */
void comboBoxIndexChanged(QString val);
protected:
QMap<QString,int> comboBoxTextToValMap; ///< Comboboxtext/parameter value map
QString parameterName; ///< Key/Name of the parameter
QVariant parameterValue; ///< Value of the parameter
double parameterScalingFactor; ///< Factor to scale the parameter between slider and true value
float parameterMin;
float parameterMax;
int component; ///< ID of the MAV component to address
//double scaledInt;
void changeEvent(QEvent *e);
private:
Ui::QGCComboBox *ui;
};
#endif // QGCCOMBOBOX_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCComboBox</class>
<widget class="QWidget" name="QGCComboBox">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>789</width>
<height>244</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="10,0,0,0,0,0,0,0,0,0,0,0">
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>3</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>12</number>
</property>
<item row="0" column="0" colspan="12">
<widget class="Line" name="editLine1">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="7" column="11">
<widget class="QPushButton" name="editDoneButton">
<property name="text">
<string>Done</string>
</property>
</widget>
</item>
<item row="9" column="0" colspan="12">
<widget class="Line" name="editLine2">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="2" colspan="10">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="11">
<widget class="QPushButton" name="readButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Read the current parameter value on the system</string>
</property>
<property name="statusTip">
<string>Read the current parameter value on the system</string>
</property>
<property name="text">
<string>R</string>
</property>
</widget>
</item>
<item row="2" column="10">
<widget class="QPushButton" name="writeButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Transmit the current slider value to the system</string>
</property>
<property name="statusTip">
<string>Transmit the current slider value to the system</string>
</property>
<property name="text">
<string>W</string>
</property>
</widget>
</item>
<item row="4" column="10">
<widget class="QCheckBox" name="editInfoCheckBox">
<property name="text">
<string>Show Info</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="3" colspan="7">
<widget class="QLabel" name="editStatusLabel">
<property name="text">
<string>Please click first on refresh to update selection menus..</string>
</property>
</widget>
</item>
<item row="4" column="11">
<widget class="QPushButton" name="editRefreshParamsButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string>Refresh</string>
</property>
</widget>
</item>
<item row="4" column="9">
<widget class="QComboBox" name="editSelectParamComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Select parameter</string>
</property>
<property name="statusTip">
<string>Select parameter</string>
</property>
</widget>
</item>
<item row="2" column="9">
<widget class="QComboBox" name="editOptionComboBox"/>
</item>
<item row="4" column="8">
<widget class="QComboBox" name="editSelectComponentComboBox">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Select component</string>
</property>
<property name="statusTip">
<string>Select component</string>
</property>
</widget>
</item>
<item row="3" column="11">
<widget class="QPushButton" name="editRemoveItemButton">
<property name="text">
<string>Delete Item</string>
</property>
</widget>
</item>
<item row="3" column="10">
<widget class="QPushButton" name="editAddItemButton">
<property name="text">
<string>Add Item</string>
</property>
</widget>
</item>
<item row="3" column="9">
<widget class="QLineEdit" name="editItemNameLabel"/>
</item>
<item row="3" column="7">
<widget class="QSpinBox" name="editItemValueSpinBox"/>
</item>
<item row="3" column="8">
<widget class="QLabel" name="itemNameLabel">
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="6">
<widget class="QLabel" name="itemValueLabel">
<property name="text">
<string>Value</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="9">
<widget class="QLineEdit" name="editNameLabel">
<property name="text">
<string>&lt;Parameter Name / Label&gt;</string>
</property>
</widget>
</item>
<item row="2" column="8">
<widget class="QToolButton" name="infoLabel">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../qgroundcontrol.qrc">
<normaloff>:/files/images/status/dialog-information.svg</normaloff>:/files/images/status/dialog-information.svg</iconset>
</property>
<property name="popupMode">
<enum>QToolButton::DelayedPopup</enum>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonIconOnly</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
<property name="arrowType">
<enum>Qt::NoArrow</enum>
</property>
</widget>
</item>
<item row="2" column="7">
<widget class="QLabel" name="nameLabel">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
<include location="../../../qgroundcontrol.qrc"/>
</resources>
<connections/>
</ui>
......@@ -11,6 +11,7 @@
#include <QDesktopServices>
#include "QGCParamSlider.h"
#include "QGCComboBox.h"
#include "QGCCommandButton.h"
#include "UASManager.h"
......@@ -193,6 +194,11 @@ void QGCToolWidget::loadSettings(QSettings& settings)
item = new QGCParamSlider(this);
//qDebug() << "CREATED PARAM SLIDER";
}
else if (type == "COMBO")
{
item = new QGCComboBox(this);
qDebug() << "CREATED PARAM COMBOBOX";
}
if (item)
{
......
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