From d1fb90134ab8504932ee36de6157f846b50f7415 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 6 May 2011 22:09:18 +0000 Subject: TQt4 port kde-style-qtcurve This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-style-qtcurve@1230744 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- common/colorutils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'common/colorutils.c') diff --git a/common/colorutils.c b/common/colorutils.c index 05aaaea..ba89752 100644 --- a/common/colorutils.c +++ b/common/colorutils.c @@ -1,6 +1,6 @@ /* This file is taken from kcolorspaces.cpp and kcolorutils.cpp from kdelibs -The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor +The code has been modified to work with TQColor (TQt3 &TQt4) and GdkColor */ /* This file is part of the KDE project @@ -26,12 +26,12 @@ The code has been modified to work with QColor (Qt3 &Qt4) and GdkColor #include #ifdef __cplusplus -#if defined QT_VERSION && (QT_VERSION >= 0x040000) +#if (0x039999 >= 0x040000) #define FLOAT_COLOR(VAL, COL) (VAL).COL##F() -#define TO_COLOR(R, G, B) QColor::fromRgbF(R, G, B) +#define TO_COLOR(R, G, B) TQColor::fromRgbF(R, G, B) #else #define FLOAT_COLOR(VAL, COL) ((double)(((VAL).COL()*1.0)/255.0)) -#define TO_COLOR(R, G, B) QColor(limit(R*255.0), limit(G*255.0), limit(B*255.0)) +#define TO_COLOR(R, G, B) TQColor(limit(R*255.0), limit(G*255.0), limit(B*255.0)) #endif #else #define inline @@ -67,7 +67,7 @@ static inline double ColorUtils_wrap(double a) static const double yc[3] = { 0.299, 0.587, 0.114 }; #elif HCY_REC == 709 static const double yc[3] = {0.2126, 0.7152, 0.0722}; -#else // use Qt values +#else // use TQt values static const double yc[3] = { 0.34375, 0.5, 0.15625 }; #endif -- cgit v1.2.1