presentation/QuickTaskMenu.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | #include <QObject> | ||
| 3 | #include <QVariantList> | ||
| 4 | #include <QVariantMap> | ||
| 5 | |||
| 6 | // Native desktop task actions; identity and edit fields travel separately. | ||
| 7 | // `showChoices` opens a native menu of plain choices (header View/Filter, | ||
| 8 | // editor property values): each entry is {id, label, icon?, color?, | ||
| 9 | // checkable?, checked?} or {separator: true}; a pick emits choiceTriggered. | ||
| 10 | class QuickTaskMenu final : public QObject { | ||
| 11 | 5 | Q_OBJECT | |
| 12 | public: | ||
| 13 | using QObject::QObject; | ||
| 14 | Q_INVOKABLE bool show(const QVariantMap &task, const QVariantList &lists, QObject *window, qreal x, qreal y, const QString §ion = {}); | ||
| 15 | Q_INVOKABLE bool showChoices(const QString &requester, const QVariantList &entries, QObject *window, qreal x, qreal y); | ||
| 16 | signals: | ||
| 17 | void actionRequested(const QString &action, const QVariantMap &fields); | ||
| 18 | void choiceTriggered(const QString &requester, const QString &id); | ||
| 19 | }; | ||
| 20 |