summaryrefslogtreecommitdiffstats
path: root/eyesapplet
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 21:31:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 21:31:21 +0000
commita1bd60b34891ccc77056c190d7871bc4b14fe654 (patch)
tree713f2f72c8f08a18df12f5bbeef7f9b61b19d4f1 /eyesapplet
parent8d92c3c2a4131996726cc7b625d3cd3caec296de (diff)
downloadtdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.tar.gz
tdetoys-a1bd60b34891ccc77056c190d7871bc4b14fe654.zip
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
Diffstat (limited to 'eyesapplet')
-rw-r--r--eyesapplet/eyes.cpp18
-rw-r--r--eyesapplet/eyes.h3
2 files changed, 11 insertions, 10 deletions
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<int>(1.4 * h); // rectangular shape.
+ return static_cast<int>(1.4 * h); // rectangular tqshape.
}
int EyesApplet::heightForWidth(int w) const
{
- return static_cast<int>(w / 1.4); // rectangular shape.
+ return static_cast<int>(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;