umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
DontAskAgainHandler Class Reference

#include <dontaskagain.h>

Collaboration diagram for DontAskAgainHandler:

Public Member Functions

void addItem (DontAskAgainItem *item)
 
DontAskAgainWidgetcreateWidget ()
 

Static Public Member Functions

static DontAskAgainHandlerinstance ()
 

Protected Attributes

QList< DontAskAgainItem * > m_items
 

Detailed Description

Dialogs provided by namespace KMessageBox support a feature to hide dialogs on user request by specifying the parameter dontAskAgainName, which adds a checkbox named "Don't ask again" to the related dialog.

What is currently missing in KMessageBox namespace and therefore provided by class DontAskAgainHandler, is a widget to reenable or disable dialogs using the "Don't ask again" support in an application setting dialog.

To use this support call macro DefineDontAskAgainItem and add a call to method DontAskAgainItem::name as parameter dontAskAgainName to related class KMessageBox methods. See the following example:

DefineDontAskAgainItem(aDontAskAgainItem, "delete-diagram", i18n("Enable 'delete diagram' related messages"));
...
return KMessageBox::warningContinueCancel(..., aDontAskAgainItem.name())
#define DefineDontAskAgainItem(name, key, _text)
Definition: dontaskagain.h:39
#define i18n
Definition: main.cpp:35

To add the mentioned widget to a settings dialog call createWidget() and add the result to a dialog layout.

Author
Ralf Habacker ralf..nosp@m.haba.nosp@m.cker@.nosp@m.free.nosp@m.net.d.nosp@m.e

Member Function Documentation

◆ addItem()

void DontAskAgainHandler::addItem ( DontAskAgainItem item)

◆ createWidget()

DontAskAgainWidget * DontAskAgainHandler::createWidget ( )

◆ instance()

DontAskAgainHandler & DontAskAgainHandler::instance ( )
static

Member Data Documentation

◆ m_items

QList<DontAskAgainItem*> DontAskAgainHandler::m_items
protected

The documentation for this class was generated from the following files: