Changeset 71621 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 2, 2018 5:32:27 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r71027 r71621 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 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 21 21 22 /* Localincludes: */22 /* GUI includes: */ 23 23 # include "UIActionPoolSelector.h" 24 24 # include "UIExtraDataDefs.h" … … 37 37 38 38 39 class UIActionMenuFile : public UIActionMenu 40 { 41 Q_OBJECT; 42 43 public: 44 45 UIActionMenuFile(UIActionPool *pParent) 46 : UIActionMenu(pParent) {} 47 48 protected: 49 50 void retranslateUi() 39 /** Menu action extension, used as 'File' menu class. */ 40 class UIActionMenuSelectorFile : public UIActionMenu 41 { 42 Q_OBJECT; 43 44 public: 45 46 /** Constructs action passing @a pParent to the base-class. */ 47 UIActionMenuSelectorFile(UIActionPool *pParent) 48 : UIActionMenu(pParent) 49 {} 50 51 protected: 52 53 /** Handles translation event. */ 54 virtual void retranslateUi() /* override */ 51 55 { 52 56 #ifdef VBOX_WS_MAC … … 58 62 }; 59 63 60 class UIActionSimpleVirtualMediumManagerDialog : public UIActionSimple 61 { 62 Q_OBJECT; 63 64 public: 65 66 UIActionSimpleVirtualMediumManagerDialog(UIActionPool *pParent) 67 : UIActionSimple(pParent, ":/diskimage_16px.png") {} 68 69 protected: 70 71 QString shortcutExtraDataID() const 64 /** Simple action extension, used as 'Show Virtual Media Manager' action class. */ 65 class UIActionSimpleSelectorShowVirtualMediaManager : public UIActionSimple 66 { 67 Q_OBJECT; 68 69 public: 70 71 /** Constructs action passing @a pParent to the base-class. */ 72 UIActionSimpleSelectorShowVirtualMediaManager(UIActionPool *pParent) 73 : UIActionSimple(pParent, ":/diskimage_16px.png") 74 {} 75 76 protected: 77 78 /** Returns shortcut extra-data ID. */ 79 virtual QString shortcutExtraDataID() const /* override */ 72 80 { 73 81 return QString("VirtualMediaManager"); 74 82 } 75 83 76 QKeySequence defaultShortcut(UIActionPoolType) const 84 /** Returns default shortcut. */ 85 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 77 86 { 78 87 return QKeySequence("Ctrl+D"); 79 88 } 80 89 81 void retranslateUi() 90 /** Handles translation event. */ 91 virtual void retranslateUi() /* override */ 82 92 { 83 93 setName(QApplication::translate("UIActionPool", "&Virtual Media Manager...")); … … 86 96 }; 87 97 88 class UIActionSimpleHostNetworkManagerDialog : public UIActionSimple 89 { 90 Q_OBJECT; 91 92 public: 93 94 UIActionSimpleHostNetworkManagerDialog(UIActionPool *pParent) 95 : UIActionSimple(pParent, ":/host_iface_manager_16px.png") {} 96 97 protected: 98 99 QString shortcutExtraDataID() const 98 /** Simple action extension, used as 'Show Host Network Manager' action class. */ 99 class UIActionSimpleSelectorShowHostNetworkManager : public UIActionSimple 100 { 101 Q_OBJECT; 102 103 public: 104 105 /** Constructs action passing @a pParent to the base-class. */ 106 UIActionSimpleSelectorShowHostNetworkManager(UIActionPool *pParent) 107 : UIActionSimple(pParent, ":/host_iface_manager_16px.png") 108 {} 109 110 protected: 111 112 /** Returns shortcut extra-data ID. */ 113 virtual QString shortcutExtraDataID() const /* override */ 100 114 { 101 115 return QString("HostNetworkManager"); 102 116 } 103 117 104 QKeySequence defaultShortcut(UIActionPoolType) const 118 /** Returns default shortcut. */ 119 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 105 120 { 106 121 return QKeySequence("Ctrl+W"); 107 122 } 108 123 109 void retranslateUi() 124 /** Handles translation event. */ 125 virtual void retranslateUi() /* override */ 110 126 { 111 127 setName(QApplication::translate("UIActionPool", "&Host Network Manager...")); … … 114 130 }; 115 131 116 class UIActionSimpleImportApplianceWizard : public UIActionSimple 117 { 118 Q_OBJECT; 119 120 public: 121 122 UIActionSimpleImportApplianceWizard(UIActionPool *pParent) 123 : UIActionSimple(pParent, ":/import_16px.png") {} 124 125 protected: 126 127 QString shortcutExtraDataID() const 132 /** Simple action extension, used as 'Show Import Appliance Wizard' action class. */ 133 class UIActionSimpleSelectorShowImportApplianceWizard : public UIActionSimple 134 { 135 Q_OBJECT; 136 137 public: 138 139 /** Constructs action passing @a pParent to the base-class. */ 140 UIActionSimpleSelectorShowImportApplianceWizard(UIActionPool *pParent) 141 : UIActionSimple(pParent, ":/import_16px.png") 142 {} 143 144 protected: 145 146 /** Returns shortcut extra-data ID. */ 147 virtual QString shortcutExtraDataID() const /* override */ 128 148 { 129 149 return QString("ImportAppliance"); 130 150 } 131 151 132 QKeySequence defaultShortcut(UIActionPoolType) const 152 /** Returns default shortcut. */ 153 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 133 154 { 134 155 return QKeySequence("Ctrl+I"); 135 156 } 136 157 137 void retranslateUi() 158 /** Handles translation event. */ 159 virtual void retranslateUi() /* override */ 138 160 { 139 161 setName(QApplication::translate("UIActionPool", "&Import Appliance...")); … … 142 164 }; 143 165 144 class UIActionSimpleExportApplianceWizard : public UIActionSimple 145 { 146 Q_OBJECT; 147 148 public: 149 150 UIActionSimpleExportApplianceWizard(UIActionPool *pParent) 151 : UIActionSimple(pParent, ":/export_16px.png") {} 152 153 protected: 154 155 QString shortcutExtraDataID() const 166 /** Simple action extension, used as 'Show Export Appliance Wizard' action class. */ 167 class UIActionSimpleSelectorShowExportApplianceWizard : public UIActionSimple 168 { 169 Q_OBJECT; 170 171 public: 172 173 /** Constructs action passing @a pParent to the base-class. */ 174 UIActionSimpleSelectorShowExportApplianceWizard(UIActionPool *pParent) 175 : UIActionSimple(pParent, ":/export_16px.png") 176 {} 177 178 protected: 179 180 /** Returns shortcut extra-data ID. */ 181 virtual QString shortcutExtraDataID() const /* override */ 156 182 { 157 183 return QString("ExportAppliance"); 158 184 } 159 185 160 QKeySequence defaultShortcut(UIActionPoolType) const 186 /** Returns default shortcut. */ 187 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 161 188 { 162 189 return QKeySequence("Ctrl+E"); 163 190 } 164 191 165 void retranslateUi() 192 /** Handles translation event. */ 193 virtual void retranslateUi() /* override */ 166 194 { 167 195 setName(QApplication::translate("UIActionPool", "&Export Appliance...")); … … 171 199 172 200 #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI 173 class UIActionSimpleExtraDataManagerWindow : public UIActionSimple 174 { 175 Q_OBJECT; 176 177 public: 178 179 UIActionSimpleExtraDataManagerWindow(UIActionPool *pParent) 180 : UIActionSimple(pParent, ":/edataman_16px.png") {} 181 182 protected: 183 184 QString shortcutExtraDataID() const 201 /** Simple action extension, used as 'Show Extra-data Manager' action class. */ 202 class UIActionSimpleSelectorShowExtraDataManager : public UIActionSimple 203 { 204 Q_OBJECT; 205 206 public: 207 208 /** Constructs action passing @a pParent to the base-class. */ 209 UIActionSimpleSelectorShowExtraDataManager(UIActionPool *pParent) 210 : UIActionSimple(pParent, ":/edataman_16px.png") 211 {} 212 213 protected: 214 215 /** Returns shortcut extra-data ID. */ 216 virtual QString shortcutExtraDataID() const /* override */ 185 217 { 186 218 return QString("ExtraDataManager"); 187 219 } 188 220 189 QKeySequence defaultShortcut(UIActionPoolType) const 221 /** Returns default shortcut. */ 222 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 190 223 { 191 224 return QKeySequence("Ctrl+X"); 192 225 } 193 226 194 void retranslateUi() 227 /** Handles translation event. */ 228 virtual void retranslateUi() /* override */ 195 229 { 196 230 setName(QApplication::translate("UIActionPool", "E&xtra Data Manager...")); … … 200 234 #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */ 201 235 202 class UIActionSimpleExit : public UIActionSimple 203 { 204 Q_OBJECT; 205 206 public: 207 208 UIActionSimpleExit(UIActionPool *pParent) 236 /** Simple action extension, used as 'Perform Exit' action class. */ 237 class UIActionSimpleSelectorPerformExit : public UIActionSimple 238 { 239 Q_OBJECT; 240 241 public: 242 243 /** Constructs action passing @a pParent to the base-class. */ 244 UIActionSimpleSelectorPerformExit(UIActionPool *pParent) 209 245 : UIActionSimple(pParent, ":/exit_16px.png") 210 246 { … … 214 250 protected: 215 251 216 QString shortcutExtraDataID() const 252 /** Returns shortcut extra-data ID. */ 253 virtual QString shortcutExtraDataID() const /* override */ 217 254 { 218 255 return QString("Exit"); 219 256 } 220 257 221 QKeySequence defaultShortcut(UIActionPoolType) const 258 /** Returns default shortcut. */ 259 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 222 260 { 223 261 return QKeySequence("Ctrl+Q"); 224 262 } 225 263 226 void retranslateUi() 264 /** Handles translation event. */ 265 virtual void retranslateUi() /* override */ 227 266 { 228 267 setName(QApplication::translate("UIActionPool", "E&xit")); … … 232 271 233 272 234 class UIActionMenuGroup : public UIActionMenu 235 { 236 Q_OBJECT; 237 238 public: 239 240 UIActionMenuGroup(UIActionPool *pParent) 241 : UIActionMenu(pParent) {} 242 243 protected: 244 245 void retranslateUi() 273 /** Menu action extension, used as 'Group' menu class. */ 274 class UIActionMenuSelectorGroup : public UIActionMenu 275 { 276 Q_OBJECT; 277 278 public: 279 280 /** Constructs action passing @a pParent to the base-class. */ 281 UIActionMenuSelectorGroup(UIActionPool *pParent) 282 : UIActionMenu(pParent) 283 {} 284 285 protected: 286 287 /** Handles translation event. */ 288 virtual void retranslateUi() /* override */ 246 289 { 247 290 setName(QApplication::translate("UIActionPool", "&Group")); … … 249 292 }; 250 293 251 class UIActionSimpleGroupNew : public UIActionSimple 252 { 253 Q_OBJECT; 254 255 public: 256 257 UIActionSimpleGroupNew(UIActionPool *pParent) 258 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {} 259 260 protected: 261 262 QString shortcutExtraDataID() const 294 /** Simple action extension, used as 'New Machine' action class. */ 295 class UIActionSimpleSelectorGroupMachineNew : public UIActionSimple 296 { 297 Q_OBJECT; 298 299 public: 300 301 /** Constructs action passing @a pParent to the base-class. */ 302 UIActionSimpleSelectorGroupMachineNew(UIActionPool *pParent) 303 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 304 {} 305 306 protected: 307 308 /** Returns shortcut extra-data ID. */ 309 virtual QString shortcutExtraDataID() const /* override */ 263 310 { 264 311 return QString("NewVM"); 265 312 } 266 313 267 QKeySequence defaultShortcut(UIActionPoolType) const 314 /** Returns default shortcut. */ 315 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 268 316 { 269 317 return QKeySequence("Ctrl+N"); 270 318 } 271 319 272 void retranslateUi() 320 /** Handles translation event. */ 321 virtual void retranslateUi() /* override */ 273 322 { 274 323 setName(QApplication::translate("UIActionPool", "&New Machine...")); … … 279 328 }; 280 329 281 class UIActionSimpleGroupAdd : public UIActionSimple 282 { 283 Q_OBJECT; 284 285 public: 286 287 UIActionSimpleGroupAdd(UIActionPool *pParent) 288 : UIActionSimple(pParent, ":/vm_add_16px.png") {} 289 290 protected: 291 292 QString shortcutExtraDataID() const 330 /** Simple action extension, used as 'Add Machine' action class. */ 331 class UIActionSimpleSelectorGroupMachineAdd : public UIActionSimple 332 { 333 Q_OBJECT; 334 335 public: 336 337 /** Constructs action passing @a pParent to the base-class. */ 338 UIActionSimpleSelectorGroupMachineAdd(UIActionPool *pParent) 339 : UIActionSimple(pParent, ":/vm_add_16px.png") 340 {} 341 342 protected: 343 344 /** Returns shortcut extra-data ID. */ 345 virtual QString shortcutExtraDataID() const /* override */ 293 346 { 294 347 return QString("AddVM"); 295 348 } 296 349 297 QKeySequence defaultShortcut(UIActionPoolType) const 350 /** Returns default shortcut. */ 351 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 298 352 { 299 353 return QKeySequence("Ctrl+A"); 300 354 } 301 355 302 void retranslateUi() 356 /** Handles translation event. */ 357 virtual void retranslateUi() /* override */ 303 358 { 304 359 setName(QApplication::translate("UIActionPool", "&Add Machine...")); … … 307 362 }; 308 363 309 class UIActionSimpleGroupRename : public UIActionSimple 310 { 311 Q_OBJECT; 312 313 public: 314 315 UIActionSimpleGroupRename(UIActionPool *pParent) 316 : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png") {} 317 318 protected: 319 320 QString shortcutExtraDataID() const 364 /** Simple action extension, used as 'Rename Group' action class. */ 365 class UIActionSimpleSelectorGroupRename : public UIActionSimple 366 { 367 Q_OBJECT; 368 369 public: 370 371 /** Constructs action passing @a pParent to the base-class. */ 372 UIActionSimpleSelectorGroupRename(UIActionPool *pParent) 373 : UIActionSimple(pParent, ":/vm_group_name_16px.png", ":/vm_group_name_disabled_16px.png") 374 {} 375 376 protected: 377 378 /** Returns shortcut extra-data ID. */ 379 virtual QString shortcutExtraDataID() const /* override */ 321 380 { 322 381 return QString("RenameVMGroup"); 323 382 } 324 383 325 QKeySequence defaultShortcut(UIActionPoolType) const 384 /** Returns default shortcut. */ 385 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 326 386 { 327 387 return QKeySequence("Ctrl+M"); 328 388 } 329 389 330 void retranslateUi() 390 /** Handles translation event. */ 391 virtual void retranslateUi() /* override */ 331 392 { 332 393 setName(QApplication::translate("UIActionPool", "Rena&me Group...")); … … 335 396 }; 336 397 337 class UIActionSimpleGroupRemove : public UIActionSimple 338 { 339 Q_OBJECT; 340 341 public: 342 343 UIActionSimpleGroupRemove(UIActionPool *pParent) 344 : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png") {} 345 346 protected: 347 348 QString shortcutExtraDataID() const 398 /** Simple action extension, used as 'Remove Group' action class. */ 399 class UIActionSimpleSelectorGroupRemove : public UIActionSimple 400 { 401 Q_OBJECT; 402 403 public: 404 405 /** Constructs action passing @a pParent to the base-class. */ 406 UIActionSimpleSelectorGroupRemove(UIActionPool *pParent) 407 : UIActionSimple(pParent, ":/vm_group_remove_16px.png", ":/vm_group_remove_disabled_16px.png") 408 {} 409 410 protected: 411 412 /** Returns shortcut extra-data ID. */ 413 virtual QString shortcutExtraDataID() const /* override */ 349 414 { 350 415 return QString("AddVMGroup"); 351 416 } 352 417 353 QKeySequence defaultShortcut(UIActionPoolType) const 418 /** Returns default shortcut. */ 419 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 354 420 { 355 421 return QKeySequence("Ctrl+U"); 356 422 } 357 423 358 void retranslateUi() 424 /** Handles translation event. */ 425 virtual void retranslateUi() /* override */ 359 426 { 360 427 setName(QApplication::translate("UIActionPool", "&Ungroup")); … … 363 430 }; 364 431 365 class UIActionSimpleGroupSort : public UIActionSimple 366 { 367 Q_OBJECT; 368 369 public: 370 371 UIActionSimpleGroupSort(UIActionPool *pParent) 372 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {} 373 374 protected: 375 376 QString shortcutExtraDataID() const 432 /** Simple action extension, used as 'Sort Group' action class. */ 433 class UIActionSimpleSelectorGroupSort : public UIActionSimple 434 { 435 Q_OBJECT; 436 437 public: 438 439 /** Constructs action passing @a pParent to the base-class. */ 440 UIActionSimpleSelectorGroupSort(UIActionPool *pParent) 441 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") 442 {} 443 444 protected: 445 446 /** Returns shortcut extra-data ID. */ 447 virtual QString shortcutExtraDataID() const /* override */ 377 448 { 378 449 return QString("SortGroup"); 379 450 } 380 451 381 void retranslateUi() 452 /** Handles translation event. */ 453 virtual void retranslateUi() /* override */ 382 454 { 383 455 setName(QApplication::translate("UIActionPool", "&Sort")); … … 387 459 388 460 389 class UIActionMenuMachineSelector : public UIActionMenu 390 { 391 Q_OBJECT; 392 393 public: 394 395 UIActionMenuMachineSelector(UIActionPool *pParent) 396 : UIActionMenu(pParent) {} 397 398 protected: 399 400 void retranslateUi() 461 /** Menu action extension, used as 'Machine' menu class. */ 462 class UIActionMenuSelectorMachine : public UIActionMenu 463 { 464 Q_OBJECT; 465 466 public: 467 468 /** Constructs action passing @a pParent to the base-class. */ 469 UIActionMenuSelectorMachine(UIActionPool *pParent) 470 : UIActionMenu(pParent) 471 {} 472 473 protected: 474 475 /** Handles translation event. */ 476 virtual void retranslateUi() /* override */ 401 477 { 402 478 setName(QApplication::translate("UIActionPool", "&Machine")); … … 404 480 }; 405 481 406 class UIActionSimpleMachineNew : public UIActionSimple 407 { 408 Q_OBJECT; 409 410 public: 411 412 UIActionSimpleMachineNew(UIActionPool *pParent) 413 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") {} 414 415 protected: 416 417 QString shortcutExtraDataID() const 482 /** Simple action extension, used as 'New Machine' action class. */ 483 class UIActionSimpleSelectorMachineNew : public UIActionSimple 484 { 485 Q_OBJECT; 486 487 public: 488 489 /** Constructs action passing @a pParent to the base-class. */ 490 UIActionSimpleSelectorMachineNew(UIActionPool *pParent) 491 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 492 {} 493 494 protected: 495 496 /** Returns shortcut extra-data ID. */ 497 virtual QString shortcutExtraDataID() const /* override */ 418 498 { 419 499 return QString("NewVM"); 420 500 } 421 501 422 QKeySequence defaultShortcut(UIActionPoolType) const 502 /** Returns default shortcut. */ 503 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 423 504 { 424 505 return QKeySequence("Ctrl+N"); 425 506 } 426 507 427 void retranslateUi() 508 /** Handles translation event. */ 509 virtual void retranslateUi() /* override */ 428 510 { 429 511 setName(QApplication::translate("UIActionPool", "&New...")); … … 434 516 }; 435 517 436 class UIActionSimpleMachineAdd : public UIActionSimple 437 { 438 Q_OBJECT; 439 440 public: 441 442 UIActionSimpleMachineAdd(UIActionPool *pParent) 443 : UIActionSimple(pParent, ":/vm_add_16px.png") {} 444 445 protected: 446 447 QString shortcutExtraDataID() const 518 /** Simple action extension, used as 'Add Machine' action class. */ 519 class UIActionSimpleSelectorMachineAdd : public UIActionSimple 520 { 521 Q_OBJECT; 522 523 public: 524 525 /** Constructs action passing @a pParent to the base-class. */ 526 UIActionSimpleSelectorMachineAdd(UIActionPool *pParent) 527 : UIActionSimple(pParent, ":/vm_add_16px.png") 528 {} 529 530 protected: 531 532 /** Returns shortcut extra-data ID. */ 533 virtual QString shortcutExtraDataID() const /* override */ 448 534 { 449 535 return QString("AddVM"); 450 536 } 451 537 452 QKeySequence defaultShortcut(UIActionPoolType) const 538 /** Returns default shortcut. */ 539 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 453 540 { 454 541 return QKeySequence("Ctrl+A"); 455 542 } 456 543 457 void retranslateUi() 544 /** Handles translation event. */ 545 virtual void retranslateUi() /* override */ 458 546 { 459 547 setName(QApplication::translate("UIActionPool", "&Add...")); … … 462 550 }; 463 551 464 class UIActionSimpleMachineAddGroup : public UIActionSimple 465 { 466 Q_OBJECT; 467 468 public: 469 470 UIActionSimpleMachineAddGroup(UIActionPool *pParent) 471 : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png") {} 472 473 protected: 474 475 QString shortcutExtraDataID() const 552 /** Simple action extension, used as 'Group Machines' action class. */ 553 class UIActionSimpleSelectorMachineGroup : public UIActionSimple 554 { 555 Q_OBJECT; 556 557 public: 558 559 /** Constructs action passing @a pParent to the base-class. */ 560 UIActionSimpleSelectorMachineGroup(UIActionPool *pParent) 561 : UIActionSimple(pParent, ":/vm_group_create_16px.png", ":/vm_group_create_disabled_16px.png") 562 {} 563 564 protected: 565 566 /** Returns shortcut extra-data ID. */ 567 virtual QString shortcutExtraDataID() const /* override */ 476 568 { 477 569 return QString("AddVMGroup"); 478 570 } 479 571 480 QKeySequence defaultShortcut(UIActionPoolType) const 572 /** Returns default shortcut. */ 573 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 481 574 { 482 575 return QKeySequence("Ctrl+U"); 483 576 } 484 577 485 void retranslateUi() 578 /** Handles translation event. */ 579 virtual void retranslateUi() /* override */ 486 580 { 487 581 setName(QApplication::translate("UIActionPool", "Gro&up")); … … 490 584 }; 491 585 492 class UIActionSimpleMachineSettings : public UIActionSimple 493 { 494 Q_OBJECT; 495 496 public: 497 498 UIActionSimpleMachineSettings(UIActionPool *pParent) 586 /** Simple action extension, used as 'Show Machine Settings Dialog' action class. */ 587 class UIActionSimpleSelectorMachineShowSettings : public UIActionSimple 588 { 589 Q_OBJECT; 590 591 public: 592 593 /** Constructs action passing @a pParent to the base-class. */ 594 UIActionSimpleSelectorMachineShowSettings(UIActionPool *pParent) 499 595 : UIActionSimple(pParent, 500 596 ":/vm_settings_32px.png", ":/vm_settings_16px.png", 501 ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") {} 502 503 protected: 504 505 QString shortcutExtraDataID() const 597 ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") 598 {} 599 600 protected: 601 602 /** Returns shortcut extra-data ID. */ 603 virtual QString shortcutExtraDataID() const /* override */ 506 604 { 507 605 return QString("SettingsVM"); 508 606 } 509 607 510 QKeySequence defaultShortcut(UIActionPoolType) const 608 /** Returns default shortcut. */ 609 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 511 610 { 512 611 return QKeySequence("Ctrl+S"); 513 612 } 514 613 515 void retranslateUi() 614 /** Handles translation event. */ 615 virtual void retranslateUi() /* override */ 516 616 { 517 617 setName(QApplication::translate("UIActionPool", "&Settings...")); … … 522 622 }; 523 623 524 class UIActionSimpleMachineClone : public UIActionSimple 525 { 526 Q_OBJECT; 527 528 public: 529 530 UIActionSimpleMachineClone(UIActionPool *pParent) 531 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") {} 532 533 protected: 534 535 QString shortcutExtraDataID() const 624 /** Simple action extension, used as 'Clone Machine' action class. */ 625 class UIActionSimpleSelectorMachineClone : public UIActionSimple 626 { 627 Q_OBJECT; 628 629 public: 630 631 /** Constructs action passing @a pParent to the base-class. */ 632 UIActionSimpleSelectorMachineClone(UIActionPool *pParent) 633 : UIActionSimple(pParent, ":/vm_clone_16px.png", ":/vm_clone_disabled_16px.png") 634 {} 635 636 protected: 637 638 /** Returns shortcut extra-data ID. */ 639 virtual QString shortcutExtraDataID() const /* override */ 536 640 { 537 641 return QString("CloneVM"); 538 642 } 539 643 540 QKeySequence defaultShortcut(UIActionPoolType) const 644 /** Returns default shortcut. */ 645 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 541 646 { 542 647 return QKeySequence("Ctrl+O"); 543 648 } 544 649 545 void retranslateUi() 650 /** Handles translation event. */ 651 virtual void retranslateUi() /* override */ 546 652 { 547 653 setName(QApplication::translate("UIActionPool", "Cl&one...")); … … 550 656 }; 551 657 552 class UIActionSimpleMachineRemove : public UIActionSimple 553 { 554 Q_OBJECT; 555 556 public: 557 558 UIActionSimpleMachineRemove(UIActionPool *pParent) 658 /** Simple action extension, used as 'Remove Machine' action class. */ 659 class UIActionSimpleSelectorMachineRemove : public UIActionSimple 660 { 661 Q_OBJECT; 662 663 public: 664 665 /** Constructs action passing @a pParent to the base-class. */ 666 UIActionSimpleSelectorMachineRemove(UIActionPool *pParent) 559 667 : UIActionSimple(pParent, 560 668 ":/vm_delete_32px.png", ":/vm_delete_16px.png", 561 ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") {} 562 563 protected: 564 565 QString shortcutExtraDataID() const 669 ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") 670 {} 671 672 protected: 673 674 /** Returns shortcut extra-data ID. */ 675 virtual QString shortcutExtraDataID() const /* override */ 566 676 { 567 677 return QString("RemoveVM"); 568 678 } 569 679 570 QKeySequence defaultShortcut(UIActionPoolType) const 680 /** Returns default shortcut. */ 681 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 571 682 { 572 683 return QKeySequence("Ctrl+R"); 573 684 } 574 685 575 void retranslateUi() 686 /** Handles translation event. */ 687 virtual void retranslateUi() /* override */ 576 688 { 577 689 setName(QApplication::translate("UIActionPool", "&Remove...")); … … 580 692 }; 581 693 582 583 class UIActionStateCommonStartOrShow : public UIActionPolymorphicMenu 584 { 585 Q_OBJECT; 586 587 public: 588 589 UIActionStateCommonStartOrShow(UIActionPool *pParent) 694 /** Simple action extension, used as 'Sort Parent' action class. */ 695 class UIActionSimpleSelectorMachineSortParent : public UIActionSimple 696 { 697 Q_OBJECT; 698 699 public: 700 701 /** Constructs action passing @a pParent to the base-class. */ 702 UIActionSimpleSelectorMachineSortParent(UIActionPool *pParent) 703 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") 704 {} 705 706 protected: 707 708 /** Returns shortcut extra-data ID. */ 709 virtual QString shortcutExtraDataID() const /* override */ 710 { 711 return QString("SortGroup"); 712 } 713 714 /** Handles translation event. */ 715 virtual void retranslateUi() /* override */ 716 { 717 setName(QApplication::translate("UIActionPool", "&Sort")); 718 setStatusTip(QApplication::translate("UIActionPool", "Sort group of first selected virtual machine alphabetically")); 719 } 720 }; 721 722 723 /** Menu action extension, used as 'Start or Show' menu class. */ 724 class UIActionStateSelectorCommonStartOrShow : public UIActionPolymorphicMenu 725 { 726 Q_OBJECT; 727 728 public: 729 730 /** Constructs action passing @a pParent to the base-class. */ 731 UIActionStateSelectorCommonStartOrShow(UIActionPool *pParent) 590 732 : UIActionPolymorphicMenu(pParent, 591 733 ":/vm_start_32px.png", ":/vm_start_16px.png", 592 ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") {} 593 594 protected: 595 596 QString shortcutExtraDataID() const 734 ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") 735 {} 736 737 protected: 738 739 /** Returns shortcut extra-data ID. */ 740 virtual QString shortcutExtraDataID() const /* override */ 597 741 { 598 742 return QString("StartVM"); 599 743 } 600 744 601 void retranslateUi() 745 /** Handles translation event. */ 746 virtual void retranslateUi() /* override */ 602 747 { 603 748 switch (state()) … … 627 772 }; 628 773 629 class UIActionSimpleStartNormal : public UIActionSimple 630 { 631 Q_OBJECT; 632 633 public: 634 635 UIActionSimpleStartNormal(UIActionPool *pParent) 636 : UIActionSimple(pParent, ":/vm_start_16px.png") {} 637 638 protected: 639 640 QString shortcutExtraDataID() const 774 /** Simple action extension, used as 'Start Normal' action class. */ 775 class UIActionSimpleSelectorCommonStartNormal : public UIActionSimple 776 { 777 Q_OBJECT; 778 779 public: 780 781 /** Constructs action passing @a pParent to the base-class. */ 782 UIActionSimpleSelectorCommonStartNormal(UIActionPool *pParent) 783 : UIActionSimple(pParent, ":/vm_start_16px.png") 784 {} 785 786 protected: 787 788 /** Returns shortcut extra-data ID. */ 789 virtual QString shortcutExtraDataID() const /* override */ 641 790 { 642 791 return QString("StartVMNormal"); 643 792 } 644 793 645 void retranslateUi() 794 /** Handles translation event. */ 795 virtual void retranslateUi() /* override */ 646 796 { 647 797 setName(QApplication::translate("UIActionPool", "&Normal Start")); … … 650 800 }; 651 801 652 class UIActionSimpleStartHeadless : public UIActionSimple 653 { 654 Q_OBJECT; 655 656 public: 657 658 UIActionSimpleStartHeadless(UIActionPool *pParent) 659 : UIActionSimple(pParent, ":/vm_start_headless_16px.png") {} 660 661 protected: 662 663 QString shortcutExtraDataID() const 802 /** Simple action extension, used as 'Start Headless' action class. */ 803 class UIActionSimpleSelectorCommonStartHeadless : public UIActionSimple 804 { 805 Q_OBJECT; 806 807 public: 808 809 /** Constructs action passing @a pParent to the base-class. */ 810 UIActionSimpleSelectorCommonStartHeadless(UIActionPool *pParent) 811 : UIActionSimple(pParent, ":/vm_start_headless_16px.png") 812 {} 813 814 protected: 815 816 /** Returns shortcut extra-data ID. */ 817 virtual QString shortcutExtraDataID() const /* override */ 664 818 { 665 819 return QString("StartVMHeadless"); 666 820 } 667 821 668 void retranslateUi() 822 /** Handles translation event. */ 823 virtual void retranslateUi() /* override */ 669 824 { 670 825 setName(QApplication::translate("UIActionPool", "&Headless Start")); … … 673 828 }; 674 829 675 class UIActionSimpleStartDetachable : public UIActionSimple 676 { 677 Q_OBJECT; 678 679 public: 680 681 UIActionSimpleStartDetachable(UIActionPool *pParent) 682 : UIActionSimple(pParent, ":/vm_start_separate_16px.png") {} 683 684 protected: 685 686 QString shortcutExtraDataID() const 830 /** Simple action extension, used as 'Start Detachable' action class. */ 831 class UIActionSimpleSelectorCommonStartDetachable : public UIActionSimple 832 { 833 Q_OBJECT; 834 835 public: 836 837 /** Constructs action passing @a pParent to the base-class. */ 838 UIActionSimpleSelectorCommonStartDetachable(UIActionPool *pParent) 839 : UIActionSimple(pParent, ":/vm_start_separate_16px.png") 840 {} 841 842 protected: 843 844 /** Returns shortcut extra-data ID. */ 845 virtual QString shortcutExtraDataID() const /* override */ 687 846 { 688 847 return QString("StartVMDetachable"); 689 848 } 690 849 691 void retranslateUi() 850 /** Handles translation event. */ 851 virtual void retranslateUi() /* override */ 692 852 { 693 853 setName(QApplication::translate("UIActionPool", "&Detachable Start")); … … 696 856 }; 697 857 698 class UIActionToggleCommonPauseAndResume : public UIActionToggle 699 { 700 Q_OBJECT; 701 702 public: 703 704 UIActionToggleCommonPauseAndResume(UIActionPool *pParent) 858 /** Toggle action extension, used as 'Pause and Resume' action class. */ 859 class UIActionToggleSelectorCommonPauseAndResume : public UIActionToggle 860 { 861 Q_OBJECT; 862 863 public: 864 865 /** Constructs action passing @a pParent to the base-class. */ 866 UIActionToggleSelectorCommonPauseAndResume(UIActionPool *pParent) 705 867 : UIActionToggle(pParent, 706 868 ":/vm_pause_on_16px.png", ":/vm_pause_16px.png", 707 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") {} 708 709 protected: 710 711 QString shortcutExtraDataID() const 869 ":/vm_pause_on_disabled_16px.png", ":/vm_pause_disabled_16px.png") 870 {} 871 872 protected: 873 874 /** Returns shortcut extra-data ID. */ 875 virtual QString shortcutExtraDataID() const /* override */ 712 876 { 713 877 return QString("PauseVM"); 714 878 } 715 879 716 QKeySequence defaultShortcut(UIActionPoolType) const 880 /** Returns default shortcut. */ 881 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 717 882 { 718 883 return QKeySequence("Ctrl+P"); 719 884 } 720 885 721 void retranslateUi() 886 /** Handles translation event. */ 887 virtual void retranslateUi() /* override */ 722 888 { 723 889 setName(QApplication::translate("UIActionPool", "&Pause")); … … 726 892 }; 727 893 728 class UIActionSimpleCommonReset : public UIActionSimple 729 { 730 Q_OBJECT; 731 732 public: 733 734 UIActionSimpleCommonReset(UIActionPool *pParent) 735 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") {} 736 737 protected: 738 739 QString shortcutExtraDataID() const 894 /** Simple action extension, used as 'Reset' action class. */ 895 class UIActionSimpleSelectorCommonReset : public UIActionSimple 896 { 897 Q_OBJECT; 898 899 public: 900 901 /** Constructs action passing @a pParent to the base-class. */ 902 UIActionSimpleSelectorCommonReset(UIActionPool *pParent) 903 : UIActionSimple(pParent, ":/vm_reset_16px.png", ":/vm_reset_disabled_16px.png") 904 {} 905 906 protected: 907 908 /** Returns shortcut extra-data ID. */ 909 virtual QString shortcutExtraDataID() const /* override */ 740 910 { 741 911 return QString("ResetVM"); 742 912 } 743 913 744 QKeySequence defaultShortcut(UIActionPoolType) const 914 /** Returns default shortcut. */ 915 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 745 916 { 746 917 return QKeySequence("Ctrl+T"); 747 918 } 748 919 749 void retranslateUi() 920 /** Handles translation event. */ 921 virtual void retranslateUi() /* override */ 750 922 { 751 923 setName(QApplication::translate("UIActionPool", "&Reset")); … … 754 926 }; 755 927 756 class UIActionSimpleCommonDiscard : public UIActionSimple 757 { 758 Q_OBJECT; 759 760 public: 761 762 UIActionSimpleCommonDiscard(UIActionPool *pParent) 928 /** Simple action extension, used as 'Discard' action class. */ 929 class UIActionSimpleSelectorCommonDiscard : public UIActionSimple 930 { 931 Q_OBJECT; 932 933 public: 934 935 /** Constructs action passing @a pParent to the base-class. */ 936 UIActionSimpleSelectorCommonDiscard(UIActionPool *pParent) 763 937 : UIActionSimple(pParent, 764 938 ":/vm_discard_32px.png", ":/vm_discard_16px.png", 765 ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") {} 766 767 protected: 768 769 QString shortcutExtraDataID() const 939 ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") 940 {} 941 942 protected: 943 944 /** Returns shortcut extra-data ID. */ 945 virtual QString shortcutExtraDataID() const /* override */ 770 946 { 771 947 return QString("DiscardVM"); 772 948 } 773 949 774 QKeySequence defaultShortcut(UIActionPoolType) const 950 /** Returns default shortcut. */ 951 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 775 952 { 776 953 return QKeySequence("Ctrl+J"); 777 954 } 778 955 779 void retranslateUi() 956 /** Handles translation event. */ 957 virtual void retranslateUi() /* override */ 780 958 { 781 959 setIconText(QApplication::translate("UIActionPool", "Discard")); … … 787 965 }; 788 966 789 class UIActionSimpleCommonShowLogDialog : public UIActionSimple 790 { 791 Q_OBJECT; 792 793 public: 794 795 UIActionSimpleCommonShowLogDialog(UIActionPool *pParent) 967 /** Simple action extension, used as 'Show Logs' action class. */ 968 class UIActionSimpleSelectorCommonShowLogs : public UIActionSimple 969 { 970 Q_OBJECT; 971 972 public: 973 974 /** Constructs action passing @a pParent to the base-class. */ 975 UIActionSimpleSelectorCommonShowLogs(UIActionPool *pParent) 796 976 : UIActionSimple(pParent, 797 977 ":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png", … … 803 983 protected: 804 984 805 QString shortcutExtraDataID() const 806 { 807 return QString("ShowVMLog"); 808 } 809 810 QKeySequence defaultShortcut(UIActionPoolType) const 985 /** Returns shortcut extra-data ID. */ 986 virtual QString shortcutExtraDataID() const /* override */ 987 { 988 return QString("LogViewer"); 989 } 990 991 /** Returns default shortcut. */ 992 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 811 993 { 812 994 return QKeySequence("Ctrl+L"); 813 995 } 814 996 815 void retranslateUi() 997 /** Handles translation event. */ 998 virtual void retranslateUi() /* override */ 816 999 { 817 1000 setName(QApplication::translate("UIActionPool", "Show &Log...")); … … 820 1003 }; 821 1004 822 class UIActionSimpleCommonRefresh : public UIActionSimple 823 { 824 Q_OBJECT; 825 826 public: 827 828 UIActionSimpleCommonRefresh(UIActionPool *pParent) 1005 /** Simple action extension, used as 'Refresh' action class. */ 1006 class UIActionSimpleSelectorCommonRefresh : public UIActionSimple 1007 { 1008 Q_OBJECT; 1009 1010 public: 1011 1012 /** Constructs action passing @a pParent to the base-class. */ 1013 UIActionSimpleSelectorCommonRefresh(UIActionPool *pParent) 829 1014 : UIActionSimple(pParent, 830 1015 ":/refresh_32px.png", ":/refresh_16px.png", 831 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") {} 832 833 protected: 834 835 QString shortcutExtraDataID() const 1016 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") 1017 {} 1018 1019 protected: 1020 1021 /** Returns shortcut extra-data ID. */ 1022 virtual QString shortcutExtraDataID() const /* override */ 836 1023 { 837 1024 return QString("RefreshVM"); 838 1025 } 839 1026 840 void retranslateUi() 1027 /** Handles translation event. */ 1028 virtual void retranslateUi() /* override */ 841 1029 { 842 1030 setName(QApplication::translate("UIActionPool", "Re&fresh")); … … 845 1033 }; 846 1034 847 class UIActionSimpleCommonShowInFileManager : public UIActionSimple 848 { 849 Q_OBJECT; 850 851 public: 852 853 UIActionSimpleCommonShowInFileManager(UIActionPool *pParent) 854 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") {} 855 856 protected: 857 858 QString shortcutExtraDataID() const 1035 /** Simple action extension, used as 'Show in File Manager' action class. */ 1036 class UIActionSimpleSelectorCommonShowInFileManager : public UIActionSimple 1037 { 1038 Q_OBJECT; 1039 1040 public: 1041 1042 /** Constructs action passing @a pParent to the base-class. */ 1043 UIActionSimpleSelectorCommonShowInFileManager(UIActionPool *pParent) 1044 : UIActionSimple(pParent, ":/vm_open_filemanager_16px.png", ":/vm_open_filemanager_disabled_16px.png") 1045 {} 1046 1047 protected: 1048 1049 /** Returns shortcut extra-data ID. */ 1050 virtual QString shortcutExtraDataID() const /* override */ 859 1051 { 860 1052 return QString("ShowVMInFileManager"); 861 1053 } 862 1054 863 void retranslateUi() 1055 /** Handles translation event. */ 1056 virtual void retranslateUi() /* override */ 864 1057 { 865 1058 #if defined(VBOX_WS_MAC) … … 876 1069 }; 877 1070 878 class UIActionSimpleCommonCreateShortcut : public UIActionSimple 879 { 880 Q_OBJECT; 881 882 public: 883 884 UIActionSimpleCommonCreateShortcut(UIActionPool *pParent) 885 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") {} 886 887 protected: 888 889 QString shortcutExtraDataID() const 1071 /** Simple action extension, used as 'Create Shortcut' action class. */ 1072 class UIActionSimpleSelectorCommonCreateShortcut : public UIActionSimple 1073 { 1074 Q_OBJECT; 1075 1076 public: 1077 1078 /** Constructs action passing @a pParent to the base-class. */ 1079 UIActionSimpleSelectorCommonCreateShortcut(UIActionPool *pParent) 1080 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 1081 {} 1082 1083 protected: 1084 1085 /** Returns shortcut extra-data ID. */ 1086 virtual QString shortcutExtraDataID() const /* override */ 890 1087 { 891 1088 return QString("CreateVMAlias"); 892 1089 } 893 1090 894 void retranslateUi() 1091 /** Handles translation event. */ 1092 virtual void retranslateUi() /* override */ 895 1093 { 896 1094 #if defined(VBOX_WS_MAC) … … 904 1102 }; 905 1103 906 class UIActionSimpleMachineSortParent : public UIActionSimple 907 { 908 Q_OBJECT; 909 910 public: 911 912 UIActionSimpleMachineSortParent(UIActionPool *pParent) 913 : UIActionSimple(pParent, ":/sort_16px.png", ":/sort_disabled_16px.png") {} 914 915 protected: 916 917 QString shortcutExtraDataID() const 918 { 919 return QString("SortGroup"); 920 } 921 922 void retranslateUi() 923 { 924 setName(QApplication::translate("UIActionPool", "&Sort")); 925 setStatusTip(QApplication::translate("UIActionPool", "Sort group of first selected virtual machine alphabetically")); 926 } 927 }; 928 929 930 class UIActionToggleToolsMachine : public UIActionToggle 931 { 932 Q_OBJECT; 933 934 public: 935 936 UIActionToggleToolsMachine(UIActionPool *pParent) 937 : UIActionToggle(pParent, ":/tools_machine_32px.png") {} 938 939 protected: 940 941 QString shortcutExtraDataID() const 1104 1105 /** Toggle action extension, used as 'Machine Tools' action class. */ 1106 class UIActionToggleSelectorToolsMachine : public UIActionToggle 1107 { 1108 Q_OBJECT; 1109 1110 public: 1111 1112 /** Constructs action passing @a pParent to the base-class. */ 1113 UIActionToggleSelectorToolsMachine(UIActionPool *pParent) 1114 : UIActionToggle(pParent, ":/tools_machine_32px.png") 1115 {} 1116 1117 protected: 1118 1119 /** Returns shortcut extra-data ID. */ 1120 virtual QString shortcutExtraDataID() const /* override */ 942 1121 { 943 1122 return QString("ToolsMachine"); 944 1123 } 945 1124 946 void retranslateUi() 1125 /** Handles translation event. */ 1126 virtual void retranslateUi() /* override */ 947 1127 { 948 1128 setName(QApplication::translate("UIActionPool", "&Machine Tools")); … … 951 1131 }; 952 1132 953 class UIActionMenuToolsMachine : public UIActionMenu 954 { 955 Q_OBJECT; 956 957 public: 958 959 UIActionMenuToolsMachine(UIActionPool *pParent) 960 : UIActionMenu(pParent) {} 961 962 protected: 963 964 QString shortcutExtraDataID() const 1133 /** Menu action extension, used as 'Machine Tools' menu class. */ 1134 class UIActionMenuSelectorToolsMachine : public UIActionMenu 1135 { 1136 Q_OBJECT; 1137 1138 public: 1139 1140 /** Constructs action passing @a pParent to the base-class. */ 1141 UIActionMenuSelectorToolsMachine(UIActionPool *pParent) 1142 : UIActionMenu(pParent) 1143 {} 1144 1145 protected: 1146 1147 /** Returns shortcut extra-data ID. */ 1148 virtual QString shortcutExtraDataID() const /* override */ 965 1149 { 966 1150 return QString("ToolsMachineMenu"); 967 1151 } 968 1152 969 void retranslateUi() 1153 /** Handles translation event. */ 1154 virtual void retranslateUi() /* override */ 970 1155 { 971 1156 setName(QApplication::translate("UIActionPool", "&Machine Tools Menu")); … … 974 1159 }; 975 1160 976 class UIActionSimpleToolsMachineDetails : public UIActionSimple 977 { 978 Q_OBJECT; 979 980 public: 981 982 UIActionSimpleToolsMachineDetails(UIActionPool *pParent) 1161 /** Simple action extension, used as 'Open Machine Details' action class. */ 1162 class UIActionSimpleSelectorToolsOpenMachineDetails : public UIActionSimple 1163 { 1164 Q_OBJECT; 1165 1166 public: 1167 1168 /** Constructs action passing @a pParent to the base-class. */ 1169 UIActionSimpleSelectorToolsOpenMachineDetails(UIActionPool *pParent) 983 1170 : UIActionSimple(pParent, 984 1171 ":/machine_details_manager_22px.png", ":/machine_details_manager_16px.png", 985 ":/machine_details_manager_22px.png", ":/machine_details_manager_16px.png") {} 986 987 protected: 988 989 QString shortcutExtraDataID() const 1172 ":/machine_details_manager_22px.png", ":/machine_details_manager_16px.png") 1173 {} 1174 1175 protected: 1176 1177 /** Returns shortcut extra-data ID. */ 1178 virtual QString shortcutExtraDataID() const /* override */ 990 1179 { 991 1180 return QString("ToolsMachineDetails"); 992 1181 } 993 1182 994 void retranslateUi() 1183 /** Handles translation event. */ 1184 virtual void retranslateUi() /* override */ 995 1185 { 996 1186 setName(QApplication::translate("UIActionPool", "&Details")); … … 999 1189 }; 1000 1190 1001 class UIActionSimpleToolsMachineSnapshots : public UIActionSimple 1002 { 1003 Q_OBJECT; 1004 1005 public: 1006 1007 UIActionSimpleToolsMachineSnapshots(UIActionPool *pParent) 1191 /** Simple action extension, used as 'Open Machine Snapshots' action class. */ 1192 class UIActionSimpleSelectorToolsOpenMachineSnapshots : public UIActionSimple 1193 { 1194 Q_OBJECT; 1195 1196 public: 1197 1198 /** Constructs action passing @a pParent to the base-class. */ 1199 UIActionSimpleSelectorToolsOpenMachineSnapshots(UIActionPool *pParent) 1008 1200 : UIActionSimple(pParent, 1009 1201 ":/snapshot_manager_22px.png", ":/snapshot_manager_16px.png", 1010 ":/snapshot_manager_22px.png", ":/snapshot_manager_16px.png") {} 1011 1012 protected: 1013 1014 QString shortcutExtraDataID() const 1202 ":/snapshot_manager_22px.png", ":/snapshot_manager_16px.png") 1203 {} 1204 1205 protected: 1206 1207 /** Returns shortcut extra-data ID. */ 1208 virtual QString shortcutExtraDataID() const /* override */ 1015 1209 { 1016 1210 return QString("ToolsMachineSnapshots"); 1017 1211 } 1018 1212 1019 void retranslateUi() 1213 /** Handles translation event. */ 1214 virtual void retranslateUi() /* override */ 1020 1215 { 1021 1216 setName(QApplication::translate("UIActionPool", "&Snapshots")); … … 1024 1219 }; 1025 1220 1026 class UIActionSimpleToolsMachineLogViewer : public UIActionSimple 1027 { 1028 Q_OBJECT; 1029 1030 public: 1031 1032 UIActionSimpleToolsMachineLogViewer(UIActionPool *pParent) 1221 /** Simple action extension, used as 'Open Machine Logs' action class. */ 1222 class UIActionSimpleSelectorToolsOpenMachineLogs : public UIActionSimple 1223 { 1224 Q_OBJECT; 1225 1226 public: 1227 1228 /** Constructs action passing @a pParent to the base-class. */ 1229 UIActionSimpleSelectorToolsOpenMachineLogs(UIActionPool *pParent) 1033 1230 : UIActionSimple(pParent, 1034 1231 ":/vm_show_logs_32px.png", ":/vm_show_logs_32px.png", 1035 ":/vm_show_logs_32px.png", ":/vm_show_logs_32px.png") {} 1036 1037 protected: 1038 1039 QString shortcutExtraDataID() const 1232 ":/vm_show_logs_32px.png", ":/vm_show_logs_32px.png") 1233 {} 1234 1235 protected: 1236 1237 /** Returns shortcut extra-data ID. */ 1238 virtual QString shortcutExtraDataID() const /* override */ 1040 1239 { 1041 1240 return QString("ToolsMachineLogViewer"); 1042 1241 } 1043 1242 1044 void retranslateUi() 1045 { 1046 setName(QApplication::translate("UIActionPool", "&LogViewer")); 1047 setStatusTip(QApplication::translate("UIActionPool", "Open the machine logviewer pane")); 1048 } 1049 }; 1050 1051 1052 class UIActionToggleToolsGlobal : public UIActionToggle 1053 { 1054 Q_OBJECT; 1055 1056 public: 1057 1058 UIActionToggleToolsGlobal(UIActionPool *pParent) 1059 : UIActionToggle(pParent, ":/tools_global_32px.png") {} 1060 1061 protected: 1062 1063 QString shortcutExtraDataID() const 1243 /** Handles translation event. */ 1244 virtual void retranslateUi() /* override */ 1245 { 1246 setName(QApplication::translate("UIActionPool", "&Logs")); 1247 setStatusTip(QApplication::translate("UIActionPool", "Open the machine logs pane")); 1248 } 1249 }; 1250 1251 1252 /** Toggle action extension, used as 'Global Tools' action class. */ 1253 class UIActionToggleSelectorToolsGlobal : public UIActionToggle 1254 { 1255 Q_OBJECT; 1256 1257 public: 1258 1259 /** Constructs action passing @a pParent to the base-class. */ 1260 UIActionToggleSelectorToolsGlobal(UIActionPool *pParent) 1261 : UIActionToggle(pParent, ":/tools_global_32px.png") 1262 {} 1263 1264 protected: 1265 1266 /** Returns shortcut extra-data ID. */ 1267 virtual QString shortcutExtraDataID() const /* override */ 1064 1268 { 1065 1269 return QString("ToolsGlobal"); 1066 1270 } 1067 1271 1068 void retranslateUi() 1272 /** Handles translation event. */ 1273 virtual void retranslateUi() /* override */ 1069 1274 { 1070 1275 setName(QApplication::translate("UIActionPool", "&Global Tools")); … … 1073 1278 }; 1074 1279 1075 class UIActionMenuToolsGlobal : public UIActionMenu 1076 { 1077 Q_OBJECT; 1078 1079 public: 1080 1081 UIActionMenuToolsGlobal(UIActionPool *pParent) 1082 : UIActionMenu(pParent) {} 1083 1084 protected: 1085 1086 QString shortcutExtraDataID() const 1280 /** Menu action extension, used as 'Global Tools' menu class. */ 1281 class UIActionMenuSelectorToolsGlobal : public UIActionMenu 1282 { 1283 Q_OBJECT; 1284 1285 public: 1286 1287 /** Constructs action passing @a pParent to the base-class. */ 1288 UIActionMenuSelectorToolsGlobal(UIActionPool *pParent) 1289 : UIActionMenu(pParent) 1290 {} 1291 1292 protected: 1293 1294 /** Returns shortcut extra-data ID. */ 1295 virtual QString shortcutExtraDataID() const /* override */ 1087 1296 { 1088 1297 return QString("ToolsGlobalMenu"); 1089 1298 } 1090 1299 1091 void retranslateUi() 1300 /** Handles translation event. */ 1301 virtual void retranslateUi() /* override */ 1092 1302 { 1093 1303 setName(QApplication::translate("UIActionPool", "&Global Tools Menu")); … … 1096 1306 }; 1097 1307 1098 class UIActionSimpleToolsGlobalVirtualMediaManager : public UIActionSimple 1099 { 1100 Q_OBJECT; 1101 1102 public: 1103 1104 UIActionSimpleToolsGlobalVirtualMediaManager(UIActionPool *pParent) 1308 /** Simple action extension, used as 'Virtual Media Manager' action class. */ 1309 class UIActionSimpleSelectorToolsGlobalVirtualMediaManager : public UIActionSimple 1310 { 1311 Q_OBJECT; 1312 1313 public: 1314 1315 /** Constructs action passing @a pParent to the base-class. */ 1316 UIActionSimpleSelectorToolsGlobalVirtualMediaManager(UIActionPool *pParent) 1105 1317 : UIActionSimple(pParent, 1106 1318 ":/diskimage_22px.png", ":/diskimage_16px.png", 1107 ":/diskimage_22px.png", ":/diskimage_16px.png") {} 1108 1109 protected: 1110 1111 QString shortcutExtraDataID() const 1319 ":/diskimage_22px.png", ":/diskimage_16px.png") 1320 {} 1321 1322 protected: 1323 1324 /** Returns shortcut extra-data ID. */ 1325 virtual QString shortcutExtraDataID() const /* override */ 1112 1326 { 1113 1327 return QString("ToolsGlobalVirtualMediaManager"); 1114 1328 } 1115 1329 1116 void retranslateUi() 1330 /** Handles translation event. */ 1331 virtual void retranslateUi() /* override */ 1117 1332 { 1118 1333 setName(QApplication::translate("UIActionPool", "&Virtual Media Manager")); … … 1121 1336 }; 1122 1337 1123 class UIActionSimpleToolsGlobalHostNetworkManager : public UIActionSimple 1124 { 1125 Q_OBJECT; 1126 1127 public: 1128 1129 UIActionSimpleToolsGlobalHostNetworkManager(UIActionPool *pParent) 1338 /** Simple action extension, used as 'Host Network Manager' action class. */ 1339 class UIActionSimpleSelectorToolsGlobalHostNetworkManager : public UIActionSimple 1340 { 1341 Q_OBJECT; 1342 1343 public: 1344 1345 /** Constructs action passing @a pParent to the base-class. */ 1346 UIActionSimpleSelectorToolsGlobalHostNetworkManager(UIActionPool *pParent) 1130 1347 : UIActionSimple(pParent, 1131 1348 ":/host_iface_manager_22px.png", ":/host_iface_manager_16px.png", 1132 ":/host_iface_manager_22px.png", ":/host_iface_manager_16px.png") {} 1133 1134 protected: 1135 1136 QString shortcutExtraDataID() const 1349 ":/host_iface_manager_22px.png", ":/host_iface_manager_16px.png") 1350 {} 1351 1352 protected: 1353 1354 /** Returns shortcut extra-data ID. */ 1355 virtual QString shortcutExtraDataID() const /* override */ 1137 1356 { 1138 1357 return QString("ToolsGlobalHostNetworkManager"); 1139 1358 } 1140 1359 1141 void retranslateUi() 1360 /** Handles translation event. */ 1361 virtual void retranslateUi() /* override */ 1142 1362 { 1143 1363 setName(QApplication::translate("UIActionPool", "&Host Network Manager")); … … 1147 1367 1148 1368 1149 class UIActionMenuClose : public UIActionMenu 1150 { 1151 Q_OBJECT; 1152 1153 public: 1154 1155 UIActionMenuClose(UIActionPool *pParent) 1156 : UIActionMenu(pParent, ":/exit_16px.png") {} 1157 1158 protected: 1159 1160 void retranslateUi() 1369 /** Menu action extension, used as 'Close' menu class. */ 1370 class UIActionMenuSelectorClose : public UIActionMenu 1371 { 1372 Q_OBJECT; 1373 1374 public: 1375 1376 /** Constructs action passing @a pParent to the base-class. */ 1377 UIActionMenuSelectorClose(UIActionPool *pParent) 1378 : UIActionMenu(pParent, ":/exit_16px.png") 1379 {} 1380 1381 protected: 1382 1383 /** Handles translation event. */ 1384 virtual void retranslateUi() /* override */ 1161 1385 { 1162 1386 setName(QApplication::translate("UIActionPool", "&Close")); … … 1164 1388 }; 1165 1389 1166 class UIActionSimpleDetach : public UIActionSimple 1167 { 1168 Q_OBJECT; 1169 1170 public: 1171 1172 UIActionSimpleDetach(UIActionPool *pParent) 1173 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") {} 1174 1175 protected: 1176 1177 QString shortcutExtraDataID() const 1390 /** Simple action extension, used as 'Perform Detach' action class. */ 1391 class UIActionSimpleSelectorPerformDetach : public UIActionSimple 1392 { 1393 Q_OBJECT; 1394 1395 public: 1396 1397 /** Constructs action passing @a pParent to the base-class. */ 1398 UIActionSimpleSelectorPerformDetach(UIActionPool *pParent) 1399 : UIActionSimple(pParent, ":/vm_create_shortcut_16px.png", ":/vm_create_shortcut_disabled_16px.png") 1400 {} 1401 1402 protected: 1403 1404 /** Returns shortcut extra-data ID. */ 1405 virtual QString shortcutExtraDataID() const /* override */ 1178 1406 { 1179 1407 return QString("DetachUIVM"); 1180 1408 } 1181 1409 1182 void retranslateUi() 1410 /** Handles translation event. */ 1411 virtual void retranslateUi() /* override */ 1183 1412 { 1184 1413 setName(QApplication::translate("UIActionPool", "&Detach GUI")); … … 1187 1416 }; 1188 1417 1189 class UIActionSimpleSave : public UIActionSimple 1190 { 1191 Q_OBJECT; 1192 1193 public: 1194 1195 UIActionSimpleSave(UIActionPool *pParent) 1196 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {} 1197 1198 protected: 1199 1200 QString shortcutExtraDataID() const 1418 /** Simple action extension, used as 'Perform Save' action class. */ 1419 class UIActionSimpleSelectorPerformSave : public UIActionSimple 1420 { 1421 Q_OBJECT; 1422 1423 public: 1424 1425 /** Constructs action passing @a pParent to the base-class. */ 1426 UIActionSimpleSelectorPerformSave(UIActionPool *pParent) 1427 : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") 1428 {} 1429 1430 protected: 1431 1432 /** Returns shortcut extra-data ID. */ 1433 virtual QString shortcutExtraDataID() const /* override */ 1201 1434 { 1202 1435 return QString("SaveVM"); 1203 1436 } 1204 1437 1205 QKeySequence defaultShortcut(UIActionPoolType) const 1438 /** Returns default shortcut. */ 1439 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1206 1440 { 1207 1441 return QKeySequence("Ctrl+V"); 1208 1442 } 1209 1443 1210 void retranslateUi() 1444 /** Handles translation event. */ 1445 virtual void retranslateUi() /* override */ 1211 1446 { 1212 1447 setName(QApplication::translate("UIActionPool", "&Save State")); … … 1215 1450 }; 1216 1451 1217 class UIActionSimpleACPIShutdown : public UIActionSimple 1218 { 1219 Q_OBJECT; 1220 1221 public: 1222 1223 UIActionSimpleACPIShutdown(UIActionPool *pParent) 1224 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") {} 1225 1226 protected: 1227 1228 QString shortcutExtraDataID() const 1452 /** Simple action extension, used as 'Perform Shutdown' action class. */ 1453 class UIActionSimpleSelectorPerformShutdown : public UIActionSimple 1454 { 1455 Q_OBJECT; 1456 1457 public: 1458 1459 /** Constructs action passing @a pParent to the base-class. */ 1460 UIActionSimpleSelectorPerformShutdown(UIActionPool *pParent) 1461 : UIActionSimple(pParent, ":/vm_shutdown_16px.png", ":/vm_shutdown_disabled_16px.png") 1462 {} 1463 1464 protected: 1465 1466 /** Returns shortcut extra-data ID. */ 1467 virtual QString shortcutExtraDataID() const /* override */ 1229 1468 { 1230 1469 return QString("ACPIShutdownVM"); 1231 1470 } 1232 1471 1233 QKeySequence defaultShortcut(UIActionPoolType) const 1472 /** Returns default shortcut. */ 1473 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1234 1474 { 1235 1475 return QKeySequence("Ctrl+H"); 1236 1476 } 1237 1477 1238 void retranslateUi() 1478 /** Handles translation event. */ 1479 virtual void retranslateUi() /* override */ 1239 1480 { 1240 1481 setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown")); … … 1243 1484 }; 1244 1485 1245 class UIActionSimplePowerOff : public UIActionSimple 1246 { 1247 Q_OBJECT; 1248 1249 public: 1250 1251 UIActionSimplePowerOff(UIActionPool *pParent) 1252 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") {} 1253 1254 protected: 1255 1256 QString shortcutExtraDataID() const 1486 /** Simple action extension, used as 'Perform PowerOff' action class. */ 1487 class UIActionSimpleSelectorPerformPowerOff : public UIActionSimple 1488 { 1489 Q_OBJECT; 1490 1491 public: 1492 1493 /** Constructs action passing @a pParent to the base-class. */ 1494 UIActionSimpleSelectorPerformPowerOff(UIActionPool *pParent) 1495 : UIActionSimple(pParent, ":/vm_poweroff_16px.png", ":/vm_poweroff_disabled_16px.png") 1496 {} 1497 1498 protected: 1499 1500 /** Returns shortcut extra-data ID. */ 1501 virtual QString shortcutExtraDataID() const /* override */ 1257 1502 { 1258 1503 return QString("PowerOffVM"); 1259 1504 } 1260 1505 1261 QKeySequence defaultShortcut(UIActionPoolType) const 1506 /** Returns default shortcut. */ 1507 virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */ 1262 1508 { 1263 1509 return QKeySequence("Ctrl+F"); 1264 1510 } 1265 1511 1266 void retranslateUi() 1512 /** Handles translation event. */ 1513 virtual void retranslateUi() /* override */ 1267 1514 { 1268 1515 setName(QApplication::translate("UIActionPool", "Po&wer Off")); … … 1272 1519 1273 1520 1521 /********************************************************************************************************************************* 1522 * Class UIActionPoolSelector implementation. * 1523 *********************************************************************************************************************************/ 1524 1274 1525 UIActionPoolSelector::UIActionPoolSelector(bool fTemporary /* = false */) 1275 1526 : UIActionPool(UIActionPoolType_Selector, fTemporary) … … 1280 1531 { 1281 1532 /* 'File' actions: */ 1282 m_pool[UIActionIndexST_M_File] = new UIActionMenu File(this);1283 m_pool[UIActionIndexST_M_File_S_ShowVirtualMediumManager] = new UIActionSimple VirtualMediumManagerDialog(this);1284 m_pool[UIActionIndexST_M_File_S_ShowHostNetworkManager] = new UIActionSimple HostNetworkManagerDialog(this);1285 m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimple ImportApplianceWizard(this);1286 m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimple ExportApplianceWizard(this);1533 m_pool[UIActionIndexST_M_File] = new UIActionMenuSelectorFile(this); 1534 m_pool[UIActionIndexST_M_File_S_ShowVirtualMediumManager] = new UIActionSimpleSelectorShowVirtualMediaManager(this); 1535 m_pool[UIActionIndexST_M_File_S_ShowHostNetworkManager] = new UIActionSimpleSelectorShowHostNetworkManager(this); 1536 m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimpleSelectorShowImportApplianceWizard(this); 1537 m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimpleSelectorShowExportApplianceWizard(this); 1287 1538 #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI 1288 m_pool[UIActionIndexST_M_File_S_ShowExtraDataManager] = new UIActionSimple ExtraDataManagerWindow(this);1289 #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */1290 m_pool[UIActionIndexST_M_File_S_Close] = new UIActionSimple Exit(this);1539 m_pool[UIActionIndexST_M_File_S_ShowExtraDataManager] = new UIActionSimpleSelectorShowExtraDataManager(this); 1540 #endif 1541 m_pool[UIActionIndexST_M_File_S_Close] = new UIActionSimpleSelectorPerformExit(this); 1291 1542 1292 1543 /* 'Group' actions: */ 1293 m_pool[UIActionIndexST_M_Group] = new UIActionMenu Group(this);1294 m_pool[UIActionIndexST_M_Group_S_New] = new UIActionSimple GroupNew(this);1295 m_pool[UIActionIndexST_M_Group_S_Add] = new UIActionSimple GroupAdd(this);1296 m_pool[UIActionIndexST_M_Group_S_Rename] = new UIActionSimple GroupRename(this);1297 m_pool[UIActionIndexST_M_Group_S_Remove] = new UIActionSimple GroupRemove(this);1298 m_pool[UIActionIndexST_M_Group_M_StartOrShow] = new UIActionState CommonStartOrShow(this);1299 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartNormal] = new UIActionSimpleS tartNormal(this);1300 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartHeadless] = new UIActionSimpleS tartHeadless(this);1301 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartDetachable] = new UIActionSimpleS tartDetachable(this);1302 m_pool[UIActionIndexST_M_Group_T_Pause] = new UIActionToggle CommonPauseAndResume(this);1303 m_pool[UIActionIndexST_M_Group_S_Reset] = new UIActionSimple CommonReset(this);1304 m_pool[UIActionIndexST_M_Group_M_Close] = new UIActionMenu Close(this);1305 m_pool[UIActionIndexST_M_Group_M_Close_S_Detach] = new UIActionSimple Detach(this);1306 m_pool[UIActionIndexST_M_Group_M_Close_S_SaveState] = new UIActionSimpleS ave(this);1307 m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimple ACPIShutdown(this);1308 m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimple PowerOff(this);1309 m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimple CommonDiscard(this);1310 m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimple CommonShowLogDialog(this);1311 m_pool[UIActionIndexST_M_Group_S_Refresh] = new UIActionSimple CommonRefresh(this);1312 m_pool[UIActionIndexST_M_Group_S_ShowInFileManager] = new UIActionSimple CommonShowInFileManager(this);1313 m_pool[UIActionIndexST_M_Group_S_CreateShortcut] = new UIActionSimple CommonCreateShortcut(this);1314 m_pool[UIActionIndexST_M_Group_S_Sort] = new UIActionSimple GroupSort(this);1544 m_pool[UIActionIndexST_M_Group] = new UIActionMenuSelectorGroup(this); 1545 m_pool[UIActionIndexST_M_Group_S_New] = new UIActionSimpleSelectorGroupMachineNew(this); 1546 m_pool[UIActionIndexST_M_Group_S_Add] = new UIActionSimpleSelectorGroupMachineAdd(this); 1547 m_pool[UIActionIndexST_M_Group_S_Rename] = new UIActionSimpleSelectorGroupRename(this); 1548 m_pool[UIActionIndexST_M_Group_S_Remove] = new UIActionSimpleSelectorGroupRemove(this); 1549 m_pool[UIActionIndexST_M_Group_M_StartOrShow] = new UIActionStateSelectorCommonStartOrShow(this); 1550 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartNormal] = new UIActionSimpleSelectorCommonStartNormal(this); 1551 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartHeadless] = new UIActionSimpleSelectorCommonStartHeadless(this); 1552 m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartDetachable] = new UIActionSimpleSelectorCommonStartDetachable(this); 1553 m_pool[UIActionIndexST_M_Group_T_Pause] = new UIActionToggleSelectorCommonPauseAndResume(this); 1554 m_pool[UIActionIndexST_M_Group_S_Reset] = new UIActionSimpleSelectorCommonReset(this); 1555 m_pool[UIActionIndexST_M_Group_M_Close] = new UIActionMenuSelectorClose(this); 1556 m_pool[UIActionIndexST_M_Group_M_Close_S_Detach] = new UIActionSimpleSelectorPerformDetach(this); 1557 m_pool[UIActionIndexST_M_Group_M_Close_S_SaveState] = new UIActionSimpleSelectorPerformSave(this); 1558 m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimpleSelectorPerformShutdown(this); 1559 m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimpleSelectorPerformPowerOff(this); 1560 m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleSelectorCommonDiscard(this); 1561 m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowLogs(this); 1562 m_pool[UIActionIndexST_M_Group_S_Refresh] = new UIActionSimpleSelectorCommonRefresh(this); 1563 m_pool[UIActionIndexST_M_Group_S_ShowInFileManager] = new UIActionSimpleSelectorCommonShowInFileManager(this); 1564 m_pool[UIActionIndexST_M_Group_S_CreateShortcut] = new UIActionSimpleSelectorCommonCreateShortcut(this); 1565 m_pool[UIActionIndexST_M_Group_S_Sort] = new UIActionSimpleSelectorGroupSort(this); 1315 1566 1316 1567 /* 'Machine' actions: */ 1317 m_pool[UIActionIndexST_M_Machine] = new UIActionMenu MachineSelector(this);1318 m_pool[UIActionIndexST_M_Machine_S_New] = new UIActionSimple MachineNew(this);1319 m_pool[UIActionIndexST_M_Machine_S_Add] = new UIActionSimple MachineAdd(this);1320 m_pool[UIActionIndexST_M_Machine_S_Settings] = new UIActionSimple MachineSettings(this);1321 m_pool[UIActionIndexST_M_Machine_S_Clone] = new UIActionSimple MachineClone(this);1322 m_pool[UIActionIndexST_M_Machine_S_Remove] = new UIActionSimple MachineRemove(this);1323 m_pool[UIActionIndexST_M_Machine_S_AddGroup] = new UIActionSimple MachineAddGroup(this);1324 m_pool[UIActionIndexST_M_Machine_M_StartOrShow] = new UIActionState CommonStartOrShow(this);1325 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartNormal] = new UIActionSimpleS tartNormal(this);1326 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartHeadless] = new UIActionSimpleS tartHeadless(this);1327 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable] = new UIActionSimpleS tartDetachable(this);1328 m_pool[UIActionIndexST_M_Machine_T_Pause] = new UIActionToggle CommonPauseAndResume(this);1329 m_pool[UIActionIndexST_M_Machine_S_Reset] = new UIActionSimple CommonReset(this);1330 m_pool[UIActionIndexST_M_Machine_M_Close] = new UIActionMenu Close(this);1331 m_pool[UIActionIndexST_M_Machine_M_Close_S_Detach] = new UIActionSimple Detach(this);1332 m_pool[UIActionIndexST_M_Machine_M_Close_S_SaveState] = new UIActionSimpleS ave(this);1333 m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimple ACPIShutdown(this);1334 m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimple PowerOff(this);1335 m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimple CommonDiscard(this);1336 m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimple CommonShowLogDialog(this);1337 m_pool[UIActionIndexST_M_Machine_S_Refresh] = new UIActionSimple CommonRefresh(this);1338 m_pool[UIActionIndexST_M_Machine_S_ShowInFileManager] = new UIActionSimple CommonShowInFileManager(this);1339 m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimple CommonCreateShortcut(this);1340 m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimple MachineSortParent(this);1568 m_pool[UIActionIndexST_M_Machine] = new UIActionMenuSelectorMachine(this); 1569 m_pool[UIActionIndexST_M_Machine_S_New] = new UIActionSimpleSelectorMachineNew(this); 1570 m_pool[UIActionIndexST_M_Machine_S_Add] = new UIActionSimpleSelectorMachineAdd(this); 1571 m_pool[UIActionIndexST_M_Machine_S_Settings] = new UIActionSimpleSelectorMachineShowSettings(this); 1572 m_pool[UIActionIndexST_M_Machine_S_Clone] = new UIActionSimpleSelectorMachineClone(this); 1573 m_pool[UIActionIndexST_M_Machine_S_Remove] = new UIActionSimpleSelectorMachineRemove(this); 1574 m_pool[UIActionIndexST_M_Machine_S_AddGroup] = new UIActionSimpleSelectorMachineGroup(this); 1575 m_pool[UIActionIndexST_M_Machine_M_StartOrShow] = new UIActionStateSelectorCommonStartOrShow(this); 1576 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartNormal] = new UIActionSimpleSelectorCommonStartNormal(this); 1577 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartHeadless] = new UIActionSimpleSelectorCommonStartHeadless(this); 1578 m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable] = new UIActionSimpleSelectorCommonStartDetachable(this); 1579 m_pool[UIActionIndexST_M_Machine_T_Pause] = new UIActionToggleSelectorCommonPauseAndResume(this); 1580 m_pool[UIActionIndexST_M_Machine_S_Reset] = new UIActionSimpleSelectorCommonReset(this); 1581 m_pool[UIActionIndexST_M_Machine_M_Close] = new UIActionMenuSelectorClose(this); 1582 m_pool[UIActionIndexST_M_Machine_M_Close_S_Detach] = new UIActionSimpleSelectorPerformDetach(this); 1583 m_pool[UIActionIndexST_M_Machine_M_Close_S_SaveState] = new UIActionSimpleSelectorPerformSave(this); 1584 m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimpleSelectorPerformShutdown(this); 1585 m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimpleSelectorPerformPowerOff(this); 1586 m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleSelectorCommonDiscard(this); 1587 m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimpleSelectorCommonShowLogs(this); 1588 m_pool[UIActionIndexST_M_Machine_S_Refresh] = new UIActionSimpleSelectorCommonRefresh(this); 1589 m_pool[UIActionIndexST_M_Machine_S_ShowInFileManager] = new UIActionSimpleSelectorCommonShowInFileManager(this); 1590 m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleSelectorCommonCreateShortcut(this); 1591 m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleSelectorMachineSortParent(this); 1341 1592 1342 1593 /* Machine Tools actions: */ 1343 m_pool[UIActionIndexST_M_Tools_T_Machine] = new UIActionToggle ToolsMachine(this);1344 m_pool[UIActionIndexST_M_Tools_M_Machine] = new UIActionMenu ToolsMachine(this);1345 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Details] = new UIActionSimple ToolsMachineDetails(this);1346 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Snapshots] = new UIActionSimple ToolsMachineSnapshots(this);1347 m_pool[UIActionIndexST_M_Tools_M_Machine_S_LogViewer] = new UIActionSimple ToolsMachineLogViewer(this);1594 m_pool[UIActionIndexST_M_Tools_T_Machine] = new UIActionToggleSelectorToolsMachine(this); 1595 m_pool[UIActionIndexST_M_Tools_M_Machine] = new UIActionMenuSelectorToolsMachine(this); 1596 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Details] = new UIActionSimpleSelectorToolsOpenMachineDetails(this); 1597 m_pool[UIActionIndexST_M_Tools_M_Machine_S_Snapshots] = new UIActionSimpleSelectorToolsOpenMachineSnapshots(this); 1598 m_pool[UIActionIndexST_M_Tools_M_Machine_S_LogViewer] = new UIActionSimpleSelectorToolsOpenMachineLogs(this); 1348 1599 1349 1600 /* Global Tools actions: */ 1350 m_pool[UIActionIndexST_M_Tools_T_Global] = new UIActionToggle ToolsGlobal(this);1351 m_pool[UIActionIndexST_M_Tools_M_Global] = new UIActionMenu ToolsGlobal(this);1352 m_pool[UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager] = new UIActionSimple ToolsGlobalVirtualMediaManager(this);1353 m_pool[UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager] = new UIActionSimple ToolsGlobalHostNetworkManager(this);1601 m_pool[UIActionIndexST_M_Tools_T_Global] = new UIActionToggleSelectorToolsGlobal(this); 1602 m_pool[UIActionIndexST_M_Tools_M_Global] = new UIActionMenuSelectorToolsGlobal(this); 1603 m_pool[UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager] = new UIActionSimpleSelectorToolsGlobalVirtualMediaManager(this); 1604 m_pool[UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager] = new UIActionSimpleSelectorToolsGlobalHostNetworkManager(this); 1354 1605 1355 1606 /* Call to base-class: */ … … 1387 1638 } 1388 1639 1640 1389 1641 #include "UIActionPoolSelector.moc" 1390 1642 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r71027 r71621 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 /* GUI includes: */ 22 22 #include "UIActionPool.h" 23 23 24 24 25 /** Runtime action-pool index enum. … … 109 110 }; 110 111 112 111 113 /** UIActionPool extension 112 114 * representing action-pool singleton for Selector UI. */ … … 117 119 protected: 118 120 119 /** Construct or,120 * @param fTemporary is used to determinewhether this action-pool is temporary,121 * which can be created to re-initialize shortcuts-pool. */121 /** Constructs action-pool. 122 * @param fTemporary Brings whether this action-pool is temporary, 123 * used to (re-)initialize shortcuts-pool. */ 122 124 UIActionPoolSelector(bool fTemporary = false); 123 125 124 /** Prepare pool routine. */125 virtual void preparePool() ;126 /** Prepare connections routine. */127 virtual void prepareConnections() ;126 /** Prepares pool. */ 127 virtual void preparePool() /* override */; 128 /** Prepares connections. */ 129 virtual void prepareConnections() /* override */; 128 130 129 /** Update menus routine. */130 virtual void updateMenus() ;131 /** Updates menus. */ 132 virtual void updateMenus() /* override */; 131 133 132 /** Update shortcuts. */133 virtual void updateShortcuts() ;134 /** Updates shortcuts. */ 135 virtual void updateShortcuts() /* override */; 134 136 135 137 /** Returns extra-data ID to save keyboard shortcuts under. */ 136 virtual QString shortcutsExtraDataID() const ;138 virtual QString shortcutsExtraDataID() const /* override */; 137 139 138 140 /** Returns the list of Selector UI main menus. */ 139 virtual QList<QMenu*> menus() const { return QList<QMenu*>(); }141 virtual QList<QMenu*> menus() const /* override */ { return QList<QMenu*>(); } 140 142 141 143 private: 142 144 143 /* Enable factory in base-class:*/145 /** Enables factory in base-class. */ 144 146 friend class UIActionPool; 145 147 }; 146 148 149 147 150 #endif /* !___UIActionPoolSelector_h___ */ 151
Note:
See TracChangeset
for help on using the changeset viewer.