Browse Source

Some comment cleanup, and fix so when closing the main window, it also closes the item select window

QGC4.4
Michael Carpenter 12 years ago
parent
commit
0f89c83865
  1. 71
      src/ui/uas/UASQuickView.cc
  2. 1
      src/ui/uas/UASQuickView.h
  3. 10
      src/ui/uas/UASQuickViewItemSelect.ui

71
src/ui/uas/UASQuickView.cc

@ -16,69 +16,8 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent)
} }
this->setContextMenuPolicy(Qt::ActionsContextMenu); this->setContextMenuPolicy(Qt::ActionsContextMenu);
/*{
QAction *action = new QAction("latitude",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("latitude");
ui.verticalLayout->addWidget(item);
uasPropertyToLabelMap["latitude"] = item;
}
{
QAction *action = new QAction("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("longitude");
ui.verticalLayout->addWidget(item);
uasPropertyToLabelMap["longitude"] = item;
}
{
QAction *action = new QAction("altitude",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("altitude");
ui.verticalLayout->addWidget(item);
uasPropertyToLabelMap["altitude"] = item;
}
{
QAction *action = new QAction("satelliteCount",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("satelliteCount");
ui.verticalLayout->addWidget(item);
uasPropertyToLabelMap["satelliteCount"] = item;
}
{
QAction *action = new QAction("distToWaypoint",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("distToWaypoint");
ui.verticalLayout->addWidget(item);
uasPropertyToLabelMap["distToWaypoint"] = item;
}*/
//this->setSizePolicy();
loadSettings(); loadSettings();
//If we don't have any predefined settings, set some defaults. //If we don't have any predefined settings, set some defaults.
if (uasPropertyValueMap.size() == 0) if (uasPropertyValueMap.size() == 0)
{ {
@ -98,6 +37,14 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent)
connect(updateTimer,SIGNAL(timeout()),this,SLOT(updateTimerTick())); connect(updateTimer,SIGNAL(timeout()),this,SLOT(updateTimerTick()));
updateTimer->start(1000); updateTimer->start(1000);
} }
UASQuickView::~UASQuickView()
{
if (quickViewSelectDialog)
{
delete quickViewSelectDialog;
}
}
void UASQuickView::actionTriggered() void UASQuickView::actionTriggered()
{ {
if (quickViewSelectDialog) if (quickViewSelectDialog)

1
src/ui/uas/UASQuickView.h

@ -15,6 +15,7 @@ class UASQuickView : public QWidget
Q_OBJECT Q_OBJECT
public: public:
UASQuickView(QWidget *parent = 0); UASQuickView(QWidget *parent = 0);
~UASQuickView();
void addSource(MAVLinkDecoder *decoder); void addSource(MAVLinkDecoder *decoder);
private: private:
UASInterface *uas; UASInterface *uas;

10
src/ui/uas/UASQuickViewItemSelect.ui

@ -6,12 +6,12 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>851</width> <width>947</width>
<height>192</height> <height>248</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>Select Item</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
@ -24,8 +24,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>831</width> <width>927</width>
<height>172</height> <height>228</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">

Loading…
Cancel
Save