35#include <NDEVR/WindowManager.h>
36#include <NDEVR/WidgetInit.h>
37#include <NDEVR/Pointer.h>
38#include <NDEVR/Buffer.h>
42 class QCustomDockWidget;
43 class SceneTreeWidget;
44 class SelectionWidget;
45 class DownloadDatasetWidget;
47 class ReportGeneratorDialog;
48 class AsciiFileOutputStream;
49 class ModelCommandsWidget;
50 class QTResourceListener;
52 class GettingStartedDialog;
53 class DrawCommandsWidget;
54 class MeasurementCommandsWidget;
60 class CustomDockButton;
70 class NDEVR_API QTWindowManager :
public WindowManager
74 QTWindowManager(QTModelManager* manager,
const Buffer<String>& args = Buffer<String>());
89 virtual void addCustomDockWidget(DockInit* widget)
override;
105 virtual void showModelProperties(
const ShowPropertiesSettings& settings)
override;
116 virtual void updateModified()
override;
132 virtual void requestExitWithFunction(std::function<
void()> exit_function,
const PopupInfo& popup_origin = PopupInfo())
override;
146 virtual void exit(
bool relaunch =
false,
const String& relaunch_options =
"--relaunch")
override;
159 virtual ContainerWidget* container()
const override;
172 virtual QWidget* mainWindow()
const override;
185 virtual void userZoomToModel(
const UUID&
id);
187 template<
class t_dock_type>
188 DockWidget<t_dock_type>* customDock()
const
190 for (uint04 i = 0; i < m_custom_dock_widgets.size(); i++)
192 if (m_custom_dock_widgets[i] !=
nullptr)
194 if (DockWidget<t_dock_type>* dock =
dynamic_cast<DockWidget<t_dock_type>*
>(m_custom_dock_widgets[i]->getDock()))
200 const Buffer<String>& args()
const {
return m_args; }
201 virtual void setAutoCreateCameras(
bool autocreate) { m_auto_create_camera_windows = autocreate; }
202 virtual bool autoCreateWindows() {
return m_auto_create_camera_windows; }
203 virtual MainWindow* createWindow(uint04 monitor_number);
204 virtual void addWindow(MainWindow* window);
205 virtual uint04 windowCount()
const {
return m_main_windows.size(); };
206 void finishInitialSetup();
207 virtual bool isClosing()
const {
return m_is_exiting; }
208 virtual MainWindow* window(uint04 index)
const {
return m_main_windows[index]; };
209 virtual NDEVRRibbon* ribbon()
const;
210 virtual DockWidget<GettingStartedDialog>* home()
const;
211 virtual DockWidget<SceneTreeWidget>* sceneTree()
const;
212 virtual DockWidget<SelectionWidget>* selectionWidget();
213 virtual DockWidget<DrawCommandsWidget>* drawEditor();
214 virtual DockWidget<MeasurementCommandsWidget>* measureEditor();
215 virtual DockWidget<LibraryWidget>* libraryEditor();
216 virtual DockWidget<ModelCommandsWidget>* modelEditor();
217 virtual DockWidget<DownloadDatasetWidget>* downloadWidget();
218 virtual Toolbar* verticalModeToolbar();
219 virtual void closeWindow(MainWindow* window, QCloseEvent* event);
220 virtual String mainWindowPreferedName()
const;
221 virtual DockWidget<CameraPane>* cameraPane()
const;
222 DockWidget<CameraView>* cameraView(
const UUID& camera)
const;
223 Buffer<QPointer<DockWidget<CameraView>>> cameraViews()
const;
224 virtual void onViewportSelection(UUID
id);
226 virtual void closeWindow(uint04 index, QCloseEvent* event);
227 virtual void setupViews();
228 bool eventFilter(QObject* Object, QEvent* Event)
override;
229 virtual MainWindow* createMainWindow(uint04 monitor_number);
230 virtual SceneTreeWidget* createSceneTree()
const;
231 virtual SelectionWidget* createSelectionWidget()
const;
232 virtual GettingStartedDialog* createGettingStartedDialog()
const;
233 virtual LibraryWidget* createLibraryWidget()
const;
234 virtual LogManagerDialog* createLogView()
override;
235 virtual DownloadDatasetWidget* createDownloadDatabaseWidget();
237 virtual QCustomDockWidget* largestCameraView(
bool check_visible =
true)
const;
238 virtual void recoverLastData()
override;
239 virtual void setupRibbons(
bool setup_all);
240 virtual void setupCameraPanels();
241 virtual void readArgs(
const Buffer<String>& args);
242 virtual void readArg(
const String& arg,
const String& data);
243 virtual DropArea defaultDropArea(
const QCustomDockWidget* dock_widget)
const override;
244 virtual SectionWidget* defaultDropReference(
const QCustomDockWidget* dock_widget =
nullptr)
const override;
245 virtual RibbonArea defaultRibbonArea(
const QCustomDockWidget* dock_widget)
override;
246 virtual void updateRemoteWidgets(
const Buffer<QPointer<QWidget>>& widgets,
bool are_remote);
247 virtual void clearAll()
override;
248 void layoutAll()
override;
249 void swapCameras(DockWidget<CameraView>* camera_a, DockWidget<CameraView>* camera_b);
250 void onCameraLayoutUpdated(Buffer<QPointer<DockWidget<CameraView>>>& removed_views);
251 void hideCurrentSelectionEditorDialog();
253 void setupRemoteWidgetsSlot();
254 void setupSelectionWidget();
255 void refreshCameraSwap();
256 void cameraSwapSlot(UUID camera);
258 void addUserData(Buffer<UUID>
object);
259 void designObjectAdded(Buffer<UUID>
object);
260 void designObjectModifiedSlot(UUID
object);
261 void onDesignObjectDelete(Buffer<UUID>
object);
262 void onCameraDelete(UUID camera);
263 void onCameraAdd(UUID camera);
264 void updateProject(UUID
id);
267 Buffer<String> m_args;
268 Buffer<QPointer<QWidget>> m_active_screen_widgets;
269 Buffer<QPointer<QWidget>> m_inactive_screen_widgets;
270 StatusBar* m_status_bar =
nullptr;
271 mutable DockWidget<SceneTreeWidget>* m_scene_tree_dock =
nullptr;
272 mutable DockWidget<SelectionWidget>* m_selection_dock =
nullptr;
273 DockWidget<ReportGeneratorDialog>* m_report_generator =
nullptr;
274 DockWidget<DrawCommandsWidget>* m_draw_editor_dock =
nullptr;
275 DockWidget<DownloadDatasetWidget>* m_download_widget =
nullptr;
276 DockWidget<LibraryWidget>* m_library_dock =
nullptr;
277 QPointer<DockWidget<ModelCommandsWidget>> m_model_edit_dock =
nullptr;
278 QPointer<DockWidget<MeasurementCommandsWidget>> m_measure_editor_dock =
nullptr;
279 Toolbar* m_vertical_mode_toolbar =
nullptr;
280 CustomDockButton* m_add_camera_button =
nullptr;
281 Buffer<MainWindow*> m_main_windows;
282 UUID m_selected_editor_id = Constant<UUID>::NaN;
283 bool m_auto_create_camera_windows;
284 bool m_has_model_content;
RibbonArea
Definition RibbonArea.h:68
DropArea
Definition RibbonArea.h:47
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:115