• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Public Member Functions | List of all members
KMimeTypeChooserDialog Class Reference

#include <kmimetypechooser.h>

Inheritance diagram for KMimeTypeChooserDialog:
Inheritance graph
[legend]

Public Member Functions

 KMimeTypeChooserDialog (const QString &caption=QString(), const QString &text=QString(), const QStringList &selectedMimeTypes=QStringList(), const QString &defaultGroup=QString(), const QStringList &groupsToShow=QStringList(), int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton, QWidget *parent=0)
 
 KMimeTypeChooserDialog (const QString &caption, const QString &text, const QStringList &selectedMimeTypes, const QString &defaultGroup, QWidget *parent=0)
 
 ~KMimeTypeChooserDialog ()
 
KMimeTypeChooser * chooser ()
 

Detailed Description

A Dialog to choose some mimetypes.

Provides a checkable tree list of mimetypes, with icons and optinally comments and patterns, and an (optional) button to display the KDE mimetype editor.

Here is an example, using the dialog to set the text of two lineedits:

QString text = i18n("Select the MimeTypes you want for this file type.");
QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() );
KMimeTypeChooserDialog dlg( i18n("Select Mime Types"), text, list, "text", this );
if ( dlg.exec() == KDialog::Accepted ) {
leWildcards->setText( dlg.chooser()->patterns().join(";") );
leMimetypes->setText( dlg.chooser()->mimeTypes().join(";") );
}
kmimetypechooserdialog.png
KMimeTypeChooserDialog in action
Author
Anders Lund (anders at alweb dk) dec 19, 2001

Definition at line 111 of file kmimetypechooser.h.

Constructor & Destructor Documentation

KMimeTypeChooserDialog::KMimeTypeChooserDialog ( const QString &  caption = QString(),
const QString &  text = QString(),
const QStringList &  selectedMimeTypes = QStringList(),
const QString &  defaultGroup = QString(),
const QStringList &  groupsToShow = QStringList(),
int  visuals = KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton,
QWidget *  parent = 0 
)
explicit

Create a KMimeTypeChooser dialog.

Parameters
captionThe title of the dialog
textA Text to display above the list
selectedMimeTypesA list of mimetype names, theese will be checked in the list if they exist. patterns will be added to the list view.
visualsA OR'd KMimetypeChooser::Visuals enum to decide which data and buttons to display.
defaultGroupThe group to open when no groups are selected (like "text"). If not provided, no group is opened. If groupsToShow is provided and defaultGroup is not a member of that, it is ignored.
groupsToShowa list of mimetype groups to show. If empty, all groups are shown.
parentThe parent widget to use

Definition at line 293 of file kmimetypechooser.cpp.

KMimeTypeChooserDialog::KMimeTypeChooserDialog ( const QString &  caption,
const QString &  text,
const QStringList &  selectedMimeTypes,
const QString &  defaultGroup,
QWidget *  parent = 0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 312 of file kmimetypechooser.cpp.

KMimeTypeChooserDialog::~KMimeTypeChooserDialog ( )

Definition at line 345 of file kmimetypechooser.cpp.

Member Function Documentation

KMimeTypeChooser * KMimeTypeChooserDialog::chooser ( )
Returns
a pointer to the KMimeTypeChooser widget

Definition at line 330 of file kmimetypechooser.cpp.


The documentation for this class was generated from the following files:
  • kmimetypechooser.h
  • kmimetypechooser.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal