3#include <ossia/network/base/parameter.hpp>
5#include <ossia-qt/device/qml_node_base.hpp>
6#include <ossia-qt/value_metatypes.hpp>
8#include <QAbstractItemModel>
10#include <QQmlProperty>
11#include <QQmlPropertyValueSource>
18class OSSIA_EXPORT qml_model_property :
public QAbstractItemModel
20 W_OBJECT(qml_model_property)
23 qml_model_property(QObject* parent =
nullptr);
24 ~qml_model_property()
override;
27 QModelIndex index(
int row,
int column,
const QModelIndex& parent)
const override;
28 QModelIndex parent(
const QModelIndex& child)
const override;
29 int rowCount(
const QModelIndex& parent)
const override;
30 int columnCount(
const QModelIndex& parent)
const override;
31 QVariant data(
const QModelIndex& index,
int role)
const override;
34 QObject* parentNode()
const;
35 QObject* device()
const;
36 auto parentOssiaNode()
const {
return m_parentOssiaNode; }
39 void reloadParentNode();
43 E_SIGNAL(OSSIA_EXPORT, setValue_sig, arg_1);
44 void countChanged(
int count) E_SIGNAL(OSSIA_EXPORT, countChanged, count);
45 void nodeChanged(QString node) E_SIGNAL(OSSIA_EXPORT, nodeChanged, node);
46 void parentNodeChanged(QObject* parentNode)
47 E_SIGNAL(OSSIA_EXPORT, parentNodeChanged, parentNode);
48 void deviceChanged(QObject* device) E_SIGNAL(OSSIA_EXPORT, deviceChanged, device);
51 void setCount(
int count);
53 void setNode(
const QString& node);
55 void setParentNode(QObject* parentNode);
56 W_SLOT(setParentNode);
57 void setDevice(QObject* device);
61 void on_device_deleted(QObject*);
66 QObject* m_parentNode{};
68 qml_device* m_device{};
72 QObject*, parentNode READ parentNode WRITE setParentNode NOTIFY parentNodeChanged)
74 W_PROPERTY(QObject*, device READ device WRITE setDevice NOTIFY deviceChanged)
76 W_PROPERTY(QString, node READ node WRITE setNode NOTIFY nodeChanged)
78 W_PROPERTY(
int, count READ count WRITE setCount NOTIFY countChanged)
The node_base class.
Definition node.hpp:48
The value class.
Definition value.hpp:173