Commit a50358e9 authored by Bryant's avatar Bryant

Finished merging QGCVehicleConfig.ui, which I hadn't done properly last night....

Finished merging QGCVehicleConfig.ui, which I hadn't done properly last night. Things are now in a usable state again.
parent 76cea4e1
......@@ -275,12 +275,12 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
if (left)
{
left = false;
ui->leftGeneralLayout->addWidget(box);
ui->generalLeftLayout->addWidget(box);
}
else
{
left = true;
ui->rightGeneralLayout->addWidget(box);
ui->generalRightLayout->addWidget(box);
}
} else {
delete tool;
......@@ -305,12 +305,12 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
if (left)
{
left = false;
ui->leftAdvancedLayout->addWidget(box);
ui->advancedLeftLayout->addWidget(box);
}
else
{
left = true;
ui->rightAdvancedLayout->addWidget(box);
ui->advancedRightLayout->addWidget(box);
}
} else {
delete tool;
......@@ -328,8 +328,6 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
button->setMinimumWidth(100);
button->show();
button->setText(dir);
//QWidget *tab = new QWidget(ui->tabWidget);
//ui->tabWidget->insertTab(2,tab,dir);
QWidget *tab = new QWidget(ui->stackedWidget);
ui->stackedWidget->insertWidget(2,tab);
buttonToWidgetMap[button] = tab;
......@@ -367,8 +365,6 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
// Load additional tabs for vehicle specific configuration
foreach (QString dir,vehicledir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{
//QWidget *tab = new QWidget(ui->tabWidget);
//ui->tabWidget->insertTab(2,tab,dir);
QPushButton *button = new QPushButton(ui->scrollAreaWidgetContents_3);
connect(button,SIGNAL(clicked()),this,SLOT(menuButtonClicked()));
ui->navBarLayout->insertWidget(2,button);
......@@ -722,11 +718,11 @@ void QGCVehicleConfig::loadConfig()
box->layout()->addWidget(tool);
if (valuetype == "vehicles")
{
ui->leftGeneralLayout->addWidget(box);
ui->generalLeftLayout->addWidget(box);
}
else if (valuetype == "libraries")
{
ui->rightGeneralLayout->addWidget(box);
ui->generalRightLayout->addWidget(box);
}
box->hide();
toolToBoxMap[tool] = box;
......@@ -776,11 +772,11 @@ void QGCVehicleConfig::loadConfig()
box->layout()->addWidget(tool);
if (valuetype == "vehicles")
{
ui->leftGeneralLayout->addWidget(box);
ui->generalLeftLayout->addWidget(box);
}
else if (valuetype == "libraries")
{
ui->rightGeneralLayout->addWidget(box);
ui->generalRightLayout->addWidget(box);
}
box->hide();
toolToBoxMap[tool] = box;
......@@ -843,7 +839,7 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
additionalTabs.clear();
toolWidgets.clear();
paramToWidgetMap = NULL;
paramToWidgetMap.clear();
libParamToWidgetMap.clear();
systemTypeToParamMap.clear();
toolToBoxMap.clear();
......@@ -866,13 +862,13 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
if (systemTypeToParamMap.contains(mav->getSystemTypeName()))
{
paramToWidgetMap = &systemTypeToParamMap[mav->getSystemTypeName()];
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
}
else
{
//Indication that we have no meta data for this system type.
qDebug() << "No parameters defined for system type:" << mav->getSystemTypeName();
paramToWidgetMap = &systemTypeToParamMap[mav->getSystemTypeName()];
paramToWidgetMap = systemTypeToParamMap[mav->getSystemTypeName()];
}
if (!paramTooltips.isEmpty())
......@@ -889,7 +885,6 @@ void QGCVehicleConfig::setActiveUAS(UASInterface* active)
updateStatus(QString("Reading from system %1").arg(mav->getUASName()));
// Since a system is now connected, enable the VehicleConfig UI.
ui->tabWidget->setEnabled(true);
ui->setButton->setEnabled(true);
ui->refreshButton->setEnabled(true);
ui->readButton->setEnabled(true);
......@@ -1187,7 +1182,7 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
{
//New param type, create a QGroupBox for it.
QWidget* parent;
if (ui->leftAdvancedLayout->count() > ui->rightAdvancedLayout->count())
if (ui->advancedLeftLayout->count() > ui->advancedRightLayout->count())
{
parent = ui->advancedRightContents;
}
......@@ -1217,15 +1212,14 @@ void QGCVehicleConfig::parameterChanged(int uas, int component, QString paramete
libParamToWidgetMap.insert(parameterName,tool);
toolWidgets.append(tool);
//Make sure we have similar number of widgets on each side.
if (ui->leftAdvancedLayout->count() > ui->rightAdvancedLayout->count())
// Make sure we have similar number of widgets on each side.
if (ui->advancedLeftLayout->count() > ui->advancedRightLayout->count())
{
ui->rightAdvancedLayout->addWidget(box);
ui->advancedRightLayout->addWidget(box);
}
else
{
ui->leftAdvancedLayout->addWidget(box);
ui->advancedLeftLayout->addWidget(box);
}
toolToBoxMap[tool] = box;
}
......
......@@ -138,9 +138,9 @@ Config</string>
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="page">
<widget class="QWidget" name="rcTab">
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QLabel" name="label_4">
......@@ -872,7 +872,7 @@ Config</string>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_2">
<widget class="QWidget" name="sensorTab">
<layout class="QVBoxLayout" name="verticalLayout_14">
<item>
<widget class="QLabel" name="label_3">
......@@ -901,13 +901,13 @@ p, li { white-space: pre-wrap; }
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_7">
<widget class="QWidget" name="sensorContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>33</width>
<height>20</height>
<width>530</width>
<height>574</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
......@@ -924,7 +924,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="page_3">
<widget class="QWidget" name="generalTab">
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QLabel" name="label_2">
......@@ -976,13 +976,13 @@ p, li { white-space: pre-wrap; }
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents">
<widget class="QWidget" name="generalLeftContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>27</width>
<height>16</height>
<width>525</width>
<height>523</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
......@@ -990,7 +990,7 @@ p, li { white-space: pre-wrap; }
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="leftGeneralLayout"/>
<layout class="QVBoxLayout" name="generalLeftLayout"/>
</item>
</layout>
</widget>
......@@ -1013,13 +1013,13 @@ p, li { white-space: pre-wrap; }
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_2">
<widget class="QWidget" name="generalRightContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>27</width>
<height>16</height>
<width>524</width>
<height>523</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
......@@ -1027,7 +1027,7 @@ p, li { white-space: pre-wrap; }
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="rightGeneralLayout"/>
<layout class="QVBoxLayout" name="generalRightLayout"/>
</item>
</layout>
</widget>
......@@ -1040,7 +1040,7 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<widget class="QWidget" name="page_4">
<widget class="QWidget" name="advancedTab">
<layout class="QVBoxLayout" name="verticalLayout_13">
<item>
<widget class="QLabel" name="label">
......@@ -1092,13 +1092,13 @@ p, li { white-space: pre-wrap; }
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_4">
<widget class="QWidget" name="advancedLeftContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>27</width>
<height>16</height>
<width>525</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_7">
......@@ -1106,7 +1106,7 @@ p, li { white-space: pre-wrap; }
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="leftAdvancedLayout"/>
<layout class="QVBoxLayout" name="advancedLeftLayout"/>
</item>
</layout>
</widget>
......@@ -1129,13 +1129,13 @@ p, li { white-space: pre-wrap; }
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="scrollAreaWidgetContents_5">
<widget class="QWidget" name="advancedRightContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>27</width>
<height>16</height>
<width>524</width>
<height>523</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
......@@ -1143,7 +1143,7 @@ p, li { white-space: pre-wrap; }
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="rightAdvancedLayout"/>
<layout class="QVBoxLayout" name="advancedRightLayout"/>
</item>
</layout>
</widget>
......
......@@ -136,7 +136,7 @@ void UASListWidget::addUAS(UASInterface* uas)
updateTimer->start(5000);
if (uWidget)
{
listLayout->removeWidget(uWidget);
m_ui->verticalLayout->removeWidget(uWidget);
delete uWidget;
uWidget = NULL;
}
......
......@@ -69,17 +69,6 @@ void UASQuickView::saveSettings()
settings.setArrayIndex(count++);
settings.setValue("name",i.key());
settings.setValue("type","text");
=======
QAction *action = new QAction(tr("longitude"),this);
action->setCheckable(true);
action->setChecked(true);
connect(action,SIGNAL(toggled(bool)),this,SLOT(actionTriggered(bool)));
this->addAction(action);
UASQuickViewItem *item = new UASQuickViewItem(this);
item->setTitle(tr("longitude"));
this->layout()->addWidget(item);
uasPropertyToLabelMap["longitude"] = item;
>>>>>>> 975f41067229245752f23de45b80ca4a7e28642d
}
settings.endArray();
settings.sync();
......@@ -91,7 +80,6 @@ void UASQuickView::loadSettings()
int size = settings.beginReadArray("UAS_QUICK_VIEW_ITEMS");
for (int i=0;i<size;i++)
{
<<<<<<< HEAD
settings.setArrayIndex(i);
QString nameval = settings.value("name").toString();
QString typeval = settings.value("type").toString();
......
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