- Timestamp:
- Sep 18, 2013 11:07:49 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 89040
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r48510 r48515 2182 2182 // session().GetMachine().GetName().toAscii().constData()); 2183 2183 2184 /* Here we have to store host LED lock states to UISession registry. 2185 * This can be done for each keyboard separately, just keep in mind keyboard IDs. 2186 * [void] uisession() -> setHostLockStates() can be used for that. */ 2184 /* Here we have to store host LED lock states. */ 2187 2185 2188 2186 /* Here we have to update host LED lock states using values provided by UISession registry. … … 2198 2196 // session().GetMachine().GetName().toAscii().constData()); 2199 2197 2200 /* Here we have to restore host LED lock states from UISession registry. 2201 * This can be done for each keyboard separately, just use the same keyboard IDs. 2202 * [bool] uisession() -> getHostLockStates() can be used for that. */ 2198 /* Here we have to restore host LED lock states. */ 2203 2199 } 2204 2200 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r48510 r48515 464 464 } 465 465 466 void UISession::setHostLockStates(const QString &strKeyboardID, bool fNum, bool fCaps, bool fScroll)467 {468 /* Acquire modifiable reference, create default value if doesn't exists: */469 UIKeyboardLocks &hostLock = m_hostLocks[strKeyboardID];470 /* Save passed values: */471 hostLock.m_num = fNum;472 hostLock.m_caps = fCaps;473 hostLock.m_scroll = fScroll;474 }475 476 void UISession::getHostLockStates(const QString &strKeyboardID, bool &fNum, bool &fCaps, bool &fScroll)477 {478 /* Acquire modifiable reference, create default value if doesn't exists: */479 UIKeyboardLocks &hostLock = m_hostLocks[strKeyboardID];480 /* Load cached values: */481 fNum = hostLock.m_num;482 fCaps = hostLock.m_caps;483 fScroll = hostLock.m_scroll;484 }485 486 466 bool UISession::setPause(bool fOn) 487 467 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r48510 r48515 78 78 }; 79 79 80 /* Keyboard Lock container: */81 struct UIKeyboardLocks82 {83 /* Constructor: */84 UIKeyboardLocks()85 : m_num(false)86 , m_caps(false)87 , m_scroll(false)88 {}89 /* Variables: */90 bool m_num;91 bool m_caps;92 bool m_scroll;93 };94 typedef QMap<QString, UIKeyboardLocks> UIKeyboardLocksMap;95 96 80 class UISession : public QObject 97 81 { … … 153 137 uint numLockAdaptionCnt() const { return m_uNumLockAdaptionCnt; } 154 138 uint capsLockAdaptionCnt() const { return m_uCapsLockAdaptionCnt; } 155 void setHostLockStates(const QString &strKeyboardID, bool fNum, bool fCaps, bool fScroll);156 void getHostLockStates(const QString &strKeyboardID, bool &fNum, bool &fCaps, bool &fScroll);157 139 158 140 /* Mouse getters: */ … … 321 303 uint m_uNumLockAdaptionCnt; 322 304 uint m_uCapsLockAdaptionCnt; 323 UIKeyboardLocksMap m_hostLocks;324 305 325 306 /* Mouse flags: */
Note:
See TracChangeset
for help on using the changeset viewer.