NDEVR
API Documentation
MainWindow.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: MainWindow
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/NDEVRWindow.h>
34#include <NDEVR/GettingStartedDialog.h>
35#include <NDEVR/QCustomDockWidget.h>
36#include <NDEVR/BaseValues.h>
37
38#if NDEVR_VIEWPORT
39namespace NDEVR
40{
41 class QTWindowManager;
42 class NDEVRRibbon;
44 class QTModelManager;
45 class CameraPane;
46 class MainWindow;
50 class MainWindowPopupWidget : public QWidget
51 {
56 MainWindowPopupWidget(MainWindow* window);
61 virtual void resizeEvent(QResizeEvent* event);
62 MainWindow* m_window;
63 QTimer* m_resize_timer;
64 };
65
68 class MainWindow : public NDEVRWindow
69 {
70 public:
77 MainWindow(QTModelManager* model_manager, QTWindowManager* window_manager, QWidget* parent = nullptr);
85 MainWindow(uint04 desktop_index, QTModelManager* model_manager, QTWindowManager* window_manager, QWidget* parent = nullptr);
95 void init(QTModelManager* model_manager, QTWindowManager* window_manager);
100 void resizeEvent(QResizeEvent *event) override;
105 void moveEvent(QMoveEvent* event) override;
111 bool event(QEvent* event) override;
140 virtual void keyReleaseEvent(QKeyEvent* event) override;
145 virtual void closeEvent(QCloseEvent *event) override;
150 virtual void hideEvent(QHideEvent* event) override;
155 virtual void showEvent(QShowEvent* event) override;
160 void addBottomWidget(QWidget* widget);
165 void removeBottomWidget(QWidget* widget);
178 void endReset();
187 QSize minimumSizeHint() const override;
188 protected:
196 QWidget* m_popup_widget;
197 };
198}
199#endif
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
The default container for multiple Viewports in the NDEVR environment.
Definition CameraPane.h:56
manages a series of SectionContent that can share the same space or lay out in various patterns inclu...
A type-safe dock widget that wraps a specific widget type.
This dialog is shown front and center before the user has loaded any data or created a project In tou...
virtual void resizeEvent(QResizeEvent *event)
Handles resize events to reposition popup content after a debounce timer.
The primary Window within the NDEVR API.
Definition MainWindow.h:69
MainWindow(QTModelManager *model_manager, QTWindowManager *window_manager, QWidget *parent=nullptr)
Constructs the main window with the given model and window managers.
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 setPopupPosition()
Repositions the popup overlay widget to match the current window geometry.
ContainerWidget * m_container_widget
The central container widget that holds docked panes.
Definition MainWindow.h:189
bool event(QEvent *event) override
Processes general Qt events for the main window.
NDEVRRibbon * ribbon()
Returns the main ribbon toolbar widget.
Definition MainWindow.h:116
virtual void closeEvent(QCloseEvent *event) override
Handles the window close event, prompting to save if needed.
void updateModified()
Updates the window title to reflect the current document modification state.
void init(QTModelManager *model_manager, QTWindowManager *window_manager)
Initializes the main window layout, ribbon, camera pane, and home dock.
void addBottomWidget(QWidget *widget)
Adds a widget to the bottom bar of the main window.
~MainWindow()
Destroys the main window and releases owned resources.
DockWidget< GettingStartedDialog > * m_home
The home dock widget with the getting-started dialog.
Definition MainWindow.h:191
DockWidget< CameraPane > * m_camera_pane
The camera pane dock widget for 3D viewport navigation.
Definition MainWindow.h:194
NDEVRRibbon * m_ribbon
The main ribbon toolbar.
Definition MainWindow.h:190
void resizeEvent(QResizeEvent *event) override
Handles resize events to update layout and popup positioning.
virtual void hideEvent(QHideEvent *event) override
Handles the hide event for the main window.
QTWindowManager * m_window_manager
The application window manager.
Definition MainWindow.h:192
Buffer< Buffer< QPointer< FloatingWidget > > > m_reset_fullscreen_stack
Stack of fullscreen widget states saved during UI resets.
Definition MainWindow.h:195
void removeBottomWidget(QWidget *widget)
Removes a widget from the bottom bar of the main window.
ContainerWidget * container()
Returns the central container widget that holds docked content.
Definition MainWindow.h:131
void removeFromResetShow(UUID id)
Removes a widget identified by its UUID from the reset-show restoration list.
MainWindow(uint04 desktop_index, QTModelManager *model_manager, QTWindowManager *window_manager, QWidget *parent=nullptr)
Constructs the main window on a specific desktop monitor index.
DockWidget< CameraPane > * cameraPane()
Returns the camera pane dock widget.
Definition MainWindow.h:126
QWidget * m_popup_widget
Overlay widget used for popup dialogs.
Definition MainWindow.h:196
DockWidget< GettingStartedDialog > * home()
Returns the home dock widget containing the getting-started dialog.
Definition MainWindow.h:121
void moveEvent(QMoveEvent *event) override
Handles move events to update popup positioning.
virtual void showEvent(QShowEvent *event) override
Handles the show event for the main window.
void beginReset()
Begins a UI reset, saving fullscreen state of floating widgets.
QTModelManager * m_model_manager
The application model manager.
Definition MainWindow.h:193
void endReset()
Ends a UI reset, restoring previously saved fullscreen widget states.
The Ribbon that typically appears on the top of the window or, in touch mode, to the side of the wind...
NDEVRWindow(QWidget *parent=nullptr)
Constructs an NDEVRWindow.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Manages all windows and logic surrounding dialogs and views for displaying and managing a 3D environm...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...