diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:09:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-06 22:09:18 +0000 |
commit | d1fb90134ab8504932ee36de6157f846b50f7415 (patch) | |
tree | 191f2f1f1ed00a754687d1258d47f78e99723182 /common/colorutils.c | |
parent | b23b8edce7cbd48165084dbd852875afeb800735 (diff) | |
download | tde-style-qtcurve-d1fb90134ab8504932ee36de6157f846b50f7415.tar.gz tde-style-qtcurve-d1fb90134ab8504932ee36de6157f846b50f7415.zip |
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
Diffstat (limited to 'common/colorutils.c')
-rw-r--r-- | common/colorutils.c | 10 |
1 files changed, 5 insertions, 5 deletions
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 <math.h> #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 |