summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/hello/Hello.java
diff options
context:
space:
mode:
Diffstat (limited to 'qtjava/javalib/examples/hello/Hello.java')
-rw-r--r--qtjava/javalib/examples/hello/Hello.java18
1 files changed, 9 insertions, 9 deletions
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++;