Dialog that shows a scrolled (HTML) text.
More...
#include <YQPkgTextDialog.h>
|
void | setText (const QString &text) |
|
void | setText (const string &text) |
|
void | setText (ZyppSel selectable, const string &text) |
|
|
static void | showText (QWidget *parent, const QString &text) |
|
static void | showText (QWidget *parent, ZyppSel selectable, const string &text) |
|
static bool | confirmText (QWidget *parent, const QString &text, const QString &acceptButtonLabel, const QString &rejectButtonLabel) |
|
static bool | confirmText (QWidget *parent, const QString &text) |
|
static bool | confirmText (QWidget *parent, const char *text) |
|
static bool | confirmText (QWidget *parent, ZyppSel selectable, const string &text) |
|
static QString | htmlParagraphs (const string &rawText) |
|
static QString | htmlHeading (const QString &text) |
|
static QString | htmlHeading (ZyppSel selectable) |
|
static QString | htmlEscape (const QString &plainText) |
|
|
void | buildDialog (const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel="") |
|
bool | eventFilter (QObject *obj, QEvent *ev) |
|
|
QPushButton * | _acceptButton |
|
QPushButton * | _rejectButton |
|
QTextBrowser * | _textBrowser |
|
Dialog that shows a scrolled (HTML) text.
◆ YQPkgTextDialog() [1/2]
YQPkgTextDialog::YQPkgTextDialog |
( |
const QString & | text, |
|
|
QWidget * | parent, |
|
|
const QString & | acceptButtonLabel, |
|
|
const QString & | rejectButtonLabel ) |
Constructor.
Creates a dialog with a text browser and two buttons. This does not pop up a dialog yet. Use 'exec()' (inherited from QDialog). Or, better yet, use the static confirmText() method.
◆ YQPkgTextDialog() [2/2]
YQPkgTextDialog::YQPkgTextDialog |
( |
const QString & | text, |
|
|
QWidget * | parent ) |
Constructor.
Creates a dialog with a text browser and an "OK" button. This does not pop up a dialog yet. Use 'exec()' (inherited from QDialog). Or, better yet, use the static showText() method.
◆ ~YQPkgTextDialog()
YQPkgTextDialog::~YQPkgTextDialog |
( |
| ) |
|
|
virtual |
◆ buildDialog()
void YQPkgTextDialog::buildDialog |
( |
const QString & | text, |
|
|
QWidget * | parent, |
|
|
const QString & | acceptButtonLabel, |
|
|
const QString & | rejectButtonLabel = "" ) |
|
protected |
Create the dialog. Called from all constructors.
◆ confirmText() [1/3]
bool YQPkgTextDialog::confirmText |
( |
QWidget * | parent, |
|
|
const QString & | text ) |
|
static |
Let the use confirm a text with buttons "Accept" and "Cancel". Returns "true" if the user clicked "Accept", "false" on "Cancel".
◆ confirmText() [2/3]
bool YQPkgTextDialog::confirmText |
( |
QWidget * | parent, |
|
|
const QString & | text, |
|
|
const QString & | acceptButtonLabel, |
|
|
const QString & | rejectButtonLabel ) |
|
static |
Let the user confirm a text. Returns "true" if the user clicked the accept button, false if he clicked the reject button.
◆ confirmText() [3/3]
bool YQPkgTextDialog::confirmText |
( |
QWidget * | parent, |
|
|
ZyppSel | selectable, |
|
|
const string & | text ) |
|
static |
Let the use confirm a text with a headline identifying a selectable (name+summary) with buttons "Accept" and "Cancel". Returns "true" if the user clicked "Accept", "false" on "Cancel".
◆ eventFilter()
bool YQPkgTextDialog::eventFilter |
( |
QObject * | obj, |
|
|
QEvent * | ev ) |
|
protected |
Grab [Return] press events and close dialog. Inherited from QObject.
◆ htmlEscape()
QString YQPkgTextDialog::htmlEscape |
( |
const QString & | plainText | ) |
|
|
static |
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>' '&' -> '&'
Returns the escaped string.
◆ htmlHeading() [1/2]
QString YQPkgTextDialog::htmlHeading |
( |
const QString & | text | ) |
|
|
static |
Returns a uniform heading in HTML format.
◆ htmlHeading() [2/2]
QString YQPkgTextDialog::htmlHeading |
( |
ZyppSel | selectable | ) |
|
|
static |
Returns a uniform heading in HTML format for the specified selectable: name and summary
◆ htmlParagraphs()
QString YQPkgTextDialog::htmlParagraphs |
( |
const string & | rawText | ) |
|
|
static |
Simple HTML formatting: Wrap paragraphs in
...
Paragraphs are delimited by empty lines. Return unformatted text if it contains "<!-- DT:Rich -->".
◆ setText [1/2]
void YQPkgTextDialog::setText |
( |
const QString & | text | ) |
|
|
slot |
◆ setText [2/2]
void YQPkgTextDialog::setText |
( |
ZyppSel | selectable, |
|
|
const string & | text ) |
|
slot |
Show a text with a headline identifying a zypp::ResObject ( name+summary ).
◆ showText() [1/2]
void YQPkgTextDialog::showText |
( |
QWidget * | parent, |
|
|
const QString & | text ) |
|
static |
Show a text and wait until the user confirmed with 'OK'.
◆ showText() [2/2]
void YQPkgTextDialog::showText |
( |
QWidget * | parent, |
|
|
ZyppSel | selectable, |
|
|
const string & | text ) |
|
static |
Show a text with a headline identifying a selectable (name+summary).
◆ sizeHint()
QSize YQPkgTextDialog::sizeHint |
( |
| ) |
const |
|
virtual |
Reimplemented from QWidget: Reserve a reasonable amount of space.
The documentation for this class was generated from the following files:
- /builddir/build/BUILD/libyui-4.6.0/libyui-qt-pkg/src/YQPkgTextDialog.h
- /builddir/build/BUILD/libyui-4.6.0/libyui-qt-pkg/src/YQPkgTextDialog.cc