|
37 | 37 |
|
38 | 38 | #pragma once |
39 | 39 |
|
40 | | -//PCL |
| 40 | +// PCL |
41 | 41 | #include <pcl/point_cloud.h> |
42 | 42 | #include <pcl/point_types.h> |
43 | 43 |
|
44 | 44 | #include <ui_cloud_composer_main_window.h> |
45 | 45 |
|
46 | 46 | class QTreeView; |
47 | 47 |
|
48 | | -namespace pcl |
49 | | -{ |
50 | | - namespace cloud_composer |
51 | | - { |
52 | | - class ProjectModel; |
53 | | - class CloudViewer; |
54 | | - class CloudCommand; |
55 | | - class ToolFactory; |
56 | | - class ToolBoxModel; |
57 | | - class SignalMultiplexer; |
58 | | - |
59 | | - /** \brief MainWindow of cloud_composer application |
60 | | - * \author Jeremie Papon |
61 | | - * \ingroup cloud_composer |
62 | | - * The following member objects are defined in the ui file and can be manipulated: |
63 | | - * * cloud_viewer_ is the view which contains the PCLVisualizer & QVTKWidget |
64 | | - * * cloud_browser_ is the tree view in the left dock |
65 | | - * * item_inspector_ is the details view in the left dock |
66 | | - * * tool_box_view_ is the tool box in right dock |
67 | | - * * tool_parameter_view_ shows adjustable parameters for currently selected tool |
68 | | - * * undo_view_ is the undo stack view in the right dock |
69 | | - */ |
70 | | - class ComposerMainWindow : public QMainWindow, private Ui::ComposerMainWindow |
71 | | - { |
72 | | - Q_OBJECT |
73 | | - public: |
74 | | - explicit ComposerMainWindow (QWidget *parent = nullptr); |
75 | | - ~ComposerMainWindow (); |
76 | | - |
77 | | - Q_SIGNALS: |
78 | | - /** \brief Signal emitted when the active project is switched - ie a different project tab is selected */ |
79 | | - void |
80 | | - activeProjectChanged (ProjectModel* new_model, ProjectModel* previous_model); |
81 | | - |
82 | | - /** \brief This signal tells the current project to insert a cloud using a file dialog box */ |
83 | | - void |
84 | | - insertNewCloudFromFile (); |
85 | | - |
86 | | - /** \brief This signal tells the current project to insert a cloud from and RGB and Depth image using a file dialog box */ |
87 | | - void |
88 | | - insertNewCloudFromRGBandDepth (); |
89 | | - |
90 | | - /** \brief This signal tells the current project to save currently selected cloud to file */ |
91 | | - void |
92 | | - saveSelectedCloudToFile (); |
93 | | - |
94 | | - public Q_SLOTS: |
95 | | - //Slots for File Menu Actions |
96 | | - void |
97 | | - on_action_new_project__triggered (/*QString name = "unsaved project"*/); |
98 | | - void |
99 | | - on_action_open_cloud_as_new_project__triggered (); |
100 | | - void |
101 | | - on_action_open_project__triggered (); |
102 | | - void |
103 | | - on_action_save_project__triggered (); |
104 | | - void |
105 | | - on_action_save_project_as__triggered (); |
106 | | - void |
107 | | - on_action_save_selected_cloud__triggered (); |
108 | | - void |
109 | | - on_action_exit__triggered (); |
110 | | - |
111 | | - //Slots for Edit Menu Actions |
112 | | - void |
113 | | - on_action_insert_from_file__triggered (); |
114 | | - void |
115 | | - on_action_insert_from_openNi_source__triggered (); |
116 | | - void |
117 | | - on_action_insert_from_rgb_depth__triggered (); |
118 | | - |
119 | | - |
120 | | - |
121 | | - void |
122 | | - setCurrentModel (ProjectModel* model); |
123 | | - |
124 | | - void |
125 | | - setMouseStyleAction (interactor_styles::INTERACTOR_STYLES selected_style); |
126 | | - |
127 | | - void |
128 | | - enqueueToolAction (AbstractTool* tool); |
129 | | - |
130 | | - private: |
131 | | - void |
132 | | - connectFileActions (); |
133 | | - void |
134 | | - connectEditActions (); |
135 | | - |
136 | | - void |
137 | | - connectViewActions (); |
138 | | - |
139 | | - void |
140 | | - initializeCloudBrowser (); |
141 | | - void |
142 | | - initializeCloudViewer (); |
143 | | - void |
144 | | - initializeItemInspector (); |
145 | | - |
146 | | - void |
147 | | - initializeToolBox (); |
148 | | - void |
149 | | - initializePlugins (); |
150 | | - |
151 | | - |
152 | | - /** \brief Pointer to the model which is currently being viewed */ |
153 | | - ProjectModel* current_model_; |
154 | | - QItemSelectionModel* current_selection_model_; |
155 | | - |
156 | | - QMap <QString, ProjectModel*> name_model_map_; |
157 | | - |
158 | | - QUndoGroup *undo_group_; |
159 | | - |
160 | | - QItemSelectionModel* tool_selection_model_; |
161 | | - ToolBoxModel* tool_box_model_; |
162 | | - |
163 | | - SignalMultiplexer* multiplexer_; |
164 | | - |
165 | | - QActionGroup* mouse_style_group_; |
166 | | - }; |
167 | | - |
168 | | - } |
169 | | -} |
| 48 | +namespace pcl { |
| 49 | +namespace cloud_composer { |
| 50 | +class ProjectModel; |
| 51 | +class CloudViewer; |
| 52 | +class CloudCommand; |
| 53 | +class ToolFactory; |
| 54 | +class ToolBoxModel; |
| 55 | +class SignalMultiplexer; |
| 56 | + |
| 57 | +/** \brief MainWindow of cloud_composer application |
| 58 | + * \author Jeremie Papon |
| 59 | + * \ingroup cloud_composer |
| 60 | + * The following member objects are defined in the ui file and can be manipulated: |
| 61 | + * * cloud_viewer_ is the view which contains the PCLVisualizer & QVTKWidget |
| 62 | + * * cloud_browser_ is the tree view in the left dock |
| 63 | + * * item_inspector_ is the details view in the left dock |
| 64 | + * * tool_box_view_ is the tool box in right dock |
| 65 | + * * tool_parameter_view_ shows adjustable parameters for currently selected tool |
| 66 | + * * undo_view_ is the undo stack view in the right dock |
| 67 | + */ |
| 68 | +class ComposerMainWindow : public QMainWindow, private Ui::ComposerMainWindow { |
| 69 | + Q_OBJECT |
| 70 | +public: |
| 71 | + explicit ComposerMainWindow(QWidget* parent = nullptr); |
| 72 | + ~ComposerMainWindow(); |
| 73 | + |
| 74 | +Q_SIGNALS: |
| 75 | + /** \brief Signal emitted when the active project is switched - ie a different project |
| 76 | + * tab is selected */ |
| 77 | + void |
| 78 | + activeProjectChanged(ProjectModel* new_model, ProjectModel* previous_model); |
| 79 | + |
| 80 | + /** \brief This signal tells the current project to insert a cloud using a file dialog |
| 81 | + * box */ |
| 82 | + void |
| 83 | + insertNewCloudFromFile(); |
| 84 | + |
| 85 | + /** \brief This signal tells the current project to insert a cloud from and RGB and |
| 86 | + * Depth image using a file dialog box */ |
| 87 | + void |
| 88 | + insertNewCloudFromRGBandDepth(); |
| 89 | + |
| 90 | + /** \brief This signal tells the current project to save currently selected cloud to |
| 91 | + * file */ |
| 92 | + void |
| 93 | + saveSelectedCloudToFile(); |
| 94 | + |
| 95 | +public Q_SLOTS: |
| 96 | + // Slots for File Menu Actions |
| 97 | + void on_action_new_project__triggered(/*QString name = "unsaved project"*/); |
| 98 | + void |
| 99 | + on_action_open_cloud_as_new_project__triggered(); |
| 100 | + void |
| 101 | + on_action_open_project__triggered(); |
| 102 | + void |
| 103 | + on_action_save_project__triggered(); |
| 104 | + void |
| 105 | + on_action_save_project_as__triggered(); |
| 106 | + void |
| 107 | + on_action_save_selected_cloud__triggered(); |
| 108 | + void |
| 109 | + on_action_exit__triggered(); |
| 110 | + |
| 111 | + // Slots for Edit Menu Actions |
| 112 | + void |
| 113 | + on_action_insert_from_file__triggered(); |
| 114 | + void |
| 115 | + on_action_insert_from_openNi_source__triggered(); |
| 116 | + void |
| 117 | + on_action_insert_from_rgb_depth__triggered(); |
| 118 | + |
| 119 | + void |
| 120 | + setCurrentModel(ProjectModel* model); |
| 121 | + |
| 122 | + void |
| 123 | + setMouseStyleAction(interactor_styles::INTERACTOR_STYLES selected_style); |
| 124 | + |
| 125 | + void |
| 126 | + enqueueToolAction(AbstractTool* tool); |
| 127 | + |
| 128 | +private: |
| 129 | + void |
| 130 | + connectFileActions(); |
| 131 | + void |
| 132 | + connectEditActions(); |
| 133 | + |
| 134 | + void |
| 135 | + connectViewActions(); |
| 136 | + |
| 137 | + void |
| 138 | + initializeCloudBrowser(); |
| 139 | + void |
| 140 | + initializeCloudViewer(); |
| 141 | + void |
| 142 | + initializeItemInspector(); |
| 143 | + |
| 144 | + void |
| 145 | + initializeToolBox(); |
| 146 | + void |
| 147 | + initializePlugins(); |
| 148 | + |
| 149 | + /** \brief Pointer to the model which is currently being viewed */ |
| 150 | + ProjectModel* current_model_; |
| 151 | + QItemSelectionModel* current_selection_model_; |
| 152 | + |
| 153 | + QMap<QString, ProjectModel*> name_model_map_; |
| 154 | + |
| 155 | + QUndoGroup* undo_group_; |
| 156 | + |
| 157 | + QItemSelectionModel* tool_selection_model_; |
| 158 | + ToolBoxModel* tool_box_model_; |
| 159 | + |
| 160 | + SignalMultiplexer* multiplexer_; |
| 161 | + |
| 162 | + QActionGroup* mouse_style_group_; |
| 163 | +}; |
| 164 | + |
| 165 | +} // namespace cloud_composer |
| 166 | +} // namespace pcl |
0 commit comments