kio Library: kdirselectdialog.h Source File (kio Library)

| # kio Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kdirselectdialog.h

    00001 /*
    00002   Copyright (C) 2001 Michael Jarrett <michaelj@corel.com>
    00003   Copyright (C) 2001 Carsten Pfeiffer <pfeiffer@kde.org>
    00004
    00005   This library is free software; you can redistribute it and/or
    00006   modify it under the terms of the GNU Library General Public
    00007   License version 2 as published by the Free Software Foundation.
    00008
    00009   This library is distributed in the hope that it will be useful,
    00010   but WITHOUT ANY WARRANTY; without even the implied warranty of
    00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00012   Library General Public License for more details.
    00013
    00014   You should have received a copy of the GNU Library General Public License
    00015   along with this library; see the file COPYING.LIB.  If not, write to
    00016   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00017   Boston, MA 02111-1307, USA.
    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
    00081     static KURL selectDirectory( const QString& startDir = QString::null,
    00082                                  bool localOnly = false, QWidget *parent = 0L,
    00083                                  const QString& caption = QString::null);
    00084
    00088     QString startDir() const { return m_startDir; }
    00089
    00090 public slots:
    00091     void setCurrentURL( const KURL& url );
    00092
    00093 protected:
    00094     virtual void accept();
    00095
    00096     // Layouts protected so that subclassing is easy
    00097     QVBoxLayout *m_mainLayout;
    00098     QString m_startDir;
    00099
    00100 private slots:
    00101     void slotCurrentChanged();
    00102     void slotURLActivated( const QString& );
    00103     void slotNextDirToList( KFileTreeViewItem *dirItem );
    00104     void slotComboTextChanged( const QString& text );
    00105     void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
    00106     void slotShowHiddenFoldersToggled();
    00107     void slotMkdir();
    00108
    00109 private:
    00110     void readConfig( KConfig *config, const QString& group );
    00111     void saveConfig( KConfig *config, const QString& group );
    00112     void openNextDir( KFileTreeViewItem *parent );
    00113     KFileTreeBranch * createBranch( const KURL& url );
    00114
    00115     KFileTreeView *m_treeView;
    00116     QPopupMenu *m_contextMenu;
    00117     KToggleAction *m_showHiddenFolders;
    00118     bool m_localOnly;
    00119
    00120 protected:
    00121     virtual void virtual_hook( int id, void* data );
    00122 private:
    00123     class KDirSelectDialogPrivate;
    00124     KDirSelectDialogPrivate *d;
    00125 };
    00126
    00127 #endif

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:23:57 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003