also contains :/cgal/help/about_CGAL.html
- Add include/CGAL/Qt/debug.h and src/CGALQt/debug.cpp, that will contain
debug tools/functions. For the moment, they just define:
void traverse_resources(const QString& name);
that must be used like that:
CGAL::Qt:traverse_resources(":/cgal"); // view CGAL resources
or
CGAL::Qt:traverse_resources(":"); // view all resources
and displays the resources tree on std::cerr.
- add the class CGAL::Qt::DemosMainWindow in libCGALQt4,
- compile moc generated files separately
In demo/
- new sub-directory demo/resources/ that contains, for now,
about_CGAL.html
- move the two triangulation demos from demo/GraphicsView to
demo/Triangulation_2 (to prepare the inclusion in CGAL internal release).
- For each demo, merge all .h and .cpp files. Each demo now has a ui
file, a cpp file and a qrc file (and a html file for the "About demo..."
menu entry).
- rename the demos to Delaunay_triangulation_2(.exe) and
Constrained_Delaunay_triangulation_2(.exe)
- added an icons "insertPoint.png",
- added a new html file for the about dialog of Delaunay triangulation,
- the Voronoi diagram is now painted in blue,
- add the button for Voronoi,
- general cleaning of the code.
QGraphicsView*. It is now able to handle several graphics view at the same
time (just install several event filters).
New class CGAL::Qt::DemosMainWindow. That class has several protected
methods:
void setupStatusBar();
void addNavigation(QGraphicsView*);
void setupOptionsMenu(QMenu* menu = NULL);
void addAboutCGAL(QMenu* menu = NULL);
void addAboutDemo(QString htmlResourceName, QMenu* menu = NULL);
setupStatusBar() adds a label in the statusBar(), that is connected to the
navigation class, and shows the position of the mouse.
addNavigation(QGraphicsView* v) adds a navigation class to the view v.
setupOptionsMenu(QMenu* m = NULL) adds two options "Use OpenGL" and
"Use antialiasing" to the menu m. If m==0, a menu named "Options" is searched
for, or created if it does not exists.
addAboutCGAL(QMenu* m = NULL) adds an entry "About CGAL..." to the menu
m. If m==0, a "Help" menu is searched for or created.
addAboutDemo(QString htmlResourceName, QMenu* m = NULL) adds an entre
"About the demo...", to the menu m. If m==0, a "Help" menu is searched for
or created. If the entry is clicked, a popup dialog shows the content of
the resource/file whose name is in htmlResourceName.
Example:
addAboutDemo(":/cgal/help/about_triangulation.html")
- 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.