libkdepim

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 <qstringlist.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   public:
00042     enum TextType {
00043       Plain    = 1 << 0,
00044       RichText = 1 << 1,
00045       HTML     = 1 << 2
00046     };
00047     virtual ~Editor();
00048 
00053     virtual QWidget *widget() =0;
00054 
00055     int supportedTextFormats() const;
00056 
00060     virtual QString text() const =0;
00061 
00066     virtual void select();
00067 
00077     virtual QStringList configModules() const { return QStringList(); }
00078 
00079 
00080   public slots:
00086     virtual void setText( const QString &txt ) =0;
00087 
00092     virtual void changeSignature( const QString &txt ) =0;
00093 
00094   protected:
00095     Editor( QObject *parent, const char *name, const QStringList &args );
00096 
00097   private:
00098     class Private;
00099     Private *d;
00100   };
00101 
00102 }
00103 
00104 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys