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>
|
| 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.
|
|
QQmlApplicationEngine * | engine () const |
| engine returns qml engine.
|
|
|
virtual void | initStorage (const QWeakPointer< ModelStorage > &newStorage) |
| initStorage This method is called by storage object after adding model to storage.
|
|
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.
Definition at line 25 of file imodel.h.
◆ iModel()
ViewSolutions::iModel::iModel |
( |
| ) |
|
|
default |
◆ ~iModel()
virtual ViewSolutions::iModel::~iModel |
( |
| ) |
|
|
virtualdefault |
◆ engine()
QQmlApplicationEngine * ViewSolutions::iModel::engine |
( |
| ) |
const |
engine returns qml engine.
- Returns
- qml engine.
- Note
- can be return nullptr if the models system initialized without qml engine.
-
this method convert weak pointer to shared pointer, so you can use it without any restrictions, but it may be slowly then dirrect access.
Definition at line 19 of file imodel.cpp.
◆ initStorage()
void ViewSolutions::iModel::initStorage |
( |
const QWeakPointer< ModelStorage > & |
newStorage | ) |
|
|
protectedvirtual |
initStorage This method is called by storage object after adding model to storage.
- Parameters
-
newStorage | is storage object. |
Definition at line 27 of file imodel.cpp.
◆ modelId()
virtual QString ViewSolutions::iModel::modelId |
( |
| ) |
const |
|
pure virtual |
◆ storage()
const QWeakPointer< ModelStorage > & ViewSolutions::iModel::storage |
( |
| ) |
const |
storage returns storage object. this method return context of the model's storage.
- Returns
- storage object.
Definition at line 15 of file imodel.cpp.
◆ ModelStorage
The documentation for this class was generated from the following files: