summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/test
diff options
context:
space:
mode:
Diffstat (limited to 'qtjava/javalib/test')
-rw-r--r--qtjava/javalib/test/AppWizardBase.java116
-rw-r--r--qtjava/javalib/test/DirTest.java12
-rw-r--r--qtjava/javalib/test/FilePropsPageBase.java70
-rw-r--r--qtjava/javalib/test/Foo.java2
-rw-r--r--qtjava/javalib/test/ISBNValidator.java12
-rw-r--r--qtjava/javalib/test/KillerFilter.java24
-rw-r--r--qtjava/javalib/test/QTimerTest.java108
-rw-r--r--qtjava/javalib/test/ScribbleWindow.java96
-rw-r--r--qtjava/javalib/test/SignalForwarder.java6
9 files changed, 223 insertions, 223 deletions
diff --git a/qtjava/javalib/test/AppWizardBase.java b/qtjava/javalib/test/AppWizardBase.java
index 48ae0dd3..9cdb47cb 100644
--- a/qtjava/javalib/test/AppWizardBase.java
+++ b/qtjava/javalib/test/AppWizardBase.java
@@ -8,32 +8,32 @@
****************************************************************************/
import org.kde.qt.*;
-public class AppWizardBase extends QWizard {
- QGroupBox GroupBox8;
- QCheckBox lsm_checkbox;
- QLabel TextLabel7;
- QComboBox license_combobox;
- QLabel TextLabel2;
- QLineEdit version_edit;
- QLabel TextLabel5;
- QMultiLineEdit desc_multiedit;
- QGroupBox General;
- QLabel TextLabel4;
- QLabel TextLabel6;
- QLabel TextLabel3;
- QLineEdit company_edit;
- QLineEdit email_edit;
- QLineEdit author_edit;
- QLabel TextLabel1;
- QPushButton loadheader_button;
- QPushButton newheader_button;
- QMultiLineEdit header_multiedit;
-
- QGridLayout grid;
- QGridLayout GroupBox8Layout;
- QGridLayout GeneralLayout;
- QGridLayout grid_2;
- QHBoxLayout Layout5;
+public class AppWizardBase extends TQWizard {
+ TQGroupBox GroupBox8;
+ TQCheckBox lsm_checkbox;
+ TQLabel TextLabel7;
+ TQComboBox license_combobox;
+ TQLabel TextLabel2;
+ TQLineEdit version_edit;
+ TQLabel TextLabel5;
+ TQMultiLineEdit desc_multiedit;
+ TQGroupBox General;
+ TQLabel TextLabel4;
+ TQLabel TextLabel6;
+ TQLabel TextLabel3;
+ TQLineEdit company_edit;
+ TQLineEdit email_edit;
+ TQLineEdit author_edit;
+ TQLabel TextLabel1;
+ TQPushButton loadheader_button;
+ TQPushButton newheader_button;
+ TQMultiLineEdit header_multiedit;
+
+ TQGridLayout grid;
+ TQGridLayout GroupBox8Layout;
+ TQGridLayout GeneralLayout;
+ TQGridLayout grid_2;
+ TQHBoxLayout Layout5;
/*
@@ -43,139 +43,139 @@ public class AppWizardBase extends QWizard {
* The wizard will by default be modeless, unless you set 'modal' to
* true to construct a modal wizard.
*/
-AppWizardBase( QWidget parent, String name, boolean modal, int fl )
+AppWizardBase( TQWidget parent, String name, boolean modal, int fl )
{
super( parent, name, modal, fl );
if ( name == null )
setName( "AppWizardBase" );
resize( 414, 437 );
setCaption( tr( "Application Wizard" ) );
- QToolTip.add( this, tr( "" ) );
+ TQToolTip.add( this, tr( "" ) );
- QWidget privateWidget = new QWidget( this, "privateWidget" );
- grid = new QGridLayout( privateWidget );
+ TQWidget privateWidget = new TQWidget( this, "privateWidget" );
+ grid = new TQGridLayout( privateWidget );
grid.setSpacing( 6 );
grid.setMargin( 11 );
- GroupBox8 = new QGroupBox( privateWidget, "GroupBox8" );
+ GroupBox8 = new TQGroupBox( privateWidget, "GroupBox8" );
GroupBox8.setTitle( tr( "Project" ) );
GroupBox8.setColumnLayout(0, Qt.Vertical );
GroupBox8.layout().setSpacing( 0 );
GroupBox8.layout().setMargin( 0 );
- GroupBox8Layout = new QGridLayout( GroupBox8.layout() );
+ GroupBox8Layout = new TQGridLayout( GroupBox8.layout() );
GroupBox8Layout.setAlignment( Qt.AlignTop );
GroupBox8Layout.setSpacing( 6 );
GroupBox8Layout.setMargin( 11 );
- lsm_checkbox = new QCheckBox( GroupBox8, "lsm_checkbox" );
+ lsm_checkbox = new TQCheckBox( GroupBox8, "lsm_checkbox" );
lsm_checkbox.setText( tr( "generate lsm-File - (Linux Software Map)" ) );
GroupBox8Layout.addMultiCellWidget( lsm_checkbox, 1, 1, 0, 3 );
- TextLabel7 = new QLabel( GroupBox8, "TextLabel7" );
+ TextLabel7 = new TQLabel( GroupBox8, "TextLabel7" );
TextLabel7.setText( tr( "License:" ) );
GroupBox8Layout.addWidget( TextLabel7, 0, 0 );
- license_combobox = new QComboBox( false, GroupBox8, "license_combobox" );
+ license_combobox = new TQComboBox( false, GroupBox8, "license_combobox" );
license_combobox.insertItem( tr( "GPL" ) );
license_combobox.insertItem( tr( "LGPL" ) );
license_combobox.insertItem( tr( "BSD" ) );
license_combobox.insertItem( tr( "Artistic" ) );
- license_combobox.insertItem( tr( "QPL" ) );
+ license_combobox.insertItem( tr( "TQPL" ) );
license_combobox.insertItem( tr( "Custom" ) );
GroupBox8Layout.addWidget( license_combobox, 0, 1 );
- TextLabel2 = new QLabel( GroupBox8, "TextLabel2" );
+ TextLabel2 = new TQLabel( GroupBox8, "TextLabel2" );
TextLabel2.setText( tr( "Version:" ) );
GroupBox8Layout.addWidget( TextLabel2, 0, 2 );
- version_edit = new QLineEdit( GroupBox8, "version_edit" );
+ version_edit = new TQLineEdit( GroupBox8, "version_edit" );
version_edit.setText( tr( "0.1" ) );
GroupBox8Layout.addWidget( version_edit, 0, 3 );
- TextLabel5 = new QLabel( GroupBox8, "TextLabel5" );
+ TextLabel5 = new TQLabel( GroupBox8, "TextLabel5" );
TextLabel5.setText( tr( "Description:" ) );
GroupBox8Layout.addMultiCellWidget( TextLabel5, 2, 2, 0, 1 );
- desc_multiedit = new QMultiLineEdit( GroupBox8, "desc_multiedit" );
+ desc_multiedit = new TQMultiLineEdit( GroupBox8, "desc_multiedit" );
GroupBox8Layout.addMultiCellWidget( desc_multiedit, 3, 3, 0, 3 );
grid.addWidget( GroupBox8, 1, 0 );
- General = new QGroupBox( privateWidget, "General" );
+ General = new TQGroupBox( privateWidget, "General" );
General.setTitle( tr( "General" ) );
General.setColumnLayout(0, Qt.Vertical );
General.layout().setSpacing( 0 );
General.layout().setMargin( 0 );
- GeneralLayout = new QGridLayout( General.layout() );
+ GeneralLayout = new TQGridLayout( General.layout() );
GeneralLayout.setAlignment( Qt.AlignTop );
GeneralLayout.setSpacing( 6 );
GeneralLayout.setMargin( 11 );
- TextLabel4 = new QLabel( General, "TextLabel4" );
+ TextLabel4 = new TQLabel( General, "TextLabel4" );
TextLabel4.setText( tr( "Company:" ) );
GeneralLayout.addWidget( TextLabel4, 2, 0 );
- TextLabel6 = new QLabel( General, "TextLabel6" );
+ TextLabel6 = new TQLabel( General, "TextLabel6" );
TextLabel6.setText( tr( "Email:" ) );
GeneralLayout.addWidget( TextLabel6, 1, 0 );
- TextLabel3 = new QLabel( General, "TextLabel3" );
+ TextLabel3 = new TQLabel( General, "TextLabel3" );
TextLabel3.setText( tr( "Author:" ) );
GeneralLayout.addWidget( TextLabel3, 0, 0 );
- company_edit = new QLineEdit( General, "company_edit" );
+ company_edit = new TQLineEdit( General, "company_edit" );
GeneralLayout.addWidget( company_edit, 2, 1 );
- email_edit = new QLineEdit( General, "email_edit" );
+ email_edit = new TQLineEdit( General, "email_edit" );
GeneralLayout.addWidget( email_edit, 1, 1 );
- author_edit = new QLineEdit( General, "author_edit" );
+ author_edit = new TQLineEdit( General, "author_edit" );
GeneralLayout.addWidget( author_edit, 0, 1 );
grid.addWidget( General, 0, 0 );
addPage( privateWidget, tr( "General" ) );
- QWidget privateWidget_2 = new QWidget( this, "privateWidget_2" );
- grid_2 = new QGridLayout( privateWidget_2 );
+ TQWidget privateWidget_2 = new TQWidget( this, "privateWidget_2" );
+ grid_2 = new TQGridLayout( privateWidget_2 );
grid_2.setSpacing( 6 );
grid_2.setMargin( 11 );
- Layout5 = new QHBoxLayout();
+ Layout5 = new TQHBoxLayout();
Layout5.setSpacing( 6 );
Layout5.setMargin( 0 );
- TextLabel1 = new QLabel( privateWidget_2, "TextLabel1" );
+ TextLabel1 = new TQLabel( privateWidget_2, "TextLabel1" );
TextLabel1.setText( tr( "headertemplate for your files:" ) );
Layout5.addWidget( TextLabel1 );
- QSpacerItem spacer = new QSpacerItem( 0, 0, QSizePolicy.Expanding, QSizePolicy.Minimum );
+ TQSpacerItem spacer = new TQSpacerItem( 0, 0, TQSizePolicy.Expanding, TQSizePolicy.Minimum );
Layout5.addItem( spacer );
- loadheader_button = new QPushButton( privateWidget_2, "loadheader_button" );
+ loadheader_button = new TQPushButton( privateWidget_2, "loadheader_button" );
loadheader_button.setText( tr( "Load..." ) );
- QToolTip.add( loadheader_button, tr( "" ) );
+ TQToolTip.add( loadheader_button, tr( "" ) );
Layout5.addWidget( loadheader_button );
- newheader_button = new QPushButton( privateWidget_2, "newheader_button" );
+ newheader_button = new TQPushButton( privateWidget_2, "newheader_button" );
newheader_button.setText( tr( "New" ) );
- QToolTip.add( newheader_button, tr( "Clears the pre-set headertemplate" ) );
+ TQToolTip.add( newheader_button, tr( "Clears the pre-set headertemplate" ) );
Layout5.addWidget( newheader_button );
grid_2.addLayout( Layout5, 0, 0 );
- header_multiedit = new QMultiLineEdit( privateWidget_2, "header_multiedit" );
+ header_multiedit = new TQMultiLineEdit( privateWidget_2, "header_multiedit" );
grid_2.addWidget( header_multiedit, 1, 0 );
addPage( privateWidget_2, tr( "Header" ) );
diff --git a/qtjava/javalib/test/DirTest.java b/qtjava/javalib/test/DirTest.java
index 1a694ed0..9a00962a 100644
--- a/qtjava/javalib/test/DirTest.java
+++ b/qtjava/javalib/test/DirTest.java
@@ -1,13 +1,13 @@
-//import org.kde.qt.QApplication;
-//import org.kde.qt.QDir;
+//import org.kde.qt.TQApplication;
+//import org.kde.qt.TQDir;
import org.kde.qt.*;
public class DirTest {
public static void main(String[] args)
{
- QApplication myapp = new QApplication(args);
+ TQApplication myapp = new TQApplication(args);
- QDir mydir = new QDir("/tmp");
+ TQDir mydir = new TQDir("/tmp");
if ( mydir.match(new String [] {"*.bmp", "*.h"}, "foobar.bmp") ) {
System.out.println("foobar matches");
}
@@ -16,10 +16,10 @@ public class DirTest {
System.out.println("baz doesn't match");
}
- QFile myobj = new QFile();
+ TQFile myobj = new TQFile();
Object mytest;
System.out.println("myobj: " + myobj.toString());
- mytest = (QDir) Qt.dynamicCast("QDir", myobj);
+ mytest = (TQDir) Qt.dynamicCast("TQDir", myobj);
System.out.println("mytest: " + mytest.toString());
return;
}
diff --git a/qtjava/javalib/test/FilePropsPageBase.java b/qtjava/javalib/test/FilePropsPageBase.java
index 4fd11d27..ba0a8f9e 100644
--- a/qtjava/javalib/test/FilePropsPageBase.java
+++ b/qtjava/javalib/test/FilePropsPageBase.java
@@ -9,113 +9,113 @@
import org.kde.qt.*;
-public class FilePropsPageBase extends QWidget {
- QGroupBox GroupBox7;
- QLabel TextLabel1_2;
- QLineEdit classname_edit;
- QLabel TextLabel2_2;
- QLineEdit baseclass_edit;
- QLineEdit headerfile_edit;
- QLabel implfile_label;
- QLabel headerfile_label;
- QLineEdit implfile_edit;
- QLabel TextLabel5;
- QLabel TextLabel6;
- QListBox classes_listbox;
- QMultiLineEdit desc_textview;
-
- QGridLayout grid;
- QGridLayout grid_2;
+public class FilePropsPageBase extends TQWidget {
+ TQGroupBox GroupBox7;
+ TQLabel TextLabel1_2;
+ TQLineEdit classname_edit;
+ TQLabel TextLabel2_2;
+ TQLineEdit baseclass_edit;
+ TQLineEdit headerfile_edit;
+ TQLabel implfile_label;
+ TQLabel headerfile_label;
+ TQLineEdit implfile_edit;
+ TQLabel TextLabel5;
+ TQLabel TextLabel6;
+ TQListBox classes_listbox;
+ TQMultiLineEdit desc_textview;
+
+ TQGridLayout grid;
+ TQGridLayout grid_2;
/*
* Constructs a FilePropsPageBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-public FilePropsPageBase( QWidget parent, String name, int fl )
+public FilePropsPageBase( TQWidget parent, String name, int fl )
{
super( parent, name, fl );
if ( name == null )
setName( "Form1" );
resize( 414, 366 );
setCaption( tr( "Form1" ) );
- grid = new QGridLayout( this );
+ grid = new TQGridLayout( this );
grid.setSpacing( 6 );
grid.setMargin( 11 );
- GroupBox7 = new QGroupBox( this, "GroupBox7" );
+ GroupBox7 = new TQGroupBox( this, "GroupBox7" );
GroupBox7.setTitle( tr( "Customize" ) );
GroupBox7.setColumnLayout(0, Qt.Vertical );
GroupBox7.layout().setSpacing( 0 );
GroupBox7.layout().setMargin( 0 );
- grid_2 = new QGridLayout( GroupBox7.layout() );
+ grid_2 = new TQGridLayout( GroupBox7.layout() );
grid_2.setAlignment( Qt.AlignTop );
grid_2.setSpacing( 6 );
grid_2.setMargin( 11 );
- TextLabel1_2 = new QLabel( GroupBox7, "TextLabel1_2" );
+ TextLabel1_2 = new TQLabel( GroupBox7, "TextLabel1_2" );
TextLabel1_2.setText( tr( "Class name:" ) );
grid_2.addWidget( TextLabel1_2, 0, 0 );
- classname_edit = new QLineEdit( GroupBox7, "classname_edit" );
+ classname_edit = new TQLineEdit( GroupBox7, "classname_edit" );
grid_2.addWidget( classname_edit, 1, 0 );
- TextLabel2_2 = new QLabel( GroupBox7, "TextLabel2_2" );
+ TextLabel2_2 = new TQLabel( GroupBox7, "TextLabel2_2" );
TextLabel2_2.setText( tr( "Base class:" ) );
grid_2.addWidget( TextLabel2_2, 2, 0 );
- baseclass_edit = new QLineEdit( GroupBox7, "baseclass_edit" );
+ baseclass_edit = new TQLineEdit( GroupBox7, "baseclass_edit" );
grid_2.addWidget( baseclass_edit, 3, 0 );
- headerfile_edit = new QLineEdit( GroupBox7, "headerfile_edit" );
+ headerfile_edit = new TQLineEdit( GroupBox7, "headerfile_edit" );
grid_2.addWidget( headerfile_edit, 1, 1 );
- implfile_label = new QLabel( GroupBox7, "implfile_label" );
+ implfile_label = new TQLabel( GroupBox7, "implfile_label" );
implfile_label.setText( tr( "Implementation file:" ) );
grid_2.addWidget( implfile_label, 2, 1 );
- headerfile_label = new QLabel( GroupBox7, "headerfile_label" );
+ headerfile_label = new TQLabel( GroupBox7, "headerfile_label" );
headerfile_label.setText( tr( "Header file:" ) );
grid_2.addWidget( headerfile_label, 0, 1 );
- implfile_edit = new QLineEdit( GroupBox7, "implfile_edit" );
+ implfile_edit = new TQLineEdit( GroupBox7, "implfile_edit" );
grid_2.addWidget( implfile_edit, 3, 1 );
grid.addMultiCellWidget( GroupBox7, 2, 2, 0, 1 );
- TextLabel5 = new QLabel( this, "TextLabel5" );
+ TextLabel5 = new TQLabel( this, "TextLabel5" );
TextLabel5.setText( tr( "Classes:" ) );
grid.addWidget( TextLabel5, 0, 0 );
- TextLabel6 = new QLabel( this, "TextLabel6" );
+ TextLabel6 = new TQLabel( this, "TextLabel6" );
TextLabel6.setText( tr( "Description:" ) );
grid.addWidget( TextLabel6, 0, 1 );
- classes_listbox = new QListBox( this, "classes_listbox" );
+ classes_listbox = new TQListBox( this, "classes_listbox" );
grid.addWidget( classes_listbox, 1, 0 );
- desc_textview = new QMultiLineEdit( this, "desc_textview" );
+ desc_textview = new TQMultiLineEdit( this, "desc_textview" );
desc_textview.setEnabled( true );
desc_textview.setText( tr( "" ) );
- desc_textview.setWordWrap( QMultiLineEdit.WidgetWidth );
+ desc_textview.setWordWrap( TQMultiLineEdit.WidgetWidth );
desc_textview.setReadOnly( true );
grid.addWidget( desc_textview, 1, 1 );
// signals and slots connections
connect( classname_edit, SIGNAL( "textChanged(String)" ), this, SLOT( "slotClassnameChanged(String)" ) );
- connect( classes_listbox, SIGNAL( "mouseButtonClicked(int,QListBoxItem,QPoint)" ), this, SLOT( "slotSelectionChanged()" ) );
+ connect( classes_listbox, SIGNAL( "mouseButtonClicked(int,TQListBoxItem,TQPoint)" ), this, SLOT( "slotSelectionChanged()" ) );
// tab order
setTabOrder( classes_listbox, classname_edit );
diff --git a/qtjava/javalib/test/Foo.java b/qtjava/javalib/test/Foo.java
index e4bddb6d..3d4e5784 100644
--- a/qtjava/javalib/test/Foo.java
+++ b/qtjava/javalib/test/Foo.java
@@ -7,7 +7,7 @@ public class Foo extends AppWizardBase {
* The wizard will by default be modeless, unless you set 'modal' to
* true to construct a modal wizard.
*/
-Foo( QWidget parent, String name, boolean modal, int fl )
+Foo( TQWidget parent, String name, boolean modal, int fl )
{
super( parent, name, modal, fl );
}
diff --git a/qtjava/javalib/test/ISBNValidator.java b/qtjava/javalib/test/ISBNValidator.java
index 25744e11..67f32ac7 100644
--- a/qtjava/javalib/test/ISBNValidator.java
+++ b/qtjava/javalib/test/ISBNValidator.java
@@ -6,7 +6,7 @@ import org.kde.qt.*;
* A class that validates ISBN numbers. See the text for the
* specification.
*/
-public class ISBNValidator extends QValidator
+public class ISBNValidator extends TQValidator
{
public ISBNValidator()
{
@@ -99,7 +99,7 @@ public class ISBNValidator extends QValidator
/**
* This method is called when the user has pressed return, but
* validate() has judged the string valid but not acceptable. Note
- * that fixup() is not required to return an acceptable string. It is
+ * that fixup() is not retquired to return an acceptable string. It is
* guaranteed that the caller will validate() the string once again
* after the call to fixup().
*/
@@ -129,17 +129,17 @@ public class ISBNValidator extends QValidator
public static void main(String[] args)
{
- class ReturnReceiver extends QObject {
+ class ReturnReceiver extends TQObject {
public void slotReturnPressed()
{
System.out.println( "return pressed - input accepted" );
}
}
- QApplication myapp = new QApplication( args );
+ TQApplication myapp = new TQApplication( args );
// create a line edit
- QLineEdit myedit = new QLineEdit((QWidget) null);
+ TQLineEdit myedit = new TQLineEdit((TQWidget) null);
myedit.resize( 100, 30 );
// create and assign a validator for the line edit
@@ -148,7 +148,7 @@ public class ISBNValidator extends QValidator
// set up a receiver for the returnPressed() signal
ReturnReceiver receiver = new ReturnReceiver();
- QObject.connect( myedit, SIGNAL( "returnPressed()" ),
+ TQObject.connect( myedit, SIGNAL( "returnPressed()" ),
receiver, SLOT( "slotReturnPressed()" ) );
myapp.setMainWidget( myedit );
diff --git a/qtjava/javalib/test/KillerFilter.java b/qtjava/javalib/test/KillerFilter.java
index 76481284..d329f3c9 100644
--- a/qtjava/javalib/test/KillerFilter.java
+++ b/qtjava/javalib/test/KillerFilter.java
@@ -1,11 +1,11 @@
import org.kde.qt.*;
-public class KillerFilter extends QObject {
+public class KillerFilter extends TQObject {
- public boolean eventFilter( QObject object, QEvent event) {
- if (event.type() == QEvent.MouseButtonPress) {
- if ( ((QMouseEvent)event).button() == RightButton ) {
- ((QWidget) object).close();
+ public boolean eventFilter( TQObject object, TQEvent event) {
+ if (event.type() == TQEvent.MouseButtonPress) {
+ if ( ((TQMouseEvent)event).button() == RightButton ) {
+ ((TQWidget) object).close();
return true;
} else {
return false;
@@ -17,29 +17,29 @@ public class KillerFilter extends QObject {
public static void main(String[] args)
{
- QApplication a = new QApplication(args);
+ TQApplication a = new TQApplication(args);
- QWidget toplevel = new QWidget();
+ TQWidget toplevel = new TQWidget();
toplevel.resize( 230, 130 );
- QObject killerFilter = new KillerFilter();
+ TQObject killerFilter = new KillerFilter();
- QPushButton pb = new QPushButton(toplevel);
+ TQPushButton pb = new TQPushButton(toplevel);
pb.setGeometry(10, 10, 100, 50 );
pb.setText( "pushbutton" );
pb.installEventFilter( killerFilter );
- QLineEdit le = new QLineEdit( toplevel );
+ TQLineEdit le = new TQLineEdit( toplevel );
le.setGeometry( 10, 70, 100, 50 );
le.setText( "Line edit" );
le.installEventFilter( killerFilter );
- QCheckBox cb = new QCheckBox( toplevel );
+ TQCheckBox cb = new TQCheckBox( toplevel );
cb.setGeometry( 120, 10, 100, 50 );
cb.setText( "Check-box" );
cb.installEventFilter( killerFilter );
- QRadioButton rb = new QRadioButton( toplevel );
+ TQRadioButton rb = new TQRadioButton( toplevel );
rb.setGeometry( 120, 70, 100, 50 );
rb.setText( "Radio button" );
rb.installEventFilter( killerFilter );
diff --git a/qtjava/javalib/test/QTimerTest.java b/qtjava/javalib/test/QTimerTest.java
index c81c2c70..c364f68b 100644
--- a/qtjava/javalib/test/QTimerTest.java
+++ b/qtjava/javalib/test/QTimerTest.java
@@ -5,7 +5,7 @@
import org.kde.qt.*;
-public class QTimerTest extends QWidget {
+public class TQTimerTest extends TQWidget {
public static final int COLOR_MENU_ID_BLACK = 0;
public static final int COLOR_MENU_ID_RED = 1;
@@ -15,19 +15,19 @@ public class QTimerTest extends QWidget {
public static int eventCount = 0;
- private QMenuBar _menubar;
- private QPopupMenu _filemenu;
- private QPopupMenu _colormenu;
- private QPopupMenu _helpmenu;
- private QScrollView _scrollview;
+ private TQMenuBar _menubar;
+ private TQPopupMenu _filemenu;
+ private TQPopupMenu _colormenu;
+ private TQPopupMenu _helpmenu;
+ private TQScrollView _scrollview;
private ScribbleArea _scribblearea;
- public class ScribbleArea extends QWidget {
- private QPoint _last;
- private QColor _currentcolor;
+ public class ScribbleArea extends TQWidget {
+ private TQPoint _last;
+ private TQColor _currentcolor;
- private QPixmap _buffer;
- private QPopupMenu _popupmenu;
+ private TQPixmap _buffer;
+ private TQPopupMenu _popupmenu;
/**
* The constructor. Initializes the member variables.
@@ -35,24 +35,24 @@ public class QTimerTest extends QWidget {
ScribbleArea()
{
// initialize member variables
- _buffer = new QPixmap();
- _last = new QPoint();
+ _buffer = new TQPixmap();
+ _last = new TQPoint();
_currentcolor = Qt.black();
// don't blank the window before repainting
setBackgroundMode( NoBackground );
// create a pop-up menu
- _popupmenu = new QPopupMenu();
+ _popupmenu = new TQPopupMenu();
_popupmenu.insertItem( "&Clear", this, Qt.SLOT( "slotClearArea()" ) );
}
/**
* This slot sets the curren color for the scribble area. It will be
- * connected with the colorChanged( QColor ) signal from the
+ * connected with the colorChanged( TQColor ) signal from the
* ScribbleWindow.
*/
- public void setColor( QColor new_color )
+ public void setColor( TQColor new_color )
{
_currentcolor = new_color;
}
@@ -67,18 +67,18 @@ public class QTimerTest extends QWidget {
_buffer.fill( Qt.white() );
// and copy it over to the window
- QPaintDevice.bitBlt( this, 0, 0, _buffer );
+ TQPaintDevice.bitBlt( this, 0, 0, _buffer );
}
/**
- * This method does the actual loading. It relies on QPixmap (and the
+ * This method does the actual loading. It relies on TQPixmap (and the
* underlying I/O machinery) to determine the filetype.
*/
public void slotLoad( String filename )
{
if ( !_buffer.load( filename ) )
- QMessageBox.warning( null, "Load error", "Could not load file" );
+ TQMessageBox.warning( null, "Load error", "Could not load file" );
repaint(); // refresh the window
}
@@ -91,7 +91,7 @@ public class QTimerTest extends QWidget {
public void slotSave( String filename )
{
if( !_buffer.save( filename, "BMP" ) )
- QMessageBox.warning( null, "Save error", "Could not save file" );
+ TQMessageBox.warning( null, "Save error", "Could not save file" );
}
@@ -100,10 +100,10 @@ public class QTimerTest extends QWidget {
* mouse over the window. It just records the position of the mouse
* at the time of the click.
*/
- public void mousePressEvent(QMouseEvent event)
+ public void mousePressEvent(TQMouseEvent event)
{
if ( event.button() == RightButton )
- _popupmenu.exec( QCursor.pos() );
+ _popupmenu.exec( TQCursor.pos() );
else
{
_last = event.pos(); // retrieve the coordinates from the event
@@ -119,11 +119,11 @@ public class QTimerTest extends QWidget {
* we haven't, and thus don't have to check whether any buttons are
* pressed.
*/
- public void mouseMoveEvent(QMouseEvent event) {
- // create a QPainter object for drawing onto the window
- QPainter windowpainter = new QPainter();
- // and another QPainter object for drawing int an off-screen pixmap
- QPainter bufferpainter = new QPainter();
+ public void mouseMoveEvent(TQMouseEvent event) {
+ // create a TQPainter object for drawing onto the window
+ TQPainter windowpainter = new TQPainter();
+ // and another TQPainter object for drawing int an off-screen pixmap
+ TQPainter bufferpainter = new TQPainter();
// start painting
windowpainter.begin( this ); // this painter paints onto the window
@@ -149,67 +149,67 @@ public class QTimerTest extends QWidget {
* This method is called whenever the widget needs
* painting, for example when it has been obscured and then revealed again.
*/
- public void paintEvent(QPaintEvent event) {
- QPaintDevice.bitBlt(this, 0, 0, _buffer);
+ public void paintEvent(TQPaintEvent event) {
+ TQPaintDevice.bitBlt(this, 0, 0, _buffer);
}
/**
* This method get called whenever the widget needs
* painting, for example, when it has been obscured and then revealed again.
*/
- public void resizeEvent(QResizeEvent event) {
- QPixmap save = new QPixmap( _buffer );
+ public void resizeEvent(TQResizeEvent event) {
+ TQPixmap save = new TQPixmap( _buffer );
_buffer.resize( event.size() );
_buffer.fill( Qt.white() );
- QPaintDevice.bitBlt( _buffer, 0, 0, save );
+ TQPaintDevice.bitBlt( _buffer, 0, 0, save );
}
}
- QTimerTest()
+ TQTimerTest()
{
/* The next lines build the menu bar. We first create the menus
* one by one, then add them to the menu bar. */
- _filemenu = new QPopupMenu(); // create a file menu
+ _filemenu = new TQPopupMenu(); // create a file menu
_filemenu.insertItem( "&Load", this, Qt.SLOT( "slotLoad()" ) );
_filemenu.insertItem( "&Save", this, Qt.SLOT( "slotSave()" ) );
_filemenu.insertSeparator();
_filemenu.insertItem( "&Quit", Qt.qApp(), Qt.SLOT( "quit()" ) );
- _colormenu = new QPopupMenu(); // create a color menu
+ _colormenu = new TQPopupMenu(); // create a color menu
_colormenu.insertItem( "B&lack", COLOR_MENU_ID_BLACK);
_colormenu.insertItem( "&Red", COLOR_MENU_ID_RED);
_colormenu.insertItem( "&Blue", COLOR_MENU_ID_BLUE);
_colormenu.insertItem( "&Green", COLOR_MENU_ID_GREEN);
_colormenu.insertItem( "&Yellow", COLOR_MENU_ID_YELLOW);
- QObject.connect( _colormenu, SIGNAL( "activated(int)" ),
+ TQObject.connect( _colormenu, SIGNAL( "activated(int)" ),
this, SLOT( "slotColorMenu(int)" ) );
- _helpmenu = new QPopupMenu(); // create a help menu
+ _helpmenu = new TQPopupMenu(); // create a help menu
_helpmenu.insertItem( "&About QtScribble", this, SLOT( "slotAbout()" ) );
_helpmenu.insertItem( "&About Qt", this, SLOT( "slotAboutQt()" ) );
- _menubar = new QMenuBar( this, "" ); // create a menu bar
+ _menubar = new TQMenuBar( this, "" ); // create a menu bar
_menubar.insertItem( "&File", _filemenu );
_menubar.insertItem( "&Color", _colormenu );
_menubar.insertItem( "&Help", _helpmenu );
- /* We create a QScrollView and a ScribbleArea. The ScribbleArea will
+ /* We create a TQScrollView and a ScribbleArea. The ScribbleArea will
* be managed by the scroll view.*/
- _scrollview = new QScrollView( this );
+ _scrollview = new TQScrollView( this );
_scrollview.setGeometry( 0, _menubar.height(),
width(), height() - _menubar.height() );
_scribblearea = new ScribbleArea();
_scribblearea.setGeometry( 0, 0, 1000, 1000 );
_scrollview.addChild( _scribblearea );
- QObject.connect( this, SIGNAL( "colorChanged(QColor)" ),
- _scribblearea, SLOT( "setColor(QColor)" ) );
- QObject.connect( this, SIGNAL( "save(java.lang.String)" ),
+ TQObject.connect( this, SIGNAL( "colorChanged(TQColor)" ),
+ _scribblearea, SLOT( "setColor(TQColor)" ) );
+ TQObject.connect( this, SIGNAL( "save(java.lang.String)" ),
_scribblearea, SLOT( "slotSave(java.lang.String)" ) );
- QObject.connect( this, SIGNAL( "load(java.lang.String)" ),
+ TQObject.connect( this, SIGNAL( "load(java.lang.String)" ),
_scribblearea, SLOT( "slotLoad(java.lang.String)" ) );
}
- public void resizeEvent( QResizeEvent event )
+ public void resizeEvent( TQResizeEvent event )
{
/* When the whole window is resized, we have to rearrange the geometry
* in the ScribbleWindow as well. Note that the ScribbleArea does not need
@@ -222,7 +222,7 @@ public class QTimerTest extends QWidget {
public void slotAbout()
{
- QMessageBox.information( this, "About QtScribble 5",
+ TQMessageBox.information( this, "About QtScribble 5",
"This is the Scribble 5 application\n" +
"Copyright 1998 by Mathias Kalle Dalheimer\n"
);
@@ -230,7 +230,7 @@ public class QTimerTest extends QWidget {
public void slotAboutQt()
{
- QMessageBox.aboutQt( this, "About Qt" );
+ TQMessageBox.aboutQt( this, "About Qt" );
}
public void slotColorMenu( int item )
@@ -258,7 +258,7 @@ public class QTimerTest extends QWidget {
/**
* This is the slot for the menu item File/Load. It opens a
- * QFileDialog to ask the user for a filename, then emits a save()
+ * TQFileDialog to ask the user for a filename, then emits a save()
* signal with the filename as parameter.
*/
public void slotLoad()
@@ -266,14 +266,14 @@ public class QTimerTest extends QWidget {
/* Open a file dialog for loading. The default directory is the
* current directory, the filter *.bmp.
*/
- String filename = QFileDialog.getOpenFileName( ".", "*.bmp", this );
+ String filename = TQFileDialog.getOpenFileName( ".", "*.bmp", this );
if ( !filename.equals("") )
emit("load", filename);
}
/**
* This is the slot for the menu item File/Load. It opens a
- * QFileDialog to ask the user for a filename, then emits a save()
+ * TQFileDialog to ask the user for a filename, then emits a save()
* signal with the filename as parameter.
*/
public void slotSave()
@@ -281,7 +281,7 @@ public class QTimerTest extends QWidget {
/* Open a file dialog for saving. The default directory is the
* current directory, the filter *.bmp.
*/
- String filename = QFileDialog.getSaveFileName( ".", "*.bmp", this );
+ String filename = TQFileDialog.getSaveFileName( ".", "*.bmp", this );
if ( !filename.equals("") )
emit("save", filename);
}
@@ -293,11 +293,11 @@ public class QTimerTest extends QWidget {
public static void main(String[] args)
{
- QApplication myapp = new QApplication(args);
- QTimerTest mywidget = new QTimerTest();
+ TQApplication myapp = new TQApplication(args);
+ TQTimerTest mywidget = new TQTimerTest();
mywidget.setGeometry(50, 500, 400, 400);
- QTimer timer = new QTimer( mywidget );
+ TQTimer timer = new TQTimer( mywidget );
connect( timer, Qt.SIGNAL("timeout()"),
mywidget, Qt.SLOT("timerDone()") );
timer.start( 2000, false ); // 2 seconds single-shot
diff --git a/qtjava/javalib/test/ScribbleWindow.java b/qtjava/javalib/test/ScribbleWindow.java
index 731b136f..c8e98166 100644
--- a/qtjava/javalib/test/ScribbleWindow.java
+++ b/qtjava/javalib/test/ScribbleWindow.java
@@ -5,7 +5,7 @@
import org.kde.qt.*;
-public class ScribbleWindow extends QWidget {
+public class ScribbleWindow extends TQWidget {
public static final int COLOR_MENU_ID_BLACK = 0;
public static final int COLOR_MENU_ID_RED = 1;
@@ -13,19 +13,19 @@ public class ScribbleWindow extends QWidget {
public static final int COLOR_MENU_ID_GREEN = 3;
public static final int COLOR_MENU_ID_YELLOW = 4;
- private QMenuBar _menubar;
- private QPopupMenu _filemenu;
- private QPopupMenu _colormenu;
- private QPopupMenu _helpmenu;
- private QScrollView _scrollview;
+ private TQMenuBar _menubar;
+ private TQPopupMenu _filemenu;
+ private TQPopupMenu _colormenu;
+ private TQPopupMenu _helpmenu;
+ private TQScrollView _scrollview;
private ScribbleArea _scribblearea;
- public class ScribbleArea extends QWidget {
- private QPoint _last;
- private QColor _currentcolor;
+ public class ScribbleArea extends TQWidget {
+ private TQPoint _last;
+ private TQColor _currentcolor;
- private QPixmap _buffer;
- private QPopupMenu _popupmenu;
+ private TQPixmap _buffer;
+ private TQPopupMenu _popupmenu;
/**
* The constructor. Initializes the member variables.
@@ -33,24 +33,24 @@ public class ScribbleWindow extends QWidget {
ScribbleArea()
{
// initialize member variables
- _buffer = new QPixmap();
- _last = new QPoint();
+ _buffer = new TQPixmap();
+ _last = new TQPoint();
_currentcolor = black();
// don't blank the window before repainting
setBackgroundMode( NoBackground );
// create a pop-up menu
- _popupmenu = new QPopupMenu();
+ _popupmenu = new TQPopupMenu();
_popupmenu.insertItem( "&Clear", this, SLOT( "slotClearArea()" ) );
}
/**
* This slot sets the curren color for the scribble area. It will be
- * connected with the colorChanged( QColor ) signal from the
+ * connected with the colorChanged( TQColor ) signal from the
* ScribbleWindow.
*/
- public void setColor( QColor new_color )
+ public void setColor( TQColor new_color )
{
_currentcolor = new_color;
}
@@ -70,13 +70,13 @@ public class ScribbleWindow extends QWidget {
/**
- * This method does the actual loading. It relies on QPixmap (and the
+ * This method does the actual loading. It relies on TQPixmap (and the
* underlying I/O machinery) to determine the filetype.
*/
public void slotLoad( String filename )
{
if ( !_buffer.load( filename ) )
- QMessageBox.warning( null, "Load error", "Could not load file" );
+ TQMessageBox.warning( null, "Load error", "Could not load file" );
repaint(); // refresh the window
}
@@ -89,7 +89,7 @@ public class ScribbleWindow extends QWidget {
public void slotSave( String filename )
{
if( !_buffer.save( filename, "BMP" ) )
- QMessageBox.warning( null, "Save error", "Could not save file" );
+ TQMessageBox.warning( null, "Save error", "Could not save file" );
}
@@ -98,10 +98,10 @@ public class ScribbleWindow extends QWidget {
* mouse over the window. It just records the position of the mouse
* at the time of the click.
*/
- protected void mousePressEvent(QMouseEvent event)
+ protected void mousePressEvent(TQMouseEvent event)
{
if ( event.button() == RightButton )
- _popupmenu.exec( QCursor.pos() );
+ _popupmenu.exec( TQCursor.pos() );
else
{
_last = event.pos(); // retrieve the coordinates from the event
@@ -117,11 +117,11 @@ public class ScribbleWindow extends QWidget {
* we haven't, and thus don't have to check whether any buttons are
* pressed.
*/
- protected void mouseMoveEvent(QMouseEvent event) {
- // create a QPainter object for drawing onto the window
- QPainter windowpainter = new QPainter();
- // and another QPainter object for drawing int an off-screen pixmap
- QPainter bufferpainter = new QPainter();
+ protected void mouseMoveEvent(TQMouseEvent event) {
+ // create a TQPainter object for drawing onto the window
+ TQPainter windowpainter = new TQPainter();
+ // and another TQPainter object for drawing int an off-screen pixmap
+ TQPainter bufferpainter = new TQPainter();
// start painting
windowpainter.begin( this ); // this painter paints onto the window
@@ -146,7 +146,7 @@ public class ScribbleWindow extends QWidget {
* This method is called whenever the widget needs
* painting, for example when it has been obscured and then revealed again.
*/
- protected void paintEvent(QPaintEvent event) {
+ protected void paintEvent(TQPaintEvent event) {
bitBlt(this, 0, 0, _buffer);
}
@@ -154,8 +154,8 @@ public class ScribbleWindow extends QWidget {
* This method get called whenever the widget needs
* painting, for example, when it has been obscured and then revealed again.
*/
- protected void resizeEvent(QResizeEvent event) {
- QPixmap save = new QPixmap( _buffer );
+ protected void resizeEvent(TQResizeEvent event) {
+ TQPixmap save = new TQPixmap( _buffer );
_buffer.resize( event.size() );
_buffer.fill( white() );
bitBlt( _buffer, 0, 0, save );
@@ -166,47 +166,47 @@ public class ScribbleWindow extends QWidget {
{
/* The next lines build the menu bar. We first create the menus
* one by one, then add them to the menu bar. */
- _filemenu = new QPopupMenu(); // create a file menu
+ _filemenu = new TQPopupMenu(); // create a file menu
_filemenu.insertItem( "&Load", this, SLOT( "slotLoad()" ) );
_filemenu.insertItem( "&Save", this, SLOT( "slotSave()" ) );
_filemenu.insertSeparator();
_filemenu.insertItem( "&Quit", qApp(), SLOT( "quit()" ) );
- _colormenu = new QPopupMenu(); // create a color menu
+ _colormenu = new TQPopupMenu(); // create a color menu
_colormenu.insertItem( "B&lack", COLOR_MENU_ID_BLACK);
_colormenu.insertItem( "&Red", COLOR_MENU_ID_RED);
_colormenu.insertItem( "&Blue", COLOR_MENU_ID_BLUE);
_colormenu.insertItem( "&Green", COLOR_MENU_ID_GREEN);
_colormenu.insertItem( "&Yellow", COLOR_MENU_ID_YELLOW);
- QObject.connect( _colormenu, SIGNAL( "activated( int )" ),
+ TQObject.connect( _colormenu, SIGNAL( "activated( int )" ),
this, SLOT( "slotColorMenu( int )" ) );
- _helpmenu = new QPopupMenu(); // create a help menu
+ _helpmenu = new TQPopupMenu(); // create a help menu
_helpmenu.insertItem( "&About QtScribble", this, SLOT( "slotAbout()" ) );
_helpmenu.insertItem( "&About Qt", this, SLOT( "slotAboutQt()" ) );
- _menubar = new QMenuBar( this, "" ); // create a menu bar
+ _menubar = new TQMenuBar( this, "" ); // create a menu bar
_menubar.insertItem( "&File", _filemenu );
_menubar.insertItem( "&Color", _colormenu );
_menubar.insertItem( "&Help", _helpmenu );
- /* We create a QScrollView and a ScribbleArea. The ScribbleArea will
+ /* We create a TQScrollView and a ScribbleArea. The ScribbleArea will
* be managed by the scroll view.*/
- _scrollview = new QScrollView( this );
+ _scrollview = new TQScrollView( this );
_scrollview.setGeometry( 0, _menubar.height(),
width(), height() - _menubar.height() );
_scribblearea = new ScribbleArea();
_scribblearea.setGeometry( 0, 0, 1000, 1000 );
_scrollview.addChild( _scribblearea );
- QObject.connect( this, SIGNAL( "colorChanged( QColor )" ),
- _scribblearea, SLOT( "setColor( QColor )" ) );
- QObject.connect( this, SIGNAL( "save( String )" ),
+ TQObject.connect( this, SIGNAL( "colorChanged( TQColor )" ),
+ _scribblearea, SLOT( "setColor( TQColor )" ) );
+ TQObject.connect( this, SIGNAL( "save( String )" ),
_scribblearea, SLOT( "slotSave( String )" ) );
- QObject.connect( this, SIGNAL( "load(String)" ),
+ TQObject.connect( this, SIGNAL( "load(String)" ),
_scribblearea, SLOT( "slotLoad( String )" ) );
}
- protected void resizeEvent( QResizeEvent event )
+ protected void resizeEvent( TQResizeEvent event )
{
/* When the whole window is resized, we have to rearrange the geometry
* in the ScribbleWindow as well. Note that the ScribbleArea does not need
@@ -219,7 +219,7 @@ public class ScribbleWindow extends QWidget {
private void slotAbout()
{
- QMessageBox.information( this, "About QtScribble 5",
+ TQMessageBox.information( this, "About QtScribble 5",
"This is the Scribble 5 application\n" +
"Copyright 1998 by Mathias Kalle Dalheimer\n"
);
@@ -227,7 +227,7 @@ public class ScribbleWindow extends QWidget {
private void slotAboutQt()
{
- QMessageBox.aboutQt( this, "About Qt" );
+ TQMessageBox.aboutQt( this, "About Qt" );
}
private void slotColorMenu( int item )
@@ -255,7 +255,7 @@ public class ScribbleWindow extends QWidget {
/**
* This is the slot for the menu item File/Load. It opens a
- * QFileDialog to ask the user for a filename, then emits a save()
+ * TQFileDialog to ask the user for a filename, then emits a save()
* signal with the filename as parameter.
*/
private void slotLoad()
@@ -263,14 +263,14 @@ public class ScribbleWindow extends QWidget {
/* Open a file dialog for loading. The default directory is the
* current directory, the filter *.bmp.
*/
- String filename = QFileDialog.getOpenFileName( ".", "*.bmp", this );
+ String filename = TQFileDialog.getOpenFileName( ".", "*.bmp", this );
if ( !filename.equals("") )
emit("load", filename);
}
/**
* This is the slot for the menu item File/Load. It opens a
- * QFileDialog to ask the user for a filename, then emits a save()
+ * TQFileDialog to ask the user for a filename, then emits a save()
* signal with the filename as parameter.
*/
private void slotSave()
@@ -278,7 +278,7 @@ public class ScribbleWindow extends QWidget {
/* Open a file dialog for saving. The default directory is the
* current directory, the filter *.bmp.
*/
- String filename = QFileDialog.getSaveFileName( ".", "*.bmp", this );
+ String filename = TQFileDialog.getSaveFileName( ".", "*.bmp", this );
if ( !filename.equals("") )
emit("save", filename);
}
@@ -286,7 +286,7 @@ public class ScribbleWindow extends QWidget {
public static void main(String[] args)
{
- QApplication myapp = new QApplication(args);
+ TQApplication myapp = new TQApplication(args);
ScribbleWindow mywidget = new ScribbleWindow();
mywidget.setGeometry(50, 500, 400, 400);
diff --git a/qtjava/javalib/test/SignalForwarder.java b/qtjava/javalib/test/SignalForwarder.java
index 332ba5e6..8d62aae5 100644
--- a/qtjava/javalib/test/SignalForwarder.java
+++ b/qtjava/javalib/test/SignalForwarder.java
@@ -1,9 +1,9 @@
import org.kde.qt.*;
-public class SignalForwarder extends QDialog {
+public class SignalForwarder extends TQDialog {
SignalForwarder() {
- QPushButton searchButton = new QPushButton("Search", this);
+ TQPushButton searchButton = new TQPushButton("Search", this);
connect( searchButton, SIGNAL("clicked()"), this, SIGNAL("continueSearch()"));
connect( this, SIGNAL("continueSearch()"), this, SLOT("slotContinueSearch()"));
}
@@ -15,7 +15,7 @@ public class SignalForwarder extends QDialog {
public static void main(String[] args)
{
- QApplication myapp = new QApplication(args);
+ TQApplication myapp = new TQApplication(args);
SignalForwarder signalForwarder = new SignalForwarder();
myapp.setMainWidget(signalForwarder);