libyui-qt
 
Loading...
Searching...
No Matches
YQRichText Class Reference
Inheritance diagram for YQRichText:
Collaboration diagram for YQRichText:

Public Member Functions

 YQRichText (YWidget *parent, const std::string &text, bool plainTextMode=false)
 
virtual ~YQRichText ()
 
virtual void setValue (const std::string &newValue) override
 
virtual void setPlainTextMode (bool on=true)
 
virtual void setAutoScrollDown (bool on=true)
 
virtual int preferredWidth ()
 
virtual int preferredHeight ()
 
virtual void setSize (int newWidth, int newHeight)
 
virtual void setEnabled (bool enabled)
 
virtual bool setKeyboardFocus ()
 
virtual bool eventFilter (QObject *obj, QEvent *ev)
 
bool haveHyperLinks ()
 
virtual std::string vScrollValue () const override
 
virtual void setVScrollValue (const std::string &newValue) override
 
virtual std::string hScrollValue () const override
 
virtual void setHScrollValue (const std::string &newValue) override
 
virtual void activateLink (const std::string &url)
 
virtual void setRichTextStyleSheet (const QString &style)
 

Protected Slots

void linkClicked (const QUrl &url)
 

Protected Attributes

YQTextBrowser_textBrowser
 

Constructor & Destructor Documentation

◆ YQRichText()

YQRichText::YQRichText ( YWidget * parent,
const std::string & text,
bool plainTextMode = false )

Constructor.

◆ ~YQRichText()

YQRichText::~YQRichText ( )
virtual

Destructor.

Member Function Documentation

◆ activateLink()

void YQRichText::activateLink ( const std::string & url)
virtual

Derived classes should implement this, method is used to trigger event like user has clicked link in the RichText

◆ eventFilter()

bool YQRichText::eventFilter ( QObject * obj,
QEvent * ev )
virtual

Event filter.

Reimplemented from QWidget.

◆ haveHyperLinks()

bool YQRichText::haveHyperLinks ( )

Returns 'true' if the current text of this RichText widget contains hyperlinks.

◆ hScrollValue()

string YQRichText::hScrollValue ( ) const
overridevirtual

Get the horizontal scrollbar position.

Reimplemented from YRichText.

◆ linkClicked

void YQRichText::linkClicked ( const QUrl & url)
protectedslot

Notification that a hyperlink is clicked.

◆ preferredHeight()

int YQRichText::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

◆ preferredWidth()

int YQRichText::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

◆ setAutoScrollDown()

void YQRichText::setAutoScrollDown ( bool on = true)
virtual

Set this RichText widget's "auto scroll down" mode on or off.

Reimplemented from YRichText.

◆ setEnabled()

void YQRichText::setEnabled ( bool enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

◆ setHScrollValue()

void YQRichText::setHScrollValue ( const std::string & newValue)
overridevirtual

Set the horizontal scrollbar position.

Reimplemented from YRichText.

◆ setKeyboardFocus()

bool YQRichText::setKeyboardFocus ( )
virtual

Accept the keyboard focus.

Reimplemented from YWidget.

◆ setPlainTextMode()

void YQRichText::setPlainTextMode ( bool on = true)
virtual

Set this RichText widget's "plain text" mode on or off.

Reimplemented from YRichText.

◆ setRichTextStyleSheet()

void YQRichText::setRichTextStyleSheet ( const QString & style)
virtual

Set the stylesheet for the RichText widget content.

◆ setSize()

void YQRichText::setSize ( int newWidth,
int newHeight )
virtual

Set the new size of the widget.

Reimplemented from YWidget.

◆ setValue()

void YQRichText::setValue ( const std::string & newValue)
overridevirtual

Change the text content of the RichText widget.

Reimplemented from YRichText.

◆ setVScrollValue()

void YQRichText::setVScrollValue ( const std::string & newValue)
overridevirtual

Set the vertical scrollbar position.

Reimplemented from YRichText.

◆ vScrollValue()

string YQRichText::vScrollValue ( ) const
overridevirtual

Get the vertical scrollbar position.

Reimplemented from YRichText.


The documentation for this class was generated from the following files: