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

#include "k9mainw.h"

#include <tqvariant.h>
#include <tqpushbutton.h>
#include <tqlabel.h>
#include <kselect.h>
#include <tqheader.h>
#include <tqlistview.h>
#include <kcombobox.h>
#include <tqcombobox.h>
#include <kpushbutton.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kselect.h"
#include "kcombobox.h"
#include "klineedit.h"
#include "kpushbutton.h"

/*
 *  Constructs a MainDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
MainDlg::MainDlg( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "MainDlg" );
    tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( TQSize( 0, 200 ) );
    MainDlgLayout = new TQGridLayout( this, 1, 1, 2, 6, "MainDlgLayout"); 

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

    MainDlgLayout->addWidget( lblInput_2, 1, 0 );

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

    MainDlgLayout->addWidget( lblInput, 0, 0 );

    tab = new TQWidget( this, "tab" );
    tabLayout = new TQGridLayout( tab, 1, 1, 1, 0, "tabLayout"); 

    factor = new KGradientSelector( tab, "factor" );
    factor->setEnabled( FALSE );
    factor->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, factor->sizePolicy().hasHeightForWidth() ) );
    factor->setMinimumSize( TQSize( 0, 15 ) );
    factor->setValue( 0 );
    factor->setMinValue( 0 );
    factor->setMaxValue( 100 );
    factor->setFirstColor( TQColor( 170, 0, 0 ) );
    factor->setSecondColor( TQColor( 0, 255, 0 ) );

    tabLayout->addWidget( factor, 1, 0 );

    listView1 = new TQListView( tab, "listView1" );
    listView1->addColumn( tr2i18n( "Title" ) );
    listView1->addColumn( tr2i18n( "Size" ) );
    listView1->header()->setResizeEnabled( FALSE, listView1->header()->count() - 1 );
    listView1->addColumn( tr2i18n( "Content" ) );
    listView1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, listView1->sizePolicy().hasHeightForWidth() ) );
    listView1->setMinimumSize( TQSize( 0, 200 ) );
    listView1->setShowSortIndicator( TRUE );

    tabLayout->addWidget( listView1, 0, 0 );

    MainDlgLayout->addMultiCellWidget( tab, 2, 2, 0, 4 );

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

    MainDlgLayout->addWidget( textLabel2_2, 1, 4 );

    cbBurnSpeed = new KComboBox( FALSE, this, "cbBurnSpeed" );
    cbBurnSpeed->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbBurnSpeed->sizePolicy().hasHeightForWidth() ) );
    cbBurnSpeed->setEditable( TRUE );

    MainDlgLayout->addWidget( cbBurnSpeed, 1, 3 );

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

    MainDlgLayout->addWidget( textLabel1_3, 1, 2 );

    cbInputDev = new TQComboBox( FALSE, this, "cbInputDev" );
    cbInputDev->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, cbInputDev->sizePolicy().hasHeightForWidth() ) );
    cbInputDev->setEditable( TRUE );
    cbInputDev->setAutoCompletion( TRUE );

    MainDlgLayout->addWidget( cbInputDev, 0, 1 );

    tqlayout2 = new TQHBoxLayout( 0, 0, 6, "tqlayout2"); 

    bInputOpenDir = new KPushButton( this, "bInputOpenDir" );
    bInputOpenDir->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bInputOpenDir->sizePolicy().hasHeightForWidth() ) );
    bInputOpenDir->setMinimumSize( TQSize( 22, 22 ) );
    bInputOpenDir->setMaximumSize( TQSize( 22, 22 ) );
    tqlayout2->addWidget( bInputOpenDir );

    bInputOpen = new KPushButton( this, "bInputOpen" );
    bInputOpen->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, bInputOpen->sizePolicy().hasHeightForWidth() ) );
    bInputOpen->setMinimumSize( TQSize( 22, 22 ) );
    bInputOpen->setMaximumSize( TQSize( 22, 22 ) );
    tqlayout2->addWidget( bInputOpen );
    spacer5_2 = new TQSpacerItem( 50, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tqlayout2->addItem( spacer5_2 );

    MainDlgLayout->addMultiCellLayout( tqlayout2, 0, 0, 2, 4 );

    cbOutputDev = new TQComboBox( FALSE, this, "cbOutputDev" );
    cbOutputDev->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, cbOutputDev->sizePolicy().hasHeightForWidth() ) );
    cbOutputDev->setEditable( FALSE );
    cbOutputDev->setAutoCompletion( TRUE );

    MainDlgLayout->addWidget( cbOutputDev, 1, 1 );
    languageChange();
    resize( TQSize(743, 585).expandedTo(tqminimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( listView1, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( listView1CurrentChanged(TQListViewItem*) ) );
    connect( cbOutputDev, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( cbOutputDevActivated(int) ) );
    connect( bInputOpen, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bInputOpenClick() ) );
    connect( bInputOpenDir, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bInputOpenDirClick() ) );
    connect( listView1, TQT_SIGNAL( itemRenamed(TQListViewItem*,int) ), this, TQT_SLOT( itemRenamed(TQListViewItem*,int) ) );

    // tab order
    setTabOrder( cbInputDev, cbOutputDev );
    setTabOrder( cbOutputDev, bInputOpenDir );
    setTabOrder( bInputOpenDir, bInputOpen );
    setTabOrder( bInputOpen, cbBurnSpeed );
    setTabOrder( cbBurnSpeed, listView1 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MainDlg::languageChange()
{
    setCaption( tr2i18n( "MainDlg" ) );
    lblInput_2->setText( tr2i18n( "Output device " ) );
    lblInput->setText( tr2i18n( "input device" ) );
    listView1->header()->setLabel( 0, tr2i18n( "Title" ) );
    listView1->header()->setLabel( 1, tr2i18n( "Size" ) );
    listView1->header()->setLabel( 2, tr2i18n( "Content" ) );
    textLabel2_2->setText( tr2i18n( "X" ) );
    cbBurnSpeed->clear();
    cbBurnSpeed->insertItem( tr2i18n( "default" ) );
    textLabel1_3->setText( tr2i18n( "@" ) );
    bInputOpenDir->setText( TQString() );
    TQToolTip::add( bInputOpenDir, tr2i18n( "Open a folder" ) );
    bInputOpen->setText( TQString() );
    TQToolTip::add( bInputOpen, tr2i18n( "Open an iso image" ) );
}

void MainDlg::bSaveClick()
{
    qWarning( "MainDlg::bSaveClick(): Not implemented yet" );
}

void MainDlg::bDevicesClick()
{
    qWarning( "MainDlg::bDevicesClick(): Not implemented yet" );
}

void MainDlg::listView1CurrentChanged(TQListViewItem*)
{
    qWarning( "MainDlg::listView1CurrentChanged(TQListViewItem*): Not implemented yet" );
}

void MainDlg::cbOutputDevActivated(int)
{
    qWarning( "MainDlg::cbOutputDevActivated(int): Not implemented yet" );
}

void MainDlg::bInputOpenClick()
{
    qWarning( "MainDlg::bInputOpenClick(): Not implemented yet" );
}

void MainDlg::bInputOpenDirClick()
{
    qWarning( "MainDlg::bInputOpenDirClick(): Not implemented yet" );
}

void MainDlg::ckMp4AspectRatioClick()
{
    qWarning( "MainDlg::ckMp4AspectRatioClick(): Not implemented yet" );
}

void MainDlg::itemRenamed(TQListViewItem*,int)
{
    qWarning( "MainDlg::itemRenamed(TQListViewItem*,int): Not implemented yet" );
}

#include "k9mainw.moc"