ViewSolutions
|
The ModelStorage class main model storage object. Provide access to all models in the application. More...
#include <modelstorage.h>
Public Member Functions | |
ModelStorage (QQmlApplicationEngine *engine=nullptr) | |
bool | addModel (const QSharedPointer< iModel > &model) |
addModel adds new model into storage. | |
Q_INVOKABLE QObject * | getModel (const QString &modeId) const |
getModel This method isible on The QML and using for gettings required GUI models. | |
template<class Type > | |
QSharedPointer< Type > | get (const QString &modeId) const |
QQmlApplicationEngine * | engine () const |
engine returns context qml engine. | |
The ModelStorage class main model storage object. Provide access to all models in the application.
Definition at line 22 of file modelstorage.h.
ViewSolutions::ModelStorage::ModelStorage | ( | QQmlApplicationEngine * | engine = nullptr | ) |
bool ViewSolutions::ModelStorage::addModel | ( | const QSharedPointer< iModel > & | model | ) |
addModel adds new model into storage.
model | is model object. |
Definition at line 19 of file modelstorage.cpp.
QQmlApplicationEngine * ViewSolutions::ModelStorage::engine | ( | ) | const |
engine returns context qml engine.
Definition at line 38 of file modelstorage.cpp.
|
inline |
Definition at line 44 of file modelstorage.h.
QObject * ViewSolutions::ModelStorage::getModel | ( | const QString & | modeId | ) | const |
getModel This method isible on The QML and using for gettings required GUI models.
modeId | This is id of required model. |
Definition at line 34 of file modelstorage.cpp.