# kio Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# kmimetypechooser.h

    00001 /* This file is part of the KDE libraries
    00002    Copyright (C) 2001 - 2004 Anders Lund <anders@alweb.dk>
    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 version 2 as published by the Free Software Foundation.
    00007
    00008    This library is distributed in the hope that it will be useful,
    00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
    00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00011    Library General Public License for more details.
    00012
    00013    You should have received a copy of the GNU Library General Public License
    00014    along with this library; see the file COPYING.LIB.  If not, write to
    00015    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00016    Boston, MA 02111-1307, USA.
    00017 */
    00018
    00019 #ifndef _KMIMETYPE_CHOOSER_H_
    00020 #define _KMIMETYPE_CHOOSER_H_
    00021
    00022 #include <qvbox.h>
    00023 #include <kdialogbase.h>
    00024
    00025
    00034 class KIO_EXPORT KMimeTypeChooser : public QVBox
    00035 {
    00036   Q_OBJECT
    00037
    00038   public:
    00042     enum Visuals {
    00043       Comments=1,
    00044       Patterns=2,
    00045       EditButton=4
    00046     };
    00062     KMimeTypeChooser( const QString& text=QString::null,
    00063                       const QStringList &selectedMimeTypes=0,
    00064                       const QString &defaultGroup=QString::null,
    00065                       const QStringList &groupsToShow=QStringList(),
    00066                       int visuals=Comments|Patterns|EditButton,
    00067                       QWidget *parent=0, const char *name=0 );
    00068     ~KMimeTypeChooser();
    00069
    00073     QStringList mimeTypes() const;
    00077     QStringList patterns() const;
    00078
    00079   public slots:
    00085     void editMimeType();
    00086
    00087   private slots:
    00091     void slotCurrentChanged(QListViewItem* i);
    00092
    00097      void slotSycocaDatabaseChanged();
    00098
    00099   private:
    00105     void loadMimeTypes( const QStringList &selected=QStringList() );
    00106
    00107     class KMimeTypeChooserPrivate *d;
    00108 };
    00109
    00131 class KIO_EXPORT KMimeTypeChooserDialog : public KDialogBase
    00132 {
    00133   public:
    00152     KMimeTypeChooserDialog( const QString &caption=QString::null,
    00153                          const QString& text=QString::null,
    00154                          const QStringList &selectedMimeTypes=QStringList(),
    00155                          const QString &defaultGroup=QString::null,
    00156                          const QStringList &groupsToShow=QStringList(),
    00157                          int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
    00158                          QWidget *parent=0, const char *name=0 );
    00159
    00163     KMimeTypeChooserDialog( const QString &caption,
    00164                          const QString& text,
    00165                          const QStringList &selectedMimeTypes,
    00166                          const QString &defaultGroup,
    00167                          QWidget *parent=0, const char *name=0 );
    00168
    00169     ~KMimeTypeChooserDialog();
    00170
    00174      KMimeTypeChooser* chooser() { return m_chooser; }
    00175
    00176   private:
    00177     KMimeTypeChooser *m_chooser;
    00178 };
    00179 #endif // _KMIMETYPE_CHOOSER_H_
    00180 // kate: space-indent on; indent-width 2; replace-tabs on;

This file is part of the documentation for kio Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:24:00 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003