KNotifyConfigWidget Class
Configure the notification for a given application. More...
Header: | #include <KNotifyConfigWidget> |
CMake: | find_package(KF6 REQUIRED COMPONENTS NotifyConfig) target_link_libraries(mytarget PRIVATE KF6::NotifyConfig) |
Inherits: | QWidget |
Public Functions
KNotifyConfigWidget(QWidget *parent) | |
(since 5.18) void | selectEvent(const QString &eventId) |
void | setApplication(const QString &appname = QString()) |
Public Slots
(since 5.23) void | disableAllSounds() |
(since 5.15) void | revertToDefaults() |
void | save() |
Signals
void | changed(bool state) |
Static Public Members
KNotifyConfigWidget * | configure(QWidget *parent = nullptr, const QString &appname = QString()) |
Detailed Description
You probably will want to use the static function configure
If you create the widget yourself, you must call setApplication before showing it.
Member Function Documentation
[explicit]
KNotifyConfigWidget::KNotifyConfigWidget(QWidget *parent)
[signal]
void KNotifyConfigWidget::changed(bool state)
Indicate that the state of the modules contents has changed. This signal is emitted whenever the state of the configuration changes.
See also KCModule::changed.
[static]
KNotifyConfigWidget *KNotifyConfigWidget::configure(QWidget *parent = nullptr, const QString &appname = QString())
Show a dialog with the widget.
parent the parent widget of the dialog
appname the application name, if null, it is autodetected
Returns the widget itself the topLevelWidget of it is probably a KDialog
[slot, since 5.23]
void KNotifyConfigWidget::disableAllSounds()
Disable all sounds for the current application
This function was introduced in 5.23.
[slot, since 5.15]
void KNotifyConfigWidget::revertToDefaults()
Reset the UI to display the default values
This function was introduced in 5.15.
See also KCModule::defaults.
[slot]
void KNotifyConfigWidget::save()
save to the config file
[since 5.18]
void KNotifyConfigWidget::selectEvent(const QString &eventId)
Select a given notification in the current list
id The id of the notification
This function was introduced in 5.18.
void KNotifyConfigWidget::setApplication(const QString &appname = QString())
Change the application
appname name of the application. If null QCoreApplication::instance()->applicationName() is used