Changeset 27012 in vbox
- Timestamp:
- Mar 4, 2010 11:47:23 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 added
- 9 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r26920 r27012 226 226 ./src/runtime \ 227 227 ./src/runtime/normal \ 228 ./src/runtime/fullscreen 228 ./src/runtime/fullscreen \ 229 ./src/runtime/seamless 229 230 endif 230 231 … … 376 377 src/runtime/fullscreen/UIMachineLogicFullscreen.h \ 377 378 src/runtime/fullscreen/UIMachineWindowFullscreen.h \ 378 src/runtime/fullscreen/UIMachineViewFullscreen.h 379 src/runtime/fullscreen/UIMachineViewFullscreen.h \ 380 src/runtime/seamless/UIMachineLogicSeamless.h \ 381 src/runtime/seamless/UIMachineWindowSeamless.h \ 382 src/runtime/seamless/UIMachineViewSeamless.h 379 383 endif 380 384 … … 509 513 src/runtime/fullscreen/UIMachineLogicFullscreen.cpp \ 510 514 src/runtime/fullscreen/UIMachineWindowFullscreen.cpp \ 511 src/runtime/fullscreen/UIMachineViewFullscreen.cpp 515 src/runtime/fullscreen/UIMachineViewFullscreen.cpp \ 516 src/runtime/seamless/UIMachineLogicSeamless.cpp \ 517 src/runtime/seamless/UIMachineWindowSeamless.cpp \ 518 src/runtime/seamless/UIMachineViewSeamless.cpp 512 519 endif 513 520 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r26938 r27012 49 49 #include "UIMachineLogicNormal.h" 50 50 #include "UIMachineLogicFullscreen.h" 51 //#include "UIMachineLogicSeamless.h"51 #include "UIMachineLogicSeamless.h" 52 52 #include "UIMachineWindow.h" 53 53 #include "UIMachineView.h" … … 358 358 break; 359 359 case UIVisualStateType_Seamless: 360 // logic = new UIMachineLogicSeamless(pParent, pSession, pActionsPool); 361 logic = new UIMachineLogicNormal(pParent, pSession, pActionsPool); 360 logic = new UIMachineLogicSeamless(pParent, pSession, pActionsPool); 362 361 break; 363 362 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r26998 r27012 44 44 #include "UIMachineViewNormal.h" 45 45 #include "UIMachineViewFullscreen.h" 46 #include "UIMachineViewSeamless.h" 46 47 47 48 #ifdef Q_WS_PM … … 139 140 break; 140 141 case UIVisualStateType_Seamless: 141 view = new UIMachineView Normal( pMachineWindow142 , renderMode142 view = new UIMachineViewSeamless( pMachineWindow 143 , renderMode 143 144 #ifdef VBOX_WITH_VIDEOHWACCEL 144 , bAccelerate2DVideo145 #endif 146 , uScreenId);145 , bAccelerate2DVideo 146 #endif 147 , uScreenId); 147 148 break; 148 149 default: … … 197 198 // : QAbstractScrollArea(((QMainWindow*)pMachineWindow->machineWindow())->centralWidget()) 198 199 : QAbstractScrollArea(pMachineWindow->machineWindow()) 199 , m_desktopGeometryType(DesktopGeo_Invalid)200 200 , m_pMachineWindow(pMachineWindow) 201 201 , m_mode(renderMode) … … 204 204 , m_pFrameBuffer(0) 205 205 , m_previousState(KMachineState_Null) 206 , m_desktopGeometryType(DesktopGeo_Invalid) 206 207 , m_iLastMouseWheelDelta(0) 207 208 , m_bIsAutoCaptureDisabled(false) … … 718 719 { 719 720 m_pFrameBuffer->doProcessVHWACommand(pEvent); 720 return true;721 }722 #endif723 724 #if 0 // TODO: Move that to seamless mode event hadler!725 case VBoxDefs::SetRegionEventType:726 {727 VBoxSetRegionEvent *sre = (VBoxSetRegionEvent*) pEvent;728 if (machineWindowWrapper()->isTrueSeamless() && sre->region() != mLastVisibleRegion)729 {730 mLastVisibleRegion = sre->region();731 machineWindowWrapper()->setMask (sre->region());732 }733 else if (!mLastVisibleRegion.isEmpty() && !machineWindowWrapper()->isTrueSeamless())734 mLastVisibleRegion = QRegion();735 721 return true; 736 722 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r26998 r27012 70 70 71 71 /* Public setters: */ 72 virtual void setGuestAutoresizeEnabled(bool bEnabled) = 0;73 virtual void setMouseIntegrationEnabled(bool bEnabled);72 virtual void setGuestAutoresizeEnabled(bool /* fEnabled */) {} 73 virtual void setMouseIntegrationEnabled(bool fEnabled); 74 74 75 75 /* Public members: */ 76 virtual void normalizeGeometry(bool bAdjustPosition = false) = 0;76 virtual void normalizeGeometry(bool /* bAdjustPosition = false */) {} 77 77 78 78 #if defined(Q_WS_MAC) … … 88 88 void keyboardStateChanged(int iState); 89 89 void mouseStateChanged(int iState); 90 91 /* Utility signals: */ 92 void resizeHintDone(); 90 93 91 94 protected: … … 118 121 bool isFrameBufferResizeIgnored() const { return m_bIsFrameBufferResizeIgnored; } 119 122 const QPixmap& pauseShot() const { return m_pauseShot; } 123 QSize storedConsoleSize() const { return m_storedConsoleSize; } 120 124 virtual QSize desktopGeometry() const; 121 125 … … 169 173 # endif 170 174 #endif 171 protected:172 173 DesktopGeo m_desktopGeometryType;174 QSize m_desktopGeometry;175 QSize m_storedConsoleSize;176 175 177 176 private: … … 233 232 KMachineState m_previousState; 234 233 234 DesktopGeo m_desktopGeometryType; 235 QSize m_desktopGeometry; 236 QSize m_storedConsoleSize; 237 235 238 QPoint m_lastMousePos; 236 239 QPoint m_capturedMousePos; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r27008 r27012 39 39 #include "UIMachineWindowNormal.h" 40 40 #include "UIMachineWindowFullscreen.h" 41 //#include "UIMachineWindowSeamless.h"41 #include "UIMachineWindowSeamless.h" 42 42 43 43 UIMachineWindow* UIMachineWindow::create(UIMachineLogic *pMachineLogic, UIVisualStateType visualStateType, ulong uScreenId) … … 53 53 break; 54 54 case UIVisualStateType_Seamless: 55 // window = new UIMachineWindowSeamless(pMachineLogic, uScreenId); 56 window = new UIMachineWindowNormal(pMachineLogic, uScreenId); 55 window = new UIMachineWindowSeamless(pMachineLogic, uScreenId); 57 56 break; 58 57 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r26931 r27012 110 110 111 111 /* Do not send the same hints as we already have: */ 112 if ((newSize.width() == m_storedConsoleSize.width()) && (newSize.height() == m_storedConsoleSize.height()))112 if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height())) 113 113 return; 114 114 … … 123 123 { 124 124 /* Remember the new size. */ 125 m_storedConsoleSize = newSize;125 storeConsoleSize(newSize.width(), newSize.height()); 126 126 127 127 /* Send new size-hint to the guest: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.h
r26921 r27012 30 30 { 31 31 Q_OBJECT; 32 33 signals:34 35 /* Utility signals: */36 void resizeHintDone();37 32 38 33 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r26921 r27012 110 110 111 111 /* Do not send the same hints as we already have: */ 112 if ((newSize.width() == m_storedConsoleSize.width()) && (newSize.height() == m_storedConsoleSize.height()))112 if ((newSize.width() == storedConsoleSize().width()) && (newSize.height() == storedConsoleSize().height())) 113 113 return; 114 114 … … 123 123 { 124 124 /* Remember the new size. */ 125 m_storedConsoleSize = newSize;125 storeConsoleSize(newSize.width(), newSize.height()); 126 126 127 127 /* Send new size-hint to the guest: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h
r26921 r27012 30 30 { 31 31 Q_OBJECT; 32 33 signals:34 35 /* Utility signals: */36 void resizeHintDone();37 32 38 33 protected: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r27006 r27012 3 3 * 4 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineLogic Normalclass implementation5 * UIMachineLogicSeamless class implementation 6 6 */ 7 7 … … 22 22 */ 23 23 24 /* Global includes */25 #include <QMenu>26 27 24 /* Local includes */ 28 25 #include "COMDefs.h" … … 31 28 32 29 #include "UISession.h" 33 #include "UIActionsPool.h" 34 #include "UIMachineLogicNormal.h" 30 #include "UIMachineLogicSeamless.h" 35 31 #include "UIMachineWindow.h" 36 #include "UIMachineView.h"37 32 38 33 #include "VBoxUtils.h" 39 34 40 UIMachineLogic Normal::UIMachineLogicNormal(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)41 : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_ Normal)42 { 43 } 44 45 UIMachineLogic Normal::~UIMachineLogicNormal()35 UIMachineLogicSeamless::UIMachineLogicSeamless(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool) 36 : UIMachineLogic(pParent, pSession, pActionsPool, UIVisualStateType_Seamless) 37 { 38 } 39 40 UIMachineLogicSeamless::~UIMachineLogicSeamless() 46 41 { 47 42 /* Cleanup normal machine window: */ 48 cleanupMachineWindow ();49 } 50 51 void UIMachineLogic Normal::initialize()43 cleanupMachineWindows(); 44 } 45 46 void UIMachineLogicSeamless::initialize() 52 47 { 53 48 /* Check the status of required features: */ … … 76 71 } 77 72 78 void UIMachineLogicNormal::sltPrepareNetworkAdaptersMenu() 79 { 80 QMenu *menu = qobject_cast<QMenu*>(sender()); 81 AssertMsg(menu, ("This slot should be called only on Network Adapters menu show!\n")); 82 menu->clear(); 83 menu->addAction(actionsPool()->action(UIActionIndex_Simple_NetworkAdaptersDialog)); 84 } 85 86 void UIMachineLogicNormal::sltPrepareSharedFoldersMenu() 87 { 88 QMenu *menu = qobject_cast<QMenu*>(sender()); 89 AssertMsg(menu, ("This slot should be called only on Shared Folders menu show!\n")); 90 menu->clear(); 91 menu->addAction(actionsPool()->action(UIActionIndex_Simple_SharedFoldersDialog)); 92 } 93 94 void UIMachineLogicNormal::sltPrepareMouseIntegrationMenu() 95 { 96 QMenu *menu = qobject_cast<QMenu*>(sender()); 97 AssertMsg(menu, ("This slot should be called only on Mouse Integration Menu show!\n")); 98 menu->clear(); 99 menu->addAction(actionsPool()->action(UIActionIndex_Toggle_MouseIntegration)); 100 } 101 102 void UIMachineLogicNormal::prepareActionConnections() 103 { 104 /* Base class connections: */ 105 UIMachineLogic::prepareActionConnections(); 106 107 /* This class connections: */ 108 connect(actionsPool()->action(UIActionIndex_Menu_NetworkAdapters)->menu(), SIGNAL(aboutToShow()), 109 this, SLOT(sltPrepareNetworkAdaptersMenu())); 110 connect(actionsPool()->action(UIActionIndex_Menu_SharedFolders)->menu(), SIGNAL(aboutToShow()), 111 this, SLOT(sltPrepareSharedFoldersMenu())); 112 connect(actionsPool()->action(UIActionIndex_Menu_MouseIntegration)->menu(), SIGNAL(aboutToShow()), 113 this, SLOT(sltPrepareMouseIntegrationMenu())); 114 } 115 116 void UIMachineLogicNormal::prepareMachineWindows() 73 void UIMachineLogicSeamless::prepareMachineWindows() 117 74 { 118 75 /* Get monitor count: */ … … 132 89 #endif /* Q_WS_MAC */ 133 90 91 #if 0 // TODO: Add seamless multi-monitor support! 134 92 /* Create machine window(s): */ 135 93 for (ulong uScreenId = 0; uScreenId < uMonitorCount; ++ uScreenId) … … 138 96 for (ulong uScreenId = uMonitorCount; uScreenId > 0; -- uScreenId) 139 97 machineWindows()[uScreenId - 1]->machineWindow()->raise(); 98 #else 99 /* Create primary machine window: */ 100 addMachineWindow(UIMachineWindow::create(this, visualStateType(), 0 /* primary only */)); 101 #endif 140 102 141 103 /* Notify others about machine window(s) created: */ … … 145 107 if (!uisession()->isRunning() && !uisession()->isPaused()) 146 108 { 109 /* Prepare console powerup: */ 147 110 prepareConsolePowerUp(); 148 111 … … 224 187 } 225 188 226 void UIMachineLogic Normal::cleanupMachineWindow()189 void UIMachineLogicSeamless::cleanupMachineWindows() 227 190 { 228 191 /* Do not cleanup machine window if it is not present: */ … … 230 193 return; 231 194 195 #if 0 // TODO: Add seamless multi-monitor support! 232 196 /* Cleanup normal machine window: */ 233 197 foreach (UIMachineWindow *pMachineWindow, machineWindows()) 234 198 UIMachineWindow::destroy(pMachineWindow); 235 } 236 199 #else 200 /* Create machine window(s): */ 201 UIMachineWindow::destroy(machineWindows()[0] /* primary only */); 202 #endif 203 } 204 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
r27006 r27012 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineLogic Normalclass declaration4 * UIMachineLogicSeamless class declaration 5 5 */ 6 6 … … 21 21 */ 22 22 23 #ifndef __UIMachineLogic Normal_h__24 #define __UIMachineLogic Normal_h__23 #ifndef __UIMachineLogicSeamless_h__ 24 #define __UIMachineLogicSeamless_h__ 25 25 26 26 /* Local includes */ … … 30 30 class UIActionsPool; 31 31 32 class UIMachineLogic Normal: public UIMachineLogic32 class UIMachineLogicSeamless : public UIMachineLogic 33 33 { 34 34 Q_OBJECT; … … 36 36 protected: 37 37 38 /* Normalmachine logic constructor/destructor: */39 UIMachineLogic Normal(QObject *pParent,40 UISession *pSession,41 UIActionsPool *pActionsPool);42 virtual ~UIMachineLogic Normal();38 /* Seamless machine logic constructor/destructor: */ 39 UIMachineLogicSeamless(QObject *pParent, 40 UISession *pSession, 41 UIActionsPool *pActionsPool); 42 virtual ~UIMachineLogicSeamless(); 43 43 44 44 void initialize(); 45 46 private slots:47 48 /* Windowed mode funtionality: */49 void sltPrepareNetworkAdaptersMenu();50 void sltPrepareSharedFoldersMenu();51 void sltPrepareMouseIntegrationMenu();52 45 53 46 private: 54 47 55 48 /* Prepare helpers: */ 56 void prepareActionConnections();57 49 void prepareMachineWindows(); 58 50 59 51 /* Cleanup helpers: */ 60 void cleanupMachineWindow(); 61 void cleanupActionConnections() {} 52 void cleanupMachineWindows(); 62 53 63 54 /* Friend classes: */ … … 65 56 }; 66 57 67 #endif // __UIMachineLogic Normal_h__58 #endif // __UIMachineLogicSeamless_h__ 68 59 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r27006 r27012 3 3 * 4 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineView Normalclass implementation5 * UIMachineViewSeamless class implementation 6 6 */ 7 7 … … 25 25 #include <QApplication> 26 26 #include <QDesktopWidget> 27 #ifdef Q_WS_MAC 27 28 #include <QMenuBar> 28 #include <QTimer> 29 #endif 30 #ifdef Q_WS_X11 31 #include <limits.h> 32 #endif 29 33 30 34 /* Local includes */ 31 #include "VBoxGlobal.h"32 35 #include "UISession.h" 33 #include "UIActionsPool.h"34 #include "UIMachineLogic.h"35 36 #include "UIMachineWindow.h" 36 37 #include "UIFrameBuffer.h" 37 #include "UIMachineView Normal.h"38 #include "UIMachineViewSeamless.h" 38 39 #include "QIMainDialog.h" 39 40 40 UIMachineView Normal::UIMachineViewNormal( UIMachineWindow *pMachineWindow41 , VBoxDefs::RenderMode renderMode41 UIMachineViewSeamless::UIMachineViewSeamless( UIMachineWindow *pMachineWindow 42 , VBoxDefs::RenderMode renderMode 42 43 #ifdef VBOX_WITH_VIDEOHWACCEL 43 , bool bAccelerate2DVideo44 #endif 45 , ulong uMonitor)44 , bool bAccelerate2DVideo 45 #endif 46 , ulong uMonitor) 46 47 : UIMachineView( pMachineWindow 47 48 , renderMode … … 50 51 #endif 51 52 , uMonitor) 52 , m_bIsGuestAutoresizeEnabled(pMachineWindow->machineLogic()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize)->isChecked())53 , m_fShouldWeDoResize(false)54 53 { 55 54 /* Prepare frame buffer: */ 56 55 prepareFrameBuffer(); 57 56 57 /* Prepare backup inforrmation: */ 58 prepareBackup(); 59 58 60 /* Prepare common things: */ 59 61 prepareCommon(); … … 62 64 prepareFilters(); 63 65 66 /* Prepare connections: */ 67 prepareConnections(); 68 64 69 /* Prepare console connections: */ 65 70 prepareConsoleConnections(); … … 67 72 /* Load machine view settings: */ 68 73 loadMachineViewSettings(); 74 75 /* Prepare seamless mode: */ 76 prepareSeamless(); 69 77 70 78 /* Initialization: */ … … 75 83 } 76 84 77 UIMachineViewNormal::~UIMachineViewNormal() 78 { 85 UIMachineViewSeamless::~UIMachineViewSeamless() 86 { 87 /* Cleanup seamless mode: */ 88 cleanupSeamless(); 89 79 90 /* Cleanup common things: */ 80 91 cleanupCommon(); … … 84 95 } 85 96 86 void UIMachineViewNormal::sltAdditionsStateChanged() 87 { 88 /* Check if we should restrict minimum size: */ 89 maybeRestrictMinimumSize(); 90 } 91 92 void UIMachineViewNormal::sltPerformGuestResize(const QSize &toSize) 93 { 94 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 95 { 96 /* Taking Main Dialog: */ 97 QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 98 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0; 99 100 /* If this slot is invoked directly then use the passed size 101 * otherwise get the available size for the guest display. 102 * We assume here that the centralWidget() contains this view only 103 * and gives it all available space. */ 104 QSize newSize(toSize.isValid() ? toSize : pMainDialog ? pMainDialog->centralWidget()->size() : QSize()); 105 AssertMsg(newSize.isValid(), ("This size should be valid!\n")); 106 107 /* Subtracting frame in case we basing on machine view size: */ 108 if (!toSize.isValid()) 109 newSize -= QSize(frameWidth() * 2, frameWidth() * 2); 110 111 /* Do not send the same hints as we already have: */ 112 if ((newSize.width() == m_storedConsoleSize.width()) && (newSize.height() == m_storedConsoleSize.height())) 113 return; 114 115 /* We only actually send the hint if 116 * 1) the autoresize property is set to true and 117 * 2) either an explicit new size was given (e.g. if the request 118 * was triggered directly by a console resize event) or if no 119 * explicit size was specified but a resize is flagged as being 120 * needed (e.g. the autoresize was just enabled and the console 121 * was resized while it was disabled). */ 122 if (toSize.isValid() || m_fShouldWeDoResize) 123 { 124 /* Remember the new size. */ 125 m_storedConsoleSize = newSize; 126 127 /* Send new size-hint to the guest: */ 128 session().GetConsole().GetDisplay().SetVideoModeHint(newSize.width(), newSize.height(), 0, screenId()); 129 } 130 /* We had requested resize now, rejecting accident requests: */ 131 m_fShouldWeDoResize = false; 132 } 97 void UIMachineViewSeamless::sltAdditionsStateChanged() 98 { 99 // TODO: Exit seamless if additions doesn't support it! 133 100 } 134 101 135 102 /* If the desktop geometry is set automatically, this will update it: */ 136 void UIMachineViewNormal::sltDesktopResized() 137 { 138 calculateDesktopGeometry(); 139 } 140 141 void UIMachineViewNormal::prepareFilters() 142 { 143 /* Base class filters: */ 144 UIMachineView::prepareFilters(); 145 146 /* Menu bar filters: */ 147 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this); 148 } 149 150 void UIMachineViewNormal::prepareConsoleConnections() 151 { 152 /* Base class connections: */ 153 UIMachineView::prepareConsoleConnections(); 154 155 /* Guest additions state-change updater: */ 156 connect(uisession(), SIGNAL(sigAdditionsStateChange()), this, SLOT(sltAdditionsStateChanged())); 157 } 158 159 void UIMachineViewNormal::loadMachineViewSettings() 160 { 161 /* Base class settings: */ 162 UIMachineView::loadMachineViewSettings(); 163 164 /* Global settings: */ 165 { 166 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltDesktopResized())); 167 } 168 } 169 170 void UIMachineViewNormal::setGuestAutoresizeEnabled(bool fEnabled) 171 { 172 if (m_bIsGuestAutoresizeEnabled != fEnabled) 173 { 174 m_bIsGuestAutoresizeEnabled = fEnabled; 175 176 maybeRestrictMinimumSize(); 177 178 if (m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 179 sltPerformGuestResize(); 180 } 181 } 182 183 void UIMachineViewNormal::normalizeGeometry(bool bAdjustPosition) 184 { 185 QWidget *pTopLevelWidget = window(); 186 187 /* Make no normalizeGeometry in case we are in manual resize mode or main window is maximized: */ 188 if (pTopLevelWidget->isMaximized()) 189 return; 190 191 /* Calculate client window offsets: */ 192 QRect frameGeo = pTopLevelWidget->frameGeometry(); 193 QRect geo = pTopLevelWidget->geometry(); 194 int dl = geo.left() - frameGeo.left(); 195 int dt = geo.top() - frameGeo.top(); 196 int dr = frameGeo.right() - geo.right(); 197 int db = frameGeo.bottom() - geo.bottom(); 198 199 /* Get the best size w/o scroll bars: */ 200 QSize s = pTopLevelWidget->sizeHint(); 201 202 /* Resize the frame to fit the contents: */ 203 s -= pTopLevelWidget->size(); 204 frameGeo.setRight(frameGeo.right() + s.width()); 205 frameGeo.setBottom(frameGeo.bottom() + s.height()); 206 207 if (bAdjustPosition) 208 { 209 QRegion availableGeo; 210 QDesktopWidget *dwt = QApplication::desktop(); 211 if (dwt->isVirtualDesktop()) 212 /* Compose complex available region */ 213 for (int i = 0; i < dwt->numScreens(); ++ i) 214 availableGeo += dwt->availableGeometry(i); 215 else 216 /* Get just a simple available rectangle */ 217 availableGeo = dwt->availableGeometry(pTopLevelWidget->pos()); 218 219 frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, mode() != VBoxDefs::SDLMode /* can resize? */); 220 } 221 222 #if 0 223 /* Center the frame on the desktop: */ 224 frameGeo.moveCenter(availableGeo.center()); 225 #endif 226 227 /* Finally, set the frame geometry */ 228 pTopLevelWidget->setGeometry(frameGeo.left() + dl, frameGeo.top() + dt, frameGeo.width() - dl - dr, frameGeo.height() - dt - db); 229 } 230 231 QRect UIMachineViewNormal::availableGeometry() 232 { 233 return QApplication::desktop()->availableGeometry(this); 234 } 235 236 void UIMachineViewNormal::maybeRestrictMinimumSize() 237 { 238 /* Sets the minimum size restriction depending on the auto-resize feature state and the current rendering mode. 239 * Currently, the restriction is set only in SDL mode and only when the auto-resize feature is inactive. 240 * We need to do that because we cannot correctly draw in a scrolled window in SDL mode. 241 * In all other modes, or when auto-resize is in force, this function does nothing. */ 242 if (mode() == VBoxDefs::SDLMode) 243 { 244 if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled) 245 setMinimumSize(sizeHint()); 246 else 247 setMinimumSize(0, 0); 248 } 249 } 250 251 bool UIMachineViewNormal::event(QEvent *pEvent) 103 void UIMachineViewSeamless::sltDesktopResized() 104 { 105 // TODO: Try to resize framebuffer according new desktop size, exit seamless if resize is failed! 106 } 107 108 bool UIMachineViewSeamless::event(QEvent *pEvent) 252 109 { 253 110 switch (pEvent->type()) … … 255 112 case VBoxDefs::ResizeEventType: 256 113 { 257 /* Some situations require initial VGA Resize Request 258 * to be ignored at all, leaving previous framebuffer, 259 * machine view and machine window sizes preserved: */ 114 /* Some situations require framebuffer resize events to be ignored, 115 * leaving machine window & machine view & framebuffer sizes preserved: */ 260 116 if (uisession()->isGuestResizeIgnored()) 261 117 return true; 262 118 263 bool oldIgnoreMainwndResize = isMachineWindowResizeIgnored(); 264 setMachineWindowResizeIgnored(true); 265 119 /* Get guest resize-event: */ 266 120 UIResizeEvent *pResizeEvent = static_cast<UIResizeEvent*>(pEvent); 267 121 268 /* Store the new size to prevent unwanted resize hints being sent back. */ 269 storeConsoleSize(pResizeEvent->width(), pResizeEvent->height()); 270 271 /* Unfortunately restoreOverrideCursor() is broken in Qt 4.4.0 if WA_PaintOnScreen widgets are present. 272 * This is the case on linux with SDL. As workaround we save/restore the arrow cursor manually. 273 * See http://trolltech.com/developer/task-tracker/index_html?id=206165&method=entry for details. 274 * Moreover the current cursor, which could be set by the guest, should be restored after resize: */ 275 QCursor cursor; 276 if (uisession()->isHidingHostPointer()) 277 cursor = QCursor(Qt::BlankCursor); 278 else 279 cursor = viewport()->cursor(); 122 /* Perform framebuffer resize: */ 280 123 frameBuffer()->resizeEvent(pResizeEvent); 281 viewport()->setCursor(cursor); 282 283 #ifdef Q_WS_MAC 284 // TODO_NEW_CORE 285 // mDockIconPreview->setOriginalSize(pResizeEvent->width(), pResizeEvent->height()); 286 #endif /* Q_WS_MAC */ 287 288 /* This event appears in case of guest video was changed for somehow even without video resolution change. 289 * In this last case the host VM window will not be resized according this event and the host mouse cursor 290 * which was unset to default here will not be hidden in capture state. So it is necessary to perform 291 * updateMouseClipping() for the guest resize event if the mouse cursor was captured: */ 292 if (uisession()->isMouseCaptured()) 293 updateMouseClipping(); 294 295 /* Apply maximum size restriction: */ 124 125 /* Reapply maximum size restriction for machine view: */ 296 126 setMaximumSize(sizeHint()); 297 127 298 /* May be we have to restrict minimum size? */ 299 maybeRestrictMinimumSize(); 300 301 /* Resize the guest canvas: */ 302 if (!isFrameBufferResizeIgnored()) 303 resize(pResizeEvent->width(), pResizeEvent->height()); 304 updateSliders(); 128 /* Perform machine view resize: */ 129 resize(pResizeEvent->width(), pResizeEvent->height()); 305 130 306 131 /* Let our toplevel widget calculate its sizeHint properly. */ … … 314 139 #endif /* Q_WS_X11 */ 315 140 316 if (!isFrameBufferResizeIgnored()) 317 normalizeGeometry(true /* adjustPosition */); 318 319 /* Report to the VM thread that we finished resizing */ 141 #ifdef Q_WS_MAC 142 // TODO_NEW_CORE 143 //mDockIconPreview->setOriginalSize(pResizeEvent->width(), pResizeEvent->height()); 144 #endif /* Q_WS_MAC */ 145 146 /* Update machine view sliders: */ 147 updateSliders(); 148 149 /* Unfortunately restoreOverrideCursor() is broken in Qt 4.4.0 if WA_PaintOnScreen widgets are present. 150 * This is the case on linux with SDL. As workaround we save/restore the arrow cursor manually. 151 * See http://trolltech.com/developer/task-tracker/index_html?id=206165&method=entry for details. 152 * Moreover the current cursor, which could be set by the guest, should be restored after resize: */ 153 if (uisession()->isValidPointerShapePresent()) 154 viewport()->setCursor(uisession()->cursor()); 155 else if (uisession()->isHidingHostPointer()) 156 viewport()->setCursor(Qt::BlankCursor); 157 /* This event appears in case of guest video was changed for somehow even without video resolution change. 158 * In this last case the host VM window will not be resized according this event and the host mouse cursor 159 * which was unset to default here will not be hidden in capture state. So it is necessary to perform 160 * updateMouseClipping() for the guest resize event if the mouse cursor was captured: */ 161 if (uisession()->isMouseCaptured()) 162 updateMouseClipping(); 163 164 /* Report to the VM thread that we finished resizing: */ 320 165 session().GetConsole().GetDisplay().ResizeCompleted(screenId()); 321 322 setMachineWindowResizeIgnored(oldIgnoreMainwndResize);323 166 324 167 /* Make sure that all posted signals are processed: */ … … 328 171 emit resizeHintDone(); 329 172 330 /* We also recalculate the desktop geometry if this is determined 331 * automatically. In fact, we only need this on the first resize, 332 * but it is done every time to keep the code simpler. */ 333 calculateDesktopGeometry(); 334 335 /* Enable frame-buffer resize watching: */ 336 if (isFrameBufferResizeIgnored()) 337 setFrameBufferResizeIgnored(false); 338 173 return true; 174 } 175 176 case VBoxDefs::SetRegionEventType: 177 { 178 UISetRegionEvent *pSetRegionEvent = static_cast<UISetRegionEvent*>(pEvent); 179 if (pSetRegionEvent->region() != m_lastVisibleRegion) 180 { 181 m_lastVisibleRegion = pSetRegionEvent->region(); 182 machineWindowWrapper()->machineWindow()->setMask(m_lastVisibleRegion); 183 } 339 184 return true; 340 185 } … … 349 194 if (pKeyEvent->key() == Qt::Key_Home) 350 195 { 351 /* In Qt4 it is not enough to just set the focus to menu-bar. 352 * So to get the menu-bar we have to send Qt::Key_Alt press/release events directly: */ 353 QKeyEvent e1(QEvent::KeyPress, Qt::Key_Alt, Qt::NoModifier); 354 QKeyEvent e2(QEvent::KeyRelease, Qt::Key_Alt, Qt::NoModifier); 355 QMenuBar *pMenuBar = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 356 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar() : 0; 357 QApplication::sendEvent(pMenuBar, &e1); 358 QApplication::sendEvent(pMenuBar, &e2); 196 #if 0 // TODO: Activate Main Menu! 197 // should we create it first? 198 #endif 359 199 } 360 200 else … … 368 208 } 369 209 370 bool UIMachineViewNormal::eventFilter(QObject *pWatched, QEvent *pEvent) 371 { 372 /* Who are we watchin? */ 373 QIMainDialog *pMainDialog = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 374 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow()) : 0; 375 QMenuBar *pMenuBar = pMainDialog ? qobject_cast<QIMainDialog*>(pMainDialog)->menuBar() : 0; 376 377 if (pWatched != 0 && pWatched == pMainDialog) 378 { 379 switch (pEvent->type()) 380 { 381 case QEvent::Resize: 382 { 383 /* Set the "guest needs to resize" hint. 384 * This hint is acted upon when (and only when) the autoresize property is "true": */ 385 m_fShouldWeDoResize = uisession()->isGuestSupportsGraphics(); 386 if (!isMachineWindowResizeIgnored() && m_bIsGuestAutoresizeEnabled && uisession()->isGuestSupportsGraphics()) 387 QTimer::singleShot(300, this, SLOT(sltPerformGuestResize())); 388 break; 389 } 390 #if defined (Q_WS_WIN32) 391 # if defined (VBOX_GUI_USE_DDRAW) 392 case QEvent::Move: 393 { 394 /* Notification from our parent that it has moved. We need this in order 395 * to possibly adjust the direct screen blitting: */ 396 if (frameBuffer()) 397 frameBuffer()->moveEvent(static_cast<QMoveEvent*>(pEvent)); 398 break; 399 } 400 # endif 401 #endif /* defined (Q_WS_WIN32) */ 402 default: 403 break; 404 } 405 } 406 else if (pWatched != 0 && pWatched == pMenuBar) 210 bool UIMachineViewSeamless::eventFilter(QObject *pWatched, QEvent *pEvent) 211 { 212 #ifdef Q_WS_MAC // TODO: Is it really needed? 213 QMenuBar *pMenuBar = machineWindowWrapper() && machineWindowWrapper()->machineWindow() ? 214 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar() : 0; 215 if (pWatched != 0 && pWatched == pMenuBar) 407 216 { 408 217 /* Sometimes when we press ESC in the menu it brings the focus away (Qt bug?) … … 429 238 } 430 239 } 240 #endif /* Q_WS_MAC */ 431 241 return UIMachineView::eventFilter(pWatched, pEvent); 432 242 } 433 243 244 void UIMachineViewSeamless::prepareBackup() 245 { 246 /* Store old machine view size before bramebuffer resized: */ 247 m_normalSize = QSize(frameBuffer()->width(), frameBuffer()->height()); 248 } 249 250 void UIMachineViewSeamless::prepareFilters() 251 { 252 /* Base class filters: */ 253 UIMachineView::prepareFilters(); 254 255 #ifdef Q_WS_MAC // TODO: Is it really needed? See UIMachineViewSeamless::eventFilter(...); 256 /* Menu bar filters: */ 257 qobject_cast<QIMainDialog*>(machineWindowWrapper()->machineWindow())->menuBar()->installEventFilter(this); 258 #endif 259 } 260 261 void UIMachineViewSeamless::prepareConnections() 262 { 263 connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(sltDesktopResized())); 264 } 265 266 void UIMachineViewSeamless::prepareConsoleConnections() 267 { 268 /* Base class connections: */ 269 UIMachineView::prepareConsoleConnections(); 270 271 /* Guest additions state-change updater: */ 272 connect(uisession(), SIGNAL(sigAdditionsStateChange()), this, SLOT(sltAdditionsStateChanged())); 273 } 274 275 void UIMachineViewSeamless::prepareSeamless() 276 { 277 session().GetConsole().GetDisplay().SetSeamlessMode(true); 278 session().GetConsole().GetDisplay().SetVideoModeHint(machineWindowWrapper()->machineWindow()->width(), 279 machineWindowWrapper()->machineWindow()->height(), 0, screenId()); 280 } 281 282 void UIMachineViewSeamless::cleanupSeamless() 283 { 284 /* Send normal size-hint to the guest: */ 285 session().GetConsole().GetDisplay().SetSeamlessMode(false); 286 session().GetConsole().GetDisplay().SetVideoModeHint(m_normalSize.width(), m_normalSize.height(), 0, screenId()); 287 } 288 289 QRect UIMachineViewSeamless::availableGeometry() 290 { 291 return QApplication::desktop()->availableGeometry(this); 292 } 293 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.h
r27006 r27012 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineView Normalclass declaration4 * UIMachineViewSeamless class declaration 5 5 */ 6 6 … … 21 21 */ 22 22 23 #ifndef ___UIMachineView Normal_h___24 #define ___UIMachineView Normal_h___23 #ifndef ___UIMachineViewSeamless_h___ 24 #define ___UIMachineViewSeamless_h___ 25 25 26 26 /* Local includes */ 27 27 #include "UIMachineView.h" 28 28 29 class UIMachineView Normal: public UIMachineView29 class UIMachineViewSeamless : public UIMachineView 30 30 { 31 31 Q_OBJECT; 32 33 signals:34 35 /* Utility signals: */36 void resizeHintDone();37 32 38 33 protected: 39 34 40 35 /* Normal machine view constructor/destructor: */ 41 UIMachineView Normal( UIMachineWindow *pMachineWindow42 , VBoxDefs::RenderMode renderMode36 UIMachineViewSeamless( UIMachineWindow *pMachineWindow 37 , VBoxDefs::RenderMode renderMode 43 38 #ifdef VBOX_WITH_VIDEOHWACCEL 44 , bool bAccelerate2DVideo39 , bool bAccelerate2DVideo 45 40 #endif 46 , ulong uMonitor);47 virtual ~UIMachineView Normal();41 , ulong uMonitor); 42 virtual ~UIMachineViewSeamless(); 48 43 49 44 private slots: … … 52 47 void sltAdditionsStateChanged(); 53 48 54 /* Slot to perform guest resize: */55 void sltPerformGuestResize(const QSize &size = QSize());56 57 49 /* Watch dog for desktop resizes: */ 58 50 void sltDesktopResized(); … … 60 52 private: 61 53 62 /* Prepare helpers: */63 void prepareFilters();64 void prepareConsoleConnections();65 void loadMachineViewSettings();66 67 /* Cleanup helpers: */68 //void saveMachineViewSettings() {}69 //void cleanupConsoleConnections() {}70 //cleanupFilters() {}71 72 /* Hidden setters: */73 void setGuestAutoresizeEnabled(bool bEnabled);74 75 /* Private helpers: */76 void normalizeGeometry(bool fAdjustPosition);77 QRect availableGeometry();78 void maybeRestrictMinimumSize();79 80 54 /* Event handlers: */ 81 55 bool event(QEvent *pEvent); 82 56 bool eventFilter(QObject *pWatched, QEvent *pEvent); 83 57 84 /* Private members: */ 85 bool m_bIsGuestAutoresizeEnabled : 1; 86 bool m_fShouldWeDoResize : 1; 58 /* Prepare helpers: */ 59 void prepareBackup(); 60 void prepareFilters(); 61 void prepareConnections(); 62 void prepareConsoleConnections(); 63 void prepareSeamless(); 64 65 /* Cleanup helpers: */ 66 void cleanupSeamless(); 67 //void cleanupConsoleConnections() {} 68 //void prepareConnections() {} 69 //void cleanupFilters() {} 70 //void prepareBackup() {} 71 72 /* Private helpers: */ 73 QRect availableGeometry(); 74 75 /* Private variables: */ 76 QRegion m_lastVisibleRegion; 77 QSize m_normalSize; 87 78 88 79 /* Friend classes: */ … … 90 81 }; 91 82 92 #endif // !___UIMachineView Normal_h___83 #endif // !___UIMachineViewSeamless_h___ 93 84 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r27006 r27012 3 3 * 4 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * UIMachineWindow Normalclass implementation5 * UIMachineWindowSeamless class implementation 6 6 */ 7 7 … … 24 24 /* Global includes */ 25 25 #include <QDesktopWidget> 26 #i nclude <QMenuBar>27 # include <QTimer>28 # include <QContextMenuEvent>26 #ifdef Q_WS_MAC 27 # include <QMenuBar> 28 #endif /* Q_WS_MAC */ 29 29 30 30 /* Local includes */ 31 31 #include "VBoxGlobal.h" 32 32 33 #i nclude "UISession.h"34 # include "UIActionsPool.h"35 # include "UIIndicatorsPool.h"33 #ifdef Q_WS_MAC 34 # include "UISession.h" 35 #endif /* Q_WS_MAC */ 36 36 #include "UIMachineLogic.h" 37 37 #include "UIMachineView.h" 38 #include "UIMachineWindowNormal.h" 39 40 #include "QIStatusBar.h" 41 #include "QIStateIndicator.h" 42 #include "QIHotKeyEdit.h" 43 44 UIMachineWindowNormal::UIMachineWindowNormal(UIMachineLogic *pMachineLogic, ulong uScreenId) 45 : QIWithRetranslateUI<QIMainDialog>(0) 38 #include "UIMachineWindowSeamless.h" 39 40 UIMachineWindowSeamless::UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId) 41 : QIWithRetranslateUI2<QIMainDialog>(0, Qt::FramelessWindowHint) 46 42 , UIMachineWindow(pMachineLogic, uScreenId) 47 , m_pIndicatorsPool(new UIIndicatorsPool(pMachineLogic->uisession()->session(), this))48 , m_pIdleTimer(0)49 43 { 50 44 /* "This" is machine window: */ … … 57 51 prepareConsoleConnections(); 58 52 53 /* Prepare seamless window: */ 54 prepareSeamless(); 55 56 #ifdef Q_WS_MAC 59 57 /* Prepare menu: */ 60 58 prepareMenu(); 61 62 /* Prepare status bar: */ 63 prepareStatusBar(); 64 65 /* Prepare connections: */ 66 prepareConnections(); 67 68 /* Retranslate normal window finally: */ 59 #endif /* Q_WS_MAC */ 60 61 /* Retranslate seamless window finally: */ 69 62 retranslateUi(); 70 63 … … 75 68 prepareMachineView(); 76 69 70 #ifdef Q_WS_MAC 77 71 /* Load normal window settings: */ 78 72 loadWindowSettings(); 73 #endif /* Q_WS_MAC */ 79 74 80 75 /* Update all the elements: */ … … 85 80 } 86 81 87 UIMachineWindowNormal::~UIMachineWindowNormal() 88 { 89 /* Save normal window settings: */ 90 saveWindowSettings(); 91 82 UIMachineWindowSeamless::~UIMachineWindowSeamless() 83 { 92 84 /* Cleanup normal machine view: */ 93 85 cleanupMachineView(); 94 95 /* Cleanup status-bar: */ 96 cleanupStatusBar(); 97 } 98 99 void UIMachineWindowNormal::sltMachineStateChanged() 86 } 87 88 void UIMachineWindowSeamless::sltMachineStateChanged() 100 89 { 101 90 UIMachineWindow::sltMachineStateChanged(); 102 91 } 103 92 104 void UIMachineWindowNormal::sltMediumChange(const CMediumAttachment &attachment) 105 { 106 KDeviceType type = attachment.GetType(); 107 if (type == KDeviceType_HardDisk) 108 updateAppearanceOf(UIVisualElement_HDStuff); 109 if (type == KDeviceType_DVD) 110 updateAppearanceOf(UIVisualElement_CDStuff); 111 if (type == KDeviceType_Floppy) 112 updateAppearanceOf(UIVisualElement_FDStuff); 113 } 114 115 void UIMachineWindowNormal::sltUSBControllerChange() 116 { 117 updateAppearanceOf(UIVisualElement_USBStuff); 118 } 119 120 void UIMachineWindowNormal::sltUSBDeviceStateChange() 121 { 122 updateAppearanceOf(UIVisualElement_USBStuff); 123 } 124 125 void UIMachineWindowNormal::sltNetworkAdapterChange() 126 { 127 updateAppearanceOf(UIVisualElement_NetworkStuff); 128 } 129 130 void UIMachineWindowNormal::sltSharedFolderChange() 131 { 132 updateAppearanceOf(UIVisualElement_SharedFolderStuff); 133 } 134 135 void UIMachineWindowNormal::sltTryClose() 93 void UIMachineWindowSeamless::sltTryClose() 136 94 { 137 95 UIMachineWindow::sltTryClose(); 138 96 } 139 97 140 void UIMachineWindowNormal::sltUpdateIndicators() 141 { 142 CConsole console = session().GetConsole(); 143 QIStateIndicator *pStateIndicator = 0; 144 145 pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_HardDisks); 146 if (pStateIndicator->state() != KDeviceActivity_Null) 147 { 148 int state = console.GetDeviceActivity(KDeviceType_HardDisk); 149 if (pStateIndicator->state() != state) 150 pStateIndicator->setState(state); 151 } 152 pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks); 153 if (pStateIndicator->state() != KDeviceActivity_Null) 154 { 155 int state = console.GetDeviceActivity(KDeviceType_DVD); 156 if (pStateIndicator->state() != state) 157 pStateIndicator->setState(state); 158 } 159 pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_USBDevices); 160 if (pStateIndicator->state() != KDeviceActivity_Null) 161 { 162 int state = console.GetDeviceActivity(KDeviceType_USB); 163 if (pStateIndicator->state() != state) 164 pStateIndicator->setState(state); 165 } 166 pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters); 167 if (pStateIndicator->state() != KDeviceActivity_Null) 168 { 169 int state = console.GetDeviceActivity(KDeviceType_Network); 170 if (pStateIndicator->state() != state) 171 pStateIndicator->setState(state); 172 } 173 pStateIndicator = indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders); 174 if (pStateIndicator->state() != KDeviceActivity_Null) 175 { 176 int state = console.GetDeviceActivity(KDeviceType_SharedFolder); 177 if (pStateIndicator->state() != state) 178 pStateIndicator->setState(state); 179 } 180 } 181 182 void UIMachineWindowNormal::sltShowIndicatorsContextMenu(QIStateIndicator *pIndicator, QContextMenuEvent *pEvent) 183 { 184 if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks)) 185 { 186 if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices)->isEnabled()) 187 machineLogic()->actionsPool()->action(UIActionIndex_Menu_OpticalDevices)->menu()->exec(pEvent->globalPos()); 188 } 189 else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)) 190 { 191 if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->isEnabled()) 192 machineLogic()->actionsPool()->action(UIActionIndex_Menu_USBDevices)->menu()->exec(pEvent->globalPos()); 193 } 194 else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters)) 195 { 196 if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_NetworkAdapters)->isEnabled()) 197 machineLogic()->actionsPool()->action(UIActionIndex_Menu_NetworkAdapters)->menu()->exec(pEvent->globalPos()); 198 } 199 else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders)) 200 { 201 if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_SharedFolders)->isEnabled()) 202 machineLogic()->actionsPool()->action(UIActionIndex_Menu_SharedFolders)->menu()->exec(pEvent->globalPos()); 203 } 204 else if (pIndicator == indicatorsPool()->indicator(UIIndicatorIndex_Mouse)) 205 { 206 if (machineLogic()->actionsPool()->action(UIActionIndex_Menu_MouseIntegration)->isEnabled()) 207 machineLogic()->actionsPool()->action(UIActionIndex_Menu_MouseIntegration)->menu()->exec(pEvent->globalPos()); 208 } 209 } 210 211 void UIMachineWindowNormal::sltProcessGlobalSettingChange(const char * /* aPublicName */, const char * /* aName */) 212 { 213 m_pNameHostkey->setText(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey())); 214 } 215 216 void UIMachineWindowNormal::retranslateUi() 98 void UIMachineWindowSeamless::retranslateUi() 217 99 { 218 100 /* Translate parent class: */ … … 225 107 // m_pDockEnablePreviewMonitor->setText(tr("Show Monitor Preview")); 226 108 #endif /* Q_WS_MAC */ 227 228 m_pNameHostkey->setToolTip(229 tr("Shows the currently assigned Host key.<br>"230 "This key, when pressed alone, toggles the keyboard and mouse "231 "capture state. It can also be used in combination with other keys "232 "to quickly perform actions from the main menu."));233 m_pNameHostkey->setText(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey()));234 }235 236 void UIMachineWindowNormal::updateAppearanceOf(int iElement)237 {238 /* Update parent-class window: */239 UIMachineWindow::updateAppearanceOf(iElement);240 241 /* Update that machine window: */242 if (iElement & UIVisualElement_HDStuff)243 indicatorsPool()->indicator(UIIndicatorIndex_HardDisks)->updateAppearance();244 if (iElement & UIVisualElement_CDStuff)245 indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks)->updateAppearance();246 if (iElement & UIVisualElement_USBStuff &&247 !indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->isHidden())248 indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->updateAppearance();249 if (iElement & UIVisualElement_NetworkStuff)250 indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters)->updateAppearance();251 if (iElement & UIVisualElement_SharedFolderStuff)252 indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders)->updateAppearance();253 if (iElement & UIVisualElement_VirtualizationStuff)254 indicatorsPool()->indicator(UIIndicatorIndex_Virtualization)->updateAppearance();255 }256 257 bool UIMachineWindowNormal::event(QEvent *pEvent)258 {259 switch (pEvent->type())260 {261 case QEvent::Resize:262 {263 QResizeEvent *pResizeEvent = static_cast<QResizeEvent*>(pEvent);264 if (!isMaximized())265 {266 m_normalGeometry.setSize(pResizeEvent->size());267 #ifdef VBOX_WITH_DEBUGGER_GUI268 // TODO: Update debugger window size!269 //dbgAdjustRelativePos();270 #endif271 }272 break;273 }274 case QEvent::Move:275 {276 if (!isMaximized())277 {278 m_normalGeometry.moveTo(geometry().x(), geometry().y());279 #ifdef VBOX_WITH_DEBUGGER_GUI280 // TODO: Update debugger window position!281 //dbgAdjustRelativePos();282 #endif283 }284 break;285 }286 default:287 break;288 }289 return QIWithRetranslateUI<QIMainDialog>::event(pEvent);290 109 } 291 110 292 111 #ifdef Q_WS_X11 293 bool UIMachineWindow Normal::x11Event(XEvent *pEvent)112 bool UIMachineWindowSeamless::x11Event(XEvent *pEvent) 294 113 { 295 114 /* Qt bug: when the console view grabs the keyboard, FocusIn, FocusOut, … … 312 131 #endif 313 132 314 void UIMachineWindow Normal::closeEvent(QCloseEvent *pEvent)133 void UIMachineWindowSeamless::closeEvent(QCloseEvent *pEvent) 315 134 { 316 135 return UIMachineWindow::closeEvent(pEvent); 317 136 } 318 137 319 void UIMachineWindowNormal::prepareConsoleConnections() 320 { 321 /* Base-class connections: */ 322 UIMachineWindow::prepareConsoleConnections(); 323 324 /* Medium change updater: */ 325 connect(machineLogic()->uisession(), SIGNAL(sigMediumChange(const CMediumAttachment &)), 326 this, SLOT(sltMediumChange(const CMediumAttachment &))); 327 328 /* USB controller change updater: */ 329 connect(machineLogic()->uisession(), SIGNAL(sigUSBControllerChange()), 330 this, SLOT(sltUSBControllerChange())); 331 332 /* USB device state-change updater: */ 333 connect(machineLogic()->uisession(), SIGNAL(sigUSBDeviceStateChange(const CUSBDevice &, bool, const CVirtualBoxErrorInfo &)), 334 this, SLOT(sltUSBDeviceStateChange())); 335 336 /* Network adapter change updater: */ 337 connect(machineLogic()->uisession(), SIGNAL(sigNetworkAdapterChange(const CNetworkAdapter &)), 338 this, SLOT(sltNetworkAdapterChange())); 339 340 /* Shared folder change updater: */ 341 connect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()), 342 this, SLOT(sltSharedFolderChange())); 343 } 344 345 void UIMachineWindowNormal::prepareMenu() 138 void UIMachineWindowSeamless::prepareSeamless() 139 { 140 /* Move & resize seamless frameless window: */ 141 QRect geometry = QApplication::desktop()->availableGeometry(); 142 #ifdef Q_WS_WIN 143 m_prevRegion = geometry; 144 #endif 145 move(geometry.topLeft()); 146 resize(geometry.size()); 147 /* Perform these events: */ 148 qApp->processEvents(); 149 } 150 151 #ifdef Q_WS_MAC 152 void UIMachineWindowSeamless::prepareMenu() 346 153 { 347 154 setMenuBar(uisession()->newMenuBar()); 348 155 } 349 350 void UIMachineWindowNormal::prepareStatusBar() 351 { 352 /* Common setup: */ 353 setStatusBar(new QIStatusBar(this)); 354 QWidget *pIndicatorBox = new QWidget; 355 QHBoxLayout *pIndicatorBoxHLayout = new QHBoxLayout(pIndicatorBox); 356 VBoxGlobal::setLayoutMargin(pIndicatorBoxHLayout, 0); 357 pIndicatorBoxHLayout->setSpacing(5); 358 359 /* Hard Disks: */ 360 pIndicatorBoxHLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_HardDisks)); 361 362 /* Optical Disks: */ 363 QIStateIndicator *pLedOpticalDisks = indicatorsPool()->indicator(UIIndicatorIndex_OpticalDisks); 364 pIndicatorBoxHLayout->addWidget(pLedOpticalDisks); 365 connect(pLedOpticalDisks, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 366 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 367 368 /* USB Devices: */ 369 QIStateIndicator *pLedUSBDevices = indicatorsPool()->indicator(UIIndicatorIndex_USBDevices); 370 pIndicatorBoxHLayout->addWidget(pLedUSBDevices); 371 connect(pLedUSBDevices, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 372 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 373 374 /* Network Adapters: */ 375 QIStateIndicator *pLedNetworkAdapters = indicatorsPool()->indicator(UIIndicatorIndex_NetworkAdapters); 376 pIndicatorBoxHLayout->addWidget(pLedNetworkAdapters); 377 connect(pLedNetworkAdapters, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 378 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 379 380 /* Shared Folders: */ 381 QIStateIndicator *pLedSharedFolders = indicatorsPool()->indicator(UIIndicatorIndex_SharedFolders); 382 pIndicatorBoxHLayout->addWidget(pLedSharedFolders); 383 connect(pLedSharedFolders, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 384 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 385 386 /* Virtualization: */ 387 pIndicatorBoxHLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_Virtualization)); 388 389 /* Separator: */ 390 QFrame *pSeparator = new QFrame; 391 pSeparator->setFrameStyle(QFrame::VLine | QFrame::Sunken); 392 pIndicatorBoxHLayout->addWidget(pSeparator); 393 394 /* Mouse: */ 395 QIStateIndicator *pLedMouse = indicatorsPool()->indicator(UIIndicatorIndex_Mouse); 396 pIndicatorBoxHLayout->addWidget(pLedMouse); 397 connect(pLedMouse, SIGNAL(contextMenuRequested(QIStateIndicator*, QContextMenuEvent*)), 398 this, SLOT(sltShowIndicatorsContextMenu(QIStateIndicator*, QContextMenuEvent*))); 399 400 /* Host Key: */ 401 m_pCntHostkey = new QWidget; 402 QHBoxLayout *pHostkeyLedContainerLayout = new QHBoxLayout(m_pCntHostkey); 403 VBoxGlobal::setLayoutMargin(pHostkeyLedContainerLayout, 0); 404 pHostkeyLedContainerLayout->setSpacing(3); 405 pIndicatorBoxHLayout->addWidget(m_pCntHostkey); 406 pHostkeyLedContainerLayout->addWidget(indicatorsPool()->indicator(UIIndicatorIndex_Hostkey)); 407 m_pNameHostkey = new QLabel(QIHotKeyEdit::keyName(vboxGlobal().settings().hostKey())); 408 pHostkeyLedContainerLayout->addWidget(m_pNameHostkey); 409 410 /* Add to statusbar: */ 411 statusBar()->addPermanentWidget(pIndicatorBox, 0); 412 413 /* Create & start timer to update LEDs: */ 414 m_pIdleTimer = new QTimer(this); 415 connect(m_pIdleTimer, SIGNAL(timeout()), this, SLOT(sltUpdateIndicators())); 416 m_pIdleTimer->start(50); 417 418 #ifdef Q_WS_MAC 419 /* For the status bar on Cocoa: */ 420 setUnifiedTitleAndToolBarOnMac(true); 421 #endif 422 } 423 424 void UIMachineWindowNormal::prepareConnections() 425 { 426 /* Setup global settings change updater: */ 427 connect(&vboxGlobal().settings(), SIGNAL(propertyChanged(const char *, const char *)), 428 this, SLOT(sltProcessGlobalSettingChange(const char *, const char *))); 429 } 430 431 void UIMachineWindowNormal::prepareMachineView() 156 #endif 157 158 void UIMachineWindowSeamless::prepareMachineView() 432 159 { 433 160 #ifdef VBOX_WITH_VIDEOHWACCEL … … 452 179 /* Add machine view into layout: */ 453 180 m_pMachineViewContainer->addWidget(m_pMachineView, 1, 1); 454 455 /* Setup machine view connections: */ 456 if (machineView()) 457 { 458 /* Keyboard state-change updater: */ 459 connect(machineView(), SIGNAL(keyboardStateChanged(int)), indicatorsPool()->indicator(UIIndicatorIndex_Hostkey), SLOT(setState(int))); 460 461 /* Mouse state-change updater: */ 462 connect(machineView(), SIGNAL(mouseStateChanged(int)), indicatorsPool()->indicator(UIIndicatorIndex_Mouse), SLOT(setState(int))); 463 464 /* Early initialize required connections: */ 465 indicatorsPool()->indicator(UIIndicatorIndex_Hostkey)->setState(machineView()->keyboardState()); 466 indicatorsPool()->indicator(UIIndicatorIndex_Mouse)->setState(machineView()->mouseState()); 467 } 468 } 469 470 void UIMachineWindowNormal::loadWindowSettings() 471 { 472 /* Load normal window settings: */ 473 CMachine machine = session().GetMachine(); 474 475 /* Load extra-data settings: */ 476 { 477 QString strPositionSettings = machine.GetExtraData(VBoxDefs::GUI_LastWindowPosition); 478 479 bool ok = false, max = false; 480 int x = 0, y = 0, w = 0, h = 0; 481 x = strPositionSettings.section(',', 0, 0).toInt(&ok); 482 if (ok) 483 y = strPositionSettings.section(',', 1, 1).toInt(&ok); 484 if (ok) 485 w = strPositionSettings.section(',', 2, 2).toInt(&ok); 486 if (ok) 487 h = strPositionSettings.section(',', 3, 3).toInt(&ok); 488 if (ok) 489 max = strPositionSettings.section(',', 4, 4) == VBoxDefs::GUI_LastWindowPosition_Max; 490 491 QRect ar = ok ? QApplication::desktop()->availableGeometry(QPoint(x, y)) : 492 QApplication::desktop()->availableGeometry(machineWindow()); 493 494 if (ok /* if previous parameters were read correctly */) 495 { 496 m_normalGeometry = QRect(x, y, w, h); 497 setGeometry(m_normalGeometry); 498 499 /* Normalize view to the optimal size */ 500 if (machineView()) 501 machineView()->normalizeGeometry(true /* adjust position? */); 502 503 /* Maximize if needed: */ 504 if (max) 505 setWindowState(windowState() | Qt::WindowMaximized); 506 } 507 else 508 { 509 /* Normalize to the optimal size */ 510 if (machineView()) 511 machineView()->normalizeGeometry(true /* adjust position? */); 512 513 /* Move newly created window to the screen center: */ 514 m_normalGeometry = geometry(); 515 m_normalGeometry.moveCenter(ar.center()); 516 setGeometry(m_normalGeometry); 517 } 518 } 519 520 /* Load availability settings: */ 521 { 522 /* USB Stuff: */ 523 CUSBController usbController = machine.GetUSBController(); 524 if (usbController.isNull()) 525 { 526 /* Hide USB Menu: */ 527 indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->setHidden(true); 528 } 529 else 530 { 531 /* Toggle USB LED: */ 532 indicatorsPool()->indicator(UIIndicatorIndex_USBDevices)->setState( 533 usbController.GetEnabled() ? KDeviceActivity_Idle : KDeviceActivity_Null); 534 } 535 } 536 181 } 182 183 #ifdef Q_WS_MAC 184 void UIMachineWindowSeamless::loadWindowSettings() 185 { 537 186 /* Load global settings: */ 538 187 { 539 188 VBoxGlobalSettings settings = vboxGlobal().settings(); 540 189 menuBar()->setHidden(settings.isFeatureActive("noMenuBar")); 541 statusBar()->setHidden(settings.isFeatureActive("noStatusBar")); 542 } 543 } 544 545 void UIMachineWindowNormal::saveWindowSettings() 546 { 547 CMachine machine = session().GetMachine(); 548 549 /* Save extra-data settings: */ 550 { 551 QString strWindowPosition = QString("%1,%2,%3,%4") 552 .arg(m_normalGeometry.x()).arg(m_normalGeometry.y()) 553 .arg(m_normalGeometry.width()).arg(m_normalGeometry.height()); 554 if (isMaximized()) 555 strWindowPosition += QString(",%1").arg(VBoxDefs::GUI_LastWindowPosition_Max); 556 machine.SetExtraData(VBoxDefs::GUI_LastWindowPosition, strWindowPosition); 557 } 558 } 559 560 void UIMachineWindowNormal::cleanupMachineView() 190 } 191 } 192 #endif 193 194 void UIMachineWindowSeamless::cleanupMachineView() 561 195 { 562 196 /* Do not cleanup machine view if it is not present: */ … … 568 202 } 569 203 570 void UIMachineWindowNormal::cleanupStatusBar() 571 { 572 /* Stop LED-update timer: */ 573 m_pIdleTimer->stop(); 574 m_pIdleTimer->disconnect(SIGNAL(timeout()), this, SLOT(sltUpdateIndicators())); 575 } 576 204 void UIMachineWindowSeamless::setMask(const QRegion &constRegion) 205 { 206 QRegion region = constRegion; 207 208 #if 0 // TODO: Is it really needed now? 209 /* The global mask shift cause of toolbars and such things. */ 210 region.translate(mMaskShift.width(), mMaskShift.height()); 211 #endif 212 213 #if 0 // TODO: Add mini-toolbar support! 214 /* Including mini toolbar area */ 215 QRegion toolBarRegion(mMiniToolBar->mask()); 216 toolBarRegion.translate(mMiniToolBar->mapToGlobal (toolBarRegion.boundingRect().topLeft()) - QPoint (1, 0)); 217 region += toolBarRegion; 218 #endif 219 220 #if 0 // TODO: Is it really needed now? 221 /* Restrict the drawing to the available space on the screen. 222 * (The &operator is better than the previous used -operator, 223 * because this excludes space around the real screen also. 224 * This is necessary for the mac.) */ 225 region &= mStrictedRegion; 226 #endif 227 228 #ifdef Q_WS_WIN 229 QRegion difference = m_prevRegion.subtract(region); 230 231 /* Region offset calculation */ 232 int fleft = 0, ftop = 0; 233 234 /* Visible region calculation */ 235 HRGN newReg = CreateRectRgn(0, 0, 0, 0); 236 CombineRgn(newReg, region.handle(), 0, RGN_COPY); 237 OffsetRgn(newReg, fleft, ftop); 238 239 /* Invisible region calculation */ 240 HRGN diffReg = CreateRectRgn(0, 0, 0, 0); 241 CombineRgn(diffReg, difference.handle(), 0, RGN_COPY); 242 OffsetRgn(diffReg, fleft, ftop); 243 244 /* Set the current visible region and clean the previous */ 245 SetWindowRgn(winId(), newReg, FALSE); 246 RedrawWindow(0, 0, diffReg, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ALLCHILDREN); 247 RedrawWindow(mConsole->viewport()->winId(), 0, 0, RDW_INVALIDATE); 248 249 m_prevRegion = region; 250 #elif defined (Q_WS_MAC) 251 # if defined (VBOX_GUI_USE_QUARTZ2D) 252 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode) 253 { 254 /* If we are using the Quartz2D backend we have to trigger 255 * an repaint only. All the magic clipping stuff is done 256 * in the paint engine. */ 257 ::darwinWindowInvalidateShape (mConsole->viewport()); 258 } 259 else 260 # endif 261 { 262 /* This is necessary to avoid the flicker by an mask update. 263 * See http://lists.apple.com/archives/Carbon-development/2001/Apr/msg01651.html 264 * for the hint. 265 * There *must* be a better solution. */ 266 if (!region.isEmpty()) 267 region |= QRect (0, 0, 1, 1); 268 // /* Save the current region for later processing in the darwin event handler. */ 269 // mCurrRegion = region; 270 // /* We repaint the screen before the ReshapeCustomWindow command. Unfortunately 271 // * this command flushes a copy of the backbuffer to the screen after the new 272 // * mask is set. This leads into a missplaced drawing of the content. Currently 273 // * no alternative to this and also this is not 100% perfect. */ 274 // repaint(); 275 // qApp->processEvents(); 276 // /* Now force the reshaping of the window. This is definitly necessary. */ 277 // ReshapeCustomWindow (reinterpret_cast <WindowPtr> (winId())); 278 QMainWindow::setMask (region); 279 // HIWindowInvalidateShadow (::darwinToWindowRef (mConsole->viewport())); 280 } 281 #else 282 QMainWindow::setMask(region); 283 #endif 284 } 285 286 void UIMachineWindowSeamless::clearMask() 287 { 288 #ifdef Q_WS_WIN 289 SetWindowRgn(winId(), 0, TRUE); 290 #else 291 QMainWindow::clearMask(); 292 #endif 293 } 294 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.h
r27006 r27012 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIMachineWindow Normalclass declaration4 * UIMachineWindowSeamless class declaration 5 5 */ 6 6 … … 21 21 */ 22 22 23 #ifndef __UIMachineWindowNormal_h__ 24 #define __UIMachineWindowNormal_h__ 25 26 /* Global includes */ 27 #include <QLabel> 23 #ifndef __UIMachineWindowSeamless_h__ 24 #define __UIMachineWindowSeamless_h__ 28 25 29 26 /* Local includes */ 30 #include "VBoxDefs.h"31 27 #include "QIWithRetranslateUI.h" 32 28 #include "QIMainDialog.h" … … 36 32 #endif 37 33 38 /* Local forwards */ 39 class CMediumAttachment; 40 class UIIndicatorsPool; 41 class QIStateIndicator; 42 43 class UIMachineWindowNormal : public QIWithRetranslateUI<QIMainDialog>, public UIMachineWindow 34 class UIMachineWindowSeamless : public QIWithRetranslateUI2<QIMainDialog>, public UIMachineWindow 44 35 { 45 36 Q_OBJECT; … … 47 38 protected: 48 39 49 /* Normalmachine window constructor/destructor: */50 UIMachineWindow Normal(UIMachineLogic *pMachineLogic, ulong uScreenId);51 virtual ~UIMachineWindow Normal();40 /* Seamless machine window constructor/destructor: */ 41 UIMachineWindowSeamless(UIMachineLogic *pMachineLogic, ulong uScreenId); 42 virtual ~UIMachineWindowSeamless(); 52 43 53 44 private slots: … … 55 46 /* Console callback handlers: */ 56 47 void sltMachineStateChanged(); 57 void sltMediumChange(const CMediumAttachment &attachment);58 void sltUSBControllerChange();59 void sltUSBDeviceStateChange();60 void sltNetworkAdapterChange();61 void sltSharedFolderChange();62 63 /* LED connections: */64 void sltUpdateIndicators();65 void sltShowIndicatorsContextMenu(QIStateIndicator *pIndicator, QContextMenuEvent *pEvent);66 void sltProcessGlobalSettingChange(const char *aPublicName, const char *aName);67 48 68 49 /* Close window reimplementation: */ … … 74 55 void retranslateUi(); 75 56 76 /* Update routines: */77 void updateAppearanceOf(int aElement);78 79 57 /* Event handlers: */ 80 bool event(QEvent *pEvent);81 58 #ifdef Q_WS_X11 82 59 bool x11Event(XEvent *pEvent); … … 84 61 void closeEvent(QCloseEvent *pEvent); 85 62 86 /* Private getters: */87 UIIndicatorsPool* indicatorsPool() { return m_pIndicatorsPool; }88 89 63 /* Prepare helpers: */ 90 void prepareConsoleConnections(); 64 void prepareSeamless(); 65 #ifdef Q_WS_MAC 91 66 void prepareMenu(); 92 void prepareStatusBar(); 93 void prepareConnections(); 67 #endif 94 68 void prepareMachineView(); 69 #ifdef Q_WS_MAC 95 70 void loadWindowSettings(); 71 #endif 96 72 97 73 /* Cleanup helpers: */ 98 void saveWindowSettings(); 74 #ifdef Q_WS_MAC 75 //void saveWindowSettings() {} 76 #endif 99 77 void cleanupMachineView(); 100 //void cleanupConnections() {} 101 void cleanupStatusBar(); 78 #ifdef Q_WS_MAC 102 79 //void cleanupMenu() {} 103 //void cleanupConsoleConnections() {} 80 #endif 81 //void cleanupSeamless() {} 104 82 105 /* Indicators pool: */106 UIIndicatorsPool *m_pIndicatorsPool;107 /* Other QWidgets: */108 QWidget *m_pCntHostkey;109 QLabel *m_pNameHostkey;110 /* Other QObjects: */111 QTimer *m_pIdleTimer;112 83 /* Other members: */ 113 QRect m_normalGeometry; 84 void setMask(const QRegion ®ion); 85 void clearMask(); 86 87 /* Private variables: */ 88 #ifdef Q_WS_WIN 89 QRegion m_prevRegion; 90 #endif 114 91 115 92 /* Factory support: */ … … 117 94 }; 118 95 119 #endif // __UIMachineWindow Normal_h__96 #endif // __UIMachineWindowSeamless_h__ 120 97
Note:
See TracChangeset
for help on using the changeset viewer.