rtfedit.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef RTFEDIT_H
00022 #define RTFEDIT_H
00023
00024 #include <QTextEdit>
00025 #include <QList>
00026 #include <QAction>
00027
00028
00036 class RtfEdit : public QTextEdit
00037 {
00038 Q_OBJECT
00039
00040 public:
00048 RtfEdit(QWidget *parent = 0);
00049
00055 ~RtfEdit();
00056
00062 void addContextActions(QList<QAction*> actions);
00063
00070 bool canInsertFromMimeData(const QMimeData *source) const;
00071
00077 void insertFromMimeData(const QMimeData *source);
00078
00079 private:
00080 void contextMenuEvent(QContextMenuEvent *event);
00081 void mouseReleaseEvent(QMouseEvent *event);
00082
00083 QList<QAction*> actions;
00084
00085 };
00086
00087 #endif // RTFEDIT_H
00088
00089