NDEVR
API Documentation
QTWindowManager

Manages all windows and logic surrounding dialogs and views for displaying and managing a 3D environment. More...

Inheritance diagram for QTWindowManager:
[legend]
Collaboration diagram for QTWindowManager:
[legend]

Public Member Functions

 QTWindowManager (QTModelManager *manager, const Buffer< String > &args=Buffer< String >())
 Constructs a 3D window manager with the given model manager and command-line arguments.
virtual void addCustomDockWidget (DockInit *widget) override
 Adds a widget to be docked in the default location when a project has been loaded.
virtual void addWindow (MainWindow *window)
 Adds an existing main window to the manager.
const Buffer< String > & args () const
 Returns the command-line arguments passed at construction.
virtual bool autoCreateWindows ()
 Checks whether camera viewport windows are automatically created.
virtual DockWidget< CameraPane > * cameraPane () const
 Returns the camera pane dock widget.
void cameraSwapSlot (UUID camera)
 Slot invoked to swap a camera view to the primary viewport position.
DockWidget< CameraView > * cameraView (const UUID &camera) const
 Returns the camera view dock widget for a specific camera.
Buffer< QPointer< DockWidget< CameraView > > > cameraViews () const
 Returns all camera view dock widgets.
virtual void closeWindow (MainWindow *window, QCloseEvent *event)
 Closes a specific main window, handling the close event.
virtual ContainerWidgetcontainer () const override
 Returns the primary container widget for adding new docks.
virtual MainWindowcreateWindow (uint04 monitor_number)
 Creates a new main window on the specified monitor.
template<class t_dock_type>
DockWidget< t_dock_type > * customDock () const
 Searches custom dock widgets for one matching the given type.
virtual DockWidget< DownloadDatasetWidget > * downloadWidget ()
 Returns the dataset download widget dock.
virtual DockWidget< DrawCommandsWidget > * drawEditor ()
 Returns the draw commands editor dock widget.
virtual void exit (bool relaunch=false, const StringView &relaunch_options="--relaunch") override
 Saves user settings and exits the application, relaunching if requested.
void finishInitialSetup ()
 Completes the initial setup process and transitions to the main application state.
virtual DockWidget< GettingStartedDialog > * home () const
 Returns the getting started / home dialog dock widget.
virtual bool isClosing () const
 Checks whether the application is currently closing.
virtual DockWidget< LibraryWidget > * libraryEditor ()
 Returns the library widget dock for asset browsing.
virtual QWidget * mainWindow () const override
 Returns the primary window for the application.
virtual String mainWindowPreferedName () const
 Returns the preferred name for the main window title.
virtual DockWidget< MeasurementCommandsWidget > * measureEditor ()
 Returns the measurement commands editor dock widget.
virtual DockWidget< ModelCommandsWidget > * modelEditor ()
 Returns the model commands editor dock widget.
virtual void onViewportSelection (UUID id)
 Handles a viewport selection event for the given object.
void refreshCameraSwap ()
 Slot that refreshes the camera swap state.
virtual void requestExitWithFunction (std::function< void()> exit_function, const PopupInfo &popup_origin=PopupInfo()) override
 Prompts the user to confirm an exit and save changes if required.
virtual NDEVRRibbonribbon () const
 Returns the primary ribbon widget.
virtual DockWidget< SceneTreeWidget > * sceneTree () const
 Returns the scene tree dock widget.
virtual DockWidget< SelectionWidget > * selectionWidget ()
 Returns the selection properties dock widget.
virtual void setAutoCreateCameras (bool autocreate)
 Sets whether camera viewport windows are automatically created for new cameras.
void setupRemoteWidgetsSlot ()
 Slot that sets up remote widgets based on the current configuration.
void setupSelectionWidget ()
 Slot that initializes or refreshes the selection widget.
virtual void showModelProperties (const ShowPropertiesSettings &settings) override
 Called when we want to show the dialog for editing a specific object using application default editing dialogs.
virtual void updateModified () override
 Called when application should check to see if the project has been modified since last save.
virtual void userZoomToModel (const UUID &id)
 Zooms the dialog to an object, and if required, shows a viewport if none are visible.
virtual ToolbarverticalModeToolbar ()
 Returns the vertical mode toolbar.
virtual MainWindowwindow (uint04 index) const
 Returns the main window at the given index.
virtual uint04 windowCount () const
 Returns the number of managed main windows.
Public Member Functions inherited from WindowManager
 WindowManager (QTModelManager *manager)
 Constructs a WindowManager with the given model manager.
