KNotifyConfig 5.109.0
Signals | Public Slots | Public Member Functions | Static Public Member Functions | List of all members
KNotifyConfigWidget

Configure the notification for a given application / context. More...

#include <KNotifyConfigWidget>

Signals

void changed (bool state)
 Indicate that the state of the modules contents has changed.
 

Public Slots

void disableAllSounds ()
 
void revertToDefaults ()
 
void save ()
 save to the config file
 

Public Member Functions

 KNotifyConfigWidget (QWidget *parent)
 
void selectEvent (const QString &eventId)
 Select a given notification in the current list.
 
void setApplication (const QString &appname=QString(), const QString &context_name=QString(), const QString &context_value=QString())
 Change the application and the context.
 

Static Public Member Functions

static KNotifyConfigWidgetconfigure (QWidget *parent=nullptr, const QString &appname=QString())
 Show a dialog with the widget.
 

Detailed Description

Configure the notification for a given application / context.

You probably will want to use the static function configure

If you create the widget yourself, you must call setApplication before showing it

Author
Olivier Goffart <ogoffart @ kde.org>

Member Function Documentation

◆ changed

void KNotifyConfigWidget::changed ( bool  state)
signal

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

◆ configure()

static KNotifyConfigWidget * KNotifyConfigWidget::configure ( QWidget *  parent = nullptr,
const QString &  appname = QString() 
)
static

Show a dialog with the widget.

Parameters
parentthe parent widget of the dialog
appnamethe application name, if null, it is autodetected
Returns
the widget itself the topLevelWidget of it is probably a KDialog

◆ save

void KNotifyConfigWidget::save ( )
slot

save to the config file

◆ selectEvent()

void KNotifyConfigWidget::selectEvent ( const QString &  eventId)

Select a given notification in the current list.

Parameters
idThe id of the notification
Since
5.18

◆ setApplication()

void KNotifyConfigWidget::setApplication ( const QString &  appname = QString(),
const QString &  context_name = QString(),
const QString &  context_value = QString() 
)

Change the application and the context.

Parameters
appnamename of the application. if null QCoreApplication::instance()->applicationName() is used
context_namethe name of the context, if null , avery context are considered
context_valuethe context value