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::BinaryFileListingModel ( QList< Hash > &  aFilesToList)

Constructor

◆ ~BinaryFileListingModel()

BinaryFileListingModel::~BinaryFileListingModel ( )

Destructor

Member Function Documentation

◆ addFile()

void BinaryFileListingModel::addFile ( const Hash aFingerPrint)

method for removing a reader. too.

Parameters
aFingerPrintis fingerprint of the file to add

◆ clear()

void BinaryFileListingModel::clear ( )

method for emptying model contents when viewed profile changes

◆ columnCount()

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

re-implemented from QAbstractTableModel

Returns
number of columns in model

◆ data()

virtual QVariant BinaryFileListingModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

re-implemented from QAbstractTableModel

Returns
data to display in list

◆ error

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

◆ fileDisplayNameByFingerPrint()

QString BinaryFileListingModel::fileDisplayNameByFingerPrint ( const Hash aFingerPrint)

method for retrieving display-name of a file

◆ headerData()

virtual QVariant BinaryFileListingModel::headerData ( int  aSection,
Qt::Orientation  orientation,
int  role 
) const
virtual

◆ removeFile()

void BinaryFileListingModel::removeFile ( const Hash aFingerPrint)

method for removing a file. too.

Parameters
aFingerPrintis fingerprint of the file to remove

◆ rowCount()

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

re-implemented from QAbstractTableModel

Returns
number of rows in list

◆ updateFileDataInArray()

void BinaryFileListingModel::updateFileDataInArray ( const Hash aFingerPrint,
bool  aEmit 
)
private

Member Data Documentation

◆ iFilesToList

QList<Hash>& BinaryFileListingModel::iFilesToList
private

◆ iNamesAndFingerPrints

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

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