summaryrefslogtreecommitdiffstats
path: root/k9author/import.cpp
blob: 69ebdbcd5f7400c20e4976ad8fe4aba50cd43496 (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
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './import.ui'
**
** Created: dim. oct. 26 08:56:28 2008
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "import.h"

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

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

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

    importLayout->addWidget( textLabel1, 0, 0 );

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

    lvDVD = new TQListView( this, "lvDVD" );
    lvDVD->addColumn( tr2i18n( "Video files" ) );
    lvDVD->header()->setClickEnabled( FALSE, lvDVD->header()->count() - 1 );
    lvDVD->addColumn( tr2i18n( "..." ) );
    lvDVD->header()->setClickEnabled( FALSE, lvDVD->header()->count() - 1 );
    lvDVD->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, lvDVD->sizePolicy().hasHeightForWidth() ) );
    lvDVD->setMinimumSize( TQSize( 0, 200 ) );
    lvDVD->setRootIsDecorated( FALSE );
    lvDVD->setResizeMode( TQListView::AllColumns );

    tqlayout2->addMultiCellWidget( lvDVD, 0, 1, 0, 0 );

    importLayout->addMultiCellLayout( tqlayout2, 1, 1, 0, 3 );

    cbOutputDev = new KComboBox( FALSE, this, "cbOutputDev" );

    importLayout->addWidget( cbOutputDev, 0, 1 );

    cbFormat = new TQComboBox( FALSE, this, "cbFormat" );
    cbFormat->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, cbFormat->sizePolicy().hasHeightForWidth() ) );

    importLayout->addWidget( cbFormat, 0, 2 );

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

    importLayout->addWidget( lTotal, 2, 3 );

    gsTotal = new KGradientSelector( this, "gsTotal" );
    gsTotal->setEnabled( FALSE );
    gsTotal->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, gsTotal->sizePolicy().hasHeightForWidth() ) );
    gsTotal->setMaximumSize( TQSize( 32767, 13 ) );
    gsTotal->setValue( 0 );
    gsTotal->setMaxValue( 180 );
    gsTotal->setFirstColor( TQColor( 255, 77, 6 ) );
    gsTotal->setSecondColor( TQColor( 85, 255, 0 ) );

    importLayout->addMultiCellWidget( gsTotal, 2, 2, 0, 2 );
    languageChange();
    resize( TQSize(524, 416).expandedTo(tqminimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( lvDVD, TQT_SIGNAL( selectionChanged(TQListViewItem*) ), this, TQT_SLOT( lvDVDItemSelected(TQListViewItem*) ) );
    connect( cbFormat, TQT_SIGNAL( activated(const TQString&) ), this, TQT_SLOT( cbFormatActivated(const TQString&) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void import::languageChange()
{
    setCaption( tr2i18n( "import" ) );
    textLabel1->setText( tr2i18n( "Output" ) );
    lvDVD->header()->setLabel( 0, tr2i18n( "Video files" ) );
    lvDVD->header()->setLabel( 1, tr2i18n( "..." ) );
    cbFormat->clear();
    cbFormat->insertItem( tr2i18n( "PAL" ) );
    cbFormat->insertItem( tr2i18n( "NTSC" ) );
    lTotal->setText( tr2i18n( "--:--:--" ) );
}

void import::lvDVDItemSelected(TQListViewItem*)
{
    qWarning( "import::lvDVDItemSelected(TQListViewItem*): Not implemented yet" );
}

void import::bAddClick()
{
    qWarning( "import::bAddClick(): Not implemented yet" );
}

void import::cbFormatActivated(const TQString&)
{
    qWarning( "import::cbFormatActivated(const TQString&): Not implemented yet" );
}

#include "import.moc"