summaryrefslogtreecommitdiffstats
path: root/src/prefMencoder.cpp
blob: dacfb850d0d595ea8fa06c492dd46001b68f68b5 (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
#include <tdelocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './prefMencoder.ui'
**
** Created: dim. oct. 26 08:57:36 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "prefMencoder.h"

#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
#include <tqtabwidget.h>
#include <tqlistbox.h>
#include <kpushbutton.h>
#include <tqtextedit.h>
#include <tqlineedit.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kpushbutton.h"

/*
 *  Constructs a prefMencoder as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
prefMencoder::prefMencoder( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "prefMencoder" );
    prefMencoderLayout = new TQGridLayout( this, 1, 1, 11, 6, "prefMencoderLayout"); 

    layout2 = new TQGridLayout( 0, 1, 1, 0, 6, "layout2"); 

    textLabel2 = new TQLabel( this, "textLabel2" );
    textLabel2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
    TQFont textLabel2_font(  textLabel2->font() );
    textLabel2_font.setBold( TRUE );
    textLabel2->setFont( textLabel2_font ); 

    layout2->addWidget( textLabel2, 0, 0 );

    textLabel2_2 = new TQLabel( this, "textLabel2_2" );
    textLabel2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel2_2->sizePolicy().hasHeightForWidth() ) );

    layout2->addWidget( textLabel2_2, 0, 1 );

    prefMencoderLayout->addLayout( layout2, 2, 0 );

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    lbvCodecs = new TQListBox( tab, "lbvCodecs" );

    tabLayout->addMultiCellWidget( lbvCodecs, 0, 4, 0, 1 );

    btnDeleteV = new KPushButton( tab, "btnDeleteV" );
    btnDeleteV->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnDeleteV->sizePolicy().hasHeightForWidth() ) );
    btnDeleteV->setProperty( "stdItem", 28 );

    tabLayout->addWidget( btnDeleteV, 5, 1 );

    btnAddV = new KPushButton( tab, "btnAddV" );
    btnAddV->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnAddV->sizePolicy().hasHeightForWidth() ) );
    btnAddV->setProperty( "stdItem", 27 );

    tabLayout->addWidget( btnAddV, 5, 0 );

    textLabel1_3 = new TQLabel( tab, "textLabel1_3" );

    tabLayout->addWidget( textLabel1_3, 0, 2 );

    textLabel2_3 = new TQLabel( tab, "textLabel2_3" );

    tabLayout->addWidget( textLabel2_3, 1, 2 );

    textLabel1_2_3 = new TQLabel( tab, "textLabel1_2_3" );

    tabLayout->addWidget( textLabel1_2_3, 3, 2 );

    layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "layout9"); 

    teOpt2 = new TQTextEdit( tab, "teOpt2" );
    teOpt2->setEnabled( TRUE );

    layout9->addMultiCellWidget( teOpt2, 0, 1, 0, 0 );
    spacer5 = new TQSpacerItem( 20, 81, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout9->addItem( spacer5, 1, 1 );

    btnOpt2 = new KPushButton( tab, "btnOpt2" );
    btnOpt2->setMinimumSize( TQSize( 22, 22 ) );
    btnOpt2->setMaximumSize( TQSize( 22, 22 ) );

    layout9->addWidget( btnOpt2, 0, 1 );

    tabLayout->addLayout( layout9, 3, 3 );

    layout10 = new TQGridLayout( 0, 1, 1, 0, 6, "layout10"); 

    teOpt3 = new TQTextEdit( tab, "teOpt3" );
    teOpt3->setEnabled( TRUE );

    layout10->addMultiCellWidget( teOpt3, 0, 1, 0, 0 );

    btnOpt3 = new KPushButton( tab, "btnOpt3" );
    btnOpt3->setMinimumSize( TQSize( 22, 22 ) );
    btnOpt3->setMaximumSize( TQSize( 22, 22 ) );

    layout10->addWidget( btnOpt3, 0, 1 );
    spacer6 = new TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout10->addItem( spacer6, 1, 1 );

    tabLayout->addMultiCellLayout( layout10, 4, 5, 3, 3 );

    textLabel1_2 = new TQLabel( tab, "textLabel1_2" );

    tabLayout->addWidget( textLabel1_2, 2, 2 );

    layout8 = new TQGridLayout( 0, 1, 1, 0, 6, "layout8"); 
    spacer4 = new TQSpacerItem( 20, 90, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout8->addItem( spacer4, 1, 1 );

    teOpt1 = new TQTextEdit( tab, "teOpt1" );
    teOpt1->setEnabled( TRUE );
    teOpt1->setWordWrap( TQTextEdit::WidgetWidth );

    layout8->addMultiCellWidget( teOpt1, 0, 1, 0, 0 );

    btnOpt1 = new KPushButton( tab, "btnOpt1" );
    btnOpt1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnOpt1->sizePolicy().hasHeightForWidth() ) );
    btnOpt1->setMinimumSize( TQSize( 22, 22 ) );
    btnOpt1->setMaximumSize( TQSize( 22, 22 ) );

    layout8->addWidget( btnOpt1, 0, 1 );

    tabLayout->addLayout( layout8, 2, 3 );

    textLabel1_2_3_2 = new TQLabel( tab, "textLabel1_2_3_2" );

    tabLayout->addMultiCellWidget( textLabel1_2_3_2, 4, 5, 2, 2 );

    leFourcc = new TQLineEdit( tab, "leFourcc" );

    tabLayout->addWidget( leFourcc, 1, 3 );

    leVLabel = new TQLineEdit( tab, "leVLabel" );
    leVLabel->setEnabled( TRUE );

    tabLayout->addWidget( leVLabel, 0, 3 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 

    btnDeleteA = new KPushButton( tab_2, "btnDeleteA" );
    btnDeleteA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnDeleteA->sizePolicy().hasHeightForWidth() ) );
    btnDeleteA->setProperty( "stdItem", 28 );

    tabLayout_2->addWidget( btnDeleteA, 2, 1 );

    btnAddA = new KPushButton( tab_2, "btnAddA" );
    btnAddA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnAddA->sizePolicy().hasHeightForWidth() ) );
    btnAddA->setProperty( "stdItem", 27 );

    tabLayout_2->addWidget( btnAddA, 2, 0 );

    lbaCodecs = new TQListBox( tab_2, "lbaCodecs" );

    tabLayout_2->addMultiCellWidget( lbaCodecs, 0, 1, 0, 1 );

    leALabel = new TQLineEdit( tab_2, "leALabel" );

    tabLayout_2->addWidget( leALabel, 0, 3 );

    textLabel3 = new TQLabel( tab_2, "textLabel3" );

    tabLayout_2->addWidget( textLabel3, 0, 2 );

    layout11 = new TQGridLayout( 0, 1, 1, 0, 6, "layout11"); 

    teOptA = new TQTextEdit( tab_2, "teOptA" );

    layout11->addMultiCellWidget( teOptA, 0, 1, 0, 0 );
    spacer4_2 = new TQSpacerItem( 20, 78, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout11->addItem( spacer4_2, 1, 1 );

    btnOptA = new KPushButton( tab_2, "btnOptA" );
    btnOptA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, btnOptA->sizePolicy().hasHeightForWidth() ) );
    btnOptA->setMinimumSize( TQSize( 22, 22 ) );
    btnOptA->setMaximumSize( TQSize( 22, 22 ) );

    layout11->addWidget( btnOptA, 0, 1 );

    tabLayout_2->addMultiCellLayout( layout11, 1, 2, 3, 3 );

    textLabel1_2_2_2 = new TQLabel( tab_2, "textLabel1_2_2_2" );
    textLabel1_2_2_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1_2_2_2->sizePolicy().hasHeightForWidth() ) );

    tabLayout_2->addMultiCellWidget( textLabel1_2_2_2, 1, 2, 2, 2 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );

    prefMencoderLayout->addMultiCellWidget( tabWidget2, 0, 0, 0, 2 );

    textLabel1 = new TQLabel( this, "textLabel1" );
    textLabel1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, textLabel1->sizePolicy().hasHeightForWidth() ) );
    TQFont textLabel1_font(  textLabel1->font() );
    textLabel1_font.setBold( TRUE );
    textLabel1->setFont( textLabel1_font ); 

    prefMencoderLayout->addWidget( textLabel1, 1, 0 );

    bReset = new KPushButton( this, "bReset" );
    bReset->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, bReset->sizePolicy().hasHeightForWidth() ) );
    bReset->setProperty( "stdItem", 21 );

    prefMencoderLayout->addMultiCellWidget( bReset, 1, 2, 2, 2 );
    spacer5_2 = new TQSpacerItem( 121, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    prefMencoderLayout->addItem( spacer5_2, 1, 1 );
    languageChange();
    resize( TQSize(672, 587).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( lbvCodecs, TQT_SIGNAL( currentChanged(TQListBoxItem*) ), this, TQT_SLOT( lbvCodecsCurrentChanged(TQListBoxItem*) ) );
    connect( teOpt1, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( teOpt1TextChanged() ) );
    connect( teOpt2, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( teOpt2TextChanged() ) );
    connect( leVLabel, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( leVLabelTextChanged(const TQString&) ) );
    connect( teOpt3, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( teOpt3TextChanged() ) );
    connect( lbaCodecs, TQT_SIGNAL( currentChanged(TQListBoxItem*) ), this, TQT_SLOT( lbaCodecsCurrentChanged(TQListBoxItem*) ) );
    connect( teOptA, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( teOptATextChanged() ) );
    connect( leALabel, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( leALabelTextChanged(const TQString&) ) );
    connect( btnOpt1, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnOpt1Clicked() ) );
    connect( btnOpt2, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnOpt2Clicked() ) );
    connect( btnOpt3, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnOpt3Clicked() ) );
    connect( btnOptA, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnOptAClicked() ) );
    connect( btnAddA, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnAddAClicked() ) );
    connect( btnAddV, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnAddVClicked() ) );
    connect( btnDeleteA, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnDeleteAClicked() ) );
    connect( btnDeleteV, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnDeleteVClicked() ) );
    connect( leFourcc, TQT_SIGNAL( textChanged(const TQString&) ), this, TQT_SLOT( leFourccTextChanged(const TQString&) ) );
    connect( bReset, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bResetClicked() ) );

    // tab order
    setTabOrder( lbvCodecs, leVLabel );
    setTabOrder( leVLabel, leFourcc );
    setTabOrder( leFourcc, teOpt1 );
    setTabOrder( teOpt1, btnOpt1 );
    setTabOrder( btnOpt1, teOpt2 );
    setTabOrder( teOpt2, btnOpt2 );
    setTabOrder( btnOpt2, teOpt3 );
    setTabOrder( teOpt3, btnOpt3 );
    setTabOrder( btnOpt3, btnAddV );
    setTabOrder( btnAddV, btnDeleteV );
    setTabOrder( btnDeleteV, lbaCodecs );
    setTabOrder( lbaCodecs, leALabel );
    setTabOrder( leALabel, teOptA );
    setTabOrder( teOptA, btnOptA );
    setTabOrder( btnOptA, btnAddA );
    setTabOrder( btnAddA, btnDeleteA );
    setTabOrder( btnDeleteA, tabWidget2 );

    // buddies
    textLabel1_3->setBuddy( leVLabel );
    textLabel3->setBuddy( leALabel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void prefMencoder::languageChange()
{
    setCaption( tr2i18n( "Form1" ) );
    textLabel2->setText( tr2i18n( "$PASS\n"
"$WIDTH\n"
"$HEIGHT\n"
"$VIDBR\n"
"$AUDBR" ) );
    textLabel2_2->setText( tr2i18n( "pass number\n"
"video width\n"
"video height\n"
"video bitrate\n"
"audio bitrate" ) );
    lbvCodecs->clear();
    lbvCodecs->insertItem( tr2i18n( "XviD" ) );
    lbvCodecs->insertItem( tr2i18n( "x264" ) );
    lbvCodecs->insertItem( tr2i18n( "MJPEG" ) );
    lbvCodecs->insertItem( tr2i18n( "LJPEG" ) );
    lbvCodecs->insertItem( tr2i18n( "H.261" ) );
    lbvCodecs->insertItem( tr2i18n( "H.263" ) );
    lbvCodecs->insertItem( tr2i18n( "MPEG-4 (DivX 4/5)" ) );
    lbvCodecs->insertItem( tr2i18n( "DivX 3" ) );
    lbvCodecs->insertItem( tr2i18n( "MS MPEG-4 v2" ) );
    lbvCodecs->insertItem( tr2i18n( "WMV7" ) );
    lbvCodecs->insertItem( tr2i18n( "WMV8" ) );
    lbvCodecs->insertItem( tr2i18n( "RealVideo" ) );
    lbvCodecs->insertItem( tr2i18n( "MPEG-1" ) );
    lbvCodecs->insertItem( tr2i18n( "MPEG-2" ) );
    lbvCodecs->insertItem( tr2i18n( "HuffYUV" ) );
    lbvCodecs->insertItem( tr2i18n( "ffvHuff" ) );
    lbvCodecs->insertItem( tr2i18n( "ASUS v1" ) );
    lbvCodecs->insertItem( tr2i18n( "ASUS v2" ) );
    btnDeleteV->setAccel( TQKeySequence( TQString() ) );
    textLabel1_3->setText( tr2i18n( "label" ) );
    textLabel2_3->setText( tr2i18n( "fourcc" ) );
    textLabel1_2_3->setText( tr2i18n( "first pass" ) );
    btnOpt2->setText( TQString() );
    btnOpt3->setText( TQString() );
    textLabel1_2->setText( tr2i18n( "one pass" ) );
    teOpt1->setText( TQString() );
    btnOpt1->setText( TQString() );
    textLabel1_2_3_2->setText( tr2i18n( "second pass" ) );
    tabWidget2->changeTab( tab, tr2i18n( "Video codecs" ) );
    lbaCodecs->clear();
    lbaCodecs->insertItem( tr2i18n( "New Item" ) );
    textLabel3->setText( tr2i18n( "label" ) );
    btnOptA->setText( TQString() );
    textLabel1_2_2_2->setText( tr2i18n( "options" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Audio codecs" ) );
    textLabel1->setText( tr2i18n( "Available variables" ) );
}

void prefMencoder::lbvCodecsCurrentChanged(TQListBoxItem*)
{
    tqWarning( "prefMencoder::lbvCodecsCurrentChanged(TQListBoxItem*): Not implemented yet" );
}

void prefMencoder::teOpt1TextChanged()
{
    tqWarning( "prefMencoder::teOpt1TextChanged(): Not implemented yet" );
}

void prefMencoder::teOpt2TextChanged()
{
    tqWarning( "prefMencoder::teOpt2TextChanged(): Not implemented yet" );
}

void prefMencoder::leVLabelTextChanged(const TQString&)
{
    tqWarning( "prefMencoder::leVLabelTextChanged(const TQString&): Not implemented yet" );
}

void prefMencoder::teOpt3TextChanged()
{
    tqWarning( "prefMencoder::teOpt3TextChanged(): Not implemented yet" );
}

void prefMencoder::lbaCodecsCurrentChanged(TQListBoxItem*)
{
    tqWarning( "prefMencoder::lbaCodecsCurrentChanged(TQListBoxItem*): Not implemented yet" );
}

void prefMencoder::teOptATextChanged()
{
    tqWarning( "prefMencoder::teOptATextChanged(): Not implemented yet" );
}

void prefMencoder::leALabelTextChanged(const TQString&)
{
    tqWarning( "prefMencoder::leALabelTextChanged(const TQString&): Not implemented yet" );
}

void prefMencoder::btnOpt1Clicked()
{
    tqWarning( "prefMencoder::btnOpt1Clicked(): Not implemented yet" );
}

void prefMencoder::btnOpt2Clicked()
{
    tqWarning( "prefMencoder::btnOpt2Clicked(): Not implemented yet" );
}

void prefMencoder::btnOpt3Clicked()
{
    tqWarning( "prefMencoder::btnOpt3Clicked(): Not implemented yet" );
}

void prefMencoder::btnOptAClicked()
{
    tqWarning( "prefMencoder::btnOptAClicked(): Not implemented yet" );
}

void prefMencoder::btnAddVClicked()
{
    tqWarning( "prefMencoder::btnAddVClicked(): Not implemented yet" );
}

void prefMencoder::btnDeleteVClicked()
{
    tqWarning( "prefMencoder::btnDeleteVClicked(): Not implemented yet" );
}

void prefMencoder::btnAddAClicked()
{
    tqWarning( "prefMencoder::btnAddAClicked(): Not implemented yet" );
}

void prefMencoder::btnDeleteAClicked()
{
    tqWarning( "prefMencoder::btnDeleteAClicked(): Not implemented yet" );
}

void prefMencoder::leFourccTextChanged(const TQString&)
{
    tqWarning( "prefMencoder::leFourccTextChanged(const TQString&): Not implemented yet" );
}

void prefMencoder::bResetClicked()
{
    tqWarning( "prefMencoder::bResetClicked(): Not implemented yet" );
}

#include "prefMencoder.moc"