lib

KoFontDia.h
1/* This file is part of the KDE project
2 Copyright (C) 2001,2002,2003 Montel Laurent <lmontel@mandrakesoft.com>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef __kofontdia_h__
21#define __kofontdia_h__
22
23#include <tdefontdialog.h>
24#include <tqtabwidget.h>
25#include <KoTextFormat.h>
26#include <tqcheckbox.h>
27#include <koffice_export.h>
28
29#include "KoFontTab.h"
30#include "KoHighlightingTab.h"
31#include "KoDecorationTab.h"
32#include "KoLayoutTab.h"
33#include "KoLanguageTab.h"
34
35#include "KoFontDiaPreview.h"
36
37#include <tdespell2/broker.h>
38
39class TQComboBox;
40
41
42class KOTEXT_EXPORT KoFontDia : public KDialogBase
43{
44 TQ_OBJECT
45
46public:
47
50 KoFontDia( const KoTextFormat& initialFormat,
51 KSpell2::Broker::Ptr broker = 0,
52 TQWidget* parent = 0, const char* name = 0 );
53
54 int changedFlags() const { return m_changedFlags; }
55
56 KoTextFormat newFormat() const;
57
58protected slots:
59 void slotReset();
60 virtual void slotApply();
61 virtual void slotOk();
62 void slotFontFamilyChanged();
63 void slotFontBoldChanged();
64 void slotFontItalicChanged();
65 void slotFontSizeChanged();
66 void slotFontColorChanged( const TQColor& color );
67 void slotBackgroundColorChanged( const TQColor& color );
68 void slotCapitalisationChanged( int item );
69 void slotUnderlineChanged( int item );
70 void slotUnderlineStyleChanged( int item );
71 void slotUnderlineColorChanged( const TQColor &color );
72 void slotStrikethroughChanged( int item );
73 void slotStrikethroughStyleChanged( int item );
74 void slotWordByWordChanged( bool state );
75 void slotShadowDistanceChanged( double distance );
76 void slotShadowDirectionChanged( int direction );
77 void slotShadowColorChanged( const TQColor &color );
78 void slotSubSuperChanged();
79 void slotOffsetChanged( int offset );
80 void slotRelativeSizeChanged( double relativeSize );
81 void slotHyphenationChanged( bool state );
82 void slotLanguageChanged();
83
84signals:
85 void applyFont();
86
87private:
88 void init();
89
90 KoTextFormat m_initialFormat;
91 KoFontTab *fontTab;
92 KoHighlightingTab *highlightingTab;
93 KoDecorationTab *decorationTab;
94 KoLayoutTab *layoutTab;
95 KoLanguageTab *languageTab;
96 KoFontDiaPreview *fontDiaPreview;
97
98 int m_changedFlags;
99
100};
101
102#endif
virtual void slotApply()
virtual void slotOk()
The font dialog Preview.
Each character (KoTextStringChar) points to a KoTextFormat that defines the formatting of that charac...