virtual DockWidget< AboutDialog > * aboutDialog ()
 Returns the about dialog, which details information about the application, and instruction manuals, if available.
virtual void addInitialSetupSettingsMenu (WidgetInit *menu, bool always_show=false)
 Adds a menu to the initial setup dialog shown on first launch.
virtual void addSettingsMenu (WidgetInit *menu, std::function< void()> reset_to_defaults)
 Adds a dialog to the logic such that, should a settings dialog be created, the dialog will be added to the menu.
virtual DockWidget< AsciiModelFileDialog > * asciiExporterWindow (Buffer< UUID > model, const Buffer< FileRequest > &file)
 Returns the ASCII exporter dialog configured for the given model and file requests.
virtual DockWidget< AsciiModelFileDialog > * asciiImporterWindow ()
 Returns the dialog adjusting used for adjust the import settings of a given ascii file request.
virtual DockWidget< AsciiModelFileDialog > * asciiImporterWindow (const Buffer< FileRequest > &requests)
 Returns the ASCII importer dialog configured for the given file requests.
virtual void closeAll (const PopupInfo &popup_origin=PopupInfo())
 Prompts the user to save changes, if required, then closes everything returning to application initial state with no project loaded.
void createNewProject (bool show_settings, const PopupInfo &popup_origin=PopupInfo())
 Creates a new project and shows any relevant information based on show_settings parameter.
virtual void createNewProjectNow (bool show_settings, const PopupInfo &popup_origin=PopupInfo())
 Creates a new project immediately without prompting to save.
virtual DockWidget< AutoModelFileDialog > * exporterWindow (Buffer< UUID > model, const Buffer< FileRequest > &file)
 Returns the dialog adjusting the export settings of a given file request.
virtual void exportFile (ExportRequest request)
 Called when the user exports.
virtual void exportFiles (Buffer< UUID > model, const Buffer< FileRequest > &files, const PopupInfo &popup_origin)
 Called when the user has selected a file format and default data to export.
virtual FileChooserDialogfileChooser ()
 Returns the default file chooser dialog used for user selection of files for import or export.
virtual DockWidget< AutoModelFileDialog > * importerWindow ()
 Returns the dialog adjusting used for adjust the import settings of a given file request.
virtual DockWidget< AutoModelFileDialog > * importerWindow (const Buffer< FileRequest > &requests)
 Returns the dialog adjusting the import settings of a given file request.
virtual void importUserFiles (const Buffer< FileRequest > &files, PopupInfo popup_origin=PopupInfo())
 Called when the user has requested to import and has selected a file.
void initialSetupFinishedSignal ()
 Signal emitted when the initial setup process has completed.
void initKeypad ()
 Initializes the on-screen keypad for touch input.
virtual DockWidget< LogManagerDialog > * logView ()
 Returns the dialog for viewing all application logs related to the session and project.
virtual void onNewProjectSelected (bool show_settings, const PopupInfo &popup_origin=PopupInfo())
 Creates a new project and shows any relevant information based on show_settings parameter.
virtual void onNewProjectSelected (const PopupInfo &popup_origin=PopupInfo())
 Creates a new project and shows any relevant information based on WindowOptions.
void onNewProjectSignal ()
 Signal emitted when a new project is created.
virtual void openUserFiles (const Buffer< FileRequest > &files, PopupInfo popup_origin=PopupInfo())
 Opens user-selected files as new projects or adds them to the current project.
virtual void removeCustomDockWidget (DockInit *widget)
 Removes a widget that was added with addCustomDockWidget.
virtual void removeInitialSetupSettingsMenu (WidgetInit *menu)
 Removes a previously added initial setup settings menu.
virtual void removeSettingsMenu (WidgetInit *menu)
 Removes a previously added settings menu from the settings dialog.
virtual void requestExit (const PopupInfo &popup_origin=PopupInfo())
 Prompts the user to confirm an exit and save changes if required.
virtual void requestExit (QCloseEvent *event, const PopupInfo &popup_origin=PopupInfo())
 Prompts the user to confirm an exit and save changes if required.
virtual void saveImage (const StringView &image_id, const File &default_file, PopupInfo info)
 Prompts the user to save an image to a file location.
virtual void saveProjectAs (const PopupInfo &popup_origin=PopupInfo())
 Called when the user has selected the project to save and we want to allow them to rename the file Will prompt the user for any additional export settings, if required, then export data.
virtual void setMainWindowCallback (const std::function< void(QWidget *)> &main_window_callback)
 Sets a callback invoked when the main window is created or changed.
virtual DockWidget< SettingsDialog > * settingsDialog ()
 Returns the settings dialog for allowing the user to adjust application specific objects.
virtual void showImportDialogIfNeeded (const Buffer< FileRequest > &file, PopupInfo popup_origin=PopupInfo())
 Shows the import settings dialog if additional configuration is needed for the file requests.
virtual void showMainScreen ()
 Shows the main screen and puts it in front of any windows.
void simulateKeyPress (int key)
 Simulates a key press event as if the user pressed a key on the keyboard.
void userDataAdded (Buffer< UUID > object)
 Signal emitted when user data has been added to the project.
virtual void userDeleteObjects (const Buffer< UUID > &ids, PopupInfo info)
 Called when the user deletes objects.
virtual void userImportFile (PopupInfo popup_origin, const Buffer< FileFormat > &formats)
 Called when the user has requested to import a file.
virtual void userImportFile (PopupInfo popup_origin=PopupInfo())
 Called when the user has requested to import a file.
virtual void userOpenProject (PopupInfo popup_origin=PopupInfo())
 Called when the user has requested to choose a project file to open.
Public Member Functions inherited from PopupManager
 PopupManager ()
 Constructs a PopupManager.
virtual void hideWidget (QWidget *widget, const PopupInfo &popup_origin)
 Hides a widget that was previously shown as a popup.
void setupAsPopupHandler ()
 Registers this manager as the application's popup handler service.
virtual bool showWidget (QWidget *widget, PopupInfo popup_origin, PopupInfo popup_end)
 Shows a widget as a popup with animation from origin to destination.

Protected Member Functions

void addUserData (Buffer< UUID > object)
 Slot invoked when user data has been added to the project.
virtual void clearAll () override
 Resets the entire display to the initial state with no project loaded.
virtual void closeWindow (uint04 index, QCloseEvent *event)
 Closes the main window at the given index, handling the close event.
virtual DownloadDatasetWidgetcreateDownloadDatabaseWidget ()
 Creates a new download dataset widget.
virtual GettingStartedDialogcreateGettingStartedDialog () const
 Creates a new getting started dialog for the home screen.
virtual LibraryWidgetcreateLibraryWidget () const
 Creates a new library widget for asset browsing.
virtual LogManagerDialogcreateLogView () override
 Creates and returns a new LogManagerDialog instance.
virtual MainWindowcreateMainWindow (uint04 monitor_number)
 Creates a new main window on the specified monitor.
virtual SceneTreeWidgetcreateSceneTree () const
 Creates a new scene tree widget.
virtual SelectionWidgetcreateSelectionWidget () const
 Creates a new selection widget for displaying selected object properties.
virtual DropArea defaultDropArea (const QCustomDockWidget *dock_widget) const override
 Returns the default drop area for a dock widget.
virtual SectionWidgetdefaultDropReference (const QCustomDockWidget *dock_widget=nullptr) const override
 Returns the default section widget to drop relative to.
virtual RibbonArea defaultRibbonArea (const QCustomDockWidget *dock_widget) override
 Returns the default ribbon area for a dock widget.
void designObjectAdded (Buffer< UUID > object)
 Slot invoked when design objects have been added to the project.
bool eventFilter (QObject *Object, QEvent *Event) override
 Filters events for managed objects.
void hideCurrentSelectionEditorDialog ()
 Hides the currently displayed selection editor dialog.
virtual QCustomDockWidgetlargestCameraView (bool check_visible=true) const
 Returns the largest camera view dock widget, optionally filtering by visibility.
void layoutAll () override
 Performs a full layout pass, arranging all dock widgets and panels.
void onCameraAdd (UUID camera)
 Slot invoked when a new camera is added.
void onCameraDelete (UUID camera)
 Slot invoked when a camera is deleted.
void onCameraLayoutUpdated (Buffer< QPointer< DockWidget< CameraView > > > &removed_views)
 Handles a camera layout update, cleaning up removed views.
void onClearSlot ()
 Slot invoked when the project is cleared.
void onDesignObjectDelete (Buffer< UUID > object)
 Slot invoked when design objects are being deleted.
virtual void readArg (const StringView &arg, const StringView &data)
 Processes a single command-line argument and its associated data.
virtual void readArgs (const Buffer< String > &args)
 Parses and applies the command-line arguments.
virtual void recoverLastData () override
 Attempts to recover data from the last session if it was not properly saved.
virtual void setupCameraPanels ()
 Sets up the camera panels based on the current viewport layout.
