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

#include "configDlg.h"

#include <tqvariant.h>
#include <tqtable.h>
#include <kpushbutton.h>
#include <tqlayout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
#include "kpushbutton.h"

/*
 *  Constructs a configDlg as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
configDlg::configDlg( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "configDlg" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    configDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "configDlgLayout"); 

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

    configDlgLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
    spacer4 = new TQSpacerItem( 20, 190, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    configDlgLayout->addItem( spacer4, 2, 1 );

    tblDevices = new TQTable( this, "tblDevices" );
    tblDevices->setNumCols( tblDevices->numCols() + 1 );
    tblDevices->horizontalHeader()->setLabel( tblDevices->numCols() - 1, tr2i18n( "device" ) );
    tblDevices->setNumCols( tblDevices->numCols() + 1 );
    tblDevices->horizontalHeader()->setLabel( tblDevices->numCols() - 1, tr2i18n( "label" ) );
    tblDevices->setNumCols( tblDevices->numCols() + 1 );
    tblDevices->horizontalHeader()->setLabel( tblDevices->numCols() - 1, tr2i18n( "Input" ) );
    tblDevices->setNumCols( tblDevices->numCols() + 1 );
    tblDevices->horizontalHeader()->setLabel( tblDevices->numCols() - 1, tr2i18n( "Output" ) );
    tblDevices->setResizePolicy( TQTable::Default );
    tblDevices->setVScrollBarMode( TQTable::Auto );
    tblDevices->setNumRows( 0 );
    tblDevices->setNumCols( 4 );
    tblDevices->setShowGrid( TRUE );
    tblDevices->setSelectionMode( TQTable::Single );
    tblDevices->setFocusStyle( TQTable::SpreadSheet );

    configDlgLayout->addMultiCellWidget( tblDevices, 1, 2, 0, 0 );

    layout4 = new TQVBoxLayout( 0, 0, 6, "layout4"); 

    bAdd = new KPushButton( this, "bAdd" );
    bAdd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, bAdd->sizePolicy().hasHeightForWidth() ) );
    bAdd->setProperty( "stdItem", 27 );
    layout4->addWidget( bAdd );

    bRemove = new KPushButton( this, "bRemove" );
    bRemove->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, bRemove->sizePolicy().hasHeightForWidth() ) );
    bRemove->setProperty( "stdItem", 28 );
    layout4->addWidget( bRemove );

    configDlgLayout->addLayout( layout4, 1, 1 );
    languageChange();
    resize( TQSize(578, 342).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( bRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bRemoveClick() ) );
    connect( bAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( bAddClick() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void configDlg::languageChange()
{
    setCaption( tr2i18n( "k9Copy - Devices" ) );
    tblDevices->horizontalHeader()->setLabel( 0, tr2i18n( "device" ) );
    tblDevices->horizontalHeader()->setLabel( 1, tr2i18n( "label" ) );
    tblDevices->horizontalHeader()->setLabel( 2, tr2i18n( "Input" ) );
    tblDevices->horizontalHeader()->setLabel( 3, tr2i18n( "Output" ) );
    bAdd->setText( tr2i18n( "Add" ) );
    bAdd->setAccel( TQKeySequence( TQString() ) );
    bRemove->setText( tr2i18n( "Remove" ) );
    bRemove->setAccel( TQKeySequence( TQString() ) );
}

void configDlg::bRemoveClick()
{
    qWarning( "configDlg::bRemoveClick(): Not implemented yet" );
}

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

void configDlg::bOkClick()
{
    qWarning( "configDlg::bOkClick(): Not implemented yet" );
}

#include "configDlg.moc"