kspread

kspread_dlg_preference.h
1/* This file is part of the KDE project
2 Copyright (C) 2002-2004 Ariya Hidayat <ariya@kde.org>
3 (C) 2002-2003 Norbert Andres <nandres@web.de>
4 (C) 2000-2003 Laurent Montel <montel@kde.org>
5 (C) 2002 John Dailey <dailey@vt.edu>
6 (C) 2002 Philipp Mueller <philipp.mueller@gmx.de>
7 (C) 2001-2002 David Faure <faure@kde.org>
8 (C) 2001 Werner Trobin <trobin@kde.org>
9 (C) 2000 Bernd Johannes Wuebben <wuebben@kde.org>
10
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Library General Public
13 License as published by the Free Software Foundation; either
14 version 2 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Library General Public License for more details.
20
21 You should have received a copy of the GNU Library General Public License
22 along with this library; see the file COPYING.LIB. If not, write to
23 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26
27#ifndef __kspread_dlg_preference__
28#define __kspread_dlg_preference__
29
30#include <kdialogbase.h>
31
32class TDEConfig;
33class KIntNumInput;
34class KDoubleNumInput;
35class KSpellConfig;
36class TQCheckBox;
37class TQComboBox;
38class TQVGroupBox;
39class TQPushButton;
40class KColorButton;
41
42namespace KSpread
43{
44class Sheet;
45class View;
46
47class parameterLocale : public TQObject
48{
49 TQ_OBJECT
50
51public:
52 parameterLocale( View* _view,TQVBox *box, char *name = 0);
53 void apply();
54public slots:
55 void updateDefaultSystemConfig();
56 protected:
60 void updateToMatchLocale(TDELocale* locale);
61
62 TQLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number;
63 TQPushButton *m_updateButton;
64 View* m_pView;
65 bool m_bUpdateLocale;
66};
67
68class configure : public TQObject
69{
70 TQ_OBJECT
71
72public:
73 configure( View* _view,TQVBox *box, char *name = 0 );
74 void apply();
75 void slotDefault();
76protected:
77 View* m_pView;
78 KIntNumInput *nbPage;
79 KIntNumInput* nbRecentFile;
80 KIntNumInput* autoSaveDelay;
81 TQCheckBox *showVScrollBar;
82 TQCheckBox *showHScrollBar;
83 TQCheckBox *showColHeader;
84 TQCheckBox *showRowHeader;
85 TQCheckBox *showTabBar;
86 TQCheckBox *showFormulaBar;
87 TQCheckBox *showStatusBar;
88 TQCheckBox *m_createBackupFile;
89 bool m_oldBackupFile;
90
91 TDEConfig* config;
92 int oldRecent;
93 int oldAutoSaveValue;
94} ;
95
96
97class miscParameters : public TQObject
98{
99 TQ_OBJECT
100
101public:
102 miscParameters( View* _view, TQVBox *box, char *name = 0 );
103 void apply();
104 void slotDefault();
105
106 void initComboBox();
107
108public slots:
109 void slotTextComboChanged(const TQString &);
110
111protected:
112 View* m_pView;
113 KDoubleNumInput *valIndent;
114
118 KoUnit::Unit indentUnit;
119 TDEConfig* config;
120 TQComboBox *typeCompletion;
121 TQComboBox *typeCalc;
122 TQComboBox *typeOfMove;
123 TQCheckBox *msgError;
124 KIntNumInput* m_undoRedoLimit;
125 bool comboChanged;
126 int m_oldNbRedo;
127} ;
128
129class colorParameters : public TQObject
130{
131 TQ_OBJECT
132
133public:
134 colorParameters( View* _view, TQVBox *box, char *name = 0 );
135 void apply();
136 void slotDefault();
137protected:
138 View* m_pView;
139 KColorButton* gridColor;
140 KColorButton* pageBorderColor;
141 TDEConfig* config;
142} ;
143
144class configureLayoutPage : public TQObject
145{
146 TQ_OBJECT
147
148public:
149 configureLayoutPage( View* _view,TQVBox *box, char *name = 0 );
150 void apply();
151 void slotDefault();
152 void initCombo();
153protected:
154 View* m_pView;
155 TQComboBox *defaultOrientationPage;
156 TQComboBox *defaultSizePage;
157 TQComboBox *defaultUnit;
158 //store old config
159 int paper;
160 int orientation;
161 int unit;
162
163 TDEConfig* config;
164} ;
165
166class configureSpellPage : public TQObject
167{
168 TQ_OBJECT
169
170public:
171 configureSpellPage( View* _view, TQVBox *box, char *name = 0 );
172 void apply();
173 void slotDefault();
174protected:
175 View * m_pView;
176 TDEConfig * config;
177 KSpellConfig *m_spellConfigWidget;
178 TQCheckBox *dontCheckUpperWord;
179 TQCheckBox *dontCheckTitleCase;
180} ;
181
182class configureTTSPage : public TQObject
183{
184 TQ_OBJECT
185
186public:
187 configureTTSPage( View *_view, TQVBox *box, char *name = 0 );
188 void slotDefault();
189 void apply();
190private slots:
191 void screenReaderOptionChanged();
192private:
193 TDEConfig* config;
194 TQCheckBox* m_cbSpeakPointerWidget;
195 TQCheckBox* m_cbSpeakFocusWidget;
196 TQVGroupBox* m_gbScreenReaderOptions;
197 TQCheckBox* m_cbSpeakTooltips;
198 TQCheckBox* m_cbSpeakWhatsThis;
199 TQCheckBox* m_cbSpeakDisabled;
200 TQCheckBox* m_cbSpeakAccelerators;
201 TQLabel* m_lblAcceleratorPrefix;
202 TQLineEdit* m_leAcceleratorPrefixWord;
203 KIntNumInput* m_iniPollingInterval;
204};
205
206class PreferenceDialog : public KDialogBase
207{
208 TQ_OBJECT
209
210public:
211 enum { KS_PREFERENCES = 1, KS_LOCALE = 2, KS_INTERFACE = 4,
212 KS_MISC = 8, KS_COLOR = 16, KS_LAYOUT = 32, KS_SPELLING = 64 };
213 PreferenceDialog( View* parent, const char* name);
214public slots:
215 void slotApply();
216 void slotDefault();
217 void openPage(int flags);
218private :
219 View* m_pView;
220 configure * _configure;
221 miscParameters *_miscParameter;
222 colorParameters *_colorParameter;
223 configureLayoutPage *_layoutPage;
224 configureSpellPage *_spellPage;
225 parameterLocale *_localePage;
226 configureTTSPage *_ttsPage;
227};
228
229} // namespace KSpread
230
231#endif
The View class displays a KSpread document.
The KSpread namespace.
Definition commands.h:39