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 TQTextEdit;
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 TQ_OBJECT
00038 public:
00039 DefaultEditor( TQObject *parent, const char *name, const TQStringList &args );
00040 ~DefaultEditor();
00041
00042 virtual TQWidget *widget();
00043 virtual TQString text() const;
00044 public slots:
00045 virtual void setText( const TQString &txt );
00046 virtual void changeSignature( const TQString &txt );
00047
00051 bool open();
00052
00056 bool saveAs();
00057
00061 bool print();
00062
00066 void formatColor();
00067
00068 void checkSpelling();
00069
00073 void setAlignLeft( bool yes );
00074
00078 void setAlignRight( bool yes );
00079
00083 void setAlignCenter( bool yes );
00084
00088 void setAlignJustify( bool yes );
00089
00090 protected slots:
00094 void createActions( KActionCollection *ac );
00095
00096 void updateActions();
00097
00098 void updateFont();
00099 void updateCharFmt();
00100 void updateAligment();
00101
00102 private:
00103 TQTextEdit *m_textEdit;
00104
00105 KToggleAction *m_actionBold;
00106 KToggleAction *m_actionItalic;
00107 KToggleAction *m_actionUnderline;
00108
00109 KFontAction *m_actionFont;
00110 KFontSizeAction *m_actionFontSize;
00111
00112 KToggleAction *m_actionAlignLeft;
00113 KToggleAction *m_actionAlignRight;
00114 KToggleAction *m_actionAlignCenter;
00115 KToggleAction *m_actionAlignJustify;
00116 };
00117
00118 #endif
|