summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjseeker.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/kjofol-skin/kjseeker.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/kjofol-skin/kjseeker.cpp')
-rw-r--r--noatun/modules/kjofol-skin/kjseeker.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/noatun/modules/kjofol-skin/kjseeker.cpp b/noatun/modules/kjofol-skin/kjseeker.cpp
index 41e4db13..b9b441b1 100644
--- a/noatun/modules/kjofol-skin/kjseeker.cpp
+++ b/noatun/modules/kjofol-skin/kjseeker.cpp
@@ -15,9 +15,9 @@
#include <kdebug.h>
-KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
+KJSeeker::KJSeeker(const TQStringList &i, KJLoader *l) : KJWidget(l), g(0)
{
- QString activeBg = backgroundPressed("bmp1");
+ TQString activeBg = backgroundPressed("bmp1");
if(activeBg.isEmpty())
{
kdDebug(66666) << k_funcinfo << "No pressed background found for seeker," <<
@@ -28,7 +28,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
mActive = parent()->image(activeBg);
mScale = parent()->image(parser()["seekimage"][1]);
- QImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]);
+ TQImage pixmapNoPress = parent()->image(parser()["backgroundimage"][1]);
// generate transparent mask
int x, y, xs, ys;
@@ -37,7 +37,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
xs=i[3].toInt()-x;
ys=i[4].toInt()-y;
setRect(x,y,xs,ys);
- QImage transmask(xs, ys, 1, 2, QImage::LittleEndian);
+ TQImage transmask(xs, ys, 1, 2, TQImage::LittleEndian);
#if QT_VERSION < 0x030300
transmask.setColor(0, qRgb(0,0,0));
transmask.setColor(1, qRgb(255,255,255));
@@ -47,8 +47,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
#endif
// clear the pointers
- memset(barmodeImages, 0, 256*sizeof(QImage*));
- memset(barmode, 0, 256*sizeof(QPixmap*));
+ memset(barmodeImages, 0, 256*sizeof(TQImage*));
+ memset(barmode, 0, 256*sizeof(TQPixmap*));
// Now do the pixel føking
// kdDebug(66666) << "creating Pixmaps for Seeker" << endl;
@@ -76,7 +76,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
for(int i=0; i<level; i++)
{
if (!barmodeImages[i])
- barmodeImages[i]=new QImage(xs,ys, 32);
+ barmodeImages[i]=new TQImage(xs,ys, 32);
QRgb *l=(QRgb*)barmodeImages[i]->scanLine(iy-y);
l[ix-x]=inactiveColor;
}
@@ -84,7 +84,7 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
do
{
if (!barmodeImages[level])
- barmodeImages[level]=new QImage(xs,ys, 32);
+ barmodeImages[level]=new TQImage(xs,ys, 32);
QRgb *l=(QRgb*)barmodeImages[level]->scanLine(iy-y);
l[ix-x]=activeColor;
} while (level++<255);
@@ -93,8 +93,8 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
// kdDebug(66666) << "finished creating Pixmaps" << endl;
// create the blank one
- barmode[0]=new QPixmap(xs, ys);
- QPixmap px=parent()->pixmap(parser()["backgroundimage"][1]);
+ barmode[0]=new TQPixmap(xs, ys);
+ TQPixmap px=parent()->pixmap(parser()["backgroundimage"][1]);
bitBlt(barmode[0], 0, 0, &px, x, y, xs, ys, Qt::CopyROP);
px.convertFromImage(transmask);
barModeMask=px;
@@ -102,11 +102,11 @@ KJSeeker::KJSeeker(const QStringList &i, KJLoader *l) : KJWidget(l), g(0)
// kdDebug(66666) << "END KJSeeker constructor" << endl;
}
-QPixmap *KJSeeker::toPixmap(int n)
+TQPixmap *KJSeeker::toPixmap(int n)
{
if (!barmodeImages[n]) return barmode[n];
- barmode[n]=new QPixmap(
+ barmode[n]=new TQPixmap(
barmodeImages[n]->width(),
barmodeImages[n]->height()
);
@@ -129,21 +129,21 @@ KJSeeker::~KJSeeker()
}
}
-void KJSeeker::paint(QPainter *p, const QRect &)
+void KJSeeker::paint(TQPainter *p, const TQRect &)
{
closest();
- QPixmap *pixmap = toPixmap(g);
+ TQPixmap *pixmap = toPixmap(g);
pixmap->setMask(barModeMask);
bitBlt(p->device(), rect().topLeft().x(), rect().topLeft().y(),
pixmap, 0, 0, rect().width(), rect().height(), Qt::CopyROP);
}
-bool KJSeeker::mousePress(const QPoint &pos)
+bool KJSeeker::mousePress(const TQPoint &pos)
{
return (isGray(mScale.pixel(rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y())));
}
-void KJSeeker::mouseRelease(const QPoint &pos, bool in)
+void KJSeeker::mouseRelease(const TQPoint &pos, bool in)
{
int x = rect().topLeft().x()+pos.x();
int y = rect().topLeft().y()+pos.y();
@@ -185,7 +185,7 @@ void KJSeeker::timeUpdate(int sec)
g = sec * 255 / length;
//kdDebug(66666) << "sec: " << sec << " len: " << length << " g: " << g << endl;
- QPainter p(parent());
+ TQPainter p(parent());
paint(&p, rect());
}