Changeset 27375 in vbox
- Timestamp:
- Mar 15, 2010 4:47:50 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r27364 r27375 25 25 #include <QApplication> 26 26 #include <QDesktopWidget> 27 #include <QMainWindow> 27 28 #include <QTimer> 28 29 #ifdef Q_WS_MAC … … 40 41 #include "UIFrameBuffer.h" 41 42 #include "UIMachineViewFullscreen.h" 42 #include "QIMainDialog.h"43 43 44 44 UIMachineViewFullscreen::UIMachineViewFullscreen( UIMachineWindow *pMachineWindow … … 95 95 { 96 96 /* Get machine window: */ 97 Q IMainDialog*pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?98 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;97 QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 98 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 99 99 100 100 /* If this slot is invoked directly then use the passed size otherwise get … … 172 172 { 173 173 /* Who are we watching? */ 174 Q IMainDialog*pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?175 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;174 QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 175 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 176 176 177 177 if (pWatched != 0 && pWatched == pMainDialog) … … 220 220 #ifdef Q_WS_MAC // TODO: Is it really needed? See UIMachineViewSeamless::eventFilter(...); 221 221 /* Menu bar filter: */ 222 qobject_cast<Q IMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);222 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this); 223 223 #endif 224 224 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r27366 r27375 40 40 41 41 UIMachineWindowFullscreen::UIMachineWindowFullscreen(UIMachineLogic *pMachineLogic, ulong uScreenId) 42 : QIWithRetranslateUI2<Q IMainDialog>(0, Qt::FramelessWindowHint)42 : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint) 43 43 , UIMachineWindow(pMachineLogic, uScreenId) 44 44 , m_pMainMenu(0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.h
r27335 r27375 24 24 #define __UIMachineWindowFullscreen_h__ 25 25 26 /* Global includes */ 27 #include <QMainWindow> 28 26 29 /* Local includes */ 27 30 #include "QIWithRetranslateUI.h" 28 #include "QIMainDialog.h"29 31 #include "UIMachineWindow.h" 30 32 #ifdef Q_WS_X11 … … 35 37 class VBoxMiniToolBar; 36 38 37 class UIMachineWindowFullscreen : public QIWithRetranslateUI2<Q IMainDialog>, public UIMachineWindow39 class UIMachineWindowFullscreen : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow 38 40 { 39 41 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r27364 r27375 25 25 #include <QApplication> 26 26 #include <QDesktopWidget> 27 #include <QMainWindow> 27 28 #include <QMenuBar> 28 29 #include <QScrollBar> … … 37 38 #include "UIFrameBuffer.h" 38 39 #include "UIMachineViewNormal.h" 39 #include "QIMainDialog.h"40 40 41 41 UIMachineViewNormal::UIMachineViewNormal( UIMachineWindow *pMachineWindow … … 96 96 { 97 97 /* Get machine window: */ 98 Q IMainDialog*pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?99 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;98 QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 99 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 100 100 101 101 /* If this slot is invoked directly then use the passed size otherwise get … … 156 156 /* Trying to get menu-bar: */ 157 157 QMenuBar *pMenuBar = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 158 qobject_cast<Q IMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar() : 0;158 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar() : 0; 159 159 160 160 /* If menu-bar is present and have actions: */ … … 191 191 { 192 192 /* Who are we watching? */ 193 Q IMainDialog*pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?194 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;193 QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 194 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 195 195 196 196 if (pWatched != 0 && pWatched == pMainDialog) … … 233 233 234 234 /* Menu bar filters: */ 235 qobject_cast<Q IMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);235 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this); 236 236 } 237 237 … … 333 333 QRect windowGeo = machineWindowWrapper()->machineWindow()->frameGeometry(); 334 334 /* The area taken up by the machine central widget, so excluding all decorations: */ 335 QRect centralWidgetGeo = static_cast<Q IMainDialog*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry();335 QRect centralWidgetGeo = static_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->centralWidget()->geometry(); 336 336 /* To work out how big we can make the console window while still fitting on the desktop, 337 337 * we calculate availableGeometry() - (windowGeo - centralWidgetGeo). -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r27374 r27375 44 44 45 45 UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId) 46 : QIWithRetranslateUI2<Q IMainDialog>(0, Qt::Window)46 : QIWithRetranslateUI2<QMainWindow>(0, Qt::Window) 47 47 , UIMachineWindow(pMachineLogic, uScreenId) 48 48 , m_pIndicatorsPool(new UIIndicatorsPool(pMachineLogic->uisession()->session(), this)) … … 292 292 break; 293 293 } 294 return QIWithRetranslateUI2<Q IMainDialog>::event(pEvent);294 return QIWithRetranslateUI2<QMainWindow>::event(pEvent); 295 295 } 296 296 … … 598 598 void UIMachineWindowNormal::showSimple() 599 599 { 600 /* Diable auto centering: */601 setAutoCenteringEnabled(false);602 603 600 /* Just show window: */ 604 601 show(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r27374 r27375 25 25 26 26 /* Global includes */ 27 #include <QMainWindow> 27 28 #include <QLabel> 28 29 … … 30 31 #include "VBoxDefs.h" 31 32 #include "QIWithRetranslateUI.h" 32 #include "QIMainDialog.h"33 33 #include "UIMachineWindow.h" 34 34 #ifdef Q_WS_X11 … … 41 41 class QIStateIndicator; 42 42 43 class UIMachineWindowNormal : public QIWithRetranslateUI2<Q IMainDialog>, public UIMachineWindow43 class UIMachineWindowNormal : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow 44 44 { 45 45 Q_OBJECT; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r27364 r27375 25 25 #include <QApplication> 26 26 #include <QDesktopWidget> 27 #include <QMainWindow> 27 28 #include <QTimer> 28 29 #ifdef Q_WS_MAC … … 39 40 #include "UIFrameBuffer.h" 40 41 #include "UIMachineViewSeamless.h" 41 #include "QIMainDialog.h"42 42 43 43 UIMachineViewSeamless::UIMachineViewSeamless( UIMachineWindow *pMachineWindow … … 100 100 { 101 101 /* Get machine window: */ 102 Q IMainDialog*pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?103 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;102 QMainWindow *pMachineWindow = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 103 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 104 104 105 105 /* If this slot is invoked directly then use the passed size otherwise get … … 186 186 { 187 187 /* Who are we watching? */ 188 Q IMainDialog*pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ?189 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0;188 QMainWindow *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 189 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow()) : 0; 190 190 191 191 if (pWatched != 0 && pWatched == pMainDialog) … … 234 234 #ifdef Q_WS_MAC // TODO: Is it really needed? See UIMachineViewSeamless::eventFilter(...); 235 235 /* Menu bar filter: */ 236 qobject_cast<Q IMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this);236 qobject_cast<QMainWindow*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this); 237 237 #endif 238 238 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r27335 r27375 45 45 46 46 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId) 47 : QIWithRetranslateUI2<Q IMainDialog>(0, Qt::FramelessWindowHint)47 : QIWithRetranslateUI2<QMainWindow>(0, Qt::FramelessWindowHint) 48 48 , UIMachineWindow(pMachineLogic, uScreenId) 49 49 , m_pMainMenu(0) … … 162 162 break; 163 163 } 164 return Q IMainDialog::event(pEvent);164 return QMainWindow::event(pEvent); 165 165 } 166 166 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r27335 r27375 24 24 #define __UIMachineWindowSeamless_h__ 25 25 26 /* Global includes */ 27 #include <QMainWindow> 28 26 29 /* Local includes */ 27 30 #include "QIWithRetranslateUI.h" 28 #include "QIMainDialog.h"29 31 #include "UIMachineWindow.h" 30 32 #ifdef Q_WS_X11 … … 35 37 class VBoxMiniToolBar; 36 38 37 class UIMachineWindowSeamless : public QIWithRetranslateUI2<Q IMainDialog>, public UIMachineWindow39 class UIMachineWindowSeamless : public QIWithRetranslateUI2<QMainWindow>, public UIMachineWindow 38 40 { 39 41 Q_OBJECT;
Note:
See TracChangeset
for help on using the changeset viewer.