summaryrefslogtreecommitdiffstats
path: root/kscreensaver/xsavers
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
commitb5d38fd2e94066885d4620b0c35c48a2faa5aa44 (patch)
tree7e7e611e0e3ef23dc2efd327a7455bcf4d7c9b7f /kscreensaver/xsavers
parent019ebb9a949a97c898e5d563f0699a3ff49e6588 (diff)
downloadtdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.tar.gz
tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/xsavers')
-rw-r--r--kscreensaver/xsavers/demowin.h4
-rw-r--r--kscreensaver/xsavers/helpers.cpp14
-rw-r--r--kscreensaver/xsavers/helpers.h14
-rw-r--r--kscreensaver/xsavers/main.cpp6
-rw-r--r--kscreensaver/xsavers/saver.cpp2
-rw-r--r--kscreensaver/xsavers/saver.h2
-rw-r--r--kscreensaver/xsavers/space.cpp56
-rw-r--r--kscreensaver/xsavers/space.h12
-rw-r--r--kscreensaver/xsavers/swarm.cpp52
-rw-r--r--kscreensaver/xsavers/swarm.h8
-rw-r--r--kscreensaver/xsavers/xlock.cpp4
-rw-r--r--kscreensaver/xsavers/xlock.h2
12 files changed, 88 insertions, 88 deletions
diff --git a/kscreensaver/xsavers/demowin.h b/kscreensaver/xsavers/demowin.h
index 327b61dc..d31fc353 100644
--- a/kscreensaver/xsavers/demowin.h
+++ b/kscreensaver/xsavers/demowin.h
@@ -25,13 +25,13 @@ class DemoWindow : public QWidget
{
Q_OBJECT
public:
- DemoWindow() : QWidget()
+ DemoWindow() : TQWidget()
{
setFixedSize(600, 420);
}
protected:
- virtual void keyPressEvent(QKeyEvent *e)
+ virtual void keyPressEvent(TQKeyEvent *e)
{
if (e->ascii() == 'q')
{
diff --git a/kscreensaver/xsavers/helpers.cpp b/kscreensaver/xsavers/helpers.cpp
index 1ba67925..ef700545 100644
--- a/kscreensaver/xsavers/helpers.cpp
+++ b/kscreensaver/xsavers/helpers.cpp
@@ -2,33 +2,33 @@
#include <kapplication.h>
-void min_width(QWidget *w) {
+void min_width(TQWidget *w) {
w->setMinimumWidth(w->sizeHint().width());
}
-void fixed_width(QWidget *w) {
+void fixed_width(TQWidget *w) {
w->setFixedWidth(w->sizeHint().width());
}
-void min_height(QWidget *w) {
+void min_height(TQWidget *w) {
w->setMinimumHeight(w->sizeHint().height());
}
-void fixed_height(QWidget *w) {
+void fixed_height(TQWidget *w) {
w->setFixedHeight(w->sizeHint().height());
}
-void min_size(QWidget *w) {
+void min_size(TQWidget *w) {
w->setMinimumSize(w->sizeHint());
}
-void fixed_size(QWidget *w) {
+void fixed_size(TQWidget *w) {
w->setFixedSize(w->sizeHint());
}
KConfig *klock_config()
{
- QString name( kapp->argv()[0] );
+ TQString name( kapp->argv()[0] );
int slash = name.findRev( '/' );
if ( slash )
name = name.mid( slash+1 );
diff --git a/kscreensaver/xsavers/helpers.h b/kscreensaver/xsavers/helpers.h
index 948c86ef..c0f8fb59 100644
--- a/kscreensaver/xsavers/helpers.h
+++ b/kscreensaver/xsavers/helpers.h
@@ -1,15 +1,15 @@
#ifndef __HELPERS__H__
#define __HELPERS__H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kconfig.h>
-void min_width(QWidget *);
-void fixed_width(QWidget *);
-void min_height(QWidget *);
-void fixed_height(QWidget *);
-void min_size(QWidget *);
-void fixed_size(QWidget *);
+void min_width(TQWidget *);
+void fixed_width(TQWidget *);
+void min_height(TQWidget *);
+void fixed_height(TQWidget *);
+void min_size(TQWidget *);
+void fixed_size(TQWidget *);
/*
* Use this to get a KConfig object that uses a reasonable config filename.
diff --git a/kscreensaver/xsavers/main.cpp b/kscreensaver/xsavers/main.cpp
index b264b8f5..78e5351d 100644
--- a/kscreensaver/xsavers/main.cpp
+++ b/kscreensaver/xsavers/main.cpp
@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <signal.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <klocale.h>
#include <kconfig.h>
@@ -75,7 +75,7 @@ int main(int argc, char *argv[])
if (args->isSet("root"))
{
- saveWin = QApplication::desktop()->handle();
+ saveWin = TQApplication::desktop()->handle();
}
if (args->isSet("demo"))
@@ -86,7 +86,7 @@ int main(int argc, char *argv[])
if (saveWin == 0)
{
demoWidget = new DemoWindow();
- demoWidget->setBackgroundMode(QWidget::NoBackground);
+ demoWidget->setBackgroundMode(TQWidget::NoBackground);
// demoWidget->setBackgroundColor(Qt::black);
demoWidget->show();
saveWin = demoWidget->winId();
diff --git a/kscreensaver/xsavers/saver.cpp b/kscreensaver/xsavers/saver.cpp
index b905d619..9af37da0 100644
--- a/kscreensaver/xsavers/saver.cpp
+++ b/kscreensaver/xsavers/saver.cpp
@@ -9,7 +9,7 @@
#include "saver.moc"
//-----------------------------------------------------------------------------
-kScreenSaver::kScreenSaver(Drawable drawable) : QObject()
+kScreenSaver::kScreenSaver(Drawable drawable) : TQObject()
{
Window root;
int ai;
diff --git a/kscreensaver/xsavers/saver.h b/kscreensaver/xsavers/saver.h
index 4f4727d0..318728fc 100644
--- a/kscreensaver/xsavers/saver.h
+++ b/kscreensaver/xsavers/saver.h
@@ -2,7 +2,7 @@
#ifndef __SAVER_H__
#define __SAVER_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <X11/Xlib.h>
extern void startScreenSaver( Drawable d );
diff --git a/kscreensaver/xsavers/space.cpp b/kscreensaver/xsavers/space.cpp
index f3650558..77070ad2 100644
--- a/kscreensaver/xsavers/space.cpp
+++ b/kscreensaver/xsavers/space.cpp
@@ -49,8 +49,8 @@
#define LONG64
//#define QT_CLEAN_NAMESPACE
-#include <qslider.h>
-#include <qlayout.h>
+#include <tqslider.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <kconfig.h>
#include <krandomsequence.h>
@@ -462,10 +462,10 @@ initSpace(Window window)
#define WARPFACTOR 100
//-----------------------------------------------------------------------------
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qcolor.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqcolor.h>
#include <kmessagebox.h>
@@ -504,21 +504,21 @@ kSpaceSaver::kSpaceSaver( Drawable drawable ) : kScreenSaver( drawable )
readSettings();
counter = (int)warpinterval *WARPFACTOR;
- colorContext = QColor::enterAllocContext();
+ colorContext = TQColor::enterAllocContext();
initXLock( mGc );
initSpace( mDrawable );
timer.start( speed );
- connect( &timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
+ connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
}
kSpaceSaver::~kSpaceSaver()
{
timer.stop();
release_Space();
- QColor::leaveAllocContext();
- QColor::destroyAllocContext( colorContext );
+ TQColor::leaveAllocContext();
+ TQColor::destroyAllocContext( colorContext );
delete rnd; rnd = 0;
}
@@ -543,7 +543,7 @@ void kSpaceSaver::readSettings()
KConfig *config = klock_config();
config->setGroup( "Settings" );
- QString str;
+ TQString str;
str = config->readEntry( "Speed" );
if ( !str.isNull() )
@@ -575,44 +575,44 @@ void kSpaceSaver::slotTimeout()
//-----------------------------------------------------------------------------
-kSpaceSetup::kSpaceSetup( QWidget *parent, const char *name )
+kSpaceSetup::kSpaceSetup( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n("Setup Space Screen Saver"),
Ok|Cancel|Help, Ok, true )
{
setButtonText( Help, i18n( "A&bout" ) );
readSettings();
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QHBoxLayout *hb = new QHBoxLayout( page, 0, spacingHint() );
- QVBoxLayout *vb = new QVBoxLayout( hb, spacingHint() );
+ TQHBoxLayout *hb = new TQHBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( hb, spacingHint() );
- QLabel *label;
- QSlider *slider;
+ TQLabel *label;
+ TQSlider *slider;
- label = new QLabel( i18n("Speed:"), page );
+ label = new TQLabel( i18n("Speed:"), page );
vb->addWidget( label );
- slider = new QSlider(MINSPEED, MAXSPEED, 10, speed, QSlider::Horizontal,
+ slider = new TQSlider(MINSPEED, MAXSPEED, 10, speed, TQSlider::Horizontal,
page );
vb->addWidget( slider );
- slider->setTickmarks(QSlider::Below);
+ slider->setTickmarks(TQSlider::Below);
slider->setTickInterval(10);
- connect( slider, SIGNAL( valueChanged( int ) ), SLOT( slotSpeed( int ) ) );
+ connect( slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotSpeed( int ) ) );
- label = new QLabel( i18n("Warp interval:"), page );
+ label = new TQLabel( i18n("Warp interval:"), page );
vb->addWidget( label );
- slider = new QSlider(MINWARP, MAXWARP, 3, warpinterval, Horizontal, page );
+ slider = new TQSlider(MINWARP, MAXWARP, 3, warpinterval, Horizontal, page );
vb->addWidget( slider );
- slider->setTickmarks(QSlider::Below);
+ slider->setTickmarks(TQSlider::Below);
slider->setTickInterval(3);
- connect( slider, SIGNAL( valueChanged( int ) ), SLOT( slotWarp( int ) ) );
+ connect( slider, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotWarp( int ) ) );
vb->addStrut( 150 );
vb->addStretch();
- preview = new QWidget( page );
+ preview = new TQWidget( page );
hb->addWidget( preview );
preview->setFixedSize( 220, 170 );
preview->setBackgroundColor( black );
@@ -657,11 +657,11 @@ void kSpaceSetup::slotOk()
KConfig *config = klock_config();
config->setGroup( "Settings" );
- QString sspeed;
+ TQString sspeed;
sspeed.setNum( speed );
config->writeEntry( "Speed", sspeed );
- QString interval;
+ TQString interval;
interval.setNum( (int)warpinterval );
config->writeEntry( "WarpInterval", interval );
diff --git a/kscreensaver/xsavers/space.h b/kscreensaver/xsavers/space.h
index 6bf82c87..f20db852 100644
--- a/kscreensaver/xsavers/space.h
+++ b/kscreensaver/xsavers/space.h
@@ -2,10 +2,10 @@
#ifndef __SPACE_H__
#define __SPACE_H__
-#include <qtimer.h>
-#include <qptrlist.h>
+#include <tqtimer.h>
+#include <tqptrlist.h>
#include <kdialogbase.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "saver.h"
class kSpaceSaver : public kScreenSaver
@@ -26,7 +26,7 @@ protected slots:
void slotTimeout();
protected:
- QTimer timer;
+ TQTimer timer;
int colorContext;
int counter;
@@ -39,7 +39,7 @@ class kSpaceSetup : public KDialogBase
{
Q_OBJECT
public:
- kSpaceSetup( QWidget *parent = NULL, const char *name = NULL );
+ kSpaceSetup( TQWidget *parent = NULL, const char *name = NULL );
protected:
void readSettings();
@@ -51,7 +51,7 @@ private slots:
void slotHelp();
private:
- QWidget *preview;
+ TQWidget *preview;
kSpaceSaver *saver;
int speed;
diff --git a/kscreensaver/xsavers/swarm.cpp b/kscreensaver/xsavers/swarm.cpp
index 0afae901..efc04c28 100644
--- a/kscreensaver/xsavers/swarm.cpp
+++ b/kscreensaver/xsavers/swarm.cpp
@@ -21,7 +21,7 @@
#define MINBATCH 0
#define DEFBATCH 20
-#include <qslider.h>
+#include <tqslider.h>
#include <kglobal.h>
#include <kconfig.h>
#include <krandomsequence.h>
@@ -217,10 +217,10 @@ drawswarm(Window win, KRandomSequence &rnd)
//-----------------------------------------------------------------------------
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qcolor.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -264,7 +264,7 @@ kSwarmSaver::kSwarmSaver( Drawable drawable ) : kScreenSaver( drawable )
XSetWindowBackground(qt_xdisplay(), mDrawable,
BlackPixel(qt_xdisplay(), qt_xscreen()));
- colorContext = QColor::enterAllocContext();
+ colorContext = TQColor::enterAllocContext();
batchcount = maxLevels;
@@ -272,14 +272,14 @@ kSwarmSaver::kSwarmSaver( Drawable drawable ) : kScreenSaver( drawable )
initswarm( mDrawable, rnd );
timer.start( speed );
- connect( &timer, SIGNAL( timeout() ), SLOT( slotTimeout() ) );
+ connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotTimeout() ) );
}
kSwarmSaver::~kSwarmSaver()
{
timer.stop();
- QColor::leaveAllocContext();
- QColor::destroyAllocContext( colorContext );
+ TQColor::leaveAllocContext();
+ TQColor::destroyAllocContext( colorContext );
}
void kSwarmSaver::setSpeed( int spd )
@@ -313,45 +313,45 @@ void kSwarmSaver::slotTimeout()
//-----------------------------------------------------------------------------
-kSwarmSetup::kSwarmSetup( QWidget *parent, const char *name )
+kSwarmSetup::kSwarmSetup( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Setup Swarm Screen Saver" ),
Ok|Cancel|Help, Ok, true )
{
readSettings();
setButtonText( Help, i18n( "A&bout" ) );
- QWidget *main = makeMainWidget();
+ TQWidget *main = makeMainWidget();
- QHBoxLayout *top = new QHBoxLayout( main, 0, spacingHint() );
- QVBoxLayout *left = new QVBoxLayout(top, spacingHint());
+ TQHBoxLayout *top = new TQHBoxLayout( main, 0, spacingHint() );
+ TQVBoxLayout *left = new TQVBoxLayout(top, spacingHint());
- QLabel *label = new QLabel( i18n("Speed:"), main );
+ TQLabel *label = new TQLabel( i18n("Speed:"), main );
min_size(label);
left->addWidget(label);
- QSlider *slider = new QSlider(MINSPEED, MAXSPEED, 10, speed,
+ TQSlider *slider = new TQSlider(MINSPEED, MAXSPEED, 10, speed,
Horizontal, main );
slider->setMinimumSize( 120, 20 );
- slider->setTickmarks(QSlider::Below);
+ slider->setTickmarks(TQSlider::Below);
slider->setTickInterval(10);
- connect( slider, SIGNAL( valueChanged( int ) ),
- SLOT( slotSpeed( int ) ) );
+ connect( slider, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotSpeed( int ) ) );
left->addWidget(slider);
- label = new QLabel( i18n("Number of bees:"), main );
+ label = new TQLabel( i18n("Number of bees:"), main );
min_size(label);
left->addWidget(label);
- slider = new QSlider(MINBATCH, MAXBATCH, 20, maxLevels, Horizontal, main );
+ slider = new TQSlider(MINBATCH, MAXBATCH, 20, maxLevels, Horizontal, main );
slider->setMinimumSize( 120, 20 );
- slider->setTickmarks(QSlider::Below);
+ slider->setTickmarks(TQSlider::Below);
slider->setTickInterval(20);
- connect( slider, SIGNAL( valueChanged( int ) ),
- SLOT( slotLevels( int ) ) );
+ connect( slider, TQT_SIGNAL( valueChanged( int ) ),
+ TQT_SLOT( slotLevels( int ) ) );
left->addWidget(slider);
left->addStretch();
- preview = new QWidget( main );
+ preview = new TQWidget( main );
preview->setFixedSize( 220, 170 );
preview->setBackgroundColor( black );
preview->show(); // otherwise saver does not get correct size
@@ -398,11 +398,11 @@ void kSwarmSetup::slotOk()
KConfig *config = klock_config();
config->setGroup( "Settings" );
- QString sspeed;
+ TQString sspeed;
sspeed.setNum( speed );
config->writeEntry( "Speed", sspeed );
- QString slevels;
+ TQString slevels;
slevels.setNum( maxLevels );
config->writeEntry( "MaxLevels", slevels );
diff --git a/kscreensaver/xsavers/swarm.h b/kscreensaver/xsavers/swarm.h
index dd4b2f6d..0e34049c 100644
--- a/kscreensaver/xsavers/swarm.h
+++ b/kscreensaver/xsavers/swarm.h
@@ -6,7 +6,7 @@
#ifndef __SWARM_H__
#define __SWARM_H__
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdialogbase.h>
#include "saver.h"
@@ -30,7 +30,7 @@ protected slots:
protected:
KRandomSequence rnd;
- QTimer timer;
+ TQTimer timer;
int colorContext;
int speed;
@@ -41,7 +41,7 @@ class kSwarmSetup : public KDialogBase
{
Q_OBJECT
public:
- kSwarmSetup( QWidget *parent = NULL, const char *name = NULL );
+ kSwarmSetup( TQWidget *parent = NULL, const char *name = NULL );
protected:
void readSettings();
@@ -54,7 +54,7 @@ private slots:
void slotHelp();
private:
- QWidget *preview;
+ TQWidget *preview;
kSwarmSaver *saver;
int speed;
diff --git a/kscreensaver/xsavers/xlock.cpp b/kscreensaver/xsavers/xlock.cpp
index 7e7634db..aaf1cea7 100644
--- a/kscreensaver/xsavers/xlock.cpp
+++ b/kscreensaver/xsavers/xlock.cpp
@@ -4,7 +4,7 @@
//
#include <time.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "xlock.h"
@@ -75,7 +75,7 @@ void initXLock( GC gc )
Scr[0].bgcol = allocpixel(cmap, "background", "White");
Scr[0].bgcol = allocpixel(cmap, "foreground", "Black");
- QColor color;
+ TQColor color;
for ( int i = 0; i < NUMCOLORS; i++ )
{
diff --git a/kscreensaver/xsavers/xlock.h b/kscreensaver/xsavers/xlock.h
index e8c2a2bb..ab58fe9c 100644
--- a/kscreensaver/xsavers/xlock.h
+++ b/kscreensaver/xsavers/xlock.h
@@ -34,7 +34,7 @@
*
*/
-#include <qapplication.h> // hack for qt-1.2
+#include <tqapplication.h> // hack for qt-1.2
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>