Changeset 44434 in vbox
- Timestamp:
- Jan 28, 2013 4:48:34 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 added
- 4 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r44315 r44434 279 279 src/globals/UIMainEventListener.h \ 280 280 src/globals/UIMessageCenter.h \ 281 src/globals/UIShortcuts.h \ 281 282 src/globals/VBoxGlobal.h \ 282 283 src/globals/VBoxUtils.h \ … … 511 512 src/globals/UIMainEventListener.cpp \ 512 513 src/globals/UIMessageCenter.cpp \ 514 src/globals/UIShortcuts.cpp \ 513 515 src/globals/VBoxGlobal.cpp \ 514 516 src/medium/UIMediumDefs.cpp \ … … 539 541 src/runtime/UIMachineLogic.cpp \ 540 542 src/runtime/UIMachineMenuBar.cpp \ 541 src/runtime/UIMachineShortcuts.cpp \542 543 src/runtime/UIMachineView.cpp \ 543 544 src/runtime/UIMachineWindow.cpp \ … … 563 564 src/runtime/seamless/UIMachineWindowSeamless.cpp \ 564 565 src/selector/UIActionPoolSelector.cpp \ 565 src/selector/UISelectorShortcuts.cpp \566 566 src/selector/UIVMDesktop.cpp \ 567 567 src/selector/UIVMItem.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r44354 r44434 28 28 #include "UIIconPool.h" 29 29 #include "VBoxGlobal.h" 30 #include "UISelectorShortcuts.h" 31 #include "UIMachineShortcuts.h" 30 #include "UIShortcuts.h" 32 31 33 32 /* Action activation event: */ … … 47 46 48 47 /* UIAction stuff: */ 49 UIAction::UIAction( QObject*pParent, UIActionType type)48 UIAction::UIAction(UIActionPool *pParent, UIActionType type) 50 49 : QIWithRetranslateUI3<QAction>(pParent) 50 , m_pActionPool(pParent) 51 51 , m_type(type) 52 , m_actionPoolType(pParent->type()) 52 53 { 53 54 /* By default there is no specific menu role. … … 59 60 { 60 61 return qobject_cast<UIActionState*>(this); 62 } 63 64 void UIAction::setName(const QString &strName) 65 { 66 /* Remember internal name: */ 67 m_strName = strName; 68 /* Update text according new name: */ 69 updateText(); 61 70 } 62 71 … … 67 76 /* Remember shortcut: */ 68 77 m_shortcut = shortcut; 78 /* Update text according new shortcut: */ 79 updateText(); 69 80 } 70 81 … … 81 92 } 82 93 83 QString UIAction::menuText(const QString &strText) 84 { 85 return vboxGlobal().isVMConsoleProcess() ? VBoxGlobal::removeAccelMark(strText) : strText; 94 QString UIAction::nameInMenu() const 95 { 96 /* Action-name format depends on action-pool type: */ 97 switch (m_actionPoolType) 98 { 99 /* Unchanged name for Selector UI: */ 100 case UIActionPoolType_Selector: return name(); 101 /* Filtered name for Runtime UI: */ 102 case UIActionPoolType_Runtime: return VBoxGlobal::removeAccelMark(name()); 103 } 104 /* Nothing by default: */ 105 return QString(); 106 } 107 108 void UIAction::updateText() 109 { 110 /* Action-text format depends on action-pool type: */ 111 switch (m_actionPoolType) 112 { 113 /* The same as menu name for Selector UI: */ 114 case UIActionPoolType_Selector: 115 setText(nameInMenu()); 116 break; 117 /* With shortcut appended for Runtime UI: */ 118 case UIActionPoolType_Runtime: 119 setText(vboxGlobal().insertKeyToActionText(nameInMenu(), 120 gShortcutPool->shortcut(actionPool(), this).toString())); 121 break; 122 } 86 123 } 87 124 … … 117 154 118 155 /* UIActionSimple stuff: */ 119 UIActionSimple::UIActionSimple(QObject *pParent, const QString &strIcon, const QString &strIconDis) 156 UIActionSimple::UIActionSimple(UIActionPool *pParent, 157 const QString &strIcon, const QString &strIconDis) 120 158 : UIAction(pParent, UIActionType_Simple) 121 159 { … … 124 162 } 125 163 126 UIActionSimple::UIActionSimple( QObject*pParent,164 UIActionSimple::UIActionSimple(UIActionPool *pParent, 127 165 const QSize &normalSize, const QSize &smallSize, 128 166 const QString &strNormalIcon, const QString &strSmallIcon, … … 133 171 } 134 172 135 UIActionSimple::UIActionSimple(QObject *pParent, const QIcon& icon) 173 UIActionSimple::UIActionSimple(UIActionPool *pParent, 174 const QIcon& icon) 136 175 : UIAction(pParent, UIActionType_Simple) 137 176 { … … 141 180 142 181 /* UIActionState stuff: */ 143 UIActionState::UIActionState(QObject *pParent, const QString &strIcon, const QString &strIconDis) 182 UIActionState::UIActionState(UIActionPool *pParent, 183 const QString &strIcon, const QString &strIconDis) 144 184 : UIAction(pParent, UIActionType_State) 145 185 , m_iState(0) … … 149 189 } 150 190 151 UIActionState::UIActionState( QObject*pParent,191 UIActionState::UIActionState(UIActionPool *pParent, 152 192 const QSize &normalSize, const QSize &smallSize, 153 193 const QString &strNormalIcon, const QString &strSmallIcon, … … 159 199 } 160 200 161 UIActionState::UIActionState(QObject *pParent, const QIcon& icon) 201 UIActionState::UIActionState(UIActionPool *pParent, 202 const QIcon& icon) 162 203 : UIAction(pParent, UIActionType_State) 163 204 , m_iState(0) … … 168 209 169 210 /* UIActionToggle stuff: */ 170 UIActionToggle::UIActionToggle(QObject *pParent, const QString &strIcon, const QString &strIconDis) 211 UIActionToggle::UIActionToggle(UIActionPool *pParent, 212 const QString &strIcon, const QString &strIconDis) 171 213 : UIAction(pParent, UIActionType_Toggle) 172 214 { … … 176 218 } 177 219 178 UIActionToggle::UIActionToggle( QObject*pParent,220 UIActionToggle::UIActionToggle(UIActionPool *pParent, 179 221 const QSize &normalSize, const QSize &smallSize, 180 222 const QString &strNormalIcon, const QString &strSmallIcon, … … 186 228 } 187 229 188 UIActionToggle::UIActionToggle( QObject*pParent,230 UIActionToggle::UIActionToggle(UIActionPool *pParent, 189 231 const QString &strIconOn, const QString &strIconOff, 190 232 const QString &strIconOnDis, const QString &strIconOffDis) … … 195 237 } 196 238 197 UIActionToggle::UIActionToggle(QObject *pParent, const QIcon &icon) 239 UIActionToggle::UIActionToggle(UIActionPool *pParent, 240 const QIcon &icon) 198 241 : UIAction(pParent, UIActionType_Toggle) 199 242 { … … 215 258 216 259 /* UIActionMenu stuff: */ 217 UIActionMenu::UIActionMenu(QObject *pParent, const QString &strIcon, const QString &strIconDis) 260 UIActionMenu::UIActionMenu(UIActionPool *pParent, 261 const QString &strIcon, const QString &strIconDis) 218 262 : UIAction(pParent, UIActionType_Menu) 219 263 { … … 223 267 } 224 268 225 UIActionMenu::UIActionMenu(QObject *pParent, const QIcon &icon) 269 UIActionMenu::UIActionMenu(UIActionPool *pParent, 270 const QIcon &icon) 226 271 : UIAction(pParent, UIActionType_Menu) 227 272 { … … 238 283 public: 239 284 240 UIActionSimpleLogDialog( QObject*pParent)285 UIActionSimpleLogDialog(UIActionPool *pParent) 241 286 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 242 287 ":/vm_show_logs_32px.png", ":/show_logs_16px.png", 243 288 ":/vm_show_logs_disabled_32px.png", ":/show_logs_disabled_16px.png") 244 289 { 245 switch (gActionPool->type()) 290 retranslateUi(); 291 } 292 293 protected: 294 295 QString shortcutExtraDataID() const 296 { 297 return QString("ShowVMLog"); 298 } 299 300 QKeySequence defaultShortcut(UIActionPoolType actionPoolType) const 301 { 302 switch (actionPoolType) 246 303 { 247 case UIActionPoolType_Selector: 248 setShortcut(gSS->keySequence(UISelectorShortcuts::ShowVMLogShortcut)); 249 break; 250 case UIActionPoolType_Runtime: 251 break; 304 case UIActionPoolType_Selector: return QKeySequence("Ctrl+L"); 305 case UIActionPoolType_Runtime: break; 252 306 } 253 retranslateUi(); 254 } 255 256 protected: 257 258 void retranslateUi() 259 { 260 setText(QApplication::translate("UIActionPool", "Show &Log...")); 307 return QKeySequence(); 308 } 309 310 void retranslateUi() 311 { 312 setName(QApplication::translate("UIActionPool", "Show &Log...")); 261 313 setStatusTip(QApplication::translate("UIActionPool", "Show the log files of the selected virtual machine")); 262 314 } … … 269 321 public: 270 322 271 UIActionMenuHelp( QObject*pParent)323 UIActionMenuHelp(UIActionPool *pParent) 272 324 : UIActionMenu(pParent) 273 325 { … … 279 331 void retranslateUi() 280 332 { 281 set Text(menuText(QApplication::translate("UIActionPool", "&Help")));333 setName(QApplication::translate("UIActionPool", "&Help")); 282 334 } 283 335 }; … … 289 341 public: 290 342 291 UIActionSimpleContents( QObject*pParent)343 UIActionSimpleContents(UIActionPool *pParent) 292 344 : UIActionSimple(pParent, UIIconPool::defaultIcon(UIIconPool::DialogHelpIcon)) 293 345 { 294 switch (gActionPool->type()) 346 retranslateUi(); 347 } 348 349 protected: 350 351 QString shortcutExtraDataID() const 352 { 353 return QString("Help"); 354 } 355 356 QKeySequence defaultShortcut(UIActionPoolType actionPoolType) const 357 { 358 switch (actionPoolType) 295 359 { 296 case UIActionPoolType_Selector: 297 setShortcut(gSS->keySequence(UISelectorShortcuts::HelpShortcut)); 298 break; 299 case UIActionPoolType_Runtime: 300 setShortcut(gMS->keySequence(UIMachineShortcuts::HelpShortcut)); 301 break; 360 case UIActionPoolType_Selector: return QKeySequence(QKeySequence::HelpContents); 361 case UIActionPoolType_Runtime: break; 302 362 } 303 retranslateUi(); 304 } 305 306 protected: 307 308 void retranslateUi() 309 { 310 setText(menuText(QApplication::translate("UIActionPool", "&Contents..."))); 363 return QKeySequence(); 364 } 365 366 void retranslateUi() 367 { 368 setName(QApplication::translate("UIActionPool", "&Contents...")); 311 369 setStatusTip(QApplication::translate("UIActionPool", "Show help contents")); 312 370 } … … 319 377 public: 320 378 321 UIActionSimpleWebSite( QObject*pParent)379 UIActionSimpleWebSite(UIActionPool *pParent) 322 380 : UIActionSimple(pParent, ":/site_16px.png") 323 381 { 324 switch (gActionPool->type()) 325 { 326 case UIActionPoolType_Selector: 327 setShortcut(gSS->keySequence(UISelectorShortcuts::WebShortcut)); 328 break; 329 case UIActionPoolType_Runtime: 330 setShortcut(gMS->keySequence(UIMachineShortcuts::WebShortcut)); 331 break; 332 } 333 retranslateUi(); 334 } 335 336 protected: 337 338 void retranslateUi() 339 { 340 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&VirtualBox Web Site...")), gMS->shortcut(UIMachineShortcuts::WebShortcut))); 382 retranslateUi(); 383 } 384 385 protected: 386 387 QString shortcutExtraDataID() const 388 { 389 return QString("Web"); 390 } 391 392 void retranslateUi() 393 { 394 setName(QApplication::translate("UIActionPool", "&VirtualBox Web Site...")); 341 395 setStatusTip(QApplication::translate("UIActionPool", "Open the browser and go to the VirtualBox product web site")); 342 396 } … … 349 403 public: 350 404 351 UIActionSimpleResetWarnings( QObject*pParent)405 UIActionSimpleResetWarnings(UIActionPool *pParent) 352 406 : UIActionSimple(pParent, ":/reset_16px.png") 353 407 { 354 switch (gActionPool->type()) 355 { 356 case UIActionPoolType_Selector: 357 setShortcut(gSS->keySequence(UISelectorShortcuts::ResetWarningsShortcut)); 358 break; 359 case UIActionPoolType_Runtime: 360 setShortcut(gMS->keySequence(UIMachineShortcuts::ResetWarningsShortcut)); 361 break; 362 } 363 retranslateUi(); 364 } 365 366 protected: 367 368 void retranslateUi() 369 { 370 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Reset All Warnings")), gMS->shortcut(UIMachineShortcuts::ResetWarningsShortcut))); 408 retranslateUi(); 409 } 410 411 protected: 412 413 QString shortcutExtraDataID() const 414 { 415 return QString("ResetWarnings"); 416 } 417 418 void retranslateUi() 419 { 420 setName(QApplication::translate("UIActionPool", "&Reset All Warnings")); 371 421 setStatusTip(QApplication::translate("UIActionPool", "Go back to showing all suppressed warnings and messages")); 372 422 } … … 379 429 public: 380 430 381 UIActionSimpleNetworkAccessManager( QObject*pParent)431 UIActionSimpleNetworkAccessManager(UIActionPool *pParent) 382 432 : UIActionSimple(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") 383 433 { 384 switch (gActionPool->type()) 385 { 386 case UIActionPoolType_Selector: 387 setShortcut(gSS->keySequence(UISelectorShortcuts::NetworkAccessManager)); 388 break; 389 case UIActionPoolType_Runtime: 390 setShortcut(gMS->keySequence(UIMachineShortcuts::NetworkAccessManager)); 391 break; 392 } 393 retranslateUi(); 394 } 395 396 protected: 397 398 void retranslateUi() 399 { 400 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Network Operations Manager...")), gMS->shortcut(UIMachineShortcuts::NetworkAccessManager))); 434 retranslateUi(); 435 } 436 437 protected: 438 439 QString shortcutExtraDataID() const 440 { 441 return QString("NetworkAccessManager"); 442 } 443 444 void retranslateUi() 445 { 446 setName(QApplication::translate("UIActionPool", "&Network Operations Manager...")); 401 447 setStatusTip(QApplication::translate("UIActionPool", "Show Network Operations Manager")); 402 448 } … … 409 455 public: 410 456 411 UIActionSimpleCheckForUpdates( QObject*pParent)457 UIActionSimpleCheckForUpdates(UIActionPool *pParent) 412 458 : UIActionSimple(pParent, ":/refresh_16px.png", ":/refresh_disabled_16px.png") 413 459 { 414 460 setMenuRole(QAction::ApplicationSpecificRole); 415 switch (gActionPool->type()) 416 { 417 case UIActionPoolType_Selector: 418 setShortcut(gSS->keySequence(UISelectorShortcuts::UpdateShortcut)); 419 break; 420 case UIActionPoolType_Runtime: 421 setShortcut(gMS->keySequence(UIMachineShortcuts::UpdateShortcut)); 422 break; 423 } 424 retranslateUi(); 425 } 426 427 protected: 428 429 void retranslateUi() 430 { 431 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "C&heck for Updates...")), gMS->shortcut(UIMachineShortcuts::UpdateShortcut))); 461 retranslateUi(); 462 } 463 464 protected: 465 466 QString shortcutExtraDataID() const 467 { 468 return QString("Update"); 469 } 470 471 void retranslateUi() 472 { 473 setName(QApplication::translate("UIActionPool", "C&heck for Updates...")); 432 474 setStatusTip(QApplication::translate("UIActionPool", "Check for a new VirtualBox version")); 433 475 } … … 440 482 public: 441 483 442 UIActionSimpleAbout( QObject*pParent)484 UIActionSimpleAbout(UIActionPool *pParent) 443 485 : UIActionSimple(pParent, ":/about_16px.png") 444 486 { 445 487 setMenuRole(QAction::AboutRole); 446 switch (gActionPool->type()) 447 { 448 case UIActionPoolType_Selector: 449 setShortcut(gSS->keySequence(UISelectorShortcuts::AboutShortcut)); 450 break; 451 case UIActionPoolType_Runtime: 452 setShortcut(gMS->keySequence(UIMachineShortcuts::AboutShortcut)); 453 break; 454 } 455 retranslateUi(); 456 } 457 458 protected: 459 460 void retranslateUi() 461 { 462 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&About VirtualBox...")), gMS->shortcut(UIMachineShortcuts::AboutShortcut))); 488 retranslateUi(); 489 } 490 491 protected: 492 493 QString shortcutExtraDataID() const 494 { 495 return QString("About"); 496 } 497 498 void retranslateUi() 499 { 500 setName(QApplication::translate("UIActionPool", "&About VirtualBox...")); 463 501 setStatusTip(QApplication::translate("UIActionPool", "Show a dialog with product information")); 464 502 } … … 482 520 return; 483 521 484 /* Depending on passed type: */522 /* Create instance: */ 485 523 switch (type) 486 524 { 487 case UIActionPoolType_Selector: m_pInstance =new UIActionPoolSelector; break;488 case UIActionPoolType_Runtime: m_pInstance =new UIActionPoolRuntime; break;525 case UIActionPoolType_Selector: new UIActionPoolSelector; break; 526 case UIActionPoolType_Runtime: new UIActionPoolRuntime; break; 489 527 default: break; 490 528 } … … 506 544 /* Delete instance: */ 507 545 delete m_pInstance; 508 m_pInstance = 0;509 546 } 510 547 … … 530 567 /* Create menus: */ 531 568 createMenus(); 569 /* Apply shortcuts: */ 570 gShortcutPool->applyShortcuts(this); 532 571 } 533 572 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r44354 r44434 29 29 /* Forward declarations: */ 30 30 class UIActionState; 31 class UIActionPool; 32 33 /* Action pool types: */ 34 enum UIActionPoolType 35 { 36 UIActionPoolType_Selector, 37 UIActionPoolType_Runtime 38 }; 31 39 32 40 /* Action types: */ … … 68 76 UIActionType type() const { return m_type; } 69 77 78 /* API: Parent stuff: */ 79 UIActionPool* actionPool() const { return m_pActionPool; } 80 70 81 /* API: Update stuff: */ 71 82 virtual void update() {} … … 74 85 UIActionState* toStateAction(); 75 86 87 /* API: Name stuff: */ 88 const QString& name() const { return m_strName; } 89 void setName(const QString &strName); 90 76 91 /* API: Shortcut stuff: */ 92 virtual QString shortcutExtraDataID() const { return QString(); } 93 virtual QKeySequence defaultShortcut(UIActionPoolType) const { return QKeySequence(); } 77 94 void setShortcut(const QKeySequence &shortcut); 78 95 void showShortcut(); … … 82 99 83 100 /* Constructor: */ 84 UIAction( QObject*pParent, UIActionType type);101 UIAction(UIActionPool *pParent, UIActionType type); 85 102 86 103 /* Protected API: Menu stuff: */ 87 QString menuText(const QString &strText);104 QString nameInMenu() const; 88 105 89 106 private: 90 107 108 /* Helper: Text stuff: */ 109 void updateText(); 110 91 111 /* Variables: */ 112 UIActionPool *m_pActionPool; 92 113 UIActionType m_type; 114 UIActionPoolType m_actionPoolType; 115 QString m_strName; 93 116 QKeySequence m_shortcut; 94 117 }; … … 125 148 126 149 /* Constructors: */ 127 UIActionSimple( QObject*pParent,150 UIActionSimple(UIActionPool *pParent, 128 151 const QString &strIcon = QString(), const QString &strIconDis = QString()); 129 UIActionSimple( QObject*pParent,152 UIActionSimple(UIActionPool *pParent, 130 153 const QSize &normalSize, const QSize &smallSize, 131 154 const QString &strNormalIcon, const QString &strSmallIcon, 132 155 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 133 UIActionSimple(QObject *pParent, const QIcon& icon); 156 UIActionSimple(UIActionPool *pParent, 157 const QIcon& icon); 134 158 }; 135 159 … … 147 171 148 172 /* Constructors: */ 149 UIActionState( QObject*pParent,173 UIActionState(UIActionPool *pParent, 150 174 const QString &strIcon = QString(), const QString &strIconDis = QString()); 151 UIActionState( QObject*pParent,175 UIActionState(UIActionPool *pParent, 152 176 const QSize &normalSize, const QSize &smallSize, 153 177 const QString &strNormalIcon, const QString &strSmallIcon, 154 178 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 155 UIActionState(QObject *pParent, const QIcon& icon); 179 UIActionState(UIActionPool *pParent, 180 const QIcon& icon); 156 181 157 182 /* Variables: */ … … 167 192 168 193 /* Constructors: */ 169 UIActionToggle(QObject *pParent, const QString &strIcon = QString(), const QString &strIconDis = QString()); 170 UIActionToggle(QObject *pParent, 194 UIActionToggle(UIActionPool *pParent, 195 const QString &strIcon = QString(), const QString &strIconDis = QString()); 196 UIActionToggle(UIActionPool *pParent, 171 197 const QSize &normalSize, const QSize &smallSize, 172 198 const QString &strNormalIcon, const QString &strSmallIcon, 173 199 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 174 UIActionToggle(QObject *pParent, const QString &strIconOn, const QString &strIconOff, const QString &strIconOnDis, const QString &strIconOffDis); 175 UIActionToggle(QObject *pParent, const QIcon &icon); 200 UIActionToggle(UIActionPool *pParent, 201 const QString &strIconOn, const QString &strIconOff, const QString &strIconOnDis, const QString &strIconOffDis); 202 UIActionToggle(UIActionPool *pParent, 203 const QIcon &icon); 176 204 177 205 /* API reimplementation: Update stuff: */ … … 197 225 198 226 /* Constructors: */ 199 UIActionMenu(QObject *pParent, const QString &strIcon = QString(), const QString &strIconDis = QString()); 200 UIActionMenu(QObject *pParent, const QIcon &icon); 201 }; 202 203 /* Action pool types: */ 204 enum UIActionPoolType 205 { 206 UIActionPoolType_Selector, 207 UIActionPoolType_Runtime 227 UIActionMenu(UIActionPool *pParent, 228 const QString &strIcon = QString(), const QString &strIconDis = QString()); 229 UIActionMenu(UIActionPool *pParent, 230 const QIcon &icon); 208 231 }; 209 232 … … 225 248 /* API: Action stuff: */ 226 249 UIAction* action(int iIndex) const { return m_pool[iIndex]; } 250 QList<UIAction*> actions() const { return m_pool.values(); } 251 252 /* API: Shortcuts stuff: */ 253 virtual QString shortcutsExtraDataID() const = 0; 227 254 228 255 /* API: Prepare stuff: */ … … 242 269 void cleanup(); 243 270 244 /* Virtual help ingstuff: */271 /* Virtual helpers: Prepare/cleanup stuff: */ 245 272 virtual void createActions(); 246 273 virtual void createMenus(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcuts.h
r35634 r44434 2 2 * 3 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * UIShortcuts class declaration s4 * UIShortcuts class declaration 5 5 */ 6 6 7 7 /* 8 * Copyright (C) 2011 Oracle Corporation8 * Copyright (C) 2011-2013 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 #define __UIShortcuts_h__ 21 21 22 /* Qt includes: */ 23 #include <QMap> 24 25 /* GUI includes: */ 22 26 #include "VBoxGlobal.h" 23 27 24 /* Qt includes */ 25 #include <QHash> 28 /* Forward declarations: */ 29 class UIActionPool; 30 class UIAction; 26 31 27 class UIKeySequence 32 /* Shortcut descriptor: */ 33 class UIShortcut 28 34 { 29 35 public: 30 UIKeySequence() {}31 36 32 UIKeySequence(const QString &strId, const QString strKeySeq = "")33 : m_strId(strId)34 , m_strDefKeySeq(strKeySeq)35 , m_strCurKeySeq(strKeySeq) {}37 /* Constructor: */ 38 UIShortcut(const QString &strDescription = QString(), 39 const QKeySequence &sequence = QKeySequence()) 40 : m_strDescription(strDescription), m_sequence(sequence) {} 36 41 37 UIKeySequence(const QString &strId, QKeySequence::StandardKey seq) 38 : m_strId(strId) 39 { 40 QKeySequence ks(seq); 41 m_strDefKeySeq = m_strCurKeySeq = ks.toString(); 42 } 42 /* API: Description stuff: */ 43 void setDescription(const QString &strDescription); 44 const QString& description() const; 43 45 44 QString id() const 45 { 46 return m_strId; 47 } 46 /* API: Sequence stuff: */ 47 void setSequence(const QKeySequence &sequence); 48 const QKeySequence& sequence() const; 48 49 49 QString defaultKeySequence() const 50 { 51 return m_strDefKeySeq; 52 } 53 54 void setKeySequence(const QString& strKeySeq) 55 { 56 m_strCurKeySeq = strKeySeq; 57 } 58 59 QString keySequence() const 60 { 61 return m_strCurKeySeq; 62 } 50 /* API: Conversion stuff: */ 51 QString toString() const; 63 52 64 53 private: 65 /* Private member vars */ 66 QString m_strId;67 QString m_strDe fKeySeq;68 Q String m_strCurKeySeq;54 55 /* Variables: */ 56 QString m_strDescription; 57 QKeySequence m_sequence; 69 58 }; 70 59 71 template <class T> 72 class UIShortcut s60 /* Singleton shortcut pool: */ 61 class UIShortcutPool : public QObject 73 62 { 63 Q_OBJECT; 64 74 65 public: 75 static T *instance()76 {77 if (!m_pInstance)78 m_pInstance = new T();79 return m_pInstance;80 }81 66 82 static void destroy() 83 { 84 if (m_pInstance) 85 { 86 delete m_pInstance; 87 m_pInstance = 0; 88 } 89 } 67 /* API: Singleton stuff: */ 68 static UIShortcutPool* instance(); 69 static void create(); 70 static void destroy(); 90 71 91 QString shortcut(int type) const 92 { 93 return m_Shortcuts[type].keySequence(); 94 } 72 /* API: Shortcut stuff: */ 73 UIShortcut& shortcut(UIActionPool *pActionPool, UIAction *pAction); 74 UIShortcut& shortcut(const QString &strPoolID, const QString &strActionID); 95 75 96 QKeySequence keySequence(int type) const 97 { 98 return QKeySequence(m_Shortcuts[type].keySequence()); 99 } 76 /* API: Action-pool stuff: */ 77 void applyShortcuts(UIActionPool *pActionPool); 100 78 101 pr otected:79 private: 102 80 103 UIShortcuts() {} 81 /* Constructor/destructor: */ 82 UIShortcutPool(); 83 ~UIShortcutPool(); 104 84 105 void loadExtraData(const QString &strKey, int cSize) 106 { 107 QStringList newKeys = vboxGlobal().virtualBox().GetExtraDataStringList(strKey); 108 for (int i = 0; i < newKeys.size(); ++i) 109 { 110 const QString &s = newKeys.at(i); 111 int w = s.indexOf('='); 112 if (w < 0) 113 continue; 114 QString id = s.left(w); 115 QString value = s.right(s.length() - w - 1); 116 for (int a = 0; a < cSize; ++a) 117 if (m_Shortcuts[a].id().compare(id, Qt::CaseInsensitive) == 0) 118 { 119 if (value.compare("None", Qt::CaseInsensitive) == 0) 120 m_Shortcuts[a].setKeySequence(""); 121 else 122 m_Shortcuts[a].setKeySequence(value); 123 } 124 } 125 } 85 /* Prepare/cleanup helpers: */ 86 void prepare(); 87 void cleanup() {} 126 88 127 static T *m_pInstance; 128 QHash<int, UIKeySequence> m_Shortcuts; 89 /* Helpers: Shortcuts stuff: */ 90 void loadDefaults(); 91 void loadOverrides(); 92 void parseOverrides(const QStringList &overrides, const QString &strTemplate); 93 94 /* Helper: Shortcut stuff: */ 95 UIShortcut& shortcut(const QString &strShortcutKey); 96 97 /* Variables: */ 98 static UIShortcutPool *m_pInstance; 99 static const QString m_strShortcutKeyTemplate; 100 QMap<QString, UIShortcut> m_shortcuts; 129 101 }; 102 103 #define gShortcutPool UIShortcutPool::instance() 130 104 131 105 #endif /* __UIShortcuts_h__ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r44354 r44434 57 57 #include "QIDialogButtonBox.h" 58 58 #include "UIIconPool.h" 59 #include "UIShortcuts.h" 59 60 #include "UIActionPoolSelector.h" 60 61 #include "UIActionPoolRuntime.h" … … 4636 4637 sltProcessGlobalSettingChange(); 4637 4638 4639 /* Create shortcut pool: */ 4640 UIShortcutPool::create(); 4641 4638 4642 /* Create action pool: */ 4639 4643 if (isVMConsoleProcess()) … … 4664 4668 4665 4669 /* Destroy action pool: */ 4666 if (isVMConsoleProcess())4667 UIActionPoolRuntime::destroy(); 4668 else4669 UIActionPoolSelector::destroy();4670 UIActionPool::destroy(); 4671 4672 /* Destroy shortcut pool: */ 4673 UIShortcutPool::destroy(); 4670 4674 4671 4675 /* sanity check */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r44354 r44434 20 20 /* Local includes: */ 21 21 #include "UIActionPoolRuntime.h" 22 #include "UI MachineShortcuts.h"22 #include "UIShortcuts.h" 23 23 #include "VBoxGlobal.h" 24 24 … … 29 29 public: 30 30 31 MenuMachineAction( QObject*pParent)31 MenuMachineAction(UIActionPool *pParent) 32 32 : UIActionMenu(pParent) 33 33 { … … 39 39 void retranslateUi() 40 40 { 41 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&Machine")));41 setName(QApplication::translate("UIActionPool", "&Machine")); 42 42 } 43 43 }; … … 49 49 public: 50 50 51 ShowSettingsDialogAction( QObject*pParent)51 ShowSettingsDialogAction(UIActionPool *pParent) 52 52 : UIActionSimple(pParent, ":/settings_16px.png", ":/settings_dis_16px.png") 53 53 { … … 57 57 protected: 58 58 59 void retranslateUi() 60 { 61 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Settings...")), gMS->shortcut(UIMachineShortcuts::SettingsDialogShortcut))); 59 QString shortcutExtraDataID() const 60 { 61 return QString("SettingsDialog"); 62 } 63 64 QKeySequence defaultShortcut(UIActionPoolType) const 65 { 66 return QKeySequence("S"); 67 } 68 69 void retranslateUi() 70 { 71 setName(QApplication::translate("UIActionPool", "&Settings...")); 62 72 setStatusTip(QApplication::translate("UIActionPool", "Manage the virtual machine settings")); 63 73 } … … 70 80 public: 71 81 72 PerformTakeSnapshotAction( QObject*pParent)82 PerformTakeSnapshotAction(UIActionPool *pParent) 73 83 : UIActionSimple(pParent, ":/take_snapshot_16px.png", ":/take_snapshot_dis_16px.png") 74 84 { … … 78 88 protected: 79 89 80 void retranslateUi() 81 { 82 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Take Sn&apshot...")), gMS->shortcut(UIMachineShortcuts::TakeSnapshotShortcut))); 90 QString shortcutExtraDataID() const 91 { 92 return QString("TakeSnapshot"); 93 } 94 95 QKeySequence defaultShortcut(UIActionPoolType) const 96 { 97 return QKeySequence("T"); 98 } 99 100 void retranslateUi() 101 { 102 setName(QApplication::translate("UIActionPool", "Take Sn&apshot...")); 83 103 setStatusTip(QApplication::translate("UIActionPool", "Take a snapshot of the virtual machine")); 84 104 } … … 91 111 public: 92 112 93 PerformTakeScreenshotAction( QObject*pParent)113 PerformTakeScreenshotAction(UIActionPool *pParent) 94 114 : UIActionSimple(pParent, ":/take_screenshot_16px.png", ":/take_screenshot_disabled_16px.png") 95 115 { … … 99 119 protected: 100 120 101 void retranslateUi() 102 { 103 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Take Screensh&ot...")), gMS->shortcut(UIMachineShortcuts::TakeScreenshotShortcut))); 121 QString shortcutExtraDataID() const 122 { 123 return QString("TakeScreenshot"); 124 } 125 126 QKeySequence defaultShortcut(UIActionPoolType) const 127 { 128 return QKeySequence("E"); 129 } 130 131 void retranslateUi() 132 { 133 setName(QApplication::translate("UIActionPool", "Take Screensh&ot...")); 104 134 setStatusTip(QApplication::translate("UIActionPool", "Take a screenshot of the virtual machine")); 105 135 } … … 112 142 public: 113 143 114 ShowInformationDialogAction( QObject*pParent)144 ShowInformationDialogAction(UIActionPool *pParent) 115 145 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") 116 146 { … … 120 150 protected: 121 151 122 void retranslateUi() 123 { 124 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Session I&nformation...")), gMS->shortcut(UIMachineShortcuts::InformationDialogShortcut))); 152 QString shortcutExtraDataID() const 153 { 154 return QString("InformationDialog"); 155 } 156 157 QKeySequence defaultShortcut(UIActionPoolType) const 158 { 159 return QKeySequence("N"); 160 } 161 162 void retranslateUi() 163 { 164 setName(QApplication::translate("UIActionPool", "Session I&nformation...")); 125 165 setStatusTip(QApplication::translate("UIActionPool", "Show Session Information Dialog")); 126 166 } … … 133 173 public: 134 174 135 MenuMouseIntegrationAction( QObject*pParent)175 MenuMouseIntegrationAction(UIActionPool *pParent) 136 176 : UIActionMenu(pParent) 137 177 { … … 150 190 public: 151 191 152 ToggleMouseIntegrationAction( QObject*pParent)192 ToggleMouseIntegrationAction(UIActionPool *pParent) 153 193 : UIActionToggle(pParent, 154 194 ":/mouse_can_seamless_on_16px.png", ":/mouse_can_seamless_16px.png", … … 160 200 protected: 161 201 162 void retranslateUi() 163 { 164 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Disable &Mouse Integration")), gMS->shortcut(UIMachineShortcuts::MouseIntegrationShortcut))); 202 QString shortcutExtraDataID() const 203 { 204 return QString("MouseIntegration"); 205 } 206 207 QKeySequence defaultShortcut(UIActionPoolType) const 208 { 209 return QKeySequence("I"); 210 } 211 212 void retranslateUi() 213 { 214 setName(QApplication::translate("UIActionPool", "Disable &Mouse Integration")); 165 215 setStatusTip(QApplication::translate("UIActionPool", "Temporarily disable host mouse pointer integration")); 166 216 } … … 173 223 public: 174 224 175 PerformTypeCADAction( QObject*pParent)225 PerformTypeCADAction(UIActionPool *pParent) 176 226 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") 177 227 { … … 181 231 protected: 182 232 183 void retranslateUi() 184 { 185 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Insert Ctrl-Alt-Del")), gMS->shortcut(UIMachineShortcuts::TypeCADShortcut))); 233 QString shortcutExtraDataID() const 234 { 235 return QString("TypeCAD"); 236 } 237 238 QKeySequence defaultShortcut(UIActionPoolType) const 239 { 240 return QKeySequence("Del"); 241 } 242 243 void retranslateUi() 244 { 245 setName(QApplication::translate("UIActionPool", "&Insert Ctrl-Alt-Del")); 186 246 setStatusTip(QApplication::translate("UIActionPool", "Send the Ctrl-Alt-Del sequence to the virtual machine")); 187 247 } … … 195 255 public: 196 256 197 PerformTypeCABSAction( QObject*pParent)257 PerformTypeCABSAction(UIActionPool *pParent) 198 258 : UIActionSimple(pParent, ":/hostkey_16px.png", ":/hostkey_disabled_16px.png") 199 259 { … … 203 263 protected: 204 264 205 void retranslateUi() 206 { 207 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Ins&ert Ctrl-Alt-Backspace")), gMS->shortcut(UIMachineShortcuts::TypeCABSShortcut))); 265 QString shortcutExtraDataID() const 266 { 267 return QString("TypeCABS"); 268 } 269 270 QKeySequence defaultShortcut(UIActionPoolType) const 271 { 272 return QKeySequence("Backspace"); 273 } 274 275 void retranslateUi() 276 { 277 setName(QApplication::translate("UIActionPool", "Ins&ert Ctrl-Alt-Backspace")); 208 278 setStatusTip(QApplication::translate("UIActionPool", "Send the Ctrl-Alt-Backspace sequence to the virtual machine")); 209 279 } … … 217 287 public: 218 288 219 TogglePauseAction( QObject*pParent)289 TogglePauseAction(UIActionPool *pParent) 220 290 : UIActionToggle(pParent, ":/pause_16px.png", ":/pause_disabled_16px.png") 221 291 { … … 225 295 protected: 226 296 227 void retranslateUi() 228 { 229 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Pause")), gMS->shortcut(UIMachineShortcuts::PauseShortcut))); 297 QString shortcutExtraDataID() const 298 { 299 return QString("Pause"); 300 } 301 302 QKeySequence defaultShortcut(UIActionPoolType) const 303 { 304 return QKeySequence("P"); 305 } 306 307 void retranslateUi() 308 { 309 setName(QApplication::translate("UIActionPool", "&Pause")); 230 310 setStatusTip(QApplication::translate("UIActionPool", "Suspend the execution of the virtual machine")); 231 311 } … … 238 318 public: 239 319 240 PerformResetAction( QObject*pParent)320 PerformResetAction(UIActionPool *pParent) 241 321 : UIActionSimple(pParent, ":/reset_16px.png", ":/reset_disabled_16px.png") 242 322 { … … 246 326 protected: 247 327 248 void retranslateUi() 249 { 250 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Reset")), gMS->shortcut(UIMachineShortcuts::ResetShortcut))); 328 QString shortcutExtraDataID() const 329 { 330 return QString("Reset"); 331 } 332 333 QKeySequence defaultShortcut(UIActionPoolType) const 334 { 335 return QKeySequence("R"); 336 } 337 338 void retranslateUi() 339 { 340 setName(QApplication::translate("UIActionPool", "&Reset")); 251 341 setStatusTip(QApplication::translate("UIActionPool", "Reset the virtual machine")); 252 342 } … … 259 349 public: 260 350 261 PerformShutdownAction( QObject*pParent)351 PerformShutdownAction(UIActionPool *pParent) 262 352 : UIActionSimple(pParent, ":/acpi_16px.png", ":/acpi_disabled_16px.png") 263 353 { … … 267 357 protected: 268 358 269 void retranslateUi() 270 { 271 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "ACPI Sh&utdown")), gMS->shortcut(UIMachineShortcuts::ShutdownShortcut))); 359 QString shortcutExtraDataID() const 360 { 361 return QString("Shutdown"); 362 } 363 364 QKeySequence defaultShortcut(UIActionPoolType) const 365 { 366 #ifdef Q_WS_MAC 367 return QKeySequence("U"); 368 #else /* Q_WS_MAC */ 369 return QKeySequence("H"); 370 #endif /* !Q_WS_MAC */ 371 } 372 373 void retranslateUi() 374 { 375 setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); 272 376 setStatusTip(QApplication::translate("UIActionPool", "Send the ACPI Power Button press event to the virtual machine")); 273 377 } … … 280 384 public: 281 385 282 PerformCloseAction( QObject*pParent)386 PerformCloseAction(UIActionPool *pParent) 283 387 : UIActionSimple(pParent, ":/exit_16px.png") 284 388 { … … 289 393 protected: 290 394 291 void retranslateUi() 292 { 293 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Close...")), gMS->shortcut(UIMachineShortcuts::CloseShortcut))); 395 QString shortcutExtraDataID() const 396 { 397 return QString("Close"); 398 } 399 400 QKeySequence defaultShortcut(UIActionPoolType) const 401 { 402 return QKeySequence("Q"); 403 } 404 405 void retranslateUi() 406 { 407 setName(QApplication::translate("UIActionPool", "&Close...")); 294 408 setStatusTip(QApplication::translate("UIActionPool", "Close the virtual machine")); 295 409 } … … 302 416 public: 303 417 304 MenuViewAction( QObject*pParent)418 MenuViewAction(UIActionPool *pParent) 305 419 : UIActionMenu(pParent) 306 420 { … … 312 426 void retranslateUi() 313 427 { 314 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&View")));428 setName(QApplication::translate("UIActionPool", "&View")); 315 429 } 316 430 }; … … 322 436 public: 323 437 324 ToggleFullscreenModeAction( QObject*pParent)438 ToggleFullscreenModeAction(UIActionPool *pParent) 325 439 : UIActionToggle(pParent, 326 440 ":/fullscreen_on_16px.png", ":/fullscreen_16px.png", … … 332 446 protected: 333 447 334 void retranslateUi() 335 { 336 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Switch to &Fullscreen")), gMS->shortcut(UIMachineShortcuts::FullscreenModeShortcut))); 448 QString shortcutExtraDataID() const 449 { 450 return QString("FullscreenMode"); 451 } 452 453 QKeySequence defaultShortcut(UIActionPoolType) const 454 { 455 return QKeySequence("F"); 456 } 457 458 void retranslateUi() 459 { 460 setName(QApplication::translate("UIActionPool", "Switch to &Fullscreen")); 337 461 setStatusTip(QApplication::translate("UIActionPool", "Switch between normal and fullscreen mode")); 338 462 } … … 345 469 public: 346 470 347 ToggleSeamlessModeAction( QObject*pParent)471 ToggleSeamlessModeAction(UIActionPool *pParent) 348 472 : UIActionToggle(pParent, 349 473 ":/seamless_on_16px.png", ":/seamless_16px.png", … … 355 479 protected: 356 480 357 void retranslateUi() 358 { 359 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Switch to Seam&less Mode")), gMS->shortcut(UIMachineShortcuts::SeamlessModeShortcut))); 481 QString shortcutExtraDataID() const 482 { 483 return QString("SeamlessMode"); 484 } 485 486 QKeySequence defaultShortcut(UIActionPoolType) const 487 { 488 return QKeySequence("L"); 489 } 490 491 void retranslateUi() 492 { 493 setName(QApplication::translate("UIActionPool", "Switch to Seam&less Mode")); 360 494 setStatusTip(QApplication::translate("UIActionPool", "Switch between normal and seamless desktop integration mode")); 361 495 } … … 368 502 public: 369 503 370 ToggleScaleModeAction( QObject*pParent)504 ToggleScaleModeAction(UIActionPool *pParent) 371 505 : UIActionToggle(pParent, 372 506 ":/scale_on_16px.png", ":/scale_16px.png", … … 378 512 protected: 379 513 380 void retranslateUi() 381 { 382 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Switch to &Scale Mode")), gMS->shortcut(UIMachineShortcuts::ScaleModeShortcut))); 514 QString shortcutExtraDataID() const 515 { 516 return QString("ScaleMode"); 517 } 518 519 QKeySequence defaultShortcut(UIActionPoolType) const 520 { 521 return QKeySequence("C"); 522 } 523 524 void retranslateUi() 525 { 526 setName(QApplication::translate("UIActionPool", "Switch to &Scale Mode")); 383 527 setStatusTip(QApplication::translate("UIActionPool", "Switch between normal and scale mode")); 384 528 } … … 391 535 public: 392 536 393 ToggleGuestAutoresizeAction( QObject*pParent)537 ToggleGuestAutoresizeAction(UIActionPool *pParent) 394 538 : UIActionToggle(pParent, 395 539 ":/auto_resize_on_on_16px.png", ":/auto_resize_on_16px.png", … … 401 545 protected: 402 546 403 void retranslateUi() 404 { 405 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Auto-resize &Guest Display")), gMS->shortcut(UIMachineShortcuts::GuestAutoresizeShortcut))); 547 QString shortcutExtraDataID() const 548 { 549 return QString("GuestAutoresize"); 550 } 551 552 QKeySequence defaultShortcut(UIActionPoolType) const 553 { 554 return QKeySequence("G"); 555 } 556 557 void retranslateUi() 558 { 559 setName(QApplication::translate("UIActionPool", "Auto-resize &Guest Display")); 406 560 setStatusTip(QApplication::translate("UIActionPool", "Automatically resize the guest display when the window is resized (requires Guest Additions)")); 407 561 } … … 414 568 public: 415 569 416 PerformWindowAdjustAction( QObject*pParent)570 PerformWindowAdjustAction(UIActionPool *pParent) 417 571 : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") 418 572 { … … 422 576 protected: 423 577 424 void retranslateUi() 425 { 426 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Adjust Window Size")), gMS->shortcut(UIMachineShortcuts::WindowAdjustShortcut))); 578 QString shortcutExtraDataID() const 579 { 580 return QString("WindowAdjust"); 581 } 582 583 QKeySequence defaultShortcut(UIActionPoolType) const 584 { 585 return QKeySequence("A"); 586 } 587 588 void retranslateUi() 589 { 590 setName(QApplication::translate("UIActionPool", "&Adjust Window Size")); 427 591 setStatusTip(QApplication::translate("UIActionPool", "Adjust window size and position to best fit the guest display")); 428 592 } … … 435 599 public: 436 600 437 MenuDevicesAction( QObject*pParent)601 MenuDevicesAction(UIActionPool *pParent) 438 602 : UIActionMenu(pParent) 439 603 { … … 445 609 void retranslateUi() 446 610 { 447 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&Devices")));611 setName(QApplication::translate("UIActionPool", "&Devices")); 448 612 } 449 613 }; … … 455 619 public: 456 620 457 MenuOpticalDevicesAction( QObject*pParent)621 MenuOpticalDevicesAction(UIActionPool *pParent) 458 622 : UIActionMenu(pParent, ":/cd_16px.png", ":/cd_disabled_16px.png") 459 623 { … … 466 630 void retranslateUi() 467 631 { 468 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&CD/DVD Devices")));632 setName(QApplication::translate("UIActionPool", "&CD/DVD Devices")); 469 633 } 470 634 }; … … 476 640 public: 477 641 478 MenuFloppyDevicesAction( QObject*pParent)642 MenuFloppyDevicesAction(UIActionPool *pParent) 479 643 : UIActionMenu(pParent, ":/fd_16px.png", ":/fd_disabled_16px.png") 480 644 { … … 487 651 void retranslateUi() 488 652 { 489 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&Floppy Devices")));653 setName(QApplication::translate("UIActionPool", "&Floppy Devices")); 490 654 } 491 655 }; … … 497 661 public: 498 662 499 MenuUSBDevicesAction( QObject*pParent)663 MenuUSBDevicesAction(UIActionPool *pParent) 500 664 : UIActionMenu(pParent, ":/usb_16px.png", ":/usb_disabled_16px.png") 501 665 { … … 508 672 void retranslateUi() 509 673 { 510 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "&USB Devices")));674 setName(QApplication::translate("UIActionPool", "&USB Devices")); 511 675 } 512 676 }; … … 518 682 public: 519 683 520 MenuSharedClipboardAction( QObject*pParent)684 MenuSharedClipboardAction(UIActionPool *pParent) 521 685 : UIActionMenu(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 522 686 { … … 528 692 void retranslateUi() 529 693 { 530 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "Shared &Clipboard")));694 setName(QApplication::translate("UIActionPool", "Shared &Clipboard")); 531 695 } 532 696 }; … … 538 702 public: 539 703 540 MenuDragAndDropAction( QObject*pParent)704 MenuDragAndDropAction(UIActionPool *pParent) 541 705 : UIActionMenu(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 542 706 { … … 548 712 void retranslateUi() 549 713 { 550 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "Drag'n'Drop")));714 setName(QApplication::translate("UIActionPool", "Drag'n'Drop")); 551 715 } 552 716 }; … … 558 722 public: 559 723 560 MenuNetworkAdaptersAction( QObject*pParent)724 MenuNetworkAdaptersAction(UIActionPool *pParent) 561 725 : UIActionMenu(pParent) 562 726 { … … 575 739 public: 576 740 577 ShowNetworkAdaptersDialogAction( QObject*pParent)741 ShowNetworkAdaptersDialogAction(UIActionPool *pParent) 578 742 : UIActionSimple(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") 579 743 { … … 583 747 protected: 584 748 585 void retranslateUi() 586 { 587 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Network Adapters...")), gMS->shortcut(UIMachineShortcuts::NetworkAdaptersDialogShortcut))); 749 QString shortcutExtraDataID() const 750 { 751 return QString("NetworkAdaptersDialog"); 752 } 753 754 void retranslateUi() 755 { 756 setName(QApplication::translate("UIActionPool", "&Network Adapters...")); 588 757 setStatusTip(QApplication::translate("UIActionPool", "Change the settings of network adapters")); 589 758 } … … 596 765 public: 597 766 598 MenuSharedFoldersAction( QObject*pParent)767 MenuSharedFoldersAction(UIActionPool *pParent) 599 768 : UIActionMenu(pParent) 600 769 { … … 613 782 public: 614 783 615 ShowSharedFoldersDialogAction( QObject*pParent)784 ShowSharedFoldersDialogAction(UIActionPool *pParent) 616 785 : UIActionSimple(pParent, ":/shared_folder_16px.png", ":/shared_folder_disabled_16px.png") 617 786 { … … 621 790 protected: 622 791 623 void retranslateUi() 624 { 625 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Shared Folders...")), gMS->shortcut(UIMachineShortcuts::SharedFoldersDialogShortcut))); 792 QString shortcutExtraDataID() const 793 { 794 return QString("SharedFoldersDialog"); 795 } 796 797 void retranslateUi() 798 { 799 setName(QApplication::translate("UIActionPool", "&Shared Folders...")); 626 800 setStatusTip(QApplication::translate("UIActionPool", "Create or modify shared folders")); 627 801 } … … 634 808 public: 635 809 636 ToggleVRDEServerAction( QObject*pParent)810 ToggleVRDEServerAction(UIActionPool *pParent) 637 811 : UIActionToggle(pParent, 638 812 ":/vrdp_on_16px.png", ":/vrdp_16px.png", … … 644 818 protected: 645 819 646 void retranslateUi() 647 { 648 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Enable R&emote Display")), gMS->shortcut(UIMachineShortcuts::VRDPServerShortcut))); 820 QString shortcutExtraDataID() const 821 { 822 return QString("VRDPServer"); 823 } 824 825 void retranslateUi() 826 { 827 setName(QApplication::translate("UIActionPool", "Enable R&emote Display")); 649 828 setStatusTip(QApplication::translate("UIActionPool", "Enable remote desktop (RDP) connections to this machine")); 650 829 } … … 657 836 public: 658 837 659 PerformInstallGuestToolsAction( QObject*pParent)838 PerformInstallGuestToolsAction(UIActionPool *pParent) 660 839 : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") 661 840 { … … 665 844 protected: 666 845 667 void retranslateUi() 668 { 669 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Install Guest Additions...")), gMS->shortcut(UIMachineShortcuts::InstallGuestAdditionsShortcut))); 846 QString shortcutExtraDataID() const 847 { 848 return QString("InstallGuestAdditions"); 849 } 850 851 QKeySequence defaultShortcut(UIActionPoolType) const 852 { 853 return QKeySequence("D"); 854 } 855 856 void retranslateUi() 857 { 858 setName(QApplication::translate("UIActionPool", "&Install Guest Additions...")); 670 859 setStatusTip(QApplication::translate("UIActionPool", "Mount the Guest Additions installation image")); 671 860 } … … 679 868 public: 680 869 681 MenuDebugAction( QObject*pParent)870 MenuDebugAction(UIActionPool *pParent) 682 871 : UIActionMenu(pParent) 683 872 { … … 689 878 void retranslateUi() 690 879 { 691 menu()->setTitle(menuText(QApplication::translate("UIActionPool", "De&bug")));880 setName(QApplication::translate("UIActionPool", "De&bug")); 692 881 } 693 882 }; … … 699 888 public: 700 889 701 ShowStatisticsAction( QObject*pParent)890 ShowStatisticsAction(UIActionPool *pParent) 702 891 : UIActionSimple(pParent) 703 892 { … … 707 896 protected: 708 897 709 void retranslateUi() 710 { 711 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Statistics...", "debug action")), gMS->shortcut(UIMachineShortcuts::StatisticWindowShortcut))); 898 QString shortcutExtraDataID() const 899 { 900 return QString("StatisticWindow"); 901 } 902 903 void retranslateUi() 904 { 905 setName(QApplication::translate("UIActionPool", "&Statistics...", "debug action")); 712 906 } 713 907 }; … … 719 913 public: 720 914 721 ShowCommandLineAction( QObject*pParent)915 ShowCommandLineAction(UIActionPool *pParent) 722 916 : UIActionSimple(pParent) 723 917 { … … 727 921 protected: 728 922 729 void retranslateUi() 730 { 731 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "&Command Line...", "debug action")), gMS->shortcut(UIMachineShortcuts::CommandLineWindowShortcut))); 923 QString shortcutExtraDataID() const 924 { 925 return QString("CommandLineWindow"); 926 } 927 928 void retranslateUi() 929 { 930 setName(QApplication::translate("UIActionPool", "&Command Line...", "debug action")); 732 931 } 733 932 }; … … 739 938 public: 740 939 741 ToggleLoggingAction( QObject*pParent)940 ToggleLoggingAction(UIActionPool *pParent) 742 941 : UIActionToggle(pParent) 743 942 { … … 747 946 protected: 748 947 749 void retranslateUi() 750 { 751 setText(vboxGlobal().insertKeyToActionText(menuText(QApplication::translate("UIActionPool", "Enable &Logging...", "debug action")), gMS->shortcut(UIMachineShortcuts::LoggingShortcut))); 948 QString shortcutExtraDataID() const 949 { 950 return QString("Logging"); 951 } 952 953 void retranslateUi() 954 { 955 setName(QApplication::translate("UIActionPool", "Enable &Logging...", "debug action")); 752 956 } 753 957 }; … … 761 965 public: 762 966 763 DockMenuAction( QObject*pParent)967 DockMenuAction(UIActionPool *pParent) 764 968 : UIActionMenu(pParent) 765 969 { … … 778 982 public: 779 983 780 DockSettingsMenuAction( QObject*pParent)984 DockSettingsMenuAction(UIActionPool *pParent) 781 985 : UIActionMenu(pParent) 782 986 { … … 788 992 void retranslateUi() 789 993 { 790 set Text(QApplication::translate("UIActionPool", "Dock Icon"));994 setName(QApplication::translate("UIActionPool", "Dock Icon")); 791 995 } 792 996 }; … … 798 1002 public: 799 1003 800 ToggleDockPreviewMonitorAction( QObject*pParent)1004 ToggleDockPreviewMonitorAction(UIActionPool *pParent) 801 1005 : UIActionToggle(pParent) 802 1006 { … … 806 1010 protected: 807 1011 808 void retranslateUi() 809 { 810 setText(QApplication::translate("UIActionPool", "Show Monitor Preview")); 1012 QString shortcutExtraDataID() const 1013 { 1014 return QString("DockPreviewMonitor"); 1015 } 1016 1017 void retranslateUi() 1018 { 1019 setName(QApplication::translate("UIActionPool", "Show Monitor Preview")); 811 1020 } 812 1021 }; … … 818 1027 public: 819 1028 820 ToggleDockDisableMonitorAction( QObject*pParent)1029 ToggleDockDisableMonitorAction(UIActionPool *pParent) 821 1030 : UIActionToggle(pParent) 822 1031 { … … 826 1035 protected: 827 1036 828 void retranslateUi() 829 { 830 setText(QApplication::translate("UIActionPool", "Show Application Icon")); 1037 QString shortcutExtraDataID() const 1038 { 1039 return QString("DockDisableMonitor"); 1040 } 1041 1042 void retranslateUi() 1043 { 1044 setName(QApplication::translate("UIActionPool", "Show Application Icon")); 831 1045 } 832 1046 }; 833 1047 #endif /* Q_WS_MAC */ 834 1048 1049 1050 QString UIActionPoolRuntime::shortcutsExtraDataID() const 1051 { 1052 return GUI_Input_MachineShortcuts; 1053 } 835 1054 836 1055 void UIActionPoolRuntime::createActions() -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r44354 r44434 95 95 UIActionPoolRuntime() : UIActionPool(UIActionPoolType_Runtime) {} 96 96 97 /* Helper: Shortcuts stuff: */ 98 QString shortcutsExtraDataID() const; 99 97 100 /* Helpers: Prepare stuff: */ 98 101 void createActions(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIKeyboardHandlerFullscreen.cpp
r41107 r44434 26 26 #include "UIKeyboardHandlerFullscreen.h" 27 27 #include "UIMachineWindow.h" 28 #include "UI MachineShortcuts.h"28 #include "UIShortcuts.h" 29 29 30 30 /* Fullscreen keyboard-handler constructor: */ … … 56 56 QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent); 57 57 /* Process Host+Home for menu popup: */ 58 if (isHostKeyPressed() && pKeyEvent->key() == g MS->keySequence(UIMachineShortcuts::PopupMenuShortcut))58 if (isHostKeyPressed() && pKeyEvent->key() == gShortcutPool->shortcut(GUI_Input_MachineShortcuts, QString("PopupMenu")).sequence()) 59 59 { 60 60 /* Post request to show popup-menu: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIKeyboardHandlerNormal.cpp
r41107 r44434 26 26 #include "UIKeyboardHandlerNormal.h" 27 27 #include "UIMachineWindow.h" 28 #include "UI MachineShortcuts.h"28 #include "UIShortcuts.h" 29 29 30 30 /* Fullscreen keyboard-handler constructor: */ … … 59 59 QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent); 60 60 /* Process Host+Home as menu-bar activator: */ 61 if (isHostKeyPressed() && pKeyEvent->key() == g MS->keySequence(UIMachineShortcuts::PopupMenuShortcut))61 if (isHostKeyPressed() && pKeyEvent->key() == gShortcutPool->shortcut(GUI_Input_MachineShortcuts, QString("PopupMenu")).sequence()) 62 62 { 63 63 /* Trying to get menu-bar: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIKeyboardHandlerScale.cpp
r41107 r44434 26 26 #include "UIKeyboardHandlerScale.h" 27 27 #include "UIMachineWindow.h" 28 #include "UI MachineShortcuts.h"28 #include "UIShortcuts.h" 29 29 30 30 /* Fullscreen keyboard-handler constructor: */ … … 59 59 QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent); 60 60 /* Process Host+Home for menu popup: */ 61 if (isHostKeyPressed() && pKeyEvent->key() == g MS->keySequence(UIMachineShortcuts::PopupMenuShortcut))61 if (isHostKeyPressed() && pKeyEvent->key() == gShortcutPool->shortcut(GUI_Input_MachineShortcuts, QString("PopupMenu")).sequence()) 62 62 { 63 63 /* Post request to show popup-menu: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIKeyboardHandlerSeamless.cpp
r41107 r44434 26 26 #include "UIKeyboardHandlerSeamless.h" 27 27 #include "UIMachineWindow.h" 28 #include "UI MachineShortcuts.h"28 #include "UIShortcuts.h" 29 29 30 30 /* Fullscreen keyboard-handler constructor: */ … … 56 56 QKeyEvent *pKeyEvent = static_cast<QKeyEvent*>(pEvent); 57 57 /* Process Host+Home for menu popup: */ 58 if (isHostKeyPressed() && pKeyEvent->key() == g MS->keySequence(UIMachineShortcuts::PopupMenuShortcut))58 if (isHostKeyPressed() && pKeyEvent->key() == gShortcutPool->shortcut(GUI_Input_MachineShortcuts, QString("PopupMenu")).sequence()) 59 59 { 60 60 /* Post request to show popup-menu: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r44354 r44434 20 20 /* Local includes: */ 21 21 #include "UIActionPoolSelector.h" 22 #include "UI SelectorShortcuts.h"22 #include "UIDefs.h" 23 23 24 24 class UIActionMenuFile : public UIActionMenu … … 28 28 public: 29 29 30 UIActionMenuFile( QObject*pParent)30 UIActionMenuFile(UIActionPool *pParent) 31 31 : UIActionMenu(pParent) 32 32 { … … 39 39 { 40 40 #ifdef Q_WS_MAC 41 menu()->setTitle(QApplication::translate("UIActionPool", "&File", "Mac OS X version"));41 setName(QApplication::translate("UIActionPool", "&File", "Mac OS X version")); 42 42 #else /* Q_WS_MAC */ 43 menu()->setTitle(QApplication::translate("UIActionPool", "&File", "Non Mac OS X version"));43 setName(QApplication::translate("UIActionPool", "&File", "Non Mac OS X version")); 44 44 #endif /* !Q_WS_MAC */ 45 45 } … … 52 52 public: 53 53 54 UIActionSimpleMediumManagerDialog( QObject*pParent)54 UIActionSimpleMediumManagerDialog(UIActionPool *pParent) 55 55 : UIActionSimple(pParent, ":/diskimage_16px.png") 56 56 { 57 setShortcut(gSS->keySequence(UISelectorShortcuts::VirtualMediaManagerShortcut)); 58 retranslateUi(); 59 } 60 61 protected: 62 63 void retranslateUi() 64 { 65 setText(QApplication::translate("UIActionPool", "&Virtual Media Manager...")); 57 retranslateUi(); 58 } 59 60 protected: 61 62 QString shortcutExtraDataID() const 63 { 64 return QString("VirtualMediaManager"); 65 } 66 67 QKeySequence defaultShortcut(UIActionPoolType) const 68 { 69 return QKeySequence("Ctrl+D"); 70 } 71 72 void retranslateUi() 73 { 74 setName(QApplication::translate("UIActionPool", "&Virtual Media Manager...")); 66 75 setStatusTip(QApplication::translate("UIActionPool", "Display the Virtual Media Manager dialog")); 67 76 } … … 74 83 public: 75 84 76 UIActionSimpleImportApplianceWizard( QObject*pParent)85 UIActionSimpleImportApplianceWizard(UIActionPool *pParent) 77 86 : UIActionSimple(pParent, ":/import_16px.png") 78 87 { 79 setShortcut(gSS->keySequence(UISelectorShortcuts::ImportApplianceShortcut)); 80 retranslateUi(); 81 } 82 83 protected: 84 85 void retranslateUi() 86 { 87 setText(QApplication::translate("UIActionPool", "&Import Appliance...")); 88 retranslateUi(); 89 } 90 91 protected: 92 93 QString shortcutExtraDataID() const 94 { 95 return QString("ImportAppliance"); 96 } 97 98 QKeySequence defaultShortcut(UIActionPoolType) const 99 { 100 return QKeySequence("Ctrl+I"); 101 } 102 103 void retranslateUi() 104 { 105 setName(QApplication::translate("UIActionPool", "&Import Appliance...")); 88 106 setStatusTip(QApplication::translate("UIActionPool", "Import an appliance into VirtualBox")); 89 107 } … … 96 114 public: 97 115 98 UIActionSimpleExportApplianceWizard( QObject*pParent)116 UIActionSimpleExportApplianceWizard(UIActionPool *pParent) 99 117 : UIActionSimple(pParent, ":/export_16px.png") 100 118 { 101 setShortcut(gSS->keySequence(UISelectorShortcuts::ExportApplianceShortcut)); 102 retranslateUi(); 103 } 104 105 protected: 106 107 void retranslateUi() 108 { 109 setText(QApplication::translate("UIActionPool", "&Export Appliance...")); 119 retranslateUi(); 120 } 121 122 protected: 123 124 QString shortcutExtraDataID() const 125 { 126 return QString("ExportAppliance"); 127 } 128 129 QKeySequence defaultShortcut(UIActionPoolType) const 130 { 131 return QKeySequence("Ctrl+E"); 132 } 133 134 void retranslateUi() 135 { 136 setName(QApplication::translate("UIActionPool", "&Export Appliance...")); 110 137 setStatusTip(QApplication::translate("UIActionPool", "Export one or more VirtualBox virtual machines as an appliance")); 111 138 } … … 118 145 public: 119 146 120 UIActionSimplePreferencesDialog( QObject*pParent)147 UIActionSimplePreferencesDialog(UIActionPool *pParent) 121 148 : UIActionSimple(pParent, ":/global_settings_16px.png") 122 149 { 123 150 setMenuRole(QAction::PreferencesRole); 124 setShortcut(gSS->keySequence(UISelectorShortcuts::PreferencesShortcut)); 125 retranslateUi(); 126 } 127 128 protected: 129 130 void retranslateUi() 131 { 132 setText(QApplication::translate("UIActionPool", "&Preferences...", "global settings")); 151 retranslateUi(); 152 } 153 154 protected: 155 156 QString shortcutExtraDataID() const 157 { 158 return QString("Preferences"); 159 } 160 161 QKeySequence defaultShortcut(UIActionPoolType) const 162 { 163 return QKeySequence("Ctrl+G"); 164 } 165 166 void retranslateUi() 167 { 168 setName(QApplication::translate("UIActionPool", "&Preferences...", "global settings")); 133 169 setStatusTip(QApplication::translate("UIActionPool", "Display the global settings dialog")); 134 170 } … … 141 177 public: 142 178 143 UIActionSimpleExit( QObject*pParent)179 UIActionSimpleExit(UIActionPool *pParent) 144 180 : UIActionSimple(pParent, ":/exit_16px.png") 145 181 { 146 182 setMenuRole(QAction::QuitRole); 147 setShortcut(gSS->keySequence(UISelectorShortcuts::ExitShortcut)); 148 retranslateUi(); 149 } 150 151 protected: 152 153 void retranslateUi() 154 { 155 setText(QApplication::translate("UIActionPool", "E&xit")); 183 retranslateUi(); 184 } 185 186 protected: 187 188 QString shortcutExtraDataID() const 189 { 190 return QString("Exit"); 191 } 192 193 QKeySequence defaultShortcut(UIActionPoolType) const 194 { 195 return QKeySequence("Ctrl+Q"); 196 } 197 198 void retranslateUi() 199 { 200 setName(QApplication::translate("UIActionPool", "E&xit")); 156 201 setStatusTip(QApplication::translate("UIActionPool", "Close application")); 157 202 } … … 165 210 public: 166 211 167 UIActionMenuGroup( QObject*pParent)212 UIActionMenuGroup(UIActionPool *pParent) 168 213 : UIActionMenu(pParent) 169 214 { … … 175 220 void retranslateUi() 176 221 { 177 menu()->setTitle(QApplication::translate("UIActionPool", "&Group"));222 setName(QApplication::translate("UIActionPool", "&Group")); 178 223 } 179 224 }; … … 185 230 public: 186 231 187 UIActionSimpleGroupNew( QObject*pParent)232 UIActionSimpleGroupNew(UIActionPool *pParent) 188 233 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), ":/vm_new_32px.png", ":/new_16px.png") 189 234 { 190 setShortcut(gSS->keySequence(UISelectorShortcuts::NewVMShortcut)); 191 retranslateUi(); 192 } 193 194 protected: 195 196 void retranslateUi() 197 { 198 setText(QApplication::translate("UIActionPool", "&New Machine...")); 235 retranslateUi(); 236 } 237 238 protected: 239 240 QString shortcutExtraDataID() const 241 { 242 return QString("NewVM"); 243 } 244 245 QKeySequence defaultShortcut(UIActionPoolType) const 246 { 247 return QKeySequence("Ctrl+N"); 248 } 249 250 void retranslateUi() 251 { 252 setName(QApplication::translate("UIActionPool", "&New Machine...")); 199 253 setStatusTip(QApplication::translate("UIActionPool", "Create a new virtual machine")); 200 254 setToolTip(text().remove('&').remove('.') + … … 209 263 public: 210 264 211 UIActionSimpleGroupAdd( QObject*pParent)265 UIActionSimpleGroupAdd(UIActionPool *pParent) 212 266 : UIActionSimple(pParent, ":/vm_add_16px.png") 213 267 { 214 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMShortcut)); 215 retranslateUi(); 216 } 217 218 protected: 219 220 void retranslateUi() 221 { 222 setText(QApplication::translate("UIActionPool", "&Add Machine...")); 268 retranslateUi(); 269 } 270 271 protected: 272 273 QString shortcutExtraDataID() const 274 { 275 return QString("AddVM"); 276 } 277 278 QKeySequence defaultShortcut(UIActionPoolType) const 279 { 280 return QKeySequence("Ctrl+A"); 281 } 282 283 void retranslateUi() 284 { 285 setName(QApplication::translate("UIActionPool", "&Add Machine...")); 223 286 setStatusTip(QApplication::translate("UIActionPool", "Add an existing virtual machine")); 224 287 } … … 231 294 public: 232 295 233 UIActionSimpleGroupRename( QObject*pParent)296 UIActionSimpleGroupRename(UIActionPool *pParent) 234 297 : UIActionSimple(pParent, ":/name_16px.png") 235 298 { 236 setShortcut(gSS->keySequence(UISelectorShortcuts::RenameVMGroupShortcut)); 237 retranslateUi(); 238 } 239 240 protected: 241 242 void retranslateUi() 243 { 244 setText(QApplication::translate("UIActionPool", "Rena&me Group...")); 299 retranslateUi(); 300 } 301 302 protected: 303 304 QString shortcutExtraDataID() const 305 { 306 return QString("RenameVMGroup"); 307 } 308 309 QKeySequence defaultShortcut(UIActionPoolType) const 310 { 311 return QKeySequence("Ctrl+M"); 312 } 313 314 void retranslateUi() 315 { 316 setName(QApplication::translate("UIActionPool", "Rena&me Group...")); 245 317 setStatusTip(QApplication::translate("UIActionPool", "Rename the selected virtual machine group")); 246 318 } … … 253 325 public: 254 326 255 UIActionSimpleGroupRemove( QObject*pParent)327 UIActionSimpleGroupRemove(UIActionPool *pParent) 256 328 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 257 329 ":/vm_delete_32px.png", ":/delete_16px.png", 258 330 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 259 331 { 260 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMGroupShortcut)); 261 retranslateUi(); 262 } 263 264 protected: 265 266 void retranslateUi() 267 { 268 setText(QApplication::translate("UIActionPool", "&Ungroup...")); 332 retranslateUi(); 333 } 334 335 protected: 336 337 QString shortcutExtraDataID() const 338 { 339 return QString("AddVMGroup"); 340 } 341 342 QKeySequence defaultShortcut(UIActionPoolType) const 343 { 344 return QKeySequence("Ctrl+U"); 345 } 346 347 void retranslateUi() 348 { 349 setName(QApplication::translate("UIActionPool", "&Ungroup...")); 269 350 setStatusTip(QApplication::translate("UIActionPool", "Ungroup items of the selected virtual machine group")); 270 351 } … … 277 358 public: 278 359 279 UIActionSimpleGroupSort( QObject*pParent)360 UIActionSimpleGroupSort(UIActionPool *pParent) 280 361 : UIActionSimple(pParent/*, ":/settings_16px.png", ":/settings_dis_16px.png"*/) 281 362 { 282 setShortcut(gSS->keySequence(UISelectorShortcuts::SortGroup)); 283 retranslateUi(); 284 } 285 286 protected: 287 288 void retranslateUi() 289 { 290 setText(QApplication::translate("UIActionPool", "Sort")); 363 retranslateUi(); 364 } 365 366 protected: 367 368 QString shortcutExtraDataID() const 369 { 370 return QString("SortGroup"); 371 } 372 373 void retranslateUi() 374 { 375 setName(QApplication::translate("UIActionPool", "Sort")); 291 376 setStatusTip(QApplication::translate("UIActionPool", "Sort the items of the selected virtual machine group alphabetically")); 292 377 } … … 300 385 public: 301 386 302 UIActionMenuMachine( QObject*pParent)387 UIActionMenuMachine(UIActionPool *pParent) 303 388 : UIActionMenu(pParent) 304 389 { … … 310 395 void retranslateUi() 311 396 { 312 menu()->setTitle(QApplication::translate("UIActionPool", "&Machine"));397 setName(QApplication::translate("UIActionPool", "&Machine")); 313 398 } 314 399 }; … … 320 405 public: 321 406 322 UIActionSimpleMachineNew( QObject*pParent)407 UIActionSimpleMachineNew(UIActionPool *pParent) 323 408 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), ":/vm_new_32px.png", ":/new_16px.png") 324 409 { 325 setShortcut(gSS->keySequence(UISelectorShortcuts::NewVMShortcut)); 326 retranslateUi(); 327 } 328 329 protected: 330 331 void retranslateUi() 332 { 333 setText(QApplication::translate("UIActionPool", "&New...")); 410 retranslateUi(); 411 } 412 413 protected: 414 415 QString shortcutExtraDataID() const 416 { 417 return QString("NewVM"); 418 } 419 420 QKeySequence defaultShortcut(UIActionPoolType) const 421 { 422 return QKeySequence("Ctrl+N"); 423 } 424 425 void retranslateUi() 426 { 427 setName(QApplication::translate("UIActionPool", "&New...")); 334 428 setStatusTip(QApplication::translate("UIActionPool", "Create a new virtual machine")); 335 429 setToolTip(text().remove('&').remove('.') + … … 344 438 public: 345 439 346 UIActionSimpleMachineAdd( QObject*pParent)440 UIActionSimpleMachineAdd(UIActionPool *pParent) 347 441 : UIActionSimple(pParent, ":/vm_add_16px.png") 348 442 { 349 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMShortcut)); 350 retranslateUi(); 351 } 352 353 protected: 354 355 void retranslateUi() 356 { 357 setText(QApplication::translate("UIActionPool", "&Add...")); 443 retranslateUi(); 444 } 445 446 protected: 447 448 QString shortcutExtraDataID() const 449 { 450 return QString("AddVM"); 451 } 452 453 QKeySequence defaultShortcut(UIActionPoolType) const 454 { 455 return QKeySequence("Ctrl+A"); 456 } 457 458 void retranslateUi() 459 { 460 setName(QApplication::translate("UIActionPool", "&Add...")); 358 461 setStatusTip(QApplication::translate("UIActionPool", "Add an existing virtual machine")); 359 462 } … … 366 469 public: 367 470 368 UIActionSimpleMachineAddGroup( QObject*pParent)471 UIActionSimpleMachineAddGroup(UIActionPool *pParent) 369 472 : UIActionSimple(pParent, ":/add_shared_folder_16px.png") 370 473 { 371 setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMGroupShortcut)); 372 retranslateUi(); 373 } 374 375 protected: 376 377 void retranslateUi() 378 { 379 setText(QApplication::translate("UIActionPool", "Gro&up")); 474 retranslateUi(); 475 } 476 477 protected: 478 479 QString shortcutExtraDataID() const 480 { 481 return QString("AddVMGroup"); 482 } 483 484 QKeySequence defaultShortcut(UIActionPoolType) const 485 { 486 return QKeySequence("Ctrl+U"); 487 } 488 489 void retranslateUi() 490 { 491 setName(QApplication::translate("UIActionPool", "Gro&up")); 380 492 setStatusTip(QApplication::translate("UIActionPool", "Add a new group based on the items selected")); 381 493 } … … 388 500 public: 389 501 390 UIActionSimpleMachineSettings( QObject*pParent)502 UIActionSimpleMachineSettings(UIActionPool *pParent) 391 503 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 392 504 ":/vm_settings_32px.png", ":/settings_16px.png", 393 505 ":/vm_settings_disabled_32px.png", ":/settings_dis_16px.png") 394 506 { 395 setShortcut(gSS->keySequence(UISelectorShortcuts::SettingsVMShortcut)); 396 retranslateUi(); 397 } 398 399 protected: 400 401 void retranslateUi() 402 { 403 setText(QApplication::translate("UIActionPool", "&Settings...")); 507 retranslateUi(); 508 } 509 510 protected: 511 512 QString shortcutExtraDataID() const 513 { 514 return QString("SettingsVM"); 515 } 516 517 QKeySequence defaultShortcut(UIActionPoolType) const 518 { 519 return QKeySequence("Ctrl+S"); 520 } 521 522 void retranslateUi() 523 { 524 setName(QApplication::translate("UIActionPool", "&Settings...")); 404 525 setStatusTip(QApplication::translate("UIActionPool", "Manage the virtual machine settings")); 405 526 setToolTip(text().remove('&').remove('.') + … … 414 535 public: 415 536 416 UIActionSimpleMachineClone( QObject*pParent)537 UIActionSimpleMachineClone(UIActionPool *pParent) 417 538 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") 418 539 { 419 setShortcut(gSS->keySequence(UISelectorShortcuts::CloneVMShortcut)); 420 retranslateUi(); 421 } 422 423 protected: 424 425 void retranslateUi() 426 { 427 setText(QApplication::translate("UIActionPool", "Cl&one...")); 540 retranslateUi(); 541 } 542 543 protected: 544 545 QString shortcutExtraDataID() const 546 { 547 return QString("CloneVM"); 548 } 549 550 QKeySequence defaultShortcut(UIActionPoolType) const 551 { 552 return QKeySequence("Ctrl+O"); 553 } 554 555 void retranslateUi() 556 { 557 setName(QApplication::translate("UIActionPool", "Cl&one...")); 428 558 setStatusTip(QApplication::translate("UIActionPool", "Clone the selected virtual machine")); 429 559 } … … 436 566 public: 437 567 438 UIActionSimpleMachineRemove( QObject*pParent)568 UIActionSimpleMachineRemove(UIActionPool *pParent) 439 569 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 440 570 ":/vm_delete_32px.png", ":/delete_16px.png", 441 571 ":/vm_delete_disabled_32px.png", ":/delete_dis_16px.png") 442 572 { 443 setShortcut(gSS->keySequence(UISelectorShortcuts::RemoveVMShortcut)); 444 retranslateUi(); 445 } 446 447 protected: 448 449 void retranslateUi() 450 { 451 setText(QApplication::translate("UIActionPool", "&Remove...")); 573 retranslateUi(); 574 } 575 576 protected: 577 578 QString shortcutExtraDataID() const 579 { 580 return QString("RemoveVM"); 581 } 582 583 QKeySequence defaultShortcut(UIActionPoolType) const 584 { 585 return QKeySequence("Ctrl+R"); 586 } 587 588 void retranslateUi() 589 { 590 setName(QApplication::translate("UIActionPool", "&Remove...")); 452 591 setStatusTip(QApplication::translate("UIActionPool", "Remove the selected virtual machines")); 453 592 } … … 461 600 public: 462 601 463 UIActionStateCommonStartOrShow( QObject*pParent)602 UIActionStateCommonStartOrShow(UIActionPool *pParent) 464 603 : UIActionState(pParent, QSize(32, 32), QSize(16, 16), 465 604 ":/vm_start_32px.png", ":/start_16px.png", 466 605 ":/vm_start_disabled_32px.png", ":/start_dis_16px.png") 467 606 { 468 setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 469 retranslateUi(); 470 } 471 472 protected: 607 retranslateUi(); 608 } 609 610 protected: 611 612 QString shortcutExtraDataID() const 613 { 614 return QString("StartVM"); 615 } 473 616 474 617 void retranslateUi() … … 478 621 case 1: 479 622 { 480 set Text(QApplication::translate("UIActionPool", "S&tart"));623 setName(QApplication::translate("UIActionPool", "S&tart")); 481 624 setStatusTip(QApplication::translate("UIActionPool", "Start the selected virtual machines")); 482 625 setToolTip(text().remove('&').remove('.') + … … 486 629 case 2: 487 630 { 488 set Text(QApplication::translate("UIActionPool", "S&how"));631 setName(QApplication::translate("UIActionPool", "S&how")); 489 632 setStatusTip(QApplication::translate("UIActionPool", "Switch to the windows of the selected virtual machines")); 490 633 setToolTip(text().remove('&').remove('.') + … … 504 647 public: 505 648 506 UIActionToggleCommonPauseAndResume( QObject*pParent)649 UIActionToggleCommonPauseAndResume(UIActionPool *pParent) 507 650 : UIActionToggle(pParent, QSize(32, 32), QSize(16, 16), 508 651 ":/vm_pause_32px.png", ":/pause_16px.png", 509 652 ":/vm_pause_disabled_32px.png", ":/pause_disabled_16px.png") 510 653 { 511 setShortcut(gSS->keySequence(UISelectorShortcuts::PauseVMShortcut)); 512 retranslateUi(); 513 } 514 515 protected: 516 517 void retranslateUi() 518 { 519 setText(QApplication::translate("UIActionPool", "&Pause")); 654 retranslateUi(); 655 } 656 657 protected: 658 659 QString shortcutExtraDataID() const 660 { 661 return QString("PauseVM"); 662 } 663 664 QKeySequence defaultShortcut(UIActionPoolType) const 665 { 666 return QKeySequence("Ctrl+P"); 667 } 668 669 void retranslateUi() 670 { 671 setName(QApplication::translate("UIActionPool", "&Pause")); 520 672 setStatusTip(QApplication::translate("UIActionPool", "Suspend the execution of the selected virtual machines")); 521 673 } … … 528 680 public: 529 681 530 UIActionSimpleCommonReset( QObject*pParent)682 UIActionSimpleCommonReset(UIActionPool *pParent) 531 683 : UIActionSimple(pParent, ":/reset_16px.png", ":/reset_disabled_16px.png") 532 684 { 533 setShortcut(gSS->keySequence(UISelectorShortcuts::ResetVMShortcut)); 534 retranslateUi(); 535 } 536 537 protected: 538 539 void retranslateUi() 540 { 541 setText(QApplication::translate("UIActionPool", "&Reset")); 685 retranslateUi(); 686 } 687 688 protected: 689 690 QString shortcutExtraDataID() const 691 { 692 return QString("ResetVM"); 693 } 694 695 QKeySequence defaultShortcut(UIActionPoolType) const 696 { 697 return QKeySequence("Ctrl+T"); 698 } 699 700 void retranslateUi() 701 { 702 setName(QApplication::translate("UIActionPool", "&Reset")); 542 703 setStatusTip(QApplication::translate("UIActionPool", "Reset the selected virtual machines")); 543 704 } … … 550 711 public: 551 712 552 UIActionSimpleCommonDiscard( QObject*pParent)713 UIActionSimpleCommonDiscard(UIActionPool *pParent) 553 714 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 554 715 ":/vm_discard_32px.png", ":/discard_16px.png", 555 716 ":/vm_discard_disabled_32px.png", ":/discard_dis_16px.png") 556 717 { 557 setShortcut(gSS->keySequence(UISelectorShortcuts::DiscardVMShortcut)); 558 retranslateUi(); 559 } 560 561 protected: 718 retranslateUi(); 719 } 720 721 protected: 722 723 QString shortcutExtraDataID() const 724 { 725 return QString("DiscardVM"); 726 } 727 728 QKeySequence defaultShortcut(UIActionPoolType) const 729 { 730 return QKeySequence("Ctrl+J"); 731 } 562 732 563 733 void retranslateUi() 564 734 { 565 735 setIconText(QApplication::translate("UIActionPool", "Discard")); 566 set Text(QApplication::translate("UIActionPool", "D&iscard saved state..."));736 setName(QApplication::translate("UIActionPool", "D&iscard saved state...")); 567 737 setStatusTip(QApplication::translate("UIActionPool", "Discard the saved state of the selected virtual machines")); 568 738 setToolTip(text().remove('&').remove('.') + … … 577 747 public: 578 748 579 UIActionSimpleCommonRefresh( QObject*pParent)749 UIActionSimpleCommonRefresh(UIActionPool *pParent) 580 750 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16), 581 751 ":/refresh_32px.png", ":/refresh_16px.png", 582 752 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") 583 753 { 584 setShortcut(gSS->keySequence(UISelectorShortcuts::RefreshVMShortcut)); 585 retranslateUi(); 586 } 587 588 protected: 589 590 void retranslateUi() 591 { 592 setText(QApplication::translate("UIActionPool", "Re&fresh...")); 754 retranslateUi(); 755 } 756 757 protected: 758 759 QString shortcutExtraDataID() const 760 { 761 return QString("RefreshVM"); 762 } 763 764 void retranslateUi() 765 { 766 setName(QApplication::translate("UIActionPool", "Re&fresh...")); 593 767 setStatusTip(QApplication::translate("UIActionPool", "Refresh the accessibility state of the selected virtual machine")); 594 768 } … … 601 775 public: 602 776 603 UIActionSimpleCommonShowInFileManager( QObject*pParent)777 UIActionSimpleCommonShowInFileManager(UIActionPool *pParent) 604 778 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 605 779 { 606 setShortcut(gSS->keySequence(UISelectorShortcuts::ShowVMInFileManagerShortcut)); 607 retranslateUi(); 608 } 609 610 protected: 780 retranslateUi(); 781 } 782 783 protected: 784 785 QString shortcutExtraDataID() const 786 { 787 return QString("ShowVMInFileManager"); 788 } 611 789 612 790 void retranslateUi() 613 791 { 614 792 #if defined(Q_WS_MAC) 615 set Text(QApplication::translate("UIActionPool", "Show in Finder"));793 setName(QApplication::translate("UIActionPool", "Show in Finder")); 616 794 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Finder")); 617 795 #elif defined(Q_WS_WIN) 618 set Text(QApplication::translate("UIActionPool", "Show in Explorer"));796 setName(QApplication::translate("UIActionPool", "Show in Explorer")); 619 797 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in Explorer")); 620 798 #else 621 set Text(QApplication::translate("UIActionPool", "Show in File Manager"));799 setName(QApplication::translate("UIActionPool", "Show in File Manager")); 622 800 setStatusTip(QApplication::translate("UIActionPool", "Show the VirtualBox Machine Definition file in the File Manager")); 623 801 #endif … … 631 809 public: 632 810 633 UIActionSimpleCommonCreateShortcut( QObject*pParent)811 UIActionSimpleCommonCreateShortcut(UIActionPool *pParent) 634 812 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 635 813 { 636 setShortcut(gSS->keySequence(UISelectorShortcuts::CreateVMAliasShortcut)); 637 retranslateUi(); 638 } 639 640 protected: 814 retranslateUi(); 815 } 816 817 protected: 818 819 QString shortcutExtraDataID() const 820 { 821 return QString("CreateVMAlias"); 822 } 641 823 642 824 void retranslateUi() 643 825 { 644 826 #if defined(Q_WS_MAC) 645 set Text(QApplication::translate("UIActionPool", "Create Alias on Desktop"));827 setName(QApplication::translate("UIActionPool", "Create Alias on Desktop")); 646 828 setStatusTip(QApplication::translate("UIActionPool", "Creates an alias file to the VirtualBox Machine Definition file on your desktop")); 647 829 #else 648 set Text(QApplication::translate("UIActionPool", "Create Shortcut on Desktop"));830 setName(QApplication::translate("UIActionPool", "Create Shortcut on Desktop")); 649 831 setStatusTip(QApplication::translate("UIActionPool", "Creates an shortcut file to the VirtualBox Machine Definition file on your desktop")); 650 832 #endif … … 658 840 public: 659 841 660 UIActionSimpleMachineSortParent( QObject*pParent)842 UIActionSimpleMachineSortParent(UIActionPool *pParent) 661 843 : UIActionSimple(pParent/*, ":/settings_16px.png", ":/settings_dis_16px.png"*/) 662 844 { 663 setShortcut(gSS->keySequence(UISelectorShortcuts::SortParentGroup)); 664 retranslateUi(); 665 } 666 667 protected: 668 669 void retranslateUi() 670 { 671 setText(QApplication::translate("UIActionPool", "Sort")); 845 retranslateUi(); 846 } 847 848 protected: 849 850 QString shortcutExtraDataID() const 851 { 852 return QString("SortParentGroup"); 853 } 854 855 void retranslateUi() 856 { 857 setName(QApplication::translate("UIActionPool", "Sort")); 672 858 setStatusTip(QApplication::translate("UIActionPool", "Sort the group of the first selected machine alphabetically")); 673 859 } … … 681 867 public: 682 868 683 UIActionMenuClose( QObject*pParent)869 UIActionMenuClose(UIActionPool *pParent) 684 870 : UIActionMenu(pParent, ":/exit_16px.png") 685 871 { … … 691 877 void retranslateUi() 692 878 { 693 menu()->setTitle(QApplication::translate("UIActionPool", "&Close"));879 setName(QApplication::translate("UIActionPool", "&Close")); 694 880 } 695 881 }; … … 701 887 public: 702 888 703 UIActionSimpleSave( QObject*pParent)889 UIActionSimpleSave(UIActionPool *pParent) 704 890 : UIActionSimple(pParent, ":/state_saved_16px.png") 705 891 { 706 setShortcut(gSS->keySequence(UISelectorShortcuts::SaveVMShortcut)); 707 retranslateUi(); 708 } 709 710 protected: 711 712 void retranslateUi() 713 { 714 setText(QApplication::translate("UIActionPool", "Save State")); 892 retranslateUi(); 893 } 894 895 protected: 896 897 QString shortcutExtraDataID() const 898 { 899 return QString("SaveVM"); 900 } 901 902 QKeySequence defaultShortcut(UIActionPoolType) const 903 { 904 return QKeySequence("Ctrl+V"); 905 } 906 907 void retranslateUi() 908 { 909 setName(QApplication::translate("UIActionPool", "Save State")); 715 910 setStatusTip(QApplication::translate("UIActionPool", "Save the machine state of the selected virtual machines")); 716 911 } … … 723 918 public: 724 919 725 UIActionSimpleACPIShutdown( QObject*pParent)920 UIActionSimpleACPIShutdown(UIActionPool *pParent) 726 921 : UIActionSimple(pParent, ":/acpi_16px.png", ":/acpi_disabled_16px.png") 727 922 { 728 setShortcut(gSS->keySequence(UISelectorShortcuts::ACPIShutdownVMShortcut)); 729 retranslateUi(); 730 } 731 732 protected: 733 734 void retranslateUi() 735 { 736 setText(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); 923 retranslateUi(); 924 } 925 926 protected: 927 928 QString shortcutExtraDataID() const 929 { 930 return QString("ACPIShutdownVM"); 931 } 932 933 QKeySequence defaultShortcut(UIActionPoolType) const 934 { 935 return QKeySequence("Ctrl+H"); 936 } 937 938 void retranslateUi() 939 { 940 setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); 737 941 setStatusTip(QApplication::translate("UIActionPool", "Send the ACPI Power Button press event to the selected virtual machines")); 738 942 } … … 745 949 public: 746 950 747 UIActionSimplePowerOff( QObject*pParent)951 UIActionSimplePowerOff(UIActionPool *pParent) 748 952 : UIActionSimple(pParent, ":/poweroff_16px.png", ":/poweroff_disabled_16px.png") 749 953 { 750 setShortcut(gSS->keySequence(UISelectorShortcuts::PowerOffVMShortcut)); 751 retranslateUi(); 752 } 753 754 protected: 755 756 void retranslateUi() 757 { 758 setText(QApplication::translate("UIActionPool", "Po&wer Off")); 954 retranslateUi(); 955 } 956 957 protected: 958 959 QString shortcutExtraDataID() const 960 { 961 return QString("PowerOffVM"); 962 } 963 964 QKeySequence defaultShortcut(UIActionPoolType) const 965 { 966 return QKeySequence("Ctrl+F"); 967 } 968 969 void retranslateUi() 970 { 971 setName(QApplication::translate("UIActionPool", "Po&wer Off")); 759 972 setStatusTip(QApplication::translate("UIActionPool", "Power off the selected virtual machines")); 760 973 } 761 974 }; 762 975 976 977 QString UIActionPoolSelector::shortcutsExtraDataID() const 978 { 979 return GUI_Input_SelectorShortcuts; 980 } 763 981 764 982 void UIActionPoolSelector::createActions() -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r44354 r44434 83 83 UIActionPoolSelector() : UIActionPool(UIActionPoolType_Selector) {} 84 84 85 /* Helper: Shortcuts stuff: */ 86 QString shortcutsExtraDataID() const; 87 85 88 /* Helpers: Prepare stuff: */ 86 89 void createActions(); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r44354 r44434 49 49 #include "UIToolBar.h" 50 50 #include "UIVMLogViewer.h" 51 #include "UISelectorShortcuts.h"52 51 #include "UIDesktopServices.h" 53 52 #include "UIGlobalSettingsExtension.h" -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r43920 r44434 39 39 #include "UIToolBar.h" 40 40 #include "UIVirtualBoxEventHandler.h" 41 #include "UISelectorShortcuts.h"42 41 #include "UIConverter.h" 43 42
Note:
See TracChangeset
for help on using the changeset viewer.