From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/dclock-example.html | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'doc/html/dclock-example.html') diff --git a/doc/html/dclock-example.html b/doc/html/dclock-example.html index 332a7e767..48bdaeb4e 100644 --- a/doc/html/dclock-example.html +++ b/doc/html/dclock-example.html @@ -50,14 +50,14 @@ and date. #ifndef DCLOCK_H #define DCLOCK_H -#include <qlcdnumber.h> +#include <ntqlcdnumber.h> -class DigitalClock : public TQLCDNumber // digital clock widget +class DigitalClock : public TQLCDNumber // digital clock widget { Q_OBJECT public: - DigitalClock( TQWidget *parent=0, const char *name=0 ); + DigitalClock( TQWidget *parent=0, const char *name=0 ); protected: // event handlers void timerEvent( TQTimerEvent * ); @@ -92,21 +92,21 @@ private: // internal data *****************************************************************************/ #include "dclock.h" -#include <qdatetime.h> +#include <ntqdatetime.h> // // Constructs a DigitalClock widget with a parent and a name. // -DigitalClock::DigitalClock( TQWidget *parent, const char *name ) - : TQLCDNumber( parent, name ) +DigitalClock::DigitalClock( TQWidget *parent, const char *name ) + : TQLCDNumber( parent, name ) { showingColon = FALSE; - setFrameStyle( TQFrame::Panel | TQFrame::Raised ); - setLineWidth( 2 ); // set frame line width + setFrameStyle( TQFrame::Panel | TQFrame::Raised ); + setLineWidth( 2 ); // set frame line width showTime(); // display the current time - normalTimer = startTimer( 500 ); // 1/2 second timer events + normalTimer = startTimer( 500 ); // 1/2 second timer events showDateTimer = -1; // not showing date } @@ -117,7 +117,7 @@ private: // internal data // and another one for switching back from date mode to time mode. // -void DigitalClock::timerEvent( TQTimerEvent *e ) +void DigitalClock::timerEvent( TQTimerEvent *e ) { if ( e->timerId() == showDateTimer ) // stop showing date stopDate(); @@ -131,7 +131,7 @@ private: // internal data // Enters date mode when the left mouse button is pressed. // -void DigitalClock::mousePressEvent( TQMouseEvent *e ) +void DigitalClock::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == TQMouseEvent::LeftButton ) // left button pressed showDate(); @@ -148,10 +148,10 @@ void DigitalClock::showDate() if ( showDateTimer != -1 ) // already showing date return; TQDate date = TQDate::currentDate(); - TQString s; - s.sprintf( "%2d %2d", date.month(), date.day() ); - display( s ); // sets the LCD number/text - showDateTimer = startTimer( 2000 ); // keep this state for 2 secs + TQString s; + s.sprintf( "%2d %2d", date.month(), date.day() ); + display( s ); // sets the LCD number/text + showDateTimer = startTimer( 2000 ); // keep this state for 2 secs } // @@ -160,7 +160,7 @@ void DigitalClock::showDate() void DigitalClock::stopDate() { - killTimer( showDateTimer ); + killTimer( showDateTimer ); showDateTimer = -1; showTime(); } @@ -172,12 +172,12 @@ void DigitalClock::stopDate() void DigitalClock::showTime() { showingColon = !showingColon; // toggle/blink colon - TQString s = TQTime::currentTime().toString().left(5); + TQString s = TQTime::currentTime().toString().left(5); if ( !showingColon ) s[2] = ' '; if ( s[0] == '0' ) s[0] = ' '; - display( s ); // set LCD number/text + display( s ); // set LCD number/text } @@ -194,18 +194,18 @@ void DigitalClock::showTime() *****************************************************************************/ #include "dclock.h" -#include <qapplication.h> +#include <ntqapplication.h> int main( int argc, char **argv ) { - TQApplication a( argc, argv ); + TQApplication a( argc, argv ); DigitalClock *clock = new DigitalClock; - clock->resize( 170, 80 ); - a.setMainWidget( clock ); - clock->setCaption("TQt Example - Digital Clock"); - clock->show(); - return a.exec(); + clock->resize( 170, 80 ); + a.setMainWidget( clock ); + clock->setCaption("TQt Example - Digital Clock"); + clock->show(); + return a.exec(); } -- cgit v1.2.3