Qt Model Utilities  0.0.1
A set of utilities for the model/view framework of Qt
Public Member Functions | Protected Member Functions | Properties | List of all members
CsvModelSerialiser Class Reference
Inheritance diagram for CsvModelSerialiser:
AbstractSingleRoleSerialiser AbstractModelSerialiser

Public Member Functions

 CsvModelSerialiser (QAbstractItemModel *model=Q_NULLPTR)
 
 CsvModelSerialiser (const QAbstractItemModel *model)
 
const QString & csvSeparator () const
 
bool firstColumnIsHeader ()
 
bool firstRowIsHeader ()
 
Q_INVOKABLE bool loadModel (QIODevice *source) Q_DECL_OVERRIDE
 
Q_INVOKABLE bool loadModel (const QByteArray &source) Q_DECL_OVERRIDE
 
virtual Q_INVOKABLE bool loadModel (QString *source)
 
Q_INVOKABLE bool saveModel (QIODevice *destination) const Q_DECL_OVERRIDE
 
Q_INVOKABLE bool saveModel (QByteArray *destination) const Q_DECL_OVERRIDE
 
virtual Q_INVOKABLE bool saveModel (QString *destination) const
 
void setCsvSeparator (const QString &val)
 
void setFirstColumnIsHeader (bool val)
 
void setFirstRowIsHeader (bool val)
 
- Public Member Functions inherited from AbstractSingleRoleSerialiser
 AbstractSingleRoleSerialiser (QAbstractItemModel *model=Q_NULLPTR)
 
 AbstractSingleRoleSerialiser (const QAbstractItemModel *model)
 
 ~AbstractSingleRoleSerialiser ()=0
 
int roleToSave () const
 
void setRoleToSave (int val)
 setter of roleToSave property More...
 
- Public Member Functions inherited from AbstractModelSerialiser
 AbstractModelSerialiser (QAbstractItemModel *model=Q_NULLPTR)
 
 AbstractModelSerialiser (const QAbstractItemModel *model)
 
virtual ~AbstractModelSerialiser ()=0
 
virtual const QAbstractItemModel * constModel () const
 
virtual QAbstractItemModel * model () const
 
void setModel (QAbstractItemModel *val)
 setter of model property More...
 
void setModel (const QAbstractItemModel *val)
 set the model over which the serialiser will operate More...
 

Protected Member Functions

 CsvModelSerialiser (CsvModelSerialiserPrivate &d)
 
- Protected Member Functions inherited from AbstractSingleRoleSerialiser
 AbstractSingleRoleSerialiser (AbstractSingleRoleSerialiserPrivate &d)
 
- Protected Member Functions inherited from AbstractModelSerialiser
 AbstractModelSerialiser (AbstractModelSerialiserPrivate &d)
 

Properties

QString csvSeparator
 
bool firstColumnIsHeader
 
bool firstRowIsHeader
 
- Properties inherited from AbstractSingleRoleSerialiser
int roleToSave
 the role that will be serialised More...
 
- Properties inherited from AbstractModelSerialiser
const QAbstractItemModel constModel
 the model over which the serialiser will operate More...
 
QAbstractItemModel model
 the model over which the serialiser will operate More...
 

Additional Inherited Members

- Protected Attributes inherited from AbstractModelSerialiser
AbstractModelSerialiserPrivate * d_ptr