Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/settings.h
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Line(s) | 164 | Q_PROPERTY(QStringList notificationInhibitionApplications | |||
---|---|---|---|---|---|
165 | READ notificationInhibitionApplications | 165 | READ notificationInhibitionApplications | ||
166 | NOTIFY notificationInhibitionApplicationsChanged) | 166 | NOTIFY notificationInhibitionApplicationsChanged) | ||
167 | 167 | | |||
168 | Q_PROPERTY(QStringList notificationInhibitionReasons | 168 | Q_PROPERTY(QStringList notificationInhibitionReasons | ||
169 | READ notificationInhibitionReasons | 169 | READ notificationInhibitionReasons | ||
170 | NOTIFY notificationInhibitionApplicationsChanged) | 170 | NOTIFY notificationInhibitionApplicationsChanged) | ||
171 | 171 | | |||
172 | /** | 172 | /** | ||
173 | * Whether to enable do not disturb mode when screens are mirrored/overlapping | ||||
174 | * | ||||
175 | * @since 5.17 | ||||
176 | */ | ||||
177 | Q_PROPERTY(bool inhibitNotificationsWhenScreensMirrored | ||||
178 | READ inhibitNotificationsWhenScreensMirrored | ||||
179 | WRITE setInhibitNotificationsWhenScreensMirrored | ||||
180 | NOTIFY settingsChanged) | ||||
181 | | ||||
182 | /** | ||||
183 | * Whether there currently are mirrored/overlapping screens | ||||
184 | * | ||||
185 | * This property is only updated when @c inhibitNotificationsWhenScreensMirrored | ||||
186 | * is set to true, otherwise it is always false. | ||||
187 | * You can assign false to this property if you want to temporarily revoke automatic do not disturb | ||||
188 | * mode when screens are mirrored until the screen configuration changes. | ||||
189 | * | ||||
190 | * @since 5.17 | ||||
191 | */ | ||||
192 | Q_PROPERTY(bool screensMirrored READ screensMirrored WRITE setScreensMirrored NOTIFY screensMirroredChanged) | ||||
193 | | ||||
194 | /** | ||||
173 | * Whether notification sounds should be disabled | 195 | * Whether notification sounds should be disabled | ||
174 | * | 196 | * | ||
175 | * This does not reflect the actual mute state of the Notification Sounds | 197 | * This does not reflect the actual mute state of the Notification Sounds | ||
176 | * stream but only remembers what value was assigned to this property. | 198 | * stream but only remembers what value was assigned to this property. | ||
177 | * | 199 | * | ||
178 | * This way you can tell whether to unmute notification sounds or not, in case | 200 | * This way you can tell whether to unmute notification sounds or not, in case | ||
179 | * the user had them explicitly muted previously. | 201 | * the user had them explicitly muted previously. | ||
180 | * | 202 | * | ||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 228 | public: | |||
294 | QDateTime notificationsInhibitedUntil() const; | 316 | QDateTime notificationsInhibitedUntil() const; | ||
295 | void setNotificationsInhibitedUntil(const QDateTime &time); | 317 | void setNotificationsInhibitedUntil(const QDateTime &time); | ||
296 | void resetNotificationsInhibitedUntil(); | 318 | void resetNotificationsInhibitedUntil(); | ||
297 | 319 | | |||
298 | bool notificationsInhibitedByApplication() const; | 320 | bool notificationsInhibitedByApplication() const; | ||
299 | QStringList notificationInhibitionApplications() const; | 321 | QStringList notificationInhibitionApplications() const; | ||
300 | QStringList notificationInhibitionReasons() const; | 322 | QStringList notificationInhibitionReasons() const; | ||
301 | 323 | | |||
324 | bool inhibitNotificationsWhenScreensMirrored() const; | ||||
325 | void setInhibitNotificationsWhenScreensMirrored(bool mirrored); | ||||
326 | | ||||
327 | bool screensMirrored() const; | ||||
328 | void setScreensMirrored(bool enable); | ||||
329 | | ||||
302 | bool notificationSoundsInhibited() const; | 330 | bool notificationSoundsInhibited() const; | ||
303 | void setNotificationSoundsInhibited(bool inhibited); | 331 | void setNotificationSoundsInhibited(bool inhibited); | ||
304 | 332 | | |||
305 | /** | 333 | /** | ||
306 | * Revoke application notification inhibitions. | 334 | * Revoke application notification inhibitions. | ||
307 | * | 335 | * | ||
308 | * @note Applications are not notified of the fact that their | 336 | * @note Applications are not notified of the fact that their | ||
309 | * inhibition might have been taken away. | 337 | * inhibition might have been taken away. | ||
310 | */ | 338 | */ | ||
311 | Q_INVOKABLE void revokeApplicationInhibitions(); | 339 | Q_INVOKABLE void revokeApplicationInhibitions(); | ||
312 | 340 | | |||
313 | signals: | 341 | signals: | ||
314 | void settingsChanged(); | 342 | void settingsChanged(); | ||
315 | 343 | | |||
316 | void liveChanged(); | 344 | void liveChanged(); | ||
317 | void dirtyChanged(); | 345 | void dirtyChanged(); | ||
318 | 346 | | |||
319 | void knownApplicationsChanged(); | 347 | void knownApplicationsChanged(); | ||
320 | 348 | | |||
321 | void notificationsInhibitedByApplicationChanged(bool notificationsInhibitedByApplication); | 349 | void notificationsInhibitedByApplicationChanged(bool notificationsInhibitedByApplication); | ||
322 | void notificationInhibitionApplicationsChanged(); | 350 | void notificationInhibitionApplicationsChanged(); | ||
323 | 351 | | |||
352 | void screensMirroredChanged(); | ||||
353 | | ||||
324 | private: | 354 | private: | ||
325 | class Private; | 355 | class Private; | ||
326 | QScopedPointer<Private> d; | 356 | QScopedPointer<Private> d; | ||
327 | 357 | | |||
328 | }; | 358 | }; | ||
329 | 359 | | |||
330 | } // namespace NotificationManager | 360 | } // namespace NotificationManager | ||
331 | 361 | | |||
332 | Q_DECLARE_OPERATORS_FOR_FLAGS(NotificationManager::Settings::NotificationBehaviors) | 362 | Q_DECLARE_OPERATORS_FOR_FLAGS(NotificationManager::Settings::NotificationBehaviors) |