API Documentation
|
Manages all windows and logic surrounding dialogs and views for displaying and managing any environment within the application. More...
#include <WindowManager.h>
Signals | |
void | onNewProjectSignal () |
void | userDataAdded (Buffer< UUID > object) |
Public Member Functions | |
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. If a project is loaded, dialog will be added and docked immidiately. | |
virtual void | addInitialSetupSettingsMenu (WidgetInit *menu, bool always_show=false) |
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. Provided function will be called if the user decides to reset the settings to default. | |
virtual DockWidget< AsciiModelFileDialog > * | asciiExporterWindow (Buffer< UUID > model, const Buffer< FileRequest > &file) |
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) |
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) |
virtual void | exit (bool relaunch=false, const String &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. File requests will be completed once dialog is accepted or cancelled. | |
virtual void | exportFile (ExportRequest request) |
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. | |
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. Will prompt the user for any additional export settings, if required, then export data. | |
virtual FileChooserDialog * | fileChooser () |
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. File requests will be completed once dialog is accepted or cancelled. | |
virtual void | importUserFiles (const Buffer< FileRequest > &files, PopupInfo popup_origin=PopupInfo()) |
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. | |
void | initKeypad () |
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. | |
virtual void | openUserFiles (const Buffer< FileRequest > &files, PopupInfo popup_origin=PopupInfo()) |
virtual void | recoverLastData () |
virtual void | removeCustomDockWidget (DockInit *widget) |
Removes a widget that was added with addCustomDockWidget. If widget is not present, function does nothing. | |
virtual void | removeInitialSetupSettingsMenu (WidgetInit *menu) |
virtual void | removeSettingsMenu (WidgetInit *menu) |
virtual void | requestExit (const PopupInfo &popup_origin=PopupInfo()) |
Prompts the user to confirm an exit and save changes if required. If confirmed, exit() will be called. | |
virtual void | requestExit (QCloseEvent *event, const PopupInfo &popup_origin=PopupInfo()) |
Prompts the user to confirm an exit and save changes if required. If confirmed, exit() will be called. | |
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. If confirmed, exit_function will be called and should contain the actual exit routine, typically including the call to exit() | |
virtual void | saveImage (const String &image_id, const File &default_file, PopupInfo info) |
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) |
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) |
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. This can be called for creating new objects, editing existing objects, etc based on the provided settings. | |
void | simulateKeyPress (int key) |
virtual void | updateModified ()=0 |
Called when application should check to see if the project has been modified since last save. | |
virtual void | userDeleteObjects (const Buffer< UUID > &ids) |
Called when the user deletes objects. If specified, will prompt if user is sure, and then deletes all objects. | |
virtual void | userImportFile (PopupInfo popup_origin, const Buffer< FileFormat > &formats) |
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. | |
virtual void | userImportFile (PopupInfo popup_origin=PopupInfo()) |
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. | |
virtual void | userOpenProject (PopupInfo popup_origin=PopupInfo()) |
Called when the user has requested to choose a project file to open. Will prompt user to select project file, then open it. | |
WindowManager (QTModelManager *manager) | |
virtual | ~WindowManager () |
Public Member Functions inherited from PopupManager | |
virtual ContainerWidgetBase * | container () const |
Returns the primary container widget for adding new docks. | |
virtual RibbonArea | defaultRibbonArea (const QCustomDockWidget *) |
virtual void | hideWidget (QWidget *widget, const PopupInfo &popup_origin) |
PopupManager () | |
void | setupAsPopupHandler () |
virtual bool | showWidget (QWidget *widget, PopupInfo popup_origin, PopupInfo popup_end) |
Protected Slots | |
void | initialSetupFinishedSlot () |
Manages all windows and logic surrounding dialogs and views for displaying and managing any environment within the application.
class: WindowManager
Author: Tyler Parke
WindowManager | ( | QTModelManager * | manager | ) |
|
virtual |
|
virtual |
Returns the about dialog, which details information about the application, and instruction manuals, if available.
|
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 immidiately.
[in] | widget | - The widget to be docked |
|
virtual |
|
protectedvirtual |
|
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.
[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 |
|
virtual |
|
virtual |
Returns the dialog adjusting used for adjust the import settings of a given ascii file request.
|
virtual |
|
pure virtual |
Resets the entire display to original initial state, before a project was loaded.
Author: Tyler Parke
Date: 2023-01-16
Prompts the user to save changes, if required, then closes everything returning to application initial state with no project loaded.
[in] | popup_origin | - The origin where any animations should occur |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Creates a new project and shows any relevant information based on show_settings parameter.
[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 |
|
virtual |
|
protectedvirtual |
|
protectedvirtual |
Reimplemented from PopupManager.
|
protectedvirtual |
Reimplemented from PopupManager.
|
virtual |
Saves user settings and exits the application, relaunching if requested.
[in] | relaunch | - Whether or not to re-open the application after closing it |
|
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 Paramters:
[in] | requests | - The objects to be exported |
|
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
[in] | request | - The settings for deletion |
[in] | show_recents | - Whether or not export should show recent settings |
|
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
[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 |
|
virtual |
Returns the default file chooser dialog used for user selection of files for import or export.
|
protectedvirtual |
|
virtual |
Returns the dialog adjusting used for adjust the import settings of a given file request.
|
virtual |
Returns the dialog adjusting the import settings of a given file request. File requests will be completed once dialog is accepted or cancelled.
[in] | requests | - The objects to be imported |
|
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.
[in] | files | - The file requests used to define what data to import |
[in] | popup_origin | - The origin where any animations should occur |
|
protectedvirtual |
|
protectedslot |
void initKeypad | ( | ) |
|
protectedvirtual |
|
protected |
|
virtual |
Returns the dialog for viewing all application logs related to the session and project.
|
pure virtual |
Returns the primary window for the application.
|
virtual |
Creates a new project and shows any relevant information based on show_settings parameter.
Author: Tyler Parke
Date: 2023-01-17
[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 |
Creates a new project and shows any relevant information based on WindowOptions.
Author: Tyler Parke
Date: 2023-01-17
[in] | popup_origin | - The origin where any animations should occur |
|
signal |
|
virtual |
|
inlinevirtual |
|
virtual |
Removes a widget that was added with addCustomDockWidget. If widget is not present, function does nothing.
[in] | widget | - The widget to be removed |
|
virtual |
|
virtual |
Prompts the user to confirm an exit and save changes if required. If confirmed, exit() will be called.
[in] | exit_function | - The function to be called should the user elect to exit |
[in] | popup_origin | - The origin where any animations should occur |
|
virtual |
Prompts the user to confirm an exit and save changes if required. If confirmed, exit() will be called.
[in] | event | - The exit event |
[in] | popup_origin | - The origin where any animations should occur |
|
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
[in] | exit_function | - The function to be called should the user elect to exit |
[in] | popup_origin | - The origin where any animations should occur |
|
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
[in] | popup_origin | - The origin where any animations should occur |
|
virtual |
|
virtual |
Returns the settings dialog for allowing the user to adjust application specific objects.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
|
virtual |
Shows the main screen and puts it in front of any windows.
|
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.
[in] | settings | - The information used to generate the editing dialog |
void simulateKeyPress | ( | int | key | ) |
|
protected |
|
protected |
|
protectedvirtual |
|
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
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
[in] | ids | - The ids of objects the user is deleting |
|
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.
[in] | popup_origin | - The origin where any animations should occur |
[in] | formats | - The available import formats. If empty, all supported formats will be used |
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.
[in] | popup_origin | - The origin where any animations should occur |
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
[in] | popup_origin | - The origin where any animations should occur |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |