diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
commit | 0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch) | |
tree | 2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kgeography/src/answer.cpp | |
parent | 83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff) | |
download | tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgeography/src/answer.cpp')
-rw-r--r-- | kgeography/src/answer.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kgeography/src/answer.cpp b/kgeography/src/answer.cpp index a468333c..f4931df3 100644 --- a/kgeography/src/answer.cpp +++ b/kgeography/src/answer.cpp @@ -8,9 +8,9 @@ * (at your option) any later version. * ***************************************************************************/ -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdialog.h> @@ -37,12 +37,12 @@ userAnswer &userAnswer::operator=(const userAnswer &r) return *this; } -void userAnswer::setQuestion(QVariant question) +void userAnswer::setQuestion(TQVariant question) { p_question = question; } -void userAnswer::setAnswer(QVariant answer) +void userAnswer::setAnswer(TQVariant answer) { p_answer = answer; } @@ -52,15 +52,15 @@ void userAnswer::setAnswerCorrect(bool correct) p_correct = correct; } -void userAnswer::setCorrectAnswer(QVariant correctAnswer) +void userAnswer::setCorrectAnswer(TQVariant correctAnswer) { p_correctAnswer = correctAnswer; } -void userAnswer::putWidgets(QWidget *w, QGridLayout *lay, int row) const +void userAnswer::putWidgets(TQWidget *w, TQGridLayout *lay, int row) const { - QWidget *widgets[3]; - const QVariant *v; + TQWidget *widgets[3]; + const TQVariant *v; for (int i = 0; i < 3; i++) { @@ -68,30 +68,30 @@ void userAnswer::putWidgets(QWidget *w, QGridLayout *lay, int row) const else if (i == 1) v = &p_answer; else v = &p_correctAnswer; - if (v -> type() == QVariant::String) + if (v -> type() == TQVariant::String) { - QLabel *l; - l = new QLabel(w); + TQLabel *l; + l = new TQLabel(w); l -> setText(v -> toString()); l -> setMargin(KDialog::marginHint() / 2); widgets[i] = l; } - else if (v -> type() == QVariant::Color) + else if (v -> type() == TQVariant::Color) { - QWidget *aux = new QWidget(w); - QHBoxLayout *lay = new QHBoxLayout(aux); + TQWidget *aux = new TQWidget(w); + TQHBoxLayout *lay = new TQHBoxLayout(aux); - QFrame *inner = new QFrame(aux); + TQFrame *inner = new TQFrame(aux); lay -> addWidget(inner); inner -> setBackgroundColor(v -> toColor()); inner -> setLineWidth(1); lay -> setMargin(KDialog::marginHint() / 2); widgets[i] = aux; } - else if (v -> type() == QVariant::Image) + else if (v -> type() == TQVariant::Image) { - QLabel *l; - l = new QLabel(w); + TQLabel *l; + l = new TQLabel(w); l -> setPixmap(v -> toImage()); l -> setAlignment(Qt::AlignHCenter); l -> setMargin(KDialog::marginHint() / 2); @@ -103,7 +103,7 @@ void userAnswer::putWidgets(QWidget *w, QGridLayout *lay, int row) const if (!p_correct) { - QColor back, fore; + TQColor back, fore; back = widgets[0] -> colorGroup().highlight(); fore = widgets[0] -> colorGroup().highlightedText(); for (int i = 0; i < 3; i++) |