Changeset 98451 in vbox for trunk/src/VBox
- Timestamp:
- Feb 2, 2023 3:47:01 PM (23 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r98432 r98451 1085 1085 } 1086 1086 1087 UISession *UIKeyboardHandler::uisession() const1088 {1089 return machineLogic()->uisession();1090 }1091 1092 1087 UIMachine *UIKeyboardHandler::uimachine() const 1093 1088 { … … 1095 1090 } 1096 1091 1097 CKeyboard &UIKeyboardHandler::keyboard() const1098 { 1099 return uisession()->keyboard();1092 CKeyboard &UIKeyboardHandler::keyboard() const 1093 { 1094 return machineLogic()->uisession()->keyboard(); 1100 1095 } 1101 1096 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.h
r98378 r98451 55 55 class UIMachineView; 56 56 class UIMachineWindow; 57 class UISession;58 57 class CKeyboard; 59 58 #ifdef VBOX_WS_WIN … … 148 147 UIMachineLogic *machineLogic() const { return m_pMachineLogic; } 149 148 UIActionPool *actionPool() const; 150 UISession *uisession() const;151 149 UIMachine *uimachine() const; 152 150 153 151 /** Returns the console's keyboard reference. */ 154 CKeyboard &keyboard() const;152 CKeyboard &keyboard() const; 155 153 156 154 /* Event handler for registered machine-view(s): */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98450 r98451 527 527 { 528 528 /* Create new machine-logic: */ 529 UIMachineLogic *pMachineLogic = UIMachineLogic::create(this, uisession(),visualState);529 UIMachineLogic *pMachineLogic = UIMachineLogic::create(this, visualState); 530 530 531 531 /* First we have to check if the selected machine-logic is available at all. -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98450 r98451 156 156 /* static */ 157 157 UIMachineLogic *UIMachineLogic::create(UIMachine *pMachine, 158 UISession *pSession,159 158 UIVisualStateType enmVisualStateType) 160 159 { 161 160 AssertPtrReturn(pMachine, 0); 162 AssertPtrReturn(pSession, 0);163 161 164 162 UIMachineLogic *pLogic = 0; … … 166 164 { 167 165 case UIVisualStateType_Normal: 168 pLogic = new UIMachineLogicNormal(pMachine , pSession);166 pLogic = new UIMachineLogicNormal(pMachine); 169 167 break; 170 168 case UIVisualStateType_Fullscreen: 171 pLogic = new UIMachineLogicFullscreen(pMachine , pSession);169 pLogic = new UIMachineLogicFullscreen(pMachine); 172 170 break; 173 171 case UIVisualStateType_Seamless: 174 pLogic = new UIMachineLogicSeamless(pMachine , pSession);172 pLogic = new UIMachineLogicSeamless(pMachine); 175 173 break; 176 174 case UIVisualStateType_Scale: 177 pLogic = new UIMachineLogicScale(pMachine , pSession);175 pLogic = new UIMachineLogicScale(pMachine); 178 176 break; 179 177 case UIVisualStateType_Invalid: … … 274 272 sltAdditionsStateChanged(); 275 273 sltMouseCapabilityChanged(); 274 } 275 276 UISession *UIMachineLogic::uisession() const 277 { 278 return uimachine()->uisession(); 276 279 } 277 280 … … 755 758 } 756 759 757 UIMachineLogic::UIMachineLogic(UIMachine *pMachine , UISession *pSession)760 UIMachineLogic::UIMachineLogic(UIMachine *pMachine) 758 761 : QIWithRetranslateUI3<QObject>(pMachine) 759 762 , m_pMachine(pMachine) 760 , m_pSession(pSession)761 763 , m_pKeyboardHandler(0) 762 764 , m_pMouseHandler(0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r98426 r98451 93 93 * @param pSession Brings the session this logic is created for. 94 94 * @param enmVisualStateType Brings the visual state type of logic to be created. */ 95 static UIMachineLogic *create(UIMachine *pMachine, UI Session *pSession, UIVisualStateType enmVisualStateType);95 static UIMachineLogic *create(UIMachine *pMachine, UIVisualStateType enmVisualStateType); 96 96 /** Factory function to destroy passed @a pLogic. */ 97 97 static void destroy(UIMachineLogic *pLogic); … … 115 115 UIMachine *uimachine() const { return m_pMachine; } 116 116 /** Returns session UI reference. */ 117 UISession *uisession() const { return m_pSession; } 118 117 UISession *uisession() const; 119 118 /** Returns action-pool reference. */ 120 119 UIActionPool *actionPool() const; … … 208 207 protected: 209 208 210 /** Constructs a logic passing @a pMachine and @a pSession to the base-class. 211 * @param pMachine Brings the machine this logic belongs to. 212 * @param pSession Brings the session this logic is created for. */ 213 UIMachineLogic(UIMachine *pMachine, UISession *pSession); 209 /** Constructs a logic passing @a pMachine to the base-class. 210 * @param pMachine Brings the machine this logic belongs to. */ 211 UIMachineLogic(UIMachine *pMachine); 214 212 /* Destructs the logic. */ 215 213 virtual ~UIMachineLogic() RT_OVERRIDE; … … 415 413 /* Private variables: */ 416 414 UIMachine *m_pMachine; 417 UISession *m_pSession;418 415 UIKeyboardHandler *m_pKeyboardHandler; 419 416 UIMouseHandler *m_pMouseHandler; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r98432 r98451 548 548 } 549 549 550 UISession *UIMouseHandler::uisession() const551 {552 return machineLogic()->uisession();553 }554 555 550 UIMachine *UIMouseHandler::uimachine() const 556 551 { … … 558 553 } 559 554 560 CDisplay &UIMouseHandler::display() const561 { 562 return uisession()->display();563 } 564 565 CMouse &UIMouseHandler::mouse() const566 { 567 return uisession()->mouse();555 CDisplay &UIMouseHandler::display() const 556 { 557 return machineLogic()->uisession()->display(); 558 } 559 560 CMouse &UIMouseHandler::mouse() const 561 { 562 return machineLogic()->uisession()->mouse(); 568 563 } 569 564 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.h
r98378 r98451 49 49 class UIMachineView; 50 50 class UIMachineWindow; 51 class UISession;52 51 class CDisplay; 53 52 class CMouse; … … 109 108 /* Getters: */ 110 109 UIMachineLogic *machineLogic() const { return m_pMachineLogic; } 111 UISession *uisession() const;112 110 UIMachine *uimachine() const; 113 111 114 112 /** Returns the console's display reference. */ 115 CDisplay &display() const;113 CDisplay &display() const; 116 114 /** Returns the console's mouse reference. */ 117 CMouse &mouse() const;115 CMouse &mouse() const; 118 116 119 117 /* Event handler for registered machine-view(s): */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r98450 r98451 155 155 /* We have to try to enable disabled guest-screens if any: */ 156 156 int cGuestScreensToEnable = qMin(cExcessiveHostScreens, cDisabledGuestScreens); 157 UISession *pSession = m_pMachineLogic->uisession();158 157 for (int iGuestScreenIndex = 0; iGuestScreenIndex < cGuestScreensToEnable; ++iGuestScreenIndex) 159 158 { … … 163 162 /* Try to get previous guest-screen arguments: */ 164 163 int iGuestScreen = m_disabledGuestScreens[iGuestScreenIndex]; 165 if (UIFrameBuffer *pFrameBuffer = pSession->frameBuffer(iGuestScreen))164 if (UIFrameBuffer *pFrameBuffer = m_pMachineLogic->uisession()->frameBuffer(iGuestScreen)) 166 165 { 167 166 if (pFrameBuffer->width() > 0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r98450 r98451 54 54 55 55 56 UIMachineLogicFullscreen::UIMachineLogicFullscreen(UIMachine *pMachine , UISession *pSession)57 : UIMachineLogic(pMachine , pSession)56 UIMachineLogicFullscreen::UIMachineLogicFullscreen(UIMachine *pMachine) 57 : UIMachineLogic(pMachine) 58 58 , m_pPopupMenu(0) 59 59 #ifdef VBOX_WS_MAC … … 777 777 const int iWantedHostScreenIndex = hostScreenForGuestScreen((int)uScreenID); 778 778 const int iCurrentHostScreenIndex = UIDesktopWidgetWatchdog::screenNumber(pMachineWindow); 779 const QSize frameBufferSize((int)uisession()->frameBuffer(uScreenID)->width(), (int)uisession()->frameBuffer(uScreenID)->height()); 779 const UIFrameBuffer *pFrameBuffer = uisession()->frameBuffer(uScreenID); 780 const QSize frameBufferSize(pFrameBuffer->width(), pFrameBuffer->height()); 780 781 const QSize screenSize = gpDesktop->screenGeometry(iWantedHostScreenIndex).size(); 781 782 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r98375 r98451 60 60 61 61 /** Constructs a logic passing @a pMachine and @a pSession to the base-class. 62 * @param pMachine Brings the machine this logic belongs to. 63 * @param pSession Brings the session this logic is created for. */ 64 UIMachineLogicFullscreen(UIMachine *pMachine, UISession *pSession); 62 * @param pMachine Brings the machine this logic belongs to. */ 63 UIMachineLogicFullscreen(UIMachine *pMachine); 65 64 /** Destructs the logic. */ 66 65 virtual ~UIMachineLogicFullscreen() RT_OVERRIDE; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp
r98450 r98451 42 42 #include "UIMenuBarEditorWindow.h" 43 43 #include "UIMessageCenter.h" 44 #include "UISession.h"45 44 #include "UIStatusBarEditorWindow.h" 46 45 #ifndef VBOX_WS_MAC … … 56 55 57 56 58 UIMachineLogicNormal::UIMachineLogicNormal(UIMachine *pMachine , UISession *pSession)59 : UIMachineLogic(pMachine , pSession)57 UIMachineLogicNormal::UIMachineLogicNormal(UIMachine *pMachine) 58 : UIMachineLogic(pMachine) 60 59 #ifndef VBOX_WS_MAC 61 60 , m_pPopupMenu(0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h
r98375 r98451 43 43 44 44 /** Constructs a logic passing @a pMachine and @a pSession to the base-class. 45 * @param pMachine Brings the machine this logic belongs to. 46 * @param pSession Brings the session this logic is created for. */ 47 UIMachineLogicNormal(UIMachine *pMachine, UISession *pSession); 45 * @param pMachine Brings the machine this logic belongs to. */ 46 UIMachineLogicNormal(UIMachine *pMachine); 48 47 49 48 /** Returns visual state type. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp
r98419 r98451 50 50 51 51 52 UIMachineLogicScale::UIMachineLogicScale(UIMachine *pMachine , UISession *pSession)53 : UIMachineLogic(pMachine , pSession)52 UIMachineLogicScale::UIMachineLogicScale(UIMachine *pMachine) 53 : UIMachineLogic(pMachine) 54 54 #ifndef VBOX_WS_MAC 55 55 , m_pPopupMenu(0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h
r98375 r98451 43 43 44 44 /** Constructs a logic passing @a pMachine and @a pSession to the base-class. 45 * @param pMachine Brings the machine this logic belongs to. 46 * @param pSession Brings the session this logic is created for. */ 47 UIMachineLogicScale(UIMachine *pMachine, UISession *pSession); 45 * @param pMachine Brings the machine this logic belongs to. */ 46 UIMachineLogicScale(UIMachine *pMachine); 48 47 49 48 /** Returns visual state type. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp
r98450 r98451 39 39 #include "UIMessageCenter.h" 40 40 #include "UIMultiScreenLayout.h" 41 #include "UISession.h"42 41 #include "UIShortcutPool.h" 43 42 #ifndef VBOX_WS_MAC … … 51 50 52 51 53 UIMachineLogicSeamless::UIMachineLogicSeamless(UIMachine *pMachine , UISession *pSession)54 : UIMachineLogic(pMachine , pSession)52 UIMachineLogicSeamless::UIMachineLogicSeamless(UIMachine *pMachine) 53 : UIMachineLogic(pMachine) 55 54 #ifndef VBOX_WS_MAC 56 55 , m_pPopupMenu(0) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h
r98375 r98451 46 46 47 47 /** Constructs a logic passing @a pMachine and @a pSession to the base-class. 48 * @param pMachine Brings the machine this logic belongs to. 49 * @param pSession Brings the session this logic is created for. */ 50 UIMachineLogicSeamless(UIMachine *pMachine, UISession *pSession); 48 * @param pMachine Brings the machine this logic belongs to. */ 49 UIMachineLogicSeamless(UIMachine *pMachine); 51 50 /** Destructs the logic. */ 52 51 virtual ~UIMachineLogicSeamless() RT_OVERRIDE;
Note:
See TracChangeset
for help on using the changeset viewer.