kdirselectdialog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KDIRSELECTDIALOG_H
00021 #define KDIRSELECTDIALOG_H
00022
00023 #include <kdialogbase.h>
00024 #include <kurl.h>
00025
00026 class QPopupMenu;
00027 class QVBoxLayout;
00028 class KConfig;
00029 class KFileTreeBranch;
00030 class KFileTreeView;
00031 class KFileTreeViewItem;
00032 class KToggleAction;
00033
00039 class KIO_EXPORT KDirSelectDialog : public KDialogBase
00040 {
00041 Q_OBJECT
00042
00043 public:
00052 KDirSelectDialog(const QString& startDir = QString::null,
00053 bool localOnly = false,
00054 QWidget *parent = 0L,
00055 const char *name = 0, bool modal = false);
00056
00059 ~KDirSelectDialog();
00060
00065 KURL url() const;
00066
00067 KFileTreeView * view() const { return m_treeView; }
00068
00069 bool localOnly() const { return m_localOnly; }
00070
00079 static KURL selectDirectory( const QString& startDir = QString::null,
00080 bool localOnly = false, QWidget *parent = 0L,
00081 const QString& caption = QString::null);
00082
00086 QString startDir() const { return m_startDir; }
00087
00088 public slots:
00089 void setCurrentURL( const KURL& url );
00090
00091 protected:
00092 virtual void accept();
00093
00094
00095 QVBoxLayout *m_mainLayout;
00096 QString m_startDir;
00097
00098 private slots:
00099 void slotCurrentChanged();
00100 void slotURLActivated( const QString& );
00101 void slotNextDirToList( KFileTreeViewItem *dirItem );
00102 void slotComboTextChanged( const QString& text );
00103 void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
00104 void slotShowHiddenFoldersToggled();
00105 void slotMkdir();
00106
00107 private:
00108 void readConfig( KConfig *config, const QString& group );
00109 void saveConfig( KConfig *config, const QString& group );
00110 void openNextDir( KFileTreeViewItem *parent );
00111 KFileTreeBranch * createBranch( const KURL& url );
00112
00113 KFileTreeView *m_treeView;
00114 QPopupMenu *m_contextMenu;
00115 KToggleAction *m_showHiddenFolders;
00116 bool m_localOnly;
00117
00118 protected:
00119 virtual void virtual_hook( int id, void* data );
00120 private:
00121 class KDirSelectDialogPrivate;
00122 KDirSelectDialogPrivate *d;
00123 };
00124
00125 #endif
This file is part of the documentation for kio Library Version 3.3.90.