NDEVR
API Documentation
FormSheetWindowManager

Window manager for the FormSheetEditor application. More...

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

Public Member Functions

 FormSheetWindowManager ()
 Constructs the form sheet window manager.
virtual ~FormSheetWindowManager ()
 Destroys the window manager and releases resources.
virtual void clearAll ()
 Clears all managed state.
ContainerWidgetcontainer () const final override
 Returns the main container widget.
DockWidget< CustomerModelList > * customerList ()
 Returns the customer list dock widget, creating it if needed.
virtual void exit (bool relaunch=false, const StringView &relaunch_options) override
 Exits the application, optionally relaunching.
NDEVRWindowmainWindow () const final override
 Returns the main application window.
void requestExit (QCloseEvent *event, const PopupInfo &popup_origin=PopupInfo()) override
 Handles an exit request, prompting to save if needed.
NDEVRRibbonribbon ()
 Returns the ribbon widget.
DockWidget< SceneTree > * sceneTree ()
 Returns the scene tree dock widget, creating it if needed.
virtual void updateModified ()
 Updates the modified indicator in the UI.
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 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 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 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 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.
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 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 Attributes

ContainerWidgetm_container
 The central container widget.
DockWidget< CustomerModelList > * m_customer_list
 The customer list dock widget.
MainWindowm_main_window
 The main application window.
NDEVRRibbonm_ribbon_list
 The ribbon widget.
DockWidget< SceneTree > * m_scene_tree_dock
 The scene tree dock widget.
SheetOptions m_sheet_options
 The form sheet display options.
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.

Additional Inherited Members

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

Detailed Description

Window manager for the FormSheetEditor application.

Manages the main window, ribbon, scene tree, customer list, and container widget for the form sheet editing interface.

Definition at line 23 of file FormSheetWindowManager.h.

Member Function Documentation

◆ container()

ContainerWidget * FormSheetWindowManager::container ( ) const
inlinefinaloverridevirtual

Returns the main container widget.

Returns
A pointer to the container widget.

Reimplemented from PopupManager.

Definition at line 46 of file FormSheetWindowManager.h.

References m_container.

◆ customerList()

DockWidget< CustomerModelList > * FormSheetWindowManager::customerList ( )

Returns the customer list dock widget, creating it if needed.

Returns
A pointer to the customer list dock widget.

◆ exit()

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

Exits the application, optionally relaunching.

Parameters
[in]relaunchWhether to relaunch after exit.
[in]relaunch_optionsCommand-line options for the relaunch.

Reimplemented from WindowManager.

◆ mainWindow()

NDEVRWindow * FormSheetWindowManager::mainWindow ( ) const
inlinefinaloverridevirtual

Returns the main application window.

Returns
A pointer to the main window.

Implements WindowManager.

Definition at line 50 of file FormSheetWindowManager.h.

References m_main_window.

◆ requestExit()

void FormSheetWindowManager::requestExit ( QCloseEvent * event,
const PopupInfo & popup_origin = PopupInfo() )
overridevirtual

Handles an exit request, prompting to save if needed.

Parameters
[in]eventThe close event that triggered the exit request.
[in]popup_originThe popup origin for the save prompt.

Reimplemented from WindowManager.

◆ ribbon()

NDEVRRibbon * FormSheetWindowManager::ribbon ( )

Returns the ribbon widget.

Returns
A pointer to the ribbon widget.

◆ sceneTree()

DockWidget< SceneTree > * FormSheetWindowManager::sceneTree ( )

Returns the scene tree dock widget, creating it if needed.

Returns
A pointer to the scene tree dock widget.

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