#include <tabstractmodel.h>
The TAbstractModel class is the abstract base class of models, providing functionality common to models.
◆ ~TAbstractModel()
virtual TAbstractModel::~TAbstractModel |
( |
| ) |
|
|
inlinevirtual |
◆ create()
bool TAbstractModel::create |
( |
| ) |
|
|
virtual |
Creates the model as a new data to the data storage.
◆ fieldNameToVariableName()
QString TAbstractModel::fieldNameToVariableName |
( |
const QString & |
name | ) |
|
|
static |
◆ isNew()
bool TAbstractModel::isNew |
( |
| ) |
const |
|
virtual |
Returns true if this model is new, not created; otherwise returns false.
◆ isNull()
bool TAbstractModel::isNull |
( |
| ) |
const |
|
virtual |
Returns true if this model is null; otherwise returns false.
◆ isSaved()
bool TAbstractModel::isSaved |
( |
| ) |
const |
|
virtual |
Returns true if this model is not saved; otherwise returns false.
◆ modelData() [1/2]
This function is reimplemented in subclasses to return a pointer to the data stored in the model object.
◆ modelData() [2/2]
This function is reimplemented in subclasses to return a pointer to the data stored in the model object.
◆ remove()
bool TAbstractModel::remove |
( |
| ) |
|
|
virtual |
Removes the model from the data storage.
◆ save()
bool TAbstractModel::save |
( |
| ) |
|
|
virtual |
Saves the model to the data storage.
If the model exists in the data storage, calls update(); otherwise calls create().
◆ setProperties() [1/2]
void TAbstractModel::setProperties |
( |
const QJsonDocument & |
properties | ) |
|
|
virtual |
◆ setProperties() [2/2]
void TAbstractModel::setProperties |
( |
const QVariantMap & |
properties | ) |
|
|
virtual |
◆ toCborMap()
QCborMap TAbstractModel::toCborMap |
( |
const QStringList & |
properties = QStringList() | ) |
const |
|
virtual |
Converts all the properies to CBOR using QCborValue::fromVariant() and returns the map composed of those elements.
◆ toJsonObject()
QJsonObject TAbstractModel::toJsonObject |
( |
const QStringList & |
properties = QStringList() | ) |
const |
|
virtual |
Converts the model to a QJsonObject.
◆ toVariantMap()
QVariantMap TAbstractModel::toVariantMap |
( |
const QStringList & |
properties = QStringList() | ) |
const |
|
virtual |
Returns a map with all properties of this text format.
◆ update()
bool TAbstractModel::update |
( |
| ) |
|
|
virtual |
Updates the model to the data storage.
◆ variableNameToFieldName()
QString TAbstractModel::variableNameToFieldName |
( |
const QString & |
name | ) |
const |
The documentation for this class was generated from the following files: