summaryrefslogtreecommitdiffstats
path: root/configdialog/kbfxconfigdlglayout.ui.h
blob: b8a4d551ef4e6dc5addeeb2b40fd0b9f43c32bcc (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
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
*****************************************************************************/

void KbfxConfigDlgLayout::init()
{
	KbfxLayoutProperty->clear();
	KbfxLayoutProperty->insertItem ( tr2i18n ( "User Properties" ) );			// index = 0
	KbfxLayoutProperty->insertItem ( tr2i18n ( "* Top Bar Properties" ) );		// index = 1
	KbfxLayoutProperty->insertItem ( tr2i18n ( "* Bottom Bar Properties" ) );		// index = 2
//	KbfxLayoutProperty->insertItem ( tr2i18n ( "Scroll Bar Properties" ) );		// index = 3
	KbfxLayoutProperty->insertItem ( tr2i18n ( "* List Box Properties" ) );		// index = 4
	KbfxLayoutProperty->insertItem ( tr2i18n ( "Search Box Properties" ) );		// index = 5
	KbfxLayoutProperty->insertItem ( tr2i18n ( "* Item Properties" ) );			// index = 6
//	KbfxLayoutProperty->insertItem ( tr2i18n ( "Tool Bar Properties" ) );		// index = 7
	KbfxLayoutProperty->insertItem ( tr2i18n ( "* Main Menu Properties" ) );		// index = 8
}

void KbfxConfigDlgLayout::ChangeForm()
{
	KbfxTheme->setText ( "<p align=left><b>" + ConfigInit().m_SpinxThemeName + "</b></p>" );
	KbfxLayoutProperty->setCurrentItem ( 0 );
	previous_state = -1;
	KbfxLayoutProperty_activated ( 0 );
}

void KbfxConfigDlgLayout::KbfxLayoutProperty_activated( int index )
{
	switch ( previous_state )
	{
		case 0: /* User Properties */
		{
			ConfigInit().m_facePos_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_facePos_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_userNamePos_x = ( lineEdit3->text () ).toInt();
			ConfigInit().m_userNamePos_y = ( lineEdit4->text () ).toInt();
			ConfigInit().m_faceIconX = ( lineEdit5->text () ).toInt();
			ConfigInit().m_faceIconY = ( lineEdit6->text () ).toInt();
			ConfigInit().m_faceIconH = ( lineEdit7->text () ).toInt();
			ConfigInit().m_faceIconW = ( lineEdit8->text () ).toInt();
			ConfigInit().m_faceBoxHideText = checkBox1->isChecked ();
			kdDebug() << "User Properties VALUES: "
			<< endl  << ConfigInit().m_facePos_x
			<< endl  << ConfigInit().m_facePos_y
			<< endl  << ConfigInit().m_userNamePos_x
			<< endl  << ConfigInit().m_userNamePos_y
			<< endl  << ConfigInit().m_faceIconX
			<< endl  << ConfigInit().m_faceIconY
			<< endl  << ConfigInit().m_faceIconH
			<< endl  << ConfigInit().m_faceIconW
			<< endl  << ConfigInit().m_faceBoxHideText
			<< endl;
			break;
		}
		case 1: /* Top Bar Properties */
		{
/*
			ConfigInit().m_topBar_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_topBar_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_topBar_h = ( lineEdit5->text () ).toInt();
			ConfigInit().m_topBar_w = ( lineEdit6->text () ).toInt();
*/
			ConfigInit().m_topBar_h = ( lineEdit1->text () ).toInt();
			ConfigInit().m_topBar_w = ( lineEdit5->text () ).toInt();
			kdDebug() << "Top Bar Properties VALUES: "
//			<< endl  << ConfigInit().m_topBar_x
//			<< endl  << ConfigInit().m_topBar_y
			<< endl  << ConfigInit().m_topBar_h
			<< endl  << ConfigInit().m_topBar_w
			<< endl;
			break;
		}
		case 2: /* Bottom Bar Properties */
		{
/*
			ConfigInit().m_botBar_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_botBar_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_botBar_h = ( lineEdit5->text () ).toInt();
			ConfigInit().m_botBar_w = ( lineEdit6->text () ).toInt();
*/
			ConfigInit().m_botBar_h = ( lineEdit1->text () ).toInt();
			ConfigInit().m_botBar_w = ( lineEdit5->text () ).toInt();
			kdDebug() << "Bottom Bar Properties VALUES: "
//			<< endl  << ConfigInit().m_botBar_x
//			<< endl  << ConfigInit().m_botBar_y
			<< endl  << ConfigInit().m_botBar_h
			<< endl  << ConfigInit().m_botBar_w
			<< endl;
			break;
		}

/*
		case 3: // Scroll Bar Properties
		{
			ConfigInit().m_scrollBarTopX = ( lineEdit1->text () ).toInt();
			ConfigInit().m_scrollBarTopY = ( lineEdit2->text () ).toInt();
			ConfigInit().m_scrollBarBotX = ( lineEdit5->text () ).toInt();
			ConfigInit().m_scrollBarBotY = ( lineEdit6->text () ).toInt();
			kdDebug() << "Scroll Bar Properties VALUES: "
			<< endl  << ConfigInit().m_scrollBarTopX
			<< endl  << ConfigInit().m_scrollBarTopY
			<< endl  << ConfigInit().m_scrollBarBotX
			<< endl  << ConfigInit().m_scrollBarBotY
			<< endl;
			break;
		}
*/

		case 3: /* List Box Properties */
		{
			ConfigInit().m_listBox_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_listBox_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_listBox_h = ( lineEdit5->text () ).toInt();
			ConfigInit().m_listBox_w = ( lineEdit6->text () ).toInt();
			kdDebug() << "List Box Properties VALUES: "
			<< endl  << ConfigInit().m_listBox_x
			<< endl  << ConfigInit().m_listBox_y
			<< endl  << ConfigInit().m_listBox_h
			<< endl  << ConfigInit().m_listBox_w
			<< endl;
			break;
		}
		case 4: /* Search Box Properties */
		{
			ConfigInit().m_searchBox_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_searchBox_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_searchBox_h = ( lineEdit5->text () ).toInt();
			ConfigInit().m_searchBox_w = ( lineEdit6->text () ).toInt();
			kdDebug() << "Search Box Properties VALUES: "
			<< endl  << ConfigInit().m_searchBox_x
			<< endl  << ConfigInit().m_searchBox_y
			<< endl  << ConfigInit().m_searchBox_h
			<< endl  << ConfigInit().m_searchBox_w
			<< endl;
			break;
		}
		case 5: /* Item Properties */
		{
			ConfigInit().m_itemView_x = ( lineEdit1->text () ).toInt();
			ConfigInit().m_itemView_y = ( lineEdit2->text () ).toInt();
			ConfigInit().m_iconSize = ( lineEdit3->text () ).toInt();
			ConfigInit().m_itemView_h = ( lineEdit5->text () ).toInt();
			ConfigInit().m_itemView_w = ( lineEdit6->text () ).toInt();
			ConfigInit().m_commentMargine = ( lineEdit7->text () ).toInt();
			ConfigInit().m_noComments = checkBox1->isChecked ();
			kdDebug() << "Item Properties VALUES: "
			<< endl  << ConfigInit().m_itemView_x
			<< endl  << ConfigInit().m_itemView_y
			<< endl  << ConfigInit().m_iconSize
			<< endl  << ConfigInit().m_itemView_h
			<< endl  << ConfigInit().m_itemView_w
			<< endl  << ConfigInit().m_commentMargine
			<< endl  << ConfigInit().m_noComments
			<< endl;
			break;
		}
/*
		case 6: // Tool Bar Properties
		{
			ConfigInit().m_toolBarButtonNormalSize = ( lineEdit1->text () ).toInt();
			ConfigInit().m_toolBarButtonExpandSize = ( lineEdit5->text () ).toInt();
			kdDebug() << "Tool Bar Properties VALUES: "
			<< endl  << ConfigInit().m_toolBarButtonNormalSize
			<< endl  << ConfigInit().m_toolBarButtonExpandSize
			<< endl;
			break;
		}
*/
		case 6: /* Main Menu Properties */
		{
			ConfigInit().m_userMenuHeight = ( lineEdit1->text () ).toInt();
			ConfigInit().m_userMenuWidth = ( lineEdit5->text () ).toInt();
			ConfigInit().m_startHidden = checkBox1->isChecked ();
			kdDebug() << "Main Menu Properties VALUES: "
			<< endl  << ConfigInit().m_userMenuHeight
			<< endl  << ConfigInit().m_userMenuWidth
			<< endl  << ConfigInit().m_startHidden
			<< endl;
			break;
		}
		default: /* default action switch does nothing */
			kdDebug() << "Default action switch for saving layout changed..." << endl;
	}

	KbfxShowAll ();
	switch ( index )
	{
		case 0: /* User Properties */
		{
			textLabel1->setText ( tr2i18n ( "Face Position X" ) );
			textLabel2->setText ( tr2i18n ( "Face Position Y" ) );
			textLabel3->setText ( tr2i18n ( "User Name Position X" ) );
			textLabel4->setText ( tr2i18n ( "User Name Position Y" ) );
			textLabel5->setText ( tr2i18n ( "Face Box Position X" ) );
			textLabel6->setText ( tr2i18n ( "Face Box Position Y" ) );
			textLabel7->setText ( tr2i18n ( "Face Box Height" ) );
			textLabel8->setText ( tr2i18n ( "Face Box Width" ) );
			checkBox1->setText ( tr2i18n ( "Hide User Name" ) );
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_facePos_x ) );
			lineEdit2->setText ( TQString::number ( ConfigInit().m_facePos_y ) );
			lineEdit3->setText ( TQString::number ( ConfigInit().m_userNamePos_x ) );
			lineEdit4->setText ( TQString::number ( ConfigInit().m_userNamePos_y ) );
			lineEdit5->setText ( TQString::number ( ConfigInit().m_faceIconX ) );
			lineEdit6->setText ( TQString::number ( ConfigInit().m_faceIconY ) );
			lineEdit7->setText ( TQString::number ( ConfigInit().m_faceIconH ) );
			lineEdit8->setText ( TQString::number ( ConfigInit().m_faceIconW ) );
			checkBox1->setChecked ( ConfigInit().m_faceBoxHideText );
			previous_state = 0;
			break;
		}
		case 1: /* Top Bar Properties */
		{
//			textLabel1->setText ( tr2i18n ( "Top Bar Position X" ) );
//			textLabel2->setText ( tr2i18n ( "Top Bar Position Y" ) );
			textLabel1->setText ( tr2i18n ( "* Top Bar Height" ) );
			textLabel2->hide();
			textLabel3->hide();
			textLabel4->hide();
//			textLabel5->setText ( tr2i18n ( "Top Bar Height" ) );
//			textLabel6->setText ( tr2i18n ( "Top Bar Width" ) );
			textLabel5->setText ( tr2i18n ( "Top Bar Width" ) );
			textLabel6->hide();
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
//			lineEdit1->setText ( TQString::number ( ConfigInit().m_topBar_x ) );
//			lineEdit2->setText ( TQString::number ( ConfigInit().m_topBar_y ) );
			lineEdit1->setText ( TQString::number ( ConfigInit().m_topBar_h ) );
			lineEdit2->hide();
			lineEdit3->hide();
			lineEdit4->hide();
//			lineEdit5->setText ( TQString::number ( ConfigInit().m_topBar_h ) );
//			lineEdit6->setText ( TQString::number ( ConfigInit().m_topBar_w ) );
			lineEdit5->setText ( TQString::number ( ConfigInit().m_topBar_w ) );
			lineEdit6->hide();
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 1;
			break;
		}
		case 2: /* Bottom Bar Properties */
		{
//			textLabel1->setText ( tr2i18n ( "Bottom Bar Position X" ) );
//			textLabel2->setText ( tr2i18n ( "Bottom Bar Position Y" ) );
			textLabel1->setText ( tr2i18n ( "* Bottom Bar Height" ) );
			textLabel2->hide();
			textLabel3->hide();
			textLabel4->hide();
//			textLabel5->setText ( tr2i18n ( "Bottom Bar Height" ) );
//			textLabel6->setText ( tr2i18n ( "Bottom Bar Width" ) );
			textLabel5->setText ( tr2i18n ( "Bottom Bar Width" ) );
			textLabel6->hide();
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
//			lineEdit1->setText ( TQString::number ( ConfigInit().m_botBar_x ) );
//			lineEdit2->setText ( TQString::number ( ConfigInit().m_botBar_y ) );
			lineEdit1->setText ( TQString::number ( ConfigInit().m_botBar_h ) );
			lineEdit2->hide();
			lineEdit3->hide();
			lineEdit4->hide();
//			lineEdit5->setText ( TQString::number ( ConfigInit().m_botBar_h ) );
//			lineEdit6->setText ( TQString::number ( ConfigInit().m_botBar_w ) );
			lineEdit5->setText ( TQString::number ( ConfigInit().m_botBar_w ) );
			lineEdit6->hide();
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 2;
			break;
		}

/*
		case 3: // Scroll Bar Properties
		{
			textLabel1->setText ( tr2i18n ( "Top Scroll Bar Position X" ) );
			textLabel2->setText ( tr2i18n ( "Top Scroll Bar Position Y" ) );
			textLabel3->hide();
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "Bottom Scroll Bar Position X" ) );
			textLabel6->setText ( tr2i18n ( "Bottom Scroll Bar Position Y" ) );
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_scrollBarTopX ) );
			lineEdit2->setText ( TQString::number ( ConfigInit().m_scrollBarTopY ) );
			lineEdit3->hide();
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_scrollBarBotX ) );
			lineEdit6->setText ( TQString::number ( ConfigInit().m_scrollBarBotY ) );
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 3;
			break;
		}
*/

		case 3: /* List Box Properties */
		{
			textLabel1->setText ( tr2i18n ( "* List Box Position X" ) );
			textLabel2->setText ( tr2i18n ( "* List Box Position Y" ) );
			textLabel3->hide();
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "List Box Height" ) );
			textLabel6->setText ( tr2i18n ( "* List Box Width" ) );
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_listBox_x ) );
			lineEdit2->setText ( TQString::number ( ConfigInit().m_listBox_y ) );
			lineEdit3->hide();
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_listBox_h ) );
			lineEdit6->setText ( TQString::number ( ConfigInit().m_listBox_w ) );
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 3;
			break;
		}
		case 4: /* Search Box Properties */
		{
			textLabel1->setText ( tr2i18n ( "Search Box Position X" ) );
			textLabel2->setText ( tr2i18n ( "Search Box Position Y" ) );
			textLabel3->hide();
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "Search Box Height" ) );
			textLabel6->setText ( tr2i18n ( "Search Box Width" ) );
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_searchBox_x ) );
			lineEdit2->setText ( TQString::number ( ConfigInit().m_searchBox_y ) );
			lineEdit3->hide();
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_searchBox_h ) );
			lineEdit6->setText ( TQString::number ( ConfigInit().m_searchBox_w ) );
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 4;
			break;
		}
		case 5: /* Item Properties */
		{
			textLabel1->setText ( tr2i18n ( "* Item Position X" ) );
			textLabel2->setText ( tr2i18n ( "* Item Position Y" ) );
			textLabel3->setText ( tr2i18n ( "Icon Size in Item" ) );
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "Item Height" ) );
			textLabel6->setText ( tr2i18n ( "* Item Width" ) );
			textLabel7->setText ( tr2i18n ( "Comment Margin in Item" ) );
			textLabel8->hide();
			checkBox1->setText ( tr2i18n ( "No Comments in Item" ) );
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_itemView_x ) );
			lineEdit2->setText ( TQString::number ( ConfigInit().m_itemView_y ) );
			lineEdit3->setText ( TQString::number ( ConfigInit().m_iconSize ) );
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_itemView_h ) );
			lineEdit6->setText ( TQString::number ( ConfigInit().m_itemView_w ) );
			lineEdit7->setText ( TQString::number ( ConfigInit().m_commentMargine ) );
			lineEdit8->hide();
			checkBox1->setChecked ( ConfigInit().m_noComments );
			previous_state = 5;
			break;
		}
