31 #include <QTextBrowser>
32 #include <yui/YRichText.h>
49 const std::string & text,
50 bool plainTextMode =
false );
62 virtual void setValue(
const std::string & newValue )
override;
97 virtual void setSize(
int newWidth,
int newHeight );
118 virtual bool eventFilter( QObject * obj, QEvent * ev );
177 bool *_colors_specified;
182 std::string scrollValue( QScrollBar* scrollBar )
const;
187 void setScrollValue( QScrollBar* scrollBar,
const std::string & newValue );
212 : QTextBrowser( parent )
223 virtual void setSource(
const QUrl & name );
virtual ~YQRichText()
Destructor.
virtual void activateLink(const std::string &url)
Derived classes should implement this, method is used to trigger event like user has clicked link in ...
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual int preferredWidth()
Preferred width of the widget.
bool haveHyperLinks()
Returns 'true' if the current text of this RichText widget contains hyperlinks.
virtual void setAutoScrollDown(bool on=true)
Set this RichText widget's "auto scroll down" mode on or off.
virtual bool eventFilter(QObject *obj, QEvent *ev)
Event filter.
virtual void setHScrollValue(const std::string &newValue) override
Set the horizontal scrollbar position.
virtual int preferredHeight()
Preferred height of the widget.
virtual std::string hScrollValue() const override
Get the horizontal scrollbar position.
virtual std::string vScrollValue() const override
Get the vertical scrollbar position.
YQRichText(YWidget *parent, const std::string &text, bool plainTextMode=false)
Constructor.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
virtual void setVScrollValue(const std::string &newValue) override
Set the vertical scrollbar position.
virtual void setValue(const std::string &newValue) override
Change the text content of the RichText widget.
virtual void setPlainTextMode(bool on=true)
Set this RichText widget's "plain text" mode on or off.
void linkClicked(const QUrl &url)
Notification that a hyperlink is clicked.
Helper class - needed to have the benefits of both QVBox as the base class for YQRichText so uniform ...
virtual void setSource(const QUrl &name)
Get the document pointed to by a hyperlink.
YQTextBrowser(QWidget *parent=0)
Constructor.