kexi

KexiStartupFileDialogBase_win.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003-2004 Jaroslaw Staniek <js@iidea.pl>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
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 _KexiStartupFileDialogBase_win_h_
00021 #define _KexiStartupFileDialogBase_win_h_
00022 
00023 #include <qfiledialog.h>
00024 #include <qpushbutton.h>
00025 
00026 class KexiStartupFileDialogBasePrivate;
00027 
00032 class KexiStartupFileDialogBase : public QFileDialog
00033 {
00034 public:
00035     KexiStartupFileDialogBase(const QString & dirName, const QString & filter = QString::null, 
00036         QWidget * parent = 0, const char * name = 0, bool modal = FALSE );
00037     ~KexiStartupFileDialogBase();
00038 
00039     QPushButton * okButton() const { return m_okBtn; }
00040 
00041     void clearFilter();
00042     void setFilter(const QString& filter);
00043     void setOperationMode( KFileDialog::OperationMode mode );
00044     void setMode( KFile::Mode m );
00045     void setMode( unsigned int m );
00046     QString currentFilter() const;
00047     void setMimeFilter( const QStringList& mimeTypes, const QString& defaultType = QString::null );
00048 
00049     KFile::Mode mode() const;
00050 
00051 protected:
00052     void init(const QString& startDir, const QString& filter, QWidget* widget);
00053     void updateAutoSelectExtension() {};
00054 
00057     QString realStartDir(const QString& startDir);
00058 
00059     void saveLastVisitedPath(const QString& path);
00060 
00061     QPushButton* m_okBtn;
00062     QLineEdit* m_lineEdit;
00063     QString m_lastVisitedPathsVariable; 
00064     KexiStartupFileDialogBasePrivate* d;
00065 };
00066 
00067 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys