QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
plainmessagebox.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
8#ifndef SRC_PLAINMESSAGEBOX_H_
9#define SRC_PLAINMESSAGEBOX_H_
10
11#include <QMessageBox>
12
13#include <functional>
14
26namespace PlainMessageBox {
27
41auto show(QWidget *parent, QMessageBox::Icon icon, const QString &title,
42 const QString &text,
43 QMessageBox::StandardButtons buttons = QMessageBox::Ok)
44 -> QMessageBox::StandardButton;
45
53auto askYes(QWidget *parent, const QString &title, const QString &text) -> bool;
54
65auto askToGiveNewReaders(QWidget *parent, const QString &store,
66 const QStringList &entries) -> bool;
67
77auto confirmPassRun(QWidget *parent, const QString &store,
78 const std::function<QStringList()> &check) -> bool;
79
86void warning(QWidget *parent, const QString &title, const QString &text);
87
94void critical(QWidget *parent, const QString &title, const QString &text);
95
96} // namespace PlainMessageBox
97
98#endif // SRC_PLAINMESSAGEBOX_H_
Message boxes whose text is shown as the text it is.
auto confirmPassRun(QWidget *parent, const QString &store, const std::function< QStringList()> &check) -> bool
Run check (which lists the entries a pass run would give new readers, one gpg call each) under a wait...
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.
auto askToGiveNewReaders(QWidget *parent, const QString &store, const QStringList &entries) -> bool
Ask whether to go on although entries would gain readers: with the pass backend, pass re-encrypts eve...
void critical(QWidget *parent, const QString &title, const QString &text)
Show an error in plain text.