|
QtPass 2.0.0
Developer documentation
|
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. | |
| 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 every entry of a folder itself, so a copy someone planted from a folder you are not on would be handed to this folder's recipients. | |
| 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 cursor, and ask about what it finds (askToGiveNewReaders()). | |
| 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. | |
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.
| auto PlainMessageBox::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 every entry of a folder itself, so a copy someone planted from a folder you are not on would be handed to this folder's recipients.
| parent | The parent widget. |
| store | The store root, for naming the entries. |
| entries | The entries, absolute paths. |
Definition at line 142 of file plainmessagebox.cpp.
| auto PlainMessageBox::askYes | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text ) -> bool |
Ask a yes/no question in plain text.
| parent | The parent widget. |
| title | The window title. |
| text | The question, shown as it is. |
Definition at line 126 of file plainmessagebox.cpp.
| auto PlainMessageBox::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 cursor, and ask about what it finds (askToGiveNewReaders()).
| parent | The parent widget. |
| store | The store root, for naming the entries. |
| check | Lists the entries. |
Definition at line 169 of file plainmessagebox.cpp.
| void PlainMessageBox::critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text ) |
Show an error in plain text.
| parent | The parent widget. |
| title | The window title. |
| text | The error, shown as it is. |
Definition at line 137 of file plainmessagebox.cpp.
| 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.
| parent | The parent widget. |
| icon | The icon. |
| title | The window title. |
| text | The message, shown as it is: plain, with characters that turn the text around shown as U+FFFD (Util::displayable()), and cut longer than 40 lines or 4000 characters to its start and end, as tool output quoted in it can be any length; all of it (past 256 KB its start and end) is under "Show Details...". |
| buttons | The buttons offered. |
Definition at line 95 of file plainmessagebox.cpp.
| void PlainMessageBox::warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text ) |
Show a warning in plain text.
| parent | The parent widget. |
| title | The window title. |
| text | The warning, shown as it is. |
Definition at line 132 of file plainmessagebox.cpp.