diff options
Diffstat (limited to 'blinken/src/blinken.cpp')
-rw-r--r-- | blinken/src/blinken.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/blinken/src/blinken.cpp b/blinken/src/blinken.cpp index 202a9a99..36a8f93c 100644 --- a/blinken/src/blinken.cpp +++ b/blinken/src/blinken.cpp @@ -144,7 +144,7 @@ void blinken::paintEvent(TQPaintEvent *) p.setBrush(m_fillColor); p.drawPie(169, 192, 4, 58, 1440, 2880); p.drawPie(465, 192, 4, 58, -1440, 2880); - p.setPen(TQPen(Qt::black, 3)); + p.setPen(TQPen(TQt::black, 3)); p.fillRect(171, 192, 296, 58, m_fillColor); p.drawLine(169, 192, 469, 192); p.drawLine(169, 250, 469, 250); @@ -184,16 +184,16 @@ void blinken::paintEvent(TQPaintEvent *) if (sizeAux > size) size = sizeAux; f1.setPointSize(size); #ifndef WITHOUT_ARTS - area = p.boundingRect(TQRect(), Qt::AlignAuto, sounds); + area = p.boundingRect(TQRect(), TQt::AlignAuto, sounds); area.moveBy(212, 221 - (area.height() / 2)); - p.drawText(area, Qt::AlignCenter, sounds); + p.drawText(area, TQt::AlignCenter, sounds); m_soundRect = m_soundRect.unite(area); #endif if (!m_alwaysUseNonCoolFont) { - area = p.boundingRect(TQRect(), Qt::AlignAuto, font); + area = p.boundingRect(TQRect(), TQt::AlignAuto, font); area.moveBy(426 - area.width(), 221 - (area.height() / 2)); - p.drawText(area, Qt::AlignCenter, font); + p.drawText(area, TQt::AlignCenter, font); m_fontRect = m_fontRect.unite(area); } @@ -227,7 +227,7 @@ void blinken::keyPressEvent(TQKeyEvent *e) if (i < 4) { - if (e -> key() == Qt::Key_Escape) + if (e -> key() == TQt::Key_Escape) { m_buttons[i] -> setSelected(false); update(); @@ -267,7 +267,7 @@ void blinken::keyReleaseEvent(TQKeyEvent *e) { if (e -> isAutoRepeat()) return; - if (e -> state() == Qt::ControlButton && e -> stateAfter() != Qt::ControlButton && (m_game.phase() == blinkenGame::starting || m_game.phase() == blinkenGame::choosingLevel)) + if (e -> state() == TQt::ControlButton && e -> stateAfter() != TQt::ControlButton && (m_game.phase() == blinkenGame::starting || m_game.phase() == blinkenGame::choosingLevel)) { m_showPreferences = !m_showPreferences; for (int i = 0; i < 4; i++) m_buttons[i] -> setSelected(false); @@ -289,13 +289,13 @@ void blinken::mousePressEvent(TQMouseEvent *e) hsd->showLevel(1); m_updateButtonHighlighting = true; } - else if (m_showPreferences && m_fontRect.contains(e -> pos()) && !m_alwaysUseNonCoolFont) + else if (m_showPreferences && m_fontRect.tqcontains(e -> pos()) && !m_alwaysUseNonCoolFont) { blinkenSettings::setCustomFont(!blinkenSettings::customFont()); blinkenSettings::writeConfig(); update(); } - else if (m_showPreferences && m_soundRect.contains(e -> pos())) + else if (m_showPreferences && m_soundRect.tqcontains(e -> pos())) { blinkenSettings::setPlaySounds(!blinkenSettings::playSounds()); blinkenSettings::writeConfig(); @@ -316,9 +316,9 @@ void blinken::mousePressEvent(TQMouseEvent *e) else if (m_game.phase() == blinkenGame::choosingLevel) { int level = 0; - if (m_levelsRect[1].contains(e -> pos())) level = 1; - else if (m_levelsRect[0].contains(e -> pos())) level = 2; - else if (m_levelsRect[2].contains(e -> pos())) level = 3; + if (m_levelsRect[1].tqcontains(e -> pos())) level = 1; + else if (m_levelsRect[0].tqcontains(e -> pos())) level = 2; + else if (m_levelsRect[2].tqcontains(e -> pos())) level = 3; if (level) { for(int i = 0; i < 3; i++) m_overLevels[i] = false; @@ -639,7 +639,7 @@ void blinken::drawText(TQPainter &p, const TQString &text, const TQPoint ¢er if (bold) f.setBold(true); p.setFont(f); - r = p.boundingRect(TQRect(), Qt::AlignAuto, text); + r = p.boundingRect(TQRect(), TQt::AlignAuto, text); r = TQRect(0, 0, r.width() + xMargin, r.height() + yMargin); r.moveBy(center.x() - r.width() / 2, center.y() - r.height() / 2); @@ -652,7 +652,7 @@ void blinken::drawText(TQPainter &p, const TQString &text, const TQPoint ¢er if (!highlight) p.setPen(m_fontColor); else p.setPen(m_fontHighlightColor); - p.drawText(r, Qt::AlignCenter, text); + p.drawText(r, TQt::AlignCenter, text); if (rect) *rect = r; p.setFont(oldFont); @@ -665,7 +665,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) m_updateButtonHighlighting = false; haveToUpdate = false; - if (m_highscoreRect.contains(p)) + if (m_highscoreRect.tqcontains(p)) { if (!m_overHighscore) { @@ -679,7 +679,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_menuRect.contains(p)) + if (m_menuRect.tqcontains(p)) { if (!m_overMenu) { @@ -699,7 +699,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) } else if (m_overMenu) { - if (m_aboutKDERect.contains(p)) + if (m_aboutKDERect.tqcontains(p)) { if (!m_overAboutKDE) { @@ -709,7 +709,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } } - else if (m_aboutBlinkenRect.contains(p)) + else if (m_aboutBlinkenRect.tqcontains(p)) { if (!m_overAboutBlinken) { @@ -719,7 +719,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } } - else if (m_manualRect.contains(p)) + else if (m_manualRect.tqcontains(p)) { if (!m_overManual) { @@ -739,7 +739,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) } } - if (!m_showPreferences && m_centralLettersRect.contains(p)) + if (!m_showPreferences && m_centralLettersRect.tqcontains(p)) { m_overCentralLetters = true; haveToUpdate = true; @@ -750,7 +750,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_showPreferences && m_soundRect.contains(p)) + if (m_showPreferences && m_soundRect.tqcontains(p)) { m_overSound = true; haveToUpdate = true; @@ -761,7 +761,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_showPreferences && m_fontRect.contains(p) && !m_alwaysUseNonCoolFont) + if (m_showPreferences && m_fontRect.tqcontains(p) && !m_alwaysUseNonCoolFont) { m_overFont = true; haveToUpdate = true; @@ -772,7 +772,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_counterRect.contains(p)) + if (m_counterRect.tqcontains(p)) { m_overCounter = true; haveToUpdate = true; @@ -783,7 +783,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if (m_quitRect.contains(p)) + if (m_quitRect.tqcontains(p)) { if (!m_overQuit) { @@ -805,7 +805,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) case blinkenGame::waiting1: case blinkenGame::learningTheSequence: case blinkenGame::typingTheSequence: - if (m_centralTextRect.contains(p)) + if (m_centralTextRect.tqcontains(p)) { if (!m_overCentralText) { @@ -823,7 +823,7 @@ void blinken::updateButtonHighlighting(const TQPoint &p) case blinkenGame::choosingLevel: for (int i = 0; i < 3; i++) { - if (m_levelsRect[i].contains(p)) + if (m_levelsRect[i].tqcontains(p)) { if (!m_overLevels[i]) { |