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
58f497f3
Commit
58f497f3
authored
Feb 18, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed initialization order of map widget
parent
0268fb5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
29 deletions
+21
-29
MapWidget.cc
src/ui/MapWidget.cc
+21
-29
No files found.
src/ui/MapWidget.cc
View file @
58f497f3
...
...
@@ -28,13 +28,13 @@
MapWidget
::
MapWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
),
mc
(
NULL
),
zoomLevel
(
0
),
uasIcons
(),
uasTrails
(),
mav
(
NULL
),
lastUpdate
(
0
),
initialized
(
false
),
mc
(
NULL
),
m_ui
(
new
Ui
::
MapWidget
)
{
m_ui
->
setupUi
(
this
);
...
...
@@ -48,14 +48,6 @@ void MapWidget::init()
QString
buttonStyle
(
"QAbstractButton { background-color: rgba(20, 20, 20, 45%); border-color: rgba(10, 10, 10, 50%)} QAbstractButton:checked { border: 2px solid #379AC3; }"
);
mc
->
setPen
(
QGC
::
colorCyan
.
darker
(
400
));
waypointIsDrag
=
false
;
// Accept focus by clicking or keyboard
...
...
@@ -220,6 +212,26 @@ void MapWidget::init()
innerlayout
->
setRowStretch
(
1
,
100
);
mc
->
setLayout
(
innerlayout
);
// Configure the WP Path's pen
pointPen
=
new
QPen
(
QColor
(
0
,
255
,
0
));
pointPen
->
setWidth
(
3
);
waypointPath
=
new
qmapcontrol
::
LineString
(
wps
,
"Waypoint path"
,
pointPen
);
mc
->
layer
(
"Waypoints"
)
->
addGeometry
(
waypointPath
);
//Camera Control
// CAMERA INDICATOR LAYER
// create a layer with the mapadapter and type GeometryLayer (for camera indicator)
camLayer
=
new
qmapcontrol
::
GeometryLayer
(
"Camera"
,
mapadapter
);
mc
->
addLayer
(
camLayer
);
//camLine = new qmapcontrol::LineString(camPoints,"Camera Eje", camBorderPen);
drawCamBorder
=
false
;
radioCamera
=
10
;
// Done set state
initialized
=
true
;
// Connect the required signals-slots
connect
(
zoomin
,
SIGNAL
(
clicked
(
bool
)),
...
...
@@ -257,26 +269,6 @@ void MapWidget::init()
connect
(
geomLayer
,
SIGNAL
(
geometryEndDrag
(
Geometry
*
,
QPointF
)),
this
,
SLOT
(
captureGeometryEndDrag
(
Geometry
*
,
QPointF
)));
// Configure the WP Path's pen
pointPen
=
new
QPen
(
QColor
(
0
,
255
,
0
));
pointPen
->
setWidth
(
3
);
waypointPath
=
new
qmapcontrol
::
LineString
(
wps
,
"Waypoint path"
,
pointPen
);
mc
->
layer
(
"Waypoints"
)
->
addGeometry
(
waypointPath
);
//Camera Control
// CAMERA INDICATOR LAYER
// create a layer with the mapadapter and type GeometryLayer (for camera indicator)
camLayer
=
new
qmapcontrol
::
GeometryLayer
(
"Camera"
,
mapadapter
);
mc
->
addLayer
(
camLayer
);
//camLine = new qmapcontrol::LineString(camPoints,"Camera Eje", camBorderPen);
drawCamBorder
=
false
;
radioCamera
=
10
;
// Done set state
initialized
=
true
;
}
void
MapWidget
::
goTo
()
...
...
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