forked from quickshell/quickshell
dbus/dbusmenu: separate menu handles from status notifier items
No api changes yet.
This commit is contained in:
parent
a71a6fb3ac
commit
acdbe73c10
6 changed files with 157 additions and 60 deletions
|
@ -111,6 +111,23 @@ private:
|
|||
qsizetype refcount = 0;
|
||||
};
|
||||
|
||||
class QsMenuHandle: public QObject {
|
||||
Q_OBJECT;
|
||||
QML_ELEMENT;
|
||||
QML_UNCREATABLE("");
|
||||
|
||||
public:
|
||||
explicit QsMenuHandle(QObject* parent): QObject(parent) {}
|
||||
|
||||
virtual void ref() {};
|
||||
virtual void unref() {};
|
||||
|
||||
[[nodiscard]] virtual QsMenuEntry* menu() const = 0;
|
||||
|
||||
signals:
|
||||
void menuChanged();
|
||||
};
|
||||
|
||||
///! Provides access to children of a QsMenuEntry
|
||||
class QsMenuOpener: public QObject {
|
||||
Q_OBJECT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue