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) @@ -16,69 +16,8 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent)
}
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();
//If we don't have any predefined settings, set some defaults.
if (uasPropertyValueMap.size() == 0)
{
@ -98,6 +37,14 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent) @@ -98,6 +37,14 @@ UASQuickView::UASQuickView(QWidget *parent) : QWidget(parent)
connect(updateTimer,SIGNAL(timeout()),this,SLOT(updateTimerTick()));
updateTimer->start(1000);
}
UASQuickView::~UASQuickView()
{
if (quickViewSelectDialog)
{
delete quickViewSelectDialog;
}
}
void UASQuickView::actionTriggered()
{
if (quickViewSelectDialog)

1
src/ui/uas/UASQuickView.h

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

10
src/ui/uas/UASQuickViewItemSelect.ui

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

Loading…
Cancel
Save