• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

kdirselectdialog.h

Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor,
00017   Boston, MA 02110-1301, 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:
00053     KDirSelectDialog(const QString& startDir = QString::null,
00054                      bool localOnly = false,
00055                      QWidget *parent = 0L,
00056                      const char *name = 0, bool modal = false);
00057 
00060     ~KDirSelectDialog();
00061 
00066     KURL url() const;
00067 
00068     KFileTreeView * view() const { return m_treeView; }
00069 
00070     bool localOnly() const { return m_localOnly; }
00071 
00082     static KURL selectDirectory( const QString& startDir = QString::null,
00083                                  bool localOnly = false, QWidget *parent = 0L,
00084                                  const QString& caption = QString::null);
00085 
00089     QString startDir() const { return m_startDir; }
00090 
00091 public slots:
00092     void setCurrentURL( const KURL& url );
00093 
00094 protected slots:
00095     virtual void slotUser1();
00096 
00097 protected:
00098     virtual void accept();
00099 
00100     // Layouts protected so that subclassing is easy
00101     QVBoxLayout *m_mainLayout;
00102     QString m_startDir;
00103 
00104 private slots:
00105     void slotCurrentChanged();
00106     void slotURLActivated( const QString& );
00107     void slotNextDirToList( KFileTreeViewItem *dirItem );
00108     void slotComboTextChanged( const QString& text );
00109     void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
00110     void slotShowHiddenFoldersToggled();
00111     void slotMkdir();
00112 
00113 private:
00114     void readConfig( KConfig *config, const QString& group );
00115     void saveConfig( KConfig *config, const QString& group );
00116     void openNextDir( KFileTreeViewItem *parent );
00117     KFileTreeBranch * createBranch( const KURL& url );
00118 
00119     KFileTreeView *m_treeView;
00120     QPopupMenu *m_contextMenu;
00121     KToggleAction *m_showHiddenFolders;
00122     bool m_localOnly;
00123 
00124 protected:
00125     virtual void virtual_hook( int id, void* data );
00126 private:
00127     class KDirSelectDialogPrivate;
00128     KDirSelectDialogPrivate *d;
00129 };
00130 
00131 #endif

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal