3 class RtfEditor:virtual public QWidget{
5 Q_PROPERTY(QString html READ html WRITE html)
6 Q_PROPERTY(QString plain READ plain WRITE plain)
8 RtfEditor(QWidget *parent=NULL);
10 QString html() const, plain() const;
11 void html(const QString &),plain(const QString &);
13 void selectionChnged();
15 void makeItalic(bool);
18 void setLink(const QString &link);
20 void invalidLink(const QString &link);
23 enum style{Bold,Italic};
24 void makeStyle(const style s,bool on);
25 //When this widget is focused,To have this->editor focused is needed for convenience.
26 void focusInEvent(QFocusEvent *);
27 void keyPressEvent(QKeyEvent *);
28 QColor defaltTextColor;
30 QAction *bold,*italic,*link,*color;