NDEVR
API Documentation
WindowManagerabstract

Manages all windows and logic surrounding dialogs and views for displaying and managing any environment within the application. More...

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

Public Member Functions

 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 addCustomDockWidget (DockInit *widget)
 Adds a widget to be docked in the default location when a project has been loaded.
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 clearAll ()=0
 Resets the entire display to original initial state, before a project was loaded.
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 void exit (bool relaunch=false, const StringView &relaunch_options="--relaunch")
 Saves user settings and exits the application, relaunching if requested.
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 QWidget * mainWindow () const =0
 Returns the primary window for the application.
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 recoverLastData ()
 Attempts to recover data from the last session if it was not properly saved.
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 requestExitWithFunction (std::function< void()> exit_function, 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.
virtual void showModelProperties (const ShowPropertiesSettings &settings)
 Called when we want to show the dialog for editing a specific object using application default editing dialogs.
void simulateKeyPress (int key)
 Simulates a key press event as if the user pressed a key on the keyboard.
virtual void updateModified ()=0
 Called when application should check to see if the project has been modified since last save.
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 ContainerWidgetBasecontainer () const
 Returns the primary container widget for adding new docks.
virtual RibbonArea defaultRibbonArea (const QCustomDockWidget *)
 Returns the default ribbon area for a dock widget.
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

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 LogManagerDialogcreateLogView ()
 Creates and returns a new LogManagerDialog instance.
virtual SettingsDialogcreateSettingsDialog ()
 Creates and returns a new SettingsDialog instance.
virtual DropArea defaultDropArea (const QCustomDockWidget *dock_widget) const
 Returns the default drop area for a given dock widget.
virtual SectionWidgetdefaultDropReference (const QCustomDockWidget *dock_widget=nullptr) const
 Returns the default section widget to drop relative to.
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.
virtual void layoutAll ()
 Performs a full layout pass, arranging all dock widgets and panels.
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

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 any environment within the application.


class: WindowManager

Author: Tyler Parke

Date: 2023-01-16

Definition at line 68 of file WindowManager.h.

Constructor & Destructor Documentation

◆ WindowManager()

WindowManager::WindowManager ( QTModelManager * manager)

Constructs a WindowManager with the given model manager.

Parameters
[in]managerThe model manager providing project and design data.

References WindowManager().

Referenced by WindowManager().

Member Function Documentation

◆ aboutDialog()

virtual DockWidget< AboutDialog > * WindowManager::aboutDialog ( )
virtual

Returns the about dialog, which details information about the application, and instruction manuals, if available.

Returns
A dialog detailing information about the application, and instruction manuals, if available

◆ addCustomDockWidget()

virtual void WindowManager::addCustomDockWidget ( DockInit * widget)
virtual

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 immediately

Parameters
[in]widget- The widget to be docked

Reimplemented in QTWindowManager.

◆ addInitialSetupSettingsMenu()

virtual void WindowManager::addInitialSetupSettingsMenu ( WidgetInit * menu,
bool always_show = false )
virtual

Adds a menu to the initial setup dialog shown on first launch.

Parameters
[in]menuThe menu to add.
[in]always_showWhether to always show this menu, even on subsequent launches.

◆ addSettingsMenu()

virtual void WindowManager::addSettingsMenu ( WidgetInit * menu,
std::function< void()> reset_to_defaults )
virtual

Adds a dialog to the logic such that, should a settings dialog be created, the dialog will be added to the menu.

Provided function will be called if the user decides to reset the settings to default

Parameters
[in]menu- The menu to be added to the settings dialog
[in]reset_to_defaults- The function to be called if the user decides to reset the settings to default

◆ asciiExporterWindow()

virtual DockWidget< AsciiModelFileDialog > * WindowManager::asciiExporterWindow ( Buffer< UUID > model,
const Buffer< FileRequest > & file )
virtual

Returns the ASCII exporter dialog configured for the given model and file requests.

Parameters
[in]modelThe UUIDs of the model objects to export.
[in]fileThe file requests to configure for export.
Returns
A dock widget containing the ASCII export dialog.

◆ asciiImporterWindow() [1/2]

virtual DockWidget< AsciiModelFileDialog > * WindowManager::asciiImporterWindow ( )
virtual

Returns the dialog adjusting used for adjust the import settings of a given ascii file request.

Returns
A dialog for managing import options

◆ asciiImporterWindow() [2/2]

virtual DockWidget< AsciiModelFileDialog > * WindowManager::asciiImporterWindow ( const Buffer< FileRequest > & requests)
virtual

Returns the ASCII importer dialog configured for the given file requests.

Parameters
[in]requestsThe file requests to configure for import.
Returns
A dock widget containing the ASCII import dialog.

◆ clearAll()

virtual void WindowManager::clearAll ( )
pure virtual

Resets the entire display to original initial state, before a project was loaded.

Author: Tyler Parke

Date: 2023-01-16

Implemented in FormSheetWindowManager, and QTWindowManager.

◆ closeAll()

virtual void WindowManager::closeAll ( const PopupInfo & popup_origin = PopupInfo())
virtual

Prompts the user to save changes, if required, then closes everything returning to application initial state with no project loaded.

Parameters
[in]popup_origin- The origin where any animations should occur

◆ convertRequest()

FactoryParameterBuffer WindowManager::convertRequest ( const Buffer< FileRequest > & requests)
protected

Converts file requests into a FactoryParameterBuffer for IO processing.

Parameters
[in]requestsThe file requests to convert.
Returns
The factory parameter buffer.

◆ createAboutDialog()

virtual AboutDialog * WindowManager::createAboutDialog ( )
protectedvirtual

Creates and returns a new AboutDialog instance.

Returns
The newly created about dialog.

◆ createAsciiModelFileDialog()

virtual AsciiModelFileDialog * WindowManager::createAsciiModelFileDialog ( bool is_import)
protectedvirtual

Creates and returns a new AsciiModelFileDialog for import or export.

Parameters
[in]is_importWhether the dialog is for importing (true) or exporting (false).
Returns
The newly created ASCII file dialog.

◆ createAutoModelFileDialog()

virtual AutoModelFileDialog * WindowManager::createAutoModelFileDialog ( bool is_import)
protectedvirtual

Creates and returns a new AutoModelFileDialog for import or export.

Parameters
[in]is_importWhether the dialog is for importing (true) or exporting (false).
Returns
The newly created file dialog.

◆ createFileChooserDialog()

virtual FileChooserDialog * WindowManager::createFileChooserDialog ( )
protectedvirtual

Creates and returns a new FileChooserDialog instance.

Returns
The newly created file chooser dialog.

◆ createLogView()

virtual LogManagerDialog * WindowManager::createLogView ( )
protectedvirtual

Creates and returns a new LogManagerDialog instance.

Returns
The newly created log view dialog.

Reimplemented in QTWindowManager.

◆ createNewProject()

void WindowManager::createNewProject ( bool show_settings,
const PopupInfo & popup_origin = PopupInfo() )

Creates a new project and shows any relevant information based on show_settings parameter.

Parameters
[in]show_settings- if true, properties dialog for the project will be shown to user after creation
[in]popup_origin- The origin where any animations should occur

◆ createNewProjectNow()

virtual void WindowManager::createNewProjectNow ( bool show_settings,
const PopupInfo & popup_origin = PopupInfo() )
virtual

Creates a new project immediately without prompting to save.

Parameters
[in]show_settingsWhether to show the project properties dialog after creation.
[in]popup_originThe origin where any animations should occur.

◆ createSettingsDialog()

virtual SettingsDialog * WindowManager::createSettingsDialog ( )
protectedvirtual

Creates and returns a new SettingsDialog instance.

Returns
The newly created settings dialog.

◆ defaultDropArea()

virtual DropArea WindowManager::defaultDropArea ( const QCustomDockWidget * dock_widget) const
protectedvirtual

Returns the default drop area for a given dock widget.

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

Reimplemented from PopupManager.

Reimplemented in QTWindowManager.

◆ defaultDropReference()

virtual SectionWidget * WindowManager::defaultDropReference ( const QCustomDockWidget * dock_widget = nullptr) const
protectedvirtual

Returns the default section widget to drop relative to.

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

Reimplemented from PopupManager.

Reimplemented in QTWindowManager.

◆ exit()

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

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

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

Reimplemented in FormSheetWindowManager, and QTWindowManager.

◆ exporterWindow()

virtual DockWidget< AutoModelFileDialog > * WindowManager::exporterWindow ( Buffer< UUID > model,
const Buffer< FileRequest > & file )
virtual

Returns the dialog adjusting the export settings of a given file request.

File requests will be completed once dialog is accepted or cancelled

Author: Tyler Parke

Date: 2023-01-16 Parameters:

Parameters
[in]requests- The objects to be exported
Returns
A dialog for managing export options

◆ exportFile()

virtual void WindowManager::exportFile ( ExportRequest request)
virtual

Called when the user exports.

Will prompt user to select a location and format to save the file, then prompt the user for any additional export settings, if required

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]request- The settings for deletion
[in]show_recents- Whether or not export should show recent settings

◆ exportFiles()

virtual void WindowManager::exportFiles ( Buffer< UUID > model,
const Buffer< FileRequest > & files,
const PopupInfo & popup_origin )
virtual

Called when the user has selected a file format and default data to export.

Will prompt the user for any additional export settings, if required, then export data

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]model- The ids of the default model objects to export
[in]files- The requested exports
[in]popup_origin- The origin where any animations should occur

◆ fileChooser()

virtual FileChooserDialog * WindowManager::fileChooser ( )
virtual

Returns the default file chooser dialog used for user selection of files for import or export.

Returns
The default fileChooser used for selecting a file within the application

◆ hideSplashScreen()

virtual void WindowManager::hideSplashScreen ( const TimeSpan & delay_time,
const TimeSpan & fade_time )
protectedvirtual

Hides the splash screen with the specified delay and fade animation.

Parameters
[in]delay_timeTime to wait before beginning the fade.
[in]fade_timeDuration of the fade-out animation.

◆ importerWindow() [1/2]

virtual DockWidget< AutoModelFileDialog > * WindowManager::importerWindow ( )
virtual

Returns the dialog adjusting used for adjust the import settings of a given file request.

Returns
A dialog for managing import options

◆ importerWindow() [2/2]

virtual DockWidget< AutoModelFileDialog > * WindowManager::importerWindow ( const Buffer< FileRequest > & requests)
virtual

Returns the dialog adjusting the import settings of a given file request.

File requests will be completed once dialog is accepted or cancelled

Parameters
[in]requests- The objects to be imported
Returns
A dialog for managing import options

◆ importUserFiles()

virtual void WindowManager::importUserFiles ( const Buffer< FileRequest > & files,
PopupInfo popup_origin = PopupInfo() )
virtual

Called when the user has requested to import and has selected a file.

Will prompt the user for any additional import settings, if required, then import data

Parameters
[in]files- The file requests used to define what data to import
[in]popup_origin- The origin where any animations should occur

◆ initialSetupDialog()

virtual InitialSetupDialog * WindowManager::initialSetupDialog ( )
protectedvirtual

Returns or creates the initial setup dialog.

Returns
The initial setup dialog.

◆ logView()

virtual DockWidget< LogManagerDialog > * WindowManager::logView ( )
virtual

Returns the dialog for viewing all application logs related to the session and project.

Returns
A dialog allowing the user to view logs

◆ onNewProjectSelected() [1/2]

virtual void WindowManager::onNewProjectSelected ( bool show_settings,
const PopupInfo & popup_origin = PopupInfo() )
virtual

Creates a new project and shows any relevant information based on show_settings parameter.

Author: Tyler Parke

Date: 2023-01-17

Parameters
[in]show_settings- if true, properties dialog for the project will be shown to user after creation
[in]popup_origin- The origin where any animations should occur

◆ onNewProjectSelected() [2/2]

virtual void WindowManager::onNewProjectSelected ( const PopupInfo & popup_origin = PopupInfo())
virtual

Creates a new project and shows any relevant information based on WindowOptions.

Author: Tyler Parke

Date: 2023-01-17

Parameters
[in]popup_origin- The origin where any animations should occur

◆ openUserFiles()

virtual void WindowManager::openUserFiles ( const Buffer< FileRequest > & files,
PopupInfo popup_origin = PopupInfo() )
virtual

Opens user-selected files as new projects or adds them to the current project.

Parameters
[in]filesThe file requests describing what to open.
[in]popup_originThe origin where any animations should occur.

◆ removeCustomDockWidget()

virtual void WindowManager::removeCustomDockWidget ( DockInit * widget)
virtual

Removes a widget that was added with addCustomDockWidget.

If widget is not present, function does nothing

Parameters
[in]widget- The widget to be removed

◆ removeInitialSetupSettingsMenu()

virtual void WindowManager::removeInitialSetupSettingsMenu ( WidgetInit * menu)
virtual

Removes a previously added initial setup settings menu.

Parameters
[in]menuThe menu to remove.

◆ removeSettingsMenu()

virtual void WindowManager::removeSettingsMenu ( WidgetInit * menu)
virtual

Removes a previously added settings menu from the settings dialog.

Parameters
[in]menuThe menu to remove.

◆ requestExit() [1/2]

virtual void WindowManager::requestExit ( const PopupInfo & popup_origin = PopupInfo())
virtual

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

If confirmed, exit() will be called

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

◆ requestExit() [2/2]

virtual void WindowManager::requestExit ( QCloseEvent * event,
const PopupInfo & popup_origin = PopupInfo() )
virtual

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

If confirmed, exit() will be called

Parameters
[in]event- The exit event
[in]popup_origin- The origin where any animations should occur

Reimplemented in FormSheetWindowManager.

◆ requestExitWithFunction()

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

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 in QTWindowManager.

◆ saveImage()

virtual void WindowManager::saveImage ( const StringView & image_id,
const File & default_file,
PopupInfo info )
virtual

Prompts the user to save an image to a file location.

Parameters
[in]image_idThe identifier of the image to save.
[in]default_fileThe default file path for saving.
[in]infoThe popup configuration for the save dialog.

◆ saveProjectAs()

virtual void WindowManager::saveProjectAs ( const PopupInfo & popup_origin = PopupInfo())
virtual

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.

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]popup_origin- The origin where any animations should occur

◆ setMainWindowCallback()

virtual void WindowManager::setMainWindowCallback ( const std::function< void(QWidget *)> & main_window_callback)
virtual

Sets a callback invoked when the main window is created or changed.

Parameters
[in]main_window_callbackThe callback receiving the main window widget.

◆ settingsDialog()

virtual DockWidget< SettingsDialog > * WindowManager::settingsDialog ( )
virtual

Returns the settings dialog for allowing the user to adjust application specific objects.

Returns
A dialog allowing the user to modify settings

◆ setupExporterWindow()

virtual void WindowManager::setupExporterWindow ( AutoModelFileDialog * window,
Buffer< UUID > model,
const Buffer< FileRequest > & file )
protectedvirtual

Configures an exporter window with the given model objects and file requests.

Parameters
[in]windowThe exporter dialog to configure.
[in]modelThe UUIDs of model objects to export.
[in]fileThe file requests defining the export.

◆ showImportDialogIfNeeded()

virtual void WindowManager::showImportDialogIfNeeded ( const Buffer< FileRequest > & file,
PopupInfo popup_origin = PopupInfo() )
virtual

Shows the import settings dialog if additional configuration is needed for the file requests.

Parameters
[in]fileThe file requests to check.
[in]popup_originThe origin where any animations should occur.

◆ showModelProperties()

virtual void WindowManager::showModelProperties ( const ShowPropertiesSettings & settings)
virtual

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

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

Reimplemented in QTWindowManager.

◆ simulateKeyPress()

void WindowManager::simulateKeyPress ( int key)

Simulates a key press event as if the user pressed a key on the keyboard.

Parameters
[in]keyThe Qt key code to simulate.

◆ updateFileDialog()

void WindowManager::updateFileDialog ( const Buffer< UUID > & model,
const Buffer< FileFormat > & formats,
StringView extension,
bool show_recents,
bool save_dialog )
protected

Updates the file chooser dialog with format filters and options.

Parameters
[in]modelThe UUIDs of model objects to filter for.
[in]formatsThe available file formats.
[in]extensionThe default file extension.
[in]show_recentsWhether to show recent file locations.
[in]save_dialogWhether the dialog is for saving (true) or opening (false).

◆ updateModified()

virtual void WindowManager::updateModified ( )
pure virtual

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

Author: Tyler Parke

Date: 2023-01-16

Implemented in FormSheetWindowManager, and QTWindowManager.

◆ userDataAdded()

void WindowManager::userDataAdded ( Buffer< UUID > object)

Signal emitted when user data has been added to the project.

Parameters
[in]objectThe UUIDs of the added objects.

◆ userDeleteObjects()

virtual void WindowManager::userDeleteObjects ( const Buffer< UUID > & ids,
PopupInfo info )
virtual

Called when the user deletes objects.

If specified, will prompt if user is sure, and then deletes all objects

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]ids- The ids of objects the user is deleting

◆ userImportFile() [1/2]

virtual void WindowManager::userImportFile ( PopupInfo popup_origin,
const Buffer< FileFormat > & formats )
virtual

Called when the user has requested to import a file.

Will prompt user to select import a file, then prompt the user for any additional import settings, if required, then import data

Parameters
[in]popup_origin- The origin where any animations should occur
[in]formats- The available import formats. If empty, all supported formats will be used

◆ userImportFile() [2/2]

virtual void WindowManager::userImportFile ( PopupInfo popup_origin = PopupInfo())
virtual

Called when the user has requested to import a file.

Will prompt user to select import a file, then prompt the user for any additional import settings, if required, then import data

Parameters
[in]popup_origin- The origin where any animations should occur

◆ userOpenProject()

virtual void WindowManager::userOpenProject ( PopupInfo popup_origin = PopupInfo())
virtual

Called when the user has requested to choose a project file to open.

Will prompt user to select project file, then open it

Author: Tyler Parke

Date: 2023-01-16

Parameters
[in]popup_origin- The origin where any animations should occur

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