summaryrefslogtreecommitdiffstats
path: root/kgeography/src/mapasker.cpp
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/src/mapasker.cpp
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/src/mapasker.cpp')
-rw-r--r--kgeography/src/mapasker.cpp20
1 files changed, 10 insertions, 10 deletions
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()));