summaryrefslogtreecommitdiffstats
path: root/kgeography
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kgeography
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgeography')
-rw-r--r--kgeography/Changelog2
-rw-r--r--kgeography/data/africa.kgm2
-rw-r--r--kgeography/data/world.kgm4
-rw-r--r--kgeography/src/answer.cpp6
-rw-r--r--kgeography/src/answersdialog.cpp8
-rw-r--r--kgeography/src/answersdialog.h2
-rw-r--r--kgeography/src/askwidget.cpp8
-rw-r--r--kgeography/src/askwidget.h5
-rw-r--r--kgeography/src/boxasker.cpp8
-rw-r--r--kgeography/src/boxasker.h3
-rw-r--r--kgeography/src/capitaldivisionasker.cpp6
-rw-r--r--kgeography/src/capitaldivisionasker.h2
-rw-r--r--kgeography/src/division.cpp6
-rw-r--r--kgeography/src/division.h4
-rw-r--r--kgeography/src/divisioncapitalasker.cpp6
-rw-r--r--kgeography/src/divisioncapitalasker.h2
-rw-r--r--kgeography/src/divisionflagasker.cpp6
-rw-r--r--kgeography/src/divisionflagasker.h2
-rw-r--r--kgeography/src/flagdivisionasker.cpp4
-rw-r--r--kgeography/src/flagdivisionasker.h2
-rw-r--r--kgeography/src/kgeography.cpp44
-rw-r--r--kgeography/src/kgeography.h1
-rw-r--r--kgeography/src/map.cpp14
-rw-r--r--kgeography/src/map.h4
-rw-r--r--kgeography/src/mapasker.cpp20
-rw-r--r--kgeography/src/mapasker.h5
-rw-r--r--kgeography/src/mapchooser.cpp8
-rw-r--r--kgeography/src/mapchooser.h3
-rw-r--r--kgeography/src/mapparser.cpp42
-rw-r--r--kgeography/src/mapparser.h4
-rw-r--r--kgeography/src/mapsdatatranslation.cpp24
-rw-r--r--kgeography/src/mapwidget.cpp22
-rw-r--r--kgeography/src/mapwidget.h9
-rw-r--r--kgeography/src/mypopup.cpp10
-rw-r--r--kgeography/src/mypopup.h5
-rw-r--r--kgeography/src/popupmanager.cpp4
-rw-r--r--kgeography/src/popupmanager.h5
37 files changed, 160 insertions, 152 deletions
diff --git a/kgeography/Changelog b/kgeography/Changelog
index f54c280c..c4c23b7d 100644
--- a/kgeography/Changelog
+++ b/kgeography/Changelog
@@ -88,7 +88,7 @@
* RightWidget is really LeftWidget ¬.¬
* There is no need to store p_rightWidget as a class member
* Bump version to 0.2.1
- * Improve layouting of mapasker
+ * Improve tqlayouting of mapasker
* Make the scrollbar work also when clicking on the arrows
(sliderMoved -> valueChanged)
* Fix resizing bug in mapWidget that showed a inexistant part of the
diff --git a/kgeography/data/africa.kgm b/kgeography/data/africa.kgm
index a5654132..718997b6 100644
--- a/kgeography/data/africa.kgm
+++ b/kgeography/data/africa.kgm
@@ -138,7 +138,7 @@
</color>
</division>
<division>
- <name>Democratic Republic of the Congo</name>
+ <name>Detqmocratic Republic of the Congo</name>
<flag>congo_kinshasa.png</flag>
<capital>Kinshasa</capital>
<color>
diff --git a/kgeography/data/world.kgm b/kgeography/data/world.kgm
index 7d1701d7..2acca4f0 100644
--- a/kgeography/data/world.kgm
+++ b/kgeography/data/world.kgm
@@ -111,7 +111,7 @@
</color>
</division>
<division>
- <name>Democratic Republic of the Congo</name>
+ <name>Detqmocratic Republic of the Congo</name>
<flag>congo_kinshasa.png</flag>
<capital>Kinshasa</capital>
<color>
@@ -1730,7 +1730,7 @@
</color>
</division>
<division>
- <name>Democratic People's Republic of Korea</name>
+ <name>Detqmocratic People's Republic of Korea</name>
<flag>nkorea.png</flag>
<capital>Pyeongyang</capital>
<color>
diff --git a/kgeography/src/answer.cpp b/kgeography/src/answer.cpp
index f4931df3..428ceb20 100644
--- a/kgeography/src/answer.cpp
+++ b/kgeography/src/answer.cpp
@@ -93,7 +93,7 @@ void userAnswer::putWidgets(TQWidget *w, TQGridLayout *lay, int row) const
TQLabel *l;
l = new TQLabel(w);
l -> setPixmap(v -> toImage());
- l -> setAlignment(Qt::AlignHCenter);
+ l -> tqsetAlignment(TQt::AlignHCenter);
l -> setMargin(KDialog::marginHint() / 2);
widgets[i] = l;
}
@@ -104,8 +104,8 @@ void userAnswer::putWidgets(TQWidget *w, TQGridLayout *lay, int row) const
if (!p_correct)
{
TQColor back, fore;
- back = widgets[0] -> colorGroup().highlight();
- fore = widgets[0] -> colorGroup().highlightedText();
+ back = widgets[0] -> tqcolorGroup().highlight();
+ fore = widgets[0] -> tqcolorGroup().highlightedText();
for (int i = 0; i < 3; i++)
{
widgets[i] -> setPaletteBackgroundColor(back);
diff --git a/kgeography/src/answersdialog.cpp b/kgeography/src/answersdialog.cpp
index c6d9d292..fcc219dc 100644
--- a/kgeography/src/answersdialog.cpp
+++ b/kgeography/src/answersdialog.cpp
@@ -17,7 +17,7 @@
#include "answer.h"
#include "answersdialog.h"
-answersDialog::answersDialog(TQWidget *parent, const TQValueVector<userAnswer> &userAnswers, TQString question, int correctAnswers) : KDialogBase(parent, 0, true, i18n("Your Answers Were"), Ok)
+answersDialog::answersDialog(TQWidget *tqparent, const TQValueVector<userAnswer> &userAnswers, TQString question, int correctAnswers) : KDialogBase(tqparent, 0, true, i18n("Your Answers Were"), Ok)
{
TQLabel *l1, *l2, *l3;
TQFont boldFont, bigFont;
@@ -40,7 +40,7 @@ answersDialog::answersDialog(TQWidget *parent, const TQValueVector<userAnswer> &
bigFont.setPointSize(24);
l1 = new TQLabel(question, p_container);
l1 -> setFont(bigFont);
- l1 -> setAlignment(Qt::AlignCenter);
+ l1 -> tqsetAlignment(TQt::AlignCenter);
lay->addMultiCellWidget(l1, 0, 0, 0, 4);
// Headers
@@ -67,8 +67,8 @@ answersDialog::answersDialog(TQWidget *parent, const TQValueVector<userAnswer> &
lay -> addItem(new TQSpacerItem(20, 20, TQSizePolicy::Fixed, TQSizePolicy::Fixed), totalAnswers + 3, 2);
- l1 = new TQLabel(i18n("You answered correctly %1 out of %2 questions.").arg(correctAnswers).arg(totalAnswers), p_container);
- l1 -> setAlignment(Qt::AlignCenter);
+ l1 = new TQLabel(i18n("You answered correctly %1 out of %2 questions.").tqarg(correctAnswers).tqarg(totalAnswers), p_container);
+ l1 -> tqsetAlignment(TQt::AlignCenter);
lay->addMultiCellWidget(l1, totalAnswers + 4, totalAnswers + 4, 0, 4);
p_sv -> addChild(p_container);
diff --git a/kgeography/src/answersdialog.h b/kgeography/src/answersdialog.h
index 1b3b754d..60686923 100644
--- a/kgeography/src/answersdialog.h
+++ b/kgeography/src/answersdialog.h
@@ -23,7 +23,7 @@ class userAnswer;
class answersDialog : public KDialogBase
{
public:
- answersDialog(TQWidget *parent, const TQValueVector<userAnswer> &userAnswers, TQString question, int correctAnswers);
+ answersDialog(TQWidget *tqparent, const TQValueVector<userAnswer> &userAnswers, TQString question, int correctAnswers);
protected:
void showEvent(TQShowEvent *e);
diff --git a/kgeography/src/askwidget.cpp b/kgeography/src/askwidget.cpp
index 87d1d09a..cd0d07a4 100644
--- a/kgeography/src/askwidget.cpp
+++ b/kgeography/src/askwidget.cpp
@@ -16,12 +16,12 @@
#include "askwidget.h"
#include "map.h"
-askWidget::askWidget(TQWidget *parent, KGmap *m, TQWidget *w, uint count, bool showLabel) : TQWidget(parent), p_map(m), p_count(count)
+askWidget::askWidget(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count, bool showLabel) : TQWidget(tqparent), p_map(m), p_count(count)
{
if (showLabel)
{
p_answers = new TQLabel(w);
- p_answers -> setAlignment(AlignTop | AlignHCenter);
+ p_answers -> tqsetAlignment(AlignTop | AlignHCenter);
resetAnswers();
p_answers -> show();
}
@@ -72,7 +72,7 @@ void askWidget::nextQuestion()
if (p_asked.count() < p_count)
{
aux = p_map -> getRandomDivision(isClickOnDivision());
- while (p_asked.find(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision());
+ while (p_asked.tqfind(aux) != p_asked.end()) aux = p_map -> getRandomDivision(isClickOnDivision());
p_asked << aux;
nextQuestionHook(aux);
}
@@ -98,7 +98,7 @@ void askWidget::resetAnswers()
void askWidget::updateLabel()
{
- p_answers -> setText(i18n("Correct answers: %1/%2").arg(p_correctAnswers).arg(p_correctAnswers + p_incorrectAnswers));
+ p_answers -> setText(i18n("Correct answers: %1/%2").tqarg(p_correctAnswers).tqarg(p_correctAnswers + p_incorrectAnswers));
}
#include "askwidget.moc"
diff --git a/kgeography/src/askwidget.h b/kgeography/src/askwidget.h
index 49c2ea2b..2627296c 100644
--- a/kgeography/src/askwidget.h
+++ b/kgeography/src/askwidget.h
@@ -20,11 +20,12 @@ class TQLabel;
class KGmap;
-class askWidget : public QWidget
+class askWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- askWidget(TQWidget *parent, KGmap *m, TQWidget *w, uint count, bool showLabel = true);
+ askWidget(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count, bool showLabel = true);
virtual ~askWidget();
virtual TQString getQuestionHook() const = 0;
diff --git a/kgeography/src/boxasker.cpp b/kgeography/src/boxasker.cpp
index dc6d526d..5774ba10 100644
--- a/kgeography/src/boxasker.cpp
+++ b/kgeography/src/boxasker.cpp
@@ -23,7 +23,7 @@
#include "boxasker.h"
#include "map.h"
-boxAsker::boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : askWidget(parent, m, w, count)
+boxAsker::boxAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : askWidget(tqparent, m, w, count)
{
p_lay = new TQVBoxLayout(this);
@@ -33,7 +33,7 @@ boxAsker::boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : askWid
for(int i = 0; i < 4; i++)
{
p_rb[i] = new TQRadioButton(bg);
- p_rb[i]->setFocusPolicy(TQWidget::StrongFocus);
+ p_rb[i]->setFocusPolicy(TQ_StrongFocus);
}
p_accept = new KPushButton(this);
@@ -55,7 +55,7 @@ void boxAsker::setQuestion(const TQString &q)
void boxAsker::keyReleaseEvent(TQKeyEvent *e)
{
- if (e -> key() == Qt::Key_Return || e -> key() == Qt::Key_Enter) checkAnswer();
+ if (e -> key() == TQt::Key_Return || e -> key() == TQt::Key_Enter) checkAnswer();
else askWidget::keyReleaseEvent(e);
}
@@ -80,7 +80,7 @@ void boxAsker::nextQuestionHook(const TQString &division)
{
// false because boxaskers never are clickOnDivision
otherDivision = p_map -> getRandomDivision(false);
- while (auxList.find(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false);
+ while (auxList.tqfind(otherDivision) != auxList.end()) otherDivision = p_map -> getRandomDivision(false);
if (i == p_position) i++;
if (i < 4 && nextBoxAskerQuestionHook(otherDivision, i, false)) i++;
auxList << otherDivision;
diff --git a/kgeography/src/boxasker.h b/kgeography/src/boxasker.h
index e6171d85..d4b2079a 100644
--- a/kgeography/src/boxasker.h
+++ b/kgeography/src/boxasker.h
@@ -22,8 +22,9 @@ class TQVBoxLayout;
class boxAsker : public askWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- boxAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count);
+ boxAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count);
~boxAsker();
protected:
diff --git a/kgeography/src/capitaldivisionasker.cpp b/kgeography/src/capitaldivisionasker.cpp
index ffea1407..cd4c8a44 100644
--- a/kgeography/src/capitaldivisionasker.cpp
+++ b/kgeography/src/capitaldivisionasker.cpp
@@ -15,7 +15,7 @@
#include "capitaldivisionasker.h"
#include "map.h"
-capitalDivisionAsker::capitalDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count)
+capitalDivisionAsker::capitalDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count)
{
init();
}
@@ -34,11 +34,11 @@ bool capitalDivisionAsker::nextBoxAskerQuestionHook(const TQString &division, in
{
TQString capitalName = i18n(p_map -> getFileName().utf8(), p_capital.utf8());
TQString text = i18n("%1 is the capital of...");
- setQuestion(text.arg(capitalName));
+ setQuestion(text.tqarg(capitalName));
}
else
{
- TQString s = TQString("%1 is the capital of...").arg(p_capital);
+ TQString s = TQString("%1 is the capital of...").tqarg(p_capital);
setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8()));
}
p_rb[i] -> setText(i18n(p_map -> getFileName().utf8(), division.utf8()));
diff --git a/kgeography/src/capitaldivisionasker.h b/kgeography/src/capitaldivisionasker.h
index 3d8a5e1c..8d05b1cf 100644
--- a/kgeography/src/capitaldivisionasker.h
+++ b/kgeography/src/capitaldivisionasker.h
@@ -18,7 +18,7 @@ class TQLabel;
class capitalDivisionAsker : public boxAsker
{
public:
- capitalDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count);
+ capitalDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count);
protected:
bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer);
diff --git a/kgeography/src/division.cpp b/kgeography/src/division.cpp
index 7ef70353..c190fac5 100644
--- a/kgeography/src/division.cpp
+++ b/kgeography/src/division.cpp
@@ -16,7 +16,7 @@ division::division()
{
p_canAskAlways = true;
p_canAskClickDivision = true;
- p_flagFile = TQString::null;
+ p_flagFile = TQString();
}
bool division::canAsk(bool clickDivisionMode) const
@@ -30,7 +30,7 @@ TQString division::getName() const
return p_name;
}
-QRgb division::getRGB() const
+TQRgb division::getRGB() const
{
return p_color;
}
@@ -72,7 +72,7 @@ void division::setName(const TQString &name)
void division::setRGB(int r, int g, int b)
{
- p_color = qRgb(r, g, b);
+ p_color = tqRgb(r, g, b);
}
bool division::setFlagFile(const TQString &path)
diff --git a/kgeography/src/division.h b/kgeography/src/division.h
index 69b347f3..7014fd0e 100644
--- a/kgeography/src/division.h
+++ b/kgeography/src/division.h
@@ -21,7 +21,7 @@ class division
bool canAsk(bool clickDivisionMode) const;
TQString getName() const;
- QRgb getRGB() const;
+ TQRgb getRGB() const;
TQString getFlagFile() const;
TQString getCapital() const;
@@ -33,7 +33,7 @@ class division
private:
TQString p_name, p_flagFile, p_capital;
- QRgb p_color;
+ TQRgb p_color;
bool p_canAskAlways, p_canAskClickDivision;
};
diff --git a/kgeography/src/divisioncapitalasker.cpp b/kgeography/src/divisioncapitalasker.cpp
index b87437a2..5614efa0 100644
--- a/kgeography/src/divisioncapitalasker.cpp
+++ b/kgeography/src/divisioncapitalasker.cpp
@@ -15,7 +15,7 @@
#include "divisioncapitalasker.h"
#include "map.h"
-divisionCapitalAsker::divisionCapitalAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count)
+divisionCapitalAsker::divisionCapitalAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count)
{
init();
}
@@ -30,11 +30,11 @@ bool divisionCapitalAsker::nextBoxAskerQuestionHook(const TQString &division, in
{
TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8());
TQString text = i18n("The capital of %1 is...");
- setQuestion(text.arg(divisionName));
+ setQuestion(text.tqarg(divisionName));
}
else
{
- TQString s = TQString("The capital of %1 is...").arg(division);
+ TQString s = TQString("The capital of %1 is...").tqarg(division);
setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8()));
}
p_currentAnswer.setQuestion(i18n(p_map -> getFileName().utf8(), division.utf8()));
diff --git a/kgeography/src/divisioncapitalasker.h b/kgeography/src/divisioncapitalasker.h
index e4bc5514..8ec236e9 100644
--- a/kgeography/src/divisioncapitalasker.h
+++ b/kgeography/src/divisioncapitalasker.h
@@ -16,7 +16,7 @@
class divisionCapitalAsker : public boxAsker
{
public:
- divisionCapitalAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count);
+ divisionCapitalAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count);
protected:
bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer);
diff --git a/kgeography/src/divisionflagasker.cpp b/kgeography/src/divisionflagasker.cpp
index 79641b25..ef90033d 100644
--- a/kgeography/src/divisionflagasker.cpp
+++ b/kgeography/src/divisionflagasker.cpp
@@ -16,7 +16,7 @@
#include "divisionflagasker.h"
#include "map.h"
-divisionFlagAsker::divisionFlagAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count)
+divisionFlagAsker::divisionFlagAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count)
{
init();
}
@@ -33,11 +33,11 @@ bool divisionFlagAsker::nextBoxAskerQuestionHook(const TQString &division, int i
{
TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8());
TQString text = i18n("The flag of %1 is...");
- setQuestion(text.arg(divisionName));
+ setQuestion(text.tqarg(divisionName));
}
else
{
- TQString s = TQString("The flag of %1 is...").arg(division);
+ TQString s = TQString("The flag of %1 is...").tqarg(division);
setQuestion(i18n(p_map -> getFileName().utf8(), s.utf8()));
}
p_currentAnswer.setCorrectAnswer(im);
diff --git a/kgeography/src/divisionflagasker.h b/kgeography/src/divisionflagasker.h
index 5e1eaef2..71d64149 100644
--- a/kgeography/src/divisionflagasker.h
+++ b/kgeography/src/divisionflagasker.h
@@ -16,7 +16,7 @@
class divisionFlagAsker : public boxAsker
{
public:
- divisionFlagAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count);
+ divisionFlagAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count);
protected:
bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer);
diff --git a/kgeography/src/flagdivisionasker.cpp b/kgeography/src/flagdivisionasker.cpp
index f6c305ab..92f0b039 100644
--- a/kgeography/src/flagdivisionasker.cpp
+++ b/kgeography/src/flagdivisionasker.cpp
@@ -17,7 +17,7 @@
#include "flagdivisionasker.h"
#include "map.h"
-flagDivisionAsker::flagDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count) : boxAsker(parent, m, w, count)
+flagDivisionAsker::flagDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count) : boxAsker(tqparent, m, w, count)
{
p_flag = new TQWidget(this);
p_lay -> insertWidget(0, p_flag);
@@ -31,7 +31,7 @@ bool flagDivisionAsker::nextBoxAskerQuestionHook(const TQString &division, int i
{
// we put the flag image
TQImage image(p_map -> getDivisionFlagFile(division));
- p_flag -> setPaletteBackgroundPixmap(image);
+ p_flag -> setPaletteBackgroundPixmap(TQPixmap(image));
p_flag -> setFixedSize(image.size());
p_currentAnswer.setQuestion(image.smoothScale(image.width()/5, image.height()/5));
diff --git a/kgeography/src/flagdivisionasker.h b/kgeography/src/flagdivisionasker.h
index dfd4f662..5d826835 100644
--- a/kgeography/src/flagdivisionasker.h
+++ b/kgeography/src/flagdivisionasker.h
@@ -16,7 +16,7 @@
class flagDivisionAsker : public boxAsker
{
public:
- flagDivisionAsker(TQWidget *parent, KGmap *m, TQWidget *w, uint count);
+ flagDivisionAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, uint count);
protected:
bool nextBoxAskerQuestionHook(const TQString &division, int i, bool isAnswer);
diff --git a/kgeography/src/kgeography.cpp b/kgeography/src/kgeography.cpp
index 33740e66..de850afb 100644
--- a/kgeography/src/kgeography.cpp
+++ b/kgeography/src/kgeography.cpp
@@ -45,7 +45,7 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi
TQVBox *p_leftWidget = new TQVBox(p_bigWidget);
p_currentMap = new TQLabel(p_leftWidget);
- p_currentMap -> setAlignment(AlignCenter);
+ p_currentMap -> tqsetAlignment(AlignCenter);
p_consult = new KPushButton(i18n("&Browse Map"), p_leftWidget);
TQWhatsThis::add(p_consult, i18n("In this section left click on any part of the map to learn about the divisions" ));
p_askMap = new KPushButton(i18n("&Click Division in Map..."), p_leftWidget);
@@ -59,22 +59,22 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi
p_askDivisionFlags = new KPushButton(i18n("G&uess Flag of Division..."), p_leftWidget);
TQWhatsThis::add(p_askDivisionFlags, i18n("In this quiz you have to guess the flag of a division given its name"));
p_underLeftWidget = new TQVBox(p_leftWidget);
- p_underLeftWidget -> layout() -> setSpacing(KDialog::spacingHint());
- p_underLeftWidget -> layout() -> setMargin(KDialog::marginHint());
+ p_underLeftWidget -> tqlayout() -> setSpacing(KDialog::spacingHint());
+ p_underLeftWidget -> tqlayout() -> setMargin(KDialog::marginHint());
p_leftWidget -> setStretchFactor(p_underLeftWidget, 1);
setCentralWidget(p_bigWidget);
- connect(p_consult, TQT_SIGNAL(clicked()), this, TQT_SLOT(consult()));
- connect(p_askMap, TQT_SIGNAL(clicked()), this, TQT_SLOT(askMap()));
- connect(p_askCapitalDivisions, TQT_SIGNAL(clicked()), this, TQT_SLOT(askCapitalDivisions()));
- connect(p_askDivisionCapitals, TQT_SIGNAL(clicked()), this, TQT_SLOT(askDivisionCapitals()));
- connect(p_askFlagDivisions, TQT_SIGNAL(clicked()), this, TQT_SLOT(askFlagDivisions()));
- connect(p_askDivisionFlags, TQT_SIGNAL(clicked()), this, TQT_SLOT(askDivisionFlags()));
+ connect(p_consult, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(consult()));
+ connect(p_askMap, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askMap()));
+ connect(p_askCapitalDivisions, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askCapitalDivisions()));
+ connect(p_askDivisionCapitals, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askDivisionCapitals()));
+ connect(p_askFlagDivisions, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askFlagDivisions()));
+ connect(p_askDivisionFlags, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(askDivisionFlags()));
- KAction *a = KStdAction::open(this, TQT_SLOT(openMap()), actionCollection(), "openMap");
+ KAction *a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(openMap()), actionCollection(), "openMap");
a -> setText(i18n("&Open Map..."));
- KStdAction::quit(this, TQT_SLOT(close()), actionCollection(), "quit");
+ KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection(), "quit");
p_zoom = new KToggleAction(i18n("&Zoom"), "viewmagfit", 0, 0, 0, actionCollection(), "zoom_select");
p_zoom -> setEnabled(false);
@@ -85,7 +85,7 @@ kgeography::kgeography() : KMainWindow(), p_firstShow(true), p_mustShowResultsDi
p_move = new KToggleAction(i18n("&Move"), "move", 0, 0, 0, actionCollection(), "move");
p_move -> setEnabled(false);
- new KAction(i18n("Disclaimer"), 0, this, TQT_SLOT(disclaimer()), actionCollection(), "disclaimer");
+ new KAction(i18n("Disclaimer"), 0, TQT_TQOBJECT(this), TQT_SLOT(disclaimer()), actionCollection(), "disclaimer");
setupGUI(Keys | ToolBar | Save | Create);
@@ -113,7 +113,7 @@ void kgeography::showEvent(TQShowEvent *)
}
else
{
- KMessageBox::error(this, i18n("Could not open last used map. Error parsing %1: %2").arg(file).arg(reader.getError()));
+ KMessageBox::error(this, i18n("Could not open last used map. Error parsing %1: %2").tqarg(file).tqarg(reader.getError()));
delete reader.getMap();
openMap();
}
@@ -132,7 +132,7 @@ void kgeography::showEvent(TQShowEvent *)
}
// if anyone can explain why with the slot works and now without
// i'll be glad to learn
- TQTimer::singleShot(0, this, TQT_SLOT(resizeMainWindow()));
+ TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(resizeMainWindow()));
// resizeMainWindow();
p_firstShow = false;
@@ -169,7 +169,7 @@ void kgeography::askCapitalDivisions()
int i;
bool ok;
showResultsDialog();
- i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
+ i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
if (ok)
{
removeOldAskWidget();
@@ -185,7 +185,7 @@ void kgeography::askDivisionCapitals()
int i;
bool ok;
showResultsDialog();
- i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
+ i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
if (ok)
{
removeOldAskWidget();
@@ -201,7 +201,7 @@ void kgeography::askMap()
int i;
bool ok;
showResultsDialog();
- i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(true)), 1, 1, p_map -> count(true), 1, &ok);
+ i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(true)), 1, 1, p_map -> count(true), 1, &ok);
if (ok)
{
removeOldAskWidget();
@@ -219,7 +219,7 @@ void kgeography::askFlagDivisions()
int i;
bool ok;
showResultsDialog();
- i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
+ i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
if (ok)
{
removeOldAskWidget();
@@ -235,7 +235,7 @@ void kgeography::askDivisionFlags()
int i;
bool ok;
showResultsDialog();
- i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").arg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
+ i = KInputDialog::getInteger(i18n("Number of Questions"), i18n("How many questions do you want? (1 to %1)").tqarg(p_map -> count(false)), 1, 1, p_map -> count(false), 1, &ok);
if (ok)
{
removeOldAskWidget();
@@ -275,7 +275,7 @@ void kgeography::putAskWidget()
connect(p_askWidget, TQT_SIGNAL(setMoveActionEnabled(bool)), p_move, TQT_SLOT(setEnabled(bool)));
connect(p_askWidget, TQT_SIGNAL(setMoveActionChecked(bool)), p_move, TQT_SLOT(setChecked(bool)));
connect(p_move, TQT_SIGNAL(toggled(bool)), p_askWidget, TQT_SLOT(setMovement(bool)));
- connect(p_askWidget, TQT_SIGNAL(questionsEnded()), this, TQT_SLOT(showResultsDialog()));
+ connect(p_askWidget, TQT_SIGNAL(questionsEnded()), TQT_TQOBJECT(this), TQT_SLOT(showResultsDialog()));
}
void kgeography::setMap(KGmap *m)
@@ -292,11 +292,11 @@ void kgeography::setMap(KGmap *m)
{
TQString mapName = i18n(p_map -> getFileName().utf8(), p_map -> getName().utf8());
TQString text = i18n("<qt>Current map:<br><b>%1<b></qt>");
- p_currentMap -> setText(text.arg(mapName));
+ p_currentMap -> setText(text.tqarg(mapName));
}
else
{
- TQString s = TQString("<qt>Current map:<br><b>%1</b></qt>").arg(p_map -> getName());
+ TQString s = TQString("<qt>Current map:<br><b>%1</b></qt>").tqarg(p_map -> getName());
p_currentMap -> setText(i18n(p_map -> getFileName().utf8(), s.utf8()));
}
p_consult -> setEnabled(true);
diff --git a/kgeography/src/kgeography.h b/kgeography/src/kgeography.h
index fb66525a..0be945b7 100644
--- a/kgeography/src/kgeography.h
+++ b/kgeography/src/kgeography.h
@@ -27,6 +27,7 @@ class askWidget;
class kgeography : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
kgeography();
~kgeography();
diff --git a/kgeography/src/map.cpp b/kgeography/src/map.cpp
index 9cef054f..57d79e9b 100644
--- a/kgeography/src/map.cpp
+++ b/kgeography/src/map.cpp
@@ -26,7 +26,7 @@ KGmap::KGmap()
KGmap::~KGmap()
{
- TQMap<QRgb, division*>::iterator it;
+ TQMap<TQRgb, division*>::iterator it;
it = p_colorMap.begin();
while (it != p_colorMap.end())
{
@@ -39,8 +39,8 @@ KGmap::~KGmap()
bool KGmap::addDivision(division *c)
{
bool b;
- if (p_nameMap.find(c -> getName()) == p_nameMap.end() &&
- p_colorMap.find(c -> getRGB()) == p_colorMap.end())
+ if (p_nameMap.tqfind(c -> getName()) == p_nameMap.end() &&
+ p_colorMap.tqfind(c -> getRGB()) == p_colorMap.end())
{
p_colorMap.insert(c -> getRGB(), c);
p_nameMap.insert(c -> getName(), c);
@@ -125,11 +125,11 @@ TQString KGmap::getRandomDivision(bool clickDivisionMode) const
else return aux[i] -> getName();
}
-TQString KGmap::getWhatIs(QRgb c, bool all) const
+TQString KGmap::getWhatIs(TQRgb c, bool all) const
{
// this is only asked from mapasker.cpp hence the true in canAsk
- TQMap<QRgb, division*>::const_iterator it;
- it = p_colorMap.find(c);
+ TQMap<TQRgb, division*>::const_iterator it;
+ it = p_colorMap.tqfind(c);
if (it == p_colorMap.end()) return "nothing";
else
{
@@ -142,7 +142,7 @@ TQString KGmap::getWhatIs(QRgb c, bool all) const
TQColor KGmap::getColor(const TQString &s) const
{
TQValueList<division*> divisions;
- TQValueList<QRgb> colors;
+ TQValueList<TQRgb> colors;
division *d;
int i;
diff --git a/kgeography/src/map.h b/kgeography/src/map.h
index 7f606320..d2ed065e 100644
--- a/kgeography/src/map.h
+++ b/kgeography/src/map.h
@@ -38,11 +38,11 @@ class KGmap
TQString getMapFile() const;
TQString getName() const;
TQString getRandomDivision(bool clickDivisionMode) const;
- TQString getWhatIs(QRgb c, bool all) const;
+ TQString getWhatIs(TQRgb c, bool all) const;
TQColor getColor(const TQString &s) const;
private:
- TQMap<QRgb, division*> p_colorMap;
+ TQMap<TQRgb, division*> p_colorMap;
TQMap<TQString, division*> p_nameMap;
TQString p_name, p_file, p_mapFile;
diff --git a/kgeography/src/mapasker.cpp b/kgeography/src/mapasker.cpp
index 27c7c83d..2fb7c380 100644
--- a/kgeography/src/mapasker.cpp
+++ b/kgeography/src/mapasker.cpp
@@ -20,16 +20,16 @@
#include "mapasker.h"
#include "mapwidget.h"
-mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint count) : askWidget(parent, m, w, count, asker), p_popupManager(this), p_asker(asker), p_firstShow(true)
+mapAsker::mapAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, bool asker, uint count) : askWidget(tqparent, m, w, count, asker), p_popupManager(this), p_asker(asker), p_firstShow(true)
{
TQGridLayout *lay = new TQGridLayout(this, 2, 2);
p_mapWidget = new mapWidget(this);
lay -> addWidget(p_mapWidget, 0, 0);
- p_hsb = new TQScrollBar(Horizontal, this);
+ p_hsb = new TQScrollBar(Qt::Horizontal, this);
lay -> addWidget(p_hsb, 1, 0);
- p_vsb = new TQScrollBar(Vertical, this);
+ p_vsb = new TQScrollBar(Qt::Vertical, this);
lay -> addWidget(p_vsb, 0, 1);
lay -> setRowStretch(2, 1);
@@ -37,7 +37,7 @@ mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint cou
p_shouldClearPopup = false;
- connect(p_mapWidget, TQT_SIGNAL(clicked(QRgb, const TQPoint&)), this, TQT_SLOT(handleMapClick(QRgb, const TQPoint&)));
+ connect(p_mapWidget, TQT_SIGNAL(clicked(TQRgb, const TQPoint&)), this, TQT_SLOT(handleMapClick(TQRgb, const TQPoint&)));
connect(p_mapWidget, TQT_SIGNAL(setMoveActionChecked(bool)), this, TQT_SIGNAL(setMoveActionChecked(bool)));
connect(p_mapWidget, TQT_SIGNAL(setZoomActionChecked(bool)), this, TQT_SIGNAL(setZoomActionChecked(bool)));
connect(p_mapWidget, TQT_SIGNAL(setMoveActionEnabled(bool)), this, TQT_SIGNAL(setMoveActionEnabled(bool)));
@@ -51,9 +51,9 @@ mapAsker::mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint cou
if (asker)
{
- TQBoxLayout *vbl = dynamic_cast<TQBoxLayout*>(w -> layout());
+ TQBoxLayout *vbl = dynamic_cast<TQBoxLayout*>(w -> tqlayout());
p_next = new TQLabel(w);
- p_next -> setAlignment(AlignTop | AlignHCenter);
+ p_next -> tqsetAlignment(AlignTop | AlignHCenter);
p_fill = new TQWidget(w);
p_fill -> show();
vbl -> setStretchFactor(p_fill, 1);
@@ -100,11 +100,11 @@ void mapAsker::setOriginalZoom()
p_popupManager.clear();
}
-void mapAsker::handleMapClick(QRgb c, const TQPoint &p)
+void mapAsker::handleMapClick(TQRgb c, const TQPoint &p)
{
TQString aux, cap;
aux = p_map -> getWhatIs(c, !p_asker);
- if (aux == "nothing") KMessageBox::error(this, i18n("You have found a bug in a map. Please contact the author and tell the %1 map has nothing associated to color %2,%3,%4.").arg(p_map -> getFile()).arg(qRed(c)).arg(qGreen(c)).arg(qBlue(c)));
+ if (aux == "nothing") KMessageBox::error(this, i18n("You have found a bug in a map. Please contact the author and tell the %1 map has nothing associated to color %2,%3,%4.").tqarg(p_map -> getFile()).tqarg(tqRed(c)).tqarg(tqGreen(c)).tqarg(tqBlue(c)));
else if (p_shouldClearPopup)
{
p_popupManager.clear();
@@ -175,11 +175,11 @@ void mapAsker::nextQuestionHook(const TQString &division)
{
TQString divisionName = i18n(p_map -> getFileName().utf8(), division.utf8());
TQString text = i18n("Please click on:\n%1");
- p_next -> setText(text.arg(divisionName));
+ p_next -> setText(text.tqarg(divisionName));
}
else
{
- TQString s = TQString("Please click on:\n%1").arg(division);
+ TQString s = TQString("Please click on:\n%1").tqarg(division);
p_next -> setText(i18n(p_map -> getFileName().utf8(), s.utf8()));
}
p_currentAnswer.setQuestion(i18n(p_map -> getFileName().utf8(), division.utf8()));
diff --git a/kgeography/src/mapasker.h b/kgeography/src/mapasker.h
index 4843299a..2ce5d6f2 100644
--- a/kgeography/src/mapasker.h
+++ b/kgeography/src/mapasker.h
@@ -25,8 +25,9 @@ class mapWidget;
class mapAsker : public askWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- mapAsker(TQWidget *parent, KGmap *m, TQWidget *w, bool asker, uint count = 0);
+ mapAsker(TQWidget *tqparent, KGmap *m, TQWidget *w, bool asker, uint count = 0);
~mapAsker();
TQSize mapSize() const;
@@ -45,7 +46,7 @@ Q_OBJECT
void setOriginalZoom();
private slots:
- void handleMapClick(QRgb c, const TQPoint &p);
+ void handleMapClick(TQRgb c, const TQPoint &p);
void setScrollBarsPosition(int x, int y);
void setScrollBarsVisibleSize(int w, int h);
void setScrollBarsMaximumSize(int w, int h);
diff --git a/kgeography/src/mapchooser.cpp b/kgeography/src/mapchooser.cpp
index 11410d39..1920e328 100644
--- a/kgeography/src/mapchooser.cpp
+++ b/kgeography/src/mapchooser.cpp
@@ -19,7 +19,7 @@
#include "mapchooser.h"
-mapChooser::mapChooser(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Choose Map to Use"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true)
+mapChooser::mapChooser(TQWidget *tqparent) : KDialogBase(tqparent, 0, true, i18n("Choose Map to Use"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true)
{
TQHBox *mainHB;
TQStringList list;
@@ -36,7 +36,7 @@ mapChooser::mapChooser(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Ch
{
if (!p_reader.parseMap(*it))
{
- KMessageBox::error(this, i18n("Error parsing %1: %2").arg(*it).arg(p_reader.getError()));
+ KMessageBox::error(this, i18n("Error parsing %1: %2").tqarg(*it).tqarg(p_reader.getError()));
delete p_reader.getMap();
}
else
@@ -85,8 +85,8 @@ void mapChooser::putImage(const TQString &mapName)
KGmap *m;
m = p_maps[mapName];
TQImage image(m -> getMapFile());
- image = image.smoothScale(300, 225, TQImage::ScaleMin);
- p_image -> setPaletteBackgroundPixmap(image);
+ image = image.smoothScale(300, 225, TQ_ScaleMin);
+ p_image -> setPaletteBackgroundPixmap(TQPixmap(image));
p_image -> setFixedSize(image.size());
}
diff --git a/kgeography/src/mapchooser.h b/kgeography/src/mapchooser.h
index a95d16ba..502adc4b 100644
--- a/kgeography/src/mapchooser.h
+++ b/kgeography/src/mapchooser.h
@@ -21,8 +21,9 @@
class mapChooser : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- mapChooser(TQWidget *parent);
+ mapChooser(TQWidget *tqparent);
~mapChooser();
KGmap *getMap();
diff --git a/kgeography/src/mapparser.cpp b/kgeography/src/mapparser.cpp
index 8a4cf200..bf04f0dc 100644
--- a/kgeography/src/mapparser.cpp
+++ b/kgeography/src/mapparser.cpp
@@ -25,19 +25,19 @@ bool mapReader::parseMap(const TQString &path)
TQString aux;
p_map = new KGmap();
p_map -> setFile(path);
- aux = path.left(path.findRev('/') + 1); // aux = path but without the file name
+ aux = path.left(path.tqfindRev('/') + 1); // aux = path but without the file name
mapParser handler(p_map, aux);
TQFile xmlFile(path);
if (xmlFile.exists())
{
- TQXmlInputSource source(&xmlFile);
+ TQXmlInputSource source(TQT_TQIODEVICE(&xmlFile));
setContentHandler(&handler);
if (parse(source)) return true;
p_error = handler.errorString();
}
else
{
- p_error = i18n("%1 does not exist.").arg(path);
+ p_error = i18n("%1 does not exist.").tqarg(path);
}
return false;
}
@@ -74,19 +74,19 @@ bool mapParser::startElement(const TQString&, const TQString &name, const TQStri
if (prev.isEmpty())
{
b = name == "map";
- if (!b) p_error = i18n("The map description file should begin with the %1 tag").arg("map");
+ if (!b) p_error = i18n("The map description file should begin with the %1 tag").tqarg("map");
}
else if (prev == "map")
{
if (name != "mapFile" && name != "name" && name != "division")
{
b = false;
- p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4 and %5").arg(name).arg(prev).arg("mapFile").arg("name").arg("division");
+ p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4 and %5").tqarg(name).tqarg(prev).tqarg("mapFile").tqarg("name").tqarg("division");
}
else if ((name == "mapFile" && p_mapFileSet) || (name == "name" && p_mapNameSet))
{
b = false;
- p_error = i18n("%1 tag has already been set").arg(name);
+ p_error = i18n("%1 tag has already been set").tqarg(name);
}
p_colorSet = false;
if (name == "division")
@@ -102,21 +102,21 @@ bool mapParser::startElement(const TQString&, const TQString &name, const TQStri
prev == "ignore")
{
b = false;
- p_error = i18n("There can not be a tag inside %1 tag").arg(prev);
+ p_error = i18n("There can not be a tag inside %1 tag").tqarg(prev);
}
else if (prev == "division")
{
if (name != "color" && name != "name" && name != "ignore" && name != "flag" && name != "capital")
{
b = false;
- p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4, %5, %6 and %7").arg(name).arg(prev).arg("color").arg("name").arg("ignore").arg("capital").arg("flag");
+ p_error = i18n("%1 is not a valid tag inside tag %2. Valid tags are %3, %4, %5, %6 and %7").tqarg(name).tqarg(prev).tqarg("color").tqarg("name").tqarg("ignore").tqarg("capital").tqarg("flag");
}
else if ((name == "name" && p_divisionNameSet) || (name == "color" && p_colorSet) ||
(name == "ignore" && p_divisionIgnoreSet) || (name == "flag" && p_flagFileSet) ||
(name == "capital" && p_capitalSet))
{
b = false;
- p_error = i18n("%1 tag has already been set").arg(name);
+ p_error = i18n("%1 tag has already been set").tqarg(name);
}
p_red = -1;
p_green = -1;
@@ -146,7 +146,7 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &)
{
b = p_map -> setMapFile(p_path + p_contents);
p_mapFileSet = true;
- if (!b) p_error = i18n("File %1 does not exist").arg(p_path + p_contents);
+ if (!b) p_error = i18n("File %1 does not exist").tqarg(p_path + p_contents);
}
else if (aux == "division")
{
@@ -154,9 +154,9 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &)
b = p_divisionNameSet;
if (!b) p_error = i18n("There is a division without name");
b = b && p_map -> addDivision(p_division);
- if (!b) p_error = i18n("There is already either a division called %1 or a division with the same colors as %2").arg(p_division -> getName()).arg(p_division -> getName());
+ if (!b) p_error = i18n("There is already either a division called %1 or a division with the same colors as %2").tqarg(p_division -> getName()).tqarg(p_division -> getName());
b = b && (p_capitalSet || !p_division -> canAsk(false));
- if (!b) p_error = i18n("Division %1 has no capital").arg(p_division -> getName());
+ if (!b) p_error = i18n("Division %1 has no capital").tqarg(p_division -> getName());
}
else if (p_previousTags == ":map:division:name")
{
@@ -173,17 +173,17 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &)
if (p_red == -1)
{
b = false;
- p_error = i18n("Tag %1 has not the %2 tag.").arg("<color>").arg("<red>");
+ p_error = i18n("Tag %1 has not the %2 tag.").tqarg("<color>").tqarg("<red>");
}
else if (p_green == -1)
{
b = false;
- p_error = i18n("Tag %1 has not the %2 tag.").arg("<color>").arg("<green>");
+ p_error = i18n("Tag %1 has not the %2 tag.").tqarg("<color>").tqarg("<green>");
}
else if (p_blue == -1)
{
b = false;
- p_error = i18n("Tag %1 has not the %2 tag.").arg("<color>").arg("<blue>");
+ p_error = i18n("Tag %1 has not the %2 tag.").tqarg("<color>").tqarg("<blue>");
}
else p_colorSet = true;
}
@@ -217,21 +217,21 @@ bool mapParser::endElement(const TQString &, const TQString &, const TQString &)
else
{
b = false;
- p_error = i18n("Invalid value in tag %1").arg("<ignore>");
+ p_error = i18n("Invalid value in tag %1").tqarg("<ignore>");
}
}
else if (aux == "flag")
{
b = p_division -> setFlagFile(p_path + "flags/" + p_contents);
p_flagFileSet = true;
- if (!b) p_error = i18n("Could not find flag file %1").arg(p_path + "flags/" + p_contents);
+ if (!b) p_error = i18n("Could not find flag file %1").tqarg(p_path + "flags/" + p_contents);
}
else if (aux == "map")
{
}
else b = false;
removeLastTag();
- p_contents = TQString::null;
+ p_contents = TQString();
return b;
}
@@ -258,7 +258,7 @@ bool mapParser::endDocument()
}
else if (!p_mapNameSet) aux = "name";
else if (!p_mapFileSet) aux = "mapFile";
- p_error = i18n("Tag %1 is missing.").arg(aux);
+ p_error = i18n("Tag %1 is missing.").tqarg(aux);
return false;
}
@@ -270,10 +270,10 @@ TQString mapParser::errorString()
TQString mapParser::getPreviousTag() const
{
- return p_previousTags.right(p_previousTags.length() - p_previousTags.findRev(':') - 1);
+ return p_previousTags.right(p_previousTags.length() - p_previousTags.tqfindRev(':') - 1);
}
void mapParser::removeLastTag()
{
- p_previousTags = p_previousTags.left(p_previousTags.findRev(':'));
+ p_previousTags = p_previousTags.left(p_previousTags.tqfindRev(':'));
}
diff --git a/kgeography/src/mapparser.h b/kgeography/src/mapparser.h
index 9db844ae..4abe8e56 100644
--- a/kgeography/src/mapparser.h
+++ b/kgeography/src/mapparser.h
@@ -16,7 +16,7 @@
class division;
class KGmap;
-class mapReader : public QXmlSimpleReader
+class mapReader : public TQXmlSimpleReader
{
public:
mapReader();
@@ -30,7 +30,7 @@ class mapReader : public QXmlSimpleReader
KGmap *p_map;
};
-class mapParser : public QXmlDefaultHandler
+class mapParser : public TQXmlDefaultHandler
{
public:
mapParser(KGmap *m, const TQString &path);
diff --git a/kgeography/src/mapsdatatranslation.cpp b/kgeography/src/mapsdatatranslation.cpp
index 23fb3418..081ca98c 100644
--- a/kgeography/src/mapsdatatranslation.cpp
+++ b/kgeography/src/mapsdatatranslation.cpp
@@ -64,10 +64,10 @@ i18n("africa.kgm", "The flag of CĂ´te d'Ivoire is...");
i18n("africa.kgm", "Yamoussoukro");
i18n("africa.kgm", "Yamoussoukro is the capital of...");
i18n("africa.kgm", "Cyprus");
-i18n("africa.kgm", "Democratic Republic of the Congo");
-i18n("africa.kgm", "The capital of Democratic Republic of the Congo is...");
-i18n("africa.kgm", "Please click on:\nDemocratic Republic of the Congo");
-i18n("africa.kgm", "The flag of Democratic Republic of the Congo is...");
+i18n("africa.kgm", "Detqmocratic Republic of the Congo");
+i18n("africa.kgm", "The capital of Detqmocratic Republic of the Congo is...");
+i18n("africa.kgm", "Please click on:\nDetqmocratic Republic of the Congo");
+i18n("africa.kgm", "The flag of Detqmocratic Republic of the Congo is...");
i18n("africa.kgm", "Kinshasa");
i18n("africa.kgm", "Kinshasa is the capital of...");
i18n("africa.kgm", "Djibouti");
@@ -3417,10 +3417,10 @@ i18n("world.kgm", "Please click on:\nCĂ´te d'Ivoire");
i18n("world.kgm", "The flag of CĂ´te d'Ivoire is...");
i18n("world.kgm", "Yamoussoukro");
i18n("world.kgm", "Yamoussoukro is the capital of...");
-i18n("world.kgm", "Democratic Republic of the Congo");
-i18n("world.kgm", "The capital of Democratic Republic of the Congo is...");
-i18n("world.kgm", "Please click on:\nDemocratic Republic of the Congo");
-i18n("world.kgm", "The flag of Democratic Republic of the Congo is...");
+i18n("world.kgm", "Detqmocratic Republic of the Congo");
+i18n("world.kgm", "The capital of Detqmocratic Republic of the Congo is...");
+i18n("world.kgm", "Please click on:\nDetqmocratic Republic of the Congo");
+i18n("world.kgm", "The flag of Detqmocratic Republic of the Congo is...");
i18n("world.kgm", "Kinshasa");
i18n("world.kgm", "Kinshasa is the capital of...");
i18n("world.kgm", "Djibouti");
@@ -4384,10 +4384,10 @@ i18n("world.kgm", "Please click on:\nSingapore");
i18n("world.kgm", "The flag of Singapore is...");
i18n("world.kgm", "Singapore");
i18n("world.kgm", "Singapore is the capital of...");
-i18n("world.kgm", "Democratic People's Republic of Korea");
-i18n("world.kgm", "The capital of Democratic People's Republic of Korea is...");
-i18n("world.kgm", "Please click on:\nDemocratic People's Republic of Korea");
-i18n("world.kgm", "The flag of Democratic People's Republic of Korea is...");
+i18n("world.kgm", "Detqmocratic People's Republic of Korea");
+i18n("world.kgm", "The capital of Detqmocratic People's Republic of Korea is...");
+i18n("world.kgm", "Please click on:\nDetqmocratic People's Republic of Korea");
+i18n("world.kgm", "The flag of Detqmocratic People's Republic of Korea is...");
i18n("world.kgm", "Pyeongyang");
i18n("world.kgm", "Pyeongyang is the capital of...");
i18n("world.kgm", "Republic of Korea");
diff --git a/kgeography/src/mapwidget.cpp b/kgeography/src/mapwidget.cpp
index f551940f..2560f11a 100644
--- a/kgeography/src/mapwidget.cpp
+++ b/kgeography/src/mapwidget.cpp
@@ -19,7 +19,7 @@
#include "mapwidget.h"
-mapWidget::mapWidget(TQWidget *parent) : TQWidget(parent)
+mapWidget::mapWidget(TQWidget *tqparent) : TQWidget(tqparent)
{
p_wantZoom = false;
p_zooming = false;
@@ -61,9 +61,9 @@ void mapWidget::setMapZoom(bool b)
}
}
-TQSize mapWidget::sizeHint() const
+TQSize mapWidget::tqsizeHint() const
{
- return maximumSize();
+ return tqmaximumSize();
}
void mapWidget::updateHPosition(int value)
@@ -91,12 +91,12 @@ void mapWidget::mousePressEvent(TQMouseEvent *e)
else if (p_wantMove)
{
p_initial = e -> pos();
- setCursor(Qt::SizeAllCursor);
+ setCursor(TQt::SizeAllCursor);
p_moving = true;
}
else
{
- QRgb rgb;
+ TQRgb rgb;
TQImage *currentImage;
currentImage = getCurrentImage();
@@ -121,8 +121,8 @@ void mapWidget::mouseMoveEvent(TQMouseEvent *e)
{
TQPainter p(this);
- p.setRasterOp(Qt::XorROP);
- p.setPen(TQPen(Qt::white, 1, Qt::DotLine));
+ p.setRasterOp(TQt::XorROP);
+ p.setPen(TQPen(TQt::white, 1, TQt::DotLine));
// remove previous rectangle
p.drawRect(TQRect(p_initial, p_prev));
@@ -176,8 +176,8 @@ void mapWidget::mouseReleaseEvent(TQMouseEvent *e)
TQPainter p(this);
TQRect r(p_initial, e -> pos());
- p.setRasterOp(Qt::XorROP);
- p.setPen(TQPen(Qt::white, 1, Qt::DotLine));
+ p.setRasterOp(TQt::XorROP);
+ p.setPen(TQPen(TQt::white, 1, TQt::DotLine));
// remove previous rectangle
p.drawRect(r);
@@ -279,7 +279,7 @@ TQImage *mapWidget::getCurrentImage()
void mapWidget::setOriginalImage()
{
- setPaletteBackgroundPixmap(p_originalImage);
+ setPaletteBackgroundPixmap(TQPixmap(p_originalImage));
erase();
p_zoomedImageShown = TQImage();
p_lastFactorX = 1;
@@ -314,7 +314,7 @@ void mapWidget::updateShownImage()
{
p_zoomedImageShown = p_originalImage.copy(p_zoomX, p_zoomY, p_zoomW, p_zoomH);
p_zoomedImageShown = p_zoomedImageShown.scale(size());
- setPaletteBackgroundPixmap(p_zoomedImageShown);
+ setPaletteBackgroundPixmap(TQPixmap(p_zoomedImageShown));
erase();
p_oldZoomX = p_zoomX;
p_oldZoomY = p_zoomY;
diff --git a/kgeography/src/mapwidget.h b/kgeography/src/mapwidget.h
index 1bc37cb3..3f6561dc 100644
--- a/kgeography/src/mapwidget.h
+++ b/kgeography/src/mapwidget.h
@@ -15,18 +15,19 @@
#include <tqpoint.h>
#include <tqwidget.h>
-class mapWidget : public QWidget
+class mapWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- mapWidget(TQWidget *parent);
+ mapWidget(TQWidget *tqparent);
void init(const TQString &path, int scrollBarWidth, int scrollBarHeight);
void setMapMove(bool b);
void setMapZoom(bool b);
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
TQSize mapSize() const;
public slots:
@@ -38,7 +39,7 @@ Q_OBJECT
void setMoveActionChecked(bool b);
void setZoomActionChecked(bool b);
void setMoveActionEnabled(bool b);
- void clicked(QRgb, const TQPoint&);
+ void clicked(TQRgb, const TQPoint&);
void updatePosition(int X, int Y);
void updateVisibleSize(int w, int h);
void updateMaximumSize(int w, int h);
diff --git a/kgeography/src/mypopup.cpp b/kgeography/src/mypopup.cpp
index b9f1c78e..d68e3a7e 100644
--- a/kgeography/src/mypopup.cpp
+++ b/kgeography/src/mypopup.cpp
@@ -16,7 +16,7 @@
#include "mypopup.h"
-myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2, const TQString &flagFile) : TQFrame(parent)
+myPopup::myPopup(TQWidget *tqparent, const TQString &text, const TQString &text2, const TQString &flagFile) : TQFrame(tqparent)
{
TQHBoxLayout *lay = new TQHBoxLayout(this);
lay -> setMargin(4);
@@ -33,7 +33,7 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2,
if (!text2.isNull())
{
TQLabel *l2 = new TQLabel(text2, vbox);
- l2 -> setAlignment(Qt::AlignCenter);
+ l2 -> tqsetAlignment(TQt::AlignCenter);
vboxLayout -> addWidget(l2);
}
@@ -43,10 +43,10 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2,
lay -> addWidget(flag);
TQImage flagImg(flagFile);
flag -> setPixmap(flagImg.smoothScale(flagImg.width() / 5, flagImg. height() / 5));
- flag -> setAlignment(Qt::AlignCenter);
+ flag -> tqsetAlignment(TQt::AlignCenter);
}
- l -> setAlignment(Qt::AlignCenter);
+ l -> tqsetAlignment(TQt::AlignCenter);
TQFont f = l -> font();
f.setBold(true);
l -> setFont(f);
@@ -55,7 +55,7 @@ myPopup::myPopup(TQWidget *parent, const TQString &text, const TQString &text2,
setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(2);
- setFixedSize(sizeHint());
+ setFixedSize(tqsizeHint());
}
void myPopup::mousePressEvent(TQMouseEvent *)
diff --git a/kgeography/src/mypopup.h b/kgeography/src/mypopup.h
index c768a308..d840eb49 100644
--- a/kgeography/src/mypopup.h
+++ b/kgeography/src/mypopup.h
@@ -13,13 +13,14 @@
#include <tqframe.h>
-class myPopup : public QFrame
+class myPopup : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
friend class popupManager;
private:
- myPopup(TQWidget *parent, const TQString &text, const TQString &text2 = TQString::null, const TQString &flagFile = TQString::null);
+ myPopup(TQWidget *tqparent, const TQString &text, const TQString &text2 = TQString(), const TQString &flagFile = TQString());
signals:
void deleteMe();
diff --git a/kgeography/src/popupmanager.cpp b/kgeography/src/popupmanager.cpp
index 1a457f81..1b19b44d 100644
--- a/kgeography/src/popupmanager.cpp
+++ b/kgeography/src/popupmanager.cpp
@@ -11,9 +11,9 @@
#include "mypopup.h"
#include "popupmanager.h"
-popupManager::popupManager(TQWidget *parent)
+popupManager::popupManager(TQWidget *tqparent)
{
- p_parent = parent;
+ p_parent = tqparent;
p_mp = 0;
}
diff --git a/kgeography/src/popupmanager.h b/kgeography/src/popupmanager.h
index 8b28f56e..57dd68c8 100644
--- a/kgeography/src/popupmanager.h
+++ b/kgeography/src/popupmanager.h
@@ -17,11 +17,12 @@ class TQWidget;
class myPopup;
-class popupManager : public QObject
+class popupManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- popupManager(TQWidget *parent);
+ popupManager(TQWidget *tqparent);
// shows text at p and the flag
void show(const TQString &text, const TQString &text2, const TQPoint &p, const TQString &flagFile);