summaryrefslogtreecommitdiffstats
path: root/katapult/katapult/settings.cpp
blob: 33a3ce1ca95724f7fd28a6bf77ff9c7268add01a (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
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/doros/src/local/kde/katapult/katapult/settings.ui'
**
** Created: Fri Feb 18 12:48:28 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.3   edited Nov 24 2003 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "settings.h"

#include <tqvariant.h>
#include <tqlistbox.h>
#include <tqtabwidget.h>
#include <tqwidget.h>
#include <tqpushbutton.h>
#include <layout.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>

/*
 *  Constructs a MyDialog1 as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
MyDialog1::MyDialog1( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "MyDialog1" );
    setSizeGripEnabled( TRUE );
    MyDialog1Layout = new TQGridLayout( this, 1, 1, 11, 6, "MyDialog1Layout"); 

    listBox = new TQListBox( this, "listBox" );
    listBox->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, listBox->sizePolicy().hasHeightForWidth() ) );

    MyDialog1Layout->addWidget( listBox, 0, 0 );

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

    Widget2 = new TQWidget( tabWidget, "Widget2" );
    tabWidget->insertTab( Widget2, TQString("") );

    Widget3 = new TQWidget( tabWidget, "Widget3" );
    tabWidget->insertTab( Widget3, TQString("") );

    MyDialog1Layout->addWidget( tabWidget, 0, 1 );

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

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    buttonHelp->setAutoDefault( TRUE );
    Layout1->addWidget( buttonHelp );
   Qt::Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem(Qt::Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    Layout1->addWidget( buttonCancel );

    MyDialog1Layout->addMultiCellLayout( Layout1, 1, 1, 0, 1 );
    languageChange();
    resize( TQSize(597, 364).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) );
    connect( buttonCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MyDialog1::languageChange()
{
    setCaption( tr2i18n( "MyDialog1" ) );
    listBox->clear();
    listBox->insertItem( tr2i18n( "New Item" ) );
    tabWidget->changeTab( Widget2, tr2i18n( "Tab" ) );
    tabWidget->changeTab( Widget3, tr2i18n( "Tab" ) );
    buttonHelp->setText( tr2i18n( "&Help" ) );
    buttonHelp->setAccel( TQKeySequence( tr2i18n( "F1" ) ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonOk->setAccel( TQKeySequence( TQString() ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
    buttonCancel->setAccel( TQKeySequence( TQString() ) );
}

#include "settings.moc"