Classified ads
|
Model-class for helping display of classified ads. More...
#include <calistingmodel.h>
Signals | |
void | error (MController::CAErrorSituation aError, const QString &aExplanation) |
Public Member Functions | |
CAListingModel (const Hash &aForumToList, const MModelProtocolInterface &aModel, MController *aController) | |
~CAListingModel () | |
QStandardItemModel * | theCaModel () |
void | setClassification (const Hash &aForumToList) |
virtual void | newCaReceived (const CA &aNewCa) |
virtual void | newCaReceived (const Hash &aHashNewCa, const Hash &aHashOfClassification) |
Private Member Functions | |
bool | insertCaIntoModel (const Hash &aArticleFingerPrint) |
Private Attributes | |
QStandardItemModel | iCaModel |
Hash | iForumToList |
const MModelProtocolInterface & | iModel |
QHash< int, QStandardItem * > * | iItemAndArticleHashRelation |
MController * | iController |
QStandardItem * | iListingHeaderDate |
QStandardItem * | iListingHeaderSubject |
Model-class for helping display of classified ads.
CAListingModel::CAListingModel | ( | const Hash & | aForumToList, |
const MModelProtocolInterface & | aModel, | ||
MController * | aController | ||
) |
Constructor
aForumToList | specifies the classification of the ads to include into model |
CAListingModel::~CAListingModel | ( | ) |
Destructor
|
signal |
|
private |
|
virtual |
notification method telling abuot newly-persisted classified ad. From CAObserver.
Implements ClassifiedAdsModel::CAObserver.
|
virtual |
Notification method telling abuot newly-persisted classified ad. Called from via controller.
void CAListingModel::setClassification | ( | const Hash & | aForumToList | ) |
method for setting another forum to be listed
aForumToList | specifies the forum |
QStandardItemModel* CAListingModel::theCaModel | ( | ) |
method for getting the actual model for view to consume. ownership of the pointer is not transferred.
|
private |
this model is exposed to UI
|
private |
|
private |
this model lists exactly one forum at time, given here
|
private |
This qhash contains pointers to items inside iCaModel but the key in hash is the low-order bits of the fingerprints of the articles as there seems to be no convenient way of finding items from model based on fingerprint, only search seems to be text-based
|
private |
|
private |
|
private |
datamodel reference