summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/wizard
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtjava/javalib/examples/wizard
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtjava/javalib/examples/wizard')
-rw-r--r--qtjava/javalib/examples/wizard/Main.java2
-rw-r--r--qtjava/javalib/examples/wizard/Wizard.java116
2 files changed, 59 insertions, 59 deletions
diff --git a/qtjava/javalib/examples/wizard/Main.java b/qtjava/javalib/examples/wizard/Main.java
index 9f689214..4dbbebd3 100644
--- a/qtjava/javalib/examples/wizard/Main.java
+++ b/qtjava/javalib/examples/wizard/Main.java
@@ -14,7 +14,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Wizard wizard = new Wizard();
wizard.setCaption("Qt Example - Wizard");
diff --git a/qtjava/javalib/examples/wizard/Wizard.java b/qtjava/javalib/examples/wizard/Wizard.java
index dd0659dc..ab355e08 100644
--- a/qtjava/javalib/examples/wizard/Wizard.java
+++ b/qtjava/javalib/examples/wizard/Wizard.java
@@ -10,11 +10,11 @@
import org.kde.qt.*;
-class Wizard extends QWizard
+class Wizard extends TQWizard
{
-protected QHBox page1, page2, page3;
-protected QLineEdit key, firstName, lastName, address, phone, email;
-protected QLabel lKey, lFirstName, lLastName, lAddress, lPhone, lEmail;
+protected TQHBox page1, page2, page3;
+protected TQLineEdit key, firstName, lastName, address, phone, email;
+protected TQLabel lKey, lFirstName, lLastName, lAddress, lPhone, lEmail;
@@ -24,7 +24,7 @@ Wizard( )
this(null, null);
}
-Wizard( QWidget parent, String name )
+Wizard( TQWidget parent, String name )
{
super( parent, name, true );
setupPage1();
@@ -37,11 +37,11 @@ Wizard( QWidget parent, String name )
void setupPage1()
{
- page1 = new QHBox( this );
+ page1 = new TQHBox( this );
page1.setSpacing(8);
- QLabel info = new QLabel( page1 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page1 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "Enter your personal\n"
+ "key here.\n\n"
+ "Your personal key\n"
@@ -49,15 +49,15 @@ void setupPage1()
info.setIndent( 8 );
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page1 );
+ TQVBox page = new TQVBox( page1 );
- QHBox row1 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
- new QLabel( "Key:", row1 );
+ new TQLabel( "Key:", row1 );
- key = new QLineEdit( row1 );
+ key = new TQLineEdit( row1 );
key.setMaxLength( 4 );
- key.setValidator( new QIntValidator( 1000, 9999, key ) );
+ key.setValidator( new TQIntValidator( 1000, 9999, key ) );
connect( key, SIGNAL(" textChanged( String )"),
this, SLOT(" keyChanged( String )") );
@@ -70,37 +70,37 @@ void setupPage1()
void setupPage2()
{
- page2 = new QHBox( this );
+ page2 = new TQHBox( this );
page2.setSpacing(8);
- QLabel info = new QLabel( page2 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page2 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "\n"
+ " Enter your personal \n"
+ " data here. \n\n"
- + " The required fields are \n"
+ + " The retquired fields are \n"
+ " First Name, Last Name \n"
+ " and E-Mail. \n" );
info.setIndent(8);
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page2 );
+ TQVBox page = new TQVBox( page2 );
- QHBox row1 = new QHBox( page );
- QHBox row2 = new QHBox( page );
- QHBox row3 = new QHBox( page );
- QHBox row4 = new QHBox( page );
- QHBox row5 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
+ TQHBox row2 = new TQHBox( page );
+ TQHBox row3 = new TQHBox( page );
+ TQHBox row4 = new TQHBox( page );
+ TQHBox row5 = new TQHBox( page );
- QLabel label1 = new QLabel( " First Name: ", row1 );
+ TQLabel label1 = new TQLabel( " First Name: ", row1 );
label1.setAlignment( Qt.AlignVCenter );
- QLabel label2 = new QLabel( " Last Name: ", row2 );
+ TQLabel label2 = new TQLabel( " Last Name: ", row2 );
label2.setAlignment( Qt.AlignVCenter );
- QLabel label3 = new QLabel( " Address: ", row3 );
+ TQLabel label3 = new TQLabel( " Address: ", row3 );
label3.setAlignment( Qt.AlignVCenter );
- QLabel label4 = new QLabel( " Phone Number: ", row4 );
+ TQLabel label4 = new TQLabel( " Phone Number: ", row4 );
label4.setAlignment( Qt.AlignVCenter );
- QLabel label5 = new QLabel( " E-Mail: ", row5 );
+ TQLabel label5 = new TQLabel( " E-Mail: ", row5 );
label5.setAlignment( Qt.AlignVCenter );
label1.setMinimumWidth( label4.sizeHint().width() );
@@ -109,11 +109,11 @@ void setupPage2()
label4.setMinimumWidth( label4.sizeHint().width() );
label5.setMinimumWidth( label4.sizeHint().width() );
- firstName = new QLineEdit( row1 );
- lastName = new QLineEdit( row2 );
- address = new QLineEdit( row3 );
- phone = new QLineEdit( row4 );
- email = new QLineEdit( row5 );
+ firstName = new TQLineEdit( row1 );
+ lastName = new TQLineEdit( row2 );
+ address = new TQLineEdit( row3 );
+ phone = new TQLineEdit( row4 );
+ email = new TQLineEdit( row5 );
connect( firstName, SIGNAL(" textChanged( String )"),
this, SLOT(" dataChanged( String )") );
@@ -129,11 +129,11 @@ void setupPage2()
void setupPage3()
{
- page3 = new QHBox( this );
+ page3 = new TQHBox( this );
page3.setSpacing(8);
- QLabel info = new QLabel( page3 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page3 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "\n"
+ " Look here to see of \n"
+ " the data you entered \n"
@@ -145,26 +145,26 @@ void setupPage3()
info.setAlignment( AlignTop|AlignLeft );
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page3 );
+ TQVBox page = new TQVBox( page3 );
- QHBox row1 = new QHBox( page );
- QHBox row2 = new QHBox( page );
- QHBox row3 = new QHBox( page );
- QHBox row4 = new QHBox( page );
- QHBox row5 = new QHBox( page );
- QHBox row6 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
+ TQHBox row2 = new TQHBox( page );
+ TQHBox row3 = new TQHBox( page );
+ TQHBox row4 = new TQHBox( page );
+ TQHBox row5 = new TQHBox( page );
+ TQHBox row6 = new TQHBox( page );
- QLabel label1 = new QLabel( " Personal Key: ", row1 );
+ TQLabel label1 = new TQLabel( " Personal Key: ", row1 );
label1.setAlignment( Qt.AlignVCenter );
- QLabel label2 = new QLabel( " First Name: ", row2 );
+ TQLabel label2 = new TQLabel( " First Name: ", row2 );
label2.setAlignment( Qt.AlignVCenter );
- QLabel label3 = new QLabel( " Last Name: ", row3 );
+ TQLabel label3 = new TQLabel( " Last Name: ", row3 );
label3.setAlignment( Qt.AlignVCenter );
- QLabel label4 = new QLabel( " Address: ", row4 );
+ TQLabel label4 = new TQLabel( " Address: ", row4 );
label4.setAlignment( Qt.AlignVCenter );
- QLabel label5 = new QLabel( " Phone Number: ", row5 );
+ TQLabel label5 = new TQLabel( " Phone Number: ", row5 );
label5.setAlignment( Qt.AlignVCenter );
- QLabel label6 = new QLabel( " E-Mail: ", row6 );
+ TQLabel label6 = new TQLabel( " E-Mail: ", row6 );
label6.setAlignment( Qt.AlignVCenter );
label1.setMinimumWidth( label1.sizeHint().width() );
@@ -174,12 +174,12 @@ void setupPage3()
label5.setMinimumWidth( label1.sizeHint().width() );
label6.setMinimumWidth( label1.sizeHint().width() );
- lKey = new QLabel( row1 );
- lFirstName = new QLabel( row2 );
- lLastName = new QLabel( row3 );
- lAddress = new QLabel( row4 );
- lPhone = new QLabel( row5 );
- lEmail = new QLabel( row6 );
+ lKey = new TQLabel( row1 );
+ lFirstName = new TQLabel( row2 );
+ lLastName = new TQLabel( row3 );
+ lAddress = new TQLabel( row4 );
+ lPhone = new TQLabel( row5 );
+ lEmail = new TQLabel( row6 );
addPage( page3, "Finish" );
@@ -187,12 +187,12 @@ void setupPage3()
setHelpEnabled( page3, false );
}
-// The QWizard.showPage() virtual method callback isn't implemented in the java
+// The TQWizard.showPage() virtual method callback isn't implemented in the java
// bindings yet, so use the selected() signal connected to this slot 'doShowPage()'
// instead..
public void doShowPage( String title )
{
- QWidget page = currentPage();
+ TQWidget page = currentPage();
if ( page == page1 ) {
} else if ( page == page2 ) {
@@ -221,7 +221,7 @@ void keyChanged( String text )
{
StringBuffer t = new StringBuffer(text);
int[] p = { 0 };
- boolean on = ( key.validator().validate(t, p) == QValidator.Acceptable );
+ boolean on = ( key.validator().validate(t, p) == TQValidator.Acceptable );
nextButton().setEnabled( on );
}