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
[legend]
Collaboration diagram for ContactListingModel:
Collaboration graph
[legend]

Signals

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

ModeliModel
 
MControlleriController
 
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
virtual

re-implemented from QAbstractTableModel

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

method for retrieving contact.

Parameters
aFingerPrinttells what to seek
aResultingContactwill have its field filled if match is made
Returns
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
virtual

re-implemented from QAbstractListModel

Returns
data to display in list
void ContactListingModel::error ( MController::CAErrorSituation  aError,
const QString &  aExplanation 
)
signal
virtual QVariant ContactListingModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual
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
virtual
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
private
MController& ContactListingModel::iController
private
Model& ContactListingModel::iModel
private

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