// Copyright (C) 2019 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef OPCUAEVENTFILTER_P_H #define OPCUAEVENTFILTER_P_H #include #include #include #include #include #include // // W A R N I N G // ------------- // // This file is not part of the Qt API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // QT_BEGIN_NAMESPACE class OpcUaNodeId; class OpcUaRelativeNodePath; class OpcUaEventFilter : public QObject { Q_OBJECT Q_PROPERTY(QQmlListProperty where READ filterElements) Q_PROPERTY(QQmlListProperty select READ selectors) QML_NAMED_ELEMENT(EventFilter) QML_ADDED_IN_VERSION(5, 13) public: explicit OpcUaEventFilter(QObject *parent = nullptr); ~OpcUaEventFilter(); bool operator==(const OpcUaEventFilter &other) const; QOpcUaMonitoringParameters::EventFilter filter(QOpcUaClient *client) const; QQmlListProperty selectors(); void appendSelector(OpcUaSimpleAttributeOperand *selector); int selectorCount() const; OpcUaSimpleAttributeOperand *selector(int index) const; void clearSelectors(); QQmlListProperty filterElements(); void appendFilterElement(OpcUaFilterElement *filterElement); int filterElementCount() const; OpcUaFilterElement *filterElement(int index) const; void clearFilterElements(); signals: void dataChanged(); private: static void appendSelector(QQmlListProperty *list, OpcUaSimpleAttributeOperand *); static qsizetype selectorCount(QQmlListProperty *list); static OpcUaSimpleAttributeOperand* selector(QQmlListProperty *list, qsizetype index); static void clearSelectors(QQmlListProperty *list); static void appendFilterElement(QQmlListProperty *list, OpcUaFilterElement *nodeId); static qsizetype filterElementCount(QQmlListProperty *list); static OpcUaFilterElement* filterElement(QQmlListProperty *list, qsizetype index); static void clearFilterElements(QQmlListProperty *list); QList m_filterElements; QList m_selectors; }; QT_END_NAMESPACE #endif // OPCUAEVENTFILTER_P_H