KNotifyConfig Class
Represent the configuration for an event. More...
Header: | #include <KNotifyConfig> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Notifications) target_link_libraries(mytarget PRIVATE KF6::Notifications) |
Public Functions
KNotifyConfig(const QString &applicationName, const QString &eventId) | |
QString | applicationName() const |
QString | eventId() const |
bool | isValid() const |
QString | readEntry(const QString &key) const |
QString | readGlobalEntry(const QString &key) const |
QString | readPathEntry(const QString &key) const |
Static Public Members
void | reparseConfiguration() |
void | reparseSingleConfiguration(const QString &app) |
Detailed Description
Member Function Documentation
KNotifyConfig::KNotifyConfig(const QString &applicationName, const QString &eventId)
Creates a notify config for the given application name and event id
applicationName The application name, typically the name of the notifyrc file without its extension.
eventId The notification event ID, i.e. the part after Event/ in its notifyrc file.
QString KNotifyConfig::applicationName() const
the name of the application that triggered the notification
QString KNotifyConfig::eventId() const
the name of the notification
bool KNotifyConfig::isValid() const
Whether there exists an event with the given id under the given application name.
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.
Returns a null string if the entry doesn't exist
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.
Returns a null string if the entry doesn't exist
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.
[static]
void KNotifyConfig::reparseConfiguration()
reparse the cached configs. to be used when the config may have changed