Classified ads
Signals | Public Member Functions | Private Attributes | List of all members
ContactListingModel Class Reference

Model-class for performing search on contact-list contacts This is supposed to act as an underlying data-container for an user-interface view (QTableView etc.) More...

#include <contactlistingmodel.h>

Inheritance diagram for ContactListingModel:
Inheritance graph
Collaboration diagram for ContactListingModel:
Collaboration graph


void error (MController::CAErrorSituation aError, const QString &aExplanation)

Public Member Functions

 ContactListingModel (Model &aModel, MController &aController)
 ~ContactListingModel ()
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void newContactAdded (const Contact &aContact)
void removeContact (const Hash &aContact)
bool contactByFingerPrint (const Hash &aFingerPrint, Contact *aResultingContact) const
QVariant contactsAsQVariant () const
void setContactsFromQVariant (const QVariantList &aContacts)
bool isContactContained (const Hash &aFingerPrint) const
void clearContents ()
QList< HashtrustList () const

Private Attributes

QList< ContactiContacts

Detailed Description

Model-class for performing search on contact-list contacts This is supposed to act as an underlying data-container for an user-interface view (QTableView etc.)

Constructor & Destructor Documentation

ContactListingModel::ContactListingModel ( Model aModel,
MController aController 
ContactListingModel::~ContactListingModel ( )

Member Function Documentation

void ContactListingModel::clearContents ( )
virtual int ContactListingModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

re-implemented from QAbstractTableModel

number of columns in view
bool ContactListingModel::contactByFingerPrint ( const Hash aFingerPrint,
Contact aResultingContact 
) const

method for retrieving contact.

aFingerPrinttells what to seek
aResultingContactwill have its field filled if match is made
true if contact was found
QVariant ContactListingModel::contactsAsQVariant ( ) const

whoever calls this method, must set Model.lock() first

virtual QVariant ContactListingModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

re-implemented from QAbstractListModel

data to display in list
void ContactListingModel::error ( MController::CAErrorSituation  aError,
const QString &  aExplanation 
virtual QVariant ContactListingModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
bool ContactListingModel::isContactContained ( const Hash aFingerPrint) const
void ContactListingModel::newContactAdded ( const Contact aContact)
void ContactListingModel::removeContact ( const Hash aContact)
virtual int ContactListingModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
void ContactListingModel::setContactsFromQVariant ( const QVariantList &  aContacts)
QList<Hash> ContactListingModel::trustList ( ) const

method that returns subset of contacts that are marked as trusted

Member Data Documentation

QList<Contact> ContactListingModel::iContacts
MController& ContactListingModel::iController
Model& ContactListingModel::iModel

The documentation for this class was generated from the following file: