akonadi
Akonadi::CollectionDialog Class Reference
A collection selection dialog. More...
#include <collectiondialog.h>
Inherits KDialog.
Public Member Functions | |
CollectionDialog (QWidget *parent=0) | |
QStringList | mimeTypeFilter () const |
Akonadi::Collection | selectedCollection () const |
Akonadi::Collection::List | selectedCollections () const |
QAbstractItemView::SelectionMode | selectionMode () const |
void | setMimeTypeFilter (const QStringList &mimeTypes) |
void | setSelectionMode (QAbstractItemView::SelectionMode mode) |
~CollectionDialog () |
Detailed Description
A collection selection dialog.
Provides a dialog that lists all collections that are available on the Akonadi storage. The list of shown collections can be filtered by mime type.
Example:
// show the user a dialog to select a collection of contacts Akonadi::CollectionDialog dlg( this ); dlg.setMimeTypeFilter( QStringList() << QString( "text/directory" ) ); if ( dlg.exec() ) { const Akonadi::Collection collection = dlg.selectedCollection(); ... }
- Since:
- 4.3
Definition at line 58 of file collectiondialog.h.
Constructor & Destructor Documentation
CollectionDialog::CollectionDialog | ( | QWidget * | parent = 0 |
) | [explicit] |
Creates a collection dialog.
- Parameters:
-
parent The parent widget.
Definition at line 48 of file collectiondialog.cpp.
CollectionDialog::~CollectionDialog | ( | ) |
Destroys the collection dialog.
Definition at line 67 of file collectiondialog.cpp.
Member Function Documentation
QStringList CollectionDialog::mimeTypeFilter | ( | ) | const |
Returns the mime types any of which the selected collection(s) shall support.
Definition at line 105 of file collectiondialog.cpp.
Akonadi::Collection CollectionDialog::selectedCollection | ( | ) | const |
Returns the selected collection.
Definition at line 72 of file collectiondialog.cpp.
Akonadi::Collection::List CollectionDialog::selectedCollections | ( | ) | const |
Returns the list of selected collections.
Definition at line 83 of file collectiondialog.cpp.
QAbstractItemView::SelectionMode CollectionDialog::selectionMode | ( | ) | const |
Returns the selection mode.
- See also:
- QAbstractItemView::selectionMode()
Definition at line 115 of file collectiondialog.cpp.
void CollectionDialog::setMimeTypeFilter | ( | const QStringList & | mimeTypes | ) |
Sets the mime types any of which the selected collection(s) shall support.
Definition at line 99 of file collectiondialog.cpp.
void CollectionDialog::setSelectionMode | ( | QAbstractItemView::SelectionMode | mode | ) |
Sets the selection mode.
- See also:
- QAbstractItemView::setSelectionMode()
Definition at line 110 of file collectiondialog.cpp.
The documentation for this class was generated from the following files: