Michał Cieślak 1481790183 chore(general): move cpp files of monitoring tool from DOtherSide to ui dir
Additionally bumps DOtherSide cmake min version to 3.19

Closes: #9472
2023-02-09 14:27:53 +01:00

35 lines
889 B
C++

#pragma once
#include <QObject>
#include <QJSValue>
#include "ContextPropertiesModel.h"
class QQmlApplicationEngine;
class QQmlEngine;
class QJSEngine;
class Monitor : public QObject
{
Q_OBJECT
Q_PROPERTY(ContextPropertiesModel* contexPropertiesModel
READ contexPropertiesModel CONSTANT)
Monitor() = default;
public:
void initialize(QQmlApplicationEngine *engine);
ContextPropertiesModel* contexPropertiesModel();
void addContextPropertyName(const QString &contextPropertyName);
Q_INVOKABLE bool isModel(const QVariant &obj) const;
Q_INVOKABLE QString typeName(const QVariant &obj) const;
Q_INVOKABLE QJSValue modelRoles(QAbstractItemModel *model) const;
static Monitor& instance();
static QObject* qmlInstance(QQmlEngine *engine, QJSEngine *scriptEngine);
private:
ContextPropertiesModel m_contexPropertiesModel;
};