From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkscreensaver/kscreensaver.cpp | 36 ++++++++++++++++++------------------ libkscreensaver/kscreensaver.h | 16 ++++++++-------- libkscreensaver/kscreensaver_vroot.h | 2 +- libkscreensaver/main.cpp | 14 +++++++------- 4 files changed, 34 insertions(+), 34 deletions(-) (limited to 'libkscreensaver') diff --git a/libkscreensaver/kscreensaver.cpp b/libkscreensaver/kscreensaver.cpp index f56b31dc9..a35b2545d 100644 --- a/libkscreensaver/kscreensaver.cpp +++ b/libkscreensaver/kscreensaver.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include "kscreensaver.h" #ifdef Q_WS_X11 @@ -36,10 +36,10 @@ typedef WId Window; class KScreenSaverPrivate { public: - QWidget *owner; + TQWidget *owner; }; -KScreenSaver::KScreenSaver( WId id ) : QWidget() +KScreenSaver::KScreenSaver( WId id ) : TQWidget() { Window root; int ai; @@ -75,7 +75,7 @@ KScreenSaver::~KScreenSaver() delete d; } -void KScreenSaver::embed( QWidget *w ) +void KScreenSaver::embed( TQWidget *w ) { KApplication::sendPostedEvents(); #ifdef Q_WS_X11 //FIXME @@ -85,15 +85,15 @@ void KScreenSaver::embed( QWidget *w ) KApplication::sendPostedEvents(); } -bool KScreenSaver::eventFilter( QObject *o, QEvent *e ) +bool KScreenSaver::eventFilter( TQObject *o, TQEvent *e ) { // make sure events get to the original window owner if ( d->owner && o == this ) { - QApplication::sendEvent( d->owner, e ); + TQApplication::sendEvent( d->owner, e ); return false; } - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } //============================================================================ @@ -103,8 +103,8 @@ class KBlankEffectPrivate public: KBlankEffect::BlankEffect currentEffect; int effectProgress; - QTimer *timer; - QWidget *widget; + TQTimer *timer; + TQWidget *widget; }; KBlankEffect::BlankEffect KBlankEffect::effects[] = { @@ -114,13 +114,13 @@ KBlankEffect::BlankEffect KBlankEffect::effects[] = { &KBlankEffect::blankBlocks }; -KBlankEffect::KBlankEffect( QObject *parent ) : QObject( parent ) +KBlankEffect::KBlankEffect( TQObject *parent ) : TQObject( parent ) { d = new KBlankEffectPrivate; d->currentEffect = &KBlankEffect::blankNormal; d->effectProgress = 0; - d->timer = new QTimer( this ); - connect( d->timer, SIGNAL(timeout()), this, SLOT(timeout()) ); + d->timer = new TQTimer( this ); + connect( d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()) ); } @@ -137,7 +137,7 @@ void KBlankEffect::finished() } -void KBlankEffect::blank( QWidget *w, Effect effect ) +void KBlankEffect::blank( TQWidget *w, Effect effect ) { if ( !w ) { emit doneBlank(); @@ -160,7 +160,7 @@ void KBlankEffect::timeout() void KBlankEffect::blankNormal() { - QPainter p( d->widget ); + TQPainter p( d->widget ); p.fillRect( 0, 0, d->widget->width(), d->widget->height(), black ); finished(); } @@ -168,7 +168,7 @@ void KBlankEffect::blankNormal() void KBlankEffect::blankSweepRight() { - QPainter p( d->widget ); + TQPainter p( d->widget ); p.fillRect( d->effectProgress, 0, 50, d->widget->height(), black ); kapp->flushX(); d->effectProgress += 50; @@ -179,7 +179,7 @@ void KBlankEffect::blankSweepRight() void KBlankEffect::blankSweepDown() { - QPainter p( d->widget ); + TQPainter p( d->widget ); p.fillRect( 0, d->effectProgress, d->widget->width(), 50, black ); kapp->flushX(); d->effectProgress += 50; @@ -208,7 +208,7 @@ void KBlankEffect::blankBlocks() } } - QPainter p( d->widget ); + TQPainter p( d->widget ); // erase a couple of blocks at a time, otherwise it looks too slow for ( int i = 0; i < 2 && d->effectProgress < bx*by; i++ ) { diff --git a/libkscreensaver/kscreensaver.h b/libkscreensaver/kscreensaver.h index 3150300f4..d692b2334 100644 --- a/libkscreensaver/kscreensaver.h +++ b/libkscreensaver/kscreensaver.h @@ -21,7 +21,7 @@ #ifndef KSCREENSAVER_H #define KSCREENSAVER_H -#include +#include #include @@ -30,7 +30,7 @@ class KScreenSaverPrivate; class KBlankEffectPrivate; /** -* Provides a QWidget for a screensaver to draw into. +* Provides a TQWidget for a screensaver to draw into. * * You should derive from this widget and implement your screensaver's * functionality. To use libkss, provide the following constants and @@ -47,13 +47,13 @@ class KBlankEffectPrivate; * // return your KScreenSaver derived screensaver * } * -* QDialog *kss_setup() +* TQDialog *kss_setup() * { * // return your modal setup dialog * } * } * -* @short Provides a QWidget for a screensaver to draw into. +* @short Provides a TQWidget for a screensaver to draw into. * @author Martin R. Jones */ class KDE_EXPORT KScreenSaver : public QWidget @@ -75,9 +75,9 @@ protected: * * @param widget The widget to embed in the screensaver widget. */ - void embed( QWidget *widget ); + void embed( TQWidget *widget ); - bool eventFilter( QObject *o, QEvent * ); + bool eventFilter( TQObject *o, TQEvent * ); private: KScreenSaverPrivate *d; @@ -95,7 +95,7 @@ class KBlankEffect : public QObject { Q_OBJECT public: - KBlankEffect( QObject *parent=0 ); + KBlankEffect( TQObject *parent=0 ); ~KBlankEffect(); enum Effect { Random=-1, Blank=0, SweepRight, SweepDown, Blocks, @@ -109,7 +109,7 @@ public: * @param w The widget to blank. * @param effect The type of effect to use. */ - void blank( QWidget *w, Effect effect=Random ); + void blank( TQWidget *w, Effect effect=Random ); typedef void (KBlankEffect::*BlankEffect)(); diff --git a/libkscreensaver/kscreensaver_vroot.h b/libkscreensaver/kscreensaver_vroot.h index 62ac73889..aae76f9d9 100644 --- a/libkscreensaver/kscreensaver_vroot.h +++ b/libkscreensaver/kscreensaver_vroot.h @@ -61,7 +61,7 @@ static const char vroot_rcsid[] = "#Id: vroot.h,v 1.4 1991/09/30 19:23:16 stolcke Exp stolcke #"; #endif -#include +#include #ifdef Q_WS_X11 #include #include diff --git a/libkscreensaver/main.cpp b/libkscreensaver/main.cpp index caa9278ff..50e2fb8d7 100644 --- a/libkscreensaver/main.cpp +++ b/libkscreensaver/main.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -40,7 +40,7 @@ extern "C" extern const char *kss_description; extern const char *kss_version; KScreenSaver *kss_create( WId d ); - QDialog *kss_setup(); + TQDialog *kss_setup(); } static const KCmdLineOptions options[] = @@ -65,13 +65,13 @@ static void crashHandler( int ) class DemoWindow : public QWidget { public: - DemoWindow() : QWidget() + DemoWindow() : TQWidget() { setFixedSize(600, 420); } protected: - virtual void keyPressEvent(QKeyEvent *e) + virtual void keyPressEvent(TQKeyEvent *e) { if (e->ascii() == 'q') { @@ -79,7 +79,7 @@ protected: } } - virtual void closeEvent( QCloseEvent * ) + virtual void closeEvent( TQCloseEvent * ) { kapp->quit(); } @@ -112,7 +112,7 @@ KDE_EXPORT int main(int argc, char *argv[]) if (args->isSet("setup")) { - QDialog *dlg = kss_setup(); + TQDialog *dlg = kss_setup(); args->clear(); dlg->exec(); delete dlg; @@ -139,7 +139,7 @@ KDE_EXPORT int main(int argc, char *argv[]) if (saveWin == 0) { demoWidget = new DemoWindow(); - demoWidget->setBackgroundMode(QWidget::NoBackground); + demoWidget->setBackgroundMode(TQWidget::NoBackground); saveWin = demoWidget->winId(); app.setMainWidget(demoWidget); app.processEvents(); -- cgit v1.2.1