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
a97c4405
Commit
a97c4405
authored
Feb 12, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added settings dialog for QGroundControl, holds for now only MAVLink preferences
parent
e4dfd0ee
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
38 deletions
+100
-38
style-mission.css
images/style-mission.css
+35
-0
LinkManager.h
src/comm/LinkManager.h
+3
-0
MainWindow.cc
src/ui/MainWindow.cc
+14
-2
MainWindow.h
src/ui/MainWindow.h
+3
-0
MainWindow.ui
src/ui/MainWindow.ui
+2
-2
QGCSettingsWidget.cc
src/ui/QGCSettingsWidget.cc
+25
-2
QGCSettingsWidget.h
src/ui/QGCSettingsWidget.h
+1
-1
QGCSettingsWidget.ui
src/ui/QGCSettingsWidget.ui
+17
-31
No files found.
images/style-mission.css
View file @
a97c4405
...
...
@@ -356,3 +356,38 @@ QProgressBar::chunk#speedBar {
QProgressBar
::chunk
#thrustBar
{
background-color
:
orange
;
}
QDialog
{
border
:
1px
solid
#62676B
;
border-radius
:
2px
;
}
QTabWidget
::pane
{
/* The tab widget frame */
border
:
1px
solid
#62676B
;
border-radius
:
2px
;
position
:
absolute
;
top
:
-0.5em
;
}
QTabWidget
::tab-bar
{
alignment
:
center
;
}
/* Style the tab using the tab sub-control. Note that
it reads QTabBar _not_ QTabWidget */
QTabBar
::tab
{
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#090909
,
stop
:
1
#353535
);
border
:
2px
solid
#62676B
;
border-radius
:
4px
;
min-width
:
8ex
;
padding
:
2px
;
}
QTabBar
::tab:selected
,
QTabBar
::tab:hover
{
background-color
:
qlineargradient
(
x1
:
0
,
y1
:
0
,
x2
:
0
,
y2
:
1
,
stop
:
0
#090909
,
stop
:
1
#353535
);
border
:
2px
solid
#379AC3
;
}
QTabBar
::tab:selected
{
border
:
2px
solid
#379AC3
;
}
src/comm/LinkManager.h
View file @
a97c4405
...
...
@@ -62,6 +62,9 @@ public:
/** @brief Get a list of all links */
const
QList
<
LinkInterface
*>
getLinks
();
/** @brief Get a list of all protocols */
const
QList
<
ProtocolInterface
*>
getProtocols
()
{
return
protocolLinks
.
uniqueKeys
();
}
public
slots
:
void
add
(
LinkInterface
*
link
);
...
...
src/ui/MainWindow.cc
View file @
a97c4405
...
...
@@ -28,6 +28,7 @@
#include "GAudioOutput.h"
#include "QGCToolWidget.h"
#include "QGCMAVLinkLogPlayer.h"
#include "QGCSettingsWidget.h"
#ifdef QGC_OSG_ENABLED
#include "Q3DWidgetFactory.h"
...
...
@@ -261,7 +262,8 @@ QString MainWindow::getWindowStateKey()
QString
MainWindow
::
getWindowGeometryKey
()
{
return
QString
::
number
(
currentView
)
+
"_geometry"
;
//return QString::number(currentView)+"_geometry";
return
"_geometry"
;
}
void
MainWindow
::
buildCustomWidget
()
...
...
@@ -1344,8 +1346,12 @@ void MainWindow::connectCommonActions()
// unless it is actually used
// so no ressources spend on this.
ui
.
actionJoystickSettings
->
setVisible
(
true
);
// Joystick configuration
// Configuration
// Joystick
connect
(
ui
.
actionJoystickSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
configure
()));
// Application Settings
connect
(
ui
.
actionSettings
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
showSettings
()));
}
void
MainWindow
::
connectPxActions
()
...
...
@@ -1414,6 +1420,12 @@ void MainWindow::configure()
joystickWidget
->
show
();
}
void
MainWindow
::
showSettings
()
{
QGCSettingsWidget
*
settings
=
new
QGCSettingsWidget
(
this
);
settings
->
show
();
}
void
MainWindow
::
addLink
()
{
SerialLink
*
link
=
new
SerialLink
();
...
...
src/ui/MainWindow.h
View file @
a97c4405
...
...
@@ -101,6 +101,9 @@ public slots:
/** @brief Shows an info message as popup or as widget */
void
showInfoMessage
(
const
QString
&
title
,
const
QString
&
message
);
/** @brief Show the application settings */
void
showSettings
();
/** @brief Add a communication link */
void
addLink
();
void
addLink
(
LinkInterface
*
link
);
void
configure
();
...
...
src/ui/MainWindow.ui
View file @
a97c4405
...
...
@@ -60,17 +60,17 @@
</property>
<widget
class=
"QMenu"
name=
"menuPreferences"
>
<property
name=
"title"
>
<string>
Preferences
</string>
<string>
Display
</string>
</property>
<addaction
name=
"actionSelectStylesheet"
/>
<addaction
name=
"actionReloadStylesheet"
/>
<addaction
name=
"actionSettings"
/>
</widget>
<addaction
name=
"actionJoystick_Settings"
/>
<addaction
name=
"actionSimulate"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionMuteAudioOutput"
/>
<addaction
name=
"actionJoystickSettings"
/>
<addaction
name=
"actionSettings"
/>
<addaction
name=
"menuPreferences"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"actionExit"
/>
...
...
src/ui/QGCSettingsWidget.cc
View file @
a97c4405
#include "QGCSettingsWidget.h"
#include "ui_QGCSettingsWidget.h"
QGCSettingsWidget
::
QGCSettingsWidget
(
QWidget
*
parent
)
:
QDialog
(
parent
),
#include "LinkManager.h"
#include "MAVLinkProtocol.h"
#include "MAVLinkSettingsWidget.h"
//, Qt::WindowFlags flags
QGCSettingsWidget
::
QGCSettingsWidget
(
QWidget
*
parent
,
Qt
::
WindowFlags
flags
)
:
QDialog
(
parent
,
flags
),
ui
(
new
Ui
::
QGCSettingsWidget
)
{
ui
->
setupUi
(
this
);
// Add all protocols
QList
<
ProtocolInterface
*>
protocols
=
LinkManager
::
instance
()
->
getProtocols
();
foreach
(
ProtocolInterface
*
protocol
,
protocols
)
{
MAVLinkProtocol
*
mavlink
=
dynamic_cast
<
MAVLinkProtocol
*>
(
protocol
);
if
(
mavlink
)
{
MAVLinkSettingsWidget
*
msettings
=
new
MAVLinkSettingsWidget
(
mavlink
,
this
);
ui
->
tabWidget
->
addTab
(
msettings
,
"MAVLink"
);
}
}
this
->
window
()
->
setWindowTitle
(
tr
(
"QGroundControl Settings"
));
// Close / destroy
connect
(
ui
->
buttonBox
,
SIGNAL
(
accepted
()),
this
,
SLOT
(
deleteLater
()));
}
QGCSettingsWidget
::~
QGCSettingsWidget
()
...
...
src/ui/QGCSettingsWidget.h
View file @
a97c4405
...
...
@@ -12,7 +12,7 @@ class QGCSettingsWidget : public QDialog
Q_OBJECT
public:
explicit
QGCSettingsWidget
(
QWidget
*
parent
=
0
);
QGCSettingsWidget
(
QWidget
*
parent
=
0
,
Qt
::
WindowFlags
flags
=
Qt
::
Sheet
);
~
QGCSettingsWidget
();
private:
...
...
src/ui/QGCSettingsWidget.ui
View file @
a97c4405
...
...
@@ -6,42 +6,28 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
467
</width>
<height>
294
</height>
<width>
535
</width>
<height>
427
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
Dialog
</string>
</property>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
<property
name=
"geometry"
>
<rect>
<x>
30
</x>
<y>
240
</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=
"QLabel"
name=
"label"
>
<property
name=
"geometry"
>
<rect>
<x>
30
</x>
<y>
20
</y>
<width>
401
</width>
<height>
16
</height>
</rect>
</property>
<property
name=
"text"
>
<string>
QGroundControl Settings - Work in Progress, no Settings yet
</string>
</property>
</widget>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QTabWidget"
name=
"tabWidget"
/>
</item>
<item>
<widget
class=
"QDialogButtonBox"
name=
"buttonBox"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<property
name=
"standardButtons"
>
<set>
QDialogButtonBox::Close
</set>
</property>
</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