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
d1eac7fe
Commit
d1eac7fe
authored
Oct 14, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wima planer and wima controller edited
parent
a0e0f804
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
550 additions
and
581 deletions
+550
-581
qgroundcontrol.pro
qgroundcontrol.pro
+2
-0
qgroundcontrol.qrc
qgroundcontrol.qrc
+5
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+7
-89
FlightDisplayWimaMenu.qml
src/FlightDisplay/FlightDisplayWimaMenu.qml
+39
-3
WimaAreaData.h
src/Wima/Geometry/WimaAreaData.h
+3
-0
WimaCorridorData.cpp
src/Wima/Geometry/WimaCorridorData.cpp
+26
-34
WimaCorridorData.h
src/Wima/Geometry/WimaCorridorData.h
+13
-14
WimaJoinedAreaData.cc
src/Wima/Geometry/WimaJoinedAreaData.cc
+4
-0
WimaJoinedAreaData.h
src/Wima/Geometry/WimaJoinedAreaData.h
+15
-14
WimaMeasurementAreaData.cc
src/Wima/Geometry/WimaMeasurementAreaData.cc
+22
-4
WimaMeasurementAreaData.h
src/Wima/Geometry/WimaMeasurementAreaData.h
+14
-1
WimaServiceAreaData.cc
src/Wima/Geometry/WimaServiceAreaData.cc
+4
-0
WimaServiceAreaData.h
src/Wima/Geometry/WimaServiceAreaData.h
+2
-0
SnakeTile.cpp
src/Wima/Snake/SnakeTile.cpp
+4
-0
SnakeTile.h
src/Wima/Snake/SnakeTile.h
+2
-0
WimaAreaNoVisual.qml
src/Wima/Snake/WimaAreaNoVisual.qml
+12
-0
StateMachine.cpp
src/Wima/StateMachine.cpp
+1
-1
EmptyManager.cpp
src/Wima/WaypointManager/EmptyManager.cpp
+18
-0
EmptyManager.h
src/Wima/WaypointManager/EmptyManager.h
+31
-0
WimaController.cc
src/Wima/WimaController.cc
+18
-312
WimaController.h
src/Wima/WimaController.h
+4
-104
CircularSurveyMapVisual.qml
src/WimaView/CircularSurveyMapVisual.qml
+4
-4
WimaCorridorDataVisual.qml
src/WimaView/WimaCorridorDataVisual.qml
+58
-0
WimaJoinedAreaDataVisual.qml
src/WimaView/WimaJoinedAreaDataVisual.qml
+58
-0
WimaMeasurementAreaDataVisual.qml
src/WimaView/WimaMeasurementAreaDataVisual.qml
+124
-0
WimaServiceAreaDataVisual.qml
src/WimaView/WimaServiceAreaDataVisual.qml
+58
-0
WimaToolBar.qml
src/WimaView/WimaToolBar.qml
+2
-1
No files found.
qgroundcontrol.pro
View file @
d1eac7fe
...
@@ -457,6 +457,7 @@ HEADERS += \
...
@@ -457,6 +457,7 @@ HEADERS += \
src
/
Wima
/
StateMachine
.
h
\
src
/
Wima
/
StateMachine
.
h
\
src
/
Wima
/
WaypointManager
/
AreaInterface
.
h
\
src
/
Wima
/
WaypointManager
/
AreaInterface
.
h
\
src
/
Wima
/
WaypointManager
/
DefaultManager
.
h
\
src
/
Wima
/
WaypointManager
/
DefaultManager
.
h
\
src
/
Wima
/
WaypointManager
/
EmptyManager
.
h
\
src
/
Wima
/
WaypointManager
/
GenericWaypointManager
.
h
\
src
/
Wima
/
WaypointManager
/
GenericWaypointManager
.
h
\
src
/
Wima
/
WaypointManager
/
RTLManager
.
h
\
src
/
Wima
/
WaypointManager
/
RTLManager
.
h
\
src
/
Wima
/
WaypointManager
/
Settings
.
h
\
src
/
Wima
/
WaypointManager
/
Settings
.
h
\
...
@@ -519,6 +520,7 @@ SOURCES += \
...
@@ -519,6 +520,7 @@ SOURCES += \
src
/
Wima
/
StateMachine
.
cpp
\
src
/
Wima
/
StateMachine
.
cpp
\
src
/
Wima
/
WaypointManager
/
AreaInterface
.
cpp
\
src
/
Wima
/
WaypointManager
/
AreaInterface
.
cpp
\
src
/
Wima
/
WaypointManager
/
DefaultManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
DefaultManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
EmptyManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
GenericWaypointManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
GenericWaypointManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
RTLManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
RTLManager
.
cpp
\
src
/
Wima
/
WaypointManager
/
Settings
.
cpp
\
src
/
Wima
/
WaypointManager
/
Settings
.
cpp
\
...
...
qgroundcontrol.qrc
View file @
d1eac7fe
...
@@ -232,6 +232,11 @@
...
@@ -232,6 +232,11 @@
<file alias="QGroundControl/Controls/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file>
<file alias="QGroundControl/Controls/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file>
<file alias="QGroundControl/FlightDisplay/SmallValue.qml">src/FlightDisplay/SmallValue.qml</file>
<file alias="QGroundControl/FlightDisplay/SmallValue.qml">src/FlightDisplay/SmallValue.qml</file>
<file alias="QGroundControl/Controls/ProgressIndicator.qml">src/WimaView/ProgressIndicator.qml</file>
<file alias="QGroundControl/Controls/ProgressIndicator.qml">src/WimaView/ProgressIndicator.qml</file>
<file alias="QGroundControl/Controls/WimaServiceAreaDataVisual.qml">src/WimaView/WimaServiceAreaDataVisual.qml</file>
<file alias="QGroundControl/Controls/WimaCorridorDataVisual.qml">src/WimaView/WimaCorridorDataVisual.qml</file>
<file alias="QGroundControl/Controls/WimaJoinedAreaDataVisual.qml">src/WimaView/WimaJoinedAreaDataVisual.qml</file>
<file alias="QGroundControl/Controls/WimaAreaNoVisual.qml">src/Wima/Snake/WimaAreaNoVisual.qml</file>
<file alias="QGroundControl/Controls/WimaMeasurementAreaDataVisual.qml">src/WimaView/WimaMeasurementAreaDataVisual.qml</file>
</qresource>
</qresource>
<qresource prefix="/json">
<qresource prefix="/json">
<file alias="APMMavlinkStreamRate.SettingsGroup.json">src/Settings/APMMavlinkStreamRate.SettingsGroup.json</file>
<file alias="APMMavlinkStreamRate.SettingsGroup.json">src/Settings/APMMavlinkStreamRate.SettingsGroup.json</file>
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
d1eac7fe
...
@@ -59,8 +59,6 @@ FlightMap {
...
@@ -59,8 +59,6 @@ FlightMap {
property
bool
_keepVehicleCentered
:
_mainIsMap
?
false
:
true
property
bool
_keepVehicleCentered
:
_mainIsMap
?
false
:
true
property
bool
_wimaEnabled
:
wimaController
.
enableWimaController
.
value
property
bool
_wimaEnabled
:
wimaController
.
enableWimaController
.
value
property
bool
_showAllWimaItems
:
wimaController
.
showAllMissionItems
.
value
property
bool
_showCurrentWimaItems
:
wimaController
.
showCurrentMissionItems
.
value
function
updateAirspace
(
reset
)
{
function
updateAirspace
(
reset
)
{
if
(
_airspaceEnabled
)
{
if
(
_airspaceEnabled
)
{
...
@@ -200,109 +198,29 @@ FlightMap {
...
@@ -200,109 +198,29 @@ FlightMap {
}
}
// Add wima Areas to the Map
// Add wima Areas to the Map
MapItemView
{
Repeater
{
property
bool
_enableWima
:
wimaController
.
enableWimaController
.
value
property
bool
_enableWima
:
wimaController
.
enableWimaController
.
value
model
:
_enableWima
?
wimaController
.
visualItems
:
0
model
:
_enableWima
?
wimaController
.
visualItems
:
0
delegate
:
WimaMapVisual
{
delegate
:
MapPolygon
{
map
:
flightMap
path
:
object
.
path
;
qgcView
:
flightMap
.
qgcView
border.color
:
"
black
"
visible
:
true
color
:
object
.
type
===
"
WimaJoinedAreaData
"
?
"
gray
"
:
object
.
type
===
"
WimaServiceAreaData
"
?
"
yellow
"
:
object
.
type
===
"
WimaMeasurementAreaData
"
?
"
green
"
:
"
transparent
"
opacity
:
0.25
z
:
0
}
}
}
}
// Add mission
i
tems generated by wima planer to the map
// Add mission
I
tems generated by wima planer to the map
// all Items
// all Items
WimaPlanMapItems
{
WimaPlanMapItems
{
map
:
flightMap
map
:
flightMap
largeMapView
:
_mainIsMap
largeMapView
:
_mainIsMap
missionItems
:
wimaController
.
missionItems
missionItems
:
wimaController
.
missionItems
path
:
wimaController
.
waypointPath
path
:
wimaController
.
waypointPath
showItems
:
_wimaEnabled
&&
_showAllWimaItems
showItems
:
_wimaEnabled
zOrderWP
:
QGroundControl
.
zOrderWimaAllWaypointIndicators
zOrderWP
:
QGroundControl
.
zOrderWimaAllWaypointIndicators
zOrderLines
:
QGroundControl
.
zOrderWimaAllWaypointLines
zOrderLines
:
QGroundControl
.
zOrderWimaAllWaypointLines
color
:
"
gray
"
}
// current Items
WimaPlanMapItems
{
map
:
flightMap
largeMapView
:
_mainIsMap
missionItems
:
wimaController
.
currentMissionItems
path
:
wimaController
.
currentWaypointPath
showItems
:
_wimaEnabled
&&
_showCurrentWimaItems
zOrderWP
:
QGroundControl
.
zOrderWimaCurrentWaypointIndicators
zOrderLines
:
QGroundControl
.
zOrderWimaCurrentWaypointLines
color
:
"
green
"
color
:
"
green
"
}
}
// // Add Snake tile center points to the map
// MapItemView {
// id:progressView
// property bool _enable: wimaController.enableWimaController.value
// && wimaController.enableSnake.value
// property bool valid: wimaController.snakeTileCenterPoints.length
// === wimaController.nemoProgress.length
// model: _enable ? wimaController.snakeTileCenterPoints : 0
// delegate: ProgressIndicator{
// coordinate: modelData
// currentValue: getProgress()
// z: 1
// function getProgress() {
// var progress = 0
// if (progressView.valid){
// progress = wimaController.nemoProgress[index]
// }
// if (progress < 0)
// progress = 0
// if (progress > 100)
// progress = 100
// return progress
// }
// }
// }
// Add Snake tiles to the map
MapItemView
{
id
:
tileView
property
bool
_enable
:
wimaController
.
enableWimaController
.
value
property
bool
valid
:
wimaController
.
snakeTileCenterPoints
.
length
===
wimaController
.
nemoProgress
.
length
model
:
_enable
?
wimaController
.
snakeTiles
:
0
delegate
:
MapPolygon
{
path
:
object
.
path
;
border.color
:
"
black
"
border.width
:
1
color
:
getColor
()
opacity
:
0.6
z
:
2
function
getColor
()
{
var
progress
=
0
if
(
tileView
.
valid
){
progress
=
wimaController
.
nemoProgress
[
index
]
}
if
(
progress
<
25
)
return
"
transparent
"
if
(
progress
<
50
)
return
"
orange
"
if
(
progress
<
75
)
return
"
yellow
"
if
(
progress
<
100
)
return
"
greenyellow
"
return
"
limegreen
"
}
}
}
// Add trajectory points to the map
// Add trajectory points to the map
MapItemView
{
MapItemView
{
model
:
_mainIsMap
?
_activeVehicle
?
_activeVehicle
.
trajectoryPoints
:
0
:
0
model
:
_mainIsMap
?
_activeVehicle
?
_activeVehicle
.
trajectoryPoints
:
0
:
0
...
...
src/FlightDisplay/FlightDisplayWimaMenu.qml
View file @
d1eac7fe
...
@@ -171,11 +171,11 @@ Item {
...
@@ -171,11 +171,11 @@ Item {
id
:
mainColumn
id
:
mainColumn
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.3
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.3
SectionHeader
{
SectionHeader
{
id
:
vehicleHeader
id
:
vehicleHeader
text
:
qsTr
(
"
Vehicle
"
)
text
:
qsTr
(
"
Vehicle
"
)
}
}
GridLayout
{
GridLayout
{
columns
:
2
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
...
@@ -183,6 +183,17 @@ Item {
...
@@ -183,6 +183,17 @@ Item {
visible
:
vehicleHeader
.
checked
visible
:
vehicleHeader
.
checked
width
:
parent
.
width
width
:
parent
.
width
QGCButton
{
id
:
buttonUpload
text
:
qsTr
(
"
Upload
"
)
onClicked
:
{
if
(
!
planMasterController
.
offline
)
{
wimaController
.
upload
()
}
}
Layout
.
fillWidth
:
true
}
QGCButton
{
QGCButton
{
id
:
buttonRemoveFromVehicle
id
:
buttonRemoveFromVehicle
text
:
qsTr
(
"
Remove
"
)
text
:
qsTr
(
"
Remove
"
)
...
@@ -194,6 +205,7 @@ Item {
...
@@ -194,6 +205,7 @@ Item {
id
:
buttonSmartRTL
id
:
buttonSmartRTL
text
:
qsTr
(
"
Smart RTL
"
)
text
:
qsTr
(
"
Smart RTL
"
)
onClicked
:
wimaController
.
requestSmartRTL
();
onClicked
:
wimaController
.
requestSmartRTL
();
Layout.columnSpan
:
2
Layout.fillWidth
:
true
Layout.fillWidth
:
true
}
}
...
@@ -204,7 +216,32 @@ Item {
...
@@ -204,7 +216,32 @@ Item {
Layout.columnSpan
:
2
Layout.columnSpan
:
2
Layout.fillWidth
:
true
Layout.fillWidth
:
true
}
}
}
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
columnSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
visible
:
vehicleHeader
.
checked
width
:
parent
.
width
QGCLabel
{
text
:
qsTr
(
"
Speed
"
)
Layout.fillWidth
:
true
}
FactTextField
{
fact
:
wimaController
.
flightSpeed
Layout.fillWidth
:
true
}
QGCLabel
{
text
:
qsTr
(
"
Altitude
"
)
Layout.fillWidth
:
true
}
FactTextField
{
fact
:
wimaController
.
altitude
Layout.fillWidth
:
true
}
// progess bar
// progess bar
Rectangle
{
Rectangle
{
...
@@ -223,7 +260,7 @@ Item {
...
@@ -223,7 +260,7 @@ Item {
Layout.columnSpan
:
2
Layout.columnSpan
:
2
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
verticalAlignment
:
Text
.
AlignVCenter
text
:
"
Upload Complet
e
"
text
:
"
Don
e
"
visible
:
false
visible
:
false
Layout.fillWidth
:
true
Layout.fillWidth
:
true
}
}
...
@@ -233,7 +270,6 @@ Item {
...
@@ -233,7 +270,6 @@ Item {
id
:
statsHeader
id
:
statsHeader
text
:
qsTr
(
"
Statistics
"
)
text
:
qsTr
(
"
Statistics
"
)
}
}
GridLayout
{
GridLayout
{
columns
:
3
columns
:
3
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
rowSpacing
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
...
...
src/Wima/Geometry/WimaAreaData.h
View file @
d1eac7fe
...
@@ -13,6 +13,7 @@ class WimaAreaData
...
@@ -13,6 +13,7 @@ class WimaAreaData
public:
public:
Q_PROPERTY
(
const
QVariantList
path
READ
path
NOTIFY
pathChanged
)
Q_PROPERTY
(
const
QVariantList
path
READ
path
NOTIFY
pathChanged
)
Q_PROPERTY
(
QString
type
READ
type
CONSTANT
)
Q_PROPERTY
(
QString
type
READ
type
CONSTANT
)
Q_PROPERTY
(
QString
mapVisualQML
READ
mapVisualQML
CONSTANT
)
WimaAreaData
(
QObject
*
parent
=
nullptr
);
WimaAreaData
(
QObject
*
parent
=
nullptr
);
~
WimaAreaData
();
~
WimaAreaData
();
...
@@ -23,6 +24,8 @@ public:
...
@@ -23,6 +24,8 @@ public:
bool
operator
==
(
const
WimaAreaData
&
data
)
const
;
bool
operator
==
(
const
WimaAreaData
&
data
)
const
;
bool
operator
!=
(
const
WimaAreaData
&
data
)
const
;
bool
operator
!=
(
const
WimaAreaData
&
data
)
const
;
virtual
QString
mapVisualQML
(
void
)
const
=
0
;
QVariantList
path
()
const
;
QVariantList
path
()
const
;
QGeoCoordinate
center
()
const
;
QGeoCoordinate
center
()
const
;
const
QList
<
QGeoCoordinate
>
&
coordinateList
()
const
;
const
QList
<
QGeoCoordinate
>
&
coordinateList
()
const
;
...
...
src/Wima/Geometry/WimaCorridorData.cpp
View file @
d1eac7fe
...
@@ -2,22 +2,17 @@
...
@@ -2,22 +2,17 @@
const
char
*
WimaCorridorData
::
typeString
=
"WimaCorridorData"
;
const
char
*
WimaCorridorData
::
typeString
=
"WimaCorridorData"
;
WimaCorridorData
::
WimaCorridorData
(
QObject
*
parent
)
WimaCorridorData
::
WimaCorridorData
(
QObject
*
parent
)
:
WimaAreaData
(
parent
)
{}
:
WimaAreaData
(
parent
)
{
}
WimaCorridorData
::
WimaCorridorData
(
const
WimaCorridorData
&
other
,
QObject
*
parent
)
WimaCorridorData
::
WimaCorridorData
(
const
WimaCorridorData
&
other
,
QObject
*
parent
)
:
WimaAreaData
(
parent
)
{
:
WimaAreaData
(
parent
)
*
this
=
other
;
{
*
this
=
other
;
}
}
WimaCorridorData
::
WimaCorridorData
(
const
WimaCorridor
&
other
,
QObject
*
parent
)
WimaCorridorData
::
WimaCorridorData
(
const
WimaCorridor
&
other
,
QObject
*
parent
)
:
WimaAreaData
(
parent
)
:
WimaAreaData
(
parent
)
{
{
*
this
=
other
;
*
this
=
other
;
}
}
/*!
/*!
...
@@ -25,11 +20,10 @@ WimaCorridorData::WimaCorridorData(const WimaCorridor &other, QObject *parent)
...
@@ -25,11 +20,10 @@ WimaCorridorData::WimaCorridorData(const WimaCorridor &other, QObject *parent)
*
*
* Assigns \a other to the invoking object.
* Assigns \a other to the invoking object.
*/
*/
WimaCorridorData
&
WimaCorridorData
::
operator
=
(
const
WimaCorridorData
&
other
)
WimaCorridorData
&
WimaCorridorData
::
operator
=
(
const
WimaCorridorData
&
other
)
{
{
this
->
assign
(
other
);
this
->
assign
(
other
);
return
*
this
;
return
*
this
;
}
}
/*!
/*!
...
@@ -37,36 +31,34 @@ WimaCorridorData &WimaCorridorData::operator=(const WimaCorridorData &other)
...
@@ -37,36 +31,34 @@ WimaCorridorData &WimaCorridorData::operator=(const WimaCorridorData &other)
*
*
* Assigns \a other to the invoking object.
* Assigns \a other to the invoking object.
*/
*/
WimaCorridorData
&
WimaCorridorData
::
operator
=
(
const
WimaCorridor
&
other
)
WimaCorridorData
&
WimaCorridorData
::
operator
=
(
const
WimaCorridor
&
other
)
{
{
this
->
assign
(
other
);
this
->
assign
(
other
);
return
*
this
;
return
*
this
;
}
}
QString
WimaCorridorData
::
type
()
const
QString
WimaCorridorData
::
mapVisualQML
()
const
{
{
return
QStringLiteral
(
"WimaAreaDataVisual.qml"
);
return
this
->
typeString
;
}
}
void
WimaCorridorData
::
assign
(
const
WimaCorridorData
&
corridorData
)
QString
WimaCorridorData
::
type
()
const
{
return
this
->
typeString
;
}
{
WimaAreaData
::
assign
(
corridorData
);
}
void
WimaCorridorData
::
assign
(
const
WimaCorridor
&
corridor
)
void
WimaCorridorData
::
assign
(
const
WimaCorridorData
&
corridorData
)
{
{
WimaAreaData
::
assign
(
corridorData
);
WimaAreaData
::
assign
(
corridor
);
}
}
void
WimaCorridorData
::
assign
(
const
WimaCorridor
&
corridor
)
{
WimaAreaData
::
assign
(
corridor
);
}
/*!
/*!
* \class WimaAreaData::WimaCorridorData
* \class WimaAreaData::WimaCorridorData
* \brief Class to store and exchange data of a \c WimaCorridorData Object.
* \brief Class to store and exchange data of a \c WimaCorridorData Object.
* Class to store and exchange data of a \c WimaCorridor Object. In contrast to \c WimaCorridor this class
* Class to store and exchange data of a \c WimaCorridor Object. In contrast to
* does not provied any interface to a grafical user interface, neiter it uses the QGC Fact System.
* \c WimaCorridor this class does not provied any interface to a grafical user
* It is designed to exchange data between the \c WimaPlaner and the \c WimaController class. And it
* interface, neiter it uses the QGC Fact System. It is designed to exchange
* is the derived from WimaAreaData.
* data between the \c WimaPlaner and the \c WimaController class. And it is the
* derived from WimaAreaData.
*
*
* \sa WimaCorridor, WimaAreaData
* \sa WimaCorridor, WimaAreaData
*/
*/
src/Wima/Geometry/WimaCorridorData.h
View file @
d1eac7fe
...
@@ -7,31 +7,30 @@
...
@@ -7,31 +7,30 @@
#include "QGeoCoordinate"
#include "QGeoCoordinate"
class
WimaCorridorData
:
public
WimaAreaData
class
WimaCorridorData
:
public
WimaAreaData
{
{
Q_OBJECT
Q_OBJECT
public:
public:
WimaCorridorData
(
QObject
*
parent
=
nullptr
);
WimaCorridorData
(
QObject
*
parent
=
nullptr
);
WimaCorridorData
(
const
WimaCorridorData
&
other
,
QObject
*
parent
=
nullptr
);
WimaCorridorData
(
const
WimaCorridorData
&
other
,
QObject
*
parent
=
nullptr
);
WimaCorridorData
(
const
WimaCorridor
&
other
,
QObject
*
parent
=
nullptr
);
WimaCorridorData
(
const
WimaCorridor
&
other
,
QObject
*
parent
=
nullptr
);
WimaCorridorData
&
operator
=
(
const
WimaCorridorData
&
other
);
WimaCorridorData
&
operator
=
(
const
WimaCorridorData
&
other
);
WimaCorridorData
&
operator
=
(
const
WimaCorridor
&
other
);
WimaCorridorData
&
operator
=
(
const
WimaCorridor
&
other
);
QString
type
()
const
;
virtual
QString
mapVisualQML
()
const
override
;
WimaCorridorData
*
Clone
()
const
{
return
new
WimaCorridorData
(
*
this
);}
static
const
char
*
typeString
;
QString
type
()
const
;
WimaCorridorData
*
Clone
()
const
{
return
new
WimaCorridorData
(
*
this
);
}
static
const
char
*
typeString
;
signals:
signals:
public
slots
:
public
slots
:
protected:
protected:
void
assign
(
const
WimaCorridorData
&
corridorData
);
void
assign
(
const
WimaCorridorData
&
corridorData
);
void
assign
(
const
WimaCorridor
&
corridor
);
void
assign
(
const
WimaCorridor
&
corridor
);
private:
private:
};
};
src/Wima/Geometry/WimaJoinedAreaData.cc
View file @
d1eac7fe
...
@@ -39,6 +39,10 @@ WimaJoinedAreaData &WimaJoinedAreaData::operator=(const WimaJoinedArea &other) {
...
@@ -39,6 +39,10 @@ WimaJoinedAreaData &WimaJoinedAreaData::operator=(const WimaJoinedArea &other) {
return
*
this
;
return
*
this
;
}
}
QString
WimaJoinedAreaData
::
mapVisualQML
()
const
{
return
QStringLiteral
(
"WimaJoinedAreaDataVisual.qml"
);
}
QString
WimaJoinedAreaData
::
type
()
const
{
return
this
->
typeString
;
}
QString
WimaJoinedAreaData
::
type
()
const
{
return
this
->
typeString
;
}
void
WimaJoinedAreaData
::
assign
(
const
WimaJoinedAreaData
&
other
)
{
void
WimaJoinedAreaData
::
assign
(
const
WimaJoinedAreaData
&
other
)
{
...
...
src/Wima/Geometry/WimaJoinedAreaData.h
View file @
d1eac7fe
...
@@ -7,26 +7,27 @@
...
@@ -7,26 +7,27 @@
#include "QGeoCoordinate"
#include "QGeoCoordinate"
class
WimaJoinedAreaData
:
public
WimaAreaData
class
WimaJoinedAreaData
:
public
WimaAreaData
{
{
Q_OBJECT
Q_OBJECT
public:
public:
WimaJoinedAreaData
(
QObject
*
parent
=
nullptr
);
WimaJoinedAreaData
(
QObject
*
parent
=
nullptr
);
WimaJoinedAreaData
(
const
WimaJoinedAreaData
&
other
,
QObject
*
parent
=
nullptr
);
WimaJoinedAreaData
(
const
WimaJoinedAreaData
&
other
,
WimaJoinedAreaData
(
const
WimaJoinedArea
&
other
,
QObject
*
parent
=
nullptr
);
QObject
*
parent
=
nullptr
);
WimaJoinedAreaData
&
operator
=
(
const
WimaJoinedAreaData
&
other
);
WimaJoinedAreaData
(
const
WimaJoinedArea
&
other
,
QObject
*
parent
=
nullptr
);
WimaJoinedAreaData
&
operator
=
(
const
WimaJoinedArea
&
other
);
WimaJoinedAreaData
&
operator
=
(
const
WimaJoinedAreaData
&
other
);
WimaJoinedAreaData
&
operator
=
(
const
WimaJoinedArea
&
other
);
QString
type
()
const
;
virtual
QString
mapVisualQML
()
const
override
;
WimaJoinedAreaData
*
Clone
()
const
{
return
new
WimaJoinedAreaData
(
*
this
);}
static
const
char
*
typeString
;
QString
type
()
const
;
WimaJoinedAreaData
*
Clone
()
const
{
return
new
WimaJoinedAreaData
(
*
this
);
}
static
const
char
*
typeString
;
protected:
protected:
void
assign
(
const
WimaJoinedAreaData
&
other
);
void
assign
(
const
WimaJoinedAreaData
&
other
);
void
assign
(
const
WimaJoinedArea
&
other
);
void
assign
(
const
WimaJoinedArea
&
other
);
private:
private:
};
};
src/Wima/Geometry/WimaMeasurementAreaData.cc
View file @
d1eac7fe
...
@@ -30,6 +30,20 @@ operator!=(const WimaMeasurementAreaData &other) const {
...
@@ -30,6 +30,20 @@ operator!=(const WimaMeasurementAreaData &other) const {
return
!
(
*
this
==
other
);
return
!
(
*
this
==
other
);
}
}
void
WimaMeasurementAreaData
::
setTileData
(
const
TileData
&
d
)
{
if
(
this
->
_tileData
!=
d
)
{
this
->
_tileData
=
d
;
emit
tileDataChanged
();
}
}
void
WimaMeasurementAreaData
::
setProgress
(
const
QVector
<
int
>
&
d
)
{
if
(
this
->
_progress
!=
d
)
{
this
->
_progress
=
d
;
emit
progressChanged
();
}
}
/*!
/*!
* \overload operator=();
* \overload operator=();
*
*
...
@@ -54,6 +68,10 @@ operator=(const WimaMeasurementArea &other) {
...
@@ -54,6 +68,10 @@ operator=(const WimaMeasurementArea &other) {
return
*
this
;
return
*
this
;
}
}
QString
WimaMeasurementAreaData
::
mapVisualQML
()
const
{
return
QStringLiteral
(
"WimaMeasurementAreaDataVisual.qml"
);
}
QString
WimaMeasurementAreaData
::
type
()
const
{
return
this
->
typeString
;
}
QString
WimaMeasurementAreaData
::
type
()
const
{
return
this
->
typeString
;
}
QmlObjectListModel
*
WimaMeasurementAreaData
::
tiles
()
{
QmlObjectListModel
*
WimaMeasurementAreaData
::
tiles
()
{
...
@@ -86,15 +104,15 @@ QVector<int> &WimaMeasurementAreaData::progress() { return this->_progress; }
...
@@ -86,15 +104,15 @@ QVector<int> &WimaMeasurementAreaData::progress() { return this->_progress; }
void
WimaMeasurementAreaData
::
assign
(
const
WimaMeasurementAreaData
&
other
)
{
void
WimaMeasurementAreaData
::
assign
(
const
WimaMeasurementAreaData
&
other
)
{
WimaAreaData
::
assign
(
other
);
WimaAreaData
::
assign
(
other
);
this
->
_tileData
=
other
.
_tileData
;
setTileData
(
other
.
_tileData
)
;
this
->
_progress
=
other
.
_progress
;
setProgress
(
other
.
_progress
)
;
}
}
void
WimaMeasurementAreaData
::
assign
(
const
WimaMeasurementArea
&
other
)
{
void
WimaMeasurementAreaData
::
assign
(
const
WimaMeasurementArea
&
other
)
{
WimaAreaData
::
assign
(
other
);
WimaAreaData
::
assign
(
other
);
if
(
other
.
ready
())
{
if
(
other
.
ready
())
{
this
->
_tileData
=
other
.
tileData
(
);
setTileData
(
other
.
tileData
()
);
this
->
_progress
=
other
.
progress
(
);
setProgress
(
other
.
progress
()
);
}
else
{
}
else
{
qWarning
()
qWarning
()
<<
"WimaMeasurementAreaData::assign(): WimaMeasurementArea not ready."
;
<<
"WimaMeasurementAreaData::assign(): WimaMeasurementArea not ready."
;
...
...
src/Wima/Geometry/WimaMeasurementAreaData.h
View file @
d1eac7fe
...
@@ -18,14 +18,23 @@ public:
...
@@ -18,14 +18,23 @@ public:
WimaMeasurementAreaData
&
operator
=
(
const
WimaMeasurementAreaData
&
other
);
WimaMeasurementAreaData
&
operator
=
(
const
WimaMeasurementAreaData
&
other
);
WimaMeasurementAreaData
&
operator
=
(
const
WimaMeasurementArea
&
other
);
WimaMeasurementAreaData
&
operator
=
(
const
WimaMeasurementArea
&
other
);
Q_PROPERTY
(
QmlObjectListModel
*
tiles
READ
tiles
NOTIFY
tileDataChanged
)
Q_PROPERTY
(
QVector
<
int
>
progress
READ
progress
NOTIFY
progressChanged
)
virtual
QString
mapVisualQML
()
const
override
;
bool
operator
==
(
const
WimaMeasurementAreaData
&
other
)
const
;
bool
operator
==
(
const
WimaMeasurementAreaData
&
other
)
const
;
bool
operator
!=
(
const
WimaMeasurementAreaData
&
other
)
const
;
bool
operator
!=
(
const
WimaMeasurementAreaData
&
other
)
const
;
// Property setters.
void
setTileData
(
const
TileData
&
d
);
void
setProgress
(
const
QVector
<
int
>
&
d
);
// Property getters.
QString
type
()
const
;
QString
type
()
const
;
WimaMeasurementAreaData
*
Clone
()
const
{
WimaMeasurementAreaData
*
Clone
()
const
{
return
new
WimaMeasurementAreaData
(
*
this
);
return
new
WimaMeasurementAreaData
(
*
this
);
}
}
QmlObjectListModel
*
tiles
();
QmlObjectListModel
*
tiles
();
const
QmlObjectListModel
*
tiles
()
const
;
const
QmlObjectListModel
*
tiles
()
const
;
const
QVariantList
&
tileCenterPoints
()
const
;
const
QVariantList
&
tileCenterPoints
()
const
;
...
@@ -37,6 +46,10 @@ public:
...
@@ -37,6 +46,10 @@ public:
static
const
char
*
typeString
;
static
const
char
*
typeString
;
signals:
void
tileDataChanged
();
void
progressChanged
();
protected:
protected:
void
assign
(
const
WimaMeasurementAreaData
&
other
);
void
assign
(
const
WimaMeasurementAreaData
&
other
);
void
assign
(
const
WimaMeasurementArea
&
other
);
void
assign
(
const
WimaMeasurementArea
&
other
);
...
...
src/Wima/Geometry/WimaServiceAreaData.cc
View file @
d1eac7fe
...
@@ -31,6 +31,10 @@ operator=(const WimaServiceArea &otherArea) {
...
@@ -31,6 +31,10 @@ operator=(const WimaServiceArea &otherArea) {
return
*
this
;
return
*
this
;
}
}
QString
WimaServiceAreaData
::
mapVisualQML
()
const
{
return
QStringLiteral
(
"WimaServiceAreaDataVisual.qml"
);
}
/*!
/*!
* \fn const QGeoCoordinate &WimaServiceAreaData::takeOffPosition() const