From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konsole/konsole/TECommon.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'konsole/konsole/TECommon.h') diff --git a/konsole/konsole/TECommon.h b/konsole/konsole/TECommon.h index c541fe0f1..94b5ecc33 100644 --- a/konsole/konsole/TECommon.h +++ b/konsole/konsole/TECommon.h @@ -25,7 +25,7 @@ #ifndef TECOMMON_H #define TECOMMON_H -#include +#include #ifndef UINT8 typedef unsigned char UINT8; @@ -41,14 +41,14 @@ typedef unsigned short UINT16; */ struct ColorEntry { - ColorEntry(QColor c, bool tr, bool b) : color(c), transparent(tr), bold(b) {} + ColorEntry(TQColor c, bool tr, bool b) : color(c), transparent(tr), bold(b) {} ColorEntry() : transparent(false), bold(false) {} // default constructors void operator=(const ColorEntry& rhs) { color = rhs.color; transparent = rhs.transparent; bold = rhs.bold; } - QColor color; + TQColor color; bool transparent; // if used on bg bool bold; // if used on fg }; @@ -105,7 +105,7 @@ public: UINT8 v; // ... color space. C++ does not do unions, so we cannot ... UINT8 w; // ... express ourselfs here, properly. void toggleIntensive(); // Hack or helper? - QColor color(const ColorEntry* base) const; + TQColor color(const ColorEntry* base) const; friend bool operator == (cacol a, cacol b); friend bool operator != (cacol a, cacol b); }; @@ -146,30 +146,30 @@ inline bool operator != (cacol a, cacol b) return a.t != b.t || a.u != b.u || a.v != b.v || a.w != b.w; } -inline const QColor color256(UINT8 u, const ColorEntry* base) +inline const TQColor color256(UINT8 u, const ColorEntry* base) { // 0.. 16: system colors if (u < 8) return base[u+2 ].color; u -= 8; if (u < 8) return base[u+2+BASE_COLORS].color; u -= 8; // 16..231: 6x6x6 rgb color cube - if (u < 216) return QColor(255*((u/36)%6)/5, + if (u < 216) return TQColor(255*((u/36)%6)/5, 255*((u/ 6)%6)/5, 255*((u/ 1)%6)/5); u -= 216; // 232..255: gray, leaving out black and white - int gray = u*10+8; return QColor(gray,gray,gray); + int gray = u*10+8; return TQColor(gray,gray,gray); } -inline QColor cacol::color(const ColorEntry* base) const +inline TQColor cacol::color(const ColorEntry* base) const { switch (t) { case CO_DFT: return base[u+0+(v?BASE_COLORS:0)].color; case CO_SYS: return base[u+2+(v?BASE_COLORS:0)].color; case CO_256: return color256(u,base); - case CO_RGB: return QColor(u,v,w); - default : return QColor(255,0,0); // diagnostic catch all + case CO_RGB: return TQColor(u,v,w); + default : return TQColor(255,0,0); // diagnostic catch all } } -- cgit v1.2.3