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
1048dacc
Commit
1048dacc
authored
Feb 27, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New QGCGroupBox control
parent
5c0dfa95
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
443 additions
and
456 deletions
+443
-456
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
PowerComponent.qml
src/AutoPilotPlugins/PX4/PowerComponent.qml
+409
-456
QGCGroupBox.qml
src/QmlControls/QGCGroupBox.qml
+32
-0
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
1048dacc
...
@@ -79,6 +79,7 @@
...
@@ -79,6 +79,7 @@
<file alias="QGroundControl/Controls/QGCFlickable.qml">src/QmlControls/QGCFlickable.qml</file>
<file alias="QGroundControl/Controls/QGCFlickable.qml">src/QmlControls/QGCFlickable.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">src/QmlControls/QGCFlickableHorizontalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">src/QmlControls/QGCFlickableHorizontalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">src/QmlControls/QGCFlickableVerticalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">src/QmlControls/QGCFlickableVerticalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCGroupBox.qml">src/QmlControls/QGCGroupBox.qml</file>
<file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCListView.qml">src/QmlControls/QGCListView.qml</file>
<file alias="QGroundControl/Controls/QGCListView.qml">src/QmlControls/QGCListView.qml</file>
<file alias="QGroundControl/Controls/QGCMapLabel.qml">src/QmlControls/QGCMapLabel.qml</file>
<file alias="QGroundControl/Controls/QGCMapLabel.qml">src/QmlControls/QGCMapLabel.qml</file>
...
...
src/AutoPilotPlugins/PX4/PowerComponent.qml
View file @
1048dacc
...
@@ -7,11 +7,6 @@
...
@@ -7,11 +7,6 @@
*
*
****************************************************************************/
****************************************************************************/
/// @file
/// @brief Battery, propeller and magnetometer settings
/// @author Gus Grubba <mavlink@grubba.com>
import
QtQuick
2.2
import
QtQuick
2.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Controls
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Dialogs
1.2
...
@@ -30,10 +25,14 @@ SetupPage {
...
@@ -30,10 +25,14 @@ SetupPage {
Component
{
Component
{
id
:
pageComponent
id
:
pageComponent
Column
{
Item
{
width
:
Math
.
max
(
availableWidth
,
innerColumn
.
width
)
height
:
innerColumn
.
height
ColumnLayout
{
id
:
innerColumn
id
:
innerColumn
width
:
availableWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
spacing
:
ScreenTools
.
defaultFontPixelHeight
property
int
textEditWidth
:
ScreenTools
.
defaultFontPixelWidth
*
8
property
int
textEditWidth
:
ScreenTools
.
defaultFontPixelWidth
*
8
...
@@ -216,22 +215,12 @@ SetupPage {
...
@@ -216,22 +215,12 @@ SetupPage {
}
// QGCViewDialog
}
// QGCViewDialog
}
// Component - calcAmpsPerVoltDlgComponent
}
// Component - calcAmpsPerVoltDlgComponent
QGCGroupBox
{
QGCLabel
{
id
:
batteryGroup
text
:
qsTr
(
"
Battery
"
)
title
:
qsTr
(
"
Battery
"
)
font.family
:
ScreenTools
.
demiboldFontFamily
}
Rectangle
{
width
:
parent
.
width
height
:
batteryGrid
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
GridLayout
{
GridLayout
{
id
:
batteryGrid
id
:
batteryGrid
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
columns
:
5
columns
:
5
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
columnSpacing
:
ScreenTools
.
defaultFontPixelWidth
...
@@ -356,31 +345,23 @@ SetupPage {
...
@@ -356,31 +345,23 @@ SetupPage {
"
Click the Calculate button for help with calculating a new value.
"
"
Click the Calculate button for help with calculating a new value.
"
}
}
}
// Grid
}
// Grid
}
// Rectangle
- Battery settings
}
// QGCGroupBox
- Battery settings
QGCLabel
{
QGCGroupBox
{
text
:
qsTr
(
"
ESC PWM Minimum and Maximum Calibration
"
)
anchors.left
:
batteryGroup
.
left
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.right
:
batteryGroup
.
right
}
title
:
qsTr
(
"
ESC PWM Minimum and Maximum Calibration
"
)
Rectangle
{
width
:
parent
.
width
height
:
escCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
Column
{
ColumnLayout
{
id
:
escCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
color
:
qgcPal
.
warningText
color
:
qgcPal
.
warningText
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
WARNING: Propellers must be removed from vehicle prior to performing ESC calibration.
"
)
text
:
qsTr
(
"
WARNING: Propellers must be removed from vehicle prior to performing ESC calibration.
"
)
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
...
@@ -401,23 +382,14 @@ SetupPage {
...
@@ -401,23 +382,14 @@ SetupPage {
checked
:
uavcanEnable
.
rawValue
!=
0
checked
:
uavcanEnable
.
rawValue
!=
0
}
}
QGCLabel
{
QGCGroupBox
{
text
:
qsTr
(
"
UAVCAN Bus Configuration
"
)
anchors.left
:
batteryGroup
.
left
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.right
:
batteryGroup
.
right
visible
:
showUAVCAN
.
checked
title
:
qsTr
(
"
UAVCAN Bus Configuration
"
)
}
Rectangle
{
width
:
parent
.
width
height
:
uavCanConfigRow
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
visible
:
showUAVCAN
.
checked
visible
:
showUAVCAN
.
checked
Row
{
Row
{
id
:
uavCanConfigRow
id
:
uavCanConfigRow
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
FactComboBox
{
FactComboBox
{
...
@@ -434,44 +406,34 @@ SetupPage {
...
@@ -434,44 +406,34 @@ SetupPage {
}
}
}
}
QGCLabel
{
QGCGroupBox
{
text
:
qsTr
(
"
UAVCAN Motor Index and Direction Assignment
"
)
anchors.left
:
batteryGroup
.
left
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.right
:
batteryGroup
.
right
visible
:
showUAVCAN
.
checked
title
:
qsTr
(
"
UAVCAN Motor Index and Direction Assignment
"
)
}
Rectangle
{
width
:
parent
.
width
height
:
uavCanEscCalColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
visible
:
showUAVCAN
.
checked
visible
:
showUAVCAN
.
checked
enabled
:
uavcanEnabledCheckBox
.
checked
Column
{
ColumnLayout
{
id
:
uavCanEscCalColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
color
:
qgcPal
.
warningText
color
:
qgcPal
.
warningText
text
:
qsTr
(
"
WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration.
"
)
text
:
qsTr
(
"
WARNING: Propellers must be removed from vehicle prior to performing UAVCAN ESC configuration.
"
)
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
ESC parameters will only be accessible in the editor after assignment.
"
)
text
:
qsTr
(
"
ESC parameters will only be accessible in the editor after assignment.
"
)
Layout.fillWidth
:
true
}
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Start the process, then turn each motor into its turn direction, in the order of their motor indices.
"
)
text
:
qsTr
(
"
Start the process, then turn each motor into its turn direction, in the order of their motor indices.
"
)
Layout.fillWidth
:
true
}
}
QGCButton
{
QGCButton
{
...
@@ -493,25 +455,15 @@ SetupPage {
...
@@ -493,25 +455,15 @@ SetupPage {
text
:
qsTr
(
"
Show Advanced Settings
"
)
text
:
qsTr
(
"
Show Advanced Settings
"
)
}
}
QGCLabel
{
QGCGroupBox
{
text
:
qsTr
(
"
Advanced Power Settings
"
)
anchors.left
:
batteryGroup
.
left
font.family
:
ScreenTools
.
demiboldFontFamily
anchors.right
:
batteryGroup
.
right
visible
:
showAdvanced
.
checked
title
:
qsTr
(
"
Advanced Power Settings
"
)
}
Rectangle
{
id
:
batteryRectangle
width
:
parent
.
width
height
:
advBatteryColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
color
:
qgcPal
.
windowShade
visible
:
showAdvanced
.
checked
visible
:
showAdvanced
.
checked
Column
{
ColumnLayout
{
id
:
advBatteryColumn
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
2
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
spacing
:
ScreenTools
.
defaultFontPixelWidth
spacing
:
ScreenTools
.
defaultFontPixelWidth
Row
{
Row
{
...
@@ -531,11 +483,11 @@ SetupPage {
...
@@ -531,11 +483,11 @@ SetupPage {
}
}
QGCLabel
{
QGCLabel
{
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Batteries show less voltage at high throttle. Enter the difference in Volts between idle throttle and full
"
)
+
text
:
qsTr
(
"
Batteries show less voltage at high throttle. Enter the difference in Volts between idle throttle and full
"
)
+
qsTr
(
"
throttle, divided by the number of battery cells. Leave at the default if unsure.
"
)
+
qsTr
(
"
throttle, divided by the number of battery cells. Leave at the default if unsure.
"
)
+
highlightPrefix
+
qsTr
(
"
If this value is set too high, the battery might be deep discharged and damaged.
"
)
+
highlightSuffix
highlightPrefix
+
qsTr
(
"
If this value is set too high, the battery might be deep discharged and damaged.
"
)
+
highlightSuffix
Layout.fillWidth
:
true
}
}
Row
{
Row
{
...
@@ -549,8 +501,9 @@ SetupPage {
...
@@ -549,8 +501,9 @@ SetupPage {
text
:
((
battNumCells
.
value
*
battLowVolt
.
value
)
-
(
battNumCells
.
value
*
battVoltLoadDrop
.
value
)).
toFixed
(
1
)
+
qsTr
(
"
V
"
)
text
:
((
battNumCells
.
value
*
battLowVolt
.
value
)
-
(
battNumCells
.
value
*
battVoltLoadDrop
.
value
)).
toFixed
(
1
)
+
qsTr
(
"
V
"
)
}
}
}
}
}
}
// Rectangle - Advanced power settings
}
// Column
}
// Column
}
// QGCGroupBox - Advanced power settings
}
// Column
}
// Item
}
// Component
}
// Component
}
// SetupPage
}
// SetupPage
src/QmlControls/QGCGroupBox.qml
0 → 100644
View file @
1048dacc
/****************************************************************************
*
* (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.2
import
QtQuick
.
Controls
2.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
ScreenTools
1.0
GroupBox
{
id
:
control
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
background
:
Rectangle
{
y
:
control
.
topPadding
-
control
.
padding
width
:
parent
.
width
height
:
parent
.
height
-
control
.
topPadding
+
control
.
padding
color
:
qgcPal
.
windowShade
}
label
:
QGCLabel
{
width
:
control
.
availableWidth
text
:
control
.
title
}
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
1048dacc
...
@@ -31,6 +31,7 @@ QGCCheckBox 1.0 QGCCheckBox.qml
...
@@ -31,6 +31,7 @@ QGCCheckBox 1.0 QGCCheckBox.qml
QGCColoredImage 1.0 QGCColoredImage.qml
QGCColoredImage 1.0 QGCColoredImage.qml
QGCComboBox 1.0 QGCComboBox.qml
QGCComboBox 1.0 QGCComboBox.qml
QGCFlickable 1.0 QGCFlickable.qml
QGCFlickable 1.0 QGCFlickable.qml
QGCGroupBox 1.0 QGCGroupBox.qml
QGCLabel 1.0 QGCLabel.qml
QGCLabel 1.0 QGCLabel.qml
QGCListView 1.0 QGCListView.qml
QGCListView 1.0 QGCListView.qml
QGCMapLabel 1.0 QGCMapLabel.qml
QGCMapLabel 1.0 QGCMapLabel.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