VirtualBox

Changeset 66225 in vbox for trunk


Ignore:
Timestamp:
Mar 23, 2017 12:52:03 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Global preferences: Refactoring (doxy and comments).

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/global
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp

    r66223 r66225  
    192192    Ui::UIGlobalSettingsDisplay::retranslateUi(this);
    193193
    194     /* Populate combo-box: */
     194    /* Reload combo-box: */
    195195    reloadMaximumGuestScreenSizePolicyComboBox();
    196196}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.h

    r66223 r66225  
    6262private slots:
    6363
    64     /* Handler: Resolution-combo stuff: */
     64    /** Handles maximum guest-screen size policy change. */
    6565    void sltHandleMaximumGuestScreenSizePolicyChange();
    6666
    6767private:
    6868
    69     /* Helper: Resolution-combo stuff: */
     69    /** Reloads maximum guest-screen size policy combo-box. */
    7070    void reloadMaximumGuestScreenSizePolicyComboBox();
    7171
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp

    r66223 r66225  
    224224                                               QWidget *pParent, QString *pstrExtPackName)
    225225{
    226     /*
    227      * Open the extpack tarball via IExtPackManager.
    228      */
     226    /* Open the extpack tarball via IExtPackManager: */
    229227    CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
    230228    CExtPackFile extPackFile;
     
    252250    const QString strPackVersion = QString("%1r%2%3").arg(extPackFile.GetVersion()).arg(extPackFile.GetRevision()).arg(extPackFile.GetEdition());
    253251
    254     /*
    255      * Check if there is a version of the extension pack already
    256      * installed on the system and let the user decide what to do about
    257      * it.
    258      */
     252    /* Check if there is a version of the extension pack already
     253     * installed on the system and let the user decide what to do about it. */
    259254    CExtPack extPackCur = manager.Find(strPackName);
    260255    bool fReplaceIt = extPackCur.isOk();
     
    265260            return;
    266261    }
    267     /*
    268      * If it's a new package just ask for general confirmation.
    269      */
     262    /* If it's a new package just ask for general confirmation. */
    270263    else
    271264    {
     
    274267    }
    275268
    276     /*
    277      * Display the license dialog if required by the extension pack.
    278      */
     269    /* Display the license dialog if required by the extension pack. */
    279270    if (extPackFile.GetShowLicense())
    280271    {
     
    285276    }
    286277
    287     /*
    288      * Install the selected package.
    289      *
    290      * Set the package name return value before doing this as the caller should
    291      * do a refresh even on failure.
    292      */
     278    /* Install the selected package.
     279     * Set the package name return value before doing
     280     * this as the caller should do a refresh even on failure. */
    293281    QString displayInfo;
    294282#ifdef VBOX_WS_WIN
    295283    if (pParent)
    296284        displayInfo.sprintf("hwnd=%#llx", (uint64_t)(uintptr_t)pParent->winId());
    297 #endif /* VBOX_WS_WIN */
     285#endif
    298286    /* Prepare installation progress: */
    299287    CProgress progress = extPackFile.Install(fReplaceIt, displayInfo);
     
    395383{
    396384    /* Check action's availability: */
    397     //m_pActionAdd->setEnabled(true);
    398385    m_pActionRemove->setEnabled(pCurrentItem);
    399386}
     
    416403void UIGlobalSettingsExtension::sltAddPackage()
    417404{
    418     /*
    419      * Open file-open window to let user to choose package file.
    420      *
     405    /* Open file-open window to let user to choose package file.
    421406     * The default location is the user's Download or Downloads directory with
    422      * the user's home directory as a fallback.  ExtPacks are downloaded.
    423      */
     407     * the user's home directory as a fallback. ExtPacks are downloaded. */
    424408    QString strBaseFolder = QDir::homePath() + "/Downloads";
    425409    if (!QDir(strBaseFolder).exists())
     
    441425        strFilePath = fileNames.at(0);
    442426
    443     /*
    444      * Install the chosen package.
    445      */
     427    /* Install the chosen package: */
    446428    if (!strFilePath.isEmpty())
    447429    {
     
    449431        doInstallation(strFilePath, QString(), this, &strExtPackName);
    450432
    451         /*
    452          * Since we might be reinstalling an existing package, we have to
    453          * do a little refreshing regardless of what the user chose.
    454          */
     433        /* Since we might be reinstalling an existing package, we have to
     434         * do a little refreshing regardless of what the user chose. */
    455435        if (!strExtPackName.isNull())
    456436        {
    457             /* Remove it from the cache. */
     437            /* Remove it from the cache: */
    458438            for (int i = 0; i < m_pCache->data().m_items.size(); ++i)
    459439            {
     
    465445            }
    466446
    467             /* Remove it from the tree. */
     447            /* Remove it from the tree: */
    468448            const int cItems = m_pPackagesTree->topLevelItemCount();
    469449            for (int i = 0; i < cItems; i++)
     
    477457            }
    478458
    479             /* Reinsert it into the cache and tree. */
     459            /* Reinsert it into the cache and tree: */
    480460            CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
    481461            const CExtPack &package = manager.Find(strExtPackName);
     
    509489        if (msgCenter().confirmRemoveExtensionPack(strSelectedPackageName, this))
    510490        {
    511             /*
    512              * Uninstall the package.
    513              */
     491            /* Uninstall the package: */
    514492            CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager();
    515493            /** @todo Refuse this if any VMs are running. */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.h

    r66223 r66225  
    4242    ~UIGlobalSettingsExtension();
    4343
     44    /** Initiates the extension pack installation process.
     45      * @param  strFilePath      Brings the extension pack file path.
     46      * @param  strDigest        Brings the extension pack file digest.
     47      * @param  pParent          Brings the parent dialog reference.
     48      * @param  pstrExtPackName  Brings the extension pack name. */
    4449    static void doInstallation(QString const &strFilePath, QString const &strDigest, QWidget *pParent, QString *pstrExtPackName);
    4550
     
    6570private slots:
    6671
    67     /* Handlers: Tree-widget stuff: */
     72    /** Handles @a pCurrentItem change. */
    6873    void sltHandleCurrentItemChange(QTreeWidgetItem *pCurrentItem);
     74    /** Handles context menu request for @a position. */
    6975    void sltHandleContextMenuRequest(const QPoint &position);
    7076
    71     /* Handlers: Package stuff: */
     77    /** Handles command to add extension pack. */
    7278    void sltAddPackage();
     79    /** Handles command to remove extension pack. */
    7380    void sltRemovePackage();
    7481
    7582private:
    7683
    77     /* Prepare UIDataSettingsGlobalExtensionItem basing on CExtPack: */
     84    /** Uploads @a package data into passed @a item. */
    7885    void loadData(const CExtPack &package, UIDataSettingsGlobalExtensionItem &item) const;
    7986
    80     /* Variables: Actions: */
     87    /** Holds the Add action instance. */
    8188    QAction *m_pActionAdd;
     89    /** Holds the Remove action instance. */
    8290    QAction *m_pActionRemove;
    8391
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r66219 r66225  
    3939#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    4040
     41/* Qt includes: */
    4142#include <QShortcut>
    4243
     
    863864*********************************************************************************************************************************/
    864865
    865 /* Input page constructor: */
    866866UIGlobalSettingsInput::UIGlobalSettingsInput()
    867867    : m_pTabWidget(0)
     
    888888    QVBoxLayout *pSelectorLayout = new QVBoxLayout(pSelectorTab);
    889889#ifndef VBOX_WS_WIN
    890     /* On Windows host that looks ugly, but
    891      * On Mac OS X and X11 that deserves it's place. */
     890    /* On Mac OS X and X11 we can do a bit of smoothness. */
    892891    pSelectorLayout->setContentsMargins(0, 0, 0, 0);
    893 #endif /* !VBOX_WS_WIN */
     892#endif
    894893    pSelectorLayout->setSpacing(1);
    895894    pSelectorLayout->addWidget(m_pSelectorFilterEditor);
     
    908907    QVBoxLayout *pMachineLayout = new QVBoxLayout(pMachineTab);
    909908#ifndef VBOX_WS_WIN
    910     /* On Windows host that looks ugly, but
    911      * On Mac OS X and X11 that deserves it's place. */
     909    /* On Mac OS X and X11 we can do a bit of smoothness. */
    912910    pMachineLayout->setContentsMargins(0, 0, 0, 0);
    913 #endif /* !VBOX_WS_WIN */
     911#endif
    914912    pMachineLayout->setSpacing(1);
    915913    pMachineLayout->addWidget(m_pMachineFilterEditor);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h

    r66223 r66225  
    3838    Q_OBJECT;
    3939
    40     /* Hot-key table indexes: */
     40    /** Hot-key table indexes. */
    4141    enum { UIHotKeyTableIndex_Selector, UIHotKeyTableIndex_Machine };
    4242
     
    6767    virtual bool validate(QList<UIValidationMessage> &messages) /* override */;
    6868
    69     /** Defines TAB order. */
     69    /** Defines TAB order for passed @a pWidget. */
    7070    virtual void setOrderAfter(QWidget *pWidget) /* override */;
    7171
     
    7575private:
    7676
     77    /** Holds the tab-widget instance. */
    7778    QTabWidget         *m_pTabWidget;
     79    /** Holds the Selector UI shortcuts filter instance. */
    7880    QLineEdit          *m_pSelectorFilterEditor;
     81    /** Holds the Selector UI shortcuts model instance. */
    7982    UIHotKeyTableModel *m_pSelectorModel;
     83    /** Holds the Selector UI shortcuts table instance. */
    8084    UIHotKeyTable      *m_pSelectorTable;
     85    /** Holds the Runtime UI shortcuts filter instance. */
    8186    QLineEdit          *m_pMachineFilterEditor;
     87    /** Holds the Runtime UI shortcuts model instance. */
    8288    UIHotKeyTableModel *m_pMachineModel;
     89    /** Holds the Runtime UI shortcuts table instance. */
    8390    UIHotKeyTable      *m_pMachineTable;
    8491
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp

    r66223 r66225  
    3838#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
    3939
     40/* Other VBox includes: */
    4041#include <iprt/err.h>
    4142
     
    204205
    205206
    206 /* Language page constructor: */
    207207UIGlobalSettingsLanguage::UIGlobalSettingsLanguage()
    208208    : m_fPolished(false)
     
    323323}
    324324
    325 void UIGlobalSettingsLanguage::polishEvent(QShowEvent*)
     325void UIGlobalSettingsLanguage::polishEvent(QShowEvent * /* pEvent */)
    326326{
    327327    /* Remember current info-label width: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.h

    r66223 r66225  
    6767private slots:
    6868
    69     /* Handler: List-painting stuff: */
     69    /** Handles @a pItem painting with passed @a pPainter. */
    7070    void sltHandleItemPainting(QTreeWidgetItem *pItem, QPainter *pPainter);
    7171
    72     /* Handler: Current-changed stuff: */
     72    /** Handles @a pCurrentItem change. */
    7373    void sltHandleCurrentItemChange(QTreeWidgetItem *pCurrentItem);
    7474
    7575private:
    7676
    77     /* Helper: List-loading stuff: */
     77    /** Reloads language list, choosing item with @a strLanguageId as current. */
    7878    void reloadLanguageTree(const QString &strLanguageId);
    7979
    80     /* Variables: */
     80    /** Holds whether the page is polished. */
    8181    bool m_fPolished;
    8282
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.h

    r66223 r66225  
    6464    virtual bool validate(QList<UIValidationMessage> &messages) /* override */;
    6565
    66     /** Defines TAB order. */
     66    /** Defines TAB order for passed @a pWidget. */
    6767    virtual void setOrderAfter(QWidget *pWidget) /* override */;
    6868
     
    7272private slots:
    7373
    74     /* Handlers: NAT network stuff: */
     74    /** Handles command to add NAT network. */
    7575    void sltAddNetworkNAT();
     76    /** Handles command to edit NAT network. */
    7677    void sltEditNetworkNAT();
     78    /** Handles command to remove NAT network. */
    7779    void sltRemoveNetworkNAT();
     80    /** Handles @a pChangedItem change for NAT network tree. */
    7881    void sltHandleItemChangeNetworkNAT(QTreeWidgetItem *pChangedItem);
     82    /** Handles NAT network tree current item change. */
    7983    void sltHandleCurrentItemChangeNetworkNAT();
     84    /** Handles context menu request for @a position of NAT network tree. */
    8085    void sltHandleContextMenuRequestNetworkNAT(const QPoint &position);
    8186
    82     /* Handlers: Host network stuff: */
     87    /** Handles command to add host network. */
    8388    void sltAddNetworkHost();
     89    /** Handles command to edit host network. */
    8490    void sltEditNetworkHost();
     91    /** Handles command to remove host network. */
    8592    void sltRemoveNetworkHost();
     93    /** Handles host network tree current item change. */
    8694    void sltHandleCurrentItemChangeNetworkHost();
     95    /** Handles context menu request for @a position of host network tree. */
    8796    void sltHandleContextMenuRequestNetworkHost(const QPoint &position);
    8897
    8998private:
    9099
    91     /* Helpers: NAT network cache stuff: */
     100    /** Uploads NAT @a network data into passed @a data storage unit. */
    92101    void loadDataNetworkNAT(const CNATNetwork &network, UIDataSettingsGlobalNetworkNAT &data);
     102    /** Saves @a data to corresponding NAT network. */
    93103    void saveDataNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data);
    94 
    95     /* Helpers: NAT network tree stuff: */
     104    /** Creates a new item in the NAT network tree on the basis of passed @a data, @a fChooseItem if requested. */
    96105    void createTreeItemNetworkNAT(const UIDataSettingsGlobalNetworkNAT &data, bool fChooseItem = false);
     106    /** Removes existing @a pItem from the NAT network tree. */
    97107    void removeTreeItemNetworkNAT(UIItemNetworkNAT *pItem);
    98108
    99     /* Helpers: Host network cache stuff: */
     109    /** Uploads host @a network data into passed @a data storage unit. */
    100110    void loadDataNetworkHost(const CHostNetworkInterface &iface, UIDataSettingsGlobalNetworkHost &data);
     111    /** Saves @a data to corresponding host network. */
    101112    void saveDataNetworkHost(const UIDataSettingsGlobalNetworkHost &data);
    102 
    103     /* Helpers: Host network tree stuff: */
     113    /** Creates a new item in the host network tree on the basis of passed @a data, @a fChooseItem if requested. */
    104114    void createTreeItemNetworkHost(const UIDataSettingsGlobalNetworkHost &data, bool fChooseItem = false);
     115    /** Removes existing @a pItem from the host network tree. */
    105116    void removeTreeItemNetworkHost(UIItemNetworkHost *pItem);
    106117
    107     /* Variables: NAT network actions: */
     118    /** Holds the Add NAT network action instance. */
    108119    QAction *m_pActionAddNetworkNAT;
     120    /** Holds the Edit NAT network action instance. */
    109121    QAction *m_pActionEditNetworkNAT;
     122    /** Holds the Remove NAT network action instance. */
    110123    QAction *m_pActionRemoveNetworkNAT;
    111124
    112     /* Variables: Host network actions: */
     125    /** Holds the Add host network action instance. */
    113126    QAction *m_pActionAddNetworkHost;
     127    /** Holds the Edit host network action instance. */
    114128    QAction *m_pActionEditNetworkHost;
     129    /** Holds the Remove host network action instance. */
    115130    QAction *m_pActionRemoveNetworkHost;
    116131
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h

    r66223 r66225  
    6666private slots:
    6767
    68     /* Handler: Proxy-checkbox stuff: */
     68    /** Handles proxy toggling. */
    6969    void sltHandleProxyToggle();
    7070
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.h

    r66223 r66225  
    5858    virtual void saveFromCacheTo(QVariant &data) /* overrride */;
    5959
    60     /** Defines TAB order. */
     60    /** Defines TAB order for passed @a pWidget. */
    6161    virtual void setOrderAfter(QWidget *pWidget) /* override */;
    6262
     
    6666private slots:
    6767
    68     /* Handlers: */
     68    /** Handles whether update is @a fEnabled. */
    6969    void sltHandleUpdateToggle(bool fEnabled);
     70    /** Handles update period change. */
    7071    void sltHandleUpdatePeriodChange();
    7172
    7273private:
    7374
    74     /* Helpers: */
     75    /** Returns period type. */
    7576    VBoxUpdateData::PeriodType periodType() const;
     77    /** Returns branch type. */
    7678    VBoxUpdateData::BranchType branchType() const;
    7779
    78     /* Variables: */
     80    /** Holds the last checked button reference. */
    7981    QRadioButton *m_pLastChosenRadio;
    8082
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