void setupLogs ()
 Sets up log stream connections to the status bar and log dock.
virtual void setupRibbons (bool setup_all)
 Sets up the ribbon toolbars.
virtual void setupViews ()
 Sets up the initial viewport views and camera panels.
void swapCameras (DockWidget< CameraView > *camera_a, DockWidget< CameraView > *camera_b)
 Swaps the positions of two camera view dock widgets.
void updateProjectSlot ()
 Slot invoked to update the display when the project changes.
virtual void updateRemoteWidgets (const Buffer< QPointer< QWidget > > &widgets, bool are_remote)
 Updates the remote widget display, toggling between embedded and remote modes.
Protected Member Functions inherited from WindowManager
virtual void addProjectFolderToRecents ()
 Adds the current project folder to the recent directories list.
FactoryParameterBuffer convertRequest (const Buffer< FileRequest > &requests)
 Converts file requests into a FactoryParameterBuffer for IO processing.
virtual AboutDialogcreateAboutDialog ()
 Creates and returns a new AboutDialog instance.
virtual AsciiModelFileDialogcreateAsciiModelFileDialog (bool is_import)
 Creates and returns a new AsciiModelFileDialog for import or export.
virtual AutoModelFileDialogcreateAutoModelFileDialog (bool is_import)
 Creates and returns a new AutoModelFileDialog for import or export.
virtual FileChooserDialogcreateFileChooserDialog ()
 Creates and returns a new FileChooserDialog instance.
virtual SettingsDialogcreateSettingsDialog ()
 Creates and returns a new SettingsDialog instance.
virtual void hideSplashScreen (const TimeSpan &delay_time, const TimeSpan &fade_time)
 Hides the splash screen with the specified delay and fade animation.
virtual InitialSetupDialoginitialSetupDialog ()
 Returns or creates the initial setup dialog.
void initialSetupFinishedSlot ()
 Slot invoked when the initial setup process has completed.
void lockScreenToWindowSize ()
 Locks the screen resolution to match the current window size.
virtual void setupExporterWindow (AutoModelFileDialog *window, Buffer< UUID > model, const Buffer< FileRequest > &file)
 Configures an exporter window with the given model objects and file requests.
void updateFileDialog (const Buffer< UUID > &model, const Buffer< FileFormat > &formats, StringView extension, bool show_recents, bool save_dialog)
 Updates the file chooser dialog with format filters and options.
void updateFileDialogToProject ()
 Updates the file dialog to default to the current project directory.
virtual void updateFromWindowOptions ()
 Updates the window layout and behavior based on the current WindowOptions.

Protected Attributes

Buffer< QPointer< QWidget > > m_active_screen_widgets
 Widgets displayed on the active screen.
CustomDockButtonm_add_camera_button = nullptr
 Button for adding new camera viewports.
Buffer< Stringm_args
 Command-line arguments passed at construction.
bool m_auto_create_camera_windows
 Whether to auto-create camera viewport windows.
DockWidget< DownloadDatasetWidget > * m_download_widget = nullptr
 The dataset download dock.
DockWidget< DrawCommandsWidget > * m_draw_editor_dock = nullptr
 The draw commands editor dock.
bool m_has_model_content
 Whether the project contains model content.
Buffer< QPointer< QWidget > > m_inactive_screen_widgets
 Widgets on inactive screens.
DockWidget< LibraryWidget > * m_library_dock = nullptr
 The asset library dock.
Buffer< MainWindow * > m_main_windows
 All managed main windows.
QPointer< DockWidget< MeasurementCommandsWidget > > m_measure_editor_dock = nullptr
 The measurement commands editor dock.
QPointer< DockWidget< ModelCommandsWidget > > m_model_edit_dock = nullptr
 The model commands editor dock.
DockWidget< ReportGeneratorDialog > * m_report_generator = nullptr
 The report generator dock widget.
DockWidget< SceneTreeWidget > * m_scene_tree_dock = nullptr
 The scene tree dock widget.
UUID m_selected_editor_id = Constant<UUID>::Invalid
 The UUID of the currently selected editor target.
DockWidget< SelectionWidget > * m_selection_dock = nullptr
 The selection properties dock widget.
StatusBarm_status_bar = nullptr
 The status bar widget.
Toolbarm_vertical_mode_toolbar = nullptr
 The vertical mode toolbar.
Protected Attributes inherited from WindowManager
DockWidget< AboutDialog > * m_about_dock = nullptr
 The about dialog dock.
DockWidget< AsciiModelFileDialog > * m_ascii_export_dock = nullptr
 The ASCII export file dialog dock.
DockWidget< AsciiModelFileDialog > * m_ascii_import_dock = nullptr
 The ASCII import file dialog dock.
Buffer< DockInit * > m_custom_dock_widgets
 Custom dock widgets registered by modules.
DesignObjectDialogLookupm_dialog_lookup
 Lookup table for design object editing dialogs.
Dictionary< UUID, QPointer< DockWidget< DesignObjectDialog > > > m_editor_docks
 Map of object UUIDs to their editor dock widgets.
DockWidget< AutoModelFileDialog > * m_export_dock = nullptr
 The export file dialog dock.
String m_export_image_id
 The identifier of the image being exported.
FileChooserDialogm_file_chooser = nullptr
 The main file chooser dialog.
bool m_has_setup_keypad = false
 Whether the on-screen keypad has been initialized.
FileChooserDialogm_image_export = nullptr
 File chooser dialog for image export.
DockWidget< AutoModelFileDialog > * m_import_dock = nullptr
 The import file dialog dock.
Buffer< std::tuple< WidgetInit *, bool > > m_initial_settings_dialogs
 Registered initial setup menus and their always-show flags.
InitialSetupDialogm_initial_setup_dialog = nullptr
 The initial setup dialog instance.
bool m_is_exiting = false
 Whether the application is in the process of exiting.
QPointer< DockWidget< Keypad > > m_key_pad_dock = nullptr
 The docked keypad widget for touch input.
DockWidget< LogManagerDialog > * m_log_dock = nullptr
 The log manager dialog dock.
std::function< void(QWidget *)> m_main_window_callback
 Callback invoked when the main window is created.
QTModelManagerm_model_manager = nullptr
 The model manager providing project data.
Buffer< std::tuple< WidgetInit *, std::function< void()> > > m_settings_dialogs
 Registered settings menus and their reset callbacks.
DockWidget< SettingsDialog > * m_settings_dock = nullptr
 The settings dialog dock.
Protected Attributes inherited from PopupManager
Dictionary< QObject *, QPointer< QCustomDockWidget > > m_docks
 Mapping of objects to their associated dock widgets.
PopupWidget * m_popup_widget = nullptr
 The popup widget used for displaying popup content.

Detailed Description

Manages all windows and logic surrounding dialogs and views for displaying and managing a 3D environment.


Author: Tyler Parke

Date: 2023-01-16

Definition at line 68 of file WindowManager3D.h.

Constructor & Destructor Documentation

◆ QTWindowManager()

QTWindowManager::QTWindowManager ( QTModelManager * manager,
const Buffer< String > & args = BufferString >() )

Constructs a 3D window manager with the given model manager and command-line arguments.

Parameters
[in]managerThe model manager providing project and design data.
[in]argsCommand-line arguments to parse for initial configuration.

References args().

Member Function Documentation

◆ addCustomDockWidget()

virtual void QTWindowManager::addCustomDockWidget ( DockInit * widget)
overridevirtual

Adds a widget to be docked in the default location when a project has been loaded.


If a project is loaded, dialog will be added and docked immidiately

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]widget- The widget to be docked

Reimplemented from WindowManager.

◆ addUserData()

void QTWindowManager::addUserData ( Buffer< UUID > object)
protected

Slot invoked when user data has been added to the project.

Parameters
[in]objectThe UUIDs of the added objects.

◆ addWindow()

virtual void QTWindowManager::addWindow ( MainWindow * window)
virtual

Adds an existing main window to the manager.

Parameters
[in]windowThe main window to add.

References window().

◆ args()

const Buffer< String > & QTWindowManager::args ( ) const
inline

Returns the command-line arguments passed at construction.

Returns
A reference to the argument buffer.

Definition at line 187 of file WindowManager3D.h.

References m_args.

Referenced by QTWindowManager(), and readArgs().

◆ autoCreateWindows()

virtual bool QTWindowManager::autoCreateWindows ( )
inlinevirtual

Checks whether camera viewport windows are automatically created.

Returns
True if auto-creation is enabled.

Definition at line 197 of file WindowManager3D.h.

References m_auto_create_camera_windows.

◆ cameraPane()

virtual DockWidget< CameraPane > * QTWindowManager::cameraPane ( ) const
virtual

Returns the camera pane dock widget.

Returns
The camera pane dock.

◆ cameraSwapSlot()

void QTWindowManager::cameraSwapSlot ( UUID camera)

