Model-class for performing search on comments about a profile. This is supposed to act as an underlying data-container for an user-interface view (QListView etc.)
More...
#include <profilecommentlistingmodel.h>
Model-class for performing search on comments about a profile. This is supposed to act as an underlying data-container for an user-interface view (QListView etc.)
ProfileCommentListingModel::ProfileCommentListingModel |
( |
Model & |
aModel, |
|
|
MController & |
aController |
|
) |
| |
ProfileCommentListingModel::~ProfileCommentListingModel |
( |
| ) |
|
virtual int ProfileCommentListingModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
re-implemented from QAbstractTableModel
- Returns
- number of columns in view
virtual QVariant ProfileCommentListingModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
re-implemented from QAbstractListModel
- Returns
- data to display in list. If Qt::UserRole+1 is used to obtain data, html of the comment is returned, Qt::UserRole returns comment hash as QVariant. UserRole+2 returns header data as single string, intended for list displays. UserRole+3 returns number of attached files as unsigned.
void ProfileCommentListingModel::doUpdateDataOnIdle |
( |
| ) |
|
|
slot |
method called via QTimer::singleShot() that is used for filling missing parts (message subjects etc.) from data that model is listing
virtual QVariant ProfileCommentListingModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
void ProfileCommentListingModel::newCommentReceived |
( |
const Hash & |
aComment, |
|
|
const Hash & |
aCommentedProfile |
|
) |
| |
notification method called when new comment is inserted into database
void ProfileCommentListingModel::newCommentReceived |
( |
const ProfileComment & |
aComment | ) |
|
notification method called when new comment is inserted into database , this variant is called from UI
void ProfileCommentListingModel::performSearch |
( |
| ) |
|
|
private |
void ProfileCommentListingModel::profileSelected |
( |
const Hash & |
| ) |
|
|
slot |
called from controller when user profile is selected
virtual int ProfileCommentListingModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
re-implemented from QAbstractTableModel
- Returns
- number of rows in list
void ProfileCommentListingModel::setAsRead |
( |
const Hash & |
aComment, |
|
|
bool |
aIsRead |
|
) |
| |
void ProfileCommentListingModel::setSearchHash |
( |
const Hash & |
aSearch | ) |
|
Calling this method will populate the model with messages that are either sent by profile given in parameter, or comment a given profile.
- Parameters
-
aSearch | profile fingerprint whose messages are the item of intrest |
- Returns
- no thing, always succeeds
Model& ProfileCommentListingModel::iModel |
|
private |
Hash ProfileCommentListingModel::iSearchHash |
|
private |
The documentation for this class was generated from the following file: