00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kofontdia_h__
00021 #define __kofontdia_h__
00022
00023 #include <kfontdialog.h>
00024 #include <kdialog.h>
00025 #include <QTabWidget>
00026 #include <KoTextFormat.h>
00027 #include <QCheckBox>
00028 #include <koffice_export.h>
00029
00030 #include "KoFontTab.h"
00031 #include "KoHighlightingTab.h"
00032 #include "KoDecorationTab.h"
00033 #include "KoLayoutTab.h"
00034 #include "KoLanguageTab.h"
00035
00036 #include "KoFontDiaPreview.h"
00037
00038 #include <sonnet/loader.h>
00039
00040 class QComboBox;
00041
00042
00043 class KOTEXT_EXPORT KoFontDia : public KDialog
00044 {
00045 Q_OBJECT
00046 public:
00047
00050 KoFontDia( const KoTextFormat& initialFormat,
00051 KSpell2::Loader::Ptr loader = KSpell2::Loader::Ptr(),
00052 QWidget* parent = 0, const char* name = 0 );
00053
00054 int changedFlags() const { return m_changedFlags; }
00055
00056 KoTextFormat newFormat() const;
00057
00058 protected slots:
00059 void slotReset();
00060 virtual void slotApply();
00061 virtual void slotOk();
00062 void slotFontFamilyChanged();
00063 void slotFontBoldChanged();
00064 void slotFontItalicChanged();
00065 void slotFontSizeChanged();
00066 void slotFontColorChanged( const QColor& color );
00067 void slotBackgroundColorChanged( const QColor& color );
00068 void slotCapitalisationChanged( int item );
00069 void slotUnderlineChanged( int item );
00070 void slotUnderlineStyleChanged( int item );
00071 void slotUnderlineColorChanged( const QColor &color );
00072 void slotStrikethroughChanged( int item );
00073 void slotStrikethroughStyleChanged( int item );
00074 void slotWordByWordChanged( bool state );
00075 void slotShadowDistanceChanged( double distance );
00076 void slotShadowDirectionChanged( int direction );
00077 void slotShadowColorChanged( const QColor &color );
00078 void slotSubSuperChanged();
00079 void slotOffsetChanged( int offset );
00080 void slotRelativeSizeChanged( double relativeSize );
00081 void slotHyphenationChanged( bool state );
00082 void slotLanguageChanged();
00083
00084 signals:
00085 void applyFont();
00086
00087 private:
00088 void init();
00089
00090 KoTextFormat m_initialFormat;
00091 KoFontTab *fontTab;
00092 KoHighlightingTab *highlightingTab;
00093 KoDecorationTab *decorationTab;
00094 KoLayoutTab *layoutTab;
00095 KoLanguageTab *languageTab;
00096 KoFontDiaPreview *fontDiaPreview;
00097
00098 int m_changedFlags;
00099
00100 };
00101
00102 #endif