akonadi
#include <collectiondialog.h>
Inherits KDialog.
Public Types | |
enum | CollectionDialogOption { None = 0, AllowToCreateNewChildCollection = 1, KeepTreeExpanded = 2 } |
Public Member Functions | |
CollectionDialog (QWidget *parent=0) | |
CollectionDialog (QAbstractItemModel *model, QWidget *parent=0) | |
CollectionDialog (CollectionDialogOptions options, QAbstractItemModel *model=0, QWidget *parent=0) | |
~CollectionDialog () | |
Collection::Rights | accessRightsFilter () const |
void | changeCollectionDialogOptions (CollectionDialogOptions options) |
QStringList | mimeTypeFilter () const |
Akonadi::Collection | selectedCollection () const |
Akonadi::Collection::List | selectedCollections () const |
QAbstractItemView::SelectionMode | selectionMode () const |
void | setAccessRightsFilter (Collection::Rights rights) |
void | setDefaultCollection (const Collection &collection) |
void | setDescription (const QString &text) |
void | setMimeTypeFilter (const QStringList &mimeTypes) |
void | setSelectionMode (QAbstractItemView::SelectionMode mode) |
Detailed Description
A collection selection dialog.
Provides a dialog that lists collections that are available on the Akonadi storage and allows the selection of one or multiple collections.
The list of shown collections can be filtered by mime type and access rights. Note that mime types are not enabled by default, so setMimeTypeFilter() must be called to enable the desired mime types.
Example:
- Since
- 4.3
Definition at line 67 of file collectiondialog.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new collection dialog.
- Parameters
-
parent The parent widget.
Definition at line 234 of file collectiondialog_desktop.cpp.
|
explicit |
Creates a new collection dialog with a custom model
.
The filtering by content mime type and access rights is done on top of the custom model.
- Parameters
-
model The custom model to use. parent The parent widget.
- Since
- 4.4
Definition at line 240 of file collectiondialog_desktop.cpp.
|
explicit |
Creates a new collection dialog with a custom model
.
The filtering by content mime type and access rights is done on top of the custom model.
- Parameters
-
options The collection dialog options. model The custom model to use. parent The parent widget.
- Since
- 4.6
Definition at line 246 of file collectiondialog_desktop.cpp.
CollectionDialog::~CollectionDialog | ( | ) |
Destroys the collection dialog.
Definition at line 253 of file collectiondialog_desktop.cpp.
Member Function Documentation
Akonadi::Collection::Rights CollectionDialog::accessRightsFilter | ( | ) | const |
Sets the access rights
that the listed collections shall match with.
- Since
- 4.4
Definition at line 314 of file collectiondialog_desktop.cpp.
void CollectionDialog::changeCollectionDialogOptions | ( | CollectionDialogOptions | options | ) |
Change collection dialog options.
- Since
- 4.6
Definition at line 340 of file collectiondialog_desktop.cpp.
QStringList CollectionDialog::mimeTypeFilter | ( | ) | const |
Returns the mime types any of which the selected collection(s) shall support.
Definition at line 302 of file collectiondialog_desktop.cpp.
Akonadi::Collection CollectionDialog::selectedCollection | ( | ) | const |
Returns the selected collection if the selection mode is QAbstractItemView::SingleSelection.
If another selection mode was set, or nothing is selected, an invalid collection is returned.
Definition at line 258 of file collectiondialog_desktop.cpp.
Akonadi::Collection::List CollectionDialog::selectedCollections | ( | ) | const |
Returns the list of selected collections.
Definition at line 270 of file collectiondialog_desktop.cpp.
QAbstractItemView::SelectionMode CollectionDialog::selectionMode | ( | ) | const |
Returns the selection mode.
- See Also
- QAbstractItemView::selectionMode()
Definition at line 335 of file collectiondialog_desktop.cpp.
void CollectionDialog::setAccessRightsFilter | ( | Collection::Rights | rights | ) |
Sets the access rights
that the listed collections shall match with.
- Since
- 4.4
Definition at line 307 of file collectiondialog_desktop.cpp.
void CollectionDialog::setDefaultCollection | ( | const Collection & | collection | ) |
Sets the collection
that shall be selected by default.
- Since
- 4.4
Definition at line 325 of file collectiondialog_desktop.cpp.
void CollectionDialog::setDescription | ( | const QString & | text | ) |
Sets the text
that will be shown in the dialog.
- Since
- 4.4
Definition at line 319 of file collectiondialog_desktop.cpp.
void CollectionDialog::setMimeTypeFilter | ( | const QStringList & | mimeTypes | ) |
Sets the mime types any of which the selected collection(s) shall support.
Note that mime types are not enabled by default.
Definition at line 287 of file collectiondialog_desktop.cpp.
void CollectionDialog::setSelectionMode | ( | QAbstractItemView::SelectionMode | mode | ) |
Sets the selection mode.
The initial default mode is QAbstractItemView::SingleSelection.
- See Also
- QAbstractItemView::setSelectionMode()
Definition at line 330 of file collectiondialog_desktop.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:47 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.