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
a304d9cb
Commit
a304d9cb
authored
May 12, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More work on QGCView
parent
886b40b5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
14 deletions
+82
-14
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
AirframeComponent.qml
src/AutoPilotPlugins/PX4/AirframeComponent.qml
+4
-8
QGCView.qml
src/QmlControls/QGCView.qml
+33
-5
QGCViewMessage.qml
src/QmlControls/QGCViewMessage.qml
+41
-0
QGCViewPanel.qml
src/QmlControls/QGCViewPanel.qml
+2
-1
qmldir
src/QmlControls/qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
a304d9cb
...
...
@@ -36,6 +36,7 @@
<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/QGCViewMessage.qml">src/QmlControls/QGCViewMessage.qml</file>
<file alias="QGroundControl/Controls/ParameterEditor.qml">src/QmlControls/ParameterEditor.qml</file>
...
...
src/AutoPilotPlugins/PX4/AirframeComponent.qml
View file @
a304d9cb
...
...
@@ -64,15 +64,11 @@ QGCView {
Component
{
id
:
customConfigDialog
QGC
Label
{
QGC
ViewMessage
{
id
:
customConfigPanel
anchors.fill
:
parent
wrapMode
:
Text
.
WordWrap
text
:
"
Your vehicle is using a custom airframe configuration.
"
+
"
This configuration can only be modified through the Parameter Editor.
\n\n
"
+
"
If you want to Reset your airframe configuration and select a standard configuration, click 'Reset' above.
"
signal
hideDialog
message
:
"
Your vehicle is using a custom airframe configuration.
"
+
"
This configuration can only be modified through the Parameter Editor.
\n\n
"
+
"
If you want to Reset your airframe configuration and select a standard configuration, click 'Reset' above.
"
Fact
{
id
:
sys_autostart
;
name
:
"
SYS_AUTOSTART
"
}
...
...
src/QmlControls/QGCView.qml
View file @
a304d9cb
...
...
@@ -44,11 +44,9 @@ Item {
/// to go.
signal
completed
function
__s
howDialog
(
component
,
title
,
charWidth
,
buttons
)
{
function
__s
etupDialogButtons
(
buttons
)
{
__acceptButton
.
visible
=
false
__rejectButton
.
visible
=
false
__dialogCharWidth
=
charWidth
__dialogTitle
=
title
// Accept role buttons
if
(
buttons
&
StandardButton
.
Ok
)
{
...
...
@@ -106,12 +104,31 @@ Item {
__rejectButton
.
text
=
"
Abort
"
__rejectButton
.
visible
=
true
}
}
function
__showDialog
(
component
,
title
,
charWidth
,
buttons
)
{
__dialogCharWidth
=
charWidth
__dialogTitle
=
title
__setupDialogButtons
(
buttons
)
__dialogComponent
=
component
__viewPanel
.
enabled
=
false
__dialogOverlay
.
visible
=
true
}
function
__showMessage
(
title
,
message
,
buttons
)
{
__dialogCharWidth
=
50
__dialogTitle
=
title
__messageDialogText
=
message
__setupDialogButtons
(
buttons
)
__dialogComponent
=
__messageDialog
__viewPanel
.
enabled
=
false
__dialogOverlay
.
visible
=
true
}
function
__hideDialog
()
{
__dialogComponent
=
null
__viewPanel
.
enabled
=
true
...
...
@@ -130,6 +147,8 @@ Item {
/// The title for the dialog panel
property
string
__dialogTitle
property
string
__messageDialogText
property
Component
__dialogComponent
Component.onCompleted
:
completed
()
...
...
@@ -137,8 +156,9 @@ Item {
Connections
{
target
:
__viewPanel
.
item
onShowDialog
:
__showDialog
(
component
,
title
,
charWidth
,
buttons
)
onHideDialog
:
__hideDialog
()
onShowDialog
:
__showDialog
(
component
,
title
,
charWidth
,
buttons
)
onShowMessage
:
__showMessage
(
title
,
message
,
buttons
)
onHideDialog
:
__hideDialog
()
}
Connections
{
...
...
@@ -230,4 +250,12 @@ Item {
}
}
// Rectangle - Dialog panel
}
// Item - Dialog overlay
Component
{
id
:
__messageDialog
QGCViewMessage
{
message
:
__messageDialogText
}
}
}
\ No newline at end of file
src/QmlControls/QGCViewMessage.qml
0 → 100644
View file @
a304d9cb
/*=====================================================================
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
QGCViewDialog
{
property
string
message
QGCLabel
{
anchors.fill
:
parent
wrapMode
:
Text
.
WordWrap
text
:
message
}
}
src/QmlControls/QGCViewPanel.qml
View file @
a304d9cb
...
...
@@ -31,10 +31,11 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Controls
1.0
Rectangle
{
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
property
QGCPalette
qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
signal
showDialog
(
Component
component
,
string
title
,
int
charWidth
,
int
buttons
)
signal
hideDialog
signal
showMessage
(
string
title
,
string
message
,
int
buttons
)
color
:
qgcPal
.
window
}
src/QmlControls/qmldir
View file @
a304d9cb
...
...
@@ -20,4 +20,5 @@ ViewWidget 1.0 ViewWidget.qml
QGCView 1.0 QGCView.qml
QGCViewPanel 1.0 QGCViewPanel.qml
QGCViewDialog 1.0 QGCViewDialog.qml
QGCViewMessage 1.0 QGCViewMessage.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