summaryrefslogtreecommitdiffstats
path: root/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kolourpaint/widgets/kptoolwidgetspraycansize.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolourpaint/widgets/kptoolwidgetspraycansize.cpp')
-rw-r--r--kolourpaint/widgets/kptoolwidgetspraycansize.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
index 2f426df5..cce8f1b5 100644
--- a/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
+++ b/kolourpaint/widgets/kptoolwidgetspraycansize.cpp
@@ -44,8 +44,8 @@
static int spraycanSizes [] = {9, 17, 29};
-kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char *name)
- : kpToolWidgetBase (parent, name)
+kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *tqparent, const char *name)
+ : kpToolWidgetBase (tqparent, name)
{
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize() CALLED!" << endl;
@@ -54,14 +54,14 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
for (int i = 0; i < int (sizeof (spraycanSizes) / sizeof (spraycanSizes [0])); i++)
{
int s = spraycanSizes [i];
- TQString iconName = TQString ("tool_spraycan_%1x%1").arg (s).arg(s);
+ TQString iconName = TQString ("tool_spraycan_%1x%1").tqarg (s).tqarg(s);
#if DEBUG_KP_TOOL_WIDGET_SPRAYCAN_SIZE
kdDebug () << "\ticonName=" << iconName << endl;
#endif
TQPixmap pixmap (s, s);
- pixmap.fill (Qt::white);
+ pixmap.fill (TQt::white);
TQPainter painter (&pixmap);
painter.drawPixmap (0, 0, UserIcon (iconName));
@@ -69,24 +69,24 @@ kpToolWidgetSpraycanSize::kpToolWidgetSpraycanSize (TQWidget *parent, const char
TQImage image = kpPixmapFX::convertToImage (pixmap);
- TQBitmap mask (pixmap.width (), pixmap.height ());
- mask.fill (Qt::color0);
+ TQBitmap tqmask (pixmap.width (), pixmap.height ());
+ tqmask.fill (TQt::color0);
- painter.begin (&mask);
- painter.setPen (Qt::color1);
+ painter.begin (&tqmask);
+ painter.setPen (TQt::color1);
for (int y = 0; y < image.height (); y++)
{
for (int x = 0; x < image.width (); x++)
{
- if ((image.pixel (x, y) & RGB_MASK) == 0/*black*/)
+ if ((image.pixel (x, y) & TQRGB_MASK) == 0/*black*/)
painter.drawPoint (x, y); // mark as opaque
}
}
painter.end ();
- pixmap.setMask (mask);
+ pixmap.setMask (tqmask);
addOption (pixmap, i18n ("%1x%2").arg (s).arg (s)/*tooltip*/);
if (i == 1)