From 9ba04742771370f59740e32e11c5f3a1e6a1b70a Mon Sep 17 00:00:00 2001
From: Timothy Pearson
Date: Mon, 5 Dec 2011 15:55:57 -0600
Subject: Initial TQt conversion
---
qtjava/javalib/examples/aclock/AnalogClock.java | 30 +-
.../examples/addressbook/ABCentralWidget.java | 98 ++---
.../javalib/examples/addressbook/ABMainWindow.java | 24 +-
qtjava/javalib/examples/addressbook/Main.java | 2 +-
.../examples/application/ApplicationWindow.java | 68 ++--
qtjava/javalib/examples/application/Main.java | 4 +-
qtjava/javalib/examples/biff/Biff.java | 22 +-
qtjava/javalib/examples/biff/Main.java | 2 +-
.../examples/buttongroups/ButtonsGroups.java | 48 +--
qtjava/javalib/examples/buttongroups/Main.java | 2 +-
qtjava/javalib/examples/checklists/CheckLists.java | 62 +--
qtjava/javalib/examples/checklists/Main.java | 2 +-
qtjava/javalib/examples/cursor/CursorView.java | 24 +-
qtjava/javalib/examples/dclock/DigitalClock.java | 14 +-
qtjava/javalib/examples/dclock/Main.java | 2 +-
qtjava/javalib/examples/demo/sql/BookForm.java | 84 ++---
.../javalib/examples/demo/sql/ConnectDialog.java | 64 ++--
qtjava/javalib/examples/demo/sql/EditBookForm.java | 136 +++----
qtjava/javalib/examples/demo/sql/Main.java | 2 +-
qtjava/javalib/examples/demo/widgets/Main.java | 2 +-
.../javalib/examples/demo/widgets/WidgetsBase.java | 416 ++++++++++-----------
qtjava/javalib/examples/dragdrop/DropSite.java | 60 +--
qtjava/javalib/examples/dragdrop/Main.java | 28 +-
qtjava/javalib/examples/dragdrop/SecretDrag.java | 10 +-
qtjava/javalib/examples/dragdrop/SecretSource.java | 10 +-
qtjava/javalib/examples/dragdrop/trolltech.bmp | Bin 30054 -> 30055 bytes
qtjava/javalib/examples/dragdrop/trolltech.gif | Bin 42629 -> 42635 bytes
.../javalib/examples/drawlines/ConnectWidget.java | 30 +-
qtjava/javalib/examples/forever/Forever.java | 24 +-
qtjava/javalib/examples/hello/Hello.java | 18 +-
qtjava/javalib/examples/hello/Main.java | 6 +-
qtjava/javalib/examples/helpviewer/HelpWindow.java | 114 +++---
qtjava/javalib/examples/helpviewer/Main.java | 12 +-
qtjava/javalib/examples/iconview/ListenDND.java | 22 +-
qtjava/javalib/examples/layout/ExampleWidget.java | 48 +--
qtjava/javalib/examples/lineedits/LineEdits.java | 58 +--
qtjava/javalib/examples/lineedits/Main.java | 2 +-
qtjava/javalib/examples/listbox/ListBoxDemo.java | 62 +--
qtjava/javalib/examples/listbox/Main.java | 2 +-
qtjava/javalib/examples/mdi/ApplicationWindow.java | 90 ++---
qtjava/javalib/examples/mdi/MDIWindow.java | 38 +-
qtjava/javalib/examples/mdi/Main.java | 2 +-
qtjava/javalib/examples/menu/MenuExample.java | 70 ++--
qtjava/javalib/examples/menu/README | 2 +-
.../javalib/examples/picture/PictureDisplay.java | 36 +-
qtjava/javalib/examples/picture/car_orig.pic | Bin 1872 -> 1874 bytes
qtjava/javalib/examples/popup/Frame.java | 48 +--
qtjava/javalib/examples/progressbar/Main.java | 2 +-
.../javalib/examples/progressbar/ProgressBar.java | 34 +-
qtjava/javalib/examples/qfd/FontDisplayer.java | 66 ++--
qtjava/javalib/examples/qfd/Main.java | 8 +-
qtjava/javalib/examples/qmag/MagWidget.java | 82 ++--
.../javalib/examples/qwerty/ANSI_X3.110-1983.map | 44 +--
qtjava/javalib/examples/qwerty/Editor.java | 126 +++----
qtjava/javalib/examples/qwerty/IBM277.map | 36 +-
qtjava/javalib/examples/qwerty/IBM277.txt | 2 +-
qtjava/javalib/examples/qwerty/Main.java | 4 +-
qtjava/javalib/examples/rangecontrols/Main.java | 2 +-
.../examples/rangecontrols/RangeControls.java | 48 +--
qtjava/javalib/examples/richtext/Main.java | 2 +-
qtjava/javalib/examples/richtext/MyRichText.java | 24 +-
qtjava/javalib/examples/richtext/marble.png | Bin 26015 -> 26018 bytes
qtjava/javalib/examples/rot13/Rot13.java | 14 +-
qtjava/javalib/examples/scribble/Main.java | 6 +-
qtjava/javalib/examples/scribble/Scribble.java | 72 ++--
.../examples/showimg/ImageIconProvider.java | 12 +-
.../javalib/examples/showimg/ImageTextEditor.java | 56 +--
qtjava/javalib/examples/showimg/ImageViewer.java | 144 +++----
qtjava/javalib/examples/showimg/Main.java | 14 +-
qtjava/javalib/examples/showimg/README | 2 +-
qtjava/javalib/examples/sound/SoundPlayer.java | 36 +-
qtjava/javalib/examples/splitter/Test.java | 20 +-
qtjava/javalib/examples/tabdialog/Main.java | 2 +-
qtjava/javalib/examples/tabdialog/TabDialog.java | 70 ++--
.../examples/table/small-table-demo/Main.java | 16 +-
qtjava/javalib/examples/textedit/Main.java | 2 +-
qtjava/javalib/examples/textedit/TextEdit.java | 178 ++++-----
qtjava/javalib/examples/textedit/example.html | 208 +++++------
qtjava/javalib/examples/tux/MoveMe.java | 24 +-
qtjava/javalib/examples/widgets/MyWidgetView.java | 8 +-
qtjava/javalib/examples/widgets/README | 2 +-
qtjava/javalib/examples/widgets/WidgetView.java | 372 +++++++++---------
qtjava/javalib/examples/widgets/trolltech.bmp | Bin 13366 -> 13368 bytes
qtjava/javalib/examples/widgets/trolltech.gif | Bin 42629 -> 42635 bytes
qtjava/javalib/examples/widgets/tt-logo.png | Bin 4547 -> 4548 bytes
qtjava/javalib/examples/wizard/Main.java | 2 +-
qtjava/javalib/examples/wizard/Wizard.java | 116 +++---
87 files changed, 1878 insertions(+), 1878 deletions(-)
(limited to 'qtjava/javalib/examples')
diff --git a/qtjava/javalib/examples/aclock/AnalogClock.java b/qtjava/javalib/examples/aclock/AnalogClock.java
index 2d97cb67..a0ced62a 100644
--- a/qtjava/javalib/examples/aclock/AnalogClock.java
+++ b/qtjava/javalib/examples/aclock/AnalogClock.java
@@ -11,25 +11,25 @@
import org.kde.qt.*;
import java.util.Date;
-class AnalogClock extends QWidget // analog clock widget
+class AnalogClock extends TQWidget // analog clock widget
{
private Date time;
//
-// Constructs an analog clock widget that uses an internal QTimer.
+// Constructs an analog clock widget that uses an internal TQTimer.
//
-public AnalogClock( QWidget parent )
+public AnalogClock( TQWidget parent )
{
this(parent, null);
}
-public AnalogClock( QWidget parent, String name )
+public AnalogClock( TQWidget parent, String name )
{
super( parent, name );
time = new Date(); // get current time
- QTimer internalTimer = new QTimer( this ); // create internal timer
+ TQTimer internalTimer = new TQTimer( this ); // create internal timer
connect( internalTimer, SIGNAL("timeout()"), SLOT("timeout()") );
internalTimer.start( 5000 ); // emit signal every 5 seconds
}
@@ -42,7 +42,7 @@ public void setTime( Date t )
}
//
-// The QTimer.timeout() signal is received by this slot.
+// The TQTimer.timeout() signal is received by this slot.
//
public void timeout()
@@ -59,11 +59,11 @@ public void timeout()
}
-public void paintEvent( QPaintEvent event )
+public void paintEvent( TQPaintEvent event )
{
if ( autoMask() )
return;
- QPainter paint = new QPainter( this );
+ TQPainter paint = new TQPainter( this );
paint.setBrush( colorGroup().foreground() );
drawClock( paint );
}
@@ -73,10 +73,10 @@ public void paintEvent( QPaintEvent event )
public void updateMask() // paint clock mask
{
- QBitmap bm = new QBitmap( size() );
+ TQBitmap bm = new TQBitmap( size() );
bm.fill( color0() ); //transparent
- QPainter paint = new QPainter();
+ TQPainter paint = new TQPainter();
paint.begin( bm, this );
paint.setBrush( color1() ); // use non-transparent color
paint.setPen( color1() );
@@ -92,19 +92,19 @@ public void updateMask() // paint clock mask
// the a centered square, as big as possible. The painter's pen and
// brush colors are used.
//
-public void drawClock( QPainter paint )
+public void drawClock( TQPainter paint )
{
paint.save();
paint.setWindow( -500,-500, 1000,1000 );
- QRect v = paint.viewport();
+ TQRect v = paint.viewport();
int d = v.width() < v.height() ? v.width() : v.height();
paint.setViewport( v.left() + (v.width()-d)/2,
v.top() + (v.height()-d)/2, d, d );
- // time = QTime.currentTime();
- QPointArray pts = new QPointArray();
+ // time = TQTime.currentTime();
+ TQPointArray pts = new TQPointArray();
paint.save();
paint.rotate( 30*(time.getHours()%12-3) + time.getMinutes()/2 );
@@ -138,7 +138,7 @@ public void setAutoMask(boolean b)
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
AnalogClock clock = new AnalogClock(null, null);
if ( args.length == 1 && args[0].equals("-transparent") )
clock.setAutoMask( true );
diff --git a/qtjava/javalib/examples/addressbook/ABCentralWidget.java b/qtjava/javalib/examples/addressbook/ABCentralWidget.java
index 8dd6af37..2819ea8c 100644
--- a/qtjava/javalib/examples/addressbook/ABCentralWidget.java
+++ b/qtjava/javalib/examples/addressbook/ABCentralWidget.java
@@ -10,21 +10,21 @@
import org.kde.qt.*;
import java.util.*;
-public class ABCentralWidget extends QWidget
+public class ABCentralWidget extends TQWidget
{
- protected QGridLayout mainGrid;
- protected QTabWidget tabWidget;
- protected QListView listView;
- protected QPushButton add, change, find;
- protected QLineEdit iFirstName, iLastName, iAddress, iEMail,
+ protected TQGridLayout mainGrid;
+ protected TQTabWidget tabWidget;
+ protected TQListView listView;
+ protected TQPushButton add, change, find;
+ protected TQLineEdit iFirstName, iLastName, iAddress, iEMail,
sFirstName, sLastName, sAddress, sEMail;
- protected QCheckBox cFirstName, cLastName, cAddress, cEMail;
+ protected TQCheckBox cFirstName, cLastName, cAddress, cEMail;
-public ABCentralWidget( QWidget parent, String name )
+public ABCentralWidget( TQWidget parent, String name )
{
super( parent, name );
- mainGrid = new QGridLayout( this, 2, 1, 5, 5 );
+ mainGrid = new TQGridLayout( this, 2, 1, 5, 5 );
setupTabWidget();
setupListView();
@@ -33,7 +33,7 @@ public ABCentralWidget( QWidget parent, String name )
mainGrid.setRowStretch( 1, 1 );
}
-public ABCentralWidget( QWidget parent )
+public ABCentralWidget( TQWidget parent )
{
this(parent, null);
}
@@ -43,15 +43,15 @@ public void save( String filename )
if ( listView.firstChild() == null )
return;
- QFile f = new QFile( filename );
- if ( !f.open( QIODevice.IO_WriteOnly ) )
+ TQFile f = new TQFile( filename );
+ if ( !f.open( TQIODevice.IO_WriteOnly ) )
return;
- QTextStream t = new QTextStream( f );
+ TQTextStream t = new TQTextStream( f );
Iterator it = listView.itemList().iterator();
while ( it.hasNext() ) {
- QListViewItem currentItem = (QListViewItem) it.next();
+ TQListViewItem currentItem = (TQListViewItem) it.next();
for ( int i = 0; i < 4; i++ ) {
t.writeRawBytes( currentItem.text(i), currentItem.text(i).length() );
t.writeRawBytes( "\n", 1 );
@@ -65,14 +65,14 @@ public void load( String filename )
{
listView.clear();
- QFile f = new QFile( filename );
- if ( !f.open( QIODevice.IO_ReadOnly ) )
+ TQFile f = new TQFile( filename );
+ if ( !f.open( TQIODevice.IO_ReadOnly ) )
return;
- QTextStream t = new QTextStream( f );
+ TQTextStream t = new TQTextStream( f );
while ( !t.atEnd() ) {
- QListViewItem item = new QListViewItem( listView );
+ TQListViewItem item = new TQListViewItem( listView );
for ( int i = 0; i < 4; i++ )
item.setText( i, t.readLine() );
}
@@ -82,53 +82,53 @@ public void load( String filename )
public void setupTabWidget()
{
- tabWidget = new QTabWidget( this );
+ tabWidget = new TQTabWidget( this );
- QWidget input = new QWidget( tabWidget );
- QGridLayout grid1 = new QGridLayout( input, 2, 5, 5, 5 );
+ TQWidget input = new TQWidget( tabWidget );
+ TQGridLayout grid1 = new TQGridLayout( input, 2, 5, 5, 5 );
- QLabel liFirstName = new QLabel( "First &Name", input );
+ TQLabel liFirstName = new TQLabel( "First &Name", input );
liFirstName.resize( liFirstName.sizeHint() );
grid1.addWidget( liFirstName, 0, 0 );
- QLabel liLastName = new QLabel( "&Last Name", input );
+ TQLabel liLastName = new TQLabel( "&Last Name", input );
liLastName.resize( liLastName.sizeHint() );
grid1.addWidget( liLastName, 0, 1 );
- QLabel liAddress = new QLabel( "Add&ress", input );
+ TQLabel liAddress = new TQLabel( "Add&ress", input );
liAddress.resize( liAddress.sizeHint() );
grid1.addWidget( liAddress, 0, 2 );
- QLabel liEMail = new QLabel( "&E-Mail", input );
+ TQLabel liEMail = new TQLabel( "&E-Mail", input );
liEMail.resize( liEMail.sizeHint() );
grid1.addWidget( liEMail, 0, 3 );
- add = new QPushButton( "A&dd", input );
+ add = new TQPushButton( "A&dd", input );
add.resize( add.sizeHint() );
grid1.addWidget( add, 0, 4 );
connect( add, SIGNAL( "clicked()" ), this, SLOT( "addEntry()" ) );
- iFirstName = new QLineEdit( input );
+ iFirstName = new TQLineEdit( input );
iFirstName.resize( iFirstName.sizeHint() );
grid1.addWidget( iFirstName, 1, 0 );
liFirstName.setBuddy( iFirstName );
- iLastName = new QLineEdit( input );
+ iLastName = new TQLineEdit( input );
iLastName.resize( iLastName.sizeHint() );
grid1.addWidget( iLastName, 1, 1 );
liLastName.setBuddy( iLastName );
- iAddress = new QLineEdit( input );
+ iAddress = new TQLineEdit( input );
iAddress.resize( iAddress.sizeHint() );
grid1.addWidget( iAddress, 1, 2 );
liAddress.setBuddy( iAddress );
- iEMail = new QLineEdit( input );
+ iEMail = new TQLineEdit( input );
iEMail.resize( iEMail.sizeHint() );
grid1.addWidget( iEMail, 1, 3 );
liEMail.setBuddy( iEMail );
- change = new QPushButton( "&Change", input );
+ change = new TQPushButton( "&Change", input );
change.resize( change.sizeHint() );
grid1.addWidget( change, 1, 4 );
connect( change, SIGNAL( "clicked()" ), this, SLOT( "changeEntry()" ) );
@@ -137,46 +137,46 @@ public void setupTabWidget()
// --------------------------------------
- QWidget search = new QWidget( this );
- QGridLayout grid2 = new QGridLayout( search, 2, 5, 5, 5 );
+ TQWidget search = new TQWidget( this );
+ TQGridLayout grid2 = new TQGridLayout( search, 2, 5, 5, 5 );
- cFirstName = new QCheckBox( "First &Name", search );
+ cFirstName = new TQCheckBox( "First &Name", search );
cFirstName.resize( cFirstName.sizeHint() );
grid2.addWidget( cFirstName, 0, 0 );
connect( cFirstName, SIGNAL( "clicked()" ), this, SLOT( "toggleFirstName()" ) );
- cLastName = new QCheckBox( "&Last Name", search );
+ cLastName = new TQCheckBox( "&Last Name", search );
cLastName.resize( cLastName.sizeHint() );
grid2.addWidget( cLastName, 0, 1 );
connect( cLastName, SIGNAL( "clicked()" ), this, SLOT( "toggleLastName()" ) );
- cAddress = new QCheckBox( "Add&ress", search );
+ cAddress = new TQCheckBox( "Add&ress", search );
cAddress.resize( cAddress.sizeHint() );
grid2.addWidget( cAddress, 0, 2 );
connect( cAddress, SIGNAL( "clicked()" ), this, SLOT( "toggleAddress()" ) );
- cEMail = new QCheckBox( "&E-Mail", search );
+ cEMail = new TQCheckBox( "&E-Mail", search );
cEMail.resize( cEMail.sizeHint() );
grid2.addWidget( cEMail, 0, 3 );
connect( cEMail, SIGNAL( "clicked()" ), this, SLOT( "toggleEMail()" ) );
- sFirstName = new QLineEdit( search );
+ sFirstName = new TQLineEdit( search );
sFirstName.resize( sFirstName.sizeHint() );
grid2.addWidget( sFirstName, 1, 0 );
- sLastName = new QLineEdit( search );
+ sLastName = new TQLineEdit( search );
sLastName.resize( sLastName.sizeHint() );
grid2.addWidget( sLastName, 1, 1 );
- sAddress = new QLineEdit( search );
+ sAddress = new TQLineEdit( search );
sAddress.resize( sAddress.sizeHint() );
grid2.addWidget( sAddress, 1, 2 );
- sEMail = new QLineEdit( search );
+ sEMail = new TQLineEdit( search );
sEMail.resize( sEMail.sizeHint() );
grid2.addWidget( sEMail, 1, 3 );
- find = new QPushButton( "F&ind", search );
+ find = new TQPushButton( "F&ind", search );
find.resize( find.sizeHint() );
grid2.addWidget( find, 1, 4 );
connect( find, SIGNAL( "clicked()" ), this, SLOT( "findEntries()" ) );
@@ -194,15 +194,15 @@ public void setupTabWidget()
public void setupListView()
{
- listView = new QListView( this );
+ listView = new TQListView( this );
listView.addColumn( "First Name" );
listView.addColumn( "Last Name" );
listView.addColumn( "Address" );
listView.addColumn( "E-Mail" );
- listView.setSelectionMode( QListView.Extended );
+ listView.setSelectionMode( TQListView.Extended );
- connect( listView, SIGNAL( "clicked( QListViewItem )" ), this, SLOT( "itemSelected( QListViewItem )" ) );
+ connect( listView, SIGNAL( "clicked( TQListViewItem )" ), this, SLOT( "itemSelected( TQListViewItem )" ) );
mainGrid.addWidget( listView, 1, 0 );
listView.setAllColumnsShowFocus( true );
@@ -212,7 +212,7 @@ public void addEntry()
{
if ( !iFirstName.text().equals("") || !iLastName.text().equals("") ||
!iAddress.text().equals("") || !iEMail.text().equals("") ) {
- QListViewItem item = new QListViewItem( listView );
+ TQListViewItem item = new TQListViewItem( listView );
item.setText( 0, iFirstName.text() );
item.setText( 1, iLastName.text() );
item.setText( 2, iAddress.text() );
@@ -227,7 +227,7 @@ public void addEntry()
public void changeEntry()
{
- QListViewItem item = listView.currentItem();
+ TQListViewItem item = listView.currentItem();
if ( item != null &&
( !iFirstName.text().equals("") || !iLastName.text().equals("") ||
@@ -247,7 +247,7 @@ public void selectionChanged()
iEMail.setText( "" );
}
-public void itemSelected( QListViewItem item )
+public void itemSelected( TQListViewItem item )
{
item.setSelected( true );
item.repaint();
@@ -318,7 +318,7 @@ public void findEntries()
Iterator it = listView.itemList().iterator();
while ( it.hasNext() ) {
- QListViewItem currentItem = (QListViewItem) it.next();
+ TQListViewItem currentItem = (TQListViewItem) it.next();
boolean select = true;
if ( cFirstName.isChecked() ) {
diff --git a/qtjava/javalib/examples/addressbook/ABMainWindow.java b/qtjava/javalib/examples/addressbook/ABMainWindow.java
index 588098f4..c4949289 100644
--- a/qtjava/javalib/examples/addressbook/ABMainWindow.java
+++ b/qtjava/javalib/examples/addressbook/ABMainWindow.java
@@ -9,9 +9,9 @@
*****************************************************************************/
import org.kde.qt.*;
-class ABMainWindow extends QMainWindow
+class ABMainWindow extends TQMainWindow
{
- protected QToolBar fileTools;
+ protected TQToolBar fileTools;
protected String filename;
protected ABCentralWidget view;
@@ -27,24 +27,24 @@ public ABMainWindow()
public void setupMenuBar()
{
- QPopupMenu file = new QPopupMenu( this );
+ TQPopupMenu file = new TQPopupMenu( this );
menuBar().insertItem( "&File", file );
- file.insertItem( "New", this, SLOT( "fileNew()" ), new QKeySequence(CTRL + Key_N) );
- file.insertItem( new QIconSet(new QPixmap( "fileopen.xpm" )), "Open", this, SLOT( "fileOpen()" ), new QKeySequence(CTRL + Key_O) );
+ file.insertItem( "New", this, SLOT( "fileNew()" ), new TQKeySequence(CTRL + Key_N) );
+ file.insertItem( new TQIconSet(new TQPixmap( "fileopen.xpm" )), "Open", this, SLOT( "fileOpen()" ), new TQKeySequence(CTRL + Key_O) );
file.insertSeparator();
- file.insertItem( new QIconSet(new QPixmap( "filesave.xpm" )), "Save", this, SLOT( "fileSave()" ), new QKeySequence(CTRL + Key_S) );
+ file.insertItem( new TQIconSet(new TQPixmap( "filesave.xpm" )), "Save", this, SLOT( "fileSave()" ), new TQKeySequence(CTRL + Key_S) );
file.insertItem( "Save As...", this, SLOT( "fileSaveAs()" ) );
file.insertSeparator();
- file.insertItem( new QIconSet(new QPixmap( "fileprint.xpm" )), "Print...", this, SLOT( "filePrint()" ), new QKeySequence(CTRL + Key_P) );
+ file.insertItem( new TQIconSet(new TQPixmap( "fileprint.xpm" )), "Print...", this, SLOT( "filePrint()" ), new TQKeySequence(CTRL + Key_P) );
file.insertSeparator();
- file.insertItem( "Close", this, SLOT( "closeWindow()" ), new QKeySequence(CTRL + Key_W) );
- file.insertItem( "Quit", qApp(), SLOT( "quit()" ), new QKeySequence(CTRL + Key_Q) );
+ file.insertItem( "Close", this, SLOT( "closeWindow()" ), new TQKeySequence(CTRL + Key_W) );
+ file.insertItem( "Quit", qApp(), SLOT( "quit()" ), new TQKeySequence(CTRL + Key_Q) );
}
public void setupFileTools()
{
- //fileTools = new QToolBar( this, "file operations" );
+ //fileTools = new TQToolBar( this, "file operations" );
}
public void setupStatusBar()
@@ -69,7 +69,7 @@ public void fileNew()
public void fileOpen()
{
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( !fn.equals("") ) {
filename = fn;
view.load( filename );
@@ -88,7 +88,7 @@ public void fileSave()
public void fileSaveAs()
{
- String fn = QFileDialog.getSaveFileName( "", "", this );
+ String fn = TQFileDialog.getSaveFileName( "", "", this );
if ( !fn.equals("") ) {
filename = fn;
fileSave();
diff --git a/qtjava/javalib/examples/addressbook/Main.java b/qtjava/javalib/examples/addressbook/Main.java
index eeda8adc..c69c5d24 100644
--- a/qtjava/javalib/examples/addressbook/Main.java
+++ b/qtjava/javalib/examples/addressbook/Main.java
@@ -13,7 +13,7 @@ public class Main {
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ABMainWindow mw = new ABMainWindow();
mw.setCaption( "Qt Example - Addressbook" );
diff --git a/qtjava/javalib/examples/application/ApplicationWindow.java b/qtjava/javalib/examples/application/ApplicationWindow.java
index e334ad17..8e393df2 100644
--- a/qtjava/javalib/examples/application/ApplicationWindow.java
+++ b/qtjava/javalib/examples/application/ApplicationWindow.java
@@ -1,8 +1,8 @@
import org.kde.qt.*;
-public class ApplicationWindow extends QMainWindow {
- private QPrinter printer;
- private QMultiLineEdit e;
+public class ApplicationWindow extends TQMainWindow {
+ private TQPrinter printer;
+ private TQMultiLineEdit e;
private String filename;
private final String fileOpenText = " "+
@@ -92,55 +92,55 @@ public class ApplicationWindow extends QMainWindow {
// create a printer
- printer = new QPrinter();
+ printer = new TQPrinter();
// create user interface actions
- QAction fileNewAction, fileOpenAction, fileSaveAction,
+ TQAction fileNewAction, fileOpenAction, fileSaveAction,
fileSaveAsAction, filePrintAction, fileCloseAction,
fileQuitAction;
- fileNewAction = new QAction("New", "&New", new QKeySequence(CTRL+Key_N), this, "new", false);
+ fileNewAction = new TQAction("New", "&New", new TQKeySequence(CTRL+Key_N), this, "new", false);
connect(fileNewAction, SIGNAL("activated()"), this, SLOT("newDoc()"));
- fileOpenAction = new QAction("Open File", new QIconSet(new QPixmap(fileopen)), "&Open", new QKeySequence(CTRL+Key_O), this, "open", false);
+ fileOpenAction = new TQAction("Open File", new TQIconSet(new TQPixmap(fileopen)), "&Open", new TQKeySequence(CTRL+Key_O), this, "open", false);
connect(fileOpenAction, SIGNAL("activated()"), this, SLOT("load()"));
- QMimeSourceFactory.defaultFactory().setPixmap("fileopen", new QPixmap(fileopen));
+ TQMimeSourceFactory.defaultFactory().setPixmap("fileopen", new TQPixmap(fileopen));
fileOpenAction.setWhatsThis(fileOpenText);
- fileSaveAction = new QAction("Save File", new QIconSet(new QPixmap(filesave)), "&Save", new QKeySequence(CTRL+Key_S), this, "save", false);
+ fileSaveAction = new TQAction("Save File", new TQIconSet(new TQPixmap(filesave)), "&Save", new TQKeySequence(CTRL+Key_S), this, "save", false);
connect(fileSaveAction, SIGNAL("activated()"), this, SLOT("save()"));
fileSaveAction.setWhatsThis(fileSaveText);
- fileSaveAsAction = new QAction("Save File As", "Save &as", new QKeySequence(), this, "save as", false);
+ fileSaveAsAction = new TQAction("Save File As", "Save &as", new TQKeySequence(), this, "save as", false);
connect(fileSaveAsAction, SIGNAL("activated()"), this, SLOT("saveAs()"));
fileSaveAsAction.setWhatsThis(fileSaveText);
- filePrintAction = new QAction("Print File", new QIconSet(new QPixmap(fileprint)), "&Print", new QKeySequence(CTRL+Key_P), this, "print", false);
+ filePrintAction = new TQAction("Print File", new TQIconSet(new TQPixmap(fileprint)), "&Print", new TQKeySequence(CTRL+Key_P), this, "print", false);
connect(filePrintAction, SIGNAL("activated()"), this, SLOT("print()"));
filePrintAction.setWhatsThis(filePrintText);
- fileCloseAction = new QAction("Close", "&Close", new QKeySequence(CTRL+Key_W), this, "close", false);
+ fileCloseAction = new TQAction("Close", "&Close", new TQKeySequence(CTRL+Key_W), this, "close", false);
connect(fileCloseAction, SIGNAL("activated()"), this, SLOT("close()"));
- fileQuitAction = new QAction("Quit", "&Quit", new QKeySequence(CTRL+Key_Q), this, "quit", false);
+ fileQuitAction = new TQAction("Quit", "&Quit", new TQKeySequence(CTRL+Key_Q), this, "quit", false);
connect(fileQuitAction, SIGNAL("activated()"), qApp(), SLOT("closeAllWindows()"));
// populate a tool bar with some actions
- QToolBar fileTools = new QToolBar(this, "file operations");
+ TQToolBar fileTools = new TQToolBar(this, "file operations");
fileTools.setLabel(tr("File Operations"));
fileOpenAction.addTo(fileTools);
fileSaveAction.addTo(fileTools);
filePrintAction.addTo(fileTools);
- QWhatsThis.whatsThisButton(fileTools);
+ TQWhatsThis.whatsThisButton(fileTools);
// popuplate a menu with all actions
- QPopupMenu file = new QPopupMenu(this, "file");
+ TQPopupMenu file = new TQPopupMenu(this, "file");
menuBar().insertItem("&File", file);
fileNewAction.addTo(file);
fileOpenAction.addTo(file);
@@ -155,18 +155,18 @@ public class ApplicationWindow extends QMainWindow {
// add a help menu
- QPopupMenu help = new QPopupMenu(this, "help");
+ TQPopupMenu help = new TQPopupMenu(this, "help");
menuBar().insertSeparator();
menuBar().insertItem("&Help", help);
- help.insertItem("&About", this, SLOT("about()"), new QKeySequence(Key_F1), -1, -1);
+ help.insertItem("&About", this, SLOT("about()"), new TQKeySequence(Key_F1), -1, -1);
help.insertItem("About &Qt", this, SLOT("aboutQt()"));
help.insertSeparator();
- help.insertItem("What's &This", this, SLOT("whatsThis()"), new QKeySequence(SHIFT+Key_F1), -1, -1);
+ help.insertItem("What's &This", this, SLOT("whatsThis()"), new TQKeySequence(SHIFT+Key_F1), -1, -1);
// create and define the central widget
- e = new QMultiLineEdit(this, "editor");
+ e = new TQMultiLineEdit(this, "editor");
e.setFocus();
setCentralWidget(e);
statusBar().message("Ready", 2000);
@@ -179,7 +179,7 @@ public class ApplicationWindow extends QMainWindow {
}
private void load() {
- String fn = QFileDialog.getOpenFileName("", "", this);
+ String fn = TQFileDialog.getOpenFileName("", "", this);
if (!(fn.length()==0))
load(fn);
else
@@ -188,7 +188,7 @@ public class ApplicationWindow extends QMainWindow {
private void load(String fileName) {
- QFile f = new QFile(fileName);
+ TQFile f = new TQFile(fileName);
if (!f.open(1))
return;
@@ -197,7 +197,7 @@ public class ApplicationWindow extends QMainWindow {
e.setAutoUpdate(false);
e.clear();
- QTextStream t = new QTextStream(f);
+ TQTextStream t = new TQTextStream(f);
while (!t.eof()) {
String s = t.readLine();
e.append(s);
@@ -219,13 +219,13 @@ public class ApplicationWindow extends QMainWindow {
}
String text = e.text();
- QFile f = new QFile(filename);
+ TQFile f = new TQFile(filename);
if (!f.open(2)) {
statusBar().message("Could not write to "+filename, 2000);
return;
}
- QTextStream t = new QTextStream(f);
+ TQTextStream t = new TQTextStream(f);
t.writeRawBytes(text, text.length());
f.close();
@@ -238,7 +238,7 @@ public class ApplicationWindow extends QMainWindow {
private void saveAs() {
- String fn = QFileDialog.getSaveFileName("", "", this);
+ String fn = TQFileDialog.getSaveFileName("", "", this);
if (!(fn.length()==0)) {
filename = fn;
save();
@@ -253,14 +253,14 @@ public class ApplicationWindow extends QMainWindow {
if (printer.setup(this)) { // printer dialog
statusBar().message("Printing...");
- QPainter p = new QPainter();
+ TQPainter p = new TQPainter();
p.begin(printer); // paint on printer
p.setFont(e.font());
int yPos = 0; // y position for each line
- QFontMetrics fm = p.fontMetrics();
+ TQFontMetrics fm = p.fontMetrics();
// need width/height of printer surface
- QPaintDeviceMetrics metrics = new QPaintDeviceMetrics(printer);
+ TQPaintDeviceMetrics metrics = new TQPaintDeviceMetrics(printer);
for(int i = 0 ; i < e.numLines() ; i++) {
if (Margin + yPos > metrics.height() - Margin) {
@@ -282,13 +282,13 @@ public class ApplicationWindow extends QMainWindow {
}
}
- protected void closeEvent(QCloseEvent ce) {
+ protected void closeEvent(TQCloseEvent ce) {
if (!e.edited()) {
ce.accept();
return;
}
- switch(QMessageBox.information(this, "Qt Application Example",
+ switch(TQMessageBox.information(this, "Qt Application Example",
"The document has been changed since the last save.",
"Save Now", "Cancel", "Leave Anyway", 0, 1)) {
case 0:
@@ -306,13 +306,13 @@ public class ApplicationWindow extends QMainWindow {
}
private void about() {
- QMessageBox.about(this, "Qt Application Example",
+ TQMessageBox.about(this, "Qt Application Example",
"This example demonstrates simple use of "+
- "QMainWindow,\nQMenuBar and QToolBar.");
+ "TQMainWindow,\nTQMenuBar and TQToolBar.");
}
private void aboutQt() {
- QMessageBox.aboutQt(this, "Qt Application Example");
+ TQMessageBox.aboutQt(this, "Qt Application Example");
}
}
diff --git a/qtjava/javalib/examples/application/Main.java b/qtjava/javalib/examples/application/Main.java
index 2ba09ea9..9527f75c 100644
--- a/qtjava/javalib/examples/application/Main.java
+++ b/qtjava/javalib/examples/application/Main.java
@@ -1,8 +1,8 @@
import org.kde.qt.*;
-public class Main extends QObject {
+public class Main extends TQObject {
public static void main(String[] args) {
- QApplication a = new QApplication (args);
+ TQApplication a = new TQApplication (args);
ApplicationWindow mw = new ApplicationWindow();
mw.setCaption("Document 1");
mw.show();
diff --git a/qtjava/javalib/examples/biff/Biff.java b/qtjava/javalib/examples/biff/Biff.java
index b3107da4..4e807baf 100644
--- a/qtjava/javalib/examples/biff/Biff.java
+++ b/qtjava/javalib/examples/biff/Biff.java
@@ -10,11 +10,11 @@
import org.kde.qt.*;
import java.util.Calendar;
-class Biff extends QWidget
+class Biff extends TQWidget
{
private Calendar lastModified;
-private QPixmap hasNewMail = new QPixmap();
-private QPixmap noNewMail = new QPixmap();
+private TQPixmap hasNewMail = new TQPixmap();
+private TQPixmap noNewMail = new TQPixmap();
private String mailbox;
private boolean gotMail;
@@ -22,11 +22,11 @@ public Biff( )
{
this(null, null);
}
-public Biff( QWidget parent, String name )
+public Biff( TQWidget parent, String name )
{
super( parent, name, WType_Modal );
-// QFileInfo fi = new QFileInfo(System.getProperty("MAIL"));
- QFileInfo fi = new QFileInfo("");
+// TQFileInfo fi = new TQFileInfo(System.getProperty("MAIL"));
+ TQFileInfo fi = new TQFileInfo("");
if ( !fi.exists() ) {
String s = "/var/spool/mail/";
s += System.getProperty("user.name");
@@ -49,9 +49,9 @@ public Biff( QWidget parent, String name )
}
-protected void timerEvent( QTimerEvent event )
+protected void timerEvent( TQTimerEvent event )
{
- QFileInfo fi = new QFileInfo( mailbox );
+ TQFileInfo fi = new TQFileInfo( mailbox );
boolean newState = ( fi.lastModified() != lastModified &&
fi.lastModified().after( fi.lastRead() ) );
if ( newState != gotMail ) {
@@ -63,7 +63,7 @@ protected void timerEvent( QTimerEvent event )
}
-protected void paintEvent( QPaintEvent event )
+protected void paintEvent( TQPaintEvent event )
{
if ( gotMail )
bitBlt( this, 0, 0, hasNewMail );
@@ -72,9 +72,9 @@ protected void paintEvent( QPaintEvent event )
}
-protected void mousePressEvent( QMouseEvent event )
+protected void mousePressEvent( TQMouseEvent event )
{
- QFileInfo fi = new QFileInfo( mailbox );
+ TQFileInfo fi = new TQFileInfo( mailbox );
lastModified = fi.lastModified();
}
}
diff --git a/qtjava/javalib/examples/biff/Main.java b/qtjava/javalib/examples/biff/Main.java
index abf20598..d70881e7 100644
--- a/qtjava/javalib/examples/biff/Main.java
+++ b/qtjava/javalib/examples/biff/Main.java
@@ -15,7 +15,7 @@ public class Main {
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Biff b = new Biff();
a.setMainWidget( b );
b.show();
diff --git a/qtjava/javalib/examples/buttongroups/ButtonsGroups.java b/qtjava/javalib/examples/buttongroups/ButtonsGroups.java
index 0ac7e811..3060e23b 100644
--- a/qtjava/javalib/examples/buttongroups/ButtonsGroups.java
+++ b/qtjava/javalib/examples/buttongroups/ButtonsGroups.java
@@ -9,10 +9,10 @@
****************************************************************************/
import org.kde.qt.*;
-class ButtonsGroups extends QWidget
+class ButtonsGroups extends TQWidget
{
-protected QCheckBox state;
-protected QRadioButton rb21, rb22, rb23;
+protected TQCheckBox state;
+protected TQRadioButton rb21, rb22, rb23;
@@ -28,57 +28,57 @@ public ButtonsGroups( )
this(null, null);
}
-public ButtonsGroups( QWidget parent, String name )
+public ButtonsGroups( TQWidget parent, String name )
{
super( parent, name );
// Create Widgets which allow easy layouting
- QVBoxLayout vbox = new QVBoxLayout( this );
- QHBoxLayout box1 = new QHBoxLayout( vbox );
- QHBoxLayout box2 = new QHBoxLayout( vbox );
+ TQVBoxLayout vbox = new TQVBoxLayout( this );
+ TQHBoxLayout box1 = new TQHBoxLayout( vbox );
+ TQHBoxLayout box2 = new TQHBoxLayout( vbox );
// ------- first group
// Create an exclusive button group
- QButtonGroup bgrp1 = new QButtonGroup( 1, QGroupBox.Horizontal, "Button Group 1 (exclusive)", this);
+ TQButtonGroup bgrp1 = new TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 1 (exclusive)", this);
box1.addWidget( bgrp1 );
bgrp1.setExclusive( true );
// insert 3 radiobuttons
- QRadioButton rb11 = new QRadioButton( "&Radiobutton 1", bgrp1 );
+ TQRadioButton rb11 = new TQRadioButton( "&Radiobutton 1", bgrp1 );
rb11.setChecked( true );
- new QRadioButton( "R&adiobutton 2", bgrp1 );
- new QRadioButton( "Ra&diobutton 3", bgrp1 );
+ new TQRadioButton( "R&adiobutton 2", bgrp1 );
+ new TQRadioButton( "Ra&diobutton 3", bgrp1 );
// ------- second group
// Create a non-exclusive buttongroup
- QButtonGroup bgrp2 = new QButtonGroup( 1, QGroupBox.Horizontal, "Button Group 2 (non-exclusive)", this );
+ TQButtonGroup bgrp2 = new TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 2 (non-exclusive)", this );
box1.addWidget( bgrp2 );
bgrp2.setExclusive( false );
// insert 3 checkboxes
- new QCheckBox( "&Checkbox 1", bgrp2 );
- QCheckBox cb12 = new QCheckBox( "C&heckbox 2", bgrp2 );
+ new TQCheckBox( "&Checkbox 1", bgrp2 );
+ TQCheckBox cb12 = new TQCheckBox( "C&heckbox 2", bgrp2 );
cb12.setChecked( true );
- QCheckBox cb13 = new QCheckBox( "Triple &State Button", bgrp2 );
+ TQCheckBox cb13 = new TQCheckBox( "Triple &State Button", bgrp2 );
cb13.setTristate( true );
cb13.setChecked( true );
// ------------ third group
// create a buttongroup which is exclusive for radiobuttons and non-exclusive for all other buttons
- QButtonGroup bgrp3 = new QButtonGroup( 1, QGroupBox.Horizontal, "Button Group 3 (Radiobutton-exclusive)", this );
+ TQButtonGroup bgrp3 = new TQButtonGroup( 1, TQGroupBox.Horizontal, "Button Group 3 (Radiobutton-exclusive)", this );
box2.addWidget( bgrp3 );
bgrp3.setRadioButtonExclusive( true );
// insert three radiobuttons
- rb21 = new QRadioButton( "Rad&iobutton 1", bgrp3 );
- rb22 = new QRadioButton( "Radi&obutton 2", bgrp3 );
- rb23 = new QRadioButton( "Radio&button 3", bgrp3 );
+ rb21 = new TQRadioButton( "Rad&iobutton 1", bgrp3 );
+ rb22 = new TQRadioButton( "Radi&obutton 2", bgrp3 );
+ rb23 = new TQRadioButton( "Radio&button 3", bgrp3 );
rb23.setChecked( true );
// insert a checkbox...
- state = new QCheckBox( "E&nable Radiobuttons", bgrp3 );
+ state = new TQCheckBox( "E&nable Radiobuttons", bgrp3 );
state.setChecked( true );
// ...and connect its SIGNAL clicked() with the SLOT slotChangeGrp3State()
connect( state, SIGNAL(" clicked()"), this, SLOT(" slotChangeGrp3State()") );
@@ -86,13 +86,13 @@ public ButtonsGroups( QWidget parent, String name )
// ------------ fourth group
// create a groupbox which layouts its childs in a columns
- QGroupBox bgrp4 = new QButtonGroup( 1, QGroupBox.Horizontal, "Groupbox with normal buttons", this );
+ TQGroupBox bgrp4 = new TQButtonGroup( 1, TQGroupBox.Horizontal, "Groupbox with normal buttons", this );
box2.addWidget( bgrp4 );
// insert three pushbuttons...
- new QPushButton( "&Push Button", bgrp4 );
- QPushButton tb2 = new QPushButton( "&Toggle Button", bgrp4 );
- QPushButton tb3 = new QPushButton( "&Flat Button", bgrp4 );
+ new TQPushButton( "&Push Button", bgrp4 );
+ TQPushButton tb2 = new TQPushButton( "&Toggle Button", bgrp4 );
+ TQPushButton tb3 = new TQPushButton( "&Flat Button", bgrp4 );
// ... and make the second one a toggle button
tb2.setToggleButton( true );
diff --git a/qtjava/javalib/examples/buttongroups/Main.java b/qtjava/javalib/examples/buttongroups/Main.java
index a7652d87..5ec69689 100644
--- a/qtjava/javalib/examples/buttongroups/Main.java
+++ b/qtjava/javalib/examples/buttongroups/Main.java
@@ -13,7 +13,7 @@ public class Main {
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ButtonsGroups buttonsgroups = new ButtonsGroups();
buttonsgroups.resize( 500, 250 );
diff --git a/qtjava/javalib/examples/checklists/CheckLists.java b/qtjava/javalib/examples/checklists/CheckLists.java
index ef3dd8bf..5dc42300 100644
--- a/qtjava/javalib/examples/checklists/CheckLists.java
+++ b/qtjava/javalib/examples/checklists/CheckLists.java
@@ -10,11 +10,11 @@
import org.kde.qt.*;
import java.util.*;
-class CheckLists extends QWidget
+class CheckLists extends TQWidget
{
-protected QListView lv1, lv2;
-protected QLabel label;
+protected TQListView lv1, lv2;
+protected TQLabel label;
/*
Constructor
@@ -27,21 +27,21 @@ CheckLists( )
this(null, null);
}
-CheckLists( QWidget parent, String name )
+CheckLists( TQWidget parent, String name )
{
super( parent, name );
- QHBoxLayout lay = new QHBoxLayout( this );
+ TQHBoxLayout lay = new TQHBoxLayout( this );
lay.setMargin( 5 );
// create a widget which layouts its childs in a column
- QVBoxLayout vbox1 = new QVBoxLayout( lay );
+ TQVBoxLayout vbox1 = new TQVBoxLayout( lay );
vbox1.setMargin( 5 );
// First child: a Label
- vbox1.addWidget( new QLabel( "Check some items!", this ) );
+ vbox1.addWidget( new TQLabel( "Check some items!", this ) );
// Second child: the ListView
- lv1 = new QListView( this );
+ lv1 = new TQListView( this );
vbox1.addWidget( lv1 );
lv1.addColumn( "Items" );
lv1.setRootIsDecorated( true );
@@ -49,62 +49,62 @@ CheckLists( QWidget parent, String name )
// create a list with 4 ListViewItems which will be parent items of other ListViewItems
ArrayList parentList = new ArrayList();
- parentList.add( new QListViewItem( lv1, "Parent Item 1" ) );
- parentList.add( new QListViewItem( lv1, "Parent Item 2" ) );
- parentList.add( new QListViewItem( lv1, "Parent Item 3" ) );
- parentList.add( new QListViewItem( lv1, "Parent Item 4" ) );
+ parentList.add( new TQListViewItem( lv1, "Parent Item 1" ) );
+ parentList.add( new TQListViewItem( lv1, "Parent Item 2" ) );
+ parentList.add( new TQListViewItem( lv1, "Parent Item 3" ) );
+ parentList.add( new TQListViewItem( lv1, "Parent Item 4" ) );
- QListViewItem item = null;
+ TQListViewItem item = null;
int num = 1;
// go through the list of parent items...
for ( Iterator it = parentList.iterator(); it.hasNext(); num++ ) {
- item = (QListViewItem) it.next();
+ item = (TQListViewItem) it.next();
item.setOpen( true );
// ...and create 5 checkable child ListViewItems for each parent item
for ( int i = 1; i <= 5; i++ )
- new QCheckListItem( item, i + ". Child of Parent " + num, QCheckListItem.CheckBox );
+ new TQCheckListItem( item, i + ". Child of Parent " + num, TQCheckListItem.CheckBox );
}
// Create another widget for layouting
- QVBoxLayout tmp = new QVBoxLayout( lay );
+ TQVBoxLayout tmp = new TQVBoxLayout( lay );
tmp.setMargin( 5 );
// create a pushbutton
- QPushButton copy1 = new QPushButton( " -> ", this );
+ TQPushButton copy1 = new TQPushButton( " -> ", this );
tmp.addWidget( copy1 );
copy1.setMaximumWidth( copy1.sizeHint().width() );
// connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2()
connect( copy1, SIGNAL(" clicked()"), this, SLOT(" copy1to2()") );
// another widget for layouting
- QVBoxLayout vbox2 = new QVBoxLayout( lay );
+ TQVBoxLayout vbox2 = new TQVBoxLayout( lay );
vbox2.setMargin( 5 );
// and another label
- vbox2.addWidget( new QLabel( "Check one item!", this ) );
+ vbox2.addWidget( new TQLabel( "Check one item!", this ) );
// create the second listview
- lv2 = new QListView( this );
+ lv2 = new TQListView( this );
vbox2.addWidget( lv2 );
lv2.addColumn( "Items" );
lv2.setRootIsDecorated( true );
// another widget needed for layouting only
- tmp = new QVBoxLayout( lay );
+ tmp = new TQVBoxLayout( lay );
tmp.setMargin( 5 );
// create another pushbutton...
- QPushButton copy2 = new QPushButton( " -> ", this );
+ TQPushButton copy2 = new TQPushButton( " -> ", this );
lay.addWidget( copy2 );
copy2.setMaximumWidth( copy2.sizeHint().width() );
// ...and connect its clicked() SIGNAL to the copy2to3() SLOT
connect( copy2, SIGNAL(" clicked()"), this, SLOT(" copy2to3()") );
- tmp = new QVBoxLayout( lay );
+ tmp = new TQVBoxLayout( lay );
tmp.setMargin( 5 );
// and create a label which will be at the right of the window
- label = new QLabel( "No Item yet...", this );
+ label = new TQLabel( "No Item yet...", this );
tmp.addWidget( label );
}
@@ -124,22 +124,22 @@ public void copy1to2()
// Insert first a controller Item into the second ListView. Always if Radio-ListViewItems
// are inserted into a Listview, the parent item of these MUST be a controller Item!
- QCheckListItem item = new QCheckListItem( lv2, "Controller", QCheckListItem.Controller );
+ TQCheckListItem item = new TQCheckListItem( lv2, "Controller", TQCheckListItem.Controller );
item.setOpen( true );
// iterate through the first ListView...
while ( it.hasNext() ) {
- QListViewItem current = (QListViewItem) it.next();
+ TQListViewItem current = (TQListViewItem) it.next();
// ...check state of childs, and...
if ( current.parent() != null )
// ...if the item is checked...
- if ( ( (QCheckListItem) current ).isOn() )
+ if ( ( (TQCheckListItem) current ).isOn() )
// ...insert a Radio-ListViewItem with the same text into the second ListView
- new QCheckListItem( item, current.text( 0 ), QCheckListItem.RadioButton );
+ new TQCheckListItem( item, current.text( 0 ), TQCheckListItem.RadioButton );
}
if ( item.firstChild() != null )
- ( ( QCheckListItem )item.firstChild() ).setOn( true );
+ ( ( TQCheckListItem )item.firstChild() ).setOn( true );
}
/*
@@ -158,11 +158,11 @@ public void copy2to3()
// iterate through the second ListView...
while ( it.hasNext() ) {
- QListViewItem current = (QListViewItem) it.next();
+ TQListViewItem current = (TQListViewItem) it.next();
// ...check state of childs, and...
if ( current.parent() != null )
// ...if the item is checked...
- if ( ( (QCheckListItem) current ).isOn() )
+ if ( ( (TQCheckListItem) current ).isOn() )
// ...set the text of the item to the label
label.setText( current.text( 0 ) );
}
diff --git a/qtjava/javalib/examples/checklists/Main.java b/qtjava/javalib/examples/checklists/Main.java
index 8d21a20b..263073d3 100644
--- a/qtjava/javalib/examples/checklists/Main.java
+++ b/qtjava/javalib/examples/checklists/Main.java
@@ -13,7 +13,7 @@ public class Main {
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
CheckLists checklists = new CheckLists();
checklists.resize( 650, 350 );
diff --git a/qtjava/javalib/examples/cursor/CursorView.java b/qtjava/javalib/examples/cursor/CursorView.java
index 39eeb591..2b6d971c 100644
--- a/qtjava/javalib/examples/cursor/CursorView.java
+++ b/qtjava/javalib/examples/cursor/CursorView.java
@@ -14,7 +14,7 @@ import org.kde.qt.*;
// The CursorView contains many labels with different cursors.
//
-class CursorView extends QWidget // cursor view
+class CursorView extends TQWidget // cursor view
{
// cb_bits and cm_bits were generated by X bitmap program.
@@ -98,31 +98,31 @@ public CursorView() // construct view
{
setCaption( "CursorView" ); // set window caption
- QGridLayout grid = new QGridLayout( this, 5, 4, 20 );
- QLabel label;
+ TQGridLayout grid = new TQGridLayout( this, 5, 4, 20 );
+ TQLabel label;
int i=0;
for ( int y=0; y<4; y++ ) { // create the small labels
for ( int x=0; x<4; x++ ) {
- label = new QLabel( this );
- label.setCursor( new QCursor( shapeList[i] ) );
+ label = new TQLabel( this );
+ label.setCursor( new TQCursor( shapeList[i] ) );
label.setText( nameList[i] );
label.setAlignment( AlignCenter );
- label.setFrameStyle( QFrame.Box | QFrame.Raised );
+ label.setFrameStyle( TQFrame.Box | TQFrame.Raised );
grid.addWidget( label, x, y );
i++;
}
}
- QBitmap cb = new QBitmap( cb_width, cb_height, cb_bits, true );
- QBitmap cm = new QBitmap( cm_width, cm_height, cm_bits, true );
- QCursor custom = new QCursor( cb, cm ); // create bitmap cursor
+ TQBitmap cb = new TQBitmap( cb_width, cb_height, cb_bits, true );
+ TQBitmap cm = new TQBitmap( cm_width, cm_height, cm_bits, true );
+ TQCursor custom = new TQCursor( cb, cm ); // create bitmap cursor
- label = new QLabel( this ); // create the big label
+ label = new TQLabel( this ); // create the big label
label.setCursor( custom );
label.setText( "Custom bitmap cursor" );
label.setAlignment( AlignCenter );
- label.setFrameStyle( QFrame.Box | QFrame.Sunken );
+ label.setFrameStyle( TQFrame.Box | TQFrame.Sunken );
grid.addMultiCellWidget( label, 4, 4, 0, 3 );
}
@@ -134,7 +134,7 @@ public CursorView() // construct view
public static void main( String[] args )
{
- QApplication a = new QApplication( args ); // application object
+ TQApplication a = new TQApplication( args ); // application object
CursorView v = new CursorView(); // cursor view
a.setMainWidget( v );
v.setCaption("Qt Example - Cursors");
diff --git a/qtjava/javalib/examples/dclock/DigitalClock.java b/qtjava/javalib/examples/dclock/DigitalClock.java
index 6bc1d87f..84b34b5b 100644
--- a/qtjava/javalib/examples/dclock/DigitalClock.java
+++ b/qtjava/javalib/examples/dclock/DigitalClock.java
@@ -12,7 +12,7 @@ import org.kde.qt.*;
import java.util.Date;
import java.text.*;
-class DigitalClock extends QLCDNumber // digital clock widget
+class DigitalClock extends TQLCDNumber // digital clock widget
{
private boolean showingColon;
@@ -30,16 +30,16 @@ DigitalClock( )
//
// Constructs a DigitalClock widget with a parent and a name.
//
-DigitalClock( QWidget parent )
+DigitalClock( TQWidget parent )
{
this(parent, null);
}
-DigitalClock( QWidget parent, String name )
+DigitalClock( TQWidget parent, String name )
{
super( parent, name );
showingColon = false;
- setFrameStyle( QFrame.Panel | QFrame.Raised );
+ setFrameStyle( TQFrame.Panel | TQFrame.Raised );
setLineWidth( 2 ); // set frame line width
showTime(); // display the current time
normalTimer = startTimer( 500 ); // 1/2 second timer events
@@ -53,7 +53,7 @@ DigitalClock( QWidget parent, String name )
// and another one for switching back from date mode to time mode.
//
-protected void timerEvent( QTimerEvent e )
+protected void timerEvent( TQTimerEvent e )
{
if ( e.timerId() == showDateTimer ) // stop showing date
stopDate();
@@ -67,9 +67,9 @@ protected void timerEvent( QTimerEvent e )
// Enters date mode when the left mouse button is pressed.
//
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
- if ( e.button() == QMouseEvent.LeftButton ) // left button pressed
+ if ( e.button() == TQMouseEvent.LeftButton ) // left button pressed
showDate();
}
diff --git a/qtjava/javalib/examples/dclock/Main.java b/qtjava/javalib/examples/dclock/Main.java
index 1aeb174e..8656365c 100644
--- a/qtjava/javalib/examples/dclock/Main.java
+++ b/qtjava/javalib/examples/dclock/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 );
DigitalClock clock = new DigitalClock();
clock.resize( 170, 80 );
a.setMainWidget( clock );
diff --git a/qtjava/javalib/examples/demo/sql/BookForm.java b/qtjava/javalib/examples/demo/sql/BookForm.java
index 67670357..0c51bd09 100644
--- a/qtjava/javalib/examples/demo/sql/BookForm.java
+++ b/qtjava/javalib/examples/demo/sql/BookForm.java
@@ -8,37 +8,37 @@
****************************************************************************/
import org.kde.qt.*;
-public class BookForm extends QWidget {
- QDataTable AuthorDataTable;
- QDataTable BookDataTable;
- QPushButton connectButton;
- QPushButton editButton;
+public class BookForm extends TQWidget {
+ TQDataTable AuthorDataTable;
+ TQDataTable BookDataTable;
+ TQPushButton connectButton;
+ TQPushButton editButton;
- QGridLayout BookFormLayout;
- QSizePolicy policy_1;
- QSizePolicy policy_2;
- QSpacerItem spacer;
- QSpacerItem spacer_2;
+ TQGridLayout BookFormLayout;
+ TQSizePolicy policy_1;
+ TQSizePolicy policy_2;
+ TQSpacerItem spacer;
+ TQSpacerItem spacer_2;
- QSqlCursor authorCursor;
- QSqlCursor bookCursor;
+ TQSqlCursor authorCursor;
+ TQSqlCursor bookCursor;
/*
* Constructs a BookForm which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-BookForm( QWidget parent, String name, int fl )
+BookForm( TQWidget parent, String name, int fl )
{
super( parent, name, fl );
if ( name == null )
setName( "BookForm" );
resize( 478, 498 );
setCaption( trUtf8( "Book" ) );
- BookFormLayout = new QGridLayout( this );
+ BookFormLayout = new TQGridLayout( this );
BookFormLayout.setSpacing( 6 );
BookFormLayout.setMargin( 11 );
- AuthorDataTable = new QDataTable( this, "AuthorDataTable" );
+ AuthorDataTable = new TQDataTable( this, "AuthorDataTable" );
AuthorDataTable.addColumn( "surname", trUtf8( "Surname", "" ) );
AuthorDataTable.addColumn( "forename", trUtf8( "Forename", "" ) );
AuthorDataTable.setSorting( true );
@@ -46,10 +46,10 @@ BookForm( QWidget parent, String name, int fl )
AuthorDataTable.setSort( new String[] { "surname ASC", "forename ASC" } );
BookFormLayout.addMultiCellWidget( AuthorDataTable, 1, 1, 0, 2 );
- spacer = new QSpacerItem( 20, 20, QSizePolicy.Expanding, QSizePolicy.Minimum );
+ spacer = new TQSpacerItem( 20, 20, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
BookFormLayout.addMultiCell( spacer, 0, 0, 1, 2 );
- BookDataTable = new QDataTable( this, "BookDataTable" );
+ BookDataTable = new TQDataTable( this, "BookDataTable" );
BookDataTable.addColumn( "title", trUtf8( "Title", "" ) );
BookDataTable.addColumn( "price", trUtf8( "Price", "" ) );
BookDataTable.addColumn( "notes", trUtf8( "Notes", "" ) );
@@ -58,19 +58,19 @@ BookForm( QWidget parent, String name, int fl )
BookDataTable.setSort( new String[] { "title ASC" } );
BookFormLayout.addMultiCellWidget( BookDataTable, 2, 2, 0, 2 );
- spacer_2 = new QSpacerItem( 20, 20, QSizePolicy.Expanding, QSizePolicy.Minimum );
+ spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
BookFormLayout.addMultiCell( spacer_2, 3, 3, 0, 1 );
- connectButton = new QPushButton( this, "connectButton" );
- policy_1 = new QSizePolicy( (int)0, (int)0, connectButton.sizePolicy().hasHeightForWidth() );
+ connectButton = new TQPushButton( this, "connectButton" );
+ policy_1 = new TQSizePolicy( (int)0, (int)0, connectButton.sizePolicy().hasHeightForWidth() );
connectButton.setSizePolicy( policy_1 );
connectButton.setText( trUtf8( "&Connect..." ) );
BookFormLayout.addWidget( connectButton, 0, 0 );
- editButton = new QPushButton( this, "editButton" );
+ editButton = new TQPushButton( this, "editButton" );
editButton.setEnabled( false );
- policy_2 = new QSizePolicy( (int)0, (int)0, editButton.sizePolicy().hasHeightForWidth() );
+ policy_2 = new TQSizePolicy( (int)0, (int)0, editButton.sizePolicy().hasHeightForWidth() );
editButton.setSizePolicy( policy_2 );
editButton.setText( trUtf8( "&Edit Books" ) );
@@ -84,8 +84,8 @@ BookForm( QWidget parent, String name, int fl )
// signals and slots connections
connect( editButton, SIGNAL( "clicked()" ), this, SLOT( "editClicked()" ) );
- connect( AuthorDataTable, SIGNAL( "primeInsert(QSqlRecord)" ), this, SLOT( "primeInsertAuthor(QSqlRecord)" ) );
- connect( AuthorDataTable, SIGNAL( "currentChanged(QSqlRecord)" ), this, SLOT( "newCurrentAuthor(QSqlRecord)" ) );
+ connect( AuthorDataTable, SIGNAL( "primeInsert(TQSqlRecord)" ), this, SLOT( "primeInsertAuthor(TQSqlRecord)" ) );
+ connect( AuthorDataTable, SIGNAL( "currentChanged(TQSqlRecord)" ), this, SLOT( "newCurrentAuthor(TQSqlRecord)" ) );
connect( connectButton, SIGNAL( "clicked()" ), this, SLOT( "connectClicked()" ) );
// tab order
@@ -93,12 +93,12 @@ BookForm( QWidget parent, String name, int fl )
init();
}
-BookForm( QWidget parent, String name )
+BookForm( TQWidget parent, String name )
{
this(parent, name, 0);
}
-BookForm( QWidget parent )
+BookForm( TQWidget parent )
{
this(parent, null, 0);
}
@@ -119,12 +119,12 @@ public void destroy()
void editClicked()
{
EditBookForm dialog = new EditBookForm( this, "Edit Book Form", true, 0 );
- QSqlCursor cur = new QSqlCursor( "book" );
+ TQSqlCursor cur = new TQSqlCursor( "book" );
dialog.BookDataBrowser.setSqlCursor( cur );
dialog.BookDataBrowser.setFilter( BookDataTable.filter() );
String[] sort = new String[BookDataTable.sort().size()];
sort = (String[]) BookDataTable.sort().toArray(sort);
- dialog.BookDataBrowser.setSort(QSqlIndex.fromStringList(
+ dialog.BookDataBrowser.setSort(TQSqlIndex.fromStringList(
sort, cur ) );
dialog.BookDataBrowser.refresh();
int i = BookDataTable.currentRow();
@@ -139,13 +139,13 @@ void connectClicked()
{
boolean ok = false;
ConnectDialog dialog = new ConnectDialog( this, "Connect", true, 0 );
- String[] drivers = new String[QSqlDatabase.drivers().size()];;
- drivers = (String[]) QSqlDatabase.drivers().toArray(drivers);
+ String[] drivers = new String[TQSqlDatabase.drivers().size()];;
+ drivers = (String[]) TQSqlDatabase.drivers().toArray(drivers);
dialog.comboDriver.insertStringList( drivers );
dialog.editDatabase.setText( "book" );
- if ( dialog.exec() == QDialog.Accepted ) {
- // QSqlDatabase.removeDatabase( QSqlDatabase.defaultConnection() );
- QSqlDatabase db = QSqlDatabase.addDatabase( dialog.comboDriver.currentText() );
+ if ( dialog.exec() == TQDialog.Accepted ) {
+ // TQSqlDatabase.removeDatabase( TQSqlDatabase.defaultConnection() );
+ TQSqlDatabase db = TQSqlDatabase.addDatabase( dialog.comboDriver.currentText() );
db.setDatabaseName( dialog.editDatabase.text() );
db.setUserName( dialog.editUsername.text() );
db.setPassword( dialog.editPassword.text() );
@@ -158,29 +158,29 @@ void connectClicked()
}
if ( !ok ) {
editButton.setEnabled( false );
- BookDataTable.setSqlCursor( (QSqlCursor) null );
- AuthorDataTable.setSqlCursor( (QSqlCursor) null );
+ BookDataTable.setSqlCursor( (TQSqlCursor) null );
+ AuthorDataTable.setSqlCursor( (TQSqlCursor) null );
} else {
editButton.setEnabled( true );
- authorCursor = new QSqlCursor( "author" );
+ authorCursor = new TQSqlCursor( "author" );
AuthorDataTable.setSqlCursor( authorCursor, false, true );
- bookCursor = new QSqlCursor( "book" );
+ bookCursor = new TQSqlCursor( "book" );
BookDataTable.setSqlCursor( bookCursor, false, true );
- AuthorDataTable.refresh( QDataTable.RefreshAll );
- BookDataTable.refresh( QDataTable.RefreshAll );
+ AuthorDataTable.refresh( TQDataTable.RefreshAll );
+ BookDataTable.refresh( TQDataTable.RefreshAll );
}
dialog = null;
}
-void newCurrentAuthor(QSqlRecord author)
+void newCurrentAuthor(TQSqlRecord author)
{
BookDataTable.setFilter( "authorid=" + author.value( "id" ).toString() );
BookDataTable.refresh();
}
-void primeInsertAuthor(QSqlRecord buffer)
+void primeInsertAuthor(TQSqlRecord buffer)
{
- QSqlQuery q = new QSqlQuery();
+ TQSqlQuery q = new TQSqlQuery();
q.exec( "UPDATE sequence SET sequence = sequence + 1 WHERE tablename='author';" );
q.exec( "SELECT sequence FROM sequence WHERE tablename='author';" );
if ( q.next() ) {
diff --git a/qtjava/javalib/examples/demo/sql/ConnectDialog.java b/qtjava/javalib/examples/demo/sql/ConnectDialog.java
index bbd17391..ad7c331b 100644
--- a/qtjava/javalib/examples/demo/sql/ConnectDialog.java
+++ b/qtjava/javalib/examples/demo/sql/ConnectDialog.java
@@ -8,22 +8,22 @@
****************************************************************************/
import org.kde.qt.*;
-public class ConnectDialog extends QDialog {
- QLineEdit editDatabase;
- QLabel TextLabel3;
- QLineEdit editPassword;
- QLabel TextLabel4;
- QLabel TextLabel4_2;
- QLabel TextLabel2;
- QLabel TextLabel5;
- QComboBox comboDriver;
- QLineEdit editHostname;
- QLineEdit editUsername;
- QPushButton PushButton1;
- QPushButton PushButton2;
-
- QGridLayout ConnectDialogLayout;
- QSpacerItem spacer;
+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
@@ -32,75 +32,75 @@ public class ConnectDialog extends QDialog {
* The dialog will by default be modeless, unless you set 'modal' to
* true to construct a modal dialog.
*/
-ConnectDialog( QWidget parent, String name, boolean modal, int fl )
+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 QGridLayout( this );
+ ConnectDialogLayout = new TQGridLayout( this );
ConnectDialogLayout.setSpacing( 6 );
ConnectDialogLayout.setMargin( 11 );
- editDatabase = new QLineEdit( this, "editDatabase" );
+ editDatabase = new TQLineEdit( this, "editDatabase" );
ConnectDialogLayout.addMultiCellWidget( editDatabase, 1, 1, 2, 3 );
- TextLabel3 = new QLabel( this, "TextLabel3" );
+ TextLabel3 = new TQLabel( this, "TextLabel3" );
TextLabel3.setText( trUtf8( "Database Name:" ) );
ConnectDialogLayout.addMultiCellWidget( TextLabel3, 1, 1, 0, 1 );
- editPassword = new QLineEdit( this, "editPassword" );
- editPassword.setEchoMode( QLineEdit.Password );
+ editPassword = new TQLineEdit( this, "editPassword" );
+ editPassword.setEchoMode( TQLineEdit.Password );
ConnectDialogLayout.addMultiCellWidget( editPassword, 3, 3, 2, 3 );
- TextLabel4 = new QLabel( this, "TextLabel4" );
+ TextLabel4 = new TQLabel( this, "TextLabel4" );
TextLabel4.setText( trUtf8( "&Username:" ) );
ConnectDialogLayout.addMultiCellWidget( TextLabel4, 2, 2, 0, 1 );
- TextLabel4_2 = new QLabel( this, "TextLabel4_2" );
+ TextLabel4_2 = new TQLabel( this, "TextLabel4_2" );
TextLabel4_2.setText( trUtf8( "&Password:" ) );
ConnectDialogLayout.addMultiCellWidget( TextLabel4_2, 3, 3, 0, 1 );
- TextLabel2 = new QLabel( this, "TextLabel2" );
+ TextLabel2 = new TQLabel( this, "TextLabel2" );
TextLabel2.setText( trUtf8( "D&river" ) );
ConnectDialogLayout.addMultiCellWidget( TextLabel2, 0, 0, 0, 1 );
- TextLabel5 = new QLabel( this, "TextLabel5" );
+ TextLabel5 = new TQLabel( this, "TextLabel5" );
TextLabel5.setText( trUtf8( "&Hostname:" ) );
ConnectDialogLayout.addMultiCellWidget( TextLabel5, 4, 4, 0, 1 );
- comboDriver = new QComboBox( false, this, "comboDriver" );
+ comboDriver = new TQComboBox( false, this, "comboDriver" );
comboDriver.setEditable( true );
ConnectDialogLayout.addMultiCellWidget( comboDriver, 0, 0, 2, 3 );
- editHostname = new QLineEdit( this, "editHostname" );
+ editHostname = new TQLineEdit( this, "editHostname" );
ConnectDialogLayout.addMultiCellWidget( editHostname, 4, 4, 2, 3 );
- editUsername = new QLineEdit( this, "editUsername" );
+ editUsername = new TQLineEdit( this, "editUsername" );
ConnectDialogLayout.addMultiCellWidget( editUsername, 2, 2, 2, 3 );
- PushButton1 = new QPushButton( this, "PushButton1" );
+ PushButton1 = new TQPushButton( this, "PushButton1" );
PushButton1.setText( trUtf8( "&OK" ) );
PushButton1.setDefault( true );
ConnectDialogLayout.addMultiCellWidget( PushButton1, 5, 5, 1, 2 );
- PushButton2 = new QPushButton( this, "PushButton2" );
+ PushButton2 = new TQPushButton( this, "PushButton2" );
PushButton2.setText( trUtf8( "&Cancel" ) );
ConnectDialogLayout.addWidget( PushButton2, 5, 3 );
- spacer = new QSpacerItem( 20, 20, QSizePolicy.Expanding, QSizePolicy.Minimum );
+ spacer = new TQSpacerItem( 20, 20, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
ConnectDialogLayout.addItem( spacer, 5, 0 );
diff --git a/qtjava/javalib/examples/demo/sql/EditBookForm.java b/qtjava/javalib/examples/demo/sql/EditBookForm.java
index 6c07176f..4def1743 100644
--- a/qtjava/javalib/examples/demo/sql/EditBookForm.java
+++ b/qtjava/javalib/examples/demo/sql/EditBookForm.java
@@ -9,33 +9,33 @@
import org.kde.qt.*;
import java.util.HashMap;
-public class EditBookForm extends QDialog {
- QDataBrowser BookDataBrowser;
- QLabel labelPrice;
- QLabel labelTitle;
- QLineEdit QLineEditTitle;
- QLineEdit QLineEditPrice;
- QPushButton PushButtonInsert;
- QPushButton PushButtonUpdate;
- QPushButton PushButtonDelete;
- QPushButton PushButtonClose;
- QPushButton PushButtonFirst;
- QPushButton PushButtonPrev;
- QPushButton PushButtonNext;
- QPushButton PushButtonLast;
- QLabel TextLabel1;
- QComboBox ComboBoxAuthor;
-
- QVBoxLayout EditBookFormLayout;
- QGridLayout BookDataBrowserLayout;
- QGridLayout Layout2;
- QHBoxLayout Layout6;
- QHBoxLayout Layout3;
- QHBoxLayout Layout6_2;
+public class EditBookForm extends TQDialog {
+ TQDataBrowser BookDataBrowser;
+ TQLabel labelPrice;
+ TQLabel labelTitle;
+ TQLineEdit TQLineEditTitle;
+ TQLineEdit TQLineEditPrice;
+ TQPushButton PushButtonInsert;
+ TQPushButton PushButtonUpdate;
+ TQPushButton PushButtonDelete;
+ TQPushButton PushButtonClose;
+ TQPushButton PushButtonFirst;
+ TQPushButton PushButtonPrev;
+ TQPushButton PushButtonNext;
+ TQPushButton PushButtonLast;
+ TQLabel TextLabel1;
+ TQComboBox ComboBoxAuthor;
+
+ TQVBoxLayout EditBookFormLayout;
+ TQGridLayout BookDataBrowserLayout;
+ TQGridLayout Layout2;
+ TQHBoxLayout Layout6;
+ TQHBoxLayout Layout3;
+ TQHBoxLayout Layout6_2;
HashMap authorMap;
- QSizePolicy policy_1;
- QSqlForm BookDataBrowserForm;
+ TQSizePolicy policy_1;
+ TQSqlForm BookDataBrowserForm;
/*
* Constructs a EditBookForm which is a child of 'parent', with the
@@ -44,102 +44,102 @@ public class EditBookForm extends QDialog {
* The dialog will by default be modeless, unless you set 'modal' to
* true to construct a modal dialog.
*/
-EditBookForm( QWidget parent, String name, boolean modal, int fl )
+EditBookForm( TQWidget parent, String name, boolean modal, int fl )
{
super( parent, name, modal, fl );
if ( name == null )
setName( "EditBookForm" );
resize( 524, 371 );
setCaption( trUtf8( "Edit Books" ) );
- EditBookFormLayout = new QVBoxLayout( this );
+ EditBookFormLayout = new TQVBoxLayout( this );
EditBookFormLayout.setSpacing( 6 );
EditBookFormLayout.setMargin( 11 );
- BookDataBrowser = new QDataBrowser( this, "BookDataBrowser" );
- BookDataBrowserLayout = new QGridLayout( BookDataBrowser );
+ BookDataBrowser = new TQDataBrowser( this, "BookDataBrowser" );
+ BookDataBrowserLayout = new TQGridLayout( BookDataBrowser );
BookDataBrowser.setSort( new String[] { "title ASC" } );
BookDataBrowserLayout.setSpacing( 6 );
BookDataBrowserLayout.setMargin( 11 );
- Layout2 = new QGridLayout();
+ Layout2 = new TQGridLayout();
Layout2.setSpacing( 6 );
Layout2.setMargin( 0 );
- labelPrice = new QLabel( BookDataBrowser, "labelPrice" );
+ labelPrice = new TQLabel( BookDataBrowser, "labelPrice" );
labelPrice.setText( trUtf8( "Price" ) );
Layout2.addWidget( labelPrice, 1, 0 );
- labelTitle = new QLabel( BookDataBrowser, "labelTitle" );
+ labelTitle = new TQLabel( BookDataBrowser, "labelTitle" );
labelTitle.setText( trUtf8( "Title" ) );
Layout2.addWidget( labelTitle, 0, 0 );
- QLineEditTitle = new QLineEdit( BookDataBrowser, "QLineEditTitle" );
+ TQLineEditTitle = new TQLineEdit( BookDataBrowser, "TQLineEditTitle" );
- Layout2.addWidget( QLineEditTitle, 0, 1 );
+ Layout2.addWidget( TQLineEditTitle, 0, 1 );
- QLineEditPrice = new QLineEdit( BookDataBrowser, "QLineEditPrice" );
+ TQLineEditPrice = new TQLineEdit( BookDataBrowser, "TQLineEditPrice" );
- Layout2.addWidget( QLineEditPrice, 1, 1 );
+ Layout2.addWidget( TQLineEditPrice, 1, 1 );
BookDataBrowserLayout.addLayout( Layout2, 0, 0 );
- Layout6 = new QHBoxLayout();
+ Layout6 = new TQHBoxLayout();
Layout6.setSpacing( 6 );
Layout6.setMargin( 0 );
- PushButtonInsert = new QPushButton( BookDataBrowser, "PushButtonInsert" );
+ PushButtonInsert = new TQPushButton( BookDataBrowser, "PushButtonInsert" );
PushButtonInsert.setText( trUtf8( "&Insert" ) );
Layout6.addWidget( PushButtonInsert );
- PushButtonUpdate = new QPushButton( BookDataBrowser, "PushButtonUpdate" );
+ PushButtonUpdate = new TQPushButton( BookDataBrowser, "PushButtonUpdate" );
PushButtonUpdate.setText( trUtf8( "&Update" ) );
PushButtonUpdate.setDefault( true );
Layout6.addWidget( PushButtonUpdate );
- PushButtonDelete = new QPushButton( BookDataBrowser, "PushButtonDelete" );
+ PushButtonDelete = new TQPushButton( BookDataBrowser, "PushButtonDelete" );
PushButtonDelete.setText( trUtf8( "&Delete" ) );
Layout6.addWidget( PushButtonDelete );
- PushButtonClose = new QPushButton( BookDataBrowser, "PushButtonClose" );
+ PushButtonClose = new TQPushButton( BookDataBrowser, "PushButtonClose" );
PushButtonClose.setText( trUtf8( "&Close" ) );
Layout6.addWidget( PushButtonClose );
BookDataBrowserLayout.addLayout( Layout6, 3, 0 );
- Layout3 = new QHBoxLayout();
+ Layout3 = new TQHBoxLayout();
Layout3.setSpacing( 6 );
Layout3.setMargin( 0 );
- PushButtonFirst = new QPushButton( BookDataBrowser, "PushButtonFirst" );
+ PushButtonFirst = new TQPushButton( BookDataBrowser, "PushButtonFirst" );
PushButtonFirst.setText( trUtf8( "|< &First" ) );
Layout3.addWidget( PushButtonFirst );
- PushButtonPrev = new QPushButton( BookDataBrowser, "PushButtonPrev" );
+ PushButtonPrev = new TQPushButton( BookDataBrowser, "PushButtonPrev" );
PushButtonPrev.setText( trUtf8( "<< &Prev" ) );
Layout3.addWidget( PushButtonPrev );
- PushButtonNext = new QPushButton( BookDataBrowser, "PushButtonNext" );
+ PushButtonNext = new TQPushButton( BookDataBrowser, "PushButtonNext" );
PushButtonNext.setText( trUtf8( "&Next >>" ) );
Layout3.addWidget( PushButtonNext );
- PushButtonLast = new QPushButton( BookDataBrowser, "PushButtonLast" );
+ PushButtonLast = new TQPushButton( BookDataBrowser, "PushButtonLast" );
PushButtonLast.setText( trUtf8( "&Last >|" ) );
Layout3.addWidget( PushButtonLast );
BookDataBrowserLayout.addLayout( Layout3, 2, 0 );
- Layout6_2 = new QHBoxLayout();
+ Layout6_2 = new TQHBoxLayout();
Layout6_2.setSpacing( 6 );
Layout6_2.setMargin( 0 );
- TextLabel1 = new QLabel( BookDataBrowser, "TextLabel1" );
+ TextLabel1 = new TQLabel( BookDataBrowser, "TextLabel1" );
TextLabel1.setText( trUtf8( "Author" ) );
Layout6_2.addWidget( TextLabel1 );
- ComboBoxAuthor = new QComboBox( false, BookDataBrowser, "ComboBoxAuthor" );
- policy_1 = new QSizePolicy( (int)7, (int)0, ComboBoxAuthor.sizePolicy().hasHeightForWidth() );
+ ComboBoxAuthor = new TQComboBox( false, BookDataBrowser, "ComboBoxAuthor" );
+ policy_1 = new TQSizePolicy( (int)7, (int)0, ComboBoxAuthor.sizePolicy().hasHeightForWidth() );
ComboBoxAuthor.setSizePolicy( policy_1 );
Layout6_2.addWidget( ComboBoxAuthor );
@@ -147,9 +147,9 @@ EditBookForm( QWidget parent, String name, boolean modal, int fl )
EditBookFormLayout.addWidget( BookDataBrowser );
// database support
- BookDataBrowserForm = new QSqlForm( this, "BookDataBrowserForm" );
- BookDataBrowserForm.insert( QLineEditTitle, "title" );
- BookDataBrowserForm.insert( QLineEditPrice, "price" );
+ BookDataBrowserForm = new TQSqlForm( this, "BookDataBrowserForm" );
+ BookDataBrowserForm.insert( TQLineEditTitle, "title" );
+ BookDataBrowserForm.insert( TQLineEditPrice, "price" );
BookDataBrowser.setForm( BookDataBrowserForm );
@@ -169,15 +169,15 @@ EditBookForm( QWidget parent, String name, boolean modal, int fl )
connect( PushButtonUpdate, SIGNAL( "clicked()" ), BookDataBrowser, SLOT( "update()" ) );
connect( PushButtonDelete, SIGNAL( "clicked()" ), BookDataBrowser, SLOT( "del()" ) );
connect( PushButtonClose, SIGNAL( "clicked()" ), this, SLOT( "accept()" ) );
- connect( BookDataBrowser, SIGNAL( "primeUpdate(QSqlRecord)" ), this, SLOT( "primeUpdateBook(QSqlRecord)" ) );
- connect( BookDataBrowser, SIGNAL( "beforeUpdate(QSqlRecord)" ), this, SLOT( "beforeUpdateBook(QSqlRecord)" ) );
- connect( BookDataBrowser, SIGNAL( "beforeInsert(QSqlRecord)" ), this, SLOT( "beforeUpdateBook(QSqlRecord)" ) );
- connect( BookDataBrowser, SIGNAL( "primeInsert(QSqlRecord)" ), this, SLOT( "primeInsertBook(QSqlRecord)" ) );
- connect( BookDataBrowser, SIGNAL( "primeInsert(QSqlRecord)" ), this, SLOT( "primeInsertBook(QSqlRecord)" ) );
+ connect( BookDataBrowser, SIGNAL( "primeUpdate(TQSqlRecord)" ), this, SLOT( "primeUpdateBook(TQSqlRecord)" ) );
+ connect( BookDataBrowser, SIGNAL( "beforeUpdate(TQSqlRecord)" ), this, SLOT( "beforeUpdateBook(TQSqlRecord)" ) );
+ connect( BookDataBrowser, SIGNAL( "beforeInsert(TQSqlRecord)" ), this, SLOT( "beforeUpdateBook(TQSqlRecord)" ) );
+ connect( BookDataBrowser, SIGNAL( "primeInsert(TQSqlRecord)" ), this, SLOT( "primeInsertBook(TQSqlRecord)" ) );
+ connect( BookDataBrowser, SIGNAL( "primeInsert(TQSqlRecord)" ), this, SLOT( "primeInsertBook(TQSqlRecord)" ) );
// tab order
- setTabOrder( QLineEditTitle, QLineEditPrice );
- setTabOrder( QLineEditPrice, ComboBoxAuthor );
+ setTabOrder( TQLineEditTitle, TQLineEditPrice );
+ setTabOrder( TQLineEditPrice, ComboBoxAuthor );
setTabOrder( ComboBoxAuthor, PushButtonFirst );
setTabOrder( PushButtonFirst, PushButtonPrev );
setTabOrder( PushButtonPrev, PushButtonNext );
@@ -197,7 +197,7 @@ public void polish()
{
if ( BookDataBrowser != null ) {
if ( BookDataBrowser.sqlCursor() == null ) {
- QSqlCursor cursor = new QSqlCursor( "book" );
+ TQSqlCursor cursor = new TQSqlCursor( "book" );
BookDataBrowser.setSqlCursor( cursor, true );
BookDataBrowser.refresh();
BookDataBrowser.first();
@@ -206,11 +206,11 @@ public void polish()
super.polish();
}
-void beforeUpdateBook(QSqlRecord buffer)
+void beforeUpdateBook(TQSqlRecord buffer)
{
int[] id = { 0 };
mapAuthor( ComboBoxAuthor.currentText(), id, false );
- buffer.setValue( "authorid", new QVariant(id[0]) );
+ buffer.setValue( "authorid", new TQVariant(id[0]) );
}
void mapAuthor(String name, int[] id, boolean populate)
@@ -221,9 +221,9 @@ void mapAuthor(String name, int[] id, boolean populate)
// id[0] = authorMap[ name ];
}
-void primeInsertBook(QSqlRecord buffer)
+void primeInsertBook(TQSqlRecord buffer)
{
- QSqlQuery q = new QSqlQuery();
+ TQSqlQuery q = new TQSqlQuery();
q.exec( "UPDATE sequence SET sequence = sequence + 1 WHERE tablename='book';" );
q.exec( "SELECT sequence FROM sequence WHERE tablename='book';" );
if ( q.next() ) {
@@ -231,10 +231,10 @@ void primeInsertBook(QSqlRecord buffer)
}
}
-void primeUpdateBook(QSqlRecord buffer)
+void primeUpdateBook(TQSqlRecord buffer)
{
// Who is this book's author?
- QSqlQuery query = new QSqlQuery( "SELECT surname FROM author WHERE id=" +
+ TQSqlQuery query = new TQSqlQuery( "SELECT surname FROM author WHERE id=" +
buffer.value( "authorid" ).toString() + ";" );
String author = "";
if ( query.next() )
@@ -251,7 +251,7 @@ void primeUpdateBook(QSqlRecord buffer)
void init()
{
authorMap = new HashMap();
- QSqlQuery query = new QSqlQuery( "SELECT surname, id FROM author ORDER BY surname;" );
+ TQSqlQuery query = new TQSqlQuery( "SELECT surname, id FROM author ORDER BY surname;" );
while ( query.next() ) {
ComboBoxAuthor.insertItem( query.value( 0 ).toString() );
int[] id = new int[1];
diff --git a/qtjava/javalib/examples/demo/sql/Main.java b/qtjava/javalib/examples/demo/sql/Main.java
index 1bf81c88..b1697dd8 100644
--- a/qtjava/javalib/examples/demo/sql/Main.java
+++ b/qtjava/javalib/examples/demo/sql/Main.java
@@ -4,7 +4,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication(args);
+ TQApplication a = new TQApplication(args);
BookForm form = new BookForm();
a.setMainWidget( form );
diff --git a/qtjava/javalib/examples/demo/widgets/Main.java b/qtjava/javalib/examples/demo/widgets/Main.java
index f78ca26d..0caf97ec 100644
--- a/qtjava/javalib/examples/demo/widgets/Main.java
+++ b/qtjava/javalib/examples/demo/widgets/Main.java
@@ -4,7 +4,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication(args);
+ TQApplication a = new TQApplication(args);
WidgetsBase widgets = new WidgetsBase();
a.setMainWidget( widgets );
diff --git a/qtjava/javalib/examples/demo/widgets/WidgetsBase.java b/qtjava/javalib/examples/demo/widgets/WidgetsBase.java
index 74382cee..857a8fb3 100644
--- a/qtjava/javalib/examples/demo/widgets/WidgetsBase.java
+++ b/qtjava/javalib/examples/demo/widgets/WidgetsBase.java
@@ -12,80 +12,80 @@ import java.util.Calendar;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
-public class WidgetsBase extends QWidget {
- QListBox ListBox3;
- QTextEdit TextEdit1;
- QTabWidget TabWidget2;
- QWidget tab;
- QIconView IconView1;
- QWidget tab_2;
- QTable Table1;
- QWidget tab_3;
- QListView ListView3;
- QGroupBox groupBox;
- QLCDNumber lcdDisplay;
- QSlider slider;
- QLabel TextLabel1_2;
- QPushButton pushButton;
- QComboBox buttonColorBox;
- QLineEdit lineEdit;
- QLabel TextLabel1_2_2;
- QSpinBox spinBox;
- QProgressBar progressBar;
- QLabel colorTest;
- QLabel PixmapLabel1;
- QButtonGroup ButtonGroup1;
- QCheckBox CheckBox1;
- QCheckBox CheckBox2;
- QCheckBox CheckBox3;
- QButtonGroup ButtonGroup2;
- QRadioButton RadioButton3;
- QRadioButton RadioButton4;
- QRadioButton RadioButton2;
- QGroupBox GroupBox1;
+public class WidgetsBase extends TQWidget {
+ TQListBox ListBox3;
+ TQTextEdit TextEdit1;
+ TQTabWidget TabWidget2;
+ TQWidget tab;
+ TQIconView IconView1;
+ TQWidget tab_2;
+ TQTable Table1;
+ TQWidget tab_3;
+ TQListView ListView3;
+ TQGroupBox groupBox;
+ TQLCDNumber lcdDisplay;
+ TQSlider slider;
+ TQLabel TextLabel1_2;
+ TQPushButton pushButton;
+ TQComboBox buttonColorBox;
+ TQLineEdit lineEdit;
+ TQLabel TextLabel1_2_2;
+ TQSpinBox spinBox;
+ TQProgressBar progressBar;
+ TQLabel colorTest;
+ TQLabel PixmapLabel1;
+ TQButtonGroup ButtonGroup1;
+ TQCheckBox CheckBox1;
+ TQCheckBox CheckBox2;
+ TQCheckBox CheckBox3;
+ TQButtonGroup ButtonGroup2;
+ TQRadioButton RadioButton3;
+ TQRadioButton RadioButton4;
+ TQRadioButton RadioButton2;
+ TQGroupBox GroupBox1;
AnalogClock clock;
- QDateEdit dateEdit;
- QTimeEdit timeEdit;
- QLabel dateTimeLabel;
-
- QGridLayout WidgetsBaseLayout;
- QGridLayout tabLayout;
- QGridLayout tabLayout_2;
- QGridLayout tabLayout_3;
- QGridLayout groupBoxLayout;
- QHBoxLayout Layout9;
- QGridLayout ButtonGroup1Layout;
- QGridLayout ButtonGroup2Layout;
- QGridLayout GroupBox1Layout;
- QHBoxLayout Layout5;
- QSizePolicy sizePolicy1;
- QSizePolicy sizePolicy2;
- QSizePolicy sizePolicy3;
-
- QIconViewItem item1;
- QIconViewItem item2;
- QIconViewItem item3;
- QIconViewItem item4;
- QIconViewItem item5;
- QIconViewItem item6;
- QIconViewItem item7;
- QIconViewItem item8;
- QIconViewItem item9;
- QIconViewItem item10;
- QIconViewItem item11;
- QIconViewItem item12;
- QIconViewItem item13;
- QIconViewItem item14;
- QIconViewItem item15;
- QIconViewItem item16;
- QIconViewItem item17;
-
- QListViewItem item_1;
- QListViewItem item_2;
- QListViewItem item_3;
- QListViewItem item_4;
- QListViewItem item_5;
- QListViewItem item_6;
+ TQDateEdit dateEdit;
+ TQTimeEdit timeEdit;
+ TQLabel dateTimeLabel;
+
+ TQGridLayout WidgetsBaseLayout;
+ TQGridLayout tabLayout;
+ TQGridLayout tabLayout_2;
+ TQGridLayout tabLayout_3;
+ TQGridLayout groupBoxLayout;
+ TQHBoxLayout Layout9;
+ TQGridLayout ButtonGroup1Layout;
+ TQGridLayout ButtonGroup2Layout;
+ TQGridLayout GroupBox1Layout;
+ TQHBoxLayout Layout5;
+ TQSizePolicy sizePolicy1;
+ TQSizePolicy sizePolicy2;
+ TQSizePolicy sizePolicy3;
+
+ TQIconViewItem item1;
+ TQIconViewItem item2;
+ TQIconViewItem item3;
+ TQIconViewItem item4;
+ TQIconViewItem item5;
+ TQIconViewItem item6;
+ TQIconViewItem item7;
+ TQIconViewItem item8;
+ TQIconViewItem item9;
+ TQIconViewItem item10;
+ TQIconViewItem item11;
+ TQIconViewItem item12;
+ TQIconViewItem item13;
+ TQIconViewItem item14;
+ TQIconViewItem item15;
+ TQIconViewItem item16;
+ TQIconViewItem item17;
+
+ TQListViewItem item_1;
+ TQListViewItem item_2;
+ TQListViewItem item_3;
+ TQListViewItem item_4;
+ TQListViewItem item_5;
+ TQListViewItem item_6;
static String[] image0_data = {
"16 16 92 2",
@@ -267,7 +267,7 @@ static String[] image1_data = {
"....#awjxjIEiJKl",
"....#eLxjIEjjjMl",
"....#axNIEJJOPQl",
-"....#RSTUVDWXQYl",
+"....#RSTUVDWXTQYl",
"....#lllllllllll"};
static String[] image2_data = {
@@ -1645,7 +1645,7 @@ static String[] image11_data = {
"..a#......jjvlEhhFGvwHIc........",
".cdh#b......jjJwKLGBlfMN........",
".cdGqzcc......jjhOvlBwEhc.......",
-".jdyvCKPcc.....bkEGlwQKRS.......",
+".jdyvCKPcc.....bkEGlwTQKRS.......",
".jkdeAlKEPcc...TxGBlwwtRc.......",
".jhkdyAJGEEhcccxlGGwUwgVWj......",
".jEhkdeyBlwftqtUwGwwlsXYZWjj....",
@@ -2719,7 +2719,7 @@ static String[] image16_data = {
"..........#gpgpgponmR#..........",
"...........#fpfgQqGS#...........",
"............#gffovA#............",
-".............rQQqz#.............",
+".............rTQQqz#.............",
".............TNqek#.............",
".............OeqvU#.............",
".............#Nqvc#.............",
@@ -5651,60 +5651,60 @@ static String[] image41_data = {
* Constructs a WidgetsBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-WidgetsBase( QWidget parent, String name, int fl )
+WidgetsBase( TQWidget parent, String name, int fl )
{
super( parent, name, fl );
- QPixmap image0 = new QPixmap( ( String[] ) image0_data );
- QPixmap image1 = new QPixmap( ( String[] ) image1_data );
- QPixmap image2 = new QPixmap( ( String[] ) image2_data );
- QPixmap image3 = new QPixmap( ( String[] ) image3_data );
- QPixmap image4 = new QPixmap( ( String[] ) image4_data );
- QPixmap image5 = new QPixmap( ( String[] ) image5_data );
- QPixmap image6 = new QPixmap( ( String[] ) image6_data );
- QPixmap image7 = new QPixmap( ( String[] ) image7_data );
- QPixmap image8 = new QPixmap( ( String[] ) image8_data );
- QPixmap image9 = new QPixmap( ( String[] ) image9_data );
- QPixmap image10 = new QPixmap( ( String[] ) image10_data );
- QPixmap image11 = new QPixmap( ( String[] ) image11_data );
- QPixmap image12 = new QPixmap( ( String[] ) image12_data );
- QPixmap image13 = new QPixmap( ( String[] ) image13_data );
- QPixmap image14 = new QPixmap( ( String[] ) image14_data );
- QPixmap image15 = new QPixmap( ( String[] ) image15_data );
- QPixmap image16 = new QPixmap( ( String[] ) image16_data );
- QPixmap image17 = new QPixmap( ( String[] ) image17_data );
- QPixmap image18 = new QPixmap( ( String[] ) image18_data );
- QPixmap image19 = new QPixmap( ( String[] ) image19_data );
- QPixmap image20 = new QPixmap( ( String[] ) image20_data );
- QPixmap image21 = new QPixmap( ( String[] ) image21_data );
- QPixmap image22 = new QPixmap( ( String[] ) image22_data );
- QPixmap image23 = new QPixmap( ( String[] ) image23_data );
- QPixmap image24 = new QPixmap( ( String[] ) image24_data );
- QPixmap image25 = new QPixmap( ( String[] ) image25_data );
- QPixmap image26 = new QPixmap( ( String[] ) image26_data );
- QPixmap image27 = new QPixmap( ( String[] ) image27_data );
- QPixmap image28 = new QPixmap( ( String[] ) image28_data );
- QPixmap image29 = new QPixmap( ( String[] ) image29_data );
- QPixmap image30 = new QPixmap( ( String[] ) image30_data );
- QPixmap image31 = new QPixmap( ( String[] ) image31_data );
- QPixmap image32 = new QPixmap( ( String[] ) image32_data );
- QPixmap image33 = new QPixmap( ( String[] ) image33_data );
- QPixmap image34 = new QPixmap( ( String[] ) image34_data );
- QPixmap image35 = new QPixmap( ( String[] ) image35_data );
- QPixmap image36 = new QPixmap( ( String[] ) image36_data );
- QPixmap image37 = new QPixmap( ( String[] ) image37_data );
- QPixmap image38 = new QPixmap( ( String[] ) image38_data );
- QPixmap image39 = new QPixmap( ( String[] ) image39_data );
- QPixmap image40 = new QPixmap( ( String[] ) image40_data );
- QPixmap image41 = new QPixmap( ( String[] ) image41_data );
+ TQPixmap image0 = new TQPixmap( ( String[] ) image0_data );
+ TQPixmap image1 = new TQPixmap( ( String[] ) image1_data );
+ TQPixmap image2 = new TQPixmap( ( String[] ) image2_data );
+ TQPixmap image3 = new TQPixmap( ( String[] ) image3_data );
+ TQPixmap image4 = new TQPixmap( ( String[] ) image4_data );
+ TQPixmap image5 = new TQPixmap( ( String[] ) image5_data );
+ TQPixmap image6 = new TQPixmap( ( String[] ) image6_data );
+ TQPixmap image7 = new TQPixmap( ( String[] ) image7_data );
+ TQPixmap image8 = new TQPixmap( ( String[] ) image8_data );
+ TQPixmap image9 = new TQPixmap( ( String[] ) image9_data );
+ TQPixmap image10 = new TQPixmap( ( String[] ) image10_data );
+ TQPixmap image11 = new TQPixmap( ( String[] ) image11_data );
+ TQPixmap image12 = new TQPixmap( ( String[] ) image12_data );
+ TQPixmap image13 = new TQPixmap( ( String[] ) image13_data );
+ TQPixmap image14 = new TQPixmap( ( String[] ) image14_data );
+ TQPixmap image15 = new TQPixmap( ( String[] ) image15_data );
+ TQPixmap image16 = new TQPixmap( ( String[] ) image16_data );
+ TQPixmap image17 = new TQPixmap( ( String[] ) image17_data );
+ TQPixmap image18 = new TQPixmap( ( String[] ) image18_data );
+ TQPixmap image19 = new TQPixmap( ( String[] ) image19_data );
+ TQPixmap image20 = new TQPixmap( ( String[] ) image20_data );
+ TQPixmap image21 = new TQPixmap( ( String[] ) image21_data );
+ TQPixmap image22 = new TQPixmap( ( String[] ) image22_data );
+ TQPixmap image23 = new TQPixmap( ( String[] ) image23_data );
+ TQPixmap image24 = new TQPixmap( ( String[] ) image24_data );
+ TQPixmap image25 = new TQPixmap( ( String[] ) image25_data );
+ TQPixmap image26 = new TQPixmap( ( String[] ) image26_data );
+ TQPixmap image27 = new TQPixmap( ( String[] ) image27_data );
+ TQPixmap image28 = new TQPixmap( ( String[] ) image28_data );
+ TQPixmap image29 = new TQPixmap( ( String[] ) image29_data );
+ TQPixmap image30 = new TQPixmap( ( String[] ) image30_data );
+ TQPixmap image31 = new TQPixmap( ( String[] ) image31_data );
+ TQPixmap image32 = new TQPixmap( ( String[] ) image32_data );
+ TQPixmap image33 = new TQPixmap( ( String[] ) image33_data );
+ TQPixmap image34 = new TQPixmap( ( String[] ) image34_data );
+ TQPixmap image35 = new TQPixmap( ( String[] ) image35_data );
+ TQPixmap image36 = new TQPixmap( ( String[] ) image36_data );
+ TQPixmap image37 = new TQPixmap( ( String[] ) image37_data );
+ TQPixmap image38 = new TQPixmap( ( String[] ) image38_data );
+ TQPixmap image39 = new TQPixmap( ( String[] ) image39_data );
+ TQPixmap image40 = new TQPixmap( ( String[] ) image40_data );
+ TQPixmap image41 = new TQPixmap( ( String[] ) image41_data );
if ( name == null )
setName( "WidgetsBase" );
resize( 718, 565 );
setCaption( trUtf8( "Widgets" ) );
- WidgetsBaseLayout = new QGridLayout( this );
+ WidgetsBaseLayout = new TQGridLayout( this );
WidgetsBaseLayout.setSpacing( 6 );
WidgetsBaseLayout.setMargin( 11 );
- ListBox3 = new QListBox( this, "ListBox3" );
+ ListBox3 = new TQListBox( this, "ListBox3" );
ListBox3.insertItem( image0, trUtf8( "Applix", "" ) );
ListBox3.insertItem( image1, trUtf8( "Binary", "" ) );
ListBox3.insertItem( image2, trUtf8( "Core", "" ) );
@@ -5718,7 +5718,7 @@ WidgetsBase( QWidget parent, String name, int fl )
WidgetsBaseLayout.addWidget( ListBox3, 2, 0 );
- TextEdit1 = new QTextEdit( this, "TextEdit1" );
+ TextEdit1 = new TQTextEdit( this, "TextEdit1" );
TextEdit1.setText( trUtf8( "Richtext
\n"
+ "
Qt supports formatted rich text, such as the heading above, emphasized, bold and underlined text, as well as colored text. This is red, while this is green, and this is blue.
\n"
+ "<> >\n"
@@ -5726,43 +5726,43 @@ WidgetsBase( QWidget parent, String name, int fl )
WidgetsBaseLayout.addWidget( TextEdit1, 2, 1 );
- TabWidget2 = new QTabWidget( this, "TabWidget2" );
+ TabWidget2 = new TQTabWidget( this, "TabWidget2" );
- tab = new QWidget( TabWidget2, "tab" );
- tabLayout = new QGridLayout( tab );
+ tab = new TQWidget( TabWidget2, "tab" );
+ tabLayout = new TQGridLayout( tab );
tabLayout.setSpacing( 6 );
tabLayout.setMargin( 11 );
- IconView1 = new QIconView( tab, "IconView1" );
- item1 = new QIconViewItem( IconView1, trUtf8( "Item 1", "" ), image10 );
- item2 = new QIconViewItem( IconView1, trUtf8( "Item 2", "" ), image11 );
- item3 = new QIconViewItem( IconView1, trUtf8( "Item 3", "" ), image12 );
- item4 = new QIconViewItem( IconView1, trUtf8( "Item 4", "" ), image13 );
- item5 = new QIconViewItem( IconView1, trUtf8( "Item 5", "" ), image14 );
- item6 = new QIconViewItem( IconView1, trUtf8( "Item 6", "" ), image15 );
- item7 = new QIconViewItem( IconView1, trUtf8( "Item 7", "" ), image16 );
- item8 = new QIconViewItem( IconView1, trUtf8( "Item 8", "" ), image17 );
- item9 = new QIconViewItem( IconView1, trUtf8( "Item 9", "" ), image18 );
- item10 = new QIconViewItem( IconView1, trUtf8( "Item 10", "" ), image19 );
- item11 = new QIconViewItem( IconView1, trUtf8( "Item 11", "" ), image20 );
- item12 = new QIconViewItem( IconView1, trUtf8( "Item 12", "" ), image21 );
- item13 = new QIconViewItem( IconView1, trUtf8( "Item 13", "" ), image22 );
- item14 = new QIconViewItem( IconView1, trUtf8( "Item 14", "" ), image23 );
- item15 = new QIconViewItem( IconView1, trUtf8( "Item 15", "" ), image24 );
- item16 = new QIconViewItem( IconView1, trUtf8( "Item 16", "" ), image25 );
- item17 = new QIconViewItem( IconView1, trUtf8( "Item 17", "" ), image26 );
- IconView1.setArrangement( QIconView.LeftToRight );
- IconView1.setResizeMode( QIconView.Adjust );
+ IconView1 = new TQIconView( tab, "IconView1" );
+ item1 = new TQIconViewItem( IconView1, trUtf8( "Item 1", "" ), image10 );
+ item2 = new TQIconViewItem( IconView1, trUtf8( "Item 2", "" ), image11 );
+ item3 = new TQIconViewItem( IconView1, trUtf8( "Item 3", "" ), image12 );
+ item4 = new TQIconViewItem( IconView1, trUtf8( "Item 4", "" ), image13 );
+ item5 = new TQIconViewItem( IconView1, trUtf8( "Item 5", "" ), image14 );
+ item6 = new TQIconViewItem( IconView1, trUtf8( "Item 6", "" ), image15 );
+ item7 = new TQIconViewItem( IconView1, trUtf8( "Item 7", "" ), image16 );
+ item8 = new TQIconViewItem( IconView1, trUtf8( "Item 8", "" ), image17 );
+ item9 = new TQIconViewItem( IconView1, trUtf8( "Item 9", "" ), image18 );
+ item10 = new TQIconViewItem( IconView1, trUtf8( "Item 10", "" ), image19 );
+ item11 = new TQIconViewItem( IconView1, trUtf8( "Item 11", "" ), image20 );
+ item12 = new TQIconViewItem( IconView1, trUtf8( "Item 12", "" ), image21 );
+ item13 = new TQIconViewItem( IconView1, trUtf8( "Item 13", "" ), image22 );
+ item14 = new TQIconViewItem( IconView1, trUtf8( "Item 14", "" ), image23 );
+ item15 = new TQIconViewItem( IconView1, trUtf8( "Item 15", "" ), image24 );
+ item16 = new TQIconViewItem( IconView1, trUtf8( "Item 16", "" ), image25 );
+ item17 = new TQIconViewItem( IconView1, trUtf8( "Item 17", "" ), image26 );
+ IconView1.setArrangement( TQIconView.LeftToRight );
+ IconView1.setResizeMode( TQIconView.Adjust );
tabLayout.addWidget( IconView1, 0, 0 );
TabWidget2.insertTab( tab, trUtf8( "Iconview", "" ) );
- tab_2 = new QWidget( TabWidget2, "tab_2" );
- tabLayout_2 = new QGridLayout( tab_2 );
+ tab_2 = new TQWidget( TabWidget2, "tab_2" );
+ tabLayout_2 = new TQGridLayout( tab_2 );
tabLayout_2.setSpacing( 6 );
tabLayout_2.setMargin( 11 );
- Table1 = new QTable( tab_2, "Table1" );
+ Table1 = new TQTable( tab_2, "Table1" );
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "Tables", "" ) );
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "are", "" ) );
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "easy", "" ) );
@@ -5775,9 +5775,9 @@ WidgetsBase( QWidget parent, String name, int fl )
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "10", "" ) );
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "11", "" ) );
Table1.setNumCols( Table1.numCols() + 1 ); Table1.horizontalHeader().setLabel( Table1.numCols() - 1, trUtf8( "12", "" ) );
- Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new QIconSet(image27), trUtf8( "", "" ) );
- Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new QIconSet(image28), trUtf8( "", "" ) );
- Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new QIconSet(image29), trUtf8( "", "" ) );
+ Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new TQIconSet(image27), trUtf8( "", "" ) );
+ Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new TQIconSet(image28), trUtf8( "", "" ) );
+ Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, new TQIconSet(image29), trUtf8( "", "" ) );
Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, trUtf8( "4", "" ) );
Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, trUtf8( "5", "" ) );
Table1.setNumRows( Table1.numRows() + 1 ); Table1.verticalHeader().setLabel( Table1.numRows() - 1, trUtf8( "6", "" ) );
@@ -5794,37 +5794,37 @@ WidgetsBase( QWidget parent, String name, int fl )
tabLayout_2.addWidget( Table1, 0, 0 );
TabWidget2.insertTab( tab_2, trUtf8( "Table", "" ) );
- tab_3 = new QWidget( TabWidget2, "tab_3" );
- tabLayout_3 = new QGridLayout( tab_3 );
+ tab_3 = new TQWidget( TabWidget2, "tab_3" );
+ tabLayout_3 = new TQGridLayout( tab_3 );
tabLayout_3.setSpacing( 6 );
tabLayout_3.setMargin( 11 );
- ListView3 = new QListView( tab_3, "ListView3" );
+ ListView3 = new TQListView( tab_3, "ListView3" );
ListView3.addColumn( trUtf8( "Things", "" ) );
ListView3.addColumn( trUtf8( "Text", "" ) );
ListView3.addColumn( trUtf8( "Stuff", "" ) );
- item_1 = new QListViewItem( ListView3, "" );
+ item_1 = new TQListViewItem( ListView3, "" );
item_1.setPixmap( 0, image30 );
item_1.setText( 1, trUtf8( "Airbrush", "" ) );
item_1.setPixmap( 1, image31 );
item_1.setText( 2, trUtf8( "What stuff?", "" ) );
- item_4 = new QListViewItem( ListView3, item_1 );
+ item_4 = new TQListViewItem( ListView3, item_1 );
item_4.setPixmap( 0, image32 );
item_4.setText( 1, trUtf8( "Eraser", "" ) );
item_4.setPixmap( 1, image31 );
item_4.setText( 2, trUtf8( "Here?", "" ) );
- item_2 = new QListViewItem( ListView3, item_4 );
+ item_2 = new TQListViewItem( ListView3, item_4 );
item_2.setOpen( true );
- item_3 = new QListViewItem( item_2, item_4 );
+ item_3 = new TQListViewItem( item_2, item_4 );
item_3.setOpen( true );
- item_5 = new QListViewItem( item_3, item_4 );
+ item_5 = new TQListViewItem( item_3, item_4 );
item_5.setText( 0, trUtf8( "Subitem", "" ) );
item_5.setPixmap( 0, image28 );
item_3.setText( 0, trUtf8( "Pixmap subitem 1", "" ) );
item_2.setOpen( true );
- item_6 = new QListViewItem( item_2, item_3 );
+ item_6 = new TQListViewItem( item_2, item_3 );
item_6.setText( 0, trUtf8( "Pixmap subitem 2 ", "" ) );
item_2.setText( 0, trUtf8( "Pixmap item", "" ) );
item_2.setPixmap( 0, image33 );
@@ -5832,53 +5832,53 @@ WidgetsBase( QWidget parent, String name, int fl )
item_2.setText( 2, trUtf8( "Nothing Again", "" ) );
ListView3.setAllColumnsShowFocus( true );
- ListView3.setResizeMode( QListView.AllColumns );
+ ListView3.setResizeMode( TQListView.AllColumns );
tabLayout_3.addWidget( ListView3, 0, 0 );
TabWidget2.insertTab( tab_3, trUtf8( "Listview", "" ) );
WidgetsBaseLayout.addMultiCellWidget( TabWidget2, 3, 3, 0, 1 );
- groupBox = new QGroupBox( this, "groupBox" );
+ groupBox = new TQGroupBox( this, "groupBox" );
groupBox.setTitle( trUtf8( "Group box" ) );
groupBox.setColumnLayout(0, Qt.Vertical );
groupBox.layout().setSpacing( 0 );
groupBox.layout().setMargin( 0 );
- groupBoxLayout = new QGridLayout( groupBox.layout() );
+ groupBoxLayout = new TQGridLayout( groupBox.layout() );
groupBoxLayout.setAlignment( Qt.AlignTop );
groupBoxLayout.setSpacing( 6 );
groupBoxLayout.setMargin( 11 );
- lcdDisplay = new QLCDNumber( groupBox, "lcdDisplay" );
- sizePolicy1 = new QSizePolicy();
+ lcdDisplay = new TQLCDNumber( groupBox, "lcdDisplay" );
+ sizePolicy1 = new TQSizePolicy();
sizePolicy1.setHorData(7);
sizePolicy1.setVerData(7);
sizePolicy1.setHeightForWidth(lcdDisplay.sizePolicy().hasHeightForWidth());
lcdDisplay.setSizePolicy( sizePolicy1 );
lcdDisplay.setNumDigits( 2 );
- lcdDisplay.setSegmentStyle( QLCDNumber.Filled );
+ lcdDisplay.setSegmentStyle( TQLCDNumber.Filled );
groupBoxLayout.addMultiCellWidget( lcdDisplay, 0, 2, 3, 3 );
- slider = new QSlider( groupBox, "slider" );
- slider.setOrientation( QSlider.Horizontal );
- slider.setTickmarks( QSlider.Left );
+ slider = new TQSlider( groupBox, "slider" );
+ slider.setOrientation( TQSlider.Horizontal );
+ slider.setTickmarks( TQSlider.Left );
slider.setTickInterval( 5 );
groupBoxLayout.addWidget( slider, 2, 2 );
- TextLabel1_2 = new QLabel( groupBox, "TextLabel1_2" );
+ TextLabel1_2 = new TQLabel( groupBox, "TextLabel1_2" );
TextLabel1_2.setText( trUtf8( "Pick a base color:" ) );
groupBoxLayout.addWidget( TextLabel1_2, 0, 0 );
- pushButton = new QPushButton( groupBox, "pushButton" );
- pushButton.setCursor( new QCursor( 0 ) );
+ pushButton = new TQPushButton( groupBox, "pushButton" );
+ pushButton.setCursor( new TQCursor( 0 ) );
pushButton.setText( trUtf8( "&Reset colors" ) );
groupBoxLayout.addWidget( pushButton, 2, 0 );
- buttonColorBox = new QComboBox( false, groupBox, "buttonColorBox" );
+ buttonColorBox = new TQComboBox( false, groupBox, "buttonColorBox" );
buttonColorBox.insertItem( image34, trUtf8( "pale green", "" ) );
buttonColorBox.insertItem( image35, trUtf8( "deep sky blue", "" ) );
buttonColorBox.insertItem( image36, trUtf8( "steel blue", "" ) );
@@ -5889,101 +5889,101 @@ WidgetsBase( QWidget parent, String name, int fl )
groupBoxLayout.addWidget( buttonColorBox, 1, 0 );
- lineEdit = new QLineEdit( groupBox, "lineEdit" );
+ lineEdit = new TQLineEdit( groupBox, "lineEdit" );
lineEdit.setText( trUtf8( "hot pink" ) );
groupBoxLayout.addWidget( lineEdit, 1, 1 );
- TextLabel1_2_2 = new QLabel( groupBox, "TextLabel1_2_2" );
+ TextLabel1_2_2 = new TQLabel( groupBox, "TextLabel1_2_2" );
TextLabel1_2_2.setText( trUtf8( "Enter a color name and hit return:" ) );
groupBoxLayout.addWidget( TextLabel1_2_2, 0, 1 );
- spinBox = new QSpinBox( groupBox, "spinBox" );
+ spinBox = new TQSpinBox( groupBox, "spinBox" );
groupBoxLayout.addWidget( spinBox, 1, 2 );
- progressBar = new QProgressBar( groupBox, "progressBar" );
+ progressBar = new TQProgressBar( groupBox, "progressBar" );
groupBoxLayout.addWidget( progressBar, 0, 2 );
- colorTest = new QLabel( groupBox, "colorTest" );
- colorTest.setFrameShape( QLabel.Box );
- colorTest.setFrameShadow( QLabel.Sunken );
+ colorTest = new TQLabel( groupBox, "colorTest" );
+ colorTest.setFrameShape( TQLabel.Box );
+ colorTest.setFrameShadow( TQLabel.Sunken );
colorTest.setText( trUtf8( "Color test area" ) );
- colorTest.setAlignment( QLabel.AlignAuto | QLabel.AlignCenter );
+ colorTest.setAlignment( TQLabel.AlignAuto | TQLabel.AlignCenter );
groupBoxLayout.addWidget( colorTest, 2, 1 );
WidgetsBaseLayout.addMultiCellWidget( groupBox, 1, 1, 0, 1 );
- Layout9 = new QHBoxLayout();
+ Layout9 = new TQHBoxLayout();
Layout9.setSpacing( 6 );
Layout9.setMargin( 0 );
- PixmapLabel1 = new QLabel( this, "PixmapLabel1" );
- PixmapLabel1.setFrameShape( QLabel.Panel );
+ PixmapLabel1 = new TQLabel( this, "PixmapLabel1" );
+ PixmapLabel1.setFrameShape( TQLabel.Panel );
PixmapLabel1.setMargin( 1 );
PixmapLabel1.setPixmap( image41 );
PixmapLabel1.setScaledContents( true );
Layout9.addWidget( PixmapLabel1 );
- ButtonGroup1 = new QButtonGroup( this, "ButtonGroup1" );
+ ButtonGroup1 = new TQButtonGroup( this, "ButtonGroup1" );
ButtonGroup1.setTitle( trUtf8( "Check boxes" ) );
ButtonGroup1.setColumnLayout(0, Qt.Vertical );
ButtonGroup1.layout().setSpacing( 0 );
ButtonGroup1.layout().setMargin( 0 );
- ButtonGroup1Layout = new QGridLayout( ButtonGroup1.layout() );
+ ButtonGroup1Layout = new TQGridLayout( ButtonGroup1.layout() );
ButtonGroup1Layout.setAlignment( Qt.AlignTop );
ButtonGroup1Layout.setSpacing( 6 );
ButtonGroup1Layout.setMargin( 11 );
- CheckBox1 = new QCheckBox( ButtonGroup1, "CheckBox1" );
+ CheckBox1 = new TQCheckBox( ButtonGroup1, "CheckBox1" );
CheckBox1.setText( trUtf8( "Apples" ) );
ButtonGroup1Layout.addWidget( CheckBox1, 0, 0 );
- CheckBox2 = new QCheckBox( ButtonGroup1, "CheckBox2" );
+ CheckBox2 = new TQCheckBox( ButtonGroup1, "CheckBox2" );
CheckBox2.setText( trUtf8( "Banana" ) );
ButtonGroup1Layout.addWidget( CheckBox2, 1, 0 );
- CheckBox3 = new QCheckBox( ButtonGroup1, "CheckBox3" );
+ CheckBox3 = new TQCheckBox( ButtonGroup1, "CheckBox3" );
CheckBox3.setText( trUtf8( "Orange" ) );
CheckBox3.setChecked( true );
ButtonGroup1Layout.addWidget( CheckBox3, 2, 0 );
Layout9.addWidget( ButtonGroup1 );
- ButtonGroup2 = new QButtonGroup( this, "ButtonGroup2" );
+ ButtonGroup2 = new TQButtonGroup( this, "ButtonGroup2" );
ButtonGroup2.setTitle( trUtf8( "Radio buttons" ) );
ButtonGroup2.setColumnLayout(0, Qt.Vertical );
ButtonGroup2.layout().setSpacing( 0 );
ButtonGroup2.layout().setMargin( 0 );
- ButtonGroup2Layout = new QGridLayout( ButtonGroup2.layout() );
+ ButtonGroup2Layout = new TQGridLayout( ButtonGroup2.layout() );
ButtonGroup2Layout.setAlignment( Qt.AlignTop );
ButtonGroup2Layout.setSpacing( 6 );
ButtonGroup2Layout.setMargin( 11 );
- RadioButton3 = new QRadioButton( ButtonGroup2, "RadioButton3" );
+ RadioButton3 = new TQRadioButton( ButtonGroup2, "RadioButton3" );
RadioButton3.setText( trUtf8( "Sprite" ) );
ButtonGroup2Layout.addWidget( RadioButton3, 1, 0 );
- RadioButton4 = new QRadioButton( ButtonGroup2, "RadioButton4" );
+ RadioButton4 = new TQRadioButton( ButtonGroup2, "RadioButton4" );
RadioButton4.setText( trUtf8( "Farris" ) );
ButtonGroup2Layout.addWidget( RadioButton4, 2, 0 );
- RadioButton2 = new QRadioButton( ButtonGroup2, "RadioButton2" );
+ RadioButton2 = new TQRadioButton( ButtonGroup2, "RadioButton2" );
RadioButton2.setText( trUtf8( "Solo" ) );
RadioButton2.setChecked( true );
ButtonGroup2Layout.addWidget( RadioButton2, 0, 0 );
Layout9.addWidget( ButtonGroup2 );
- GroupBox1 = new QGroupBox( this, "GroupBox1" );
- sizePolicy2 = new QSizePolicy();
+ GroupBox1 = new TQGroupBox( this, "GroupBox1" );
+ sizePolicy2 = new TQSizePolicy();
sizePolicy2.setHorData(7);
sizePolicy2.setVerData(7);
sizePolicy2.setHeightForWidth(GroupBox1.sizePolicy().hasHeightForWidth());
@@ -5992,38 +5992,38 @@ WidgetsBase( QWidget parent, String name, int fl )
GroupBox1.setColumnLayout(0, Qt.Vertical );
GroupBox1.layout().setSpacing( 0 );
GroupBox1.layout().setMargin( 0 );
- GroupBox1Layout = new QGridLayout( GroupBox1.layout() );
+ GroupBox1Layout = new TQGridLayout( GroupBox1.layout() );
GroupBox1Layout.setAlignment( Qt.AlignTop );
GroupBox1Layout.setSpacing( 6 );
GroupBox1Layout.setMargin( 11 );
clock = new AnalogClock( GroupBox1, "clock" );
- sizePolicy3 = new QSizePolicy();
+ sizePolicy3 = new TQSizePolicy();
sizePolicy3.setHorData(0);
sizePolicy3.setVerData(0);
sizePolicy3.setHeightForWidth(clock.sizePolicy().hasHeightForWidth());
clock.setSizePolicy( sizePolicy3 );
- clock.setMinimumSize( new QSize( 100, 100 ) );
+ clock.setMinimumSize( new TQSize( 100, 100 ) );
GroupBox1Layout.addMultiCellWidget( clock, 0, 2, 0, 0 );
- dateEdit = new QDateEdit( GroupBox1, "dateEdit" );
+ dateEdit = new TQDateEdit( GroupBox1, "dateEdit" );
GroupBox1Layout.addWidget( dateEdit, 1, 1 );
- timeEdit = new QTimeEdit( GroupBox1, "timeEdit" );
+ timeEdit = new TQTimeEdit( GroupBox1, "timeEdit" );
timeEdit.setAutoAdvance( true );
GroupBox1Layout.addWidget( timeEdit, 2, 1 );
- Layout5 = new QHBoxLayout();
+ Layout5 = new TQHBoxLayout();
Layout5.setSpacing( 6 );
Layout5.setMargin( 0 );
- dateTimeLabel = new QLabel( GroupBox1, "dateTimeLabel" );
+ dateTimeLabel = new TQLabel( GroupBox1, "dateTimeLabel" );
dateTimeLabel.setText( trUtf8( "DateTime string goes here!" ) );
Layout5.addWidget( dateTimeLabel );
- QSpacerItem spacer = new QSpacerItem( 20, 20, QSizePolicy.Expanding, QSizePolicy.Minimum );
+ TQSpacerItem spacer = new TQSpacerItem( 20, 20, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
Layout5.addItem( spacer );
GroupBox1Layout.addLayout( Layout5, 0, 1 );
@@ -6053,12 +6053,12 @@ WidgetsBase( QWidget parent, String name, int fl )
init();
}
-WidgetsBase( QWidget parent, String name)
+WidgetsBase( TQWidget parent, String name)
{
this(parent, name, 0);
}
-WidgetsBase( QWidget parent)
+WidgetsBase( TQWidget parent)
{
this(parent, null, 0);
}
@@ -6095,12 +6095,12 @@ public void destroy()
public void setColor(String color)
{
- groupBox.setPalette( new QPalette(new QColor( color )) );
+ groupBox.setPalette( new TQPalette(new TQColor( color )) );
}
public void updateColorTest(String color)
{
- colorTest.setPalette( new QPalette(new QColor( color )) );
+ colorTest.setPalette( new TQPalette(new TQColor( color )) );
}
public void updateDateTimeString()
diff --git a/qtjava/javalib/examples/dragdrop/DropSite.java b/qtjava/javalib/examples/dragdrop/DropSite.java
index 3584f1e4..34f41f12 100644
--- a/qtjava/javalib/examples/dragdrop/DropSite.java
+++ b/qtjava/javalib/examples/dragdrop/DropSite.java
@@ -15,7 +15,7 @@ import org.kde.qt.*;
import java.util.*;
-class DropSite extends QLabel
+class DropSite extends TQLabel
{
SecretSource s;
@@ -24,12 +24,12 @@ void setSecretSource(SecretSource source)
s = source;
}
-DropSite( QWidget parent )
+DropSite( TQWidget parent )
{
this(parent, null);
}
-DropSite( QWidget parent, String name )
+DropSite( TQWidget parent, String name )
{
super( parent, name );
setAcceptDrops(true);
@@ -41,20 +41,20 @@ DropSite( QWidget parent, String name )
}
-protected void dragMoveEvent( QDragMoveEvent e )
+protected void dragMoveEvent( TQDragMoveEvent e )
{
// Check if you want the drag at e.pos()...
// Give the user some feedback...
}
-protected void dragEnterEvent( QDragEnterEvent e )
+protected void dragEnterEvent( TQDragEnterEvent e )
{
// Check if you want the drag...
if ( SecretDrag.canDecode( e )
- || QTextDrag.canDecode( e )
- || QImageDrag.canDecode( e )
- || QUriDrag.canDecode( e ) ) {
+ || TQTextDrag.canDecode( e )
+ || TQImageDrag.canDecode( e )
+ || TQUriDrag.canDecode( e ) ) {
e.accept();
}
@@ -68,7 +68,7 @@ protected void dragEnterEvent( QDragEnterEvent e )
setBackgroundColor(white());
}
-protected void dragLeaveEvent( QDragLeaveEvent e )
+protected void dragLeaveEvent( TQDragLeaveEvent e )
{
// Give the user some feedback...
emit("message", "");
@@ -76,34 +76,34 @@ protected void dragLeaveEvent( QDragLeaveEvent e )
}
-protected void dropEvent( QDropEvent e )
+protected void dropEvent( TQDropEvent e )
{
setBackgroundColor(lightGray());
// Try to decode to the data you understand...
StringBuffer str = new StringBuffer("");
- if ( QTextDrag.decode( e, str ) ) {
+ if ( TQTextDrag.decode( e, str ) ) {
setText( str.toString() );
setMinimumSize( minimumSize().expandedTo( sizeHint() ) );
return;
}
- QPixmap pm = new QPixmap();
- if ( QImageDrag.decode( e, pm ) ) {
+ TQPixmap pm = new TQPixmap();
+ if ( TQImageDrag.decode( e, pm ) ) {
setPixmap( pm );
setMinimumSize( minimumSize().expandedTo( sizeHint() ) );
return;
}
ArrayList strings = new ArrayList();
- if ( QUriDrag.decode( e, strings ) ) {
+ if ( TQUriDrag.decode( e, strings ) ) {
String m = "Full URLs:\n";
Iterator it = strings.iterator();
while (it.hasNext())
m += " " + (String) it.next() + "\n";
ArrayList files = new ArrayList();
- if ( QUriDrag.decodeLocalFiles( e, files ) ) {
+ if ( TQUriDrag.decodeLocalFiles( e, files ) ) {
m = m + "Files:\n";
Iterator i = strings.iterator();
while (i.hasNext())
@@ -121,36 +121,36 @@ protected void dropEvent( QDropEvent e )
}
}
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
- QDragObject drobj;
+ TQDragObject drobj;
if ( pixmap() != null ) {
- drobj = new QImageDrag( pixmap().convertToImage(), this );
- QPixmap pm = new QPixmap();
+ drobj = new TQImageDrag( pixmap().convertToImage(), this );
+ TQPixmap pm = new TQPixmap();
pm.convertFromImage(pixmap().convertToImage().smoothScale(
pixmap().width()/3,pixmap().height()/3));
- drobj.setPixmap(pm,new QPoint(-5,-7));
+ drobj.setPixmap(pm,new TQPoint(-5,-7));
// Try it.
// new DragMoviePlayer(drobj);
} else {
- drobj = new QTextDrag( text(), this );
+ drobj = new TQTextDrag( text(), this );
}
drobj.dragCopy();
}
-class DragMoviePlayer extends QObject {
- QDragObject dobj;
- QMovie movie;
+class DragMoviePlayer extends TQObject {
+ TQDragObject dobj;
+ TQMovie movie;
-DragMoviePlayer( QDragObject p )
+DragMoviePlayer( TQDragObject p )
{
-// QObject(p),
+// TQObject(p),
dobj = p;
- movie = new QMovie("trolltech.gif" );
- movie.connectUpdate(this,SLOT("updatePixmap(QRect)"));
+ movie = new TQMovie("trolltech.gif" );
+ movie.connectUpdate(this,SLOT("updatePixmap(TQRect)"));
}
-void updatePixmap( QRect rect )
+void updatePixmap( TQRect rect )
{
dobj.setPixmap(movie.framePixmap());
}
@@ -158,7 +158,7 @@ void updatePixmap( QRect rect )
}
-void backgroundColorChange( QColor color )
+void backgroundColorChange( TQColor color )
{
// Reduce flicker by using repaint() rather than update()
repaint();
diff --git a/qtjava/javalib/examples/dragdrop/Main.java b/qtjava/javalib/examples/dragdrop/Main.java
index 3297aaec..7ce5ff19 100644
--- a/qtjava/javalib/examples/dragdrop/Main.java
+++ b/qtjava/javalib/examples/dragdrop/Main.java
@@ -15,40 +15,40 @@ import org.kde.qt.*;
public class Main {
-static DropSite addStuff( QWidget parent, boolean image )
+static DropSite addStuff( TQWidget parent, boolean image )
{
return addStuff(parent, image, false);
}
-static DropSite addStuff( QWidget parent, boolean image, boolean secret )
+static DropSite addStuff( TQWidget parent, boolean image, boolean secret )
{
- QVBoxLayout tll = new QVBoxLayout( parent, 10 );
+ TQVBoxLayout tll = new TQVBoxLayout( parent, 10 );
DropSite d = new DropSite( parent );
- d.setFrameStyle( QFrame.Sunken + QFrame.WinPanel );
+ d.setFrameStyle( TQFrame.Sunken + TQFrame.WinPanel );
tll.addWidget( d );
if ( image ) {
- QPixmap stuff = new QPixmap();
+ TQPixmap stuff = new TQPixmap();
if ( !stuff.load( "trolltech.bmp" ) ) {
- stuff = new QPixmap(20,20);
+ stuff = new TQPixmap(20,20);
stuff.fill(Qt.green());
}
d.setPixmap( stuff );
} else {
d.setText("Drag and Drop");
}
- d.setFont(new QFont("Helvetica",18));
+ d.setFont(new TQFont("Helvetica",18));
if ( secret ) {
SecretSource s = new SecretSource( (byte) 42, parent );
tll.addWidget( s );
d.setSecretSource( s);
}
- QLabel format = new QLabel( "\n\n\n\nNone\n\n\n\n", parent );
+ TQLabel format = new TQLabel( "\n\n\n\nNone\n\n\n\n", parent );
tll.addWidget( format );
tll.activate();
parent.resize( parent.sizeHint() );
- QObject.connect( d, Qt.SIGNAL("message(String)"),
+ TQObject.connect( d, Qt.SIGNAL("message(String)"),
format, Qt.SLOT("setText(String)") );
return d;
}
@@ -58,24 +58,24 @@ static DropSite addStuff( QWidget parent, boolean image, boolean secret )
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
- QWidget mw = new QWidget();
+ TQWidget mw = new TQWidget();
DropSite d1 = addStuff( mw, true );
mw.setCaption( "Qt Example - Drag and Drop" );
mw.show();
- QWidget mw2 = new QWidget();
+ TQWidget mw2 = new TQWidget();
DropSite d2 = addStuff( mw2, false );
mw2.setCaption( "Qt Example - Drag and Drop" );
mw2.show();
- QWidget mw3 = new QWidget();
+ TQWidget mw3 = new TQWidget();
DropSite d3 = addStuff( mw3, true, true );
mw3.setCaption( "Qt Example - Drag and Drop" );
mw3.show();
- QObject.connect(Qt.qApp(),Qt.SIGNAL("lastWindowClosed()"),Qt.qApp(),Qt.SLOT("quit()"));
+ TQObject.connect(Qt.qApp(),Qt.SIGNAL("lastWindowClosed()"),Qt.qApp(),Qt.SLOT("quit()"));
a.exec();
return;
}
diff --git a/qtjava/javalib/examples/dragdrop/SecretDrag.java b/qtjava/javalib/examples/dragdrop/SecretDrag.java
index fd12aed3..5220fd9f 100644
--- a/qtjava/javalib/examples/dragdrop/SecretDrag.java
+++ b/qtjava/javalib/examples/dragdrop/SecretDrag.java
@@ -14,10 +14,10 @@
import org.kde.qt.*;
-class SecretDrag extends QStoredDrag {
+class SecretDrag extends TQStoredDrag {
//create the object withe the secret byte
-public SecretDrag( byte secret, QWidget parent, String name )
+public SecretDrag( byte secret, TQWidget parent, String name )
{
super( "secret/magic", parent, name );
byte[] data = { 0 };
@@ -25,19 +25,19 @@ public SecretDrag( byte secret, QWidget parent, String name )
setEncodedData( data );
}
-public SecretDrag( byte secret, QWidget parent )
+public SecretDrag( byte secret, TQWidget parent )
{
this(secret, parent, null);
}
-public static boolean canDecode( QDragMoveEvent e )
+public static boolean canDecode( TQDragMoveEvent e )
{
return e.provides( "secret/magic" );
}
//decode it into a string
-public static boolean decode( QDropEvent e, StringBuffer str )
+public static boolean decode( TQDropEvent e, StringBuffer str )
{
byte[] payload = e.data( "secret/magic" );
if ( payload.length > 0 ) {
diff --git a/qtjava/javalib/examples/dragdrop/SecretSource.java b/qtjava/javalib/examples/dragdrop/SecretSource.java
index 00824dee..9d26f73e 100644
--- a/qtjava/javalib/examples/dragdrop/SecretSource.java
+++ b/qtjava/javalib/examples/dragdrop/SecretSource.java
@@ -13,16 +13,16 @@
****************************************************************************/
import org.kde.qt.*;
-class SecretSource extends QLabel
+class SecretSource extends TQLabel
{
private int mySecret;
-SecretSource( byte secret, QWidget parent )
+SecretSource( byte secret, TQWidget parent )
{
this(secret, parent, null);
}
-SecretSource( byte secret, QWidget parent, String name )
+SecretSource( byte secret, TQWidget parent, String name )
{
super( "Secret", parent, name );
setBackgroundColor( blue().light() );
@@ -58,10 +58,10 @@ static String picture_xpm[] = {
" ..... ",
" "};
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
SecretDrag sd = new SecretDrag( (byte) mySecret, this );
- sd.setPixmap(new QPixmap(picture_xpm),new QPoint(8,8));
+ sd.setPixmap(new TQPixmap(picture_xpm),new TQPoint(8,8));
sd.dragCopy();
mySecret++;
}
diff --git a/qtjava/javalib/examples/dragdrop/trolltech.bmp b/qtjava/javalib/examples/dragdrop/trolltech.bmp
index 220861e2..9f399c70 100644
Binary files a/qtjava/javalib/examples/dragdrop/trolltech.bmp and b/qtjava/javalib/examples/dragdrop/trolltech.bmp differ
diff --git a/qtjava/javalib/examples/dragdrop/trolltech.gif b/qtjava/javalib/examples/dragdrop/trolltech.gif
index f674369e..02c13b14 100644
Binary files a/qtjava/javalib/examples/dragdrop/trolltech.gif and b/qtjava/javalib/examples/dragdrop/trolltech.gif differ
diff --git a/qtjava/javalib/examples/drawlines/ConnectWidget.java b/qtjava/javalib/examples/drawlines/ConnectWidget.java
index c51f2703..0292b9a2 100644
--- a/qtjava/javalib/examples/drawlines/ConnectWidget.java
+++ b/qtjava/javalib/examples/drawlines/ConnectWidget.java
@@ -13,13 +13,13 @@ import java.util.Random;
//
// ConnectWidget - draws connected lines
//
-class ConnectWidget extends QWidget
+class ConnectWidget extends TQWidget
{
static final int MAXPOINTS = 2000; // maximum number of points
static final int MAXCOLORS = 40;
-private QPoint[] points; // point array
-private QColor[] colors; // color array
+private TQPoint[] points; // point array
+private TQColor[] colors; // color array
private int count; // count = number of points
private boolean down; // true if mouse down
private Random generator = new Random(System.currentTimeMillis());
@@ -32,16 +32,16 @@ public ConnectWidget( )
this(null, null);
}
-public ConnectWidget( QWidget parent, String name )
+public ConnectWidget( TQWidget parent, String name )
{
super( parent, name, WStaticContents );
setBackgroundColor( white() ); // white background
count = 0;
down = false;
- points = new QPoint[MAXPOINTS];
- colors = new QColor[MAXCOLORS];
+ points = new TQPoint[MAXPOINTS];
+ colors = new TQColor[MAXCOLORS];
for ( int i=0; iThis example implements a simple HTML help viewer "
+ "using Qt's rich text capabilities"
+ "It's just about 100 lines of Java code, so don't expect too much :-)
"
@@ -234,12 +234,12 @@ void about()
void aboutQt()
{
- QMessageBox.aboutQt( this, "QBrowser" );
+ TQMessageBox.aboutQt( this, "TQBrowser" );
}
void openFile()
{
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( !fn.equals("") )
browser.setSource( fn );
}
@@ -251,38 +251,38 @@ void newWindow()
void print()
{
- QPrinter printer = new QPrinter();//(QPrinter.HighResolution );
+ TQPrinter printer = new TQPrinter();//(TQPrinter.HighResolution );
printer.setFullPage(true);
if ( printer.setup( this ) ) {
- QPainter p = new QPainter( printer );
- QPaintDeviceMetrics metrics = new QPaintDeviceMetrics(p.device());
+ TQPainter p = new TQPainter( printer );
+ TQPaintDeviceMetrics metrics = new TQPaintDeviceMetrics(p.device());
int dpix = metrics.logicalDpiX();
int dpiy = metrics.logicalDpiY();
int margin = 72; // pt
- QRect body = new QRect(margin*dpix/72, margin*dpiy/72,
+ TQRect body = new TQRect(margin*dpix/72, margin*dpiy/72,
metrics.width()-margin*dpix/72*2,
metrics.height()-margin*dpiy/72*2 );
- QFont font = new QFont("times", 10);
+ TQFont font = new TQFont("times", 10);
ArrayList filePaths = browser.mimeSourceFactory().filePath();
String file = "";
Iterator it = filePaths.iterator();
while (it.hasNext()) {
- file = new QUrl( new QUrl((String) it.next()), new QUrl( browser.source() ).path() ).path();
- if ( QFile.exists( file ) )
+ file = new TQUrl( new TQUrl((String) it.next()), new TQUrl( browser.source() ).path() ).path();
+ if ( TQFile.exists( file ) )
break;
else
file = "";
}
if ( file.equals("") )
return;
- QFile f = new QFile( file );
- if ( !f.open( QIODevice.IO_ReadOnly ) )
+ TQFile f = new TQFile( file );
+ if ( !f.open( TQIODevice.IO_ReadOnly ) )
return;
- QTextStream ts = new QTextStream( f );
- QSimpleRichText richText = new QSimpleRichText( ts.read(), font, browser.context(), browser.styleSheet(),
+ TQTextStream ts = new TQTextStream( f );
+ TQSimpleRichText richText = new TQSimpleRichText( ts.read(), font, browser.context(), browser.styleSheet(),
browser.mimeSourceFactory(), body.height() );
richText.setWidth( p, body.width() );
- QRect view = new QRect( body.topLeft(), body.bottomRight() );
+ TQRect view = new TQRect( body.topLeft(), body.bottomRight() );
int page = 1;
do {
richText.draw( p, body.left(), body.top(), view, colorGroup() );
@@ -316,10 +316,10 @@ void pathSelected( String _path )
void readHistory()
{
- if ( QFile.exists( QDir.currentDirPath() + "/.history" ) ) {
- QFile f = new QFile( QDir.currentDirPath() + "/.history" );
- f.open( QIODevice.IO_ReadOnly );
- QTextStream t = new QTextStream( f );
+ if ( TQFile.exists( TQDir.currentDirPath() + "/.history" ) ) {
+ TQFile f = new TQFile( TQDir.currentDirPath() + "/.history" );
+ f.open( TQIODevice.IO_ReadOnly );
+ TQTextStream t = new TQTextStream( f );
while ( !t.atEnd() ) {
String item = t.readLine();
history.add((Object) item);
@@ -332,10 +332,10 @@ void readHistory()
void readBookmarks()
{
- if ( QFile.exists( QDir.currentDirPath() + "/.bookmarks" ) ) {
- QFile f = new QFile( QDir.currentDirPath() + "/.bookmarks" );
- f.open( QIODevice.IO_ReadOnly );
- QTextStream t = new QTextStream( f );
+ if ( TQFile.exists( TQDir.currentDirPath() + "/.bookmarks" ) ) {
+ TQFile f = new TQFile( TQDir.currentDirPath() + "/.bookmarks" );
+ f.open( TQIODevice.IO_ReadOnly );
+ TQTextStream t = new TQTextStream( f );
while ( !t.atEnd() ) {
String item = t.readLine();
diff --git a/qtjava/javalib/examples/helpviewer/Main.java b/qtjava/javalib/examples/helpviewer/Main.java
index da01e3dc..7b6aa17c 100644
--- a/qtjava/javalib/examples/helpviewer/Main.java
+++ b/qtjava/javalib/examples/helpviewer/Main.java
@@ -14,8 +14,8 @@ public class Main {
public static void main( String[] args )
{
- QApplication.setColorSpec( QApplication.ManyColor );
- QApplication a = new QApplication(args);
+ TQApplication.setColorSpec( TQApplication.ManyColor );
+ TQApplication a = new TQApplication(args);
String home = null;
if (args.length > 0)
@@ -26,15 +26,15 @@ public static void main( String[] args )
HelpWindow help = new HelpWindow(home, ".", null, "help viewer");
help.setCaption("Qt Example - Helpviewer");
- if ( QApplication.desktop().width() > 400
- && QApplication.desktop().height() > 500 )
+ if ( TQApplication.desktop().width() > 400
+ && TQApplication.desktop().height() > 500 )
help.show();
else
help.showMaximized();
- QObject.connect( a, Qt.SIGNAL("aboutToQuit()"),
+ TQObject.connect( a, Qt.SIGNAL("aboutToQuit()"),
help, Qt.SLOT("cleanUp()") );
- QObject.connect( a, Qt.SIGNAL("lastWindowClosed()"),
+ TQObject.connect( a, Qt.SIGNAL("lastWindowClosed()"),
a, Qt.SLOT("quit()") );
a.exec();
diff --git a/qtjava/javalib/examples/iconview/ListenDND.java b/qtjava/javalib/examples/iconview/ListenDND.java
index 59521a55..e6bec795 100644
--- a/qtjava/javalib/examples/iconview/ListenDND.java
+++ b/qtjava/javalib/examples/iconview/ListenDND.java
@@ -10,13 +10,13 @@
import org.kde.qt.*;
-class ListenDND extends QObject
+class ListenDND extends TQObject
{
-public ListenDND( QWidget w )
+public ListenDND( TQWidget w )
{view = w;}
- void dropped( QDropEvent mime ) {
+ void dropped( TQDropEvent mime ) {
qDebug( "Dropped Mimesource {0} into the view {1}", new Object[] { mime, view } );
qDebug( " Formats:" );
int i = 0;
@@ -31,27 +31,27 @@ public ListenDND( QWidget w )
qDebug( "All selected items were moved to another widget" );
}
-protected QWidget view;
+protected TQWidget view;
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
- QIconView qiconview = new QIconView();
- qiconview.setSelectionMode( QIconView.Extended );
+ TQIconView qiconview = new TQIconView();
+ qiconview.setSelectionMode( TQIconView.Extended );
for ( int i = 0; i < 3000; i++ ) {
- QIconViewItem item = new QIconViewItem( qiconview, "Item " + (i + 1) );
+ TQIconViewItem item = new TQIconViewItem( qiconview, "Item " + (i + 1) );
item.setRenameEnabled( true );
}
qiconview.setCaption( "Qt Example - Iconview" );
ListenDND listen_dnd = new ListenDND( qiconview );
- QObject.connect( qiconview, SIGNAL(" dropped( QDropEvent , ArrayList )"),
- listen_dnd, SLOT(" dropped( QDropEvent )") );
- QObject.connect( qiconview, SIGNAL(" moved()"), listen_dnd, SLOT(" moved()") );
+ TQObject.connect( qiconview, SIGNAL(" dropped( TQDropEvent , ArrayList )"),
+ listen_dnd, SLOT(" dropped( TQDropEvent )") );
+ TQObject.connect( qiconview, SIGNAL(" moved()"), listen_dnd, SLOT(" moved()") );
a.setMainWidget( qiconview );
qiconview.show();
diff --git a/qtjava/javalib/examples/layout/ExampleWidget.java b/qtjava/javalib/examples/layout/ExampleWidget.java
index 77d96816..1bdc8e54 100644
--- a/qtjava/javalib/examples/layout/ExampleWidget.java
+++ b/qtjava/javalib/examples/layout/ExampleWidget.java
@@ -10,7 +10,7 @@
import org.kde.qt.*;
-class ExampleWidget extends QWidget
+class ExampleWidget extends TQWidget
{
ExampleWidget( )
@@ -18,18 +18,18 @@ ExampleWidget( )
this(null, null);
}
-ExampleWidget( QWidget parent, String name )
+ExampleWidget( TQWidget parent, String name )
{
super( parent, name );
// Make the top-level layout; a vertical box to contain all widgets
// and sub-layouts.
- QBoxLayout topLayout = new QVBoxLayout( this, 5 );
+ TQBoxLayout topLayout = new TQVBoxLayout( this, 5 );
// Create a menubar...
- QMenuBar menubar = new QMenuBar( this );
- menubar.setSeparator( QMenuBar.InWindowsStyle );
- QPopupMenu popup;
- popup = new QPopupMenu( this );
+ TQMenuBar menubar = new TQMenuBar( this );
+ menubar.setSeparator( TQMenuBar.InWindowsStyle );
+ TQPopupMenu popup;
+ popup = new TQPopupMenu( this );
popup.insertItem( "&Quit", qApp(), SLOT("quit()") );
menubar.insertItem( "&File", popup );
@@ -37,10 +37,10 @@ ExampleWidget( QWidget parent, String name )
topLayout.setMenuBar( menubar );
// Make an hbox that will hold a row of buttons.
- QBoxLayout buttons = new QHBoxLayout( topLayout );
+ TQBoxLayout buttons = new TQHBoxLayout( topLayout );
int i;
for ( i = 1; i <= 4; i++ ) {
- QPushButton but = new QPushButton( this );
+ TQPushButton but = new TQPushButton( this );
String s = "Button " + i;
but.setText( s );
@@ -55,12 +55,12 @@ ExampleWidget( QWidget parent, String name )
}
// Make another hbox that will hold a left-justified row of buttons.
- QBoxLayout buttons2 = new QHBoxLayout( topLayout );
+ TQBoxLayout buttons2 = new TQHBoxLayout( topLayout );
- QPushButton but = new QPushButton( "Button five", this );
+ TQPushButton but = new TQPushButton( "Button five", this );
buttons2.addWidget( but );
- but = new QPushButton( "Button 6", this );
+ but = new TQPushButton( "Button 6", this );
buttons2.addWidget( but );
// Fill up the rest of the hbox with stretchable space, so that
@@ -68,9 +68,9 @@ ExampleWidget( QWidget parent, String name )
buttons2.addStretch( 10 );
// Make a big widget that will grab all space in the middle.
- QMultiLineEdit bigWidget = new QMultiLineEdit( this );
+ TQMultiLineEdit bigWidget = new TQMultiLineEdit( this );
bigWidget.setText( "This widget will get all the remaining space" );
- bigWidget.setFrameStyle( QFrame.Panel | QFrame.Plain );
+ bigWidget.setFrameStyle( TQFrame.Panel | TQFrame.Plain );
// Set vertical stretch factor to 10 to let the bigWidget stretch
// vertically. It will stretch horizontally because there are no
@@ -78,10 +78,10 @@ ExampleWidget( QWidget parent, String name )
// topLayout.addWidget( bigWidget, 10 );
topLayout.addWidget( bigWidget );
- // Make a grid that will hold a vertical table of QLabel/QLineEdit
- // pairs next to a large QMultiLineEdit.
+ // Make a grid that will hold a vertical table of TQLabel/TQLineEdit
+ // pairs next to a large TQMultiLineEdit.
- // Don't use hard-coded row/column numbers in QGridLayout, you'll
+ // Don't use hard-coded row/column numbers in TQGridLayout, you'll
// regret it when you have to change the layout.
int numRows = 3;
int labelCol = 0;
@@ -90,17 +90,17 @@ ExampleWidget( QWidget parent, String name )
// Let the grid-layout have a spacing of 10 pixels between
// widgets, overriding the default from topLayout.
- QGridLayout grid = new QGridLayout( topLayout, 0, 0, 10 );
+ TQGridLayout grid = new TQGridLayout( topLayout, 0, 0, 10 );
int row;
for ( row = 0; row < numRows; row++ ) {
- QLineEdit ed = new QLineEdit( this );
+ TQLineEdit ed = new TQLineEdit( this );
// The line edit goes in the second column
grid.addWidget( ed, row, linedCol );
// Make a label that is a buddy of the line edit
String s= "Line &" + (row+1);
- QLabel label = new QLabel( ed, s, this );
+ TQLabel label = new TQLabel( ed, s, this );
// The label goes in the first column.
grid.addWidget( label, row, labelCol );
}
@@ -108,7 +108,7 @@ ExampleWidget( QWidget parent, String name )
// The multiline edit will cover the entire vertical range of the
// grid (rows 0 to numRows) and stay in column 2.
- QMultiLineEdit med = new QMultiLineEdit( this );
+ TQMultiLineEdit med = new TQMultiLineEdit( this );
grid.addMultiCellWidget( med, 0, -1, multiCol, multiCol );
// The labels will take the space they need. Let the remaining
@@ -118,9 +118,9 @@ ExampleWidget( QWidget parent, String name )
grid.setColStretch( multiCol, 20 );
// Add a widget at the bottom.
- QLabel sb = new QLabel( this );
+ TQLabel sb = new TQLabel( this );
sb.setText( "Let's pretend this is a status bar" );
- sb.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ sb.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
// This widget will use all horizontal space, and have a fixed height.
// we should have made a subclass and implemented sizePolicy there...
@@ -135,7 +135,7 @@ ExampleWidget( QWidget parent, String name )
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ExampleWidget f = new ExampleWidget();
a.setMainWidget(f);
diff --git a/qtjava/javalib/examples/lineedits/LineEdits.java b/qtjava/javalib/examples/lineedits/LineEdits.java
index ce79891f..4586dbf6 100644
--- a/qtjava/javalib/examples/lineedits/LineEdits.java
+++ b/qtjava/javalib/examples/lineedits/LineEdits.java
@@ -9,10 +9,10 @@
****************************************************************************/
import org.kde.qt.*;
-class LineEdits extends QGroupBox
+class LineEdits extends TQGroupBox
{
-protected QLineEdit lined1, lined2, lined3, lined4;
-protected QComboBox combo1, combo2, combo3, combo4;
+protected TQLineEdit lined1, lined2, lined3, lined4;
+protected TQComboBox combo1, combo2, combo3, combo4;
@@ -28,22 +28,22 @@ LineEdits( )
this(null, null);
}
-LineEdits( QWidget parent, String name )
+LineEdits( TQWidget parent, String name )
{
super( 0, Horizontal, "Line edits", parent, name );
setMargin( 10 );
- QVBoxLayout box = new QVBoxLayout( layout() );
+ TQVBoxLayout box = new TQVBoxLayout( layout() );
- QHBoxLayout row1 = new QHBoxLayout( box );
+ TQHBoxLayout row1 = new TQHBoxLayout( box );
row1.setMargin( 5 );
// Create a Label
- QLabel label = new QLabel( "Echo Mode: ", this);
+ TQLabel label = new TQLabel( "Echo Mode: ", this);
row1.addWidget( label );
// Create a Combobox with three items...
- combo1 = new QComboBox( false, this );
+ combo1 = new TQComboBox( false, this );
row1.addWidget( combo1 );
combo1.insertItem( "Normal", -1 );
combo1.insertItem( "Password", -1 );
@@ -53,19 +53,19 @@ LineEdits( QWidget parent, String name )
connect( combo1, SIGNAL(" activated( int )"), this, SLOT(" slotEchoChanged( int )") );
// insert the first LineEdit
- lined1 = new QLineEdit( this );
+ lined1 = new TQLineEdit( this );
box.addWidget( lined1 );
// another widget which is used for layouting
- QHBoxLayout row2 = new QHBoxLayout( box );
+ TQHBoxLayout row2 = new TQHBoxLayout( box );
row2.setMargin( 5 );
// and the second label
- label = new QLabel( "Validator: ", this );
+ label = new TQLabel( "Validator: ", this );
row2.addWidget( label );
// A second Combobox with again three items...
- combo2 = new QComboBox( false, this );
+ combo2 = new TQComboBox( false, this );
row2.addWidget( combo2 );
combo2.insertItem( "No Validator", -1 );
combo2.insertItem( "Integer Validator", -1 );
@@ -74,19 +74,19 @@ LineEdits( QWidget parent, String name )
connect( combo2, SIGNAL(" activated( int )"), this, SLOT(" slotValidatorChanged( int )") );
// and the second LineEdit
- lined2 = new QLineEdit( this );
+ lined2 = new TQLineEdit( this );
box.addWidget( lined2 );
// yet another widget which is used for layouting
- QHBoxLayout row3 = new QHBoxLayout( box );
+ TQHBoxLayout row3 = new TQHBoxLayout( box );
row3.setMargin( 5 );
// we need a label for this too
- label = new QLabel( "Alignment: ", this );
+ label = new TQLabel( "Alignment: ", this );
row3.addWidget( label );
// A combo box for setting alignment
- combo3 = new QComboBox( false, this );
+ combo3 = new TQComboBox( false, this );
row3.addWidget( combo3 );
combo3.insertItem( "Left", -1 );
combo3.insertItem( "Centered", -1 );
@@ -95,26 +95,26 @@ LineEdits( QWidget parent, String name )
connect( combo3, SIGNAL(" activated( int )"), this, SLOT(" slotAlignmentChanged( int )") );
// and the third lineedit
- lined3 = new QLineEdit( this );
+ lined3 = new TQLineEdit( this );
box.addWidget( lined3 );
// last widget used for layouting
- QHBox row4 = new QHBox( this );
+ TQHBox row4 = new TQHBox( this );
box.addWidget( row4 );
row4.setMargin( 5 );
// last label
- new QLabel( "Read-Only: ", row4 );
+ new TQLabel( "Read-Only: ", row4 );
// A combo box for setting alignment
- combo4 = new QComboBox( false, row4 );
+ combo4 = new TQComboBox( false, row4 );
combo4.insertItem( "False", -1 );
combo4.insertItem( "True", -1 );
// ...and again the activated() SIGNAL gets connected with a SLOT
connect( combo4, SIGNAL(" activated( int )"), this, SLOT(" slotReadOnlyChanged( int )") );
// and the last lineedit
- lined4 = new QLineEdit( this );
+ lined4 = new TQLineEdit( this );
box.addWidget( lined4 );
// give the first LineEdit the focus at the beginning
@@ -133,13 +133,13 @@ void slotEchoChanged( int i )
{
switch ( i ) {
case 0:
- lined1.setEchoMode( QLineEdit.Normal );
+ lined1.setEchoMode( TQLineEdit.Normal );
break;
case 1:
- lined1.setEchoMode( QLineEdit.Password );
+ lined1.setEchoMode( TQLineEdit.Password );
break;
case 2:
- lined1.setEchoMode( QLineEdit.NoEcho );
+ lined1.setEchoMode( TQLineEdit.NoEcho );
break;
}
@@ -163,10 +163,10 @@ void slotValidatorChanged( int i )
lined2.setValidator( null );
break;
case 1:
- lined2.setValidator( new QIntValidator( lined2 ) );
+ lined2.setValidator( new TQIntValidator( lined2 ) );
break;
case 2:
- lined2.setValidator( new QDoubleValidator( -999.0, 999.0, 2,
+ lined2.setValidator( new TQDoubleValidator( -999.0, 999.0, 2,
lined2 ) );
break;
}
@@ -188,13 +188,13 @@ void slotAlignmentChanged( int i )
{
switch ( i ) {
case 0:
- lined3.setAlignment( QLineEdit.AlignLeft );
+ lined3.setAlignment( TQLineEdit.AlignLeft );
break;
case 1:
- lined3.setAlignment( QLineEdit.AlignCenter );
+ lined3.setAlignment( TQLineEdit.AlignCenter );
break;
case 2:
- lined3.setAlignment( QLineEdit.AlignRight );
+ lined3.setAlignment( TQLineEdit.AlignRight );
break;
}
diff --git a/qtjava/javalib/examples/lineedits/Main.java b/qtjava/javalib/examples/lineedits/Main.java
index 19424534..7ac06fea 100644
--- a/qtjava/javalib/examples/lineedits/Main.java
+++ b/qtjava/javalib/examples/lineedits/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 );
LineEdits lineedits = new LineEdits();
lineedits.setCaption( "Qt Example - Lineedits" );
diff --git a/qtjava/javalib/examples/listbox/ListBoxDemo.java b/qtjava/javalib/examples/listbox/ListBoxDemo.java
index 60eecffc..77ef7635 100644
--- a/qtjava/javalib/examples/listbox/ListBoxDemo.java
+++ b/qtjava/javalib/examples/listbox/ListBoxDemo.java
@@ -12,51 +12,51 @@ import org.kde.qt.*;
-class ListBoxDemo extends QWidget
+class ListBoxDemo extends TQWidget
{
-private QListBox l;
-private QSpinBox columns;
-private QSpinBox rows;
-private QButtonGroup bg;
+private TQListBox l;
+private TQSpinBox columns;
+private TQSpinBox rows;
+private TQButtonGroup bg;
ListBoxDemo()
{
super( null, null );
- QGridLayout g = new QGridLayout( this, 2, 2, 6 );
+ TQGridLayout g = new TQGridLayout( this, 2, 2, 6 );
- g.addWidget( new QLabel( "Configuration:", this ), 0, 0 );
- g.addWidget( new QLabel( "Result:", this ), 0, 1 );
+ g.addWidget( new TQLabel( "Configuration:", this ), 0, 0 );
+ g.addWidget( new TQLabel( "Result:", this ), 0, 1 );
- l = new QListBox( this );
+ l = new TQListBox( this );
g.addWidget( l, 1, 1 );
- l.setFocusPolicy( QWidget.StrongFocus );
+ l.setFocusPolicy( TQWidget.StrongFocus );
- QVBoxLayout v = new QVBoxLayout();
+ TQVBoxLayout v = new TQVBoxLayout();
g.addLayout( v, 1, 0 );
- QRadioButton b = null;
- bg = new QButtonGroup( (QWidget) null );
+ TQRadioButton b = null;
+ bg = new TQButtonGroup( (TQWidget) null );
- b = new QRadioButton( "Fixed number of columns,\n"
+ b = new TQRadioButton( "Fixed number of columns,\n"
+ "as many rows as needed.",
this );
bg.insert( b );
v.addWidget( b );
b.setChecked( true );
connect( b, SIGNAL("clicked()"), this, SLOT("setNumCols()") );
- QHBoxLayout h = new QHBoxLayout();
+ TQHBoxLayout h = new TQHBoxLayout();
v.addLayout( h );
h.addSpacing( 30 );
h.addSpacing( 100 );
- h.addWidget( new QLabel( "Columns:", this ) );
- columns = new QSpinBox( this );
+ h.addWidget( new TQLabel( "Columns:", this ) );
+ columns = new TQSpinBox( this );
h.addWidget( columns );
v.addSpacing( 12 );
- b = new QRadioButton( "As many columns as fit on-screen,\n"
+ b = new TQRadioButton( "As many columns as fit on-screen,\n"
+ "as many rows as needed.",
this );
bg.insert( b );
@@ -65,24 +65,24 @@ ListBoxDemo()
v.addSpacing( 12 );
- b = new QRadioButton( "Fixed number of rows,\n"
+ b = new TQRadioButton( "Fixed number of rows,\n"
+ "as many columns as needed.",
this );
bg.insert( b );
v.addWidget( b );
connect( b, SIGNAL("clicked()"), this, SLOT("setNumRows()") );
- h = new QHBoxLayout();
+ h = new TQHBoxLayout();
v.addLayout( h );
h.addSpacing( 30 );
h.addSpacing( 100 );
- h.addWidget( new QLabel( "Rows:", this ) );
- rows = new QSpinBox( this );
+ h.addWidget( new TQLabel( "Rows:", this ) );
+ rows = new TQSpinBox( this );
rows.setEnabled( false );
h.addWidget( rows );
v.addSpacing( 12 );
- b = new QRadioButton( "As many rows as fit on-screen,\n"
+ b = new TQRadioButton( "As many rows as fit on-screen,\n"
+ "as many columns as needed.",
this );
bg.insert( b );
@@ -91,25 +91,25 @@ ListBoxDemo()
v.addSpacing( 12 );
- QCheckBox cb = new QCheckBox( "Variable-height rows", this );
+ TQCheckBox cb = new TQCheckBox( "Variable-height rows", this );
cb.setChecked( true );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setVariableHeight(boolean)") );
v.addWidget( cb );
v.addSpacing( 6 );
- cb = new QCheckBox( "Variable-width columns", this );
+ cb = new TQCheckBox( "Variable-width columns", this );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setVariableWidth(boolean)") );
v.addWidget( cb );
- cb = new QCheckBox( "Extended-Selection", this );
+ cb = new TQCheckBox( "Extended-Selection", this );
connect( cb, SIGNAL("toggled(boolean)"), this, SLOT("setMultiSelection(boolean)") );
v.addWidget( cb );
- QPushButton pb = new QPushButton( "Sort ascending", this );
+ TQPushButton pb = new TQPushButton( "Sort ascending", this );
connect( pb, SIGNAL(" clicked()"), this, SLOT(" sortAscending()") );
v.addWidget( pb );
- pb = new QPushButton( "Sort descending", this );
+ pb = new TQPushButton( "Sort descending", this );
connect( pb, SIGNAL(" clicked()"), this, SLOT(" sortDescending()") );
v.addWidget( pb );
@@ -149,7 +149,7 @@ void setRowsByHeight()
{
columns.setEnabled( false );
rows.setEnabled( false );
- l.setRowMode( QListBox.FitToHeight );
+ l.setRowMode( TQListBox.FitToHeight );
}
@@ -157,7 +157,7 @@ void setColsByWidth()
{
columns.setEnabled( false );
rows.setEnabled( false );
- l.setColumnMode( QListBox.FitToWidth );
+ l.setColumnMode( TQListBox.FitToWidth );
}
@@ -175,7 +175,7 @@ void setVariableHeight( boolean b )
void setMultiSelection( boolean b )
{
l.clearSelection();
- l.setSelectionMode( b ? QListBox.Extended : QListBox.Single );
+ l.setSelectionMode( b ? TQListBox.Extended : TQListBox.Single );
}
void sortAscending()
diff --git a/qtjava/javalib/examples/listbox/Main.java b/qtjava/javalib/examples/listbox/Main.java
index ff21a95f..4b836bb1 100644
--- a/qtjava/javalib/examples/listbox/Main.java
+++ b/qtjava/javalib/examples/listbox/Main.java
@@ -13,7 +13,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ListBoxDemo t = new ListBoxDemo();
t.setCaption( "Qt Example - Listbox" );
diff --git a/qtjava/javalib/examples/mdi/ApplicationWindow.java b/qtjava/javalib/examples/mdi/ApplicationWindow.java
index e74e6233..a2d3cbbc 100644
--- a/qtjava/javalib/examples/mdi/ApplicationWindow.java
+++ b/qtjava/javalib/examples/mdi/ApplicationWindow.java
@@ -11,16 +11,16 @@
import org.kde.qt.*;
import java.util.ArrayList;
-class ApplicationWindow extends QMainWindow
+class ApplicationWindow extends TQMainWindow
{
-private QPrinter printer;
-private QWorkspace ws;
+private TQPrinter printer;
+private TQWorkspace ws;
/* Keep a copy of ws.windowList(), so that the MDIWindow
widgets in it won't get garbage collected */
private ArrayList windows;
-private QToolBar fileTools;
-private QPopupMenu windowsMenu;
+private TQToolBar fileTools;
+private TQPopupMenu windowsMenu;
@@ -110,75 +110,75 @@ ApplicationWindow()
super( null, "example application main window", WDestructiveClose );
int id;
- QPixmap openIcon, saveIcon;
+ TQPixmap openIcon, saveIcon;
- fileTools = new QToolBar( this, "file operations" );
+ fileTools = new TQToolBar( this, "file operations" );
addToolBar( fileTools, tr( "File Operations" ), DockTop, true );
- openIcon = new QPixmap( fileopen );
- QToolButton fileOpen
- = new QToolButton( new QIconSet(openIcon), "Open File", "",
+ openIcon = new TQPixmap( fileopen );
+ TQToolButton fileOpen
+ = new TQToolButton( new TQIconSet(openIcon), "Open File", "",
this, SLOT("load()"), fileTools, "open file" );
- saveIcon = new QPixmap( filesave );
- QToolButton fileSave
- = new QToolButton( new QIconSet(saveIcon), "Save File", "",
+ saveIcon = new TQPixmap( filesave );
+ TQToolButton fileSave
+ = new TQToolButton( new TQIconSet(saveIcon), "Save File", "",
this, SLOT("save()"), fileTools, "save file" );
- printer = new QPrinter();
- QPixmap printIcon;
+ printer = new TQPrinter();
+ TQPixmap printIcon;
- printIcon = new QPixmap( fileprint );
- QToolButton filePrint
- = new QToolButton( new QIconSet(printIcon), "Print File", "",
+ printIcon = new TQPixmap( fileprint );
+ TQToolButton filePrint
+ = new TQToolButton( new TQIconSet(printIcon), "Print File", "",
this, SLOT("print()"), fileTools, "print file" );
- QWhatsThis.add( filePrint, filePrintText );
+ TQWhatsThis.add( filePrint, filePrintText );
- QWhatsThis.whatsThisButton( fileTools );
+ TQWhatsThis.whatsThisButton( fileTools );
- QWhatsThis.add( fileOpen, fileOpenText );
- QWhatsThis.add( fileSave, fileSaveText );
+ TQWhatsThis.add( fileOpen, fileOpenText );
+ TQWhatsThis.add( fileSave, fileSaveText );
- QPopupMenu file = new QPopupMenu( this );
+ TQPopupMenu file = new TQPopupMenu( this );
menuBar().insertItem( "&File", file );
- file.insertItem( "&New", this, SLOT("newDoc()"), new QKeySequence(CTRL+Key_N) );
+ file.insertItem( "&New", this, SLOT("newDoc()"), new TQKeySequence(CTRL+Key_N) );
- id = file.insertItem( new QIconSet(openIcon), "&Open...",
- this, SLOT("load()"), new QKeySequence(CTRL+Key_O) );
+ id = file.insertItem( new TQIconSet(openIcon), "&Open...",
+ this, SLOT("load()"), new TQKeySequence(CTRL+Key_O) );
file.setWhatsThis( id, fileOpenText );
- id = file.insertItem( new QIconSet(saveIcon), "&Save",
- this, SLOT("save()"), new QKeySequence(CTRL+Key_S) );
+ id = file.insertItem( new TQIconSet(saveIcon), "&Save",
+ this, SLOT("save()"), new TQKeySequence(CTRL+Key_S) );
file.setWhatsThis( id, fileSaveText );
id = file.insertItem( "Save &As...", this, SLOT("saveAs()") );
file.setWhatsThis( id, fileSaveText );
file.insertSeparator();
- id = file.insertItem( new QIconSet(printIcon), "&Print...",
- this, SLOT("print()"), new QKeySequence(CTRL+Key_P) );
+ id = file.insertItem( new TQIconSet(printIcon), "&Print...",
+ this, SLOT("print()"), new TQKeySequence(CTRL+Key_P) );
file.setWhatsThis( id, filePrintText );
file.insertSeparator();
- file.insertItem( "&Close", this, SLOT("closeWindow()"), new QKeySequence(CTRL+Key_W) );
- file.insertItem( "&Quit", qApp(), SLOT(" closeAllWindows()"), new QKeySequence(CTRL+Key_Q) );
+ file.insertItem( "&Close", this, SLOT("closeWindow()"), new TQKeySequence(CTRL+Key_W) );
+ file.insertItem( "&Quit", qApp(), SLOT(" closeAllWindows()"), new TQKeySequence(CTRL+Key_Q) );
- windowsMenu = new QPopupMenu( this );
+ windowsMenu = new TQPopupMenu( this );
windowsMenu.setCheckable( true );
connect( windowsMenu, SIGNAL(" aboutToShow()"),
this, SLOT(" windowsMenuAboutToShow()") );
menuBar().insertItem( "&Windows", windowsMenu );
menuBar().insertSeparator();
- QPopupMenu help = new QPopupMenu( this );
+ TQPopupMenu help = new TQPopupMenu( this );
menuBar().insertItem( "&Help", help );
- help.insertItem( "&About", this, SLOT("about()"), new QKeySequence(Key_F1));
+ help.insertItem( "&About", this, SLOT("about()"), new TQKeySequence(Key_F1));
help.insertItem( "About &Qt", this, SLOT("aboutQt()"));
help.insertSeparator();
- help.insertItem( "What's &This", this, SLOT("whatsThis()"), new QKeySequence(SHIFT+Key_F1));
+ help.insertItem( "What's &This", this, SLOT("whatsThis()"), new TQKeySequence(SHIFT+Key_F1));
- QVBox vb = new QVBox( this );
- vb.setFrameStyle( QFrame.StyledPanel | QFrame.Sunken );
- ws = new QWorkspace( vb );
+ TQVBox vb = new TQVBox( this );
+ vb.setFrameStyle( TQFrame.StyledPanel | TQFrame.Sunken );
+ ws = new TQWorkspace( vb );
ws.setScrollBarsEnabled( true );
setCentralWidget( vb );
@@ -191,7 +191,7 @@ MDIWindow newDoc()
MDIWindow w = new MDIWindow( ws, null, WDestructiveClose );
connect( w, SIGNAL("message(String,int)"), statusBar(), SLOT("message(String,int)") );
w.setCaption("unnamed document");
- w.setIcon( new QPixmap("document.xpm") );
+ w.setIcon( new TQPixmap("document.xpm") );
// show the very first window in maximized mode
windows = ws.windowList();
if ( windows.size() == 0 )
@@ -203,7 +203,7 @@ MDIWindow newDoc()
void load()
{
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( !fn.equals("") ) {
MDIWindow w = newDoc();
w.load( fn );
@@ -245,7 +245,7 @@ void closeWindow()
void about()
{
- QMessageBox.about( this, "Qt Application Example",
+ TQMessageBox.about( this, "Qt Application Example",
"This example demonstrates simple use of\n "
+ "Qt's Multiple Document Interface (MDI).");
}
@@ -253,7 +253,7 @@ void about()
void aboutQt()
{
- QMessageBox.aboutQt( this, "Qt Application Example" );
+ TQMessageBox.aboutQt( this, "Qt Application Example" );
}
@@ -269,7 +269,7 @@ void windowsMenuAboutToShow()
}
windowsMenu.insertSeparator();
for ( int i = 0; i < windows.size(); ++i ) {
- int id = windowsMenu.insertItem(((QWidget) windows.get(i)).caption(),
+ int id = windowsMenu.insertItem(((TQWidget) windows.get(i)).caption(),
this, SLOT(" windowsMenuActivated( int )") );
windowsMenu.setItemParameter( id, i );
windowsMenu.setItemChecked( id, ws.activeWindow() == windows.get(i) );
@@ -279,7 +279,7 @@ void windowsMenuAboutToShow()
void windowsMenuActivated( int id )
{
windows = ws.windowList();
- QWidget w = (QWidget) windows.get( id );
+ TQWidget w = (TQWidget) windows.get( id );
if ( w != null )
w.showNormal();
w.setFocus();
diff --git a/qtjava/javalib/examples/mdi/MDIWindow.java b/qtjava/javalib/examples/mdi/MDIWindow.java
index ef5efd64..c8abf0be 100644
--- a/qtjava/javalib/examples/mdi/MDIWindow.java
+++ b/qtjava/javalib/examples/mdi/MDIWindow.java
@@ -11,18 +11,18 @@
import org.kde.qt.*;
-class MDIWindow extends QMainWindow
+class MDIWindow extends TQMainWindow
{
-private QMultiLineEdit medit;
-private QMovie mmovie;
+private TQMultiLineEdit medit;
+private TQMovie mmovie;
private String filename = "";
-MDIWindow( QWidget parent, String name, int wflags )
+MDIWindow( TQWidget parent, String name, int wflags )
{
super( parent, name, wflags );
mmovie = null;
- medit = new QMultiLineEdit( this );
+ medit = new TQMultiLineEdit( this );
setFocusProxy( medit );
setCentralWidget( medit );
}
@@ -31,24 +31,24 @@ MDIWindow( QWidget parent, String name, int wflags )
void load( String fn )
{
filename = fn;
- QFile f = new QFile( filename );
- if ( !f.open( QIODevice.IO_ReadOnly ) )
+ TQFile f = new TQFile( filename );
+ if ( !f.open( TQIODevice.IO_ReadOnly ) )
return;
if(fn.indexOf(".gif") != -1) {
- QWidget tmp=new QWidget(this);
+ TQWidget tmp=new TQWidget(this);
setFocusProxy(tmp);
setCentralWidget(tmp);
medit.hide();
- QMovie qm=new QMovie(fn);
+ TQMovie qm=new TQMovie(fn);
// qm.setDisplayWidget(tmp);
- tmp.setBackgroundMode(QWidget.NoBackground);
+ tmp.setBackgroundMode(TQWidget.NoBackground);
tmp.show();
mmovie=qm;
} else {
mmovie = null;
- QTextStream t = new QTextStream(f);
+ TQTextStream t = new TQTextStream(f);
String s = t.read();
medit.setText( s );
f.close();
@@ -67,14 +67,14 @@ void save()
}
String text = medit.text();
- QFile f = new QFile( filename );
- if ( !f.open( QIODevice.IO_WriteOnly ) ) {
+ TQFile f = new TQFile( filename );
+ if ( !f.open( TQIODevice.IO_WriteOnly ) ) {
emit("message", "Could not write to " + filename,
2000 );
return;
}
- QTextStream t = new QTextStream( f );
+ TQTextStream t = new TQTextStream( f );
t.writeRawBytes( text, text.length() );
f.close();
@@ -85,7 +85,7 @@ void save()
void saveAs()
{
- String fn = QFileDialog.getSaveFileName( filename, "", this );
+ String fn = TQFileDialog.getSaveFileName( filename, "", this );
if ( !fn.equals("") ) {
filename = fn;
save();
@@ -94,20 +94,20 @@ void saveAs()
}
}
-void print( QPrinter printer)
+void print( TQPrinter printer)
{
int Margin = 10;
int pageNo = 1;
if ( printer.setup(this) ) { // printer dialog
emit("message", "Printing...", 0 );
- QPainter p = new QPainter();
+ TQPainter p = new TQPainter();
if ( !p.begin( printer ) )
return; // paint on printer
p.setFont( medit.font() );
int yPos = 0; // y position for each line
- QFontMetrics fm = p.fontMetrics();
- QPaintDeviceMetrics metrics = new QPaintDeviceMetrics( printer ); // need width/height
+ TQFontMetrics fm = p.fontMetrics();
+ TQPaintDeviceMetrics metrics = new TQPaintDeviceMetrics( printer ); // need width/height
// of printer surface
for( int i = 0 ; i < medit.numLines() ; i++ ) {
if ( Margin + yPos > metrics.height() - Margin ) {
diff --git a/qtjava/javalib/examples/mdi/Main.java b/qtjava/javalib/examples/mdi/Main.java
index 8190b7cf..114c4230 100644
--- a/qtjava/javalib/examples/mdi/Main.java
+++ b/qtjava/javalib/examples/mdi/Main.java
@@ -13,7 +13,7 @@ import org.kde.qt.*;
public class Main {
public static void main(String[] args) {
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ApplicationWindow mw = new ApplicationWindow();
mw.setCaption( "Qt Example - Multiple Documents Interface (MDI)" );
mw.show();
diff --git a/qtjava/javalib/examples/menu/MenuExample.java b/qtjava/javalib/examples/menu/MenuExample.java
index 3eca97b5..1c4e7231 100644
--- a/qtjava/javalib/examples/menu/MenuExample.java
+++ b/qtjava/javalib/examples/menu/MenuExample.java
@@ -10,11 +10,11 @@
import org.kde.qt.*;
-class MenuExample extends QWidget
+class MenuExample extends TQWidget
{
-private QMenuBar menu;
-private QLabel label;
+private TQMenuBar menu;
+private TQLabel label;
private boolean isBold;
private boolean isUnderline;
private int boldID, underlineID;
@@ -97,26 +97,26 @@ static String p3_xpm[] = {
menu.
*/
/**
-class MyMenuItem extends QCustomMenuItem
+class MyMenuItem extends TQCustomMenuItem
{
private String string;
-private QFont font;
+private TQFont font;
- public MyMenuItem( String s, QFont f )
+ public MyMenuItem( String s, TQFont f )
{
font = f;
string = s;
}
- public void paint( QPainter p, QColorGroup cg, boolean act, boolean enabled, int x, int y, int w, int h )
+ public void paint( TQPainter p, TQColorGroup cg, boolean act, boolean enabled, int x, int y, int w, int h )
{
p.setFont ( font );
p.drawText( x, y, w, h, AlignLeft | AlignVCenter | ShowPrefix | DontClip, string );
}
- public QSize sizeHint()
+ public TQSize sizeHint()
{
- return new QFontMetrics( font ).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, string );
+ return new TQFontMetrics( font ).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, string );
}
}
*/
@@ -126,14 +126,14 @@ MenuExample( )
this(null, null);
}
-MenuExample( QWidget parent, String name )
+MenuExample( TQWidget parent, String name )
{
super( parent, name );
- QPixmap p1 = new QPixmap( p1_xpm );
- QPixmap p2 = new QPixmap( p2_xpm );
- QPixmap p3 = new QPixmap( p3_xpm );
+ TQPixmap p1 = new TQPixmap( p1_xpm );
+ TQPixmap p2 = new TQPixmap( p2_xpm );
+ TQPixmap p3 = new TQPixmap( p3_xpm );
- QPopupMenu print = new QPopupMenu( this );
+ TQPopupMenu print = new TQPopupMenu( this );
print.insertTearOffHandle();
print.insertItem( "&Print to printer", this, SLOT("printer()") );
print.insertItem( "Print to &file", this, SLOT("file()") );
@@ -141,38 +141,38 @@ MenuExample( QWidget parent, String name )
print.insertSeparator();
print.insertItem( "Printer &Setup", this, SLOT("printerSetup()") );
- QPopupMenu file = new QPopupMenu( this );
- file.insertItem( new QIconSet(p1), "&Open", this, SLOT("open()"), new QKeySequence(CTRL+Key_O) );
- file.insertItem( new QIconSet(p2), "&New", this, SLOT("news()"), new QKeySequence(CTRL+Key_N) );
- file.insertItem( new QIconSet(p3), "&Save", this, SLOT("save()"), new QKeySequence(CTRL+Key_S) );
- file.insertItem( "&Close", this, SLOT("closeDoc()"), new QKeySequence(CTRL+Key_W) );
+ TQPopupMenu file = new TQPopupMenu( this );
+ file.insertItem( new TQIconSet(p1), "&Open", this, SLOT("open()"), new TQKeySequence(CTRL+Key_O) );
+ file.insertItem( new TQIconSet(p2), "&New", this, SLOT("news()"), new TQKeySequence(CTRL+Key_N) );
+ file.insertItem( new TQIconSet(p3), "&Save", this, SLOT("save()"), new TQKeySequence(CTRL+Key_S) );
+ file.insertItem( "&Close", this, SLOT("closeDoc()"), new TQKeySequence(CTRL+Key_W) );
file.insertSeparator();
file.insertItem( "&Print", print, CTRL+Key_P );
file.insertSeparator();
- file.insertItem( "E&xit", qApp(), SLOT("quit()"), new QKeySequence(CTRL+Key_Q) );
+ file.insertItem( "E&xit", qApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) );
- QPopupMenu edit = new QPopupMenu( this );
+ TQPopupMenu edit = new TQPopupMenu( this );
int undoID = edit.insertItem( "&Undo", this, SLOT("undo()") );
int redoID = edit.insertItem( "&Redo", this, SLOT("redo()") );
edit.setItemEnabled( undoID, false );
edit.setItemEnabled( redoID, false );
- QPopupMenu options = new QPopupMenu( this );
+ TQPopupMenu options = new TQPopupMenu( this );
options.insertTearOffHandle();
options.setCaption("Options");
options.insertItem( "&Normal Font", this, SLOT("normal()") );
options.insertSeparator();
options.polish(); // adjust system settings
- QFont f = options.font();
+ TQFont f = options.font();
f.setBold( true );
// boldID = options.insertItem( new MyMenuItem( "&Bold", f ) );
- options.setAccel( new QKeySequence(CTRL+Key_B), boldID );
+ options.setAccel( new TQKeySequence(CTRL+Key_B), boldID );
options.connectItem( boldID, this, SLOT("bold()") );
f = font();
f.setUnderline( true );
// underlineID = options.insertItem( new MyMenuItem( "&Underline", f ) );
- options.setAccel( new QKeySequence(CTRL+Key_U), underlineID );
+ options.setAccel( new TQKeySequence(CTRL+Key_U), underlineID );
options.connectItem( underlineID, this, SLOT("underline()") );
isBold = false;
@@ -180,21 +180,21 @@ MenuExample( QWidget parent, String name )
options.setCheckable( true );
- QPopupMenu help = new QPopupMenu( this );
- help.insertItem( "&About", this, SLOT("about()"), new QKeySequence(CTRL+Key_H) );
+ TQPopupMenu help = new TQPopupMenu( this );
+ help.insertItem( "&About", this, SLOT("about()"), new TQKeySequence(CTRL+Key_H) );
help.insertItem( "About &Qt", this, SLOT("aboutQt()") );
- menu = new QMenuBar( this );
+ menu = new TQMenuBar( this );
menu.insertItem( "&File", file );
menu.insertItem( "&Edit", edit );
menu.insertItem( "&Options", options );
menu.insertSeparator();
menu.insertItem( "&Help", help );
- menu.setSeparator( QMenuBar.InWindowsStyle );
+ menu.setSeparator( TQMenuBar.InWindowsStyle );
- label = new QLabel( this );
+ label = new TQLabel( this );
label.setGeometry( 20, rect().center().y()-20, width()-40, 40 );
- label.setFrameStyle( QFrame.Box | QFrame.Raised );
+ label.setFrameStyle( TQFrame.Box | TQFrame.Raised );
label.setLineWidth( 1 );
label.setAlignment( AlignCenter );
@@ -268,7 +268,7 @@ void underline()
void about()
{
- QMessageBox.about( this, "Qt Menu Example",
+ TQMessageBox.about( this, "Qt Menu Example",
"This example demonstrates simple use of Qt menus.\n"
+ "You can cut and paste lines from it to your own\n"
+ "programs." );
@@ -277,7 +277,7 @@ void about()
void aboutQt()
{
- QMessageBox.aboutQt( this, "Qt Menu Example" );
+ TQMessageBox.aboutQt( this, "Qt Menu Example" );
}
@@ -302,7 +302,7 @@ void printerSetup()
}
-protected void resizeEvent( QResizeEvent e )
+protected void resizeEvent( TQResizeEvent e )
{
label.setGeometry( 20, rect().center().y()-20, width()-40, 40 );
}
@@ -310,7 +310,7 @@ protected void resizeEvent( QResizeEvent e )
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
MenuExample m = new MenuExample();
m.setCaption("Qt Examples - Menus");
a.setMainWidget( m );
diff --git a/qtjava/javalib/examples/menu/README b/qtjava/javalib/examples/menu/README
index 958edd19..326a3f20 100644
--- a/qtjava/javalib/examples/menu/README
+++ b/qtjava/javalib/examples/menu/README
@@ -1,2 +1,2 @@
-The class MyMenuItem isn't translated to Java, as the QCustomMenuItem.paint()
+The class MyMenuItem isn't translated to Java, as the TQCustomMenuItem.paint()
and sizeHint() virtual method callbacks aren't implemented yet.
diff --git a/qtjava/javalib/examples/picture/PictureDisplay.java b/qtjava/javalib/examples/picture/PictureDisplay.java
index 34b026b4..2f311d51 100644
--- a/qtjava/javalib/examples/picture/PictureDisplay.java
+++ b/qtjava/javalib/examples/picture/PictureDisplay.java
@@ -10,28 +10,28 @@
import org.kde.qt.*;
-class PictureDisplay extends QWidget // picture display widget
+class PictureDisplay extends TQWidget // picture display widget
{
-static void paintCar( QPainter p ) // paint a car
+static void paintCar( TQPainter p ) // paint a car
{
- QPointArray a = new QPointArray();
- QBrush brush = new QBrush( Qt.yellow(), Qt.SolidPattern );
+ TQPointArray a = new TQPointArray();
+ TQBrush brush = new TQBrush( Qt.yellow(), Qt.SolidPattern );
p.setBrush( brush ); // use solid, yellow brush
a.setPoints( 5, new short[] { 50,50, 350,50, 450,120, 450,250, 50,250 } );
p.drawPolygon( a ); // draw car body
- QFont f = new QFont( "courier", 12, QFont.Bold, false );
+ TQFont f = new TQFont( "courier", 12, TQFont.Bold, false );
p.setFont( f );
- QColor windowColor = new QColor( 120, 120, 255 ); // a light blue color
+ TQColor windowColor = new TQColor( 120, 120, 255 ); // a light blue color
brush.setColor( windowColor ); // set this brush color
p.setBrush( brush ); // set brush
p.drawRect( 80, 80, 250, 70 ); // car window
p.drawText( 180, 80, 150, 70, Qt.AlignCenter, "-- Qt --\nTrolltech AS" );
- QPixmap pixmap = new QPixmap();
+ TQPixmap pixmap = new TQPixmap();
if ( pixmap.load("flag.bmp") ) // load and draw image
p.drawPixmap( 100, 90, pixmap );
@@ -44,12 +44,12 @@ static void paintCar( QPainter p ) // paint a car
-private QPicture pict;
+private TQPicture pict;
private String name;
public PictureDisplay( String fileName )
{
- pict = new QPicture();
+ pict = new TQPicture();
name = fileName;
if ( !pict.load(fileName) ) { // cannot load picture
pict = null;
@@ -57,16 +57,16 @@ public PictureDisplay( String fileName )
}
}
-protected void paintEvent( QPaintEvent event )
+protected void paintEvent( TQPaintEvent event )
{
- QPainter paint = new QPainter( this ); // paint widget
+ TQPainter paint = new TQPainter( this ); // paint widget
if ( pict != null )
paint.drawPicture( pict ); // draw picture
else
paint.drawText( rect(), AlignCenter, name );
}
-protected void keyPressEvent( QKeyEvent k )
+protected void keyPressEvent( TQKeyEvent k )
{
// switch ( tolower(k.ascii()) ) {
switch ( k.ascii() ) {
@@ -75,7 +75,7 @@ protected void keyPressEvent( QKeyEvent k )
update();
break;
case 'q': // quit
- QApplication.exit();
+ TQApplication.exit();
break;
}
}
@@ -83,23 +83,23 @@ protected void keyPressEvent( QKeyEvent k )
static public void main( String[] args )
{
- QApplication a = new QApplication( args ); // QApplication required!
+ TQApplication a = new TQApplication( args ); // TQApplication retquired!
String fileName = "car.pic"; // default picture file name
if ( args.length == 1 ) // use argument as file name
fileName = args[0];
- if ( !QFile.exists(fileName) ) {
- QPicture pict = new QPicture(); // our picture
- QPainter paint = new QPainter(); // our painter
+ if ( !TQFile.exists(fileName) ) {
+ TQPicture pict = new TQPicture(); // our picture
+ TQPainter paint = new TQPainter(); // our painter
paint.begin( pict ); // begin painting onto picture
paintCar( paint ); // paint!
paint.end(); // painting done
pict.save( fileName ); // save picture
- QMessageBox.information(null, "Qt picture example", "Saved. Run me again!");
+ TQMessageBox.information(null, "Qt picture example", "Saved. Run me again!");
return;
} else {
PictureDisplay test = new PictureDisplay( fileName ); // create picture display
diff --git a/qtjava/javalib/examples/picture/car_orig.pic b/qtjava/javalib/examples/picture/car_orig.pic
index a0141b75..806053d7 100644
Binary files a/qtjava/javalib/examples/picture/car_orig.pic and b/qtjava/javalib/examples/picture/car_orig.pic differ
diff --git a/qtjava/javalib/examples/popup/Frame.java b/qtjava/javalib/examples/popup/Frame.java
index afbf2edc..1f1e3eb3 100644
--- a/qtjava/javalib/examples/popup/Frame.java
+++ b/qtjava/javalib/examples/popup/Frame.java
@@ -14,13 +14,13 @@
import org.kde.qt.*;
-class Frame extends QFrame
+class Frame extends TQFrame
{
-private QPushButton button1;
-private QPushButton button2;
+private TQPushButton button1;
+private TQPushButton button2;
-private QFrame popup1;
+private TQFrame popup1;
private FancyPopup popup2;
Frame()
@@ -28,15 +28,15 @@ Frame()
this(null, null);
}
-Frame(QWidget parent, String name)
+Frame(TQWidget parent, String name)
{
super(parent, name);
- button1 = new QPushButton("Simple Popup", this);
+ button1 = new TQPushButton("Simple Popup", this);
connect ( button1, SIGNAL(" clicked()"), SLOT(" button1Clicked()") );
- button2 = new QPushButton("Fancy Popup", this);
+ button2 = new TQPushButton("Fancy Popup", this);
connect ( button2, SIGNAL(" pressed()"), SLOT(" button2Pressed()") );
- QBoxLayout l = new QHBoxLayout( this );
+ TQBoxLayout l = new TQHBoxLayout( this );
button1.setMaximumSize(button1.sizeHint());
button2.setMaximumSize(button2.sizeHint());
l.addWidget( button1 );
@@ -50,14 +50,14 @@ Frame(QWidget parent, String name)
//create a very simple popup: it is just composed with other
//widget and will be shown after clicking on button1
- popup1 = new QFrame( this ,null, WType_Popup);
+ popup1 = new TQFrame( this ,null, WType_Popup);
popup1.setFrameStyle( WinPanel|Raised );
popup1.resize(150,100);
- QLineEdit tmpE = new QLineEdit( popup1 );
+ TQLineEdit tmpE = new TQLineEdit( popup1 );
connect( tmpE, SIGNAL(" returnPressed()"), popup1, SLOT(" hide()") );
tmpE.setGeometry(10,10, 130, 30);
tmpE.setFocus();
- QPushButton tmpB = new QPushButton("Click me!", popup1);
+ TQPushButton tmpB = new TQPushButton("Click me!", popup1);
connect( tmpB, SIGNAL(" clicked()"), popup1, SLOT(" close()") );
tmpB.setGeometry(10, 50, 130, 30);
@@ -71,7 +71,7 @@ Frame(QWidget parent, String name)
// it with any other widget. The next four lines (if not
// commented out) will for instance add a line edit widget.
-// tmpE = new QLineEdit( popup2 );
+// tmpE = new TQLineEdit( popup2 );
// tmpE.setFocus();
// connect( tmpE, SIGNAL(" returnPressed()"), popup2, SLOT(" close()") );
// tmpE.setGeometry(10, 10, 130, 30);
@@ -87,19 +87,19 @@ void button2Pressed(){
popup2.popup(button2);
}
-class FancyPopup extends QLabel
+class FancyPopup extends TQLabel
{
-private QWidget popupParent;
+private TQWidget popupParent;
private int moves;
-FancyPopup( QWidget parent )
+FancyPopup( TQWidget parent )
{
this(parent, null);
}
-FancyPopup( QWidget parent, String name )
+FancyPopup( TQWidget parent, String name )
{
super( parent, name, WType_Popup );
setFrameStyle( WinPanel|Raised );
@@ -109,20 +109,20 @@ FancyPopup( QWidget parent, String name )
setMouseTracking( true );
}
-protected void mouseMoveEvent( QMouseEvent e){
+protected void mouseMoveEvent( TQMouseEvent e){
moves++;
String s = e.pos().x() + "/" + e.pos().y();
- if ((e.state() & QMouseEvent.LeftButton) != 0)
+ if ((e.state() & TQMouseEvent.LeftButton) != 0)
s += " (down)";
setText(s);
}
-protected void mouseReleaseEvent( QMouseEvent e){
+protected void mouseReleaseEvent( TQMouseEvent e){
if (rect().contains( e.pos() ) || moves > 5)
close();
}
-protected void closeEvent( QCloseEvent e ){
+protected void closeEvent( TQCloseEvent e ){
e.accept();
moves = 0;
if (popupParent == null)
@@ -133,11 +133,11 @@ protected void closeEvent( QCloseEvent e ){
// the popupParent popped us up in its mousePressEvent handler. To
// avoid the button remaining in pressed state we simply send a
// faked mouse button release event to it.
- QMouseEvent me = new QMouseEvent( QEvent.MouseButtonRelease, new QPoint(0,0), new QPoint(0,0), QMouseEvent.LeftButton, QMouseEvent.NoButton);
- QApplication.sendEvent( popupParent, me );
+ TQMouseEvent me = new TQMouseEvent( TQEvent.MouseButtonRelease, new TQPoint(0,0), new TQPoint(0,0), TQMouseEvent.LeftButton, TQMouseEvent.NoButton);
+ TQApplication.sendEvent( popupParent, me );
}
-void popup( QWidget parent) {
+void popup( TQWidget parent) {
popupParent = parent;
setText("Move the mouse!");
if (popupParent != null)
@@ -150,7 +150,7 @@ void popup( QWidget parent) {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Frame frame = new Frame();
frame.setCaption("Qt Example - Custom Popups");
diff --git a/qtjava/javalib/examples/progressbar/Main.java b/qtjava/javalib/examples/progressbar/Main.java
index be103c03..cd235a1b 100644
--- a/qtjava/javalib/examples/progressbar/Main.java
+++ b/qtjava/javalib/examples/progressbar/Main.java
@@ -14,7 +14,7 @@ class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ProgressBar progressbar = new ProgressBar();
progressbar.setCaption("Qt Example - ProgressBar");
diff --git a/qtjava/javalib/examples/progressbar/ProgressBar.java b/qtjava/javalib/examples/progressbar/ProgressBar.java
index 1d8ab1d3..0737e270 100644
--- a/qtjava/javalib/examples/progressbar/ProgressBar.java
+++ b/qtjava/javalib/examples/progressbar/ProgressBar.java
@@ -11,13 +11,13 @@
import org.kde.qt.*;
-class ProgressBar extends QButtonGroup
+class ProgressBar extends TQButtonGroup
{
-protected QRadioButton slow, normal, fast;
-protected QPushButton start, pause, reset;
-protected QProgressBar progress;
-protected QTimer timer;
+protected TQRadioButton slow, normal, fast;
+protected TQPushButton start, pause, reset;
+protected TQProgressBar progress;
+protected TQTimer timer;
/*
@@ -31,39 +31,39 @@ ProgressBar( )
this(null, null);
}
-ProgressBar( QWidget parent, String name )
+ProgressBar( TQWidget parent, String name )
{
super( 0, Horizontal, "Progress Bar", parent, name );
- timer = new QTimer();
+ timer = new TQTimer();
setMargin( 10 );
- QGridLayout toplayout = new QGridLayout( layout(), 2, 2, 5);
+ TQGridLayout toplayout = new TQGridLayout( layout(), 2, 2, 5);
setRadioButtonExclusive( true );
// insert three radiobuttons which the user can use
// to set the speed of the progress and two pushbuttons
// to start/pause/continue and reset the progress
- slow = new QRadioButton( "&Slow", this );
- normal = new QRadioButton( "&Normal", this );
- fast = new QRadioButton( "&Fast", this );
- QVBoxLayout vb1 = new QVBoxLayout();
+ slow = new TQRadioButton( "&Slow", this );
+ normal = new TQRadioButton( "&Normal", this );
+ fast = new TQRadioButton( "&Fast", this );
+ TQVBoxLayout vb1 = new TQVBoxLayout();
toplayout.addLayout( vb1, 0, 0 );
vb1.addWidget( slow );
vb1.addWidget( normal );
vb1.addWidget( fast );
// two push buttons, one for start, for for reset.
- start = new QPushButton( "&Start", this );
- reset = new QPushButton( "&Reset", this );
- QVBoxLayout vb2 = new QVBoxLayout();
+ start = new TQPushButton( "&Start", this );
+ reset = new TQPushButton( "&Reset", this );
+ TQVBoxLayout vb2 = new TQVBoxLayout();
toplayout.addLayout( vb2, 0, 1 );
vb2.addWidget( start );
vb2.addWidget( reset );
// Create the progressbar
- progress = new QProgressBar( 100, this );
- // progress.setStyle( new QMotifStyle() );
+ progress = new TQProgressBar( 100, this );
+ // progress.setStyle( new TQMotifStyle() );
toplayout.addMultiCellWidget( progress, 1, 1, 0, 1 );
// connect the clicked() SIGNALs of the pushbuttons to SLOTs
diff --git a/qtjava/javalib/examples/qfd/FontDisplayer.java b/qtjava/javalib/examples/qfd/FontDisplayer.java
index 26f658b1..689dbb44 100644
--- a/qtjava/javalib/examples/qfd/FontDisplayer.java
+++ b/qtjava/javalib/examples/qfd/FontDisplayer.java
@@ -13,52 +13,52 @@ import java.math.*;
-class FontDisplayer extends QMainWindow {
+class FontDisplayer extends TQMainWindow {
-class FontRowTable extends QFrame {
-private QFont tablefont;
+class FontRowTable extends TQFrame {
+private TQFont tablefont;
private int row;
-FontRowTable( QWidget parent )
+FontRowTable( TQWidget parent )
{
this(parent, null);
}
-FontRowTable( QWidget parent, String name )
+FontRowTable( TQWidget parent, String name )
{
super(parent,name);
setBackgroundMode(PaletteBase);
setFrameStyle(Panel|Sunken);
setMargin(8);
setRow(0);
- tablefont = QApplication.font();
+ tablefont = TQApplication.font();
}
-public QSize sizeHint()
+public TQSize sizeHint()
{
- return new QSize( 16*cellSize().width()+2*(margin()+frameWidth()),
+ return new TQSize( 16*cellSize().width()+2*(margin()+frameWidth()),
16*cellSize().height()+2*(margin()+frameWidth()) );
}
-QSize cellSize()
+TTQSize cellSize()
{
- QFontMetrics fm = fontMetrics();
- return new QSize( fm.maxWidth(), fm.lineSpacing()+1 );
+ TQFontMetrics fm = fontMetrics();
+ return new TQSize( fm.maxWidth(), fm.lineSpacing()+1 );
}
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
super.paintEvent(e);
System.out.println("In paintEvent");
- QPainter p = new QPainter(this);
+ TQPainter p = new TQPainter(this);
p.setClipRegion(e.region());
- QRect r = e.rect();
- QFontMetrics fm = fontMetrics();
+ TQRect r = e.rect();
+ TQFontMetrics fm = fontMetrics();
int ml = frameWidth()+margin() + 1 + (-fm.minLeftBearing() > 0 ? -fm.minLeftBearing() : 0);
int mt = frameWidth()+margin();
- QSize cell = new QSize((width()-15-ml)/16,(height()-15-mt)/16);
+ TQSize cell = new TQSize((width()-15-ml)/16,(height()-15-mt)/16);
if ( cell.width() == 0 || cell.height() == 0 )
return;
@@ -70,11 +70,11 @@ System.out.println("In paintEvent");
int h = fm.height();
- QColor body = new QColor(255,255,192);
- QColor negative = new QColor(255,192,192);
- QColor positive = new QColor(192,192,255);
- QColor rnegative = new QColor(255,128,128);
- QColor rpositive = new QColor(128,128,255);
+ TQColor body = new TQColor(255,255,192);
+ TQColor negative = new TQColor(255,192,192);
+ TQColor positive = new TQColor(192,192,255);
+ TQColor rnegative = new TQColor(255,128,128);
+ TQColor rpositive = new TQColor(128,128,255);
for (int j = minj; j<=maxj; j++) {
for (int i = mini; i<=maxi; i++) {
@@ -92,20 +92,20 @@ System.out.println("In paintEvent");
x += ml;
y += mt+h;
- p.fillRect(x,y,w,-h,new QBrush(body));
+ p.fillRect(x,y,w,-h,new TQBrush(body));
if ( w != 0) {
if ( lb != 0 ) {
p.fillRect(x+(lb>0?0:lb), y-h/2, Math.abs(lb),-h/2,
- new QBrush(lb < 0 ? negative : positive));
+ new TQBrush(lb < 0 ? negative : positive));
}
if ( rb != 0) {
p.fillRect(x+w-(rb>0?rb:0),y+2, Math.abs(rb),-h/2,
- new QBrush(rb < 0 ? rnegative : rpositive));
+ new TQBrush(rb < 0 ? rnegative : rpositive));
}
}
String s = "";
s += ch;
- p.setPen(new QPen(Qt.black()));
+ p.setPen(new TQPen(Qt.black()));
p.drawText(x,y,s);
}
}
@@ -118,7 +118,7 @@ void setRow(int r)
{
row = r;
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
String str = "mLB=" + fm.minLeftBearing() +
" mRB=" + fm.minRightBearing() +
" mW=" + fm.maxWidth();
@@ -130,8 +130,8 @@ void setRow(int r)
void chooseFont()
{
boolean[] ok = { true };
- QFont oldfont = tablefont;
- tablefont = QFontDialog.getFont(ok, oldfont, this);
+ TQFont oldfont = tablefont;
+ tablefont = TQFontDialog.getFont(ok, oldfont, this);
if (ok[0])
setFont(tablefont);
@@ -147,15 +147,15 @@ FontDisplayer( )
this(null, null);
}
-FontDisplayer( QWidget parent, String name )
+FontDisplayer( TQWidget parent, String name )
{
super(parent,name);
FontRowTable table = new FontRowTable(this);
- QToolBar controls = new QToolBar(this);
- new QLabel(tr("Row:"), controls);
- QSpinBox row = new QSpinBox(0,255,1,controls);
+ TQToolBar controls = new TQToolBar(this);
+ new TQLabel(tr("Row:"), controls);
+ TQSpinBox row = new TQSpinBox(0,255,1,controls);
controls.addSeparator();
- QPushButton fontbutton = new QPushButton(tr("Font..."), controls);
+ TQPushButton fontbutton = new TQPushButton(tr("Font..."), controls);
connect(row,SIGNAL("valueChanged(int)"),table,SLOT("setRow(int)"));
connect(fontbutton, SIGNAL("clicked()"), table, SLOT("chooseFont()"));
diff --git a/qtjava/javalib/examples/qfd/Main.java b/qtjava/javalib/examples/qfd/Main.java
index d25f2389..301c7068 100644
--- a/qtjava/javalib/examples/qfd/Main.java
+++ b/qtjava/javalib/examples/qfd/Main.java
@@ -15,16 +15,16 @@ class Main {
public static void main(String[] args) {
// Use an interesting font
- QApplication.setFont(new QFont("unifont",16));
+ TQApplication.setFont(new TQFont("unifont",16));
- QApplication app = new QApplication(args);
+ TQApplication app = new TQApplication(args);
FontDisplayer m = new FontDisplayer();
- QSize sh = m.centralWidget().sizeHint();
+ TQSize sh = m.centralWidget().sizeHint();
m.resize(sh.width(),
sh.height()+3*m.statusBar().height());
app.setMainWidget(m);
- m.setCaption("Qt Example - QFD");
+ m.setCaption("Qt Example - TQFD");
m.show();
app.exec();
diff --git a/qtjava/javalib/examples/qmag/MagWidget.java b/qtjava/javalib/examples/qmag/MagWidget.java
index 66c68705..cf766570 100644
--- a/qtjava/javalib/examples/qmag/MagWidget.java
+++ b/qtjava/javalib/examples/qmag/MagWidget.java
@@ -10,17 +10,17 @@
import org.kde.qt.*;
-class MagWidget extends QWidget
+class MagWidget extends TQWidget
{
-private QComboBox zoom;
-private QComboBox refresh;
-private QPushButton saveButton;
-private QPushButton multiSaveButton;
-private QPushButton quitButton;
-private QPixmap pm; // pixmap, magnified
-private QPixmap p; // pixmap
-private QImage image; // image of pixmap (for RGB)
-private QLabel rgb;
+private TQComboBox zoom;
+private TQComboBox refresh;
+private TQPushButton saveButton;
+private TQPushButton multiSaveButton;
+private TQPushButton quitButton;
+private TQPixmap pm; // pixmap, magnified
+private TQPixmap p; // pixmap
+private TQImage image; // image of pixmap (for RGB)
+private TQLabel rgb;
private int yoffset; // pixels in addition to the actual picture
private int z; // magnification factor
private int r; // autorefresh rate (index into refreshrates)
@@ -47,7 +47,7 @@ MagWidget( )
this(null, null);
}
-MagWidget( QWidget parent, String name )
+MagWidget( TQWidget parent, String name )
{
super( parent, name);
z = 1; // default zoom (100%)
@@ -55,11 +55,11 @@ MagWidget( QWidget parent, String name )
int w=0, x=0, n;
- zoom = new QComboBox( false, this );
+ zoom = new TQComboBox( false, this );
zoom.insertStrList( zoomfactors, 9 );
connect( zoom, SIGNAL("activated(int)"), SLOT("setZoom(int)") );
- refresh = new QComboBox( false, this );
+ refresh = new TQComboBox( false, this );
refresh.insertStrList( refreshrates, 9 );
connect( refresh, SIGNAL("activated(int)"), SLOT("setRefresh(int)") );
@@ -77,20 +77,20 @@ MagWidget( QWidget parent, String name )
}
refresh.setGeometry( x, 2, w+30, 20 );
- saveButton = new QPushButton( this );
+ saveButton = new TQPushButton( this );
connect( saveButton, SIGNAL("clicked()"), this, SLOT("save()") );
saveButton.setText( "Save" );
saveButton.setGeometry( x+w+30+2, 2,
10+saveButton.fontMetrics().width("Save"), 20 );
- multiSaveButton = new QPushButton( this );
+ multiSaveButton = new TQPushButton( this );
multiSaveButton.setToggleButton(true);
connect( multiSaveButton, SIGNAL("clicked()"), this, SLOT("multiSave()") );
multiSaveButton.setText( "MultiSave" );
multiSaveButton.setGeometry( saveButton.geometry().right() + 2, 2,
10+multiSaveButton.fontMetrics().width("MultiSave"), 20 );
- quitButton = new QPushButton( this );
+ quitButton = new TQPushButton( this );
connect( quitButton, SIGNAL("clicked()"), qApp(), SLOT("quit()") );
quitButton.setText( "Quit" );
quitButton.setGeometry( multiSaveButton.geometry().right() + 2, 2,
@@ -103,7 +103,7 @@ MagWidget( QWidget parent, String name )
setRefresh(1);
setZoom(5);
- rgb = new QLabel( this );
+ rgb = new TQLabel( this );
rgb.setText( "" );
rgb.setAlignment( AlignVCenter );
rgb.resize( width(), rgb.fontMetrics().height() + 4 );
@@ -122,7 +122,7 @@ MagWidget( QWidget parent, String name )
setMouseTracking( true ); // and do let me know what pixel I'm at, eh?
- grabAround( new QPoint(grabx=qApp().desktop().width()/2, graby=qApp().desktop().height()/2) );
+ grabAround( new TQPoint(grabx=qApp().desktop().width()/2, graby=qApp().desktop().height()/2) );
}
@@ -149,7 +149,7 @@ void save()
{
if ( p != null ) {
killTimers();
- String fn = QFileDialog.getSaveFileName();
+ String fn = TQFileDialog.getSaveFileName();
if ( !fn.equals("") )
p.save( fn, "BMP" );
if ( r != 0)
@@ -161,7 +161,7 @@ void multiSave()
{
if ( p != null ) {
multifn = ""; // stops saving
- multifn = QFileDialog.getSaveFileName();
+ multifn = TQFileDialog.getSaveFileName();
if ( multifn.equals("") )
multiSaveButton.setOn(false);
if ( r == 0)
@@ -189,40 +189,40 @@ void grab()
x = grabx-w/2; // find a suitable position to grab from
y = graby-h/2;
- if ( x + w > QApplication.desktop().width() )
- x = QApplication.desktop().width()-w;
+ if ( x + w > TQApplication.desktop().width() )
+ x = TQApplication.desktop().width()-w;
else if ( x < 0 )
x = 0;
- if ( y + h > QApplication.desktop().height() )
- y = QApplication.desktop().height()-h;
+ if ( y + h > TQApplication.desktop().height() )
+ y = TQApplication.desktop().height()-h;
else if ( y < 0 )
y = 0;
- p = QPixmap.grabWindow( QApplication.desktop().winId(), x, y, w, h );
+ p = TQPixmap.grabWindow( TQApplication.desktop().winId(), x, y, w, h );
image = p.convertToImage();
- QWMatrix m = new QWMatrix(); // after getting it, scale it
+ TQWMatrix m = new TQWMatrix(); // after getting it, scale it
m.scale( (double)z, (double)z );
- // A cast from Object to QPixmap is needed in java. The xForm methods
+ // A cast from Object to TQPixmap is needed in java. The xForm methods
// have several different return types in C++, and must all be of type
// 'Object' for java
- pm = (QPixmap) p.xForm( m );
+ pm = (TQPixmap) p.xForm( m );
if ( multiSaveButton == null || !multiSaveButton.isOn() )
repaint( false ); // and finally repaint, flicker-free
}
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
if ( pm != null ) {
- QPainter paint = new QPainter( this );
+ TQPainter paint = new TQPainter( this );
paint.drawPixmap( 0, zoom != null ? zoom.height()+4 : 0, pm,
0,0, width(), height()-yoffset );
}
}
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
if ( !grabbing ) { // prepare to grab...
grabbing = true;
@@ -238,7 +238,7 @@ protected void mousePressEvent( QMouseEvent e )
-protected void mouseReleaseEvent( QMouseEvent e )
+protected void mouseReleaseEvent( TQMouseEvent e )
{
if ( grabbing && grabx >= 0 && graby >= 0 ) {
grabbing = false;
@@ -247,7 +247,7 @@ protected void mouseReleaseEvent( QMouseEvent e )
}
}
-void grabAround(QPoint pos)
+void grabAround(TQPoint pos)
{
int rx, ry;
rx = mapToGlobal(pos).x();
@@ -258,8 +258,8 @@ void grabAround(QPoint pos)
int pz;
pz = 1;
while ( w*pz*h*pz < width()*(height()-yoffset) &&
- w*pz < QApplication.desktop().width() &&
- h*pz < QApplication.desktop().height() )
+ w*pz < TQApplication.desktop().width() &&
+ h*pz < TQApplication.desktop().height() )
pz++;
if ( (w*pz*h*pz - width()*(height()-yoffset)) >
(width()*(height()-yoffset) - w*(pz-1)*h*(pz-1)) )
@@ -282,7 +282,7 @@ void grabAround(QPoint pos)
}
-protected void mouseMoveEvent( QMouseEvent e )
+protected void mouseMoveEvent( TQMouseEvent e )
{
if ( grabbing || pm.isNull() ||
e.pos().y() > height() - (zoom != null ? zoom.fontMetrics().height() - 4 : 0) ||
@@ -307,18 +307,18 @@ protected void mouseMoveEvent( QMouseEvent e )
}
-protected void focusOutEvent( QFocusEvent e )
+protected void focusOutEvent( TQFocusEvent e )
{
rgb.setText( "" );
}
-protected void timerEvent( QTimerEvent e )
+protected void timerEvent( TQTimerEvent e )
{
grab();
/*
if ( multiSaveButton.isOn() && !multifn.equals("") ) {
- QRegExp num("[0-9][0-9]");
+ TQRegExp num("[0-9][0-9]");
int start;
int len;
if ((start=num.match(multifn,0,&len))>=0)
@@ -331,7 +331,7 @@ protected void timerEvent( QTimerEvent e )
}
-protected void resizeEvent( QResizeEvent e )
+protected void resizeEvent( TQResizeEvent e )
{
rgb.setGeometry( 0, height() - rgb.height(), width(), rgb.height() );
grab();
@@ -342,7 +342,7 @@ protected void resizeEvent( QResizeEvent e )
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
MagWidget m = new MagWidget();
a.setMainWidget( m );
m.show();
diff --git a/qtjava/javalib/examples/qwerty/ANSI_X3.110-1983.map b/qtjava/javalib/examples/qwerty/ANSI_X3.110-1983.map
index 1b7058ec..a9c00534 100644
--- a/qtjava/javalib/examples/qwerty/ANSI_X3.110-1983.map
+++ b/qtjava/javalib/examples/qwerty/ANSI_X3.110-1983.map
@@ -14,7 +14,7 @@ CHARMAP
/x02 START OF TEXT (STX)
/x03 END OF TEXT (ETX)
/x04 END OF TRANSMISSION (EOT)
- /x05 ENQUIRY (ENQ)
+ /x05 ENTQUIRY (ENQ)
/x06 ACKNOWLEDGE (ACK)
/x07 BELL (BEL)
/x08 BACKSPACE (BS)
@@ -43,7 +43,7 @@ CHARMAP
/x1F UNIT SEPARATOR (IS1)
/x20 SPACE
/x21 EXCLAMATION MARK
-<"> /x22 QUOTATION MARK
+<"> /x22 TQUOTATION MARK
<%> /x25 PERCENT SIGN
<&> /x26 AMPERSAND
<'> /x27 APOSTROPHE
@@ -68,9 +68,9 @@ CHARMAP
<:> /x3A COLON
<;> /x3B SEMICOLON
<<> /x3C LESS-THAN SIGN
-<=> /x3D EQUALS SIGN
+<=> /x3D ETQUALS SIGN
>> /x3E GREATER-THAN SIGN
-> /x3F QUESTION MARK
+> /x3F TQUESTION MARK
/x40 COMMERCIAL AT
/x41 LATIN CAPITAL LETTER A
/x42 LATIN CAPITAL LETTER B
@@ -98,9 +98,9 @@ CHARMAP
/x58 LATIN CAPITAL LETTER X
/x59 LATIN CAPITAL LETTER Y
/x5A LATIN CAPITAL LETTER Z
-<<(> /x5B LEFT SQUARE BRACKET
+<<(> /x5B LEFT STQUARE BRACKET
///> /x5C REVERSE SOLIDUS
-<)/>> /x5D RIGHT SQUARE BRACKET
+<)/>> /x5D RIGHT STQUARE BRACKET
<'/>> /x5E CIRCUMFLEX ACCENT
<_> /x5F LOW LINE
<'!> /x60 GRAVE ACCENT
@@ -162,7 +162,7 @@ CHARMAP
/x98 START OF STRING (SOS)
/x99 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
/x9A SINGLE CHARACTER INTRODUCER (SCI)
- /x9B CONTROL SEQUENCE INTRODUCER (CSI)
+ /x9B CONTROL SETQUENCE INTRODUCER (CSI)
/x9C STRING TERMINATOR (ST)
/x9D OPERATING SYSTEM COMMAND (OSC)
/x9E PRIVACY MESSAGE (PM)
@@ -175,9 +175,9 @@ CHARMAP
/xA6 NUMBER SIGN
/xA7 SECTION SIGN
/xA8 CURRENCY SIGN
-<'6> /xA9 LEFT SINGLE QUOTATION MARK
-<"6> /xAA LEFT DOUBLE QUOTATION MARK
-<<<> /xAB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+<'6> /xA9 LEFT SINGLE TQUOTATION MARK
+<"6> /xAA LEFT DOUBLE TQUOTATION MARK
+<<<> /xAB LEFT-POINTING DOUBLE ANGLE TQUOTATION MARK
<<-> /xAC LEFTWARDS ARROW
<-!> /xAD UPWARDS ARROW
<-/>> /xAE RIGHTWARDS ARROW
@@ -191,13 +191,13 @@ CHARMAP
/xB6 PILCROW SIGN
<.M> /xB7 MIDDLE DOT
<-:> /xB8 DIVISION SIGN
-<'9> /xB9 RIGHT SINGLE QUOTATION MARK
-<"9> /xBA RIGHT DOUBLE QUOTATION MARK
->/>> /xBB RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-<14> /xBC VULGAR FRACTION ONE QUARTER
+<'9> /xB9 RIGHT SINGLE TQUOTATION MARK
+<"9> /xBA RIGHT DOUBLE TQUOTATION MARK
+>/>> /xBB RIGHT-POINTING DOUBLE ANGLE TQUOTATION MARK
+<14> /xBC VULGAR FRACTION ONE TQUARTER
<12> /xBD VULGAR FRACTION ONE HALF
-<34> /xBE VULGAR FRACTION THREE QUARTERS
- /xBF INVERTED QUESTION MARK
+<34> /xBE VULGAR FRACTION THREE TQUARTERS
+ /xBF INVERTED TQUESTION MARK
<"!> /xC1 NON-SPACING GRAVE ACCENT (not a real character)
<"'> /xC2 NON-SPACING ACUTE ACCENT (not a real character)
<"/>> /xC3 NON-SPACING CIRCUMFLEX ACCENT (not a real character)
@@ -430,7 +430,7 @@ CHARMAP
/x02 START OF TEXT (STX)
/x03 END OF TEXT (ETX)
/x04 END OF TRANSMISSION (EOT)
- /x05 ENQUIRY (ENQ)
+ /x05 ENTQUIRY (ENQ)
/x06 ACKNOWLEDGE (ACK)
/x07 BELL (BEL)
/x07 BELL (BEL)
@@ -459,7 +459,7 @@ CHARMAP
/x7F DELETE (DEL)
/x20 SPACE
/x21 EXCLAMATION MARK
- /x22 QUOTATION MARK
+ /x22 TQUOTATION MARK
/xA6 NUMBER SIGN
/xA4 DOLLAR SIGN
/x25 PERCENT SIGN
@@ -489,14 +489,14 @@ CHARMAP
/x3A COLON
/x3B SEMICOLON
/x3C LESS-THAN SIGN
- /x3D EQUALS SIGN
+ /x3D ETQUALS SIGN
/x3E GREATER-THAN SIGN
- /x3F QUESTION MARK
+ /x3F TQUESTION MARK
/x40 COMMERCIAL AT
- /x5B LEFT SQUARE BRACKET
+ /x5B LEFT STQUARE BRACKET
/x5C REVERSE SOLIDUS
/x5C REVERSE SOLIDUS
- /x5D RIGHT SQUARE BRACKET
+ /x5D RIGHT STQUARE BRACKET
/x5E CIRCUMFLEX ACCENT
/x5E CIRCUMFLEX ACCENT
/x5F LOW LINE
diff --git a/qtjava/javalib/examples/qwerty/Editor.java b/qtjava/javalib/examples/qwerty/Editor.java
index ba11c685..3598c144 100644
--- a/qtjava/javalib/examples/qwerty/Editor.java
+++ b/qtjava/javalib/examples/qwerty/Editor.java
@@ -11,13 +11,13 @@
import org.kde.qt.*;
import java.util.ArrayList;
-class Editor extends QWidget
+class Editor extends TQWidget
{
-private QMenuBar m;
-private QMultiLineEdit e;
-private QPrinter printer = new QPrinter();
-private QPopupMenu save_as;
-private QPopupMenu open_as;
+private TQMenuBar m;
+private TQMultiLineEdit e;
+private TQPrinter printer = new TQPrinter();
+private TQPopupMenu save_as;
+private TQPopupMenu open_as;
private boolean changed;
@@ -38,42 +38,42 @@ Editor( )
this(null, null);
}
-Editor( QWidget parent , String name )
+Editor( TQWidget parent , String name )
{
super( parent, name, WDestructiveClose );
- m = new QMenuBar( this, "menu" );
+ m = new TQMenuBar( this, "menu" );
- QPopupMenu file = new QPopupMenu(this);
+ TQPopupMenu file = new TQPopupMenu(this);
m.insertItem( "&File", file );
- file.insertItem( "&New", this, SLOT("newDoc()"), new QKeySequence(ALT+Key_N) );
- file.insertItem( "&Open...", this, SLOT("load()"), new QKeySequence(ALT+Key_O) );
- file.insertItem( "&Save...", this, SLOT("save()"), new QKeySequence(ALT+Key_S) );
+ file.insertItem( "&New", this, SLOT("newDoc()"), new TQKeySequence(ALT+Key_N) );
+ file.insertItem( "&Open...", this, SLOT("load()"), new TQKeySequence(ALT+Key_O) );
+ file.insertItem( "&Save...", this, SLOT("save()"), new TQKeySequence(ALT+Key_S) );
file.insertSeparator();
- open_as = new QPopupMenu(file);
+ open_as = new TQPopupMenu(file);
file.insertItem( "Open &As", open_as );
- save_as = new QPopupMenu(file);
+ save_as = new TQPopupMenu(file);
file.insertItem( "Sa&ve As", save_as );
file.insertItem( "Add &Encoding", this, SLOT("addEncoding()") );
file.insertSeparator();
- file.insertItem( "&Print...", this, SLOT("print()"), new QKeySequence(ALT+Key_P) );
+ file.insertItem( "&Print...", this, SLOT("print()"), new TQKeySequence(ALT+Key_P) );
file.insertSeparator();
- file.insertItem( "&Close", this, SLOT("close()"),new QKeySequence(ALT+Key_W) );
- file.insertItem( "&Quit", qApp(), SLOT("closeAllWindows()"), new QKeySequence(ALT+Key_Q) );
+ file.insertItem( "&Close", this, SLOT("close()"),new TQKeySequence(ALT+Key_W) );
+ file.insertItem( "&Quit", qApp(), SLOT("closeAllWindows()"), new TQKeySequence(ALT+Key_Q) );
connect( save_as, SIGNAL("activated(int)"), this, SLOT("saveAsEncoding(int)") );
connect( open_as, SIGNAL("activated(int)"), this, SLOT("openAsEncoding(int)") );
rebuildCodecList();
- QPopupMenu edit = new QPopupMenu(m);
+ TQPopupMenu edit = new TQPopupMenu(m);
m.insertItem( "&Edit", edit );
- edit.insertItem( "To &Uppercase", this, SLOT("toUpper()"), new QKeySequence(ALT+Key_U) );
- edit.insertItem( "To &Lowercase", this, SLOT("toLower()"), new QKeySequence(ALT+Key_L) );
+ edit.insertItem( "To &Uppercase", this, SLOT("toUpper()"), new TQKeySequence(ALT+Key_U) );
+ edit.insertItem( "To &Lowercase", this, SLOT("toLower()"), new TQKeySequence(ALT+Key_L) );
edit.insertSeparator();
- edit.insertItem( "&Select Font" , this, SLOT("getFont()"), new QKeySequence(ALT+Key_F) );
+ edit.insertItem( "&Select Font" , this, SLOT("getFont()"), new TQKeySequence(ALT+Key_F) );
changed = false;
- e = new QMultiLineEdit( this, "editor" );
+ e = new TQMultiLineEdit( this, "editor" );
connect( e, SIGNAL(" textChanged()"), this, SLOT(" textChanged()") );
// We use Unifont - if you have it installed you'll see all
@@ -82,7 +82,7 @@ Editor( QWidget parent , String name )
// Unifont only comes in one pixel size, so we cannot let
// it change pixel size as the display DPI changes.
//
- QFont unifont = new QFont("unifont",16,50); unifont.setPixelSize(16);
+ TQFont unifont = new TQFont("unifont",16,50); unifont.setPixelSize(16);
e.setFont( unifont );
e.setFocus();
@@ -92,7 +92,7 @@ Editor( QWidget parent , String name )
public void getFont()
{
boolean[] ok = { true };
- QFont f = QFontDialog.getFont( ok, e.font() );
+ TQFont f = TQFontDialog.getFont( ok, e.font() );
if ( ok[0] ) {
e.setFont( f );
}
@@ -103,16 +103,16 @@ public void getFont()
void rebuildCodecList()
{
codecList = new ArrayList();
- QTextCodec codec = null;
+ TQTextCodec codec = null;
int i;
- for (i = 0; (codec = QTextCodec.codecForIndex(i)) != null; i++)
+ for (i = 0; (codec = TQTextCodec.codecForIndex(i)) != null; i++)
codecList.add( codec );
int n = codecList.size();
for (int pm=0; pm<2; pm++) {
- QPopupMenu menu = pm != 0 ? open_as : save_as;
+ TQPopupMenu menu = pm != 0 ? open_as : save_as;
menu.clear();
String local = "Local (";
- local += QTextCodec.codecForLocale().name();
+ local += TQTextCodec.codecForLocale().name();
local += ")";
menu.insertItem( local, Local );
menu.insertItem( "Unicode", Uni );
@@ -121,7 +121,7 @@ void rebuildCodecList()
if ( pm != 0 )
menu.insertItem( "[guess]", Guess );
for ( i = 0; i < n; i++ )
- menu.insertItem( ((QTextCodec) codecList.get(i)).name(), Codec + i );
+ menu.insertItem( ((TQTextCodec) codecList.get(i)).name(), Codec + i );
}
}
@@ -140,7 +140,7 @@ void newDoc()
void load()
{
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( fn != null )
load( fn, -1 );
}
@@ -152,30 +152,30 @@ void load( String fileName )
void load( String fileName, int code )
{
- QFile f = new QFile( fileName );
- if ( !f.open( QIODevice.IO_ReadOnly ) )
+ TQFile f = new TQFile( fileName );
+ if ( !f.open( TQIODevice.IO_ReadOnly ) )
return;
e.setAutoUpdate( false );
- QTextStream t = new QTextStream(f);
+ TQTextStream t = new TQTextStream(f);
if ( code >= Codec )
- t.setCodec( (QTextCodec) codecList.get(code-Codec) );
+ t.setCodec( (TQTextCodec) codecList.get(code-Codec) );
else if ( code == Uni )
- t.setEncoding( QTextStream.Unicode );
+ t.setEncoding( TQTextStream.Unicode );
else if ( code == MBug )
- t.setEncoding( QTextStream.UnicodeReverse );
+ t.setEncoding( TQTextStream.UnicodeReverse );
else if ( code == Lat1 )
- t.setEncoding( QTextStream.Latin1 );
+ t.setEncoding( TQTextStream.Latin1 );
else if ( code == Guess ) {
- f = new QFile(fileName);
- f.open(QIODevice.IO_ReadOnly);
+ f = new TQFile(fileName);
+ f.open(TQIODevice.IO_ReadOnly);
StringBuffer buffer = new StringBuffer();
int l = 256;
l=(int)f.readBlock(buffer,l);
- QTextCodec codec = QTextCodec.codecForContent(buffer.toString(), l);
+ TQTextCodec codec = TQTextCodec.codecForContent(buffer.toString(), l);
if ( codec != null ) {
- QMessageBox.information(this,"Encoding","Codec: "+codec.name());
+ TQMessageBox.information(this,"Encoding","Codec: "+codec.name());
t.setCodec( codec );
}
}
@@ -192,7 +192,7 @@ void load( String fileName, int code )
void openAsEncoding( int code )
{
//storing filename (proper save) is left as an exercise...
- String fn = QFileDialog.getOpenFileName( "", "", this );
+ String fn = TQFileDialog.getOpenFileName( "", "", this );
if ( !fn.equals("") )
load( fn, code );
}
@@ -200,7 +200,7 @@ void openAsEncoding( int code )
boolean save()
{
//storing filename (proper save) is left as an exercise...
- String fn = QFileDialog.getSaveFileName( "", "", this );
+ String fn = TQFileDialog.getSaveFileName( "", "", this );
if ( !fn.equals("") )
return saveAs( fn );
return false;
@@ -209,21 +209,21 @@ boolean save()
void saveAsEncoding( int code )
{
//storing filename (proper save) is left as an exercise...
- String fn = QFileDialog.getSaveFileName( "", "", this );
+ String fn = TQFileDialog.getSaveFileName( "", "", this );
if ( !fn.equals("") )
saveAs( fn, code );
}
void addEncoding()
{
- String fn = QFileDialog.getOpenFileName( "", "*.map", this );
+ String fn = TQFileDialog.getOpenFileName( "", "*.map", this );
if ( !fn.equals("") ) {
- QFile f = new QFile(fn);
- if (f.open(QIODevice.IO_ReadOnly)) {
- if (QTextCodec.loadCharmap(f) != null) {
+ TQFile f = new TQFile(fn);
+ if (f.open(TQIODevice.IO_ReadOnly)) {
+ if (TQTextCodec.loadCharmap(f) != null) {
rebuildCodecList();
} else {
- QMessageBox.warning(null,"Charmap error",
+ TQMessageBox.warning(null,"Charmap error",
"The file did not contain a valid charmap.\n\n"
+ "A charmap file should look like this:\n"
+ " thename\n"
@@ -248,22 +248,22 @@ boolean saveAs( String fileName )
boolean saveAs( String fileName, int code )
{
- QFile f = new QFile( fileName );
- if ( no_writing || !f.open( QIODevice.IO_WriteOnly ) ) {
- QMessageBox.warning(this,"I/O Error",
+ TQFile f = new TQFile( fileName );
+ if ( no_writing || !f.open( TQIODevice.IO_WriteOnly ) ) {
+ TQMessageBox.warning(this,"I/O Error",
"The file could not be opened.\n\n"
+fileName);
return false;
}
- QTextStream t = new QTextStream(f);
+ TQTextStream t = new TQTextStream(f);
if ( code >= Codec )
- t.setCodec( (QTextCodec) codecList.get(code-Codec) );
+ t.setCodec( (TQTextCodec) codecList.get(code-Codec) );
else if ( code == Uni )
- t.setEncoding( QTextStream.Unicode );
+ t.setEncoding( TQTextStream.Unicode );
else if ( code == MBug )
- t.setEncoding( QTextStream.UnicodeReverse );
+ t.setEncoding( TQTextStream.UnicodeReverse );
else if ( code == Lat1 )
- t.setEncoding( QTextStream.Latin1 );
+ t.setEncoding( TQTextStream.Latin1 );
t.writeRawBytes(e.text(), e.text().length());
f.close();
setCaption( fileName );
@@ -275,11 +275,11 @@ void print()
{
if ( printer.setup(this) ) { // opens printer dialog
printer.setFullPage(true); // we'll set our own margins
- QPainter p = new QPainter();
+ TQPainter p = new TQPainter();
p.begin( printer ); // paint on printer
p.setFont( e.font() );
- QFontMetrics fm = p.fontMetrics();
- QPaintDeviceMetrics metrics = new QPaintDeviceMetrics( printer ); // need width/height
+ TQFontMetrics fm = p.fontMetrics();
+ TQPaintDeviceMetrics metrics = new TQPaintDeviceMetrics( printer ); // need width/height
// of printer surface
int MARGIN = metrics.logicalDpiX() / 2; // half-inch margin
int yPos = MARGIN; // y position for each line
@@ -301,18 +301,18 @@ void print()
}
}
-protected void resizeEvent( QResizeEvent event )
+protected void resizeEvent( TQResizeEvent event )
{
if ( e != null && m != null )
e.setGeometry( 0, m.height(), width(), height() - m.height() );
}
-protected void closeEvent( QCloseEvent event )
+protected void closeEvent( TQCloseEvent event )
{
event.accept();
if ( changed ) { // the text has been changed
- switch ( QMessageBox.warning( this, "Qwerty",
+ switch ( TQMessageBox.warning( this, "Qwerty",
"Save changes to Document?",
tr("&Yes"),
tr("&No"),
diff --git a/qtjava/javalib/examples/qwerty/IBM277.map b/qtjava/javalib/examples/qwerty/IBM277.map
index 51a2472d..e9d40b05 100644
--- a/qtjava/javalib/examples/qwerty/IBM277.map
+++ b/qtjava/javalib/examples/qwerty/IBM277.map
@@ -53,7 +53,7 @@ CHARMAP
/x2A LINE TABULATION SET (VTS)
/x2B PARTIAL LINE FORWARD (PLD)
/x2C PARTIAL LINE BACKWARD (PLU)
- /x2D ENQUIRY (ENQ)
+ /x2D ENTQUIRY (ENQ)
/x2E ACKNOWLEDGE (ACK)
/x2F BELL (BEL)
/x30 DEVICE CONTROL STRING (DCS)
@@ -67,7 +67,7 @@ CHARMAP
/x38 START OF STRING (SOS)
/x39 SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
/x3A SINGLE CHARACTER INTRODUCER (SCI)
- /x3B CONTROL SEQUENCE INTRODUCER (CSI)
+ /x3B CONTROL SETQUENCE INTRODUCER (CSI)
/x3C DEVICE CONTROL FOUR (DC4)
/x3D NEGATIVE ACKNOWLEDGE (NAK)
/x3E PRIVACY MESSAGE (PM)
@@ -119,7 +119,7 @@ CHARMAP
<%> /x6C PERCENT SIGN
<_> /x6D LOW LINE
>> /x6E GREATER-THAN SIGN
-> /x6F QUESTION MARK
+> /x6F TQUESTION MARK
/x70 BROKEN BAR
/x71 LATIN CAPITAL LETTER E WITH ACUTE
> /x72 LATIN CAPITAL LETTER E WITH CIRCUMFLEX
@@ -134,8 +134,8 @@ CHARMAP
/x7B LATIN CAPITAL LETTER AE
/x7C LATIN CAPITAL LETTER O WITH STROKE
<'> /x7D APOSTROPHE
-<=> /x7E EQUALS SIGN
-<"> /x7F QUOTATION MARK
+<=> /x7E ETQUALS SIGN
+<"> /x7F TQUOTATION MARK
/x80 COMMERCIAL AT
/x81 LATIN SMALL LETTER A
/x82 LATIN SMALL LETTER B
@@ -146,8 +146,8 @@ CHARMAP
/x87 LATIN SMALL LETTER G
/x88 LATIN SMALL LETTER H
/x89 LATIN SMALL LETTER I
-<<<> /x8A LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
->/>> /x8B RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+<<<> /x8A LEFT-POINTING DOUBLE ANGLE TQUOTATION MARK
+>/>> /x8B RIGHT-POINTING DOUBLE ANGLE TQUOTATION MARK
/x8C LATIN SMALL LETTER ETH (Icelandic)
/x8D LATIN SMALL LETTER Y WITH ACUTE
/x8E LATIN SMALL LETTER THORN (Icelandic)
@@ -166,8 +166,8 @@ CHARMAP
<-o> /x9B MASCULINE ORDINAL INDICATOR
<(!> /x9C LEFT CURLY BRACKET
<',> /x9D CEDILLA
-<<(> /x9E |