libkdepim
defaulteditor.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef DEFAULTEDITOR_H
00023 #define DEFAULTEDITOR_H
00024
00025 #include "editor.h"
00026
00027 class QTextEdit;
00028 class KFontAction;
00029 class KFontSizeAction;
00030 class KToggleAction;
00031 class KActionCollection;
00032
00033
00034 class DefaultEditor : public Komposer::Editor
00035 {
00036 Q_OBJECT
00037 public:
00038 DefaultEditor( QObject *parent, const char *name, const QStringList &args );
00039 ~DefaultEditor();
00040
00041 virtual QWidget *widget();
00042 virtual QString text() const;
00043 public slots:
00044 virtual void setText( const QString &txt );
00045 virtual void changeSignature( const QString &txt );
00046
00050 bool open();
00051
00055 bool saveAs();
00056
00060 bool print();
00061
00065 void formatColor();
00066
00067 void checkSpelling();
00068
00072 void setAlignLeft( bool yes );
00073
00077 void setAlignRight( bool yes );
00078
00082 void setAlignCenter( bool yes );
00083
00087 void setAlignJustify( bool yes );
00088
00089 protected slots:
00093 void createActions( KActionCollection *ac );
00094
00095 void updateActions();
00096
00097 void updateFont();
00098 void updateCharFmt();
00099 void updateAligment();
00100
00101 private:
00102 QTextEdit *m_textEdit;
00103
00104 KToggleAction *m_actionBold;
00105 KToggleAction *m_actionItalic;
00106 KToggleAction *m_actionUnderline;
00107
00108 KFontAction *m_actionFont;
00109 KFontSizeAction *m_actionFontSize;
00110
00111 KToggleAction *m_actionAlignLeft;
00112 KToggleAction *m_actionAlignRight;
00113 KToggleAction *m_actionAlignCenter;
00114 KToggleAction *m_actionAlignJustify;
00115 };
00116
00117 #endif
|