summaryrefslogtreecommitdiffstats
path: root/src/UserSettingsPage.h
diff options
context:
space:
mode:
authorAlexander 'z33ky' Hirsch <1zeeky@gmail.com>2020-06-10 11:27:21 +0200
committerAlexander 'z33ky' Hirsch <1zeeky@gmail.com>2020-06-10 12:34:26 +0200
commit2b9860c3af81f6a972e6d8cf55e03548989c7365 (patch)
tree42242aac7cbdb0563ed1a4ffe57e647ada497203 /src/UserSettingsPage.h
parente5a55ab1b9f258b973b4a0c3c48fa88a964c94a5 (diff)
Add setting to alert on notification
Diffstat (limited to 'src/UserSettingsPage.h')
-rw-r--r--src/UserSettingsPage.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/UserSettingsPage.h b/src/UserSettingsPage.h
index fb807067..c90dc759 100644
--- a/src/UserSettingsPage.h
+++ b/src/UserSettingsPage.h
@@ -58,6 +58,8 @@ class UserSettings : public QObject
bool readReceipts READ readReceipts WRITE setReadReceipts NOTIFY readReceiptsChanged)
Q_PROPERTY(bool desktopNotifications READ hasDesktopNotifications WRITE
setDesktopNotifications NOTIFY desktopNotificationsChanged)
+ Q_PROPERTY(bool alertOnNotification READ hasAlertOnNotification WRITE setAlertOnNotification
+ NOTIFY alertOnNotificationChanged)
Q_PROPERTY(
bool avatarCircles READ avatarCircles WRITE setAvatarCircles NOTIFY avatarCirclesChanged)
Q_PROPERTY(bool decryptSidebar READ decryptSidebar WRITE setDecryptSidebar NOTIFY
@@ -91,6 +93,7 @@ public:
void setButtonsInTimeline(bool state);
void setTimelineMaxWidth(int state);
void setDesktopNotifications(bool state);
+ void setAlertOnNotification(bool state);
void setAvatarCircles(bool state);
void setDecryptSidebar(bool state);
@@ -108,6 +111,11 @@ public:
bool buttonsInTimeline() const { return buttonsInTimeline_; }
bool readReceipts() const { return readReceipts_; }
bool hasDesktopNotifications() const { return hasDesktopNotifications_; }
+ bool hasAlertOnNotification() const { return hasAlertOnNotification_; }
+ bool hasNotifications() const
+ {
+ return hasDesktopNotifications() || hasAlertOnNotification();
+ }
int timelineMaxWidth() const { return timelineMaxWidth_; }
double fontSize() const { return baseFontSize_; }
QString font() const { return font_; }
@@ -126,6 +134,7 @@ signals:
void buttonInTimelineChanged(bool state);
void readReceiptsChanged(bool state);
void desktopNotificationsChanged(bool state);
+ void alertOnNotificationChanged(bool state);
void avatarCirclesChanged(bool state);
void decryptSidebarChanged(bool state);
void timelineMaxWidthChanged(int state);
@@ -151,6 +160,7 @@ private:
bool buttonsInTimeline_;
bool readReceipts_;
bool hasDesktopNotifications_;
+ bool hasAlertOnNotification_;
bool avatarCircles_;
bool decryptSidebar_;
int timelineMaxWidth_;
@@ -208,6 +218,7 @@ private:
Toggle *readReceipts_;
Toggle *markdown_;
Toggle *desktopNotifications_;
+ Toggle *alertOnNotification_;
Toggle *avatarCircles_;
Toggle *decryptSidebar_;
QLabel *deviceFingerprintValue_;