#include <Libs/Widgets/ctkMessageBox.h>
|
static bool | confirmExit (const QString &dontShowAgainKey=QString(), QWidget *parentWidget=0) |
|
|
QScopedPointer< ctkMessageBoxPrivate > | d_ptr |
|
ctkMessageBox is an advanced QMessageBox with extra features such as a checkbox to automatically accept the messagebox next time exec() is called.
Definition at line 35 of file ctkMessageBox.h.
◆ Superclass
◆ ctkMessageBox() [1/2]
ctkMessageBox::ctkMessageBox |
( |
QWidget * |
newParent = 0 | ) |
|
◆ ctkMessageBox() [2/2]
ctkMessageBox::ctkMessageBox |
( |
Icon |
icon, |
|
|
const QString & |
title, |
|
|
const QString & |
text, |
|
|
StandardButtons |
buttons = NoButton , |
|
|
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
f = Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint |
|
) |
| |
◆ ~ctkMessageBox()
virtual ctkMessageBox::~ctkMessageBox |
( |
| ) |
|
|
virtual |
◆ confirmExit()
static bool ctkMessageBox::confirmExit |
( |
const QString & |
dontShowAgainKey = QString() , |
|
|
QWidget * |
parentWidget = 0 |
|
) |
| |
|
static |
Utility function that opens a dialog to confirm exit. If dontShowAgainKey is empty, the dontShowAgain checkbox is hidden and the message box is always open for the user to confirm exit.
◆ done()
virtual void ctkMessageBox::done |
( |
int |
resultCode | ) |
|
|
virtual |
Reimplemented for internal reasons.
◆ dontShowAgain()
bool ctkMessageBox::dontShowAgain |
( |
| ) |
const |
◆ dontShowAgainSettingsKey()
QString ctkMessageBox::dontShowAgainSettingsKey |
( |
| ) |
const |
◆ isDontShowAgainVisible()
bool ctkMessageBox::isDontShowAgainVisible |
( |
| ) |
const |
◆ setDontShowAgain
void ctkMessageBox::setDontShowAgain |
( |
bool |
dontShow | ) |
|
|
slot |
Change the checkbox and the settings if any.
◆ setDontShowAgainSettingsKey()
void ctkMessageBox::setDontShowAgainSettingsKey |
( |
const QString & |
key | ) |
|
◆ setDontShowAgainVisible()
void ctkMessageBox::setDontShowAgainVisible |
( |
bool |
visible | ) |
|
◆ setVisible()
virtual void ctkMessageBox::setVisible |
( |
bool |
visible | ) |
|
|
virtual |
Reimplemented for internal reasons.
◆ d_ptr
QScopedPointer<ctkMessageBoxPrivate> ctkMessageBox::d_ptr |
|
protected |
◆ dontShowAgain
bool ctkMessageBox::dontShowAgain |
|
readwrite |
This property holds wether the dialog should be shown next time exec() is called. dontShowAgain can be changed programatically by calling setDontShowAgain or when the user checks the "Dont show again" checkbox and the dialog is accepted. If the checkbox is checked by the user but the dialog is rejected (click on Cancel), dontShowAgain is not changed. If dontShowAgainSettingsKey is set, the dontShowAgain is set with the value of the key. By default, dontShowAgain is false.
Definition at line 1 of file ctkMessageBox.h.
◆ dontShowAgainSettingsKey
QString ctkMessageBox::dontShowAgainSettingsKey |
|
readwrite |
This property holds the settings key that is used to synchronize the state of the checkbox "Don't show this message again" with the given key value within QSettings. If the settings value is != QMessageBox::InvalidRole, the dialog is shown, otherwise it is skipped by simulating a click on the button corresponding to the settings value (QMessageButton::StandardButton or QMessageBox::ButtonRole) If a non empty key is set, the check box gets visible, otherwise it is hidden. By default, no key is set.
Definition at line 1 of file ctkMessageBox.h.
◆ dontShowAgainVisible
bool ctkMessageBox::dontShowAgainVisible |
|
readwrite |
This property controls the visibility of the "Don't show again" checkbox. Even if the checkbox is not visible, the dialog is not not shown if dontShowAgain is true. By default, the "Don't show again" checkbox is not visible.
Definition at line 1 of file ctkMessageBox.h.
The documentation for this class was generated from the following file: