diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/kjofol-skin/kjwidget.cpp | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/kjofol-skin/kjwidget.cpp')
-rw-r--r-- | noatun/modules/kjofol-skin/kjwidget.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/noatun/modules/kjofol-skin/kjwidget.cpp b/noatun/modules/kjofol-skin/kjwidget.cpp index b46fb651..d292637a 100644 --- a/noatun/modules/kjofol-skin/kjwidget.cpp +++ b/noatun/modules/kjofol-skin/kjwidget.cpp @@ -18,16 +18,11 @@ KJWidget::KJWidget(KJLoader *p) : mParent(p) { } -TQBitmap KJWidget::getMask(const TQImage &_rect, register QRgb transparent) +TQBitmap KJWidget::getMask(const TQImage &_rect, register TQRgb transparent) { TQImage result(_rect.width(), _rect.height(), 1,2, TQImage::LittleEndian); -#if QT_VERSION < 0x030300 - result.setColor(0, qRgb(0,0,0)); //TODO: maybe use Qt::color0 and Qt::color1 - result.setColor(1, qRgb(255,255,255)); -#else - result.setColor(1, qRgb(0,0,0)); - result.setColor(0, qRgb(255,255,255)); -#endif + result.setColor(1, tqRgb(0,0,0)); + result.setColor(0, tqRgb(255,255,255)); for(int height=0;height<_rect.height(); height++) { @@ -39,21 +34,21 @@ TQBitmap KJWidget::getMask(const TQImage &_rect, register QRgb transparent) return bm; } -void KJWidget::repaint(bool me, const TQRect &r, bool clear) +void KJWidget::tqrepaint(bool me, const TQRect &r, bool clear) { - TQPainter p(parent()); + TQPainter p(tqparent()); if (me) paint(&p, r.isValid() ? r : rect()); else - parent()->repaint(r.isValid() ? r : rect(), clear); + tqparent()->tqrepaint(r.isValid() ? r : rect(), clear); } const TQString &KJWidget::backgroundPressed(const TQString &bmp) const { if(bmp.isEmpty()) // play safe { -// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning TQString::null!" << endl; - return TQString::null; +// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning TQString()!" << endl; + return TQString(); } // kdDebug(66666) << k_funcinfo << "Returning pressed pixmap for '" << bmp.latin1() << "'" << endl; @@ -63,7 +58,7 @@ const TQString &KJWidget::backgroundPressed(const TQString &bmp) const if(item.count() < 2) { // kdDebug(66666) << k_funcinfo << "backgroundimagepressed doesn't have enough keys in its line!" << endl; - return TQString::null; + return TQString(); } else return item[1]; |