21 #ifndef BINARYFILELISTINGMODEL_H 22 #define BINARYFILELISTINGMODEL_H 24 #include <QAbstractTableModel> 25 #include "../util/hash.h" 26 #include "../mcontroller.h" 62 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const ;
67 virtual int columnCount (
const QModelIndex & parent = QModelIndex() )
const ;
72 virtual QVariant
data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const ;
73 virtual QVariant
headerData(
int aSection, Qt::Orientation orientation,
int role)
const ;
80 const QString& aExplanation) ;
QString fileDisplayNameByFingerPrint(const Hash &aFingerPrint)
virtual QVariant headerData(int aSection, Qt::Orientation orientation, int role) const
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
Hash is class that carries 160-bit digest.
Definition: hash.h:38
CAErrorSituation
Definition: mcontroller.h:57
void removeFile(const Hash &aFingerPrint)
Carrier-class for binary blob.
Definition: binaryfile.h:37
Model-class for helping display of shared binary blobs, usually from a profile.
Definition: binaryfilelistingmodel.h:34
QList< Hash > & iFilesToList
Definition: binaryfilelistingmodel.h:84
BinaryFileListingModel(QList< Hash > &aFilesToList)
M of the MVC pattern. Handles permanent storage.
Definition: model.h:50
QList< QPair< Hash, QString > > iNamesAndFingerPrints
Definition: binaryfilelistingmodel.h:85
void addFile(const Hash &aFingerPrint)
void error(MController::CAErrorSituation aError, const QString &aExplanation)
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const
~BinaryFileListingModel()
void updateFileDataInArray(const Hash &aFingerPrint, bool aEmit)