/*
		case 6: // Tool Bar Properties
		{
			textLabel1->setText ( tr2i18n ( "Tool Bar Button Normal Size" ) );
			textLabel2->hide();
			textLabel3->hide();
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "Tool Bar Button Pressed Size" ) );
			textLabel6->hide();
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->hide();
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_toolBarButtonNormalSize ) );
			lineEdit2->hide();
			lineEdit3->hide();
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_toolBarButtonExpandSize ) );
			lineEdit6->hide();
			lineEdit7->hide();
			lineEdit8->hide();
			previous_state = 6;
			break;
		}
*/
		case 6: /* Main Menu Properties */
		{
			textLabel1->setText ( tr2i18n ( "* Main Menu Height" ) );
			textLabel2->hide();
			textLabel3->hide();
			textLabel4->hide();
			textLabel5->setText ( tr2i18n ( "* Main Menu Width" ) );
			textLabel6->hide();
			textLabel7->hide();
			textLabel8->hide();
			checkBox1->setText ( tr2i18n ( "Contracted Menues" ) );
			checkBox2->hide();
			lineEdit1->setText ( TQString::number ( ConfigInit().m_userMenuHeight ) );
			lineEdit2->hide();
			lineEdit3->hide();
			lineEdit4->hide();
			lineEdit5->setText ( TQString::number ( ConfigInit().m_userMenuWidth ) );
			lineEdit6->hide();
			lineEdit7->hide();
			lineEdit8->hide();
			checkBox1->setChecked ( ConfigInit().m_startHidden );
			previous_state = 6;
			break;
		}
		default: /* default action switch should never be reached */
			kdDebug() << "Default action switch for layout changed..." << endl;
	}
}

void KbfxConfigDlgLayout::KbfxShowAll()
{
	textLabel1->show();
	textLabel2->show();
	textLabel3->show();
	textLabel4->show();
	textLabel5->show();
	textLabel6->show();
	textLabel7->show();
	textLabel8->show();
	checkBox1->show();
	checkBox2->show();
	lineEdit1->show();
	lineEdit2->show();
	lineEdit3->show();
	lineEdit4->show();
	lineEdit5->show();
	lineEdit6->show();
	lineEdit7->show();
	lineEdit8->show();
}

void KbfxConfigDlgLayout::KbfxExportFileAction()
{
	TQString KbfxExportLayoutRcDialogURL = KFileDialog::getExistingDirectory (
	                                        TQString(),
	                                        0,
	                                        tr2i18n ( "Select folder to export kbfxlayoutrc file" ) ).append ( "/kbfxlayoutrc" );

	if ( KbfxExportLayoutRcDialogURL == "/kbfxlayoutrc") return;

	kdDebug() << "Selected export file is: "
	<< KbfxExportLayoutRcDialogURL
	<< endl;

	/* write layout theme configuration file */
	KConfig *layoutconfig = new KConfig ( KbfxExportLayoutRcDialogURL );

	layoutconfig->setGroup ( "KbfxButton" );
	layoutconfig->writeEntry ( "FadeTime", ConfigInit().m_fadeTime );

/*
	// No need for this to be exported because it is user/installation specific
	layoutconfig->writeEntry ( "Normal", ConfigInit().m_KbfxNormalButtonPath );
	layoutconfig->writeEntry ( "Hover", ConfigInit().m_KbfxHoverButtonPath );
	layoutconfig->writeEntry ( "Press",  ConfigInit().m_KbfxPressedButtonPath );

	layoutconfig->setGroup ( "ToolTip" );
	layoutconfig->writeEntry ( "Avatar", m_ToolTipAvatar );
	layoutconfig->writeEntry ( "Dudebox", m_SpinxTooltipDudebox );
	layoutconfig->writeEntry ( "Mask", m_SpinxTooltipMask );
	layoutconfig->writeEntry ( "Window", m_SpinxTooltipWindow );
	layoutconfig->writeEntry ( "Logo", m_SpinxTooltipLogo );
*/

	layoutconfig->setGroup ( "TopBar" );
	layoutconfig->writeEntry ( "DudeX", ConfigInit().m_facePos_x );
	layoutconfig->writeEntry ( "DudeY", ConfigInit().m_facePos_y );
	layoutconfig->writeEntry ( "FaceX", ConfigInit().m_faceIconX );
	layoutconfig->writeEntry ( "FaceY", ConfigInit().m_faceIconY );
	layoutconfig->writeEntry ( "FaceH", ConfigInit().m_faceIconH );
	layoutconfig->writeEntry ( "FaceW", ConfigInit().m_faceIconW );
	layoutconfig->writeEntry ( "UserNameX", ConfigInit().m_userNamePos_x );
	layoutconfig->writeEntry ( "UserNameY", ConfigInit().m_userNamePos_y );
	layoutconfig->writeEntry ( "DisableUserName", ConfigInit().m_faceBoxHideText );
	layoutconfig->writeEntry ( "Height", ConfigInit().m_topBar_h );
	layoutconfig->writeEntry ( "Width", ConfigInit().m_topBar_w );
	layoutconfig->writeEntry ( "X", ConfigInit().m_topBar_x );
	layoutconfig->writeEntry ( "Y", ConfigInit().m_topBar_y );

	layoutconfig->setGroup ( "BottomBar" );
	layoutconfig->writeEntry ( "Height", ConfigInit().m_botBar_h );
	layoutconfig->writeEntry ( "Width", ConfigInit().m_botBar_w );
	layoutconfig->writeEntry ( "X", ConfigInit().m_botBar_x );
	layoutconfig->writeEntry ( "Y", ConfigInit().m_botBar_y );

	layoutconfig->setGroup ( "Scrollbars" );
	layoutconfig->writeEntry ( "ScrollBarBotX", ConfigInit().m_scrollBarBotX );
	layoutconfig->writeEntry ( "ScrollBarBotY", ConfigInit().m_scrollBarBotY );
	layoutconfig->writeEntry ( "ScrollBarTopX", ConfigInit().m_scrollBarTopX );
	layoutconfig->writeEntry ( "ScrollBarTopY", ConfigInit().m_scrollBarTopY );

	layoutconfig->setGroup ( "ListBox" );
	layoutconfig->writeEntry ( "Height", ConfigInit().m_listBox_h );
	layoutconfig->writeEntry ( "Width", ConfigInit().m_listBox_w );
	layoutconfig->writeEntry ( "X", ConfigInit().m_listBox_x );
	layoutconfig->writeEntry ( "Y", ConfigInit().m_listBox_y );

	layoutconfig->setGroup ( "SearchBox" );
	layoutconfig->writeEntry ( "Height", ConfigInit().m_searchBox_h );
	layoutconfig->writeEntry ( "Width", ConfigInit().m_searchBox_w );
	layoutconfig->writeEntry ( "X", ConfigInit().m_searchBox_x );
	layoutconfig->writeEntry ( "Y", ConfigInit().m_searchBox_y );
	layoutconfig->writeEntry ( "FixedPos", ConfigInit().m_searchBox_static );

	layoutconfig->setGroup ( "ItemView" );
	layoutconfig->writeEntry ( "Height", ConfigInit().m_itemView_h );
	layoutconfig->writeEntry ( "Width", ConfigInit().m_itemView_w );
	layoutconfig->writeEntry ( "X", ConfigInit().m_itemView_x );
	layoutconfig->writeEntry ( "Y", ConfigInit().m_itemView_y );

	layoutconfig->setGroup ( "ToolBar" );
	layoutconfig->writeEntry ( "ButtonNormalSize", ConfigInit().m_toolBarButtonNormalSize );
	layoutconfig->writeEntry ( "ButtonPressedSize", ConfigInit().m_toolBarButtonExpandSize );

	layoutconfig->setGroup ( "MainMenu" );
	layoutconfig->writeEntry ( "UserMenuHeight", ConfigInit().m_userMenuHeight );
	layoutconfig->writeEntry ( "UserMenuWidth", ConfigInit().m_userMenuWidth );
	layoutconfig->writeEntry ( "ContractedMenu", ConfigInit().m_startHidden );

	layoutconfig->setGroup ( "ItemProperties" );
	layoutconfig->writeEntry ( "NoComments", ConfigInit().m_noComments );
	layoutconfig->writeEntry ( "CommentMargin", ConfigInit().m_commentMargine );
	layoutconfig->writeEntry ( "IconSize", ConfigInit().m_iconSize );

	layoutconfig->sync();

	delete layoutconfig;

	KMessageBox::information ( 0,
	                           tr2i18n ( "<p align='center'>The Layout configuration of the KBFX Theme <strong>%1</strong> has been exported successfully!</p>" ).arg ( ConfigInit().m_SpinxThemeName ),
	                           tr2i18n ( "KBFX Layout Export Ready" ) );
}

