diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 21:31:21 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 21:31:21 +0000 |
commit | a1bd60b34891ccc77056c190d7871bc4b14fe654 (patch) | |
tree | 713f2f72c8f08a18df12f5bbeef7f9b61b19d4f1 /ktux | |
parent | 8d92c3c2a4131996726cc7b625d3cd3caec296de (diff) | |
download | tdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.tar.gz tdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.zip |
TQt4 port kdetoys
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1238103 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktux')
-rw-r--r-- | ktux/sprite.cpp | 12 | ||||
-rw-r--r-- | ktux/sprite.h | 12 | ||||
-rw-r--r-- | ktux/spriteanim.cpp | 2 | ||||
-rw-r--r-- | ktux/spriteanim.h | 6 | ||||
-rw-r--r-- | ktux/spritemisc.cpp | 2 | ||||
-rw-r--r-- | ktux/spritepm.cpp | 4 | ||||
-rw-r--r-- | ktux/spritepm.h | 6 |
7 files changed, 23 insertions, 21 deletions
diff --git a/ktux/sprite.cpp b/ktux/sprite.cpp index c5fb6c5..9598116 100644 --- a/ktux/sprite.cpp +++ b/ktux/sprite.cpp @@ -43,8 +43,8 @@ extern "C" //----------------------------------------------------------------------------- -KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name ) - : TQDialog( parent, name, TRUE ) +KSpriteSetup::KSpriteSetup( TQWidget *tqparent, const char *name ) + : TQDialog( tqparent, name, TRUE ) { KGlobal::locale()->insertCatalogue("ktux"); saver = 0; @@ -60,11 +60,11 @@ KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name ) tl1->addLayout(tl11); TQLabel *label = new TQLabel( i18n("Speed:"), this ); - label->setMinimumSize(label->sizeHint()); + label->setMinimumSize(label->tqsizeHint()); tl11->addStretch(1); tl11->addWidget(label); - TQSlider *sb = new TQSlider(0, 100, 10, speed, TQSlider::Horizontal, this ); + TQSlider *sb = new TQSlider(0, 100, 10, speed, Qt::Horizontal, this ); tl11->addWidget(sb); connect( sb, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotSpeed( int ) ) ); @@ -85,7 +85,7 @@ KSpriteSetup::KSpriteSetup( TQWidget *parent, const char *name ) button = bbox->addButton(KStdGuiItem::cancel()); connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) ); - bbox->layout(); + bbox->tqlayout(); tl->addWidget(bbox); tl->freeze(); @@ -203,7 +203,7 @@ void KSpriteSaver::initialise() { mCanvas = new TQCanvas(); TQPixmap pm( locate("sprite", "bg.png") ); - mCanvas->setBackgroundPixmap( pm ); + mCanvas->tqsetBackgroundPixmap( pm ); mCanvas->resize( width(), height() ); mView = new TQCanvasView(mCanvas); mView->viewport()->setBackgroundColor( black ); diff --git a/ktux/sprite.h b/ktux/sprite.h index 2414d68..236fddd 100644 --- a/ktux/sprite.h +++ b/ktux/sprite.h @@ -20,6 +20,7 @@ class KSpriteSaver : public KScreenSaver { Q_OBJECT + TQ_OBJECT public: KSpriteSaver( WId id ); virtual ~KSpriteSaver(); @@ -38,19 +39,20 @@ protected: virtual void timerEvent(TQTimerEvent *); protected: - QCanvas *mCanvas; - QCanvasView *mView; - QTimer mTimer; + TQCanvas *mCanvas; + TQCanvasView *mView; + TQTimer mTimer; int mSpeed; TQPtrList<SpriteGroup> mGroups; TQMemArray<int> mTimerIds; }; -class KSpriteSetup : public QDialog +class KSpriteSetup : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KSpriteSetup( TQWidget *parent = NULL, const char *name = NULL ); + KSpriteSetup( TQWidget *tqparent = NULL, const char *name = NULL ); ~KSpriteSetup(); protected: diff --git a/ktux/spriteanim.cpp b/ktux/spriteanim.cpp index fdbcd00..099ab3b 100644 --- a/ktux/spriteanim.cpp +++ b/ktux/spriteanim.cpp @@ -44,7 +44,7 @@ void SpriteObject::setBounds( int x1, int y1, int x2, int y2 ) bool SpriteObject::outOfBounds() const { - bool in = mBound.contains( static_cast<int>(x()), static_cast<int>(y()) ); + bool in = mBound.tqcontains( static_cast<int>(x()), static_cast<int>(y()) ); return !in; } diff --git a/ktux/spriteanim.h b/ktux/spriteanim.h index 8be8a0e..cb19385 100644 --- a/ktux/spriteanim.h +++ b/ktux/spriteanim.h @@ -24,7 +24,7 @@ // // SpriteObject stores the animations that create an object // -class SpriteObject : public QCanvasSprite +class SpriteObject : public TQCanvasSprite { public: SpriteObject(SpritePixmapSequence *seq, TQCanvas *c); @@ -39,7 +39,7 @@ protected: int mCycle; int mLifeSpan; SpritePixmapSequence *mSeq; - QRect mBound; + TQRect mBound; }; //--------------------------------------------------------------------------- @@ -89,7 +89,7 @@ protected: TQPtrList<SpriteObject> mActive; int mCount; SpriteRange mRefresh; - QCanvas *mCanvas; + TQCanvas *mCanvas; }; #endif // SPRITEANIM_H diff --git a/ktux/spritemisc.cpp b/ktux/spritemisc.cpp index 4b239a6..bf60f86 100644 --- a/ktux/spritemisc.cpp +++ b/ktux/spritemisc.cpp @@ -29,7 +29,7 @@ int SpriteRange::random() const void SpriteRange::set(const TQString &str) { - int r = str.find(".."); + int r = str.tqfind(".."); if (r > 0) { diff --git a/ktux/spritepm.cpp b/ktux/spritepm.cpp index d933144..0fa0ef3 100644 --- a/ktux/spritepm.cpp +++ b/ktux/spritepm.cpp @@ -39,7 +39,7 @@ SpritePixmapManager::~SpritePixmapManager() // const TQPixmap *SpritePixmapManager::load(const TQString & img) { - TQPixmap *pixmap = mPixmaps.find(img); + TQPixmap *pixmap = mPixmaps.tqfind(img); if (!pixmap) { @@ -115,7 +115,7 @@ SpriteSequenceManager::~SpriteSequenceManager() SpritePixmapSequence *SpriteSequenceManager::load(KConfigBase &config, const TQString & name) { - SpritePixmapSequence *sprite = mSprites.find(name); + SpritePixmapSequence *sprite = mSprites.tqfind(name); if (!sprite) { diff --git a/ktux/spritepm.h b/ktux/spritepm.h index da3be7e..c2d9c3b 100644 --- a/ktux/spritepm.h +++ b/ktux/spritepm.h @@ -34,7 +34,7 @@ public: { mPixmapDir = "."; mPixmaps.clear(); } const TQPixmap *load(const TQString & img); const TQPixmap *pixmap(const char *img) const - { return mPixmaps.find(img); } + { return mPixmaps.tqfind(img); } static SpritePixmapManager *manager(); @@ -46,7 +46,7 @@ public: //--------------------------------------------------------------------------- // -class SpritePixmapSequence : public QCanvasPixmapArray +class SpritePixmapSequence : public TQCanvasPixmapArray { public: SpritePixmapSequence(TQPtrList<TQPixmap> pm, TQPtrList<TQPoint> hs, TQMemArray<int> d); @@ -69,7 +69,7 @@ public: SpritePixmapSequence *load(KConfigBase &config, const TQString & name); SpritePixmapSequence *sprite(const char *name) - { return mSprites.find(name); } + { return mSprites.tqfind(name); } static SpriteSequenceManager *manager(); |