Changeset 71616 in vbox
- Timestamp:
- Apr 2, 2018 3:03:30 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp
r71615 r71616 5 5 6 6 /* 7 * Copyright (C) 2010-201 7Oracle Corporation7 * Copyright (C) 2010-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 21 21 22 22 /* GUI includes: */ 23 # include "VBoxGlobal.h" 23 24 # include "UIActionPoolRuntime.h" 25 # include "UIConverter.h" 24 26 # include "UIDesktopWidgetWatchdog.h" 25 27 # include "UIExtraDataManager.h" 28 # include "UIIconPool.h" 26 29 # include "UIShortcutPool.h" 27 # include "UIConverter.h"28 # include "UIIconPool.h"29 # include "VBoxGlobal.h"30 30 31 31 /* COM includes: */ … … 43 43 44 44 45 /** Menu action extension, used as 'Machine' menu class. */ 45 46 class UIActionMenuMachineRuntime : public UIActionMenu 46 47 { … … 49 50 public: 50 51 52 /** Constructs action passing @a pParent to the base-class. */ 51 53 UIActionMenuMachineRuntime(UIActionPool *pParent) 52 : UIActionMenu(pParent) {} 53 54 protected: 55 56 /** Returns action extra-data ID. */ 57 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_Machine; } 58 /** Returns action extra-data key. */ 59 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Machine); } 60 /** Returns whether action is allowed. */ 61 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Machine); } 62 63 void retranslateUi() 54 : UIActionMenu(pParent) 55 {} 56 57 protected: 58 59 /** Returns action extra-data ID. */ 60 virtual int extraDataID() const /* override */ 61 { 62 return UIExtraDataMetaDefs::MenuType_Machine; 63 } 64 /** Returns action extra-data key. */ 65 virtual QString extraDataKey() const /* override */ 66 { 67 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Machine); 68 } 69 /** Returns whether action is allowed. */ 70 virtual bool isAllowed() const /* override */ 71 { 72 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Machine); 73 } 74 75 /** Handles translation event. */ 76 virtual void retranslateUi() /* override */ 64 77 { 65 78 setName(QApplication::translate("UIActionPool", "&Machine")); … … 67 80 }; 68 81 82 /** Simple action extension, used as 'Show Settings Dialog' action class. */ 69 83 class UIActionSimpleShowSettingsDialog : public UIActionSimple 70 84 { … … 73 87 public: 74 88 89 /** Constructs action passing @a pParent to the base-class. */ 75 90 UIActionSimpleShowSettingsDialog(UIActionPool *pParent) 76 : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png") {} 77 78 protected: 79 80 /** Returns action extra-data ID. */ 81 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog; } 82 /** Returns action extra-data key. */ 83 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); } 84 /** Returns whether action is allowed. */ 85 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); } 86 87 QString shortcutExtraDataID() const 91 : UIActionSimple(pParent, ":/vm_settings_16px.png", ":/vm_settings_disabled_16px.png") 92 {} 93 94 protected: 95 96 /** Returns action extra-data ID. */ 97 virtual int extraDataID() const /* override */ 98 { 99 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog; 100 } 101 /** Returns action extra-data key. */ 102 virtual QString extraDataKey() const /* override */ 103 { 104 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); 105 } 106 /** Returns whether action is allowed. */ 107 virtual bool isAllowed() const /* override */ 108 { 109 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); 110 } 111 112 /** Returns shortcut extra-data ID. */ 113 virtual QString shortcutExtraDataID() const /* override */ 88 114 { 89 115 return QString("SettingsDialog"); 90 116 } 91 117 92 QKeySequence defaultShortcut(UIActionPoolType) const 118 /** Returns default shortcut. */ 119 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 93 120 { 94 121 return QKeySequence("S"); 95 122 } 96 123 97 void retranslateUi() 124 /** Handles translation event. */ 125 virtual void retranslateUi() /* override */ 98 126 { 99 127 setName(QApplication::translate("UIActionPool", "&Settings...")); … … 102 130 }; 103 131 132 /** Simple action extension, used as 'Perform Take Snapshot' action class. */ 104 133 class UIActionSimplePerformTakeSnapshot : public UIActionSimple 105 134 { … … 108 137 public: 109 138 139 /** Constructs action passing @a pParent to the base-class. */ 110 140 UIActionSimplePerformTakeSnapshot(UIActionPool *pParent) 111 : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png") {} 112 113 protected: 114 115 /** Returns action extra-data ID. */ 116 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot; } 117 /** Returns action extra-data key. */ 118 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); } 119 /** Returns whether action is allowed. */ 120 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); } 121 122 QString shortcutExtraDataID() const 141 : UIActionSimple(pParent, ":/snapshot_take_16px.png", ":/snapshot_take_disabled_16px.png") 142 {} 143 144 protected: 145 146 /** Returns action extra-data ID. */ 147 virtual int extraDataID() const /* override */ 148 { 149 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot; 150 } 151 /** Returns action extra-data key. */ 152 virtual QString extraDataKey() const /* override */ 153 { 154 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); 155 } 156 /** Returns whether action is allowed. */ 157 virtual bool isAllowed() const /* override */ 158 { 159 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_TakeSnapshot); 160 } 161 162 /** Returns shortcut extra-data ID. */ 163 virtual QString shortcutExtraDataID() const /* override */ 123 164 { 124 165 return QString("TakeSnapshot"); 125 166 } 126 167 127 QKeySequence defaultShortcut(UIActionPoolType) const 168 /** Returns default shortcut. */ 169 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 128 170 { 129 171 return QKeySequence("T"); 130 172 } 131 173 132 void retranslateUi() 174 /** Handles translation event. */ 175 virtual void retranslateUi() /* override */ 133 176 { 134 177 setName(QApplication::translate("UIActionPool", "Take Sn&apshot...")); … … 137 180 }; 138 181 182 /** Simple action extension, used as 'Show Information Dialog' action class. */ 139 183 class UIActionSimpleShowInformationDialog : public UIActionSimple 140 184 { … … 143 187 public: 144 188 189 /** Constructs action passing @a pParent to the base-class. */ 145 190 UIActionSimpleShowInformationDialog(UIActionPool *pParent) 146 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") {} 147 148 protected: 149 150 /** Returns action extra-data ID. */ 151 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog; } 152 /** Returns action extra-data key. */ 153 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); } 154 /** Returns whether action is allowed. */ 155 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); } 156 157 QString shortcutExtraDataID() const 191 : UIActionSimple(pParent, ":/session_info_16px.png", ":/session_info_disabled_16px.png") 192 {} 193 194 protected: 195 196 /** Returns action extra-data ID. */ 197 virtual int extraDataID() const /* override */ 198 { 199 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog; 200 } 201 /** Returns action extra-data key. */ 202 virtual QString extraDataKey() const /* override */ 203 { 204 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); 205 } 206 /** Returns whether action is allowed. */ 207 virtual bool isAllowed() const /* override */ 208 { 209 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_InformationDialog); 210 } 211 212 /** Returns shortcut extra-data ID. */ 213 virtual QString shortcutExtraDataID() const /* override */ 158 214 { 159 215 return QString("InformationDialog"); 160 216 } 161 217 162 QKeySequence defaultShortcut(UIActionPoolType) const 218 /** Returns default shortcut. */ 219 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 163 220 { 164 221 return QKeySequence("N"); 165 222 } 166 223 167 void retranslateUi() 224 /** Handles translation event. */ 225 virtual void retranslateUi() /* override */ 168 226 { 169 227 setName(QApplication::translate("UIActionPool", "Session I&nformation...")); … … 172 230 }; 173 231 232 /** Toggle action extension, used as 'Pause' action class. */ 174 233 class UIActionTogglePause : public UIActionToggle 175 234 { … … 178 237 public: 179 238 239 /** Constructs action passing @a pParent to the base-class. */ 180 240 UIActionTogglePause(UIActionPool *pParent) 181 241 : UIActionToggle(pParent, 182 242 ":/vm_pause_on_16px.png", ":/vm_pause_16px.png", 183 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") {} 184 185 protected: 186 187 /** Returns action extra-data ID. */ 188 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause; } 189 /** Returns action extra-data key. */ 190 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); } 191 /** Returns whether action is allowed. */ 192 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); } 193 194 QString shortcutExtraDataID() const 243 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") 244 {} 245 246 protected: 247 248 /** Returns action extra-data ID. */ 249 virtual int extraDataID() const /* override */ 250 { 251 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause; 252 } 253 /** Returns action extra-data key. */ 254 virtual QString extraDataKey() const /* override */ 255 { 256 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); 257 } 258 /** Returns whether action is allowed. */ 259 virtual bool isAllowed() const /* override */ 260 { 261 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Pause); 262 } 263 264 /** Returns shortcut extra-data ID. */ 265 virtual QString shortcutExtraDataID() const /* override */ 195 266 { 196 267 return QString("Pause"); 197 268 } 198 269 199 QKeySequence defaultShortcut(UIActionPoolType) const 270 /** Returns default shortcut. */ 271 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 200 272 { 201 273 return QKeySequence("P"); 202 274 } 203 275 204 void retranslateUi() 276 /** Handles translation event. */ 277 virtual void retranslateUi() /* override */ 205 278 { 206 279 setName(QApplication::translate("UIActionPool", "&Pause")); … … 209 282 }; 210 283 284 /** Simple action extension, used as 'Perform Reset' action class. */ 211 285 class UIActionSimplePerformReset : public UIActionSimple 212 286 { … … 215 289 public: 216 290 291 /** Constructs action passing @a pParent to the base-class. */ 217 292 UIActionSimplePerformReset(UIActionPool *pParent) 218 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {} 219 220 protected: 221 222 /** Returns action extra-data ID. */ 223 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset; } 224 /** Returns action extra-data key. */ 225 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); } 226 /** Returns whether action is allowed. */ 227 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); } 228 229 QString shortcutExtraDataID() const 293 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") 294 {} 295 296 protected: 297 298 /** Returns action extra-data ID. */ 299 virtual int extraDataID() const /* override */ 300 { 301 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset; 302 } 303 /** Returns action extra-data key. */ 304 virtual QString extraDataKey() const /* override */ 305 { 306 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); 307 } 308 /** Returns whether action is allowed. */ 309 virtual bool isAllowed() const /* override */ 310 { 311 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Reset); 312 } 313 314 /** Returns shortcut extra-data ID. */ 315 virtual QString shortcutExtraDataID() const /* override */ 230 316 { 231 317 return QString("Reset"); 232 318 } 233 319 234 QKeySequence defaultShortcut(UIActionPoolType) const 320 /** Returns default shortcut. */ 321 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 235 322 { 236 323 return QKeySequence("R"); 237 324 } 238 325 239 void retranslateUi() 326 /** Handles translation event. */ 327 virtual void retranslateUi() /* override */ 240 328 { 241 329 setName(QApplication::translate("UIActionPool", "&Reset")); … … 244 332 }; 245 333 334 /** Simple action extension, used as 'Perform Detach' action class. */ 246 335 class UIActionSimplePerformDetach : public UIActionSimple 247 336 { … … 250 339 public: 251 340 341 /** Constructs action passing @a pParent to the base-class. */ 252 342 UIActionSimplePerformDetach(UIActionPool *pParent) 253 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") {} 254 255 protected: 256 257 /** Returns action extra-data ID. */ 258 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach; } 259 /** Returns action extra-data key. */ 260 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach); } 261 /** Returns whether action is allowed. */ 262 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach); } 263 264 QString shortcutExtraDataID() const 343 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 344 {} 345 346 protected: 347 348 /** Returns action extra-data ID. */ 349 virtual int extraDataID() const /* override */ 350 { 351 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach; 352 } 353 /** Returns action extra-data key. */ 354 virtual QString extraDataKey() const /* override */ 355 { 356 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach); 357 } 358 /** Returns whether action is allowed. */ 359 virtual bool isAllowed() const /* override */ 360 { 361 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Detach); 362 } 363 364 /** Returns shortcut extra-data ID. */ 365 virtual QString shortcutExtraDataID() const /* override */ 265 366 { 266 367 return QString("DetachUI"); 267 368 } 268 369 269 void retranslateUi() 370 /** Handles translation event. */ 371 virtual void retranslateUi() /* override */ 270 372 { 271 373 setName(QApplication::translate("UIActionPool", "&Detach GUI")); … … 274 376 }; 275 377 378 /** Simple action extension, used as 'Perform Save State' action class. */ 276 379 class UIActionSimplePerformSaveState : public UIActionSimple 277 380 { … … 280 383 public: 281 384 385 /** Constructs action passing @a pParent to the base-class. */ 282 386 UIActionSimplePerformSaveState(UIActionPool *pParent) 283 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {} 284 285 protected: 286 287 /** Returns action extra-data ID. */ 288 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState; } 289 /** Returns action extra-data key. */ 290 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); } 291 /** Returns whether action is allowed. */ 292 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); } 293 294 QString shortcutExtraDataID() const 387 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") 388 {} 389 390 protected: 391 392 /** Returns action extra-data ID. */ 393 virtual int extraDataID() const /* override */ 394 { 395 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState; 396 } 397 /** Returns action extra-data key. */ 398 virtual QString extraDataKey() const /* override */ 399 { 400 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); 401 } 402 /** Returns whether action is allowed. */ 403 virtual bool isAllowed() const /* override */ 404 { 405 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SaveState); 406 } 407 408 /** Returns shortcut extra-data ID. */ 409 virtual QString shortcutExtraDataID() const /* override */ 295 410 { 296 411 return QString("SaveState"); 297 412 } 298 413 299 void retranslateUi() 414 /** Handles translation event. */ 415 virtual void retranslateUi() /* override */ 300 416 { 301 417 setName(QApplication::translate("UIActionPool", "&Save State")); … … 304 420 }; 305 421 422 /** Simple action extension, used as 'Perform Shutdown' action class. */ 306 423 class UIActionSimplePerformShutdown : public UIActionSimple 307 424 { … … 310 427 public: 311 428 429 /** Constructs action passing @a pParent to the base-class. */ 312 430 UIActionSimplePerformShutdown(UIActionPool *pParent) 313 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {} 314 315 protected: 316 317 /** Returns action extra-data ID. */ 318 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown; } 319 /** Returns action extra-data key. */ 320 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); } 321 /** Returns whether action is allowed. */ 322 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); } 323 324 QString shortcutExtraDataID() const 431 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") 432 {} 433 434 protected: 435 436 /** Returns action extra-data ID. */ 437 virtual int extraDataID() const /* override */ 438 { 439 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown; 440 } 441 /** Returns action extra-data key. */ 442 virtual QString extraDataKey() const /* override */ 443 { 444 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); 445 } 446 /** Returns whether action is allowed. */ 447 virtual bool isAllowed() const /* override */ 448 { 449 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown); 450 } 451 452 /** Returns shortcut extra-data ID. */ 453 virtual QString shortcutExtraDataID() const /* override */ 325 454 { 326 455 return QString("Shutdown"); 327 456 } 328 457 329 QKeySequence defaultShortcut(UIActionPoolType) const 458 /** Returns default shortcut. */ 459 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 330 460 { 331 461 #ifdef VBOX_WS_MAC 332 462 return QKeySequence("U"); 333 #else /* VBOX_WS_MAC */463 #else 334 464 return QKeySequence("H"); 335 #endif /* !VBOX_WS_MAC */ 336 } 337 338 void retranslateUi() 465 #endif 466 } 467 468 /** Handles translation event. */ 469 virtual void retranslateUi() /* override */ 339 470 { 340 471 setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); … … 343 474 }; 344 475 476 /** Simple action extension, used as 'Perform PowerOff' action class. */ 345 477 class UIActionSimplePerformPowerOff : public UIActionSimple 346 478 { … … 349 481 public: 350 482 483 /** Constructs action passing @a pParent to the base-class. */ 351 484 UIActionSimplePerformPowerOff(UIActionPool *pParent) 352 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {} 353 354 protected: 355 356 /** Returns action extra-data ID. */ 357 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff; } 358 /** Returns action extra-data key. */ 359 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); } 360 /** Returns whether action is allowed. */ 361 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); } 362 363 QString shortcutExtraDataID() const 485 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") 486 {} 487 488 protected: 489 490 /** Returns action extra-data ID. */ 491 virtual int extraDataID() const /* override */ 492 { 493 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff; 494 } 495 /** Returns action extra-data key. */ 496 virtual QString extraDataKey() const /* override */ 497 { 498 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); 499 } 500 /** Returns whether action is allowed. */ 501 virtual bool isAllowed() const /* override */ 502 { 503 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff); 504 } 505 506 /** Returns shortcut extra-data ID. */ 507 virtual QString shortcutExtraDataID() const /* override */ 364 508 { 365 509 return QString("PowerOff"); 366 510 } 367 511 368 void retranslateUi() 512 /** Handles translation event. */ 513 virtual void retranslateUi() /* override */ 369 514 { 370 515 setName(QApplication::translate("UIActionPool", "Po&wer Off")); … … 373 518 }; 374 519 520 521 /** Menu action extension, used as 'View' menu class. */ 375 522 class UIActionMenuView : public UIActionMenu 376 523 { … … 379 526 public: 380 527 528 /** Constructs action passing @a pParent to the base-class. */ 381 529 UIActionMenuView(UIActionPool *pParent) 382 : UIActionMenu(pParent) {} 383 384 protected: 385 386 /** Returns action extra-data ID. */ 387 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_View; } 388 /** Returns action extra-data key. */ 389 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); } 390 /** Returns whether action is allowed. */ 391 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); } 392 393 void retranslateUi() 530 : UIActionMenu(pParent) 531 {} 532 533 protected: 534 535 /** Returns action extra-data ID. */ 536 virtual int extraDataID() const /* override */ 537 { 538 return UIExtraDataMetaDefs::MenuType_View; 539 } 540 /** Returns action extra-data key. */ 541 virtual QString extraDataKey() const /* override */ 542 { 543 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); 544 } 545 /** Returns whether action is allowed. */ 546 virtual bool isAllowed() const /* override */ 547 { 548 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); 549 } 550 551 /** Handles translation event. */ 552 virtual void retranslateUi() /* override */ 394 553 { 395 554 setName(QApplication::translate("UIActionPool", "&View")); … … 397 556 }; 398 557 558 /** Menu action extension, used as 'View Popup' menu class. */ 399 559 class UIActionMenuViewPopup : public UIActionMenu 400 560 { … … 403 563 public: 404 564 565 /** Constructs action passing @a pParent to the base-class. */ 405 566 UIActionMenuViewPopup(UIActionPool *pParent) 406 : UIActionMenu(pParent) {} 407 408 protected: 409 410 /** Returns action extra-data ID. */ 411 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_View; } 412 /** Returns action extra-data key. */ 413 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); } 414 /** Returns whether action is allowed. */ 415 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); } 416 417 void retranslateUi() {} 418 }; 419 567 : UIActionMenu(pParent) 568 {} 569 570 protected: 571 572 /** Returns action extra-data ID. */ 573 virtual int extraDataID() const /* override */ 574 { 575 return UIExtraDataMetaDefs::MenuType_View; 576 } 577 /** Returns action extra-data key. */ 578 virtual QString extraDataKey() const /* override */ 579 { 580 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_View); 581 } 582 /** Returns whether action is allowed. */ 583 virtual bool isAllowed() const /* override */ 584 { 585 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_View); 586 } 587 588 /** Handles translation event. */ 589 virtual void retranslateUi() /* override */ {} 590 }; 591 592 /** Toggle action extension, used as 'Full-screen Mode' action class. */ 420 593 class UIActionToggleFullscreenMode : public UIActionToggle 421 594 { … … 424 597 public: 425 598 599 /** Constructs action passing @a pParent to the base-class. */ 426 600 UIActionToggleFullscreenMode(UIActionPool *pParent) 427 601 : UIActionToggle(pParent, 428 602 ":/fullscreen_on_16px.png", ":/fullscreen_16px.png", 429 ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png") {} 430 431 protected: 432 433 /** Returns action extra-data ID. */ 434 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen; } 435 /** Returns action extra-data key. */ 436 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); } 437 /** Returns whether action is allowed. */ 438 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); } 439 440 QString shortcutExtraDataID() const 603 ":/fullscreen_on_disabled_16px.png", ":/fullscreen_disabled_16px.png") 604 {} 605 606 protected: 607 608 /** Returns action extra-data ID. */ 609 virtual int extraDataID() const /* override */ 610 { 611 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen; 612 } 613 /** Returns action extra-data key. */ 614 virtual QString extraDataKey() const /* override */ 615 { 616 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); 617 } 618 /** Returns whether action is allowed. */ 619 virtual bool isAllowed() const /* override */ 620 { 621 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Fullscreen); 622 } 623 624 /** Returns shortcut extra-data ID. */ 625 virtual QString shortcutExtraDataID() const /* override */ 441 626 { 442 627 return QString("FullscreenMode"); 443 628 } 444 629 445 QKeySequence defaultShortcut(UIActionPoolType) const 630 /** Returns default shortcut. */ 631 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 446 632 { 447 633 return QKeySequence("F"); 448 634 } 449 635 450 void retranslateUi() 636 /** Handles translation event. */ 637 virtual void retranslateUi() /* override */ 451 638 { 452 639 setName(QApplication::translate("UIActionPool", "&Full-screen Mode")); … … 455 642 }; 456 643 644 /** Toggle action extension, used as 'Seamless Mode' action class. */ 457 645 class UIActionToggleSeamlessMode : public UIActionToggle 458 646 { … … 461 649 public: 462 650 651 /** Constructs action passing @a pParent to the base-class. */ 463 652 UIActionToggleSeamlessMode(UIActionPool *pParent) 464 653 : UIActionToggle(pParent, 465 654 ":/seamless_on_16px.png", ":/seamless_16px.png", 466 ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png") {} 467 468 protected: 469 470 /** Returns action extra-data ID. */ 471 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless; } 472 /** Returns action extra-data key. */ 473 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); } 474 /** Returns whether action is allowed. */ 475 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); } 476 477 QString shortcutExtraDataID() const 655 ":/seamless_on_disabled_16px.png", ":/seamless_disabled_16px.png") 656 {} 657 658 protected: 659 660 /** Returns action extra-data ID. */ 661 virtual int extraDataID() const /* override */ 662 { 663 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless; 664 } 665 /** Returns action extra-data key. */ 666 virtual QString extraDataKey() const /* override */ 667 { 668 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); 669 } 670 /** Returns whether action is allowed. */ 671 virtual bool isAllowed() const /* override */ 672 { 673 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Seamless); 674 } 675 676 /** Returns shortcut extra-data ID. */ 677 virtual QString shortcutExtraDataID() const /* override */ 478 678 { 479 679 return QString("SeamlessMode"); 480 680 } 481 681 482 QKeySequence defaultShortcut(UIActionPoolType) const 682 /** Returns default shortcut. */ 683 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 483 684 { 484 685 return QKeySequence("L"); 485 686 } 486 687 487 void retranslateUi() 688 /** Handles translation event. */ 689 virtual void retranslateUi() /* override */ 488 690 { 489 691 setName(QApplication::translate("UIActionPool", "Seam&less Mode")); … … 492 694 }; 493 695 494 class UIActionToggleScaleMode : public UIActionToggle 495 { 496 Q_OBJECT; 497 498 public: 499 500 UIActionToggleScaleMode(UIActionPool *pParent) 696 /** Toggle action extension, used as 'Scaled Mode' action class. */ 697 class UIActionToggleScaledMode : public UIActionToggle 698 { 699 Q_OBJECT; 700 701 public: 702 703 /** Constructs action passing @a pParent to the base-class. */ 704 UIActionToggleScaledMode(UIActionPool *pParent) 501 705 : UIActionToggle(pParent, 502 706 ":/scale_on_16px.png", ":/scale_16px.png", 503 ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png") {} 504 505 protected: 506 507 /** Returns action extra-data ID. */ 508 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale; } 509 /** Returns action extra-data key. */ 510 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); } 511 /** Returns whether action is allowed. */ 512 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); } 513 514 QString shortcutExtraDataID() const 707 ":/scale_on_disabled_16px.png", ":/scale_disabled_16px.png") 708 {} 709 710 protected: 711 712 /** Returns action extra-data ID. */ 713 virtual int extraDataID() const /* override */ 714 { 715 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale; 716 } 717 /** Returns action extra-data key. */ 718 virtual QString extraDataKey() const /* override */ 719 { 720 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); 721 } 722 /** Returns whether action is allowed. */ 723 virtual bool isAllowed() const /* override */ 724 { 725 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Scale); 726 } 727 728 /** Returns shortcut extra-data ID. */ 729 virtual QString shortcutExtraDataID() const /* override */ 515 730 { 516 731 return QString("ScaleMode"); 517 732 } 518 733 519 QKeySequence defaultShortcut(UIActionPoolType) const 734 /** Returns default shortcut. */ 735 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 520 736 { 521 737 return QKeySequence("C"); 522 738 } 523 739 524 void retranslateUi() 740 /** Handles translation event. */ 741 virtual void retranslateUi() /* override */ 525 742 { 526 743 setName(QApplication::translate("UIActionPool", "S&caled Mode")); … … 529 746 }; 530 747 531 #ifndef RT_OS_DARWIN 748 #ifndef VBOX_WS_MAC 749 /** Simple action extension, used as 'Perform Minimize Window' action class. */ 532 750 class UIActionSimplePerformMinimizeWindow : public UIActionSimple 533 751 { … … 536 754 public: 537 755 756 /** Constructs action passing @a pParent to the base-class. */ 538 757 UIActionSimplePerformMinimizeWindow(UIActionPool *pParent) 539 : UIActionSimple(pParent, ":/minimize_16px.png") {} 540 541 protected: 542 543 /** Returns action extra-data ID. */ 544 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow; } 545 /** Returns action extra-data key. */ 546 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); } 547 /** Returns whether action is allowed. */ 548 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); } 549 550 QString shortcutExtraDataID() const 758 : UIActionSimple(pParent, ":/minimize_16px.png") 759 {} 760 761 protected: 762 763 /** Returns action extra-data ID. */ 764 virtual int extraDataID() const /* override */ 765 { 766 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow; 767 } 768 /** Returns action extra-data key. */ 769 virtual QString extraDataKey() const /* override */ 770 { 771 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); 772 } 773 /** Returns whether action is allowed. */ 774 virtual bool isAllowed() const /* override */ 775 { 776 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MinimizeWindow); 777 } 778 779 /** Returns shortcut extra-data ID. */ 780 virtual QString shortcutExtraDataID() const /* override */ 551 781 { 552 782 return QString("WindowMinimize"); 553 783 } 554 784 555 QKeySequence defaultShortcut(UIActionPoolType) const 785 /** Returns default shortcut. */ 786 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 556 787 { 557 788 return QKeySequence("M"); 558 789 } 559 790 560 void retranslateUi() 791 /** Handles translation event. */ 792 virtual void retranslateUi() /* override */ 561 793 { 562 794 setName(QApplication::translate("UIActionPool", "&Minimize Window")); … … 564 796 } 565 797 }; 566 #endif /* !RT_OS_DARWIN */ 567 798 #endif /* !VBOX_WS_MAC */ 799 800 /** Simple action extension, used as 'Perform Window Adjust' action class. */ 568 801 class UIActionSimplePerformWindowAdjust : public UIActionSimple 569 802 { … … 572 805 public: 573 806 807 /** Constructs action passing @a pParent to the base-class. */ 574 808 UIActionSimplePerformWindowAdjust(UIActionPool *pParent) 575 : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") {} 576 577 protected: 578 579 /** Returns action extra-data ID. */ 580 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow; } 581 /** Returns action extra-data key. */ 582 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); } 583 /** Returns whether action is allowed. */ 584 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); } 585 586 QString shortcutExtraDataID() const 809 : UIActionSimple(pParent, ":/adjust_win_size_16px.png", ":/adjust_win_size_disabled_16px.png") 810 {} 811 812 protected: 813 814 /** Returns action extra-data ID. */ 815 virtual int extraDataID() const /* override */ 816 { 817 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow; 818 } 819 /** Returns action extra-data key. */ 820 virtual QString extraDataKey() const /* override */ 821 { 822 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); 823 } 824 /** Returns whether action is allowed. */ 825 virtual bool isAllowed() const /* override */ 826 { 827 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_AdjustWindow); 828 } 829 830 /** Returns shortcut extra-data ID. */ 831 virtual QString shortcutExtraDataID() const /* override */ 587 832 { 588 833 return QString("WindowAdjust"); 589 834 } 590 835 591 QKeySequence defaultShortcut(UIActionPoolType) const 836 /** Returns default shortcut. */ 837 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 592 838 { 593 839 return QKeySequence("A"); 594 840 } 595 841 596 void retranslateUi() 842 /** Handles translation event. */ 843 virtual void retranslateUi() /* override */ 597 844 { 598 845 setName(QApplication::translate("UIActionPool", "&Adjust Window Size")); … … 601 848 }; 602 849 850 /** Toggle action extension, used as 'Guest Autoresize' action class. */ 603 851 class UIActionToggleGuestAutoresize : public UIActionToggle 604 852 { … … 607 855 public: 608 856 857 /** Constructs action passing @a pParent to the base-class. */ 609 858 UIActionToggleGuestAutoresize(UIActionPool *pParent) 610 859 : UIActionToggle(pParent, 611 860 ":/auto_resize_on_on_16px.png", ":/auto_resize_on_16px.png", 612 ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png") {} 613 614 protected: 615 616 /** Returns action extra-data ID. */ 617 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize; } 618 /** Returns action extra-data key. */ 619 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); } 620 /** Returns whether action is allowed. */ 621 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); } 622 623 QString shortcutExtraDataID() const 861 ":/auto_resize_on_on_disabled_16px.png", ":/auto_resize_on_disabled_16px.png") 862 {} 863 864 protected: 865 866 /** Returns action extra-data ID. */ 867 virtual int extraDataID() const /* override */ 868 { 869 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize; 870 } 871 /** Returns action extra-data key. */ 872 virtual QString extraDataKey() const /* override */ 873 { 874 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); 875 } 876 /** Returns whether action is allowed. */ 877 virtual bool isAllowed() const /* override */ 878 { 879 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize); 880 } 881 882 /** Returns shortcut extra-data ID. */ 883 virtual QString shortcutExtraDataID() const /* override */ 624 884 { 625 885 return QString("GuestAutoresize"); 626 886 } 627 887 628 void retranslateUi() 888 /** Handles translation event. */ 889 virtual void retranslateUi() /* override */ 629 890 { 630 891 setName(QApplication::translate("UIActionPool", "Auto-resize &Guest Display")); … … 633 894 }; 634 895 896 /** Simple action extension, used as 'Perform Take Snapshot' action class. */ 635 897 class UIActionSimplePerformTakeScreenshot : public UIActionSimple 636 898 { … … 639 901 public: 640 902 903 /** Constructs action passing @a pParent to the base-class. */ 641 904 UIActionSimplePerformTakeScreenshot(UIActionPool *pParent) 642 : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png") {} 643 644 protected: 645 646 /** Returns action extra-data ID. */ 647 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot; } 648 /** Returns action extra-data key. */ 649 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot); } 650 /** Returns whether action is allowed. */ 651 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot); } 652 653 QString shortcutExtraDataID() const 905 : UIActionSimple(pParent, ":/screenshot_take_16px.png", ":/screenshot_take_disabled_16px.png") 906 {} 907 908 protected: 909 910 /** Returns action extra-data ID. */ 911 virtual int extraDataID() const /* override */ 912 { 913 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot; 914 } 915 /** Returns action extra-data key. */ 916 virtual QString extraDataKey() const /* override */ 917 { 918 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot); 919 } 920 /** Returns whether action is allowed. */ 921 virtual bool isAllowed() const /* override */ 922 { 923 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot); 924 } 925 926 /** Returns shortcut extra-data ID. */ 927 virtual QString shortcutExtraDataID() const /* override */ 654 928 { 655 929 return QString("TakeScreenshot"); 656 930 } 657 931 658 QKeySequence defaultShortcut(UIActionPoolType) const 932 /** Returns default shortcut. */ 933 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 659 934 { 660 935 return QKeySequence("E"); 661 936 } 662 937 663 void retranslateUi() 938 /** Handles translation event. */ 939 virtual void retranslateUi() /* override */ 664 940 { 665 941 setName(QApplication::translate("UIActionPool", "Take Screensh&ot...")); … … 668 944 }; 669 945 946 /** Menu action extension, used as 'View' menu class. */ 670 947 class UIActionMenuVideoCapture : public UIActionMenu 671 948 { … … 674 951 public: 675 952 953 /** Constructs action passing @a pParent to the base-class. */ 676 954 UIActionMenuVideoCapture(UIActionPool *pParent) 677 : UIActionMenu(pParent) {} 678 679 protected: 680 681 /** Returns action extra-data ID. */ 682 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture; } 683 /** Returns action extra-data key. */ 684 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture); } 685 /** Returns whether action is allowed. */ 686 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture); } 687 688 void retranslateUi() 955 : UIActionMenu(pParent) 956 {} 957 958 protected: 959 960 /** Returns action extra-data ID. */ 961 virtual int extraDataID() const /* override */ 962 { 963 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture; 964 } 965 /** Returns action extra-data key. */ 966 virtual QString extraDataKey() const /* override */ 967 { 968 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture); 969 } 970 /** Returns whether action is allowed. */ 971 virtual bool isAllowed() const /* override */ 972 { 973 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCapture); 974 } 975 976 /** Handles translation event. */ 977 virtual void retranslateUi() /* override */ 689 978 { 690 979 setName(QApplication::translate("UIActionPool", "&Video Capture")); … … 692 981 }; 693 982 983 /** Simple action extension, used as 'Show Video Capture Settings Dialog' action class. */ 694 984 class UIActionSimpleShowVideoCaptureSettingsDialog : public UIActionSimple 695 985 { … … 698 988 public: 699 989 990 /** Constructs action passing @a pParent to the base-class. */ 700 991 UIActionSimpleShowVideoCaptureSettingsDialog(UIActionPool *pParent) 701 : UIActionSimple(pParent, ":/video_capture_settings_16px.png") {} 702 703 protected: 704 705 /** Returns action extra-data ID. */ 706 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings; } 707 /** Returns action extra-data key. */ 708 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings); } 709 /** Returns whether action is allowed. */ 710 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings); } 711 712 QString shortcutExtraDataID() const 992 : UIActionSimple(pParent, ":/video_capture_settings_16px.png") 993 {} 994 995 protected: 996 997 /** Returns action extra-data ID. */ 998 virtual int extraDataID() const /* override */ 999 { 1000 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings; 1001 } 1002 /** Returns action extra-data key. */ 1003 virtual QString extraDataKey() const /* override */ 1004 { 1005 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings); 1006 } 1007 /** Returns whether action is allowed. */ 1008 virtual bool isAllowed() const /* override */ 1009 { 1010 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings); 1011 } 1012 1013 /** Returns shortcut extra-data ID. */ 1014 virtual QString shortcutExtraDataID() const /* override */ 713 1015 { 714 1016 return QString("VideoCaptureSettingsDialog"); 715 1017 } 716 1018 717 void retranslateUi() 1019 /** Handles translation event. */ 1020 virtual void retranslateUi() /* override */ 718 1021 { 719 1022 setName(QApplication::translate("UIActionPool", "&Video Capture Settings...")); … … 722 1025 }; 723 1026 1027 /** Toggle action extension, used as 'Video Capture' action class. */ 724 1028 class UIActionToggleVideoCapture : public UIActionToggle 725 1029 { … … 728 1032 public: 729 1033 1034 /** Constructs action passing @a pParent to the base-class. */ 730 1035 UIActionToggleVideoCapture(UIActionPool *pParent) 731 1036 : UIActionToggle(pParent, 732 1037 ":/video_capture_on_16px.png", ":/video_capture_16px.png", 733 ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png") {} 734 735 protected: 736 737 /** Returns action extra-data ID. */ 738 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture; } 739 /** Returns action extra-data key. */ 740 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture); } 741 /** Returns whether action is allowed. */ 742 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture); } 743 744 QString shortcutExtraDataID() const 1038 ":/video_capture_on_disabled_16px.png", ":/video_capture_disabled_16px.png") 1039 {} 1040 1041 protected: 1042 1043 /** Returns action extra-data ID. */ 1044 virtual int extraDataID() const /* override */ 1045 { 1046 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture; 1047 } 1048 /** Returns action extra-data key. */ 1049 virtual QString extraDataKey() const /* override */ 1050 { 1051 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture); 1052 } 1053 /** Returns whether action is allowed. */ 1054 virtual bool isAllowed() const /* override */ 1055 { 1056 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture); 1057 } 1058 1059 /** Returns shortcut extra-data ID. */ 1060 virtual QString shortcutExtraDataID() const /* override */ 745 1061 { 746 1062 return QString("VideoCapture"); 747 1063 } 748 1064 749 void retranslateUi() 1065 /** Handles translation event. */ 1066 virtual void retranslateUi() /* override */ 750 1067 { 751 1068 setName(QApplication::translate("UIActionPool", "&Video Capture")); … … 754 1071 }; 755 1072 1073 /** Toggle action extension, used as 'VRDE Server' action class. */ 756 1074 class UIActionToggleVRDEServer : public UIActionToggle 757 1075 { … … 760 1078 public: 761 1079 1080 /** Constructs action passing @a pParent to the base-class. */ 762 1081 UIActionToggleVRDEServer(UIActionPool *pParent) 763 1082 : UIActionToggle(pParent, 764 1083 ":/vrdp_on_16px.png", ":/vrdp_16px.png", 765 ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png") {} 766 767 protected: 768 769 /** Returns action extra-data ID. */ 770 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer; } 771 /** Returns action extra-data key. */ 772 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer); } 773 /** Returns whether action is allowed. */ 774 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer); } 775 776 QString shortcutExtraDataID() const 1084 ":/vrdp_on_disabled_16px.png", ":/vrdp_disabled_16px.png") 1085 {} 1086 1087 protected: 1088 1089 /** Returns action extra-data ID. */ 1090 virtual int extraDataID() const /* override */ 1091 { 1092 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer; 1093 } 1094 /** Returns action extra-data key. */ 1095 virtual QString extraDataKey() const /* override */ 1096 { 1097 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer); 1098 } 1099 /** Returns whether action is allowed. */ 1100 virtual bool isAllowed() const /* override */ 1101 { 1102 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer); 1103 } 1104 1105 /** Returns shortcut extra-data ID. */ 1106 virtual QString shortcutExtraDataID() const /* override */ 777 1107 { 778 1108 return QString("VRDPServer"); 779 1109 } 780 1110 781 void retranslateUi() 1111 /** Handles translation event. */ 1112 virtual void retranslateUi() /* override */ 782 1113 { 783 1114 setName(QApplication::translate("UIActionPool", "R&emote Display")); … … 786 1117 }; 787 1118 1119 /** Menu action extension, used as 'MenuBar' menu class. */ 788 1120 class UIActionMenuMenuBar : public UIActionMenu 789 1121 { … … 792 1124 public: 793 1125 1126 /** Constructs action passing @a pParent to the base-class. */ 794 1127 UIActionMenuMenuBar(UIActionPool *pParent) 795 : UIActionMenu(pParent, ":/menubar_16px.png", ":/menubar_disabled_16px.png") {} 796 797 protected: 798 799 /** Returns action extra-data ID. */ 800 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar; } 801 /** Returns action extra-data key. */ 802 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); } 803 /** Returns whether action is allowed. */ 804 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); } 805 806 void retranslateUi() 1128 : UIActionMenu(pParent, ":/menubar_16px.png", ":/menubar_disabled_16px.png") 1129 {} 1130 1131 protected: 1132 1133 /** Returns action extra-data ID. */ 1134 virtual int extraDataID() const /* override */ 1135 { 1136 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar; 1137 } 1138 /** Returns action extra-data key. */ 1139 virtual QString extraDataKey() const /* override */ 1140 { 1141 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); 1142 } 1143 /** Returns whether action is allowed. */ 1144 virtual bool isAllowed() const /* override */ 1145 { 1146 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar); 1147 } 1148 1149 /** Handles translation event. */ 1150 virtual void retranslateUi() /* override */ 807 1151 { 808 1152 setName(QApplication::translate("UIActionPool", "&Menu Bar")); … … 810 1154 }; 811 1155 1156 /** Simple action extension, used as 'Show MenuBar Settings Window' action class. */ 812 1157 class UIActionSimpleShowMenuBarSettingsWindow : public UIActionSimple 813 1158 { … … 816 1161 public: 817 1162 1163 /** Constructs action passing @a pParent to the base-class. */ 818 1164 UIActionSimpleShowMenuBarSettingsWindow(UIActionPool *pParent) 819 : UIActionSimple(pParent, ":/menubar_settings_16px.png", ":/menubar_settings_disabled_16px.png") {} 820 821 protected: 822 823 /** Returns action extra-data ID. */ 824 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings; } 825 /** Returns action extra-data key. */ 826 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); } 827 /** Returns whether action is allowed. */ 828 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); } 829 830 QString shortcutExtraDataID() const 1165 : UIActionSimple(pParent, ":/menubar_settings_16px.png", ":/menubar_settings_disabled_16px.png") 1166 {} 1167 1168 protected: 1169 1170 /** Returns action extra-data ID. */ 1171 virtual int extraDataID() const /* override */ 1172 { 1173 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings; 1174 } 1175 /** Returns action extra-data key. */ 1176 virtual QString extraDataKey() const /* override */ 1177 { 1178 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); 1179 } 1180 /** Returns whether action is allowed. */ 1181 virtual bool isAllowed() const /* override */ 1182 { 1183 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBarSettings); 1184 } 1185 1186 /** Returns shortcut extra-data ID. */ 1187 virtual QString shortcutExtraDataID() const /* override */ 831 1188 { 832 1189 return QString("MenuBarSettings"); 833 1190 } 834 1191 835 void retranslateUi() 1192 /** Handles translation event. */ 1193 virtual void retranslateUi() /* override */ 836 1194 { 837 1195 setName(QApplication::translate("UIActionPool", "&Menu Bar Settings...")); … … 840 1198 }; 841 1199 842 #ifndef RT_OS_DARWIN 1200 #ifndef VBOX_WS_MAC 1201 /** Toggle action extension, used as 'MenuBar' action class. */ 843 1202 class UIActionToggleMenuBar : public UIActionToggle 844 1203 { … … 847 1206 public: 848 1207 1208 /** Constructs action passing @a pParent to the base-class. */ 849 1209 UIActionToggleMenuBar(UIActionPool *pParent) 850 1210 : UIActionToggle(pParent, ":/menubar_on_16px.png", ":/menubar_16px.png", 851 ":/menubar_on_disabled_16px.png", ":/menubar_disabled_16px.png") {} 852 853 protected: 854 855 /** Returns action extra-data ID. */ 856 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar; } 857 /** Returns action extra-data key. */ 858 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar); } 859 /** Returns whether action is allowed. */ 860 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar); } 861 862 QString shortcutExtraDataID() const 1211 ":/menubar_on_disabled_16px.png", ":/menubar_disabled_16px.png") 1212 {} 1213 1214 protected: 1215 1216 /** Returns action extra-data ID. */ 1217 virtual int extraDataID() const /* override */ 1218 { 1219 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar; 1220 } 1221 /** Returns action extra-data key. */ 1222 virtual QString extraDataKey() const /* override */ 1223 { 1224 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar); 1225 } 1226 /** Returns whether action is allowed. */ 1227 virtual bool isAllowed() const /* override */ 1228 { 1229 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleMenuBar); 1230 } 1231 1232 /** Returns shortcut extra-data ID. */ 1233 virtual QString shortcutExtraDataID() const /* override */ 863 1234 { 864 1235 return QString("ToggleMenuBar"); 865 1236 } 866 1237 867 void retranslateUi() 1238 /** Handles translation event. */ 1239 virtual void retranslateUi() /* override */ 868 1240 { 869 1241 setName(QApplication::translate("UIActionPool", "Show Menu &Bar")); … … 871 1243 } 872 1244 }; 873 #endif /* !RT_OS_DARWIN */ 874 1245 #endif /* !VBOX_WS_MAC */ 1246 1247 /** Menu action extension, used as 'StatusBar' menu class. */ 875 1248 class UIActionMenuStatusBar : public UIActionMenu 876 1249 { … … 879 1252 public: 880 1253 1254 /** Constructs action passing @a pParent to the base-class. */ 881 1255 UIActionMenuStatusBar(UIActionPool *pParent) 882 : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png") {} 883 884 protected: 885 886 /** Returns action extra-data ID. */ 887 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar; } 888 /** Returns action extra-data key. */ 889 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); } 890 /** Returns whether action is allowed. */ 891 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); } 892 893 void retranslateUi() 1256 : UIActionMenu(pParent, ":/statusbar_16px.png", ":/statusbar_disabled_16px.png") 1257 {} 1258 1259 protected: 1260 1261 /** Returns action extra-data ID. */ 1262 virtual int extraDataID() const /* override */ 1263 { 1264 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar; 1265 } 1266 /** Returns action extra-data key. */ 1267 virtual QString extraDataKey() const /* override */ 1268 { 1269 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); 1270 } 1271 /** Returns whether action is allowed. */ 1272 virtual bool isAllowed() const /* override */ 1273 { 1274 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBar); 1275 } 1276 1277 /** Handles translation event. */ 1278 virtual void retranslateUi() /* override */ 894 1279 { 895 1280 setName(QApplication::translate("UIActionPool", "&Status Bar")); … … 897 1282 }; 898 1283 1284 /** Simple action extension, used as 'Show StatusBar Settings Window' action class. */ 899 1285 class UIActionSimpleShowStatusBarSettingsWindow : public UIActionSimple 900 1286 { … … 903 1289 public: 904 1290 1291 /** Constructs action passing @a pParent to the base-class. */ 905 1292 UIActionSimpleShowStatusBarSettingsWindow(UIActionPool *pParent) 906 : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png") {} 907 908 protected: 909 910 /** Returns action extra-data ID. */ 911 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings; } 912 /** Returns action extra-data key. */ 913 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); } 914 /** Returns whether action is allowed. */ 915 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); } 916 917 QString shortcutExtraDataID() const 1293 : UIActionSimple(pParent, ":/statusbar_settings_16px.png", ":/statusbar_settings_disabled_16px.png") 1294 {} 1295 1296 protected: 1297 1298 /** Returns action extra-data ID. */ 1299 virtual int extraDataID() const /* override */ 1300 { 1301 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings; 1302 } 1303 /** Returns action extra-data key. */ 1304 virtual QString extraDataKey() const /* override */ 1305 { 1306 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); 1307 } 1308 /** Returns whether action is allowed. */ 1309 virtual bool isAllowed() const /* override */ 1310 { 1311 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StatusBarSettings); 1312 } 1313 1314 /** Returns shortcut extra-data ID. */ 1315 virtual QString shortcutExtraDataID() const /* override */ 918 1316 { 919 1317 return QString("StatusBarSettings"); 920 1318 } 921 1319 922 void retranslateUi() 1320 /** Handles translation event. */ 1321 virtual void retranslateUi() /* override */ 923 1322 { 924 1323 setName(QApplication::translate("UIActionPool", "&Status Bar Settings...")); … … 927 1326 }; 928 1327 1328 /** Toggle action extension, used as 'StatusBar' action class. */ 929 1329 class UIActionToggleStatusBar : public UIActionToggle 930 1330 { … … 933 1333 public: 934 1334 1335 /** Constructs action passing @a pParent to the base-class. */ 935 1336 UIActionToggleStatusBar(UIActionPool *pParent) 936 1337 : UIActionToggle(pParent, ":/statusbar_on_16px.png", ":/statusbar_16px.png", 937 ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png") {} 938 939 protected: 940 941 /** Returns action extra-data ID. */ 942 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar; } 943 /** Returns action extra-data key. */ 944 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); } 945 /** Returns whether action is allowed. */ 946 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); } 947 948 QString shortcutExtraDataID() const 1338 ":/statusbar_on_disabled_16px.png", ":/statusbar_disabled_16px.png") 1339 {} 1340 1341 protected: 1342 1343 /** Returns action extra-data ID. */ 1344 virtual int extraDataID() const /* override */ 1345 { 1346 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar; 1347 } 1348 /** Returns action extra-data key. */ 1349 virtual QString extraDataKey() const /* override */ 1350 { 1351 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); 1352 } 1353 /** Returns whether action is allowed. */ 1354 virtual bool isAllowed() const /* override */ 1355 { 1356 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ToggleStatusBar); 1357 } 1358 1359 /** Returns shortcut extra-data ID. */ 1360 virtual QString shortcutExtraDataID() const /* override */ 949 1361 { 950 1362 return QString("ToggleStatusBar"); 951 1363 } 952 1364 953 void retranslateUi() 1365 /** Handles translation event. */ 1366 virtual void retranslateUi() /* override */ 954 1367 { 955 1368 setName(QApplication::translate("UIActionPool", "Show Status &Bar")); … … 958 1371 }; 959 1372 1373 /** Menu action extension, used as 'Scale Factor' menu class. */ 960 1374 class UIActionMenuScaleFactor : public UIActionMenu 961 1375 { … … 964 1378 public: 965 1379 1380 /** Constructs action passing @a pParent to the base-class. */ 966 1381 UIActionMenuScaleFactor(UIActionPool *pParent) 967 : UIActionMenu(pParent, ":/scale_factor_16px.png", ":/scale_factor_disabled_16px.png") {} 968 969 protected: 970 971 /** Returns action extra-data ID. */ 972 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor; } 973 /** Returns action extra-data key. */ 974 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); } 975 /** Returns whether action is allowed. */ 976 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); } 977 978 void retranslateUi() 1382 : UIActionMenu(pParent, ":/scale_factor_16px.png", ":/scale_factor_disabled_16px.png") 1383 {} 1384 1385 protected: 1386 1387 /** Returns action extra-data ID. */ 1388 virtual int extraDataID() const /* override */ 1389 { 1390 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor; 1391 } 1392 /** Returns action extra-data key. */ 1393 virtual QString extraDataKey() const /* override */ 1394 { 1395 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); 1396 } 1397 /** Returns whether action is allowed. */ 1398 virtual bool isAllowed() const /* override */ 1399 { 1400 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ScaleFactor); 1401 } 1402 1403 /** Handles translation event. */ 1404 virtual void retranslateUi() /* override */ 979 1405 { 980 1406 setName(QApplication::translate("UIActionPool", "S&cale Factor")); … … 982 1408 }; 983 1409 1410 1411 /** Menu action extension, used as 'Input' menu class. */ 984 1412 class UIActionMenuInput : public UIActionMenu 985 1413 { … … 988 1416 public: 989 1417 1418 /** Constructs action passing @a pParent to the base-class. */ 990 1419 UIActionMenuInput(UIActionPool *pParent) 991 : UIActionMenu(pParent) {} 992 993 protected: 994 995 /** Returns action extra-data ID. */ 996 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_Input; } 997 /** Returns action extra-data key. */ 998 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Input); } 999 /** Returns whether action is allowed. */ 1000 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Input); } 1001 1002 void retranslateUi() 1420 : UIActionMenu(pParent) 1421 {} 1422 1423 protected: 1424 1425 /** Returns action extra-data ID. */ 1426 virtual int extraDataID() const /* override */ 1427 { 1428 return UIExtraDataMetaDefs::MenuType_Input; 1429 } 1430 /** Returns action extra-data key. */ 1431 virtual QString extraDataKey() const /* override */ 1432 { 1433 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Input); 1434 } 1435 /** Returns whether action is allowed. */ 1436 virtual bool isAllowed() const /* override */ 1437 { 1438 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Input); 1439 } 1440 1441 /** Handles translation event. */ 1442 virtual void retranslateUi() /* override */ 1003 1443 { 1004 1444 setName(QApplication::translate("UIActionPool", "&Input")); … … 1006 1446 }; 1007 1447 1448 /** Menu action extension, used as 'Keyboard' menu class. */ 1008 1449 class UIActionMenuKeyboard : public UIActionMenu 1009 1450 { … … 1012 1453 public: 1013 1454 1455 /** Constructs action passing @a pParent to the base-class. */ 1014 1456 UIActionMenuKeyboard(UIActionPool *pParent) 1015 : UIActionMenu(pParent, ":/keyboard_16px.png") {} 1016 1017 protected: 1018 1019 /** Returns action extra-data ID. */ 1020 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard; } 1021 /** Returns action extra-data key. */ 1022 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard); } 1023 /** Returns whether action is allowed. */ 1024 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard); } 1025 1026 void retranslateUi() 1457 : UIActionMenu(pParent, ":/keyboard_16px.png") 1458 {} 1459 1460 protected: 1461 1462 /** Returns action extra-data ID. */ 1463 virtual int extraDataID() const /* override */ 1464 { 1465 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard; 1466 } 1467 /** Returns action extra-data key. */ 1468 virtual QString extraDataKey() const /* override */ 1469 { 1470 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard); 1471 } 1472 /** Returns whether action is allowed. */ 1473 virtual bool isAllowed() const /* override */ 1474 { 1475 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Keyboard); 1476 } 1477 1478 /** Handles translation event. */ 1479 virtual void retranslateUi() /* override */ 1027 1480 { 1028 1481 setName(QApplication::translate("UIActionPool", "&Keyboard")); … … 1030 1483 }; 1031 1484 1032 class UIActionSimpleKeyboardSettings : public UIActionSimple 1033 { 1034 Q_OBJECT; 1035 1036 public: 1037 1038 UIActionSimpleKeyboardSettings(UIActionPool *pParent) 1039 : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png") {} 1040 1041 protected: 1042 1043 /** Returns action extra-data ID. */ 1044 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings; } 1045 /** Returns action extra-data key. */ 1046 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings); } 1047 /** Returns whether action is allowed. */ 1048 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings); } 1049 1050 QString shortcutExtraDataID() const 1485 /** Simple action extension, used as 'Show Keyboard Settings Dialog' action class. */ 1486 class UIActionSimpleShowKeyboardSettingsDialog : public UIActionSimple 1487 { 1488 Q_OBJECT; 1489 1490 public: 1491 1492 /** Constructs action passing @a pParent to the base-class. */ 1493 UIActionSimpleShowKeyboardSettingsDialog(UIActionPool *pParent) 1494 : UIActionSimple(pParent, ":/keyboard_settings_16px.png", ":/keyboard_settings_disabled_16px.png") 1495 {} 1496 1497 protected: 1498 1499 /** Returns action extra-data ID. */ 1500 virtual int extraDataID() const /* override */ 1501 { 1502 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings; 1503 } 1504 /** Returns action extra-data key. */ 1505 virtual QString extraDataKey() const /* override */ 1506 { 1507 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings); 1508 } 1509 /** Returns whether action is allowed. */ 1510 virtual bool isAllowed() const /* override */ 1511 { 1512 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings); 1513 } 1514 1515 /** Returns shortcut extra-data ID. */ 1516 virtual QString shortcutExtraDataID() const /* override */ 1051 1517 { 1052 1518 return QString("KeyboardSettings"); 1053 1519 } 1054 1520 1055 void retranslateUi() 1521 /** Handles translation event. */ 1522 virtual void retranslateUi() /* override */ 1056 1523 { 1057 1524 setName(QApplication::translate("UIActionPool", "&Keyboard Settings...")); … … 1060 1527 }; 1061 1528 1529 /** Simple action extension, used as 'Perform Type CAD' action class. */ 1062 1530 class UIActionSimplePerformTypeCAD : public UIActionSimple 1063 1531 { … … 1066 1534 public: 1067 1535 1536 /** Constructs action passing @a pParent to the base-class. */ 1068 1537 UIActionSimplePerformTypeCAD(UIActionPool *pParent) 1069 : UIActionSimple(pParent) {} 1070 1071 protected: 1072 1073 /** Returns action extra-data ID. */ 1074 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD; } 1075 /** Returns action extra-data key. */ 1076 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD); } 1077 /** Returns whether action is allowed. */ 1078 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD); } 1079 1080 QString shortcutExtraDataID() const 1538 : UIActionSimple(pParent) 1539 {} 1540 1541 protected: 1542 1543 /** Returns action extra-data ID. */ 1544 virtual int extraDataID() const /* override */ 1545 { 1546 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD; 1547 } 1548 /** Returns action extra-data key. */ 1549 virtual QString extraDataKey() const /* override */ 1550 { 1551 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD); 1552 } 1553 /** Returns whether action is allowed. */ 1554 virtual bool isAllowed() const /* override */ 1555 { 1556 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCAD); 1557 } 1558 1559 /** Returns shortcut extra-data ID. */ 1560 virtual QString shortcutExtraDataID() const /* override */ 1081 1561 { 1082 1562 return QString("TypeCAD"); 1083 1563 } 1084 1564 1085 QKeySequence defaultShortcut(UIActionPoolType) const 1565 /** Returns default shortcut. */ 1566 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1086 1567 { 1087 1568 return QKeySequence("Del"); 1088 1569 } 1089 1570 1090 void retranslateUi() 1571 /** Handles translation event. */ 1572 virtual void retranslateUi() /* override */ 1091 1573 { 1092 1574 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Ctrl-Alt-Del")); … … 1096 1578 1097 1579 #ifdef VBOX_WS_X11 1580 /** X11: Simple action extension, used as 'Perform Type CABS' action class. */ 1098 1581 class UIActionSimplePerformTypeCABS : public UIActionSimple 1099 1582 { … … 1102 1585 public: 1103 1586 1587 /** Constructs action passing @a pParent to the base-class. */ 1104 1588 UIActionSimplePerformTypeCABS(UIActionPool *pParent) 1105 : UIActionSimple(pParent) {} 1106 1107 protected: 1108 1109 /** Returns action extra-data ID. */ 1110 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS; } 1111 /** Returns action extra-data key. */ 1112 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS); } 1113 /** Returns whether action is allowed. */ 1114 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS); } 1115 1116 QString shortcutExtraDataID() const 1589 : UIActionSimple(pParent) 1590 {} 1591 1592 protected: 1593 1594 /** Returns action extra-data ID. */ 1595 virtual int extraDataID() const /* override */ 1596 { 1597 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS; 1598 } 1599 /** Returns action extra-data key. */ 1600 virtual QString extraDataKey() const /* override */ 1601 { 1602 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS); 1603 } 1604 /** Returns whether action is allowed. */ 1605 virtual bool isAllowed() const /* override */ 1606 { 1607 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCABS); 1608 } 1609 1610 /** Returns shortcut extra-data ID. */ 1611 virtual QString shortcutExtraDataID() const /* override */ 1117 1612 { 1118 1613 return QString("TypeCABS"); 1119 1614 } 1120 1615 1121 QKeySequence defaultShortcut(UIActionPoolType) const 1616 /** Returns default shortcut. */ 1617 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1122 1618 { 1123 1619 return QKeySequence("Backspace"); 1124 1620 } 1125 1621 1126 void retranslateUi() 1622 /** Handles translation event. */ 1623 virtual void retranslateUi() /* override */ 1127 1624 { 1128 1625 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Ctrl-Alt-Backspace")); … … 1132 1629 #endif /* VBOX_WS_X11 */ 1133 1630 1631 /** Simple action extension, used as 'Perform Type Ctrl Break' action class. */ 1134 1632 class UIActionSimplePerformTypeCtrlBreak : public UIActionSimple 1135 1633 { … … 1138 1636 public: 1139 1637 1638 /** Constructs action passing @a pParent to the base-class. */ 1140 1639 UIActionSimplePerformTypeCtrlBreak(UIActionPool *pParent) 1141 : UIActionSimple(pParent) {} 1142 1143 protected: 1144 1145 /** Returns action extra-data ID. */ 1146 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak; } 1147 /** Returns action extra-data key. */ 1148 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak); } 1149 /** Returns whether action is allowed. */ 1150 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak); } 1151 1152 QString shortcutExtraDataID() const 1640 : UIActionSimple(pParent) 1641 {} 1642 1643 protected: 1644 1645 /** Returns action extra-data ID. */ 1646 virtual int extraDataID() const /* override */ 1647 { 1648 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak; 1649 } 1650 /** Returns action extra-data key. */ 1651 virtual QString extraDataKey() const /* override */ 1652 { 1653 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak); 1654 } 1655 /** Returns whether action is allowed. */ 1656 virtual bool isAllowed() const /* override */ 1657 { 1658 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeCtrlBreak); 1659 } 1660 1661 /** Returns shortcut extra-data ID. */ 1662 virtual QString shortcutExtraDataID() const /* override */ 1153 1663 { 1154 1664 return QString("TypeCtrlBreak"); 1155 1665 } 1156 1666 1157 void retranslateUi() 1667 /** Handles translation event. */ 1668 virtual void retranslateUi() /* override */ 1158 1669 { 1159 1670 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Ctrl-Break")); … … 1162 1673 }; 1163 1674 1675 /** Simple action extension, used as 'Perform Type Insert' action class. */ 1164 1676 class UIActionSimplePerformTypeInsert : public UIActionSimple 1165 1677 { … … 1168 1680 public: 1169 1681 1682 /** Constructs action passing @a pParent to the base-class. */ 1170 1683 UIActionSimplePerformTypeInsert(UIActionPool *pParent) 1171 : UIActionSimple(pParent) {} 1172 1173 protected: 1174 1175 /** Returns action extra-data ID. */ 1176 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert; } 1177 /** Returns action extra-data key. */ 1178 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert); } 1179 /** Returns whether action is allowed. */ 1180 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert); } 1181 1182 QString shortcutExtraDataID() const 1684 : UIActionSimple(pParent) 1685 {} 1686 1687 protected: 1688 1689 /** Returns action extra-data ID. */ 1690 virtual int extraDataID() const /* override */ 1691 { 1692 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert; 1693 } 1694 /** Returns action extra-data key. */ 1695 virtual QString extraDataKey() const /* override */ 1696 { 1697 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert); 1698 } 1699 /** Returns whether action is allowed. */ 1700 virtual bool isAllowed() const /* override */ 1701 { 1702 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeInsert); 1703 } 1704 1705 /** Returns shortcut extra-data ID. */ 1706 virtual QString shortcutExtraDataID() const /* override */ 1183 1707 { 1184 1708 return QString("TypeInsert"); 1185 1709 } 1186 1710 1187 void retranslateUi() 1711 /** Handles translation event. */ 1712 virtual void retranslateUi() /* override */ 1188 1713 { 1189 1714 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Insert")); … … 1192 1717 }; 1193 1718 1719 /** Simple action extension, used as 'Perform Type PrintScreen' action class. */ 1194 1720 class UIActionSimplePerformTypePrintScreen : public UIActionSimple 1195 1721 { … … 1198 1724 public: 1199 1725 1726 /** Constructs action passing @a pParent to the base-class. */ 1200 1727 UIActionSimplePerformTypePrintScreen(UIActionPool *pParent) 1201 : UIActionSimple(pParent) {} 1202 1203 protected: 1204 1205 /** Returns action extra-data ID. */ 1206 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen; } 1207 /** Returns action extra-data key. */ 1208 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen); } 1209 /** Returns whether action is allowed. */ 1210 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen); } 1211 1212 QString shortcutExtraDataID() const 1728 : UIActionSimple(pParent) 1729 {} 1730 1731 protected: 1732 1733 /** Returns action extra-data ID. */ 1734 virtual int extraDataID() const /* override */ 1735 { 1736 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen; 1737 } 1738 /** Returns action extra-data key. */ 1739 virtual QString extraDataKey() const /* override */ 1740 { 1741 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen); 1742 } 1743 /** Returns whether action is allowed. */ 1744 virtual bool isAllowed() const /* override */ 1745 { 1746 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypePrintScreen); 1747 } 1748 1749 /** Returns shortcut extra-data ID. */ 1750 virtual QString shortcutExtraDataID() const /* override */ 1213 1751 { 1214 1752 return QString("TypePrintScreen"); 1215 1753 } 1216 1754 1217 void retranslateUi() 1755 /** Handles translation event. */ 1756 virtual void retranslateUi() /* override */ 1218 1757 { 1219 1758 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Print Screen")); … … 1222 1761 }; 1223 1762 1763 /** Simple action extension, used as 'Perform Type Alt PrintScreen' action class. */ 1224 1764 class UIActionSimplePerformTypeAltPrintScreen : public UIActionSimple 1225 1765 { … … 1228 1768 public: 1229 1769 1770 /** Constructs action passing @a pParent to the base-class. */ 1230 1771 UIActionSimplePerformTypeAltPrintScreen(UIActionPool *pParent) 1231 : UIActionSimple(pParent) {} 1232 1233 protected: 1234 1235 /** Returns action extra-data ID. */ 1236 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen; } 1237 /** Returns action extra-data key. */ 1238 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen); } 1239 /** Returns whether action is allowed. */ 1240 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen); } 1241 1242 QString shortcutExtraDataID() const 1772 : UIActionSimple(pParent) 1773 {} 1774 1775 protected: 1776 1777 /** Returns action extra-data ID. */ 1778 virtual int extraDataID() const /* override */ 1779 { 1780 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen; 1781 } 1782 /** Returns action extra-data key. */ 1783 virtual QString extraDataKey() const /* override */ 1784 { 1785 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen); 1786 } 1787 /** Returns whether action is allowed. */ 1788 virtual bool isAllowed() const /* override */ 1789 { 1790 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_TypeAltPrintScreen); 1791 } 1792 1793 /** Returns shortcut extra-data ID. */ 1794 virtual QString shortcutExtraDataID() const /* override */ 1243 1795 { 1244 1796 return QString("TypeAltPrintScreen"); 1245 1797 } 1246 1798 1247 void retranslateUi() 1799 /** Handles translation event. */ 1800 virtual void retranslateUi() /* override */ 1248 1801 { 1249 1802 setName(QApplication::translate("UIActionPool", "&Insert %1", "that means send the %1 key sequence to the virtual machine").arg("Alt Print Screen")); … … 1252 1805 }; 1253 1806 1807 /** Menu action extension, used as 'Mouse' menu class. */ 1254 1808 class UIActionMenuMouse : public UIActionMenu 1255 1809 { … … 1258 1812 public: 1259 1813 1814 /** Constructs action passing @a pParent to the base-class. */ 1260 1815 UIActionMenuMouse(UIActionPool *pParent) 1261 : UIActionMenu(pParent) {} 1262 1263 protected: 1264 1265 /** Returns action extra-data ID. */ 1266 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse; } 1267 /** Returns action extra-data key. */ 1268 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse); } 1269 /** Returns whether action is allowed. */ 1270 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse); } 1271 1272 void retranslateUi() 1816 : UIActionMenu(pParent) 1817 {} 1818 1819 protected: 1820 1821 /** Returns action extra-data ID. */ 1822 virtual int extraDataID() const /* override */ 1823 { 1824 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse; 1825 } 1826 /** Returns action extra-data key. */ 1827 virtual QString extraDataKey() const /* override */ 1828 { 1829 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse); 1830 } 1831 /** Returns whether action is allowed. */ 1832 virtual bool isAllowed() const /* override */ 1833 { 1834 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_Mouse); 1835 } 1836 1837 /** Handles translation event. */ 1838 virtual void retranslateUi() /* override */ 1273 1839 { 1274 1840 setName(QApplication::translate("UIActionPool", "&Mouse")); … … 1276 1842 }; 1277 1843 1844 /** Toggle action extension, used as 'Mouse Integration' action class. */ 1278 1845 class UIActionToggleMouseIntegration : public UIActionToggle 1279 1846 { … … 1282 1849 public: 1283 1850 1851 /** Constructs action passing @a pParent to the base-class. */ 1284 1852 UIActionToggleMouseIntegration(UIActionPool *pParent) 1285 1853 : UIActionToggle(pParent, 1286 1854 ":/mouse_can_seamless_on_16px.png", ":/mouse_can_seamless_16px.png", 1287 ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png") {} 1288 1289 protected: 1290 1291 /** Returns action extra-data ID. */ 1292 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration; } 1293 /** Returns action extra-data key. */ 1294 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration); } 1295 /** Returns whether action is allowed. */ 1296 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration); } 1297 1298 QString shortcutExtraDataID() const 1855 ":/mouse_can_seamless_on_disabled_16px.png", ":/mouse_can_seamless_disabled_16px.png") 1856 {} 1857 1858 protected: 1859 1860 /** Returns action extra-data ID. */ 1861 virtual int extraDataID() const /* override */ 1862 { 1863 return UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration; 1864 } 1865 /** Returns action extra-data key. */ 1866 virtual QString extraDataKey() const /* override */ 1867 { 1868 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration); 1869 } 1870 /** Returns whether action is allowed. */ 1871 virtual bool isAllowed() const /* override */ 1872 { 1873 return actionPool()->toRuntime()->isAllowedInMenuInput(UIExtraDataMetaDefs::RuntimeMenuInputActionType_MouseIntegration); 1874 } 1875 1876 /** Returns shortcut extra-data ID. */ 1877 virtual QString shortcutExtraDataID() const /* override */ 1299 1878 { 1300 1879 return QString("MouseIntegration"); 1301 1880 } 1302 1881 1303 void retranslateUi() 1882 /** Handles translation event. */ 1883 virtual void retranslateUi() /* override */ 1304 1884 { 1305 1885 setName(QApplication::translate("UIActionPool", "&Mouse Integration")); … … 1308 1888 }; 1309 1889 1890 1891 /** Menu action extension, used as 'Devices' menu class. */ 1310 1892 class UIActionMenuDevices : public UIActionMenu 1311 1893 { … … 1314 1896 public: 1315 1897 1898 /** Constructs action passing @a pParent to the base-class. */ 1316 1899 UIActionMenuDevices(UIActionPool *pParent) 1317 : UIActionMenu(pParent) {} 1318 1319 protected: 1320 1321 /** Returns action extra-data ID. */ 1322 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_Devices; } 1323 /** Returns action extra-data key. */ 1324 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Devices); } 1325 /** Returns whether action is allowed. */ 1326 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Devices); } 1327 1328 void retranslateUi() 1900 : UIActionMenu(pParent) 1901 {} 1902 1903 protected: 1904 1905 /** Returns action extra-data ID. */ 1906 virtual int extraDataID() const /* override */ 1907 { 1908 return UIExtraDataMetaDefs::MenuType_Devices; 1909 } 1910 /** Returns action extra-data key. */ 1911 virtual QString extraDataKey() const /* override */ 1912 { 1913 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Devices); 1914 } 1915 /** Returns whether action is allowed. */ 1916 virtual bool isAllowed() const /* override */ 1917 { 1918 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Devices); 1919 } 1920 1921 /** Handles translation event. */ 1922 virtual void retranslateUi() /* override */ 1329 1923 { 1330 1924 setName(QApplication::translate("UIActionPool", "&Devices")); … … 1332 1926 }; 1333 1927 1928 /** Menu action extension, used as 'Hard Drives' menu class. */ 1334 1929 class UIActionMenuHardDrives : public UIActionMenu 1335 1930 { … … 1338 1933 public: 1339 1934 1935 /** Constructs action passing @a pParent to the base-class. */ 1340 1936 UIActionMenuHardDrives(UIActionPool *pParent) 1341 1937 : UIActionMenu(pParent, ":/hd_16px.png", ":/hd_disabled_16px.png") … … 1347 1943 1348 1944 /** Returns action extra-data ID. */ 1349 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives; } 1350 /** Returns action extra-data key. */ 1351 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); } 1352 /** Returns whether action is allowed. */ 1353 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); } 1354 1355 void retranslateUi() 1945 virtual int extraDataID() const /* override */ 1946 { 1947 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives; 1948 } 1949 /** Returns action extra-data key. */ 1950 virtual QString extraDataKey() const /* override */ 1951 { 1952 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); 1953 } 1954 /** Returns whether action is allowed. */ 1955 virtual bool isAllowed() const /* override */ 1956 { 1957 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrives); 1958 } 1959 1960 /** Handles translation event. */ 1961 virtual void retranslateUi() /* override */ 1356 1962 { 1357 1963 setName(QApplication::translate("UIActionPool", "&Hard Disks")); … … 1359 1965 }; 1360 1966 1967 /** Simple action extension, used as 'Show Hard Drives Settings Dialog' action class. */ 1361 1968 class UIActionSimpleShowHardDrivesSettingsDialog : public UIActionSimple 1362 1969 { … … 1365 1972 public: 1366 1973 1974 /** Constructs action passing @a pParent to the base-class. */ 1367 1975 UIActionSimpleShowHardDrivesSettingsDialog(UIActionPool *pParent) 1368 : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") {} 1369 1370 protected: 1371 1372 /** Returns action extra-data ID. */ 1373 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings; } 1374 /** Returns action extra-data key. */ 1375 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); } 1376 /** Returns whether action is allowed. */ 1377 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); } 1378 1379 QString shortcutExtraDataID() const 1976 : UIActionSimple(pParent, ":/hd_settings_16px.png", ":/hd_settings_disabled_16px.png") 1977 {} 1978 1979 protected: 1980 1981 /** Returns action extra-data ID. */ 1982 virtual int extraDataID() const /* override */ 1983 { 1984 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings; 1985 } 1986 /** Returns action extra-data key. */ 1987 virtual QString extraDataKey() const /* override */ 1988 { 1989 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); 1990 } 1991 /** Returns whether action is allowed. */ 1992 virtual bool isAllowed() const /* override */ 1993 { 1994 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_HardDrivesSettings); 1995 } 1996 1997 /** Returns shortcut extra-data ID. */ 1998 virtual QString shortcutExtraDataID() const /* override */ 1380 1999 { 1381 2000 return QString("HardDriveSettingsDialog"); 1382 2001 } 1383 2002 1384 void retranslateUi() 2003 /** Handles translation event. */ 2004 virtual void retranslateUi() /* override */ 1385 2005 { 1386 2006 setName(QApplication::translate("UIActionPool", "&Hard Disk Settings...")); … … 1389 2009 }; 1390 2010 2011 /** Menu action extension, used as 'Optical Drives' menu class. */ 1391 2012 class UIActionMenuOpticalDevices : public UIActionMenu 1392 2013 { … … 1395 2016 public: 1396 2017 2018 /** Constructs action passing @a pParent to the base-class. */ 1397 2019 UIActionMenuOpticalDevices(UIActionPool *pParent) 1398 2020 : UIActionMenu(pParent, ":/cd_16px.png", ":/cd_disabled_16px.png") … … 1404 2026 1405 2027 /** Returns action extra-data ID. */ 1406 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices; } 1407 /** Returns action extra-data key. */ 1408 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); } 1409 /** Returns whether action is allowed. */ 1410 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); } 1411 1412 void retranslateUi() 2028 virtual int extraDataID() const /* override */ 2029 { 2030 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices; 2031 } 2032 /** Returns action extra-data key. */ 2033 virtual QString extraDataKey() const /* override */ 2034 { 2035 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); 2036 } 2037 /** Returns whether action is allowed. */ 2038 virtual bool isAllowed() const /* override */ 2039 { 2040 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_OpticalDevices); 2041 } 2042 2043 /** Handles translation event. */ 2044 virtual void retranslateUi() /* override */ 1413 2045 { 1414 2046 setName(QApplication::translate("UIActionPool", "&Optical Drives")); … … 1416 2048 }; 1417 2049 2050 /** Menu action extension, used as 'Floppy Drives' menu class. */ 1418 2051 class UIActionMenuFloppyDevices : public UIActionMenu 1419 2052 { … … 1422 2055 public: 1423 2056 2057 /** Constructs action passing @a pParent to the base-class. */ 1424 2058 UIActionMenuFloppyDevices(UIActionPool *pParent) 1425 2059 : UIActionMenu(pParent, ":/fd_16px.png", ":/fd_disabled_16px.png") … … 1431 2065 1432 2066 /** Returns action extra-data ID. */ 1433 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices; } 1434 /** Returns action extra-data key. */ 1435 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); } 1436 /** Returns whether action is allowed. */ 1437 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); } 1438 1439 void retranslateUi() 2067 virtual int extraDataID() const /* override */ 2068 { 2069 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices; 2070 } 2071 /** Returns action extra-data key. */ 2072 virtual QString extraDataKey() const /* override */ 2073 { 2074 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); 2075 } 2076 /** Returns whether action is allowed. */ 2077 virtual bool isAllowed() const /* override */ 2078 { 2079 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_FloppyDevices); 2080 } 2081 2082 /** Handles translation event. */ 2083 virtual void retranslateUi() /* override */ 1440 2084 { 1441 2085 setName(QApplication::translate("UIActionPool", "&Floppy Drives")); … … 1443 2087 }; 1444 2088 2089 /** Menu action extension, used as 'Audio' menu class. */ 1445 2090 class UIActionMenuAudio : public UIActionMenu 1446 2091 { … … 1449 2094 public: 1450 2095 2096 /** Constructs action passing @a pParent to the base-class. */ 1451 2097 UIActionMenuAudio(UIActionPool *pParent) 1452 : UIActionMenu(pParent, ":/audio_16px.png", ":/audio_all_off_16px.png") {} 1453 1454 protected: 1455 1456 /** Returns action extra-data ID. */ 1457 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio; } 1458 /** Returns action extra-data key. */ 1459 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio); } 1460 /** Returns whether action is allowed. */ 1461 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio); } 1462 1463 void retranslateUi() 2098 : UIActionMenu(pParent, ":/audio_16px.png", ":/audio_all_off_16px.png") 2099 {} 2100 2101 protected: 2102 2103 /** Returns action extra-data ID. */ 2104 virtual int extraDataID() const /* override */ 2105 { 2106 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio; 2107 } 2108 /** Returns action extra-data key. */ 2109 virtual QString extraDataKey() const /* override */ 2110 { 2111 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio); 2112 } 2113 /** Returns whether action is allowed. */ 2114 virtual bool isAllowed() const /* override */ 2115 { 2116 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Audio); 2117 } 2118 2119 /** Handles translation event. */ 2120 virtual void retranslateUi() /* override */ 1464 2121 { 1465 2122 setName(QApplication::translate("UIActionPool", "&Audio")); … … 1467 2124 }; 1468 2125 2126 /** Toggle action extension, used as 'Audio Output' action class. */ 1469 2127 class UIActionToggleAudioOutput : public UIActionToggle 1470 2128 { … … 1473 2131 public: 1474 2132 2133 /** Constructs action passing @a pParent to the base-class. */ 1475 2134 UIActionToggleAudioOutput(UIActionPool *pParent) 1476 2135 : UIActionToggle(pParent, 1477 2136 ":/audio_output_on_16px.png", ":/audio_output_16px.png", 1478 ":/audio_output_on_16px.png", ":/audio_output_16px.png") {} 1479 1480 protected: 1481 1482 /** Returns action extra-data ID. */ 1483 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput; } 1484 /** Returns action extra-data key. */ 1485 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput); } 1486 /** Returns whether action is allowed. */ 1487 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput); } 1488 1489 QString shortcutExtraDataID() const 2137 ":/audio_output_on_16px.png", ":/audio_output_16px.png") 2138 {} 2139 2140 protected: 2141 2142 /** Returns action extra-data ID. */ 2143 virtual int extraDataID() const /* override */ 2144 { 2145 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput; 2146 } 2147 /** Returns action extra-data key. */ 2148 virtual QString extraDataKey() const /* override */ 2149 { 2150 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput); 2151 } 2152 /** Returns whether action is allowed. */ 2153 virtual bool isAllowed() const /* override */ 2154 { 2155 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioOutput); 2156 } 2157 2158 /** Returns shortcut extra-data ID. */ 2159 virtual QString shortcutExtraDataID() const /* override */ 1490 2160 { 1491 2161 return QString("ToggleAudioOutput"); 1492 2162 } 1493 2163 1494 void retranslateUi() 2164 /** Handles translation event. */ 2165 virtual void retranslateUi() /* override */ 1495 2166 { 1496 2167 setName(QApplication::translate("UIActionPool", "Audio Output")); … … 1499 2170 }; 1500 2171 2172 /** Toggle action extension, used as 'Audio Input' action class. */ 1501 2173 class UIActionToggleAudioInput : public UIActionToggle 1502 2174 { … … 1505 2177 public: 1506 2178 2179 /** Constructs action passing @a pParent to the base-class. */ 1507 2180 UIActionToggleAudioInput(UIActionPool *pParent) 1508 2181 : UIActionToggle(pParent, 1509 2182 ":/audio_input_on_16px.png", ":/audio_input_16px.png", 1510 ":/audio_input_on_16px.png", ":/audio_input_16px.png") {} 1511 1512 protected: 1513 1514 /** Returns action extra-data ID. */ 1515 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput; } 1516 /** Returns action extra-data key. */ 1517 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput); } 1518 /** Returns whether action is allowed. */ 1519 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput); } 1520 1521 QString shortcutExtraDataID() const 2183 ":/audio_input_on_16px.png", ":/audio_input_16px.png") 2184 {} 2185 2186 protected: 2187 2188 /** Returns action extra-data ID. */ 2189 virtual int extraDataID() const /* override */ 2190 { 2191 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput; 2192 } 2193 /** Returns action extra-data key. */ 2194 virtual QString extraDataKey() const /* override */ 2195 { 2196 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput); 2197 } 2198 /** Returns whether action is allowed. */ 2199 virtual bool isAllowed() const /* override */ 2200 { 2201 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_AudioInput); 2202 } 2203 2204 /** Returns shortcut extra-data ID. */ 2205 virtual QString shortcutExtraDataID() const /* override */ 1522 2206 { 1523 2207 return QString("ToggleAudioInput"); 1524 2208 } 1525 2209 1526 void retranslateUi() 2210 /** Handles translation event. */ 2211 virtual void retranslateUi() /* override */ 1527 2212 { 1528 2213 setName(QApplication::translate("UIActionPool", "Audio Input")); … … 1531 2216 }; 1532 2217 2218 /** Menu action extension, used as 'Network Adapters' menu class. */ 1533 2219 class UIActionMenuNetworkAdapters : public UIActionMenu 1534 2220 { … … 1537 2223 public: 1538 2224 2225 /** Constructs action passing @a pParent to the base-class. */ 1539 2226 UIActionMenuNetworkAdapters(UIActionPool *pParent) 1540 : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") {} 1541 1542 protected: 1543 1544 /** Returns action extra-data ID. */ 1545 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network; } 1546 /** Returns action extra-data key. */ 1547 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); } 1548 /** Returns whether action is allowed. */ 1549 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); } 1550 1551 void retranslateUi() 2227 : UIActionMenu(pParent, ":/nw_16px.png", ":/nw_disabled_16px.png") 2228 {} 2229 2230 protected: 2231 2232 /** Returns action extra-data ID. */ 2233 virtual int extraDataID() const /* override */ 2234 { 2235 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network; 2236 } 2237 /** Returns action extra-data key. */ 2238 virtual QString extraDataKey() const /* override */ 2239 { 2240 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); 2241 } 2242 /** Returns whether action is allowed. */ 2243 virtual bool isAllowed() const /* override */ 2244 { 2245 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_Network); 2246 } 2247 2248 /** Handles translation event. */ 2249 virtual void retranslateUi() /* override */ 1552 2250 { 1553 2251 setName(QApplication::translate("UIActionPool", "&Network")); … … 1555 2253 }; 1556 2254 2255 /** Simple action extension, used as 'Show Network Settings Dialog' action class. */ 1557 2256 class UIActionSimpleShowNetworkSettingsDialog : public UIActionSimple 1558 2257 { … … 1561 2260 public: 1562 2261 2262 /** Constructs action passing @a pParent to the base-class. */ 1563 2263 UIActionSimpleShowNetworkSettingsDialog(UIActionPool *pParent) 1564 : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png") {} 1565 1566 protected: 1567 1568 /** Returns action extra-data ID. */ 1569 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings; } 1570 /** Returns action extra-data key. */ 1571 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); } 1572 /** Returns whether action is allowed. */ 1573 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); } 1574 1575 QString shortcutExtraDataID() const 2264 : UIActionSimple(pParent, ":/nw_settings_16px.png", ":/nw_settings_disabled_16px.png") 2265 {} 2266 2267 protected: 2268 2269 /** Returns action extra-data ID. */ 2270 virtual int extraDataID() const /* override */ 2271 { 2272 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings; 2273 } 2274 /** Returns action extra-data key. */ 2275 virtual QString extraDataKey() const /* override */ 2276 { 2277 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); 2278 } 2279 /** Returns whether action is allowed. */ 2280 virtual bool isAllowed() const /* override */ 2281 { 2282 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_NetworkSettings); 2283 } 2284 2285 /** Returns shortcut extra-data ID. */ 2286 virtual QString shortcutExtraDataID() const /* override */ 1576 2287 { 1577 2288 return QString("NetworkSettingsDialog"); 1578 2289 } 1579 2290 1580 void retranslateUi() 2291 /** Handles translation event. */ 2292 virtual void retranslateUi() /* override */ 1581 2293 { 1582 2294 setName(QApplication::translate("UIActionPool", "&Network Settings...")); … … 1585 2297 }; 1586 2298 2299 /** Menu action extension, used as 'USB Devices' menu class. */ 1587 2300 class UIActionMenuUSBDevices : public UIActionMenu 1588 2301 { … … 1591 2304 public: 1592 2305 2306 /** Constructs action passing @a pParent to the base-class. */ 1593 2307 UIActionMenuUSBDevices(UIActionPool *pParent) 1594 2308 : UIActionMenu(pParent, ":/usb_16px.png", ":/usb_disabled_16px.png") … … 1600 2314 1601 2315 /** Returns action extra-data ID. */ 1602 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices; } 1603 /** Returns action extra-data key. */ 1604 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); } 1605 /** Returns whether action is allowed. */ 1606 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); } 1607 1608 void retranslateUi() 2316 virtual int extraDataID() const /* override */ 2317 { 2318 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices; 2319 } 2320 /** Returns action extra-data key. */ 2321 virtual QString extraDataKey() const /* override */ 2322 { 2323 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); 2324 } 2325 /** Returns whether action is allowed. */ 2326 virtual bool isAllowed() const /* override */ 2327 { 2328 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevices); 2329 } 2330 2331 /** Handles translation event. */ 2332 virtual void retranslateUi() /* override */ 1609 2333 { 1610 2334 setName(QApplication::translate("UIActionPool", "&USB")); … … 1612 2336 }; 1613 2337 2338 /** Simple action extension, used as 'Show USB Devices Settings Dialog' action class. */ 1614 2339 class UIActionSimpleShowUSBDevicesSettingsDialog : public UIActionSimple 1615 2340 { … … 1618 2343 public: 1619 2344 2345 /** Constructs action passing @a pParent to the base-class. */ 1620 2346 UIActionSimpleShowUSBDevicesSettingsDialog(UIActionPool *pParent) 1621 : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") {} 1622 1623 protected: 1624 1625 /** Returns action extra-data ID. */ 1626 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings; } 1627 /** Returns action extra-data key. */ 1628 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); } 1629 /** Returns whether action is allowed. */ 1630 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); } 1631 1632 QString shortcutExtraDataID() const 2347 : UIActionSimple(pParent, ":/usb_settings_16px.png", ":/usb_settings_disabled_16px.png") 2348 {} 2349 2350 protected: 2351 2352 /** Returns action extra-data ID. */ 2353 virtual int extraDataID() const /* override */ 2354 { 2355 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings; 2356 } 2357 /** Returns action extra-data key. */ 2358 virtual QString extraDataKey() const /* override */ 2359 { 2360 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); 2361 } 2362 /** Returns whether action is allowed. */ 2363 virtual bool isAllowed() const /* override */ 2364 { 2365 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_USBDevicesSettings); 2366 } 2367 2368 /** Returns shortcut extra-data ID. */ 2369 virtual QString shortcutExtraDataID() const /* override */ 1633 2370 { 1634 2371 return QString("USBDevicesSettingsDialog"); 1635 2372 } 1636 2373 1637 void retranslateUi() 2374 /** Handles translation event. */ 2375 virtual void retranslateUi() /* override */ 1638 2376 { 1639 2377 setName(QApplication::translate("UIActionPool", "&USB Settings...")); … … 1642 2380 }; 1643 2381 2382 /** Menu action extension, used as 'Web Cams' menu class. */ 1644 2383 class UIActionMenuWebCams : public UIActionMenu 1645 2384 { … … 1648 2387 public: 1649 2388 2389 /** Constructs action passing @a pParent to the base-class. */ 1650 2390 UIActionMenuWebCams(UIActionPool *pParent) 1651 2391 : UIActionMenu(pParent, ":/web_camera_16px.png", ":/web_camera_disabled_16px.png") … … 1657 2397 1658 2398 /** Returns action extra-data ID. */ 1659 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams; } 1660 /** Returns action extra-data key. */ 1661 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); } 1662 /** Returns whether action is allowed. */ 1663 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); } 1664 1665 void retranslateUi() 2399 virtual int extraDataID() const /* override */ 2400 { 2401 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams; 2402 } 2403 /** Returns action extra-data key. */ 2404 virtual QString extraDataKey() const /* override */ 2405 { 2406 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); 2407 } 2408 /** Returns whether action is allowed. */ 2409 virtual bool isAllowed() const /* override */ 2410 { 2411 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_WebCams); 2412 } 2413 2414 /** Handles translation event. */ 2415 virtual void retranslateUi() /* override */ 1666 2416 { 1667 2417 setName(QApplication::translate("UIActionPool", "&Webcams")); … … 1669 2419 }; 1670 2420 2421 /** Menu action extension, used as 'Shared Clipboard' menu class. */ 1671 2422 class UIActionMenuSharedClipboard : public UIActionMenu 1672 2423 { … … 1675 2426 public: 1676 2427 2428 /** Constructs action passing @a pParent to the base-class. */ 1677 2429 UIActionMenuSharedClipboard(UIActionPool *pParent) 1678 : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png") {} 1679 1680 protected: 1681 1682 /** Returns action extra-data ID. */ 1683 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard; } 1684 /** Returns action extra-data key. */ 1685 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); } 1686 /** Returns whether action is allowed. */ 1687 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); } 1688 1689 void retranslateUi() 2430 : UIActionMenu(pParent, ":/shared_clipboard_16px.png", ":/shared_clipboard_disabled_16px.png") 2431 {} 2432 2433 protected: 2434 2435 /** Returns action extra-data ID. */ 2436 virtual int extraDataID() const /* override */ 2437 { 2438 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard; 2439 } 2440 /** Returns action extra-data key. */ 2441 virtual QString extraDataKey() const /* override */ 2442 { 2443 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); 2444 } 2445 /** Returns whether action is allowed. */ 2446 virtual bool isAllowed() const /* override */ 2447 { 2448 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedClipboard); 2449 } 2450 2451 /** Handles translation event. */ 2452 virtual void retranslateUi() /* override */ 1690 2453 { 1691 2454 setName(QApplication::translate("UIActionPool", "Shared &Clipboard")); … … 1693 2456 }; 1694 2457 2458 /** Menu action extension, used as 'Drag & Drop' menu class. */ 1695 2459 class UIActionMenuDragAndDrop : public UIActionMenu 1696 2460 { … … 1699 2463 public: 1700 2464 2465 /** Constructs action passing @a pParent to the base-class. */ 1701 2466 UIActionMenuDragAndDrop(UIActionPool *pParent) 1702 : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png") {} 1703 1704 protected: 1705 1706 /** Returns action extra-data ID. */ 1707 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop; } 1708 /** Returns action extra-data key. */ 1709 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); } 1710 /** Returns whether action is allowed. */ 1711 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); } 1712 1713 void retranslateUi() 2467 : UIActionMenu(pParent, ":/drag_drop_16px.png", ":/drag_drop_disabled_16px.png") 2468 {} 2469 2470 protected: 2471 2472 /** Returns action extra-data ID. */ 2473 virtual int extraDataID() const /* override */ 2474 { 2475 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop; 2476 } 2477 /** Returns action extra-data key. */ 2478 virtual QString extraDataKey() const /* override */ 2479 { 2480 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); 2481 } 2482 /** Returns whether action is allowed. */ 2483 virtual bool isAllowed() const /* override */ 2484 { 2485 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_DragAndDrop); 2486 } 2487 2488 /** Handles translation event. */ 2489 virtual void retranslateUi() /* override */ 1714 2490 { 1715 2491 setName(QApplication::translate("UIActionPool", "&Drag and Drop")); … … 1717 2493 }; 1718 2494 2495 /** Menu action extension, used as 'Shared Folders' menu class. */ 1719 2496 class UIActionMenuSharedFolders : public UIActionMenu 1720 2497 { … … 1723 2500 public: 1724 2501 2502 /** Constructs action passing @a pParent to the base-class. */ 1725 2503 UIActionMenuSharedFolders(UIActionPool *pParent) 1726 : UIActionMenu(pParent, ":/sf_16px.png", ":/sf_disabled_16px.png") {} 1727 1728 protected: 1729 1730 /** Returns action extra-data ID. */ 1731 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders; } 1732 /** Returns action extra-data key. */ 1733 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); } 1734 /** Returns whether action is allowed. */ 1735 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); } 1736 1737 void retranslateUi() 2504 : UIActionMenu(pParent, ":/sf_16px.png", ":/sf_disabled_16px.png") 2505 {} 2506 2507 protected: 2508 2509 /** Returns action extra-data ID. */ 2510 virtual int extraDataID() const /* override */ 2511 { 2512 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders; 2513 } 2514 /** Returns action extra-data key. */ 2515 virtual QString extraDataKey() const /* override */ 2516 { 2517 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); 2518 } 2519 /** Returns whether action is allowed. */ 2520 virtual bool isAllowed() const /* override */ 2521 { 2522 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFolders); 2523 } 2524 2525 /** Handles translation event. */ 2526 virtual void retranslateUi() /* override */ 1738 2527 { 1739 2528 setName(QApplication::translate("UIActionPool", "&Shared Folders")); … … 1741 2530 }; 1742 2531 2532 /** Simple action extension, used as 'Show Shared Folders Settings Dialog' action class. */ 1743 2533 class UIActionSimpleShowSharedFoldersSettingsDialog : public UIActionSimple 1744 2534 { … … 1747 2537 public: 1748 2538 2539 /** Constructs action passing @a pParent to the base-class. */ 1749 2540 UIActionSimpleShowSharedFoldersSettingsDialog(UIActionPool *pParent) 1750 : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png") {} 1751 1752 protected: 1753 1754 /** Returns action extra-data ID. */ 1755 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings; } 1756 /** Returns action extra-data key. */ 1757 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); } 1758 /** Returns whether action is allowed. */ 1759 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); } 1760 1761 QString shortcutExtraDataID() const 2541 : UIActionSimple(pParent, ":/sf_settings_16px.png", ":/sf_settings_disabled_16px.png") 2542 {} 2543 2544 protected: 2545 2546 /** Returns action extra-data ID. */ 2547 virtual int extraDataID() const /* override */ 2548 { 2549 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings; 2550 } 2551 /** Returns action extra-data key. */ 2552 virtual QString extraDataKey() const /* override */ 2553 { 2554 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); 2555 } 2556 /** Returns whether action is allowed. */ 2557 virtual bool isAllowed() const /* override */ 2558 { 2559 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_SharedFoldersSettings); 2560 } 2561 2562 /** Returns shortcut extra-data ID. */ 2563 virtual QString shortcutExtraDataID() const /* override */ 1762 2564 { 1763 2565 return QString("SharedFoldersSettingsDialog"); 1764 2566 } 1765 2567 1766 void retranslateUi() 2568 /** Handles translation event. */ 2569 virtual void retranslateUi() /* override */ 1767 2570 { 1768 2571 setName(QApplication::translate("UIActionPool", "&Shared Folders Settings...")); … … 1771 2574 }; 1772 2575 2576 /** Simple action extension, used as 'Perform Install Guest Tools' action class. */ 1773 2577 class UIActionSimplePerformInstallGuestTools : public UIActionSimple 1774 2578 { … … 1777 2581 public: 1778 2582 2583 /** Constructs action passing @a pParent to the base-class. */ 1779 2584 UIActionSimplePerformInstallGuestTools(UIActionPool *pParent) 1780 : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") {} 1781 1782 protected: 1783 1784 /** Returns action extra-data ID. */ 1785 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools; } 1786 /** Returns action extra-data key. */ 1787 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); } 1788 /** Returns whether action is allowed. */ 1789 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); } 1790 1791 QString shortcutExtraDataID() const 2585 : UIActionSimple(pParent, ":/guesttools_16px.png", ":/guesttools_disabled_16px.png") 2586 {} 2587 2588 protected: 2589 2590 /** Returns action extra-data ID. */ 2591 virtual int extraDataID() const /* override */ 2592 { 2593 return UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools; 2594 } 2595 /** Returns action extra-data key. */ 2596 virtual QString extraDataKey() const /* override */ 2597 { 2598 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); 2599 } 2600 /** Returns whether action is allowed. */ 2601 virtual bool isAllowed() const /* override */ 2602 { 2603 return actionPool()->toRuntime()->isAllowedInMenuDevices(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType_InstallGuestTools); 2604 } 2605 2606 /** Returns shortcut extra-data ID. */ 2607 virtual QString shortcutExtraDataID() const /* override */ 1792 2608 { 1793 2609 return QString("InstallGuestAdditions"); 1794 2610 } 1795 2611 1796 void retranslateUi() 2612 /** Handles translation event. */ 2613 virtual void retranslateUi() /* override */ 1797 2614 { 1798 2615 setName(QApplication::translate("UIActionPool", "&Insert Guest Additions CD image...")); … … 1802 2619 1803 2620 #ifdef VBOX_WITH_DEBUGGER_GUI 2621 /** Menu action extension, used as 'Debug' menu class. */ 1804 2622 class UIActionMenuDebug : public UIActionMenu 1805 2623 { … … 1808 2626 public: 1809 2627 2628 /** Constructs action passing @a pParent to the base-class. */ 1810 2629 UIActionMenuDebug(UIActionPool *pParent) 1811 : UIActionMenu(pParent) {} 1812 1813 protected: 1814 1815 /** Returns action extra-data ID. */ 1816 virtual int extraDataID() const { return UIExtraDataMetaDefs::MenuType_Debug; } 1817 /** Returns action extra-data key. */ 1818 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Debug); } 1819 /** Returns whether action is allowed. */ 1820 virtual bool isAllowed() const { return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Debug); } 1821 1822 void retranslateUi() 2630 : UIActionMenu(pParent) 2631 {} 2632 2633 protected: 2634 2635 /** Returns action extra-data ID. */ 2636 virtual int extraDataID() const /* override */ 2637 { 2638 return UIExtraDataMetaDefs::MenuType_Debug; 2639 } 2640 /** Returns action extra-data key. */ 2641 virtual QString extraDataKey() const /* override */ 2642 { 2643 return gpConverter->toInternalString(UIExtraDataMetaDefs::MenuType_Debug); 2644 } 2645 /** Returns whether action is allowed. */ 2646 virtual bool isAllowed() const /* override */ 2647 { 2648 return actionPool()->isAllowedInMenuBar(UIExtraDataMetaDefs::MenuType_Debug); 2649 } 2650 2651 /** Handles translation event. */ 2652 virtual void retranslateUi() /* override */ 1823 2653 { 1824 2654 setName(QApplication::translate("UIActionPool", "De&bug")); … … 1826 2656 }; 1827 2657 2658 /** Simple action extension, used as 'Show Statistics' action class. */ 1828 2659 class UIActionSimpleShowStatistics : public UIActionSimple 1829 2660 { … … 1832 2663 public: 1833 2664 2665 /** Constructs action passing @a pParent to the base-class. */ 1834 2666 UIActionSimpleShowStatistics(UIActionPool *pParent) 1835 : UIActionSimple(pParent) {} 1836 1837 protected: 1838 1839 /** Returns action extra-data ID. */ 1840 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics; } 1841 /** Returns action extra-data key. */ 1842 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); } 1843 /** Returns whether action is allowed. */ 1844 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); } 1845 1846 QString shortcutExtraDataID() const 2667 : UIActionSimple(pParent) 2668 {} 2669 2670 protected: 2671 2672 /** Returns action extra-data ID. */ 2673 virtual int extraDataID() const /* override */ 2674 { 2675 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics; 2676 } 2677 /** Returns action extra-data key. */ 2678 virtual QString extraDataKey() const /* override */ 2679 { 2680 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); 2681 } 2682 /** Returns whether action is allowed. */ 2683 virtual bool isAllowed() const /* override */ 2684 { 2685 return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Statistics); 2686 } 2687 2688 /** Returns shortcut extra-data ID. */ 2689 virtual QString shortcutExtraDataID() const /* override */ 1847 2690 { 1848 2691 return QString("StatisticWindow"); 1849 2692 } 1850 2693 1851 void retranslateUi() 2694 /** Handles translation event. */ 2695 virtual void retranslateUi() /* override */ 1852 2696 { 1853 2697 setName(QApplication::translate("UIActionPool", "&Statistics...", "debug action")); … … 1855 2699 }; 1856 2700 2701 /** Simple action extension, used as 'Show Command Line' action class. */ 1857 2702 class UIActionSimpleShowCommandLine : public UIActionSimple 1858 2703 { … … 1861 2706 public: 1862 2707 2708 /** Constructs action passing @a pParent to the base-class. */ 1863 2709 UIActionSimpleShowCommandLine(UIActionPool *pParent) 1864 : UIActionSimple(pParent) {} 1865 1866 protected: 1867 1868 /** Returns action extra-data ID. */ 1869 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine; } 1870 /** Returns action extra-data key. */ 1871 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); } 1872 /** Returns whether action is allowed. */ 1873 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); } 1874 1875 QString shortcutExtraDataID() const 2710 : UIActionSimple(pParent) 2711 {} 2712 2713 protected: 2714 2715 /** Returns action extra-data ID. */ 2716 virtual int extraDataID() const /* override */ 2717 { 2718 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine; 2719 } 2720 /** Returns action extra-data key. */ 2721 virtual QString extraDataKey() const /* override */ 2722 { 2723 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); 2724 } 2725 /** Returns whether action is allowed. */ 2726 virtual bool isAllowed() const /* override */ 2727 { 2728 return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine); 2729 } 2730 2731 /** Returns shortcut extra-data ID. */ 2732 virtual QString shortcutExtraDataID() const /* override */ 1876 2733 { 1877 2734 return QString("CommandLineWindow"); 1878 2735 } 1879 2736 1880 void retranslateUi() 2737 /** Handles translation event. */ 2738 virtual void retranslateUi() /* override */ 1881 2739 { 1882 2740 setName(QApplication::translate("UIActionPool", "&Command Line...", "debug action")); … … 1884 2742 }; 1885 2743 2744 /** Toggle action extension, used as 'Logging' action class. */ 1886 2745 class UIActionToggleLogging : public UIActionToggle 1887 2746 { … … 1890 2749 public: 1891 2750 2751 /** Constructs action passing @a pParent to the base-class. */ 1892 2752 UIActionToggleLogging(UIActionPool *pParent) 1893 : UIActionToggle(pParent) {} 1894 1895 protected: 1896 1897 /** Returns action extra-data ID. */ 1898 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging; } 1899 /** Returns action extra-data key. */ 1900 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); } 1901 /** Returns whether action is allowed. */ 1902 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); } 1903 1904 QString shortcutExtraDataID() const 2753 : UIActionToggle(pParent) 2754 {} 2755 2756 protected: 2757 2758 /** Returns action extra-data ID. */ 2759 virtual int extraDataID() const /* override */ 2760 { 2761 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging; 2762 } 2763 /** Returns action extra-data key. */ 2764 virtual QString extraDataKey() const /* override */ 2765 { 2766 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); 2767 } 2768 /** Returns whether action is allowed. */ 2769 virtual bool isAllowed() const /* override */ 2770 { 2771 return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging); 2772 } 2773 2774 /** Returns shortcut extra-data ID. */ 2775 virtual QString shortcutExtraDataID() const /* override */ 1905 2776 { 1906 2777 return QString("Logging"); 1907 2778 } 1908 2779 1909 void retranslateUi() 2780 /** Handles translation event. */ 2781 virtual void retranslateUi() /* override */ 1910 2782 { 1911 2783 setName(QApplication::translate("UIActionPool", "&Logging", "debug action")); … … 1913 2785 }; 1914 2786 2787 /** Simple action extension, used as 'Show Log Dialog' action class. */ 1915 2788 class UIActionSimpleShowLogDialog : public UIActionSimple 1916 2789 { … … 1919 2792 public: 1920 2793 2794 /** Constructs action passing @a pParent to the base-class. */ 1921 2795 UIActionSimpleShowLogDialog(UIActionPool *pParent) 1922 : UIActionSimple(pParent) {} 1923 1924 protected: 1925 1926 /** Returns action extra-data ID. */ 1927 virtual int extraDataID() const { return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog; } 1928 /** Returns action extra-data key. */ 1929 virtual QString extraDataKey() const { return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); } 1930 /** Returns whether action is allowed. */ 1931 virtual bool isAllowed() const { return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); } 1932 1933 QString shortcutExtraDataID() const 2796 : UIActionSimple(pParent) 2797 {} 2798 2799 protected: 2800 2801 /** Returns action extra-data ID. */ 2802 virtual int extraDataID() const /* override */ 2803 { 2804 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog; 2805 } 2806 /** Returns action extra-data key. */ 2807 virtual QString extraDataKey() const /* override */ 2808 { 2809 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); 2810 } 2811 /** Returns whether action is allowed. */ 2812 virtual bool isAllowed() const /* override */ 2813 { 2814 return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog); 2815 } 2816 2817 /** Returns shortcut extra-data ID. */ 2818 virtual QString shortcutExtraDataID() const /* override */ 1934 2819 { 1935 2820 return QString("LogWindow"); 1936 2821 } 1937 2822 1938 void retranslateUi() 2823 /** Handles translation event. */ 2824 virtual void retranslateUi() /* override */ 1939 2825 { 1940 2826 setName(QApplication::translate("UIActionPool", "Show &Log...", "debug action")); … … 1943 2829 #endif /* VBOX_WITH_DEBUGGER_GUI */ 1944 2830 1945 #ifdef RT_OS_DARWIN 2831 #ifdef VBOX_WS_MAC 2832 /** macOS: Menu action extension, used as 'Dock' menu class. */ 1946 2833 class UIActionMenuDock : public UIActionMenu 1947 2834 { … … 1950 2837 public: 1951 2838 2839 /** Constructs action passing @a pParent to the base-class. */ 1952 2840 UIActionMenuDock(UIActionPool *pParent) 1953 : UIActionMenu(pParent) {} 1954 1955 protected: 1956 1957 void retranslateUi() {} 1958 }; 1959 2841 : UIActionMenu(pParent) 2842 {} 2843 2844 protected: 2845 2846 /** Handles translation event. */ 2847 virtual void retranslateUi() /* override */ {} 2848 }; 2849 2850 /** macOS: Menu action extension, used as 'Dock Settings' menu class. */ 1960 2851 class UIActionMenuDockSettings : public UIActionMenu 1961 2852 { … … 1964 2855 public: 1965 2856 2857 /** Constructs action passing @a pParent to the base-class. */ 1966 2858 UIActionMenuDockSettings(UIActionPool *pParent) 1967 : UIActionMenu(pParent) {} 1968 1969 protected: 1970 1971 void retranslateUi() 2859 : UIActionMenu(pParent) 2860 {} 2861 2862 protected: 2863 2864 /** Handles translation event. */ 2865 virtual void retranslateUi() /* override */ 1972 2866 { 1973 2867 setName(QApplication::translate("UIActionPool", "Dock Icon")); … … 1975 2869 }; 1976 2870 2871 /** macOS: Toggle action extension, used as 'Dock Preview Monitor' action class. */ 1977 2872 class UIActionToggleDockPreviewMonitor : public UIActionToggle 1978 2873 { … … 1981 2876 public: 1982 2877 2878 /** Constructs action passing @a pParent to the base-class. */ 1983 2879 UIActionToggleDockPreviewMonitor(UIActionPool *pParent) 1984 : UIActionToggle(pParent) {} 1985 1986 protected: 1987 1988 QString shortcutExtraDataID() const 2880 : UIActionToggle(pParent) 2881 {} 2882 2883 protected: 2884 2885 /** Returns shortcut extra-data ID. */ 2886 virtual QString shortcutExtraDataID() const /* override */ 1989 2887 { 1990 2888 return QString("DockPreviewMonitor"); 1991 2889 } 1992 2890 1993 void retranslateUi() 2891 /** Handles translation event. */ 2892 virtual void retranslateUi() /* override */ 1994 2893 { 1995 2894 setName(QApplication::translate("UIActionPool", "Show Monitor Preview")); … … 1997 2896 }; 1998 2897 2898 /** macOS: Toggle action extension, used as 'Dock Disable Monitor' action class. */ 1999 2899 class UIActionToggleDockDisableMonitor : public UIActionToggle 2000 2900 { … … 2003 2903 public: 2004 2904 2905 /** Constructs action passing @a pParent to the base-class. */ 2005 2906 UIActionToggleDockDisableMonitor(UIActionPool *pParent) 2006 : UIActionToggle(pParent) {} 2007 2008 protected: 2009 2010 QString shortcutExtraDataID() const 2907 : UIActionToggle(pParent) 2908 {} 2909 2910 protected: 2911 2912 /** Returns shortcut extra-data ID. */ 2913 virtual QString shortcutExtraDataID() const /* override */ 2011 2914 { 2012 2915 return QString("DockDisableMonitor"); 2013 2916 } 2014 2917 2015 void retranslateUi() 2918 /** Handles translation event. */ 2919 virtual void retranslateUi() /* override */ 2016 2920 { 2017 2921 setName(QApplication::translate("UIActionPool", "Show Application Icon")); … … 2019 2923 }; 2020 2924 2925 /** macOS: Toggle action extension, used as 'Dock Icon Disable Overlay' action class. */ 2021 2926 class UIActionToggleDockIconDisableOverlay : public UIActionToggle 2022 2927 { … … 2025 2930 public: 2026 2931 2932 /** Constructs action passing @a pParent to the base-class. */ 2027 2933 UIActionToggleDockIconDisableOverlay(UIActionPool *pParent) 2028 : UIActionToggle(pParent) {} 2029 2030 protected: 2031 2032 QString shortcutExtraDataID() const 2934 : UIActionToggle(pParent) 2935 {} 2936 2937 protected: 2938 2939 /** Returns shortcut extra-data ID. */ 2940 virtual QString shortcutExtraDataID() const /* override */ 2033 2941 { 2034 2942 return QString("DockOverlayDisable"); 2035 2943 } 2036 2944 2037 void retranslateUi() 2945 /** Handles translation event. */ 2946 virtual void retranslateUi() /* override */ 2038 2947 { 2039 2948 setName(QApplication::translate("UIActionPool", "Disable Dock Icon Overlay")); … … 2041 2950 }; 2042 2951 #endif /* VBOX_WS_MAC */ 2952 2953 2954 /********************************************************************************************************************************* 2955 * Class UIActionPoolRuntime implementation. * 2956 *********************************************************************************************************************************/ 2043 2957 2044 2958 UIActionPoolRuntime::UIActionPoolRuntime(bool fTemporary /* = false */) … … 2251 3165 m_pool[UIActionIndexRT_M_View_T_Fullscreen] = new UIActionToggleFullscreenMode(this); 2252 3166 m_pool[UIActionIndexRT_M_View_T_Seamless] = new UIActionToggleSeamlessMode(this); 2253 m_pool[UIActionIndexRT_M_View_T_Scale] = new UIActionToggleScale Mode(this);2254 #ifndef RT_OS_DARWIN3167 m_pool[UIActionIndexRT_M_View_T_Scale] = new UIActionToggleScaledMode(this); 3168 #ifndef VBOX_WS_MAC 2255 3169 m_pool[UIActionIndexRT_M_View_S_MinimizeWindow] = new UIActionSimplePerformMinimizeWindow(this); 2256 #endif /* ! RT_OS_DARWIN*/3170 #endif /* !VBOX_WS_MAC */ 2257 3171 m_pool[UIActionIndexRT_M_View_S_AdjustWindow] = new UIActionSimplePerformWindowAdjust(this); 2258 3172 m_pool[UIActionIndexRT_M_View_T_GuestAutoresize] = new UIActionToggleGuestAutoresize(this); … … 2264 3178 m_pool[UIActionIndexRT_M_View_M_MenuBar] = new UIActionMenuMenuBar(this); 2265 3179 m_pool[UIActionIndexRT_M_View_M_MenuBar_S_Settings] = new UIActionSimpleShowMenuBarSettingsWindow(this); 2266 #ifndef RT_OS_DARWIN3180 #ifndef VBOX_WS_MAC 2267 3181 m_pool[UIActionIndexRT_M_View_M_MenuBar_T_Visibility] = new UIActionToggleMenuBar(this); 2268 #endif /* ! RT_OS_DARWIN*/3182 #endif /* !VBOX_WS_MAC */ 2269 3183 m_pool[UIActionIndexRT_M_View_M_StatusBar] = new UIActionMenuStatusBar(this); 2270 3184 m_pool[UIActionIndexRT_M_View_M_StatusBar_S_Settings] = new UIActionSimpleShowStatusBarSettingsWindow(this); … … 2275 3189 m_pool[UIActionIndexRT_M_Input] = new UIActionMenuInput(this); 2276 3190 m_pool[UIActionIndexRT_M_Input_M_Keyboard] = new UIActionMenuKeyboard(this); 2277 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_Settings] = new UIActionSimple KeyboardSettings(this);3191 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_Settings] = new UIActionSimpleShowKeyboardSettingsDialog(this); 2278 3192 m_pool[UIActionIndexRT_M_Input_M_Keyboard_S_TypeCAD] = new UIActionSimplePerformTypeCAD(this); 2279 3193 #ifdef VBOX_WS_X11 … … 2500 3414 addMenu(m_mainMenus, action(UIActionIndexRT_M_Debug), vboxGlobal().isDebuggerEnabled()); 2501 3415 updateMenuDebug(); 2502 #endif /* VBOX_WITH_DEBUGGER_GUI */2503 2504 #ifdef RT_OS_DARWIN3416 #endif 3417 3418 #ifdef VBOX_WS_MAC 2505 3419 /* 'Window' menu: */ 2506 3420 addMenu(m_mainMenus, action(UIActionIndex_M_Window)); 2507 3421 updateMenuWindow(); 2508 #endif /* RT_OS_DARWIN */3422 #endif 2509 3423 2510 3424 /* 'Help' menu: */ … … 2758 3672 /* 'Toggle Menu Bar' action: */ 2759 3673 addAction(pMenu, action(UIActionIndexRT_M_View_M_MenuBar_T_Visibility)); 2760 #endif /* !VBOX_WS_MAC */3674 #endif 2761 3675 2762 3676 /* Mark menu as valid: */ … … 3035 3949 /* 'Type CABS' action: */ 3036 3950 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS)) || fSeparator; 3037 #endif /* VBOX_WS_X11 */3951 #endif 3038 3952 /* 'Type Ctrl-Break' action: */ 3039 3953 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Input_M_Keyboard_S_TypeCtrlBreak)) || fSeparator; … … 3255 4169 } 3256 4170 4171 3257 4172 #include "UIActionPoolRuntime.moc" 3258 4173 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r71615 r71616 5 5 6 6 /* 7 * Copyright (C) 2010-201 7Oracle Corporation7 * Copyright (C) 2010-2018 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 20 20 21 21 /* Qt includes: */ 22 #include <QList> 22 23 #include <QMap> 23 #include <QList>24 24 25 25 /* GUI includes: */ … … 58 58 UIActionIndexRT_M_View_T_Seamless, 59 59 UIActionIndexRT_M_View_T_Scale, 60 #ifndef RT_OS_DARWIN60 #ifndef VBOX_WS_MAC 61 61 UIActionIndexRT_M_View_S_MinimizeWindow, 62 #endif /* !RT_OS_DARWIN */62 #endif 63 63 UIActionIndexRT_M_View_S_AdjustWindow, 64 64 UIActionIndexRT_M_View_T_GuestAutoresize, … … 70 70 UIActionIndexRT_M_View_M_MenuBar, 71 71 UIActionIndexRT_M_View_M_MenuBar_S_Settings, 72 #ifndef RT_OS_DARWIN72 #ifndef VBOX_WS_MAC 73 73 UIActionIndexRT_M_View_M_MenuBar_T_Visibility, 74 #endif /* !RT_OS_DARWIN */74 #endif 75 75 UIActionIndexRT_M_View_M_StatusBar, 76 76 UIActionIndexRT_M_View_M_StatusBar_S_Settings, … … 85 85 #ifdef VBOX_WS_X11 86 86 UIActionIndexRT_M_Input_M_Keyboard_S_TypeCABS, 87 #endif /* VBOX_WS_X11 */87 #endif 88 88 UIActionIndexRT_M_Input_M_Keyboard_S_TypeCtrlBreak, 89 89 UIActionIndexRT_M_Input_M_Keyboard_S_TypeInsert, … … 120 120 UIActionIndexRT_M_Debug_T_Logging, 121 121 UIActionIndexRT_M_Debug_S_ShowLogDialog, 122 #endif /* VBOX_WITH_DEBUGGER_GUI */122 #endif 123 123 124 124 #ifdef VBOX_WS_MAC … … 129 129 UIActionIndexRT_M_Dock_M_DockSettings_T_DisableMonitor, 130 130 UIActionIndexRT_M_Dock_M_DockSettings_T_DisableOverlay, 131 #endif /* VBOX_WS_MAC */131 #endif 132 132 133 133 /* Maximum index: */ 134 134 UIActionIndexRT_Max 135 135 }; 136 136 137 137 138 /** UIActionPool extension … … 193 194 /** Defines 'Debug' menu @a restriction for passed @a level. */ 194 195 void setRestrictionForMenuDebugger(UIActionRestrictionLevel level, UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType restriction); 195 #endif /* VBOX_WITH_DEBUGGER_GUI */196 #endif 196 197 197 198 protected slots: … … 203 204 void sltHandleActionTriggerViewScaleFactor(QAction *pAction); 204 205 205 /** Prepare 'View' : 'Virtual Screen #' menu routine(Normal, Scale). */206 /** Prepares 'View' : 'Virtual Screen #' menu (Normal, Scale). */ 206 207 void sltPrepareMenuViewScreen(); 207 /** Prepare 'View' : 'Virtual Screen #' menu routine(Fullscreen, Seamless). */208 /** Prepares 'View' : 'Virtual Screen #' menu (Fullscreen, Seamless). */ 208 209 void sltPrepareMenuViewMultiscreen(); 209 210 … … 217 218 protected: 218 219 219 /** Construct or,220 * @param fTemporary is used to determinewhether this action-pool is temporary,221 * which can be created to re-initialize shortcuts-pool. */220 /** Constructs action-pool. 221 * @param fTemporary Brings whether this action-pool is temporary, 222 * used to (re-)initialize shortcuts-pool. */ 222 223 UIActionPoolRuntime(bool fTemporary = false); 223 224 224 /** Prepare pool routine. */225 /** Prepares pool. */ 225 226 virtual void preparePool(); 226 /** Prepare connections routine. */227 /** Prepares connections. */ 227 228 virtual void prepareConnections(); 228 229 229 /** Update configuration routine. */230 /** Updates configuration. */ 230 231 virtual void updateConfiguration(); 231 232 232 /** Update menu routine. */233 /** Updates menu. */ 233 234 void updateMenu(int iIndex); 234 /** Update menus routine. */235 /** Updates menus. */ 235 236 void updateMenus(); 236 /** Update 'Machine' menu routine. */237 /** Updates 'Machine' menu. */ 237 238 void updateMenuMachine(); 238 /** Update 'View' menu routine. */239 /** Updates 'View' menu. */ 239 240 void updateMenuView(); 240 /** Update 'View' : 'Popup' menu routine. */241 /** Updates 'View' : 'Popup' menu. */ 241 242 void updateMenuViewPopup(); 242 /** Update 'View' : 'Video Capture' menu routine. */243 /** Updates 'View' : 'Video Capture' menu. */ 243 244 void updateMenuViewVideoCapture(); 244 /** Update 'View' : 'Menu Bar' menu routine. */245 /** Updates 'View' : 'Menu Bar' menu. */ 245 246 void updateMenuViewMenuBar(); 246 /** Update 'View' : 'Status Bar' menu routine. */247 /** Updates 'View' : 'Status Bar' menu. */ 247 248 void updateMenuViewStatusBar(); 248 /** Update 'View' : 'Scale Factor' menu routine. */249 /** Updates 'View' : 'Scale Factor' menu. */ 249 250 void updateMenuViewScaleFactor(); 250 /** Update 'View' : 'Virtual Screen #' @a pMenu routine(Normal, Scale). */251 /** Updates 'View' : 'Virtual Screen #' @a pMenu (Normal, Scale). */ 251 252 void updateMenuViewScreen(QMenu *pMenu); 252 /** Update 'View' : 'Virtual Screen #' @a pMenu routine(Fullscreen, Seamless). */253 /** Updates 'View' : 'Virtual Screen #' @a pMenu (Fullscreen, Seamless). */ 253 254 void updateMenuViewMultiscreen(QMenu *pMenu); 254 /** Update 'Input' menu routine. */255 /** Updates 'Input' menu. */ 255 256 void updateMenuInput(); 256 /** Update 'Input' : 'Keyboard' menu routine. */257 /** Updates 'Input' : 'Keyboard' menu. */ 257 258 void updateMenuInputKeyboard(); 258 /** Update 'Input' : 'Mouse' menu routine. */259 /** Updates 'Input' : 'Mouse' menu. */ 259 260 void updateMenuInputMouse(); 260 /** Update 'Devices' menu routine. */261 /** Updates 'Devices' menu. */ 261 262 void updateMenuDevices(); 262 /** Update 'Devices' : 'Hard Drives' menu routine. */263 /** Updates 'Devices' : 'Hard Drives' menu. */ 263 264 void updateMenuDevicesHardDrives(); 264 /** Update 'Devices' : 'Audio' menu routine. */265 /** Updates 'Devices' : 'Audio' menu. */ 265 266 void updateMenuDevicesAudio(); 266 /** Update 'Devices' : 'Network' menu routine. */267 /** Updates 'Devices' : 'Network' menu. */ 267 268 void updateMenuDevicesNetwork(); 268 /** Update 'Devices' : 'USB' menu routine. */269 /** Updates 'Devices' : 'USB' menu. */ 269 270 void updateMenuDevicesUSBDevices(); 270 /** Update 'Devices' : 'Shared Folders' menu routine. */271 /** Updates 'Devices' : 'Shared Folders' menu. */ 271 272 void updateMenuDevicesSharedFolders(); 272 273 #ifdef VBOX_WITH_DEBUGGER_GUI 273 /** Update 'Debug' menu routine. */274 /** Updates 'Debug' menu. */ 274 275 void updateMenuDebug(); 275 #endif /* VBOX_WITH_DEBUGGER_GUI */276 277 /** Update shortcuts. */276 #endif 277 278 /** Updates shortcuts. */ 278 279 virtual void updateShortcuts(); 279 280 … … 287 288 288 289 /** Holds the host-screen count. */ 289 int m_cHostScreens;290 int m_cHostScreens; 290 291 /** Holds the guest-screen count. */ 291 int m_cGuestScreens;292 int m_cGuestScreens; 292 293 293 294 /** Holds the map of guest-screen sizes. */ 294 QMap<int, QSize> m_mapGuestScreenSize;295 QMap<int, QSize> m_mapGuestScreenSize; 295 296 /** Holds the map of guest-screen visibility states. */ 296 QMap<int, bool> m_mapGuestScreenIsVisible;297 QMap<int, bool> m_mapGuestScreenIsVisible; 297 298 298 299 /** Holds whether guest supports graphics. */ 299 bool m_fGuestSupportsGraphics;300 bool m_fGuestSupportsGraphics; 300 301 301 302 /** Holds the host-to-guest mapping scheme. */ … … 303 304 304 305 /** Holds the list of Runtime UI main menus. */ 305 QList<QMenu*> m_mainMenus;306 QList<QMenu*> m_mainMenus; 306 307 307 308 /** Holds restricted action types of the Machine menu. */ 308 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuMachineActionType> m_restrictedActionsMenuMachine;309 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuMachineActionType> m_restrictedActionsMenuMachine; 309 310 /** Holds restricted action types of the View menu. */ 310 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuViewActionType> m_restrictedActionsMenuView;311 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuViewActionType> m_restrictedActionsMenuView; 311 312 /** Holds restricted action types of the Input menu. */ 312 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuInputActionType> m_restrictedActionsMenuInput;313 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuInputActionType> m_restrictedActionsMenuInput; 313 314 /** Holds restricted action types of the Devices menu. */ 314 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuDevicesActionType> m_restrictedActionsMenuDevices;315 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuDevicesActionType> m_restrictedActionsMenuDevices; 315 316 #ifdef VBOX_WITH_DEBUGGER_GUI 316 317 /** Holds restricted action types of the Debugger menu. */ 317 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType> m_restrictedActionsMenuDebug;318 #endif /* VBOX_WITH_DEBUGGER_GUI */319 320 /* Enable factory in base-class:*/318 QMap<UIActionRestrictionLevel, UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType> m_restrictedActionsMenuDebug; 319 #endif 320 321 /** Enables factory in base-class. */ 321 322 friend class UIActionPool; 322 323 }; 323 324 325 324 326 #endif /* !___UIActionPoolRuntime_h___ */ 327
Note:
See TracChangeset
for help on using the changeset viewer.