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 --- kicker/libkicker/kshadowengine.cpp | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kicker/libkicker/kshadowengine.cpp') diff --git a/kicker/libkicker/kshadowengine.cpp b/kicker/libkicker/kshadowengine.cpp index 32008883e..19ccc669d 100644 --- a/kicker/libkicker/kshadowengine.cpp +++ b/kicker/libkicker/kshadowengine.cpp @@ -21,10 +21,10 @@ * Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include "kshadowsettings.h" #include "kshadowengine.h" @@ -58,9 +58,9 @@ KShadowSettings *KShadowEngine::shadowSettings() return m_shadowSettings; } -QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColor) +TQImage KShadowEngine::makeShadow(const TQPixmap& textPixmap, const TQColor &bgColor) { - QImage result; + TQImage result; // create a new image for for the shaddow int w = textPixmap.width(); @@ -78,7 +78,7 @@ QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColo /* * This is the source pixmap */ - QImage img = textPixmap.convertToImage().convertDepth(32); + TQImage img = textPixmap.convertToImage().convertDepth(32); /* * Resize the image if necessary @@ -125,7 +125,7 @@ QImage KShadowEngine::makeShadow(const QPixmap& textPixmap, const QColor &bgColo // Multiplication factor for pixels diagonal to the text #define DIAGONAL_FACTOR 1.0 -double KShadowEngine::defaultDecay(QImage& source, int i, int j) +double KShadowEngine::defaultDecay(TQImage& source, int i, int j) { if ((i < 1) || (j < 1) || (i > source.width() - 2) || (j > source.height() - 2)) return 0; @@ -144,19 +144,19 @@ double KShadowEngine::defaultDecay(QImage& source, int i, int j) return alphaShadow; } -double KShadowEngine::doubleLinearDecay(QImage& source, int i, int j) +double KShadowEngine::doubleLinearDecay(TQImage& source, int i, int j) { //printf("img: %p, %d %d\n", (char *) &source, i, j); return defaultDecay( source, i, j ); // for now } -double KShadowEngine::radialDecay(QImage& source, int i, int j) +double KShadowEngine::radialDecay(TQImage& source, int i, int j) { //printf("img: %p, %d %d\n", (char *) &source, i, j); return defaultDecay( source, i, j ); // for now } -double KShadowEngine::noDecay(QImage& source, int i, int j) +double KShadowEngine::noDecay(TQImage& source, int i, int j) { // create a new image for for the shaddow int w = source.width(); @@ -210,28 +210,28 @@ KTextShadowEngine::KTextShadowEngine() : KShadowEngine() } // taken from mtaskbar, by Sebastian Wolff -void KTextShadowEngine::drawText(QPainter &p, const QRect &tr, int tf, const QString &str, const QSize &size) +void KTextShadowEngine::drawText(TQPainter &p, const TQRect &tr, int tf, const TQString &str, const TQSize &size) { // get the color of the shadow: white for dark text, black for bright text - QPen textPen = p.pen(); - QColor shadCol = textPen.color(); + TQPen textPen = p.pen(); + TQColor shadCol = textPen.color(); if (shadCol.red() + shadCol.green() + shadCol.blue() <= 3*256/2-1) { - shadCol = QColor(255,255,255); + shadCol = TQColor(255,255,255); } else { - shadCol = QColor(0,0,0); + shadCol = TQColor(0,0,0); } // get a transparent pixmap - QPainter pixPainter; - QPixmap textPixmap(size); + TQPainter pixPainter; + TQPixmap textPixmap(size); - textPixmap.fill(QColor(0,0,0)); + textPixmap.fill(TQColor(0,0,0)); textPixmap.setMask(textPixmap.createHeuristicMask(true)); // draw text @@ -242,7 +242,7 @@ void KTextShadowEngine::drawText(QPainter &p, const QRect &tr, int tf, const QSt pixPainter.end(); // draw shadow - QImage img = makeShadow(textPixmap, shadCol); + TQImage img = makeShadow(textPixmap, shadCol); // return p.drawImage(0, 0, img); -- cgit v1.2.1