- Timestamp:
- Feb 21, 2019 9:29:08 AM (6 years ago)
- 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 39 39 class UILocationSelector; 40 40 41 /** An abstract QWidget extension hosting a tree and table view. */ 41 42 class UIVisoBrowserBase : public QIWithRetranslateUI<QWidget> 42 43 { -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r77330 r77407 44 44 class UIVisoContentTableView; 45 45 46 /** A UIVisoBrowserBase extension to view content of a VISO as a file tree. */ 46 47 class UIVisoContentBrowser : public UIVisoBrowserBase 47 48 { … … 58 59 /** Adds file objests from the host file system. @p pathList consists of list of paths to there objects. */ 59 60 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. */ 60 63 QStringList entryList(); 61 64 virtual void showHideHiddenObjects(bool bShow) /* override */; 62 63 65 void setVisoName(const QString &strName); 64 66 … … 67 69 void sltHandleCreateNewDirectory(); 68 70 /** 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). */ 70 72 void sltHandleItemRenameAttempt(UICustomFileSystemItem *pItem, QString strOldName, QString strNewName); 71 73 void sltHandleRemoveItems(); … … 89 91 90 92 void sltHandleTableSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); 93 /** Adds the dragged-dropped items to VISO. */ 91 94 void sltHandleDroppedItems(QStringList pathList); 92 95 … … 97 100 void initializeModel(); 98 101 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. */ 101 110 void scanHostDirectory(UICustomFileSystemItem *directory); 102 111 KFsObjType fileType(const QFileInfo &fsInfo); 112 /** Renames the starts item's name as VISO name changes. */ 103 113 void updateStartItemName(); 104 114 void renameFileObject(UICustomFileSystemItem *pItem); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.h
r77405 r77407 48 48 class UIVisoConfigurationPanel; 49 49 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. */ 50 53 class UIVisoCreator : public QIWithRetranslateUI<QIMainDialog> 51 54 { … … 56 59 UIVisoCreator(QWidget *pParent = 0, const QString& strMachineName = QString()); 57 60 ~UIVisoCreator(); 58 QStringList entryList() const;59 const QString &visoName() const;61 QStringList entryList() const; 62 const QString &visoName() const; 60 63 const QStringList &customOptions() const; 61 64 /** Returns the current path that the host browser is listing. */ 62 65 QString currentPath() const; 63 void setCurrentPath(const QString &strPath);66 void setCurrentPath(const QString &strPath); 64 67 65 68 #ifdef VBOX_WS_MAC … … 86 89 87 90 private: 91 88 92 struct VisoOptions 89 93 { … … 117 121 /** Makes sure escape key is assigned to only a single widget. This is done by checking 118 122 * 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 panels123 * - 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 120 124 * - when there are no more panels visible assign it to the parent dialog 121 125 * - grab it from the dialog as soon as a panel becomes visible again 122 126 * - assign it to the most recently "unhidden" panel */ 123 127 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 /** @} */ 126 134 void setDialogGeometry(const QRect &geometry); 127 135 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 /** @} */ 135 150 136 151 QGridLayout *m_pMainLayout; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoHostBrowser.h
r77330 r77407 34 34 class UIVisoHostBrowserModel; 35 35 36 /** A UIVisoBrowserBase extension to view host file system. Uses QFileSystemModel. */ 36 37 class UIVisoHostBrowser : public UIVisoBrowserBase 37 38 { … … 48 49 ~UIVisoHostBrowser(); 49 50 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); 52 53 53 54 public slots: … … 57 58 protected: 58 59 59 v oid retranslateUi();60 virtual void retranslateUi() /* override */; 60 61 virtual void tableViewItemDoubleClick(const QModelIndex &index) /* override */; 61 62 virtual void setTableRootIndex(QModelIndex index = QModelIndex()) /* override */; … … 72 73 void prepareConnections(); 73 74 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. */ 75 76 UIVisoHostBrowserModel *m_pTreeModel; 76 77 UIVisoHostBrowserModel *m_pTableModel;
Note:
See TracChangeset
for help on using the changeset viewer.