59 QMetaType::Type
Type_ = QMetaType::UnknownType;
142 struct StringMatcher : std::variant<Substring, Wildcard, QRegularExpression>
144 using variant::variant;
169 :
Rx_ { std::move (rx) }
195 using FieldValue = std::variant<BoolFieldValue, IntFieldValue, StringFieldValue>;
235Q_DECLARE_INTERFACE (
IANEmitter,
"org.Deviant.LeechCraft.IANEmitter/1.0")
240Q_DECLARE_OPERATORS_FOR_FLAGS (
LC::AN::IntFieldValue::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< BoolFieldValue, IntFieldValue, StringFieldValue > FieldValue
A combination of all possible descriptions.
Describes a field with boolean values.
bool IsSet_
Whether the field should be set.
auto operator<=>(const BoolFieldValue &) const =default
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.
QString Description_
The description of the field.
QVariantList AllowedValues_
The allowed values of this field.
Describes a field with integer values.
int Boundary_
The boundary of the field.
Operation
Describes the elementary semantics of Boundary_.
@ OGreater
The value should be greater than Boundary_.
@ OEqual
The value should be equal to Boundary_.
@ OLess
The value should be less than Boundary_.
Operations Ops_
Describe the semantics of Boundary_.
bool operator==(const IntFieldValue &) const =default
StringMatcher Rx_
The pattern the values should (not) match.
StringFieldValue(const QString &str, bool contains=true)
Constructs the field matcher for the given str.
StringFieldValue(QRegularExpression rx, bool contains)
Constructs the field matcher.
bool Contains_
Whether the values should match or not match Rx_.
QRegularExpression Compiled_
Q_DECLARE_METATYPE(QVariantList *)