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;
68 class NDEVR_API QTWindowManager :
public WindowManager
72 QTWindowManager(QTModelManager* manager,
const Buffer<String>& args = Buffer<String>());
83 virtual void addCustomDockWidget(DockInit* widget)
override;
95 virtual void showModelProperties(
const ShowPropertiesSettings& settings)
override;
104 virtual void updateModified()
override;
117 virtual void requestExitWithFunction(std::function<
void()> exit_function,
const PopupInfo& popup_origin = PopupInfo())
override;
127 virtual void exit(
bool relaunch =
false,
const String& relaunch_options =
"--relaunch")
override;
138 virtual ContainerWidget* container()
const override;
149 virtual QWidget* mainWindow()
const override;
159 virtual void userZoomToModel(
const UUID&
id);
161 template<
class t_dock_type>
162 DockWidget<t_dock_type>* customDock()
const
164 for (uint04 i = 0; i < m_custom_dock_widgets.size(); i++)
166 if (m_custom_dock_widgets[i] !=
nullptr)
168 if (DockWidget<t_dock_type>* dock =
dynamic_cast<DockWidget<t_dock_type>*
>(m_custom_dock_widgets[i]->getDock()))
174 const Buffer<String>& args()
const {
return m_args; }
175 virtual void setAutoCreateCameras(
bool autocreate) { m_auto_create_camera_windows = autocreate; }
176 virtual bool autoCreateWindows() {
return m_auto_create_camera_windows; }
177 virtual MainWindow* createWindow(uint04 monitor_number);
178 virtual void addWindow(MainWindow* window);
179 virtual uint04 windowCount()
const {
return m_main_windows.size(); };
180 void finishInitialSetup();
181 virtual bool isClosing()
const {
return m_is_exiting; }
182 virtual MainWindow* window(uint04 index)
const {
return m_main_windows[index]; };
183 virtual NDEVRRibbon* ribbon()
const;
184 virtual DockWidget<GettingStartedDialog>* home()
const;
185 virtual DockWidget<SceneTreeWidget>* sceneTree()
const;
186 virtual DockWidget<SelectionWidget>* selectionWidget();
187 virtual DockWidget<DrawCommandsWidget>* drawEditor();
188 virtual DockWidget<MeasurementCommandsWidget>* measureEditor();
189 virtual DockWidget<LibraryWidget>* libraryEditor();
190 virtual DockWidget<ModelCommandsWidget>* modelEditor();
191 virtual DockWidget<DownloadDatasetWidget>* downloadWidget();
192 virtual Toolbar* verticalModeToolbar();
193 virtual void closeWindow(MainWindow* window, QCloseEvent* event);
194 virtual String mainWindowPreferedName()
const;
195 virtual DockWidget<CameraPane>* cameraPane()
const;
196 DockWidget<CameraView>* cameraView(
const UUID& camera)
const;
197 Buffer<QPointer<DockWidget<CameraView>>> cameraViews()
const;
198 virtual void onViewportSelection(UUID
id);
200 virtual void closeWindow(uint04 index, QCloseEvent* event);
201 virtual void setupViews();
202 bool eventFilter(QObject* Object, QEvent* Event)
override;
203 virtual MainWindow* createMainWindow(uint04 monitor_number);
204 virtual SceneTreeWidget* createSceneTree()
const;
205 virtual SelectionWidget* createSelectionWidget()
const;
206 virtual GettingStartedDialog* createGettingStartedDialog()
const;
207 virtual LibraryWidget* createLibraryWidget()
const;
208 virtual LogManagerDialog* createLogView()
override;
209 virtual DownloadDatasetWidget* createDownloadDatabaseWidget();
211 virtual QCustomDockWidget* largestCameraView(
bool check_visible =
true)
const;
212 virtual void recoverLastData()
override;
213 virtual void setupRibbons(
bool setup_all);
214 virtual void setupCameraPanels();
215 virtual void readArgs(
const Buffer<String>& args);
216 virtual void readArg(
const String& arg,
const String& data);
217 virtual DropArea defaultDropArea(
const QCustomDockWidget* dock_widget)
const override;
218 virtual SectionWidget* defaultDropReference(
const QCustomDockWidget* dock_widget =
nullptr)
const override;
219 virtual RibbonArea defaultRibbonArea(
const QCustomDockWidget* dock_widget)
override;
220 virtual void updateRemoteWidgets(
const Buffer<QPointer<QWidget>>& widgets,
bool are_remote);
221 virtual void clearAll()
override;
222 void layoutAll()
override;
223 void swapCameras(DockWidget<CameraView>* camera_a, DockWidget<CameraView>* camera_b);
224 void onCameraLayoutUpdated(Buffer<QPointer<DockWidget<CameraView>>>& removed_views);
225 void hideCurrentSelectionEditorDialog();
227 void setupRemoteWidgetsSlot();
228 void setupSelectionWidget();
229 void refreshCameraSwap();
230 void cameraSwapSlot(UUID camera);
232 void addUserData(Buffer<UUID>
object);
233 void designObjectAdded(Buffer<UUID>
object);
234 void designObjectModifiedSlot(UUID
object);
235 void onDesignObjectDelete(Buffer<UUID>
object);
236 void onCameraDelete(UUID camera);
237 void onCameraAdd(UUID camera);
238 void updateProject(UUID
id);
241 Buffer<String> m_args;
242 Buffer<QPointer<QWidget>> m_active_screen_widgets;
243 Buffer<QPointer<QWidget>> m_inactive_screen_widgets;
244 StatusBar* m_status_bar =
nullptr;
245 mutable DockWidget<SceneTreeWidget>* m_scene_tree_dock =
nullptr;
246 mutable DockWidget<SelectionWidget>* m_selection_dock =
nullptr;
247 DockWidget<ReportGeneratorDialog>* m_report_generator =
nullptr;
248 DockWidget<DrawCommandsWidget>* m_draw_editor_dock =
nullptr;
249 DockWidget<DownloadDatasetWidget>* m_download_widget =
nullptr;
250 DockWidget<LibraryWidget>* m_library_dock =
nullptr;
251 QPointer<DockWidget<ModelCommandsWidget>> m_model_edit_dock =
nullptr;
252 QPointer<DockWidget<MeasurementCommandsWidget>> m_measure_editor_dock =
nullptr;
253 Toolbar* m_vertical_mode_toolbar =
nullptr;
254 CustomDockButton* m_add_camera_button =
nullptr;
255 Buffer<MainWindow*> m_main_windows;
256 UUID m_selected_editor_id = Constant<UUID>::Invalid;
257 bool m_auto_create_camera_windows;
258 bool m_has_model_content;
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.
Definition RibbonArea.h:71
DropArea
relates where a widget should be dropped relative to another.
Definition RibbonArea.h:46
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96