Nepomuk-Core
#include <contacts-model.h>
Public Types | |
enum | GroupMode { NoGrouping, AccountGrouping, GroupGrouping } |
Signals | |
void | groupModeChanged () |
void | trackUnreadMessagesChanged () |
Public Member Functions | |
ContactsModel (QObject *parent) | |
virtual | ~ContactsModel () |
Tp::AccountManagerPtr | accountManager () const |
GroupMode | groupMode () const |
void | setAccountManager (const Tp::AccountManagerPtr &accountManager) |
void | setGroupMode (GroupMode mode) |
void | setTrackUnreadMessages (bool trackUnread) |
bool | trackUnreadMessages () const |
Protected Member Functions | |
virtual void | setSourceModel (QAbstractItemModel *sourceModel) |
Protected Member Functions inherited from KTp::ContactsFilterModel | |
bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const |
QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const |
Properties | |
Tp::AccountManagerPtr | accountManager |
GroupMode | groupMode |
bool | trackUnreadMessages |
Detailed Description
This class combines the list model and all the relevant filtering into a simple to use class In most cases you should use this as the entry point to the models in your application.
Definition at line 35 of file contacts-model.h.
Member Enumeration Documentation
- Enumerator:
NoGrouping Contacts are not grouped and are a simple flat list.
AccountGrouping Contacts are grouped by their account using AccountsTreeProxyModel.
GroupGrouping Contacts are grouped by their group name using GroupsTreeProxyModel.
Definition at line 46 of file contacts-model.h.
Constructor & Destructor Documentation
KTp::ContactsModel::ContactsModel | ( | QObject * | parent | ) |
Definition at line 46 of file contacts-model.cpp.
|
virtual |
Definition at line 55 of file contacts-model.cpp.
Member Function Documentation
Tp::AccountManagerPtr KTp::ContactsModel::accountManager | ( | ) | const |
Returns account manager currently used by the model.
GroupMode KTp::ContactsModel::groupMode | ( | ) | const |
The currently specified grouping model.
|
signal |
void KTp::ContactsModel::setAccountManager | ( | const Tp::AccountManagerPtr & | accountManager | ) |
Sets the accounts manager to be used for the KTp::ContactListModel.
Definition at line 61 of file contacts-model.cpp.
void KTp::ContactsModel::setGroupMode | ( | GroupMode | mode | ) |
Specify how the contacts should be grouped together.
Definition at line 76 of file contacts-model.cpp.
|
protectedvirtual |
Reimplemented from KTp::ContactsFilterModel.
Definition at line 158 of file contacts-model.cpp.
void KTp::ContactsModel::setTrackUnreadMessages | ( | bool | trackUnread | ) |
Specify whether to track unread messages or not.
Note this adds additional overhead, so only use it if you're going to show the information Default is False
Definition at line 95 of file contacts-model.cpp.
bool KTp::ContactsModel::trackUnreadMessages | ( | ) | const |
|
signal |
Property Documentation
|
readwrite |
Definition at line 41 of file contacts-model.h.
|
readwrite |
Definition at line 38 of file contacts-model.h.
|
readwrite |
Definition at line 39 of file contacts-model.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2013 The KDE developers.
Generated on Fri Mar 22 2013 10:58:52 by doxygen 1.8.1.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.