- Add dgi and vgi at the beginning, and use show()/hide() instead of
addItem/removeItem.
- Merge connectActions() into MainWindow's constructor. That is clearer
like that.
- Add comments in the constructor.
- Rewrite the two action handlers aboutCGAL and aboutDemo: use html file
in a resource. That works! The "About CGAL" dialog now has a big shiny
CGAL logo! :-)
- Use fh as an hint, to avoid to localize the moving point without hint
each time it moves.
- Code factorisation between mousePressEvent and mouseMoveEvent.
QtPolylineInput.*
The need to split QtPolylineInput into a templated class and a
non-template base class exists, but there is not need to split the header
into two headers. QtPolylineInput_non_templated_base can be seen as an
auxiliary class of QtPolylineInput.
- Turn Point_2<K> into K::Point_2 in <CGAL/IO/QtConverter.h>, to avoid the
inclusion of <CGAL/Point_2.h>.
- Put most Qt Resource files into the CGALQt4 library, instead of linking
them into the demo.
- "Qt" as prefix, instead of a simple "Q",
- no "_2" suffix.
(Next commit will be the move of some .cpp files to src/CGALQt4/ and the
creation of a new CGAL library.)
- QTriangulationVerticesGraphicsItem_2 is merged into
QTriangulationGraphicsItem_2.
- Better event filtering in QNavigation.
- Remove QDatastructure. MainWindow is now responsible for inserting
objects (points, polylines) into the triangulation.
- In MainWindow.h: include less headers. Use forward declarations when
possible.
- In MainWindow.cpp and MainWindow.ui:
- add a "Recenter" action, that allows to center and scale the
viewport on the triangulation,
- add shortcuts and mnemonic to actions.
- Allow the use of the OpenGL QPaintEngine, instead of the traditional one.
- CGAL::QPolylineInput_2_non_templated_base contains all the non
templated code,
- CGAL::QPolylineInput_2<K> contains the four lines of code that need the
template parameter.
Most of the old file QPolylineInput_2.h is not in a separate compilation
unit compilationQPolylineInput_2_non_templated_base.cpp.
That speeds up the recompilation of that class!
Never create a QObject as a member: create it on the heap, instead.
The reason is that a Qt objects are destroyed when their parent is
destroyed. If class has a QObject member, then the destructor will try a
double-free (which triggers a segfault).