Slot invoked to swap a camera view to the primary viewport position.

Parameters
[in]cameraThe UUID of the camera to swap.

◆ cameraView()

DockWidget< CameraView > * QTWindowManager::cameraView ( const UUID & camera) const

Returns the camera view dock widget for a specific camera.

Parameters
[in]cameraThe UUID of the camera.
Returns
The camera view dock, or nullptr if not found.

◆ cameraViews()

Buffer< QPointer< DockWidget< CameraView > > > QTWindowManager::cameraViews ( ) const

Returns all camera view dock widgets.

Returns
A buffer of pointers to camera view docks.

◆ closeWindow() [1/2]

virtual void QTWindowManager::closeWindow ( MainWindow * window,
QCloseEvent * event )
virtual

Closes a specific main window, handling the close event.

Parameters
[in]windowThe window to close.
[in]eventThe close event.

References window().

◆ closeWindow() [2/2]

virtual void QTWindowManager::closeWindow ( uint04 index,
QCloseEvent * event )
protectedvirtual

Closes the main window at the given index, handling the close event.

Parameters
[in]indexThe index of the window to close.
[in]eventThe close event.

◆ container()

virtual ContainerWidget * QTWindowManager::container ( ) const
overridevirtual

Returns the primary container widget for adding new docks.


Author: Tyler Parke

Date: 2023-01-16

Returns
The primary container widget, as defined by the application

Reimplemented from PopupManager.

◆ createDownloadDatabaseWidget()

virtual DownloadDatasetWidget * QTWindowManager::createDownloadDatabaseWidget ( )
protectedvirtual

Creates a new download dataset widget.

Returns
The newly created DownloadDatasetWidget.

◆ createGettingStartedDialog()

virtual GettingStartedDialog * QTWindowManager::createGettingStartedDialog ( ) const
protectedvirtual

Creates a new getting started dialog for the home screen.

Returns
The newly created GettingStartedDialog.

◆ createLibraryWidget()

virtual LibraryWidget * QTWindowManager::createLibraryWidget ( ) const
protectedvirtual

Creates a new library widget for asset browsing.

Returns
The newly created LibraryWidget.

◆ createLogView()

virtual LogManagerDialog * QTWindowManager::createLogView ( )
overrideprotectedvirtual

Creates and returns a new LogManagerDialog instance.

Returns
The newly created log view dialog.

Reimplemented from WindowManager.

◆ createMainWindow()

virtual MainWindow * QTWindowManager::createMainWindow ( uint04 monitor_number)
protectedvirtual

Creates a new main window on the specified monitor.

Parameters
[in]monitor_numberThe monitor index.
Returns
The newly created MainWindow.

◆ createSceneTree()

virtual SceneTreeWidget * QTWindowManager::createSceneTree ( ) const
protectedvirtual

Creates a new scene tree widget.

Returns
The newly created SceneTreeWidget.

◆ createSelectionWidget()

virtual SelectionWidget * QTWindowManager::createSelectionWidget ( ) const
protectedvirtual

Creates a new selection widget for displaying selected object properties.

Returns
The newly created SelectionWidget.

◆ createWindow()

virtual MainWindow * QTWindowManager::createWindow ( uint04 monitor_number)
virtual

Creates a new main window on the specified monitor.

Parameters
[in]monitor_numberThe monitor index to create the window on.
Returns
The newly created MainWindow.

◆ customDock()

template<class t_dock_type>
DockWidget< t_dock_type > * QTWindowManager::customDock ( ) const
inline

Searches custom dock widgets for one matching the given type.

Returns
The first matching dock widget, or nullptr if none found.

Definition at line 171 of file WindowManager3D.h.

References WindowManager::m_custom_dock_widgets.

◆ defaultDropArea()

virtual DropArea QTWindowManager::defaultDropArea ( const QCustomDockWidget * dock_widget) const
overrideprotectedvirtual

Returns the default drop area for a dock widget.

Parameters
[in]dock_widgetThe dock widget to query.
Returns
The default DropArea.

Reimplemented from WindowManager.

◆ defaultDropReference()

virtual SectionWidget * QTWindowManager::defaultDropReference ( const QCustomDockWidget * dock_widget = nullptr) const
overrideprotectedvirtual

Returns the default section widget to drop relative to.

Parameters
[in]dock_widgetThe dock widget to query.
Returns
The default SectionWidget reference.

Reimplemented from WindowManager.

◆ defaultRibbonArea()

