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       
00080     KEncodingFileDialog (const QString& startDir = QString::null,
00081                     const QString& encoding = QString::null,
00082             const QString& filter = QString::null,
00083             const QString& caption = QString::null, KFileDialog::OperationMode type = KFileDialog::Opening, 
00084                     QWidget *parent= 0, const char *name="", bool modal = true);
00088     ~KEncodingFileDialog();
00089 
00090     
00094     QString selectedEncoding() const;
00095 
00096 
00124     static Result getOpenFileNameAndEncoding(const QString& encoding=QString::null,
00125                    const QString& startDir= QString::null,
00126                    const QString& filter= QString::null,
00127                    QWidget *parent= 0,
00128                    const QString& caption = QString::null);
00129 
00156     static Result getOpenFileNamesAndEncoding(const QString& encoding=QString::null,
00157                     const QString& startDir= QString::null,
00158                     const QString& filter= QString::null,
00159                     QWidget *parent = 0,
00160                     const QString& caption= QString::null);
00161 
00188     static Result getOpenURLAndEncoding(const QString& encoding=QString::null,
00189                const QString& startDir = QString::null,
00190                const QString& filter= QString::null,
00191                QWidget *parent= 0,
00192                const QString& caption = QString::null);
00193 
00194 
00195 
00196 
00223     static Result getOpenURLsAndEncoding(const QString& encoding=QString::null,
00224                   const QString& startDir= QString::null,
00225                   const QString& filter= QString::null,
00226                   QWidget *parent = 0,
00227                   const QString& caption= QString::null);
00228 
00229 
00230 
00259     static Result getSaveFileNameAndEncoding(const QString& encoding=QString::null,
00260                    const QString& startDir=QString::null,
00261                    const QString& filter= QString::null,
00262                    QWidget *parent= 0,
00263                    const QString& caption = QString::null);
00264 
00265 
00294     static Result getSaveURLAndEncoding(const QString& encoding=QString::null,
00295                const QString& startDir= QString::null,
00296                const QString& filter= QString::null,
00297                QWidget *parent= 0,
00298                const QString& caption = QString::null);
00299 
00300 
00301 
00302 protected:
00303     virtual void virtual_hook( int id, void* data );
00304 private:
00305     KEncodingFileDialogPrivate *d;
00306 };
00307 
00308 #endif
KDE Logo
This file is part of the documentation for kio Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed May 4 07:13:22 2005 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003