- Timestamp:
- Feb 1, 2023 1:04:15 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3:79645-79692 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243 21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248 22 22 /trunk/src:92342,154921
-
- Property svn:mergeinfo
-
trunk/src/VBox
- Property svn:mergeinfo
-
old new 19 19 /branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 20 20 /branches/dsen/gui3/src/VBox:79645-79692 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243 21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends
- Property svn:mergeinfo
-
old new 16 16 /branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644 17 17 /branches/dsen/gui3/src/VBox/Frontends:79645-79692 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243 18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248
-
- Property svn:mergeinfo
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r98379 r98384 1260 1260 setStateIcon(7, UIIconPool::iconSet(":/hostkey_captured_pressed_checked_16px.png")); 1261 1261 /* Configure connection: */ 1262 connect(p Session, &UISession::sigKeyboardStateChange,1262 connect(pMachine, &UIMachine::sigKeyboardStateChange, 1263 1263 this, static_cast<void(UIIndicatorKeyboard::*)(int)>(&UIIndicatorKeyboard::setState)); 1264 setState(p Session->keyboardState());1264 setState(pMachine->keyboardState()); 1265 1265 /* Translate finally: */ 1266 1266 retranslateUi(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r98379 r98384 1833 1833 #if defined(VBOX_WS_MAC) 1834 1834 1835 /* if (ui session()->numLockAdaptionCnt()) ... - NumLock isn't implemented by Mac OS X so ignore it. */1836 if (ui session()->capsLockAdaptionCnt() && (uisession()->isCapsLock() ^ !!(::GetCurrentEventKeyModifiers() & alphaLock)))1837 { 1838 ui session()->setCapsLockAdaptionCnt(uisession()->capsLockAdaptionCnt() - 1);1835 /* if (uimachine()->numLockAdaptionCnt()) ... - NumLock isn't implemented by Mac OS X so ignore it. */ 1836 if (uimachine()->capsLockAdaptionCnt() && (uimachine()->isCapsLock() ^ !!(::GetCurrentEventKeyModifiers() & alphaLock))) 1837 { 1838 uimachine()->setCapsLockAdaptionCnt(uimachine()->capsLockAdaptionCnt() - 1); 1839 1839 piCodes[(*puCount)++] = 0x3a; 1840 1840 piCodes[(*puCount)++] = 0x3a | 0x80; … … 1842 1842 * capslock. For simplicity, only do this if shift is not 1843 1843 * already held down. */ 1844 if (ui session()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed))1844 if (uimachine()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed)) 1845 1845 { 1846 1846 piCodes[(*puCount)++] = 0x2a; … … 1851 1851 #elif defined(VBOX_WS_WIN) 1852 1852 1853 if (ui session()->numLockAdaptionCnt() && (uisession()->isNumLock() ^ !!(GetKeyState(VK_NUMLOCK))))1854 { 1855 ui session()->setNumLockAdaptionCnt(uisession()->numLockAdaptionCnt() - 1);1853 if (uimachine()->numLockAdaptionCnt() && (uimachine()->isNumLock() ^ !!(GetKeyState(VK_NUMLOCK)))) 1854 { 1855 uimachine()->setNumLockAdaptionCnt(uimachine()->numLockAdaptionCnt() - 1); 1856 1856 piCodes[(*puCount)++] = 0x45; 1857 1857 piCodes[(*puCount)++] = 0x45 | 0x80; 1858 1858 } 1859 if (ui session()->capsLockAdaptionCnt() && (uisession()->isCapsLock() ^ !!(GetKeyState(VK_CAPITAL))))1860 { 1861 ui session()->setCapsLockAdaptionCnt(uisession()->capsLockAdaptionCnt() - 1);1859 if (uimachine()->capsLockAdaptionCnt() && (uimachine()->isCapsLock() ^ !!(GetKeyState(VK_CAPITAL)))) 1860 { 1861 uimachine()->setCapsLockAdaptionCnt(uimachine()->capsLockAdaptionCnt() - 1); 1862 1862 piCodes[(*puCount)++] = 0x3a; 1863 1863 piCodes[(*puCount)++] = 0x3a | 0x80; … … 1865 1865 * capslock. For simplicity, only do this if shift is not 1866 1866 * already held down. */ 1867 if (ui session()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed))1867 if (uimachine()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed)) 1868 1868 { 1869 1869 piCodes[(*puCount)++] = 0x2a; … … 1891 1891 XFreeModifiermap(map); 1892 1892 1893 if (ui session()->numLockAdaptionCnt() && (uisession()->isNumLock() ^ !!(uMask & uKeyMaskNum)))1894 { 1895 ui session()->setNumLockAdaptionCnt(uisession()->numLockAdaptionCnt() - 1);1893 if (uimachine()->numLockAdaptionCnt() && (uimachine()->isNumLock() ^ !!(uMask & uKeyMaskNum))) 1894 { 1895 uimachine()->setNumLockAdaptionCnt(uimachine()->numLockAdaptionCnt() - 1); 1896 1896 piCodes[(*puCount)++] = 0x45; 1897 1897 piCodes[(*puCount)++] = 0x45 | 0x80; 1898 1898 } 1899 if (ui session()->capsLockAdaptionCnt() && (uisession()->isCapsLock() ^ !!(uMask & uKeyMaskCaps)))1900 { 1901 ui session()->setCapsLockAdaptionCnt(uisession()->capsLockAdaptionCnt() - 1);1899 if (uimachine()->capsLockAdaptionCnt() && (uimachine()->isCapsLock() ^ !!(uMask & uKeyMaskCaps))) 1900 { 1901 uimachine()->setCapsLockAdaptionCnt(uimachine()->capsLockAdaptionCnt() - 1); 1902 1902 piCodes[(*puCount)++] = 0x3a; 1903 1903 piCodes[(*puCount)++] = 0x3a | 0x80; … … 1905 1905 * capslock. For simplicity, only do this if shift is not 1906 1906 * already held down. */ 1907 if (ui session()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed))1907 if (uimachine()->isCapsLock() && !(m_pressedKeys[0x2a] & IsKeyPressed)) 1908 1908 { 1909 1909 piCodes[(*puCount)++] = 0x2a; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r98379 r98384 219 219 } 220 220 221 void UIMachine::sltHandleKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock) 222 { 223 /* Check if something had changed: */ 224 if ( m_fNumLock != fNumLock 225 || m_fCapsLock != fCapsLock 226 || m_fScrollLock != fScrollLock) 227 { 228 /* Store new num lock data: */ 229 if (m_fNumLock != fNumLock) 230 { 231 m_fNumLock = fNumLock; 232 m_uNumLockAdaptionCnt = 2; 233 } 234 235 /* Store new caps lock data: */ 236 if (m_fCapsLock != fCapsLock) 237 { 238 m_fCapsLock = fCapsLock; 239 m_uCapsLockAdaptionCnt = 2; 240 } 241 242 /* Store new scroll lock data: */ 243 if (m_fScrollLock != fScrollLock) 244 { 245 m_fScrollLock = fScrollLock; 246 } 247 248 /* Notify listeners: */ 249 emit sigKeyboardLedsChange(); 250 } 251 } 252 221 253 void UIMachine::sltMousePointerShapeChange(const UIMousePointerShapeData &shapeData) 222 254 { … … 312 344 , m_pMachineLogic(0) 313 345 , m_pMachineWindowIcon(0) 346 , m_fNumLock(false) 347 , m_fCapsLock(false) 348 , m_fScrollLock(false) 349 , m_uNumLockAdaptionCnt(2) 350 , m_uCapsLockAdaptionCnt(2) 351 , m_iKeyboardState(0) 314 352 , m_fIsHidingHostPointer(true) 315 353 , m_fIsValidPointerShapePresent(false) … … 366 404 void UIMachine::prepareSessionConnections() 367 405 { 406 /* Keyboard stuff: */ 407 connect(uisession(), &UISession::sigKeyboardLedsChange, 408 this, &UIMachine::sltHandleKeyboardLedsChange); 409 410 /* Mouse stuff: */ 368 411 connect(uisession(), &UISession::sigMousePointerShapeChange, 369 412 this, &UIMachine::sltMousePointerShapeChange); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h
r98379 r98384 59 59 /** Requests async visual-state change. */ 60 60 void sigRequestAsyncVisualStateChange(UIVisualStateType visualStateType); 61 62 /** @name Keyboard stuff. 63 ** @{ */ 64 /** Notifies about keyboard LEDs change. */ 65 void sigKeyboardLedsChange(); 66 67 /** Notifies listeners about keyboard state-change. */ 68 void sigKeyboardStateChange(int iState); 69 /** @} */ 61 70 62 71 /** @name Mouse cursor stuff. … … 111 120 QString machineWindowNamePostfix() const { return m_strMachineWindowNamePostfix; } 112 121 #endif 122 /** @} */ 123 124 /** @name Keyboard stuff. 125 ** @{ */ 126 /** Returns the NUM lock status. */ 127 bool isNumLock() const { return m_fNumLock; } 128 /** Returns the CAPS lock status. */ 129 bool isCapsLock() const { return m_fCapsLock; } 130 /** Returns the SCROLL lock status. */ 131 bool isScrollLock() const { return m_fScrollLock; } 132 133 /** Returns the NUM lock adaption count. */ 134 uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; } 135 /** Defines the NUM lock adaption @a uCount. */ 136 void setNumLockAdaptionCnt(uint uCount) { m_uNumLockAdaptionCnt = uCount; } 137 138 /** Returns the CAPS lock adaption count. */ 139 uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; } 140 /** Defines the CAPS lock adaption @a uCount. */ 141 void setCapsLockAdaptionCnt(uint uCount) { m_uCapsLockAdaptionCnt = uCount; } 142 143 /** Returns the keyboard-state. */ 144 int keyboardState() const { return m_iKeyboardState; } 113 145 /** @} */ 114 146 … … 159 191 public slots: 160 192 193 /** @name Keyboard stuff. 194 ** @{ */ 195 /** Defines @a iKeyboardState. */ 196 void setKeyboardState(int iKeyboardState) { m_iKeyboardState = iKeyboardState; emit sigKeyboardStateChange(m_iKeyboardState); } 197 /** @} */ 198 161 199 /** @name Mouse cursor stuff. 162 200 ** @{ */ … … 172 210 /** Visual state-change handler. */ 173 211 void sltChangeVisualState(UIVisualStateType visualStateType); 212 213 /** @name Keyboard stuff. 214 ** @{ */ 215 /** Handles signal about keyboard LEDs change. 216 * @param fNumLock Brings NUM lock status. 217 * @param fCapsLock Brings CAPS lock status. 218 * @param fScrollLock Brings SCROLL lock status. */ 219 void sltHandleKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 220 /** @} */ 174 221 175 222 /** @name Mouse cursor stuff. … … 217 264 /** Cleanup routine: Machine-logic stuff. */ 218 265 void cleanupMachineLogic(); 219 /** Cleanup machine-window icon. */266 /** Cleanup routine: Machine-window icon. */ 220 267 void cleanupMachineWindowIcon(); 221 268 /** Cleanup routine: Session stuff. */ … … 286 333 /** @} */ 287 334 335 /** @name Keyboard stuff. 336 ** @{ */ 337 /** Holds the NUM lock status. */ 338 bool m_fNumLock; 339 /** Holds the CAPS lock status. */ 340 bool m_fCapsLock; 341 /** Holds the SCROLL lock status. */ 342 bool m_fScrollLock; 343 344 /** Holds the NUM lock adaption count. */ 345 uint m_uNumLockAdaptionCnt; 346 /** Holds the CAPS lock adaption count. */ 347 uint m_uCapsLockAdaptionCnt; 348 349 /** Holds the keyboard-state. */ 350 int m_iKeyboardState; 351 /** @} */ 352 288 353 /** @name Mouse cursor stuff. 289 354 ** @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98379 r98384 641 641 642 642 #if defined(VBOX_WS_MAC) 643 DarwinHidDevicesBroadcastLeds(m_pHostLedsState, ui session()->isNumLock(), uisession()->isCapsLock(), uisession()->isScrollLock());643 DarwinHidDevicesBroadcastLeds(m_pHostLedsState, uimachine()->isNumLock(), uimachine()->isCapsLock(), uimachine()->isScrollLock()); 644 644 #elif defined(VBOX_WS_WIN) 645 if (!winHidLedsInSync(ui session()->isNumLock(), uisession()->isCapsLock(), uisession()->isScrollLock()))645 if (!winHidLedsInSync(uimachine()->isNumLock(), uimachine()->isCapsLock(), uimachine()->isScrollLock())) 646 646 { 647 647 keyboardHandler()->winSkipKeyboardEvents(true); 648 WinHidDevicesBroadcastLeds(ui session()->isNumLock(), uisession()->isCapsLock(), uisession()->isScrollLock());648 WinHidDevicesBroadcastLeds(uimachine()->isNumLock(), uimachine()->isCapsLock(), uimachine()->isScrollLock()); 649 649 keyboardHandler()->winSkipKeyboardEvents(false); 650 650 } … … 811 811 /* Set new handler: */ 812 812 m_pKeyboardHandler = pKeyboardHandler; 813 /* Connect to session: */813 /* Connect to uimachine: */ 814 814 connect(m_pKeyboardHandler, &UIKeyboardHandler::sigStateChange, 815 ui session(), &UISession::setKeyboardState);815 uimachine(), &UIMachine::setKeyboardState); 816 816 } 817 817 … … 889 889 connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged); 890 890 connect(uimachine(), &UIMachine::sigMouseCapabilityChange, this, &UIMachineLogic::sltMouseCapabilityChanged); 891 connect(ui session(), &UISession::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged);891 connect(uimachine(), &UIMachine::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged); 892 892 connect(uisession(), &UISession::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange); 893 893 connect(uisession(), &UISession::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError); … … 1147 1147 setKeyboardHandler(UIKeyboardHandler::create(this, visualStateType())); 1148 1148 setMouseHandler(UIMouseHandler::create(this, visualStateType())); 1149 /* Update UI sessionvalues with current: */1150 ui session()->setKeyboardState(keyboardHandler()->state());1149 /* Update UI machine values with current: */ 1150 uimachine()->setKeyboardState(keyboardHandler()->state()); 1151 1151 uimachine()->setMouseState(mouseHandler()->state()); 1152 1152 } … … 1439 1439 disconnect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged); 1440 1440 disconnect(uimachine(), &UIMachine::sigMouseCapabilityChange, this, &UIMachineLogic::sltMouseCapabilityChanged); 1441 disconnect(ui session(), &UISession::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged);1441 disconnect(uimachine(), &UIMachine::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged); 1442 1442 disconnect(uisession(), &UISession::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange); 1443 1443 disconnect(uisession(), &UISession::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError); … … 2067 2067 { 2068 2068 QWidget *pCenterWidget = windowManager().realParentWindow(activeMachineWindow()); 2069 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uisession(), pCenterWidget, machine().GetName()); 2069 m_pSoftKeyboardDialog = new UISoftKeyboard(0, uimachine(), uisession(), 2070 pCenterWidget, machine().GetName()); 2070 2071 connect(m_pSoftKeyboardDialog, &UISoftKeyboard::sigClose, this, &UIMachineLogic::sltCloseSoftKeyboardDefault); 2071 2072 } … … 2682 2683 m_pHostLedsState = DarwinHidDevicesKeepLedsState(); 2683 2684 if (m_pHostLedsState != NULL) 2684 DarwinHidDevicesBroadcastLeds(m_pHostLedsState, ui session()->isNumLock(), uisession()->isCapsLock(), uisession()->isScrollLock());2685 DarwinHidDevicesBroadcastLeds(m_pHostLedsState, uimachine()->isNumLock(), uimachine()->isCapsLock(), uimachine()->isScrollLock()); 2685 2686 #elif defined(VBOX_WS_WIN) 2686 2687 if (m_pHostLedsState == NULL) 2687 2688 m_pHostLedsState = WinHidDevicesKeepLedsState(); 2688 2689 keyboardHandler()->winSkipKeyboardEvents(true); 2689 WinHidDevicesBroadcastLeds(ui session()->isNumLock(), uisession()->isCapsLock(), uisession()->isScrollLock());2690 WinHidDevicesBroadcastLeds(uimachine()->isNumLock(), uimachine()->isCapsLock(), uimachine()->isScrollLock()); 2690 2691 keyboardHandler()->winSkipKeyboardEvents(false); 2691 2692 #else -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r98382 r98384 517 517 } 518 518 #endif /* RT_OS_DARWIN */ 519 520 void UISession::sltKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock)521 {522 /* Check if something had changed: */523 if ( m_fNumLock != fNumLock524 || m_fCapsLock != fCapsLock525 || m_fScrollLock != fScrollLock)526 {527 /* Store new num lock data: */528 if (m_fNumLock != fNumLock)529 {530 m_fNumLock = fNumLock;531 m_uNumLockAdaptionCnt = 2;532 }533 534 /* Store new caps lock data: */535 if (m_fCapsLock != fCapsLock)536 {537 m_fCapsLock = fCapsLock;538 m_uCapsLockAdaptionCnt = 2;539 }540 541 /* Store new scroll lock data: */542 if (m_fScrollLock != fScrollLock)543 {544 m_fScrollLock = fScrollLock;545 }546 547 /* Notify listeners about mouse capability changed: */548 emit sigKeyboardLedsChange();549 }550 }551 519 552 520 void UISession::sltStateChange(KMachineState state) … … 852 820 , m_fIsGuestSupportsGraphics(false) 853 821 , m_fIsGuestSupportsSeamless(false) 854 /* Mouse flags: */855 , m_fNumLock(false)856 , m_fCapsLock(false)857 , m_fScrollLock(false)858 , m_uNumLockAdaptionCnt(2)859 , m_uCapsLockAdaptionCnt(2)860 822 /* CPU hardware virtualization features for VM: */ 861 823 , m_enmVMExecutionEngine(KVMExecutionEngine_NotSet) … … 966 928 this, &UISession::sigCursorPositionChange); 967 929 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigKeyboardLedsChange, 968 this, &UISession::s ltKeyboardLedsChange);930 this, &UISession::sigKeyboardLedsChange); 969 931 connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStateChange, 970 932 this, &UISession::sltStateChange); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r98382 r98384 82 82 83 83 /* Console callback signals: */ 84 /** Notifies listeners about keyboard state-change. */85 void sigKeyboardStateChange(int iState);86 84 /** Notifies listeners about mouse pointer shape change. */ 87 85 void sigMousePointerShapeChange(const UIMousePointerShapeData &shapeData); … … 92 90 /** Notifies listeners about cursor position change. */ 93 91 void sigCursorPositionChange(bool fContainsData, unsigned long uX, unsigned long uY); 94 void sigKeyboardLedsChange( );92 void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock); 95 93 void sigMachineStateChange(); 96 94 void sigAdditionsStateChange(); … … 235 233 bool guestAdditionsUpgradable(); 236 234 237 /* Keyboard getters: */238 /** Returns keyboard-state. */239 int keyboardState() const { return m_iKeyboardState; }240 bool isNumLock() const { return m_fNumLock; }241 bool isCapsLock() const { return m_fCapsLock; }242 bool isScrollLock() const { return m_fScrollLock; }243 uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; }244 uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; }245 246 235 /* Common setters: */ 247 236 bool pause() { return setPause(true); } … … 251 240 void setAutoCaptureDisabled(bool fIsAutoCaptureDisabled) { m_fIsAutoCaptureDisabled = fIsAutoCaptureDisabled; } 252 241 void forgetPreviousMachineState() { m_machineStatePrevious = m_machineState; } 253 254 /* Keyboard setters: */255 void setNumLockAdaptionCnt(uint uNumLockAdaptionCnt) { m_uNumLockAdaptionCnt = uNumLockAdaptionCnt; }256 void setCapsLockAdaptionCnt(uint uCapsLockAdaptionCnt) { m_uCapsLockAdaptionCnt = uCapsLockAdaptionCnt; }257 242 258 243 /* Screen visibility status for host-desires: */ … … 319 304 void sltMountDVDAdHoc(const QString &strSource); 320 305 321 /** Defines @a iKeyboardState. */322 void setKeyboardState(int iKeyboardState) { m_iKeyboardState = iKeyboardState; emit sigKeyboardStateChange(m_iKeyboardState); }323 324 306 /** Closes Runtime UI. */ 325 307 void closeRuntimeUI(); … … 336 318 337 319 /* Console events slots */ 338 void sltKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);339 320 void sltStateChange(KMachineState state); 340 321 void sltAdditionsChange(); … … 513 494 bool m_fIsGuestSupportsSeamless : 1; 514 495 515 /* Keyboard flags: */516 /** Holds the keyboard-state. */517 int m_iKeyboardState;518 bool m_fNumLock : 1;519 bool m_fCapsLock : 1;520 bool m_fScrollLock : 1;521 uint m_uNumLockAdaptionCnt;522 uint m_uCapsLockAdaptionCnt;523 524 496 /** Copy of IMachineDebugger::ExecutionEngine */ 525 497 KVMExecutionEngine m_enmVMExecutionEngine; -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r98103 r98384 54 54 #include "UIExtraDataManager.h" 55 55 #include "UIIconPool.h" 56 #include "UIMachine.h" 56 57 #include "UIMessageCenter.h" 57 58 #include "UIModalWindowManager.h" … … 3923 3924 *********************************************************************************************************************************/ 3924 3925 3925 UISoftKeyboard::UISoftKeyboard(QWidget *pParent, 3926 UISession *pSession, QWidget *pCenterWidget, QString strMachineName /* = QString()*/)3926 UISoftKeyboard::UISoftKeyboard(QWidget *pParent, UIMachine *pMachine, UISession *pSession, 3927 QWidget *pCenterWidget, QString strMachineName /* = QString() */) 3927 3928 : QMainWindowWithRestorableGeometryAndRetranslateUi(pParent) 3929 , m_pMachine(pMachine) 3928 3930 , m_pSession(pSession) 3929 3931 , m_pCenterWidget(pCenterWidget) … … 4030 4032 void UISoftKeyboard::sltKeyboardLedsChange() 4031 4033 { 4032 bool fNumLockLed = m_p Session->isNumLock();4033 bool fCapsLockLed = m_p Session->isCapsLock();4034 bool fScrollLockLed = m_p Session->isScrollLock();4034 bool fNumLockLed = m_pMachine->isNumLock(); 4035 bool fCapsLockLed = m_pMachine->isCapsLock(); 4036 bool fScrollLockLed = m_pMachine->isScrollLock(); 4035 4037 if (m_pKeyboardWidget) 4036 4038 m_pKeyboardWidget->updateLockKeyStates(fCapsLockLed, fNumLockLed, fScrollLockLed); … … 4295 4297 void UISoftKeyboard::prepareConnections() 4296 4298 { 4297 connect(m_p Session, &UISession::sigKeyboardLedsChange, this, &UISoftKeyboard::sltKeyboardLedsChange);4299 connect(m_pMachine, &UIMachine::sigKeyboardLedsChange, this, &UISoftKeyboard::sltKeyboardLedsChange); 4298 4300 connect(m_pKeyboardWidget, &UISoftKeyboardWidget::sigPutKeyboardSequence, this, &UISoftKeyboard::sltPutKeyboardSequence); 4299 4301 connect(m_pKeyboardWidget, &UISoftKeyboardWidget::sigPutUsageCodesPress, this, &UISoftKeyboard::sltPutUsageCodesPress); -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.h
r98103 r98384 48 48 class UIKeyboardLayoutEditor; 49 49 class UILayoutSelector; 50 class UIMachine; 50 51 class UISession; 51 52 class UISoftKeyboardKey; … … 71 72 public: 72 73 73 UISoftKeyboard(QWidget *pParent, UI Session *pSession, QWidget *pCenterWidget,74 Q String strMachineName = QString());74 UISoftKeyboard(QWidget *pParent, UIMachine *pMachine, UISession *pSession, 75 QWidget *pCenterWidget, QString strMachineName = QString()); 75 76 ~UISoftKeyboard(); 76 77 … … 131 132 CKeyboard& keyboard() const; 132 133 134 UIMachine *m_pMachine; 133 135 UISession *m_pSession; 134 136 QWidget *m_pCenterWidget;
Note:
See TracChangeset
for help on using the changeset viewer.