• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Types | Public Member Functions | List of all members
KNotificationRestrictions Class Reference

#include <knotificationrestrictions.h>

Inheritance diagram for KNotificationRestrictions:
QObject

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 ()
 

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
}
KNotificationRestrictions
KNotificationRestrictions provides a simple mechanism to avoid disruptions during full screen present...
Definition: knotificationrestrictions.h:48
KNotificationRestrictions::ScreenSaver
@ ScreenSaver
Causes the screensaver to be prevented from automatically turning on.
Definition: knotificationrestrictions.h:65

Definition at line 47 of file knotificationrestrictions.h.

Member Enumeration Documentation

◆ Service

enum KNotificationRestrictions::Service
Enumerator
NoServices 

The baseline "don't disable anything" value.

ScreenSaver 

Causes the screensaver to be prevented from automatically turning on.

MessagingPopups 

Causes instant messaging and email notifications to not appear.

Note
not implemented yet
Notifications 

Causes non-critical desktop messages to be suppressed.

Note
not implemented yet
CriticalNotifications 

Causes all desktop notifications, including critical ones (such as as "battery low" warnings) to be suppressed.

Note
not implemented yet
NonCriticalServices 
AllServices 

Definition at line 55 of file knotificationrestrictions.h.

Constructor & Destructor Documentation

◆ KNotificationRestrictions()

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

Constructs a new service for restrict some services.

Parameters
controlthe services to be restricted
parentthe parent of this object

Definition at line 75 of file knotificationrestrictions.cpp.

◆ ~KNotificationRestrictions()

KNotificationRestrictions::~KNotificationRestrictions ( )
virtual

Definition at line 85 of file knotificationrestrictions.cpp.


The documentation for this class was generated from the following files:
  • knotificationrestrictions.h
  • knotificationrestrictions.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal