|
TreeFrogFramework 2.10
|
#include <tabstractmodel.h>
Public Member Functions | |
| virtual | ~TAbstractModel () |
| virtual bool | create () |
| virtual bool | save () |
| virtual bool | update () |
| virtual bool | remove () |
| virtual bool | isNull () const |
| virtual bool | isNew () const |
| virtual bool | isSaved () const |
| virtual void | setProperties (const QVariantMap &properties) |
| virtual QVariantMap | toVariantMap (const QStringList &properties=QStringList()) const |
| virtual void | setProperties (const QJsonObject &properties) |
| virtual QJsonObject | toJsonObject (const QStringList &properties=QStringList()) const |
| virtual void | setProperties (const QJsonDocument &properties) |
| virtual QCborMap | toCborMap (const QStringList &properties=QStringList()) const |
| QString | variableNameToFieldName (const QString &name) const |
Static Public Member Functions | |
| static QString | fieldNameToVariableName (const QString &name) |
Protected Member Functions | |
| virtual TModelObject * | modelData () |
| virtual const TModelObject * | modelData () const |
The TAbstractModel class is the abstract base class of models, providing functionality common to models.
|
inlinevirtual |
|
virtual |
Creates the model as a new data to the data storage.
|
static |
|
virtual |
Returns true if this model is new, not created; otherwise returns false.
|
virtual |
Returns true if this model is null; otherwise returns false.
|
virtual |
Returns true if this model is not saved; otherwise returns false.
|
inlineprotectedvirtual |
This function is reimplemented in subclasses to return a pointer to the data stored in the model object.
|
inlineprotectedvirtual |
This function is reimplemented in subclasses to return a pointer to the data stored in the model object.
|
virtual |
Removes the model from the data storage.
|
virtual |
|
virtual |
Sets the properties.
|
virtual |
Sets the properties.
|
virtual |
Sets the properties.
|
virtual |
Converts all the properies to CBOR using QCborValue::fromVariant() and returns the map composed of those elements.
|
virtual |
Converts the model to a QJsonObject.
|
virtual |
Returns a map with all properties of this text format.
|
virtual |
Updates the model to the data storage.
| QString TAbstractModel::variableNameToFieldName | ( | const QString & | name | ) | const |