diff options
Diffstat (limited to 'kolf')
-rw-r--r-- | kolf/ball.cpp | 2 | ||||
-rw-r--r-- | kolf/game.cpp | 26 | ||||
-rw-r--r-- | kolf/kcomboboxdialog.cpp | 2 | ||||
-rw-r--r-- | kolf/newgame.cpp | 10 | ||||
-rw-r--r-- | kolf/slope.cpp | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/kolf/ball.cpp b/kolf/ball.cpp index 0e25422b..7235edf3 100644 --- a/kolf/ball.cpp +++ b/kolf/ball.cpp @@ -249,7 +249,7 @@ void Ball::collisionDetect(double oldx, double oldy) m_collisionLock = true; // move this ball to where it was barely touching double ballAngle = m_vector.direction(); - while (collisions(true).tqcontains(item) > 0) + while (collisions(true).contains(item) > 0) move(x() - cos(ballAngle) / 2.0, y() + sin(ballAngle) / 2.0); // make a 2 pixel separation diff --git a/kolf/game.cpp b/kolf/game.cpp index a6f02a79..32ebb9be 100644 --- a/kolf/game.cpp +++ b/kolf/game.cpp @@ -838,7 +838,7 @@ Puddle::Puddle(TQCanvas *canvas) TQBrush brush; TQPixmap pic; - if (!TQPixmapCache::tqfind("puddle", pic)) + if (!TQPixmapCache::find("puddle", pic)) { pic.load(locate("appdata", "pics/puddle.png")); TQPixmapCache::insert("puddle", pic); @@ -891,7 +891,7 @@ Sand::Sand(TQCanvas *canvas) TQBrush brush; TQPixmap pic; - if (!TQPixmapCache::tqfind("sand", pic)) + if (!TQPixmapCache::find("sand", pic)) { pic.load(locate("appdata", "pics/sand.png")); TQPixmapCache::insert("sand", pic); @@ -990,7 +990,7 @@ void Putter::setOrigin(int _x, int _y) void Putter::setAngle(Ball *ball) { - angle = angleMap.tqcontains(ball)? angleMap[ball] : 0; + angle = angleMap.contains(ball)? angleMap[ball] : 0; finishMe(); } @@ -1182,7 +1182,7 @@ HoleResult Hole::result(TQPoint p, double s, bool * /*wasCenter*/) Cup::Cup(TQCanvas *canvas) : Hole(TQColor("#808080"), canvas) { - if (!TQPixmapCache::tqfind("cup", pixmap)) + if (!TQPixmapCache::find("cup", pixmap)) { pixmap.load(locate("appdata", "pics/cup.png")); TQPixmapCache::insert("cup", pixmap); @@ -2207,7 +2207,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi course->resize(width, height); TQPixmap pic; - if (!TQPixmapCache::tqfind("grass", pic)) + if (!TQPixmapCache::find("grass", pic)) { pic.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", pic); @@ -2430,7 +2430,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e) return; } // only items we keep track of - if ((!(items.tqcontainsRef(list.first()) || list.first() == whiteBall || extraMoveable.tqcontainsRef(list.first())))) + if ((!(items.containsRef(list.first()) || list.first() == whiteBall || extraMoveable.containsRef(list.first())))) { emit newSelectedItem(&holeInfo); return; @@ -2785,7 +2785,7 @@ void KolfGame::timeout() // later undo the shot for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it) { - if (!course->rect().tqcontains(TQPoint((*it).ball()->x(), (*it).ball()->y()))) + if (!course->rect().contains(TQPoint((*it).ball()->x(), (*it).ball()->y()))) { (*it).ball()->setState(Stopped); @@ -3533,12 +3533,12 @@ void KolfGame::openFile() cfg->setGroup(*it); const int len = (*it).length(); - const int dashIndex = (*it).tqfind("-"); + const int dashIndex = (*it).find("-"); const int holeNum = (*it).left(dashIndex).toInt(); if (holeNum > _highestHole) _highestHole = holeNum; - const int atIndex = (*it).tqfind("@"); + const int atIndex = (*it).find("@"); const TQString name = (*it).mid(dashIndex + 1, atIndex - (dashIndex + 1)); if (holeNum != curHole) @@ -3552,8 +3552,8 @@ void KolfGame::openFile() numItems++; - const int commaIndex = (*it).tqfind(","); - const int pipeIndex = (*it).tqfind("|"); + const int commaIndex = (*it).find(","); + const int pipeIndex = (*it).find("|"); const int x = (*it).mid(atIndex + 1, commaIndex - (atIndex + 1)).toInt(); const int y = (*it).mid(commaIndex + 1, pipeIndex - (commaIndex + 1)).toInt(); @@ -3610,7 +3610,7 @@ void KolfGame::openFile() break; } - if (!loaded && name != "hole" && missingPlugins.tqcontains(name) <= 0) + if (!loaded && name != "hole" && missingPlugins.contains(name) <= 0) missingPlugins.append(name); } @@ -3978,7 +3978,7 @@ void KolfGame::save() // wipe out all groups from this hole for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) { - int holeNum = (*it).left((*it).tqfind("-")).toInt(); + int holeNum = (*it).left((*it).find("-")).toInt(); if (holeNum == curHole) cfg->deleteGroup(*it); } diff --git a/kolf/kcomboboxdialog.cpp b/kolf/kcomboboxdialog.cpp index 133edb01..1dfe8a79 100644 --- a/kolf/kcomboboxdialog.cpp +++ b/kolf/kcomboboxdialog.cpp @@ -90,7 +90,7 @@ TQString KComboBoxDialog::getItem( const TQString &_text, const TQString &_capti config->setGroup( "Notification Messages" ); prevAnswer = config->readEntry( dontAskAgainName ); if ( !prevAnswer.isEmpty() ) - if ( _items.tqcontains( prevAnswer ) > 0 ) + if ( _items.contains( prevAnswer ) > 0 ) return prevAnswer; } diff --git a/kolf/newgame.cpp b/kolf/newgame.cpp index 2fd048c1..5badc856 100644 --- a/kolf/newgame.cpp +++ b/kolf/newgame.cpp @@ -57,7 +57,7 @@ NewGameDialog::NewGameDialog(bool enableCourses, TQWidget *tqparent, const char scroller = new TQScrollView(playerPage); bigLayout->addWidget(scroller); tqlayout = new TQVBox(scroller->viewport()); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); @@ -235,7 +235,7 @@ void NewGameDialog::removeCourse() return; TQString file = *names.at(curItem); - if (externCourses.tqcontains(file) < 1) + if (externCourses.contains(file) < 1) return; names.remove(file); @@ -248,7 +248,7 @@ void NewGameDialog::removeCourse() void NewGameDialog::selectionChanged() { const int curItem = courseList->currentItem(); - remove->setEnabled(!(curItem < 0 || externCourses.tqcontains(*names.at(curItem)) < 1)); + remove->setEnabled(!(curItem < 0 || externCourses.contains(*names.at(curItem)) < 1)); } void NewGameDialog::addCourse() @@ -259,7 +259,7 @@ void NewGameDialog::addCourse() for (TQStringList::Iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt) { - if (names.tqcontains(*fileIt) > 0) + if (names.contains(*fileIt) > 0) { hasDuplicates = true; continue; @@ -316,7 +316,7 @@ PlayerEditor::PlayerEditor(TQString startName, TQColor startColor, TQWidget *tqp { TQHBoxLayout *tqlayout = new TQHBoxLayout(this, KDialogBase::spacingHint()); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); diff --git a/kolf/slope.cpp b/kolf/slope.cpp index dd40cc49..7d9db148 100644 --- a/kolf/slope.cpp +++ b/kolf/slope.cpp @@ -34,7 +34,7 @@ Slope::Slope(TQRect rect, TQCanvas *canvas) setZ(-50); - if (!TQPixmapCache::tqfind("grass", grass)) + if (!TQPixmapCache::find("grass", grass)) { grass.load(locate("appdata", "pics/grass.png")); TQPixmapCache::insert("grass", grass); |