VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtQtDeMainWindow.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCoreQt/vrvCoreQt.h>
13 
14 #if !defined(Q_MOC_RUN)
15 #include <vrvCore/DtDeMainWindow.h>
18 
20 
22 #endif
23 
24 #include <QtCore/QRect>
25 
26 class QAction;
27 
28 namespace makVrv
29 {
30 
31  class DtDe;
32  class DtQtKeyAdapter;
33  class DtDriverManager;
34  class DtInputDriver;
35  class DtDriver;
36  class DtStartupDialog;
37  class DtHelpDialog;
38  class DtDeSplashScreen;
39 
45  public DtDeMainWindow
46  {
47  Q_OBJECT
48  public:
49 
50  static const char* ContainerPlaceHolderString;
51 
53 
55  virtual ~DtQtDeMainWindow();
56 
58  virtual void setApplicationTitle(const std::string& appName);
59 
61  virtual std::string applicationTitle() const;
62 
64  virtual void setApplicationIcon(const std::string& iconName);
65 
67  virtual QDockWidget* dockComponent(QWidget* component,
68  Qt::DockWidgetArea area = Qt::LeftDockWidgetArea);
69 
71  virtual QToolBar* dockComponent(QWidget* component,
72  Qt::ToolBarArea area = Qt::LeftToolBarArea);
73 
75  virtual void setMainWidget(QWidget* widget, DtQtKeyAdapter* keyAdapter = 0);
76 
78  virtual void removeMainWidget();
79 
80  virtual QWidget* mainWidget();
81 
83  virtual void destroyWindow();
84 
86  virtual void quit();
87 
89  virtual bool isToggledAsFullScreen();
90 
94  virtual void toggleFullScreen();
95 
97  virtual void slot_onDisplayEngineConfigurationRealized(
98  const std::string& igName, const std::string& displayName);
99 
101  virtual int screenNumber() const;
102 
104  virtual void showStartupDialog();
105 
107  virtual void hideStartupDialog();
108 
110  virtual void showHelpDialog();
111 
113  virtual void hideHelpDialog();
114 
115  signals:
116 
119  void signal_fullScreenToggled();
120 
121  public slots:
122 
123  virtual void remaximization();
124 
125  protected:
126 
128  DtQtDeMainWindow(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
129 
130  virtual bool event(QEvent* event) override;
131 
132  virtual void keyPressEvent( QKeyEvent* event ) override;
133  virtual void keyReleaseEvent( QKeyEvent* event ) override;
134 
137  virtual void closeEvent(QCloseEvent *event) override;
138 
140  void onMainEmbeddedWindowPixelRatioChanged();
141 
145  void slot_onWindowToBeDestroyed();
146 
149  void displayLabelInCentralWidget();
150 
154  void slot_onWindowCreated();
155 
157  virtual void setSplashScreen(DtDeSplashScreen* splashScreen);
158 
161  virtual void showBasedOnSettings();
162 
164  void hideAllVisibleDockableWidgets();
165 
168  void showAllVisibleDockableWidgets();
169 
171  void configureTabbedDockComponents();
172 
174  virtual void dragEnterEvent(QDragEnterEvent* event) override;
175 
177  virtual void dropEvent(QDropEvent* event) override;
178 
179  protected:
180 
182 
186  QPoint myRestorePos;
190 
191  //this are used for cache the window state before go to fullscreen for restore purpose
197 
199  Qt::WindowStates myLastWindowState;
200 
201  // int because we get ints from Qt (unless we are using qml for everything)
203  };
204 
209  {
210 
211  public:
212 
215 
217  virtual ~DtQtDeMainWindowProvider();
218 
221  //static DtQtDeMainWindowProvider& instance(DtDe& de);
222 
223  protected:
224 
227  virtual DtDeMainWindow* createMainWindow(DtDe& de);
228 
229  };
230 }
Qt::WindowStates myLastWindowState
Definition: DtQtDeMainWindow.h:199
DtDeSplashScreen * mySplashScreen
Definition: DtQtDeMainWindow.h:181
DtStartupDialog provides a dialog to be displayed on VR-Vantage startup to allow the user to choose w...
Definition: DtStartupDialog.h:37
QRect myRestoreRect
Definition: DtQtDeMainWindow.h:185
int myOldDevicePixelRatio
Definition: DtQtDeMainWindow.h:202
Contains makVrv::DtSubjectObserver class.
bool myFullScreen
Definition: DtQtDeMainWindow.h:184
DtStartupDialog * myStartupDialog
Definition: DtQtDeMainWindow.h:188
int myWindowXBeforeFullscreen
Definition: DtQtDeMainWindow.h:193
int myWindowHeightBeforeFullscreen
Definition: DtQtDeMainWindow.h:196
DtQtKeyAdapter * myKeyAdapter
Definition: DtQtDeMainWindow.h:183
int myWindowWidthBeforeFullscreen
Definition: DtQtDeMainWindow.h:195
The abstract main window provider.
Definition: DtDeMainWindow.h:74
DtHelpDialog * myHelpDialog
Definition: DtQtDeMainWindow.h:189
#define DT_DLL_VRVCOREQT
Definition: vrvCoreQt.h:20
Contains DLL export macros.
A styled QMainWindow that maintains color mappings for icons. This styled main window support mapping...
Definition: DtStyledQMainWindow.h:39
Contains makVrv::DtDeMainWindow class.
Abstract class to get Qt key events into OpenSceneGraph. Typically owned by DtDeMainWindowEmbeddedOsg...
Definition: DtQtKeyAdapter.h:20
int myWindowStateBeforeFullscreen
Definition: DtQtDeMainWindow.h:192
Contains makVrv::DtObserverObject class declaration.
DtQtDeMainWindowProvider lazily creates and provides access to the DtQtDeMainWindow.
Definition: DtQtDeMainWindow.h:208
QPoint myRestorePos
Definition: DtQtDeMainWindow.h:186
QObjectList myVisibleButHiddenDockableWidgets
Definition: DtQtDeMainWindow.h:187
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The abstract main window class.
Definition: DtDeMainWindow.h:24
static const char * ContainerPlaceHolderString
Definition: DtQtDeMainWindow.h:50
Base class to provide boost signal/slot management.
int myWindowYBeforeFullscreen
Definition: DtQtDeMainWindow.h:194
The VR-Vantage Splash Screen Interface.
Definition: DtDeSplashScreen.h:34
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Contains makVrv::DtStyledQMainWindow class.
The help dialog class loads information about VR-Vantage and presents them to the user using a Qt dia...
Definition: DtHelpDialog.h:25
The Qt main window. There will be only one of these per DtDe instance. Note, this window will be dest...
Definition: DtQtDeMainWindow.h:44
DtSignalConnectionManager myConnections
Definition: DtQtDeMainWindow.h:198

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)