Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
3fba7256
Commit
3fba7256
authored
May 30, 2013
by
Michael Carpenter
Browse files
Added UASRawView to the tabbed quick view
parent
b440b2e0
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/ui/MainWindow.cc
View file @
3fba7256
...
...
@@ -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);
...
...
src/ui/QGCTabbedInfoView.cpp
View file @
3fba7256
#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
()
...
...
src/ui/QGCTabbedInfoView.h
View file @
3fba7256
...
...
@@ -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
src/ui/UASRawStatusView.cpp
View file @
3fba7256
...
...
@@ -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
)));
...
...
src/ui/UASRawStatusView.h
View file @
3fba7256
...
...
@@ -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
);
...
...
src/ui/uas/UASActionsWidget.h
View file @
3fba7256
...
...
@@ -12,7 +12,6 @@ class UASActionsWidget : public QWidget
public:
explicit
UASActionsWidget
(
QWidget
*
parent
=
0
);
~
UASActionsWidget
();
private:
Ui
::
UASActionsWidget
ui
;
UASInterface
*
m_uas
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment