kio Library API Documentation

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 KMimeTypeChooser : public QVBox 00035 { 00036 Q_OBJECT 00037 00038 public: 00042 enum Visuals { 00043 Comments=1, 00044 Patterns=2, 00045 EditButton=4 00046 }; 00060 KMimeTypeChooser( const QString& text=QString::null, 00061 const QStringList &selectedMimeTypes=0, 00062 const QString &defaultGroup=QString::null, 00063 const QStringList &groupsToShow=QStringList(), 00064 int visuals=Comments|Patterns|EditButton, 00065 QWidget *parent=0, const char *name=0 ); 00066 ~KMimeTypeChooser() {}; 00067 00071 QStringList mimeTypes() const; 00075 QStringList patterns() const; 00076 00077 public slots: 00083 void editMimeType(); 00084 00085 private slots: 00089 void slotCurrentChanged(QListViewItem* i); 00090 00095 void slotSycocaDatabaseChanged(); 00096 00097 private: 00103 void loadMimeTypes( const QStringList &selected=QStringList() ); 00104 00105 class KMimeTypeChooserPrivate *d; 00106 }; 00107 00129 class KMimeTypeChooserDialog : public KDialogBase 00130 { 00131 public: 00148 KMimeTypeChooserDialog( const QString &caption=QString::null, 00149 const QString& text=QString::null, 00150 const QStringList &selectedMimeTypes=QStringList(), 00151 const QString &defaultGroup=QString::null, 00152 const QStringList &groupsToShow=QStringList(), 00153 int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton, 00154 QWidget *parent=0, const char *name=0 ); 00155 00159 KMimeTypeChooserDialog( const QString &caption, 00160 const QString& text, 00161 const QStringList &selectedMimeTypes, 00162 const QString &defaultGroup, 00163 QWidget *parent=0, const char *name=0 ); 00164 00165 ~KMimeTypeChooserDialog(); 00166 00170 KMimeTypeChooser* chooser() { return m_chooser; } 00171 00172 private: 00173 KMimeTypeChooser *m_chooser; 00174 }; 00175 #endif // _KMIMETYPE_CHOOSER_H_ 00176 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kio Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:43:52 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003