summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Prefs.cpp
blob: 72eefbab6ebd68d4e4d2014400283dfed6db5da2 (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
/****************************************************************************
** Form implementation generated from reading ui file 'Prefs.ui'
**
** Created: Tue Feb 11 23:53:35 2003
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "Prefs.h"

#include <qlabel.h>
#include <qlayout.h>
#include <qbuttongroup.h>
#ifdef USEQPE
#include <qpe/menubutton.h>
#include <qpe/fontdatabase.h>
#else
#include <qfontdatabase.h>
#endif

#include <qpe/qpeapplication.h>

CLayoutPrefs::CLayoutPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QHBoxLayout* hb = new QHBoxLayout(this);
    QButtonGroup* bg = new QButtonGroup(2, Qt::Horizontal, tr("Text"), this);
    hb->addWidget(bg);

    StripCR = new QCheckBox( bg );
    StripCR->setText( tr( "Strip CR" ) );

    Dehyphen = new QCheckBox( bg );
    Dehyphen->setText( tr( "Dehyphen" ) );

    SingleSpace = new QCheckBox( bg );
    SingleSpace->setText( tr( "Single Space" ) );

    Unindent = new QCheckBox( bg );
    Unindent->setText( tr( "Unindent" ) );

    Reparagraph = new QCheckBox( bg );
    Reparagraph->setText( tr( "Reparagraph" ) );

    DoubleSpace = new QCheckBox( bg );
    DoubleSpace->setText( tr( "Double Space" ) );

    Remap = new QCheckBox( bg );
    Remap->setText( tr( "Remap" ) );

    Embolden = new QCheckBox( bg );
    Embolden->setText( tr( "Embolden" ) );

    FullJustify = new QCheckBox( bg );
    FullJustify->setText( tr( "Full Justify" ) );

}

/*  
 *  Destroys the object and frees any allocated resources
 */
CLayoutPrefs::~CLayoutPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}



