25 {
LAN::CatIM, QObject::tr (
"Instant messaging") },
109 return cat2types.value (category);
156 return type2hr.value (type, type);
162 [] (
const QRegularExpression& expr) {
return QVariant { expr }; },
163 [] (
const auto& wrapper) {
return QVariant { wrapper.Pattern_ }; });
166 {
"index"_qs,
static_cast<int> (matcher.index ()) },
167 {
"value"_qs, value },
173 const auto& map = var.toMap ();
174 const auto idx = map [
"index"_qs].toInt ();
175 const auto value = map [
"value"_qs];
183 return value.toRegularExpression ();
185 qWarning () <<
"unknown type index" << idx << map;
195 [&val] (
const QRegularExpression& rx) {
return val.indexOf (rx); },
197 [&val] (
const LC::AN::Wildcard& wc) {
return val.indexOf (wc.Compiled_); });
204 return GenericMatch (
string, pattern);
209 return GenericMatch (strings, pattern);
Q_DECL_IMPORT const QString TypeIMSubscrUnsub
Another user has unsubscribed from our user.
QVariant ToVariant(const LC::AN::StringMatcher &matcher)
Q_DECL_IMPORT const QString CatOrganizer
Category of Organizer-related events.
Q_DECL_IMPORT const QString TypePackageUpdated
A package has been updated.
Q_DECL_IMPORT const QString TypeIMMUCHighlight
User has been highlighted in a multiuser chat.
QStringList GetKnownEventTypes(const QString &category)
Returns the known events types for the given category.
Q_DECL_IMPORT const QString CatTerminal
Category for terminal emulation events.
Q_DECL_IMPORT const QString TypeIMEventLocationChange
User's location has changed.
Q_DECL_IMPORT const QString CatDownloads
Category of Downloads-related events.
Q_DECL_IMPORT const QString TypeTerminalActivity
Activity in terminal window.
Q_DECL_IMPORT const QString TypeIMSubscrSub
Another user has subscribed to our user.
Q_DECL_IMPORT const QString TypeOrganizerEventDue
An event due date is coming.
Q_DECL_IMPORT const QString TypeIMMUCInvite
User has been invited to a multiuser chat.
auto Visit(const Either< Left, Right > &either, Args &&... args)
Q_DECL_IMPORT const QString CatIM
Category of Instant Messaging-related events.
Q_DECL_IMPORT const QString TypeGeneric
Generic type for generic notifications.
QString GetCategoryName(const QString &category)
Returns the human-readable name of the event category.
Q_DECL_IMPORT const QString TypeTerminalBell
A bell has ringed in a terminal window.
Q_DECL_IMPORT const QString TypeNewsSourceBroken
News source is detected to be broken.
Q_DECL_IMPORT const QString TypeNewsSourceUpdated
News source got updated.
Q_DECL_IMPORT const QString TypeTerminalInactivity
Inactivity in terminal window.
QString GetTypeName(const QString &type)
Returns the human-readable name of the event type.
QMap< QString, QString > GetCategoryNameMap()
Returns the map from the category ID to its name.
Q_DECL_IMPORT const QString CatNews
Category for news-related events.
Q_DECL_IMPORT const QString CatGeneric
Generic notifications that don't fit into any other category.
bool Matches(const QString &string, const LC::AN::StringMatcher &pattern)
Q_DECL_IMPORT const QString TypeIMStatusChange
Another user in our user's contact list has changed its status.
Q_DECL_IMPORT const QString CatMediaPlayer
Category of media player-related events.
Q_DECL_IMPORT const QString TypeMediaPlaybackStatus
A media file playback status has been changed.
Q_DECL_IMPORT const QString TypeIMEventTuneChange
User's tune has changed.
Q_DECL_IMPORT const QString TypeDownloadFinished
A download has been finished successfully without errors.
LC::AN::StringMatcher StringMatcherFromVariant(const QVariant &var)
Q_DECL_IMPORT const QString CatPackageManager
Category of package manager-related events.
Q_DECL_IMPORT const QString TypeIMEventActivityChange
User's activity has changed.
Q_DECL_IMPORT const QString TypeIMIncFile
Another user has sent our user a file.
Q_DECL_IMPORT const QString TypeIMMUCMsg
A message has been sent to a multiuser chat.
Q_DECL_IMPORT const QString TypeIMSubscrRevoke
Another user has revoked subscription from our user.
Q_DECL_IMPORT const QString TypeIMSubscrGrant
Another user has granted subscription to our user.
Q_DECL_IMPORT const QString TypeDownloadError
A download has been failed.
Q_DECL_IMPORT const QString TypeIMEventMoodChange
User's mood has changed.
Q_DECL_IMPORT const QString TypeIMAttention
Another user has requested our user's attention.
Q_DECL_IMPORT const QString TypeIMIncMsg
User has received a message in a standard one-to-one chat.
Q_DECL_IMPORT const QString TypeIMSubscrRequest
Another user has requested subscription from our user.