00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef YQRichText_h
00023 #define YQRichText_h
00024
00025 #include <qvbox.h>
00026 #include <qtextbrowser.h>
00027 #include <ycp/YCPString.h>
00028
00029 #include "YRichText.h"
00030
00031
00032 class YQTextBrowser;
00033
00034 class YQRichText : public QVBox, public YRichText
00035 {
00036 Q_OBJECT
00037
00038 public:
00039
00043 YQRichText( QWidget * parent, const YWidgetOpt & opt, const YCPString & text );
00044
00050 void setEnabling( bool enabled );
00051
00057 long nicesize( YUIDimension dim );
00058
00062 void setSize( long newWidth, long newHeight );
00063
00067 void setText( const YCPString & RichText );
00068
00072 virtual bool setKeyboardFocus();
00073
00077 bool eventFilter( QObject * obj, QEvent * ev );
00078
00083 bool haveHyperLinks();
00084
00085
00086 protected slots:
00087
00091 void linkClicked( const QString & url );
00092
00093
00094 protected:
00095
00096
00097
00098
00099
00100 YQTextBrowser * _textBrowser;
00101 bool _shrinkable;
00102 };
00103
00104
00114 class YQTextBrowser: public QTextBrowser
00115 {
00116 Q_OBJECT
00117
00118
00119 public:
00120
00124 YQTextBrowser( QWidget * parent = 0 ):
00125 QTextBrowser( parent ) {}
00126
00127 public slots:
00128
00135 virtual void setSource( const QString & name ) {}
00136 };
00137
00138
00139 #endif // YQRichText_h