summaryrefslogtreecommitdiffstats
path: root/ksquirrel/ksquirrel-libs-configurator/klc.cpp
blob: 4a90161ddfb2fe41092ffda75113f342e79d28e5 (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
#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './klc.ui'
**
** Created: Птн Дек 7 20:18:10 2007
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.7   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "klc.h"

#include <tqvariant.h>
#include <kdirlister.h>
#include <kio/job.h>
#include <tqheader.h>
#include <tqtimer.h>
#include <kio/netaccess.h>
#include <kapplication.h>
#include <dcopclient.h>
#include <tqpushbutton.h>
#include <tqlistview.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "./klc.ui.h"

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

    tqlayout1 = new TQHBoxLayout( 0, 0, 6, "tqlayout1"); 
    spacer1 = new TQSpacerItem( 371, 26, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    tqlayout1->addItem( spacer1 );

    pushApply = new TQPushButton( this, "pushApply" );
    tqlayout1->addWidget( pushApply );

    pushClose = new TQPushButton( this, "pushClose" );
    tqlayout1->addWidget( pushClose );

    KLCLayout->addMultiCellLayout( tqlayout1, 2, 2, 0, 1 );

    listDisabled = new TQListView( this, "listDisabled" );
    listDisabled->addColumn( tr2i18n( "..." ) );
    listDisabled->setEnabled( FALSE );
    listDisabled->setAllColumnsShowFocus( TRUE );
    listDisabled->setResizeMode( TQListView::AllColumns );

    KLCLayout->addWidget( listDisabled, 1, 1 );

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

    KLCLayout->addWidget( textLabel1_2, 0, 1 );

    textLabel1 = new TQLabel( this, "textLabel1" );

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

    listEnabled = new TQListView( this, "listEnabled" );
    listEnabled->addColumn( tr2i18n( "..." ) );
    listEnabled->setEnabled( FALSE );
    listEnabled->setAllColumnsShowFocus( TRUE );
    listEnabled->setResizeMode( TQListView::AllColumns );

    KLCLayout->addWidget( listEnabled, 1, 0 );
    languageChange();
    resize( TQSize(586, 425).expandedTo(tqminimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushApply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotApply() ) );
    connect( pushClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ) );

    // tab order
    setTabOrder( listEnabled, listDisabled );
    setTabOrder( listDisabled, pushApply );
    setTabOrder( pushApply, pushClose );
    init();
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KLC::languageChange()
{
    setCaption( tr2i18n( "Codec manager" ) );
    pushApply->setText( tr2i18n( "Apply" ) );
    pushClose->setText( tr2i18n( "Close" ) );
    listDisabled->header()->setLabel( 0, tr2i18n( "..." ) );
    textLabel1_2->setText( tr2i18n( "<b>Select codecs to enable:</b>" ) );
    textLabel1->setText( tr2i18n( "<b>Select codecs to disable:</b>" ) );
    listEnabled->header()->setLabel( 0, tr2i18n( "..." ) );
}

#include "klc.moc"