29 explicit QtTrayMenu(QObject *parent =
nullptr,
bool debug =
false);
38 explicit QtTrayMenu(
int argc,
char **argv, QObject *parent =
nullptr,
bool debug =
false);
48 bool eventFilter(QObject *watched, QEvent *event)
override;
63 int loop(
int blocking);
71 void configureAppMetadata(
const QString &appName,
const QString &appDisplayName,
const QString &desktopName)
const;
81 void showMessage(
const QString &title,
const QString &msg, std::function<
void()> callback =
nullptr, QSystemTrayIcon::MessageIcon icon = QSystemTrayIcon::Information,
int msecs = 10000);
91 void showMessage(
const QString &title,
const QString &msg,
const QString &iconPath, std::function<
void()> callback =
nullptr,
int msecs = 10000);
129 void createMenu(
struct tray_menu *items, QMenu *menu);
130 void createNotification();
131 void updateMenu(
struct tray_menu *items);
132 QIcon lookupIcon(QString icon)
const;
133 QApplication *app =
nullptr;
134 QSystemTrayIcon *trayIcon =
nullptr;
135 QMenu *trayTopMenu =
nullptr;
136 struct tray *trayStruct =
nullptr;
137 bool running =
false;
138 bool blockingEventLoop =
false;
139 struct tray_menu *getTrayMenuItem(QAction *action);
140 std::function<void()> notificationCallback =
nullptr;
143 void onExitRequested();
144 void onMessageClicked()
const;
145 void onMenuItemTriggered();
146 void onTrayActivated(QSystemTrayIcon::ActivationReason reason);
147 void onShowMenu()
const;
148 void onUpdate(
struct tray *
tray,
bool notify);