Made precisely editing the node polygons from withing the EditPolygonDialog possible.
Review Request #122938 - Created March 14, 2015 and submitted
In order to do this, i used the already availible widget LatLonEdit and set it as the model's edit wdiget, via a new delegate class.
This allows real-time modification of the nodes with the LatLonEdit's high precision. ( Even though dragging the nodes was possible, it wasn't really precise, and it did not allow exact coordinates input ( keyboard input ).
Works for me.
Looks great! Solve the following issues and you can then start working on implementing this on Polylines as well.
@Torsten what do you think? This was one of the tasks you proposed.
Please move the include directives which are not needed in the header file, in the .cpp file.
Where is it deleted? As you can see here http://qt-project.org/doc/qt-4.8-snapshot/qabstractitemview.html#setItemDelegate, the view does not take ownership of the delegate.
<QItemDelegate> should be #include'ed here. We want to avoid such situations when the inclusion of a header file (this one) depends on previous inclusions (depends on the inclusion of <QItemDelegate> - see the previous issue).
Use Q_UNUSED. Same for the code from below.
fixed Calin's suggested issues