15#include <QRegularExpression>
60 QMetaType::Type
Type_ = QMetaType::UnknownType;
167 struct Pattern : std::variant<Substring, Wildcard, QRegularExpression, Exact>
169 using variant::variant;
172 : variant {
Exact { str } }
195 using ValueMatcher = std::variant<BoolValueMatcher, IntValueMatcher, StringValueMatcher>;
235Q_DECLARE_INTERFACE (
IANEmitter,
"org.Deviant.LeechCraft.IANEmitter/1.0")
239Q_DECLARE_OPERATORS_FOR_FLAGS (
LC::AN::IntValueMatcher::Operations)
Interface for plugins emitting AdvancedNotifications entries.
virtual ~IANEmitter()=default
virtual QList< LC::AN::FieldData > GetANFields() const =0
Returns the list of additional fields.
auto operator==(const T &left, const T &right)
Q_DECLARE_FLAGS(NotifyFlags, NotifyFlag)
std::variant< BoolValueMatcher, IntValueMatcher, StringValueMatcher > ValueMatcher
A matcher for a value of any supported type.
auto operator<=>(const BoolValueMatcher &) const =default
bool Value_
The value to match.
bool operator==(const AllowedValue &) const =default
QString Name_
Human-readable name of the value.
QByteArray Id_
Persistent, stable value stored in rules on disk.
A single additional AdvancedNotifications field.
QStringList EventTypes_
The types of the event that contain this field.
QMetaType::Type Type_
The type of this field.
QString Name_
The name of the field.
AllowedValues AllowedValues_
The allowed values of this field.
QList< AllowedValue > AllowedValues
QString Description_
The description of the field.
Operation
Describes the elementary semantics of Boundary_.
@ OEqual
The value should be equal to Boundary_.
@ OGreater
The value should be greater than Boundary_.
@ OLess
The value should be less than Boundary_.
int Boundary_
The boundary to compare the matched values against.
Operations Ops_
Describe the semantics of Boundary_.
bool operator==(const IntValueMatcher &) const =default
QRegularExpression Compiled_
bool Positive_
Whether the values should match or not match Pattern_.
Pattern Pattern_
The pattern the values should (not) match.
Q_DECLARE_METATYPE(QVariantList *)