kdirselectdialog.h
/*
Copyright (C) 2001 Michael Jarrett <michaelj@corel.com>
Copyright (C) 2001 Carsten Pfeiffer <pfeiffer@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KDIRSELECTDIALOG_H
#define KDIRSELECTDIALOG_H
#include <kdialogbase.h>
#include <kurl.h>
class QPopupMenu;
class QVBoxLayout;
class KConfig;
class KFileTreeBranch;
class KFileTreeView;
class KFileTreeViewItem;
class KToggleAction;
class KIO_EXPORT KDirSelectDialog : public KDialogBase
{
Q_OBJECT
public:
KDirSelectDialog(const QString& startDir = QString::null,
bool localOnly = false,
QWidget *parent = 0L,
const char *name = 0, bool modal = false);
~KDirSelectDialog();
KURL url() const;
KFileTreeView * view() const { return m_treeView; }
bool localOnly() const { return m_localOnly; }
static KURL selectDirectory( const QString& startDir = QString::null,
bool localOnly = false, QWidget *parent = 0L,
const QString& caption = QString::null);
QString startDir() const { return m_startDir; }
public slots:
void setCurrentURL( const KURL& url );
protected slots:
virtual void slotUser1();
protected:
virtual void accept();
// Layouts protected so that subclassing is easy
QVBoxLayout *m_mainLayout;
QString m_startDir;
private slots:
void slotCurrentChanged();
void slotURLActivated( const QString& );
void slotNextDirToList( KFileTreeViewItem *dirItem );
void slotComboTextChanged( const QString& text );
void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
void slotShowHiddenFoldersToggled();
void slotMkdir();
private:
void readConfig( KConfig *config, const QString& group );
void saveConfig( KConfig *config, const QString& group );
void openNextDir( KFileTreeViewItem *parent );
KFileTreeBranch * createBranch( const KURL& url );
KFileTreeView *m_treeView;
QPopupMenu *m_contextMenu;
KToggleAction *m_showHiddenFolders;
bool m_localOnly;
protected:
virtual void virtual_hook( int id, void* data );
private:
class KDirSelectDialogPrivate;
KDirSelectDialogPrivate *d;
};
#endif
KFileTreeBranch
This is the branch class of the KFileTreeView, which represents one branch in the treeview...
Definition: kfiletreebranch.h:48
KFileTreeView
The filetreeview offers a treeview on the file system which behaves like a QTreeView showing files an...
Definition: kfiletreeview.h:66
KFileTreeViewItem
An item for a KFileTreeView that knows about its own KFileItem.
Definition: kfiletreeviewitem.h:40
KDirSelectDialog
A pretty dialog for a KDirSelect control for selecting directories.
Definition: kdirselectdialog.h:39
KDirSelectDialog::startDir
QString startDir() const
Definition: kdirselectdialog.h:89

KDE Home | KDE Accessibility Home | Description of Access Keys