Q_PROPERTY(int highlightNick READ highlightNick WRITE setHighlightNick)
Q_PROPERTY(bool nicksCaseSensitive READ nicksCaseSensitive WRITE setNicksCaseSensitive)
+
public:
enum HighlightNickType {
NoNick = 0x00,
inline HighlightRuleManager(QObject *parent = nullptr) : SyncableObject(parent) { setAllowClientUpdates(true); }
HighlightRuleManager &operator=(const HighlightRuleManager &other);
- struct HighlightRule {
+ struct HighlightRule
+ {
int id;
QString name;
bool isRegEx = false;
HighlightRule(int id_, QString name_, bool isRegEx_, bool isCaseSensitive_, bool isEnabled_, bool isInverse_,
QString sender_, QString chanName_)
: id(id_), name(std::move(name_)), isRegEx(isRegEx_), isCaseSensitive(isCaseSensitive_),
- isEnabled(isEnabled_), isInverse(isInverse_), sender(std::move(sender_)), chanName(std::move(chanName_)) {
- }
+ isEnabled(isEnabled_), isInverse(isInverse_), sender(std::move(sender_)), chanName(std::move(chanName_))
+ {}
- bool operator!=(const HighlightRule &other) {
+ bool operator!=(const HighlightRule &other) const
+ {
return (id != other.id ||
name != other.name ||
isRegEx != other.isRegEx ||
chanName != other.chanName);
}
};
- typedef QList<HighlightRule> HighlightRuleList;
+
+ using HighlightRuleList = QList<HighlightRule>;
int indexOf(int rule) const;
inline bool contains(int rule) const { return indexOf(rule) != -1; }
{
REQUEST(ARG(highlightNick))
}
+
inline void setHighlightNick(int highlightNick) { _highlightNick = static_cast<HighlightNickType>(highlightNick); }
virtual inline void requestSetNicksCaseSensitive(bool nicksCaseSensitive)
{
REQUEST(ARG(nicksCaseSensitive))
}
+
inline void setNicksCaseSensitive(bool nicksCaseSensitive) { _nicksCaseSensitive = nicksCaseSensitive; }
protected: