From b5d38fd2e94066885d4620b0c35c48a2faa5aa44 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:27:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kscreensaver/kdesavers/gravity.cpp | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'kscreensaver/kdesavers/gravity.cpp') diff --git a/kscreensaver/kdesavers/gravity.cpp b/kscreensaver/kdesavers/gravity.cpp index d9f9bbd1..c8415e49 100644 --- a/kscreensaver/kdesavers/gravity.cpp +++ b/kscreensaver/kdesavers/gravity.cpp @@ -8,8 +8,8 @@ // Nick Betcher 2001 // #include -#include -#include +#include +#include #include #include #include @@ -25,11 +25,11 @@ #include #include #endif -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -45,7 +45,7 @@ extern "C" return new KGravitySaver( id ); } - KDE_EXPORT QDialog *kss_setup() + KDE_EXPORT TQDialog *kss_setup() { return new KGravitySetup(); } @@ -54,7 +54,7 @@ extern "C" //----------------------------------------------------------------------------- // dialog to setup screen saver parameters // -KGravitySetup::KGravitySetup( QWidget *parent, const char *name ) +KGravitySetup::KGravitySetup( TQWidget *parent, const char *name ) : SetupUi( parent, name, TRUE ) { readSettings(); @@ -66,11 +66,11 @@ KGravitySetup::KGravitySetup( QWidget *parent, const char *name ) #endif saver = new KGravitySaver( preview->winId() ); ; - connect( PushButton1, SIGNAL( clicked() ), SLOT( slotOkPressed() ) ); - connect( PushButton2, SIGNAL( clicked() ), SLOT( reject() ) ); - connect( PushButton3, SIGNAL( clicked() ), SLOT( aboutPressed() ) ); - connect( SpinBox1, SIGNAL( valueChanged(int)), saver, SLOT( updateSize(int))); - connect( RadioButton1, SIGNAL( toggled(bool)), saver, SLOT( doStars(bool))); + connect( PushButton1, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOkPressed() ) ); + connect( PushButton2, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) ); + connect( PushButton3, TQT_SIGNAL( clicked() ), TQT_SLOT( aboutPressed() ) ); + connect( SpinBox1, TQT_SIGNAL( valueChanged(int)), saver, TQT_SLOT( updateSize(int))); + connect( RadioButton1, TQT_SIGNAL( toggled(bool)), saver, TQT_SLOT( doStars(bool))); } @@ -85,7 +85,7 @@ void KGravitySetup::readSettings() KConfig config("kssgravityrc", false, false); config.setGroup( "Settings" ); - QString boolval = config.readEntry( "Stars", "false" ); + TQString boolval = config.readEntry( "Stars", "false" ); if (boolval == "true") { RadioButton1->setDown(true); RadioButton1_2->setDown(false); @@ -97,7 +97,7 @@ void KGravitySetup::readSettings() } } - QString starammount = config.readEntry("StarSize", "75"); + TQString starammount = config.readEntry("StarSize", "75"); SpinBox1->setValue(starammount.toInt()); } @@ -117,7 +117,7 @@ void KGravitySetup::slotOkPressed() config.writeEntry( "Stars", "false" ); } } - config.writeEntry( "StarSize", QString::number(SpinBox1->value()) ); + config.writeEntry( "StarSize", TQString::number(SpinBox1->value()) ); config.sync(); @@ -137,7 +137,7 @@ KGravitySaver::KGravitySaver( WId id ) : KScreenSaver( id ) kdDebug() << "Blank" << endl; - timer = new QTimer( this ); + timer = new TQTimer( this ); timer->start( 25, TRUE ); setBackgroundColor( black ); erase(); @@ -146,7 +146,7 @@ KGravitySaver::KGravitySaver( WId id ) : KScreenSaver( id ) #ifdef Q_WS_X11 gravity->show(); #endif - connect( timer, SIGNAL(timeout()), this, SLOT(blank()) ); + connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(blank()) ); } KGravitySaver::~KGravitySaver() @@ -169,7 +169,7 @@ void KGravitySaver::blank() timer->start( 25, TRUE ); } -Gravity::Gravity( QWidget * parent, const char * name) : QGLWidget (parent,name) +Gravity::Gravity( TQWidget * parent, const char * name) : TQGLWidget (parent,name) { rainbow=true; slowdown=2.0f; @@ -181,7 +181,7 @@ Gravity::Gravity( QWidget * parent, const char * name) : QGLWidget (parent,name) // This has to be here because you can't update the gravity until 'gravity' is created! KConfig config("kssgravityrc", false, false); config.setGroup( "Settings" ); - QString boolval = config.readEntry( "Stars", "false" ); + TQString boolval = config.readEntry( "Stars", "false" ); if (boolval == "true") { setStars(true); } else { @@ -191,7 +191,7 @@ Gravity::Gravity( QWidget * parent, const char * name) : QGLWidget (parent,name) } } - QString starammount = config.readEntry("StarSize", "75"); + TQString starammount = config.readEntry("StarSize", "75"); float passvalue = (starammount.toInt() / 100.0); setSize(passvalue); @@ -208,7 +208,7 @@ bool Gravity::loadParticle() { /* Status indicator */ bool Status = TRUE; - QImage buf; + TQImage buf; kdDebug() << "Loading: " << locate("data", "kscreensaver/particle.png") << endl; if (buf.load( locate("data", "kscreensaver/particle.png") ) ) @@ -219,7 +219,7 @@ bool Gravity::loadParticle() } else { - QImage dummy( 32, 32, 32 ); + TQImage dummy( 32, 32, 32 ); dummy.fill( Qt::white.rgb() ); buf = dummy; tex = convertToGLFormat( buf ); -- cgit v1.2.1