libyui-qt-pkg
2.42.5
|
Dialog that shows a scrolled (HTML) text. More...
#include <YQPkgTextDialog.h>
Public Slots | |
void | setText (const QString &text) |
void | setText (const string &text) |
void | setText (ZyppSel selectable, const string &text) |
Public Member Functions | |
YQPkgTextDialog (const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel) | |
YQPkgTextDialog (const QString &text, QWidget *parent) | |
virtual | ~YQPkgTextDialog () |
virtual QSize | sizeHint () const |
Static Public Member Functions | |
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) |
Protected Member Functions | |
void | buildDialog (const QString &text, QWidget *parent, const QString &acceptButtonLabel, const QString &rejectButtonLabel="") |
bool | eventFilter (QObject *obj, QEvent *ev) |
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.
|
virtual |
Destructor.
Definition at line 85 of file YQPkgTextDialog.cc.
|
protected |
Create the dialog. Called from all constructors.
Definition at line 91 of file YQPkgTextDialog.cc.
|
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 |
Returns a uniform heading in HTML format.
Definition at line 313 of file YQPkgTextDialog.cc.
|
static |
Returns a uniform heading in HTML format for the specified selectable: name and summary
Definition at line 327 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.
|
slot |
Set the text contents.
Definition at line 202 of file YQPkgTextDialog.cc.
|
slot |
Show a text with a headline identifying a zypp::ResObject ( name+summary ).
Definition at line 214 of file YQPkgTextDialog.cc.
|
static |
Show a text and wait until the user confirmed with 'OK'.
Definition at line 221 of file YQPkgTextDialog.cc.
|
static |
Show a text with a headline identifying a selectable (name+summary).
Definition at line 230 of file YQPkgTextDialog.cc.
|
virtual |
Reimplemented from QWidget: Reserve a reasonable amount of space.
Definition at line 166 of file YQPkgTextDialog.cc.