diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /ksokoban/ModalLabel.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksokoban/ModalLabel.cpp')
-rw-r--r-- | ksokoban/ModalLabel.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/ksokoban/ModalLabel.cpp b/ksokoban/ModalLabel.cpp index 1ed55dcf..c0ccbbad 100644 --- a/ksokoban/ModalLabel.cpp +++ b/ksokoban/ModalLabel.cpp @@ -19,23 +19,23 @@ #include "ModalLabel.h" -#include <qlabel.h> -#include <qfont.h> +#include <tqlabel.h> +#include <tqfont.h> #include <kapplication.h> #include <kglobalsettings.h> -#include <qwidgetlist.h> -#include <qstring.h> +#include <tqwidgetlist.h> +#include <tqstring.h> #include "ModalLabel.moc" -ModalLabel::ModalLabel(const QString &text, QWidget *parent, +ModalLabel::ModalLabel(const TQString &text, TQWidget *parent, const char *name, WFlags f) - : QLabel(text, parent, name, f) { - QFont font(KGlobalSettings::generalFont().family(), 24, QFont::Bold); - QFontMetrics fontMet(font); + : TQLabel(text, parent, name, f) { + TQFont font(KGlobalSettings::generalFont().family(), 24, TQFont::Bold); + TQFontMetrics fontMet(font); - QString currentLine; - QRect bounds; + TQString currentLine; + TQRect bounds; int lineLen, width=0, height=0; for (int linePos=0; linePos < (int) text.length(); linePos += lineLen+1) { @@ -58,15 +58,15 @@ ModalLabel::ModalLabel(const QString &text, QWidget *parent, if (height < 75) height = 75; setAlignment (AlignCenter); - setFrameStyle (QFrame::Panel | QFrame::Raised); + setFrameStyle (TQFrame::Panel | TQFrame::Raised); setLineWidth (4); setFont (font); move (parent->width ()/2 - width/2, parent->height ()/2 - height/2); resize (width, height); show (); - QWidgetList *list = QApplication::allWidgets(); - QWidgetListIt it( *list ); + TQWidgetList *list = TQApplication::allWidgets(); + TQWidgetListIt it( *list ); while (it.current()) { it.current()->installEventFilter (this); ++it; @@ -78,25 +78,25 @@ ModalLabel::ModalLabel(const QString &text, QWidget *parent, } void -ModalLabel::timerEvent (QTimerEvent *) { +ModalLabel::timerEvent (TQTimerEvent *) { completed_ = true; } bool -ModalLabel::eventFilter (QObject *, QEvent *e) { +ModalLabel::eventFilter (TQObject *, TQEvent *e) { switch (e->type()) { - case QEvent::MouseButtonPress: - case QEvent::MouseButtonRelease: - case QEvent::MouseButtonDblClick: - case QEvent::MouseMove: - case QEvent::KeyPress: - case QEvent::KeyRelease: - case QEvent::Accel: - //case QEvent::DragEnter: - case QEvent::DragMove: - case QEvent::DragLeave: - case QEvent::Drop: - //case QEvent::DragResponse: + case TQEvent::MouseButtonPress: + case TQEvent::MouseButtonRelease: + case TQEvent::MouseButtonDblClick: + case TQEvent::MouseMove: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: + case TQEvent::Accel: + //case TQEvent::DragEnter: + case TQEvent::DragMove: + case TQEvent::DragLeave: + case TQEvent::Drop: + //case TQEvent::DragResponse: //kdDebug << "Ate event" << endl; return true; @@ -107,7 +107,7 @@ ModalLabel::eventFilter (QObject *, QEvent *e) { } void -ModalLabel::message (const QString &text, QWidget *parent) { +ModalLabel::message (const TQString &text, TQWidget *parent) { KApplication *app = KApplication::kApplication (); ModalLabel cl (text, parent); |