karbon

vconfiguredlg.h
1/* This file is part of the KDE project
2 Copyright (C) 2002, Laurent Montel <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 __VCONFIGUREDLG_H__
21#define __VCONFIGUREDLG_H__
22
23
24#include <kdialogbase.h>
25
26class KarbonView;
27class TDEConfig;
28class KIntNumInput;
29class KColorButton;
30class KoUnitDoubleSpinBox;
31class TQCheckBox;
32class TQComboBox;
33
34class VConfigInterfacePage : public TQObject
35{
36 TQ_OBJECT
37
38
39public:
40 VConfigInterfacePage(
41 KarbonView* view, TQVBox *box = 0L, char* name = 0L );
42
43 void apply();
44
45public slots:
46 void slotDefault();
47
48private:
49 KarbonView* m_view;
50 TDEConfig* m_config;
51
52 KIntNumInput* m_recentFiles;
53 int m_oldRecentFiles;
54
55 TQCheckBox* m_showStatusBar;
56
57 KIntNumInput* m_copyOffset;
58 int m_oldCopyOffset;
59
60 KIntNumInput* m_dockerFontSize;
61 int m_oldDockerFontSize;
62};
63
64
65class VConfigMiscPage : public TQObject
66{
67 TQ_OBJECT
68
69
70public:
71 VConfigMiscPage(
72 KarbonView* view, TQVBox* box, char* name = 0L );
73
74 void apply();
75
76signals:
77 void unitChanged( int );
78
79public slots:
80 void slotDefault();
81
82private:
83 KarbonView* m_view;
84 TDEConfig* m_config;
85
86 KIntNumInput* m_undoRedo;
87 int m_oldUndoRedo;
88 int m_oldUnit;
89 TQComboBox *m_unit;
90};
91
92class VConfigDefaultPage : public TQObject
93{
94 TQ_OBJECT
95
96
97public:
98 VConfigDefaultPage(
99 KarbonView* view, TQVBox* box, char* name = 0L );
100
101 void apply();
102
103public slots:
104 void slotDefault();
105
106private:
107 KarbonView* m_view;
108 TDEConfig* m_config;
109
110 KIntNumInput* m_autoSave;
111 int m_oldAutoSave;
112 TQCheckBox *m_createBackupFile;
113 bool m_oldBackupFile;
114 TQCheckBox *m_saveAsPath;
115 bool m_oldSaveAsPath;
116};
117
118class VConfigGridPage : public TQObject
119{
120 TQ_OBJECT
121
122
123public:
124 VConfigGridPage(
125 KarbonView* view, TQVBox* box, char* name = 0L );
126
127 void apply();
128
129public slots:
130 void slotDefault();
131 void slotUnitChanged( int );
132
133protected slots:
134 void setMaxHorizSnap( double v );
135 void setMaxVertSnap( double v );
136
137private:
138 KarbonView* m_view;
139 KoUnitDoubleSpinBox* m_spaceHorizUSpin;
140 KoUnitDoubleSpinBox* m_spaceVertUSpin;
141 KoUnitDoubleSpinBox* m_snapHorizUSpin;
142 KoUnitDoubleSpinBox* m_snapVertUSpin;
143 TQCheckBox* m_gridChBox;
144 TQCheckBox* m_snapChBox;
145 KColorButton* m_gridColorBtn;
146};
147
148class VConfigureDlg : public KDialogBase
149{
150 TQ_OBJECT
151
152
153public:
154 VConfigureDlg( KarbonView* parent );
155
156public slots:
157 void slotApply();
158 void slotDefault();
159
160private:
161 VConfigInterfacePage* m_interfacePage;
162 VConfigMiscPage* m_miscPage;
163 VConfigGridPage* m_gridPage;
164 VConfigDefaultPage* m_defaultDocPage;
165};
166
167#endif
168