void KbfxConfigDlgLayout::LayoutFormLeft()
{
	KbfxLayoutProperty_activated ( previous_state );
	kdDebug() << "Called Leave form... Previous state is:" << previous_state << endl;
}

void KbfxConfigDlgLayout::Kbfx2PanelsLeft_clicked()
{
	KbfxMakePanel( 0 );
}

void KbfxConfigDlgLayout::Kbfx2PanelsRight_clicked()
{
	KbfxMakePanel( 1 );
}

void KbfxConfigDlgLayout::Kbfx3Panels_clicked()
{
	KbfxMakePanel( 2 );
}

void KbfxConfigDlgLayout::KbfxMakePanel( int l_type )
{
	if ( !KbfxMessage() )
		return;

	LayoutFormLeft();
	int mid_h = ConfigInit().m_userMenuHeight - ConfigInit().m_botBar_h - ConfigInit().m_topBar_h;
	int mid_w = ConfigInit().m_userMenuWidth;

	ConfigInit().m_topBar_w = mid_w;
	ConfigInit().m_botBar_w = mid_w;
	ConfigInit().m_listBox_h = mid_h;
	ConfigInit().m_listBox_w = mid_w/4;
	ConfigInit().m_itemView_h = mid_h;
	ConfigInit().m_listBox_y = ConfigInit().m_topBar_h;
	ConfigInit().m_itemView_y = ConfigInit().m_topBar_h;

	if ( l_type == 0 )
	{
		ConfigInit().m_listBox_x = 0;
		ConfigInit().m_itemView_x = ConfigInit().m_listBox_w;
		ConfigInit().m_itemView_w = mid_w - ConfigInit().m_listBox_w;
	}

	if ( l_type == 1 )
	{
		ConfigInit().m_itemView_x = 0;
		ConfigInit().m_itemView_w = mid_w - ConfigInit().m_listBox_w;
		ConfigInit().m_listBox_x = ConfigInit().m_itemView_w;
	}

	if ( l_type == 2 )
	{
		ConfigInit().m_listBox_x = 0;
		ConfigInit().m_itemView_x = ConfigInit().m_listBox_w;
		ConfigInit().m_itemView_w = mid_w/2;
	}

	KbfxLayoutProperty->setCurrentItem ( 0 );
	previous_state = -1;
	KbfxLayoutProperty_activated ( 0 );

	KMessageBox::information ( 0,
	                           tr2i18n ( "<p align='center'>The Layout configuration of the KBFX Theme <strong>%1</strong> is ready!</p><p align='center'>Be sure to click the <strong>Apply</strong> button in order the changes to become active!</p>" ).arg ( ConfigInit().m_SpinxThemeName ),
	                           tr2i18n ( "KBFX Layout Ready" ) );
}

bool KbfxConfigDlgLayout::KbfxMessage()
{
	int messageBoxReturn = KMessageBox::warningContinueCancel ( 0,
	                   tr2i18n ( "<p align='center'>KBFX will calculate the necessary values using the present values for:</p>"
	                             "<p align='center'><strong>* Main Menu Height</strong> and <strong>* Main Menu Width</strong><br>"
	                             "<strong>* Bottom Bar Height</strong> and <strong>* Top Bar Height</strong><br></p>"
	                             "<p align='center'>So be sure that you have entered their values as you desire!</p>"
	                             "<p align='center'><strong>NOTE:</strong> Have in mind that the Layout of the theme also depends on the sizes of the images! "
	                             "So if the theme does not look like as you desire either change the images' sizes to smaller width OR change <strong>* Main Menu Width</strong> to higher value!</p>" ),
	                   tr2i18n ( "Prepare Layout for the KBFX theme" ),
	                   tr2i18n ( "Prepare" ) );

	if ( messageBoxReturn == KMessageBox::Cancel )
		return FALSE;

	return TRUE;
}