CLayoutPrefs2::CLayoutPrefs2( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    
    QVBoxLayout* vb = new QVBoxLayout(this);
    QGridLayout* gl = new QGridLayout(vb, 4, 3);

    QLabel *TextLabel;

    TextLabel = new QLabel( this, "TextLabel1" );
    TextLabel->setText( tr( "Indent" ) );
    gl->addWidget(TextLabel, 0, 0);


    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Page\nOverlap" ) );
    gl->addWidget(TextLabel, 0, 1);

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Graphics\nZoom" ) );
    gl->addWidget(TextLabel, 0, 2);

    Indent = new QSpinBox( this, "Indent" );
    Indent->setRange(0,20);
    gl->addWidget(Indent, 1, 0);

    pageoverlap = new QSpinBox( this );
    pageoverlap->setRange(0,20);
    gl->addWidget(pageoverlap, 1, 1);

    gfxzoom = new QSpinBox( this );
    gfxzoom->setRange(0,100);
    gl->addWidget(gfxzoom, 1, 2);

    TextLabel = new QLabel( this, "TextLabel4" );
    TextLabel->setText( tr( "Margin" ) );
    gl->addWidget(TextLabel, 2, 0);

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Paragraph\nLeading" ) );
    gl->addWidget(TextLabel, 2, 1);

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Line\nLeading" ) );
    gl->addWidget(TextLabel, 2, 2);

    Margin = new QSpinBox( this, "Margin" );
    Margin->setRange(0, 100);
    gl->addWidget(Margin, 3, 0);

    ParaLead = new QSpinBox( this );
    ParaLead->setRange(-5, 50);
    gl->addWidget(ParaLead, 3, 1);

    LineLead = new QSpinBox( this );
    LineLead->setRange(-5, 50);
    gl->addWidget(LineLead, 3, 2);

    gl = new QGridLayout(vb, 2, 2);

    TextLabel = new QLabel( this);
    TextLabel->setText( tr( "Markup" ) );
    gl->addWidget(TextLabel, 0, 0, Qt::AlignBottom);
    TextLabel = new QLabel( this);
    TextLabel->setText( tr( "Font" ) );
    gl->addWidget(TextLabel, 0, 1, Qt::AlignBottom);


#ifdef USECOMBO
    Markup = new QComboBox( this);
#else
    Markup = new MenuButton( this);
#endif
    Markup->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    Markup->insertItem("Auto");
    Markup->insertItem("None");
    Markup->insertItem("Text");
    Markup->insertItem("HTML");
    Markup->insertItem("PML");
    gl->addWidget(Markup, 1, 0, Qt::AlignTop);

#ifdef USECOMBO
    fontselector = new QComboBox( this);
#else
    fontselector = new MenuButton( this);
#endif
    fontselector->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    {
#ifdef USEQPE
	FontDatabase f;
#else
	QFontDatabase f;
#endif
	QStringList flist = f.families();
	for (QStringList::Iterator nm = flist.begin(); nm != flist.end(); nm++)
	{
	    fontselector->insertItem(*nm);
	}
    } // delete the FontDatabase!!!
    gl->addWidget(fontselector, 1, 1, Qt::AlignTop);
}
/*
CLayoutPrefs2::CLayoutPrefs2( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QHBoxLayout* hb = new QHBoxLayout(this);

    QVBoxLayout* vb = new QVBoxLayout;
    hb->addLayout(vb);

    QLabel *TextLabel;

    TextLabel = new QLabel( this, "TextLabel1" );
    TextLabel->setText( tr( "Indent" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    Indent = new QSpinBox( this, "Indent" );
    Indent->setRange(0,20);
    vb->addWidget( Indent, 0, Qt::AlignLeft );

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Page\nOverlap" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    pageoverlap = new QSpinBox( this );
    pageoverlap->setRange(0,20);
    vb->addWidget( pageoverlap, 0, Qt::AlignLeft );

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Graphics\nZoom" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    gfxzoom = new QSpinBox( this );
    gfxzoom->setRange(0,100);
    vb->addWidget( gfxzoom, 0, Qt::AlignLeft );

    vb->addStretch();

    vb = new QVBoxLayout;
    hb->addLayout(vb);

    TextLabel = new QLabel( this, "TextLabel4" );
    TextLabel->setText( tr( "Margin" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    Margin = new QSpinBox( this, "Margin" );
    Margin->setRange(0, 100);
    vb->addWidget( Margin, 0, Qt::AlignLeft );

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Paragraph\nLeading" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    ParaLead = new QSpinBox( this );
    ParaLead->setRange(-5, 50);
    vb->addWidget( ParaLead, 0, Qt::AlignLeft );

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Line\nLeading" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    LineLead = new QSpinBox( this );
    LineLead->setRange(-5, 50);
    vb->addWidget( LineLead, 0, Qt::AlignLeft );

    vb->addStretch();

    vb = new QVBoxLayout;
    hb->addLayout(vb);


    TextLabel = new QLabel( this);
    TextLabel->setText( tr( "Markup" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    Markup = new MenuButton( this);
    Markup->insertItem("Auto");
    Markup->insertItem("None");
    Markup->insertItem("Text");
    Markup->insertItem("HTML");
    Markup->insertItem("PML");
    vb->addWidget( Markup, 0, Qt::AlignLeft );

    TextLabel = new QLabel( this);
    TextLabel->setText( tr( "Font" ) );
    vb->addWidget( TextLabel, 0, Qt::AlignBottom );
    fontselector = new MenuButton( this);
    fontselector->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    {
	FontDatabase f;
	QStringList flist = f.families();
	for (QStringList::Iterator nm = flist.begin(); nm != flist.end(); nm++)
	{
	    fontselector->insertItem(*nm);
	}
    } // delete the FontDatabase!!!
    vb->addWidget( fontselector, 0, Qt::AlignLeft );

    vb->addStretch();
}
*/
/*  
 *  Destroys the object and frees any allocated resources
 */
CLayoutPrefs2::~CLayoutPrefs2()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
CPluckerPrefs::CPluckerPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    Layout11 = new QVBoxLayout(this); 
    Layout11->setMargin( 0 );

    Depluck = new QCheckBox( this, "Depluck" );
    Depluck->setText( tr( "Depluck" ) );
    Layout11->addWidget( Depluck );

    Dejpluck = new QCheckBox( this, "Dejpluck" );
    Dejpluck->setText( tr( "Dejpluck" ) );
    Layout11->addWidget( Dejpluck );

    Continuous = new QCheckBox( this, "Continuous" );
    Continuous->setText( tr( "Continuous" ) );
    Layout11->addWidget( Continuous );

}

CPluckerPrefs::~CPluckerPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}
*/
/*
CMiscPrefs::CMiscPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{

    QVBoxLayout* Layout11 = new QVBoxLayout(this); 
    Layout11->setMargin( 0 );


    QHBoxLayout* hl = new QHBoxLayout;

    QLabel* TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Action for\nSelect Button" ) );
    hl->addWidget(TextLabel);

    action = new QComboBox( this );
    action->insertItem("Open file");
    action->insertItem("Autoscroll");
    action->insertItem("Mark");
    action->insertItem("Annotate");
    action->insertItem("Fullscreen");
    hl->addWidget( action );

    Layout11->addLayout(hl);

    hl = new QHBoxLayout;

    TextLabel = new QLabel( this );
    TextLabel->setText( tr( "Dictionary\nApplication" ) );
    hl->addWidget(TextLabel);
    target = new QLineEdit(this);
    hl->addWidget( target );

    Layout11->addLayout(hl);


    QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, "Selection Target", this);
    Layout11->addWidget( bg );

    annotation = new QCheckBox( bg );
    annotation->setText( tr( "Annotation" ) );

    dictionary = new QCheckBox( bg );
    dictionary->setText( tr( "Dictionary" ) );

    clipboard = new QCheckBox( bg );
    clipboard->setText( tr( "Clipboard" ) );

}

CMiscPrefs::~CMiscPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}
*/

