10#include <QStandardItem>
54 e.Mime_ +=
"-rule-create";
56 for (
const auto&
field : fields)
57 e.Additional_ [
field.first] = QVariant::fromValue (
field.second);
78 [] (QObject *
obj) { return qobject_cast<IDataFilter*> (obj); });
137 if (!
value.isNull ())
147 if (text.contains (
"%1"_ql) && text.contains (
"%2"_ql))
148 item->setText (text.arg (done).arg (
total));
150 item->setText (text);
166 item->setEditable (
false);
Proxy to core entity manager.
std::shared_ptr< ICoreProxy > ICoreProxy_ptr
Q_DECL_IMPORT const QString Count
The new total event count (int).
Q_DECL_IMPORT const QString EventID
The ID of the event (QString).
Q_DECL_IMPORT const QString SenderID
The plugin ID of the sender (QByteArray or QString).
Q_DECL_IMPORT const QString OpenConfiguration
Whether configuration dialog should be opened (bool).
Q_DECL_IMPORT const QString NotifyPersistent
Whether a persistent notifier should be enabled by default in the rule being created (bool).
Q_DECL_IMPORT const QString VisualPath
Visual path to this event (QStringList).
Q_DECL_IMPORT const QString NotifyAudio
Whether an audio notifier should be enabled by default in the rule being created (bool).
Q_DECL_IMPORT const QString ExtendedText
The even more detailed text than FullText (QString).
Q_DECL_IMPORT const QString NotifyTransient
Whether a transient notifier should be enabled by default in the rule being created (bool).
Q_DECL_IMPORT const QString EventCategory
The category of the event (QString).
Q_DECL_IMPORT const QString FullText
The detailed text of the event (QString).
Q_DECL_IMPORT const QString DeltaCount
The change in event count (int).
Q_DECL_IMPORT const QString EventType
The type of the event (QString).
Q_DECL_IMPORT const QString IsSingleShot
Whether the created rule should be single-shot (bool).
Q_DECL_IMPORT const QString CatEventCancel
Event cancel pseudo-category.
@ NotifySingleShot
Rule should be triggered only once.
@ NotifyTransient
User should be notified visually.
@ NotifyAudio
Notify by playing back an audio file.
@ NotifyPersistent
User should be notified visually via persistent notifications.
Entity MakeAN(const QString &header, const QString &text, Priority priority, const QString &senderID, const QString &cat, const QString &type, const QString &id, const QStringList &visualPath, int delta, int count, const QString &fullText, const QString &extendedText)
Creates an Advanced Notifications-enabled notify entity.
Container< T > Filter(const Container< T > &c, F f)
void InitJobHolderRow(const QList< QStandardItem * > &row)
QVariant GetPersistentData(const QByteArray &key, const ICoreProxy_ptr &proxy)
Returns persistent data stored under given key.
Entity MakeNotification(const QString &header, const QString &text, Priority priority)
An utility function to make a Entity with notification.
Entity MakeANCancel(const Entity &event)
Makes an event for canceling another Advanced Notifications event.
void SetJobHolderProgress(const QList< QStandardItem * > &row, qint64 done, qint64 total, const QString &text)
Sets the progress values on the given row.
Entity MakeANRule(const QString &title, const QString &senderID, const QString &cat, const QStringList &types, AN::NotifyFlags flags, bool openConfiguration, const QList< QPair< QString, ANFieldValue > > &fields)
Creates an Entity defining an Advanced Notifications rule.
QList< QObject * > GetDataFilters(const QVariant &data, IEntityManager *manager)
Returns the data filter plugins that can handle data.
Entity MakeEntity(const QVariant &entity, const QString &location, TaskParameters tp, const QString &mime)
@ JobProgress
The column with the progress of the task, like the amount of data downloaded so far or last update.
@ ProcessState
Describes the state of a process.
A message used for inter-plugin communication.
QVariant Entity_
The entity that this object represents.
QMap< QString, QVariant > Additional_
Additional parameters.
State of a single process represented in a IJobHolder model.
qlonglong Done_
The amount of items already processed or downloaded.
@ Running
The process is running just fine.
Q_DECLARE_METATYPE(QVariantList *)