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

Nepomuk-Core

  • KTp
  • ContactsModel
Public Types | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
KTp::ContactsModel Class Reference

#include <contacts-model.h>

Inheritance diagram for KTp::ContactsModel:
Inheritance graph
[legend]

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

enum KTp::ContactsModel::GroupMode
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.

KTp::ContactsModel::~ContactsModel ( )
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.

void KTp::ContactsModel::groupModeChanged ( )
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.

void KTp::ContactsModel::setSourceModel ( QAbstractItemModel *  sourceModel)
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
void KTp::ContactsModel::trackUnreadMessagesChanged ( )
signal

Property Documentation

Tp::AccountManagerPtr KTp::ContactsModel::accountManager
readwrite

Definition at line 41 of file contacts-model.h.

KTp::ContactsModel::GroupMode KTp::ContactsModel::groupMode
readwrite

Definition at line 38 of file contacts-model.h.

bool KTp::ContactsModel::trackUnreadMessages
readwrite

Definition at line 39 of file contacts-model.h.


The documentation for this class was generated from the following files:
  • contacts-model.h
  • contacts-model.cpp
This file is part of the KDE documentation.
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.

ktp-common-internals API Reference

Skip menu "ktp-common-internals API Reference"
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