summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-05 15:55:57 -0600
committerTimothy Pearson <[email protected]>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtjava/javalib/examples
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'qtjava/javalib/examples')
-rw-r--r--qtjava/javalib/examples/aclock/AnalogClock.java30
-rw-r--r--qtjava/javalib/examples/addressbook/ABCentralWidget.java98
-rw-r--r--qtjava/javalib/examples/addressbook/ABMainWindow.java24
-rw-r--r--qtjava/javalib/examples/addressbook/Main.java2
-rw-r--r--qtjava/javalib/examples/application/ApplicationWindow.java68
-rw-r--r--qtjava/javalib/examples/application/Main.java4
-rw-r--r--qtjava/javalib/examples/biff/Biff.java22
-rw-r--r--qtjava/javalib/examples/biff/Main.java2
-rw-r--r--qtjava/javalib/examples/buttongroups/ButtonsGroups.java48
-rw-r--r--qtjava/javalib/examples/buttongroups/Main.java2
-rw-r--r--qtjava/javalib/examples/checklists/CheckLists.java62
-rw-r--r--qtjava/javalib/examples/checklists/Main.java2
-rw-r--r--qtjava/javalib/examples/cursor/CursorView.java24
-rw-r--r--qtjava/javalib/examples/dclock/DigitalClock.java14
-rw-r--r--qtjava/javalib/examples/dclock/Main.java2
-rw-r--r--qtjava/javalib/examples/demo/sql/BookForm.java84
-rw-r--r--qtjava/javalib/examples/demo/sql/ConnectDialog.java64
-rw-r--r--qtjava/javalib/examples/demo/sql/EditBookForm.java136
-rw-r--r--qtjava/javalib/examples/demo/sql/Main.java2
-rw-r--r--qtjava/javalib/examples/demo/widgets/Main.java2
-rw-r--r--qtjava/javalib/examples/demo/widgets/WidgetsBase.java416
-rw-r--r--qtjava/javalib/examples/dragdrop/DropSite.java60
-rw-r--r--qtjava/javalib/examples/dragdrop/Main.java28
-rw-r--r--qtjava/javalib/examples/dragdrop/SecretDrag.java10
-rw-r--r--qtjava/javalib/examples/dragdrop/SecretSource.java10
-rw-r--r--qtjava/javalib/examples/dragdrop/trolltech.bmpbin30054 -> 30055 bytes
-rw-r--r--qtjava/javalib/examples/dragdrop/trolltech.gifbin42629 -> 42635 bytes
-rw-r--r--qtjava/javalib/examples/drawlines/ConnectWidget.java30
-rw-r--r--qtjava/javalib/examples/forever/Forever.java24
-rw-r--r--qtjava/javalib/examples/hello/Hello.java18
-rw-r--r--qtjava/javalib/examples/hello/Main.java6
-rw-r--r--qtjava/javalib/examples/helpviewer/HelpWindow.java114
-rw-r--r--qtjava/javalib/examples/helpviewer/Main.java12
-rw-r--r--qtjava/javalib/examples/iconview/ListenDND.java22
-rw-r--r--qtjava/javalib/examples/layout/ExampleWidget.java48
-rw-r--r--qtjava/javalib/examples/lineedits/LineEdits.java58
-rw-r--r--qtjava/javalib/examples/lineedits/Main.java2
-rw-r--r--qtjava/javalib/examples/listbox/ListBoxDemo.java62
-rw-r--r--qtjava/javalib/examples/listbox/Main.java2
-rw-r--r--qtjava/javalib/examples/mdi/ApplicationWindow.java90
-rw-r--r--qtjava/javalib/examples/mdi/MDIWindow.java38
-rw-r--r--qtjava/javalib/examples/mdi/Main.java2
-rw-r--r--qtjava/javalib/examples/menu/MenuExample.java70
-rw-r--r--qtjava/javalib/examples/menu/README2
-rw-r--r--qtjava/javalib/examples/picture/PictureDisplay.java36
-rw-r--r--qtjava/javalib/examples/picture/car_orig.picbin1872 -> 1874 bytes
-rw-r--r--qtjava/javalib/examples/popup/Frame.java48
-rw-r--r--qtjava/javalib/examples/progressbar/Main.java2
-rw-r--r--qtjava/javalib/examples/progressbar/ProgressBar.java34
-rw-r--r--qtjava/javalib/examples/qfd/FontDisplayer.java66
-rw-r--r--qtjava/javalib/examples/qfd/Main.java8
-rw-r--r--qtjava/javalib/examples/qmag/MagWidget.java82
-rw-r--r--qtjava/javalib/examples/qwerty/ANSI_X3.110-1983.map44
-rw-r--r--qtjava/javalib/examples/qwerty/Editor.java126
-rw-r--r--qtjava/javalib/examples/qwerty/IBM277.map36
-rw-r--r--qtjava/javalib/examples/qwerty/IBM277.txt2
-rw-r--r--qtjava/javalib/examples/qwerty/Main.java4
-rw-r--r--qtjava/javalib/examples/rangecontrols/Main.java2
-rw-r--r--qtjava/javalib/examples/rangecontrols/RangeControls.java48
-rw-r--r--qtjava/javalib/examples/richtext/Main.java2
-rw-r--r--qtjava/javalib/examples/richtext/MyRichText.java24
-rw-r--r--qtjava/javalib/examples/richtext/marble.pngbin26015 -> 26018 bytes
-rw-r--r--qtjava/javalib/examples/rot13/Rot13.java14
-rw-r--r--qtjava/javalib/examples/scribble/Main.java6
-rw-r--r--qtjava/javalib/examples/scribble/Scribble.java72
-rw-r--r--qtjava/javalib/examples/showimg/ImageIconProvider.java12
-rw-r--r--qtjava/javalib/examples/showimg/ImageTextEditor.java56
-rw-r--r--qtjava/javalib/examples/showimg/ImageViewer.java144
-rw-r--r--qtjava/javalib/examples/showimg/Main.java14
-rw-r--r--qtjava/javalib/examples/showimg/README2
-rw-r--r--qtjava/javalib/examples/sound/SoundPlayer.java36
-rw-r--r--qtjava/javalib/examples/splitter/Test.java20
-rw-r--r--qtjava/javalib/examples/tabdialog/Main.java2
-rw-r--r--qtjava/javalib/examples/tabdialog/TabDialog.java70
-rw-r--r--qtjava/javalib/examples/table/small-table-demo/Main.java16
-rw-r--r--qtjava/javalib/examples/textedit/Main.java2
-rw-r--r--qtjava/javalib/examples/textedit/TextEdit.java178
-rw-r--r--qtjava/javalib/examples/textedit/example.html208
-rw-r--r--qtjava/javalib/examples/tux/MoveMe.java24
-rw-r--r--qtjava/javalib/examples/widgets/MyWidgetView.java8
-rw-r--r--qtjava/javalib/examples/widgets/README2
-rw-r--r--qtjava/javalib/examples/widgets/WidgetView.java372
-rw-r--r--qtjava/javalib/examples/widgets/trolltech.bmpbin13366 -> 13368 bytes
-rw-r--r--qtjava/javalib/examples/widgets/trolltech.gifbin42629 -> 42635 bytes
-rw-r--r--qtjava/javalib/examples/widgets/tt-logo.pngbin4547 -> 4548 bytes
-rw-r--r--qtjava/javalib/examples/wizard/Main.java2
-rw-r--r--qtjava/javalib/examples/wizard/Wizard.java116
87 files changed, 1878 insertions, 1878 deletions
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 = "<img source=\"fileopen\"> "+
@@ -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( "<p><h1><b><font size=\"5\" >Richtext </h1>\n"
+ "</p><p>Qt supports formatted rich text, such as the heading above, <i><font >emphasized</font></i>, <b><font >bold </font></b>and <u><font >underlined </font></u>text, as well as colored text. This is <font color=\"#ff0000\" >red</font>, while this is <font color=\"#00bb00\" >green</font>, and this is <font color=\"#0000ff\" >blue</font>. </p>\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
--- a/qtjava/javalib/examples/dragdrop/trolltech.bmp
+++ b/qtjava/javalib/examples/dragdrop/trolltech.bmp
Binary files differ
diff --git a/qtjava/javalib/examples/dragdrop/trolltech.gif b/qtjava/javalib/examples/dragdrop/trolltech.gif
index f674369e..02c13b14 100644
--- a/qtjava/javalib/examples/dragdrop/trolltech.gif
+++ b/qtjava/javalib/examples/dragdrop/trolltech.gif
Binary files 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; i<MAXCOLORS; i++ ) // init color array
- colors[i] = new QColor( generator.nextInt(255), generator.nextInt(255), generator.nextInt(255) );
+ colors[i] = new TQColor( generator.nextInt(255), generator.nextInt(255), generator.nextInt(255) );
}
@@ -49,9 +49,9 @@ public ConnectWidget( QWidget parent, String name )
// Handles paint events for the connect widget.
//
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
- QPainter paint = new QPainter( this );
+ TQPainter paint = new TQPainter( this );
for ( int i=0; i<count-1; i++ ) { // connect all points
for ( int j=i+1; j<count; j++ ) {
paint.setPen( colors[generator.nextInt(MAXCOLORS)] ); // set random pen color
@@ -66,7 +66,7 @@ protected void paintEvent( QPaintEvent e )
// Handles mouse press events for the connect widget.
//
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
down = true;
count = 0; // start recording points
@@ -78,7 +78,7 @@ protected void mousePressEvent( QMouseEvent e )
// Handles mouse release events for the connect widget.
//
-protected void mouseReleaseEvent( QMouseEvent e )
+protected void mouseReleaseEvent( TQMouseEvent e )
{
down = false; // done recording points
update(); // draw the lines
@@ -89,11 +89,11 @@ protected void mouseReleaseEvent( QMouseEvent e )
// Handles mouse move events for the connect widget.
//
-protected void mouseMoveEvent( QMouseEvent e )
+protected void mouseMoveEvent( TQMouseEvent e )
{
if ( down && count < MAXPOINTS ) {
- QPainter paint = new QPainter( this );
- points[count++] = new QPoint(e.pos()); // add point
+ TQPainter paint = new TQPainter( this );
+ points[count++] = new TQPoint(e.pos()); // add point
paint.drawPoint( e.pos() ); // plot point
paint.end();
}
@@ -106,7 +106,7 @@ protected void mouseMoveEvent( QMouseEvent e )
public static void main( String[] args )
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
ConnectWidget connect = new ConnectWidget();
connect.setCaption( "Qt Example - Draw lines");
a.setMainWidget( connect );
diff --git a/qtjava/javalib/examples/forever/Forever.java b/qtjava/javalib/examples/forever/Forever.java
index 24cebcd3..8478898f 100644
--- a/qtjava/javalib/examples/forever/Forever.java
+++ b/qtjava/javalib/examples/forever/Forever.java
@@ -16,12 +16,12 @@ import java.util.Random;
-class Forever extends QWidget
+class Forever extends TQWidget
{
static final int numColors = 120;
private int rectangles;
-private QColor[] colors = new QColor[numColors];
+private TQColor[] colors = new TQColor[numColors];
private Random generator = new Random(System.currentTimeMillis());
@@ -38,17 +38,17 @@ Forever( )
this(null, null);
}
-Forever( QWidget parent, String name )
+Forever( TQWidget parent, String name )
{
super( parent, name );
for (int a=0; a<numColors; a++) {
- colors[a] = new QColor( generator.nextInt(255),
+ colors[a] = new TQColor( generator.nextInt(255),
generator.nextInt(255),
generator.nextInt(255) );
}
rectangles = 0;
startTimer( 0 ); // run continuous timer
- QTimer counter = new QTimer( this );
+ TQTimer counter = new TQTimer( this );
connect( counter, SIGNAL("timeout()"),
this, SLOT("updateCaption()") );
counter.start( 1000 );
@@ -67,9 +67,9 @@ void updateCaption()
// Handles paint events for the Forever widget.
//
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
- QPainter paint = new QPainter( this ); // painter object
+ TQPainter paint = new TQPainter( this ); // painter object
int w = width();
int h = height();
if(w <= 0 || h <= 0)
@@ -77,10 +77,10 @@ protected void paintEvent( QPaintEvent e )
paint.setPen( NoPen ); // do not draw outline
paint.setBrush( colors[generator.nextInt(numColors)]);// set random brush color
-// QPoint p1 = new QPoint( generator.nextInt(w), generator.nextInt(h)); // p1 = top left
-// QPoint p2 = new QPoint( generator.nextInt(w), generator.nextInt(h)); // p2 = bottom right
+// TQPoint p1 = new TQPoint( generator.nextInt(w), generator.nextInt(h)); // p1 = top left
+// TQPoint p2 = new TQPoint( generator.nextInt(w), generator.nextInt(h)); // p2 = bottom right
-// QRect r = new QRect( p1, p2 );
+// TQRect r = new TQRect( p1, p2 );
// paint.drawRect( r ); // draw filled rectangle
paint.drawRect( generator.nextInt(w), generator.nextInt(h),
generator.nextInt(w), generator.nextInt(h) ); // draw filled rectangle
@@ -90,7 +90,7 @@ protected void paintEvent( QPaintEvent e )
// Handles timer events for the Forever widget.
//
-protected void timerEvent( QTimerEvent e )
+protected void timerEvent( TQTimerEvent e )
{
for ( int i=0; i<100; i++ ) {
repaint( false ); // repaint, don't erase
@@ -105,7 +105,7 @@ protected void timerEvent( QTimerEvent e )
public static void main( String[] args )
{
- QApplication a = new QApplication( args ); // create application object
+ TQApplication a = new TQApplication( args ); // create application object
Forever always = new Forever(); // create widget
a.setMainWidget( always ); // set as main widget
always.setCaption("Qt Example - Forever");
diff --git a/qtjava/javalib/examples/hello/Hello.java b/qtjava/javalib/examples/hello/Hello.java
index c5e85041..742c49c0 100644
--- a/qtjava/javalib/examples/hello/Hello.java
+++ b/qtjava/javalib/examples/hello/Hello.java
@@ -9,7 +9,7 @@
****************************************************************************/
import org.kde.qt.*;
-class Hello extends QWidget
+class Hello extends TQWidget
{
private String t;
private int b = 0;
@@ -23,11 +23,11 @@ Hello( String text )
this(text, null, null);
}
-Hello( String text, QWidget parent, String name )
+Hello( String text, TQWidget parent, String name )
{
super(parent,name);
t = text;
- QTimer timer = new QTimer(this);
+ TQTimer timer = new TQTimer(this);
connect( timer, SIGNAL("timeout()"), SLOT("animate()") );
timer.start( 40 );
@@ -53,7 +53,7 @@ void animate()
the widget.
*/
-protected void mouseReleaseEvent( QMouseEvent e )
+protected void mouseReleaseEvent( TQMouseEvent e )
{
if ( rect().contains( e.pos() ) )
emit("clicked");
@@ -69,24 +69,24 @@ protected void mouseReleaseEvent( QMouseEvent e )
Flicker-free update. The text is first drawn in the pixmap and the
pixmap is then blt'ed to the screen.
*/
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
if ( t.equals("") )
return;
// 1: Compute some sizes, positions etc.
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
int w = fm.width(t) + 20;
int h = fm.height() * 2;
int pmx = width()/2 - w/2;
int pmy = height()/2 - h/2;
// 2: Create the pixmap and fill it with the widget's background
- QPixmap pm = new QPixmap( w, h );
+ TQPixmap pm = new TQPixmap( w, h );
pm.fill( this, pmx, pmy );
// 3: Paint the pixmap. Cool wave effect
- QPainter p = new QPainter();
+ TQPainter p = new TQPainter();
int x = 10;
int y = h/2 + fm.descent();
int i = 0;
@@ -94,7 +94,7 @@ protected void paintEvent( QPaintEvent e )
p.setFont( font() );
while ( i < t.length() ) {
int i16 = (b+i) & 15;
- p.setPen( new QColor((15-i16)*16,255,255,QColor.Hsv) );
+ p.setPen( new TQColor((15-i16)*16,255,255,TQColor.Hsv) );
p.drawText( x, y-sin_tbl[i16]*h/800, t.substring(i,i+1), 1 );
x += fm.width( t.substring(i,i+1) );
i++;
diff --git a/qtjava/javalib/examples/hello/Main.java b/qtjava/javalib/examples/hello/Main.java
index 1313b2cf..745b97f9 100644
--- a/qtjava/javalib/examples/hello/Main.java
+++ b/qtjava/javalib/examples/hello/Main.java
@@ -18,7 +18,7 @@ public class Main {
public static void main( String[] args )
{
- QApplication a = new QApplication(args);
+ TQApplication a = new TQApplication(args);
String s = "";
for ( int i=1; i<args.length; i++ ) {
s += args[i];
@@ -29,8 +29,8 @@ public static void main( String[] args )
s = "Hello, World";
Hello h = new Hello( s );
h.setCaption( "Qt says hello" );
- QObject.connect( h, Qt.SIGNAL("clicked()"), a, Qt.SLOT("quit()") );
- h.setFont( new QFont("times",32,QFont.Bold) ); // default font
+ TQObject.connect( h, Qt.SIGNAL("clicked()"), a, Qt.SLOT("quit()") );
+ h.setFont( new TQFont("times",32,TQFont.Bold) ); // default font
h.setBackgroundColor( Qt.white() ); // default bg color
a.setMainWidget( h );
h.show();
diff --git a/qtjava/javalib/examples/helpviewer/HelpWindow.java b/qtjava/javalib/examples/helpviewer/HelpWindow.java
index abec33e1..1da9c337 100644
--- a/qtjava/javalib/examples/helpviewer/HelpWindow.java
+++ b/qtjava/javalib/examples/helpviewer/HelpWindow.java
@@ -11,17 +11,17 @@ import org.kde.qt.*;
import java.util.*;
-class HelpWindow extends QMainWindow
+class HelpWindow extends TQMainWindow
{
-private QTextBrowser browser;
-private QComboBox pathCombo;
+private TQTextBrowser browser;
+private TQComboBox pathCombo;
private int backwardId, forwardId;
private String selectedURL;
private ArrayList history = new ArrayList();
private ArrayList bookmarks = new ArrayList();
private HashMap mHistory = new HashMap();
private HashMap mBookmarks = new HashMap();
-private QPopupMenu hist, bookm;
+private TQPopupMenu hist, bookm;
@@ -32,16 +32,16 @@ HelpWindow( String home_, String _path )
}
HelpWindow( String home_, String _path,
- QWidget parent, String name )
+ TQWidget parent, String name )
{
super( parent, name, WDestructiveClose );
readHistory();
readBookmarks();
- browser = new QTextBrowser( this );
+ browser = new TQTextBrowser( this );
browser.mimeSourceFactory().setFilePath( new String[] { _path } );
- browser.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ browser.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
connect( browser, SIGNAL(" textChanged()"),
this, SLOT(" textChanged()") );
@@ -55,33 +55,33 @@ HelpWindow( String home_, String _path,
resize( 640,700 );
- QPopupMenu file = new QPopupMenu( this );
- file.insertItem( tr("&New Window"), this, SLOT(" newWindow()"), new QKeySequence(CTRL+Key_N) );
- file.insertItem( tr("&Open File"), this, SLOT(" openFile()"), new QKeySequence(CTRL+Key_O) );
- file.insertItem( tr("&Print"), this, SLOT(" print()"), new QKeySequence(CTRL+Key_P) );
+ TQPopupMenu file = new TQPopupMenu( this );
+ file.insertItem( tr("&New Window"), this, SLOT(" newWindow()"), new TQKeySequence(CTRL+Key_N) );
+ file.insertItem( tr("&Open File"), this, SLOT(" openFile()"), new TQKeySequence(CTRL+Key_O) );
+ file.insertItem( tr("&Print"), this, SLOT(" print()"), new TQKeySequence(CTRL+Key_P) );
file.insertSeparator();
- file.insertItem( tr("&Close"), this, SLOT(" close()"), new QKeySequence(CTRL+Key_Q) );
- file.insertItem( tr("E&xit"), qApp(), SLOT(" closeAllWindows()"), new QKeySequence(CTRL+Key_X) );
+ file.insertItem( tr("&Close"), this, SLOT(" close()"), new TQKeySequence(CTRL+Key_Q) );
+ file.insertItem( tr("E&xit"), qApp(), SLOT(" closeAllWindows()"), new TQKeySequence(CTRL+Key_X) );
// The same three icons are used twice each.
- QIconSet icon_back = new QIconSet( new QPixmap("back.xpm") );
- QIconSet icon_forward = new QIconSet( new QPixmap("forward.xpm") );
- QIconSet icon_home = new QIconSet( new QPixmap("home.xpm") );
+ TQIconSet icon_back = new TQIconSet( new TQPixmap("back.xpm") );
+ TQIconSet icon_forward = new TQIconSet( new TQPixmap("forward.xpm") );
+ TQIconSet icon_home = new TQIconSet( new TQPixmap("home.xpm") );
- QPopupMenu go = new QPopupMenu( this );
+ TQPopupMenu go = new TQPopupMenu( this );
backwardId = go.insertItem( icon_back,
tr("&Backward"), browser, SLOT(" backward()"),
- new QKeySequence(CTRL+Key_Left) );
+ new TQKeySequence(CTRL+Key_Left) );
forwardId = go.insertItem( icon_forward,
tr("&Forward"), browser, SLOT(" forward()"),
- new QKeySequence(CTRL+Key_Right) );
+ new TQKeySequence(CTRL+Key_Right) );
go.insertItem( icon_home, tr("&Home"), browser, SLOT(" home()") );
- QPopupMenu help = new QPopupMenu( this );
+ TQPopupMenu help = new TQPopupMenu( this );
help.insertItem( tr("&About ..."), this, SLOT(" about()") );
help.insertItem( tr("About &Qt ..."), this, SLOT(" aboutQt()") );
- hist = new QPopupMenu( this );
+ hist = new TQPopupMenu( this );
Iterator it = history.iterator();
while (it.hasNext()) {
String item = (String) it.next();
@@ -90,7 +90,7 @@ HelpWindow( String home_, String _path,
connect( hist, SIGNAL(" activated( int )"),
this, SLOT(" histChosen( int )") );
- bookm = new QPopupMenu( this );
+ bookm = new TQPopupMenu( this );
bookm.insertItem( tr( "Add Bookmark" ), this, SLOT(" addBookmark()") );
bookm.insertSeparator();
@@ -117,21 +117,21 @@ HelpWindow( String home_, String _path,
this, SLOT(" setForwardAvailable( boolean )") );
- QToolBar toolbar = new QToolBar( this );
+ TQToolBar toolbar = new TQToolBar( this );
addToolBar( toolbar, "Toolbar");
- QToolButton button;
+ TQToolButton button;
- button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT("backward()"), toolbar );
+ button = new TQToolButton( icon_back, tr("Backward"), "", browser, SLOT("backward()"), toolbar );
connect( browser, SIGNAL(" backwardAvailable(boolean)"), button, SLOT(" setEnabled(boolean)") );
button.setEnabled( false );
- button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT("forward()"), toolbar );
+ button = new TQToolButton( icon_forward, tr("Forward"), "", browser, SLOT("forward()"), toolbar );
connect( browser, SIGNAL(" forwardAvailable(boolean)"), button, SLOT(" setEnabled(boolean)") );
button.setEnabled( false );
- button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT("home()"), toolbar );
+ button = new TQToolButton( icon_home, tr("Home"), "", browser, SLOT("home()"), toolbar );
toolbar.addSeparator();
- pathCombo = new QComboBox( true, toolbar );
+ pathCombo = new TQComboBox( true, toolbar );
connect( pathCombo, SIGNAL(" activated( String )"),
this, SLOT(" pathSelected( String )") );
toolbar.setStretchableWidget( pathCombo );
@@ -193,9 +193,9 @@ public void cleanUp()
while (it.hasNext())
history.add(it.next());
- QFile f = new QFile( QDir.currentDirPath() + "/.history" );
- f.open( QIODevice.IO_WriteOnly );
- QTextStream t = new QTextStream( f );
+ TQFile f = new TQFile( TQDir.currentDirPath() + "/.history" );
+ f.open( TQIODevice.IO_WriteOnly );
+ TQTextStream t = new TQTextStream( f );
Iterator it1 = history.iterator();
while (it1.hasNext()) {
String item = (String) it1.next();
@@ -209,9 +209,9 @@ public void cleanUp()
while (it3.hasNext())
bookmarks.add(it3.next());
- QFile f2 = new QFile( QDir.currentDirPath() + "/.bookmarks" );
- f2.open( QIODevice.IO_WriteOnly );
- QTextStream t2 = new QTextStream( f2 );
+ TQFile f2 = new TQFile( TQDir.currentDirPath() + "/.bookmarks" );
+ f2.open( TQIODevice.IO_WriteOnly );
+ TQTextStream t2 = new TQTextStream( f2 );
Iterator it2 = bookmarks.iterator();
while (it2.hasNext()) {
String item = (String) it2.next();
@@ -224,7 +224,7 @@ public void cleanUp()
void about()
{
- QMessageBox.about( this, "HelpViewer Example",
+ TQMessageBox.about( this, "HelpViewer Example",
"<p>This example implements a simple HTML help viewer "
+ "using Qt's rich text capabilities</p>"
+ "<p>It's just about 100 lines of Java code, so don't expect too much :-)</p>"
@@ -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( "<b>Configuration:</b>", this ), 0, 0 );
- g.addWidget( new QLabel( "<b>Result:</b>", this ), 0, 1 );
+ g.addWidget( new TQLabel( "<b>Configuration:</b>", this ), 0, 0 );
+ g.addWidget( new TQLabel( "<b>Result:</b>", 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
--- a/qtjava/javalib/examples/picture/car_orig.pic
+++ b/qtjava/javalib/examples/picture/car_orig.pic
Binary files 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
<SX> /x02 <U0002> START OF TEXT (STX)
<EX> /x03 <U0003> END OF TEXT (ETX)
<ET> /x04 <U0004> END OF TRANSMISSION (EOT)
-<EQ> /x05 <U0005> ENQUIRY (ENQ)
+<EQ> /x05 <U0005> ENTQUIRY (ENQ)
<AK> /x06 <U0006> ACKNOWLEDGE (ACK)
<BL> /x07 <U0007> BELL (BEL)
<BS> /x08 <U0008> BACKSPACE (BS)
@@ -43,7 +43,7 @@ CHARMAP
<US> /x1F <U001F> UNIT SEPARATOR (IS1)
<SP> /x20 <U0020> SPACE
<!> /x21 <U0021> EXCLAMATION MARK
-<"> /x22 <U0022> QUOTATION MARK
+<"> /x22 <U0022> TQUOTATION MARK
<%> /x25 <U0025> PERCENT SIGN
<&> /x26 <U0026> AMPERSAND
<'> /x27 <U0027> APOSTROPHE
@@ -68,9 +68,9 @@ CHARMAP
<:> /x3A <U003A> COLON
<;> /x3B <U003B> SEMICOLON
<<> /x3C <U003C> LESS-THAN SIGN
-<=> /x3D <U003D> EQUALS SIGN
+<=> /x3D <U003D> ETQUALS SIGN
</>> /x3E <U003E> GREATER-THAN SIGN
-<?> /x3F <U003F> QUESTION MARK
+<?> /x3F <U003F> TQUESTION MARK
<At> /x40 <U0040> COMMERCIAL AT
<A> /x41 <U0041> LATIN CAPITAL LETTER A
<B> /x42 <U0042> LATIN CAPITAL LETTER B
@@ -98,9 +98,9 @@ CHARMAP
<X> /x58 <U0058> LATIN CAPITAL LETTER X
<Y> /x59 <U0059> LATIN CAPITAL LETTER Y
<Z> /x5A <U005A> LATIN CAPITAL LETTER Z
-<<(> /x5B <U005B> LEFT SQUARE BRACKET
+<<(> /x5B <U005B> LEFT STQUARE BRACKET
<////> /x5C <U005C> REVERSE SOLIDUS
-<)/>> /x5D <U005D> RIGHT SQUARE BRACKET
+<)/>> /x5D <U005D> RIGHT STQUARE BRACKET
<'/>> /x5E <U005E> CIRCUMFLEX ACCENT
<_> /x5F <U005F> LOW LINE
<'!> /x60 <U0060> GRAVE ACCENT
@@ -162,7 +162,7 @@ CHARMAP
<SS> /x98 <U0098> START OF STRING (SOS)
<GC> /x99 <U0099> SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
<SC> /x9A <U009A> SINGLE CHARACTER INTRODUCER (SCI)
-<CI> /x9B <U009B> CONTROL SEQUENCE INTRODUCER (CSI)
+<CI> /x9B <U009B> CONTROL SETQUENCE INTRODUCER (CSI)
<ST> /x9C <U009C> STRING TERMINATOR (ST)
<OC> /x9D <U009D> OPERATING SYSTEM COMMAND (OSC)
<PM> /x9E <U009E> PRIVACY MESSAGE (PM)
@@ -175,9 +175,9 @@ CHARMAP
<Nb> /xA6 <U0023> NUMBER SIGN
<SE> /xA7 <U00A7> SECTION SIGN
<Cu> /xA8 <U00A4> CURRENCY SIGN
-<'6> /xA9 <U2018> LEFT SINGLE QUOTATION MARK
-<"6> /xAA <U201C> LEFT DOUBLE QUOTATION MARK
-<<<> /xAB <U00AB> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+<'6> /xA9 <U2018> LEFT SINGLE TQUOTATION MARK
+<"6> /xAA <U201C> LEFT DOUBLE TQUOTATION MARK
+<<<> /xAB <U00AB> LEFT-POINTING DOUBLE ANGLE TQUOTATION MARK
<<-> /xAC <U2190> LEFTWARDS ARROW
<-!> /xAD <U2191> UPWARDS ARROW
<-/>> /xAE <U2192> RIGHTWARDS ARROW
@@ -191,13 +191,13 @@ CHARMAP
<PI> /xB6 <U00B6> PILCROW SIGN
<.M> /xB7 <U00B7> MIDDLE DOT
<-:> /xB8 <U00F7> DIVISION SIGN
-<'9> /xB9 <U2019> RIGHT SINGLE QUOTATION MARK
-<"9> /xBA <U201D> RIGHT DOUBLE QUOTATION MARK
-</>/>> /xBB <U00BB> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-<14> /xBC <U00BC> VULGAR FRACTION ONE QUARTER
+<'9> /xB9 <U2019> RIGHT SINGLE TQUOTATION MARK
+<"9> /xBA <U201D> RIGHT DOUBLE TQUOTATION MARK
+</>/>> /xBB <U00BB> RIGHT-POINTING DOUBLE ANGLE TQUOTATION MARK
+<14> /xBC <U00BC> VULGAR FRACTION ONE TQUARTER
<12> /xBD <U00BD> VULGAR FRACTION ONE HALF
-<34> /xBE <U00BE> VULGAR FRACTION THREE QUARTERS
-<?I> /xBF <U00BF> INVERTED QUESTION MARK
+<34> /xBE <U00BE> VULGAR FRACTION THREE TQUARTERS
+<?I> /xBF <U00BF> INVERTED TQUESTION MARK
<"!> /xC1 <UE002> NON-SPACING GRAVE ACCENT <ISO-IR-103_C1> (not a real character)
<"'> /xC2 <UE003> NON-SPACING ACUTE ACCENT <ISO-IR-103_C2> (not a real character)
<"/>> /xC3 <UE004> NON-SPACING CIRCUMFLEX ACCENT <ISO-IR-103_C3> (not a real character)
@@ -430,7 +430,7 @@ CHARMAP
<STX> /x02 <U0002> START OF TEXT (STX)
<ETX> /x03 <U0003> END OF TEXT (ETX)
<EOT> /x04 <U0004> END OF TRANSMISSION (EOT)
-<ENQ> /x05 <U0005> ENQUIRY (ENQ)
+<ENQ> /x05 <U0005> ENTQUIRY (ENQ)
<ACK> /x06 <U0006> ACKNOWLEDGE (ACK)
<alert> /x07 <U0007> BELL (BEL)
<BEL> /x07 <U0007> BELL (BEL)
@@ -459,7 +459,7 @@ CHARMAP
<DEL> /x7F <U007F> DELETE (DEL)
<space> /x20 <U0020> SPACE
<exclamation-mark> /x21 <U0021> EXCLAMATION MARK
-<quotation-mark> /x22 <U0022> QUOTATION MARK
+<quotation-mark> /x22 <U0022> TQUOTATION MARK
<number-sign> /xA6 <U0023> NUMBER SIGN
<dollar-sign> /xA4 <U0024> DOLLAR SIGN
<percent-sign> /x25 <U0025> PERCENT SIGN
@@ -489,14 +489,14 @@ CHARMAP
<colon> /x3A <U003A> COLON
<semicolon> /x3B <U003B> SEMICOLON
<less-than-sign> /x3C <U003C> LESS-THAN SIGN
-<equals-sign> /x3D <U003D> EQUALS SIGN
+<equals-sign> /x3D <U003D> ETQUALS SIGN
<greater-than-sign> /x3E <U003E> GREATER-THAN SIGN
-<question-mark> /x3F <U003F> QUESTION MARK
+<question-mark> /x3F <U003F> TQUESTION MARK
<commercial-at> /x40 <U0040> COMMERCIAL AT
-<left-square-bracket> /x5B <U005B> LEFT SQUARE BRACKET
+<left-square-bracket> /x5B <U005B> LEFT STQUARE BRACKET
<backslash> /x5C <U005C> REVERSE SOLIDUS
<reverse-solidus> /x5C <U005C> REVERSE SOLIDUS
-<right-square-bracket> /x5D <U005D> RIGHT SQUARE BRACKET
+<right-square-bracket> /x5D <U005D> RIGHT STQUARE BRACKET
<circumflex> /x5E <U005E> CIRCUMFLEX ACCENT
<circumflex-accent> /x5E <U005E> CIRCUMFLEX ACCENT
<underscore> /x5F <U005F> 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"
+ " <code_set_name> 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
<VS> /x2A <U008A> LINE TABULATION SET (VTS)
<PD> /x2B <U008B> PARTIAL LINE FORWARD (PLD)
<PU> /x2C <U008C> PARTIAL LINE BACKWARD (PLU)
-<EQ> /x2D <U0005> ENQUIRY (ENQ)
+<EQ> /x2D <U0005> ENTQUIRY (ENQ)
<AK> /x2E <U0006> ACKNOWLEDGE (ACK)
<BL> /x2F <U0007> BELL (BEL)
<DC> /x30 <U0090> DEVICE CONTROL STRING (DCS)
@@ -67,7 +67,7 @@ CHARMAP
<SS> /x38 <U0098> START OF STRING (SOS)
<GC> /x39 <U0099> SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)
<SC> /x3A <U009A> SINGLE CHARACTER INTRODUCER (SCI)
-<CI> /x3B <U009B> CONTROL SEQUENCE INTRODUCER (CSI)
+<CI> /x3B <U009B> CONTROL SETQUENCE INTRODUCER (CSI)
<D4> /x3C <U0014> DEVICE CONTROL FOUR (DC4)
<NK> /x3D <U0015> NEGATIVE ACKNOWLEDGE (NAK)
<PM> /x3E <U009E> PRIVACY MESSAGE (PM)
@@ -119,7 +119,7 @@ CHARMAP
<%> /x6C <U0025> PERCENT SIGN
<_> /x6D <U005F> LOW LINE
</>> /x6E <U003E> GREATER-THAN SIGN
-<?> /x6F <U003F> QUESTION MARK
+<?> /x6F <U003F> TQUESTION MARK
<BB> /x70 <U00A6> BROKEN BAR
<E'> /x71 <U00C9> LATIN CAPITAL LETTER E WITH ACUTE
<E/>> /x72 <U00CA> LATIN CAPITAL LETTER E WITH CIRCUMFLEX
@@ -134,8 +134,8 @@ CHARMAP
<AE> /x7B <U00C6> LATIN CAPITAL LETTER AE
<O//> /x7C <U00D8> LATIN CAPITAL LETTER O WITH STROKE
<'> /x7D <U0027> APOSTROPHE
-<=> /x7E <U003D> EQUALS SIGN
-<"> /x7F <U0022> QUOTATION MARK
+<=> /x7E <U003D> ETQUALS SIGN
+<"> /x7F <U0022> TQUOTATION MARK
<At> /x80 <U0040> COMMERCIAL AT
<a> /x81 <U0061> LATIN SMALL LETTER A
<b> /x82 <U0062> LATIN SMALL LETTER B
@@ -146,8 +146,8 @@ CHARMAP
<g> /x87 <U0067> LATIN SMALL LETTER G
<h> /x88 <U0068> LATIN SMALL LETTER H
<i> /x89 <U0069> LATIN SMALL LETTER I
-<<<> /x8A <U00AB> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-</>/>> /x8B <U00BB> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+<<<> /x8A <U00AB> LEFT-POINTING DOUBLE ANGLE TQUOTATION MARK
+</>/>> /x8B <U00BB> RIGHT-POINTING DOUBLE ANGLE TQUOTATION MARK
<d-> /x8C <U00F0> LATIN SMALL LETTER ETH (Icelandic)
<y'> /x8D <U00FD> LATIN SMALL LETTER Y WITH ACUTE
<th> /x8E <U00FE> LATIN SMALL LETTER THORN (Icelandic)
@@ -166,8 +166,8 @@ CHARMAP
<-o> /x9B <U00BA> MASCULINE ORDINAL INDICATOR
<(!> /x9C <U007B> LEFT CURLY BRACKET
<',> /x9D <U00B8> CEDILLA
-<<(> /x9E <U005B> LEFT SQUARE BRACKET
-<)/>> /x9F <U005D> RIGHT SQUARE BRACKET
+<<(> /x9E <U005B> LEFT STQUARE BRACKET
+<)/>> /x9F <U005D> RIGHT STQUARE BRACKET
<My> /xA0 <U00B5> MICRO SIGN
<u:> /xA1 <U00FC> LATIN SMALL LETTER U WITH DIAERESIS
<s> /xA2 <U0073> LATIN SMALL LETTER S
@@ -179,7 +179,7 @@ CHARMAP
<y> /xA8 <U0079> LATIN SMALL LETTER Y
<z> /xA9 <U007A> LATIN SMALL LETTER Z
<!I> /xAA <U00A1> INVERTED EXCLAMATION MARK
-<?I> /xAB <U00BF> INVERTED QUESTION MARK
+<?I> /xAB <U00BF> INVERTED TQUESTION MARK
<D-> /xAC <U00D0> LATIN CAPITAL LETTER ETH (Icelandic)
<Y'> /xAD <U00DD> LATIN CAPITAL LETTER Y WITH ACUTE
<TH> /xAE <U00DE> LATIN CAPITAL LETTER THORN (Icelandic)
@@ -191,9 +191,9 @@ CHARMAP
<Co> /xB4 <U00A9> COPYRIGHT SIGN
<SE> /xB5 <U00A7> SECTION SIGN
<PI> /xB6 <U00B6> PILCROW SIGN
-<14> /xB7 <U00BC> VULGAR FRACTION ONE QUARTER
+<14> /xB7 <U00BC> VULGAR FRACTION ONE TQUARTER
<12> /xB8 <U00BD> VULGAR FRACTION ONE HALF
-<34> /xB9 <U00BE> VULGAR FRACTION THREE QUARTERS
+<34> /xB9 <U00BE> VULGAR FRACTION THREE TQUARTERS
<NO> /xBA <U00AC> NOT SIGN
<!!> /xBB <U007C> VERTICAL LINE
<'-> /xBC <U203E> OVERLINE
@@ -269,7 +269,7 @@ CHARMAP
<STX> /x02 <U0002> START OF TEXT (STX)
<ETX> /x03 <U0003> END OF TEXT (ETX)
<EOT> /x37 <U0004> END OF TRANSMISSION (EOT)
-<ENQ> /x2D <U0005> ENQUIRY (ENQ)
+<ENQ> /x2D <U0005> ENTQUIRY (ENQ)
<ACK> /x2E <U0006> ACKNOWLEDGE (ACK)
<alert> /x2F <U0007> BELL (BEL)
<BEL> /x2F <U0007> BELL (BEL)
@@ -298,7 +298,7 @@ CHARMAP
<DEL> /x07 <U007F> DELETE (DEL)
<space> /x40 <U0020> SPACE
<exclamation-mark> /x4F <U0021> EXCLAMATION MARK
-<quotation-mark> /x7F <U0022> QUOTATION MARK
+<quotation-mark> /x7F <U0022> TQUOTATION MARK
<number-sign> /x4A <U0023> NUMBER SIGN
<dollar-sign> /x67 <U0024> DOLLAR SIGN
<percent-sign> /x6C <U0025> PERCENT SIGN
@@ -328,14 +328,14 @@ CHARMAP
<colon> /x7A <U003A> COLON
<semicolon> /x5E <U003B> SEMICOLON
<less-than-sign> /x4C <U003C> LESS-THAN SIGN
-<equals-sign> /x7E <U003D> EQUALS SIGN
+<equals-sign> /x7E <U003D> ETQUALS SIGN
<greater-than-sign> /x6E <U003E> GREATER-THAN SIGN
-<question-mark> /x6F <U003F> QUESTION MARK
+<question-mark> /x6F <U003F> TQUESTION MARK
<commercial-at> /x80 <U0040> COMMERCIAL AT
-<left-square-bracket> /x9E <U005B> LEFT SQUARE BRACKET
+<left-square-bracket> /x9E <U005B> LEFT STQUARE BRACKET
<backslash> /xE0 <U005C> REVERSE SOLIDUS
<reverse-solidus> /xE0 <U005C> REVERSE SOLIDUS
-<right-square-bracket> /x9F <U005D> RIGHT SQUARE BRACKET
+<right-square-bracket> /x9F <U005D> RIGHT STQUARE BRACKET
<circumflex> /x5F <U005E> CIRCUMFLEX ACCENT
<circumflex-accent> /x5F <U005E> CIRCUMFLEX ACCENT
<underscore> /x6D <U005F> LOW LINE
diff --git a/qtjava/javalib/examples/qwerty/IBM277.txt b/qtjava/javalib/examples/qwerty/IBM277.txt
index 00cc7b94..57a2edc9 100644
--- a/qtjava/javalib/examples/qwerty/IBM277.txt
+++ b/qtjava/javalib/examples/qwerty/IBM277.txt
@@ -1,5 +1,5 @@
�����
-%EBFC��HTQRSXUVW�I�����j�E
+%EBFC��HTTQRSXUVW�I�����j�E
%?????
%?????
%?????
diff --git a/qtjava/javalib/examples/qwerty/Main.java b/qtjava/javalib/examples/qwerty/Main.java
index 67cac77e..81bb4d8a 100644
--- a/qtjava/javalib/examples/qwerty/Main.java
+++ b/qtjava/javalib/examples/qwerty/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 );
boolean isSmall = Qt.qApp().desktop().size().width() < 450
@@ -23,7 +23,7 @@ public static void main(String[] args)
int i;
for ( i= 0; i<args.length; i++ ) {
Editor e = new Editor();
- e.setCaption("Qt Example - QWERTY");
+ e.setCaption("Qt Example - TQWERTY");
e.load( args[i] );
if ( isSmall ) {
e.showMaximized();
diff --git a/qtjava/javalib/examples/rangecontrols/Main.java b/qtjava/javalib/examples/rangecontrols/Main.java
index 3fd16e02..e1008ef5 100644
--- a/qtjava/javalib/examples/rangecontrols/Main.java
+++ b/qtjava/javalib/examples/rangecontrols/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 );
RangeControls rangecontrols = new RangeControls();
rangecontrols.resize( 500, 300 );
diff --git a/qtjava/javalib/examples/rangecontrols/RangeControls.java b/qtjava/javalib/examples/rangecontrols/RangeControls.java
index ed331e38..be392531 100644
--- a/qtjava/javalib/examples/rangecontrols/RangeControls.java
+++ b/qtjava/javalib/examples/rangecontrols/RangeControls.java
@@ -10,10 +10,10 @@
import org.kde.qt.*;
-class RangeControls extends QVBox
+class RangeControls extends TQVBox
{
-private QCheckBox notches, wrapping;
+private TQCheckBox notches, wrapping;
@@ -22,52 +22,52 @@ RangeControls( )
this(null, null);
}
-RangeControls( QWidget parent, String name )
+RangeControls( TQWidget parent, String name )
{
super( parent, name );
- QHBox row1 = new QHBox( this );
+ TQHBox row1 = new TQHBox( this );
- QVBox cell2 = new QVBox( row1 );
+ TQVBox cell2 = new TQVBox( row1 );
cell2.setMargin( 10 );
- cell2.setFrameStyle( QFrame.WinPanel | QFrame.Sunken );
+ cell2.setFrameStyle( TQFrame.WinPanel | TQFrame.Sunken );
- new QWidget( cell2 );
+ new TQWidget( cell2 );
- QLabel label1 = new QLabel( "Enter a value between\n" + ( -Integer.MAX_VALUE ) + " and " + Integer.MAX_VALUE + ":", cell2 );
+ TQLabel label1 = new TQLabel( "Enter a value between\n" + ( -Integer.MAX_VALUE ) + " and " + Integer.MAX_VALUE + ":", cell2 );
label1.setMaximumHeight( label1.sizeHint().height() );
- QSpinBox sb1 = new QSpinBox( -Integer.MAX_VALUE, Integer.MAX_VALUE, 1, cell2 );
+ TQSpinBox sb1 = new TQSpinBox( -Integer.MAX_VALUE, Integer.MAX_VALUE, 1, cell2 );
sb1.setValue( 0 );
- QLabel label2 = new QLabel( "Enter a zoom value:", cell2 );
+ TQLabel label2 = new TQLabel( "Enter a zoom value:", cell2 );
label2.setMaximumHeight( label2.sizeHint().height() );
- QSpinBox sb2 = new QSpinBox( 0, 1000, 10, cell2 );
+ TQSpinBox sb2 = new TQSpinBox( 0, 1000, 10, cell2 );
sb2.setSuffix( " %" );
sb2.setSpecialValueText( "Automatic" );
- QLabel label3 = new QLabel( "Enter a price:", cell2 );
+ TQLabel label3 = new TQLabel( "Enter a price:", cell2 );
label3.setMaximumHeight( label3.sizeHint().height() );
- QSpinBox sb3 = new QSpinBox( 0, Integer.MAX_VALUE, 1, cell2 );
+ TQSpinBox sb3 = new TQSpinBox( 0, Integer.MAX_VALUE, 1, cell2 );
sb3.setPrefix( "$" );
sb3.setValue( 355 );
- new QWidget( cell2 );
+ new TQWidget( cell2 );
- QHBox row2 = new QHBox( this );
+ TQHBox row2 = new TQHBox( this );
- QVBox cell3 = new QVBox( row2 );
+ TQVBox cell3 = new TQVBox( row2 );
cell3.setMargin( 10 );
- cell3.setFrameStyle( QFrame.WinPanel | QFrame.Sunken );
- QSlider hslider = new QSlider( 0, 64, 1, 33, Qt.Horizontal, cell3 );
- QLCDNumber lcd2 = new QLCDNumber( 2, cell3 );
+ cell3.setFrameStyle( TQFrame.WinPanel | TQFrame.Sunken );
+ TQSlider hslider = new TQSlider( 0, 64, 1, 33, Qt.Horizontal, cell3 );
+ TQLCDNumber lcd2 = new TQLCDNumber( 2, cell3 );
lcd2.display( 33 );
- lcd2.setSegmentStyle( QLCDNumber.Filled );
+ lcd2.setSegmentStyle( TQLCDNumber.Filled );
connect( hslider, SIGNAL(" valueChanged( int )"), lcd2, SLOT(" display( int )") );
- QHBox cell4 = new QHBox( row2 );
- cell4.setFrameStyle( QFrame.WinPanel | QFrame.Sunken );
+ TQHBox cell4 = new TQHBox( row2 );
+ cell4.setFrameStyle( TQFrame.WinPanel | TQFrame.Sunken );
cell4.setMargin( 10 );
- QSlider vslider = new QSlider( 0, 64, 1, 8, Qt.Vertical, cell4 );
- QLCDNumber lcd3 = new QLCDNumber( 3, cell4 );
+ TQSlider vslider = new TQSlider( 0, 64, 1, 8, Qt.Vertical, cell4 );
+ TQLCDNumber lcd3 = new TQLCDNumber( 3, cell4 );
lcd3.display( 8 );
connect( vslider, SIGNAL(" valueChanged( int )"), lcd3, SLOT(" display( int )") );
}
diff --git a/qtjava/javalib/examples/richtext/Main.java b/qtjava/javalib/examples/richtext/Main.java
index 887afb2a..4a71fd2f 100644
--- a/qtjava/javalib/examples/richtext/Main.java
+++ b/qtjava/javalib/examples/richtext/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 );
MyRichText richtext = new MyRichText();
richtext.resize( 450, 350 );
diff --git a/qtjava/javalib/examples/richtext/MyRichText.java b/qtjava/javalib/examples/richtext/MyRichText.java
index 5234e3c8..79f6ac1e 100644
--- a/qtjava/javalib/examples/richtext/MyRichText.java
+++ b/qtjava/javalib/examples/richtext/MyRichText.java
@@ -11,11 +11,11 @@
import org.kde.qt.*;
-class MyRichText extends QVBox
+class MyRichText extends TQVBox
{
-protected QTextView view;
-protected QPushButton bClose, bNext, bPrev;
+protected TQTextView view;
+protected TQPushButton bClose, bNext, bPrev;
protected int num;
@@ -82,29 +82,29 @@ MyRichText( )
this(null, null);
}
-MyRichText( QWidget parent, String name )
+MyRichText( TQWidget parent, String name )
{
super( parent, name );
setMargin( 5 );
- view = new QTextView( this );
+ view = new TQTextView( this );
view.setText( "This is a <b>Test</b> with <i>italic</i> <u>stuff</u>" );
- QBrush paper = new QBrush();
- paper.setPixmap( new QPixmap( "../richtext/marble.png" ) );
+ TQBrush paper = new TQBrush();
+ paper.setPixmap( new TQPixmap( "../richtext/marble.png" ) );
if ( paper.pixmap() != null )
view.setPaper( paper );
else
- view.setPaper( new QBrush(white()) );
+ view.setPaper( new TQBrush(white()) );
view.setText( sayings[0] );
view.setMinimumSize( 450, 250 );
- QHBox buttons = new QHBox( this );
+ TQHBox buttons = new TQHBox( this );
buttons.setMargin( 5 );
- bClose = new QPushButton( "&Close", buttons );
- bPrev = new QPushButton( "<< &Prev", buttons );
- bNext = new QPushButton( "&Next >>", buttons );
+ bClose = new TQPushButton( "&Close", buttons );
+ bPrev = new TQPushButton( "<< &Prev", buttons );
+ bNext = new TQPushButton( "&Next >>", buttons );
bPrev.setEnabled( false );
diff --git a/qtjava/javalib/examples/richtext/marble.png b/qtjava/javalib/examples/richtext/marble.png
index 49ea3098..c81145c3 100644
--- a/qtjava/javalib/examples/richtext/marble.png
+++ b/qtjava/javalib/examples/richtext/marble.png
Binary files differ
diff --git a/qtjava/javalib/examples/rot13/Rot13.java b/qtjava/javalib/examples/rot13/Rot13.java
index 345f2a9d..67c2ee7f 100644
--- a/qtjava/javalib/examples/rot13/Rot13.java
+++ b/qtjava/javalib/examples/rot13/Rot13.java
@@ -15,23 +15,23 @@
import org.kde.qt.*;
-class Rot13 extends QWidget {
-private QMultiLineEdit left, right;
+class Rot13 extends TQWidget {
+private TQMultiLineEdit left, right;
Rot13()
{
- left = new QMultiLineEdit( this, "left" );
- right = new QMultiLineEdit( this, "right" );
+ left = new TQMultiLineEdit( this, "left" );
+ right = new TQMultiLineEdit( this, "right" );
connect( left, SIGNAL("textChanged()"), this, SLOT("changeRight()") );
connect( right, SIGNAL("textChanged()"), this, SLOT("changeLeft()") );
- QPushButton quit = new QPushButton( "&Quit", this );
+ TQPushButton quit = new TQPushButton( "&Quit", this );
quit.setFocusPolicy( NoFocus );
connect( quit, SIGNAL("clicked()"), qApp(), SLOT("quit()") );
- QGridLayout l = new QGridLayout( this, 2, 2, 5 );
+ TQGridLayout l = new TQGridLayout( this, 2, 2, 5 );
l.addWidget( left, 0, 0 );
l.addWidget( right, 0, 1 );
l.addWidget( quit, 1, 1, AlignRight );
@@ -74,7 +74,7 @@ String rot13( String input )
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Rot13 r = new Rot13();
r.resize( 400, 400 );
a.setMainWidget( r );
diff --git a/qtjava/javalib/examples/scribble/Main.java b/qtjava/javalib/examples/scribble/Main.java
index 01d7a416..1e77807d 100644
--- a/qtjava/javalib/examples/scribble/Main.java
+++ b/qtjava/javalib/examples/scribble/Main.java
@@ -14,15 +14,15 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Scribble scribble = new Scribble();
scribble.resize( 500, 350 );
scribble.setCaption("Qt Example - Scribble");
a.setMainWidget( scribble );
- if ( QApplication.desktop().width() > 550
- && QApplication.desktop().height() > 366 )
+ if ( TQApplication.desktop().width() > 550
+ && TQApplication.desktop().height() > 366 )
scribble.show();
else
scribble.showMaximized();
diff --git a/qtjava/javalib/examples/scribble/Scribble.java b/qtjava/javalib/examples/scribble/Scribble.java
index 2adf609c..e9ecda9e 100644
--- a/qtjava/javalib/examples/scribble/Scribble.java
+++ b/qtjava/javalib/examples/scribble/Scribble.java
@@ -11,55 +11,55 @@
import org.kde.qt.*;
import java.util.*;
-class Scribble extends QMainWindow
+class Scribble extends TQMainWindow
{
protected Canvas canvas;
-protected QSpinBox bPWidth;
-protected QToolButton bPColor, bSave, bClear;
+protected TQSpinBox bPWidth;
+protected TQToolButton bPColor, bSave, bClear;
-class Canvas extends QWidget
+class Canvas extends TQWidget
{
- void setPenColor( QColor c )
+ void setPenColor( TQColor c )
{ pen.setColor( c ); }
void setPenWidth( int w )
{ pen.setWidth( w ); }
- QColor penColor()
+ TQColor penColor()
{ return pen.color(); }
int penWidth()
{ return pen.width(); }
-protected QPen pen;
-protected QPointArray polyline;
+protected TQPen pen;
+protected TQPointArray polyline;
protected boolean mousePressed;
-protected QPixmap buffer = new QPixmap();
+protected TQPixmap buffer = new TQPixmap();
public boolean no_writing = false;
-Canvas( QWidget parent )
+Canvas( TQWidget parent )
{
this(parent, null);
}
-Canvas( QWidget parent, String name )
+Canvas( TQWidget parent, String name )
{
super( parent, name, WStaticContents );
- pen = new QPen( Qt.red(), 3 );
- polyline = new QPointArray(3);
+ pen = new TQPen( Qt.red(), 3 );
+ polyline = new TQPointArray(3);
if ((qApp().args().length > 0) && !buffer.load(qApp().args()[0]))
buffer.fill( colorGroup().base() );
- setBackgroundMode( QWidget.PaletteBase );
+ setBackgroundMode( TQWidget.PaletteBase );
setCursor( Qt.crossCursor() );
}
@@ -75,7 +75,7 @@ void clearScreen()
repaint( false );
}
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
mousePressed = true;
polyline.setPoint(0, e.pos());
@@ -83,15 +83,15 @@ protected void mousePressEvent( QMouseEvent e )
polyline.setPoint(2, e.pos());
}
-protected void mouseReleaseEvent( QMouseEvent e )
+protected void mouseReleaseEvent( TQMouseEvent e )
{
mousePressed = false;
}
-protected void mouseMoveEvent( QMouseEvent e )
+protected void mouseMoveEvent( TQMouseEvent e )
{
if ( mousePressed ) {
- QPainter painter = new QPainter();
+ TQPainter painter = new TQPainter();
painter.begin( buffer );
painter.setPen( pen );
polyline.setPoint(2, polyline.at(1));
@@ -100,7 +100,7 @@ protected void mouseMoveEvent( QMouseEvent e )
painter.drawPolyline( polyline );
painter.end();
- QRect r = polyline.boundingRect();
+ TQRect r = polyline.boundingRect();
r = r.normalize();
r.setLeft( r.left() - penWidth() );
r.setTop( r.top() - penWidth() );
@@ -111,7 +111,7 @@ protected void mouseMoveEvent( QMouseEvent e )
}
}
-protected void resizeEvent( QResizeEvent e )
+protected void resizeEvent( TQResizeEvent e )
{
super.resizeEvent( e );
@@ -120,18 +120,18 @@ protected void resizeEvent( QResizeEvent e )
int h = height() > buffer.height() ?
height() : buffer.height();
- QPixmap tmp = new QPixmap( buffer );
+ TQPixmap tmp = new TQPixmap( buffer );
buffer.resize( w, h );
buffer.fill( colorGroup().base() );
bitBlt( buffer, 0, 0, tmp, 0, 0, tmp.width(), tmp.height() );
}
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
super.paintEvent( e );
ArrayList rects = e.region().rects();
for ( int i = 0; i < rects.size(); i++ ) {
- QRect r = (QRect) rects.get(i);
+ TQRect r = (TQRect) rects.get(i);
bitBlt( this, r.x(), r.y(), buffer, r.x(), r.y(), r.width(), r.height() );
}
}
@@ -145,52 +145,52 @@ Scribble( )
this(null, null);
}
-Scribble( QWidget parent, String name )
+Scribble( TQWidget parent, String name )
{
super( parent, name );
canvas = new Canvas( this );
setCentralWidget( canvas );
- QToolBar tools = new QToolBar( this );
+ TQToolBar tools = new TQToolBar( this );
- bSave = new QToolButton( new QIconSet(), "Save", "Save as PNG image", this, SLOT(" slotSave()"), tools );
+ bSave = new TQToolButton( new TQIconSet(), "Save", "Save as PNG image", this, SLOT(" slotSave()"), tools );
bSave.setText( "Save as..." );
tools.addSeparator();
- bPColor = new QToolButton( new QIconSet(), "Choose Pen Color", "Choose Pen Color", this, SLOT(" slotColor()"), tools );
+ bPColor = new TQToolButton( new TQIconSet(), "Choose Pen Color", "Choose Pen Color", this, SLOT(" slotColor()"), tools );
bPColor.setText( "Choose Pen Color..." );
tools.addSeparator();
- bPWidth = new QSpinBox( 1, 20, 1, tools );
- QToolTip.add( bPWidth, "Choose Pen Width" );
+ bPWidth = new TQSpinBox( 1, 20, 1, tools );
+ TQToolTip.add( bPWidth, "Choose Pen Width" );
connect( bPWidth, SIGNAL(" valueChanged( int )"), this, SLOT(" slotWidth( int )") );
bPWidth.setValue( 3 );
tools.addSeparator();
- bClear = new QToolButton( new QIconSet(), "Clear Screen", "Clear Screen", this, SLOT(" slotClear()"), tools );
+ bClear = new TQToolButton( new TQIconSet(), "Clear Screen", "Clear Screen", this, SLOT(" slotClear()"), tools );
bClear.setText( "Clear Screen" );
}
void slotSave()
{
- QPopupMenu menu = new QPopupMenu( null );
+ TQPopupMenu menu = new TQPopupMenu( null );
HashMap formats = new HashMap();
- for ( int i = 0; i < QImageIO.outputFormats().size(); i++ ) {
- String str = (String) QImageIO.outputFormats().get( i );
+ for ( int i = 0; i < TQImageIO.outputFormats().size(); i++ ) {
+ String str = (String) TQImageIO.outputFormats().get( i );
formats.put( new Integer(menu.insertItem( str + "..." )), str );
}
menu.setMouseTracking( true );
- int id = menu.exec( bSave.mapToGlobal( new QPoint( 0, bSave.height() + 1 ) ) );
+ int id = menu.exec( bSave.mapToGlobal( new TQPoint( 0, bSave.height() + 1 ) ) );
if ( id != -1 ) {
String format = (String) formats.get( new Integer(id) );
- String filename = QFileDialog.getSaveFileName( "", "*." + format.toLowerCase(), this );
+ String filename = TQFileDialog.getSaveFileName( "", "*." + format.toLowerCase(), this );
if ( !filename.equals("") )
canvas.save( filename, format );
}
@@ -199,7 +199,7 @@ void slotSave()
void slotColor()
{
- QColor c = QColorDialog.getColor( canvas.penColor(), this );
+ TQColor c = TQColorDialog.getColor( canvas.penColor(), this );
if ( c.isValid() )
canvas.setPenColor( c );
}
diff --git a/qtjava/javalib/examples/showimg/ImageIconProvider.java b/qtjava/javalib/examples/showimg/ImageIconProvider.java
index 5d3dba76..0a73a6b7 100644
--- a/qtjava/javalib/examples/showimg/ImageIconProvider.java
+++ b/qtjava/javalib/examples/showimg/ImageIconProvider.java
@@ -12,10 +12,10 @@ import org.kde.qt.*;
import java.util.ArrayList;
-class ImageIconProvider extends QFileIconProvider
+class ImageIconProvider extends TQFileIconProvider
{
ArrayList fmts;
- QPixmap imagepm;
+ TQPixmap imagepm;
@@ -53,15 +53,15 @@ ImageIconProvider( )
this(null, null);
}
-ImageIconProvider( QWidget parent, String name )
+ImageIconProvider( TQWidget parent, String name )
{
super( parent, name );
- imagepm = new QPixmap(image_xpm);
- fmts = QImage.inputFormats();
+ imagepm = new TQPixmap(image_xpm);
+ fmts = TQImage.inputFormats();
}
-public QPixmap pixmap( QFileInfo fi )
+public TQPixmap pixmap( TQFileInfo fi )
{
String ext = fi.extension().toUpperCase();
if ( fmts.indexOf(ext) != -1 ) {
diff --git a/qtjava/javalib/examples/showimg/ImageTextEditor.java b/qtjava/javalib/examples/showimg/ImageTextEditor.java
index 6c11c1a4..691bdf5b 100644
--- a/qtjava/javalib/examples/showimg/ImageTextEditor.java
+++ b/qtjava/javalib/examples/showimg/ImageTextEditor.java
@@ -11,48 +11,48 @@
import org.kde.qt.*;
-class ImageTextEditor extends QDialog
+class ImageTextEditor extends TQDialog
{
-private QImage image;
-private QComboBox languages;
-private QComboBox keys;
-private QMultiLineEdit text;
-private QLineEdit newlang;
-private QLineEdit newkey;
+private TQImage image;
+private TQComboBox languages;
+private TQComboBox keys;
+private TQMultiLineEdit text;
+private TQLineEdit newlang;
+private TQLineEdit newkey;
-ImageTextEditor( QImage i, QWidget parent )
+ImageTextEditor( TQImage i, TQWidget parent )
{
this(i, parent, null, 0);
}
-ImageTextEditor( QImage i, QWidget parent, String name, int f )
+ImageTextEditor( TQImage i, TQWidget parent, String name, int f )
{
super(parent,name,true,f);
image = i;
- QVBoxLayout vbox = new QVBoxLayout(this,8);
+ TQVBoxLayout vbox = new TQVBoxLayout(this,8);
vbox.setAutoAdd(true);
- QGrid controls = new QGrid(3,QGrid.Horizontal,this);
+ TQGrid controls = new TQGrid(3,TQGrid.Horizontal,this);
controls.setSpacing(8);
- QLabel l;
- l=new QLabel("Language",controls); l.setAlignment(AlignCenter);
- l=new QLabel("Key",controls); l.setAlignment(AlignCenter);
- new QLabel("",controls); // dummy
- languages = new QComboBox(controls);
- keys = new QComboBox(controls);
- QPushButton remove = new QPushButton("Remove",controls);
-
- newlang = new QLineEdit(controls);
- newkey = new QLineEdit(controls);
- QPushButton add = new QPushButton("Add",controls);
-
- text = new QMultiLineEdit(this);
-
- QHBox hbox = new QHBox(this);
- QPushButton cancel = new QPushButton("Cancel",hbox);
- QPushButton ok = new QPushButton("OK",hbox);
+ TQLabel l;
+ l=new TQLabel("Language",controls); l.setAlignment(AlignCenter);
+ l=new TQLabel("Key",controls); l.setAlignment(AlignCenter);
+ new TQLabel("",controls); // dummy
+ languages = new TQComboBox(controls);
+ keys = new TQComboBox(controls);
+ TQPushButton remove = new TQPushButton("Remove",controls);
+
+ newlang = new TQLineEdit(controls);
+ newkey = new TQLineEdit(controls);
+ TQPushButton add = new TQPushButton("Add",controls);
+
+ text = new TQMultiLineEdit(this);
+
+ TQHBox hbox = new TQHBox(this);
+ TQPushButton cancel = new TQPushButton("Cancel",hbox);
+ TQPushButton ok = new TQPushButton("OK",hbox);
connect(add,SIGNAL("clicked()"),
this,SLOT("addText()"));
diff --git a/qtjava/javalib/examples/showimg/ImageViewer.java b/qtjava/javalib/examples/showimg/ImageViewer.java
index 0b419ea9..c902e413 100644
--- a/qtjava/javalib/examples/showimg/ImageViewer.java
+++ b/qtjava/javalib/examples/showimg/ImageViewer.java
@@ -11,24 +11,24 @@
import org.kde.qt.*;
import java.util.*;
-class ImageViewer extends QWidget
+class ImageViewer extends TQWidget
{
private int conversion_flags;
private int alloc_context;
private String filename;
-private QImage image = new QImage(); // the loaded image
-private QPixmap pm = new QPixmap(); // the converted pixmap
-private QPixmap pmScaled; // the scaled pixmap
-
-private QMenuBar menubar;
-private QPopupMenu file;
-private QPopupMenu saveimage;
-private QPopupMenu savepixmap;
-private QPopupMenu edit;
-private QPopupMenu options;
-
-private QWidget helpmsg;
-private QLabel status;
+private TQImage image = new TQImage(); // the loaded image
+private TQPixmap pm = new TQPixmap(); // the converted pixmap
+private TQPixmap pmScaled; // the scaled pixmap
+
+private TQMenuBar menubar;
+private TQPopupMenu file;
+private TQPopupMenu saveimage;
+private TQPopupMenu savepixmap;
+private TQPopupMenu edit;
+private TQPopupMenu options;
+
+private TQWidget helpmsg;
+private TQLabel status;
private int si, sp, ac, co, mo, fd, bd, // Menu item ids
td, ta, ba, fa, au, ad, dd,
ss, cc, t1, t8, t32;
@@ -44,12 +44,12 @@ private static ImageViewer other = null;
/*
In the constructor, we just pass the standard parameters on to
- QWidget.
+ TQWidget.
The menu uses a single slot to simplify the process of adding
more items to the options menu.
*/
-ImageViewer( QWidget parent, String name, int wFlags )
+ImageViewer( TQWidget parent, String name, int wFlags )
{
super( parent, name, wFlags );
conversion_flags = PreferDither;
@@ -61,12 +61,12 @@ ImageViewer( QWidget parent, String name, int wFlags )
clicky[0] = -1;
alloc_context = 0;
- menubar = new QMenuBar(this);
- menubar.setSeparator( QMenuBar.InWindowsStyle );
+ menubar = new TQMenuBar(this);
+ menubar.setSeparator( TQMenuBar.InWindowsStyle );
- ArrayList fmt = QImage.outputFormats();
- saveimage = new QPopupMenu( menubar );
- savepixmap = new QPopupMenu( menubar );
+ ArrayList fmt = TQImage.outputFormats();
+ saveimage = new TQPopupMenu( menubar );
+ savepixmap = new TQPopupMenu( menubar );
Iterator it = fmt.iterator();
while (it.hasNext()) {
String f = (String) it.next();
@@ -76,23 +76,23 @@ ImageViewer( QWidget parent, String name, int wFlags )
connect( saveimage, SIGNAL("activated(int)"), this, SLOT("saveImage(int)") );
connect( savepixmap, SIGNAL("activated(int)"), this, SLOT("savePixmap(int)") );
- file = new QPopupMenu( menubar );
+ file = new TQPopupMenu( menubar );
menubar.insertItem( "&File", file );
- file.insertItem( "&New window", this, SLOT("newWindow()"), new QKeySequence(CTRL+Key_N) );
- file.insertItem( "&Open...", this, SLOT("openFile()"), new QKeySequence(CTRL+Key_O) );
+ file.insertItem( "&New window", this, SLOT("newWindow()"), new TQKeySequence(CTRL+Key_N) );
+ file.insertItem( "&Open...", this, SLOT("openFile()"), new TQKeySequence(CTRL+Key_O) );
si = file.insertItem( "Save image", saveimage );
sp = file.insertItem( "Save pixmap", savepixmap );
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) );
- edit = new QPopupMenu( menubar );
+ edit = new TQPopupMenu( menubar );
menubar.insertItem( "&Edit", edit );
- edit.insertItem("&Copy", this, SLOT("copy()"), new QKeySequence(CTRL+Key_C));
- edit.insertItem("&Paste", this, SLOT("paste()"), new QKeySequence(CTRL+Key_V));
+ edit.insertItem("&Copy", this, SLOT("copy()"), new TQKeySequence(CTRL+Key_C));
+ edit.insertItem("&Paste", this, SLOT("paste()"), new TQKeySequence(CTRL+Key_V));
edit.insertSeparator();
- edit.insertItem("&Horizontal flip", this, SLOT("hFlip()"), new QKeySequence(ALT+Key_H));
- edit.insertItem("&Vertical flip", this, SLOT("vFlip()"), new QKeySequence(ALT+Key_V));
- edit.insertItem("&Rotate 180", this, SLOT("rot180()"), new QKeySequence(ALT+Key_R));
+ edit.insertItem("&Horizontal flip", this, SLOT("hFlip()"), new TQKeySequence(ALT+Key_H));
+ edit.insertItem("&Vertical flip", this, SLOT("vFlip()"), new TQKeySequence(ALT+Key_V));
+ edit.insertItem("&Rotate 180", this, SLOT("rot180()"), new TQKeySequence(ALT+Key_R));
edit.insertSeparator();
edit.insertItem("&Text...", this, SLOT("editText()"));
edit.insertSeparator();
@@ -100,7 +100,7 @@ ImageViewer( QWidget parent, String name, int wFlags )
t8 = edit.insertItem( "Convert to &8 bit", this, SLOT("to8Bit()") );
t32 = edit.insertItem( "Convert to &32 bit", this, SLOT("to32Bit()") );
- options = new QPopupMenu( menubar );
+ options = new TQPopupMenu( menubar );
menubar.insertItem( "&Options", options );
ac = options.insertItem( "AutoColor" );
co = options.insertItem( "ColorOnly" );
@@ -119,21 +119,21 @@ ImageViewer( QWidget parent, String name, int wFlags )
options.insertSeparator();
ss = options.insertItem( "Smooth scaling" );
cc = options.insertItem( "Use color context" );
- if ( QApplication.colorSpec() == QApplication.ManyColor )
+ if ( TQApplication.colorSpec() == TQApplication.ManyColor )
options.setItemEnabled( cc, false );
options.setCheckable( true );
setMenuItemFlags();
menubar.insertSeparator();
- QPopupMenu help = new QPopupMenu( menubar );
+ TQPopupMenu help = new TQPopupMenu( menubar );
menubar.insertItem( "&Help", help );
- help.insertItem( "Help!", this, SLOT("giveHelp()"), new QKeySequence(CTRL+Key_H) );
+ help.insertItem( "Help!", this, SLOT("giveHelp()"), new TQKeySequence(CTRL+Key_H) );
connect( options, SIGNAL("activated(int)"), this, SLOT("doOption(int)") );
- status = new QLabel(this);
- status.setFrameStyle( QFrame.WinPanel | QFrame.Sunken );
+ status = new TQLabel(this);
+ status.setFrameStyle( TQFrame.WinPanel | TQFrame.Sunken );
status.setFixedHeight( fontMetrics().height() + 4 );
setMouseTracking( true );
@@ -142,7 +142,7 @@ ImageViewer( QWidget parent, String name, int wFlags )
void cleanUp()
{
if ( alloc_context != 0 )
- QColor.destroyAllocContext( alloc_context );
+ TQColor.destroyAllocContext( alloc_context );
if ( other == this )
other = null;
}
@@ -218,10 +218,10 @@ void setMenuItemFlags()
// Options
boolean may_need_color_dithering =
!valid_image
- || image.depth() == 32 && QPixmap.defaultDepth() < 24;
+ || image.depth() == 32 && TQPixmap.defaultDepth() < 24;
boolean may_need_dithering = may_need_color_dithering
|| image.depth() > 1 && options.isItemChecked(mo)
- || image.depth() > 1 && QPixmap.defaultDepth() == 1;
+ || image.depth() > 1 && TQPixmap.defaultDepth() == 1;
boolean has_alpha_mask = !valid_image || image.hasAlphaBuffer();
options.setItemEnabled( fd, may_need_dithering );
@@ -320,11 +320,11 @@ void updateStatus()
void saveImage( int item )
{
String fmt = saveimage.text(item);
- String savefilename = QFileDialog.getSaveFileName("", "",
+ String savefilename = TQFileDialog.getSaveFileName("", "",
this, filename);
if ( !savefilename.equals("") )
if ( !image.save( savefilename, fmt ) )
- QMessageBox.warning( this, "Save failed", "Error saving file" );
+ TQMessageBox.warning( this, "Save failed", "Error saving file" );
}
/*
@@ -333,11 +333,11 @@ void saveImage( int item )
void savePixmap( int item )
{
String fmt = savepixmap.text(item);
- String savefilename = QFileDialog.getSaveFileName("",
+ String savefilename = TQFileDialog.getSaveFileName("",
"", this, filename);
if ( !savefilename.equals("") )
if ( !pmScaled.save( savefilename, fmt ) )
- QMessageBox.warning( this, "Save failed", "Error saving file" );
+ TQMessageBox.warning( this, "Save failed", "Error saving file" );
}
@@ -353,7 +353,7 @@ void newWindow()
*/
void openFile()
{
- String newfilename = QFileDialog.getOpenFileName();
+ String newfilename = TQFileDialog.getOpenFileName();
if ( !newfilename.equals("") ) {
loadImage( newfilename ) ;
repaint(); // show image in widget
@@ -374,7 +374,7 @@ boolean loadImage( String fileName )
filename = fileName;
boolean ok = false;
if ( ! filename.equals("") ) {
- QApplication.setOverrideCursor( waitCursor() ); // this might take time
+ TQApplication.setOverrideCursor( waitCursor() ); // this might take time
ok = image.load(filename, null);
pickx[0] = -1;
clickx[0] = -1;
@@ -399,7 +399,7 @@ boolean loadImage( String fileName )
pm.resize(0,0); // couldn't load image
update();
}
- QApplication.restoreOverrideCursor(); // restore original cursor
+ TQApplication.restoreOverrideCursor(); // restore original cursor
}
updateStatus();
setMenuItemFlags();
@@ -413,20 +413,20 @@ boolean reconvertImage()
if ( image.isNull() ) return false;
if ( alloc_context != 0 ) {
- QColor.destroyAllocContext( alloc_context );
+ TQColor.destroyAllocContext( alloc_context );
alloc_context = 0;
}
if ( useColorContext() ) {
- alloc_context = QColor.enterAllocContext();
+ alloc_context = TQColor.enterAllocContext();
// Clear the image to hide flickering palette
- QPainter painter = new QPainter(this);
+ TQPainter painter = new TQPainter(this);
painter.eraseRect(0, menubar.heightForWidth( width() ), width(), height());
}
- QApplication.setOverrideCursor( waitCursor() ); // this might take time
+ TQApplication.setOverrideCursor( waitCursor() ); // this might take time
if ( pm.convertFromImage(image, conversion_flags) )
{
- pmScaled = new QPixmap();
+ pmScaled = new TQPixmap();
scale();
resize( width(), height() );
success = true; // load successful
@@ -435,10 +435,10 @@ boolean reconvertImage()
}
updateStatus();
setMenuItemFlags();
- QApplication.restoreOverrideCursor(); // restore original cursor
+ TQApplication.restoreOverrideCursor(); // restore original cursor
if ( useColorContext() )
- QColor.leaveAllocContext();
+ TQColor.leaveAllocContext();
return success; // true if loaded OK
}
@@ -464,7 +464,7 @@ void scale()
if ( image.isNull() ) return;
- QApplication.setOverrideCursor( waitCursor() ); // this might take time
+ TQApplication.setOverrideCursor( waitCursor() ); // this might take time
if ( width() == pm.width() && h == pm.height() )
{ // no need to scale if widget
pmScaled = pm; // size equals pixmap size
@@ -473,13 +473,13 @@ void scale()
pmScaled.convertFromImage(image.smoothScale(width(), h),
conversion_flags);
} else {
- QWMatrix m = new QWMatrix(); // transformation matrix
+ TQWMatrix m = new TQWMatrix(); // transformation matrix
m.scale(((double)width())/pm.width(),// define scale factors
((double)h)/pm.height());
- pmScaled = (QPixmap) pm.xForm( m ); // create scaled pixmap
+ pmScaled = (TQPixmap) pm.xForm( m ); // create scaled pixmap
}
}
- QApplication.restoreOverrideCursor(); // restore original cursor
+ TQApplication.restoreOverrideCursor(); // restore original cursor
}
/*
@@ -487,7 +487,7 @@ void scale()
scale() to fit the pixmap to the new widget size.
*/
-protected void resizeEvent( QResizeEvent e )
+protected void resizeEvent( TQResizeEvent e )
{
status.setGeometry(0, height() - status.height(),
width(), status.height());
@@ -505,7 +505,7 @@ protected void resizeEvent( QResizeEvent e )
erase();
}
-protected boolean convertEvent( QMouseEvent e, int[] x, int[] y)
+protected boolean convertEvent( TQMouseEvent e, int[] x, int[] y)
{
if ( pm.size().width() != 0 || pm.size().height() != 0 ) {
int h = height() - menubar.heightForWidth( width() ) - status.height();
@@ -521,12 +521,12 @@ protected boolean convertEvent( QMouseEvent e, int[] x, int[] y)
return false;
}
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
may_be_other = convertEvent(e, clickx, clicky);
}
-protected void mouseReleaseEvent( QMouseEvent e )
+protected void mouseReleaseEvent( TQMouseEvent e )
{
if ( may_be_other )
other = this;
@@ -535,7 +535,7 @@ protected void mouseReleaseEvent( QMouseEvent e )
/*
Record the pixel position of interest.
*/
-protected void mouseMoveEvent( QMouseEvent e )
+protected void mouseMoveEvent( TQMouseEvent e )
{
if (convertEvent(e,pickx,picky)) {
updateStatus();
@@ -553,10 +553,10 @@ protected void mouseMoveEvent( QMouseEvent e )
an error message if no legal pixmap has been loaded.
*/
-protected void paintEvent( QPaintEvent e )
+protected void paintEvent( TQPaintEvent e )
{
if ( pm.size().width() != 0 || pm.size().height() != 0 ) { // is an image loaded?
- QPainter painter = new QPainter(this);
+ TQPainter painter = new TQPainter(this);
painter.setClipRect(e.rect());
painter.drawPixmap(0, menubar.heightForWidth( width() ), pmScaled);
}
@@ -576,7 +576,7 @@ void giveHelp()
+ "</blockquote>"
+ "<p>Supported input formats:"
+ "<blockquote>";
- Iterator it = QImage.inputFormatList().iterator();
+ Iterator it = TQImage.inputFormatList().iterator();
if (it.hasNext())
helptext += (String) it.next();
while (it.hasNext()) {
@@ -584,8 +584,8 @@ void giveHelp()
}
helptext += "</blockquote>";
- helpmsg = new QMessageBox( "Help", helptext,
- QMessageBox.Information, QMessageBox.Ok, 0, 0, null, null, false );
+ helpmsg = new TQMessageBox( "Help", helptext,
+ TQMessageBox.Information, TQMessageBox.Ok, 0, 0, null, null, false );
}
helpmsg.show();
helpmsg.raise();
@@ -608,7 +608,7 @@ void copyFrom(ImageViewer s)
dy = picky[0];
sy -= sh-1;
}
- bitBlt( new QPixmap(image), dx, dy, new QPixmap(s.image), sx, sy, sw, sh );
+ bitBlt( new TQPixmap(image), dx, dy, new TQPixmap(s.image), sx, sy, sw, sh );
reconvertImage();
repaint( image.hasAlphaBuffer() );
}
@@ -631,19 +631,19 @@ void rot180()
void copy()
{
- QApplication.clipboard().setImage(image); // Less information loss
+ TQApplication.clipboard().setImage(image); // Less information loss
}
void paste()
{
- QImage p = QApplication.clipboard().image();
+ TQImage p = TQApplication.clipboard().image();
if ( !p.isNull() ) {
filename = "pasted";
setImage(p);
}
}
-void setImage(QImage newimage)
+void setImage(TQImage newimage)
{
image = newimage;
diff --git a/qtjava/javalib/examples/showimg/Main.java b/qtjava/javalib/examples/showimg/Main.java
index a72a39c9..97cc30a6 100644
--- a/qtjava/javalib/examples/showimg/Main.java
+++ b/qtjava/javalib/examples/showimg/Main.java
@@ -15,20 +15,20 @@ public class Main {
public static void main(String[] args)
{
if ( args.length > 0 && args[0].equals("-m") ) {
- QApplication.setColorSpec( QApplication.ManyColor );
+ TQApplication.setColorSpec( TQApplication.ManyColor );
}
else if ( args.length > 1 && args[1].equals("-n") ) {
- QApplication.setColorSpec( QApplication.NormalColor );
+ TQApplication.setColorSpec( TQApplication.NormalColor );
}
else {
- QApplication.setColorSpec( QApplication.CustomColor );
+ TQApplication.setColorSpec( TQApplication.CustomColor );
}
- QApplication.setFont( new QFont("Helvetica", 12) );
- QApplication a = new QApplication( args );
+ TQApplication.setFont( new TQFont("Helvetica", 12) );
+ TQApplication a = new TQApplication( args );
ImageIconProvider iip = new ImageIconProvider();
- QFileDialog.setIconProvider( iip );
+ TQFileDialog.setIconProvider( iip );
if ( args.length == 0 ) {
// Create a window which looks after its own existence.
@@ -47,7 +47,7 @@ public static void main(String[] args)
}
}
- 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/showimg/README b/qtjava/javalib/examples/showimg/README
index a6c9ca98..cf29b844 100644
--- a/qtjava/javalib/examples/showimg/README
+++ b/qtjava/javalib/examples/showimg/README
@@ -3,7 +3,7 @@ conversion facilities available. The CuteWidget can read a file into
a pixmap and resizes the displayed pixmap when the widget is resized.
Note that the function CuteWidget::paintEvent uses the drawPixmap function
-of QPainter to display the pixmap, the bitBlt function can also be used to
+of TQPainter to display the pixmap, the bitBlt function can also be used to
display pixmaps.
If you have installed the Qt imageio extension (see extensions/imageio
diff --git a/qtjava/javalib/examples/sound/SoundPlayer.java b/qtjava/javalib/examples/sound/SoundPlayer.java
index ad6cf7a7..81b7a932 100644
--- a/qtjava/javalib/examples/sound/SoundPlayer.java
+++ b/qtjava/javalib/examples/sound/SoundPlayer.java
@@ -11,13 +11,13 @@
import org.kde.qt.*;
-class SoundPlayer extends QMainWindow {
+class SoundPlayer extends TQMainWindow {
-private QSound bucket3;
-private QSound bucket4;
+private TQSound bucket3;
+private TQSound bucket4;
//
-// Very simple example of QSound.play(filename)
+// Very simple example of TQSound.play(filename)
//
// 99% of this program is just boilerplate Qt code to put up a nice
// window so you think something special is happening.
@@ -27,14 +27,14 @@ private QSound bucket4;
SoundPlayer()
{
super();
- bucket3 = new QSound("sounds/3.wav");
- bucket4 = new QSound("sounds/4.wav");
+ bucket3 = new TQSound("sounds/3.wav");
+ bucket4 = new TQSound("sounds/4.wav");
- if (!QSound.isAvailable()) {
+ if (!TQSound.isAvailable()) {
// Bail out. Programs in which sound is not critical
// could just silently (hehe) ignore the lack of a server.
//
- QMessageBox.warning(this,"No Sound",
+ TQMessageBox.warning(this,"No Sound",
"<p><b>Sorry, you are not running the Network Audio System.</b>"
+ "<p>If you have the `au' command, run it in the background before this program. "
+ "The latest release of the Network Audio System can be obtained from:"
@@ -48,11 +48,11 @@ SoundPlayer()
+ "<p>After installing NAS, you will then need to reconfigure Qt with NAS sound support");
}
- QPopupMenu file = new QPopupMenu(this);
- file.insertItem("Play &1", this, SLOT("doPlay1()"), new QKeySequence(CTRL+Key_1));
- file.insertItem("Play &2", this, SLOT("doPlay2()"), new QKeySequence(CTRL+Key_2));
- file.insertItem("Play from bucket &3", this, SLOT("doPlay3()"), new QKeySequence(CTRL+Key_3));
- file.insertItem("Play from bucket &4", this, SLOT("doPlay4()"), new QKeySequence(CTRL+Key_4));
+ TQPopupMenu file = new TQPopupMenu(this);
+ file.insertItem("Play &1", this, SLOT("doPlay1()"), new TQKeySequence(CTRL+Key_1));
+ file.insertItem("Play &2", this, SLOT("doPlay2()"), new TQKeySequence(CTRL+Key_2));
+ file.insertItem("Play from bucket &3", this, SLOT("doPlay3()"), new TQKeySequence(CTRL+Key_3));
+ file.insertItem("Play from bucket &4", this, SLOT("doPlay4()"), new TQKeySequence(CTRL+Key_4));
file.insertSeparator();
file.insertItem("Play 3 and 4 together", this, SLOT("doPlay34()"));
file.insertItem("Play all together", this, SLOT("doPlay1234()"));
@@ -63,12 +63,12 @@ SoundPlayer()
void doPlay1()
{
- QSound.play("sounds/1.wav");
+ TQSound.play("sounds/1.wav");
}
void doPlay2()
{
- QSound.play("sounds/2.wav");
+ TQSound.play("sounds/2.wav");
}
void doPlay3()
@@ -91,15 +91,15 @@ void doPlay34()
void doPlay1234()
{
// Some sound platforms will only play one sound at a time
- QSound.play("sounds/1.wav");
- QSound.play("sounds/2.wav");
+ TQSound.play("sounds/1.wav");
+ TQSound.play("sounds/2.wav");
bucket3.play();
bucket4.play();
}
public static void main(String[] args)
{
- QApplication app = new QApplication(args);
+ TQApplication app = new TQApplication(args);
SoundPlayer sp = new SoundPlayer();
app.setMainWidget(sp);
sp.setCaption("Qt Example - Sounds");
diff --git a/qtjava/javalib/examples/splitter/Test.java b/qtjava/javalib/examples/splitter/Test.java
index f174bc2b..99ff9aa8 100644
--- a/qtjava/javalib/examples/splitter/Test.java
+++ b/qtjava/javalib/examples/splitter/Test.java
@@ -12,23 +12,23 @@ import org.kde.qt.*;
-class Test extends QWidget {
+class Test extends TQWidget {
-Test(QWidget parent, String name)
+Test(TQWidget parent, String name)
{
this(parent, name, 0);
}
-Test(QWidget parent, String name, int f)
+Test(TQWidget parent, String name, int f)
{
super(parent, name, f);
}
-public void paintEvent(QPaintEvent e)
+public void paintEvent(TQPaintEvent e)
{
- QPainter p = new QPainter(this);
+ TQPainter p = new TQPainter(this);
p.setClipRect(e.rect());
int d = 1000; //large number
int x1 = 0;
@@ -53,11 +53,11 @@ public void paintEvent(QPaintEvent e)
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
- QSplitter s1 = new QSplitter( QSplitter.Vertical, null , "main" );
+ TQSplitter s1 = new TQSplitter( TQSplitter.Vertical, null , "main" );
- QSplitter s2 = new QSplitter( QSplitter.Horizontal, s1, "top" );
+ TQSplitter s2 = new TQSplitter( TQSplitter.Horizontal, s1, "top" );
Test t1 = new Test( s2, "topLeft" );
t1.setBackgroundColor( Qt.blue().light( 180 ) );
@@ -65,10 +65,10 @@ public static void main(String[] args)
Test t2 = new Test( s2, "topRight" );
t2.setBackgroundColor( Qt.green().light( 180 ) );
- s2.setResizeMode( t2, QSplitter.KeepSize );
+ s2.setResizeMode( t2, TQSplitter.KeepSize );
s2.moveToFirst( t2 );
- QSplitter s3 = new QSplitter( QSplitter.Horizontal, s1, "bottom" );
+ TQSplitter s3 = new TQSplitter( TQSplitter.Horizontal, s1, "bottom" );
Test t3 = new Test( s3, "bottomLeft" );
t3.setBackgroundColor( Qt.red() );
diff --git a/qtjava/javalib/examples/tabdialog/Main.java b/qtjava/javalib/examples/tabdialog/Main.java
index 27a0ef6a..200bd0f3 100644
--- a/qtjava/javalib/examples/tabdialog/Main.java
+++ b/qtjava/javalib/examples/tabdialog/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 );
TabDialog tabdialog = new TabDialog( null, "tabdialog", ( args.length < 1 ? "." : args[0] ) );
tabdialog.resize( 450, 350 );
diff --git a/qtjava/javalib/examples/tabdialog/TabDialog.java b/qtjava/javalib/examples/tabdialog/TabDialog.java
index 838bec10..bbfeb0ff 100644
--- a/qtjava/javalib/examples/tabdialog/TabDialog.java
+++ b/qtjava/javalib/examples/tabdialog/TabDialog.java
@@ -11,18 +11,18 @@
import org.kde.qt.*;
import java.text.*;
-class TabDialog extends QTabDialog
+class TabDialog extends TQTabDialog
{
protected String filename;
-protected QFileInfo fileinfo;
+protected TQFileInfo fileinfo;
-TabDialog( QWidget parent, String name, String _filename )
+TabDialog( TQWidget parent, String name, String _filename )
{
super( parent, name );
filename = _filename;
- fileinfo = new QFileInfo(filename);
+ fileinfo = new TQFileInfo(filename);
setupTab1();
setupTab2();
setupTab3();
@@ -32,82 +32,82 @@ TabDialog( QWidget parent, String name, String _filename )
void setupTab1()
{
- QVBox tab1 = new QVBox( this );
+ TQVBox tab1 = new TQVBox( this );
tab1.setMargin( 5 );
- new QLabel( "Filename:", tab1 );
- QLineEdit fname = new QLineEdit( filename, tab1 );
+ new TQLabel( "Filename:", tab1 );
+ TQLineEdit fname = new TQLineEdit( filename, tab1 );
fname.setFocus();
- new QLabel( "Path:", tab1 );
- QLabel path = new QLabel( fileinfo.dirPath( true ), tab1 );
- path.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Path:", tab1 );
+ TQLabel path = new TQLabel( fileinfo.dirPath( true ), tab1 );
+ path.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
- new QLabel( "Size:", tab1 );
- QLabel size = new QLabel( fileinfo.size() + " KB", tab1 );
- size.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Size:", tab1 );
+ TQLabel size = new TQLabel( fileinfo.size() + " KB", tab1 );
+ size.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
SimpleDateFormat dateFormat = new SimpleDateFormat("EE MMM d hh:mm:ss yyyy");
- new QLabel( "Last Read:", tab1 );
- QLabel lread = new QLabel( dateFormat.format(fileinfo.lastRead().getTime()), tab1 );
- lread.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Last Read:", tab1 );
+ TQLabel lread = new TQLabel( dateFormat.format(fileinfo.lastRead().getTime()), tab1 );
+ lread.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
- new QLabel( "Last Modified:", tab1 );
- QLabel lmodif = new QLabel( dateFormat.format(fileinfo.lastModified().getTime()), tab1 );
- lmodif.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Last Modified:", tab1 );
+ TQLabel lmodif = new TQLabel( dateFormat.format(fileinfo.lastModified().getTime()), tab1 );
+ lmodif.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
addTab( tab1, "General" );
}
void setupTab2()
{
- QVBox tab2 = new QVBox( this );
+ TQVBox tab2 = new TQVBox( this );
tab2.setMargin( 5 );
- QButtonGroup bg = new QButtonGroup( 1, QGroupBox.Horizontal, "Permissions", tab2 );
+ TQButtonGroup bg = new TQButtonGroup( 1, TQGroupBox.Horizontal, "Permissions", tab2 );
- QCheckBox readable = new QCheckBox( "Readable", bg );
+ TQCheckBox readable = new TQCheckBox( "Readable", bg );
if ( fileinfo.isReadable() )
readable.setChecked( true );
- QCheckBox writable = new QCheckBox( "Writeable", bg );
+ TQCheckBox writable = new TQCheckBox( "Writeable", bg );
if ( fileinfo.isWritable() )
writable.setChecked( true );
- QCheckBox executable = new QCheckBox( "Executable", bg );
+ TQCheckBox executable = new TQCheckBox( "Executable", bg );
if ( fileinfo.isExecutable() )
executable.setChecked( true );
- QButtonGroup bg2 = new QButtonGroup( 2, QGroupBox.Horizontal, "Owner", tab2 );
+ TQButtonGroup bg2 = new TQButtonGroup( 2, TQGroupBox.Horizontal, "Owner", tab2 );
- new QLabel( "Owner", bg2 );
- QLabel owner = new QLabel( fileinfo.owner(), bg2 );
- owner.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Owner", bg2 );
+ TQLabel owner = new TQLabel( fileinfo.owner(), bg2 );
+ owner.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
- new QLabel( "Group", bg2 );
- QLabel group = new QLabel( fileinfo.group(), bg2 );
- group.setFrameStyle( QFrame.Panel | QFrame.Sunken );
+ new TQLabel( "Group", bg2 );
+ TQLabel group = new TQLabel( fileinfo.group(), bg2 );
+ group.setFrameStyle( TQFrame.Panel | TQFrame.Sunken );
addTab( tab2, "Permissions" );
}
void setupTab3()
{
- QVBox tab3 = new QVBox( this );
+ TQVBox tab3 = new TQVBox( this );
tab3.setMargin( 5 );
tab3.setSpacing( 5 );
- new QLabel( "Open " + filename + " with:", tab3 );
+ new TQLabel( "Open " + filename + " with:", tab3 );
- QListBox prgs = new QListBox( tab3 );
+ TQListBox prgs = new TQListBox( tab3 );
for ( int i = 0; i < 30; i++ ) {
String prg = "Application " + i;
prgs.insertItem( prg );
}
prgs.setCurrentItem( 3 );
- new QCheckBox( "Open files with the extension '" + fileinfo.extension() + "' always with this application", tab3 );
+ new TQCheckBox( "Open files with the extension '" + fileinfo.extension() + "' always with this application", tab3 );
addTab( tab3, "Applications" );
}
diff --git a/qtjava/javalib/examples/table/small-table-demo/Main.java b/qtjava/javalib/examples/table/small-table-demo/Main.java
index a3e38843..f848adc2 100644
--- a/qtjava/javalib/examples/table/small-table-demo/Main.java
+++ b/qtjava/javalib/examples/table/small-table-demo/Main.java
@@ -10,7 +10,7 @@
import org.kde.qt.*;
-public class Main extends QObject {
+public class Main extends TQObject {
// Qt logo: static String qtlogo_xpm[]
/* XPM */
@@ -146,30 +146,30 @@ static int numCols = 10;
public static void main(String[] args)
{
- QApplication app = new QApplication( args );
+ TQApplication app = new TQApplication( args );
- QTable table = new QTable( numRows, numCols );
+ TQTable table = new TQTable( numRows, numCols );
- QHeader header = table.horizontalHeader();
+ TQHeader header = table.horizontalHeader();
header.setLabel( 0, "Tiny", 40 );
header.setLabel( 1, "Checkboxes" );
header.setLabel( 5, "Combos" );
header.setMovingEnabled(true);
- QImage img = new QImage( qtlogo_xpm );
- QPixmap pix = new QPixmap(img.scaleHeight( table.rowHeight(3) ));
+ TQImage img = new TQImage( qtlogo_xpm );
+ TQPixmap pix = new TQPixmap(img.scaleHeight( table.rowHeight(3) ));
table.setPixmap( 3, 2, pix );
table.setText( 3, 2, "A Pixmap" );
String[] comboEntries = { "one", "two", "three", "four" };
for ( int i = 0; i < numRows; ++i ){
- QComboTableItem item = new QComboTableItem( table, comboEntries, false );
+ TQComboTableItem item = new TQComboTableItem( table, comboEntries, false );
item.setCurrentItem( i % 4 );
table.setItem( i, 5, item );
}
for ( int j = 0; j < numRows; ++j )
- table.setItem( j, 1, new QCheckTableItem( table, "Check me" ) );
+ table.setItem( j, 1, new TQCheckTableItem( table, "Check me" ) );
app.setMainWidget( table );
table.show();
diff --git a/qtjava/javalib/examples/textedit/Main.java b/qtjava/javalib/examples/textedit/Main.java
index c1597460..43cbb636 100644
--- a/qtjava/javalib/examples/textedit/Main.java
+++ b/qtjava/javalib/examples/textedit/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 );
TextEdit mw = new TextEdit();
mw.setCaption( "Richtext Editor" );
mw.resize( 640, 800 );
diff --git a/qtjava/javalib/examples/textedit/TextEdit.java b/qtjava/javalib/examples/textedit/TextEdit.java
index c4adfa7a..2b4f9a3a 100644
--- a/qtjava/javalib/examples/textedit/TextEdit.java
+++ b/qtjava/javalib/examples/textedit/TextEdit.java
@@ -11,11 +11,11 @@
import org.kde.qt.*;
import java.util.HashMap;
-class TextEdit extends QMainWindow
+class TextEdit extends TQMainWindow
{
-private QAction actionTextBold,
+private TQAction actionTextBold,
actionTextUnderline,
actionTextItalic,
actionTextColor,
@@ -23,10 +23,10 @@ private QAction actionTextBold,
actionAlignCenter,
actionAlignRight,
actionAlignJustify;
- QComboBox comboStyle,
+ TQComboBox comboStyle,
comboFont,
comboSize;
-private QTabWidget tabWidget;
+private TQTabWidget tabWidget;
private HashMap filenames = new HashMap();
@@ -36,16 +36,16 @@ TextEdit( )
this(null, null);
}
-TextEdit( QWidget parent, String name )
+TextEdit( TQWidget parent, String name )
{
super( parent, name );
setupFileActions();
setupEditActions();
setupTextActions();
- tabWidget = new QTabWidget( this );
- connect( tabWidget, SIGNAL(" currentChanged( QWidget )"),
- this, SLOT(" editorChanged( QWidget )") );
+ tabWidget = new TQTabWidget( this );
+ connect( tabWidget, SIGNAL(" currentChanged( TQWidget )"),
+ this, SLOT(" editorChanged( TQWidget )") );
setCentralWidget( tabWidget );
if ( qApp().args().length == 0 ) {
@@ -58,67 +58,67 @@ TextEdit( QWidget parent, String name )
void setupFileActions()
{
- QToolBar tb = new QToolBar( this );
+ TQToolBar tb = new TQToolBar( this );
tb.setLabel( "File Actions" );
- QPopupMenu menu = new QPopupMenu( this );
+ TQPopupMenu menu = new TQPopupMenu( this );
menuBar().insertItem( tr( "&File" ), menu );
- QAction a;
- a = new QAction( tr( "New" ), new QIconSet(new QPixmap( "filenew.xpm" )), tr( "&New..." ), new QKeySequence(CTRL + Key_N), this, "fileNew" );
+ TQAction a;
+ a = new TQAction( tr( "New" ), new TQIconSet(new TQPixmap( "filenew.xpm" )), tr( "&New..." ), new TQKeySequence(CTRL + Key_N), this, "fileNew" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileNew()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Open" ), new QIconSet(new QPixmap( "fileopen.xpm" )), tr( "&Open..." ), new QKeySequence(CTRL + Key_O), this, "fileOpen" );
+ a = new TQAction( tr( "Open" ), new TQIconSet(new TQPixmap( "fileopen.xpm" )), tr( "&Open..." ), new TQKeySequence(CTRL + Key_O), this, "fileOpen" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileOpen()") );
a.addTo( tb );
a.addTo( menu );
menu.insertSeparator();
- a = new QAction( tr( "Save" ), new QIconSet(new QPixmap( "filesave.xpm" )), tr( "&Save..." ), new QKeySequence(CTRL + Key_S), this, "fileSave" );
+ a = new TQAction( tr( "Save" ), new TQIconSet(new TQPixmap( "filesave.xpm" )), tr( "&Save..." ), new TQKeySequence(CTRL + Key_S), this, "fileSave" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileSave()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Save As" ), new QIconSet(new QPixmap()), tr( "Save &As..." ), new QKeySequence(0), this, "fileSaveAs" );
+ a = new TQAction( tr( "Save As" ), new TQIconSet(new TQPixmap()), tr( "Save &As..." ), new TQKeySequence(0), this, "fileSaveAs" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileSaveAs()") );
a.addTo( menu );
menu.insertSeparator();
- a = new QAction( tr( "Print" ), new QIconSet(new QPixmap( "fileprint.xpm" )), tr( "&Print..." ), new QKeySequence(CTRL + Key_P), this, "filePrint" );
+ a = new TQAction( tr( "Print" ), new TQIconSet(new TQPixmap( "fileprint.xpm" )), tr( "&Print..." ), new TQKeySequence(CTRL + Key_P), this, "filePrint" );
connect( a, SIGNAL(" activated()"), this, SLOT(" filePrint()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Close" ), new QIconSet(new QPixmap()), tr( "&Close" ), new QKeySequence(0), this, "fileClose" );
+ a = new TQAction( tr( "Close" ), new TQIconSet(new TQPixmap()), tr( "&Close" ), new TQKeySequence(0), this, "fileClose" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileClose()") );
a.addTo( menu );
- a = new QAction( tr( "Exit" ), new QIconSet(new QPixmap()), tr( "E&xit" ), new QKeySequence(0), this, "fileExit" );
+ a = new TQAction( tr( "Exit" ), new TQIconSet(new TQPixmap()), tr( "E&xit" ), new TQKeySequence(0), this, "fileExit" );
connect( a, SIGNAL(" activated()"), this, SLOT(" fileExit()") );
a.addTo( menu );
}
void setupEditActions()
{
- QToolBar tb = new QToolBar( this );
+ TQToolBar tb = new TQToolBar( this );
tb.setLabel( "Edit Actions" );
- QPopupMenu menu = new QPopupMenu( this );
+ TQPopupMenu menu = new TQPopupMenu( this );
menuBar().insertItem( tr( "&Edit" ), menu );
- QAction a;
- a = new QAction( tr( "Undo" ), new QIconSet(new QPixmap( "editundo.xpm" )), tr( "&Undo" ), new QKeySequence(CTRL + Key_Z), this, "editUndo" );
+ TQAction a;
+ a = new TQAction( tr( "Undo" ), new TQIconSet(new TQPixmap( "editundo.xpm" )), tr( "&Undo" ), new TQKeySequence(CTRL + Key_Z), this, "editUndo" );
connect( a, SIGNAL(" activated()"), this, SLOT(" editUndo()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Redo" ), new QIconSet(new QPixmap( "editredo.xpm" )), tr( "&Redo" ), new QKeySequence(CTRL + Key_Y), this, "editRedo" );
+ a = new TQAction( tr( "Redo" ), new TQIconSet(new TQPixmap( "editredo.xpm" )), tr( "&Redo" ), new TQKeySequence(CTRL + Key_Y), this, "editRedo" );
connect( a, SIGNAL(" activated()"), this, SLOT(" editRedo()") );
a.addTo( tb );
a.addTo( menu );
menu.insertSeparator();
- a = new QAction( tr( "Copy" ), new QIconSet(new QPixmap( "editcopy.xpm" )), tr( "&Copy" ), new QKeySequence(CTRL + Key_C), this, "editCopy" );
+ a = new TQAction( tr( "Copy" ), new TQIconSet(new TQPixmap( "editcopy.xpm" )), tr( "&Copy" ), new TQKeySequence(CTRL + Key_C), this, "editCopy" );
connect( a, SIGNAL(" activated()"), this, SLOT(" editCopy()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Cut" ), new QIconSet(new QPixmap( "editcut.xpm" )), tr( "Cu&t" ), new QKeySequence(CTRL + Key_X), this, "editCut" );
+ a = new TQAction( tr( "Cut" ), new TQIconSet(new TQPixmap( "editcut.xpm" )), tr( "Cu&t" ), new TQKeySequence(CTRL + Key_X), this, "editCut" );
connect( a, SIGNAL(" activated()"), this, SLOT(" editCut()") );
a.addTo( tb );
a.addTo( menu );
- a = new QAction( tr( "Paste" ), new QIconSet(new QPixmap( "editpaste.xpm" )), tr( "&Paste" ), new QKeySequence(CTRL + Key_V), this, "editPaste" );
+ a = new TQAction( tr( "Paste" ), new TQIconSet(new TQPixmap( "editpaste.xpm" )), tr( "&Paste" ), new TQKeySequence(CTRL + Key_V), this, "editPaste" );
connect( a, SIGNAL(" activated()"), this, SLOT(" editPaste()") );
a.addTo( tb );
a.addTo( menu );
@@ -126,12 +126,12 @@ void setupEditActions()
void setupTextActions()
{
- QToolBar tb = new QToolBar( this );
+ TQToolBar tb = new TQToolBar( this );
tb.setLabel( "Format Actions" );
- QPopupMenu menu = new QPopupMenu( this );
+ TQPopupMenu menu = new TQPopupMenu( this );
menuBar().insertItem( tr( "F&ormat" ), menu );
- comboStyle = new QComboBox( false, tb );
+ comboStyle = new TQComboBox( false, tb );
comboStyle.insertItem( "Standard" );
comboStyle.insertItem( "Bullet List (Disc)" );
comboStyle.insertItem( "Bullet List (Circle)" );
@@ -142,64 +142,64 @@ void setupTextActions()
connect( comboStyle, SIGNAL(" activated( int )"),
this, SLOT(" textStyle( int )") );
- comboFont = new QComboBox( true, tb );
- QFontDatabase db = new QFontDatabase();
+ comboFont = new TQComboBox( true, tb );
+ TQFontDatabase db = new TQFontDatabase();
comboFont.insertStringList( (String[]) db.families().toArray(new String[0]) );
connect( comboFont, SIGNAL(" activated( String )"),
this, SLOT(" textFamily( String )") );
- comboFont.lineEdit().setText( QApplication.font().family() );
+ comboFont.lineEdit().setText( TQApplication.font().family() );
- comboSize = new QComboBox( true, tb );
+ comboSize = new TQComboBox( true, tb );
int[] sizes = db.standardSizes();
for (int i = 0; i < sizes.length; i++ )
comboSize.insertItem( Integer.toString(sizes[i]) );
connect( comboSize, SIGNAL(" activated( String )"),
this, SLOT(" textSize( String )") );
- comboSize.lineEdit().setText( Integer.toString( QApplication.font().pointSize() ) );
+ comboSize.lineEdit().setText( Integer.toString( TQApplication.font().pointSize() ) );
- actionTextBold = new QAction( tr( "Bold" ), new QIconSet(new QPixmap( "textbold.xpm" )), tr( "&Bold" ), new QKeySequence(CTRL + Key_B), this, "textBold" );
+ actionTextBold = new TQAction( tr( "Bold" ), new TQIconSet(new TQPixmap( "textbold.xpm" )), tr( "&Bold" ), new TQKeySequence(CTRL + Key_B), this, "textBold" );
connect( actionTextBold, SIGNAL(" activated()"), this, SLOT(" textBold()") );
actionTextBold.addTo( tb );
actionTextBold.addTo( menu );
actionTextBold.setToggleAction( true );
- actionTextItalic = new QAction( tr( "Italic" ), new QIconSet(new QPixmap( "textitalic.xpm" )), tr( "&Italic" ), new QKeySequence(CTRL + Key_I), this, "textItalic" );
+ actionTextItalic = new TQAction( tr( "Italic" ), new TQIconSet(new TQPixmap( "textitalic.xpm" )), tr( "&Italic" ), new TQKeySequence(CTRL + Key_I), this, "textItalic" );
connect( actionTextItalic, SIGNAL(" activated()"), this, SLOT(" textItalic()") );
actionTextItalic.addTo( tb );
actionTextItalic.addTo( menu );
actionTextItalic.setToggleAction( true );
- actionTextUnderline = new QAction( tr( "Underline" ), new QIconSet(new QPixmap( "textunder.xpm" )), tr( "&Underline" ), new QKeySequence(CTRL + Key_U), this, "textUnderline" );
+ actionTextUnderline = new TQAction( tr( "Underline" ), new TQIconSet(new TQPixmap( "textunder.xpm" )), tr( "&Underline" ), new TQKeySequence(CTRL + Key_U), this, "textUnderline" );
connect( actionTextUnderline, SIGNAL(" activated()"), this, SLOT(" textUnderline()") );
actionTextUnderline.addTo( tb );
actionTextUnderline.addTo( menu );
actionTextUnderline.setToggleAction( true );
menu.insertSeparator();
- QActionGroup grp = new QActionGroup( this );
+ TQActionGroup grp = new TQActionGroup( this );
grp.setExclusive( true );
- connect( grp, SIGNAL(" selected( QAction )"), this, SLOT(" textAlign( QAction )") );
+ connect( grp, SIGNAL(" selected( TQAction )"), this, SLOT(" textAlign( TQAction )") );
- actionAlignLeft = new QAction( tr( "Left" ), new QIconSet(new QPixmap( "textleft.xpm" )), tr( "&Left" ), new QKeySequence(CTRL + Key_L), grp, "textLeft" );
+ actionAlignLeft = new TQAction( tr( "Left" ), new TQIconSet(new TQPixmap( "textleft.xpm" )), tr( "&Left" ), new TQKeySequence(CTRL + Key_L), grp, "textLeft" );
actionAlignLeft.addTo( tb );
actionAlignLeft.addTo( menu );
actionAlignLeft.setToggleAction( true );
- actionAlignCenter = new QAction( tr( "Center" ), new QIconSet(new QPixmap( "textcenter.xpm" )), tr( "C&enter" ), new QKeySequence(CTRL + Key_E), grp, "textCenter" );
+ actionAlignCenter = new TQAction( tr( "Center" ), new TQIconSet(new TQPixmap( "textcenter.xpm" )), tr( "C&enter" ), new TQKeySequence(CTRL + Key_E), grp, "textCenter" );
actionAlignCenter.addTo( tb );
actionAlignCenter.addTo( menu );
actionAlignCenter.setToggleAction( true );
- actionAlignRight = new QAction( tr( "Right" ), new QIconSet(new QPixmap( "textright.xpm" )), tr( "&Right" ), new QKeySequence(CTRL + Key_R), grp, "textRight" );
+ actionAlignRight = new TQAction( tr( "Right" ), new TQIconSet(new TQPixmap( "textright.xpm" )), tr( "&Right" ), new TQKeySequence(CTRL + Key_R), grp, "textRight" );
actionAlignRight.addTo( tb );
actionAlignRight.addTo( menu );
actionAlignRight.setToggleAction( true );
- actionAlignJustify = new QAction( tr( "Justify" ), new QIconSet(new QPixmap( "textjustify.xpm" )), tr( "&Justify" ), new QKeySequence(CTRL + Key_J), grp, "textjustify" );
+ actionAlignJustify = new TQAction( tr( "Justify" ), new TQIconSet(new TQPixmap( "textjustify.xpm" )), tr( "&Justify" ), new TQKeySequence(CTRL + Key_J), grp, "textjustify" );
actionAlignJustify.addTo( tb );
actionAlignJustify.addTo( menu );
actionAlignJustify.setToggleAction( true );
menu.insertSeparator();
- QPixmap pix = new QPixmap( 16, 16 );
+ TQPixmap pix = new TQPixmap( 16, 16 );
pix.fill( black() );
- actionTextColor = new QAction( tr( "Color" ), new QIconSet(pix), tr( "&Color..." ), new QKeySequence(0), this, "textColor" );
+ actionTextColor = new TQAction( tr( "Color" ), new TQIconSet(pix), tr( "&Color..." ), new TQKeySequence(0), this, "textColor" );
connect( actionTextColor, SIGNAL(" activated()"), this, SLOT(" textColor()") );
actionTextColor.addTo( tb );
actionTextColor.addTo( menu );
@@ -207,42 +207,42 @@ void setupTextActions()
void load( String f )
{
- if ( !QFile.exists( f ) )
+ if ( !TQFile.exists( f ) )
return;
- QTextEdit edit = new QTextEdit( tabWidget );
+ TQTextEdit edit = new TQTextEdit( tabWidget );
doConnections( edit );
- tabWidget.addTab( edit, new QFileInfo( f ).fileName() );
- QFile file = new QFile( f );
- if ( !file.open( QIODevice.IO_ReadOnly ) )
+ tabWidget.addTab( edit, new TQFileInfo( f ).fileName() );
+ TQFile file = new TQFile( f );
+ if ( !file.open( TQIODevice.IO_ReadOnly ) )
return;
- QTextStream ts = new QTextStream( file );
+ TQTextStream ts = new TQTextStream( file );
edit.setText( ts.read() );
tabWidget.showPage( edit );
edit.viewport().setFocus();
filenames.put( edit, f );
}
-QTextEdit currentEditor()
+TTQTextEdit currentEditor()
{
if ( tabWidget.currentPage() != null &&
- tabWidget.currentPage().inherits( "QTextEdit" ) )
- return (QTextEdit)tabWidget.currentPage();
+ tabWidget.currentPage().inherits( "TQTextEdit" ) )
+ return (TQTextEdit)tabWidget.currentPage();
return null;
}
-void doConnections( QTextEdit e )
+void doConnections( TQTextEdit e )
{
- connect( e, SIGNAL(" currentFontChanged( QFont )"),
- this, SLOT(" fontChanged( QFont )") );
- connect( e, SIGNAL(" currentColorChanged( QColor )"),
- this, SLOT(" colorChanged( QColor )") );
+ connect( e, SIGNAL(" currentFontChanged( TQFont )"),
+ this, SLOT(" fontChanged( TQFont )") );
+ connect( e, SIGNAL(" currentColorChanged( TQColor )"),
+ this, SLOT(" colorChanged( TQColor )") );
connect( e, SIGNAL(" currentAlignmentChanged( int )"),
this, SLOT(" alignmentChanged( int )") );
}
void fileNew()
{
- QTextEdit edit = new QTextEdit( tabWidget );
+ TQTextEdit edit = new TQTextEdit( tabWidget );
edit.setTextFormat( RichText );
doConnections( edit );
tabWidget.addTab( edit, tr( "noname" ) );
@@ -252,7 +252,7 @@ void fileNew()
void fileOpen()
{
- String fn = QFileDialog.getOpenFileName( "", tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
+ String fn = TQFileDialog.getOpenFileName( "", tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
if ( !fn.equals("") )
load( fn );
}
@@ -265,10 +265,10 @@ void fileSave()
if ( !filenames.containsKey( currentEditor() ) ) {
fileSaveAs();
} else {
- QFile file = new QFile( (String) filenames.get( currentEditor() ) );
- if ( !file.open( QIODevice.IO_WriteOnly ) )
+ TQFile file = new TQFile( (String) filenames.get( currentEditor() ) );
+ if ( !file.open( TQIODevice.IO_WriteOnly ) )
return;
- QTextStream ts = new QTextStream( file );
+ TQTextStream ts = new TQTextStream( file );
ts.writeRawBytes(currentEditor().text(), currentEditor().text().length());
}
}
@@ -277,11 +277,11 @@ void fileSaveAs()
{
if ( currentEditor() == null )
return;
- String fn = QFileDialog.getSaveFileName( "", tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
+ String fn = TQFileDialog.getSaveFileName( "", tr( "HTML-Files (*.htm *.html);;All Files (*)" ), this );
if ( !fn.equals("") ) {
filenames.put( currentEditor(), fn );
fileSave();
- tabWidget.setTabLabel( currentEditor(), new QFileInfo( fn ).fileName() );
+ tabWidget.setTabLabel( currentEditor(), new TQFileInfo( fn ).fileName() );
}
}
@@ -289,24 +289,24 @@ void filePrint()
{
if ( currentEditor() == null )
return;
- QPrinter printer = new QPrinter();
+ TQPrinter printer = new TQPrinter();
printer.setFullPage(true);
if ( printer.setup( this ) ) {
- QPainter p = new QPainter( printer );
+ TQPainter p = new TQPainter( printer );
// Check that there is a valid device to print to.
if ( p.device() == null ) return;
- QPaintDeviceMetrics metrics = new QPaintDeviceMetrics( p.device() );
+ 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 );
- QSimpleRichText richText = new QSimpleRichText( currentEditor().text(), font, currentEditor().context(), currentEditor().styleSheet(),
+ TQFont font = new TQFont( "times", 10 );
+ TQSimpleRichText richText = new TQSimpleRichText( currentEditor().text(), font, currentEditor().context(), currentEditor().styleSheet(),
currentEditor().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() );
@@ -412,19 +412,19 @@ void textStyle( int i )
if ( currentEditor() == null )
return;
if ( i == 0 )
- currentEditor().setParagType( QStyleSheetItem.DisplayBlock, QStyleSheetItem.ListDisc );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayBlock, TQStyleSheetItem.ListDisc );
else if ( i == 1 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListDisc );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListDisc );
else if ( i == 2 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListCircle );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListCircle );
else if ( i == 3 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListSquare );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListSquare );
else if ( i == 4 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListDecimal );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListDecimal );
else if ( i == 5 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListLowerAlpha );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListLowerAlpha );
else if ( i == 6 )
- currentEditor().setParagType( QStyleSheetItem.DisplayListItem, QStyleSheetItem.ListUpperAlpha );
+ currentEditor().setParagType( TQStyleSheetItem.DisplayListItem, TQStyleSheetItem.ListUpperAlpha );
currentEditor().viewport().setFocus();
}
@@ -432,16 +432,16 @@ void textColor()
{
if ( currentEditor() == null )
return;
- QColor col = QColorDialog.getColor( currentEditor().color(), this );
+ TQColor col = TQColorDialog.getColor( currentEditor().color(), this );
if ( !col.isValid() )
return;
currentEditor().setColor( col );
- QPixmap pix = new QPixmap( 16, 16 );
+ TQPixmap pix = new TQPixmap( 16, 16 );
pix.fill( black() );
- actionTextColor.setIconSet( new QIconSet(pix) );
+ actionTextColor.setIconSet( new TQIconSet(pix) );
}
-void textAlign( QAction a )
+void textAlign( TQAction a )
{
if ( currentEditor() == null )
return;
@@ -455,7 +455,7 @@ void textAlign( QAction a )
currentEditor().setAlignment( AlignJustify );
}
-void fontChanged( QFont f )
+void fontChanged( TQFont f )
{
comboFont.lineEdit().setText( f.family() );
comboSize.lineEdit().setText( Integer.toString( f.pointSize() ) );
@@ -464,11 +464,11 @@ void fontChanged( QFont f )
actionTextUnderline.setOn( f.underline() );
}
-void colorChanged( QColor c )
+void colorChanged( TQColor c )
{
- QPixmap pix = new QPixmap( 16, 16 );
+ TQPixmap pix = new TQPixmap( 16, 16 );
pix.fill( c );
- actionTextColor.setIconSet( new QIconSet(pix) );
+ actionTextColor.setIconSet( new TQIconSet(pix) );
}
void alignmentChanged( int a )
@@ -483,7 +483,7 @@ void alignmentChanged( int a )
actionAlignJustify.setOn( true );
}
-void editorChanged( QWidget w )
+void editorChanged( TQWidget w )
{
if ( currentEditor() == null )
return;
diff --git a/qtjava/javalib/examples/textedit/example.html b/qtjava/javalib/examples/textedit/example.html
index b6b1cf5b..cc802550 100644
--- a/qtjava/javalib/examples/textedit/example.html
+++ b/qtjava/javalib/examples/textedit/example.html
@@ -1,29 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head>
-<title>Qt Toolkit - TQLabel Class</title><style type="text/css"><!--
+<title>Qt Toolkit - TTQLabel Class</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }
--></style>
</head><body bgcolor="#ffffff">
-<h1 align=center>TQLabel Class Reference</h1><br clear="all">
+<h1 align=center>TTQLabel Class Reference</h1><br clear="all">
<p>
-The TQLabel widget provides a static information display
+The TTQLabel widget provides a static information display
<a href="#details">More...</a>
<p>
<code>#include &lt;<a href="qlabel-h.html">tqlabel.h</a>&gt;</code>
<p>
-Inherits <a href="tqframe.html">TQFrame</a>.
+Inherits <a href="tqframe.html">TTQFrame</a>.
<p><a href="qlabel-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
-<li><div class="fn"><a href="#39107d"><b>TQLabel</b></a>�(�QWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
-<li><div class="fn"><a href="#2bafbb"><b>TQLabel</b></a>�(�const�QString�&amp;�text, QWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
-<li><div class="fn"><a href="#5514c7"><b>TQLabel</b></a>�(�QWidget�*�buddy, const�QString�&amp;, QWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
-<li><div class="fn"><a href="#9958af"><b>~TQLabel</b></a>�()�</div>
-<li><div class="fn">QString�<a href="#72cf09"><b>text</b></a>�()�const</div>
-<li><div class="fn">TQPixmap*�<a href="#101ecb"><b>pixmap</b></a>�()�const</div>
-<li><div class="fn">TQMovie*�<a href="#7dcdfe"><b>movie</b></a>�()�const</div>
+<li><div class="fn"><a href="#39107d"><b>TTQLabel</b></a>�(�QWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
+<li><div class="fn"><a href="#2bafbb"><b>TTQLabel</b></a>�(�const�QString�&amp;�text, TQWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
+<li><div class="fn"><a href="#5514c7"><b>TTQLabel</b></a>�(�QWidget�*�buddy, const�QString�&amp;, TQWidget�*�parent, const�char�*�name=0, WFlags�f=0�)�</div>
+<li><div class="fn"><a href="#9958af"><b>~TTQLabel</b></a>�()�</div>
+<li><div class="fn">TQString�<a href="#72cf09"><b>text</b></a>�()�const</div>
+<li><div class="fn">TTQPixmap*�<a href="#101ecb"><b>pixmap</b></a>�()�const</div>
+<li><div class="fn">TTQMovie*�<a href="#7dcdfe"><b>movie</b></a>�()�const</div>
<li><div class="fn">TextFormat�<a href="#0b92ed"><b>textFormat</b></a>�()�const</div>
<li><div class="fn">void�<a href="#5de3f9"><b>setTextFormat</b></a>�(�TextFormat�)�</div>
<li><div class="fn">int�<a href="#2fcaa3"><b>alignment</b></a>�()�const</div>
@@ -35,7 +35,7 @@ Inherits <a href="tqframe.html">TQFrame</a>.
<li><div class="fn">bool�<a href="#7e1f73"><b>hasScaledContents</b></a>�()�const</div>
<li><div class="fn">void�<a href="#e9e3cf"><b>setScaledContents</b></a>�(�bool�)�</div>
<li><div class="fn">virtual�void�<a href="#191701"><b>setBuddy</b></a>�(�QWidget�*�)�</div>
-<li><div class="fn">TQWidget*�<a href="#123954"><b>buddy</b></a>�()�const</div>
+<li><div class="fn">TTQWidget*�<a href="#123954"><b>buddy</b></a>�()�const</div>
</ul>
<h2>Public Slots</h2>
<ul>
@@ -54,137 +54,137 @@ Inherits <a href="tqframe.html">TQFrame</a>.
<h2>Properties</h2>
<table border=1 cellpadding=3 cellspacing=0>
<tr><th>Type<th>Name<th>READ<th>WRITE<th>Options
-<tr><td>TQString<td>text<td>text<td>setText<td>&nbsp;
+<tr><td>TTQString<td>text<td>text<td>setText<td>&nbsp;
<tr><td>TextFormat<td>textFormat<td>textFormat<td>setTextFormat<td>&nbsp;
-<tr><td>TQPixmap<td>pixmap<td>pixmap<td>setPixmap<td>&nbsp;
+<tr><td>TTQPixmap<td>pixmap<td>pixmap<td>setPixmap<td>&nbsp;
<tr><td>bool<td>scaledContents<td>hasScaledContents<td>setScaledContents<td>&nbsp;
<tr><td>Alignment<td>alignment<td>alignment<td>setAlignment<td>&nbsp;
<tr><td>int<td>indent<td>indent<td>setIndent<td>&nbsp;
</table>
<p>
<hr><h2><a name="details"></a>Detailed Description</h2>
-The TQLabel widget provides a static information display
+The TTQLabel widget provides a static information display
<p>
-TQLabel is used for displaying information in the form of text or
+TTQLabel is used for displaying information in the form of text or
image to the user. No user interaction functionality is
provided. The visual appearance of the label can be configured in
various ways, and it can be used for specifying a focus accelerator
key for another widget.
-<p>A TQLabel can contain any of the following content types:
+<p>A TTQLabel can contain any of the following content types:
<ul>
-<li> A plain text: set by passing a <a href="tqstring.html">TQString</a> to <a href="#dffb43">setText</a>().
-<li> A rich text: set by passing a TQString that contains a rich text to setText().
-<li> A pixmap: set by passing a <a href="tqpixmap.html">TQPixmap</a> to <a href="#f3f301">setPixmap</a>().
-<li> A movie: set by passing a <a href="tqmovie.html">TQMovie</a> to <a href="#60de9f">setMovie</a>().
+<li> A plain text: set by passing a <a href="tqstring.html">TTQString</a> to <a href="#dffb43">setText</a>().
+<li> A rich text: set by passing a TTQString that contains a rich text to setText().
+<li> A pixmap: set by passing a <a href="tqpixmap.html">TTQPixmap</a> to <a href="#f3f301">setPixmap</a>().
+<li> A movie: set by passing a <a href="tqmovie.html">TTQMovie</a> to <a href="#60de9f">setMovie</a>().
<li> A number: set by passing an <em>int</em> or a <em>double</em> to <a href="#1a8f6a">setNum</a>(), which converts the number to plain text.
<li> Nothing: The same as an empty plain text. This is the default. Set by <a href="#be73f3">clear</a>().
</ul>
<p>When the content is changed using any of these functions, any
previous content is cleared.
-<p>The look of a TQLabel can be tuned in several ways. All the settings
-of <a href="tqframe.html">TQFrame</a> are available for specifying a widget frame. The
-positioning of the content within the TQLabel widget area can be
+<p>The look of a TTQLabel can be tuned in several ways. All the settings
+of <a href="tqframe.html">TTQFrame</a> are available for specifying a widget frame. The
+positioning of the content within the TTQLabel widget area can be
tuned with <a href="#1f406e">setAlignment</a>() and <a href="#ed9b8b">setIndent</a>(). For example, this code
sets up a sunken panel with a two-line text in the bottom right
corner (both lines being flush with the right side of the label):
-<p><pre> <a href="tqlabel.html">TQLabel</a> *label = new <a href="tqlabel.html">TQLabel</a>;
- label-&gt;<a href="tqframe.html#c0d758">setFrameStyle</a>( TQFrame::Panel | TQFrame::Sunken );
+<p><pre> <a href="tqlabel.html">TTQLabel</a> *label = new <a href="tqlabel.html">TTQLabel</a>;
+ label-&gt;<a href="tqframe.html#c0d758">setFrameStyle</a>( TTQFrame::Panel | TTQFrame::Sunken );
label-&gt;<a href="#dffb43">setText</a>( "first line\nsecond line" );
label-&gt;<a href="#1f406e">setAlignment</a>( AlignBottom | AlignRight );
</pre>
-<p>A TQLabel is often used as a label for another, interactive
-widget. For this use, TQLabel provides a handy mechanism for adding
-an accelerator key (see <a href="tqaccel.html">TQAccel</a>) that will set the keyboard focus to
-the other widget (called the QLabel's "buddy"). Example:
-<p><pre> <a href="tqlineedit.html">TQLineEdit</a>* phoneEdit = new <a href="tqlineedit.html">TQLineEdit</a>( this, "phoneEdit" );
- <a href="tqlabel.html">TQLabel</a>* phoneLabel = new <a href="tqlabel.html">TQLabel</a>( phoneEdit, "&amp;Phone:", this, "phoneLabel" );
+<p>A TTQLabel is often used as a label for another, interactive
+widget. For this use, TTQLabel provides a handy mechanism for adding
+an accelerator key (see <a href="tqaccel.html">TTQAccel</a>) that will set the keyboard focus to
+the other widget (called the TQLabel's "buddy"). Example:
+<p><pre> <a href="tqlineedit.html">TTQLineEdit</a>* phoneEdit = new <a href="tqlineedit.html">TTQLineEdit</a>( this, "phoneEdit" );
+ <a href="tqlabel.html">TTQLabel</a>* phoneLabel = new <a href="tqlabel.html">TTQLabel</a>( phoneEdit, "&amp;Phone:", this, "phoneLabel" );
</pre>
<p>In this example, keyboard focus is transferred to the label's buddy
-(the <a href="tqlineedit.html">TQLineEdit</a>) when the user presses <dfn>Alt-P.</dfn> You can also
+(the <a href="tqlineedit.html">TTQLineEdit</a>) when the user presses <dfn>Alt-P.</dfn> You can also
use the <a href="#191701">setBuddy</a>() function to accomplish the same.
<p>
-<p>See also <a href="tqlineedit.html">TQLineEdit</a>, <a href="tqtextview.html">TQTextView</a>, <a href="tqpixmap.html">TQPixmap</a>, <a href="tqmovie.html">TQMovie</a> and <a href="guibooks.html#fowler">GUI Design Handbook: Label</a>
+<p>See also <a href="tqlineedit.html">TTQLineEdit</a>, <a href="tqtextview.html">TTQTextView</a>, <a href="tqpixmap.html">TTQPixmap</a>, <a href="tqmovie.html">TTQMovie</a> and <a href="guibooks.html#fowler">GUI Design Handbook: Label</a>
<p>Examples:
- <a href="cursor-cursor-cpp.html#TQLabel">cursor/cursor.cpp</a>
- <a href="layout-layout-cpp.html#TQLabel">layout/layout.cpp</a>
- <a href="popup-popup-cpp.html#TQLabel">popup/popup.cpp</a>
- <a href="menu-menu-cpp.html#TQLabel">menu/menu.cpp</a>
- <a href="progress-progress-cpp.html#TQLabel">progress/progress.cpp</a>
- <a href="qmag-qmag-cpp.html#TQLabel">qmag/qmag.cpp</a>
- <a href="movies-main-cpp.html#TQLabel">movies/main.cpp</a>
- <a href="customlayout-main-cpp.html#TQLabel">customlayout/main.cpp</a>
+ <a href="cursor-cursor-cpp.html#TTQLabel">cursor/cursor.cpp</a>
+ <a href="layout-layout-cpp.html#TTQLabel">layout/layout.cpp</a>
+ <a href="popup-popup-cpp.html#TTQLabel">popup/popup.cpp</a>
+ <a href="menu-menu-cpp.html#TTQLabel">menu/menu.cpp</a>
+ <a href="progress-progress-cpp.html#TTQLabel">progress/progress.cpp</a>
+ <a href="qmag-qmag-cpp.html#TTQLabel">qmag/qmag.cpp</a>
+ <a href="movies-main-cpp.html#TTQLabel">movies/main.cpp</a>
+ <a href="customlayout-main-cpp.html#TTQLabel">customlayout/main.cpp</a>
<hr><h2>Member Function Documentation</h2>
-<h3 class="fn"><a name="5514c7"></a>TQLabel::QLabel�(�<a href="tqwidget.html">TQWidget</a>�*�buddy, const�<a href="tqstring.html">TQString</a>�&amp;�text, <a href="tqwidget.html">TQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
+<h3 class="fn"><a name="5514c7"></a>TTQLabel::TQLabel�(�<a href="tqwidget.html">TTQWidget</a>�*�buddy, const�<a href="tqstring.html">TTQString</a>�&amp;�text, <a href="tqwidget.html">TTQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
<p>Constructs a label with a text and a buddy.
<p>The <em>text</em> is set with <a href="#dffb43">setText</a>(). The <em>buddy</em> is set with <a href="#191701">setBuddy</a>().
-<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TQFrame</a>
+<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TTQFrame</a>
constructor.
<p>See also <a href="#dffb43">setText</a>(), <a href="#191701">setBuddy</a>(), <a href="#1f406e">setAlignment</a>(), <a href="tqframe.html#c0d758">setFrameStyle</a>() and <a href="#ed9b8b">setIndent</a>().
-<h3 class="fn"><a name="39107d"></a>TQLabel::QLabel�(�<a href="tqwidget.html">TQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
+<h3 class="fn"><a name="39107d"></a>TTQLabel::TQLabel�(�<a href="tqwidget.html">TTQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
<p>Constructs an empty label.
-<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TQFrame</a>
+<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TTQFrame</a>
constructor.
<p>See also <a href="#1f406e">setAlignment</a>(), <a href="tqframe.html#c0d758">setFrameStyle</a>() and <a href="#ed9b8b">setIndent</a>().
-<h3 class="fn"><a name="2bafbb"></a>TQLabel::QLabel�(�const�<a href="tqstring.html">TQString</a>�&amp;�text, <a href="tqwidget.html">TQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
+<h3 class="fn"><a name="2bafbb"></a>TTQLabel::TQLabel�(�const�<a href="tqstring.html">TTQString</a>�&amp;�text, <a href="tqwidget.html">TTQWidget</a>�*�parent, const�char�*�name=0, WFlags�f=0�)</h3>
<p>Constructs a label with a text. The <em>text</em> is set with <a href="#dffb43">setText</a>().
-<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TQFrame</a>
+<p>The <em>parent, name</em> and <em>f</em> arguments are passed to the <a href="tqframe.html">TTQFrame</a>
constructor.
<p>See also <a href="#dffb43">setText</a>(), <a href="#1f406e">setAlignment</a>(), <a href="tqframe.html#c0d758">setFrameStyle</a>() and <a href="#ed9b8b">setIndent</a>().
-<h3 class="fn"><a name="9958af"></a>TQLabel::~QLabel�()</h3>
+<h3 class="fn"><a name="9958af"></a>TTQLabel::~TQLabel�()</h3>
<p>Destructs the label.
-<h3 class="fn">int�<a name="2fcaa3"></a>TQLabel::alignment�()�const</h3>
+<h3 class="fn">int�<a name="2fcaa3"></a>TTQLabel::alignment�()�const</h3>
<p>Returns the alignment setting.
<p>See also <a href="#1f406e">setAlignment</a>().
-<h3 class="fn">bool�<a name="75b2a1"></a>TQLabel::autoResize�()�const</h3>
+<h3 class="fn">bool�<a name="75b2a1"></a>TTQLabel::autoResize�()�const</h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code.<p>
<p>Returns TRUE if auto-resizing is enabled, or FALSE if auto-resizing
is disabled.
<p>Auto-resizing is disabled by default.
<p>See also <a href="#c0e104">setAutoResize</a>().
-<h3 class="fn"><a href="tqwidget.html">TQWidget</a>�*�<a name="123954"></a>TQLabel::buddy�()�const</h3>
+<h3 class="fn"><a href="tqwidget.html">TTQWidget</a>�*�<a name="123954"></a>TTQLabel::buddy�()�const</h3>
<p>Returns the buddy of this label, or 0 if no buddy is currently set.
<p>See also <a href="#191701">setBuddy</a>().
-<h3 class="fn">void�<a name="be73f3"></a>TQLabel::clear�() <code>[slot]</code></h3>
+<h3 class="fn">void�<a name="be73f3"></a>TTQLabel::clear�() <code>[slot]</code></h3>
<p>Clears any label contents. Equivalent with <a href="#dffb43">setText</a>( "" ).
-<h3 class="fn">void�<a name="fac264"></a>TQLabel::drawContents�(�<a href="tqpainter.html">TQPainter</a>�*�p�) <code>[virtual�protected]</code></h3>
+<h3 class="fn">void�<a name="fac264"></a>TTQLabel::drawContents�(�<a href="tqpainter.html">TTQPainter</a>�*�p�) <code>[virtual�protected]</code></h3>
<p>Draws the label contents using the painter <em>p.</em>
-<p>Reimplemented from <a href="tqframe.html#99e687">TQFrame.</a>
-<h3 class="fn">void�<a name="479dd2"></a>TQLabel::drawContentsMask�(�<a href="tqpainter.html">TQPainter</a>�*�p�) <code>[virtual�protected]</code></h3>
+<p>Reimplemented from <a href="tqframe.html#99e687">TTQFrame.</a>
+<h3 class="fn">void�<a name="479dd2"></a>TTQLabel::drawContentsMask�(�<a href="tqpainter.html">TTQPainter</a>�*�p�) <code>[virtual�protected]</code></h3>
<p>Draws the label contents mask using the painter <em>p.</em>
Used only in transparent mode.
-<p>See also <a href="tqwidget.html#c7a335">TQWidget::setAutoMask</a>();.
-<p>Reimplemented from <a href="tqframe.html#4cbf11">TQFrame.</a>
-<h3 class="fn">void�<a name="0435a2"></a>TQLabel::fontChange�(�const�<a href="tqfont.html">TQFont</a>�&amp;�) <code>[virtual�protected]</code></h3>
+<p>See also <a href="tqwidget.html#c7a335">TTQWidget::setAutoMask</a>();.
+<p>Reimplemented from <a href="tqframe.html#4cbf11">TTQFrame.</a>
+<h3 class="fn">void�<a name="0435a2"></a>TTQLabel::fontChange�(�const�<a href="tqfont.html">TTQFont</a>�&amp;�) <code>[virtual�protected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#570a8f">TQWidget.</a>
-<h3 class="fn">bool�<a name="7e1f73"></a>TQLabel::hasScaledContents�()�const</h3>
+<p>Reimplemented from <a href="tqwidget.html#570a8f">TTQWidget.</a>
+<h3 class="fn">bool�<a name="7e1f73"></a>TTQLabel::hasScaledContents�()�const</h3>
<p>Returns whether the label will scale its contents to fill all
available space.
<p>See also <a href="#e9e3cf">setScaledContents</a>().
-<h3 class="fn">int�<a name="dae451"></a>TQLabel::heightForWidth�(�int�w�)�const <code>[virtual]</code></h3>
+<h3 class="fn">int�<a name="dae451"></a>TTQLabel::heightForWidth�(�int�w�)�const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#2e8476">TQWidget.</a>
-<h3 class="fn">int�<a name="e3c907"></a>TQLabel::indent�()�const</h3>
+<p>Reimplemented from <a href="tqwidget.html#2e8476">TTQWidget.</a>
+<h3 class="fn">int�<a name="e3c907"></a>TTQLabel::indent�()�const</h3>
<p>Returns the indent of the label.
<p>See also <a href="#ed9b8b">setIndent</a>().
-<h3 class="fn"><a href="tqsize.html">TQSize</a>�<a name="53c8c7"></a>TQLabel::minimumSizeHint�()�const <code>[virtual]</code></h3>
+<h3 class="fn"><a href="tqsize.html">TTQSize</a>�<a name="53c8c7"></a>TTQLabel::minimumSizeHint�()�const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#3f0fc2">TQWidget.</a>
-<h3 class="fn"><a href="tqmovie.html">TQMovie</a>*�<a name="7dcdfe"></a>TQLabel::movie�()�const</h3>
+<p>Reimplemented from <a href="tqwidget.html#3f0fc2">TTQWidget.</a>
+<h3 class="fn"><a href="tqmovie.html">TTQMovie</a>*�<a name="7dcdfe"></a>TTQLabel::movie�()�const</h3>
<p>If the label contains a movie, returns a pointer to it. Otherwise,
returns 0.
<p>See also <a href="#60de9f">setMovie</a>().
-<h3 class="fn"><a href="tqpixmap.html">TQPixmap</a>�*�<a name="101ecb"></a>TQLabel::pixmap�()�const</h3>
+<h3 class="fn"><a href="tqpixmap.html">TTQPixmap</a>�*�<a name="101ecb"></a>TTQLabel::pixmap�()�const</h3>
<p>If the label contains a pixmap, returns a pointer to it. Otherwise,
returns 0.
<p>See also <a href="#f3f301">setPixmap</a>().
-<h3 class="fn">void�<a name="3cb6e7"></a>TQLabel::resizeEvent�(�<a href="qresizeevent.html">TQResizeEvent</a>�*�e�) <code>[virtual�protected]</code></h3>
+<h3 class="fn">void�<a name="3cb6e7"></a>TTQLabel::resizeEvent�(�<a href="qresizeevent.html">TTQResizeEvent</a>�*�e�) <code>[virtual�protected]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#28c156">TQWidget.</a>
-<h3 class="fn">void�<a name="1f406e"></a>TQLabel::setAlignment�(�int�alignment�) <code>[virtual]</code></h3>
+<p>Reimplemented from <a href="tqwidget.html#28c156">TTQWidget.</a>
+<h3 class="fn">void�<a name="1f406e"></a>TTQLabel::setAlignment�(�int�alignment�) <code>[virtual]</code></h3>
<p>Sets the alignment of the label contents.
-<p>The <em>alignment</em> must be a bitwise OR of <a href="tqt.html#AlignmentFlags">Qt::AlignmentFlags</a>
+<p>The <em>alignment</em> must be a bitwise OR of <a href="tqt.html#AlignmentFlags">TQt::AlignmentFlags</a>
values. The <code>WordBreak, ExpandTabs, SingleLine</code> and <code>ShowPrefix</code> flags apply only if the label contains a plain text, and
are otherwise ignored. The <code>DontClip</code> flag is always ignored.
<p>If the label has a buddy, the <code>ShowPrefix</code> flag is forced to TRUE.
@@ -192,30 +192,30 @@ are otherwise ignored. The <code>DontClip</code> flag is always ignored.
ExpandTabs</code> if the label doesn't have a buddy and
<code>AlignLeft | AlignVCenter | ExpandTabs | ShowPrefix </code> if
the label has a buddy.
-<p>See also <a href="tqt.html#AlignmentFlags">Qt::AlignmentFlags</a>, <a href="#2fcaa3">alignment</a>(), <a href="#191701">setBuddy</a>() and <a href="#dffb43">setText</a>().
+<p>See also <a href="tqt.html#AlignmentFlags">TQt::AlignmentFlags</a>, <a href="#2fcaa3">alignment</a>(), <a href="#191701">setBuddy</a>() and <a href="#dffb43">setText</a>().
<p>Examples:
<a href="cursor-cursor-cpp.html#setAlignment">cursor/cursor.cpp</a>
<a href="layout-layout-cpp.html#setAlignment">layout/layout.cpp</a>
<a href="popup-popup-cpp.html#setAlignment">popup/popup.cpp</a>
<a href="qmag-qmag-cpp.html#setAlignment">qmag/qmag.cpp</a>
<a href="customlayout-main-cpp.html#setAlignment">customlayout/main.cpp</a>
-<h3 class="fn">void�<a name="1b6d73"></a>TQLabel::setAutoMask�(�bool�b�) <code>[virtual]</code></h3>
+<h3 class="fn">void�<a name="1b6d73"></a>TTQLabel::setAutoMask�(�bool�b�) <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#c7a335">TQWidget.</a>
-<h3 class="fn">void�<a name="c0e104"></a>TQLabel::setAutoResize�(�bool�enable�) <code>[virtual]</code></h3>
+<p>Reimplemented from <a href="tqwidget.html#c7a335">TTQWidget.</a>
+<h3 class="fn">void�<a name="c0e104"></a>TTQLabel::setAutoResize�(�bool�enable�) <code>[virtual]</code></h3>
<p><b>This function is obsolete.</b> It is provided to keep old source working, and will probably be removed in a future version of Qt. We strongly advise against using it in new code.<p>
Enables auto-resizing if <em>enable</em> is TRUE, or disables it if <em>enable</em> is FALSE.
<p>When auto-resizing is enabled, the label will resize itself to fit
the contents whenever the contents change. The top left corner is
-not moved. This is useful for TQLabel widgets that are not managed by
-a <a href="tqlayout.html">TQLayout</a> (e.g. top-level widgets).
+not moved. This is useful for TTQLabel widgets that are not managed by
+a <a href="tqlayout.html">TTQLayout</a> (e.g. top-level widgets).
<p>Auto-resizing is disabled by default.
<p>See also <a href="#75b2a1">autoResize</a>(), <a href="tqwidget.html#ab3108">adjustSize</a>() and <a href="#614dd5">sizeHint</a>().
-<h3 class="fn">void�<a name="191701"></a>TQLabel::setBuddy�(�<a href="tqwidget.html">TQWidget</a>�*�buddy�) <code>[virtual]</code></h3>
+<h3 class="fn">void�<a name="191701"></a>TTQLabel::setBuddy�(�<a href="tqwidget.html">TTQWidget</a>�*�buddy�) <code>[virtual]</code></h3>
<p>Sets the buddy of this label to <em>buddy.</em>
<p>When the user presses the accelerator key indicated by this label,
the keyboard focus is transferred to the label's buddy widget.
-<p>The buddy mechanism is only available for QLabels that contain a
+<p>The buddy mechanism is only available for TQLabels that contain a
plain text in which one letter is prefixed with '&'. It is this
letter that is set as the accelerator key. The letter is displayed
underlined, and the '&' is not displayed (i.e. the <code>ShowPrefix</code>
@@ -223,11 +223,11 @@ alignment flag is turned on; see <a href="#1f406e">setAlignment</a>()).
<p>In a dialog, you might create two data entry widgets and a label for
each, and set up the geometry layout so each label is just to the
left of its data entry widget (its "buddy"), somewhat like this:
-<p><pre> <a href="tqlineedit.html">TQLineEdit</a> *nameEd = new <a href="tqlineedit.html">TQLineEdit</a>( this );
- <a href="tqlabel.html">TQLabel</a> *nameLb = new <a href="tqlabel.html">TQLabel</a>( "&amp;Name:", this );
+<p><pre> <a href="tqlineedit.html">TTQLineEdit</a> *nameEd = new <a href="tqlineedit.html">TTQLineEdit</a>( this );
+ <a href="tqlabel.html">TTQLabel</a> *nameLb = new <a href="tqlabel.html">TTQLabel</a>( "&amp;Name:", this );
nameLb-&gt;<a href="#191701">setBuddy</a>( nameEd );
- <a href="tqlineedit.html">TQLineEdit</a> *phoneEd = new <a href="tqlineedit.html">TQLineEdit</a>( this );
- <a href="tqlabel.html">TQLabel</a> *phoneLb = new <a href="tqlabel.html">TQLabel</a>( "&amp;Phone:", this );
+ <a href="tqlineedit.html">TTQLineEdit</a> *phoneEd = new <a href="tqlineedit.html">TTQLineEdit</a>( this );
+ <a href="tqlabel.html">TTQLabel</a> *phoneLb = new <a href="tqlabel.html">TTQLabel</a>( "&amp;Phone:", this );
phoneLb-&gt;<a href="#191701">setBuddy</a>( phoneEd );
// ( layout setup not shown )
</pre>
@@ -235,10 +235,10 @@ left of its data entry widget (its "buddy"), somewhat like this:
presses Alt-N, and to the Phone field when the user presses Alt-P.
<p>To unset a previously set buddy, call this function with <em>buddy</em>
set to 0.
-<p>See also <a href="#123954">buddy</a>(), <a href="#dffb43">setText</a>(), <a href="tqaccel.html">TQAccel</a> and <a href="#1f406e">setAlignment</a>().
+<p>See also <a href="#123954">buddy</a>(), <a href="#dffb43">setText</a>(), <a href="tqaccel.html">TTQAccel</a> and <a href="#1f406e">setAlignment</a>().
<p>Examples:
<a href="layout-layout-cpp.html#setBuddy">layout/layout.cpp</a>
-<h3 class="fn">void�<a name="ed9b8b"></a>TQLabel::setIndent�(�int�indent�)</h3>
+<h3 class="fn">void�<a name="ed9b8b"></a>TTQLabel::setIndent�(�int�indent�)</h3>
<p>Sets the indent of the label to <em>indent</em> pixels.
<p>The indent applies to the left edge if <a href="#2fcaa3">alignment</a>() is <code>AlignLeft,</code>
to the right edge if alignment() is <code>AlignRight,</code> to the top edge
@@ -254,47 +254,47 @@ pixels.
<p>See also <a href="#e3c907">indent</a>(), <a href="#1f406e">setAlignment</a>(), <a href="tqframe.html#e0ccef">frameWidth</a>() and <a href="tqwidget.html#3a7237">font</a>().
<p>Examples:
<a href="movies-main-cpp.html#setIndent">movies/main.cpp</a>
-<h3 class="fn">void�<a name="60de9f"></a>TQLabel::setMovie�(�const�<a href="tqmovie.html">TQMovie</a>�&amp;�movie�) <code>[virtual�slot]</code></h3>
+<h3 class="fn">void�<a name="60de9f"></a>TTQLabel::setMovie�(�const�<a href="tqmovie.html">TTQMovie</a>�&amp;�movie�) <code>[virtual�slot]</code></h3>
<p>Sets the label contents to <em>movie.</em> Any previous content is cleared.
<p>The buddy accelerator, if any, is disabled.
<p>The label resizes itself if auto-resizing is enabled.
<p>See also <a href="#7dcdfe">movie</a>() and <a href="#191701">setBuddy</a>().
-<h3 class="fn">void�<a name="1a8f6a"></a>TQLabel::setNum�(�double�num�) <code>[virtual�slot]</code></h3>
+<h3 class="fn">void�<a name="1a8f6a"></a>TTQLabel::setNum�(�double�num�) <code>[virtual�slot]</code></h3>
<p>Sets the label contents to a plain text containing the printed value
of <em>num.</em> Does nothing if this is equal to the current contents of
the label. Any previous content is cleared.
<p>The buddy accelerator, if any, is disabled.
<p>The label resizes itself if auto-resizing is enabled.
-<p>See also <a href="#dffb43">setText</a>(), <a href="tqstring.html#01d80b">TQString::setNum</a>() and <a href="#191701">setBuddy</a>().
-<h3 class="fn">void�<a name="301e3c"></a>TQLabel::setNum�(�int�num�) <code>[virtual�slot]</code></h3>
+<p>See also <a href="#dffb43">setText</a>(), <a href="tqstring.html#01d80b">TTQString::setNum</a>() and <a href="#191701">setBuddy</a>().
+<h3 class="fn">void�<a name="301e3c"></a>TTQLabel::setNum�(�int�num�) <code>[virtual�slot]</code></h3>
<p>Sets the label contents to a plain text containing the printed value
of <em>num.</em> Does nothing if this is equal to the current contents of
the label. Any previous content is cleared.
<p>The buddy accelerator, if any, is disabled.
<p>The label resizes itself if auto-resizing is enabled.
-<p>See also <a href="#dffb43">setText</a>(), <a href="tqstring.html#01d80b">TQString::setNum</a>() and <a href="#191701">setBuddy</a>().
-<h3 class="fn">void�<a name="f3f301"></a>TQLabel::setPixmap�(�const�<a href="tqpixmap.html">TQPixmap</a>�&amp;�pixmap�) <code>[virtual�slot]</code></h3>
+<p>See also <a href="#dffb43">setText</a>(), <a href="tqstring.html#01d80b">TTQString::setNum</a>() and <a href="#191701">setBuddy</a>().
+<h3 class="fn">void�<a name="f3f301"></a>TTQLabel::setPixmap�(�const�<a href="tqpixmap.html">TTQPixmap</a>�&amp;�pixmap�) <code>[virtual�slot]</code></h3>
<p>Sets the label contents to <em>pixmap.</em> Any previous content is cleared.
<p>The buddy accelerator, if any, is disabled.
<p>The label resizes itself if auto-resizing is enabled.
<p>See also <a href="#101ecb">pixmap</a>() and <a href="#191701">setBuddy</a>().
-<h3 class="fn">void�<a name="e9e3cf"></a>TQLabel::setScaledContents�(�bool�enable�)</h3>
+<h3 class="fn">void�<a name="e9e3cf"></a>TTQLabel::setScaledContents�(�bool�enable�)</h3>
<p>When called with <em>enable</em> == TRUE, and the label shows a pixmap,
it will scale the pixmap to fill available space.
<p>See also <a href="#7e1f73">hasScaledContents</a>().
-<h3 class="fn">void�<a name="dffb43"></a>TQLabel::setText�(�const�<a href="tqstring.html">TQString</a>�&amp;�text�) <code>[virtual�slot]</code></h3>
+<h3 class="fn">void�<a name="dffb43"></a>TTQLabel::setText�(�const�<a href="tqstring.html">TTQString</a>�&amp;�text�) <code>[virtual�slot]</code></h3>
<p>Sets the label contents to <em>text,</em> or does nothing if <em>text</em> is
equal to the current contents of the label. Any previous content is
cleared.
<p><em>text</em> will be interpreted either as a plain text or as a rich
text, depending on the text format setting; see <a href="#5de3f9">setTextFormat</a>(). The
-default setting is <code>AutoText,</code> i.e. TQLabel will try to auto-detect
+default setting is <code>AutoText,</code> i.e. TTQLabel will try to auto-detect
the format of <em>text.</em>
<p>If <em>text</em> is interpreted as a plain text, and a buddy has been set,
the buddy accelerator key is updated from the new text.
<p>The label resizes itself if auto-resizing is enabled.
<p>Note that Qlabel is well suited to display small rich text documents
-only. For large documents, use <a href="tqtextview.html">TQTextView</a> instead. It will flicker
+only. For large documents, use <a href="tqtextview.html">TTQTextView</a> instead. It will flicker
less on resize and can also provide a scrollbar if necessary.
<p>See also <a href="#72cf09">text</a>(), <a href="#5de3f9">setTextFormat</a>(), <a href="#191701">setBuddy</a>() and <a href="#1f406e">setAlignment</a>().
<p>Examples:
@@ -303,25 +303,25 @@ less on resize and can also provide a scrollbar if necessary.
<a href="popup-popup-cpp.html#setText">popup/popup.cpp</a>
<a href="qmag-qmag-cpp.html#setText">qmag/qmag.cpp</a>
<a href="customlayout-main-cpp.html#setText">customlayout/main.cpp</a>
-<h3 class="fn">void�<a name="5de3f9"></a>TQLabel::setTextFormat�(�<a href="tqt.html#TextFormat">Qt::TextFormat</a>�format�)</h3>
-<p>Sets the text format to <em>format.</em> See the <a href="tqt.html#TextFormat">Qt::TextFormat</a> enum for
+<h3 class="fn">void�<a name="5de3f9"></a>TTQLabel::setTextFormat�(�<a href="tqt.html#TextFormat">TQt::TextFormat</a>�format�)</h3>
+<p>Sets the text format to <em>format.</em> See the <a href="tqt.html#TextFormat">TQt::TextFormat</a> enum for
an explanation of the possible options.
<p>The default format is <code>AutoText.</code>
<p>See also <a href="#0b92ed">textFormat</a>() and <a href="#dffb43">setText</a>().
-<h3 class="fn"><a href="tqsize.html">TQSize</a>�<a name="614dd5"></a>TQLabel::sizeHint�()�const <code>[virtual]</code></h3>
+<h3 class="fn"><a href="tqsize.html">TTQSize</a>�<a name="614dd5"></a>TTQLabel::sizeHint�()�const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
<p>Examples:
<a href="layout-layout-cpp.html#sizeHint">layout/layout.cpp</a>
-<p>Reimplemented from <a href="tqwidget.html#290bcd">TQWidget.</a>
-<h3 class="fn"><a href="tqsizepolicy.html">TQSizePolicy</a>�<a name="26e1d9"></a>TQLabel::sizePolicy�()�const <code>[virtual]</code></h3>
+<p>Reimplemented from <a href="tqwidget.html#290bcd">TTQWidget.</a>
+<h3 class="fn"><a href="tqsizepolicy.html">TTQSizePolicy</a>�<a name="26e1d9"></a>TTQLabel::sizePolicy�()�const <code>[virtual]</code></h3>
<p>Reimplemented for internal reasons; the API is not affected.
-<p>Reimplemented from <a href="tqwidget.html#2d5d13">TQWidget.</a>
-<h3 class="fn"><a href="tqstring.html">TQString</a>�<a name="72cf09"></a>TQLabel::text�()�const</h3>
+<p>Reimplemented from <a href="tqwidget.html#2d5d13">TTQWidget.</a>
+<h3 class="fn"><a href="tqstring.html">TTQString</a>�<a name="72cf09"></a>TTQLabel::text�()�const</h3>
<p>Returns the label text. If the content is a plain or a rich text,
this is the string that was passed to <a href="#dffb43">setText</a>(). Otherwise, it is an
empty/null string.
<p>See also <a href="#dffb43">setText</a>(), <a href="#1a8f6a">setNum</a>() and <a href="#be73f3">clear</a>().
-<h3 class="fn">Qt::TextFormat�<a name="0b92ed"></a>TQLabel::textFormat()�const</h3>
+<h3 class="fn">TQt::TextFormat�<a name="0b92ed"></a>TTQLabel::textFormat()�const</h3>
<p>Returns the current text format.
<p>See also <a href="#5de3f9">setTextFormat</a>().
<hr><p>
diff --git a/qtjava/javalib/examples/tux/MoveMe.java b/qtjava/javalib/examples/tux/MoveMe.java
index 02c4bf9a..185ac776 100644
--- a/qtjava/javalib/examples/tux/MoveMe.java
+++ b/qtjava/javalib/examples/tux/MoveMe.java
@@ -1,25 +1,25 @@
import org.kde.qt.*;
-class MoveMe extends QWidget
+class MoveMe extends TQWidget
{
-public MoveMe( QWidget parent, String name, int f)
+public MoveMe( TQWidget parent, String name, int f)
{
super(parent,name, f);
}
-private QPoint clickPos;
+private TQPoint clickPos;
-protected void mousePressEvent( QMouseEvent e )
+protected void mousePressEvent( TQMouseEvent e )
{
// if ( e.button() == LeftButton )
clickPos = e.pos();
}
-protected void mouseMoveEvent( QMouseEvent e )
+protected void mouseMoveEvent( TQMouseEvent e )
{
// if ( e.state() & LeftButton )
- move( new QPoint( e.globalPos().x() - clickPos.x(),
+ move( new TQPoint( e.globalPos().x() - clickPos.x(),
e.globalPos().y() - clickPos.y() ) );
}
@@ -27,25 +27,25 @@ protected void mouseMoveEvent( QMouseEvent e )
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
String fn="tux.png";
if ( args.length >= 1 )
fn = args[0];
- if ( ! QFile.exists( fn ) )
+ if ( ! TQFile.exists( fn ) )
System.exit( 1 );
- QImage img = new QImage( fn );
- QPixmap p = new QPixmap();
+ TQImage img = new TQImage( fn );
+ TQPixmap p = new TQPixmap();
p.convertFromImage( img );
if ( p.mask() == null )
if ( img.hasAlphaBuffer() ) {
- QBitmap bm = new QBitmap(img.createAlphaMask());
+ TQBitmap bm = new TQBitmap(img.createAlphaMask());
p.setMask( bm );
} else {
- QBitmap bm = new QBitmap(img.createHeuristicMask());
+ TQBitmap bm = new TQBitmap(img.createHeuristicMask());
p.setMask( bm );
}
MoveMe w = new MoveMe(null,null,Qt.WStyle_Customize|Qt.WStyle_NoBorder);
diff --git a/qtjava/javalib/examples/widgets/MyWidgetView.java b/qtjava/javalib/examples/widgets/MyWidgetView.java
index db42cb9a..968a13ea 100644
--- a/qtjava/javalib/examples/widgets/MyWidgetView.java
+++ b/qtjava/javalib/examples/widgets/MyWidgetView.java
@@ -19,7 +19,7 @@ public MyWidgetView( )
this(null, null);
}
-public MyWidgetView( QWidget parent, String name )
+public MyWidgetView( TQWidget parent, String name )
{
super(parent, name);
s = 0;
@@ -28,7 +28,7 @@ public MyWidgetView( QWidget parent, String name )
void button1Clicked()
{
- ArrayList styles = QStyleFactory.keys();
+ ArrayList styles = TQStyleFactory.keys();
s = (++s)%styles.size();
qApp().setStyle( (String) styles.get(s) );
@@ -42,8 +42,8 @@ public MyWidgetView( QWidget parent, String name )
public static void main(String[] args)
{
- QApplication.setColorSpec( QApplication.CustomColor );
- QApplication a = new QApplication( args );
+ TQApplication.setColorSpec( TQApplication.CustomColor );
+ TQApplication a = new TQApplication( args );
MyWidgetView w = new MyWidgetView();
a.setMainWidget( w );
diff --git a/qtjava/javalib/examples/widgets/README b/qtjava/javalib/examples/widgets/README
index 8e1767e4..46a11824 100644
--- a/qtjava/javalib/examples/widgets/README
+++ b/qtjava/javalib/examples/widgets/README
@@ -1,4 +1,4 @@
Click the right mouse button + CTRL to identify a widget.
The classes MyWhatsThis and MyMenuItem can't be translated to java
-yet, as the required virtual methods callbacks aren't implemented
+yet, as the retquired virtual methods callbacks aren't implemented
diff --git a/qtjava/javalib/examples/widgets/WidgetView.java b/qtjava/javalib/examples/widgets/WidgetView.java
index d000ce8b..2907f49c 100644
--- a/qtjava/javalib/examples/widgets/WidgetView.java
+++ b/qtjava/javalib/examples/widgets/WidgetView.java
@@ -15,23 +15,23 @@
import org.kde.qt.*;
-class WidgetView extends QMainWindow
+class WidgetView extends TQMainWindow
{
private String MOVIEFILENAME = "trolltech.gif";
-private QLabel msg;
-private QCheckBox cb[] = new QCheckBox[3];
-private QGroupBox bg;
-private QLabel movielabel;
-private QMovie movie;
-private QWidget central;
-private QProgressBar prog;
+private TQLabel msg;
+private TQCheckBox cb[] = new TQCheckBox[3];
+private TQGroupBox bg;
+private TQLabel movielabel;
+private TQMovie movie;
+private TQWidget central;
+private TQProgressBar prog;
private int progress;
-private QTabWidget tabs;
-private QMultiLineEdit edit;
-private QPopupMenu textStylePopup;
+private TQTabWidget tabs;
+private TQMultiLineEdit edit;
+private TQPopupMenu textStylePopup;
private int plainStyleID;
-private QWidget bla;
+private TQWidget bla;
private AnalogClock aclock;
private DigitalClock dclock;
@@ -110,23 +110,23 @@ static String[] fileprint = {
-class MyListView extends QListView
+class MyListView extends TQListView
{
-public MyListView( QWidget parent )
+public MyListView( TQWidget parent )
{
this(parent, null);
}
-public MyListView( QWidget parent, String name )
+public MyListView( TQWidget parent, String name )
{
super( parent, name );
selected = null;
}
-protected void contentsMousePressEvent( QMouseEvent e )
+protected void contentsMousePressEvent( TQMouseEvent e )
{
selected = selectedItem();
// super.contentsMousePressEvent( e );
}
-protected void contentsMouseReleaseEvent( QMouseEvent e )
+protected void contentsMouseReleaseEvent( TQMouseEvent e )
{
// super.contentsMouseReleaseEvent( e );
if ( selectedItem() != selected ) {
@@ -135,7 +135,7 @@ protected void contentsMouseReleaseEvent( QMouseEvent e )
}
}
-private QListViewItem selected;
+private TQListViewItem selected;
}
//
// WidgetView contains lots of Qt widgets.
@@ -150,38 +150,38 @@ private QListViewItem selected;
/*
-class MyWhatsThis extends QWhatsThis
+class MyWhatsThis extends TQWhatsThis
{
-public MyWhatsThis( QListBox lb)
+public MyWhatsThis( TQListBox lb)
{
super( lb );
listbox = lb;
}
-public String text( QPoint p) {
- QListBoxItem i = listbox.itemAt( p );
+public String text( TQPoint p) {
+ TQListBoxItem i = listbox.itemAt( p );
if ( i != null && i.pixmap() != null ) {
return "Isn't that a <em>wonderful</em> pixmap? <br>"
+ "Imagine, you could even decorate a"
+ " <b>red</b> pushbutton with it! :-)";
}
- return "This is a QListBox.";
+ return "This is a TQListBox.";
}
-private QListBox listbox;
+private TQListBox listbox;
}
-class MyMenuItem extends QCustomMenuItem
+class MyMenuItem extends TQCustomMenuItem
{
-public MyMenuItem( String s, QFont f )
+public MyMenuItem( String s, TQFont f )
{
string = s;
font = f;
}
- public void paint( QPainter p, QColorGroup cg, boolean act,
+ public void paint( TQPainter p, TQColorGroup cg, boolean act,
boolean enabled, int x, int y, int w, int h )
{
p.setFont ( font );
@@ -190,13 +190,13 @@ public MyMenuItem( String s, QFont f )
string );
}
- public QSize sizeHint()
+ public TQSize sizeHint()
{
- return QFontMetrics( font ).size( AlignAuto | AlignVCenter |
+ return TQFontMetrics( font ).size( AlignAuto | AlignVCenter |
ShowPrefix | DontClip, string );
}
private String string;
-private QFont font;
+private TQFont font;
}
*/
@@ -205,40 +205,40 @@ private QFont font;
// Construct the WidgetView with children
//
-WidgetView( QWidget parent, String name )
+WidgetView( TQWidget parent, String name )
{
super( parent, name );
- QColor col = new QColor();
+ TQColor col = new TQColor();
// Set the window caption/title
setCaption( "Qt Example - Widgets Demo Application" );
// create a toolbar
- QToolBar tools = new QToolBar( this, "toolbar" );
+ TQToolBar tools = new TQToolBar( this, "toolbar" );
// put something in it
- QPixmap openIcon = new QPixmap( fileopen );
- QToolButton toolb = new QToolButton( new QIconSet(openIcon), "toolbutton 1",
+ TQPixmap openIcon = new TQPixmap( fileopen );
+ TQToolButton toolb = new TQToolButton( new TQIconSet(openIcon), "toolbutton 1",
"", this, SLOT("open()"),
tools, "open file" );
- QWhatsThis.add( toolb, "This is a <b>QToolButton</b>. It lives in a "
- + "QToolBar. This particular button doesn't do anything "
+ TQWhatsThis.add( toolb, "This is a <b>TQToolButton</b>. It lives in a "
+ + "TQToolBar. This particular button doesn't do anything "
+ "useful." );
- QPixmap saveIcon = new QPixmap( filesave );
- toolb = new QToolButton( new QIconSet(saveIcon), "toolbutton 2", "",
+ TQPixmap saveIcon = new TQPixmap( filesave );
+ toolb = new TQToolButton( new TQIconSet(saveIcon), "toolbutton 2", "",
this, SLOT("dummy()"),
tools, "save file" );
- QWhatsThis.add( toolb, "This is also a <b>QToolButton</b>." );
+ TQWhatsThis.add( toolb, "This is also a <b>TQToolButton</b>." );
- QPixmap printIcon = new QPixmap( fileprint );
- toolb = new QToolButton( new QIconSet(printIcon), "toolbutton 3", "",
+ TQPixmap printIcon = new TQPixmap( fileprint );
+ toolb = new TQToolButton( new TQIconSet(printIcon), "toolbutton 3", "",
this, SLOT("dummy()"),
tools, "print file" );
- QWhatsThis.add( toolb, "This is the third <b>QToolButton</b>.");
+ TQWhatsThis.add( toolb, "This is the third <b>TQToolButton</b>.");
- toolb = QWhatsThis.whatsThisButton( tools );
- QWhatsThis.add( toolb, "This is a <b>What's This</b> button "
+ toolb = TQWhatsThis.whatsThisButton( tools );
+ TQWhatsThis.add( toolb, "This is a <b>What's This</b> button "
+ "It enables the user to ask for help "
+ "about widgets on the screen.");
@@ -246,51 +246,51 @@ WidgetView( QWidget parent, String name )
qApp().installEventFilter( this );
//make a central widget to contain the other widgets
- central = new QWidget( this );
+ central = new TQWidget( this );
setCentralWidget( central );
// Create a layout to position the widgets
- QHBoxLayout topLayout = new QHBoxLayout( central, 10 );
+ TQHBoxLayout topLayout = new TQHBoxLayout( central, 10 );
// Create a grid layout to hold most of the widgets
- QGridLayout grid = new QGridLayout( 0, 3 ); //3 wide and autodetect number of rows
+ TQGridLayout grid = new TQGridLayout( 0, 3 ); //3 wide and autodetect number of rows
topLayout.addLayout( grid, 1 );
// Create an easter egg
- QToolTip.add( menuBar(), new QRect( 0, 0, 2, 2 ), "easter egg" );
+ TQToolTip.add( menuBar(), new TQRect( 0, 0, 2, 2 ), "easter egg" );
- QPopupMenu popup;
- popup = new QPopupMenu( this );
+ TQPopupMenu popup;
+ popup = new TQPopupMenu( this );
menuBar().insertItem( "&File", popup );
int id;
id = popup.insertItem( "&New" );
popup.setItemEnabled( id, false );
- id = popup.insertItem( new QIconSet(openIcon), "&Open", this, SLOT(" open()") );
+ id = popup.insertItem( new TQIconSet(openIcon), "&Open", this, SLOT(" open()") );
popup.insertSeparator();
- popup.insertItem( "&Quit", qApp(), SLOT("quit()"), new QKeySequence(CTRL+Key_Q) );
+ popup.insertItem( "&Quit", qApp(), SLOT("quit()"), new TQKeySequence(CTRL+Key_Q) );
- textStylePopup = popup = new QPopupMenu( this );
+ textStylePopup = popup = new TQPopupMenu( this );
menuBar().insertItem( "&Edit", popup );
plainStyleID = id = popup.insertItem( "&Plain" );
- popup.setAccel( new QKeySequence(CTRL+Key_T), id );
+ popup.setAccel( new TQKeySequence(CTRL+Key_T), id );
popup.insertSeparator();
-/* QFont f = font();
+/* TQFont f = font();
f.setBold( true );
id = popup.insertItem( new MyMenuItem( "&Bold", f ) );
- popup.setAccel( new QKeySequence(CTRL+Key_B), id );
+ popup.setAccel( new TQKeySequence(CTRL+Key_B), id );
f = font();
f.setItalic( true );
id = popup.insertItem( new MyMenuItem( "&Italic", f ) );
popup.setItemChecked( id, true );
- popup.setAccel( new QKeySequence(CTRL+Key_I), id );
+ popup.setAccel( new TQKeySequence(CTRL+Key_I), id );
f = font();
f.setUnderline( true );
id = popup.insertItem( new MyMenuItem( "&Underline", f ) );
- popup.setAccel( new QKeySequence(CTRL+Key_U), id );
+ popup.setAccel( new TQKeySequence(CTRL+Key_U), id );
f = font();
f.setStrikeOut( true );
id = popup.insertItem( new MyMenuItem( "&Strike", f ) );
@@ -307,101 +307,101 @@ WidgetView( QWidget parent, String name )
// Give the dclock widget a blue palette
col.setRgb( 0xaa, 0xbe, 0xff );
- dclock.setPalette( new QPalette( col ) );
+ dclock.setPalette( new TQPalette( col ) );
// make tool tips for both of them
- QToolTip.add( aclock, "custom widget: analog clock" );
- QToolTip.add( dclock, "custom widget: digital clock" );
+ TQToolTip.add( aclock, "custom widget: analog clock" );
+ TQToolTip.add( dclock, "custom widget: digital clock" );
// Create a push button.
- QPushButton pb;
- pb = new QPushButton( "&Push button 1", central, "button1" );
+ TQPushButton pb;
+ pb = new TQPushButton( "&Push button 1", central, "button1" );
grid.addWidget( pb, 0, 0, AlignVCenter );
connect( pb, SIGNAL("clicked()"), SLOT("button1Clicked()") );
- QToolTip.add( pb, "push button 1" );
- QWhatsThis.add( pb, "This is a <b>QPushButton</b>.<br>"
+ TQToolTip.add( pb, "push button 1" );
+ TQWhatsThis.add( pb, "This is a <b>TQPushButton</b>.<br>"
+ "Click it and watch...<br>"
+ "The wonders of modern technology.");
- QPixmap pm = new QPixmap();
+ TQPixmap pm = new TQPixmap();
boolean pix = pm.load("qt.png");
if ( !pix ) {
- QMessageBox.information( null, "Qt Widgets Example",
+ TQMessageBox.information( null, "Qt Widgets Example",
"Could not load the file \"qt.png\", which\n"
+ "contains an icon used...\n\n"
+ "The text \"line 42\" will be substituted.",
- QMessageBox.Ok + QMessageBox.Default );
+ TQMessageBox.Ok + TQMessageBox.Default );
}
- // Create a label containing a QMovie
- movie = new QMovie( MOVIEFILENAME );
- movielabel = new QLabel( central, "label0" );
+ // Create a label containing a TQMovie
+ movie = new TQMovie( MOVIEFILENAME );
+ movielabel = new TQLabel( central, "label0" );
movie.connectStatus(this, SLOT("movieStatus(int)"));
- movie.connectUpdate(this, SLOT("movieUpdate(QRect)"));
- movielabel.setFrameStyle( QFrame.Box | QFrame.Plain );
+ movie.connectUpdate(this, SLOT("movieUpdate(TQRect)"));
+ movielabel.setFrameStyle( TQFrame.Box | TQFrame.Plain );
movielabel.setMovie( movie );
movielabel.setFixedSize( 128+movielabel.frameWidth()*2,
64+movielabel.frameWidth()*2 );
grid.addWidget( movielabel, 0, 1, AlignCenter );
- QToolTip.add( movielabel, "movie" );
- QWhatsThis.add( movielabel, "This is a <b>QLabel</b> "
- + "that contains a QMovie." );
+ TQToolTip.add( movielabel, "movie" );
+ TQWhatsThis.add( movielabel, "This is a <b>TQLabel</b> "
+ + "that contains a TQMovie." );
// Create a group of check boxes
- bg = new QButtonGroup( central, "checkGroup" );
+ bg = new TQButtonGroup( central, "checkGroup" );
bg.setTitle( "Check Boxes" );
grid.addWidget( bg, 1, 0 );
// Create a layout for the check boxes
- QVBoxLayout vbox = new QVBoxLayout(bg, 10);
+ TQVBoxLayout vbox = new TQVBoxLayout(bg, 10);
vbox.addSpacing( bg.fontMetrics().height() );
- cb[0] = new QCheckBox( bg );
+ cb[0] = new TQCheckBox( bg );
cb[0].setText( "&Read" );
vbox.addWidget( cb[0] );
- cb[1] = new QCheckBox( bg );
+ cb[1] = new TQCheckBox( bg );
cb[1].setText( "&Write" );
vbox.addWidget( cb[1] );
- cb[2] = new QCheckBox( bg );
+ cb[2] = new TQCheckBox( bg );
cb[2].setText( "&Execute" );
vbox.addWidget( cb[2] );
connect( bg, SIGNAL("clicked(int)"), SLOT("checkBoxClicked(int)") );
- QToolTip.add( cb[0], "check box 1" );
- QToolTip.add( cb[1], "check box 2" );
- QToolTip.add( cb[2], "check box 3" );
+ TQToolTip.add( cb[0], "check box 1" );
+ TQToolTip.add( cb[1], "check box 2" );
+ TQToolTip.add( cb[2], "check box 3" );
// Create a group of radio buttons
- QRadioButton rb;
- bg = new QButtonGroup( central, "radioGroup" );
+ TQRadioButton rb;
+ bg = new TQButtonGroup( central, "radioGroup" );
bg.setTitle( "Radio buttons" );
grid.addWidget( bg, 1, 1 );
// Create a layout for the radio buttons
- vbox = new QVBoxLayout(bg, 10);
+ vbox = new TQVBoxLayout(bg, 10);
vbox.addSpacing( bg.fontMetrics().height() );
- rb = new QRadioButton( bg );
+ rb = new TQRadioButton( bg );
rb.setText( "&AM" );
rb.setChecked( true );
vbox.addWidget(rb);
- QToolTip.add( rb, "radio button 1" );
- rb = new QRadioButton( bg );
+ TQToolTip.add( rb, "radio button 1" );
+ rb = new TQRadioButton( bg );
rb.setText( "F&M" );
vbox.addWidget(rb);
- QToolTip.add( rb, "radio button 2" );
- rb = new QRadioButton( bg );
+ TQToolTip.add( rb, "radio button 2" );
+ rb = new TQRadioButton( bg );
rb.setText( "&Short Wave" );
vbox.addWidget(rb);
connect( bg, SIGNAL("clicked(int)"), SLOT("radioButtonClicked(int)") );
- QToolTip.add( rb, "radio button 3" );
+ TQToolTip.add( rb, "radio button 3" );
// Create a list box
- QListBox lb = new QListBox( central, "listBox" );
+ TQListBox lb = new TQListBox( central, "listBox" );
for ( int i=0; i<100; i++ ) { // fill list box
String str = "line " + i;
if ( i == 42 && pix )
@@ -411,27 +411,27 @@ WidgetView( QWidget parent, String name )
}
grid.addMultiCellWidget( lb, 2, 4, 0, 0 );
connect( lb, SIGNAL("selected(int)"), SLOT("listBoxItemSelected(int)") );
- QToolTip.add( lb, "list box" );
+ TQToolTip.add( lb, "list box" );
// new MyWhatsThis( lb );
- vbox = new QVBoxLayout(8);
+ vbox = new TQVBoxLayout(8);
grid.addLayout( vbox, 2, 1 );
// Create a slider
- QSlider sb = new QSlider( 0, 300, 30, 100, QSlider.Horizontal,
+ TQSlider sb = new TQSlider( 0, 300, 30, 100, TQSlider.Horizontal,
central, "Slider" );
- sb.setTickmarks( QSlider.Below );
+ sb.setTickmarks( TQSlider.Below );
sb.setTickInterval( 10 );
- sb.setFocusPolicy( QWidget.TabFocus );
+ sb.setFocusPolicy( TQWidget.TabFocus );
vbox.addWidget( sb );
connect( sb, SIGNAL("valueChanged(int)"), SLOT("sliderValueChanged(int)") );
- QToolTip.add( sb, "slider" );
- QWhatsThis.add( sb, "This is a <b>QSlider</b>. "
+ TQToolTip.add( sb, "slider" );
+ TQWhatsThis.add( sb, "This is a <b>TQSlider</b>. "
+ "The tick marks are optional."
+ " This slider controls the speed of the movie." );
// Create a combo box
- QComboBox combo = new QComboBox( false, central, "comboBox" );
+ TQComboBox combo = new TQComboBox( false, central, "comboBox" );
combo.insertItem( "darkBlue" );
combo.insertItem( "darkRed" );
combo.insertItem( "darkGreen" );
@@ -440,10 +440,10 @@ WidgetView( QWidget parent, String name )
vbox.addWidget( combo );
connect( combo, SIGNAL("activated(int)"),
this, SLOT("comboBoxItemActivated(int)") );
- QToolTip.add( combo, "read-only combo box" );
+ TQToolTip.add( combo, "read-only combo box" );
// Create an editable combo box
- QComboBox edCombo = new QComboBox( true, central, "edComboBox" );
+ TQComboBox edCombo = new TQComboBox( true, central, "edComboBox" );
edCombo.insertItem( "Permutable" );
edCombo.insertItem( "Malleable" );
edCombo.insertItem( "Adaptable" );
@@ -452,21 +452,21 @@ WidgetView( QWidget parent, String name )
vbox.addWidget( edCombo );
connect( edCombo, SIGNAL("activated(String)"),
this, SLOT("edComboBoxItemActivated(String)") );
- QToolTip.add( edCombo, "editable combo box" );
+ TQToolTip.add( edCombo, "editable combo box" );
edCombo.setAutoCompletion( true );
- vbox = new QVBoxLayout(8);
+ vbox = new TQVBoxLayout(8);
grid.addLayout( vbox, 2, 2 );
// Create a spin box
- QSpinBox spin = new QSpinBox( 0, 10, 1, central, "spin" );
+ TQSpinBox spin = new TQSpinBox( 0, 10, 1, central, "spin" );
spin.setSuffix(" mm");
spin.setSpecialValueText( "Auto" );
connect( spin, SIGNAL(" valueChanged(String)"),
SLOT(" spinBoxValueChanged(String)") );
- QToolTip.add( spin, "spin box" );
- QWhatsThis.add( spin, "This is a <b>QSpinBox</b>. "
+ TQToolTip.add( spin, "spin box" );
+ TQWhatsThis.add( spin, "This is a <b>TQSpinBox</b>. "
+ "You can chose values in a given range "
+ "either by using the arrow buttons "
+ "or by typing them in." );
@@ -475,22 +475,22 @@ WidgetView( QWidget parent, String name )
vbox.addStretch( 1 );
// Create a tabwidget that switches between multi line edits
- tabs = new QTabWidget( central );
- //tabs.setTabPosition( QTabWidget.Bottom );
+ tabs = new TQTabWidget( central );
+ //tabs.setTabPosition( TQTabWidget.Bottom );
tabs.setMargin( 4 );
grid.addMultiCellWidget( tabs, 3, 3, 1, 2 );
- QMultiLineEdit mle = new QMultiLineEdit( tabs, "multiLineEdit" );
+ TQMultiLineEdit mle = new TQMultiLineEdit( tabs, "multiLineEdit" );
edit = mle;
- mle.setWordWrap( QMultiLineEdit.WidgetWidth );
- mle.setText("This is a QMultiLineEdit widget, "
+ mle.setWordWrap( TQMultiLineEdit.WidgetWidth );
+ mle.setText("This is a TQMultiLineEdit widget, "
+ "useful for small multi-line "
+ "input fields.");
- QToolTip.add( mle, "multi line editor" );
+ TQToolTip.add( mle, "multi line editor" );
tabs.addTab( mle, "F&irst");
- mle = new QMultiLineEdit( tabs, "multiLineEdit" );
- String mleText = "This is another QMultiLineEdit widget.";
+ mle = new TQMultiLineEdit( tabs, "multiLineEdit" );
+ String mleText = "This is another TQMultiLineEdit widget.";
mleText += "\n";
mleText += "Japanese: ";
mleText += (char) 0x6a38; // Kanji
@@ -502,22 +502,22 @@ WidgetView( QWidget parent, String name )
mleText += (char) 0x00d8; // Norwegian
mleText += "\n";
mleText += "Unicode (black square):";
- mleText += (char) 0x25A0; // BLACK SQUARE
+ mleText += (char) 0x25A0; // BLACK STQUARE
mleText += "\n";
mle.setText( mleText );
- QToolTip.add( mle, "second multi line editor" );
+ TQToolTip.add( mle, "second multi line editor" );
tabs.addTab( mle, "Se&cond");
// Create a single line edit
- QLineEdit le = new QLineEdit( central, "lineEdit" );
+ TQLineEdit le = new TQLineEdit( central, "lineEdit" );
grid.addMultiCellWidget( le, 4, 4, 1, 2 );
connect( le, SIGNAL("textChanged(String)"),
SLOT("lineEditTextChanged(String)") );
- QToolTip.add( le, "single line editor" );
- QWhatsThis.add( le, "This is a <b>QLineEdit</b>, you can enter a "
+ TQToolTip.add( le, "single line editor" );
+ TQWhatsThis.add( le, "This is a <b>TQLineEdit</b>, you can enter a "
+ "single line of text in it. "
+ "It also it accepts text drops." );
@@ -532,85 +532,85 @@ WidgetView( QWidget parent, String name )
grid.setColStretch(2,1);
- QSplitter split = new QSplitter( Vertical, central, "splitter" );
+ TQSplitter split = new TQSplitter( Vertical, central, "splitter" );
split.setOpaqueResize( true );
topLayout.addWidget( split, 1 );
- QListView lv = new MyListView( split );
+ TQListView lv = new MyListView( split );
connect(lv, SIGNAL("selectionChanged()"),
this, SLOT(" selectionChanged()") );
- connect(lv, SIGNAL("selectionChanged(QListViewItem)"),
- this, SLOT(" selectionChanged(QListViewItem)") );
- connect(lv, SIGNAL("clicked(QListViewItem)"),
- this, SLOT(" clicked(QListViewItem)") );
- connect(lv, SIGNAL("mySelectionChanged(QListViewItem)"),
- this, SLOT(" mySelectionChanged(QListViewItem)") );
+ connect(lv, SIGNAL("selectionChanged(TQListViewItem)"),
+ this, SLOT(" selectionChanged(TQListViewItem)") );
+ connect(lv, SIGNAL("clicked(TQListViewItem)"),
+ this, SLOT(" clicked(TQListViewItem)") );
+ connect(lv, SIGNAL("mySelectionChanged(TQListViewItem)"),
+ this, SLOT(" mySelectionChanged(TQListViewItem)") );
lv.addColumn( "One" );
lv.addColumn( "Two" );
lv.setAllColumnsShowFocus( true );
- QListViewItem lvi= new QListViewItem( lv, "Text", "Text" );
- lvi= new QListViewItem( lv, "Text", "Other Text" );
- lvi= new QListViewItem( lv, "Text", "More Text" );
- lvi= new QListViewItem( lv, "Text", "Extra Text" );
+ TQListViewItem lvi= new TQListViewItem( lv, "Text", "Text" );
+ lvi= new TQListViewItem( lv, "Text", "Other Text" );
+ lvi= new TQListViewItem( lv, "Text", "More Text" );
+ lvi= new TQListViewItem( lv, "Text", "Extra Text" );
lvi.setOpen(true);
- new QListViewItem( lvi, "SubText", "Additional Text" );
- lvi= new QListViewItem( lvi, "SubText", "Side Text" );
- lvi= new QListViewItem( lvi, "SubSubText", "Complimentary Text" );
+ new TQListViewItem( lvi, "SubText", "Additional Text" );
+ lvi= new TQListViewItem( lvi, "SubText", "Side Text" );
+ lvi= new TQListViewItem( lvi, "SubSubText", "Complimentary Text" );
- QToolTip.add( lv, "list view" );
- QWhatsThis.add( lv, "This is a <b>QListView</b>, you can display lists "
+ TQToolTip.add( lv, "list view" );
+ TQWhatsThis.add( lv, "This is a <b>TQListView</b>, you can display lists "
+ "(or outline lists) of multiple-column data in it." );
- lv = new QListView( split );
+ lv = new TQListView( split );
lv.addColumn( "Choices" );
- new QCheckListItem( lv, "Onion", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Artichoke", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Pepper", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Habaneros", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Pineapple", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Ham", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Pepperoni", QCheckListItem.CheckBox );
- new QCheckListItem( lv, "Garlic", QCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Onion", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Artichoke", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Pepper", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Habaneros", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Pineapple", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Ham", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Pepperoni", TQCheckListItem.CheckBox );
+ new TQCheckListItem( lv, "Garlic", TQCheckListItem.CheckBox );
- QCheckListItem lit = new QCheckListItem( lv, "Cheese" );
+ TQCheckListItem lit = new TQCheckListItem( lv, "Cheese" );
lit.setOpen( true );
- new QCheckListItem( lit, "Cheddar", QCheckListItem.RadioButton );
- new QCheckListItem( lit, "Mozarella", QCheckListItem.RadioButton );
- new QCheckListItem( lit, "Jarlsberg", QCheckListItem.RadioButton );
+ new TQCheckListItem( lit, "Cheddar", TQCheckListItem.RadioButton );
+ new TQCheckListItem( lit, "Mozarella", TQCheckListItem.RadioButton );
+ new TQCheckListItem( lit, "Jarlsberg", TQCheckListItem.RadioButton );
- QToolTip.add( lv, "list view" );
- QWhatsThis.add( lv, "This is also a <b>QListView</b>, with "
+ TQToolTip.add( lv, "list view" );
+ TQWhatsThis.add( lv, "This is also a <b>TQListView</b>, with "
+ "interactive items." );
- QTextView qmlv = new QTextView( "<hr><h1>QTextView</h1>"
+ TQTextView qmlv = new TQTextView( "<hr><h1>TQTextView</h1>"
+ "<p>Qt supports formatted rich text, such "
+ "as the heading above, <em>emphasized</em> and "
+ "<b>bold</b> text, via an XML subset.</p> "
+ "<p>Style sheets are supported.</p>",
"", split );
- qmlv.setFont(new QFont("Charter",11));
- qmlv.setFrameStyle( QFrame.WinPanel | QFrame.Sunken );
+ qmlv.setFont(new TQFont("Charter",11));
+ qmlv.setFrameStyle( TQFrame.WinPanel | TQFrame.Sunken );
// Create an label and a message in the status bar
// The message is updated when buttons are clicked etc.
- msg = new QLabel( statusBar(), "message" );
+ msg = new TQLabel( statusBar(), "message" );
msg.setAlignment( AlignCenter );
- QFont boldfont = new QFont(); boldfont.setWeight(QFont.Bold);
+ TQFont boldfont = new TQFont(); boldfont.setWeight(TQFont.Bold);
msg.setFont( boldfont );
statusBar().addWidget( msg, 4 );
- QToolTip.add( msg, "Message area" );
+ TQToolTip.add( msg, "Message area" );
- QAccel a = new QAccel( this );
- a.connectItem( a.insertItem( new QKeySequence(Key_F9) ),
+ TQAccel a = new TQAccel( this );
+ a.connectItem( a.insertItem( new TQKeySequence(Key_F9) ),
this, SLOT(" showProperties()") );
- prog = new QProgressBar( statusBar(), "progress" );
+ prog = new TQProgressBar( statusBar(), "progress" );
prog.setTotalSteps( 100 );
progress = 64;
prog.setProgress( progress );
statusBar().addWidget( prog , 1 );
- QWhatsThis.add( prog, "This is a <b>QProgressBar</b> "
+ TQWhatsThis.add( prog, "This is a <b>TQProgressBar</b> "
+ "You can use it to show that a lengthy "
+ " process is progressing. "
+ "In this program, nothing much seems to happen." );
@@ -629,7 +629,7 @@ void button1Clicked()
}
-void movieUpdate( QRect r )
+void movieUpdate( TQRect r )
{
// Uncomment this to test animated icons on your window manager
//setIcon( movie.framePixmap() );
@@ -638,10 +638,10 @@ void movieUpdate( QRect r )
void movieStatus( int s )
{
switch ( s ) {
- case QMovie.SourceEmpty:
- case QMovie.UnrecognizedFormat:
+ case TQMovie.SourceEmpty:
+ case TQMovie.UnrecognizedFormat:
{
- QPixmap pm = new QPixmap("tt-logo.png");
+ TQPixmap pm = new TQPixmap("tt-logo.png");
movielabel.setPixmap(pm);
movielabel.setFixedSize(pm.size());
}
@@ -710,19 +710,19 @@ void comboBoxItemActivated( int index )
switch ( index ) {
default:
case 0:
- QApplication.setWinStyleHighlightColor( darkBlue() );
+ TQApplication.setWinStyleHighlightColor( darkBlue() );
break;
case 1:
- QApplication.setWinStyleHighlightColor( darkRed() );
+ TQApplication.setWinStyleHighlightColor( darkRed() );
break;
case 2:
- QApplication.setWinStyleHighlightColor( darkGreen() );
+ TQApplication.setWinStyleHighlightColor( darkGreen() );
break;
case 3:
- QApplication.setWinStyleHighlightColor( blue() );
+ TQApplication.setWinStyleHighlightColor( blue() );
break;
case 4:
- QApplication.setWinStyleHighlightColor( red() );
+ TQApplication.setWinStyleHighlightColor( red() );
break;
}
}
@@ -757,12 +757,12 @@ void spinBoxValueChanged( String valueText )
static boolean identify_now = true;
-public boolean eventFilter( QObject obj, QEvent event )
+public boolean eventFilter( TQObject obj, TQEvent event )
{
- if ( event.type() == QEvent.MouseButtonPress && event instanceof QMouseEvent && identify_now ) {
- QMouseEvent e = (QMouseEvent)event;
- if ( e.button() == QMouseEvent.RightButton &&
- (e.state() & QMouseEvent.ControlButton) != 0 ){
+ if ( event.type() == TQEvent.MouseButtonPress && event instanceof TQMouseEvent && identify_now ) {
+ TQMouseEvent e = (TQMouseEvent)event;
+ if ( e.button() == TQMouseEvent.RightButton &&
+ (e.state() & TQMouseEvent.ControlButton) != 0 ){
String str = "The clicked widget is a\n";
str += obj.className();
str += "\nThe widget's name is\n";
@@ -771,7 +771,7 @@ public boolean eventFilter( QObject obj, QEvent event )
else
str += "<no name>";
identify_now = false; // don't do it in message box
- QMessageBox.information( (QWidget)obj, "Identify Widget", str );
+ TQMessageBox.information( (TQWidget)obj, "Identify Widget", str );
identify_now = true; // allow it again
}
}
@@ -782,13 +782,13 @@ public boolean eventFilter( QObject obj, QEvent event )
void open()
{
- QFileDialog.getOpenFileName( "", "Textfiles (.txt)", this );
+ TQFileDialog.getOpenFileName( "", "Textfiles (.txt)", this );
}
void dummy()
{
- QMessageBox.information( this, "Sorry",
+ TQMessageBox.information( this, "Sorry",
"This function is not implemented" );
}
@@ -796,17 +796,17 @@ void selectionChanged()
{
//qDebug("selectionChanged");
}
-void selectionChanged( QListViewItem item)
+void selectionChanged( TQListViewItem item)
{
//qDebug("selectionChanged %p", item );
}
-void clicked( QListViewItem item )
+void clicked( TQListViewItem item )
{
//qDebug("clicked %p", item );
}
-void mySelectionChanged( QListViewItem item )
+void mySelectionChanged( TQListViewItem item )
{
//qDebug("mySelectionChanged %p", item );
}
@@ -818,7 +818,7 @@ void showProperties()
String output = "Properties for class '" + qApp().focusWidget().className() + "'";
int i = 0;
while( i < (int) qApp().focusWidget().metaObject().numProperties( true ) ) {
- QMetaProperty p
+ TQMetaProperty p
= qApp().focusWidget().metaObject().property( i, true );
String tmp = "\n " + (++i) + ": " + p.name()
+ " (read-" + (p.writable() ? "write" : "only") + ", " + p.type() + ")";
diff --git a/qtjava/javalib/examples/widgets/trolltech.bmp b/qtjava/javalib/examples/widgets/trolltech.bmp
index 01a56a2e..18899f2b 100644
--- a/qtjava/javalib/examples/widgets/trolltech.bmp
+++ b/qtjava/javalib/examples/widgets/trolltech.bmp
Binary files differ
diff --git a/qtjava/javalib/examples/widgets/trolltech.gif b/qtjava/javalib/examples/widgets/trolltech.gif
index f674369e..02c13b14 100644
--- a/qtjava/javalib/examples/widgets/trolltech.gif
+++ b/qtjava/javalib/examples/widgets/trolltech.gif
Binary files differ
diff --git a/qtjava/javalib/examples/widgets/tt-logo.png b/qtjava/javalib/examples/widgets/tt-logo.png
index a0d9e340..1e51bfe2 100644
--- a/qtjava/javalib/examples/widgets/tt-logo.png
+++ b/qtjava/javalib/examples/widgets/tt-logo.png
Binary files differ
diff --git a/qtjava/javalib/examples/wizard/Main.java b/qtjava/javalib/examples/wizard/Main.java
index 9f689214..4dbbebd3 100644
--- a/qtjava/javalib/examples/wizard/Main.java
+++ b/qtjava/javalib/examples/wizard/Main.java
@@ -14,7 +14,7 @@ public class Main {
public static void main(String[] args)
{
- QApplication a = new QApplication( args );
+ TQApplication a = new TQApplication( args );
Wizard wizard = new Wizard();
wizard.setCaption("Qt Example - Wizard");
diff --git a/qtjava/javalib/examples/wizard/Wizard.java b/qtjava/javalib/examples/wizard/Wizard.java
index dd0659dc..ab355e08 100644
--- a/qtjava/javalib/examples/wizard/Wizard.java
+++ b/qtjava/javalib/examples/wizard/Wizard.java
@@ -10,11 +10,11 @@
import org.kde.qt.*;
-class Wizard extends QWizard
+class Wizard extends TQWizard
{
-protected QHBox page1, page2, page3;
-protected QLineEdit key, firstName, lastName, address, phone, email;
-protected QLabel lKey, lFirstName, lLastName, lAddress, lPhone, lEmail;
+protected TQHBox page1, page2, page3;
+protected TQLineEdit key, firstName, lastName, address, phone, email;
+protected TQLabel lKey, lFirstName, lLastName, lAddress, lPhone, lEmail;
@@ -24,7 +24,7 @@ Wizard( )
this(null, null);
}
-Wizard( QWidget parent, String name )
+Wizard( TQWidget parent, String name )
{
super( parent, name, true );
setupPage1();
@@ -37,11 +37,11 @@ Wizard( QWidget parent, String name )
void setupPage1()
{
- page1 = new QHBox( this );
+ page1 = new TQHBox( this );
page1.setSpacing(8);
- QLabel info = new QLabel( page1 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page1 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "Enter your personal\n"
+ "key here.\n\n"
+ "Your personal key\n"
@@ -49,15 +49,15 @@ void setupPage1()
info.setIndent( 8 );
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page1 );
+ TQVBox page = new TQVBox( page1 );
- QHBox row1 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
- new QLabel( "Key:", row1 );
+ new TQLabel( "Key:", row1 );
- key = new QLineEdit( row1 );
+ key = new TQLineEdit( row1 );
key.setMaxLength( 4 );
- key.setValidator( new QIntValidator( 1000, 9999, key ) );
+ key.setValidator( new TQIntValidator( 1000, 9999, key ) );
connect( key, SIGNAL(" textChanged( String )"),
this, SLOT(" keyChanged( String )") );
@@ -70,37 +70,37 @@ void setupPage1()
void setupPage2()
{
- page2 = new QHBox( this );
+ page2 = new TQHBox( this );
page2.setSpacing(8);
- QLabel info = new QLabel( page2 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page2 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "\n"
+ " Enter your personal \n"
+ " data here. \n\n"
- + " The required fields are \n"
+ + " The retquired fields are \n"
+ " First Name, Last Name \n"
+ " and E-Mail. \n" );
info.setIndent(8);
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page2 );
+ TQVBox page = new TQVBox( page2 );
- QHBox row1 = new QHBox( page );
- QHBox row2 = new QHBox( page );
- QHBox row3 = new QHBox( page );
- QHBox row4 = new QHBox( page );
- QHBox row5 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
+ TQHBox row2 = new TQHBox( page );
+ TQHBox row3 = new TQHBox( page );
+ TQHBox row4 = new TQHBox( page );
+ TQHBox row5 = new TQHBox( page );
- QLabel label1 = new QLabel( " First Name: ", row1 );
+ TQLabel label1 = new TQLabel( " First Name: ", row1 );
label1.setAlignment( Qt.AlignVCenter );
- QLabel label2 = new QLabel( " Last Name: ", row2 );
+ TQLabel label2 = new TQLabel( " Last Name: ", row2 );
label2.setAlignment( Qt.AlignVCenter );
- QLabel label3 = new QLabel( " Address: ", row3 );
+ TQLabel label3 = new TQLabel( " Address: ", row3 );
label3.setAlignment( Qt.AlignVCenter );
- QLabel label4 = new QLabel( " Phone Number: ", row4 );
+ TQLabel label4 = new TQLabel( " Phone Number: ", row4 );
label4.setAlignment( Qt.AlignVCenter );
- QLabel label5 = new QLabel( " E-Mail: ", row5 );
+ TQLabel label5 = new TQLabel( " E-Mail: ", row5 );
label5.setAlignment( Qt.AlignVCenter );
label1.setMinimumWidth( label4.sizeHint().width() );
@@ -109,11 +109,11 @@ void setupPage2()
label4.setMinimumWidth( label4.sizeHint().width() );
label5.setMinimumWidth( label4.sizeHint().width() );
- firstName = new QLineEdit( row1 );
- lastName = new QLineEdit( row2 );
- address = new QLineEdit( row3 );
- phone = new QLineEdit( row4 );
- email = new QLineEdit( row5 );
+ firstName = new TQLineEdit( row1 );
+ lastName = new TQLineEdit( row2 );
+ address = new TQLineEdit( row3 );
+ phone = new TQLineEdit( row4 );
+ email = new TQLineEdit( row5 );
connect( firstName, SIGNAL(" textChanged( String )"),
this, SLOT(" dataChanged( String )") );
@@ -129,11 +129,11 @@ void setupPage2()
void setupPage3()
{
- page3 = new QHBox( this );
+ page3 = new TQHBox( this );
page3.setSpacing(8);
- QLabel info = new QLabel( page3 );
- info.setPalette( new QPalette(yellow()) );
+ TQLabel info = new TQLabel( page3 );
+ info.setPalette( new TQPalette(yellow()) );
info.setText( "\n"
+ " Look here to see of \n"
+ " the data you entered \n"
@@ -145,26 +145,26 @@ void setupPage3()
info.setAlignment( AlignTop|AlignLeft );
info.setMaximumWidth( info.sizeHint().width() );
- QVBox page = new QVBox( page3 );
+ TQVBox page = new TQVBox( page3 );
- QHBox row1 = new QHBox( page );
- QHBox row2 = new QHBox( page );
- QHBox row3 = new QHBox( page );
- QHBox row4 = new QHBox( page );
- QHBox row5 = new QHBox( page );
- QHBox row6 = new QHBox( page );
+ TQHBox row1 = new TQHBox( page );
+ TQHBox row2 = new TQHBox( page );
+ TQHBox row3 = new TQHBox( page );
+ TQHBox row4 = new TQHBox( page );
+ TQHBox row5 = new TQHBox( page );
+ TQHBox row6 = new TQHBox( page );
- QLabel label1 = new QLabel( " Personal Key: ", row1 );
+ TQLabel label1 = new TQLabel( " Personal Key: ", row1 );
label1.setAlignment( Qt.AlignVCenter );
- QLabel label2 = new QLabel( " First Name: ", row2 );
+ TQLabel label2 = new TQLabel( " First Name: ", row2 );
label2.setAlignment( Qt.AlignVCenter );
- QLabel label3 = new QLabel( " Last Name: ", row3 );
+ TQLabel label3 = new TQLabel( " Last Name: ", row3 );
label3.setAlignment( Qt.AlignVCenter );
- QLabel label4 = new QLabel( " Address: ", row4 );
+ TQLabel label4 = new TQLabel( " Address: ", row4 );
label4.setAlignment( Qt.AlignVCenter );
- QLabel label5 = new QLabel( " Phone Number: ", row5 );
+ TQLabel label5 = new TQLabel( " Phone Number: ", row5 );
label5.setAlignment( Qt.AlignVCenter );
- QLabel label6 = new QLabel( " E-Mail: ", row6 );
+ TQLabel label6 = new TQLabel( " E-Mail: ", row6 );
label6.setAlignment( Qt.AlignVCenter );
label1.setMinimumWidth( label1.sizeHint().width() );
@@ -174,12 +174,12 @@ void setupPage3()
label5.setMinimumWidth( label1.sizeHint().width() );
label6.setMinimumWidth( label1.sizeHint().width() );
- lKey = new QLabel( row1 );
- lFirstName = new QLabel( row2 );
- lLastName = new QLabel( row3 );
- lAddress = new QLabel( row4 );
- lPhone = new QLabel( row5 );
- lEmail = new QLabel( row6 );
+ lKey = new TQLabel( row1 );
+ lFirstName = new TQLabel( row2 );
+ lLastName = new TQLabel( row3 );
+ lAddress = new TQLabel( row4 );
+ lPhone = new TQLabel( row5 );
+ lEmail = new TQLabel( row6 );
addPage( page3, "Finish" );
@@ -187,12 +187,12 @@ void setupPage3()
setHelpEnabled( page3, false );
}
-// The QWizard.showPage() virtual method callback isn't implemented in the java
+// The TQWizard.showPage() virtual method callback isn't implemented in the java
// bindings yet, so use the selected() signal connected to this slot 'doShowPage()'
// instead..
public void doShowPage( String title )
{
- QWidget page = currentPage();
+ TQWidget page = currentPage();
if ( page == page1 ) {
} else if ( page == page2 ) {
@@ -221,7 +221,7 @@ void keyChanged( String text )
{
StringBuffer t = new StringBuffer(text);
int[] p = { 0 };
- boolean on = ( key.validator().validate(t, p) == QValidator.Acceptable );
+ boolean on = ( key.validator().validate(t, p) == TQValidator.Acceptable );
nextButton().setEnabled( on );
}