File: configdlgui.cpp

package info (click to toggle)
kaquarium 1.0-beta-6.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,944 kB
  • ctags: 313
  • sloc: sh: 17,170; perl: 2,724; cpp: 1,340; makefile: 116
file content (343 lines) | stat: -rw-r--r-- 13,962 bytes parent folder | download | duplicates (3)
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
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './configdlgui.ui'
**
** Created: Tue Jan 27 12:46:45 2004
**      by: The User Interface Compiler ()
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "configdlgui.h"

#include <qvariant.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qgroupbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a configDlgUI as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
configDlgUI::configDlgUI( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "configDlgUI" );
    configDlgUILayout = new QGridLayout( this, 1, 1, 11, 6, "configDlgUILayout"); 

    Layout10 = new QHBoxLayout( 0, 0, 6, "Layout10"); 
    Spacer5 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout10->addItem( Spacer5 );

    okButton = new QPushButton( this, "okButton" );
    Layout10->addWidget( okButton );

    applyButton = new QPushButton( this, "applyButton" );
    Layout10->addWidget( applyButton );

    cancelButton = new QPushButton( this, "cancelButton" );
    Layout10->addWidget( cancelButton );

    configDlgUILayout->addLayout( Layout10, 1, 0 );

    tabWidget3 = new QTabWidget( this, "tabWidget3" );

    tab = new QWidget( tabWidget3, "tab" );
    tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    Layout11_2_3 = new QHBoxLayout( 0, 0, 6, "Layout11_2_3"); 

    cualquiringa_2 = new QLabel( tab, "cualquiringa_2" );
    Layout11_2_3->addWidget( cualquiringa_2 );
    Spacer1_2_3 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout11_2_3->addItem( Spacer1_2_3 );

    numOfBubblesSpinBox = new QSpinBox( tab, "numOfBubblesSpinBox" );
    Layout11_2_3->addWidget( numOfBubblesSpinBox );

    tabLayout->addLayout( Layout11_2_3, 0, 0 );

    Layout4_2_4 = new QHBoxLayout( 0, 0, 6, "Layout4_2_4"); 

    textWidthSize = new QLabel( tab, "textWidthSize" );
    Layout4_2_4->addWidget( textWidthSize );
    Spacer1_2_2_2_4 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_4->addItem( Spacer1_2_2_2_4 );

    widthSizeSpinBox = new QSpinBox( tab, "widthSizeSpinBox" );
    widthSizeSpinBox->setMaxValue( 9999 );
    widthSizeSpinBox->setMinValue( 10 );
    Layout4_2_4->addWidget( widthSizeSpinBox );

    tabLayout->addLayout( Layout4_2_4, 2, 0 );

    Layout4_2_2_2 = new QHBoxLayout( 0, 0, 6, "Layout4_2_2_2"); 

    textWidthSize_2 = new QLabel( tab, "textWidthSize_2" );
    Layout4_2_2_2->addWidget( textWidthSize_2 );
    Spacer1_2_2_2_2_2 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_2_2->addItem( Spacer1_2_2_2_2_2 );

    scaleSpinBox = new QSpinBox( tab, "scaleSpinBox" );
    scaleSpinBox->setMaxValue( 9999 );
    scaleSpinBox->setMinValue( 5 );
    Layout4_2_2_2->addWidget( scaleSpinBox );

    tabLayout->addLayout( Layout4_2_2_2, 3, 0 );

    buttonGroup1 = new QButtonGroup( tab, "buttonGroup1" );
    buttonGroup1->setCheckable( FALSE );
    buttonGroup1->setChecked( FALSE );
    buttonGroup1->setExclusive( FALSE );
    buttonGroup1->setRadioButtonExclusive( TRUE );
    buttonGroup1->setProperty( "selectedId", -1 );
    buttonGroup1->setColumnLayout(0, Qt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new QGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( Qt::AlignTop );

    layout21 = new QHBoxLayout( 0, 0, 6, "layout21"); 
    spacer32 = new QSpacerItem( 41, 31, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout21->addItem( spacer32 );

    cualquiringa = new QLabel( buttonGroup1, "cualquiringa" );
    layout21->addWidget( cualquiringa );
    Spacer1_2_2_3 = new QSpacerItem( 60, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout21->addItem( Spacer1_2_2_3 );

    numOfFishSpinBox = new QSpinBox( buttonGroup1, "numOfFishSpinBox" );
    numOfFishSpinBox->setMinValue( 1 );
    layout21->addWidget( numOfFishSpinBox );

    buttonGroup1Layout->addLayout( layout21, 1, 0 );

    selectedfishRadButt = new QRadioButton( buttonGroup1, "selectedfishRadButt" );

    buttonGroup1Layout->addWidget( selectedfishRadButt, 2, 0 );

    randomfishRadButt = new QRadioButton( buttonGroup1, "randomfishRadButt" );
    randomfishRadButt->setAutoMask( FALSE );
    randomfishRadButt->setChecked( FALSE );

    buttonGroup1Layout->addWidget( randomfishRadButt, 0, 0 );

    tabLayout->addWidget( buttonGroup1, 1, 0 );
    tabWidget3->insertTab( tab, QString("") );

    tab_2 = new QWidget( tabWidget3, "tab_2" );
    tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    fishGroupBox = new QGroupBox( tab_2, "fishGroupBox" );
    fishGroupBox->setColumnLayout(0, Qt::Vertical );
    fishGroupBox->layout()->setSpacing( 6 );
    fishGroupBox->layout()->setMargin( 11 );
    fishGroupBoxLayout = new QGridLayout( fishGroupBox->layout() );
    fishGroupBoxLayout->setAlignment( Qt::AlignTop );

    Layout38 = new QGridLayout( 0, 1, 1, 0, 6, "Layout38"); 
    Spacer35 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout38->addItem( Spacer35, 8, 1 );

    Layout4_2_3_3_2 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_3_2"); 

    textWidthSize_3_3_2 = new QLabel( fishGroupBox, "textWidthSize_3_3_2" );
    Layout4_2_3_3_2->addWidget( textWidthSize_3_3_2 );
    Spacer1_2_2_2_3_3_2 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_3_2->addItem( Spacer1_2_2_2_3_3_2 );

    orangySpinBox = new QSpinBox( fishGroupBox, "orangySpinBox" );
    orangySpinBox->setMaxValue( 9999 );
    Layout4_2_3_3_2->addWidget( orangySpinBox );

    Layout38->addLayout( Layout4_2_3_3_2, 2, 1 );
    Spacer19_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_2, 3, 1 );
    Spacer19_6 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_6, 3, 0 );

    Layout4_2_3 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3"); 

    textWidthSize_3 = new QLabel( fishGroupBox, "textWidthSize_3" );
    Layout4_2_3->addWidget( textWidthSize_3 );
    Spacer1_2_2_2_3 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3->addItem( Spacer1_2_2_2_3 );

    ernestSpinBox = new QSpinBox( fishGroupBox, "ernestSpinBox" );
    ernestSpinBox->setMaxValue( 9999 );
    Layout4_2_3->addWidget( ernestSpinBox );

    Layout38->addLayout( Layout4_2_3, 2, 0 );

    Layout15 = new QHBoxLayout( 0, 0, 6, "Layout15"); 

    textWidthSize_3_6 = new QLabel( fishGroupBox, "textWidthSize_3_6" );
    Layout15->addWidget( textWidthSize_3_6 );
    Spacer1_2_2_2_3_6 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout15->addItem( Spacer1_2_2_2_3_6 );

    rayitasSpinBox = new QSpinBox( fishGroupBox, "rayitasSpinBox" );
    rayitasSpinBox->setMaxValue( 9999 );
    Layout15->addWidget( rayitasSpinBox );

    Layout38->addLayout( Layout15, 0, 1 );
    Spacer19_2_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_2_2, 1, 1 );

    Layout4_2_3_3 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_3"); 

    textWidthSize_3_3 = new QLabel( fishGroupBox, "textWidthSize_3_3" );
    Layout4_2_3_3->addWidget( textWidthSize_3_3 );
    Spacer1_2_2_2_3_3 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_3->addItem( Spacer1_2_2_2_3_3 );

    loriSpinBox = new QSpinBox( fishGroupBox, "loriSpinBox" );
    loriSpinBox->setMaxValue( 9999 );
    Layout4_2_3_3->addWidget( loriSpinBox );

    Layout38->addLayout( Layout4_2_3_3, 4, 1 );
    Spacer19_5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_5, 5, 0 );
    Spacer34 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer34, 7, 0 );

    Layout4_2_3_4 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_4"); 

    textWidthSize_3_4 = new QLabel( fishGroupBox, "textWidthSize_3_4" );
    Layout4_2_3_4->addWidget( textWidthSize_3_4 );
    Spacer1_2_2_2_3_4 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_4->addItem( Spacer1_2_2_2_3_4 );

    hunterSpinBox = new QSpinBox( fishGroupBox, "hunterSpinBox" );
    hunterSpinBox->setMaxValue( 9999 );
    Layout4_2_3_4->addWidget( hunterSpinBox );

    Layout38->addLayout( Layout4_2_3_4, 4, 0 );

    Layout4_2_3_3_3 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_3_3"); 

    textWidthSize_3_3_3 = new QLabel( fishGroupBox, "textWidthSize_3_3_3" );
    Layout4_2_3_3_3->addWidget( textWidthSize_3_3_3 );
    Spacer1_2_2_2_3_3_3 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_3_3->addItem( Spacer1_2_2_2_3_3_3 );

    squidSpinBox = new QSpinBox( fishGroupBox, "squidSpinBox" );
    squidSpinBox->setMaxValue( 9999 );
    Layout4_2_3_3_3->addWidget( squidSpinBox );

    Layout38->addLayout( Layout4_2_3_3_3, 6, 1 );

    Layout4_2_3_7 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_7"); 

    textWidthSize_3_7 = new QLabel( fishGroupBox, "textWidthSize_3_7" );
    Layout4_2_3_7->addWidget( textWidthSize_3_7 );
    Spacer1_2_2_2_3_7 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_7->addItem( Spacer1_2_2_2_3_7 );

    swordFishSpinBox = new QSpinBox( fishGroupBox, "swordFishSpinBox" );
    swordFishSpinBox->setMaxValue( 9999 );
    Layout4_2_3_7->addWidget( swordFishSpinBox );

    Layout38->addLayout( Layout4_2_3_7, 0, 0 );

    Layout4_2_3_2 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_2"); 

    textWidthSize_3_2 = new QLabel( fishGroupBox, "textWidthSize_3_2" );
    Layout4_2_3_2->addWidget( textWidthSize_3_2 );
    Spacer1_2_2_2_3_2 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_2->addItem( Spacer1_2_2_2_3_2 );

    tourtleSpinBox = new QSpinBox( fishGroupBox, "tourtleSpinBox" );
    tourtleSpinBox->setMaxValue( 9999 );
    Layout4_2_3_2->addWidget( tourtleSpinBox );

    Layout38->addLayout( Layout4_2_3_2, 6, 0 );
    Spacer19_7 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_7, 1, 0 );

    Layout4_2_3_5 = new QHBoxLayout( 0, 0, 6, "Layout4_2_3_5"); 

    textWidthSize_3_5 = new QLabel( fishGroupBox, "textWidthSize_3_5" );
    Layout4_2_3_5->addWidget( textWidthSize_3_5 );
    Spacer1_2_2_2_3_5 = new QSpacerItem( 20, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout4_2_3_5->addItem( Spacer1_2_2_2_3_5 );

    greenySpinBox = new QSpinBox( fishGroupBox, "greenySpinBox" );
    greenySpinBox->setMaxValue( 9999 );
    Layout4_2_3_5->addWidget( greenySpinBox );

    Layout38->addLayout( Layout4_2_3_5, 8, 0 );
    Spacer19_2_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    Layout38->addItem( Spacer19_2_3, 5, 1 );

    fishGroupBoxLayout->addLayout( Layout38, 0, 0 );

    tabLayout_2->addWidget( fishGroupBox, 0, 0 );
    tabWidget3->insertTab( tab_2, QString("") );

    configDlgUILayout->addWidget( tabWidget3, 0, 0 );
    languageChange();
    resize( QSize(396, 362).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( randomfishRadButt, SIGNAL( toggled(bool) ), numOfFishSpinBox, SLOT( setEnabled(bool) ) );
    connect( selectedfishRadButt, SIGNAL( toggled(bool) ), fishGroupBox, SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void configDlgUI::languageChange()
{
    setCaption( tr2i18n( "KAquarium Configuration" ) );
    okButton->setText( tr2i18n( "&Ok" ) );
    okButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) );
    applyButton->setText( tr2i18n( "&Apply" ) );
    applyButton->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
    cancelButton->setText( tr2i18n( "&Cancel" ) );
    cualquiringa_2->setText( tr2i18n( "Number of Bubble:" ) );
    textWidthSize->setText( tr2i18n( "Width Size:" ) );
    textWidthSize_2->setText( tr2i18n( "Fish scale (in %):" ) );
    buttonGroup1->setTitle( tr2i18n( "Fish Options" ) );
    cualquiringa->setText( tr2i18n( "Number of fish:" ) );
    selectedfishRadButt->setText( tr2i18n( "&Selected fish" ) );
    selectedfishRadButt->setAccel( QKeySequence( tr2i18n( "Alt+S" ) ) );
    randomfishRadButt->setText( tr2i18n( "&Random fish" ) );
    randomfishRadButt->setAccel( QKeySequence( tr2i18n( "Alt+R" ) ) );
    tabWidget3->changeTab( tab, tr2i18n( "Main" ) );
    fishGroupBox->setTitle( tr2i18n( "Fish" ) );
    textWidthSize_3_3_2->setText( tr2i18n( "Orangy:" ) );
    textWidthSize_3->setText( tr2i18n( "Ernest:" ) );
    textWidthSize_3_6->setText( tr2i18n( "Rayitas:" ) );
    textWidthSize_3_3->setText( tr2i18n( "Lori:" ) );
    textWidthSize_3_4->setText( tr2i18n( "Hunter:" ) );
    textWidthSize_3_3_3->setText( tr2i18n( "Squid:" ) );
    textWidthSize_3_7->setText( tr2i18n( "Sword fish:" ) );
    textWidthSize_3_2->setText( tr2i18n( "Tourtle:" ) );
    textWidthSize_3_5->setText( tr2i18n( "Greeny:" ) );
    tabWidget3->changeTab( tab_2, tr2i18n( "Fish" ) );
}

#include "configdlgui.moc"