Model-class for performing search on private messages. This is supposed to act as an underlying data-container for an user-interface view (QListView etc.)
More...
#include <privmsgsearchmodel.h>
Model-class for performing search on private messages. This is supposed to act as an underlying data-container for an user-interface view (QListView etc.)
◆ PrivateMessageSearchModel()
PrivateMessageSearchModel::PrivateMessageSearchModel |
( |
Model & |
aModel, |
|
|
MController & |
aController |
|
) |
| |
◆ ~PrivateMessageSearchModel()
PrivateMessageSearchModel::~PrivateMessageSearchModel |
( |
| ) |
|
◆ columnCount()
virtual int PrivateMessageSearchModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
re-implemented from QAbstractTableModel
- Returns
- number of columns in view
◆ data()
virtual QVariant PrivateMessageSearchModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
re-implemented from QAbstractListModel
- Returns
- data to display in list
◆ doUpdateDataOnIdle
void PrivateMessageSearchModel::doUpdateDataOnIdle |
( |
| ) |
|
|
slot |
method called via QTimer::singleShot() that is used for filling missing parts (message subjects etc.) from data that model is listing
◆ error
◆ headerData()
virtual QVariant PrivateMessageSearchModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
virtual |
◆ newMsgReceived() [1/2]
void PrivateMessageSearchModel::newMsgReceived |
( |
const Hash & |
aMessage, |
|
|
const Hash & |
aRecipient |
|
) |
| |
notification method called when new private message is inserted into database
◆ newMsgReceived() [2/2]
void PrivateMessageSearchModel::newMsgReceived |
( |
const PrivMessage & |
aMessage | ) |
|
notification method called when new private message is inserted into database , this variant is called from UI
◆ performSearch()
void PrivateMessageSearchModel::performSearch |
( |
| ) |
|
|
private |
◆ rowCount()
virtual int PrivateMessageSearchModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
virtual |
re-implemented from QAbstractTableModel
- Returns
- number of rows in list
◆ setAsRead()
void PrivateMessageSearchModel::setAsRead |
( |
const Hash & |
aMessage, |
|
|
bool |
aIsRead |
|
) |
| |
◆ setSearchHash()
void PrivateMessageSearchModel::setSearchHash |
( |
const Hash & |
aSearch | ) |
|
Calling this method will populate the model with messages that are either sent by profile given in parameter, or destined to given profile.
- Parameters
-
aSearch | profile fingerprint whose messages are the item of interest |
- Returns
- no thing, always succeeds
◆ updateSenderAndSubjectOfMsg()
Updates single private message from database, e.g. tries to open encryption and everything
- Returns
- true on success
◆ iController
◆ iLeftIcon
QIcon PrivateMessageSearchModel::iLeftIcon |
|
private |
◆ iModel
Model& PrivateMessageSearchModel::iModel |
|
private |
◆ iPrivateMessages
◆ iRightIcon
QIcon PrivateMessageSearchModel::iRightIcon |
|
private |
◆ iSearchHash
Hash PrivateMessageSearchModel::iSearchHash |
|
private |
The documentation for this class was generated from the following file: