|
ViewSolutions 1.0.100.30ae2aa
View solutions of qml for quasarapp projects
|
The iModel class is base model for GUI models. Works with ModelStorage. All models after adding can get access to any othe models that located on same storage object. More...
#include <imodel.h>


Public Member Functions | |
| iModel ()=default | |
| virtual | ~iModel ()=default |
| virtual QString | modelId () const =0 |
| modelId returns text model id. override this method to provide access to model in qml or other models. | |
| const QWeakPointer< ModelStorage > & | storage () const |
| storage returns storage object. this method return context of the model's storage. | |
| QQmlEngine * | engine () const |
| engine returns qml engine. | |
Protected Member Functions | |
| virtual void | initStorage (const QWeakPointer< ModelStorage > &newStorage) |
| initStorage This method is called by storage object after adding model to storage. | |
Friends | |
| class | ModelStorage |
The iModel class is base model for GUI models. Works with ModelStorage. All models after adding can get access to any othe models that located on same storage object.
To create a new model implement the iModel interface. Every model must provide a unique model id with the modelId method.
Example:
Register the model in the model storage:
|
default |
|
virtualdefault |
| QQmlEngine * ViewSolutions::iModel::engine | ( | ) | const |
engine returns qml engine.
Definition at line 19 of file imodel.cpp.


|
protectedvirtual |
initStorage This method is called by storage object after adding model to storage.
| newStorage | is storage object. |
Definition at line 27 of file imodel.cpp.

|
pure virtual |
modelId returns text model id. override this method to provide access to model in qml or other models.
Implemented in ViewSolutions::iGUITokensModel, ViewSolutions::NotificationService, and ViewSolutions::QMLColorPicker.

| const QWeakPointer< ModelStorage > & ViewSolutions::iModel::storage | ( | ) | const |
storage returns storage object. this method return context of the model's storage.
Definition at line 15 of file imodel.cpp.
