summaryrefslogtreecommitdiffstats
path: root/src/gui/general/PixmapFunctions.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-02 22:38:52 +0000
commit458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch)
tree624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/general/PixmapFunctions.cpp
parent747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff)
downloadrosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz
rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/general/PixmapFunctions.cpp')
-rw-r--r--src/gui/general/PixmapFunctions.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/general/PixmapFunctions.cpp b/src/gui/general/PixmapFunctions.cpp
index f61ff11..50dff1a 100644
--- a/src/gui/general/PixmapFunctions.cpp
+++ b/src/gui/general/PixmapFunctions.cpp
@@ -36,8 +36,8 @@
namespace Rosegarden
{
-QBitmap
-PixmapFunctions::generateMask(const TQPixmap &map, const QRgb &px)
+TQBitmap
+PixmapFunctions::generateMask(const TQPixmap &map, const TQRgb &px)
{
TQImage i(map.convertToImage());
TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian);
@@ -57,18 +57,18 @@ PixmapFunctions::generateMask(const TQPixmap &map, const QRgb &px)
return m;
}
-QBitmap
+TQBitmap
PixmapFunctions::generateMask(const TQPixmap &map)
{
TQImage i(map.convertToImage());
TQImage im(i.width(), i.height(), 1, 2, TQImage::LittleEndian);
- QRgb px0(i.pixel(0, 0));
- QRgb px1(i.pixel(i.width() - 1, 0));
- QRgb px2(i.pixel(i.width() - 1, i.height() - 1));
- QRgb px3(i.pixel(0, i.height() - 1));
+ TQRgb px0(i.pixel(0, 0));
+ TQRgb px1(i.pixel(i.width() - 1, 0));
+ TQRgb px2(i.pixel(i.width() - 1, i.height() - 1));
+ TQRgb px3(i.pixel(0, i.height() - 1));
- QRgb px(px0);
+ TQRgb px(px0);
if (px0 != px2 && px1 == px3)
px = px1;
@@ -87,7 +87,7 @@ PixmapFunctions::generateMask(const TQPixmap &map)
return m;
}
-QPixmap
+TQPixmap
PixmapFunctions::colourPixmap(const TQPixmap &map, int hue, int minValue)
{
// assumes pixmap is currently in shades of grey; maps black ->
@@ -132,7 +132,7 @@ PixmapFunctions::colourPixmap(const TQPixmap &map, int hue, int minValue)
return rmap;
}
-QPixmap
+TQPixmap
PixmapFunctions::shadePixmap(const TQPixmap &map)
{
TQImage image = map.convertToImage();
@@ -161,7 +161,7 @@ PixmapFunctions::shadePixmap(const TQPixmap &map)
return rmap;
}
-QPixmap
+TQPixmap
PixmapFunctions::flipVertical(const TQPixmap &map)
{
TQPixmap rmap;
@@ -178,7 +178,7 @@ PixmapFunctions::flipVertical(const TQPixmap &map)
return rmap;
}
-QPixmap
+TQPixmap
PixmapFunctions::flipHorizontal(const TQPixmap &map)
{
TQPixmap rmap;
@@ -249,7 +249,7 @@ PixmapFunctions::drawPixmapMasked(TQPixmap &dest, TQBitmap &destMask,
if (ism.depth() == 1 && ism.pixel(x, y) == 0)
continue;
- if (ism.pixel(x, y) == Qt::white.rgb())
+ if (ism.pixel(x, y) == TQt::white.rgb())
continue;
int x1 = x + x0;