htmlentrytextedit.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BLOKKAL_UIHTMLENTRYTEXTEDIT_H
00021 #define BLOKKAL_UIHTMLENTRYTEXTEDIT_H
00022
00023 #include <ktextedit.h>
00024 #include <sonnet/highlighter.h>
00025
00026 #include "../blokkal_export.h"
00027
00028 class QAction;
00029 class KAction;
00030 class KActionCollection;
00031
00032 namespace Blokkal {
00033 namespace Ui {
00034 class HtmlTextHighlighter;
00035 class DropProxy;
00042 class BLOKKAL_EXPORT HtmlEntryTextEdit : public KTextEdit
00043 {
00044 Q_OBJECT
00045 public:
00050 HtmlEntryTextEdit( QWidget * parent = 0 );
00051
00055 virtual ~HtmlEntryTextEdit( void );
00056
00061 void insertTextAtCursor( const QString & text );
00062
00070 void frameSelection( const QString & front, const QString & tail );
00071
00076 void setDropProxy( Blokkal::Ui::DropProxy * proxy );
00077
00078 Q_SIGNALS:
00084 void plainTextChanged( void );
00085
00086 protected:
00091 virtual void dropEvent( QDropEvent * event );
00092
00096 virtual void contextMenuEvent( QContextMenuEvent * event );
00097
00098 private Q_SLOTS:
00099 void checkCurrentBlock( void );
00100 void menuActivated( QAction * action );
00101
00102 private:
00103 class Private;
00104 Private * const d;
00105
00106 };
00107
00116 class BLOKKAL_EXPORT HtmlTextHighlighter : public Sonnet::Highlighter
00117 {
00118 Q_OBJECT
00119 public:
00126 HtmlTextHighlighter( QTextEdit * parent );
00127
00131 virtual ~HtmlTextHighlighter( void );
00132
00133 protected:
00134 virtual void highlightBlock ( const QString & text );
00135
00136 private Q_SLOTS:
00137 void slotAppearanceSettingsChanged( void );
00138
00139 private:
00140 class Private;
00141 Private * const d;
00142 };
00143
00150 class BLOKKAL_EXPORT DropProxy {
00151 public:
00152 virtual ~DropProxy( void );
00159 virtual bool handleDrop( QDropEvent * event, QWidget * widget ) = 0;
00160 };
00161
00162 }
00163 }
00164
00165 #endif