From a1bd60b34891ccc77056c190d7871bc4b14fe654 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 21:31:21 +0000 Subject: TQt4 port kdetoys This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdetoys@1238103 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- eyesapplet/eyes.cpp | 18 +++++++++--------- eyesapplet/eyes.h | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'eyesapplet') diff --git a/eyesapplet/eyes.cpp b/eyesapplet/eyes.cpp index 83894c8..e1b9623 100644 --- a/eyesapplet/eyes.cpp +++ b/eyesapplet/eyes.cpp @@ -33,17 +33,17 @@ extern "C" { - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("keyesapplet"); - EyesApplet *applet = new EyesApplet(configFile, KPanelApplet::Normal, 0, parent, "keyesapplet"); + EyesApplet *applet = new EyesApplet(configFile, KPanelApplet::Normal, 0, tqparent, "keyesapplet"); return applet; } } EyesApplet::EyesApplet(const TQString& configFile, Type t, int actions, - TQWidget *parent, const char *name) - : KPanelApplet( configFile, t, actions, parent, name ) + TQWidget *tqparent, const char *name) + : KPanelApplet( configFile, t, actions, tqparent, name ) { setWFlags(WNoAutoErase); setBackgroundOrigin(AncestorOrigin); @@ -55,11 +55,11 @@ EyesApplet::EyesApplet(const TQString& configFile, Type t, int actions, int EyesApplet::widthForHeight(int h) const { - return static_cast(1.4 * h); // rectangular shape. + return static_cast(1.4 * h); // rectangular tqshape. } int EyesApplet::heightForWidth(int w) const { - return static_cast(w / 1.4); // rectangular shape. + return static_cast(w / 1.4); // rectangular tqshape. } void EyesApplet::resizeEvent( TQResizeEvent*e ) @@ -133,7 +133,7 @@ void EyesApplet::drawPupils(TQPainter* p) oldMouse = mapFromGlobal(TQCursor::pos()); mouse = oldMouse * AAFACTOR; - int tmp = QMIN(h, w)/6; + int tmp = TQMIN(h, w)/6; // left pupil vect.setX(mouse.x() - h / 4); @@ -152,7 +152,7 @@ void EyesApplet::drawPupils(TQPainter* p) if(pos != oldleft) { - int sizeEye=QMIN(h,w)/6; + int sizeEye=TQMIN(h,w)/6; // // draw over old pos // p->setPen(TQPen(NoPen)); @@ -185,7 +185,7 @@ void EyesApplet::drawPupils(TQPainter* p) if(pos != oldright) { - int sizeEye=QMIN(h,w)/6; + int sizeEye=TQMIN(h,w)/6; // // draw over old pos // p->setPen(TQPen(NoPen)); diff --git a/eyesapplet/eyes.h b/eyesapplet/eyes.h index 4bb69bc..1e03bab 100644 --- a/eyesapplet/eyes.h +++ b/eyesapplet/eyes.h @@ -25,10 +25,11 @@ class EyesApplet : public KPanelApplet { Q_OBJECT + TQ_OBJECT public: EyesApplet(const TQString& configFile, Type t = Normal, int actions = 0, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); int widthForHeight(int height) const; int heightForWidth(int width) const; -- cgit v1.2.1