summaryrefslogtreecommitdiffstats
path: root/qtjava/javalib/examples/tux/MoveMe.java
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtjava/javalib/examples/tux/MoveMe.java
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
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);