KMimeTypeChooserDialog Class Reference
#include <kmimetypechooser.h>
Inherits KDialogBase.
Public Member Functions | |
KMimeTypeChooserDialog (const TQString &caption=TQString::null, const TQString &text=TQString::null, const TQStringList &selectedMimeTypes=TQStringList(), const TQString &defaultGroup=TQString::null, const TQStringList &groupsToShow=TQStringList(), int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton, TQWidget *parent=0, const char *name=0) | |
KMimeTypeChooserDialog (const TQString &caption, const TQString &text, const TQStringList &selectedMimeTypes, const TQString &defaultGroup, TQWidget *parent=0, const char *name=0) | |
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:
TQString text = i18n("Select the MimeTypes you want for this file type.");
TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() );
i18n("Select Mime Types"), text, list, "text" );
if ( d->exec() == KDialogBase::Accepted ) {
}
KMimeTypeChooserDialog(const TQString &caption=TQString::null, const TQString &text=TQString::null, const TQStringList &selectedMimeTypes=TQStringList(), const TQString &defaultGroup=TQString::null, const TQStringList &groupsToShow=TQStringList(), int visuals=KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton, TQWidget *parent=0, const char *name=0)
Create a KMimeTypeChooser dialog.
Definition: kmimetypechooser.cpp:249
Definition at line 131 of file kmimetypechooser.h.
Constructor & Destructor Documentation
◆ KMimeTypeChooserDialog() [1/2]
KMimeTypeChooserDialog::KMimeTypeChooserDialog | ( | const TQString & | caption = TQString::null , |
const TQString & | text = TQString::null , |
||
const TQStringList & | selectedMimeTypes = TQStringList() , |
||
const TQString & | defaultGroup = TQString::null , |
||
const TQStringList & | groupsToShow = TQStringList() , |
||
int | visuals = KMimeTypeChooser::Comments|KMimeTypeChooser::Patterns|KMimeTypeChooser::EditButton , |
||
TQWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Create a KMimeTypeChooser dialog.
- Parameters
-
caption The title of the dialog text A Text to display above the list selectedMimeTypes A list of mimetype names, theese will be checked in the list if they exist. patterns will be added to the list view. visuals A OR'd KMimetypeChooser::Visuals enum to decide which data and buttons to display. defaultGroup The 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.groupsToShow a list of mimetype groups to show. If empty, all groups are shown. parent The parent widget to use name The internal name of this object
Definition at line 249 of file kmimetypechooser.cpp.
◆ KMimeTypeChooserDialog() [2/2]
KMimeTypeChooserDialog::KMimeTypeChooserDialog | ( | const TQString & | caption, |
const TQString & | text, | ||
const TQStringList & | selectedMimeTypes, | ||
const TQString & | defaultGroup, | ||
TQWidget * | parent = 0 , |
||
const char * | name = 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 269 of file kmimetypechooser.cpp.
Member Function Documentation
◆ chooser()
|
inline |
- Returns
- a pointer to the KMimeTypeChooser widget
Definition at line 174 of file kmimetypechooser.h.
The documentation for this class was generated from the following files: