From 9ba04742771370f59740e32e11c5f3a1e6a1b70a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 15:55:57 -0600 Subject: Initial TQt conversion --- qtjava/javalib/examples/dclock/DigitalClock.java | 14 +++++++------- qtjava/javalib/examples/dclock/Main.java | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'qtjava/javalib/examples/dclock') 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 ); -- cgit v1.2.1