From 1dbc0e3c88ba271ba35bc3f82e7864c4f35e1236 Mon Sep 17 00:00:00 2001 From: Fabien Proriol Date: Sun, 25 May 2025 12:13:31 +0200 Subject: Initial Commit --- src/lib/xdgstatusnotifierhost.h | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/lib/xdgstatusnotifierhost.h (limited to 'src/lib/xdgstatusnotifierhost.h') diff --git a/src/lib/xdgstatusnotifierhost.h b/src/lib/xdgstatusnotifierhost.h new file mode 100644 index 0000000..20c36ed --- /dev/null +++ b/src/lib/xdgstatusnotifierhost.h @@ -0,0 +1,44 @@ +#ifndef XDGSTATUSNOTIFIERHOST_H +#define XDGSTATUSNOTIFIERHOST_H + +#include +#include +#include + +namespace xdg { + class StatusNotifierHostPrivate; + + class StatusNotifierHost : public QAbstractListModel + { + Q_OBJECT + public: + explicit StatusNotifierHost(QObject *parent = nullptr); + virtual ~StatusNotifierHost(); + + enum XdgDesktopEntriesRoles { + CategoryRole = Qt::UserRole + 1, + IdRole, + TitleRole, + StatusRole, + WindowIdRole, + IconNameRole, + OverlayIconNameRole, + AttentionIconNameRole, + AttentionMovieNameRole + }; + + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + QHash roleNames() const override; + + public slots: + void activate(int x, int y, QString id, int mode); + + private: + Q_DISABLE_COPY(StatusNotifierHost) + Q_DECLARE_PRIVATE(StatusNotifierHost) + QScopedPointer const d_ptr; + }; +}; + +#endif // XDGSTATUSNOTIFIERHOST_H -- cgit v1.2.3