ViewSolutions
1.0.100.30ae2aa
View solutions of qml for quasarapp projects
Toggle main menu visibility
Loading...
Searching...
No Matches
imodel.h
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2020-2025 QuasarApp.
3
//# Distributed under the GPLv3 software license, see the accompanying
4
//# Everyone is permitted to copy and distribute verbatim copies
5
//# of this license document, but changing it is not allowed.
6
//#
7
8
#ifndef IMODEL_H
9
#define IMODEL_H
10
11
#include <QQmlApplicationEngine>
12
#include <QString>
13
#include <QWeakPointer>
14
#include "
viewsolutions_global.h
"
15
16
17
namespace
ViewSolutions
{
18
19
class
ModelStorage
;
20
50
class
VIEWSOLUTION_EXPORT
iModel
51
{
52
public
:
53
iModel
() =
default
;
54
virtual
~iModel
() =
default
;
55
60
virtual
QString
modelId
()
const
= 0;
61
66
const
QWeakPointer<ModelStorage>&
storage
()
const
;
67
76
QQmlEngine *
engine
()
const
;
77
78
protected
:
79
84
virtual
void
initStorage
(
const
QWeakPointer<ModelStorage>& newStorage);
85
86
private
:
87
88
QWeakPointer<ModelStorage> m_storage;
89
90
friend
class
ModelStorage
;
91
};
92
93
}
94
#endif
// IMODEL_H
ViewSolutions::ModelStorage
The ModelStorage class is the main model storage object.
Definition
modelstorage.h:46
ViewSolutions::iModel::modelId
virtual QString modelId() const =0
modelId returns text model id. override this method to provide access to model in qml or other models...
ViewSolutions::iModel::~iModel
virtual ~iModel()=default
ViewSolutions::iModel::iModel
iModel()=default
ViewSolutions::iModel::engine
QQmlEngine * engine() const
engine returns qml engine.
Definition
imodel.cpp:19
ViewSolutions::iModel::ModelStorage
friend class ModelStorage
Definition
imodel.h:90
ViewSolutions::iModel::initStorage
virtual void initStorage(const QWeakPointer< ModelStorage > &newStorage)
initStorage This method is called by storage object after adding model to storage.
Definition
imodel.cpp:27
ViewSolutions::iModel::storage
const QWeakPointer< ModelStorage > & storage() const
storage returns storage object. this method return context of the model's storage.
Definition
imodel.cpp:15
ViewSolutions
The ViewSolutions namespace.
Definition
avatargenerator.cpp:14
viewsolutions_global.h
VIEWSOLUTION_EXPORT
#define VIEWSOLUTION_EXPORT
VIEWSOLUTION_EXPORT marks a symbol as part of the public ViewSolutions API.
Definition
viewsolutions_global.h:33
ViewSolutions
src
imodel.h
Generated by
1.18.0