kpresenter

KPrConfig.h
1/* This file is part of the KDE project
2 Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef __kpresenter_dlg_config__
22#define __kpresenter_dlg_config__
23
24#include <kdialogbase.h>
25
26class KPrView;
27class KPrDocument;
28class KIntNumInput;
29class KColorButton;
30class TDEConfig;
31class TQCheckBox;
32class KLineEdit;
33class KDoubleNumInput;
34class KoSpellConfigWidget;
35class KPrPenStyleWidget;
36class KPrBrushProperty;
37class KPrRectProperty;
38class KPrPolygonProperty;
39class KPrPieProperty;
40class KoUnitDoubleSpinBox;
41class TQVGroupBox;
42
43namespace KSpell2 {
44 class ConfigWidget;
45}
46
47
48class KPrConfigureInterfacePage : public TQWidget
49{
50 TQ_OBJECT
51
52public:
53 KPrConfigureInterfacePage( KPrView *_view, TQWidget *parent = 0, char *name = 0 );
54 void apply();
55 void slotDefault();
56private:
57 KPrView* m_pView;
58 TDEConfig* config;
59 int oldNbRecentFiles;
60 KDoubleNumInput* indent;
61 KIntNumInput* recentFiles;
62 TQCheckBox *showRuler, *showStatusBar;
63};
64
65class KPrConfigureColorBackground : public TQWidget
66{
67 TQ_OBJECT
68
69public:
70 KPrConfigureColorBackground( KPrView* _view, TQWidget *parent = 0, char *name = 0 );
71 void apply();
72 void slotDefault();
73protected:
74 KPrView* m_pView;
75 KColorButton* bgColor;
76 KColorButton* gridColor;
77 TDEConfig* config;
78 TQColor oldBgColor;
79 TQColor oldGridColor;
80} ;
81
82class KPrConfigureSpellPage : public TQWidget
83{
84 TQ_OBJECT
85
86public:
87 KPrConfigureSpellPage( KPrView *_view, TQWidget *parent, char *name = 0 );
88 void apply();
89 void slotDefault();
90private:
91 KPrView* m_pView;
92 KSpell2::ConfigWidget *m_spellConfigWidget;
93 TDEConfig* config;
94};
95
96class KPrConfigureMiscPage : public TQWidget
97{
98 TQ_OBJECT
99
100public:
101 KPrConfigureMiscPage( KPrView *_view, TQWidget *parent, char *name = 0 );
102 KCommand *apply();
103 void slotDefault();
104private:
105 KPrView* m_pView;
106 TDEConfig* config;
107 KIntNumInput* m_undoRedoLimit;
108 int m_oldNbRedo;
109 bool m_printNotes;
110 TQCheckBox* m_displayLink, *m_displayComment, *m_underlineLink, *m_displayFieldCode, *m_cbPrintNotes;
111 KoUnitDoubleSpinBox * resolutionY, * resolutionX;
112 KDoubleNumInput *m_rotation;
113};
114
115class KPrConfigureDefaultDocPage : public TQWidget
116{
117 TQ_OBJECT
118
119public:
120 KPrConfigureDefaultDocPage( KPrView *_view, TQWidget *parent, char *name = 0 );
121 ~KPrConfigureDefaultDocPage();
122 KCommand *apply();
123 void slotDefault();
124public slots:
125 void selectNewDefaultFont();
126private:
127 int oldAutoSaveValue;
128 int m_oldStartingPage;
129 double m_oldTabStopWidth;
130 bool m_oldBackupFile;
131 TQString m_oldLanguage;
132 KPrView* m_pView;
133 TDEConfig* config;
134 TQFont *font;
135 TQLabel *fontName;
136 KIntNumInput* autoSave;
137 KIntNumInput* m_variableNumberOffset;
138 KoUnitDoubleSpinBox *m_tabStopWidth;
139 TQCheckBox *m_cursorInProtectedArea;
140 TQCheckBox *m_createBackupFile;
141 TQCheckBox *m_directInsertCursor;
142 TQComboBox *m_globalLanguage;
143 TQCheckBox *m_autoHyphenation;
144 bool m_oldHyphenation;
145};
146
147class KPrConfigureToolsPage : public TQWidget
148{
149 TQ_OBJECT
150
151public:
152 KPrConfigureToolsPage( KPrView *_view, TQWidget *parent, char *name = 0 );
153 ~KPrConfigureToolsPage();
154 void apply();
155 void slotDefault();
156public slots:
157
158private:
159 KPrView* m_pView;
160 TDEConfig* config;
161
162 KPrPenStyleWidget *m_confPenDia;
163 KPrBrushProperty *m_brushProperty;
164 KPrRectProperty *m_rectProperty;
165 KPrPolygonProperty *m_polygonProperty;
166 KPrPieProperty *m_pieProperty;
167};
168
169class KPrConfigurePathPage : public TQWidget
170{
171 TQ_OBJECT
172
173public:
174 KPrConfigurePathPage( KPrView *_view, TQWidget *parent, char *name = 0 );
175 void slotDefault();
176 void apply();
177private slots:
178 void slotModifyPath();
179 void slotSelectionChanged(TQListViewItem *);
180private:
181 KPrView* m_pView;
182 TDEConfig* config;
183 TDEListView* m_pPathView;
184 TQPushButton *m_modifyPath;
185};
186
187class KPrConfigureTTSPage : public TQWidget
188{
189 TQ_OBJECT
190
191public:
192 KPrConfigureTTSPage( KPrView *_view, TQWidget *parent, char *name = 0 );
193 void slotDefault();
194 void apply();
195private slots:
196 void screenReaderOptionChanged();
197private:
198 TDEConfig* config;
199 TQCheckBox* m_cbSpeakPointerWidget;
200 TQCheckBox* m_cbSpeakFocusWidget;
201 TQVGroupBox* m_gbScreenReaderOptions;
202 TQCheckBox* m_cbSpeakTooltips;
203 TQCheckBox* m_cbSpeakWhatsThis;
204 TQCheckBox* m_cbSpeakDisabled;
205 TQCheckBox* m_cbSpeakAccelerators;
206 TQLabel* m_lblAcceleratorPrefix;
207 TQLineEdit* m_leAcceleratorPrefixWord;
208 KIntNumInput* m_iniPollingInterval;
209};
210
211
212class KPrConfig : public KDialogBase
213{
214 TQ_OBJECT
215
216public:
217 enum { KP_INTERFACE = 1, KP_COLOR=2, KP_TDESPELL=4,KP_MISC=8, KP_DOC=16, KP_TOOLS=32,KP_PATH = 64 };
218 KPrConfig( KPrView* parent );
219public slots:
220 void slotApply();
221 void slotDefault();
222 void openPage(int flags);
223private:
224 KPrConfigureInterfacePage *_interfacePage;
225 KPrConfigureColorBackground *_colorBackground;
226 KPrConfigureSpellPage *_spellPage;
227 KPrConfigureMiscPage *_miscPage;
228 KPrConfigureDefaultDocPage *_defaultDocPage;
229 KPrConfigureToolsPage *_toolsPage;
230 KPrConfigurePathPage *m_pathPage;
231 KPrConfigureTTSPage *m_ttsPage;
232 KPrDocument* m_doc;
233
234};
235
236#endif