KDE 4.1 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KNotificationRestrictions Class Reference

from PyKDE4.kdeui import *

Inherits: QObject

Detailed Description

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

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 interrupting 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 }


Enumerations

Service { NoServices, ScreenSaver, MessagingPopups, Notifications, CriticalNotifications, NonCriticalServices, AllServices }
Typesafe wrapper: Services

Methods

 __init__ (self, KNotificationRestrictions.Services control=KNotificationRestrictions.NonCriticalServices, QObject parent=0)

Method Documentation

__init__ (  self,
KNotificationRestrictions.Services  control=KNotificationRestrictions.NonCriticalServices,
QObject  parent=0
)

Enumeration Documentation

Service

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 Notifications - (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 suppressed

Note:
It is necessary to wrap members of this enumeration in a Services instance when passing them to a method as group of flags. For example: Services( NoServices | ScreenSaver)
Enumerator:
NoServices = 0
ScreenSaver = 1
MessagingPopups = 2
Notifications = 4
CriticalNotifications = 8
NonCriticalServices = ScreenSaver|MessagingPopups|Notifications
AllServices = NonCriticalServices|CriticalNotifications

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal