editor.h
1 // -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
23 #ifndef KOMPOSER_EDITOR_H
24 #define KOMPOSER_EDITOR_H
25 
26 #include "plugin.h"
27 
28 #include <tqstringlist.h>
29 
30 namespace KParts {
31  class Part;
32 }
33 
34 namespace Komposer {
35 
36  class Core;
37 
38  class Editor : public Plugin
39  {
40  Q_OBJECT
41  TQ_OBJECT
42  public:
43  enum TextType {
44  Plain = 1 << 0,
45  RichText = 1 << 1,
46  HTML = 1 << 2
47  };
48  virtual ~Editor();
49 
54  virtual TQWidget *widget() =0;
55 
56  int supportedTextFormats() const;
57 
61  virtual TQString text() const =0;
62 
67  virtual void select();
68 
78  virtual TQStringList configModules() const { return TQStringList(); }
79 
80 
81  public slots:
87  virtual void setText( const TQString &txt ) =0;
88 
93  virtual void changeSignature( const TQString &txt ) =0;
94 
95  protected:
96  Editor( TQObject *parent, const char *name, const TQStringList &args );
97 
98  private:
99  class Private;
100  Private *d;
101  };
102 
103 }
104 
105 #endif