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
f1b83268
Commit
f1b83268
authored
Aug 15, 2013
by
tstellanova
Browse files
Fix instance initialization
parent
d7137bbe
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/ui/QGCBaseParamWidget.cc
View file @
f1b83268
...
...
@@ -45,6 +45,7 @@ void QGCBaseParamWidget::setUAS(UASInterface* uas)
void
QGCBaseParamWidget
::
connectToParamManager
()
{
paramMgr
=
mav
->
getParamManager
();
//TODO route via paramManager instead?
// Listen to updated param signals from the data model
connect
(
paramMgr
->
dataModel
(),
SIGNAL
(
parameterUpdated
(
int
,
QString
,
QVariant
)),
...
...
@@ -77,6 +78,8 @@ void QGCBaseParamWidget::disconnectFromParamManager()
// Listen to communications status messages so we can display them
disconnect
(
paramMgr
,
SIGNAL
(
parameterStatusMsgUpdated
(
QString
,
int
)),
this
,
SLOT
(
handleParamStatusMsgUpdate
(
QString
,
int
)));
paramMgr
=
NULL
;
}
...
...
src/ui/QGCPX4VehicleConfig.cc
View file @
f1b83268
...
...
@@ -84,7 +84,8 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
//connect(ui->setTrimButton, SIGNAL(clicked()), this, SLOT(setTrimPositions()));
//TODO connect buttons here to save/clear actions?
ui
->
pendingCommitsWidget
->
initWithUAS
(
this
->
mav
);
mav
=
UASManager
::
instance
()
->
getActiveUAS
();
ui
->
pendingCommitsWidget
->
initWithUAS
(
mav
);
ui
->
pendingCommitsWidget
->
update
();
//TODO the following methods are not yet implemented
...
...
src/ui/QGCParamWidget.cc
View file @
f1b83268
...
...
@@ -51,9 +51,12 @@ This file is part of the QGROUNDCONTROL project
*/
QGCParamWidget
::
QGCParamWidget
(
QWidget
*
parent
)
:
QGCBaseParamWidget
(
parent
),
componentItems
(
new
QMap
<
int
,
QTreeWidgetItem
*>
())
componentItems
(
new
QMap
<
int
,
QTreeWidgetItem
*>
()),
statusLabel
(
new
QLabel
(
this
)),
tree
(
new
QTreeWidget
(
this
))
{
}
...
...
@@ -75,9 +78,7 @@ void QGCParamWidget::connectViewSignalsAndSlots()
void
QGCParamWidget
::
layoutWidget
()
{
// Create tree widget
tree
=
new
QTreeWidget
(
this
);
statusLabel
=
new
QLabel
();
statusLabel
->
setAutoFillBackground
(
true
);
// Set tree widget as widget onto this component
...
...
src/ui/QGCParamWidget.h
View file @
f1b83268
...
...
@@ -88,10 +88,10 @@ public slots:
protected:
QTreeWidget
*
tree
;
///< The parameter tree
QLabel
*
statusLabel
;
///< User-facing parameter status label
QMap
<
int
,
QTreeWidgetItem
*>*
componentItems
;
///< The tree of component items, stored by component ID
QMap
<
int
,
QMap
<
QString
,
QTreeWidgetItem
*>*
>
paramGroups
;
///< Parameter groups to organize component items
QLabel
*
statusLabel
;
///< User-facing parameter status label
QTreeWidget
*
tree
;
///< The parameter tree
};
...
...
src/ui/QGCPendingParamWidget.cc
View file @
f1b83268
...
...
@@ -12,6 +12,7 @@ QGCPendingParamWidget::QGCPendingParamWidget(QObject *parent) :
void
QGCPendingParamWidget
::
connectToParamManager
()
{
paramMgr
=
mav
->
getParamManager
();
//TODO route via paramManager instead?
// Listen to updated param signals from the data model
connect
(
paramMgr
->
dataModel
(),
SIGNAL
(
pendingParamUpdate
(
int
,
const
QString
&
,
QVariant
,
bool
)),
...
...
@@ -33,6 +34,8 @@ void QGCPendingParamWidget::disconnectFromParamManager()
// Listen to communications status messages so we can display them
disconnect
(
paramMgr
,
SIGNAL
(
parameterStatusMsgUpdated
(
QString
,
int
)),
this
,
SLOT
(
handleParamStatusMsgUpdate
(
QString
,
int
)));
paramMgr
=
NULL
;
}
...
...
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