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
3e383c01
Commit
3e383c01
authored
Jul 09, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standard and Advanced param pages, auto-generated from xml file
parent
897ee64f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
703 additions
and
251 deletions
+703
-251
qgroundcontrol.pro
qgroundcontrol.pro
+6
-3
AdvancedParamConfig.cc
src/ui/configuration/AdvancedParamConfig.cc
+25
-1
AdvancedParamConfig.h
src/ui/configuration/AdvancedParamConfig.h
+8
-3
AdvancedParamConfig.ui
src/ui/configuration/AdvancedParamConfig.ui
+33
-15
ApmHardwareConfig.cc
src/ui/configuration/ApmHardwareConfig.cc
+6
-1
ApmSoftwareConfig.cc
src/ui/configuration/ApmSoftwareConfig.cc
+355
-0
ApmSoftwareConfig.ui
src/ui/configuration/ApmSoftwareConfig.ui
+196
-207
StandardParamConfig.cc
src/ui/configuration/StandardParamConfig.cc
+32
-3
StandardParamConfig.h
src/ui/configuration/StandardParamConfig.h
+9
-3
StandardParamConfig.ui
src/ui/configuration/StandardParamConfig.ui
+33
-15
No files found.
qgroundcontrol.pro
View file @
3e383c01
...
...
@@ -257,7 +257,8 @@ FORMS += src/ui/MainWindow.ui \
src
/
ui
/
configuration
/
FailSafeConfig
.
ui
\
src
/
ui
/
configuration
/
AdvancedParamConfig
.
ui
\
src
/
ui
/
configuration
/
ArduCopterPidConfig
.
ui
\
src
/
ui
/
configuration
/
ApmPlaneLevel
.
ui
src
/
ui
/
configuration
/
ApmPlaneLevel
.
ui
\
src
/
ui
/
configuration
/
ParamWidget
.
ui
INCLUDEPATH
+=
src
\
src
/
ui
\
src
/
ui
/
linechart
\
...
...
@@ -439,7 +440,8 @@ HEADERS += src/MG.h \
src
/
ui
/
configuration
/
FailSafeConfig
.
h
\
src
/
ui
/
configuration
/
AdvancedParamConfig
.
h
\
src
/
ui
/
configuration
/
ArduCopterPidConfig
.
h
\
src
/
ui
/
configuration
/
ApmPlaneLevel
.
h
src
/
ui
/
configuration
/
ApmPlaneLevel
.
h
\
src
/
ui
/
configuration
/
ParamWidget
.
h
#
Google
Earth
is
only
supported
on
Mac
OS
and
Windows
with
Visual
Studio
Compiler
macx
|
macx
-
g
++
|
macx
-
g
++
42
|
win32
-
msvc2008
|
win32
-
msvc2010
|
win32
-
msvc2012
::
HEADERS
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
h
...
...
@@ -639,7 +641,8 @@ SOURCES += src/main.cc \
src
/
ui
/
configuration
/
FailSafeConfig
.
cc
\
src
/
ui
/
configuration
/
AdvancedParamConfig
.
cc
\
src
/
ui
/
configuration
/
ArduCopterPidConfig
.
cc
\
src
/
ui
/
configuration
/
ApmPlaneLevel
.
cc
src
/
ui
/
configuration
/
ApmPlaneLevel
.
cc
\
src
/
ui
/
configuration
/
ParamWidget
.
cc
#
Enable
Google
Earth
only
on
Mac
OS
and
Windows
with
Visual
Studio
compiler
macx
|
macx
-
g
++
|
macx
-
g
++
42
|
win32
-
msvc2008
|
win32
-
msvc2010
|
win32
-
msvc2012
::
SOURCES
+=
src
/
ui
/
map3D
/
QGCGoogleEarthView
.
cc
...
...
src/ui/configuration/AdvancedParamConfig.cc
View file @
3e383c01
#include "AdvancedParamConfig.h"
AdvancedParamConfig
::
AdvancedParamConfig
(
QWidget
*
parent
)
:
Q
Widget
(
parent
)
AdvancedParamConfig
::
AdvancedParamConfig
(
QWidget
*
parent
)
:
AP2Config
Widget
(
parent
)
{
ui
.
setupUi
(
this
);
}
...
...
@@ -9,3 +9,27 @@ AdvancedParamConfig::AdvancedParamConfig(QWidget *parent) : QWidget(parent)
AdvancedParamConfig
::~
AdvancedParamConfig
()
{
}
void
AdvancedParamConfig
::
addRange
(
QString
title
,
QString
description
,
QString
param
,
double
min
,
double
max
)
{
ParamWidget
*
widget
=
new
ParamWidget
(
ui
.
scrollAreaWidgetContents
);
paramToWidgetMap
[
param
]
=
widget
;
widget
->
setupDouble
(
title
+
"("
+
param
+
")"
,
description
,
0
,
min
,
max
);
ui
.
verticalLayout
->
addWidget
(
widget
);
widget
->
show
();
}
void
AdvancedParamConfig
::
addCombo
(
QString
title
,
QString
description
,
QString
param
,
QList
<
QPair
<
int
,
QString
>
>
valuelist
)
{
ParamWidget
*
widget
=
new
ParamWidget
(
ui
.
scrollAreaWidgetContents
);
paramToWidgetMap
[
param
]
=
widget
;
widget
->
setupCombo
(
title
+
"("
+
param
+
")"
,
description
,
valuelist
);
ui
.
verticalLayout
->
addWidget
(
widget
);
widget
->
show
();
}
void
AdvancedParamConfig
::
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
{
if
(
paramToWidgetMap
.
contains
(
parameterName
))
{
paramToWidgetMap
[
parameterName
]
->
setValue
(
value
.
toDouble
());
}
}
src/ui/configuration/AdvancedParamConfig.h
View file @
3e383c01
...
...
@@ -3,16 +3,21 @@
#include <QWidget>
#include "ui_AdvancedParamConfig.h"
class
AdvancedParamConfig
:
public
QWidget
#include "AP2ConfigWidget.h"
#include "ParamWidget.h"
class
AdvancedParamConfig
:
public
AP2ConfigWidget
{
Q_OBJECT
public:
explicit
AdvancedParamConfig
(
QWidget
*
parent
=
0
);
~
AdvancedParamConfig
();
void
addRange
(
QString
title
,
QString
description
,
QString
param
,
double
min
,
double
max
);
void
addCombo
(
QString
title
,
QString
description
,
QString
param
,
QList
<
QPair
<
int
,
QString
>
>
valuelist
);
private
slots
:
void
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
private:
QMap
<
QString
,
ParamWidget
*>
paramToWidgetMap
;
Ui
::
AdvancedParamConfig
ui
;
};
...
...
src/ui/configuration/AdvancedParamConfig.ui
View file @
3e383c01
...
...
@@ -6,26 +6,44 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
<width>
725
</width>
<height>
632
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
10
</x>
<y>
10
</y>
<width>
181
</width>
<height>
31
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
<
h2
>
Advanced Params
<
/h2
>
</string>
</property>
</widget>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
<
h2
>
Advanced Params
<
/h2
>
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QScrollArea"
name=
"scrollArea"
>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
</property>
<widget
class=
"QWidget"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
705
</width>
<height>
585
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
...
...
src/ui/configuration/ApmHardwareConfig.cc
View file @
3e383c01
...
...
@@ -30,7 +30,6 @@ This file is part of the QGROUNDCONTROL project
*/
#include "ApmHardwareConfig.h"
ApmHardwareConfig
::
ApmHardwareConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
ui
.
setupUi
(
this
);
...
...
@@ -191,4 +190,10 @@ void ApmHardwareConfig::activeUASSet(UASInterface *uas)
ui
.
optionalHardwareButton
->
setChecked
(
false
);
ui
.
radio3DRButton
->
setVisible
(
false
);
ui
.
antennaTrackerButton
->
setVisible
(
false
);
}
src/ui/configuration/ApmSoftwareConfig.cc
View file @
3e383c01
This diff is collapsed.
Click to expand it.
src/ui/configuration/ApmSoftwareConfig.ui
View file @
3e383c01
This diff is collapsed.
Click to expand it.
src/ui/configuration/StandardParamConfig.cc
View file @
3e383c01
#include "StandardParamConfig.h"
#include "ParamWidget.h"
StandardParamConfig
::
StandardParamConfig
(
QWidget
*
parent
)
:
AP2ConfigWidget
(
parent
)
{
ui
.
setupUi
(
this
);
}
StandardParamConfig
::~
StandardParamConfig
()
{
}
StandardParamConfig
::
StandardParamConfig
(
QWidget
*
parent
)
:
QWidget
(
parent
)
void
StandardParamConfig
::
activeUASSet
(
UASInterface
*
uas
)
{
ui
.
setupUi
(
this
);
AP2ConfigWidget
::
activeUASSet
(
uas
);
}
void
StandardParamConfig
::
addRange
(
QString
title
,
QString
description
,
QString
param
,
double
min
,
double
max
)
{
ParamWidget
*
widget
=
new
ParamWidget
(
ui
.
scrollAreaWidgetContents
);
paramToWidgetMap
[
param
]
=
widget
;
widget
->
setupDouble
(
title
+
"("
+
param
+
")"
,
description
,
0
,
min
,
max
);
ui
.
verticalLayout
->
addWidget
(
widget
);
widget
->
show
();
}
StandardParamConfig
::~
StandardParamConfig
()
void
StandardParamConfig
::
addCombo
(
QString
title
,
QString
description
,
QString
param
,
QList
<
QPair
<
int
,
QString
>
>
valuelist
)
{
ParamWidget
*
widget
=
new
ParamWidget
(
ui
.
scrollAreaWidgetContents
);
paramToWidgetMap
[
param
]
=
widget
;
widget
->
setupCombo
(
title
+
"("
+
param
+
")"
,
description
,
valuelist
);
ui
.
verticalLayout
->
addWidget
(
widget
);
widget
->
show
();
}
void
StandardParamConfig
::
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
)
{
if
(
paramToWidgetMap
.
contains
(
parameterName
))
{
paramToWidgetMap
[
parameterName
]
->
setValue
(
value
.
toDouble
());
}
}
src/ui/configuration/StandardParamConfig.h
View file @
3e383c01
...
...
@@ -3,16 +3,22 @@
#include <QWidget>
#include "ui_StandardParamConfig.h"
class
StandardParamConfig
:
public
QWidget
#include "AP2ConfigWidget.h"
#include "ParamWidget.h"
class
StandardParamConfig
:
public
AP2ConfigWidget
{
Q_OBJECT
public:
explicit
StandardParamConfig
(
QWidget
*
parent
=
0
);
~
StandardParamConfig
();
void
addRange
(
QString
title
,
QString
description
,
QString
param
,
double
min
,
double
max
);
void
addCombo
(
QString
title
,
QString
description
,
QString
param
,
QList
<
QPair
<
int
,
QString
>
>
valuelist
);
private
slots
:
void
parameterChanged
(
int
uas
,
int
component
,
QString
parameterName
,
QVariant
value
);
private:
QMap
<
QString
,
ParamWidget
*>
paramToWidgetMap
;
void
activeUASSet
(
UASInterface
*
uas
);
Ui
::
StandardParamConfig
ui
;
};
...
...
src/ui/configuration/StandardParamConfig.ui
View file @
3e383c01
...
...
@@ -6,26 +6,44 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
400
</width>
<height>
300
</height>
<width>
651
</width>
<height>
552
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Form
</string>
</property>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
20
</x>
<y>
20
</y>
<width>
201
</width>
<height>
41
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
<
h2
>
Standard Params
<
/h2
>
</string>
</property>
</widget>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
<
h2
>
Standard Params
<
/h2
>
</string>
</property>
</widget>
</item>
<item>
<widget
class=
"QScrollArea"
name=
"scrollArea"
>
<property
name=
"widgetResizable"
>
<bool>
true
</bool>
</property>
<widget
class=
"QWidget"
name=
"scrollAreaWidgetContents"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
631
</width>
<height>
505
</height>
</rect>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
/>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
...
...
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