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
a8ffba6e
Commit
a8ffba6e
authored
Nov 06, 2015
by
dogmaphobic
Browse files
Separate Settings Panel
parent
b05aa3fb
Changes
28
Hide whitespace changes
Inline
Side-by-side
src/
VehicleSetup
/GeneralSettings.qml
→
src/
ui/preferences
/GeneralSettings.qml
View file @
a8ffba6e
...
...
@@ -35,7 +35,7 @@ import QGroundControl.Palette 1.0
Rectangle
{
id
:
_generalRoot
color
:
qgcPal
.
window
Shade
color
:
__
qgcPal
.
window
QGCPalette
{
id
:
qgcPal
...
...
@@ -169,60 +169,6 @@ Rectangle {
}
}
}
//-----------------------------------------------------------------
//-- Mavlink Settings
//-----------------------------------------------------------------
Rectangle
{
height
:
1
width
:
parent
.
width
color
:
qgcPal
.
button
}
QGCCheckBox
{
id
:
showMavlinkSettings
text
:
"
Show Advanced Mavlink Settings
"
checked
:
false
}
QGCLabel
{
text
:
"
Mavlink Settings
"
visible
:
showMavlinkSettings
.
checked
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Rectangle
{
height
:
1
width
:
parent
.
width
color
:
qgcPal
.
button
visible
:
showMavlinkSettings
.
checked
}
//-----------------------------------------------------------------
//-- Mavlink Heartbeats
QGCCheckBox
{
text
:
"
Emit heartbeat
"
checked
:
QGroundControl
.
isHeartBeatEnabled
visible
:
showMavlinkSettings
.
checked
onClicked
:
{
QGroundControl
.
isHeartBeatEnabled
=
checked
}
}
//-----------------------------------------------------------------
//-- Mavlink Multiplexing
QGCCheckBox
{
text
:
"
Enable multiplexing (forward packets to all other links)
"
checked
:
QGroundControl
.
isMultiplexingEnabled
visible
:
showMavlinkSettings
.
checked
onClicked
:
{
QGroundControl
.
isMultiplexingEnabled
=
checked
}
}
//-----------------------------------------------------------------
//-- Mavlink Version Check
QGCCheckBox
{
text
:
"
Only accept MAVs with same protocol version
"
checked
:
QGroundControl
.
isVersionCheckEnabled
visible
:
showMavlinkSettings
.
checked
onClicked
:
{
QGroundControl
.
isVersionCheckEnabled
=
checked
}
}
}
}
}
src/ui/preferences/MavlinkSettings.qml
0 → 100644
View file @
a8ffba6e
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009 - 2015 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/>.
======================================================================*/
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.1
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
MultiVehicleManager
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
id
:
__mavlinkRoot
color
:
__qgcPal
.
window
QGCPalette
{
id
:
qgcPal
colorGroupEnabled
:
enabled
}
Flickable
{
clip
:
true
anchors.fill
:
parent
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
contentHeight
:
settingsColumn
.
height
contentWidth
:
__mavlinkRoot
.
width
flickableDirection
:
Flickable
.
VerticalFlick
boundsBehavior
:
Flickable
.
StopAtBounds
Column
{
id
:
settingsColumn
width
:
__mavlinkRoot
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
text
:
"
MavLink Settings
"
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
}
Rectangle
{
height
:
1
width
:
parent
.
width
color
:
qgcPal
.
button
}
//-----------------------------------------------------------------
//-- Mavlink Heartbeats
QGCCheckBox
{
text
:
"
Emit heartbeat
"
checked
:
QGroundControl
.
isHeartBeatEnabled
onClicked
:
{
QGroundControl
.
isHeartBeatEnabled
=
checked
}
}
//-----------------------------------------------------------------
//-- Mavlink Multiplexing
QGCCheckBox
{
text
:
"
Enable multiplexing (forward packets to all other links)
"
checked
:
QGroundControl
.
isMultiplexingEnabled
onClicked
:
{
QGroundControl
.
isMultiplexingEnabled
=
checked
}
}
//-----------------------------------------------------------------
//-- Mavlink Version Check
QGCCheckBox
{
text
:
"
Only accept MAVs with same protocol version
"
checked
:
QGroundControl
.
isVersionCheckEnabled
onClicked
:
{
QGroundControl
.
isVersionCheckEnabled
=
checked
}
}
}
}
}
resourc
es/Gears.svg
→
src/ui/toolbar/Imag
es/Gears.svg
View file @
a8ffba6e
File moved
src/ui/toolbar/Images/Hamburger.svg
0 → 100644
View file @
a8ffba6e
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Capa_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"160 862 72 72"
style=
"enable-background:new 160 862 72 72;"
xml:space=
"preserve"
>
<style
type=
"text/css"
>
.st0{fill:none;stroke:#FFFFFF;stroke-width:6.962;stroke-linecap:round;stroke-miterlimit:10;}
</style>
<line
class=
"st0"
x1=
"169"
y1=
"880.4"
x2=
"223"
y2=
"879.9"
/>
<line
class=
"st0"
x1=
"169"
y1=
"898.2"
x2=
"223"
y2=
"897.8"
/>
<line
class=
"st0"
x1=
"169"
y1=
"916.1"
x2=
"223"
y2=
"915.6"
/>
</svg>
resourc
es/PaperPlane.svg
→
src/ui/toolbar/Imag
es/PaperPlane.svg
View file @
a8ffba6e
File moved
resourc
es/Plan.svg
→
src/ui/toolbar/Imag
es/Plan.svg
View file @
a8ffba6e
File moved
src/ui/toolbar/MainToolBar.qml
View file @
a8ffba6e
...
...
@@ -40,7 +40,7 @@ import QGroundControl.Controllers 1.0
Rectangle
{
id
:
toolBar
color
:
isBackgroundDark
?
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
color
:
opaqueBackground
?
"
#404040
"
:
(
isBackgroundDark
?
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
)
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
...
...
@@ -48,6 +48,7 @@ Rectangle {
property
var
mainWindow
:
null
property
bool
isMessageImportant
:
activeVehicle
?
!
activeVehicle
.
messageTypeNormal
&&
!
activeVehicle
.
messageTypeNone
:
false
property
bool
isBackgroundDark
:
true
property
bool
opaqueBackground
:
false
/*
Dev System (Mac OS)
...
...
@@ -132,14 +133,10 @@ Rectangle {
*/
readonly
property
int
cellHeight
:
height
*
0.75
readonly
property
real
tbFontSmall
:
10
*
ScreenTools
.
fontHRatio
readonly
property
real
tbFontNormal
:
12
*
ScreenTools
.
fontHRatio
readonly
property
real
tbFontLarge
:
18
*
ScreenTools
.
fontHRatio
readonly
property
real
tbSpacing
:
ScreenTools
.
isMobile
?
toolBar
.
width
*
0.00824
:
9.54
readonly
property
var
colorGreen
:
"
#05f068
"
readonly
property
var
colorOrange
:
"
#f0ab06
"
readonly
property
var
colorRed
:
"
#fc4638
"
...
...
@@ -172,61 +169,78 @@ Rectangle {
Row
{
id
:
viewRow
height
:
c
ellHeight
spacing
:
tbSpacing
height
:
mainWindow
.
tbC
ellHeight
spacing
:
mainWindow
.
tbSpacing
anchors.left
:
parent
.
left
anchors.leftMargin
:
tbSpacing
anchors.leftMargin
:
mainWindow
.
tbSpacing
anchors.verticalCenter
:
parent
.
verticalCenter
ExclusiveGroup
{
id
:
mainActionGroup
}
QGCToolBarButton
{
id
:
preferencesButton
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbCellHeight
source
:
"
/qmlimages/Hamburger.svg
"
onClicked
:
{
mainWindow
.
showLeftMenu
();
preferencesButton
.
checked
=
false
;
}
}
Rectangle
{
height
:
mainWindow
.
tbCellHeight
width
:
1
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.45
)
}
QGCToolBarButton
{
id
:
setupButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
exclusiveGroup
:
mainActionGroup
source
:
"
qrc:/r
es/Gears
"
source
:
"
/qmlimag
es/Gears
.svg
"
onClicked
:
{
_controller
.
onSetupView
();
}
}
Rectangle
{
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
width
:
1
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.45
)
}
QGCToolBarButton
{
id
:
planButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
exclusiveGroup
:
mainActionGroup
source
:
"
qrc:/r
es/Plan
"
source
:
"
/qmlimag
es/Plan
.svg
"
onClicked
:
{
_controller
.
onPlanView
();
}
}
Rectangle
{
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
width
:
1
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.45
)
}
QGCToolBarButton
{
id
:
flyButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
exclusiveGroup
:
mainActionGroup
source
:
"
qrc:/r
es/PaperPlane
"
source
:
"
/qmlimag
es/PaperPlane
.svg
"
onClicked
:
{
_controller
.
onFlyView
();
}
}
Rectangle
{
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
width
:
1
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.45
)
}
...
...
@@ -235,10 +249,10 @@ Rectangle {
Item
{
visible
:
showMavStatus
()
&&
!
connectionStatus
.
visible
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
width
:
(
toolBar
.
width
-
viewRow
.
width
-
connectRow
.
width
)
anchors.left
:
viewRow
.
right
anchors.leftMargin
:
tbSpacing
*
2
anchors.leftMargin
:
mainWindow
.
tbSpacing
*
2
anchors.verticalCenter
:
parent
.
verticalCenter
Loader
{
source
:
multiVehicleManager
.
activeVehicleAvailable
?
"
MainToolBarIndicators.qml
"
:
""
...
...
@@ -255,15 +269,15 @@ Rectangle {
font.weight
:
Font
.
DemiBold
color
:
colorRed
anchors.left
:
viewRow
.
right
anchors.leftMargin
:
tbSpacing
*
2
anchors.leftMargin
:
mainWindow
.
tbSpacing
*
2
anchors.verticalCenter
:
parent
.
verticalCenter
}
Row
{
id
:
connectRow
height
:
c
ellHeight
spacing
:
tbSpacing
anchors.rightMargin
:
tbSpacing
height
:
mainWindow
.
tbC
ellHeight
spacing
:
mainWindow
.
tbSpacing
anchors.rightMargin
:
mainWindow
.
tbSpacing
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -295,15 +309,15 @@ Rectangle {
}
Rectangle
{
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
width
:
1
color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.45
)
}
QGCToolBarButton
{
id
:
connectButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
visible
:
_controller
.
connectionCount
===
0
source
:
"
/qmlimages/Connect.svg
"
checked
:
false
...
...
@@ -327,15 +341,15 @@ Rectangle {
console.log("tbFontSmall: " + tbFontSmall);
console.log("tbFontNormal: " + tbFontNormal);
console.log("tbFontLarge: " + tbFontLarge);
console.log("tbSpacing: " + tbSpacing);
console.log("
mainWindow.
tbSpacing: " + tbSpacing);
*/
}
}
QGCToolBarButton
{
id
:
disconnectButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
visible
:
_controller
.
connectionCount
===
1
source
:
"
/qmlimages/Disconnect.svg
"
checked
:
false
...
...
@@ -365,8 +379,8 @@ Rectangle {
QGCToolBarButton
{
id
:
multidisconnectButton
width
:
cellHeight
*
1.3
height
:
c
ellHeight
width
:
mainWindow
.
tbButtonWidth
height
:
mainWindow
.
tbC
ellHeight
visible
:
_controller
.
connectionCount
>
1
source
:
"
/qmlimages/Disconnect.svg
"
checked
:
false
...
...
@@ -410,7 +424,7 @@ Rectangle {
color
:
qgcPal
.
warningText
lineHeightMode
:
Text
.
ProportionalHeight
lineHeight
:
1.15
anchors.margins
:
tbSpacing
anchors.margins
:
mainWindow
.
tbSpacing
}
}
QGCButton
{
...
...
@@ -419,7 +433,7 @@ Rectangle {
text
:
"
Close
"
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
anchors.margins
:
tbSpacing
anchors.margins
:
mainWindow
.
tbSpacing
onClicked
:
{
toolBarMessageArea
.
visible
=
false
_controller
.
onToolBarMessageClosed
()
...
...
src/ui/toolbar/MainToolBarIndicators.qml
View file @
a8ffba6e
...
...
@@ -101,8 +101,8 @@ Row {
//-- Message Indicator
Item
{
id
:
messages
width
:
c
ellHeight
height
:
c
ellHeight
width
:
mainWindow
.
tbC
ellHeight
height
:
mainWindow
.
tbC
ellHeight
visible
:
activeVehicle
.
messageCount
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -112,7 +112,7 @@ Row {
visible
:
activeVehicle
.
messageCount
>
0
&&
isMessageImportant
Image
{
source
:
"
/qmlimages/Yield.svg
"
height
:
cellHeight
*
0.75
height
:
mainWindow
.
tbButtonWidth
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
...
...
@@ -142,7 +142,7 @@ Row {
Image
{
id
:
messageIcon
source
:
"
/qmlimages/Megaphone.svg
"
height
:
c
ellHeight
*
0.5
height
:
mainWindow
.
tbC
ellHeight
*
0.5
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
...
...
@@ -171,7 +171,7 @@ Row {
Item
{
id
:
satelitte
width
:
gpsRow
.
width
*
1.1
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
Row
{
id
:
gpsRow
height
:
parent
.
height
...
...
@@ -181,13 +181,13 @@ Row {
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
width
:
c
ellHeight
*
0.65
height
:
c
ellHeight
*
0.5
width
:
mainWindow
.
tbC
ellHeight
*
0.65
height
:
mainWindow
.
tbC
ellHeight
*
0.5
opacity
:
activeVehicle
.
satelliteCount
<
1
?
0.5
:
1
anchors.verticalCenter
:
parent
.
verticalCenter
}
SignalStrength
{
size
:
c
ellHeight
*
0.5
size
:
mainWindow
.
tbC
ellHeight
*
0.5
percent
:
getSatStrength
(
activeVehicle
.
satelliteCount
)
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -208,7 +208,7 @@ Row {
Item
{
id
:
rcRssi
width
:
rssiRow
.
width
*
1.1
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
Row
{
id
:
rssiRow
height
:
parent
.
height
...
...
@@ -217,13 +217,13 @@ Row {
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
width
:
c
ellHeight
*
0.65
height
:
c
ellHeight
*
0.5
width
:
mainWindow
.
tbC
ellHeight
*
0.65
height
:
mainWindow
.
tbC
ellHeight
*
0.5
opacity
:
_controller
.
remoteRSSI
<
1
?
0.5
:
1
anchors.verticalCenter
:
parent
.
verticalCenter
}
SignalStrength
{
size
:
c
ellHeight
*
0.5
size
:
mainWindow
.
tbC
ellHeight
*
0.5
percent
:
_controller
.
remoteRSSI
anchors.verticalCenter
:
parent
.
verticalCenter
}
...
...
@@ -235,11 +235,11 @@ Row {
Item
{
id
:
batteryStatus
width
:
battRow
.
width
*
1.1
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
opacity
:
(
activeVehicle
.
batteryVoltage
>
0
)
?
1
:
0.5
Row
{
id
:
battRow
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
spacing
:
tbSpacing
anchors.horizontalCenter
:
parent
.
horizontalCenter
Column
{
...
...
@@ -285,7 +285,7 @@ Row {
//-- Vehicle Selector
QGCButton
{
width
:
ScreenTools
.
defaultFontPixelSize
*
12
height
:
cellHeight
*
0.75
height
:
mainWindow
.
tbButtonWidth
text
:
"
Vehicle
"
+
activeVehicle
.
id
visible
:
vehicleMenuItems
.
length
>
0
anchors.verticalCenter
:
parent
.
verticalCenter
...
...
@@ -340,7 +340,7 @@ Row {
Item
{
width
:
selectorRow
.
width
*
1.1
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
anchors.verticalCenter
:
parent
.
verticalCenter
Row
{
id
:
selectorRow
...
...
@@ -348,8 +348,8 @@ Row {
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
Image
{
width
:
c
ellHeight
*
0.65
height
:
c
ellHeight
*
0.65
width
:
mainWindow
.
tbC
ellHeight
*
0.65
height
:
mainWindow
.
tbC
ellHeight
*
0.65
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
...
...
@@ -417,15 +417,15 @@ Row {
Item
{
width
:
armCol
.
width
*
1.1
height
:
c
ellHeight
height
:
mainWindow
.
tbC
ellHeight
anchors.verticalCenter
:
parent
.
verticalCenter
Row
{
id
:
armCol
spacing
:
tbSpacing
*
0.5
anchors.verticalCenter
:
parent
.
verticalCenter
Image
{
width
:
c
ellHeight
*
0.5
height
:
c
ellHeight
*
0.5
width
:
mainWindow
.
tbC
ellHeight
*
0.5
height
:
mainWindow
.
tbC
ellHeight
*
0.5
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
...
...
@@ -476,7 +476,7 @@ Row {
Rectangle {
id: rssiRC
width: getProportionalDimmension(55)
height:
c
ellHeight
height:
mainWindow.tbC
ellHeight
visible: _controller.remoteRSSI <= 100
anchors.verticalCenter: parent.verticalCenter
color: getRSSIColor(_controller.remoteRSSI);
...
...
@@ -484,7 +484,7 @@ Row {
border.width: 0
Image {
source: "qrc:/res/AntennaRC";
width:
c
ellHeight * 0.7
width:
mainWindow.tbC
ellHeight * 0.7
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
...
...
@@ -507,7 +507,7 @@ Row {
Rectangle {
id: rssiTelemetry
width: getProportionalDimmension(80)
height:
c
ellHeight
height:
mainWindow.tbC
ellHeight
visible: (_controller.telemetryRRSSI > 0) && (_controller.telemetryLRSSI > 0)
anchors.verticalCenter: parent.verticalCenter
color: getRSSIColor(Math.min(_controller.telemetryRRSSI,_controller.telemetryLRSSI));
...
...
@@ -515,7 +515,7 @@ Row {
border.width: 0
Image {
source: "qrc:/res/AntennaT";
width:
c
ellHeight * 0.7
width:
mainWindow.tbC
ellHeight * 0.7
fillMode: Image.PreserveAspectFit
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
...
...
Prev
1
2
Next
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