|
|
/* ****************************************************************************** * File Name : dirbrowser.h - application header file * Created on : Sunday, May 12, 2002 * Product id : KitClasses version 1.0 - KInterDev Add-on Classes for KDE * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Copyright : © 2002 by Bruce Hunt Supporting Cast * Email : SuppCast@users.sourceforge.net * Web site : http://kinterdev.sourceforge.net ****************************************************************************** * This program is being provided under the LICENSING terms and conditions as * specified in the file "COPYING" which has been included with this software * package. This program is distributed WITHOUT ANY WARRANTY, without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ****************************************************************************** * M o d i f i c a t i o n L o g * *****************************************************************************/ #ifndef _KITDIRBROWSER_H_ #define _KITDIRBROWSER_H_ #include#include class KAction; class KConfig; class KDirOperator; class KFileFilterCombo; class KitToolBar; class KToggleAction; class KURLComboBox; /** * A full featured directory browser. Includes all the features of KDirOperator plus the following. * @li A toolbar * @li URL entry with history and completion * @li Bookmark support * @li MIME type and Open format filtering * @li user defined toolbar button * @short A full featured directory file browser. * @author Bruce Hunt */ class KitDirBrowser : public QWidget { Q_OBJECT public: /** * Default constructor */ KitDirBrowser( QWidget * parent, const char * name ); /** * Constructor with configuration object pointer */ KitDirBrowser( KConfig * config, QWidget * parent, const char * name ); /** * Destructor */ ~KitDirBrowser(); /** * Set the user definable toolbar button, This button defaults to the user "documents" directory. * @param icon the name of the button icon * @param text then button text * @param tip the button tooltip */ void setDocumentButton( const QString & icon, const QString & text = QString::null, const QString & tip = QString::null ); public slots: /** * Load a URL. */ void loadURL( const KURL & url ); /** * Reload the browser. */ void reload(); /** * Used to load and apply browser and toolbar settings. * This does not set the configuration file for bookmarks or filters. That is set in the constructor. */ void applySettings( KConfig * config ); /** * Saves the browser settings. Settings are automatically applied when constructed. */ void saveSettings(); /** * Same as above but with KConfig option. */ void saveSettings( KConfig * config ); /** * Resets the user definable toolbar button to the defaults. (user "documents" directory) */ void resetDocumentButton(); /** * Sets the URL of the user definable toolbar button. */ void setDocumentPath( const KURL & url ); signals: /** * reimplemented from KDirOperator urlEntered() * @see KDirOperator::urlEntered */ void urlSelected( const KURL & url ); /** * reimplemented from KDirOperator * @see KDirOperator::fileSelected */ void fileSelected( const KFileItem * item ); /** * reimplemented from KDirOperator * @see KDirOperator::fileHighlighted */ void fileHighlighted( const KFileItem * item ); /** * reimplemented from KDirOperator * @see KDirOperator::dirActivated */ void dirActivated( const KFileItem * item ); private: int iCurMimeFltr; int iCurOpenFltr; QStringList bkmrkLst; QStringList entrFltrLst; QStringList mimeFltrLst; QStringList openFltrLst; KAction * docDirAct; KAction * bkMrkAddAct; KAction * bkMrkRmvAct; KToggleAction * fltrMimeAct; KToggleAction * fltrOpenAct; KToggleAction * previewAct; KConfig * config; KDirOperator * dirOp; KFileFilterCombo * fltrCmbBx; KitToolBar * fltrToolBar; KitToolBar * navToolBar; KURLComboBox * pathCmbBx; KURL uDocDirURL; void clearFilters( const QString & key ); void createDirBrow( KConfig * config ); QStringList extendMimeList( const QStringList & mimeLst ); bool validateMime( QString mime ); private slots: void addBookmark(); void finishedLoading(); void fltrActivated( int selFltr ); void fltrRtrnPressed(); void pathActivated( const KURL & ); void pathRtrnPressed( const QString & ); void rmvBookmark(); void setBkmrkEnabled( const QString & ); void setCmbBxURL( const KURL & ); void loadMimeFltr(); void loadOpenFltr(); void loadDocDir(); void saveFltr(); void delFltr(); }; #endif
Generated by: bhunt on Lurch on Sun Nov 24 02:45:27 2002, using kdoc 2.0a54. |