diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /kolf/objects/test | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolf/objects/test')
-rw-r--r-- | kolf/objects/test/test.cpp | 30 | ||||
-rw-r--r-- | kolf/objects/test/test.h | 7 |
2 files changed, 19 insertions, 18 deletions
diff --git a/kolf/objects/test/test.cpp b/kolf/objects/test/test.cpp index d417f552..38a40f22 100644 --- a/kolf/objects/test/test.cpp +++ b/kolf/objects/test/test.cpp @@ -14,7 +14,7 @@ #include "test.h" K_EXPORT_COMPONENT_FACTORY(libkolftest, TestFactory) -TQObject *TestFactory::createObject (TQObject * /*parent*/, const char * /*name*/, const char * /*classname*/, const TQStringList & /*args*/) +TQObject *TestFactory::createObject (TQObject * /*tqparent*/, const char * /*name*/, const char * /*classname*/, const TQStringList & /*args*/) { return new TestObj; } Test::Test(TQCanvas *canvas) @@ -39,9 +39,9 @@ void Test::advance(int phase) if (count % m_switchEvery == 0) { // random color - const TQColor myColor((QRgb)(kapp->random() % 0x01000000)); + const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); - // set the brush, so our shape is drawn + // set the brush, so our tqshape is drawn // with the random color setBrush(TQBrush(myColor)); @@ -65,24 +65,24 @@ void Test::load(KConfig *cfg) setSwitchEvery(cfg->readNumEntry("switchEvery", 50)); } -TestConfig::TestConfig(Test *test, TQWidget *parent) - : Config(parent), m_test(test) +TestConfig::TestConfig(Test *test, TQWidget *tqparent) + : Config(tqparent), m_test(test) { - TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint()); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this, marginHint(), spacingHint()); - layout->addStretch(); + tqlayout->addStretch(); - layout->addWidget(new TQLabel(i18n("Flash speed"), this)); + tqlayout->addWidget(new TQLabel(i18n("Flash speed"), this)); - TQHBoxLayout *hlayout = new TQHBoxLayout(layout, spacingHint()); + TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, spacingHint()); TQLabel *slow = new TQLabel(i18n("Slow"), this); - hlayout->addWidget(slow); + htqlayout->addWidget(slow); TQSlider *slider = new TQSlider(1, 100, 5, 101 - m_test->switchEvery(), Qt::Horizontal, this); - hlayout->addWidget(slider); + htqlayout->addWidget(slider); TQLabel *fast = new TQLabel(i18n("Fast"), this); - hlayout->addWidget(fast); + htqlayout->addWidget(fast); - layout->addStretch(); + tqlayout->addStretch(); connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(switchEveryChanged(int))); } @@ -96,9 +96,9 @@ void TestConfig::switchEveryChanged(int news) changed(); } -Config *Test::config(TQWidget *parent) +Config *Test::config(TQWidget *tqparent) { - return new TestConfig(this, parent); + return new TestConfig(this, tqparent); } #include "test.moc" diff --git a/kolf/objects/test/test.h b/kolf/objects/test/test.h index 06e9f30a..690a7e84 100644 --- a/kolf/objects/test/test.h +++ b/kolf/objects/test/test.h @@ -11,14 +11,14 @@ class KConfig; -class TestFactory : KLibFactory { Q_OBJECT public: TQObject *createObject(TQObject *, const char *, const char *, const TQStringList & = TQStringList()); }; +class TestFactory : KLibFactory { TQ_OBJECT public: TQObject *createObject(TQObject *, const char *, const char *, const TQStringList & = TQStringList()); }; class Test : public TQCanvasEllipse, public CanvasItem { public: Test(TQCanvas *canvas); - virtual Config *config(TQWidget *parent); + virtual Config *config(TQWidget *tqparent); virtual void save(KConfig *cfg); virtual void load(KConfig *cfg); @@ -35,9 +35,10 @@ private: class TestConfig : public Config { Q_OBJECT + TQ_OBJECT public: - TestConfig(Test *test, TQWidget *parent); + TestConfig(Test *test, TQWidget *tqparent); private slots: void switchEveryChanged(int news); |