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
f5d89a62
Commit
f5d89a62
authored
May 21, 2013
by
Michael Carpenter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to how configuration view operates, menu on the left side rather than top
parent
0049997b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1051 additions
and
894 deletions
+1051
-894
style-indoor.css
files/styles/style-indoor.css
+2
-2
style-outdoor.css
files/styles/style-outdoor.css
+2
-2
QGCVehicleConfig.cc
src/ui/QGCVehicleConfig.cc
+64
-4
QGCVehicleConfig.h
src/ui/QGCVehicleConfig.h
+8
-1
QGCVehicleConfig.ui
src/ui/QGCVehicleConfig.ui
+975
-885
No files found.
files/styles/style-indoor.css
View file @
f5d89a62
...
@@ -178,8 +178,8 @@ QDoubleSpinBox::down-button {
...
@@ -178,8 +178,8 @@ QDoubleSpinBox::down-button {
}
}
QPushButton
{
QPushButton
{
min-height
:
20px
;
/*min-height: 20px;*/
max-height
:
20px
;
/*max-height: 20px;*/
border
:
1px
solid
#465158
;
border
:
1px
solid
#465158
;
margin
:
1px
;
margin
:
1px
;
border-radius
:
2px
;
border-radius
:
2px
;
...
...
files/styles/style-outdoor.css
View file @
f5d89a62
...
@@ -184,8 +184,8 @@ QDoubleSpinBox::down-button {
...
@@ -184,8 +184,8 @@ QDoubleSpinBox::down-button {
QPushButton
{
QPushButton
{
font-weight
:
bold
;
font-weight
:
bold
;
min-height
:
18px
;
/*min-height: 18px;*/
max-height
:
18px
;
/*max-height: 18px;*/
border
:
2px
solid
#4A4A4F
;
border
:
2px
solid
#4A4A4F
;
border-radius
:
5px
;
border-radius
:
5px
;
padding-left
:
10px
;
padding-left
:
10px
;
...
...
src/ui/QGCVehicleConfig.cc
View file @
f5d89a62
...
@@ -44,6 +44,12 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
...
@@ -44,6 +44,12 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
setObjectName
(
"QGC_VEHICLECONFIG"
);
setObjectName
(
"QGC_VEHICLECONFIG"
);
ui
->
setupUi
(
this
);
ui
->
setupUi
(
this
);
connect
(
ui
->
rcMenuButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
rcMenuButtonClicked
()));
connect
(
ui
->
sensorMenuButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
sensorMenuButtonClicked
()));
connect
(
ui
->
generalMenuButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
generalMenuButtonClicked
()));
connect
(
ui
->
advancedMenuButton
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
advancedMenuButtonClicked
()));
requestCalibrationRC
();
requestCalibrationRC
();
if
(
mav
)
mav
->
requestParameter
(
0
,
"RC_TYPE"
);
if
(
mav
)
mav
->
requestParameter
(
0
,
"RC_TYPE"
);
...
@@ -89,6 +95,25 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
...
@@ -89,6 +95,25 @@ QGCVehicleConfig::QGCVehicleConfig(QWidget *parent) :
connect
(
&
updateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
updateView
()));
connect
(
&
updateTimer
,
SIGNAL
(
timeout
()),
this
,
SLOT
(
updateView
()));
updateTimer
.
start
();
updateTimer
.
start
();
}
}
void
QGCVehicleConfig
::
rcMenuButtonClicked
()
{
ui
->
stackedWidget
->
setCurrentIndex
(
0
);
}
void
QGCVehicleConfig
::
sensorMenuButtonClicked
()
{
ui
->
stackedWidget
->
setCurrentIndex
(
1
);
}
void
QGCVehicleConfig
::
generalMenuButtonClicked
()
{
ui
->
stackedWidget
->
setCurrentIndex
(
ui
->
stackedWidget
->
count
()
-
2
);
}
void
QGCVehicleConfig
::
advancedMenuButtonClicked
()
{
ui
->
stackedWidget
->
setCurrentIndex
(
ui
->
stackedWidget
->
count
()
-
1
);
}
QGCVehicleConfig
::~
QGCVehicleConfig
()
QGCVehicleConfig
::~
QGCVehicleConfig
()
{
{
...
@@ -247,8 +272,18 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
...
@@ -247,8 +272,18 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
//Load tabs for general configuration
//Load tabs for general configuration
foreach
(
QString
dir
,
generaldir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
foreach
(
QString
dir
,
generaldir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
{
QWidget
*
tab
=
new
QWidget
(
ui
->
tabWidget
);
QPushButton
*
button
=
new
QPushButton
(
ui
->
scrollAreaWidgetContents_3
);
ui
->
tabWidget
->
insertTab
(
2
,
tab
,
dir
);
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
button
->
setMinimumHeight
(
100
);
button
->
setMinimumWidth
(
100
);
button
->
show
();
button
->
setText
(
dir
);
//QWidget *tab = new QWidget(ui->tabWidget);
//ui->tabWidget->insertTab(2,tab,dir);
QWidget
*
tab
=
new
QWidget
(
ui
->
stackedWidget
);
ui
->
stackedWidget
->
insertWidget
(
2
,
tab
);
buttonToWidgetMap
[
button
]
=
tab
;
tab
->
setLayout
(
new
QVBoxLayout
());
tab
->
setLayout
(
new
QVBoxLayout
());
tab
->
show
();
tab
->
show
();
QScrollArea
*
area
=
new
QScrollArea
();
QScrollArea
*
area
=
new
QScrollArea
();
...
@@ -283,8 +318,20 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
...
@@ -283,8 +318,20 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
//Load tabs for vehicle specific configuration
//Load tabs for vehicle specific configuration
foreach
(
QString
dir
,
vehicledir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
foreach
(
QString
dir
,
vehicledir
.
entryList
(
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
))
{
{
QWidget
*
tab
=
new
QWidget
(
ui
->
tabWidget
);
//QWidget *tab = new QWidget(ui->tabWidget);
ui
->
tabWidget
->
insertTab
(
2
,
tab
,
dir
);
//ui->tabWidget->insertTab(2,tab,dir);
QPushButton
*
button
=
new
QPushButton
(
ui
->
scrollAreaWidgetContents_3
);
connect
(
button
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
menuButtonClicked
()));
ui
->
navBarLayout
->
insertWidget
(
2
,
button
);
QWidget
*
tab
=
new
QWidget
(
ui
->
stackedWidget
);
ui
->
stackedWidget
->
insertWidget
(
2
,
tab
);
buttonToWidgetMap
[
button
]
=
tab
;
button
->
setMinimumHeight
(
100
);
button
->
setMinimumWidth
(
100
);
button
->
show
();
button
->
setText
(
dir
);
tab
->
setLayout
(
new
QVBoxLayout
());
tab
->
setLayout
(
new
QVBoxLayout
());
tab
->
show
();
tab
->
show
();
QScrollArea
*
area
=
new
QScrollArea
();
QScrollArea
*
area
=
new
QScrollArea
();
...
@@ -361,6 +408,19 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
...
@@ -361,6 +408,19 @@ void QGCVehicleConfig::loadQgcConfig(bool primary)
}
void
QGCVehicleConfig
::
menuButtonClicked
()
{
QPushButton
*
button
=
qobject_cast
<
QPushButton
*>
(
sender
());
if
(
!
button
)
{
return
;
}
if
(
buttonToWidgetMap
.
contains
(
button
))
{
ui
->
stackedWidget
->
setCurrentWidget
(
buttonToWidgetMap
[
button
]);
}
}
}
void
QGCVehicleConfig
::
loadConfig
()
void
QGCVehicleConfig
::
loadConfig
()
...
...
src/ui/QGCVehicleConfig.h
View file @
f5d89a62
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
#include <QTimer>
#include <QTimer>
#include <QList>
#include <QList>
#include <QGroupBox>
#include <QGroupBox>
#include <QPushButton>
#include "QGCToolWidget.h"
#include "QGCToolWidget.h"
#include "UASInterface.h"
#include "UASInterface.h"
...
@@ -29,6 +30,11 @@ public:
...
@@ -29,6 +30,11 @@ public:
};
};
public
slots
:
public
slots
:
void
rcMenuButtonClicked
();
void
sensorMenuButtonClicked
();
void
generalMenuButtonClicked
();
void
advancedMenuButtonClicked
();
/** Set the MAV currently being calibrated */
/** Set the MAV currently being calibrated */
void
setActiveUAS
(
UASInterface
*
active
);
void
setActiveUAS
(
UASInterface
*
active
);
/** Fallback function, automatically called by loadConfig() upon failure to find and xml file*/
/** Fallback function, automatically called by loadConfig() upon failure to find and xml file*/
...
@@ -125,6 +131,7 @@ public slots:
...
@@ -125,6 +131,7 @@ public slots:
}
}
protected
slots
:
protected
slots
:
void
menuButtonClicked
();
/** Reset the RC calibration */
/** Reset the RC calibration */
void
resetCalibrationRC
();
void
resetCalibrationRC
();
/** Write the RC calibration */
/** Write the RC calibration */
...
@@ -183,7 +190,7 @@ protected:
...
@@ -183,7 +190,7 @@ protected:
private:
private:
Ui
::
QGCVehicleConfig
*
ui
;
Ui
::
QGCVehicleConfig
*
ui
;
QMap
<
QPushButton
*
,
QWidget
*>
buttonToWidgetMap
;
signals:
signals:
void
visibilityChanged
(
bool
visible
);
void
visibilityChanged
(
bool
visible
);
};
};
...
...
src/ui/QGCVehicleConfig.ui
View file @
f5d89a62
This diff is collapsed.
Click to expand it.
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