Classified ads
Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BinaryFileListingModel Class Reference

Model-class for helping display of shared binary blobs, usually from a profile. More...

#include <binaryfilelistingmodel.h>

Inheritance diagram for BinaryFileListingModel:
Inheritance graph
[legend]
Collaboration diagram for BinaryFileListingModel:
Collaboration graph
[legend]

Signals

void error (MController::CAErrorSituation aError, const QString &aExplanation)
 

Public Member Functions

 BinaryFileListingModel (QList< Hash > &aFilesToList)
 
 ~BinaryFileListingModel ()
 
void addFile (const Hash &aFingerPrint)
 
void removeFile (const Hash &aFingerPrint)
 
QString fileDisplayNameByFingerPrint (const Hash &aFingerPrint)
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual QVariant headerData (int aSection, Qt::Orientation orientation, int role) const
 
void clear ()
 

Private Member Functions

void updateFileDataInArray (const Hash &aFingerPrint, bool aEmit)
 

Private Attributes

QList< Hash > & iFilesToList
 
QList< QPair< Hash, QString > > iNamesAndFingerPrints
 

Detailed Description

Model-class for helping display of shared binary blobs, usually from a profile.

Constructor & Destructor Documentation

BinaryFileListingModel::BinaryFileListingModel ( QList< Hash > &  aFilesToList)

Constructor

BinaryFileListingModel::~BinaryFileListingModel ( )

Destructor

Member Function Documentation

void BinaryFileListingModel::addFile ( const Hash aFingerPrint)

method for removing a reader. too.

Parameters
aFingerPrintis fingerprint of the file to add
void BinaryFileListingModel::clear ( )

method for emptying model contents when viewed profile changes

virtual int BinaryFileListingModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

re-implemented from QAbstractTableModel

Returns
number of columns in model
virtual QVariant BinaryFileListingModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

re-implemented from QAbstractTableModel

Returns
data to display in list
void BinaryFileListingModel::error ( MController::CAErrorSituation  aError,
const QString &  aExplanation 
)
signal
QString BinaryFileListingModel::fileDisplayNameByFingerPrint ( const Hash aFingerPrint)

method for retrieving display-name of a file

virtual QVariant BinaryFileListingModel::headerData ( int  aSection,
Qt::Orientation  orientation,
int  role 
) const
virtual
void BinaryFileListingModel::removeFile ( const Hash aFingerPrint)

method for removing a file. too.

Parameters
aFingerPrintis fingerprint of the file to remove
virtual int BinaryFileListingModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

re-implemented from QAbstractTableModel

Returns
number of rows in list
void BinaryFileListingModel::updateFileDataInArray ( const Hash aFingerPrint,
bool  aEmit 
)
private

Member Data Documentation

QList<Hash>& BinaryFileListingModel::iFilesToList
private
QList<QPair<Hash,QString> > BinaryFileListingModel::iNamesAndFingerPrints
private

The documentation for this class was generated from the following file: