First tray attempt, seems to be working

This commit is contained in:
Blue 2022-08-15 19:40:07 +03:00
parent 7192286aeb
commit 7e9eed2075
Signed by: blue
GPG key ID: 9B203B252A63EE38
13 changed files with 201 additions and 7 deletions

View file

@ -21,6 +21,9 @@
#include <QObject>
#include <QDBusInterface>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QAction>
#include "dialogqueue.h"
#include "core/squawk.h"
@ -91,13 +94,16 @@ private slots:
void onSquawkDestroyed();
void onNotificationClosed(quint32 id, quint32 reason);
void onNotificationInvoked(quint32 id, const QString& action);
void onChangeTray(bool enabled, bool hide);
void trayClicked(QSystemTrayIcon::ActivationReason reason);
void toggleSquawk();
private:
void createMainWindow();
void subscribeConversation(Conversation* conv);
void checkForTheLastWindow();
void focusConversation(const Models::Roster::ElId& id, const QString& resource = "", const QString& messageId = "");
void createTrayIcon();
private:
typedef std::map<Models::Roster::ElId, Conversation*> Conversations;
@ -113,6 +119,9 @@ private:
bool nowQuitting;
bool destroyingSquawk;
Notifications storage;
QSystemTrayIcon* trayIcon;
QAction actionQuit;
QAction actionToggle;
};
#endif // APPLICATION_H