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); QSurfaceFormat::setDefaultFormat(fmt);
//for windows //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); QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
#endif #endif

View File

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

View File

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

View File

@ -38,7 +38,7 @@ public:
/*! Call `QApplication::exec()` unless the main window is already closed /*! 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 }; // end class CGAL_Lab
#endif // LAB_DEMO_H #endif // LAB_DEMO_H

View File

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

View File

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

View File

@ -10,20 +10,9 @@
*/ */
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
QSurfaceFormat fmt; CGAL_Lab app(argc, argv,
"PMP demo",
fmt.setVersion(4, 3); "CGAL Polygon Mesh Processing Demo",
fmt.setRenderableType(QSurfaceFormat::OpenGL); QStringList() << "PMP");
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");
return app.try_exec(); return app.try_exec();
} }