QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
PlainMessageBox Namespace Reference

Message boxes whose text is shown as the text it is. More...

Functions

auto show (QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok) -> QMessageBox::StandardButton
 Show a modal message box with plain text and wait for it.
auto askYes (QWidget *parent, const QString &title, const QString &text) -> bool
 Ask a yes/no question in plain text.
void warning (QWidget *parent, const QString &title, const QString &text)
 Show a warning in plain text.
void critical (QWidget *parent, const QString &title, const QString &text)
 Show an error in plain text.

Detailed Description

Message boxes whose text is shown as the text it is.

QMessageBox's static helpers read their text as rich text when it looks like it (Qt::AutoText). A message quoting a name from the store would then be markup that other writers of a shared store control: a folder named <img src=" with dev/zero">.gpg beneath it has Qt read /dev/zero without end. These set Qt::PlainText before the text, for every message that quotes a path, a field or anything else from the store.

Function Documentation

◆ askYes()

auto PlainMessageBox::askYes ( QWidget * parent,
const QString & title,
const QString & text ) -> bool

Ask a yes/no question in plain text.

Parameters
parentThe parent widget.
titleThe window title.
textThe question, shown as it is.
Returns
Whether Yes was clicked.

Definition at line 25 of file plainmessagebox.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ critical()

void PlainMessageBox::critical ( QWidget * parent,
const QString & title,
const QString & text )

Show an error in plain text.

Parameters
parentThe parent widget.
titleThe window title.
textThe error, shown as it is.

Definition at line 36 of file plainmessagebox.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ show()

auto PlainMessageBox::show ( QWidget * parent,
QMessageBox::Icon icon,
const QString & title,
const QString & text,
QMessageBox::StandardButtons buttons = QMessageBox::Ok ) -> QMessageBox::StandardButton

Show a modal message box with plain text and wait for it.

Parameters
parentThe parent widget.
iconThe icon.
titleThe window title.
textThe message, shown as it is.
buttonsThe buttons offered.
Returns
The button clicked.

Definition at line 10 of file plainmessagebox.cpp.

Here is the caller graph for this function:

◆ warning()

void PlainMessageBox::warning ( QWidget * parent,
const QString & title,
const QString & text )

Show a warning in plain text.

Parameters
parentThe parent widget.
titleThe window title.
textThe warning, shown as it is.

Definition at line 31 of file plainmessagebox.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: