summaryrefslogtreecommitdiffstats
path: root/ksokoban/ModalLabel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /ksokoban/ModalLabel.cpp
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksokoban/ModalLabel.cpp')
-rw-r--r--ksokoban/ModalLabel.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ksokoban/ModalLabel.cpp b/ksokoban/ModalLabel.cpp
index c0ccbbad..cf813779 100644
--- a/ksokoban/ModalLabel.cpp
+++ b/ksokoban/ModalLabel.cpp
@@ -28,9 +28,9 @@
#include "ModalLabel.moc"
-ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
+ModalLabel::ModalLabel(const TQString &text, TQWidget *tqparent,
const char *name, WFlags f)
- : TQLabel(text, parent, name, f) {
+ : TQLabel(text, tqparent, name, f) {
TQFont font(KGlobalSettings::generalFont().family(), 24, TQFont::Bold);
TQFontMetrics fontMet(font);
@@ -40,7 +40,7 @@ ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
for (int linePos=0; linePos < (int) text.length(); linePos += lineLen+1) {
- lineLen = text.find('\n', linePos);
+ lineLen = text.tqfind('\n', linePos);
if (lineLen < 0) lineLen = text.length() - linePos;
else lineLen -= linePos;
@@ -57,15 +57,15 @@ ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
if (width < 300) width = 300;
if (height < 75) height = 75;
- setAlignment (AlignCenter);
+ tqsetAlignment (AlignCenter);
setFrameStyle (TQFrame::Panel | TQFrame::Raised);
setLineWidth (4);
setFont (font);
- move (parent->width ()/2 - width/2, parent->height ()/2 - height/2);
+ move (tqparent->width ()/2 - width/2, tqparent->height ()/2 - height/2);
resize (width, height);
show ();
- TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetList *list = TQApplication::tqallWidgets();
TQWidgetListIt it( *list );
while (it.current()) {
it.current()->installEventFilter (this);
@@ -107,9 +107,9 @@ ModalLabel::eventFilter (TQObject *, TQEvent *e) {
}
void
-ModalLabel::message (const TQString &text, TQWidget *parent) {
+ModalLabel::message (const TQString &text, TQWidget *tqparent) {
KApplication *app = KApplication::kApplication ();
- ModalLabel cl (text, parent);
+ ModalLabel cl (text, tqparent);
while (!cl.completed_) app->processOneEvent ();
}