Commit 0ca9e0a1 authored by Valentin Platzgummer's avatar Valentin Platzgummer

fly area working

parent ddf64f6f
/**************************************************************************** /****************************************************************************
* *
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> * (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
* *
......
...@@ -20,7 +20,6 @@ public: ...@@ -20,7 +20,6 @@ public:
//Property Accessors //Property Accessors
WimaFlyArea *flyArea (void) { return _flyArea; } WimaFlyArea *flyArea (void) { return _flyArea; }
//QmlObjectListModel* visualItems (void) { return _visualItems; } //QmlObjectListModel* visualItems (void) { return _visualItems; }
QString QMLView
Q_INVOKABLE void start(void); Q_INVOKABLE void start(void);
......
...@@ -25,6 +25,12 @@ void WimaFlyArea::_init() ...@@ -25,6 +25,12 @@ void WimaFlyArea::_init()
void WimaFlyArea::append_WimaFlyArea() void WimaFlyArea::append_WimaFlyArea()
{ {
QGCMapPolygon *newPolygon = new QGCMapPolygon(); QGCMapPolygon *newPolygon = new QGCMapPolygon();
newPolygon->setInteractive(true);
for (int i = 0; i < _polygons->count(); i++) {
QGCMapPolygon* polygon = qobject_cast<QGCMapPolygon*>(_polygons->get(i));
polygon->setInteractive(false);
}
_polygons->append(newPolygon); _polygons->append(newPolygon);
......
...@@ -34,7 +34,8 @@ signals: ...@@ -34,7 +34,8 @@ signals:
public slots: public slots:
private: private:
QmlObjectListModel *_polygons; QmlObjectListModel* _polygons;
QGCMapPolygon* _isCurrentPolygon;
}; };
......
...@@ -69,7 +69,6 @@ Item { ...@@ -69,7 +69,6 @@ Item {
qgcView: _root.qgcView qgcView: _root.qgcView
mapControl: map mapControl: map
mapPolygon: _flyAreaPolygon mapPolygon: _flyAreaPolygon
interactive: true
borderWidth: 1 borderWidth: 1
borderColor: "black" borderColor: "black"
interiorColor: "green" interiorColor: "green"
......
...@@ -112,8 +112,6 @@ QGCView { ...@@ -112,8 +112,6 @@ QGCView {
property bool _firstRallyLoadComplete: false property bool _firstRallyLoadComplete: false
property bool _firstLoadComplete: false property bool _firstLoadComplete: false
MapFitFunctions { MapFitFunctions {
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware! id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: editorMap map: editorMap
...@@ -1201,7 +1199,7 @@ QGCView { ...@@ -1201,7 +1199,7 @@ QGCView {
height: 150 height: 150
radius: 10 radius: 10
border.color: "black" border.color: "black"
border.width: 3 border.width: 2
color: "green" color: "green"
z:100 z:100
...@@ -1213,15 +1211,20 @@ QGCView { ...@@ -1213,15 +1211,20 @@ QGCView {
text: qsTr("Debug Messages") text: qsTr("Debug Messages")
} }
Text { Column {
id: debugText id: debugMessageText
anchors.bottom: parent.bottom Repeater{
x: (parent.width - width)/2 model: _flyArea.polygons
width: parent.width*0.95 delegate: Rectangle{
height: parent.height-debugTextTitle.height color: "lightsteelblue"
text: "Polygon count: " + wimaController.flyArea.polygons.dirty; radius: 5
Text {
text: object.interactive
}
}
}
} }
} }
} // QGCVIew } // QGCVIew
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment