NDEVR
API Documentation
MainWindow

The primary Window within the NDEVR API. More...

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

Public Member Functions

 MainWindow (QTModelManager *model_manager, QTWindowManager *window_manager, QWidget *parent=nullptr)
 Constructs the main window with the given model and window managers.
 MainWindow (uint04 desktop_index, QTModelManager *model_manager, QTWindowManager *window_manager, QWidget *parent=nullptr)
 Constructs the main window on a specific desktop monitor index.
 ~MainWindow ()
 Destroys the main window and releases owned resources.
void addBottomWidget (QWidget *widget)
 Adds a widget to the bottom bar of the main window.
void beginReset ()
 Begins a UI reset, saving fullscreen state of floating widgets.
DockWidget< CameraPane > * cameraPane ()
 Returns the camera pane dock widget.
virtual void closeEvent (QCloseEvent *event) override
 Handles the window close event, prompting to save if needed.
ContainerWidgetcontainer ()
 Returns the central container widget that holds docked content.
void endReset ()
 Ends a UI reset, restoring previously saved fullscreen widget states.
bool event (QEvent *event) override
 Processes general Qt events for the main window.
virtual void hideEvent (QHideEvent *event) override
 Handles the hide event for the main window.
DockWidget< GettingStartedDialog > * home ()
 Returns the home dock widget containing the getting-started dialog.
void init (QTModelManager *model_manager, QTWindowManager *window_manager)
 Initializes the main window layout, ribbon, camera pane, and home dock.
virtual void keyReleaseEvent (QKeyEvent *event) override
 Handles key release events for global keyboard shortcuts.
QSize minimumSizeHint () const override
 Returns the minimum size hint for the main window.
void moveEvent (QMoveEvent *event) override
 Handles move events to update popup positioning.
void removeBottomWidget (QWidget *widget)
 Removes a widget from the bottom bar of the main window.
void removeFromResetShow (UUID id)
 Removes a widget identified by its UUID from the reset-show restoration list.
void resizeEvent (QResizeEvent *event) override
 Handles resize events to update layout and popup positioning.
NDEVRRibbonribbon ()
 Returns the main ribbon toolbar widget.
void setPopupPosition ()
 Repositions the popup overlay widget to match the current window geometry.
virtual void showEvent (QShowEvent *event) override
 Handles the show event for the main window.
void updateModified ()
 Updates the window title to reflect the current document modification state.
Public Member Functions inherited from NDEVRWindow
 NDEVRWindow (QWidget *parent=nullptr)
 Constructs an NDEVRWindow.
void centerToMonitor (uint04 monitor_index)
 Centers this window on the specified monitor.
void lockSizeToScreen ()
 Constrains the window size so it does not exceed the available screen dimensions.
void onClosedSignal ()
 Emitted when the window is closed.
void resizeEvent (QResizeEvent *event) override
 Handles resize events, constraining the window to screen bounds if locked.

Protected Attributes

DockWidget< CameraPane > * m_camera_pane
 The camera pane dock widget for 3D viewport navigation.
ContainerWidgetm_container_widget
 The central container widget that holds docked panes.
DockWidget< GettingStartedDialog > * m_home
 The home dock widget with the getting-started dialog.
QTModelManagerm_model_manager
 The application model manager.
QWidget * m_popup_widget
 Overlay widget used for popup dialogs.
Buffer< Buffer< QPointer< FloatingWidget > > > m_reset_fullscreen_stack
 Stack of fullscreen widget states saved during UI resets.
NDEVRRibbonm_ribbon
 The main ribbon toolbar.
QTWindowManagerm_window_manager
 The application window manager.

Detailed Description

The primary Window within the NDEVR API.


Definition at line 68 of file MainWindow.h.

Constructor & Destructor Documentation

◆ MainWindow() [1/2]

MainWindow::MainWindow ( QTModelManager * model_manager,
QTWindowManager * window_manager,
QWidget * parent = nullptr )

Constructs the main window with the given model and window managers.

Parameters
[in]model_managerThe application model manager.
[in]window_managerThe application window manager.
[in]parentThe optional parent widget.

◆ MainWindow() [2/2]

MainWindow::MainWindow ( uint04 desktop_index,
QTModelManager * model_manager,
QTWindowManager * window_manager,
QWidget * parent = nullptr )

Constructs the main window on a specific desktop monitor index.

Parameters
[in]desktop_indexThe zero-based index of the desktop monitor.
[in]model_managerThe application model manager.
[in]window_managerThe application window manager.
[in]parentThe optional parent widget.

Member Function Documentation

◆ addBottomWidget()

void MainWindow::addBottomWidget ( QWidget * widget)

Adds a widget to the bottom bar of the main window.

Parameters
[in]widgetThe widget to add.

◆ cameraPane()

DockWidget< CameraPane > * MainWindow::cameraPane ( )
inline

Returns the camera pane dock widget.

Returns
A pointer to the camera pane dock widget.

Definition at line 126 of file MainWindow.h.

References m_camera_pane.

◆ closeEvent()

virtual void MainWindow::closeEvent ( QCloseEvent * event)
overridevirtual

Handles the window close event, prompting to save if needed.

Parameters
[in]eventThe close event.

Reimplemented from NDEVRWindow.

References event().

◆ container()

ContainerWidget * MainWindow::container ( )
inline

Returns the central container widget that holds docked content.

Returns
A pointer to the ContainerWidget.

Definition at line 131 of file MainWindow.h.

References m_container_widget.

◆ event()

bool MainWindow::event ( QEvent * event)
override

Processes general Qt events for the main window.

Parameters
[in]eventThe event to process.
Returns
True if the event was handled.

References event().

Referenced by closeEvent(), event(), hideEvent(), keyReleaseEvent(), moveEvent(), resizeEvent(), and showEvent().

◆ hideEvent()

virtual void MainWindow::hideEvent ( QHideEvent * event)
overridevirtual

Handles the hide event for the main window.

Parameters
[in]eventThe hide event.

References event().

◆ home()

DockWidget< GettingStartedDialog > * MainWindow::home ( )
inline

Returns the home dock widget containing the getting-started dialog.

Returns
A pointer to the home dock widget.

Definition at line 121 of file MainWindow.h.

References m_home.

◆ init()

void MainWindow::init ( QTModelManager * model_manager,
QTWindowManager * window_manager )

Initializes the main window layout, ribbon, camera pane, and home dock.

Parameters
[in]model_managerThe application model manager.
[in]window_managerThe application window manager.

◆ keyReleaseEvent()

virtual void MainWindow::keyReleaseEvent ( QKeyEvent * event)
overridevirtual

Handles key release events for global keyboard shortcuts.

Parameters
[in]eventThe key event.

References event().

◆ minimumSizeHint()

QSize MainWindow::minimumSizeHint ( ) const
override

Returns the minimum size hint for the main window.

Returns
The minimum recommended size.

◆ moveEvent()

void MainWindow::moveEvent ( QMoveEvent * event)
override

Handles move events to update popup positioning.

Parameters
[in]eventThe move event.

References event().

◆ removeBottomWidget()

void MainWindow::removeBottomWidget ( QWidget * widget)

Removes a widget from the bottom bar of the main window.

Parameters
[in]widgetThe widget to remove.

◆ removeFromResetShow()

void MainWindow::removeFromResetShow ( UUID id)

Removes a widget identified by its UUID from the reset-show restoration list.

Parameters
[in]idThe UUID of the widget to exclude from restoration.

◆ resizeEvent()

void MainWindow::resizeEvent ( QResizeEvent * event)
override

Handles resize events to update layout and popup positioning.

Parameters
[in]eventThe resize event.

References event().

◆ ribbon()

NDEVRRibbon * MainWindow::ribbon ( )
inline

Returns the main ribbon toolbar widget.

Returns
A pointer to the NDEVRRibbon.

Definition at line 116 of file MainWindow.h.

References m_ribbon.

◆ showEvent()

virtual void MainWindow::showEvent ( QShowEvent * event)
overridevirtual

Handles the show event for the main window.

Parameters
[in]eventThe show event.

References event().


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