/
s5z6
/
telegraf
Обзор
Документация
Войти
/
s5z6
/
telegraf
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
src/device/notificationmanager.h
45 строк
1 KB
mbarashkov
Реорганизована структура папок исходников
26 фев 2025, 15:19
26 фев 2025, 15:19
7599d9b
Код
Авторство
О чём код?
#pragma once #include <QObject> #include <nemonotifications-qt5/notification.h> #include "../tdlib/tdlibresponsehandler.h" #include "../data/appsettings.h" #include "mceinterface.h" class ChatModel; class NotificationManager : public QObject { Q_OBJECT class ChatInfo; class NotificationGroup; public: NotificationManager(MceInterface *mceInterface, ChatModel *chatModel); ~NotificationManager() override; public slots: void handleUpdateActiveNotifications(const QVariantList ¬ificationGroups); void handleUpdateNotificationGroup(const QVariantMap ¬ificationGroupUpdate); void handleUpdateNotification(const QVariantMap &updatedNotification); void handleChatDiscovered(const QString &chatId, const QVariantMap &chatInformation); void handleChatTitleUpdated(const QString &chatId, const QString &title); private: void publishNotification(const NotificationGroup *notificationGroup, bool needFeedback); void controlLedNotification(bool enabled); void updateNotificationGroup(int groupId, qlonglong chatId, int totalCount, const QVariantList &addedNotifications, const QVariantList &removedNotificationIds = QVariantList(), AppSettings::NotificationFeedback feedback = AppSettings::NotificationFeedbackNone); private: MceInterface *mceInterface; ChatModel *chatModel; QMap<qlonglong,ChatInfo*> chatMap; QMap<int,NotificationGroup*> notificationGroups; QString appIconFile; };