• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • Akonadi
  • CollectionComboBox
Signals | Public Member Functions | List of all members
Akonadi::CollectionComboBox Class Reference

#include <collectioncombobox.h>

Inherits KComboBox.

Signals

void currentChanged (const Akonadi::Collection &collection)
 

Public Member Functions

 CollectionComboBox (QAbstractItemModel *model, QWidget *parent=0)
 
 CollectionComboBox (QWidget *parent=0)
 
 ~CollectionComboBox ()
 
Collection::Rights accessRightsFilter () const
 
Akonadi::Collection currentCollection () const
 
bool excludeVirtualCollections () const
 
QStringList mimeTypeFilter () const
 
void setAccessRightsFilter (Collection::Rights rights)
 
void setDefaultCollection (const Collection &collection)
 
void setExcludeVirtualCollections (bool b)
 
void setMimeTypeFilter (const QStringList &mimetypes)
 

Detailed Description

A combobox for selecting an Akonadi collection.

This widget provides a combobox to select a collection from the Akonadi storage. The available collections can be filtered by mime type and access rights.

Example:

using namespace Akonadi;
QStringList contentMimeTypes;
contentMimeTypes << KABC::Addressee::mimeType();
contentMimeTypes << KABC::ContactGroup::mimeType();
CollectionComboBox *box = new CollectionComboBox( this );
box->setMimeTypeFilter( contentMimeTypes );
box->setAccessRightsFilter( Collection::CanCreateItem );
...
const Collection collection = box->currentCollection();
Akonadi::CollectionComboBox
A combobox for selecting an Akonadi collection.
Definition collectioncombobox.h:63
Akonadi::CollectionComboBox::setMimeTypeFilter
void setMimeTypeFilter(const QStringList &mimetypes)
Sets the content mimetypes the collections shall be filtered by.
Definition collectioncombobox.cpp:183
Akonadi::CollectionComboBox::setAccessRightsFilter
void setAccessRightsFilter(Collection::Rights rights)
Sets the access rights the collections shall be filtered by.
Definition collectioncombobox.cpp:200
Akonadi::CollectionComboBox::currentCollection
Akonadi::Collection currentCollection() const
Returns the current selection.
Definition collectioncombobox.cpp:215
Akonadi::Collection
Represents a collection of PIM items.
Definition collection.h:76
Akonadi::Collection::CanCreateItem
@ CanCreateItem
Can create new items in this collection.
Definition collection.h:89
Akonadi
FreeBusyManager::Singleton.
Definition actionstatemanager_p.h:28
Author
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org
Since
4.4

Definition at line 62 of file collectioncombobox.h.

Constructor & Destructor Documentation

◆ CollectionComboBox() [1/2]

CollectionComboBox::CollectionComboBox ( QWidget * parent = 0)
explicit

Creates a new collection combobox.

Parameters
parentThe parent widget.

Definition at line 158 of file collectioncombobox.cpp.

◆ CollectionComboBox() [2/2]

CollectionComboBox::CollectionComboBox ( QAbstractItemModel * model,
QWidget * parent = 0 )
explicit

Creates a new collection combobox with a custom model.

The filtering by content mime type and access rights is done on top of the custom model.

Parameters
modelThe custom model to use.
parentThe parent widget.

Definition at line 168 of file collectioncombobox.cpp.

◆ ~CollectionComboBox()

CollectionComboBox::~CollectionComboBox ( )

Destroys the collection combobox.

Definition at line 178 of file collectioncombobox.cpp.

Member Function Documentation

◆ accessRightsFilter()

Akonadi::Collection::Rights CollectionComboBox::accessRightsFilter ( ) const

Returns the access rights the collections are filtered by.

Definition at line 205 of file collectioncombobox.cpp.

◆ currentChanged

void Akonadi::CollectionComboBox::currentChanged ( const Akonadi::Collection & collection)
signal

This signal is emitted whenever the current selection has been changed.

Parameters
collectionThe current selection.

◆ currentCollection()

Akonadi::Collection CollectionComboBox::currentCollection ( ) const

Returns the current selection.

Definition at line 215 of file collectioncombobox.cpp.

◆ excludeVirtualCollections()

bool CollectionComboBox::excludeVirtualCollections ( ) const
Since
4.12

Definition at line 230 of file collectioncombobox.cpp.

◆ mimeTypeFilter()

QStringList CollectionComboBox::mimeTypeFilter ( ) const

Returns the content mimetype the collections are filtered by.

Don't assume this list has the original order.

Definition at line 195 of file collectioncombobox.cpp.

◆ setAccessRightsFilter()

void CollectionComboBox::setAccessRightsFilter ( Collection::Rights rights)

Sets the access rights the collections shall be filtered by.

Definition at line 200 of file collectioncombobox.cpp.

◆ setDefaultCollection()

void CollectionComboBox::setDefaultCollection ( const Collection & collection)

Sets the collection that shall be selected by default.

Definition at line 210 of file collectioncombobox.cpp.

◆ setExcludeVirtualCollections()

void CollectionComboBox::setExcludeVirtualCollections ( bool b)
Since
4.12

Definition at line 225 of file collectioncombobox.cpp.

◆ setMimeTypeFilter()

void CollectionComboBox::setMimeTypeFilter ( const QStringList & mimetypes)

Sets the content mimetypes the collections shall be filtered by.

Definition at line 183 of file collectioncombobox.cpp.


The documentation for this class was generated from the following files:
  • collectioncombobox.h
  • collectioncombobox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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