API Documentation
Loading...
Searching...
No Matches
MainWindow.h
Go to the documentation of this file.
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;
43 class GettingStartedDialog;
44 class QTModelManager;
45 class CameraPane;
46 class MainWindow;
47 /**--------------------------------------------------------------------------------------------------
48 \brief A popup widget within the NDEVR API often used to show confirmation dialogs.
49 **/
50 class MainWindowPopupWidget : public QWidget
51 {
52 MainWindowPopupWidget(MainWindow* window);
53 virtual void resizeEvent(QResizeEvent* event);
54 MainWindow* m_window;
55 QTimer* m_resize_timer;
56 };
57 /**--------------------------------------------------------------------------------------------------
58 \brief The primary Window within the NDEVR API
59 **/
60 class MainWindow : public NDEVRWindow
61 {
62 public:
63 MainWindow(QTModelManager* model_manager, QTWindowManager* window_manager, QWidget* parent = nullptr);
64 MainWindow(uint04 desktop_index, QTModelManager* model_manager, QTWindowManager* window_manager, QWidget* parent = nullptr);
65 ~MainWindow();
66 void init(QTModelManager* model_manager, QTWindowManager* window_manager);
67 void resizeEvent(QResizeEvent *event) override;
68 void moveEvent(QMoveEvent* event) override;
69 bool event(QEvent* event) override;
70 NDEVRRibbon* ribbon() { return m_ribbon; };
71 DockWidget<GettingStartedDialog>* home() { return m_home; };
72 DockWidget<CameraPane>* cameraPane() {return m_camera_pane; }
73 ContainerWidget* container() { return m_container_widget; };
74 void setPopupPosition();
75 virtual void keyReleaseEvent(QKeyEvent* event) override;
76 virtual void closeEvent(QCloseEvent *event) override;
77 virtual void hideEvent(QHideEvent* event) override;
78 virtual void showEvent(QShowEvent* event) override;
79 void addBottomWidget(QWidget* widget);
80 void removeBottomWidget(QWidget* widget);
81 void beginReset();
82 void removeFromResetShow(UUID id);
83 void endReset();
84 void updateModified();
85 QSize minimumSizeHint() const override;
86 protected:
87 ContainerWidget* m_container_widget;
88 NDEVRRibbon* m_ribbon;
89 DockWidget<GettingStartedDialog>* m_home;
90 QTWindowManager* m_window_manager;
91 QTModelManager* m_model_manager;
92 DockWidget<CameraPane>* m_camera_pane;
93 Buffer<Buffer<QPointer<FloatingWidget>>> m_reset_fullscreen_stack;
94 QWidget* m_popup_widget;
95 };
96}
97#endif
Definition ACIColor.h:37