VirtualBox

Ignore:
Timestamp:
Apr 2, 2018 5:32:27 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9049: Full and heavy cleanup for UIActionPoolSelector.

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  
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2020#else  /* !VBOX_WITH_PRECOMPILED_HEADERS */
    2121
    22 /* Local includes: */
     22/* GUI includes: */
    2323# include "UIActionPoolSelector.h"
    2424# include "UIExtraDataDefs.h"
     
    3737
    3838
    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. */
     40class UIActionMenuSelectorFile : public UIActionMenu
     41{
     42    Q_OBJECT;
     43
     44public:
     45
     46    /** Constructs action passing @a pParent to the base-class. */
     47    UIActionMenuSelectorFile(UIActionPool *pParent)
     48        : UIActionMenu(pParent)
     49    {}
     50
     51protected:
     52
     53    /** Handles translation event. */
     54    virtual void retranslateUi() /* override */
    5155    {
    5256#ifdef VBOX_WS_MAC
     
    5862};
    5963
    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. */
     65class UIActionSimpleSelectorShowVirtualMediaManager : public UIActionSimple
     66{
     67    Q_OBJECT;
     68
     69public:
     70
     71    /** Constructs action passing @a pParent to the base-class. */
     72    UIActionSimpleSelectorShowVirtualMediaManager(UIActionPool *pParent)
     73        : UIActionSimple(pParent, ":/diskimage_16px.png")
     74    {}
     75
     76protected:
     77
     78    /** Returns shortcut extra-data ID. */
     79    virtual QString shortcutExtraDataID() const /* override */
    7280    {
    7381        return QString("VirtualMediaManager");
    7482    }
    7583
    76     QKeySequence defaultShortcut(UIActionPoolType) const
     84    /** Returns default shortcut. */
     85    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    7786    {
    7887        return QKeySequence("Ctrl+D");
    7988    }
    8089
    81     void retranslateUi()
     90    /** Handles translation event. */
     91    virtual void retranslateUi() /* override */
    8292    {
    8393        setName(QApplication::translate("UIActionPool", "&Virtual Media Manager..."));
     
    8696};
    8797
    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. */
     99class UIActionSimpleSelectorShowHostNetworkManager : public UIActionSimple
     100{
     101    Q_OBJECT;
     102
     103public:
     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
     110protected:
     111
     112    /** Returns shortcut extra-data ID. */
     113    virtual QString shortcutExtraDataID() const /* override */
    100114    {
    101115        return QString("HostNetworkManager");
    102116    }
    103117
    104     QKeySequence defaultShortcut(UIActionPoolType) const
     118    /** Returns default shortcut. */
     119    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    105120    {
    106121        return QKeySequence("Ctrl+W");
    107122    }
    108123
    109     void retranslateUi()
     124    /** Handles translation event. */
     125    virtual void retranslateUi() /* override */
    110126    {
    111127        setName(QApplication::translate("UIActionPool", "&Host Network Manager..."));
     
    114130};
    115131
    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. */
     133class UIActionSimpleSelectorShowImportApplianceWizard : public UIActionSimple
     134{
     135    Q_OBJECT;
     136
     137public:
     138
     139    /** Constructs action passing @a pParent to the base-class. */
     140    UIActionSimpleSelectorShowImportApplianceWizard(UIActionPool *pParent)
     141        : UIActionSimple(pParent, ":/import_16px.png")
     142    {}
     143
     144protected:
     145
     146    /** Returns shortcut extra-data ID. */
     147    virtual QString shortcutExtraDataID() const /* override */
    128148    {
    129149        return QString("ImportAppliance");
    130150    }
    131151
    132     QKeySequence defaultShortcut(UIActionPoolType) const
     152    /** Returns default shortcut. */
     153    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    133154    {
    134155        return QKeySequence("Ctrl+I");
    135156    }
    136157
    137     void retranslateUi()
     158    /** Handles translation event. */
     159    virtual void retranslateUi() /* override */
    138160    {
    139161        setName(QApplication::translate("UIActionPool", "&Import Appliance..."));
     
    142164};
    143165
    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. */
     167class UIActionSimpleSelectorShowExportApplianceWizard : public UIActionSimple
     168{
     169    Q_OBJECT;
     170
     171public:
     172
     173    /** Constructs action passing @a pParent to the base-class. */
     174    UIActionSimpleSelectorShowExportApplianceWizard(UIActionPool *pParent)
     175        : UIActionSimple(pParent, ":/export_16px.png")
     176    {}
     177
     178protected:
     179
     180    /** Returns shortcut extra-data ID. */
     181    virtual QString shortcutExtraDataID() const /* override */
    156182    {
    157183        return QString("ExportAppliance");
    158184    }
    159185
    160     QKeySequence defaultShortcut(UIActionPoolType) const
     186    /** Returns default shortcut. */
     187    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    161188    {
    162189        return QKeySequence("Ctrl+E");
    163190    }
    164191
    165     void retranslateUi()
     192    /** Handles translation event. */
     193    virtual void retranslateUi() /* override */
    166194    {
    167195        setName(QApplication::translate("UIActionPool", "&Export Appliance..."));
     
    171199
    172200#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. */
     202class UIActionSimpleSelectorShowExtraDataManager : public UIActionSimple
     203{
     204    Q_OBJECT;
     205
     206public:
     207
     208    /** Constructs action passing @a pParent to the base-class. */
     209    UIActionSimpleSelectorShowExtraDataManager(UIActionPool *pParent)
     210        : UIActionSimple(pParent, ":/edataman_16px.png")
     211    {}
     212
     213protected:
     214
     215    /** Returns shortcut extra-data ID. */
     216    virtual QString shortcutExtraDataID() const /* override */
    185217    {
    186218        return QString("ExtraDataManager");
    187219    }
    188220
    189     QKeySequence defaultShortcut(UIActionPoolType) const
     221    /** Returns default shortcut. */
     222    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    190223    {
    191224        return QKeySequence("Ctrl+X");
    192225    }
    193226
    194     void retranslateUi()
     227    /** Handles translation event. */
     228    virtual void retranslateUi() /* override */
    195229    {
    196230        setName(QApplication::translate("UIActionPool", "E&xtra Data Manager..."));
     
    200234#endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
    201235
    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. */
     237class UIActionSimpleSelectorPerformExit : public UIActionSimple
     238{
     239    Q_OBJECT;
     240
     241public:
     242
     243    /** Constructs action passing @a pParent to the base-class. */
     244    UIActionSimpleSelectorPerformExit(UIActionPool *pParent)
    209245        : UIActionSimple(pParent, ":/exit_16px.png")
    210246    {
     
    214250protected:
    215251
    216     QString shortcutExtraDataID() const
     252    /** Returns shortcut extra-data ID. */
     253    virtual QString shortcutExtraDataID() const /* override */
    217254    {
    218255        return QString("Exit");
    219256    }
    220257
    221     QKeySequence defaultShortcut(UIActionPoolType) const
     258    /** Returns default shortcut. */
     259    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    222260    {
    223261        return QKeySequence("Ctrl+Q");
    224262    }
    225263
    226     void retranslateUi()
     264    /** Handles translation event. */
     265    virtual void retranslateUi() /* override */
    227266    {
    228267        setName(QApplication::translate("UIActionPool", "E&xit"));
     
    232271
    233272
    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. */
     274class UIActionMenuSelectorGroup : public UIActionMenu
     275{
     276    Q_OBJECT;
     277
     278public:
     279
     280    /** Constructs action passing @a pParent to the base-class. */
     281    UIActionMenuSelectorGroup(UIActionPool *pParent)
     282        : UIActionMenu(pParent)
     283    {}
     284
     285protected:
     286
     287    /** Handles translation event. */
     288    virtual void retranslateUi() /* override */
    246289    {
    247290        setName(QApplication::translate("UIActionPool", "&Group"));
     
    249292};
    250293
    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. */
     295class UIActionSimpleSelectorGroupMachineNew : public UIActionSimple
     296{
     297    Q_OBJECT;
     298
     299public:
     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
     306protected:
     307
     308    /** Returns shortcut extra-data ID. */
     309    virtual QString shortcutExtraDataID() const /* override */
    263310    {
    264311        return QString("NewVM");
    265312    }
    266313
    267     QKeySequence defaultShortcut(UIActionPoolType) const
     314    /** Returns default shortcut. */
     315    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    268316    {
    269317        return QKeySequence("Ctrl+N");
    270318    }
    271319
    272     void retranslateUi()
     320    /** Handles translation event. */
     321    virtual void retranslateUi() /* override */
    273322    {
    274323        setName(QApplication::translate("UIActionPool", "&New Machine..."));
     
    279328};
    280329
    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. */
     331class UIActionSimpleSelectorGroupMachineAdd : public UIActionSimple
     332{
     333    Q_OBJECT;
     334
     335public:
     336
     337    /** Constructs action passing @a pParent to the base-class. */
     338    UIActionSimpleSelectorGroupMachineAdd(UIActionPool *pParent)
     339        : UIActionSimple(pParent, ":/vm_add_16px.png")
     340    {}
     341
     342protected:
     343
     344    /** Returns shortcut extra-data ID. */
     345    virtual QString shortcutExtraDataID() const /* override */
    293346    {
    294347        return QString("AddVM");
    295348    }
    296349
    297     QKeySequence defaultShortcut(UIActionPoolType) const
     350    /** Returns default shortcut. */
     351    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    298352    {
    299353        return QKeySequence("Ctrl+A");
    300354    }
    301355
    302     void retranslateUi()
     356    /** Handles translation event. */
     357    virtual void retranslateUi() /* override */
    303358    {
    304359        setName(QApplication::translate("UIActionPool", "&Add Machine..."));
     
    307362};
    308363
    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. */
     365class UIActionSimpleSelectorGroupRename : public UIActionSimple
     366{
     367    Q_OBJECT;
     368
     369public:
     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
     376protected:
     377
     378    /** Returns shortcut extra-data ID. */
     379    virtual QString shortcutExtraDataID() const /* override */
    321380    {
    322381        return QString("RenameVMGroup");
    323382    }
    324383
    325     QKeySequence defaultShortcut(UIActionPoolType) const
     384    /** Returns default shortcut. */
     385    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    326386    {
    327387        return QKeySequence("Ctrl+M");
    328388    }
    329389
    330     void retranslateUi()
     390    /** Handles translation event. */
     391    virtual void retranslateUi() /* override */
    331392    {
    332393        setName(QApplication::translate("UIActionPool", "Rena&me Group..."));
     
    335396};
    336397
    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. */
     399class UIActionSimpleSelectorGroupRemove : public UIActionSimple
     400{
     401    Q_OBJECT;
     402
     403public:
     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
     410protected:
     411
     412    /** Returns shortcut extra-data ID. */
     413    virtual QString shortcutExtraDataID() const /* override */
    349414    {
    350415        return QString("AddVMGroup");
    351416    }
    352417
    353     QKeySequence defaultShortcut(UIActionPoolType) const
     418    /** Returns default shortcut. */
     419    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    354420    {
    355421        return QKeySequence("Ctrl+U");
    356422    }
    357423
    358     void retranslateUi()
     424    /** Handles translation event. */
     425    virtual void retranslateUi() /* override */
    359426    {
    360427        setName(QApplication::translate("UIActionPool", "&Ungroup"));
     
    363430};
    364431
    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. */
     433class UIActionSimpleSelectorGroupSort : public UIActionSimple
     434{
     435    Q_OBJECT;
     436
     437public:
     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
     444protected:
     445
     446    /** Returns shortcut extra-data ID. */
     447    virtual QString shortcutExtraDataID() const /* override */
    377448    {
    378449        return QString("SortGroup");
    379450    }
    380451
    381     void retranslateUi()
     452    /** Handles translation event. */
     453    virtual void retranslateUi() /* override */
    382454    {
    383455        setName(QApplication::translate("UIActionPool", "&Sort"));
     
    387459
    388460
    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. */
     462class UIActionMenuSelectorMachine : public UIActionMenu
     463{
     464    Q_OBJECT;
     465
     466public:
     467
     468    /** Constructs action passing @a pParent to the base-class. */
     469    UIActionMenuSelectorMachine(UIActionPool *pParent)
     470        : UIActionMenu(pParent)
     471    {}
     472
     473protected:
     474
     475    /** Handles translation event. */
     476    virtual void retranslateUi() /* override */
    401477    {
    402478        setName(QApplication::translate("UIActionPool", "&Machine"));
     
    404480};
    405481
    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. */
     483class UIActionSimpleSelectorMachineNew : public UIActionSimple
     484{
     485    Q_OBJECT;
     486
     487public:
     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
     494protected:
     495
     496    /** Returns shortcut extra-data ID. */
     497    virtual QString shortcutExtraDataID() const /* override */
    418498    {
    419499        return QString("NewVM");
    420500    }
    421501
    422     QKeySequence defaultShortcut(UIActionPoolType) const
     502    /** Returns default shortcut. */
     503    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    423504    {
    424505        return QKeySequence("Ctrl+N");
    425506    }
    426507
    427     void retranslateUi()
     508    /** Handles translation event. */
     509    virtual void retranslateUi() /* override */
    428510    {
    429511        setName(QApplication::translate("UIActionPool", "&New..."));
     
    434516};
    435517
    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. */
     519class UIActionSimpleSelectorMachineAdd : public UIActionSimple
     520{
     521    Q_OBJECT;
     522
     523public:
     524
     525    /** Constructs action passing @a pParent to the base-class. */
     526    UIActionSimpleSelectorMachineAdd(UIActionPool *pParent)
     527        : UIActionSimple(pParent, ":/vm_add_16px.png")
     528    {}
     529
     530protected:
     531
     532    /** Returns shortcut extra-data ID. */
     533    virtual QString shortcutExtraDataID() const /* override */
    448534    {
    449535        return QString("AddVM");
    450536    }
    451537
    452     QKeySequence defaultShortcut(UIActionPoolType) const
     538    /** Returns default shortcut. */
     539    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    453540    {
    454541        return QKeySequence("Ctrl+A");
    455542    }
    456543
    457     void retranslateUi()
     544    /** Handles translation event. */
     545    virtual void retranslateUi() /* override */
    458546    {
    459547        setName(QApplication::translate("UIActionPool", "&Add..."));
     
    462550};
    463551
    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. */
     553class UIActionSimpleSelectorMachineGroup : public UIActionSimple
     554{
     555    Q_OBJECT;
     556
     557public:
     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
     564protected:
     565
     566    /** Returns shortcut extra-data ID. */
     567    virtual QString shortcutExtraDataID() const /* override */
    476568    {
    477569        return QString("AddVMGroup");
    478570    }
    479571
    480     QKeySequence defaultShortcut(UIActionPoolType) const
     572    /** Returns default shortcut. */
     573    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    481574    {
    482575        return QKeySequence("Ctrl+U");
    483576    }
    484577
    485     void retranslateUi()
     578    /** Handles translation event. */
     579    virtual void retranslateUi() /* override */
    486580    {
    487581        setName(QApplication::translate("UIActionPool", "Gro&up"));
     
    490584};
    491585
    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. */
     587class UIActionSimpleSelectorMachineShowSettings : public UIActionSimple
     588{
     589    Q_OBJECT;
     590
     591public:
     592
     593    /** Constructs action passing @a pParent to the base-class. */
     594    UIActionSimpleSelectorMachineShowSettings(UIActionPool *pParent)
    499595        : UIActionSimple(pParent,
    500596                         ":/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
     600protected:
     601
     602    /** Returns shortcut extra-data ID. */
     603    virtual QString shortcutExtraDataID() const /* override */
    506604    {
    507605        return QString("SettingsVM");
    508606    }
    509607
    510     QKeySequence defaultShortcut(UIActionPoolType) const
     608    /** Returns default shortcut. */
     609    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    511610    {
    512611        return QKeySequence("Ctrl+S");
    513612    }
    514613
    515     void retranslateUi()
     614    /** Handles translation event. */
     615    virtual void retranslateUi() /* override */
    516616    {
    517617        setName(QApplication::translate("UIActionPool", "&Settings..."));
     
    522622};
    523623
    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. */
     625class UIActionSimpleSelectorMachineClone : public UIActionSimple
     626{
     627    Q_OBJECT;
     628
     629public:
     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
     636protected:
     637
     638    /** Returns shortcut extra-data ID. */
     639    virtual QString shortcutExtraDataID() const /* override */
    536640    {
    537641        return QString("CloneVM");
    538642    }
    539643
    540     QKeySequence defaultShortcut(UIActionPoolType) const
     644    /** Returns default shortcut. */
     645    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    541646    {
    542647        return QKeySequence("Ctrl+O");
    543648    }
    544649
    545     void retranslateUi()
     650    /** Handles translation event. */
     651    virtual void retranslateUi() /* override */
    546652    {
    547653        setName(QApplication::translate("UIActionPool", "Cl&one..."));
     
    550656};
    551657
    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. */
     659class UIActionSimpleSelectorMachineRemove : public UIActionSimple
     660{
     661    Q_OBJECT;
     662
     663public:
     664
     665    /** Constructs action passing @a pParent to the base-class. */
     666    UIActionSimpleSelectorMachineRemove(UIActionPool *pParent)
    559667        : UIActionSimple(pParent,
    560668                         ":/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
     672protected:
     673
     674    /** Returns shortcut extra-data ID. */
     675    virtual QString shortcutExtraDataID() const /* override */
    566676    {
    567677        return QString("RemoveVM");
    568678    }
    569679
    570     QKeySequence defaultShortcut(UIActionPoolType) const
     680    /** Returns default shortcut. */
     681    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    571682    {
    572683        return QKeySequence("Ctrl+R");
    573684    }
    574685
    575     void retranslateUi()
     686    /** Handles translation event. */
     687    virtual void retranslateUi() /* override */
    576688    {
    577689        setName(QApplication::translate("UIActionPool", "&Remove..."));
     
    580692};
    581693
    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. */
     695class UIActionSimpleSelectorMachineSortParent : public UIActionSimple
     696{
     697    Q_OBJECT;
     698
     699public:
     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
     706protected:
     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. */
     724class UIActionStateSelectorCommonStartOrShow : public UIActionPolymorphicMenu
     725{
     726    Q_OBJECT;
     727
     728public:
     729
     730    /** Constructs action passing @a pParent to the base-class. */
     731    UIActionStateSelectorCommonStartOrShow(UIActionPool *pParent)
    590732        : UIActionPolymorphicMenu(pParent,
    591733                                  ":/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
     737protected:
     738
     739    /** Returns shortcut extra-data ID. */
     740    virtual QString shortcutExtraDataID() const /* override */
    597741    {
    598742        return QString("StartVM");
    599743    }
    600744
    601     void retranslateUi()
     745    /** Handles translation event. */
     746    virtual void retranslateUi() /* override */
    602747    {
    603748        switch (state())
     
    627772};
    628773
    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. */
     775class UIActionSimpleSelectorCommonStartNormal : public UIActionSimple
     776{
     777    Q_OBJECT;
     778
     779public:
     780
     781    /** Constructs action passing @a pParent to the base-class. */
     782    UIActionSimpleSelectorCommonStartNormal(UIActionPool *pParent)
     783        : UIActionSimple(pParent, ":/vm_start_16px.png")
     784    {}
     785
     786protected:
     787
     788    /** Returns shortcut extra-data ID. */
     789    virtual QString shortcutExtraDataID() const /* override */
    641790    {
    642791        return QString("StartVMNormal");
    643792    }
    644793
    645     void retranslateUi()
     794    /** Handles translation event. */
     795    virtual void retranslateUi() /* override */
    646796    {
    647797        setName(QApplication::translate("UIActionPool", "&Normal Start"));
     
    650800};
    651801
    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. */
     803class UIActionSimpleSelectorCommonStartHeadless : public UIActionSimple
     804{
     805    Q_OBJECT;
     806
     807public:
     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
     814protected:
     815
     816    /** Returns shortcut extra-data ID. */
     817    virtual QString shortcutExtraDataID() const /* override */
    664818    {
    665819        return QString("StartVMHeadless");
    666820    }
    667821
    668     void retranslateUi()
     822    /** Handles translation event. */
     823    virtual void retranslateUi() /* override */
    669824    {
    670825        setName(QApplication::translate("UIActionPool", "&Headless Start"));
     
    673828};
    674829
    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. */
     831class UIActionSimpleSelectorCommonStartDetachable : public UIActionSimple
     832{
     833    Q_OBJECT;
     834
     835public:
     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
     842protected:
     843
     844    /** Returns shortcut extra-data ID. */
     845    virtual QString shortcutExtraDataID() const /* override */
    687846    {
    688847        return QString("StartVMDetachable");
    689848    }
    690849
    691     void retranslateUi()
     850    /** Handles translation event. */
     851    virtual void retranslateUi() /* override */
    692852    {
    693853        setName(QApplication::translate("UIActionPool", "&Detachable Start"));
     
    696856};
    697857
    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. */
     859class UIActionToggleSelectorCommonPauseAndResume : public UIActionToggle
     860{
     861    Q_OBJECT;
     862
     863public:
     864
     865    /** Constructs action passing @a pParent to the base-class. */
     866    UIActionToggleSelectorCommonPauseAndResume(UIActionPool *pParent)
    705867        : UIActionToggle(pParent,
    706868                         ":/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
     872protected:
     873
     874    /** Returns shortcut extra-data ID. */
     875    virtual QString shortcutExtraDataID() const /* override */
    712876    {
    713877        return QString("PauseVM");
    714878    }
    715879
    716     QKeySequence defaultShortcut(UIActionPoolType) const
     880    /** Returns default shortcut. */
     881    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    717882    {
    718883        return QKeySequence("Ctrl+P");
    719884    }
    720885
    721     void retranslateUi()
     886    /** Handles translation event. */
     887    virtual void retranslateUi() /* override */
    722888    {
    723889        setName(QApplication::translate("UIActionPool", "&Pause"));
     
    726892};
    727893
    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. */
     895class UIActionSimpleSelectorCommonReset : public UIActionSimple
     896{
     897    Q_OBJECT;
     898
     899public:
     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
     906protected:
     907
     908    /** Returns shortcut extra-data ID. */
     909    virtual QString shortcutExtraDataID() const /* override */
    740910    {
    741911        return QString("ResetVM");
    742912    }
    743913
    744     QKeySequence defaultShortcut(UIActionPoolType) const
     914    /** Returns default shortcut. */
     915    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    745916    {
    746917        return QKeySequence("Ctrl+T");
    747918    }
    748919
    749     void retranslateUi()
     920    /** Handles translation event. */
     921    virtual void retranslateUi() /* override */
    750922    {
    751923        setName(QApplication::translate("UIActionPool", "&Reset"));
     
    754926};
    755927
    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. */
     929class UIActionSimpleSelectorCommonDiscard : public UIActionSimple
     930{
     931    Q_OBJECT;
     932
     933public:
     934
     935    /** Constructs action passing @a pParent to the base-class. */
     936    UIActionSimpleSelectorCommonDiscard(UIActionPool *pParent)
    763937        : UIActionSimple(pParent,
    764938                         ":/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
     942protected:
     943
     944    /** Returns shortcut extra-data ID. */
     945    virtual QString shortcutExtraDataID() const /* override */
    770946    {
    771947        return QString("DiscardVM");
    772948    }
    773949
    774     QKeySequence defaultShortcut(UIActionPoolType) const
     950    /** Returns default shortcut. */
     951    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    775952    {
    776953        return QKeySequence("Ctrl+J");
    777954    }
    778955
    779     void retranslateUi()
     956    /** Handles translation event. */
     957    virtual void retranslateUi() /* override */
    780958    {
    781959        setIconText(QApplication::translate("UIActionPool", "Discard"));
     
    787965};
    788966
    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. */
     968class UIActionSimpleSelectorCommonShowLogs : public UIActionSimple
     969{
     970    Q_OBJECT;
     971
     972public:
     973
     974    /** Constructs action passing @a pParent to the base-class. */
     975    UIActionSimpleSelectorCommonShowLogs(UIActionPool *pParent)
    796976        : UIActionSimple(pParent,
    797977                         ":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png",
     
    803983protected:
    804984
    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 */
    811993    {
    812994        return QKeySequence("Ctrl+L");
    813995    }
    814996
    815     void retranslateUi()
     997    /** Handles translation event. */
     998    virtual void retranslateUi() /* override */
    816999    {
    8171000        setName(QApplication::translate("UIActionPool", "Show &Log..."));
     
    8201003};
    8211004
    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. */
     1006class UIActionSimpleSelectorCommonRefresh : public UIActionSimple
     1007{
     1008    Q_OBJECT;
     1009
     1010public:
     1011
     1012    /** Constructs action passing @a pParent to the base-class. */
     1013    UIActionSimpleSelectorCommonRefresh(UIActionPool *pParent)
    8291014        : UIActionSimple(pParent,
    8301015                         ":/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
     1019protected:
     1020
     1021    /** Returns shortcut extra-data ID. */
     1022    virtual QString shortcutExtraDataID() const /* override */
    8361023    {
    8371024        return QString("RefreshVM");
    8381025    }
    8391026
    840     void retranslateUi()
     1027    /** Handles translation event. */
     1028    virtual void retranslateUi() /* override */
    8411029    {
    8421030        setName(QApplication::translate("UIActionPool", "Re&fresh"));
     
    8451033};
    8461034
    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. */
     1036class UIActionSimpleSelectorCommonShowInFileManager : public UIActionSimple
     1037{
     1038    Q_OBJECT;
     1039
     1040public:
     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
     1047protected:
     1048
     1049    /** Returns shortcut extra-data ID. */
     1050    virtual QString shortcutExtraDataID() const /* override */
    8591051    {
    8601052        return QString("ShowVMInFileManager");
    8611053    }
    8621054
    863     void retranslateUi()
     1055    /** Handles translation event. */
     1056    virtual void retranslateUi() /* override */
    8641057    {
    8651058#if defined(VBOX_WS_MAC)
     
    8761069};
    8771070
    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. */
     1072class UIActionSimpleSelectorCommonCreateShortcut : public UIActionSimple
     1073{
     1074    Q_OBJECT;
     1075
     1076public:
     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
     1083protected:
     1084
     1085    /** Returns shortcut extra-data ID. */
     1086    virtual QString shortcutExtraDataID() const /* override */
    8901087    {
    8911088        return QString("CreateVMAlias");
    8921089    }
    8931090
    894     void retranslateUi()
     1091    /** Handles translation event. */
     1092    virtual void retranslateUi() /* override */
    8951093    {
    8961094#if defined(VBOX_WS_MAC)
     
    9041102};
    9051103
    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. */
     1106class UIActionToggleSelectorToolsMachine : public UIActionToggle
     1107{
     1108    Q_OBJECT;
     1109
     1110public:
     1111
     1112    /** Constructs action passing @a pParent to the base-class. */
     1113    UIActionToggleSelectorToolsMachine(UIActionPool *pParent)
     1114        : UIActionToggle(pParent, ":/tools_machine_32px.png")
     1115    {}
     1116
     1117protected:
     1118
     1119    /** Returns shortcut extra-data ID. */
     1120    virtual QString shortcutExtraDataID() const /* override */
    9421121    {
    9431122        return QString("ToolsMachine");
    9441123    }
    9451124
    946     void retranslateUi()
     1125    /** Handles translation event. */
     1126    virtual void retranslateUi() /* override */
    9471127    {
    9481128        setName(QApplication::translate("UIActionPool", "&Machine Tools"));
     
    9511131};
    9521132
    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. */
     1134class UIActionMenuSelectorToolsMachine : public UIActionMenu
     1135{
     1136    Q_OBJECT;
     1137
     1138public:
     1139
     1140    /** Constructs action passing @a pParent to the base-class. */
     1141    UIActionMenuSelectorToolsMachine(UIActionPool *pParent)
     1142        : UIActionMenu(pParent)
     1143    {}
     1144
     1145protected:
     1146
     1147    /** Returns shortcut extra-data ID. */
     1148    virtual QString shortcutExtraDataID() const /* override */
    9651149    {
    9661150        return QString("ToolsMachineMenu");
    9671151    }
    9681152
    969     void retranslateUi()
     1153    /** Handles translation event. */
     1154    virtual void retranslateUi() /* override */
    9701155    {
    9711156        setName(QApplication::translate("UIActionPool", "&Machine Tools Menu"));
     
    9741159};
    9751160
    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. */
     1162class UIActionSimpleSelectorToolsOpenMachineDetails : public UIActionSimple
     1163{
     1164    Q_OBJECT;
     1165
     1166public:
     1167
     1168    /** Constructs action passing @a pParent to the base-class. */
     1169    UIActionSimpleSelectorToolsOpenMachineDetails(UIActionPool *pParent)
    9831170        : UIActionSimple(pParent,
    9841171                         ":/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
     1175protected:
     1176
     1177    /** Returns shortcut extra-data ID. */
     1178    virtual QString shortcutExtraDataID() const /* override */
    9901179    {
    9911180        return QString("ToolsMachineDetails");
    9921181    }
    9931182
    994     void retranslateUi()
     1183    /** Handles translation event. */
     1184    virtual void retranslateUi() /* override */
    9951185    {
    9961186        setName(QApplication::translate("UIActionPool", "&Details"));
     
    9991189};
    10001190
    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. */
     1192class UIActionSimpleSelectorToolsOpenMachineSnapshots : public UIActionSimple
     1193{
     1194    Q_OBJECT;
     1195
     1196public:
     1197
     1198    /** Constructs action passing @a pParent to the base-class. */
     1199    UIActionSimpleSelectorToolsOpenMachineSnapshots(UIActionPool *pParent)
    10081200        : UIActionSimple(pParent,
    10091201                         ":/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
     1205protected:
     1206
     1207    /** Returns shortcut extra-data ID. */
     1208    virtual QString shortcutExtraDataID() const /* override */
    10151209    {
    10161210        return QString("ToolsMachineSnapshots");
    10171211    }
    10181212
    1019     void retranslateUi()
     1213    /** Handles translation event. */
     1214    virtual void retranslateUi() /* override */
    10201215    {
    10211216        setName(QApplication::translate("UIActionPool", "&Snapshots"));
     
    10241219};
    10251220
    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. */
     1222class UIActionSimpleSelectorToolsOpenMachineLogs : public UIActionSimple
     1223{
     1224    Q_OBJECT;
     1225
     1226public:
     1227
     1228    /** Constructs action passing @a pParent to the base-class. */
     1229    UIActionSimpleSelectorToolsOpenMachineLogs(UIActionPool *pParent)
    10331230        : UIActionSimple(pParent,
    10341231                         ":/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
     1235protected:
     1236
     1237    /** Returns shortcut extra-data ID. */
     1238    virtual QString shortcutExtraDataID() const /* override */
    10401239    {
    10411240        return QString("ToolsMachineLogViewer");
    10421241    }
    10431242
    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. */
     1253class UIActionToggleSelectorToolsGlobal : public UIActionToggle
     1254{
     1255    Q_OBJECT;
     1256
     1257public:
     1258
     1259    /** Constructs action passing @a pParent to the base-class. */
     1260    UIActionToggleSelectorToolsGlobal(UIActionPool *pParent)
     1261        : UIActionToggle(pParent, ":/tools_global_32px.png")
     1262    {}
     1263
     1264protected:
     1265
     1266    /** Returns shortcut extra-data ID. */
     1267    virtual QString shortcutExtraDataID() const /* override */
    10641268    {
    10651269        return QString("ToolsGlobal");
    10661270    }
    10671271
    1068     void retranslateUi()
     1272    /** Handles translation event. */
     1273    virtual void retranslateUi() /* override */
    10691274    {
    10701275        setName(QApplication::translate("UIActionPool", "&Global Tools"));
     
    10731278};
    10741279
    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. */
     1281class UIActionMenuSelectorToolsGlobal : public UIActionMenu
     1282{
     1283    Q_OBJECT;
     1284
     1285public:
     1286
     1287    /** Constructs action passing @a pParent to the base-class. */
     1288    UIActionMenuSelectorToolsGlobal(UIActionPool *pParent)
     1289        : UIActionMenu(pParent)
     1290    {}
     1291
     1292protected:
     1293
     1294    /** Returns shortcut extra-data ID. */
     1295    virtual QString shortcutExtraDataID() const /* override */
    10871296    {
    10881297        return QString("ToolsGlobalMenu");
    10891298    }
    10901299
    1091     void retranslateUi()
     1300    /** Handles translation event. */
     1301    virtual void retranslateUi() /* override */
    10921302    {
    10931303        setName(QApplication::translate("UIActionPool", "&Global Tools Menu"));
     
    10961306};
    10971307
    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. */
     1309class UIActionSimpleSelectorToolsGlobalVirtualMediaManager : public UIActionSimple
     1310{
     1311    Q_OBJECT;
     1312
     1313public:
     1314
     1315    /** Constructs action passing @a pParent to the base-class. */
     1316    UIActionSimpleSelectorToolsGlobalVirtualMediaManager(UIActionPool *pParent)
    11051317        : UIActionSimple(pParent,
    11061318                         ":/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
     1322protected:
     1323
     1324    /** Returns shortcut extra-data ID. */
     1325    virtual QString shortcutExtraDataID() const /* override */
    11121326    {
    11131327        return QString("ToolsGlobalVirtualMediaManager");
    11141328    }
    11151329
    1116     void retranslateUi()
     1330    /** Handles translation event. */
     1331    virtual void retranslateUi() /* override */
    11171332    {
    11181333        setName(QApplication::translate("UIActionPool", "&Virtual Media Manager"));
     
    11211336};
    11221337
    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. */
     1339class UIActionSimpleSelectorToolsGlobalHostNetworkManager : public UIActionSimple
     1340{
     1341    Q_OBJECT;
     1342
     1343public:
     1344
     1345    /** Constructs action passing @a pParent to the base-class. */
     1346    UIActionSimpleSelectorToolsGlobalHostNetworkManager(UIActionPool *pParent)
    11301347        : UIActionSimple(pParent,
    11311348                         ":/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
     1352protected:
     1353
     1354    /** Returns shortcut extra-data ID. */
     1355    virtual QString shortcutExtraDataID() const /* override */
    11371356    {
    11381357        return QString("ToolsGlobalHostNetworkManager");
    11391358    }
    11401359
    1141     void retranslateUi()
     1360    /** Handles translation event. */
     1361    virtual void retranslateUi() /* override */
    11421362    {
    11431363        setName(QApplication::translate("UIActionPool", "&Host Network Manager"));
     
    11471367
    11481368
    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. */
     1370class UIActionMenuSelectorClose : public UIActionMenu
     1371{
     1372    Q_OBJECT;
     1373
     1374public:
     1375
     1376    /** Constructs action passing @a pParent to the base-class. */
     1377    UIActionMenuSelectorClose(UIActionPool *pParent)
     1378        : UIActionMenu(pParent, ":/exit_16px.png")
     1379    {}
     1380
     1381protected:
     1382
     1383    /** Handles translation event. */
     1384    virtual void retranslateUi() /* override */
    11611385    {
    11621386        setName(QApplication::translate("UIActionPool", "&Close"));
     
    11641388};
    11651389
    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. */
     1391class UIActionSimpleSelectorPerformDetach : public UIActionSimple
     1392{
     1393    Q_OBJECT;
     1394
     1395public:
     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
     1402protected:
     1403
     1404    /** Returns shortcut extra-data ID. */
     1405    virtual QString shortcutExtraDataID() const /* override */
    11781406    {
    11791407        return QString("DetachUIVM");
    11801408    }
    11811409
    1182     void retranslateUi()
     1410    /** Handles translation event. */
     1411    virtual void retranslateUi() /* override */
    11831412    {
    11841413        setName(QApplication::translate("UIActionPool", "&Detach GUI"));
     
    11871416};
    11881417
    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. */
     1419class UIActionSimpleSelectorPerformSave : public UIActionSimple
     1420{
     1421    Q_OBJECT;
     1422
     1423public:
     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
     1430protected:
     1431
     1432    /** Returns shortcut extra-data ID. */
     1433    virtual QString shortcutExtraDataID() const /* override */
    12011434    {
    12021435        return QString("SaveVM");
    12031436    }
    12041437
    1205     QKeySequence defaultShortcut(UIActionPoolType) const
     1438    /** Returns default shortcut. */
     1439    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    12061440    {
    12071441        return QKeySequence("Ctrl+V");
    12081442    }
    12091443
    1210     void retranslateUi()
     1444    /** Handles translation event. */
     1445    virtual void retranslateUi() /* override */
    12111446    {
    12121447        setName(QApplication::translate("UIActionPool", "&Save State"));
     
    12151450};
    12161451
    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. */
     1453class UIActionSimpleSelectorPerformShutdown : public UIActionSimple
     1454{
     1455    Q_OBJECT;
     1456
     1457public:
     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
     1464protected:
     1465
     1466    /** Returns shortcut extra-data ID. */
     1467    virtual QString shortcutExtraDataID() const /* override */
    12291468    {
    12301469        return QString("ACPIShutdownVM");
    12311470    }
    12321471
    1233     QKeySequence defaultShortcut(UIActionPoolType) const
     1472    /** Returns default shortcut. */
     1473    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    12341474    {
    12351475        return QKeySequence("Ctrl+H");
    12361476    }
    12371477
    1238     void retranslateUi()
     1478    /** Handles translation event. */
     1479    virtual void retranslateUi() /* override */
    12391480    {
    12401481        setName(QApplication::translate("UIActionPool", "ACPI Sh&utdown"));
     
    12431484};
    12441485
    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. */
     1487class UIActionSimpleSelectorPerformPowerOff : public UIActionSimple
     1488{
     1489    Q_OBJECT;
     1490
     1491public:
     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
     1498protected:
     1499
     1500    /** Returns shortcut extra-data ID. */
     1501    virtual QString shortcutExtraDataID() const /* override */
    12571502    {
    12581503        return QString("PowerOffVM");
    12591504    }
    12601505
    1261     QKeySequence defaultShortcut(UIActionPoolType) const
     1506    /** Returns default shortcut. */
     1507    virtual QKeySequence defaultShortcut(UIActionPoolType) const /* override */
    12621508    {
    12631509        return QKeySequence("Ctrl+F");
    12641510    }
    12651511
    1266     void retranslateUi()
     1512    /** Handles translation event. */
     1513    virtual void retranslateUi() /* override */
    12671514    {
    12681515        setName(QApplication::translate("UIActionPool", "Po&wer Off"));
     
    12721519
    12731520
     1521/*********************************************************************************************************************************
     1522*   Class UIActionPoolSelector implementation.                                                                                   *
     1523*********************************************************************************************************************************/
     1524
    12741525UIActionPoolSelector::UIActionPoolSelector(bool fTemporary /* = false */)
    12751526    : UIActionPool(UIActionPoolType_Selector, fTemporary)
     
    12801531{
    12811532    /* 'File' actions: */
    1282     m_pool[UIActionIndexST_M_File] = new UIActionMenuFile(this);
    1283     m_pool[UIActionIndexST_M_File_S_ShowVirtualMediumManager] = new UIActionSimpleVirtualMediumManagerDialog(this);
    1284     m_pool[UIActionIndexST_M_File_S_ShowHostNetworkManager] = new UIActionSimpleHostNetworkManagerDialog(this);
    1285     m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimpleImportApplianceWizard(this);
    1286     m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimpleExportApplianceWizard(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);
    12871538#ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
    1288     m_pool[UIActionIndexST_M_File_S_ShowExtraDataManager] = new UIActionSimpleExtraDataManagerWindow(this);
    1289 #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
    1290     m_pool[UIActionIndexST_M_File_S_Close] = new UIActionSimpleExit(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);
    12911542
    12921543    /* 'Group' actions: */
    1293     m_pool[UIActionIndexST_M_Group] = new UIActionMenuGroup(this);
    1294     m_pool[UIActionIndexST_M_Group_S_New] = new UIActionSimpleGroupNew(this);
    1295     m_pool[UIActionIndexST_M_Group_S_Add] = new UIActionSimpleGroupAdd(this);
    1296     m_pool[UIActionIndexST_M_Group_S_Rename] = new UIActionSimpleGroupRename(this);
    1297     m_pool[UIActionIndexST_M_Group_S_Remove] = new UIActionSimpleGroupRemove(this);
    1298     m_pool[UIActionIndexST_M_Group_M_StartOrShow] = new UIActionStateCommonStartOrShow(this);
    1299     m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartNormal] = new UIActionSimpleStartNormal(this);
    1300     m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartHeadless] = new UIActionSimpleStartHeadless(this);
    1301     m_pool[UIActionIndexST_M_Group_M_StartOrShow_S_StartDetachable] = new UIActionSimpleStartDetachable(this);
    1302     m_pool[UIActionIndexST_M_Group_T_Pause] = new UIActionToggleCommonPauseAndResume(this);
    1303     m_pool[UIActionIndexST_M_Group_S_Reset] = new UIActionSimpleCommonReset(this);
    1304     m_pool[UIActionIndexST_M_Group_M_Close] = new UIActionMenuClose(this);
    1305     m_pool[UIActionIndexST_M_Group_M_Close_S_Detach] = new UIActionSimpleDetach(this);
    1306     m_pool[UIActionIndexST_M_Group_M_Close_S_SaveState] = new UIActionSimpleSave(this);
    1307     m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimpleACPIShutdown(this);
    1308     m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this);
    1309     m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleCommonDiscard(this);
    1310     m_pool[UIActionIndexST_M_Group_S_ShowLogDialog] = new UIActionSimpleCommonShowLogDialog(this);
    1311     m_pool[UIActionIndexST_M_Group_S_Refresh] = new UIActionSimpleCommonRefresh(this);
    1312     m_pool[UIActionIndexST_M_Group_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this);
    1313     m_pool[UIActionIndexST_M_Group_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this);
    1314     m_pool[UIActionIndexST_M_Group_S_Sort] = new UIActionSimpleGroupSort(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);
    13151566
    13161567    /* 'Machine' actions: */
    1317     m_pool[UIActionIndexST_M_Machine] = new UIActionMenuMachineSelector(this);
    1318     m_pool[UIActionIndexST_M_Machine_S_New] = new UIActionSimpleMachineNew(this);
    1319     m_pool[UIActionIndexST_M_Machine_S_Add] = new UIActionSimpleMachineAdd(this);
    1320     m_pool[UIActionIndexST_M_Machine_S_Settings] = new UIActionSimpleMachineSettings(this);
    1321     m_pool[UIActionIndexST_M_Machine_S_Clone] = new UIActionSimpleMachineClone(this);
    1322     m_pool[UIActionIndexST_M_Machine_S_Remove] = new UIActionSimpleMachineRemove(this);
    1323     m_pool[UIActionIndexST_M_Machine_S_AddGroup] = new UIActionSimpleMachineAddGroup(this);
    1324     m_pool[UIActionIndexST_M_Machine_M_StartOrShow] = new UIActionStateCommonStartOrShow(this);
    1325     m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartNormal] = new UIActionSimpleStartNormal(this);
    1326     m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartHeadless] = new UIActionSimpleStartHeadless(this);
    1327     m_pool[UIActionIndexST_M_Machine_M_StartOrShow_S_StartDetachable] = new UIActionSimpleStartDetachable(this);
    1328     m_pool[UIActionIndexST_M_Machine_T_Pause] = new UIActionToggleCommonPauseAndResume(this);
    1329     m_pool[UIActionIndexST_M_Machine_S_Reset] = new UIActionSimpleCommonReset(this);
    1330     m_pool[UIActionIndexST_M_Machine_M_Close] = new UIActionMenuClose(this);
    1331     m_pool[UIActionIndexST_M_Machine_M_Close_S_Detach] = new UIActionSimpleDetach(this);
    1332     m_pool[UIActionIndexST_M_Machine_M_Close_S_SaveState] = new UIActionSimpleSave(this);
    1333     m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimpleACPIShutdown(this);
    1334     m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this);
    1335     m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleCommonDiscard(this);
    1336     m_pool[UIActionIndexST_M_Machine_S_ShowLogDialog] = new UIActionSimpleCommonShowLogDialog(this);
    1337     m_pool[UIActionIndexST_M_Machine_S_Refresh] = new UIActionSimpleCommonRefresh(this);
    1338     m_pool[UIActionIndexST_M_Machine_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this);
    1339     m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this);
    1340     m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleMachineSortParent(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);
    13411592
    13421593    /* Machine Tools actions: */
    1343     m_pool[UIActionIndexST_M_Tools_T_Machine] = new UIActionToggleToolsMachine(this);
    1344     m_pool[UIActionIndexST_M_Tools_M_Machine] = new UIActionMenuToolsMachine(this);
    1345     m_pool[UIActionIndexST_M_Tools_M_Machine_S_Details] = new UIActionSimpleToolsMachineDetails(this);
    1346     m_pool[UIActionIndexST_M_Tools_M_Machine_S_Snapshots] = new UIActionSimpleToolsMachineSnapshots(this);
    1347     m_pool[UIActionIndexST_M_Tools_M_Machine_S_LogViewer] = new UIActionSimpleToolsMachineLogViewer(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);
    13481599
    13491600    /* Global Tools actions: */
    1350     m_pool[UIActionIndexST_M_Tools_T_Global] = new UIActionToggleToolsGlobal(this);
    1351     m_pool[UIActionIndexST_M_Tools_M_Global] = new UIActionMenuToolsGlobal(this);
    1352     m_pool[UIActionIndexST_M_Tools_M_Global_S_VirtualMediaManager] = new UIActionSimpleToolsGlobalVirtualMediaManager(this);
    1353     m_pool[UIActionIndexST_M_Tools_M_Global_S_HostNetworkManager] = new UIActionSimpleToolsGlobalHostNetworkManager(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);
    13541605
    13551606    /* Call to base-class: */
     
    13871638}
    13881639
     1640
    13891641#include "UIActionPoolSelector.moc"
    13901642
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h

    r71027 r71621  
    55
    66/*
    7  * Copyright (C) 2010-2017 Oracle Corporation
     7 * Copyright (C) 2010-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    2121/* GUI includes: */
    2222#include "UIActionPool.h"
     23
    2324
    2425/** Runtime action-pool index enum.
     
    109110};
    110111
     112
    111113/** UIActionPool extension
    112114  * representing action-pool singleton for Selector UI. */
     
    117119protected:
    118120
    119     /** Constructor,
    120       * @param fTemporary is used to determine whether 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. */
    122124    UIActionPoolSelector(bool fTemporary = false);
    123125
    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 */;
    128130
    129     /** Update menus routine. */
    130     virtual void updateMenus();
     131    /** Updates menus. */
     132    virtual void updateMenus() /* override */;
    131133
    132     /** Update shortcuts. */
    133     virtual void updateShortcuts();
     134    /** Updates shortcuts. */
     135    virtual void updateShortcuts() /* override */;
    134136
    135137    /** Returns extra-data ID to save keyboard shortcuts under. */
    136     virtual QString shortcutsExtraDataID() const;
     138    virtual QString shortcutsExtraDataID() const /* override */;
    137139
    138140    /** 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*>(); }
    140142
    141143private:
    142144
    143     /* Enable factory in base-class: */
     145    /** Enables factory in base-class. */
    144146    friend class UIActionPool;
    145147};
    146148
     149
    147150#endif /* !___UIActionPoolSelector_h___ */
     151
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette