kmimetypechooser.h
/* This file is part of the KDE libraries
Copyright (C) 2001 - 2004 Anders Lund <anders@alweb.dk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef _KMIMETYPE_CHOOSER_H_
#define _KMIMETYPE_CHOOSER_H_
#include <qvbox.h>
#include <kdialogbase.h>
class KIO_EXPORT KMimeTypeChooser : public QVBox
{
Q_OBJECT
public:
enum Visuals {
Comments=1,
Patterns=2,
EditButton=4
};
KMimeTypeChooser( const QString& text=QString::null,
const QStringList &selectedMimeTypes=0,
const QString &defaultGroup=QString::null,
const QStringList &groupsToShow=QStringList(),
int visuals=Comments|Patterns|EditButton,
QWidget *parent=0, const char *name=0 );
~KMimeTypeChooser();
QStringList mimeTypes() const;
QStringList patterns() const;
public slots:
void editMimeType();
private slots:
void slotCurrentChanged(QListViewItem* i);
void slotSycocaDatabaseChanged();
private:
void loadMimeTypes( const QStringList &selected=QStringList() );
class KMimeTypeChooserPrivate *d;
};
class KIO_EXPORT KMimeTypeChooserDialog : public KDialogBase
{
public:
KMimeTypeChooserDialog( const QString &caption=QString::null,
const QString& text=QString::null,
const QStringList &selectedMimeTypes=QStringList(),
const QString &defaultGroup=QString::null,
const QStringList &groupsToShow=QStringList(),
int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
QWidget *parent=0, const char *name=0 );
KMimeTypeChooserDialog( const QString &caption,
const QString& text,
const QStringList &selectedMimeTypes,
const QString &defaultGroup,
QWidget *parent=0, const char *name=0 );
~KMimeTypeChooserDialog();
KMimeTypeChooser* chooser() { return m_chooser; }
private:
KMimeTypeChooser *m_chooser;
};
#endif // _KMIMETYPE_CHOOSER_H_
// kate: space-indent on; indent-width 2; replace-tabs on;
KMimeTypeChooser::Visuals
Visuals
Buttons and data for display.
Definition: kmimetypechooser.h:42
KMimeTypeChooser::Comments
Show the Mimetypes Comment field in a column ("HTML Document").
Definition: kmimetypechooser.h:43
KMimeTypeChooser::Patterns
Show the Mimetypes Patterns field in a column ("*.html;*.htm").
Definition: kmimetypechooser.h:44
KMimeTypeChooserDialog
A Dialog to choose some mimetypes.
Definition: kmimetypechooser.h:131
KMimeTypeChooser::EditButton
Show the "Edit" button, allowing to edit the selected type.
Definition: kmimetypechooser.h:45
KMimeTypeChooserDialog::chooser
KMimeTypeChooser * chooser()
Definition: kmimetypechooser.h:174
KMimeTypeChooser
This widget provides a checkable list of all available mimetypes, and a list of selected ones...
Definition: kmimetypechooser.h:34

KDE Home | KDE Accessibility Home | Description of Access Keys