From 838baf3f99ec5ab81b063eb5449a3381d860f377 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 04:58:26 +0000 Subject: 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 --- ksokoban/ModalLabel.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ksokoban/ModalLabel.cpp') 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 (); } -- cgit v1.2.1