From 0a6e0958c03e41c87b15557b6f407874f20c2f8d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:39:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwordquiz/src/qaview.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'kwordquiz/src/qaview.cpp') diff --git a/kwordquiz/src/qaview.cpp b/kwordquiz/src/qaview.cpp index 9e4deca9..4660df9f 100644 --- a/kwordquiz/src/qaview.cpp +++ b/kwordquiz/src/qaview.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -27,24 +27,24 @@ #include "prefs.h" #include "kwordquiz.h" -QString highlightError(const QString & c, const QString & e) +TQString highlightError(const TQString & c, const TQString & e) { if (c == e) return c; - QString s = c; + TQString s = c; if (s.left(4) == "" && e.left(4) != "") s = s.mid(4, s.length() - 9); if (s == e) return s; - QString result = ""; + TQString result = ""; int i = 0; while (s[i] == e[i]) result.append(e[i++]); result.append(""); - QString result2 = ""; + TQString result2 = ""; int j = s.length() - 1; int k = e.length() - 1; while (s[j] == e[k] && k > i) @@ -63,7 +63,7 @@ QString highlightError(const QString & c, const QString & e) } -QAView::QAView(QWidget *parent, const char *name, WFlags f):QAViewBase(parent, name, f) +QAView::QAView(TQWidget *parent, const char *name, WFlags f):QAViewBase(parent, name, f) { m_score = new WQScore(); } @@ -90,8 +90,8 @@ void QAView::init() picCorrect -> clear(); picError -> clear(); - QFont f = Prefs::editorFont(); - f.setWeight(QFont::Normal); + TQFont f = Prefs::editorFont(); + f.setWeight(TQFont::Normal); lblQuestion -> setFont(f); //lblQuestion -> font().setBold(false); lblAnswerBlank -> setFont(f); @@ -202,8 +202,8 @@ void QAView::slotCheck() void QAView::slotHint() { - QString answer = txtAnswer->text(); - QString correctAnswer = m_quiz->hint(m_question); + TQString answer = txtAnswer->text(); + TQString correctAnswer = m_quiz->hint(m_question); if (correctAnswer.left(4) == "") { correctAnswer = correctAnswer.remove(""); @@ -242,7 +242,7 @@ void QAView::slotRepeat() void QAView::updateScore() { - QString s; + TQString s; s = s.setNum(m_quiz->questionCount(), 10); lblScoreCount->setText(s); picCount->setPixmap(KGlobal::iconLoader()->loadIcon("kwordquiz", KIcon::Panel)); @@ -278,7 +278,7 @@ void QAView::showQuestion(int i) lblAnswerLanguage -> setText(m_quiz ->langAnswer(i)); - if (!QString(m_quiz ->blankAnswer(i)).isEmpty()) + if (!TQString(m_quiz ->blankAnswer(i)).isEmpty()) { lblAnswerBlank->show(); //lblAnswerBlank->setFont(m_quiz->fontAnswer(i)); @@ -301,14 +301,14 @@ void QAView::slotApplySettings( ) updateScore(); } -void QAView::slotSpecChar( const QChar & c) +void QAView::slotSpecChar( const TQChar & c) { if (txtAnswer->hasFocus()) { if (txtAnswer->hasSelectedText()) { - QString ls = txtAnswer->text(); - QString s = txtAnswer->selectedText(); + TQString ls = txtAnswer->text(); + TQString s = txtAnswer->selectedText(); int len = s.length(); int ss = txtAnswer->selectionStart(); ls = ls.replace(ss, len, c); @@ -317,7 +317,7 @@ void QAView::slotSpecChar( const QChar & c) } else { - QString s = txtAnswer->text(); + TQString s = txtAnswer->text(); int i = txtAnswer->cursorPosition(); s.insert(i, c); txtAnswer->setText(s); -- cgit v1.2.1