VR-Forces 5.0.3 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) 2021 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 
44  public DtDeMainWindow
45  {
46  Q_OBJECT
47  public:
48 
49  static const char* ContainerPlaceHolderString;
50 
52 
54  virtual ~DtQtDeMainWindow();
55 
57  virtual void setApplicationTitle(const std::string& appName);
58 
60  virtual std::string applicationTitle() const;
61 
63  virtual void setApplicationIcon(const std::string& iconName);
64 
66  virtual QDockWidget* dockComponent(QWidget* component,
67  Qt::DockWidgetArea area = Qt::LeftDockWidgetArea);
68 
70  virtual QToolBar* dockComponent(QWidget* component,
71  Qt::ToolBarArea area = Qt::LeftToolBarArea);
72 
74  virtual void setMainWidget(QWidget* widget, DtQtKeyAdapter* keyAdapter = 0);
75 
77  virtual void removeMainWidget();
78 
79  virtual QWidget* mainWidget();
80 
82  virtual void destroyWindow();
83 
85  virtual void quit();
86 
88  virtual bool isToggledAsFullScreen();
89 
93  virtual void toggleFullScreen();
94 
96  virtual void slot_onDisplayEngineConfigurationRealized(
97  const std::string& igName, const std::string& displayName);
98 
100  virtual int screenNumber() const;
101 
103  virtual void showStartupDialog();
104 
106  virtual void hideStartupDialog();
107 
109  virtual void showHelpDialog();
110 
112  virtual void hideHelpDialog();
113 
114  signals:
115 
118  void signal_fullScreenToggled();
119 
120  public slots:
121 
122  virtual void remaximization();
123 
124  protected:
125 
127  DtQtDeMainWindow(DtDe& de, QWidget* parent = 0, Qt::WindowFlags flags = 0);
128 
129  virtual bool event(QEvent* event);
130 
131  virtual void keyPressEvent( QKeyEvent* event );
132  virtual void keyReleaseEvent( QKeyEvent* event );
133 
136  virtual void closeEvent(QCloseEvent *event);
137 
139  void onMainEmbeddedWindowPixelRatioChanged();
140 
144  void slot_onWindowToBeDestroyed();
145 
148  void displayLabelInCentralWidget();
149 
153  void slot_onWindowCreated();
154 
156  void hideAllVisibleDockableWidgets();
157 
160  void showAllVisibleDockableWidgets();
161 
163  void configureTabbedDockComponents();
164 
166  virtual void dragEnterEvent(QDragEnterEvent* event) override;
167 
169  virtual void dropEvent(QDropEvent* event) override;
170 
171  protected:
172 
176  QPoint myRestorePos;
180 
181  //this are used for cache the window state before go to fullscreen for restore purpose
187 
189  Qt::WindowStates myLastWindowState;
190 
191  // int because we get ints from Qt (unless we are using qml for everything)
193  };
194 
199  {
200 
201  public:
202 
205 
207  virtual ~DtQtDeMainWindowProvider();
208 
209  protected:
210 
213  virtual DtDeMainWindow* createMainWindow(DtDe& de);
214 
215  };
216 }
Qt::WindowStates myLastWindowState
Definition: DtQtDeMainWindow.h:189
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:175
int myOldDevicePixelRatio
Definition: DtQtDeMainWindow.h:192
Contains makVrv::DtSubjectObserver class.
bool myFullScreen
Definition: DtQtDeMainWindow.h:174
DtStartupDialog * myStartupDialog
Definition: DtQtDeMainWindow.h:178
int myWindowXBeforeFullscreen
Definition: DtQtDeMainWindow.h:183
int myWindowHeightBeforeFullscreen
Definition: DtQtDeMainWindow.h:186
DtQtKeyAdapter * myKeyAdapter
Definition: DtQtDeMainWindow.h:173
int myWindowWidthBeforeFullscreen
Definition: DtQtDeMainWindow.h:185
The abstract main window provider.
Definition: DtDeMainWindow.h:66
DtHelpDialog * myHelpDialog
Definition: DtQtDeMainWindow.h:179
#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 clas for grabbing and handling adapter which is owned by the makVrv::DtOsgWindowQt.
Definition: DtQtKeyAdapter.h:20
int myWindowStateBeforeFullscreen
Definition: DtQtDeMainWindow.h:182
Contains makVrv::DtObserverObject class.
DtQtDeMainWindowProvider lazily creates and provides access to the DtQtDeMainWindow.
Definition: DtQtDeMainWindow.h:198
QPoint myRestorePos
Definition: DtQtDeMainWindow.h:176
QObjectList myVisibleButHiddenDockableWidgets
Definition: DtQtDeMainWindow.h:177
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The abstract main window class.
Definition: DtDeMainWindow.h:23
static const char * ContainerPlaceHolderString
Definition: DtQtDeMainWindow.h:49
Base class to provide boost signal/slot management.
int myWindowYBeforeFullscreen
Definition: DtQtDeMainWindow.h:184
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:70
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:43
DtSignalConnectionManager myConnections
Definition: DtQtDeMainWindow.h:188

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)