diff options
Diffstat (limited to 'kanagram/src/kanagram.cpp')
-rw-r--r-- | kanagram/src/kanagram.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kanagram/src/kanagram.cpp b/kanagram/src/kanagram.cpp index 42cb90f9..df845ac6 100644 --- a/kanagram/src/kanagram.cpp +++ b/kanagram/src/kanagram.cpp @@ -180,8 +180,8 @@ void Kanagram::setupRects() //set appropriate yOffset for different fonts if(m_useStandardFonts) yOffset = 6; TQRect r = innerRect(m_blackboardRect, 6, yOffset); - m_hintRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignLeft, i18n(m_textHint)); - m_revealRect = tmpp.boundingRect(r, Qt::AlignBottom|Qt::AlignRight, i18n(m_textRevealWord)); + m_hintRect = tmpp.boundingRect(r, TQt::AlignBottom|TQt::AlignLeft, i18n(m_textHint)); + m_revealRect = tmpp.boundingRect(r, TQt::AlignBottom|TQt::AlignRight, i18n(m_textRevealWord)); tmpp.end(); } @@ -210,14 +210,14 @@ void Kanagram::paintEvent(TQPaintEvent *) p.drawPixmap(520, 362, *m_quit); //draw main Anagram - drawTextNew(p, m_game->getAnagram(), Qt::AlignCenter, 10, 10, m_blackboardRect, true, 28); + drawTextNew(p, m_game->getAnagram(), TQt::AlignCenter, 10, 10, m_blackboardRect, true, 28); int yOffset = 0; //set appropriate yOffset for different fonts if(m_useStandardFonts) yOffset = 6; //draw text using appropriate yOffset - drawTextNew(p, i18n(m_textRevealWord), Qt::AlignBottom | Qt::AlignRight, 6, yOffset, m_blackboardRect, m_overReveal, 14); - drawTextNew(p, i18n(m_textHint), Qt::AlignBottom | Qt::AlignLeft, 6, yOffset, m_blackboardRect, m_overHint, 14); + drawTextNew(p, i18n(m_textRevealWord), TQt::AlignBottom | TQt::AlignRight, 6, yOffset, m_blackboardRect, m_overReveal, 14); + drawTextNew(p, i18n(m_textHint), TQt::AlignBottom | TQt::AlignLeft, 6, yOffset, m_blackboardRect, m_overHint, 14); //draw vocab switcher drawSwitcher(p, 9, 8); @@ -225,7 +225,7 @@ void Kanagram::paintEvent(TQPaintEvent *) p.setPen(TQPen(black, 3)); //Draw the border of the input box - TQRect borderRect = m_inputBox->geometry(); + TQRect borderRect = m_inputBox->tqgeometry(); borderRect.setLeft(borderRect.left() - 2); borderRect.setTop(borderRect.top() - 2); borderRect.setWidth(borderRect.width() + 2 * 1); @@ -340,7 +340,7 @@ void Kanagram::drawSwitcher(TQPainter &p, const int xMargin, const int yMargin) r.normalize(); r.moveBy(- padding - (m_overSwitcher ? m_arrowOver : m_arrow )->width(), yMargin); r.setHeight( (m_overSwitcher ? m_arrowOver : m_arrow )->height()); - m_switcherRect = p.boundingRect(r, Qt::AlignVCenter|Qt::AlignRight, text); + m_switcherRect = p.boundingRect(r, TQt::AlignVCenter|TQt::AlignRight, text); p.setFont(font); if (m_overSwitcher) { @@ -353,7 +353,7 @@ void Kanagram::drawSwitcher(TQPainter &p, const int xMargin, const int yMargin) p.drawPixmap(m_switcherRect.right() + padding, m_switcherRect.top(), *m_arrow); } m_switcherRect.moveBy(0, -2); - p.drawText(m_switcherRect, Qt::AlignVCenter|Qt::AlignRight, text); + p.drawText(m_switcherRect, TQt::AlignVCenter|TQt::AlignRight, text); } TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMargin) @@ -377,7 +377,7 @@ TQRect Kanagram::innerRect(const TQRect &rect, const int xMargin, const int yMar void Kanagram::mousePressEvent(TQMouseEvent *e) { - if (m_nextRect.contains(e->pos())) + if (m_nextRect.tqcontains(e->pos())) { hideHint(); m_game->nextAnagram(); @@ -386,53 +386,53 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_configRect.contains(e->pos())) + if(m_configRect.tqcontains(e->pos())) { showSettings(); } - if(m_quitRect.contains(e->pos())) + if(m_quitRect.tqcontains(e->pos())) { kapp->quit(); } - if(m_revealRect.contains(e->pos())) + if(m_revealRect.tqcontains(e->pos())) { m_game->restoreWord(); update(); } - if(m_logoRect.contains(e->pos())) + if(m_logoRect.tqcontains(e->pos())) { m_helpMenu->aboutApplication(); } if(!m_showHint && m_overHelp) { - if(m_handbookRect.contains(e->pos())) + if(m_handbookRect.tqcontains(e->pos())) { m_helpMenu->appHelpActivated(); } - if(m_aboutKDERect.contains(e->pos())) + if(m_aboutKDERect.tqcontains(e->pos())) { m_helpMenu->aboutKDE(); } - if(m_aboutAppRect.contains(e->pos())) + if(m_aboutAppRect.tqcontains(e->pos())) { m_helpMenu->aboutApplication(); } } - if(m_hintBoxRect.contains(e->pos())) + if(m_hintBoxRect.tqcontains(e->pos())) { hideHint(); } - if(m_switcherRect.contains(e->pos()) || m_arrowRect.contains(e->pos())) + if(m_switcherRect.tqcontains(e->pos()) || m_arrowRect.tqcontains(e->pos())) { - if(!(e->button() == RightButton)) + if(!(e->button() == Qt::RightButton)) m_game->nextVocab(); else m_game->previousVocab(); @@ -444,7 +444,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_hintRect.contains(e->pos())) + if(m_hintRect.tqcontains(e->pos())) { if(m_showHint == true) m_showHint = false; else @@ -459,7 +459,7 @@ void Kanagram::mousePressEvent(TQMouseEvent *e) update(); } - if(m_upRect.contains(e->pos()) && m_inputBox->text() != "") + if(m_upRect.tqcontains(e->pos()) && m_inputBox->text() != "") { if(m_inputBox->text().lower().stripWhiteSpace() == m_game->getWord()) { @@ -492,7 +492,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) bool haveToUpdate; haveToUpdate = false; - if (m_nextRect.contains(p)) + if (m_nextRect.tqcontains(p)) { if (!m_overNext) { @@ -506,7 +506,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_configRect.contains(p)) + if(m_configRect.tqcontains(p)) { if(!m_overConfig) { @@ -520,7 +520,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_helpRect.contains(p)) + if(m_helpRect.tqcontains(p)) { if(!m_overHelp) { @@ -534,7 +534,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_quitRect.contains(p)) + if(m_quitRect.tqcontains(p)) { if(!m_overQuit) { @@ -548,7 +548,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintRect.contains(p)) + if(m_hintRect.tqcontains(p)) { if(!m_overHint) { @@ -562,7 +562,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_hintBoxRect.contains(p)) + if(m_hintBoxRect.tqcontains(p)) { if(!m_overHintBox) { @@ -576,7 +576,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_revealRect.contains(p)) + if(m_revealRect.tqcontains(p)) { if(!m_overReveal) { @@ -590,7 +590,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_upRect.contains(p)) + if(m_upRect.tqcontains(p)) { if(!m_overUp) { @@ -604,7 +604,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_switcherRect.contains(p) || m_arrowRect.contains(p)) + if(m_switcherRect.tqcontains(p) || m_arrowRect.tqcontains(p)) { if(!m_overSwitcher) { @@ -618,7 +618,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutAppRect.contains(p)) + if(m_aboutAppRect.tqcontains(p)) { if(!m_overAboutApp) { @@ -634,7 +634,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) if(!m_showHint) { - if(m_handbookRect.contains(p)) + if(m_handbookRect.tqcontains(p)) { if(!m_overHandbook) { @@ -648,7 +648,7 @@ void Kanagram::updateButtonHighlighting(const TQPoint &p) haveToUpdate = true; } - if(m_aboutKDERect.contains(p)) + if(m_aboutKDERect.tqcontains(p)) { if(!m_overAboutKDE) { @@ -679,7 +679,7 @@ void Kanagram::drawText(TQPainter &p, const TQString &text, const TQPoint ¢e font.setBold(true); p.setFont(font); - 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); @@ -692,7 +692,7 @@ void Kanagram::drawText(TQPainter &p, const TQString &text, const TQPoint ¢e if (!highlight) p.setPen(m_chalkColor); else p.setPen(m_chalkHighlightColor); - p.drawText(r, Qt::AlignCenter, text); + p.drawText(r, TQt::AlignCenter, text); if(rect) *rect = r; } |