CMiscPrefs::CMiscPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{

    QGridLayout* hl = new QGridLayout(this,1,2);

    hl->setMargin( 0 );

    QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, tr("Select Action"), this);
    hl->addWidget( gb, 0, 0 );

    annotation = new QCheckBox( gb );
    annotation->setText( tr( "Annotation" ) );

    dictionary = new QCheckBox( gb );
    dictionary->setText( tr( "Dictionary" ) );

    clipboard = new QCheckBox( gb );
    clipboard->setText( tr( "Clipboard" ) );

    QButtonGroup* bg = new QButtonGroup(1, Qt::Horizontal, tr("Plucker"), this);
    hl->addWidget( bg, 0 , 1 );

    Depluck = new QCheckBox( bg );
    Depluck->setText( tr( "Depluck" ) );

    Dejpluck = new QCheckBox( bg );
    Dejpluck->setText( tr( "Dejpluck" ) );

    Continuous = new QCheckBox( bg );
    Continuous->setText( tr( "Continuous" ) );


/*

    QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, "Navigation", this);
    TextLabel = new QLabel( gb );
    TextLabel->setText( tr( "Overlap" ) );
    QSpinBox* sb = new QSpinBox( gb );

    Internationalisation
    Ideogram/Word
    Set Width
    Set Encoding
    Set Font
*/
}

CMiscPrefs::~CMiscPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}

CPrefs::CPrefs(bool fs, QWidget* parent, const char* name) : QDialog(parent, name, true)
{
    setCaption(tr( "OpieReader Settings" ) );
    QTabWidget* td = new QTabWidget(this);
    layout = new CLayoutPrefs(this);
    layout2 = new CLayoutPrefs2(this);
    misc = new CMiscPrefs(this);
    button = new CButtonPrefs(this);
    inter = new CInterPrefs(this);
    td->addTab(layout, tr("Layout"));
    td->addTab(layout2, tr("Layout(2)"));
    td->addTab(inter, tr("Locale"));
    td->addTab(misc, tr("Misc"));
    td->addTab(button, tr("Buttons"));
    QVBoxLayout* v = new QVBoxLayout(this);
    v->addWidget(td);

    if (fs)
        QPEApplication::showDialog( this );
}


/*

Unicode
  Ideo/Word
  Width
  Encoding

*/

#include "CEncoding_tables.h"

CInterPrefs::CInterPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    QHBoxLayout* hb = new QHBoxLayout(this);

    QGroupBox* gb = new QGroupBox(1, Qt::Horizontal, tr("International"), this);

    hb->addWidget(gb);

    QLabel *TextLabel;

    ideogram = new QCheckBox( gb );
    ideogram->setText( tr( "Ideograms" ) );

    TextLabel = new QLabel( gb );
    TextLabel->setText( tr( "Ideogram Width" ) );
    ideogramwidth = new QSpinBox( gb );
    ideogramwidth->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    ideogramwidth->setRange(1,200);

    propfontchange = new QCheckBox( gb );
    propfontchange->setText( tr( "Apply font\nto dialogs" ) );

    TextLabel = new QLabel( gb );
    TextLabel->setText( tr( "Encoding" ) );
#ifdef USECOMBO
    encoding = new QComboBox(gb);
#else
    encoding = new MenuButton(gb);
#endif
    encoding->insertItem("Ascii");
    encoding->insertItem("UTF-8");
    encoding->insertItem("UCS-2(BE)");
    encoding->insertItem("USC-2(LE)");
    encoding->insertItem("Palm");
    for (unicodetable::iterator iter = unicodetable::begin(); iter != unicodetable::end(); iter++)
    {
	encoding->insertItem(iter->mime);
    }

    QVBoxLayout* vb = new QVBoxLayout;

    gb = new QGroupBox(1, Qt::Horizontal, tr("Dictionary"), this);

    TextLabel = new QLabel( gb );
    TextLabel->setText( tr( "Application" ) );
    application = new QLineEdit(gb);
    application->setFixedWidth(80);

    TextLabel = new QLabel( gb );
    TextLabel->setText( tr( "Message" ) );
    message = new QLineEdit(gb);
    message->setFixedWidth(80);
//    message->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    twotouch = new QCheckBox( gb );
    twotouch->setText( tr( "Two/One\nTouch" ) );

    SwapMouse = new QCheckBox( gb );
    SwapMouse->setText(tr("Swap Tap\nActions") );


    vb->addWidget(gb);

//    vb->addStretch();
    hb->addLayout(vb);
}

CInterPrefs::~CInterPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}



#ifdef USECOMBO
void CButtonPrefs::populate(QComboBox *mb)
#else
void CButtonPrefs::populate(MenuButton *mb)
#endif
{
    mb->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
    mb->insertItem(tr("<Nothing>") );
    mb->insertItem(tr("Open file") );
    mb->insertItem(tr("Autoscroll") );
    mb->insertItem(tr("Bookmark") );
    mb->insertItem(tr("Annotate") );
    mb->insertItem(tr("Fullscreen") );

    mb->insertItem(tr("Zoom in") );
    mb->insertItem(tr("Zoom out") );
    mb->insertItem(tr("Back") );
    mb->insertItem(tr("Forward") );
    mb->insertItem(tr("Home") );
    mb->insertItem(tr("Page up") );
    mb->insertItem(tr("Page down") );
    mb->insertItem(tr("Line up") );
    mb->insertItem(tr("Line down") );
    mb->insertItem(tr("Beginning") );
    mb->insertItem(tr("End") );
}

CButtonPrefs::CButtonPrefs( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{

    QGridLayout* hl = new QGridLayout(this,10,2);

    hl->setMargin( 0 );

    QLabel* ql = new QLabel(tr("Escape Button"), this);
    hl->addWidget(ql, 0, 0, Qt::AlignBottom);
#ifdef USECOMBO
    escapeAction = new QComboBox( this );
#else
    escapeAction = new MenuButton( this );
#endif
    populate(escapeAction);
    hl->addWidget(escapeAction, 1, 0, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Space Button"), this);
    hl->addWidget(ql, 2, 0, Qt::AlignBottom);
#ifdef USECOMBO
    spaceAction = new QComboBox( this );
#else
    spaceAction = new MenuButton( this );
#endif
    populate(spaceAction);
    hl->addWidget(spaceAction, 3, 0, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Return Button"), this);
    hl->addWidget(ql, 2, 1, Qt::AlignBottom);
#ifdef USECOMBO
    returnAction = new QComboBox( this );
#else
    returnAction = new MenuButton( this );
#endif
    populate(returnAction);
    hl->addWidget(returnAction, 3, 1, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Left Arrow"), this);
    hl->addWidget(ql, 4, 0, Qt::AlignBottom);
#ifdef USECOMBO
    leftAction = new QComboBox( this );
#else
    leftAction = new MenuButton( this );
#endif
    populate(leftAction);
    hl->addWidget(leftAction, 5, 0, Qt::AlignTop | Qt::AlignLeft);
    leftScroll = new QCheckBox( tr("Scroll Speed"), this );
    hl->addWidget(leftScroll, 6, 0, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Right Arrow"), this);
    hl->addWidget(ql, 4, 1, Qt::AlignBottom);
#ifdef USECOMBO
    rightAction = new QComboBox( this );
#else
    rightAction = new MenuButton( this );
#endif
    populate(rightAction);
    hl->addWidget(rightAction, 5, 1, Qt::AlignTop | Qt::AlignLeft);
    rightScroll = new QCheckBox( tr("Scroll Speed"), this );
    hl->addWidget(rightScroll, 6, 1, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Down Arrow"), this);
    hl->addWidget(ql, 7, 0, Qt::AlignBottom);
#ifdef USECOMBO
    downAction = new QComboBox( this );
#else
    downAction = new MenuButton( this );
#endif
    populate(downAction);
    hl->addWidget(downAction, 8, 0, Qt::AlignTop | Qt::AlignLeft);
    downScroll = new QCheckBox( tr("Scroll Speed"), this );
    hl->addWidget(downScroll, 9, 0, Qt::AlignTop | Qt::AlignLeft);

    ql = new QLabel(tr("Up Arrow"), this);
    hl->addWidget(ql, 7, 1, Qt::AlignBottom);
#ifdef USECOMBO
    upAction = new QComboBox( this );
#else
    upAction = new MenuButton( this );
#endif
    populate(upAction);
    hl->addWidget(upAction, 8, 1, Qt::AlignTop | Qt::AlignLeft);
    upScroll = new QCheckBox( tr("Scroll Speed"), this );
    hl->addWidget(upScroll, 9, 1, Qt::AlignTop | Qt::AlignLeft);
}

CButtonPrefs::~CButtonPrefs()
{
    // no need to delete child widgets, Qt does it all for us
}