KNotifyConfig

Search for usage in LXR

#include <KNotifyConfig>

Public Member Functions

 KNotifyConfig (const KNotifyConfig &other)
 
 KNotifyConfig (const QString &applicationName, const QString &eventId)
 
QString applicationName () const
 
QString eventId () const
 
bool isValid () const
 
KNotifyConfigoperator= (const KNotifyConfig &other)
 
QString readEntry (const QString &key) const
 
QString readGlobalEntry (const QString &key) const
 
QString readPathEntry (const QString &key) const
 

Static Public Member Functions

static void reparseConfiguration ()
 
static void reparseSingleConfiguration (const QString &app)
 

Detailed Description

Represent the configuration for an event.

Author
Olivier Goffart ogoff.nosp@m.art@.nosp@m.kde.o.nosp@m.rg
Kai Uwe Broulik kde@b.nosp@m.roul.nosp@m.ik.de

Definition at line 24 of file knotifyconfig.h.

Constructor & Destructor Documentation

◆ KNotifyConfig() [1/2]

KNotifyConfig::KNotifyConfig ( const QString & applicationName,
const QString & eventId )

Creates a notify config for the given application name and event id.

Parameters
applicationNameThe application name, typically the name of the notifyrc file without its extension.
eventIdThe notification event ID, i.e. the part after Event/ in its notifyrc file.

Definition at line 87 of file knotifyconfig.cpp.

◆ KNotifyConfig() [2/2]

KNotifyConfig::KNotifyConfig ( const KNotifyConfig & other)

Definition at line 97 of file knotifyconfig.cpp.

Member Function Documentation

◆ applicationName()

QString KNotifyConfig::applicationName ( ) const

the name of the application that triggered the notification

Definition at line 110 of file knotifyconfig.cpp.

◆ eventId()

QString KNotifyConfig::eventId ( ) const

the name of the notification

Definition at line 115 of file knotifyconfig.cpp.

◆ isValid()

bool KNotifyConfig::isValid ( ) const

Whether there exists an event with the given id under the given application name.

Definition at line 120 of file knotifyconfig.cpp.

◆ operator=()

KNotifyConfig & KNotifyConfig::operator= ( const KNotifyConfig & other)

Definition at line 102 of file knotifyconfig.cpp.

◆ readEntry()

QString KNotifyConfig::readEntry ( const QString & key) const
Returns
entry from the relevant Event/ notifyrc config group

This will return the configuration from the user for the given key. It first look into the user config file, and then in the global config file.

return a null string if the entry doesn't exist

Definition at line 131 of file knotifyconfig.cpp.

◆ readGlobalEntry()

QString KNotifyConfig::readGlobalEntry ( const QString & key) const
Returns
entry from the relevant Global notifyrc config group

This will return the configuration from the user for the given key. It first look into the user config file, and then in the global config file.

return a null string if the entry doesn't exist

Definition at line 126 of file knotifyconfig.cpp.

◆ readPathEntry()

QString KNotifyConfig::readPathEntry ( const QString & key) const
Returns
path entry from the relevant Event/ notifyrc config group

This will return the configuration from the user for the given key and interpret it as a path.

Definition at line 137 of file knotifyconfig.cpp.

◆ reparseConfiguration()

void KNotifyConfig::reparseConfiguration ( )
static

reparse the cached configs.

to be used when the config may have changed

Definition at line 69 of file knotifyconfig.cpp.

◆ reparseSingleConfiguration()

void KNotifyConfig::reparseSingleConfiguration ( const QString & app)
static

Definition at line 78 of file knotifyconfig.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:16:27 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.