CollectionRequester Class Reference
from PyKDE4.akonadi import *
Inherits: KHBox → QFrame → QWidget → QObject
Namespace: Akonadi
Detailed Description
A widget to request an Akonadi collection from the user.
This class is a widget showing a read-only lineedit displaying the currently chosen collection and a button invoking a dialog for choosing a collection.
Example:
// create a collection requester to select a collection of contacts
Akonadi.CollectionRequester requester( Akonadi.Collection.root(), this );
requester.setMimeTypeFilter( QStringList() << QString( "text/directory" ) );
...
const Akonadi.Collection collection = requester.collection();
if ( collection.isValid() ) {
...
}
- Since:
- 4.3
Methods | |
| __init__ (self, Akonadi.CollectionRequester a0) | |
| __init__ (self, QWidget parent=0) | |
| __init__ (self, Akonadi.Collection collection, QWidget parent=0) | |
| Akonadi.Collection | collection (self) |
| QStringList | mimeTypeFilter (self) |
| setCollection (self, Akonadi.Collection collection) | |
| setMimeTypeFilter (self, QStringList mimeTypes) | |
Method Documentation
| __init__ | ( | self, | ||
| Akonadi.CollectionRequester | a0 | |||
| ) |
| __init__ | ( | self, | ||
| QWidget | parent=0 | |||
| ) |
Creates a collection requester.
- Parameters:
-
parent The parent widget.
| __init__ | ( | self, | ||
| Akonadi.Collection | collection, | |||
| QWidget | parent=0 | |||
| ) |
Creates a collection requester with an initial collection.
- Parameters:
-
collection The initial collection. parent The parent widget.
| Akonadi.Collection collection | ( | self ) |
Returns the currently chosen collection, or an empty collection if none none was chosen.
| QStringList mimeTypeFilter | ( | self ) |
Returns the mime types any of which the selected collection shall support.
- See also:
- Akonadi.CollectionDialog.mimeTypeFilter()
| setCollection | ( | self, | ||
| Akonadi.Collection | collection | |||
| ) |
Sets the collection of the requester.
| setMimeTypeFilter | ( | self, | ||
| QStringList | mimeTypes | |||
| ) |
Sets the mime types any of which the selected collection shall support.
- See also:
- Akonadi.CollectionDialog.setMimeTypeFilter()
KDE 4.3 PyKDE API Reference