Commit 3fba7256 authored by Michael Carpenter's avatar Michael Carpenter

Added UASRawView to the tabbed quick view

parent b440b2e0
......@@ -585,12 +585,13 @@ void MainWindow::buildCommonWidgets()
//createDockWidget(pilotView,quickview,tr("Quick View"),"UAS_INFO_QUICKVIEW_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
QGCTabbedInfoView *infoview = new QGCTabbedInfoView(this);
infoview->addSource(mavlinkDecoder);
createDockWidget(pilotView,infoview,tr("Info View"),"UAS_INFO_INFOVIEW_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
UASRawStatusView *view = new UASRawStatusView();
view->setDecoder(mavlinkDecoder);
view->show();
//UASRawStatusView *view = new UASRawStatusView();
//view->setDecoder(mavlinkDecoder);
//view->show();
//hddisplay->addSource(mavlinkDecoder);
//createDockWidget(pilotView,new HSIDisplay(this),tr("Horizontal Situation"),"HORIZONTAL_SITUATION_INDICATOR_DOCKWIDGET",VIEW_FLIGHT,Qt::LeftDockWidgetArea);
//pilotView->setTabPosition(Qt::LeftDockWidgetArea,QTabWidget::North);
......
#include "QGCTabbedInfoView.h"
#include <UASActionsWidget.h>
#include <UASQuickView.h>
QGCTabbedInfoView::QGCTabbedInfoView(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
ui.tabWidget->addTab(new UASQuickView(this),"Quick");
ui.tabWidget->addTab(new UASActionsWidget(this),"Actions");
actionsWidget = new UASActionsWidget(this);
quickView = new UASQuickView(this);\
rawView = new UASRawStatusView(this);
ui.tabWidget->addTab(quickView,"Quick");
ui.tabWidget->addTab(actionsWidget,"Actions");
ui.tabWidget->addTab(rawView,"Status");
}
void QGCTabbedInfoView::addSource(MAVLinkDecoder *decoder)
{
m_decoder = decoder;
rawView->addSource(decoder);
quickView->addSource(decoder);
}
QGCTabbedInfoView::~QGCTabbedInfoView()
......
......@@ -3,7 +3,10 @@
#include <QWidget>
#include "ui_QGCTabbedInfoView.h"
#include "MAVLinkDecoder.h"
#include "UASActionsWidget.h"
#include "UASQuickView.h"
#include "UASRawStatusView.h"
class QGCTabbedInfoView : public QWidget
{
Q_OBJECT
......@@ -11,9 +14,13 @@ class QGCTabbedInfoView : public QWidget
public:
explicit QGCTabbedInfoView(QWidget *parent = 0);
~QGCTabbedInfoView();
void addSource(MAVLinkDecoder *decoder);
private:
MAVLinkDecoder *m_decoder;
Ui::QGCTabbedInfoView ui;
UASActionsWidget *actionsWidget;
UASQuickView *quickView;
UASRawStatusView *rawView;
};
#endif // QGCTABBEDINFOVIEW_H
......@@ -15,7 +15,7 @@ UASRawStatusView::UASRawStatusView(QWidget *parent) : QWidget(parent)
connect(timer,SIGNAL(timeout()),this,SLOT(updateTableTimerTick()));
timer->start(2000);
}
void UASRawStatusView::setDecoder(MAVLinkDecoder *decoder)
void UASRawStatusView::addSource(MAVLinkDecoder *decoder)
{
connect(decoder,SIGNAL(valueChanged(int,QString,QString,double,quint64)),this,SLOT(valueChanged(int,QString,QString,double,quint64)));
connect(decoder,SIGNAL(valueChanged(int,QString,QString,qint8,quint64)),this,SLOT(valueChanged(int,QString,QString,qint8,quint64)));
......
......@@ -12,7 +12,7 @@ class UASRawStatusView : public QWidget
public:
explicit UASRawStatusView(QWidget *parent = 0);
~UASRawStatusView();
void setDecoder(MAVLinkDecoder *decoder);
void addSource(MAVLinkDecoder *decoder);
private slots:
void updateTableTimerTick();
void valueChanged(const int uasId, const QString& name, const QString& unit, const quint8 value, const quint64 msec);
......
......@@ -12,7 +12,6 @@ class UASActionsWidget : public QWidget
public:
explicit UASActionsWidget(QWidget *parent = 0);
~UASActionsWidget();
private:
Ui::UASActionsWidget ui;
UASInterface *m_uas;
......
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