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
2d00726c
Commit
2d00726c
authored
Mar 16, 2016
by
Nate Weibley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for customizing the abbreviated representation of mission items for #3000
parent
bee5eb8e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
3 deletions
+26
-3
MissionItemIndicator.qml
src/FlightMap/MapItems/MissionItemIndicator.qml
+1
-1
MissionItemStatus.qml
src/MissionEditor/MissionItemStatus.qml
+1
-1
ComplexMissionItem.h
src/MissionManager/ComplexMissionItem.h
+1
-0
ComplexMissionItemTest.cc
src/MissionManager/ComplexMissionItemTest.cc
+1
-0
ComplexMissionItemTest.h
src/MissionManager/ComplexMissionItemTest.h
+1
-0
SimpleMissionItem.cc
src/MissionManager/SimpleMissionItem.cc
+16
-0
SimpleMissionItem.h
src/MissionManager/SimpleMissionItem.h
+1
-0
VisualMissionItem.h
src/MissionManager/VisualMissionItem.h
+3
-0
MissionItemEditor.qml
src/QmlControls/MissionItemEditor.qml
+1
-1
No files found.
src/FlightMap/MapItems/MissionItemIndicator.qml
View file @
2d00726c
...
...
@@ -44,7 +44,7 @@ MapQuickItem {
MissionItemIndexLabel
{
id
:
_label
isCurrentItem
:
_isCurrentItem
label
:
sequenceNumber
==
0
?
"
H
"
:
sequenceNumber
label
:
missionItem
.
abbreviation
onClicked
:
_item
.
clicked
()
property
bool
_isCurrentItem
:
missionItem
?
missionItem
.
isCurrentItem
:
false
...
...
src/MissionEditor/MissionItemStatus.qml
View file @
2d00726c
...
...
@@ -127,7 +127,7 @@ Rectangle {
y
:
availableHeight
-
(
availableHeight
*
object
.
altPercent
)
small
:
true
isCurrentItem
:
object
.
isCurrentItem
label
:
object
.
homePosition
?
"
H
"
:
object
.
sequenceNumber
label
:
object
.
abbreviation
visible
:
object
.
relativeAltitude
?
true
:
(
object
.
homePosition
||
graphAbsolute
)
}
...
...
src/MissionManager/ComplexMissionItem.h
View file @
2d00726c
...
...
@@ -80,6 +80,7 @@ public:
bool
specifiesCoordinate
(
void
)
const
final
;
QString
commandDescription
(
void
)
const
final
{
return
"Survey"
;
}
QString
commandName
(
void
)
const
final
{
return
"Survey"
;
}
QString
abbreviation
(
void
)
const
final
{
return
"S"
;
}
QGeoCoordinate
coordinate
(
void
)
const
final
{
return
_coordinate
;
}
QGeoCoordinate
exitCoordinate
(
void
)
const
final
{
return
_exitCoordinate
;
}
int
sequenceNumber
(
void
)
const
final
{
return
_sequenceNumber
;
}
...
...
src/MissionManager/ComplexMissionItemTest.cc
View file @
2d00726c
...
...
@@ -43,6 +43,7 @@ void ComplexMissionItemTest::init(void)
_rgComplexMissionItemSignals
[
azimuthChangedIndex
]
=
SIGNAL
(
azimuthChanged
(
double
));
_rgComplexMissionItemSignals
[
commandDescriptionChangedIndex
]
=
SIGNAL
(
commandDescriptionChanged
());
_rgComplexMissionItemSignals
[
commandNameChangedIndex
]
=
SIGNAL
(
commandNameChanged
());
_rgComplexMissionItemSignals
[
abbreviationChangedIndex
]
=
SIGNAL
(
abbreviationChanged
());
_rgComplexMissionItemSignals
[
coordinateChangedIndex
]
=
SIGNAL
(
coordinateChanged
(
const
QGeoCoordinate
&
));
_rgComplexMissionItemSignals
[
exitCoordinateChangedIndex
]
=
SIGNAL
(
exitCoordinateChanged
(
const
QGeoCoordinate
&
));
_rgComplexMissionItemSignals
[
dirtyChangedIndex
]
=
SIGNAL
(
dirtyChanged
(
bool
));
...
...
src/MissionManager/ComplexMissionItemTest.h
View file @
2d00726c
...
...
@@ -62,6 +62,7 @@ private:
azimuthChangedIndex
,
commandDescriptionChangedIndex
,
commandNameChangedIndex
,
abbreviationChangedIndex
,
coordinateChangedIndex
,
exitCoordinateChangedIndex
,
dirtyChangedIndex
,
...
...
src/MissionManager/SimpleMissionItem.cc
View file @
2d00726c
...
...
@@ -180,6 +180,7 @@ void SimpleMissionItem::_connectSignals(void)
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
setDefaultsForCommand
);
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
commandNameChanged
);
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
commandDescriptionChanged
);
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
abbreviationChanged
);
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
specifiesCoordinateChanged
);
connect
(
&
_missionItem
.
_commandFact
,
&
Fact
::
valueChanged
,
this
,
&
SimpleMissionItem
::
isStandaloneCoordinateChanged
);
...
...
@@ -303,6 +304,21 @@ QString SimpleMissionItem::commandName(void) const
}
}
QString
SimpleMissionItem
::
abbreviation
()
const
{
if
(
homePosition
())
return
QStringLiteral
(
"H"
);
switch
(
command
())
{
default:
return
QString
::
number
(
sequenceNumber
());
case
MavlinkQmlSingleton
:
:
MAV_CMD_NAV_TAKEOFF
:
return
QStringLiteral
(
"T"
);
case
MavlinkQmlSingleton
:
:
MAV_CMD_NAV_LAND
:
return
QStringLiteral
(
"L"
);
}
}
void
SimpleMissionItem
::
_clearParamMetaData
(
void
)
{
_param1MetaData
.
setRawUnits
(
""
);
...
...
src/MissionManager/SimpleMissionItem.h
View file @
2d00726c
...
...
@@ -99,6 +99,7 @@ public:
bool
specifiesCoordinate
(
void
)
const
final
;
QString
commandDescription
(
void
)
const
final
;
QString
commandName
(
void
)
const
final
;
QString
abbreviation
(
void
)
const
final
;
QGeoCoordinate
coordinate
(
void
)
const
final
{
return
_missionItem
.
coordinate
();
}
QGeoCoordinate
exitCoordinate
(
void
)
const
final
{
return
coordinate
();
}
int
sequenceNumber
(
void
)
const
final
{
return
_missionItem
.
sequenceNumber
();
}
...
...
src/MissionManager/VisualMissionItem.h
View file @
2d00726c
...
...
@@ -81,6 +81,7 @@ public:
Q_PROPERTY
(
QString
commandDescription
READ
commandDescription
NOTIFY
commandDescriptionChanged
)
Q_PROPERTY
(
QString
commandName
READ
commandName
NOTIFY
commandNameChanged
)
Q_PROPERTY
(
QString
abbreviation
READ
abbreviation
NOTIFY
abbreviationChanged
)
Q_PROPERTY
(
bool
dirty
READ
dirty
WRITE
setDirty
NOTIFY
dirtyChanged
)
///< Item is dirty and requires save/send
Q_PROPERTY
(
bool
isCurrentItem
READ
isCurrentItem
WRITE
setIsCurrentItem
NOTIFY
isCurrentItemChanged
)
Q_PROPERTY
(
int
sequenceNumber
READ
sequenceNumber
WRITE
setSequenceNumber
NOTIFY
sequenceNumberChanged
)
...
...
@@ -118,6 +119,7 @@ public:
virtual
bool
specifiesCoordinate
(
void
)
const
=
0
;
virtual
QString
commandDescription
(
void
)
const
=
0
;
virtual
QString
commandName
(
void
)
const
=
0
;
virtual
QString
abbreviation
(
void
)
const
=
0
;
virtual
QGeoCoordinate
coordinate
(
void
)
const
=
0
;
virtual
QGeoCoordinate
exitCoordinate
(
void
)
const
=
0
;
virtual
int
sequenceNumber
(
void
)
const
=
0
;
...
...
@@ -140,6 +142,7 @@ signals:
void
azimuthChanged
(
double
azimuth
);
void
commandDescriptionChanged
(
void
);
void
commandNameChanged
(
void
);
void
abbreviationChanged
(
void
);
void
coordinateChanged
(
const
QGeoCoordinate
&
coordinate
);
void
exitCoordinateChanged
(
const
QGeoCoordinate
&
exitCoordinate
);
void
dirtyChanged
(
bool
dirty
);
...
...
src/QmlControls/MissionItemEditor.qml
View file @
2d00726c
...
...
@@ -51,7 +51,7 @@ Rectangle {
anchors.verticalCenter
:
commandPicker
.
verticalCenter
anchors.leftMargin
:
_margin
anchors.left
:
parent
.
left
text
:
missionItem
.
sequenceNumber
==
0
?
"
H
"
:
missionItem
.
sequenceNumber
text
:
missionItem
.
abbreviation
color
:
_outerTextColor
}
...
...
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