libopie API Documentation

ofiledialog.h

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 
00030 #ifndef OpieFileDialog_h
00031 #define OpieFileDialog_h
00032 
00033 #include <qdialog.h>
00034 
00035 #include <opie/ofileselector.h>
00036 
00060 class OFileDialog : public QDialog {
00061   Q_OBJECT
00062  public:
00063   OFileDialog(const QString &caption,
00064           QWidget *, int mode, int selector,
00065           const QString &dirName,
00066           const QString &fileName = QString::null,
00067           const MimeTypes &mimetypes = MimeTypes()  );
00068   QString mimetype() const;
00069   QString fileName() const;
00070   DocLnk selectedDocument()const;
00071 
00072   // static methods
00073   static QString getOpenFileName(int selector,
00074                  const QString& startDir = QString::null,
00075                  const QString &fileName = QString::null,
00076                  const MimeTypes& mime = MimeTypes(),
00077                  QWidget *wid = 0,
00078                  const QString &caption = QString::null );
00079 
00080   static QString getSaveFileName(int selector,
00081                  const QString& startDir = QString::null,
00082                  const QString& fileName = QString::null,
00083                  const MimeTypes& mimefilter = MimeTypes(),
00084                  QWidget *wid = 0,
00085                  const QString &caption = QString::null );
00086 
00087   //let's OFileSelector catch up first
00088   //static QString getExistingDirectory(const QString& startDir = QString::null,
00089   // QWidget *parent = 0,
00090   //                  const QString& caption = QString::null );
00091  private:
00092   class OFileDialogPrivate;
00093   OFileDialogPrivate *d;
00094   OFileSelector *file;
00095 
00096  private slots:
00097   void slotFileSelected( const QString & );
00098   void slotDirSelected(const QString & );
00099   void slotSelectorOk();
00100 };
00101 #endif
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:43 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001