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
2bb2421b
Commit
2bb2421b
authored
May 10, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1552 from DonLakeFlyer/QGCView
ViewWithDialog -> QGCView
parents
ccc5f622
4d3dd793
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
401 additions
and
339 deletions
+401
-339
qgroundcontrol.qrc
qgroundcontrol.qrc
+4
-1
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+10
-5
ParameterEditor.qml
src/QmlControls/ParameterEditor.qml
+267
-315
QGCView.qml
src/QmlControls/QGCView.qml
+29
-17
QGCViewDialog.qml
src/QmlControls/QGCViewDialog.qml
+47
-0
QGCViewPanel.qml
src/QmlControls/QGCViewPanel.qml
+40
-0
qmldir
src/QmlControls/qmldir
+4
-1
No files found.
qgroundcontrol.qrc
View file @
2bb2421b
...
@@ -32,7 +32,10 @@
...
@@ -32,7 +32,10 @@
<file alias="QGroundControl/Controls/VehicleSummaryRow.qml">src/QmlControls/VehicleSummaryRow.qml</file>
<file alias="QGroundControl/Controls/VehicleSummaryRow.qml">src/QmlControls/VehicleSummaryRow.qml</file>
<file alias="QGroundControl/Controls/arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="QGroundControl/Controls/arrow-down.png">src/QmlControls/arrow-down.png</file>
<file alias="QGroundControl/Controls/ViewWidget.qml">src/ViewWidgets/ViewWidget.qml</file>
<file alias="QGroundControl/Controls/ViewWidget.qml">src/ViewWidgets/ViewWidget.qml</file>
<file alias="QGroundControl/Controls/ViewWithDialog.qml">src/QmlControls/ViewWithDialog.qml</file>
<file alias="QGroundControl/Controls/QGCView.qml">src/QmlControls/QGCView.qml</file>
<file alias="QGroundControl/Controls/QGCViewPanel.qml">src/QmlControls/QGCViewPanel.qml</file>
<file alias="QGroundControl/Controls/QGCViewDialog.qml">src/QmlControls/QGCViewDialog.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
2bb2421b
...
@@ -32,8 +32,9 @@ import QGroundControl.Palette 1.0
...
@@ -32,8 +32,9 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controllers
1.0
import
QGroundControl
.
Controllers
1.0
ViewWithDialog
{
QGCView
{
viewComponent
:
view
id
:
rootQGCView
viewComponent
:
view
Component
{
Component
{
id
:
view
id
:
view
...
@@ -45,9 +46,13 @@ ViewWithDialog {
...
@@ -45,9 +46,13 @@ ViewWithDialog {
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
hideDialog
signal
hideDialog
function
doWorkAfterComponentCompleted
()
{
Connections
{
if
(
controller
.
showCustomConfigPanel
)
{
target
:
rootQGCView
panel
.
showDialog
(
customConfigDialog
,
"
Custom Airframe Config
"
,
50
,
StandardButton
.
Reset
)
onCompleted
:
{
if
(
controller
.
showCustomConfigPanel
)
{
panel
.
showDialog
(
customConfigDialog
,
"
Custom Airframe Config
"
,
50
,
StandardButton
.
Reset
)
}
}
}
}
}
...
...
src/QmlControls/ParameterEditor.qml
View file @
2bb2421b
This diff is collapsed.
Click to expand it.
src/QmlControls/
ViewWithDialog
.qml
→
src/QmlControls/
QGCView
.qml
View file @
2bb2421b
...
@@ -35,14 +35,22 @@ import QGroundControl.FactSystem 1.0
...
@@ -35,14 +35,22 @@ import QGroundControl.FactSystem 1.0
import
QGroundControl
.
FactControls
1.0
import
QGroundControl
.
FactControls
1.0
Item
{
Item
{
id
:
__rootItem
property
Component
viewComponent
property
Component
viewComponent
/// This is signalled when the top level Item reaches Component.onCompleted. This allows
/// the view subcomponent to connect to this signal and do work once the full ui is ready
/// to go.
signal
completed
function
__showDialog
(
component
,
title
,
charWidth
,
buttons
)
{
function
__showDialog
(
component
,
title
,
charWidth
,
buttons
)
{
__acceptButton
.
visible
=
false
__acceptButton
.
visible
=
false
__rejectButton
.
visible
=
false
__rejectButton
.
visible
=
false
__dialogCharWidth
=
charWidth
__dialogCharWidth
=
charWidth
__dialogTitle
=
title
__dialogTitle
=
title
// Accept role buttons
if
(
buttons
&
StandardButton
.
Ok
)
{
if
(
buttons
&
StandardButton
.
Ok
)
{
__acceptButton
.
text
=
"
Ok
"
__acceptButton
.
text
=
"
Ok
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
...
@@ -52,12 +60,6 @@ Item {
...
@@ -52,12 +60,6 @@ Item {
}
else
if
(
buttons
&
StandardButton
.
Save
)
{
}
else
if
(
buttons
&
StandardButton
.
Save
)
{
__acceptButton
.
text
=
"
Save
"
__acceptButton
.
text
=
"
Save
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Cancel
)
{
__rejectButton
.
text
=
"
Cancel
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Close
)
{
__rejectButton
.
text
=
"
Cancel
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Apply
)
{
}
else
if
(
buttons
&
StandardButton
.
Apply
)
{
__acceptButton
.
text
=
"
Apply
"
__acceptButton
.
text
=
"
Apply
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
...
@@ -73,15 +75,6 @@ Item {
...
@@ -73,15 +75,6 @@ Item {
}
else
if
(
buttons
&
StandardButton
.
YesToAll
)
{
}
else
if
(
buttons
&
StandardButton
.
YesToAll
)
{
__acceptButton
.
text
=
"
Yes to All
"
__acceptButton
.
text
=
"
Yes to All
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
No
)
{
__rejectButton
.
text
=
"
No
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
NoToAll
)
{
__rejectButton
.
text
=
"
No to All
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Abort
)
{
__rejectButton
.
text
=
"
Abort
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Retry
)
{
}
else
if
(
buttons
&
StandardButton
.
Retry
)
{
__acceptButton
.
text
=
"
Retry
"
__acceptButton
.
text
=
"
Retry
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
...
@@ -95,6 +88,25 @@ Item {
...
@@ -95,6 +88,25 @@ Item {
__acceptButton
.
text
=
"
Ignore
"
__acceptButton
.
text
=
"
Ignore
"
__acceptButton
.
visible
=
true
__acceptButton
.
visible
=
true
}
}
// Reject role buttons
if
(
buttons
&
StandardButton
.
Cancel
)
{
__rejectButton
.
text
=
"
Cancel
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Close
)
{
__rejectButton
.
text
=
"
Cancel
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
No
)
{
__rejectButton
.
text
=
"
No
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
NoToAll
)
{
__rejectButton
.
text
=
"
No to All
"
__rejectButton
.
visible
=
true
}
else
if
(
buttons
&
StandardButton
.
Abort
)
{
__rejectButton
.
text
=
"
Abort
"
__rejectButton
.
visible
=
true
}
__dialogComponent
=
component
__dialogComponent
=
component
__viewPanel
.
enabled
=
false
__viewPanel
.
enabled
=
false
__dialogOverlay
.
visible
=
true
__dialogOverlay
.
visible
=
true
...
@@ -120,7 +132,7 @@ Item {
...
@@ -120,7 +132,7 @@ Item {
property
Component
__dialogComponent
property
Component
__dialogComponent
Component.onCompleted
:
__viewPanel
.
item
.
doWorkAfterComponentC
ompleted
()
Component.onCompleted
:
c
ompleted
()
Connections
{
Connections
{
target
:
__viewPanel
.
item
target
:
__viewPanel
.
item
...
@@ -161,7 +173,7 @@ Item {
...
@@ -161,7 +173,7 @@ Item {
// This is the main dialog panel which is anchored to the right edge
// This is the main dialog panel which is anchored to the right edge
Rectangle
{
Rectangle
{
id
:
__dialogPanel
id
:
__dialogPanel
width
:
__textWidth
*
__dialogCharWidth
width
:
__
dialogCharWidth
==
-
1
?
parent
.
width
:
__
textWidth
*
__dialogCharWidth
height
:
parent
.
height
height
:
parent
.
height
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
color
:
__qgcPal
.
windowShadeDark
color
:
__qgcPal
.
windowShadeDark
...
...
src/QmlControls/QGCViewDialog.qml
0 → 100644
View file @
2bb2421b
/*=====================================================================
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/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
import
QtQuick
2.3
import
QtQuick
.
Controls
1.3
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
signal
hideDialog
function
accept
()
{
hideDialog
()
}
function
reject
()
{
hideDialog
()
}
color
:
qgcPal
.
windowShadeDark
}
src/QmlControls/QGCViewPanel.qml
0 → 100644
View file @
2bb2421b
/*=====================================================================
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/>.
======================================================================*/
/// @file
/// @author Don Gagne <don@thegagnes.com>
import
QtQuick
2.3
import
QtQuick
.
Controls
1.3
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
hideDialog
color
:
qgcPal
.
window
}
src/QmlControls/qmldir
View file @
2bb2421b
...
@@ -16,5 +16,8 @@ VehicleRotationCal 1.0 VehicleRotationCal.qml
...
@@ -16,5 +16,8 @@ VehicleRotationCal 1.0 VehicleRotationCal.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml
VehicleSummaryRow 1.0 VehicleSummaryRow.qml
ParameterEditor 1.0 ParameterEditor.qml
ParameterEditor 1.0 ParameterEditor.qml
ViewWidget 1.0 ViewWidget.qml
ViewWidget 1.0 ViewWidget.qml
ViewWithDialog 1.0 ViewWithDialog.qml
QGCView 1.0 QGCView.qml
QGCViewPanel 1.0 QGCViewPanel.qml
QGCViewDialog 1.0 QGCViewDialog.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