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
2ba773e7
Commit
2ba773e7
authored
Aug 14, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New PageView control in instrument Panel
parent
57225710
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
337 additions
and
328 deletions
+337
-328
qgroundcontrol.qrc
qgroundcontrol.qrc
+5
-4
CameraPageWidget.qml
src/FlightMap/Widgets/CameraPageWidget.qml
+32
-0
HealthPageWidget.qml
src/FlightMap/Widgets/HealthPageWidget.qml
+49
-0
QGCInstrumentWidgetAlternate.qml
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
+1
-23
ValuePageWidget.qml
src/FlightMap/Widgets/ValuePageWidget.qml
+25
-47
VehicleHealthWidget.qml
src/FlightMap/Widgets/VehicleHealthWidget.qml
+0
-73
VibrationPageWidget.qml
src/FlightMap/Widgets/VibrationPageWidget.qml
+153
-0
VibrationWidget.qml
src/FlightMap/Widgets/VibrationWidget.qml
+0
-177
qmldir
src/FlightMap/qmldir
+0
-4
PageView.qml
src/QmlControls/PageView.qml
+71
-0
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
2ba773e7
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
<file alias="QGroundControl/Controls/MultiRotorMotorDisplay.qml">src/QmlControls/MultiRotorMotorDisplay.qml</file>
<file alias="QGroundControl/Controls/MultiRotorMotorDisplay.qml">src/QmlControls/MultiRotorMotorDisplay.qml</file>
<file alias="QGroundControl/Controls/NoMouseThroughRectangle.qml">src/QmlControls/NoMouseThroughRectangle.qml</file>
<file alias="QGroundControl/Controls/NoMouseThroughRectangle.qml">src/QmlControls/NoMouseThroughRectangle.qml</file>
<file alias="QGroundControl/Controls/OfflineMapButton.qml">src/QmlControls/OfflineMapButton.qml</file>
<file alias="QGroundControl/Controls/OfflineMapButton.qml">src/QmlControls/OfflineMapButton.qml</file>
<file alias="QGroundControl/Controls/PageView.qml">src/QmlControls/PageView.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
<file alias="QGroundControl/Controls/ParameterEditorDialog.qml">src/QmlControls/ParameterEditorDialog.qml</file>
<file alias="QGroundControl/Controls/ParameterEditorDialog.qml">src/QmlControls/ParameterEditorDialog.qml</file>
<file alias="QGroundControl/Controls/PlanToolBar.qml">src/PlanView/PlanToolBar.qml</file>
<file alias="QGroundControl/Controls/PlanToolBar.qml">src/PlanView/PlanToolBar.qml</file>
...
@@ -163,11 +164,7 @@
...
@@ -163,11 +164,7 @@
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCVideoBackground.qml">src/FlightMap/QGCVideoBackground.qml</file>
<file alias="QGroundControl/FlightMap/QGCVideoBackground.qml">src/FlightMap/QGCVideoBackground.qml</file>
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/CameraWidget.qml">src/FlightMap/Widgets/CameraWidget.qml</file>
<file alias="QGroundControl/FlightMap/ValuesWidget.qml">src/FlightMap/Widgets/ValuesWidget.qml</file>
<file alias="QGroundControl/FlightMap/VehicleHealthWidget.qml">src/FlightMap/Widgets/VehicleHealthWidget.qml</file>
<file alias="QGroundControl/FlightMap/VehicleMapItem.qml">src/FlightMap/MapItems/VehicleMapItem.qml</file>
<file alias="QGroundControl/FlightMap/VehicleMapItem.qml">src/FlightMap/MapItems/VehicleMapItem.qml</file>
<file alias="QGroundControl/FlightMap/VibrationWidget.qml">src/FlightMap/Widgets/VibrationWidget.qml</file>
<file alias="QGroundControl/ScreenTools/qmldir">src/QmlControls/QGroundControl.ScreenTools.qmldir</file>
<file alias="QGroundControl/ScreenTools/qmldir">src/QmlControls/QGroundControl.ScreenTools.qmldir</file>
<file alias="QGroundControl/ScreenTools/ScreenTools.qml">src/QmlControls/ScreenTools.qml</file>
<file alias="QGroundControl/ScreenTools/ScreenTools.qml">src/QmlControls/ScreenTools.qml</file>
<file alias="QmlTest.qml">src/QmlControls/QmlTest.qml</file>
<file alias="QmlTest.qml">src/QmlControls/QmlTest.qml</file>
...
@@ -189,6 +186,10 @@
...
@@ -189,6 +186,10 @@
<file alias="UdpSettings.qml">src/ui/preferences/UdpSettings.qml</file>
<file alias="UdpSettings.qml">src/ui/preferences/UdpSettings.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="VehicleSummary.qml">src/VehicleSetup/VehicleSummary.qml</file>
<file alias="VirtualJoystick.qml">src/FlightDisplay/VirtualJoystick.qml</file>
<file alias="VirtualJoystick.qml">src/FlightDisplay/VirtualJoystick.qml</file>
<file alias="CameraPageWidget.qml">src/FlightMap/Widgets/CameraPageWidget.qml</file>
<file alias="ValuePageWidget.qml">src/FlightMap/Widgets/ValuePageWidget.qml</file>
<file alias="HealthPageWidget.qml">src/FlightMap/Widgets/HealthPageWidget.qml</file>
<file alias="VibrationPageWidget.qml">src/FlightMap/Widgets/VibrationPageWidget.qml</file>
</qresource>
</qresource>
<qresource prefix="/json">
<qresource prefix="/json">
<file alias="MavCmdInfoCommon.json">src/MissionManager/MavCmdInfoCommon.json</file>
<file alias="MavCmdInfoCommon.json">src/MissionManager/MavCmdInfoCommon.json</file>
...
...
src/FlightMap/Widgets/CameraWidget.qml
→
src/FlightMap/Widgets/Camera
Page
Widget.qml
View file @
2ba773e7
...
@@ -14,41 +14,19 @@ import QGroundControl 1.0
...
@@ -14,41 +14,19 @@ import QGroundControl 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
/// Camera controls used in InstrumentSwipeView
/// Camera page for Instrument Panel PageView
QGCFlickable
{
Column
{
id
:
_root
width
:
pageWidth
height
:
Math
.
min
(
maxHeight
,
column
.
height
)
spacing
:
ScreenTools
.
defaultFontPixelHeight
contentHeight
:
column
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
property
var
qgcView
property
bool
showSettingsIcon
:
false
property
color
textColor
property
var
maxHeight
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
MouseArea
{
QGCButton
{
anchors.fill
:
parent
anchors.horizontalCenter
:
parent
.
horizontalCenter
onClicked
:
showNextPage
()
text
:
qsTr
(
"
Trigger Camera
"
)
}
onClicked
:
_activeVehicle
.
triggerCamera
()
enabled
:
_activeVehicle
Column
{
id
:
column
width
:
parent
.
width
spacing
:
ScreenTools
.
defaultFontPixelHeight
QGCLabel
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
color
:
textColor
text
:
qsTr
(
"
Camera Controls
"
)
}
QGCButton
{
anchors.horizontalCenter
:
parent
.
horizontalCenter
text
:
qsTr
(
"
Trigger Camera
"
)
onClicked
:
_activeVehicle
.
triggerCamera
()
enabled
:
_activeVehicle
}
}
}
}
}
src/FlightMap/Widgets/HealthPageWidget.qml
0 → 100644
View file @
2ba773e7
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
/// Health page for Instrument Panel PageWidget
Column
{
width
:
pageWidth
property
bool
showSettingsIcon
:
false
property
var
_unhealthySensors
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
unhealthySensors
:
[
]
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
"
All systems healthy
"
)
visible
:
healthRepeater
.
count
==
0
}
Repeater
{
id
:
healthRepeater
model
:
_unhealthySensors
Row
{
Image
{
source
:
"
/qmlimages/Yield.svg
"
height
:
ScreenTools
.
defaultFontPixelHeight
sourceSize.height
:
height
fillMode
:
Image
.
PreserveAspectFit
}
QGCLabel
{
text
:
modelData
}
}
}
}
src/FlightMap/Widgets/QGCInstrumentWidgetAlternate.qml
View file @
2ba773e7
...
@@ -60,24 +60,6 @@ Rectangle {
...
@@ -60,24 +60,6 @@ Rectangle {
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
Image
{
id
:
gearThingy
anchors.bottomMargin
:
_topBottomMargin
anchors.bottom
:
parent
.
bottom
anchors.horizontalCenter
:
parent
.
horizontalCenter
source
:
qgcPal
.
globalTheme
==
QGCPalette
.
Light
?
"
/res/gear-black.svg
"
:
"
/res/gear-white.svg
"
mipmap
:
true
opacity
:
0.5
width
:
root
.
height
*
0.15
sourceSize.width
:
width
fillMode
:
Image
.
PreserveAspectFit
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
_valuesWidget
.
showPicker
()
}
Item
{
Item
{
id
:
_valuesItem
id
:
_valuesItem
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
4
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
/
4
...
@@ -90,17 +72,13 @@ Rectangle {
...
@@ -90,17 +72,13 @@ Rectangle {
color
:
qgcPal
.
window
color
:
qgcPal
.
window
}
}
InstrumentSwip
eView
{
Pag
eView
{
id
:
_valuesWidget
id
:
_valuesWidget
anchors.margins
:
1
anchors.margins
:
1
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
qgcView
:
root
.
_qgcView
qgcView
:
root
.
_qgcView
textColor
:
qgcPal
.
text
backgroundColor
:
qgcPal
.
window
maxHeight
:
_availableValueHeight
maxHeight
:
_availableValueHeight
}
}
}
}
}
}
src/FlightMap/Widgets/Value
s
Widget.qml
→
src/FlightMap/Widgets/Value
Page
Widget.qml
View file @
2ba773e7
...
@@ -7,7 +7,6 @@
...
@@ -7,7 +7,6 @@
*
*
****************************************************************************/
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
2.3
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Layouts
1.2
import
QtQuick
.
Layouts
1.2
...
@@ -20,16 +19,13 @@ import QGroundControl.Controllers 1.0
...
@@ -20,16 +19,13 @@ import QGroundControl.Controllers 1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
1.0
import
QGroundControl
1.0
QGCFlickable
{
/// Value page for InstrumentPanel PageView
id
:
_root
Column
{
height
:
Math
.
min
(
maxHeight
,
_smallFlow
.
y
+
_smallFlow
.
height
)
id
:
_largeColumn
contentHeight
:
_smallFlow
.
y
+
_smallFlow
.
height
width
:
pageWidth
flickableDirection
:
Flickable
.
VerticalFlick
spacing
:
_margins
clip
:
true
property
var
qgcView
property
bool
showSettingsIcon
:
true
property
color
textColor
property
var
maxHeight
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
...
@@ -40,7 +36,7 @@ QGCFlickable {
...
@@ -40,7 +36,7 @@ QGCFlickable {
id
:
controller
id
:
controller
}
}
function
show
Picker
()
{
function
show
Settings
()
{
qgcView
.
showDialog
(
propertyPicker
,
qsTr
(
"
Value Widget Setup
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
qgcView
.
showDialog
(
propertyPicker
,
qsTr
(
"
Value Widget Setup
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Ok
)
}
}
...
@@ -53,36 +49,39 @@ QGCFlickable {
...
@@ -53,36 +49,39 @@ QGCFlickable {
return
false
return
false
}
}
MouseArea
{
Repeater
{
anchors.fill
:
parent
model
:
_activeVehicle
?
controller
.
largeValues
:
0
onClicked
:
showNextPage
()
Loader
{
}
sourceComponent
:
fact
?
largeValue
:
undefined
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
}
}
// Repeater - Large
Column
{
Flow
{
id
:
_largeColumn
id
:
_smallFlow
width
:
parent
.
width
width
:
parent
.
width
spacing
:
_margins
layoutDirection
:
Qt
.
LeftToRight
spacing
:
_margins
Repeater
{
Repeater
{
model
:
_activeVehicle
?
controller
.
large
Values
:
0
model
:
_activeVehicle
?
controller
.
small
Values
:
0
Loader
{
Loader
{
sourceComponent
:
fact
?
large
Value
:
undefined
sourceComponent
:
fact
?
small
Value
:
undefined
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
}
}
}
// Repeater -
Large
}
// Repeater -
Small
}
//
Column - Large
}
//
Flow
Component
{
Component
{
id
:
largeValue
id
:
largeValue
Column
{
Column
{
width
:
_largeColumn
.
width
width
:
_largeColumn
.
width
property
bool
largeValue
:
_root
.
listContains
(
controller
.
altitudeProperties
,
fact
.
name
)
property
bool
largeValue
:
listContains
(
controller
.
altitudeProperties
,
fact
.
name
)
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
shortDescription
+
(
fact
.
units
?
"
(
"
+
fact
.
units
+
"
)
"
:
""
)
text
:
fact
.
shortDescription
+
(
fact
.
units
?
"
(
"
+
fact
.
units
+
"
)
"
:
""
)
}
}
...
@@ -92,34 +91,16 @@ QGCFlickable {
...
@@ -92,34 +91,16 @@ QGCFlickable {
font.pointSize
:
ScreenTools
.
mediumFontPointSize
*
(
largeValue
?
1.3
:
1.0
)
font.pointSize
:
ScreenTools
.
mediumFontPointSize
*
(
largeValue
?
1.3
:
1.0
)
font.family
:
largeValue
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
font.family
:
largeValue
?
ScreenTools
.
demiboldFontFamily
:
ScreenTools
.
normalFontFamily
fontSizeMode
:
Text
.
HorizontalFit
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
valueString
text
:
fact
.
valueString
}
}
}
}
}
}
Flow
{
id
:
_smallFlow
width
:
parent
.
width
anchors.topMargin
:
_margins
anchors.top
:
_largeColumn
.
bottom
layoutDirection
:
Qt
.
LeftToRight
spacing
:
_margins
Repeater
{
model
:
_activeVehicle
?
controller
.
smallValues
:
0
Loader
{
sourceComponent
:
fact
?
smallValue
:
undefined
property
Fact
fact
:
_activeVehicle
.
getFact
(
modelData
.
replace
(
"
Vehicle.
"
,
""
))
}
}
// Repeater - Small
}
// Flow
Component
{
Component
{
id
:
smallValue
id
:
smallValue
Column
{
Column
{
width
:
(
_root
.
w
idth
/
2
)
-
(
_margins
/
2
)
-
0.1
width
:
(
pageW
idth
/
2
)
-
(
_margins
/
2
)
-
0.1
clip
:
true
clip
:
true
QGCLabel
{
QGCLabel
{
...
@@ -127,13 +108,11 @@ QGCFlickable {
...
@@ -127,13 +108,11 @@ QGCFlickable {
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
shortDescription
text
:
fact
.
shortDescription
}
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
fontSizeMode
:
Text
.
HorizontalFit
fontSizeMode
:
Text
.
HorizontalFit
text
:
fact
.
enumOrValueString
text
:
fact
.
enumOrValueString
}
}
...
@@ -142,7 +121,6 @@ QGCFlickable {
...
@@ -142,7 +121,6 @@ QGCFlickable {
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
font.pointSize
:
ScreenTools
.
isTinyScreen
?
ScreenTools
.
smallFontPointSize
*
0.75
:
ScreenTools
.
smallFontPointSize
fontSizeMode
:
Text
.
HorizontalFit
fontSizeMode
:
Text
.
HorizontalFit
color
:
textColor
text
:
fact
.
units
text
:
fact
.
units
}
}
}
}
...
...
src/FlightMap/Widgets/VehicleHealthWidget.qml
deleted
100644 → 0
View file @
57225710
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCFlickable
{
id
:
_root
height
:
Math
.
min
(
maxHeight
,
healthColumn
.
y
+
healthColumn
.
height
)
contentHeight
:
healthColumn
.
y
+
healthColumn
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
property
var
qgcView
property
color
textColor
property
var
maxHeight
property
var
unhealthySensors
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
.
unhealthySensors
:
[
]
MouseArea
{
anchors.fill
:
parent
onClicked
:
showNextPage
()
}
Column
{
id
:
healthColumn
width
:
parent
.
width
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
text
:
qsTr
(
"
Vehicle Health
"
)
}
QGCLabel
{
width
:
parent
.
width
horizontalAlignment
:
Text
.
AlignHCenter
color
:
textColor
text
:
qsTr
(
"
All systems healthy
"
)
visible
:
healthRepeater
.
count
==
0
}
Repeater
{
id
:
healthRepeater
model
:
unhealthySensors
Row
{
Image
{
source
:
"
/qmlimages/Yield.svg
"
height
:
ScreenTools
.
defaultFontPixelHeight
sourceSize.height
:
height
fillMode
:
Image
.
PreserveAspectFit
}
QGCLabel
{
color
:
textColor
text
:
modelData
}
}
}
}
}
src/FlightMap/Widgets/VibrationPageWidget.qml
0 → 100644
View file @
2ba773e7
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
1.0
Rectangle
{
height
:
barRow
.
y
+
barRow
.
height
width
:
pageWidth
color
:
qgcPal
.
window
property
bool
showSettingsIcon
:
false
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
bool
_available
:
_activeVehicle
?
!
isNaN
(
_activeVehicle
.
vibration
.
xAxis
.
value
)
:
false
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_barWidth
:
Math
.
round
(
ScreenTools
.
defaultFontPixelWidth
*
3
)
readonly
property
real
_barMinimum
:
0.0
readonly
property
real
_barMaximum
:
90.0
readonly
property
real
_barBadValue
:
60.0
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
QGCLabel
{
id
:
title
text
:
qsTr
(
"
Vibe
"
)
anchors.horizontalCenter
:
barRow
.
horizontalCenter
}
Row
{
id
:
barRow
anchors.margins
:
_margins
anchors.top
:
title
.
bottom
anchors.left
:
parent
.
left
spacing
:
_margins
Column
{
ProgressBar
{
id
:
xBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
xAxis
.
value
:
0
}
QGCLabel
{
id
:
xBarLabel
text
:
"
X
"
anchors.horizontalCenter
:
xBar
.
horizontalCenter
}
}
Column
{
ProgressBar
{
id
:
yBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
yAxis
.
value
:
0
}
QGCLabel
{
anchors.horizontalCenter
:
yBar
.
horizontalCenter
text
:
"
Y
"
}
}
Column
{
ProgressBar
{
id
:
zBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
zAxis
.
value
:
0
}
QGCLabel
{
anchors.horizontalCenter
:
zBar
.
horizontalCenter
text
:
"
Z
"
}
}
}
// Row
// Max vibe indication line at 60
Rectangle
{
anchors.topMargin
:
xBar
.
height
*
(
1.0
-
((
_barBadValue
-
_barMinimum
)
/
(
_barMaximum
-
_barMinimum
)))
anchors.top
:
barRow
.
top
anchors.left
:
barRow
.
left
anchors.right
:
barRow
.
right
width
:
barRow
.
width
height
:
1
color
:
"
red
"
}
QGCLabel
{
id
:
clipLabel
anchors.margins
:
_margins
anchors.left
:
barRow
.
right
anchors.right
:
parent
.
right
text
:
qsTr
(
"
Clip count
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
Column
{
id
:
clipColumn
anchors.top
:
barRow
.
top
anchors.horizontalCenter
:
clipLabel
.
horizontalCenter
QGCLabel
{
text
:
qsTr
(
"
Accel 1:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount1
.
valueString
:
""
)
}
QGCLabel
{
text
:
qsTr
(
"
Accel 2:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount2
.
valueString
:
""
)
}
QGCLabel
{
text
:
qsTr
(
"
Accel 3:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount3
.
valueString
:
""
)
}
}
// Not available overlay
Rectangle
{
anchors.fill
:
parent
color
:
qgcPal
.
window
opacity
:
0.75
visible
:
!
_available
QGCLabel
{
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
qsTr
(
"
Not Available
"
)
}
}
}
// Item
src/FlightMap/Widgets/VibrationWidget.qml
deleted
100644 → 0
View file @
57225710
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
FactSystem
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
1.0
QGCFlickable
{
id
:
_root
height
:
Math
.
min
(
maxHeight
,
innerItem
.
height
)
contentHeight
:
innerItem
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
property
color
textColor
property
color
backgroundColor
property
var
maxHeight
property
var
_activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_barWidth
:
Math
.
round
(
ScreenTools
.
defaultFontPixelWidth
*
3
)
readonly
property
real
_barMinimum
:
0.0
readonly
property
real
_barMaximum
:
90.0
readonly
property
real
_barBadValue
:
60.0
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
showNextPage
()
}
Item
{
id
:
innerItem
width
:
parent
.
width
height
:
barRow
.
y
+
barRow
.
height
QGCLabel
{
id
:
title
color
:
textColor
text
:
qsTr
(
"
Vibe
"
)
anchors.horizontalCenter
:
barRow
.
horizontalCenter
}
Row
{
id
:
barRow
anchors.margins
:
_margins
anchors.top
:
title
.
bottom
anchors.left
:
parent
.
left
spacing
:
_margins
Column
{
ProgressBar
{
id
:
xBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
xAxis
.
value
:
0
}
QGCLabel
{
id
:
xBarLabel
color
:
textColor
text
:
"
X
"
anchors.horizontalCenter
:
xBar
.
horizontalCenter
}
}
Column
{
ProgressBar
{
id
:
yBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
yAxis
.
value
:
0
}
QGCLabel
{
anchors.horizontalCenter
:
yBar
.
horizontalCenter
color
:
textColor
text
:
"
Y
"
}
}
Column
{
ProgressBar
{
id
:
zBar
height
:
50
orientation
:
Qt
.
Vertical
minimumValue
:
_barMinimum
maximumValue
:
_barMaximum
value
:
_activeVehicle
?
_activeVehicle
.
vibration
.
zAxis
.
value
:
0
}
QGCLabel
{
anchors.horizontalCenter
:
zBar
.
horizontalCenter
color
:
textColor
text
:
"
Z
"
}
}
}
// Row
// Max vibe indication line at 60
Rectangle
{
anchors.topMargin
:
xBar
.
height
*
(
1.0
-
((
_barBadValue
-
_barMinimum
)
/
(
_barMaximum
-
_barMinimum
)))
anchors.top
:
barRow
.
top
anchors.left
:
barRow
.
left
anchors.right
:
barRow
.
right
width
:
barRow
.
width
height
:
1
color
:
"
red
"
}
QGCLabel
{
id
:
clipLabel
anchors.margins
:
_margins
anchors.left
:
barRow
.
right
anchors.right
:
parent
.
right
color
:
textColor
text
:
qsTr
(
"
Clip count
"
)
horizontalAlignment
:
Text
.
AlignHCenter
}
Column
{
id
:
clipColumn
anchors.top
:
barRow
.
top
anchors.horizontalCenter
:
clipLabel
.
horizontalCenter
QGCLabel
{
text
:
qsTr
(
"
Accel 1:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount1
.
valueString
:
""
)
color
:
textColor
}
QGCLabel
{
text
:
qsTr
(
"
Accel 2:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount2
.
valueString
:
""
)
color
:
textColor
}
QGCLabel
{
text
:
qsTr
(
"
Accel 3:
"
)
+
(
_activeVehicle
?
_activeVehicle
.
vibration
.
clipCount3
.
valueString
:
""
)
color
:
textColor
}
}
// Not available overlay
Rectangle
{
anchors.fill
:
parent
color
:
backgroundColor
opacity
:
0.75
visible
:
_activeVehicle
?
isNaN
(
_activeVehicle
.
vibration
.
xAxis
.
value
)
:
false
QGCLabel
{
anchors.fill
:
parent
text
:
qsTr
(
"
Not Available
"
)
color
:
textColor
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
}
}
}
// Item
}
// QGCFLickable
src/FlightMap/qmldir
View file @
2ba773e7
...
@@ -5,7 +5,6 @@ FlightMap 1.0 FlightMap.qml
...
@@ -5,7 +5,6 @@ FlightMap 1.0 FlightMap.qml
QGCVideoBackground 1.0 QGCVideoBackground.qml
QGCVideoBackground 1.0 QGCVideoBackground.qml
# Widgets
# Widgets
CameraWidget 1.0 CameraWidget.qml
CenterMapDropButton 1.0 CenterMapDropButton.qml
CenterMapDropButton 1.0 CenterMapDropButton.qml
CenterMapDropPanel 1.0 CenterMapDropPanel.qml
CenterMapDropPanel 1.0 CenterMapDropPanel.qml
CompassRing 1.0 CompassRing.qml
CompassRing 1.0 CompassRing.qml
...
@@ -17,9 +16,6 @@ QGCAttitudeHUD 1.0 QGCAttitudeHUD.qml
...
@@ -17,9 +16,6 @@ QGCAttitudeHUD 1.0 QGCAttitudeHUD.qml
QGCAttitudeWidget 1.0 QGCAttitudeWidget.qml
QGCAttitudeWidget 1.0 QGCAttitudeWidget.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
ValuesWidget 1.0 ValuesWidget.qml
VehicleHealthWidget 1.0 VehicleHealthWidget.qml
VibrationWidget 1.0 VibrationWidget.qml
# Map items
# Map items
CameraTriggerIndicator 1.0 CameraTriggerIndicator.qml
CameraTriggerIndicator 1.0 CameraTriggerIndicator.qml
...
...
src/QmlControls/PageView.qml
0 → 100644
View file @
2ba773e7
import
QtQuick
2.3
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Layouts
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
Rectangle
{
id
:
_root
height
:
pageFlickable
.
y
+
pageFlickable
.
height
+
_margins
color
:
qgcPal
.
window
property
var
qgcView
///< QGCView to use for showing dialogs
property
real
maxHeight
///< Maximum height that should be taken, smaller than this is ok
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_pageWidth
:
_root
.
width
property
var
_instrumentPages
:
QGroundControl
.
corePlugin
.
instrumentPages
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
parent
.
enabled
}
QGCComboBox
{
id
:
pageCombo
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
model
:
_instrumentPages
textRole
:
"
title
"
centeredLabel
:
true
pointSize
:
ScreenTools
.
smallFontPointSize
Image
{
anchors.leftMargin
:
_margins
anchors.left
:
parent
.
left
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
qgcPal
.
globalTheme
==
QGCPalette
.
Light
?
"
/res/gear-black.svg
"
:
"
/res/gear-white.svg
"
mipmap
:
true
width
:
parent
.
height
-
(
_margins
*
2
)
sourceSize.width
:
width
fillMode
:
Image
.
PreserveAspectFit
visible
:
pageWidgetLoader
.
item
.
showSettingsIcon
QGCMouseArea
{
fillItem
:
parent
onClicked
:
pageWidgetLoader
.
item
.
showSettings
()
}
}
}
QGCFlickable
{
id
:
pageFlickable
anchors.margins
:
_margins
anchors.top
:
pageCombo
.
bottom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
Math
.
min
(
_maxHeight
,
pageWidgetLoader
.
height
)
contentHeight
:
pageWidgetLoader
.
height
flickableDirection
:
Flickable
.
VerticalFlick
clip
:
true
property
real
_maxHeight
:
maxHeight
-
y
-
_margins
Loader
{
id
:
pageWidgetLoader
source
:
_instrumentPages
[
pageCombo
.
currentIndex
].
url
property
var
qgcView
:
_root
.
qgcView
property
real
pageWidth
:
parent
.
width
}
}
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
2ba773e7
...
@@ -26,6 +26,7 @@ MissionItemStatus 1.0 MissionItemStatus.qml
...
@@ -26,6 +26,7 @@ MissionItemStatus 1.0 MissionItemStatus.qml
ModeSwitchDisplay 1.0 ModeSwitchDisplay.qml
ModeSwitchDisplay 1.0 ModeSwitchDisplay.qml
MultiRotorMotorDisplay 1.0 MultiRotorMotorDisplay.qml
MultiRotorMotorDisplay 1.0 MultiRotorMotorDisplay.qml
NoMouseThroughRectangle 1.0 NoMouseThroughRectangle.qml
NoMouseThroughRectangle 1.0 NoMouseThroughRectangle.qml
PageView 1.0 PageView.qml
ParameterEditor 1.0 ParameterEditor.qml
ParameterEditor 1.0 ParameterEditor.qml
ParameterEditorDialog 1.0 ParameterEditorDialog.qml
ParameterEditorDialog 1.0 ParameterEditorDialog.qml
PlanToolBar 1.0 PlanToolBar.qml
PlanToolBar 1.0 PlanToolBar.qml
...
...
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