CheckableMessageBox Class

(Utils::CheckableMessageBox)

The CheckableMessageBox class implements a message box suitable for questions with a "Do not ask me again" checkbox. More...

Header: #include <CheckableMessageBox>

Public Functions

class QString checkBoxText() const
int defaultButton() const
int icon() const
bool isChecked() const
void setCheckBoxText(const class QString &)
void setChecked(bool s)
void setDefaultButton(int s)
void setIcon(int icon)
void setStandardButtons(int s)
void setText(const class QString &)
int standardButtons() const
class QString text() const

Static Public Members

int doNotAskAgainQuestion(QWidget *, const class QString &, const class QString &, QSettings *, const class QString &, int, int, int)
int doNotShowAgainInformation(QWidget *, const class QString &, const class QString &, QSettings *, const class QString &, int, int)
bool hasSuppressedQuestions(QSettings *settings)
class QString msgDoNotAskAgain()
class QString msgDoNotShowAgain()
void resetAllDoNotAskAgainQuestions(QSettings *settings)

Detailed Description

Emulates the QMessageBox API with static conveniences. The message label can open external URLs.

Member Function Documentation

[static] int CheckableMessageBox::doNotAskAgainQuestion(QWidget *, const class QString &, const class QString &, QSettings *, const class QString &, int, int, int)

Shows a message box with given title and text, and a Do not ask again check box. If the user checks the check box and accepts the dialog with the acceptButton, further invocations of this function with the same settings and settingsSubKey will not show the dialog, but instantly return acceptButton.

Returns the clicked button, or QDialogButtonBox::NoButton if the user rejects the dialog with the escape key, or acceptButton if the dialog is suppressed.

[static] int CheckableMessageBox::doNotShowAgainInformation(QWidget *, const class QString &, const class QString &, QSettings *, const class QString &, int, int)

Shows a message box with given title and text, and a Do not show again check box. If the user checks the check box and quits the dialog, further invocations of this function with the same settings and settingsSubKey will not show the dialog, but instantly return.

Returns the clicked button, or QDialogButtonBox::NoButton if the user rejects the dialog with the escape key, or defaultButton if the dialog is suppressed.

[static] bool CheckableMessageBox::hasSuppressedQuestions(QSettings *settings)

Returns whether any message boxes from doNotAskAgainQuestion() are suppressed in the settings.

[static] class QString CheckableMessageBox::msgDoNotAskAgain()

Returns the standard Do not ask again check box text.

See also doNotAskAgainQuestion().

[static] class QString CheckableMessageBox::msgDoNotShowAgain()

Returns the standard Do not show again check box text.

See also doNotShowAgainInformation().

[static] void CheckableMessageBox::resetAllDoNotAskAgainQuestions(QSettings *settings)

Resets all suppression settings for doNotAskAgainQuestion() found in settings, so all these message boxes are shown again.