simplification

This commit is contained in:
Laurent Rineau 2024-07-29 00:18:13 +02:00
parent c61e61e910
commit 20e2fa76ad
7 changed files with 16 additions and 29 deletions

View File

@ -28,7 +28,7 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) {
QSurfaceFormat::setDefaultFormat(fmt);
//for windows
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) /// @TODO remove all calls to QT_VERSION_CHECK about Qt5
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
#endif

View File

@ -11,8 +11,8 @@
int main(int argc, char **argv)
{
CGAL_Lab app(argc, argv,
"CGAL Lab (3D Constrained Delaunay Triangulations)",
"Polyhedron_3 demo",
QStringList() << "Viewer" << "CDT_3");
"CGAL Lab (3D Constrained Delaunay Triangulations)",
"Polyhedron_3 demo",
QStringList() << "Viewer" << "CDT_3");
return app.try_exec();
}

View File

@ -6,8 +6,6 @@
*/
int main(int argc, char **argv)
{
CGAL_Lab app(argc, argv,
"Polyhedron_3 demo",
"CGAL Lab");
CGAL_Lab app(argc, argv);
return app.try_exec();
}

View File

@ -38,7 +38,7 @@ public:
/*! Call `QApplication::exec()` unless the main window is already closed
*/
int try_exec();
int try_exec(); /// @TODO Rename to `exec_if_main_window_not_closed()`
}; // end class CGAL_Lab
#endif // LAB_DEMO_H

View File

@ -11,8 +11,8 @@
int main(int argc, char **argv)
{
CGAL_Lab app(argc, argv,
"Classification demo",
"CGAL Classification Demo",
QStringList() << "Classification");
"Classification demo",
"CGAL Classification Demo",
QStringList() << "Classification");
return app.try_exec();
}

View File

@ -11,8 +11,8 @@
int main(int argc, char **argv)
{
CGAL_Lab app(argc, argv,
"Mesh_3 demo",
"CGAL Mesh_3 Demo",
QStringList() << "Mesh_3");
"CGAL Mesh_3 Demo",
"CGAL Lab (Mesh_3)",
QStringList() << "Mesh_3");
return app.try_exec();
}

View File

@ -10,20 +10,9 @@
*/
int main(int argc, char **argv)
{
QSurfaceFormat fmt;
fmt.setVersion(4, 3);
fmt.setRenderableType(QSurfaceFormat::OpenGL);
fmt.setProfile(QSurfaceFormat::CoreProfile);
fmt.setOption(QSurfaceFormat::DebugContext);
QSurfaceFormat::setDefaultFormat(fmt);
QStringList keywords;
keywords << "PMP";
CGAL_Lab app(argc, argv,
"PMP demo",
"CGAL Polygon Mesh Processing Demo",
keywords);
//We set the locale to avoid any trouble with VTK
std::setlocale(LC_ALL, "C");
CGAL_Lab app(argc, argv,
"PMP demo",
"CGAL Polygon Mesh Processing Demo",
QStringList() << "PMP");
return app.try_exec();
}