# class KNotificationRestrictions

###

Module | kdeui
Namespace |
Class | KNotificationRestrictions
Inherits | QObject

KNotificationRestrictions provides a simple mechanism to avoid disruptions during full screen presentations or other use cases where the screensaver or desktop notifcations are innapropriate.

Using KNotificationRestrictions is quite straightforward: create an instance of KNotificationRestrictions, passing in the set of or'd flags representing the services that should be prevented from interupting the user. When done (for instance when the presentation is complete) simply delete the KNotificationRestrictions object.

Example: to ensure the screensaver does not turn on during a presentation

void MyApp.doPresentation() { KNotificationRestrictions restrict(KNotificationRestrictions.ScreenSaver); // show presentation }

### enums

- Service { NoServices, ScreenSaver, MessagingPopups, Notifications, CriticalNotifications, NonCriticalServices, AllServices }
  typesafe object: Services

enum details

### methods

- KNotificationRestrictions (control, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  control | KNotificationRestrictions.Services | KNotificationRestrictions.NonCriticalServices
  parent | QObject | 0

- KNotificationRestrictions (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KNotificationRestrictions.Services | KNotificationRestrictions.NonCriticalServices
  a1 | QObject | 0

### enums - detail

- Service { NoServices, ScreenSaver, MessagingPopups, Notifications, CriticalNotifications, NonCriticalServices, AllServices }

  Service

  NoServices - the baseline "don't disable anything" value

  ScreenSaver - causes the screensaver to be prevented from automatically turning on

  MessagingPopups - (NOT IMPLEMENTED YET) causes instant messaging and email notifications to not appear

  Notificiations - (NOT IMPLEMENTED YET) causes non-critical desktop messages to be suppressed

  CriticalNotifications - (NOT IMPLEMENTED YET) causes all desktop notifications, including critical ones such as battery low warnings to be surpressed

  typesafe object: Services

NoServices - 0 -
ScreenSaver - 1 -
MessagingPopups - 2 -
Notifications - 4 -
CriticalNotifications - 8 -
NonCriticalServices - ScreenSaver|MessagingPopups|Notifications -
AllServices - NonCriticalServices|CriticalNotifications -