Changeset 2221
- Timestamp:
- 08/11/08 11:05:16 (3 months ago)
- Location:
- v2/branches/dev/plugins/base/FileBrowser/src
- Files:
-
- 6 modified
-
FileBrowser.cpp (modified) (8 diffs)
-
FileBrowser.h (modified) (2 diffs)
-
FileBrowserSettings.cpp (modified) (3 diffs)
-
FileBrowserSettings.h (modified) (2 diffs)
-
pDockFileBrowser.cpp (modified) (7 diffs)
-
pDockFileBrowser.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v2/branches/dev/plugins/base/FileBrowser/src/FileBrowser.cpp
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file FileBrowser.cpp 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief FileBrowser plugin main class. Implementing plugin interface for the 34 core 35 */ 36 29 37 #include "FileBrowser.h" 30 38 #include "pDockFileBrowser.h" … … 37 45 #include <QIcon> 38 46 47 /*! 48 Class constructor. Initialises information about plugin for user and core 49 */ 39 50 FileBrowser::FileBrowser() 40 51 { … … 49 60 } 50 61 62 /*! 63 Destructor. Uninstalls plugin from the system. 64 */ 51 65 FileBrowser::~FileBrowser() 52 66 { … … 55 69 } 56 70 71 /*! 72 Install/uninstall plugin from system 73 \param b Flag of action a - install; b - uninstall 74 \return Status code of action 75 \retval true Successfull 76 \retval false Some error ocurred 77 */ 57 78 bool FileBrowser::setEnabled( bool b ) 58 79 { … … 81 102 } 82 103 104 /*! 105 Get settings widget of plugin 106 \return Pointer to created settings widget for plugin 107 */ 83 108 QWidget* FileBrowser::settingsWidget() 84 109 { return new FileBrowserSettings( this ); } 85 110 111 /*! 112 Get icon for plugin 113 \return Pixmap 114 */ 86 115 QPixmap FileBrowser::pixmap() const 87 116 { return QPixmap( ":/icons/browser.png" ); } 88 117 118 /*! 119 Get filter wildcards, which using for filtering out some files, which should be removed 120 from view (object files, temporary files, ...) 121 \return StringList of wildcards, which should be removed from tree 122 */ 89 123 QStringList FileBrowser::filters() const 90 124 { return settingsValue( "Wildcards", QStringList() << "*~" << "*.o" << "*.pyc" << "*.bak" ).toStringList(); } 91 125 126 /*! 127 Set wildcards for filtering unneeded files from tree 128 \param filters New set of filters 129 \param updateDock If true - UI will be updated according with new filters 130 */ 92 131 void FileBrowser::setFilters( const QStringList& filters, bool updateDock ) 93 132 { … … 97 136 } 98 137 138 /*! 139 Get current path (root of the tree) from the settings 140 \return Dirrectory path 141 */ 99 142 QString FileBrowser::path() const 100 143 { return settingsValue( "Path" ).toString(); } 101 144 145 /*! 146 Set current path (root of the tree) in the settings 147 \param path Current path 148 \param updateDock Update UI according with new path 149 */ 102 150 void FileBrowser::setPath( const QString& path, bool updateDock ) 103 151 { … … 107 155 } 108 156 157 /*! 158 Read current path and filters from UI dock object and save it in the settings 159 */ 109 160 void FileBrowser::saveSettings() 110 161 { … … 116 167 } 117 168 169 /*! 170 Read current path and filters from settings and apply it for UI dock 171 */ 118 172 void FileBrowser::restoreSettings() 119 173 { -
v2/branches/dev/plugins/base/FileBrowser/src/FileBrowser.h
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file FileBrowser.h 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief Header file for FileBrowser plugin 34 */ 29 35 #ifndef FILEBROWSER_H 30 36 #define FILEBROWSER_H … … 36 42 class pDockFileBrowser; 37 43 44 /*! 45 Main class of FileBrowser plugin 46 47 Plugin allows to see file system contents and open files 48 */ 38 49 class FileBrowser : public BasePlugin 39 50 { -
v2/branches/dev/plugins/base/FileBrowser/src/FileBrowserSettings.cpp
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file FileBrowserSettings.cpp 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief Settings widget of FileBrowser plugin 34 */ 29 35 #include "FileBrowserSettings.h" 30 36 #include "FileBrowser.h" … … 34 40 #include <QPushButton> 35 41 42 /*! 43 Creates settings widget 44 \param plugin Pointer to FileBrowser plugin 45 \param parent Parent widget of settings widget 46 */ 36 47 FileBrowserSettings::FileBrowserSettings( FileBrowser* plugin, QWidget* parent ) 37 48 : QWidget( parent ) … … 60 71 } 61 72 73 /*! 74 Handler of clicking Apply button. Applying settings 75 */ 62 76 void FileBrowserSettings::applySettings() 63 77 { mPlugin->setFilters( mEditor->values(), true ); } -
v2/branches/dev/plugins/base/FileBrowser/src/FileBrowserSettings.h
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file FileBrowserSettings.h 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief Settings widget of FileBrowser plugin 34 */ 29 35 #ifndef FILEBROWSERSETTINGS_H 30 36 #define FILEBROWSERSETTINGS_H … … 35 41 class pStringListEditor; 36 42 43 /*! 44 Settigs widget of FileBrowser plugin 45 46 Allows to edit filters for filtering out unneeded files from filesystem 47 view 48 */ 37 49 class FileBrowserSettings : public QWidget 38 50 { -
v2/branches/dev/plugins/base/FileBrowser/src/pDockFileBrowser.cpp
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file pDockFileBrowser.cpp 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief UI of FileBrowser plugin 34 */ 29 35 #include "pDockFileBrowser.h" 30 36 … … 44 50 #include <QHeaderView> 45 51 52 /*! 53 Create UI 54 \param w Pointer to parent widget 55 */ 46 56 pDockFileBrowser::pDockFileBrowser( QWidget* w ) 47 57 : pDockWidget( w ) … … 130 140 } 131 141 142 /*! 143 Handler of click on Up button. 144 145 Moves root of tree up one level 146 */ 132 147 void pDockFileBrowser::tbUp_clicked() 133 148 { … … 137 152 } 138 153 154 /*! 155 Handler of click on Root button. 156 157 If there are selected dirrectory in the tree - it will be set as root 158 */ 139 159 void pDockFileBrowser::tbRoot_clicked() 140 160 { … … 149 169 } 150 170 171 /*! 172 Handler of click on item in the tree 173 174 If there are file doubleclicked - it will be opened 175 \param idx Index of clicked tree 176 */ 151 177 void pDockFileBrowser::tv_doubleClicked( const QModelIndex& idx ) 152 178 { … … 157 183 } 158 184 185 /*! 186 Handler of changing of current dirrectory in combo box. Opens dirrectory 187 in the tree. 188 \param i Index of clicked item in the combo box 189 */ 159 190 void pDockFileBrowser::cb_currentChanged( const QModelIndex& i ) 160 191 { setCurrentPath( mDirsModel->filePath( i ) ); } 161 192 193 /*! 194 Get current path (root of the tree) 195 \return Current path (root of the tree) 196 */ 162 197 QString pDockFileBrowser::currentPath() const 163 198 { return mDirsModel->filePath( mCombo->currentIndex() ); } 164 199 200 /*! 201 Set current path (root of the tree) 202 \param s New path 203 */ 165 204 void pDockFileBrowser::setCurrentPath( const QString& s ) 166 205 { … … 176 215 } 177 216 217 /*! 218 Get filter wildcards, which currently using for filtering out unneeded file 219 names from tree 220 \return List if wildcards for filtering 221 */ 178 222 QStringList pDockFileBrowser::filters() const 179 223 { return mFilteredModel->filters(); } 180 224 225 /*! 226 Set filter wildcards for filtering out unneeded files 227 \param filters List of wildcards 228 */ 181 229 void pDockFileBrowser::setFilters( const QStringList& filters ) 182 230 { mFilteredModel->setFilters( filters ); } -
v2/branches/dev/plugins/base/FileBrowser/src/pDockFileBrowser.h
r2008 r2221 27 27 ** 28 28 ****************************************************************************/ 29 /*! 30 \file pDockFileBrowser.h 31 \date 2008-01-14T00:40:08 32 \author Filipe AZEVEDO, Andrei KOPATS 33 \brief UI of FileBrowser plugin 34 */ 35 29 36 #ifndef PDOCKFILEBROWSER_H 30 37 #define PDOCKFILEBROWSER_H … … 42 49 class QTreeView; 43 50 51 /*! 52 UI interface of FileBrowser plugin. 53 54 Dock with file system tree, Combo Box, allowing navigation in a file system 55 tree, buttons for moving root of tree to currently selected dirrectory and 56 up (relatively for current dirrectory) 57 */ 44 58 class pDockFileBrowser : public pDockWidget 45 59 {
