first ideas for notifications

This commit is contained in:
Blue 2022-04-18 19:54:42 +03:00
parent 4c20a314f0
commit 18859cb960
Signed by: blue
GPG key ID: 9B203B252A63EE38
6 changed files with 55 additions and 38 deletions

View file

@ -42,12 +42,18 @@
#include <QProcess>
#include <QDesktopServices>
#include <QRegularExpression>
#include <QDBusInterface>
class Squawk;
namespace Models {
class Roster;
}
namespace Shared {
class Global {
Q_DECLARE_TR_FUNCTIONS(Global)
friend class ::Squawk;
public:
struct FileInfo {
enum class Preview {
@ -64,7 +70,9 @@ namespace Shared {
};
Global();
static void notify(const QString& account, const Shared::Message& msg);
static Global* getInstance();
static QString getName(Availability av);
static QString getName(ConnectionState cs);
@ -122,6 +130,8 @@ namespace Shared {
private:
static Global* instance;
Models::Roster* rosterModel;
QDBusInterface dbus;
std::map<QString, bool> pluginSupport;
std::map<QString, FileInfo> fileCache;