Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
1eba9577
Commit
1eba9577
authored
Jan 09, 2015
by
Lorenz Meier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1155 from thomasgubler/rcparamtune
Rc param tune
parents
6d95cdc1
29d0fa44
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
803 additions
and
71 deletions
+803
-71
v1.0
libs/mavlink/include/mavlink/v1.0
+1
-1
qgroundcontrol.pro
qgroundcontrol.pro
+12
-7
MockUAS.h
src/qgcunittest/MockUAS.h
+24
-21
UAS.cc
src/uas/UAS.cc
+62
-10
UAS.h
src/uas/UAS.h
+6
-0
UASInterface.h
src/uas/UASInterface.h
+23
-17
QGCBaseParamWidget.cc
src/ui/QGCBaseParamWidget.cc
+5
-0
QGCBaseParamWidget.h
src/ui/QGCBaseParamWidget.h
+4
-1
QGCMapRCToParamDialog.cpp
src/ui/QGCMapRCToParamDialog.cpp
+135
-0
QGCMapRCToParamDialog.h
src/ui/QGCMapRCToParamDialog.h
+96
-0
QGCMapRCToParamDialog.ui
src/ui/QGCMapRCToParamDialog.ui
+253
-0
QGCParamTreeWidget.cpp
src/ui/QGCParamTreeWidget.cpp
+96
-0
QGCParamTreeWidget.h
src/ui/QGCParamTreeWidget.h
+51
-0
QGCParamWidget.cc
src/ui/QGCParamWidget.cc
+27
-6
QGCParamWidget.h
src/ui/QGCParamWidget.h
+8
-8
No files found.
v1.0
@
42f1a373
Subproject commit
7d0aa0205ef8bd13bf855b21d3ebe054dc9109ef
Subproject commit
42f1a37397335b3c4c96b0a41c73d85e80d54a60
qgroundcontrol.pro
View file @
1eba9577
...
...
@@ -166,10 +166,10 @@ WindowsBuild {
}
#
#
By
default
warnings
as
errors
are
turned
off
.
Even
so
,
in
order
for
a
pull
request
#
to
be
accepted
you
must
compile
cleanly
with
warnings
as
errors
turned
on
the
default
#
set
of
OS
builds
.
See
http
://
www
.
qgroundcontrol
.
org
/
dev
/
contribute
for
more
details
.
#
You
can
use
the
WarningsAsErrorsOn
CONFIG
switch
to
turn
warnings
as
errors
on
for
your
#
By
default
warnings
as
errors
are
turned
off
.
Even
so
,
in
order
for
a
pull
request
#
to
be
accepted
you
must
compile
cleanly
with
warnings
as
errors
turned
on
the
default
#
set
of
OS
builds
.
See
http
://
www
.
qgroundcontrol
.
org
/
dev
/
contribute
for
more
details
.
#
You
can
use
the
WarningsAsErrorsOn
CONFIG
switch
to
turn
warnings
as
errors
on
for
your
#
own
builds
.
#
...
...
@@ -239,7 +239,7 @@ RESOURCES += qgroundcontrol.qrc
TRANSLATIONS
+=
\
es
-
MX
.
ts
\
en
-
US
.
ts
DEPENDPATH
+=
\
.
\
plugins
...
...
@@ -343,6 +343,7 @@ FORMS += \
src
/
ui
/
px4_configuration
/
PX4FirmwareUpgrade
.
ui
\
src
/
ui
/
QGCUASFileView
.
ui
\
src
/
QGCQmlWidgetHolder
.
ui
\
src
/
ui
/
QGCMapRCToParamDialog
.
ui
HEADERS
+=
\
src
/
MG
.
h
\
...
...
@@ -495,6 +496,8 @@ HEADERS += \
src
/
QGCQuickWidget
.
h
\
src
/
QGCPalette
.
h
\
src
/
QGCQmlWidgetHolder
.
h
\
src
/
ui
/
QGCParamTreeWidget
.
h
\
src
/
ui
/
QGCMapRCToParamDialog
.
h
SOURCES
+=
\
src
/
main
.
cc
\
...
...
@@ -636,13 +639,15 @@ SOURCES += \
src
/
QGCQuickWidget
.
cc
\
src
/
QGCPalette
.
cc
\
src
/
QGCQmlWidgetHolder
.
cpp
\
src
/
ui
/
QGCParamTreeWidget
.
cpp
\
src
/
ui
/
QGCMapRCToParamDialog
.
cpp
#
#
Unit
Test
specific
configuration
goes
here
#
#
We
have
to
special
case
Windows
debug_and_release
builds
because
you
can
'
t
have
files
#
which
are
only
in
the
debug
variant
[
QTBUG
-
40351
].
So
in
this
case
we
include
unit
tests
#
even
in
the
release
variant
.
If
you
want
a
Windows
release
build
with
no
unit
tests
run
#
which
are
only
in
the
debug
variant
[
QTBUG
-
40351
].
So
in
this
case
we
include
unit
tests
#
even
in
the
release
variant
.
If
you
want
a
Windows
release
build
with
no
unit
tests
run
#
qmake
with
CONFIG
-=
debug_and_release
CONFIG
+=
release
.
#
...
...
src/qgcunittest/MockUAS.h
View file @
1eba9577
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
#ifndef MOCKUAS_H
...
...
@@ -39,43 +39,43 @@
class
MockUAS
:
public
UASInterface
{
Q_OBJECT
signals:
// The following UASInterface signals are supported
// void parameterChanged(int uas, int component, QString parameterName, QVariant value);
// void remoteControlChannelRawChanged(int channelId, float raw);
public:
// Implemented UASInterface overrides
virtual
int
getSystemType
(
void
)
{
return
_systemType
;
}
virtual
int
getUASID
(
void
)
const
{
return
_systemId
;
}
virtual
QGCUASParamManagerInterface
*
getParamManager
()
{
return
&
_paramManager
;
};
// sendMessage is only supported if a mavlink plugin is installed.
virtual
void
sendMessage
(
mavlink_message_t
message
);
public:
// MockUAS methods
MockUAS
(
void
);
// Use these methods to setup/control the mock UAS
void
setMockSystemType
(
int
systemType
)
{
_systemType
=
systemType
;
}
void
setMockSystemId
(
int
systemId
)
{
_systemId
=
systemId
;
}
/// @return returns mock QGCUASParamManager associated with the UAS. This mock implementation
/// allows you to simulate parameter input and validate parameter setting
MockQGCUASParamManager
*
getMockQGCUASParamManager
(
void
)
{
return
&
_paramManager
;
}
/// @brief Sets the parameter map into the mock QGCUASParamManager and signals parameterChanged for
/// each param
void
setMockParametersAndSignal
(
MockQGCUASParamManager
::
ParamMap_t
&
map
);
void
emitRemoteControlChannelRawChanged
(
int
channel
,
float
raw
)
{
emit
remoteControlChannelRawChanged
(
channel
,
raw
);
}
/// @brief Installs a mavlink plugin. Only a single mavlink plugin is supported at a time.
void
setMockMavlinkPlugin
(
MockMavlinkInterface
*
mavlinkPlugin
)
{
_mavlinkPlugin
=
mavlinkPlugin
;
};
public:
// Unimplemented UASInterface overrides
virtual
QString
getUASName
()
const
{
Q_ASSERT
(
false
);
return
_bogusString
;
};
...
...
@@ -168,16 +168,19 @@ public slots:
virtual
void
sendHilOpticalFlow
(
quint64
time_us
,
qint16
flow_x
,
qint16
flow_y
,
float
flow_comp_m_x
,
float
flow_comp_m_y
,
quint8
quality
,
float
ground_distance
)
{
Q_UNUSED
(
time_us
);
Q_UNUSED
(
flow_x
);
Q_UNUSED
(
flow_y
);
Q_UNUSED
(
flow_comp_m_x
);
Q_UNUSED
(
flow_comp_m_y
);
Q_UNUSED
(
quality
);
Q_UNUSED
(
ground_distance
);
Q_ASSERT
(
false
);};
virtual
void
sendMapRCToParam
(
QString
param_id
,
float
scale
,
float
value0
,
quint8
param_rc_channel_index
,
float
valueMin
,
float
valueMax
)
{
Q_UNUSED
(
param_id
);
Q_UNUSED
(
scale
);
Q_UNUSED
(
value0
);
Q_UNUSED
(
param_rc_channel_index
);
Q_UNUSED
(
valueMin
);
Q_UNUSED
(
valueMax
);
}
virtual
void
unsetRCToParameterMap
()
{}
virtual
bool
isRotaryWing
()
{
Q_ASSERT
(
false
);
return
false
;
}
virtual
bool
isFixedWing
()
{
Q_ASSERT
(
false
);
return
false
;
}
private:
int
_systemType
;
int
_systemId
;
MockQGCUASParamManager
_paramManager
;
MockMavlinkInterface
*
_mavlinkPlugin
;
///< Mock Mavlink plugin, NULL for none
// Bogus variables used for return types of NYI methods
...
...
src/uas/UAS.cc
View file @
1eba9577
...
...
@@ -2357,7 +2357,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
// Insert with correct type
// TODO: This is a hack for MAV_AUTOPILOT_ARDUPILOTMEGA until the new version of MAVLink and a fix for their param handling.
switch
(
rawValue
.
param_type
)
{
case
MAV_PARAM_TYPE_REAL32
:
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
...
...
@@ -2366,7 +2366,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
paramValue
=
QVariant
(
paramUnion
.
param_float
);
}
break
;
case
MAV_PARAM_TYPE_UINT8
:
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
paramValue
=
QVariant
(
QChar
((
unsigned
char
)
paramUnion
.
param_float
));
...
...
@@ -2374,7 +2374,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
paramValue
=
QVariant
(
QChar
((
unsigned
char
)
paramUnion
.
param_uint8
));
}
break
;
case
MAV_PARAM_TYPE_INT8
:
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
paramValue
=
QVariant
(
QChar
((
char
)
paramUnion
.
param_float
));
...
...
@@ -2382,7 +2382,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
paramValue
=
QVariant
(
QChar
((
char
)
paramUnion
.
param_int8
));
}
break
;
case
MAV_PARAM_TYPE_INT16
:
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
paramValue
=
QVariant
((
short
)
paramUnion
.
param_float
);
...
...
@@ -2390,7 +2390,7 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
paramValue
=
QVariant
(
paramUnion
.
param_int16
);
}
break
;
case
MAV_PARAM_TYPE_UINT32
:
if
(
getAutopilotType
()
==
MAV_AUTOPILOT_ARDUPILOTMEGA
)
{
paramValue
=
QVariant
((
unsigned
int
)
paramUnion
.
param_float
);
...
...
@@ -2405,13 +2405,13 @@ void UAS::processParamValueMsg(mavlink_message_t& msg, const QString& paramName,
paramValue
=
QVariant
(
paramUnion
.
param_int32
);
}
break
;
default:
qCritical
()
<<
"INVALID DATA TYPE USED AS PARAMETER VALUE: "
<<
rawValue
.
param_type
;
}
qCDebug
(
UASLog
)
<<
"Received PARAM_VALUE"
<<
paramName
<<
paramValue
<<
rawValue
.
param_type
;
parameters
.
value
(
compId
)
->
insert
(
paramName
,
paramValue
);
emit
parameterChanged
(
uasId
,
compId
,
paramName
,
paramValue
);
emit
parameterChanged
(
uasId
,
compId
,
rawValue
.
param_count
,
rawValue
.
param_index
,
paramName
,
paramValue
);
...
...
@@ -3290,12 +3290,12 @@ void UAS::removeLink(QObject* object)
{
qCDebug
(
UASLog
)
<<
"removeLink:"
<<
QString
(
"%1"
).
arg
((
ulong
)
object
,
0
,
16
);
qCDebug
(
UASLog
)
<<
"link count:"
<<
links
.
count
();
// Do not dynamic cast or de-reference QObject, since object is either in destructor or may have already
// been destroyed.
LinkInterface
*
link
=
(
LinkInterface
*
)
object
;
int
index
=
links
.
indexOf
(
link
);
Q_ASSERT
(
index
!=
-
1
);
links
.
removeAt
(
index
);
...
...
@@ -3467,3 +3467,55 @@ void UAS::stopLowBattAlarm()
lowBattAlarm
=
false
;
}
}
void
UAS
::
sendMapRCToParam
(
QString
param_id
,
float
scale
,
float
value0
,
quint8
param_rc_channel_index
,
float
valueMin
,
float
valueMax
)
{
mavlink_message_t
message
;
char
param_id_cstr
[
MAVLINK_MSG_PARAM_MAP_RC_FIELD_PARAM_ID_LEN
]
=
{};
// Copy string into buffer, ensuring not to exceed the buffer size
for
(
unsigned
int
i
=
0
;
i
<
sizeof
(
param_id_cstr
);
i
++
)
{
if
((
int
)
i
<
param_id
.
length
())
{
param_id_cstr
[
i
]
=
param_id
.
toLatin1
()[
i
];
}
}
mavlink_msg_param_map_rc_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
message
,
this
->
uasId
,
0
,
param_id_cstr
,
-
1
,
param_rc_channel_index
,
value0
,
scale
,
valueMin
,
valueMax
);
sendMessage
(
message
);
qDebug
()
<<
"Mavlink message sent"
;
}
void
UAS
::
unsetRCToParameterMap
()
{
char
param_id_cstr
[
MAVLINK_MSG_PARAM_MAP_RC_FIELD_PARAM_ID_LEN
]
=
{};
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
mavlink_message_t
message
;
mavlink_msg_param_map_rc_pack
(
mavlink
->
getSystemId
(),
mavlink
->
getComponentId
(),
&
message
,
this
->
uasId
,
0
,
param_id_cstr
,
-
2
,
i
,
0.0
f
,
0.0
f
,
0.0
f
,
0.0
f
);
sendMessage
(
message
);
}
}
src/uas/UAS.h
View file @
1eba9577
...
...
@@ -883,6 +883,12 @@ public slots:
/** @brief Triggers the action associated with the given ID. */
void
triggerAction
(
int
action
);
/** @brief Send command to map a RC channel to a parameter */
void
sendMapRCToParam
(
QString
param_id
,
float
scale
,
float
value0
,
quint8
param_rc_channel_index
,
float
valueMin
,
float
valueMax
);
/** @brief Send command to disable all bindings/maps between RC and parameters */
void
unsetRCToParameterMap
();
signals:
/** @brief The main/battery voltage has changed/was updated */
//void voltageChanged(int uasId, double voltage); // Defined in UASInterface already
...
...
src/uas/UASInterface.h
View file @
1eba9577
...
...
@@ -199,32 +199,32 @@ public:
*/
static
QColor
getNextColor
()
{
/* Create color map */
static
QList
<
QColor
>
colors
=
QList
<
QColor
>
()
<<
QColor
(
231
,
72
,
28
)
<<
QColor
(
104
,
64
,
240
)
<<
QColor
(
203
,
254
,
121
)
static
QList
<
QColor
>
colors
=
QList
<
QColor
>
()
<<
QColor
(
231
,
72
,
28
)
<<
QColor
(
104
,
64
,
240
)
<<
QColor
(
203
,
254
,
121
)
<<
QColor
(
161
,
252
,
116
)
<<
QColor
(
232
,
33
,
47
)
<<
QColor
(
116
,
251
,
110
)
<<
QColor
(
234
,
38
,
107
)
<<
QColor
(
232
,
33
,
47
)
<<
QColor
(
116
,
251
,
110
)
<<
QColor
(
234
,
38
,
107
)
<<
QColor
(
104
,
250
,
138
)
<<
QColor
(
235
,
43
,
165
)
<<
QColor
(
98
,
248
,
176
)
<<
QColor
(
236
,
48
,
221
)
<<
QColor
(
235
,
43
,
165
)
<<
QColor
(
98
,
248
,
176
)
<<
QColor
(
236
,
48
,
221
)
<<
QColor
(
92
,
247
,
217
)
<<
QColor
(
200
,
54
,
238
)
<<
QColor
(
87
,
231
,
246
)
<<
QColor
(
151
,
59
,
239
)
<<
QColor
(
200
,
54
,
238
)
<<
QColor
(
87
,
231
,
246
)
<<
QColor
(
151
,
59
,
239
)
<<
QColor
(
81
,
183
,
244
)
<<
QColor
(
75
,
133
,
243
)
<<
QColor
(
242
,
255
,
128
)
<<
QColor
(
75
,
133
,
243
)
<<
QColor
(
242
,
255
,
128
)
<<
QColor
(
230
,
126
,
23
);
static
int
nextColor
=
-
1
;
if
(
nextColor
==
18
){
//if at the end of the list
nextColor
=
-
1
;
//go back to the beginning
}
nextColor
++
;
nextColor
++
;
return
colors
[
nextColor
];
//return the next color
}
...
...
@@ -391,6 +391,12 @@ public slots:
virtual
void
sendHilOpticalFlow
(
quint64
time_us
,
qint16
flow_x
,
qint16
flow_y
,
float
flow_comp_m_x
,
float
flow_comp_m_y
,
quint8
quality
,
float
ground_distance
)
=
0
;
/** @brief Send command to map a RC channel to a parameter */
virtual
void
sendMapRCToParam
(
QString
param_id
,
float
scale
,
float
value0
,
quint8
param_rc_channel_index
,
float
valueMin
,
float
valueMax
)
=
0
;
/** @brief Send command to disable all bindings/maps between RC and parameters */
virtual
void
unsetRCToParameterMap
()
=
0
;
protected:
QColor
color
;
...
...
src/ui/QGCBaseParamWidget.cc
View file @
1eba9577
...
...
@@ -95,6 +95,11 @@ void QGCBaseParamWidget::requestOnboardParamsUpdate()
paramMgr
->
requestParameterList
();
}
void
QGCBaseParamWidget
::
requestOnboardParamUpdate
(
QString
parameterName
)
{
paramMgr
->
requestParameterUpdate
(
paramMgr
->
getDefaultComponentId
(),
parameterName
);
}
void
QGCBaseParamWidget
::
saveParametersToFile
()
{
...
...
src/ui/QGCBaseParamWidget.h
View file @
1eba9577
...
...
@@ -29,7 +29,7 @@ protected:
virtual
void
disconnectFromParamManager
();
///< Disconnect from any connected param manager signals
signals:
public
slots
:
virtual
void
handleOnboardParamUpdate
(
int
component
,
const
QString
&
parameterName
,
QVariant
value
)
=
0
;
virtual
void
handlePendingParamUpdate
(
int
compId
,
const
QString
&
paramName
,
QVariant
value
,
bool
isPending
)
=
0
;
...
...
@@ -43,6 +43,9 @@ public slots:
/** @brief Request list of parameters from MAV */
virtual
void
requestOnboardParamsUpdate
();
/** @brief Request single parameter from MAV */
virtual
void
requestOnboardParamUpdate
(
QString
parameterName
);
/** @brief Store parameters to a file */
virtual
void
saveParametersToFile
();
...
...
src/ui/QGCMapRCToParamDialog.cpp
0 → 100644
View file @
1eba9577
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Thomas Gubler <thomasgubler@gmail.com>
#include "QGCMapRCToParamDialog.h"
#include "ui_QGCMapRCToParamDialog.h"
#include <QDebug>
#include <QTimer>
#include <QEventLoop>
#include <QShowEvent>
#include <QPushButton>
QGCMapRCToParamDialog
::
QGCMapRCToParamDialog
(
QString
param_id
,
UASInterface
*
mav
,
QWidget
*
parent
)
:
QDialog
(
parent
),
param_id
(
param_id
),
mav
(
mav
),
ui
(
new
Ui
::
QGCMapRCToParamDialog
)
{
ui
->
setupUi
(
this
);
// only enable ok button when param was refreshed
QPushButton
*
okButton
=
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setEnabled
(
false
);
ui
->
paramIdLabel
->
setText
(
param_id
);
// Refresh the param
ParamLoader
*
paramLoader
=
new
ParamLoader
(
param_id
,
mav
);
paramLoader
->
moveToThread
(
&
paramLoadThread
);
connect
(
&
paramLoadThread
,
&
QThread
::
finished
,
paramLoader
,
&
QObject
::
deleteLater
);
connect
(
this
,
&
QGCMapRCToParamDialog
::
refreshParam
,
paramLoader
,
&
ParamLoader
::
load
);
connect
(
paramLoader
,
&
ParamLoader
::
paramLoaded
,
this
,
&
QGCMapRCToParamDialog
::
paramLoaded
);
paramLoadThread
.
start
();
emit
refreshParam
();
}
QGCMapRCToParamDialog
::~
QGCMapRCToParamDialog
()
{
delete
ui
;
}
void
QGCMapRCToParamDialog
::
accept
()
{
emit
mapRCToParamDialogResult
(
param_id
,
(
float
)
ui
->
scaleDoubleSpinBox
->
value
(),
(
float
)
ui
->
value0DoubleSpinBox
->
value
(),
(
quint8
)
ui
->
rcParamChannelComboBox
->
currentIndex
(),
(
float
)
ui
->
minValueDoubleSpinBox
->
value
(),
(
float
)
ui
->
maxValueDoubleSpinBox
->
value
());
QDialog
::
accept
();
}
void
QGCMapRCToParamDialog
::
paramLoaded
(
bool
success
,
float
value
,
QString
message
)
{
paramLoadThread
.
quit
();
if
(
success
)
{
ui
->
infoLabel
->
setText
(
"Parameter value is up to date"
);
ui
->
value0DoubleSpinBox
->
setValue
(
value
);
ui
->
value0DoubleSpinBox
->
setEnabled
(
true
);
connect
(
this
,
&
QGCMapRCToParamDialog
::
mapRCToParamDialogResult
,
mav
,
&
UASInterface
::
sendMapRCToParam
);
QPushButton
*
okButton
=
ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setEnabled
(
true
);
}
else
{
qDebug
()
<<
"Error while reading param"
<<
param_id
;
ui
->
infoLabel
->
setText
(
"Error while refreshing param ("
+
message
+
")"
);
}
}
void
ParamLoader
::
load
()
{
// refresh the parameter from onboard to make sure the current value is used
paramMgr
->
requestParameterUpdate
(
paramMgr
->
getDefaultComponentId
(),
param_id
);
// wait until parameter update is received
QEventLoop
loop
;
QTimer
timer
;
connect
(
&
timer
,
&
QTimer
::
timeout
,
&
loop
,
&
QEventLoop
::
quit
);
timer
.
start
(
10
*
1e3
);
// overloaded signal:
connect
(
mav
,
static_cast
<
void
(
UASInterface
::*
)(
int
,
int
,
QString
,
QVariant
)
>
(
&
UASInterface
::
parameterChanged
),
this
,
&
ParamLoader
::
handleParameterChanged
);
connect
(
this
,
&
ParamLoader
::
correctParameterChanged
,
&
loop
,
&
QEventLoop
::
quit
);
loop
.
exec
();
if
(
!
param_received
==
true
)
{
// timeout
emit
paramLoaded
(
false
,
0.0
f
,
"Timeout"
);
return
;
}
QVariant
current_param_value
;
bool
got_param
=
paramMgr
->
getParameterValue
(
paramMgr
->
getDefaultComponentId
(),
param_id
,
current_param_value
);
QString
message
=
got_param
?
""
:
"param manager Error"
;
emit
paramLoaded
(
got_param
,
current_param_value
.
toFloat
(),
message
);
}
void
ParamLoader
::
handleParameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
{
Q_UNUSED
(
component
);
Q_UNUSED
(
value
);
if
(
uas
==
mav
->
getUASID
()
&&
parameterName
==
param_id
)
{
param_received
=
true
;
emit
correctParameterChanged
();
}
}
src/ui/QGCMapRCToParamDialog.h
0 → 100644
View file @
1eba9577
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @brief Dialog to configure RC to paramter mapping
/// @author Thomas Gubler <thomasgubler@gmail.com>
#ifndef QGCMAPRCTOPARAMDIALOG_H
#define QGCMAPRCTOPARAMDIALOG_H
#include <QDialog>
#include <QThread>
#include "UASInterface.h"
namespace
Ui
{
class
QGCMapRCToParamDialog
;
}
class
ParamLoader
:
public
QObject
{
Q_OBJECT
public:
ParamLoader
(
QString
param_id
,
UASInterface
*
mav
,
QObject
*
parent
=
0
)
:
QObject
(
parent
),
mav
(
mav
),
paramMgr
(
mav
->
getParamManager
()),
param_id
(
param_id
),
param_received
(
false
)
{}
public
slots
:
void
load
();
void
handleParameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
signals:
void
paramLoaded
(
bool
success
,
float
value
,
QString
message
=
""
);
void
correctParameterChanged
();
protected:
UASInterface
*
mav
;
QGCUASParamManagerInterface
*
paramMgr
;
QString
param_id
;
bool
param_received
;
};
class
QGCMapRCToParamDialog
:
public
QDialog
{
Q_OBJECT
QThread
paramLoadThread
;
public:
explicit
QGCMapRCToParamDialog
(
QString
param_id
,
UASInterface
*
mav
,
QWidget
*
parent
=
0
);
~
QGCMapRCToParamDialog
();
signals:
void
mapRCToParamDialogResult
(
QString
param_id
,
float
scale
,
float
value0
,
quint8
param_rc_channel_index
,
float
valueMin
,
float
valueMax
);
void
refreshParam
();
public
slots
:
void
accept
();
void
paramLoaded
(
bool
success
,
float
value
,
QString
message
);
protected:
// void showEvent(QShowEvent * event );
QString
param_id
;
UASInterface
*
mav
;
private:
Ui
::
QGCMapRCToParamDialog
*
ui
;
};
#endif // QGCMAPRCTOPARAMDIALOG_H
src/ui/QGCMapRCToParamDialog.ui
0 → 100644
View file @
1eba9577
<?xml version="1.0" encoding="UTF-8"?>
<ui
version=
"4.0"
>
<class>
QGCMapRCToParamDialog
</class>
<widget
class=
"QDialog"
name=
"QGCMapRCToParamDialog"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
315
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Dialog
</string>
</property>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
<property
name=
"geometry"
>
<rect>
<x>
30
</x>
<y>
280
</y>
<width>
341
</width>
<height>
32
</height>
</rect>
</property>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::Cancel|QDialogButtonBox::Ok
</set>
</property>
</widget>
<widget
class=
"QWidget"
name=
"formLayoutWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
9
</x>
<y>
9
</y>
<width>
381
</width>
<height>
271
</height>
</rect>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::AllNonFixedFieldsGrow
</enum>
</property>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label1"
>
<property
name=
"text"
>
<string>
Bind
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"rcParamChannelInfoLabel"
>
<property
name=
"text"
>
<string>
RC-Parameter Channel (Knob No.)
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"1"
>
<widget
class=
"QComboBox"
name=
"rcParamChannelComboBox"
>
<property
name=
"editable"
>
<bool>
false
</bool>
</property>
<property
name=
"currentText"
>
<string>
1
</string>
</property>
<item>
<property
name=
"text"
>
<string>
1
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
2
</string>
</property>
</item>
<item>
<property
name=
"text"
>
<string>
3
</string>
</property>
</item>
</widget>
</item>
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label2"
>
<property
name=
"text"
>
<string>
to
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"0"
>
<widget
class=
"QLabel"
name=
"paramIdInfoLabel"
>
<property
name=
"text"
>
<string>
Parameter
</string>
</property>
</widget>
</item>
<item
row=
"3"
column=
"1"
>
<widget
class=
"QLabel"
name=
"paramIdLabel"
>
<property
name=
"text"
>
<string>
TextLabel
</string>
</property>
</widget>
</item>
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label3"
>
<property
name=
"text"
>
<string>
with
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"scaleInfoLabel"
>
<property
name=
"text"
>
<string>
Scale
</string>
</property>
</widget>
</item>
<item
row=
"5"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"scaleDoubleSpinBox"
>
<property
name=
"value"
>
<double>
1.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"value0InfoLabel"
>
<property
name=
"text"
>
<string>
Initial Value
</string>
</property>
</widget>
</item>
<item
row=
"6"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"value0DoubleSpinBox"
>
<property
name=
"enabled"
>
<bool>
false
</bool>
</property>
<property
name=
"decimals"
>
<number>
8
</number>
</property>
<property
name=
"minimum"
>
<double>
-100000.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"7"
column=
"0"
>
<widget
class=
"QLabel"
name=
"minInfoLabel"
>
<property
name=
"text"
>
<string>
Minimum Value
</string>
</property>
</widget>
</item>
<item
row=
"7"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"minValueDoubleSpinBox"
>
<property
name=
"decimals"
>
<number>
8
</number>
</property>
<property
name=
"minimum"
>
<double>
-100000.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"8"
column=
"0"
>
<widget
class=
"QLabel"
name=
"maxInfoLabel"
>
<property
name=
"text"
>
<string>
Maximum Value
</string>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"maxValueDoubleSpinBox"
>
<property
name=
"decimals"
>
<number>
8
</number>
</property>
<property
name=
"minimum"
>
<double>
-10000.000000000000000
</double>
</property>
<property
name=
"maximum"
>
<double>
100000.000000000000000
</double>
</property>
<property
name=
"singleStep"
>
<double>
1.000000000000000
</double>
</property>
<property
name=
"value"
>
<double>
10.000000000000000
</double>
</property>
</widget>
</item>
<item
row=
"10"
column=
"0"
>
<widget
class=
"QLabel"
name=
"infoLabel"
>
<property
name=
"text"
>
<string>
Waiting for parameter refresh,,,
</string>
</property>
</widget>
</item>
<item
row=
"9"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
40
</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>
buttonBox
</sender>
<signal>
accepted()
</signal>
<receiver>
QGCMapRCToParamDialog
</receiver>
<slot>
accept()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
248
</x>
<y>
254
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
157
</x>
<y>
274
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
buttonBox
</sender>
<signal>
rejected()
</signal>
<receiver>
QGCMapRCToParamDialog
</receiver>
<slot>
reject()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
316
</x>
<y>
260
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
286
</x>
<y>
274
</y>
</hint>
</hints>
</connection>
</connections>
</ui>
src/ui/QGCParamTreeWidget.cpp
0 → 100644
View file @
1eba9577
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @author Thomas Gubler <thomasgubler@gmail.com>
#include "QGCParamTreeWidget.h"
#include <QMenu>
#include <QTreeWidgetItem>
#include <QDebug>
QGCParamTreeWidget
::
QGCParamTreeWidget
(
QWidget
*
parent
)
:
QTreeWidget
(
parent
)
{
setContextMenuPolicy
(
Qt
::
CustomContextMenu
);
QObject
::
connect
(
this
,
&
QGCParamTreeWidget
::
customContextMenuRequested
,
this
,
&
QGCParamTreeWidget
::
showContextMenu
);
qDebug
()
<<
"create QGCParamTreeWidget"
;
}
QGCParamTreeWidget
::~
QGCParamTreeWidget
()
{
}
void
QGCParamTreeWidget
::
showContextMenu
(
const
QPoint
&
pos
)
{
QMenu
menu
;
QTreeWidgetItem
*
item
=
itemAt
(
pos
);
// Only show context menu for parameter items and not for group items
// (show for TEST_P but not for TEST)
// If a context menu is needed later for the groups then move this 'if'
// to below where the actions are created and filter out certain actions
// for the outer nodes
if
(
indexOfTopLevelItem
(
item
)
>
-
1
||
indexOfTopLevelItem
(
item
->
parent
())
>
-
1
)
{
return
;
}
QString
param_id
=
item
->
data
(
0
,
Qt
::
DisplayRole
).
toString
();
// Refresh single parameter
QAction
*
act
=
new
QAction
(
tr
(
"Refresh this param"
),
this
);
act
->
setProperty
(
"action"
,
"refresh"
);
act
->
setProperty
(
"param_id"
,
param_id
);
connect
(
act
,
&
QAction
::
triggered
,
this
,
&
QGCParamTreeWidget
::
contextMenuAction
);
menu
.
addAction
(
act
);
// RC to parameter mapping
act
=
new
QAction
(
tr
(
"Map Parameter to RC"
),
this
);
act
->
setProperty
(
"action"
,
"maprc"
);
act
->
setProperty
(
"param_id"
,
param_id
);
connect
(
act
,
&
QAction
::
triggered
,
this
,
&
QGCParamTreeWidget
::
contextMenuAction
);
menu
.
addAction
(
act
);
menu
.
exec
(
mapToGlobal
(
pos
));
}
void
QGCParamTreeWidget
::
contextMenuAction
()
{
QString
action
=
qobject_cast
<
QAction
*>
(
sender
())
->
property
(
"action"
).
toString
();
QString
param_id
=
qobject_cast
<
QAction
*>
(
sender
())
->
property
(
"param_id"
).
toString
();
if
(
action
==
"refresh"
)
{
emit
refreshParamRequest
(
param_id
);
}
else
if
(
action
==
"maprc"
)
{
emit
mapRCToParamRequest
(
param_id
);
}
else
{
qDebug
()
<<
"Undefined context menu action"
;
}
}
src/ui/QGCParamTreeWidget.h
0 → 100644
View file @
1eba9577
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/// @file
/// @brief A treeview with context menus for parameters
/// @author Thomas Gubler <thomasgubler@gmail.com>
#ifndef QGCPARAMTREEWIDGET_H
#define QGCPARAMTREEWIDGET_H
#include <QTreeWidget>
/// Implements individual context menus for the QTreeWidgetItems
class
QGCParamTreeWidget
:
public
QTreeWidget
{
Q_OBJECT
public:
QGCParamTreeWidget
(
QWidget
*
parent
=
0
);
~
QGCParamTreeWidget
();
signals:
void
mapRCToParamRequest
(
QString
param_id
);
void
refreshParamRequest
(
QString
param_id
);
public
slots
:
void
showContextMenu
(
const
QPoint
&
pos
);
void
contextMenuAction
();
};
#endif // QGCPARAMTREEWIDGET_H
src/ui/QGCParamWidget.cc
View file @
1eba9577
...
...
@@ -36,12 +36,15 @@ This file is part of the QGROUNDCONTROL project
#include <QPushButton>
#include <QSettings>
#include <QTime>
#include <QTimer>
#include <QEventLoop>
#include "MainWindow.h"
#include "QGC.h"
#include "QGCParamWidget.h"
#include "UASInterface.h"
#include "UASParameterCommsMgr.h"
#include "QGCMapRCToParamDialog.h"
/**
* @param uas MAV to set the parameters on
...
...
@@ -51,7 +54,7 @@ QGCParamWidget::QGCParamWidget(QWidget *parent) :
QGCBaseParamWidget
(
parent
),
componentItems
(
new
QMap
<
int
,
QTreeWidgetItem
*>
()),
statusLabel
(
new
QLabel
(
this
)),
tree
(
new
QTreeWidget
(
this
)),
tree
(
new
Q
GCParam
TreeWidget
(
this
)),
_fullParamListLoaded
(
false
)
{
...
...
@@ -64,6 +67,8 @@ void QGCParamWidget::disconnectViewSignalsAndSlots()
{
disconnect
(
tree
,
SIGNAL
(
itemChanged
(
QTreeWidgetItem
*
,
int
)),
this
,
SLOT
(
parameterItemChanged
(
QTreeWidgetItem
*
,
int
)));
disconnect
(
tree
,
&
QGCParamTreeWidget
::
mapRCToParamRequest
,
this
,
&
QGCParamWidget
::
configureRCToParam
);
}
...
...
@@ -72,6 +77,10 @@ void QGCParamWidget::connectViewSignalsAndSlots()
// Listen for edits to the tree UI
connect
(
tree
,
SIGNAL
(
itemChanged
(
QTreeWidgetItem
*
,
int
)),
this
,
SLOT
(
parameterItemChanged
(
QTreeWidgetItem
*
,
int
)));
connect
(
tree
,
&
QGCParamTreeWidget
::
mapRCToParamRequest
,
this
,
&
QGCParamWidget
::
configureRCToParam
);
connect
(
tree
,
&
QGCParamTreeWidget
::
refreshParamRequest
,
this
,
&
QGCParamWidget
::
requestOnboardParamUpdate
);
}
...
...
@@ -119,6 +128,13 @@ void QGCParamWidget::addActionButtonsToLayout(QGridLayout* layout)
paramMgr
,
SLOT
(
copyPersistentParamsToVolatile
()));
layout
->
addWidget
(
readButton
,
3
,
2
);
QPushButton
*
unsetRCToParamMapButton
=
new
QPushButton
(
tr
(
"Clear Rc to Param"
));
unsetRCToParamMapButton
->
setToolTip
(
tr
(
"Remove any bindings between RC channels and parameters."
));
unsetRCToParamMapButton
->
setWhatsThis
(
tr
(
"Remove any bindings between RC channels and parameters."
));
connect
(
unsetRCToParamMapButton
,
&
QPushButton
::
clicked
,
mav
,
&
UASInterface
::
unsetRCToParameterMap
);
layout
->
addWidget
(
unsetRCToParamMapButton
,
4
,
1
);
}
void
QGCParamWidget
::
layoutWidget
()
...
...
@@ -241,9 +257,9 @@ void QGCParamWidget::handleOnboardParameterListUpToDate()
if
(
_fullParamListLoaded
)
{
return
;
}
_fullParamListLoaded
=
true
;
//turn off updates while we refresh the entire list
tree
->
setUpdatesEnabled
(
false
);
...
...
@@ -355,7 +371,7 @@ void QGCParamWidget::insertParamAlphabetical(int indexLowerBound, int indexUpper
QTreeWidgetItem
*
QGCParamWidget
::
updateParameterDisplay
(
int
compId
,
QString
parameterName
,
QVariant
value
)
{
//qDebug() << "QGCParamWidget::updateParameterDisplay" << parameterName;
// Filter the parameters according to the filter list
if
(
_filterList
.
count
()
!=
0
)
{
bool
filterFound
=
false
;
...
...
@@ -366,7 +382,7 @@ QTreeWidgetItem* QGCParamWidget::updateParameterDisplay(int compId, QString para
}
if
(
paramFilter
==
parameterName
)
{
filterFound
=
true
;
break
;
break
;
}
}
if
(
!
filterFound
)
{
...
...
@@ -509,7 +525,6 @@ void QGCParamWidget::parameterItemChanged(QTreeWidgetItem* paramItem, int column
}
}
void
QGCParamWidget
::
setParameterStatusMsg
(
const
QString
&
msg
)
{
statusLabel
->
setText
(
msg
);
...
...
@@ -544,3 +559,9 @@ void QGCParamWidget::handleParamStatusMsgUpdate(QString msg, int level)
statusLabel
->
setPalette
(
pal
);
statusLabel
->
setText
(
msg
);
}
void
QGCParamWidget
::
configureRCToParam
(
QString
param_id
)
{
QGCMapRCToParamDialog
*
d
=
new
QGCMapRCToParamDialog
(
param_id
,
mav
,
this
);
d
->
exec
();
}
src/ui/QGCParamWidget.h
View file @
1eba9577
...
...
@@ -32,10 +32,10 @@ This file is part of the QGROUNDCONTROL project
#include <QWidget>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QMap>
#include <QLabel>
#include <QTimer>
#include "QGCParamTreeWidget.h"
#include "QGCBaseParamWidget.h"
...
...
@@ -52,7 +52,7 @@ class QGCParamWidget : public QGCBaseParamWidget
Q_OBJECT
public:
QGCParamWidget
(
QWidget
*
parent
=
0
);
/// @brief Sets the list of parameters which should be shown by this editor. Parameter names can be
/// wildcarded at the end such as this: "RC*". Which will filter to all parameters which begin
/// with "RC". The wildcard (*) can only be at the end of the string.
...
...
@@ -75,10 +75,6 @@ protected:
virtual
void
addActionButtonsToLayout
(
QGridLayout
*
layout
);
signals:
public
slots
:
virtual
void
handleOnboardParamUpdate
(
int
component
,
const
QString
&
parameterName
,
QVariant
value
);
virtual
void
handlePendingParamUpdate
(
int
compId
,
const
QString
&
paramName
,
QVariant
value
,
bool
isPending
);
...
...
@@ -97,14 +93,18 @@ public slots:
/** @brief Update when user changes parameters */
void
parameterItemChanged
(
QTreeWidgetItem
*
prev
,
int
column
);
/** Promt configuration for param map config from user */
void
configureRCToParam
(
QString
param_id
);
protected:
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
Q
GCParam
TreeWidget
*
tree
;
///< The parameter tree
QStringList
_filterList
;
private:
bool
_fullParamListLoaded
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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