kio Library API Documentation

kencodingfiledialog.h

00001 // -*- c++ -*-
00002 /* This file is part of the KDE libraries
00003     Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org>
00004           2003 Andras Mantia <amantia@freemail.hu>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA 02111-1307, USA.
00020 */
00021 
00022 #ifndef __KENCODINGFILEDIALOG_H__
00023 #define __KENCODINGFILEDIALOG_H__
00024 
00025 #include <kfiledialog.h>
00026 
00027 struct KEncodingFileDialogPrivate;
00028 
00039 class KIO_EXPORT KEncodingFileDialog : public KFileDialog
00040 {
00041     Q_OBJECT
00042 
00043 public:
00044     class Result {
00045     public:
00046         QStringList fileNames;
00047         KURL::List  URLs;
00048         QString encoding;
00049     };
00050       
00077     KEncodingFileDialog (const QString& startDir = QString::null,
00078                     const QString& encoding = QString::null,
00079             const QString& filter = QString::null,
00080             const QString& caption = QString::null, KFileDialog::OperationMode type = KFileDialog::Opening, 
00081                     QWidget *parent= 0, const char *name="", bool modal = true);
00085     ~KEncodingFileDialog();
00086 
00087     
00091     QString selectedEncoding() const;
00092 
00093 
00121     static Result getOpenFileNameAndEncoding(const QString& encoding=QString::null,
00122                    const QString& startDir= QString::null,
00123                    const QString& filter= QString::null,
00124                    QWidget *parent= 0,
00125                    const QString& caption = QString::null);
00126 
00153     static Result getOpenFileNamesAndEncoding(const QString& encoding=QString::null,
00154                     const QString& startDir= QString::null,
00155                     const QString& filter= QString::null,
00156                     QWidget *parent = 0,
00157                     const QString& caption= QString::null);
00158 
00185     static Result getOpenURLAndEncoding(const QString& encoding=QString::null,
00186                const QString& startDir = QString::null,
00187                const QString& filter= QString::null,
00188                QWidget *parent= 0,
00189                const QString& caption = QString::null);
00190 
00191 
00192 
00193 
00220     static Result getOpenURLsAndEncoding(const QString& encoding=QString::null,
00221                   const QString& startDir= QString::null,
00222                   const QString& filter= QString::null,
00223                   QWidget *parent = 0,
00224                   const QString& caption= QString::null);
00225 
00226 
00227 
00256     static Result getSaveFileNameAndEncoding(const QString& encoding=QString::null,
00257                    const QString& startDir=QString::null,
00258                    const QString& filter= QString::null,
00259                    QWidget *parent= 0,
00260                    const QString& caption = QString::null);
00261 
00262 
00291     static Result getSaveURLAndEncoding(const QString& encoding=QString::null,
00292                const QString& startDir= QString::null,
00293                const QString& filter= QString::null,
00294                QWidget *parent= 0,
00295                const QString& caption = QString::null);
00296 
00297 
00298 
00299 protected:
00300     virtual void virtual_hook( int id, void* data );
00301 private:
00302     KEncodingFileDialogPrivate *d;
00303 };
00304 
00305 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.3.90.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 30 10:15:28 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003