kformulaconfigpage.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
3 Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
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 kfconfigpages_h
22#define kfconfigpages_h
23
24#include <tqfont.h>
25#include <tqvaluevector.h>
26
27#include <kdialogbase.h>
28
29#include "kformuladefs.h"
30
31class TQButtonGroup;
32class TQCheckBox;
33class TQColor;
34class TQGridLayout;
35class TQLabel;
36class TQPushButton;
37class TQSpinBox;
38class TQStringList;
39class TQWidget;
40
41class KColorButton;
42class TDEConfig;
43class TDEListView;
44class KPushButton;
45class KIntNumInput;
46
47KFORMULA_NAMESPACE_BEGIN
48
49
50class Document;
51
52class KOFORMULA_EXPORT ConfigurePage : public TQObject
53{
54 TQ_OBJECT
55
56public:
57
58 ConfigurePage( Document* document, TQWidget* view, TDEConfig* config, TQVBox* box, char* name = 0 );
59 void apply();
60 void slotDefault();
61
62protected:
63
64 bool selectFont( TQFont & );
65
66protected slots:
67
68 void syntaxHighlightingClicked();
69 void selectNewDefaultFont();
70 void selectNewNameFont();
71 void selectNewNumberFont();
72 void selectNewOperatorFont();
73
74 void baseSizeChanged( int value );
75 void slotChanged();
76
77private:
78
79 TQPushButton* buildFontLine( TQWidget* fontWidget, TQGridLayout* layout, int number,
80 TQFont font, TQString name, TQLabel*& fontName );
81
82 void updateFontLabel( TQFont font, TQLabel* label );
83
84 Document* m_document;
85 TQWidget* m_view;
86 TDEConfig* m_config;
87
88 TQFont defaultFont;
89 TQFont nameFont;
90 TQFont numberFont;
91 TQFont operatorFont;
92
93 KIntNumInput* sizeSpin;
94
95 TQLabel* defaultFontName;
96 TQLabel* nameFontName;
97 TQLabel* numberFontName;
98 TQLabel* operatorFontName;
99
100// KColorButton* defaultColorBtn;
101// KColorButton* numberColorBtn;
102// KColorButton* operatorColorBtn;
103// KColorButton* emptyColorBtn;
104// KColorButton* errorColorBtn;
105 TQCheckBox* syntaxHighlighting;
106
107 bool m_changed;
108};
109
110
111// class MathFontsConfigurePage : public TQObject
112// {
113// TQ_OBJECT
114//
115// public:
116
117// MathFontsConfigurePage( Document* document, TQWidget* view, TDEConfig* config, TQVBox* box, char* name = 0 );
118// void apply();
119// void slotDefault();
120
121// TQValueVector<TQString>::iterator findUsedFont( TQString name );
122
123// protected slots:
124
125// void slotAddFont();
126// void slotRemoveFont();
127// void slotMoveUp();
128// void slotMoveDown();
129
130// private:
131
132// void setupLists( const TQStringList& usedFonts );
133
134// Document* m_document;
135// TQWidget* m_view;
136// TDEConfig* m_config;
137
138// TDEListView* availableFonts;
139// TDEListView* requestedFonts;
140
141// KPushButton* addFont;
142// KPushButton* removeFont;
143// KPushButton* moveUp;
144// KPushButton* moveDown;
145
146// TQValueVector<TQString> usedFontList;
147// };
148
149
150KFORMULA_NAMESPACE_END
151
152#endif // kfconfigpages_h
A document that can contain a lot of formulas (container).