• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kalarm/lib

Public Types | Static Public Member Functions | Static Public Attributes | List of all members
KAMessageBox Class Reference

#include <messagebox.h>

Inheritance diagram for KAMessageBox:
Inheritance graph
[legend]

Public Types

enum  AskType { CONT_CANCEL_DEF_CONT, CONT_CANCEL_DEF_CANCEL, YES_NO_DEF_NO }
 

Static Public Member Functions

static void detailedError (QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
 
static void detailedSorry (QWidget *parent, const QString &text, const QString &details, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
 
static void error (QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
 
static ButtonCode getContinueDefault (const QString &dontAskAgainName)
 
static void information (QWidget *parent, const QString &text, const QString &caption=QString(), const QString &dontShowAgainName=QString(), Options options=Options(Notify|WindowModal))
 
static int questionYesNo (QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
 
static int questionYesNoCancel (QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
 
static void saveDontShowAgainContinue (const QString &dontShowAgainName, bool dontShow=true)
 
static void saveDontShowAgainYesNo (const QString &dontShowAgainName, bool dontShow=true, ButtonCode result=No)
 
static void setContinueDefault (const QString &dontAskAgainName, ButtonCode defaultButton)
 
static bool setDefaultShouldBeShownContinue (const QString &dontShowAgainName, bool defaultShow)
 
static bool shouldBeShownContinue (const QString &dontShowAgainName)
 
static void sorry (QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
 
static int warningContinueCancel (QWidget *parent, ButtonCode defaultButton, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const QString &dontAskAgainName=QString())
 
static int warningContinueCancel (QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
 
static int warningYesNo (QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|Dangerous|WindowModal))
 

Static Public Attributes

static const Options NoAppModal = KMessageBox::Options(KMessageBox::Notify | KAMessageBox::WindowModal)
 
static const Option WindowModal = Notify
 

Detailed Description

Enhanced KMessageBox.

The KAMessageBox class provides an extension to KMessageBox, including the option for Continue/Cancel message boxes to have a default button of Cancel.

Note that this class is not called simply MessageBox due to a name clash on Windows.

Author
David Jarvie djarv.nosp@m.ie@k.nosp@m.de.or.nosp@m.g

Definition at line 38 of file messagebox.h.

Member Enumeration Documentation

enum KAMessageBox::AskType

KAMessageBox types.

  • CONT_CANCEL_DEF_CONT - Continue/Cancel, with Continue as the default button.
  • CONT_CANCEL_DEF_CANCEL - Continue/Cancel, with Cancel as the default button.
  • YES_NO_DEF_NO - Yes/No, with No as the default button.
Enumerator
CONT_CANCEL_DEF_CONT 
CONT_CANCEL_DEF_CANCEL 
YES_NO_DEF_NO 

Definition at line 46 of file messagebox.h.

Member Function Documentation

static void KAMessageBox::detailedError ( QWidget *  parent,
const QString &  text,
const QString &  details,
const QString &  caption = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::detailedError() except that it defaults to window-modal, not application-modal.

Definition at line 107 of file messagebox.h.

static void KAMessageBox::detailedSorry ( QWidget *  parent,
const QString &  text,
const QString &  details,
const QString &  caption = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::detailedSorry() except that it defaults to window-modal, not application-modal.

Definition at line 113 of file messagebox.h.

static void KAMessageBox::error ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::error() except that it defaults to window-modal, not application-modal.

Definition at line 119 of file messagebox.h.

KMessageBox::ButtonCode KAMessageBox::getContinueDefault ( const QString &  dontAskAgainName)
static

Gets the default button for the Continue/Cancel message box with the specified "don't ask again" name.

Parameters
dontAskAgainNameThe identifier controlling whether the message box is suppressed.

Definition at line 46 of file messagebox.cpp.

static void KAMessageBox::information ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
const QString &  dontShowAgainName = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::information() except that it defaults to window-modal, not application-modal.

Definition at line 125 of file messagebox.h.

static int KAMessageBox::questionYesNo ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
const KGuiItem &  buttonYes = KStandardGuiItem::yes(),
const KGuiItem &  buttonNo = KStandardGuiItem::no(),
const QString &  dontAskAgainName = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::questionYesNo() except that it defaults to window-modal, not application-modal.

Definition at line 137 of file messagebox.h.

static int KAMessageBox::questionYesNoCancel ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
const KGuiItem &  buttonYes = KStandardGuiItem::yes(),
const KGuiItem &  buttonNo = KStandardGuiItem::no(),
const KGuiItem &  buttonCancel = KStandardGuiItem::cancel(),
const QString &  dontAskAgainName = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::questionYesNoCancel() except that it defaults to window-modal, not application-modal.

Definition at line 145 of file messagebox.h.

void KAMessageBox::saveDontShowAgainContinue ( const QString &  dontShowAgainName,
bool  dontShow = true 
)
static

Stores whether a non-Yes/No message box should or should not be shown again.

If the message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName value.

Parameters
dontShowAgainNameThe identifier controlling whether the message box is suppressed.
dontShowIf true, the message box will be suppressed and will return Continue.

Definition at line 142 of file messagebox.cpp.

void KAMessageBox::saveDontShowAgainYesNo ( const QString &  dontShowAgainName,
bool  dontShow = true,
ButtonCode  result = No 
)
static

Stores whether the Yes/No message box should or should not be shown again.

Parameters
dontShowAgainNameThe identifier controlling whether the message box is suppressed.
dontShowIf true, the message box will be suppressed and will return result.
resultThe button code to return if the message box is suppressed.

Definition at line 129 of file messagebox.cpp.

void KAMessageBox::setContinueDefault ( const QString &  dontAskAgainName,
ButtonCode  defaultButton 
)
static

Sets the default button for the Continue/Cancel message box with the specified "don't ask again" name.

Parameters
dontAskAgainNameThe identifier controlling whether the message box is suppressed.
defaultButtonThe default button for the message box. Valid values are Continue or Cancel.

Definition at line 37 of file messagebox.cpp.

bool KAMessageBox::setDefaultShouldBeShownContinue ( const QString &  dontShowAgainName,
bool  defaultShow 
)
static

If there is no current setting for whether a non-Yes/No message box should be shown, sets it to defaultShow.

If a Continue/Cancel message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName value.

Returns
true if defaultShow was written.

Definition at line 94 of file messagebox.cpp.

bool KAMessageBox::shouldBeShownContinue ( const QString &  dontShowAgainName)
static

Returns whether a non-Yes/No message box should be shown.

If the message box has Cancel as the default button, either setContinueDefault() or warningContinueCancel() must have been called previously to set this for the specified dontShowAgainName value.

Parameters
dontShowAgainNameThe identifier controlling whether the message box is suppressed.

Definition at line 114 of file messagebox.cpp.

static void KAMessageBox::sorry ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::sorry() except that it defaults to window-modal, not application-modal.

Definition at line 131 of file messagebox.h.

int KAMessageBox::warningContinueCancel ( QWidget *  parent,
ButtonCode  defaultButton,
const QString &  text,
const QString &  caption = QString(),
const KGuiItem &  buttonContinue = KStandardGuiItem::cont(),
const QString &  dontAskAgainName = QString() 
)
static

Displays a Continue/Cancel message box with the option as to which button is the default.

Parameters
parentParent widget
defaultButtonThe default button for the message box. Valid values are Continue or Cancel.
textMessage string
captionCaption (window title) of the message box
buttonContinueThe text for the first button (default = "Continue")
dontAskAgainNameIf specified, the message box will only be suppressed if the user chose Continue last time.

Definition at line 63 of file messagebox.cpp.

static int KAMessageBox::warningContinueCancel ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
const KGuiItem &  buttonContinue = KStandardGuiItem::cont(),
const KGuiItem &  buttonCancel = KStandardGuiItem::cancel(),
const QString &  dontAskAgainName = QString(),
Options  options = Options(Notify|WindowModal) 
)
inlinestatic

Same as KMessageBox::warningContinueCancel() except that it defaults to window-modal, not application-modal.

Definition at line 154 of file messagebox.h.

static int KAMessageBox::warningYesNo ( QWidget *  parent,
const QString &  text,
const QString &  caption = QString(),
const KGuiItem &  buttonYes = KStandardGuiItem::yes(),
const KGuiItem &  buttonNo = KStandardGuiItem::no(),
const QString &  dontAskAgainName = QString(),
Options  options = Options(Notify|Dangerous|WindowModal) 
)
inlinestatic

Same as KMessageBox::warningYesNo() except that it defaults to window-modal, not application-modal.

Definition at line 162 of file messagebox.h.

Member Data Documentation

const KAMessageBox::Options KAMessageBox::NoAppModal = KMessageBox::Options(KMessageBox::Notify | KAMessageBox::WindowModal)
static

Shortcut to represent Options(Notify | WindowModal).

Definition at line 169 of file messagebox.h.

const Option KAMessageBox::WindowModal = Notify
static

Definition at line 172 of file messagebox.h.


The documentation for this class was generated from the following files:
  • messagebox.h
  • messagebox.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalarm/lib

Skip menu "kalarm/lib"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal