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
d3ccd004
Commit
d3ccd004
authored
Jul 31, 2013
by
Bill Bonney
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated layout of APM Toolbar Status Display for ARM/DISARM
parent
b57635c0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
64 additions
and
23 deletions
+64
-23
qgroundcontrol.pro
qgroundcontrol.pro
+2
-1
ApmToolBar.qml
qml/ApmToolBar.qml
+19
-17
DigitalDisplay.qml
qml/components/DigitalDisplay.qml
+1
-1
StatusDisplay.qml
qml/components/StatusDisplay.qml
+24
-0
apmtoolbar.cpp
src/ui/apmtoolbar.cpp
+14
-2
apmtoolbar.h
src/ui/apmtoolbar.h
+4
-2
No files found.
qgroundcontrol.pro
View file @
d3ccd004
...
...
@@ -801,7 +801,8 @@ unix:!macx:!symbian: LIBS += -losg
OTHER_FILES
+=
\
dongfang_notes
.
txt
\
src
/
ui
/
dongfang
-
scrapyard
.
txt
\
qml
/
components
/
DigitalDisplay
.
qml
qml
/
components
/
DigitalDisplay
.
qml
\
qml
/
components
/
StatusDisplay
.
qml
OTHER_FILES
+=
\
qml
/
ApmToolBar
.
qml
\
...
...
qml/ApmToolBar.qml
View file @
d3ccd004
...
...
@@ -10,7 +10,7 @@ Rectangle {
property
alias
baudrateLabel
:
baudrate
.
label
property
bool
connected
:
false
property
bool
armed
:
false
property
string
armedstr
:
"
D
isarmed
"
property
string
armedstr
:
"
D
ISARMED
"
width
:
toolbar
.
width
height
:
72
...
...
@@ -19,12 +19,14 @@ Rectangle {
onArmedChanged
:
{
if
(
armed
)
{
armedText
.
text
=
"
Armed
"
armedText
.
color
=
"
Red
"
statusDisplay
.
statusText
=
"
ARMED
"
statusDisplay
.
statusTextColor
=
"
red
"
statusDisplay
.
statusBackgroundColor
=
"
#FF880000
"
}
else
{
armedText
.
text
=
"
Disarmed
"
armedText
.
color
=
"
Green
"
statusDisplay
.
statusText
=
"
DISARMED
"
statusDisplay
.
statusTextColor
=
"
yellow
"
statusDisplay
.
statusBackgroundColor
=
"
black
"
}
}
...
...
@@ -110,19 +112,19 @@ Rectangle {
image
:
"
./resources/apmplanner/toolbar/terminal.png
"
onClicked
:
globalObj
.
triggerTerminalView
()
}
Rectangle
{
width
:
150
Rectangle
{
// Spacer
width
:
5
height
:
parent
.
height
Text
{
id
:
armedText
;
anchors.fill
:
parent
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
font.pixelSize
:
20
color
:
"
green
"
text
:
"
Disarmed
"
}
color
:
"
black
"
color
:
"
black
"
}
StatusDisplay
{
id
:
statusDisplay
width
:
110
statusText
:
"
DISARMED
"
statusTextColor
:
"
yellow
"
statusBackgroundColor
:
"
black
"
}
Rectangle
{
// Spacer
...
...
qml/components/DigitalDisplay.qml
View file @
d3ccd004
...
...
@@ -5,7 +5,7 @@ Rectangle {
property
alias
title
:
displayTitle
.
text
property
string
textValue
:
"
none
"
width
:
1
0
0
width
:
1
1
0
height
:
parent
.
height
/
3
anchors.verticalCenter
:
parent
.
verticalCenter
border.color
:
"
white
"
...
...
qml/components/StatusDisplay.qml
0 → 100644
View file @
d3ccd004
import
QtQuick
1.1
Rectangle
{
id
:
statusDisplay
property
alias
statusText
:
armedText
.
text
property
alias
statusTextColor
:
armedText
.
color
property
alias
statusBackgroundColor
:
statusDisplay
.
color
width
:
100
height
:
parent
.
height
/
3
anchors.verticalCenter
:
parent
.
verticalCenter
radius
:
3
border.color
:
"
white
"
border.width
:
1
Text
{
id
:
armedText
anchors.centerIn
:
parent
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
font.pixelSize
:
20
}
}
src/ui/apmtoolbar.cpp
View file @
d3ccd004
...
...
@@ -33,15 +33,27 @@ void APMToolBar::activeUasSet(UASInterface *uas)
}
if
(
m_uas
)
{
disconnect
(
m_uas
,
SIGNAL
(
armingChanged
(
bool
)),
this
,
SLOT
(
armingChanged
(
bool
)));
disconnect
(
m_uas
,
SIGNAL
(
armingChanged
(
bool
)),
this
,
SLOT
(
armingChanged
(
bool
)));
disconnect
(
uas
,
SIGNAL
(
armingChanged
(
int
,
QString
)),
this
,
SLOT
(
armingChanged
(
int
,
QString
)));
}
connect
(
uas
,
SIGNAL
(
armingChanged
(
bool
)),
this
,
SLOT
(
armingChanged
(
bool
)));
connect
(
uas
,
SIGNAL
(
armingChanged
(
bool
)),
this
,
SLOT
(
armingChanged
(
bool
)));
connect
(
uas
,
SIGNAL
(
armingChanged
(
int
,
QString
)),
this
,
SLOT
(
armingChanged
(
int
,
QString
)));
}
void
APMToolBar
::
armingChanged
(
bool
armed
)
{
this
->
rootObject
()
->
setProperty
(
"armed"
,
armed
);
}
void
APMToolBar
::
armingChanged
(
int
sysId
,
QString
armingState
)
{
qDebug
()
<<
"APMToolBar: sysid "
<<
sysId
<<
" armState"
<<
armingState
;
}
void
APMToolBar
::
setFlightViewAction
(
QAction
*
action
)
{
connect
(
this
,
SIGNAL
(
triggerFlightView
()),
action
,
SIGNAL
(
triggered
()));
...
...
src/ui/apmtoolbar.h
View file @
d3ccd004
...
...
@@ -33,8 +33,6 @@ signals:
void
MAVConnected
(
bool
connected
);
public
slots
:
void
armingChanged
(
bool
armed
);
void
activeUasSet
(
UASInterface
*
uas
);
void
selectFlightView
();
void
selectFlightPlanView
();
void
selectHardwareView
();
...
...
@@ -46,6 +44,10 @@ public slots:
void
showConnectionDialog
();
void
setConnection
(
bool
connection
);
void
activeUasSet
(
UASInterface
*
uas
);
void
armingChanged
(
int
sysId
,
QString
armingState
);
void
armingChanged
(
bool
armed
);
void
updateLinkDisplay
(
LinkInterface
*
newLink
);
private:
...
...
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