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 );
227 #endif // YQRichText_h
virtual void setPlainTextMode(bool on=true)
Set this RichText widget's "plain text" mode on or off.
virtual int preferredWidth()
Preferred width of the widget.
virtual void setAutoScrollDown(bool on=true)
Set this RichText widget's "auto scroll down" mode on or off.
virtual std::string hScrollValue() const override
Get the horizontal scrollbar position.
virtual void setVScrollValue(const std::string &newValue) override
Set the vertical scrollbar position.
virtual int preferredHeight()
Preferred height of the widget.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
Helper class - needed to have the benefits of both QVBox as the base class for YQRichText so uniform ...
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 bool setKeyboardFocus()
Accept the keyboard focus.
YQRichText(YWidget *parent, const std::string &text, bool plainTextMode=false)
Constructor.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
void linkClicked(const QUrl &url)
Notification that a hyperlink is clicked.
virtual void setHScrollValue(const std::string &newValue) override
Set the horizontal scrollbar position.
virtual std::string vScrollValue() const override
Get the vertical scrollbar position.
virtual bool eventFilter(QObject *obj, QEvent *ev)
Event filter.
virtual void setValue(const std::string &newValue) override
Change the text content of the RichText widget.
bool haveHyperLinks()
Returns 'true' if the current text of this RichText widget contains hyperlinks.
virtual ~YQRichText()
Destructor.
YQTextBrowser(QWidget *parent=0)
Constructor.
virtual void setSource(const QUrl &name)
Get the document pointed to by a hyperlink.