Changeset 2221

Show
Ignore:
Timestamp:
08/11/08 11:05:16 (3 months ago)
Author:
hlamer
Message:

Documentation for FileBrowser? plugin

Location:
v2/branches/dev/plugins/base/FileBrowser/src
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • v2/branches/dev/plugins/base/FileBrowser/src/FileBrowser.cpp

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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 
    2937#include "FileBrowser.h" 
    3038#include "pDockFileBrowser.h" 
     
    3745#include <QIcon> 
    3846 
     47/*! 
     48        Class constructor. Initialises information about plugin for user and core 
     49*/ 
    3950FileBrowser::FileBrowser() 
    4051{ 
     
    4960} 
    5061 
     62/*! 
     63        Destructor. Uninstalls plugin from the system. 
     64*/ 
    5165FileBrowser::~FileBrowser() 
    5266{ 
     
    5569} 
    5670 
     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*/ 
    5778bool FileBrowser::setEnabled( bool b ) 
    5879{ 
     
    81102} 
    82103 
     104/*! 
     105        Get settings widget of plugin 
     106        \return Pointer to created settings widget for plugin 
     107*/ 
    83108QWidget* FileBrowser::settingsWidget() 
    84109{ return new FileBrowserSettings( this ); } 
    85110 
     111/*! 
     112        Get icon for plugin 
     113        \return Pixmap 
     114*/ 
    86115QPixmap FileBrowser::pixmap() const 
    87116{ return QPixmap( ":/icons/browser.png" ); } 
    88117 
     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*/ 
    89123QStringList FileBrowser::filters() const 
    90124{ return settingsValue( "Wildcards", QStringList() << "*~" << "*.o" << "*.pyc" << "*.bak" ).toStringList(); } 
    91125 
     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*/ 
    92131void FileBrowser::setFilters( const QStringList& filters, bool updateDock ) 
    93132{ 
     
    97136} 
    98137 
     138/*! 
     139        Get current path (root of the tree) from the settings 
     140        \return Dirrectory path 
     141*/ 
    99142QString FileBrowser::path() const 
    100143{ return settingsValue( "Path" ).toString(); } 
    101144 
     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*/ 
    102150void FileBrowser::setPath( const QString& path, bool updateDock ) 
    103151{ 
     
    107155} 
    108156 
     157/*! 
     158        Read current path and filters from UI dock object and save it in the settings 
     159*/ 
    109160void FileBrowser::saveSettings() 
    110161{ 
     
    116167} 
    117168 
     169/*! 
     170        Read current path and filters from settings and apply it for UI dock 
     171*/ 
    118172void FileBrowser::restoreSettings() 
    119173{ 
  • v2/branches/dev/plugins/base/FileBrowser/src/FileBrowser.h

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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*/ 
    2935#ifndef FILEBROWSER_H 
    3036#define FILEBROWSER_H 
     
    3642class pDockFileBrowser; 
    3743 
     44/*! 
     45        Main class of FileBrowser plugin 
     46         
     47        Plugin allows to see file system contents and open files 
     48*/ 
    3849class FileBrowser : public BasePlugin 
    3950{ 
  • v2/branches/dev/plugins/base/FileBrowser/src/FileBrowserSettings.cpp

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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*/ 
    2935#include "FileBrowserSettings.h" 
    3036#include "FileBrowser.h" 
     
    3440#include <QPushButton> 
    3541 
     42/*! 
     43        Creates settings widget 
     44        \param plugin Pointer to FileBrowser plugin 
     45        \param parent Parent widget of settings widget 
     46*/ 
    3647FileBrowserSettings::FileBrowserSettings( FileBrowser* plugin, QWidget* parent ) 
    3748        : QWidget( parent ) 
     
    6071} 
    6172 
     73/*! 
     74        Handler of clicking Apply button. Applying settings 
     75*/ 
    6276void FileBrowserSettings::applySettings() 
    6377{ mPlugin->setFilters( mEditor->values(), true ); } 
  • v2/branches/dev/plugins/base/FileBrowser/src/FileBrowserSettings.h

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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*/ 
    2935#ifndef FILEBROWSERSETTINGS_H 
    3036#define FILEBROWSERSETTINGS_H 
     
    3541class pStringListEditor; 
    3642 
     43/*! 
     44        Settigs widget of FileBrowser plugin 
     45         
     46        Allows to edit filters for filtering out unneeded files from filesystem  
     47        view 
     48*/ 
    3749class FileBrowserSettings : public QWidget 
    3850{ 
  • v2/branches/dev/plugins/base/FileBrowser/src/pDockFileBrowser.cpp

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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*/ 
    2935#include "pDockFileBrowser.h" 
    3036 
     
    4450#include <QHeaderView> 
    4551 
     52/*! 
     53        Create UI 
     54        \param w Pointer to parent widget 
     55*/ 
    4656pDockFileBrowser::pDockFileBrowser( QWidget* w ) 
    4757        : pDockWidget( w ) 
     
    130140} 
    131141 
     142/*! 
     143        Handler of click on Up button. 
     144 
     145        Moves root of tree up one level 
     146*/ 
    132147void pDockFileBrowser::tbUp_clicked() 
    133148{ 
     
    137152} 
    138153 
     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*/ 
    139159void pDockFileBrowser::tbRoot_clicked() 
    140160{ 
     
    149169} 
    150170 
     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*/ 
    151177void pDockFileBrowser::tv_doubleClicked( const QModelIndex& idx ) 
    152178{ 
     
    157183} 
    158184 
     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*/ 
    159190void pDockFileBrowser::cb_currentChanged( const QModelIndex& i ) 
    160191{ setCurrentPath( mDirsModel->filePath( i ) ); } 
    161192 
     193/*! 
     194        Get current path (root of the tree) 
     195        \return Current path (root of the tree) 
     196*/ 
    162197QString pDockFileBrowser::currentPath() const 
    163198{ return mDirsModel->filePath( mCombo->currentIndex() ); } 
    164199 
     200/*! 
     201        Set current path (root of the tree) 
     202        \param s New path 
     203*/ 
    165204void pDockFileBrowser::setCurrentPath( const QString& s ) 
    166205{ 
     
    176215} 
    177216 
     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*/ 
    178222QStringList pDockFileBrowser::filters() const 
    179223{ return mFilteredModel->filters(); } 
    180224 
     225/*! 
     226        Set filter wildcards for filtering out unneeded files 
     227        \param filters List of wildcards 
     228*/ 
    181229void pDockFileBrowser::setFilters( const QStringList& filters ) 
    182230{ mFilteredModel->setFilters( filters ); } 
  • v2/branches/dev/plugins/base/FileBrowser/src/pDockFileBrowser.h

    r2008 r2221  
    2727** 
    2828****************************************************************************/ 
     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 
    2936#ifndef PDOCKFILEBROWSER_H 
    3037#define PDOCKFILEBROWSER_H 
     
    4249class QTreeView; 
    4350 
     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*/ 
    4458class pDockFileBrowser : public pDockWidget 
    4559{