virtual RibbonArea QTWindowManager::defaultRibbonArea ( const QCustomDockWidget * dock_widget)
overrideprotectedvirtual

Returns the default ribbon area for a dock widget.

Parameters
[in]dock_widgetThe dock widget to query.
Returns
The default RibbonArea.

Reimplemented from PopupManager.

◆ designObjectAdded()

void QTWindowManager::designObjectAdded ( Buffer< UUID > object)
protected

Slot invoked when design objects have been added to the project.

Parameters
[in]objectThe UUIDs of the added design objects.

◆ downloadWidget()

virtual DockWidget< DownloadDatasetWidget > * QTWindowManager::downloadWidget ( )
virtual

Returns the dataset download widget dock.

Returns
The download widget dock.

◆ drawEditor()

virtual DockWidget< DrawCommandsWidget > * QTWindowManager::drawEditor ( )
virtual

Returns the draw commands editor dock widget.

Returns
The draw editor dock.

◆ eventFilter()

bool QTWindowManager::eventFilter ( QObject * Object,
QEvent * Event )
overrideprotected

Filters events for managed objects.

Parameters
[in]ObjectThe object receiving the event.
[in]EventThe event to filter.
Returns
True if the event was consumed.

◆ exit()

virtual void QTWindowManager::exit ( bool relaunch = false,
const StringView & relaunch_options = "--relaunch" )
overridevirtual

Saves user settings and exits the application, relaunching if requested.


Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]relaunch- Whether or not to re-open the application after closing it

Reimplemented from WindowManager.

◆ home()

virtual DockWidget< GettingStartedDialog > * QTWindowManager::home ( ) const
virtual

Returns the getting started / home dialog dock widget.

Returns
The home dialog dock.

◆ isClosing()

virtual bool QTWindowManager::isClosing ( ) const
inlinevirtual

Checks whether the application is currently closing.

Returns
True if the exit process has been initiated.

Definition at line 222 of file WindowManager3D.h.

References WindowManager::m_is_exiting.

◆ largestCameraView()

virtual QCustomDockWidget * QTWindowManager::largestCameraView ( bool check_visible = true) const
protectedvirtual

Returns the largest camera view dock widget, optionally filtering by visibility.

Parameters
[in]check_visibleWhether to only consider visible camera views.
Returns
The largest camera view dock widget, or nullptr.

◆ libraryEditor()

virtual DockWidget< LibraryWidget > * QTWindowManager::libraryEditor ( )
virtual

Returns the library widget dock for asset browsing.

Returns
The library editor dock.

◆ mainWindow()

virtual QWidget * QTWindowManager::mainWindow ( ) const
overridevirtual

Returns the primary window for the application.


Author: Tyler Parke

Date: 2023-01-16

Returns
The primary window, as defined by the application

Implements WindowManager.

◆ mainWindowPreferedName()

virtual String QTWindowManager::mainWindowPreferedName ( ) const
virtual

Returns the preferred name for the main window title.

Returns
The preferred window name string.

◆ measureEditor()

virtual DockWidget< MeasurementCommandsWidget > * QTWindowManager::measureEditor ( )
virtual

Returns the measurement commands editor dock widget.

Returns
The measurement editor dock.

◆ modelEditor()

virtual DockWidget< ModelCommandsWidget > * QTWindowManager::modelEditor ( )
virtual

Returns the model commands editor dock widget.

Returns
The model editor dock.

◆ onCameraAdd()

void QTWindowManager::onCameraAdd ( UUID camera)
protected

Slot invoked when a new camera is added.

Parameters
[in]cameraThe UUID of the new camera.

◆ onCameraDelete()

void QTWindowManager::onCameraDelete ( UUID camera)
protected

Slot invoked when a camera is deleted.

Parameters
[in]cameraThe UUID of the deleted camera.

◆ onCameraLayoutUpdated()

void QTWindowManager::onCameraLayoutUpdated ( Buffer< QPointer< DockWidget< CameraView > > > & removed_views)
protected

Handles a camera layout update, cleaning up removed views.

Parameters
[in]removed_viewsBuffer of camera view docks that were removed.

◆ onDesignObjectDelete()

void QTWindowManager::onDesignObjectDelete ( Buffer< UUID > object)
protected

Slot invoked when design objects are being deleted.

Parameters
[in]objectThe UUIDs of the objects being deleted.

◆ onViewportSelection()

virtual void QTWindowManager::onViewportSelection ( UUID id)
virtual

Handles a viewport selection event for the given object.

Parameters
[in]idThe UUID of the selected object.

◆ readArg()

virtual void QTWindowManager::readArg ( const StringView & arg,
const StringView & data )
protectedvirtual

Processes a single command-line argument and its associated data.

Parameters
[in]argThe argument flag.
[in]dataThe argument value.

◆ readArgs()

virtual void QTWindowManager::readArgs ( const Buffer< String > & args)
protectedvirtual

Parses and applies the command-line arguments.

Parameters
[in]argsThe command-line arguments to process.

References args().

◆ requestExitWithFunction()

virtual void QTWindowManager::requestExitWithFunction ( std::function< void()> exit_function,
const PopupInfo & popup_origin = PopupInfo() )
overridevirtual

Prompts the user to confirm an exit and save changes if required.


If confirmed, exit_function will be called and should contain the actual exit routine, typically including the call to exit()

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]exit_function- The function to be called should the user elect to exit
[in]popup_origin- The origin where any animations should occur

Reimplemented from WindowManager.

◆ ribbon()

virtual NDEVRRibbon * QTWindowManager::ribbon ( ) const
virtual

Returns the primary ribbon widget.

Returns
The NDEVRRibbon, or nullptr if none exists.

◆ sceneTree()

virtual DockWidget< SceneTreeWidget > * QTWindowManager::sceneTree ( ) const
virtual

Returns the scene tree dock widget.

Returns
The scene tree dock.

◆ selectionWidget()

virtual DockWidget< SelectionWidget > * QTWindowManager::selectionWidget ( )
virtual

Returns the selection properties dock widget.

Returns
The selection widget dock.

◆ setAutoCreateCameras()

virtual void QTWindowManager::setAutoCreateCameras ( bool autocreate)
inlinevirtual

Sets whether camera viewport windows are automatically created for new cameras.

Parameters
[in]autocreateWhether to auto-create camera windows.

Definition at line 192 of file WindowManager3D.h.

References m_auto_create_camera_windows.

◆ setupRibbons()

virtual void QTWindowManager::setupRibbons ( bool setup_all)
protectedvirtual

Sets up the ribbon toolbars.

Parameters
[in]setup_allWhether to set up all ribbons or only changed ones.

◆ showModelProperties()

virtual void QTWindowManager::showModelProperties ( const ShowPropertiesSettings & settings)
overridevirtual

Called when we want to show the dialog for editing a specific object using application default editing dialogs.


This can be called for creating new objects, editing existing objects, etc based on the provided settings

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]settings- The information used to generate the editing dialog

Reimplemented from WindowManager.

◆ swapCameras()

void QTWindowManager::swapCameras ( DockWidget< CameraView > * camera_a,
DockWidget< CameraView > * camera_b )
protected

Swaps the positions of two camera view dock widgets.

Parameters
[in]camera_aThe first camera view dock.
[in]camera_bThe second camera view dock.

◆ updateModified()

virtual void QTWindowManager::updateModified ( )
overridevirtual

Called when application should check to see if the project has been modified since last save.


Author: Tyler Parke

Date: 2023-01-16

Implements WindowManager.

◆ updateRemoteWidgets()

virtual void QTWindowManager::updateRemoteWidgets ( const Buffer< QPointer< QWidget > > & widgets,
bool are_remote )
protectedvirtual

Updates the remote widget display, toggling between embedded and remote modes.

Parameters
[in]widgetsThe widgets to update.
[in]are_remoteWhether the widgets should be displayed remotely.

◆ userZoomToModel()

virtual void QTWindowManager::userZoomToModel ( const UUID & id)
virtual

Zooms the dialog to an object, and if required, shows a viewport if none are visible.


Author: Tyler Parke

Date: 2023-01-17

Parameters
[in]id- The id of the model to zoom to

◆ verticalModeToolbar()

virtual Toolbar * QTWindowManager::verticalModeToolbar ( )
virtual

Returns the vertical mode toolbar.

Returns
The vertical toolbar, or nullptr if not created.

◆ window()

virtual MainWindow * QTWindowManager::window ( uint04 index) const
inlinevirtual

Returns the main window at the given index.

Parameters
[in]indexThe window index.
Returns
The MainWindow at that index.

Definition at line 228 of file WindowManager3D.h.

References m_main_windows.

Referenced by addWindow(), and closeWindow().

◆ windowCount()

virtual uint04 QTWindowManager::windowCount ( ) const
inlinevirtual

Returns the number of managed main windows.

Returns
The window count.

Definition at line 213 of file WindowManager3D.h.

References m_main_windows.


The documentation for this class was generated from the following file: