summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/demo/sql/ConnectDialog.java
blob: ad7c331bd14b4f66fabad8728e2d16b443122d00 (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
/****************************************************************************
** Form implementation generated from reading ui file 'connect.ui'
**
** Created: Wed Aug 8 03:35:48 2001
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
import org.kde.qt.*;

public class ConnectDialog extends TQDialog { 
    TQLineEdit editDatabase;
    TQLabel TextLabel3;
    TQLineEdit editPassword;
    TQLabel TextLabel4;
    TQLabel TextLabel4_2;
    TQLabel TextLabel2;
    TQLabel TextLabel5;
    TQComboBox comboDriver;
    TQLineEdit editHostname;
    TQLineEdit editUsername;
    TQPushButton PushButton1;
    TQPushButton PushButton2;

    TQGridLayout ConnectDialogLayout;
	TQSpacerItem spacer;

/* 
 *  Constructs a ConnectDialog which is 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.
 */
ConnectDialog( TQWidget parent,  String name, boolean modal, int fl )
{
    super( parent, name, modal, fl );
    if ( name == null )
	setName( "ConnectDialog" );
    resize( 294, 207 ); 
    setCaption( trUtf8( "Connect..." ) );
    ConnectDialogLayout = new TQGridLayout( this ); 
    ConnectDialogLayout.setSpacing( 6 );
    ConnectDialogLayout.setMargin( 11 );

    editDatabase = new TQLineEdit( this, "editDatabase" );

    ConnectDialogLayout.addMultiCellWidget( editDatabase, 1, 1, 2, 3 );

    TextLabel3 = new TQLabel( this, "TextLabel3" );
    TextLabel3.setText( trUtf8( "Database Name:" ) );

    ConnectDialogLayout.addMultiCellWidget( TextLabel3, 1, 1, 0, 1 );

    editPassword = new TQLineEdit( this, "editPassword" );
    editPassword.setEchoMode( TQLineEdit.Password );

    ConnectDialogLayout.addMultiCellWidget( editPassword, 3, 3, 2, 3 );

    TextLabel4 = new TQLabel( this, "TextLabel4" );
    TextLabel4.setText( trUtf8( "&Username:" ) );

    ConnectDialogLayout.addMultiCellWidget( TextLabel4, 2, 2, 0, 1 );

    TextLabel4_2 = new TQLabel( this, "TextLabel4_2" );
    TextLabel4_2.setText( trUtf8( "&Password:" ) );

    ConnectDialogLayout.addMultiCellWidget( TextLabel4_2, 3, 3, 0, 1 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    TextLabel2.setText( trUtf8( "D&river" ) );

    ConnectDialogLayout.addMultiCellWidget( TextLabel2, 0, 0, 0, 1 );

    TextLabel5 = new TQLabel( this, "TextLabel5" );
    TextLabel5.setText( trUtf8( "&Hostname:" ) );

    ConnectDialogLayout.addMultiCellWidget( TextLabel5, 4, 4, 0, 1 );

    comboDriver = new TQComboBox( false, this, "comboDriver" );
    comboDriver.setEditable( true );

    ConnectDialogLayout.addMultiCellWidget( comboDriver, 0, 0, 2, 3 );

    editHostname = new TQLineEdit( this, "editHostname" );

    ConnectDialogLayout.addMultiCellWidget( editHostname, 4, 4, 2, 3 );

    editUsername = new TQLineEdit( this, "editUsername" );

    ConnectDialogLayout.addMultiCellWidget( editUsername, 2, 2, 2, 3 );

    PushButton1 = new TQPushButton( this, "PushButton1" );
    PushButton1.setText( trUtf8( "&OK" ) );
    PushButton1.setDefault( true );

    ConnectDialogLayout.addMultiCellWidget( PushButton1, 5, 5, 1, 2 );

    PushButton2 = new TQPushButton( this, "PushButton2" );
    PushButton2.setText( trUtf8( "&Cancel" ) );

    ConnectDialogLayout.addWidget( PushButton2, 5, 3 );
    spacer = new TQSpacerItem( 20, 20, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
    ConnectDialogLayout.addItem( spacer, 5, 0 );





    // signals and slots connections
    connect( PushButton1, SIGNAL( "clicked()" ), this, SLOT( "accept()" ) );
    connect( PushButton2, SIGNAL( "clicked()" ), this, SLOT( "reject()" ) );

    // tab order
    setTabOrder( comboDriver, editDatabase );
    setTabOrder( editDatabase, editUsername );
    setTabOrder( editUsername, editPassword );
    setTabOrder( editPassword, editHostname );
    setTabOrder( editHostname, PushButton1 );
    setTabOrder( PushButton1, PushButton2 );

    // buddies
    TextLabel4.setBuddy( editUsername );
    TextLabel4_2.setBuddy( editPassword );
    TextLabel2.setBuddy( comboDriver );
    TextLabel5.setBuddy( editHostname );
    init();
}

void init()
{
}

public void destroy()
{
}

}