VirtualBox

Ignore:
Timestamp:
Sep 18, 2015 2:35:35 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector-window cleanup/rework (step 2): Formatting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r57829 r57830  
    5151      * @param ppSelf brings the pointer to pointer to this window instance used by the external caller.
    5252      * @param flags  brings the selector-window flags dialogs should have. */
    53     UISelectorWindow(UISelectorWindow **ppSelf,
    54                      QWidget *pParent = 0,
    55                      Qt::WindowFlags flags = Qt::Window);
     53    UISelectorWindow(UISelectorWindow **ppSelf, QWidget *pParent = 0, Qt::WindowFlags flags = Qt::Window);
    5654    /** Destructs selector-window. */
    5755    ~UISelectorWindow();
     
    6260private slots:
    6361
    64     /** Handles CVirtualBox event about state change for machine with @a strId. */
    65     void sltStateChanged(QString strId);
    66     /** Handles CVirtualBox event about snapshot change for machine with @a strId. */
    67     void sltSnapshotChanged(QString strId);
     62    /** @name CVirtualBox event handling stuff.
     63      * @{ */
     64        /** Handles CVirtualBox event about state change for machine with @a strId. */
     65        void sltStateChanged(QString strId);
     66        /** Handles CVirtualBox event about snapshot change for machine with @a strId. */
     67        void sltSnapshotChanged(QString strId);
     68    /** @} */
    6869
    6970    /** Handles signal about Details-view @a iWidgetIndex change. */
     
    7677    void sltShowSelectorContextMenu(const QPoint &pos);
    7778
    78     /** Handles call to open Media Manager dialog. */
    79     void sltShowMediumManager();
    80     /** Handles call to open Import Appliance wizard.
    81       * @param strFileName can bring the name of file to import appliance from. */
    82     void sltShowImportApplianceWizard(const QString &strFileName = QString());
    83     /** Handles call to open Export Appliance wizard. */
    84     void sltShowExportApplianceWizard();
     79    /** @name File menu stuff.
     80      * @{ */
     81        /** Handles call to open Media Manager dialog. */
     82        void sltShowMediumManager();
     83        /** Handles call to open Import Appliance wizard.
     84          * @param strFileName can bring the name of file to import appliance from. */
     85        void sltShowImportApplianceWizard(const QString &strFileName = QString());
     86        /** Handles call to open Export Appliance wizard. */
     87        void sltShowExportApplianceWizard();
    8588#ifdef DEBUG
    86     /** Handles call to open Extra-data Manager dialog. */
    87     void sltOpenExtraDataManagerWindow();
     89        /** Handles call to open Extra-data Manager dialog. */
     90        void sltOpenExtraDataManagerWindow();
    8891#endif /* DEBUG */
    89     /** Handles call to open Preferences dialog. */
    90     void sltShowPreferencesDialog();
    91     /** Handles call to exit application. */
    92     void sltPerformExit();
    93 
    94     /** Handles call to open Add Machine dialog.
    95       * @param strFileName can bring the name of file to add machine from. */
    96     void sltShowAddMachineDialog(const QString &strFileName = QString());
    97     /** Handles call to open Machine Settings dialog.
    98       * @param strCategory can bring the settings category to start from.
    99       * @param strControl  can bring the widget of the page to focus.
    100       * @param strId       can bring the ID of machine to manage. */
    101     void sltShowMachineSettingsDialog(const QString &strCategory = QString(),
    102                                       const QString &strControl = QString(),
    103                                       const QString &strId = QString());
    104     /** Handles call to open Clone Machine wizard. */
    105     void sltShowCloneMachineWizard();
    106     /** Handles call to start or show machine. */
    107     void sltPerformStartOrShowAction();
    108     /** Handles call to start machine in normal mode. */
    109     void sltPerformStartNormal();
    110     /** Handles call to start machine in headless mode. */
    111     void sltPerformStartHeadless();
    112     /** Handles call to start machine in detachable mode. */
    113     void sltPerformStartDetachable();
    114     /** Handles call to discard machine state. */
    115     void sltPerformDiscardAction();
    116     /** Handles call to @a fPause or resume machine otherwise. */
    117     void sltPerformPauseResumeAction(bool fPause);
    118     /** Handles call to reset machine. */
    119     void sltPerformResetAction();
    120     /** Handles call to save machine state. */
    121     void sltPerformSaveAction();
    122     /** Handles call to ask machine for shutdown. */
    123     void sltPerformACPIShutdownAction();
    124     /** Handles call to power machine off. */
    125     void sltPerformPowerOffAction();
    126     /** Handles call to open machine Log dialog. */
    127     void sltShowLogDialog();
    128     /** Handles call to show machine in File Manager. */
    129     void sltShowMachineInFileManager();
    130     /** Handles call to create machine shortcut. */
    131     void sltPerformCreateShortcutAction();
    132     /** Handles call to show group Close menu. */
    133     void sltGroupCloseMenuAboutToShow();
    134     /** Handles call to show machine Close menu. */
    135     void sltMachineCloseMenuAboutToShow();
     92        /** Handles call to open Preferences dialog. */
     93        void sltShowPreferencesDialog();
     94        /** Handles call to exit application. */
     95        void sltPerformExit();
     96    /** @} */
     97
     98    /** @name Machine menu stuff.
     99      * @{ */
     100        /** Handles call to open Add Machine dialog.
     101          * @param strFileName can bring the name of file to add machine from. */
     102        void sltShowAddMachineDialog(const QString &strFileName = QString());
     103        /** Handles call to open Machine Settings dialog.
     104          * @param strCategory can bring the settings category to start from.
     105          * @param strControl  can bring the widget of the page to focus.
     106          * @param strId       can bring the ID of machine to manage. */
     107        void sltShowMachineSettingsDialog(const QString &strCategory = QString(),
     108                                          const QString &strControl = QString(),
     109                                          const QString &strId = QString());
     110        /** Handles call to open Clone Machine wizard. */
     111        void sltShowCloneMachineWizard();
     112        /** Handles call to start or show machine. */
     113        void sltPerformStartOrShowAction();
     114        /** Handles call to start machine in normal mode. */
     115        void sltPerformStartNormal();
     116        /** Handles call to start machine in headless mode. */
     117        void sltPerformStartHeadless();
     118        /** Handles call to start machine in detachable mode. */
     119        void sltPerformStartDetachable();
     120        /** Handles call to discard machine state. */
     121        void sltPerformDiscardAction();
     122        /** Handles call to @a fPause or resume machine otherwise. */
     123        void sltPerformPauseResumeAction(bool fPause);
     124        /** Handles call to reset machine. */
     125        void sltPerformResetAction();
     126        /** Handles call to save machine state. */
     127        void sltPerformSaveAction();
     128        /** Handles call to ask machine for shutdown. */
     129        void sltPerformACPIShutdownAction();
     130        /** Handles call to power machine off. */
     131        void sltPerformPowerOffAction();
     132        /** Handles call to open machine Log dialog. */
     133        void sltShowLogDialog();
     134        /** Handles call to show machine in File Manager. */
     135        void sltShowMachineInFileManager();
     136        /** Handles call to create machine shortcut. */
     137        void sltPerformCreateShortcutAction();
     138        /** Handles call to show group Close menu. */
     139        void sltGroupCloseMenuAboutToShow();
     140        /** Handles call to show machine Close menu. */
     141        void sltMachineCloseMenuAboutToShow();
     142    /** @} */
    136143
    137144    /** Handles signal about Chooser-pane index change.
     
    149156private:
    150157
    151     /** Handles translation event. */
    152     void retranslateUi();
    153 
    154     /** Handles any Qt @a pEvent. */
    155     bool event(QEvent *pEvent);
    156     /** Handles Qt show @a pEvent. */
    157     void showEvent(QShowEvent *pEvent);
    158     /** Handles Qt polish @a pEvent. */
    159     void polishEvent(QShowEvent *pEvent);
     158    /** @name Event handling stuff.
     159      * @{ */
     160        /** Handles translation event. */
     161        void retranslateUi();
     162
     163        /** Handles any Qt @a pEvent. */
     164        bool event(QEvent *pEvent);
     165        /** Handles Qt show @a pEvent. */
     166        void showEvent(QShowEvent *pEvent);
     167        /** Handles Qt polish @a pEvent. */
     168        void polishEvent(QShowEvent *pEvent);
    160169#ifdef Q_WS_MAC
    161     /** Preprocesses any Qt @a pEvent for passed @a pObject. */
    162     bool eventFilter(QObject *pObject, QEvent *pEvent);
     170        /** Preprocesses any Qt @a pEvent for passed @a pObject. */
     171        bool eventFilter(QObject *pObject, QEvent *pEvent);
    163172#endif /* Q_WS_MAC */
    164 
    165     /** Prepares icon. */
    166     void prepareIcon();
    167     /** Prepares menu-bar. */
    168     void prepareMenuBar();
    169     /** Prepares @a pMenu File. */
    170     void prepareMenuFile(QMenu *pMenu);
    171     /** Prepares @a pMenu Group. */
    172     void prepareMenuGroup(QMenu *pMenu);
    173     /** Prepares @a pMenu Machine. */
    174     void prepareMenuMachine(QMenu *pMenu);
    175     /** Prepares @a pMenu Group => Start or Show. */
    176     void prepareMenuGroupStartOrShow(QMenu *pMenu);
    177     /** Prepares @a pMenu Machine => Start or Show. */
    178     void prepareMenuMachineStartOrShow(QMenu *pMenu);
    179     /** Prepares @a pMenu Group => Close. */
    180     void prepareMenuGroupClose(QMenu *pMenu);
    181     /** Prepares @a pMenu Machine => Close. */
    182     void prepareMenuMachineClose(QMenu *pMenu);
    183     /** Prepares status-bar. */
    184     void prepareStatusBar();
    185     /** Prepares widgets. */
    186     void prepareWidgets();
    187     /** Prepares connections. */
    188     void prepareConnections();
    189     /** Loads settings. */
    190     void loadSettings();
    191 
    192     /** Saves settings. */
    193     void saveSettings();
    194     /** Cleanups connections. */
    195     void cleanupConnections();
    196     /** Cleanups menu-bar. */
    197     void cleanupMenuBar();
     173    /** @} */
     174
     175    /** @name Prepare/Cleanup cascade.
     176      * @{ */
     177        /** Prepares icon. */
     178        void prepareIcon();
     179        /** Prepares menu-bar. */
     180        void prepareMenuBar();
     181        /** Prepares @a pMenu File. */
     182        void prepareMenuFile(QMenu *pMenu);
     183        /** Prepares @a pMenu Group. */
     184        void prepareMenuGroup(QMenu *pMenu);
     185        /** Prepares @a pMenu Machine. */
     186        void prepareMenuMachine(QMenu *pMenu);
     187        /** Prepares @a pMenu Group => Start or Show. */
     188        void prepareMenuGroupStartOrShow(QMenu *pMenu);
     189        /** Prepares @a pMenu Machine => Start or Show. */
     190        void prepareMenuMachineStartOrShow(QMenu *pMenu);
     191        /** Prepares @a pMenu Group => Close. */
     192        void prepareMenuGroupClose(QMenu *pMenu);
     193        /** Prepares @a pMenu Machine => Close. */
     194        void prepareMenuMachineClose(QMenu *pMenu);
     195        /** Prepares status-bar. */
     196        void prepareStatusBar();
     197        /** Prepares widgets. */
     198        void prepareWidgets();
     199        /** Prepares connections. */
     200        void prepareConnections();
     201        /** Loads settings. */
     202        void loadSettings();
     203
     204        /** Saves settings. */
     205        void saveSettings();
     206        /** Cleanups connections. */
     207        void cleanupConnections();
     208        /** Cleanups menu-bar. */
     209        void cleanupMenuBar();
     210    /** @} */
    198211
    199212    /** Returns current-item. */
     
    202215    QList<UIVMItem*> currentItems() const;
    203216
    204     /** Performs update of actions appearance. */
    205     void updateActionsAppearance();
    206 
    207     /** Returns whether the action with @a iActionIndex is enabled.
    208       * @param items used to calculate verdict about should the action be enabled. */
    209     bool isActionEnabled(int iActionIndex, const QList<UIVMItem*> &items);
    210 
    211     /** Returns whether all passed @a items are powered off. */
    212     static bool isItemsPoweredOff(const QList<UIVMItem*> &items);
    213     /** Returns whether at least one of passed @a items is able to shutdown. */
    214     static bool isAtLeastOneItemAbleToShutdown(const QList<UIVMItem*> &items);
    215     /** Returns whether at least one of passed @a items supports shortcut creation. */
    216     static bool isAtLeastOneItemSupportsShortcuts(const QList<UIVMItem*> &items);
    217     /** Returns whether at least one of passed @a items is accessible. */
    218     static bool isAtLeastOneItemAccessible(const QList<UIVMItem*> &items);
    219     /** Returns whether at least one of passed @a items is inaccessible. */
    220     static bool isAtLeastOneItemInaccessible(const QList<UIVMItem*> &items);
    221     /** Returns whether at least one of passed @a items is removable. */
    222     static bool isAtLeastOneItemRemovable(const QList<UIVMItem*> &items);
    223     /** Returns whether at least one of passed @a items can be started or shown. */
    224     static bool isAtLeastOneItemCanBeStartedOrShowed(const QList<UIVMItem*> &items);
    225     /** Returns whether at least one of passed @a items can be discarded. */
    226     static bool isAtLeastOneItemDiscardable(const QList<UIVMItem*> &items);
    227     /** Returns whether at least one of passed @a items is started. */
    228     static bool isAtLeastOneItemStarted(const QList<UIVMItem*> &items);
    229     /** Returns whether at least one of passed @a items is running. */
    230     static bool isAtLeastOneItemRunning(const QList<UIVMItem*> &items);
     217    /** @name Action update stuff.
     218      * @{ */
     219        /** Performs update of actions appearance. */
     220        void updateActionsAppearance();
     221
     222        /** Returns whether the action with @a iActionIndex is enabled.
     223          * @param items used to calculate verdict about should the action be enabled. */
     224        bool isActionEnabled(int iActionIndex, const QList<UIVMItem*> &items);
     225
     226        /** Returns whether all passed @a items are powered off. */
     227        static bool isItemsPoweredOff(const QList<UIVMItem*> &items);
     228        /** Returns whether at least one of passed @a items is able to shutdown. */
     229        static bool isAtLeastOneItemAbleToShutdown(const QList<UIVMItem*> &items);
     230        /** Returns whether at least one of passed @a items supports shortcut creation. */
     231        static bool isAtLeastOneItemSupportsShortcuts(const QList<UIVMItem*> &items);
     232        /** Returns whether at least one of passed @a items is accessible. */
     233        static bool isAtLeastOneItemAccessible(const QList<UIVMItem*> &items);
     234        /** Returns whether at least one of passed @a items is inaccessible. */
     235        static bool isAtLeastOneItemInaccessible(const QList<UIVMItem*> &items);
     236        /** Returns whether at least one of passed @a items is removable. */
     237        static bool isAtLeastOneItemRemovable(const QList<UIVMItem*> &items);
     238        /** Returns whether at least one of passed @a items can be started or shown. */
     239        static bool isAtLeastOneItemCanBeStartedOrShowed(const QList<UIVMItem*> &items);
     240        /** Returns whether at least one of passed @a items can be discarded. */
     241        static bool isAtLeastOneItemDiscardable(const QList<UIVMItem*> &items);
     242        /** Returns whether at least one of passed @a items is started. */
     243        static bool isAtLeastOneItemStarted(const QList<UIVMItem*> &items);
     244        /** Returns whether at least one of passed @a items is running. */
     245        static bool isAtLeastOneItemRunning(const QList<UIVMItem*> &items);
     246    /** @} */
    231247
    232248    /** Holds whether the dialog is polished. */
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