summaryrefslogtreecommitdiffstats
path: root/kbfxlib/common/kbfxconfig.h
blob: 13b8456320f48e74bb8f75f3a7d0bc15d01b4c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
/*
 *   Copyright (C) 2006
 *   Siraj Razick <[email protected]>
 *   PhobosK <[email protected]>
 *   see Also AUTHORS
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU Library General Public License version 2 as
 *   published by the Free Software Foundation
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details
 *
 *   You should have received a copy of the GNU Library General Public
 *   License along with this program; if not, write to the
 *   Free Software Foundation, Inc.,
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

#ifndef KBFX_CONFIG_H
#define KBFX_CONFIG_H

#include <config.h>

#include <tqcolor.h>
#include <tqfile.h>
#include <tqfileinfo.h>
#include <tqfont.h>
#include <tqpixmap.h>
#include <tqstring.h>

#include <tdeapplication.h>
#include <tdeconfig.h>
#include <tdeconfigskeleton.h>
#include <kdebug.h>
#include <tdeglobal.h>
#include <kiconloader.h>
#include <tdelocale.h>
#include <kstandarddirs.h>
#include <kuser.h>

#include <kbfxplasmapixmapprovider.h>

class KbfxConfig
{
	public:
		void read();
		void readFontrc ( TQString &themePath, TQString &themeName, bool user_rc=TRUE );
		void readThemerc ( TQString &themePath, TQString &themeName, bool user_rc=TRUE );
		void readThemeInfo ( TQString &themePath, TQString &themeName );
		void setDefault();
		void setThemeDefault();
		void setFontsDefault();
		void setThemeInfoDefault();
		void write();
		void writeFontrc ( TQString &themeName );
		void writeThemerc ( TQString &themeName );
		void checkValues();

		/* Theme info resources */
		TQString m_InfoVersion;
		TQString m_InfoVersionDefault;
		TQString m_InfoAuthor;
		TQString m_InfoAuthorDefault;
		TQString m_InfoEmail;
		TQString m_InfoEmailDefault;
		TQString m_InfoUrl;
		TQString m_InfoUrlDefault;

		/* kbfx_menu_button config items list */
		TQString m_KbfxThemesVersion;
		TQString KbfxThemeRcDestination;
		TQString KbfxRcPath;
		TQPixmap KbfxOnImg;
		TQPixmap KbfxOffImg;
		int m_KbfxGeneralVersion;
		int m_KbfxGeneralVersionDefault;
		TQString m_KbfxNormalButtonPath;
		TQString m_KbfxNormalButtonPathDefault;
		TQString m_KbfxHoverButtonPath;
		TQString m_KbfxHoverButtonPathDefault;
		TQString m_KbfxPressedButtonPath;
		TQString m_KbfxPressedButtonPathDefault;
		TQString m_KbfxMouseOverAnimationPath;
		TQString m_KbfxMouseOverAnimationPathDefault;
		TQColor m_KbfxButtonColor;
		TQColor m_KbfxButtonColorDefault;
		int m_KbfxButtonSize;
		int m_KbfxButtonSizeDefault;
		bool m_KbfxButtonGlow;
		bool m_KbfxButtonGlowDefault;
		bool m_KbfxButtonKikerResize;
		bool m_KbfxButtonKikerResizeDefault;
		TQString m_KbfxMenuType;
		TQString m_KbfxMenuTypeDefault;

		/* spinx config items list */
		TQString m_SpinxThemeBasePath;
		TQString m_SpinxThemeBasePathDefault;
		TQString m_UserSpinxThemeBasePath;
		TQString m_UserSpinxThemeBasePathDefault;
		bool m_SpinxDudeBlink;
		bool m_SpinxDudeBlinkDefault;
		TQString m_SpinxDudeImage;
		TQString m_SpinxDudeImageDefault;
		TQString m_SpinxThemeName;
		TQString m_SpinxThemeNameDefault;
		bool m_ToolBarResize;
		bool m_ToolBarResizeDefault;
		bool m_KbfxWatcher;
		bool m_KbfxWatcherDefault;
		bool m_KbfxShowOldThemes;
		bool m_KbfxShowOldThemesDefault;


		/* tooltip options list */
		bool m_ToolTipAnimation;
		bool m_ToolTipAnimationDefault;
		bool m_ToolTip;
		bool m_ToolTipDefault;
		TQString m_ToolTipText;
		TQString m_ToolTipTextDefault;
		TQString m_ToolTipAvatar;
		TQString m_ToolTipAvatarDefault;
		TQString m_SpinxTooltipDudebox;
		TQString m_SpinxTooltipDudeboxDefault;
		TQString m_SpinxTooltipMask;
		TQString m_SpinxTooltipMaskDefault;
		TQString m_SpinxTooltipWindow;
		TQString m_SpinxTooltipWindowDefault;
		TQString m_SpinxTooltipLogo;
		TQString m_SpinxTooltipLogoDefault;

		TQString m_KbfxHistory;
		TQString m_KbfxHistoryDefault;

		/* font settings */
		TQColor m_fontTooltipColor;
		TQColor m_fontTooltipColorDefault;
		TQFont m_fontTooltipFont;
		TQFont m_fontTooltipFontDefault;
		TQColor m_fontAppNameColor;
		TQColor m_fontAppNameColorDefault;
		TQFont m_fontAppNameFont;
		TQFont m_fontAppNameFontDefault;
		TQColor m_fontAppCommentColor;
		TQColor m_fontAppCommentColorDefault;
		TQFont m_fontAppCommentFont;
		TQFont m_fontAppCommentFontDefault;
		TQColor m_lineColor;
		TQColor m_lineColorDefault;
		TQColor m_fontIndexColor;
		TQColor m_fontIndexColorDefault;
		TQFont m_fontIndexFont;
		TQFont m_fontIndexFontDefault;
		TQColor m_userImageColor;
		TQColor m_userImageColorDefault;
		TQColor m_userNameColor;
		TQColor m_userNameColorDefault;
		TQFont m_userNameFont;
		TQFont m_userNameFontDefault;
		TQColor m_sepNameColor;
		TQColor m_sepNameColorDefault;
		TQFont m_sepNameFont;
		TQFont m_sepNameFontDefault;
		TQColor m_pluginNameColor;
		TQColor m_pluginNameColorDefault;
		TQFont m_pluginNameFont;
		TQFont m_pluginNameFontDefault;
		bool m_fontHoverBold;
		bool m_fontHoverBoldDefault;

		/* history */
		TQStringList m_pluginsLeft;
		TQStringList m_pluginsLeftDefault;
		TQStringList m_pluginsRight;
		TQStringList m_pluginsRightDefault;

		/* layout */
		int m_facePos_x;
		int m_facePos_xDefault;
		int m_facePos_y;
		int m_facePos_yDefault;
		int m_userNamePos_x;
		int m_userNamePos_xDefault;
		int m_userNamePos_y;
		int m_userNamePos_yDefault;
		bool m_faceBoxHideText;
		bool m_faceBoxHideTextDefault;
		int m_userMenuHeight;
		int m_userMenuHeightDefault;
		int m_userMenuWidth;
		int m_userMenuWidthDefault;

		int m_topBar_x;
		int m_topBar_xDefault;
		int m_topBar_y;
		int m_topBar_yDefault;
		int m_topBar_h;
		int m_topBar_hDefault;
		int m_topBar_w;
		int m_topBar_wDefault;

		int m_botBar_x;
		int m_botBar_xDefault;
		int m_botBar_y;
		int m_botBar_yDefault;
		int m_botBar_h;
		int m_botBar_hDefault;
		int m_botBar_w;
		int m_botBar_wDefault;

		int m_scrollBarTopX;
		int m_scrollBarTopXDefault;
		int m_scrollBarTopY;
		int m_scrollBarTopYDefault;
		int m_scrollBarBotX;
		int m_scrollBarBotXDefault;
		int m_scrollBarBotY;
		int m_scrollBarBotYDefault;

		int m_listBox_x;
		int m_listBox_xDefault;
		int m_listBox_y;
		int m_listBox_yDefault;
		int m_listBox_w;
		int m_listBox_wDefault;
		int m_listBox_h;
		int m_listBox_hDefault;

		int m_searchBox_x;
		int m_searchBox_xDefault;
		int m_searchBox_y;
		int m_searchBox_yDefault;
		int m_searchBox_w;
		int m_searchBox_wDefault;
		int m_searchBox_h;
		int m_searchBox_hDefault;
		bool m_searchBox_static;
		bool m_searchBox_staticDefault;

		int m_itemView_x;
		int m_itemView_xDefault;
		int m_itemView_y;
		int m_itemView_yDefault;
		int m_itemView_h;
		int m_itemView_hDefault;
		int m_itemView_w;
		int m_itemView_wDefault;

		int m_fadeTime;
		int m_fadeTimeDefault;

		/* toolbar */
		int m_toolBarButtonNormalSizeDefault;
		int m_toolBarButtonNormalSize;
		int m_toolBarButtonExpandSizeDefault;
		int m_toolBarButtonExpandSize;

		/* Face Icon */
		int m_faceIconX;
		int m_faceIconXDefault;
		int m_faceIconY;
		int m_faceIconYDefault;
		int m_faceIconH;
		int m_faceIconHDefault;
		int m_faceIconW;
		int m_faceIconWDefault;

		/* element controll */
		int m_iconSize;
		int m_iconSizeDefault;
		bool m_noComments;
		bool m_noCommentsDefault;
		int m_commentMargine;
		int m_commentMargineDefault;
		/* states */
		bool m_startHidden;
		bool m_startHiddenDefault;

		bool m_KbfxDeleteOldConf;

	private:
		KbfxConfig();
		KbfxConfig ( const KbfxConfig& );

		friend KbfxConfig& ConfigInit();
};

KbfxConfig & ConfigInit();

#endif