Dialog that shows a scrolled (HTML) text.
static QString htmlHeading(const QString &text)
Returns a uniform heading in HTML format.
static QString htmlEscape(const QString &plainText)
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>' '&' -> ...
virtual ~YQPkgTextDialog()
Destructor.
void setText(const QString &text)
Set the text contents.
void buildDialog(const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel="")
Create the dialog.
static QString htmlParagraphs(const string &rawText)
Simple HTML formatting: Wrap paragraphs in.
bool eventFilter(QObject *obj, QEvent *ev)
Grab [Return] press events and close dialog.
static bool confirmText(QWidget *parent, const QString &text, const QString &acceptButtonLabel, const QString &rejectButtonLabel)
Let the user confirm a text.
YQPkgTextDialog(const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel)
Constructor.
static void showText(QWidget *parent, const QString &text)
Show a text and wait until the user confirmed with 'OK'.
virtual QSize sizeHint() const
Reimplemented from QWidget: Reserve a reasonable amount of space.