• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KNotificationRestrictions Class Reference

#include <knotificationrestrictions.h>

Inheritance diagram for KNotificationRestrictions:

Inheritance graph
[legend]

List of all members.


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 }

Definition at line 46 of file knotificationrestrictions.h.


Public Types

enum  Service {
  NoServices = 0, ScreenSaver = 1, MessagingPopups = 2, Notifications = 4,
  CriticalNotifications = 8, NonCriticalServices, AllServices = NonCriticalServices | CriticalNotifications
}

Public Member Functions

 KNotificationRestrictions (Services control=NonCriticalServices, QObject *parent=0)
virtual ~KNotificationRestrictions ()

Member Enumeration Documentation

enum KNotificationRestrictions::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

Enumerator:
NoServices 
ScreenSaver 
MessagingPopups 
Notifications 
CriticalNotifications 
NonCriticalServices 
AllServices 

Definition at line 64 of file knotificationrestrictions.h.


Constructor & Destructor Documentation

KNotificationRestrictions::KNotificationRestrictions ( Services  control = NonCriticalServices,
QObject *  parent = 0 
) [explicit]

Definition at line 62 of file knotificationrestrictions.cpp.

KNotificationRestrictions::~KNotificationRestrictions (  )  [virtual]

Definition at line 72 of file knotificationrestrictions.cpp.


The documentation for this class was generated from the following files:
  • knotificationrestrictions.h
  • knotificationrestrictions.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal