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