summary refs log tree commit diff
path: root/src/notifications/Manager.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-09-18 00:22:33 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-09-18 00:45:50 +0200
commitcfca7157b98c9dc8e0852fe6484bc3f75008af7d (patch)
tree32b92340908a9374214ec7b84c1fac7ea338f56d /src/notifications/Manager.h
parentMerge pull request #728 from Thulinma/goto (diff)
downloadnheko-cfca7157b98c9dc8e0852fe6484bc3f75008af7d.tar.xz
Change indentation to 4 spaces
Diffstat (limited to 'src/notifications/Manager.h')
-rw-r--r--src/notifications/Manager.h82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/notifications/Manager.h b/src/notifications/Manager.h
index 416530e0..4e24dd1b 100644
--- a/src/notifications/Manager.h
+++ b/src/notifications/Manager.h
@@ -22,83 +22,83 @@
 
 struct roomEventId
 {
-        QString roomId;
-        QString eventId;
+    QString roomId;
+    QString eventId;
 };
 
 inline bool
 operator==(const roomEventId &a, const roomEventId &b)
 {
-        return a.roomId == b.roomId && a.eventId == b.eventId;
+    return a.roomId == b.roomId && a.eventId == b.eventId;
 }
 
 class NotificationsManager : public QObject
 {
-        Q_OBJECT
+    Q_OBJECT
 public:
-        NotificationsManager(QObject *parent = nullptr);
+    NotificationsManager(QObject *parent = nullptr);
 
-        void postNotification(const mtx::responses::Notification &notification, const QImage &icon);
+    void postNotification(const mtx::responses::Notification &notification, const QImage &icon);
 
 signals:
-        void notificationClicked(const QString roomId, const QString eventId);
-        void sendNotificationReply(const QString roomId, const QString eventId, const QString body);
-        void systemPostNotificationCb(const QString &room_id,
-                                      const QString &event_id,
-                                      const QString &roomName,
-                                      const QString &text,
-                                      const QImage &icon);
+    void notificationClicked(const QString roomId, const QString eventId);
+    void sendNotificationReply(const QString roomId, const QString eventId, const QString body);
+    void systemPostNotificationCb(const QString &room_id,
+                                  const QString &event_id,
+                                  const QString &roomName,
+                                  const QString &text,
+                                  const QImage &icon);
 
 public slots:
-        void removeNotification(const QString &roomId, const QString &eventId);
+    void removeNotification(const QString &roomId, const QString &eventId);
 
 #if defined(NHEKO_DBUS_SYS)
 public:
-        void closeNotifications(QString roomId);
+    void closeNotifications(QString roomId);
 
 private:
-        QDBusInterface dbus;
+    QDBusInterface dbus;
 
-        void systemPostNotification(const QString &room_id,
-                                    const QString &event_id,
-                                    const QString &roomName,
-                                    const QString &text,
-                                    const QImage &icon);
-        void closeNotification(uint id);
+    void systemPostNotification(const QString &room_id,
+                                const QString &event_id,
+                                const QString &roomName,
+                                const QString &text,
+                                const QImage &icon);
+    void closeNotification(uint id);
 
-        // notification ID to (room ID, event ID)
-        QMap<uint, roomEventId> notificationIds;
+    // notification ID to (room ID, event ID)
+    QMap<uint, roomEventId> notificationIds;
 
-        const bool hasMarkup_;
-        const bool hasImages_;
+    const bool hasMarkup_;
+    const bool hasImages_;
 #endif
 
 #if defined(Q_OS_MACOS)
 private:
-        // Objective-C(++) doesn't like to do lots of regular C++, so the actual notification
-        // posting is split out
-        void objCxxPostNotification(const QString &title,
-                                    const QString &subtitle,
-                                    const QString &informativeText,
-                                    const QImage &bodyImage);
+    // Objective-C(++) doesn't like to do lots of regular C++, so the actual notification
+    // posting is split out
+    void objCxxPostNotification(const QString &title,
+                                const QString &subtitle,
+                                const QString &informativeText,
+                                const QImage &bodyImage);
 #endif
 
 #if defined(Q_OS_WINDOWS)
 private:
-        void systemPostNotification(const QString &line1,
-                                    const QString &line2,
-                                    const QString &iconPath);
+    void systemPostNotification(const QString &line1,
+                                const QString &line2,
+                                const QString &iconPath);
 #endif
 
-        // these slots are platform specific (D-Bus only)
-        // but Qt slot declarations can not be inside an ifdef!
+    // these slots are platform specific (D-Bus only)
+    // but Qt slot declarations can not be inside an ifdef!
 private slots:
-        void actionInvoked(uint id, QString action);
-        void notificationClosed(uint id, uint reason);
-        void notificationReplied(uint id, QString reply);
+    void actionInvoked(uint id, QString action);
+    void notificationClosed(uint id, uint reason);
+    void notificationReplied(uint id, QString reply);
 
 private:
-        QString getMessageTemplate(const mtx::responses::Notification &notification);
+    QString getMessageTemplate(const mtx::responses::Notification &notification);
 };
 
 #if defined(NHEKO_DBUS_SYS)