presentation/QuickContactMenu.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #pragma once | ||
| 2 | #include <QObject> | ||
| 3 | #include <QStringList> | ||
| 4 | #include <QVariantList> | ||
| 5 | #include <QVariantMap> | ||
| 6 | |||
| 7 | // Native contact menu (Sprint 97 S97.4.5; sibling of QuickTaskMenu): Menu | ||
| 8 | // key, Shift+F10, right click and the card's "⋯". The caller passes what | ||
| 9 | // the entries need — the selection's count and writability, its first | ||
| 10 | // card's addresses, the writable books and the known groups — and gets | ||
| 11 | // actionRequested(action, fields) back: "write" {address?}, "open", | ||
| 12 | // "edit", "copyAddress", "copyVcard", "move" {bookId}, "addGroup" | ||
| 13 | // {group}, "newGroup", "export", "sendVcard", "merge", "delete", | ||
| 14 | // "addToBook" {bookId}, "forget", "me", "notMe" (Sprint 103 D-6), and on | ||
| 15 | // a graph node "graphCenter", "graphHow", "graphMap", "relate" (F103-30). | ||
| 16 | // Untrusted labels go through MenuText::plain (S106-280). | ||
| 17 | class QuickContactMenu final : public QObject { | ||
| 18 | 104 | Q_OBJECT | |
| 19 | public: | ||
| 20 | using QObject::QObject; | ||
| 21 | // context: {count, writable, collected, addresses: [..], bookId, | ||
| 22 | // books: [{bookId, name}], groups: [names], isMe} | ||
| 23 | Q_INVOKABLE bool show(const QVariantMap &context, QObject *window, qreal x, qreal y); | ||
| 24 | signals: | ||
| 25 | void actionRequested(const QString &action, const QVariantMap &fields); | ||
| 26 | }; | ||
| 27 |