KUserFeedback

surveytargetexpression.h
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#ifndef KUSERFEEDBACK_SURVEYTARGETEXPRESSION_H
8#define KUSERFEEDBACK_SURVEYTARGETEXPRESSION_H
9
10#include <QDebug>
11#include <QString>
12#include <QVariant>
13
14#include <memory>
15
16namespace KUserFeedback {
17
18class SurveyTargetExpression
19{
20public:
21 enum Type {
22 Value,
23 ScalarElement,
24 ListElement,
25 MapElement,
26
27 OpLogicAnd,
28 OpLogicOr,
29 OpEqual,
30 OpNotEqual,
31 OpLess,
32 OpLessEqual,
33 OpGreater,
34 OpGreaterEqual
35 };
36
37 explicit SurveyTargetExpression(const QVariant &value);
38 explicit SurveyTargetExpression(const QString &source, const QVariant &index, const QString &elem);
39 explicit SurveyTargetExpression(Type type, SurveyTargetExpression *left, SurveyTargetExpression *right);
40 ~SurveyTargetExpression();
41
42 Type type() const;
43 QVariant value() const;
44
45 QString source() const;
46 QString sourceElement() const;
47
48 SurveyTargetExpression* left() const;
49 SurveyTargetExpression* right() const;
50
51private:
52 Type m_type;
53 QVariant m_value;
54 QString m_source;
55 QString m_sourceElement;
56 std::unique_ptr<SurveyTargetExpression> m_left;
57 std::unique_ptr<SurveyTargetExpression> m_right;
58};
59
60}
61
62QDebug operator<<(QDebug debug, KUserFeedback::SurveyTargetExpression *expr);
63
64#endif
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.