1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 #include <QtOpenGL/qgl.h>
5 #include <CGAL/Qt/DemosMainWindow.h>
6 
7 class QDragEnterEvent;
8 class QDropEvent;
9 class Scene;
10 class Viewer;
11 namespace Ui {
12   class MainWindow;
13 }
14 
15 
16 class MainWindow :
17   public CGAL::Qt::DemosMainWindow
18 {
19   Q_OBJECT
20 public:
21   MainWindow(QWidget* parent = nullptr);
22   ~MainWindow();
23 
24   public slots:
25     void updateViewerBBox();
26     void open(QString filename);
27     void setAddKeyFrameKeyboardModifiers(Qt::KeyboardModifiers);
28 
29     protected slots:
30 
31       // settings
32       void quit();
33       void readSettings();
34       void writeSettings();
35 
36       // drag & drop
37       void dropEvent(QDropEvent *event);
38       void closeEvent(QCloseEvent *event);
39       void dragEnterEvent(QDragEnterEvent *event);
40 
41       // file menu
42       void on_actionLoadPolyhedron_triggered();
43 
44       // edit menu
45       void on_actionSave_snapshot_triggered();
46       void on_actionCopy_snapshot_triggered();
47       void on_actionClear_points_triggered();
48       void on_actionClear_segments_triggered();
49       void on_actionClear_cutting_plane_triggered();
50 
51       // algorithm menu
52       void on_actionRefine_loop_triggered();
53       void on_actionEdge_points_triggered();
54       void on_actionInside_points_triggered();
55       void on_actionBoundary_points_triggered();
56       void on_actionRefine_bisection_triggered();
57       void on_actionBoundary_segments_triggered();
58       void on_actionPoints_in_interval_triggered();
59       void on_actionSigned_distance_function_to_facets_triggered();
60       void on_actionUnsigned_distance_function_to_edges_triggered();
61       void on_actionUnsigned_distance_function_to_facets_triggered();
62       void on_actionIntersection_cutting_plane_triggered();
63     void on_actionCutting_plane_none_triggered();
64 
65       // benchmark menu
66       void on_actionBench_memory_triggered();
67       void on_actionBench_distances_triggered();
68       void on_actionBench_intersections_triggered();
69 
70       // benchmark against #triangles
71       void on_actionBench_construction_triggered();
72       void on_actionBench_distances_vs_nbt_triggered();
73       void on_actionBench_intersections_vs_nbt_triggered();
74 
75       // view menu
76       void on_actionView_points_triggered();
77       void on_actionView_segments_triggered();
78       void on_actionView_polyhedron_triggered();
79       void on_actionView_cutting_plane_triggered();
80 
81 private:
82   Scene* m_pScene;
83   Viewer* m_pViewer;
84   Ui::MainWindow* ui;
85 };
86 
87 #endif // ifndef MAINWINDOW_H
88