VirtualBox

Changeset 77407 in vbox for trunk/src


Ignore:
Timestamp:
Feb 21, 2019 9:29:08 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9080. Some commenting.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoBrowserBase.h

    r77405 r77407  
    3939class UILocationSelector;
    4040
     41/** An abstract QWidget extension hosting a tree and table view. */
    4142class UIVisoBrowserBase : public QIWithRetranslateUI<QWidget>
    4243{
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h

    r77330 r77407  
    4444class UIVisoContentTableView;
    4545
     46/** A UIVisoBrowserBase extension to view content of a VISO as a file tree. */
    4647class UIVisoContentBrowser : public UIVisoBrowserBase
    4748{
     
    5859    /** Adds file objests from the host file system. @p pathList consists of list of paths to there objects. */
    5960    void addObjectsToViso(QStringList pathList);
     61    /** Returns the content of the VISO as a string list. Each element of the list becomes a line in the
     62      * .viso file. */
    6063    QStringList entryList();
    6164    virtual void showHideHiddenObjects(bool bShow) /* override */;
    62 
    6365    void setVisoName(const QString &strName);
    6466
     
    6769    void sltHandleCreateNewDirectory();
    6870    /** Handles the signal we get from the model during setData call. Restores the old name of the file object
    69      *  to @p strOldName if need be. */
     71     *  to @p strOldName if need be (if rename fails for some reason). */
    7072    void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldName, QString strNewName);
    7173    void sltHandleRemoveItems();
     
    8991
    9092    void sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
     93    /** Adds the dragged-dropped items to VISO. */
    9194    void sltHandleDroppedItems(QStringList pathList);
    9295
     
    97100    void                    initializeModel();
    98101    UICustomFileSystemItem *rootItem();
    99     QModelIndex             convertIndexToTableIndex(const QModelIndex &index);
    100     QModelIndex             convertIndexToTreeIndex(const QModelIndex &index);
     102
     103
     104    /** @name Index conversion functions. These are half-smart and tries to determine the source model before conversion.
     105      * @{ */
     106        QModelIndex         convertIndexToTableIndex(const QModelIndex &index);
     107        QModelIndex         convertIndexToTreeIndex(const QModelIndex &index);
     108    /** @} */
     109    /** Lists the content of the host file system directory by using Qt file system API. */
    101110    void                    scanHostDirectory(UICustomFileSystemItem *directory);
    102111    KFsObjType              fileType(const QFileInfo &fsInfo);
     112    /** Renames the starts item's name as VISO name changes. */
    103113    void                    updateStartItemName();
    104114    void                    renameFileObject(UICustomFileSystemItem *pItem);
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h

    r77405 r77407  
    4848class UIVisoConfigurationPanel;
    4949
     50/** A QIMainDialog extension. It hosts two UIVisoBrowserBase extensions, one for host and one
     51  * for VISO file system. It has the main menu, main toolbar, and a vertical toolbar and corresponding
     52  * actions. */
    5053class UIVisoCreator : public QIWithRetranslateUI<QIMainDialog>
    5154{
     
    5659    UIVisoCreator(QWidget *pParent = 0, const QString& strMachineName = QString());
    5760    ~UIVisoCreator();
    58     QStringList entryList() const;
    59     const QString &visoName() const;
     61    QStringList       entryList() const;
     62    const QString     &visoName() const;
    6063    const QStringList &customOptions() const;
    6164    /** Returns the current path that the host browser is listing. */
    6265    QString currentPath() const;
    63     void setCurrentPath(const QString &strPath);
     66    void    setCurrentPath(const QString &strPath);
    6467
    6568#ifdef VBOX_WS_MAC
     
    8689
    8790private:
     91
    8892    struct VisoOptions
    8993    {
     
    117121    /** Makes sure escape key is assigned to only a single widget. This is done by checking
    118122      *  several things in the following order:
    119       *  - when tree views of browser panes are visible esc. key used to close those. thus it is taken from the dialog and panels
     123      *  - when (drop-down) tree views of browser panes are visible esc. key used to close those. thus it is taken from the dialog and panels
    120124      *  - when there are no more panels visible assign it to the parent dialog
    121125      *  - grab it from the dialog as soon as a panel becomes visible again
    122126      *  - assign it to the most recently "unhidden" panel */
    123127    void manageEscapeShortCut();
    124     void loadSettings();
    125     void saveSettings() const;
     128
     129    /** @name Save/Load dialog related extra data.
     130     * @{ */
     131       void loadSettings();
     132       void saveSettings() const;
     133    /** @} */
    126134    void setDialogGeometry(const QRect &geometry);
    127135
    128     QAction              *m_pActionConfiguration;
    129     QAction              *m_pActionOptions;
    130     QAction              *m_pAddAction;
    131     QAction              *m_pRemoveAction;
    132     QAction              *m_pNewDirectoryAction;
    133     QAction              *m_pRenameAction;
    134     QAction              *m_pResetAction;
     136    /** @name Main toolbar (and main menu) actions
     137      * @{ */
     138        QAction         *m_pActionConfiguration;
     139        QAction         *m_pActionOptions;
     140    /** @} */
     141
     142    /** @name These actions are addded to vertical toolbar, context menus, and the main menu.
     143      * @{ */
     144        QAction              *m_pAddAction;
     145        QAction              *m_pRemoveAction;
     146        QAction              *m_pNewDirectoryAction;
     147        QAction              *m_pRenameAction;
     148        QAction              *m_pResetAction;
     149    /** @} */
    135150
    136151    QGridLayout          *m_pMainLayout;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoHostBrowser.h

    r77330 r77407  
    3434class UIVisoHostBrowserModel;
    3535
     36/** A UIVisoBrowserBase extension to view host file system. Uses QFileSystemModel. */
    3637class UIVisoHostBrowser : public UIVisoBrowserBase
    3738{
     
    4849    ~UIVisoHostBrowser();
    4950    virtual void showHideHiddenObjects(bool bShow) /* override */;
    50     QString currentPath() const;
    51     void setCurrentPath(const QString &strPath);
     51    QString      currentPath() const;
     52    void         setCurrentPath(const QString &strPath);
    5253
    5354public slots:
     
    5758protected:
    5859
    59     void retranslateUi();
     60    virtual void retranslateUi() /* override */;
    6061    virtual void tableViewItemDoubleClick(const QModelIndex &index) /* override */;
    6162    virtual void setTableRootIndex(QModelIndex index = QModelIndex()) /* override */;
     
    7273    void prepareConnections();
    7374
    74     /** We have two file system models (one for each item view) since we set different filter on each of these models. */
     75    /** We have two file system models (one for each item view) since we set different filters on each of these models. */
    7576    UIVisoHostBrowserModel *m_pTreeModel;
    7677    UIVisoHostBrowserModel *m_pTableModel;
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