presentation/QuickEventMenu.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | |||
| 3 | #include <QObject> | ||
| 4 | #include <QVariantMap> | ||
| 5 | |||
| 6 | // F93-08 (user review 2026-10-02): the appointment menu ("More…" in the | ||
| 7 | // details popover, right click on an appointment) as a platform QMenu at | ||
| 8 | // the pointer — native look like the folder context menu. Returns false | ||
| 9 | // without widget menus (QGuiApplication hosts); QML then shows its own | ||
| 10 | // menu. The choice comes back through actionRequested(requester, action, | ||
| 11 | // occurrence) — action "edit", "delete", "duplicate", "move", "copy"; | ||
| 12 | // requester is echoed so only the surface that opened the menu reacts. | ||
| 13 | class QuickEventMenu final : public QObject { | ||
| 14 | 25 | Q_OBJECT | |
| 15 | public: | ||
| 16 | using QObject::QObject; | ||
| 17 | // full = right click: Edit and Delete first; writable = calendar accepts | ||
| 18 | // changes (Edit reads "Open", Delete/Duplicate/Move are left out). | ||
| 19 | Q_INVOKABLE bool show(const QString &requester, const QVariantMap &occurrence, QObject *window, | ||
| 20 | qreal sceneX, qreal sceneY, bool writable, bool full); | ||
| 21 | |||
| 22 | signals: | ||
| 23 | void actionRequested(const QString &requester, const QString &action, const QVariantMap &occurrence); | ||
| 24 | }; | ||
| 25 |