Qt Model Utilities  0.0.1
A set of utilities for the model/view framework of Qt
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
AbstractModelSerialiser Class Referenceabstract

The interface for model serialisers. More...

Inheritance diagram for AbstractModelSerialiser:
AbstractMultiRoleSerialiser AbstractSingleRoleSerialiser BinaryModelSerialiser HtmlModelSerialiser XmlModelSerialiser CsvModelSerialiser

Public Member Functions

 AbstractModelSerialiser (QAbstractItemModel *model=Q_NULLPTR)
 
 AbstractModelSerialiser (const QAbstractItemModel *model)
 
virtual ~AbstractModelSerialiser ()=0
 
virtual const QAbstractItemModel * constModel () const
 
virtual Q_INVOKABLE bool loadModel (QIODevice *source)=0
 
virtual Q_INVOKABLE bool loadModel (const QByteArray &source)=0
 
virtual QAbstractItemModel * model () const
 
virtual Q_INVOKABLE bool saveModel (QIODevice *destination) const =0
 
virtual Q_INVOKABLE bool saveModel (QByteArray *destination) const =0
 
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

 AbstractModelSerialiser (AbstractModelSerialiserPrivate &d)
 

Protected Attributes

AbstractModelSerialiserPrivate * d_ptr
 

Properties

const QAbstractItemModel constModel
 the model over which the serialiser will operate More...
 
QAbstractItemModel model
 the model over which the serialiser will operate More...
 

Detailed Description

The interface for model serialisers.

This class serve as a base for all serialisers

Constructor & Destructor Documentation

AbstractModelSerialiser::AbstractModelSerialiser ( QAbstractItemModel *  model = Q_NULLPTR)

Constructs a serialiser operating over model

See also
isEmpty()
AbstractModelSerialiser::AbstractModelSerialiser ( const QAbstractItemModel *  model)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

loadModel will always fail as the model is not editable

AbstractModelSerialiser::~AbstractModelSerialiser ( )
pure virtual

Destroys the object.

Member Function Documentation

void AbstractModelSerialiser::setModel ( QAbstractItemModel *  val)

setter of model property

void AbstractModelSerialiser::setModel ( const QAbstractItemModel *  val)

set the model over which the serialiser will operate

loadModel will always fail as the model is not editable

Property Documentation

const QAbstractItemModel * AbstractModelSerialiser::constModel
readwrite

the model over which the serialiser will operate

loadModel will always fail as the model is not editable

QAbstractItemModel * AbstractModelSerialiser::model
readwrite

the model over which the serialiser will operate

getter of model property