editor.h
00001 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*- 00023 #ifndef KOMPOSER_EDITOR_H 00024 #define KOMPOSER_EDITOR_H 00025 00026 #include "plugin.h" 00027 00028 #include <tqstringlist.h> 00029 00030 namespace KParts { 00031 class Part; 00032 } 00033 00034 namespace Komposer { 00035 00036 class Core; 00037 00038 class Editor : public Plugin 00039 { 00040 Q_OBJECT 00041 00042 public: 00043 enum TextType { 00044 Plain = 1 << 0, 00045 RichText = 1 << 1, 00046 HTML = 1 << 2 00047 }; 00048 virtual ~Editor(); 00049 00054 virtual TQWidget *widget() =0; 00055 00056 int supportedTextFormats() const; 00057 00061 virtual TQString text() const =0; 00062 00067 virtual void select(); 00068 00078 virtual TQStringList configModules() const { return TQStringList(); } 00079 00080 00081 public slots: 00087 virtual void setText( const TQString &txt ) =0; 00088 00093 virtual void changeSignature( const TQString &txt ) =0; 00094 00095 protected: 00096 Editor( TQObject *parent, const char *name, const TQStringList &args ); 00097 00098 private: 00099 class Private; 00100 Private *d; 00101 }; 00102 00103 } 00104 00105 #endif