diff options
author | Michele Calgaro <[email protected]> | 2025-01-20 18:26:21 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2025-01-27 11:03:54 +0900 |
commit | bd4ee3ccc15d0776614a8435850a2eb1faf5a71f (patch) | |
tree | c2ce8973a25d1e56e92a5a0b179693ed1f4f42ad /kolf | |
parent | 3191f81874fcfdd0466f6f42beb89da6245b1a0a (diff) | |
download | tdegames-bd4ee3ccc15d0776614a8435850a2eb1faf5a71f.tar.gz tdegames-bd4ee3ccc15d0776614a8435850a2eb1faf5a71f.zip |
Use tdeApp
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kolf')
-rw-r--r-- | kolf/ball.cpp | 6 | ||||
-rw-r--r-- | kolf/game.cpp | 12 | ||||
-rw-r--r-- | kolf/kolf.cpp | 12 | ||||
-rw-r--r-- | kolf/newgame.cpp | 6 | ||||
-rw-r--r-- | kolf/objects/test/test.cpp | 2 | ||||
-rw-r--r-- | kolf/slope.cpp | 2 |
6 files changed, 20 insertions, 20 deletions
diff --git a/kolf/ball.cpp b/kolf/ball.cpp index 175d0bd1..4fa25ac6 100644 --- a/kolf/ball.cpp +++ b/kolf/ball.cpp @@ -29,7 +29,7 @@ Ball::Ball(TQCanvas *canvas) m_placeOnGround = false; m_forceStillGoing = false; frictionMultiplier = 1.0; - TQFont font(kapp->font()); + TQFont font(tdeApp->font()); //font.setPixelSize(10); label = new TQCanvasText("", font, canvas); label->setColor(white); @@ -70,9 +70,9 @@ void Ball::advance(int phase) } const double diff = 8; - double randnum = kapp->random(); + double randnum = tdeApp->random(); const double width = 6 + randnum * (diff / RAND_MAX); - randnum = kapp->random(); + randnum = tdeApp->random(); const double height = 6 + randnum * (diff / RAND_MAX); setSize(width, height); blowUpCount++; diff --git a/kolf/game.cpp b/kolf/game.cpp index 4f6b7edb..6d6022db 100644 --- a/kolf/game.cpp +++ b/kolf/game.cpp @@ -626,7 +626,7 @@ void Sign::draw(TQPainter &painter) Bridge::draw(painter); painter.setPen(TQPen(black, 1)); - TQSimpleRichText txt(m_text, kapp->font()); + TQSimpleRichText txt(m_text, tdeApp->font()); const int indent = wallPen().width() + 3; txt.setWidth(width() - 2*indent); TQColorGroup colorGroup; @@ -1120,7 +1120,7 @@ bool Bumper::collision(Ball *ball, long int /*id*/) betweenVector.setMagnitude(speed); // add some randomness so we don't go indefinetely - betweenVector.setDirection(betweenVector.direction() + deg2rad((kapp->random() % 3) - 1)); + betweenVector.setDirection(betweenVector.direction() + deg2rad((tdeApp->random() % 3) - 1)); ball->setVector(betweenVector); // for some reason, x is always switched... @@ -1222,7 +1222,7 @@ BlackHole::BlackHole(TQCanvas *canvas) m_maxSpeed = 5.0; runs = 0; - const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); + const TQColor myColor((TQRgb)(tdeApp->random() % 0x01000000)); outside = new TQCanvasEllipse(canvas); outside->setZ(z() - .001); @@ -2232,7 +2232,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi infoText = new TQCanvasText(course); infoText->setText(""); infoText->setColor(white); - TQFont font = kapp->font(); + TQFont font = tdeApp->font(); font.setPixelSize(12); infoText->move(15, width/2); infoText->setZ(10001); @@ -3938,7 +3938,7 @@ void KolfGame::lastHole() void KolfGame::randHole() { - int newHole = 1 + (int)((double)kapp->random() * ((double)(highestHole - 1) / (double)RAND_MAX)); + int newHole = 1 + (int)((double)tdeApp->random() * ((double)(highestHole - 1) / (double)RAND_MAX)); switchHole(newHole); } @@ -4161,7 +4161,7 @@ void KolfGame::print(KPrinter &pr) if (pr.option("kde-kolf-title") == "true") { TQString text = i18n("%1 - Hole %2; by %3").arg(holeInfo.name()).arg(curHole).arg(holeInfo.author()); - TQFont font(kapp->font()); + TQFont font(tdeApp->font()); font.setPointSize(18); TQRect rect = TQFontMetrics(font).boundingRect(text); p.setFont(font); diff --git a/kolf/kolf.cpp b/kolf/kolf.cpp index 856a023a..4d90d6cd 100644 --- a/kolf/kolf.cpp +++ b/kolf/kolf.cpp @@ -117,7 +117,7 @@ void Kolf::initGUI() useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, TQ_SLOT(emptySlot()), actionCollection(), "usemouse"); useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter")); connect(useMouseAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(useMouseChanged(bool))); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); useMouseAction->setChecked(config->readBoolEntry("useMouse", true)); @@ -719,27 +719,27 @@ void Kolf::titleChanged(const TQString &newTitle) void Kolf::useMouseChanged(bool yes) { - TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("useMouse", yes); config->sync(); } void Kolf::useAdvancedPuttingChanged(bool yes) { - TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("useAdvancedPutting", yes); config->sync(); } void Kolf::showInfoChanged(bool yes) { - TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("showInfo", yes); config->sync(); } void Kolf::showGuideLineChanged(bool yes) { - TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("showGuideLine", yes); config->sync(); } void Kolf::soundChanged(bool yes) { - TDEConfig *config = kapp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync(); + TDEConfig *config = tdeApp->config(); config->setGroup("Settings"); config->writeEntry("sound", yes); config->sync(); } void Kolf::initPlugins() diff --git a/kolf/newgame.cpp b/kolf/newgame.cpp index d42da4a6..8b0f15bc 100644 --- a/kolf/newgame.cpp +++ b/kolf/newgame.cpp @@ -41,7 +41,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_ this->enableCourses = enableCourses; editors.setAutoDelete(true); - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); // lots o' colors :) startColors << yellow << blue << red << lightGray << cyan << darkBlue << magenta << darkGray << darkMagenta << darkYellow; @@ -92,7 +92,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_ TQVBoxLayout *coursePageLayout = new TQVBoxLayout(coursePage, marginHint(), spacingHint()); KURLLabel *coursesLink = new KURLLabel("http://web.mit.edu/~jasonkb/www/kolf/", "http://web.mit.edu/~jasonkb/www/kolf/", coursePage); - connect(coursesLink, TQ_SIGNAL(leftClickedURL(const TQString &)), kapp, TQ_SLOT(invokeBrowser(const TQString &))); + connect(coursesLink, TQ_SIGNAL(leftClickedURL(const TQString &)), tdeApp, TQ_SLOT(invokeBrowser(const TQString &))); coursePageLayout->addWidget(coursesLink); TQHBoxLayout *hlayout = new TQHBoxLayout(coursePageLayout, spacingHint()); @@ -183,7 +183,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *parent, const char *_ void NewGameDialog::slotOk() { - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); config->setGroup("New Game Dialog Mode"); config->writeEntry("competition", mode->isChecked()); diff --git a/kolf/objects/test/test.cpp b/kolf/objects/test/test.cpp index b7ef7a75..4d57b387 100644 --- a/kolf/objects/test/test.cpp +++ b/kolf/objects/test/test.cpp @@ -39,7 +39,7 @@ void Test::advance(int phase) if (count % m_switchEvery == 0) { // random color - const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); + const TQColor myColor((TQRgb)(tdeApp->random() % 0x01000000)); // set the brush, so our shape is drawn // with the random color diff --git a/kolf/slope.cpp b/kolf/slope.cpp index d3e3835e..051c92af 100644 --- a/kolf/slope.cpp +++ b/kolf/slope.cpp @@ -42,7 +42,7 @@ Slope::Slope(TQRect rect, TQCanvas *canvas) point = new RectPoint(color.light(), this, canvas); - TQFont font(kapp->font()); + TQFont font(tdeApp->font()); font.setPixelSize(18); text = new TQCanvasText(canvas); text->setZ(99999.99); |