Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ofiledialog.h

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the OPIE Project
00003              .=l.            Copyright (c)  2002 zecke <zecke@handhelds.org>
00004            .>+-=
00005  _;:,     .>    :=|.         This library is free software; you can
00006 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00007 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%`+i>       _;_.
00012     .i_,=:_.      -<s.       This library is distributed in the hope that
00013      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00017 ..}^=.=       =       ;      Library General Public License for more
00018 ++=   -.     .`     .:       details.
00019  :     =  ...= . :.=-
00020  -.   .:....=;==+<;          You should have received a copy of the GNU
00021   -_. . .   )=.  =           Library General Public License along with
00022     --        :-=`           this library; see the file COPYING.LIB.
00023                              If not, write to the Free Software Foundation,
00024                              Inc., 59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef OFILEDIALOG_H
00030 #define OFILEDIALOG_H
00031 
00032 /* OPIE */
00033 #include <opie2/ofileselector.h>
00034 
00035 /* QT */
00036 #include <qdialog.h>
00037 
00038 namespace Opie {
00039 namespace Ui   {
00040 
00064 class OFileDialog : public QDialog
00065 {
00066     Q_OBJECT
00067 public:
00068     OFileDialog(const QString &caption,
00069                 QWidget *, int mode, int selector,
00070                 const QString &dirName,
00071                 const QString &fileName = QString::null,
00072                 const MimeTypes &mimetypes = MimeTypes()  );
00073     QString mimetype() const;
00074     QString fileName() const;
00075     DocLnk selectedDocument()const;
00076 
00077     // static methods
00078     static QString getOpenFileName(int selector,
00079                                    const QString& startDir = QString::null,
00080                                    const QString &fileName = QString::null,
00081                                    const MimeTypes& mime = MimeTypes(),
00082                                    QWidget *wid = 0,
00083                                    const QString &caption = QString::null );
00084 
00085     static QString getSaveFileName(int selector,
00086                                    const QString& startDir = QString::null,
00087                                    const QString& fileName = QString::null,
00088                                    const MimeTypes& mimefilter = MimeTypes(),
00089                                    QWidget *wid = 0,
00090                                    const QString &caption = QString::null );
00091 
00092     static QString getDirectory(int selector,
00093                                 const QString &startDir = QString::null,
00094                                 QWidget *wid = 0,
00095                                 const QString &caption = QString::null );
00096 
00097     //let's OFileSelector catch up first
00098     //static QString getExistingDirectory(const QString& startDir = QString::null,
00099     //QWidget *parent = 0, const QString& caption = QString::null );
00100     
00101 private:
00102     class OFileDialogPrivate;
00103     OFileDialogPrivate *d;
00104     OFileSelector *file;
00105 
00106 private slots:
00107     void slotFileSelected( const QString & );
00108     void slotDirSelected(const QString & );
00109     void slotSelectorOk();
00110 };
00111 
00112 }
00113 }
00114 
00115 #endif

Generated on Sat Nov 5 16:16:24 2005 for OPIE by  doxygen 1.4.2