21 #ifndef PRIVMSGSEARCHMODEL_H 22 #define PRIVMSGSEARCHMODEL_H 24 #include <QAbstractListModel> 25 #include "../util/hash.h" 26 #include "../mcontroller.h" 66 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const ;
71 virtual int columnCount(
const QModelIndex & parent = QModelIndex())
const ;
76 virtual QVariant
data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const ;
77 virtual QVariant
headerData (
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const ;
93 const QString& aExplanation) ;
Hash iMessageHash
Definition: privmsgsearchmodel.h:40
Carrier-class for private msg inside classified ads.
Definition: privmsg.h:36
MController & iController
Definition: privmsgsearchmodel.h:112
QIcon iLeftIcon
Definition: privmsgsearchmodel.h:115
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
QIcon iRightIcon
Definition: privmsgsearchmodel.h:116
void setAsRead(const Hash &aMessage, bool aIsRead)
Definition: privmsgsearchmodel.h:39
Model & iModel
Definition: privmsgsearchmodel.h:111
~PrivateMessageSearchModel()
QString iSenderName
Definition: privmsgsearchmodel.h:45
Hash is class that carries 160-bit digest.
Definition: hash.h:38
CAErrorSituation
Definition: mcontroller.h:57
QString iTrustingProfileName
Definition: privmsgsearchmodel.h:47
void error(MController::CAErrorSituation aError, const QString &aExplanation)
void doUpdateDataOnIdle()
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
void setSearchHash(const Hash &aSearch)
void newMsgReceived(const Hash &aMessage, const Hash &aRecipient)
quint32 iMessageTimeStamp
Definition: privmsgsearchmodel.h:43
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:48
Model-class for performing search on private messages. This is supposed to act as an underlying data-...
Definition: privmsgsearchmodel.h:36
Hash iSearchHash
Definition: privmsgsearchmodel.h:114
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QList< PrivateMessageListItem > iPrivateMessages
Definition: privmsgsearchmodel.h:113
M of the MVC pattern. Handles permanent storage.
Definition: model.h:50
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
QString iMessageSubject
Definition: privmsgsearchmodel.h:44
PrivateMessageSearchModel(Model &aModel, MController &aController)
Hash iRecipientHash
Definition: privmsgsearchmodel.h:41
Hash iSenderHash
Definition: privmsgsearchmodel.h:42
bool iIsRead
Definition: privmsgsearchmodel.h:46
bool updateSenderAndSubjectOfMsg(PrivateMessageListItem &aItem)