libyui-qt-pkg
2.47.5
|
Dialog that shows a scrolled (HTML) text. More...
#include <YQPkgTextDialog.h>
Public Slots | |
void | setText (const QString &text) |
Set the text contents. | |
void | setText (const string &text) |
void | setText (ZyppSel selectable, const string &text) |
Show a text with a headline identifying a zypp::ResObject ( name+summary ). | |
Public Member Functions | |
YQPkgTextDialog (const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel) | |
Constructor. More... | |
YQPkgTextDialog (const QString &text, QWidget *parent) | |
Constructor. More... | |
virtual | ~YQPkgTextDialog () |
Destructor. | |
virtual QSize | sizeHint () const |
Reimplemented from QWidget: Reserve a reasonable amount of space. | |
Static Public Member Functions | |
static void | showText (QWidget *parent, const QString &text) |
Show a text and wait until the user confirmed with 'OK'. | |
static void | showText (QWidget *parent, ZyppSel selectable, const string &text) |
Show a text with a headline identifying a selectable (name+summary). | |
static bool | confirmText (QWidget *parent, const QString &text, const QString &acceptButtonLabel, const QString &rejectButtonLabel) |
Let the user confirm a text. More... | |
static bool | confirmText (QWidget *parent, const QString &text) |
Let the use confirm a text with buttons "Accept" and "Cancel". More... | |
static bool | confirmText (QWidget *parent, const char *text) |
static bool | confirmText (QWidget *parent, ZyppSel selectable, const string &text) |
Let the use confirm a text with a headline identifying a selectable (name+summary) with buttons "Accept" and "Cancel". More... | |
static QString | htmlParagraphs (const string &rawText) |
Simple HTML formatting: Wrap paragraphs in. More... | |
static QString | htmlHeading (const QString &text) |
Returns a uniform heading in HTML format. | |
static QString | htmlHeading (ZyppSel selectable) |
Returns a uniform heading in HTML format for the specified selectable: name and summary. | |
static QString | htmlEscape (const QString &plainText) |
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>' '&' -> '&'. More... | |
Protected Member Functions | |
void | buildDialog (const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel="") |
Create the dialog. More... | |
bool | eventFilter (QObject *obj, QEvent *ev) |
Grab [Return] press events and close dialog. More... | |
Protected Attributes | |
QPushButton * | _acceptButton |
QPushButton * | _rejectButton |
QTextBrowser * | _textBrowser |
Dialog that shows a scrolled (HTML) text.
Definition at line 58 of file YQPkgTextDialog.h.
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.
Definition at line 75 of file YQPkgTextDialog.cc.
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.
Definition at line 68 of file YQPkgTextDialog.cc.
|
protected |
|
static |
Let the user confirm a text.
Returns "true" if the user clicked the accept button, false if he clicked the reject button.
Definition at line 238 of file YQPkgTextDialog.cc.
|
static |
Let the use confirm a text with buttons "Accept" and "Cancel".
Returns "true" if the user clicked "Accept", "false" on "Cancel".
Definition at line 255 of file YQPkgTextDialog.cc.
|
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".
Definition at line 268 of file YQPkgTextDialog.cc.
|
protected |
Grab [Return] press events and close dialog.
Inherited from QObject.
Definition at line 173 of file YQPkgTextDialog.cc.
|
static |
Escapes characters special to HTML in a ( plain text ) string, such as: '<' -> '<' '>' -> '>' '&' -> '&'.
Returns the escaped string.
Definition at line 280 of file YQPkgTextDialog.cc.
|
static |
Simple HTML formatting: Wrap paragraphs in.
...
Paragraphs are delimited by empty lines. Return unformatted text if it contains "<!-- DT:Rich -->".
Definition at line 295 of file YQPkgTextDialog.cc.