summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/kjofol-skin')
-rw-r--r--noatun/modules/kjofol-skin/helpers.cpp4
-rw-r--r--noatun/modules/kjofol-skin/kjbackground.cpp6
-rw-r--r--noatun/modules/kjofol-skin/kjbackground.h10
-rw-r--r--noatun/modules/kjofol-skin/kjbutton.cpp34
-rw-r--r--noatun/modules/kjofol-skin/kjbutton.h20
-rw-r--r--noatun/modules/kjofol-skin/kjequalizer.cpp40
-rw-r--r--noatun/modules/kjofol-skin/kjequalizer.h22
-rw-r--r--noatun/modules/kjofol-skin/kjfont.cpp72
-rw-r--r--noatun/modules/kjofol-skin/kjfont.h34
-rw-r--r--noatun/modules/kjofol-skin/kjloader.cpp132
-rw-r--r--noatun/modules/kjofol-skin/kjloader.h56
-rw-r--r--noatun/modules/kjofol-skin/kjprefs.cpp142
-rw-r--r--noatun/modules/kjofol-skin/kjprefs.h22
-rw-r--r--noatun/modules/kjofol-skin/kjseeker.cpp34
-rw-r--r--noatun/modules/kjofol-skin/kjseeker.h22
-rw-r--r--noatun/modules/kjofol-skin/kjsliders.cpp44
-rw-r--r--noatun/modules/kjofol-skin/kjsliders.h50
-rw-r--r--noatun/modules/kjofol-skin/kjtextdisplay.cpp128
-rw-r--r--noatun/modules/kjofol-skin/kjtextdisplay.h88
-rw-r--r--noatun/modules/kjofol-skin/kjvis.cpp94
-rw-r--r--noatun/modules/kjofol-skin/kjvis.h38
-rw-r--r--noatun/modules/kjofol-skin/kjwidget.cpp22
-rw-r--r--noatun/modules/kjofol-skin/kjwidget.h24
-rw-r--r--noatun/modules/kjofol-skin/parser.cpp40
-rw-r--r--noatun/modules/kjofol-skin/parser.h38
25 files changed, 608 insertions, 608 deletions
diff --git a/noatun/modules/kjofol-skin/helpers.cpp b/noatun/modules/kjofol-skin/helpers.cpp
index b38822a6..0a2a9e67 100644
--- a/noatun/modules/kjofol-skin/helpers.cpp
+++ b/noatun/modules/kjofol-skin/helpers.cpp
@@ -43,9 +43,9 @@ static int isGray(QRgb r)
// UPDATE: should work on both little and big endian now (haven't tested that!)
// this code is taken from the QT-docu and I hope that this example
// is one of the working ones ;)
-inline void setPixel1BPP(QImage &image, int x, int y, bool value)
+inline void setPixel1BPP(TQImage &image, int x, int y, bool value)
{
- if ( image.bitOrder() == QImage::LittleEndian )
+ if ( image.bitOrder() == TQImage::LittleEndian )
{
if (value)
*(image.scanLine(y) + (x >> 3)) |= 1 << (x & 7);
diff --git a/noatun/modules/kjofol-skin/kjbackground.cpp b/noatun/modules/kjofol-skin/kjbackground.cpp
index 83c19ace..1c99b6ff 100644
--- a/noatun/modules/kjofol-skin/kjbackground.cpp
+++ b/noatun/modules/kjofol-skin/kjbackground.cpp
@@ -12,18 +12,18 @@
KJBackground::KJBackground(KJLoader *parent)
: KJWidget(parent)
{
- QImage ibackground;
+ TQImage ibackground;
mBackground = parent->pixmap(parser()["backgroundimage"][1]);
ibackground = parent->image(parser()["backgroundimage"][1]);
parent->setMask( getMask(ibackground) );
- parent->setFixedSize ( QSize(mBackground.width(), mBackground.height()) );
+ parent->setFixedSize ( TQSize(mBackground.width(), mBackground.height()) );
setRect(0,0,parent->width(),parent->height());
}
-void KJBackground::paint(QPainter *painter, const QRect &rect)
+void KJBackground::paint(TQPainter *painter, const TQRect &rect)
{
bitBlt(painter->device(), rect.topLeft(), &mBackground, rect, Qt::CopyROP);
}
diff --git a/noatun/modules/kjofol-skin/kjbackground.h b/noatun/modules/kjofol-skin/kjbackground.h
index 502611c5..d09d22c5 100644
--- a/noatun/modules/kjofol-skin/kjbackground.h
+++ b/noatun/modules/kjofol-skin/kjbackground.h
@@ -5,17 +5,17 @@
//#include "kjloader.h"
class KJLoader;
-#include <qpainter.h>
+#include <tqpainter.h>
class KJBackground : public KJWidget
{
public:
KJBackground(KJLoader *);
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &) {return false;}
- virtual void mouseRelease(const QPoint &, bool) {}
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &) {return false;}
+ virtual void mouseRelease(const TQPoint &, bool) {}
private:
- QPixmap mBackground;
+ TQPixmap mBackground;
};
#endif
diff --git a/noatun/modules/kjofol-skin/kjbutton.cpp b/noatun/modules/kjofol-skin/kjbutton.cpp
index 403ea61e..d051777e 100644
--- a/noatun/modules/kjofol-skin/kjbutton.cpp
+++ b/noatun/modules/kjofol-skin/kjbutton.cpp
@@ -16,7 +16,7 @@
#include <noatun/player.h>
#include <noatun/vequalizer.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <klocale.h>
#include <kpixmap.h>
@@ -30,8 +30,8 @@
* KJButton
*******************************************/
-KJButton::KJButton(const QStringList &i, KJLoader *parent)
- : QObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false)
+KJButton::KJButton(const TQStringList &i, KJLoader *parent)
+ : TQObject(0), KJWidget(parent), mTitle(i[0]), mShowPressed(false)
{
// kdDebug(66666) << k_funcinfo << "new button: " << i[0].latin1() << endl;
mPushedPixmap = (i.count() >= 7);
@@ -44,18 +44,18 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent)
ys=i[4].toInt()-y; // height
setRect ( x, y, xs, ys );
- QStringList temp = i;
+ TQStringList temp = i;
// search for selected button-type
// can be either BMPx where x is a number representing one
// of the background-images
// or darken which means just darken the button on click
bool gotBack = false; // in case any of these keys is duplicated
- for(QStringList::Iterator it = temp.begin(); it != temp.end(); ++it)
+ for(TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it)
{
if((*it).contains("bmp"))
{
- QString pressedTmp = backgroundPressed((*it));
+ TQString pressedTmp = backgroundPressed((*it));
if(!pressedTmp.isEmpty())
{
mPressed = parent->pixmap(pressedTmp);
@@ -68,7 +68,7 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent)
// FIXME: what KPixmapEffect causes the desired effect?
// intensity is the wrong one
KPixmap temp = parent->pixmap(parser()["backgroundimage"][1]);
- mPressed = (QPixmap)KPixmapEffect::intensity ( temp, 1.2f );
+ mPressed = (TQPixmap)KPixmapEffect::intensity ( temp, 1.2f );
gotBack = true;
}
if(gotBack)
@@ -87,24 +87,24 @@ KJButton::KJButton(const QStringList &i, KJLoader *parent)
if (mTitle=="playlistbutton")
{
mShowPressed = napp->playlist()->listVisible();
- connect( napp->player(), SIGNAL(playlistShown()), this, SLOT(slotPlaylistShown()) );
- connect( napp->player(), SIGNAL(playlistHidden()), this, SLOT(slotPlaylistHidden()) );
+ connect( napp->player(), TQT_SIGNAL(playlistShown()), this, TQT_SLOT(slotPlaylistShown()) );
+ connect( napp->player(), TQT_SIGNAL(playlistHidden()), this, TQT_SLOT(slotPlaylistHidden()) );
}
else if ( mTitle=="equalizeroffbutton") // same goes for EQ buttons
{
mShowPressed = (!napp->vequalizer()->isEnabled());
- connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool)));
+ connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool)));
}
else if (mTitle=="equalizeronbutton")
{
mShowPressed = napp->vequalizer()->isEnabled();
- connect( napp->vequalizer(), SIGNAL(enabled(bool)), SLOT(slotEqEnabled(bool)));
+ connect( napp->vequalizer(), TQT_SIGNAL(enabled(bool)), TQT_SLOT(slotEqEnabled(bool)));
}
}
-QString KJButton::tip()
+TQString KJButton::tip()
{
- QString str;
+ TQString str;
if (mTitle=="closebutton")
str=i18n("Close");
else if (mTitle=="minimizebutton")
@@ -149,13 +149,13 @@ QString KJButton::tip()
return str;
}
-void KJButton::paint(QPainter *, const QRect &)
+void KJButton::paint(TQPainter *, const TQRect &)
{
if (mShowPressed)
bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP);
}
-bool KJButton::mousePress(const QPoint &)
+bool KJButton::mousePress(const TQPoint &)
{
bitBlt(KJWidget::parent(), rect().topLeft(), &mPressed, rect(), Qt::CopyROP);
return true;
@@ -191,7 +191,7 @@ void KJButton::slotEqEnabled(bool on)
showPressed(!on);
}
-void KJButton::mouseRelease(const QPoint &, bool in)
+void KJButton::mouseRelease(const TQPoint &, bool in)
{
// repaint with default image (player-background)
repaint(false);
@@ -233,7 +233,7 @@ void KJButton::mouseRelease(const QPoint &, bool in)
loopMenu->insertItem(i18n("&Random"), static_cast<int>(Player::Random));
loopMenu->setItemChecked(static_cast<int>(napp->player()->loopStyle()), true); // select current loopstyle in menu
- selectedItem = loopMenu->exec(QCursor::pos());
+ selectedItem = loopMenu->exec(TQCursor::pos());
if (selectedItem != -1)
napp->player()->loop(selectedItem); // set new loopstyle
diff --git a/noatun/modules/kjofol-skin/kjbutton.h b/noatun/modules/kjofol-skin/kjbutton.h
index 4af4fcb0..e995c533 100644
--- a/noatun/modules/kjofol-skin/kjbutton.h
+++ b/noatun/modules/kjofol-skin/kjbutton.h
@@ -2,21 +2,21 @@
#define KJBUTTON_H
#include "kjwidget.h"
-#include <qobject.h>
+#include <tqobject.h>
class KJLoader;
-class KJButton : public QObject, public KJWidget
+class KJButton : public TQObject, public KJWidget
{
Q_OBJECT
public:
- KJButton(const QStringList&, KJLoader *);
+ KJButton(const TQStringList&, KJLoader *);
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &pos, bool);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &pos, bool);
virtual void showPressed(bool b=true);
- virtual QString tip();
+ virtual TQString tip();
private slots:
void slotPlaylistShown(void);
@@ -24,10 +24,10 @@ private slots:
void slotEqEnabled(bool on);
private:
- QPixmap mBackground;
+ TQPixmap mBackground;
bool mPushedPixmap;
- QPixmap mPressed;
- QString mTitle;
+ TQPixmap mPressed;
+ TQString mTitle;
bool mShowPressed;
};
diff --git a/noatun/modules/kjofol-skin/kjequalizer.cpp b/noatun/modules/kjofol-skin/kjequalizer.cpp
index 3f0716e4..51d50e97 100644
--- a/noatun/modules/kjofol-skin/kjequalizer.cpp
+++ b/noatun/modules/kjofol-skin/kjequalizer.cpp
@@ -8,16 +8,16 @@
#include "kjequalizer.h"
#include "kjequalizer.moc"
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kpixmap.h>
#include <noatun/vequalizer.h>
-KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p)
- : QObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0)
+KJEqualizer::KJEqualizer(const TQStringList &l, KJLoader *p)
+ : TQObject(0), KJWidget(p), mBack(0), mView(0), mInterpEq(0)
{
int x=l[1].toInt();
int y=l[2].toInt();
@@ -32,12 +32,12 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p)
// background under equalizer
// needed to only blit onto screen ONCE and not for every band
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
// buffer for view
- mView = new QPixmap ( xs, ys );
+ mView = new TQPixmap ( xs, ys );
mBandWidth=parser()["EqualizerBmp"][1].toInt();
mBandHalfHeight=parser()["EqualizerBmp"][2].toInt();
@@ -47,7 +47,7 @@ KJEqualizer::KJEqualizer(const QStringList &l, KJLoader *p)
kdDebug(66666) << "[KJEqualizer] creating VInterpolation for " << mBands << " bands..." << endl;
mInterpEq = new VInterpolation(mBands);
// napp->vequalizer()->setBands(mBands); // FIXME: hack because spline sucks :P
- connect(napp->vequalizer(), SIGNAL(changed()), this, SLOT(slotUpdateBuffer()));
+ connect(napp->vequalizer(), TQT_SIGNAL(changed()), this, TQT_SLOT(slotUpdateBuffer()));
slotUpdateBuffer(); // fill mView pixmap with valid data
}
@@ -59,38 +59,38 @@ KJEqualizer::~KJEqualizer(void)
delete mBack;
}
-int KJEqualizer::barNum(const QPoint &pos) const
+int KJEqualizer::barNum(const TQPoint &pos) const
{
int x = pos.x();
x = x / mXSpace;
return mInterpEq->bands() * x / mBands;
}
-int KJEqualizer::level(const QPoint &pos) const
+int KJEqualizer::level(const TQPoint &pos) const
{
int y = ((-pos.y()) + mBandHalfHeight+1) * (200/mBandHalfHeight);
return y;
}
-void KJEqualizer::paint(QPainter *p, const QRect &)
+void KJEqualizer::paint(TQPainter *p, const TQRect &)
{
- QPixmap temp(rect().width(), rect().height());
+ TQPixmap temp(rect().width(), rect().height());
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
// draw band sliders into buffer
bitBlt( &temp, 0, 0, mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP);
// and draw it on screen
- bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP);
+ bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP);
}
void KJEqualizer::slotUpdateBuffer()
{
// kdDebug(66666) << "[KJEqualizer] slotUpdateBuffer() called." << endl;
- QBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask
- QPainter mask( &regionMask );
+ TQBitmap regionMask( rect().width(), rect().height(), true); // fully transparent mask
+ TQPainter mask( &regionMask );
- QPoint destX = QPoint(0, 0);
+ TQPoint destX = TQPoint(0, 0);
for (int band=0; band<mBands; band++)
{
@@ -102,10 +102,10 @@ void KJEqualizer::slotUpdateBuffer()
// kdDebug(66666) << "[KJEqualizer] band=" << band << ", level=" << level << ", picNum=" << picNum << " @ xpos=" << xPos << "." << endl;
- bitBlt(mView, destX, &mBars, QRect(xPos,0,mBandWidth,rect().height()), Qt::CopyROP);
+ bitBlt(mView, destX, &mBars, TQRect(xPos,0,mBandWidth,rect().height()), Qt::CopyROP);
// make slider opaque in mask so you see something on screen
mask.fillRect ( destX.x(), 0, mBandWidth, rect().height(), Qt::color1 );
- destX += QPoint(mXSpace,0);
+ destX += TQPoint(mXSpace,0);
} // for()
// whole thingy has been drawn, now set the mask
@@ -113,13 +113,13 @@ void KJEqualizer::slotUpdateBuffer()
repaint();
}
-void KJEqualizer::mouseMove(const QPoint &p, bool in)
+void KJEqualizer::mouseMove(const TQPoint &p, bool in)
{
if (!in) return;
mousePress(p);
}
-bool KJEqualizer::mousePress(const QPoint &p)
+bool KJEqualizer::mousePress(const TQPoint &p)
{
kdDebug(66666) << "[KJEqualizer] setting band " << mBands << "/" << barNum(p)+1 << " to level " << level(p) << endl;
VBand b = mInterpEq->band( barNum(p) );
diff --git a/noatun/modules/kjofol-skin/kjequalizer.h b/noatun/modules/kjofol-skin/kjequalizer.h
index f3f13bd5..be5535eb 100644
--- a/noatun/modules/kjofol-skin/kjequalizer.h
+++ b/noatun/modules/kjofol-skin/kjequalizer.h
@@ -6,20 +6,20 @@
class KJLoader;
class VInterpolation;
-#include <qobject.h>
+#include <tqobject.h>
-class KJEqualizer : public QObject, public KJWidget
+class KJEqualizer : public TQObject, public KJWidget
{
Q_OBJECT
public:
- KJEqualizer(const QStringList &, KJLoader *parent);
+ KJEqualizer(const TQStringList &, KJLoader *parent);
~KJEqualizer(void);
- virtual void mouseMove(const QPoint &pos, bool);
- virtual bool mousePress(const QPoint&);
- virtual void paint(QPainter *p, const QRect &rect);
- int barNum(const QPoint &pos) const;
- int level(const QPoint &pos) const;
+ virtual void mouseMove(const TQPoint &pos, bool);
+ virtual bool mousePress(const TQPoint&);
+ virtual void paint(TQPainter *p, const TQRect &rect);
+ int barNum(const TQPoint &pos) const;
+ int level(const TQPoint &pos) const;
public slots:
void slotUpdateBuffer();
@@ -30,9 +30,9 @@ private:
int mBandWidth;
int mBandHalfHeight;
- QPixmap mBars; // holds all slider images
- QPixmap *mBack; // holds background of EQ for easy repaint
- QPixmap *mView; // holds prepared img of all sliders
+ TQPixmap mBars; // holds all slider images
+ TQPixmap *mBack; // holds background of EQ for easy repaint
+ TQPixmap *mView; // holds prepared img of all sliders
VInterpolation *mInterpEq;
};
diff --git a/noatun/modules/kjofol-skin/kjfont.cpp b/noatun/modules/kjofol-skin/kjfont.cpp
index df2abed3..c6b16b77 100644
--- a/noatun/modules/kjofol-skin/kjfont.cpp
+++ b/noatun/modules/kjofol-skin/kjfont.cpp
@@ -16,16 +16,16 @@
#include <kdebug.h>
#include <kglobalsettings.h>
-#include <qimage.h>
-#include <qpainter.h>
+#include <tqimage.h>
+#include <tqpainter.h>
/*******************************************
* KJFont
*******************************************/
-KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0)
+KJFont::KJFont(const TQString &prefix, KJLoader *parent) : mTextMask(0), mTransparentRGB(0)
{
-// kdDebug(66666) << "KJFont::KJFont(const QString &prefix, KJLoader *parent)" << prefix.latin1() << endl;
+// kdDebug(66666) << "KJFont::KJFont(const TQString &prefix, KJLoader *parent)" << prefix.latin1() << endl;
if (prefix=="timefont")
{
@@ -86,7 +86,7 @@ KJFont::KJFont(const QString &prefix, KJLoader *parent) : mTextMask(0), mTranspa
// define color in font that will be transparent later on
if ( mTransparent )
{
- QImage ibackground = mText.convertToImage();
+ TQImage ibackground = mText.convertToImage();
mTransparentRGB = ibackground.pixel( ibackground.width()-1, ibackground.height()-1 );
// kdDebug(66666) << "color (" << qRed(mTransparentRGB) << "," << qGreen(mTransparentRGB) << "," << qBlue(mTransparentRGB) << ") will be transparent for " << prefix.latin1() << endl;
mTextMask = KJWidget::getMask(ibackground,mTransparentRGB);
@@ -105,8 +105,8 @@ void KJFont::recalcSysFont(void)
mUseSysFont = KJLoader::kjofol->prefs()->useSysFont();
if (!mUseSysFont)
return;
- sysFont = QFont(KJLoader::kjofol->prefs()->sysFont());
- sysFont.setStyleStrategy( QFont::NoAntialias );
+ sysFont = TQFont(KJLoader::kjofol->prefs()->sysFont());
+ sysFont.setStyleStrategy( TQFont::NoAntialias );
if ( sysFontMetrics )
delete sysFontMetrics;
sysFontColor = KJLoader::kjofol->prefs()->sysFontColor();
@@ -117,7 +117,7 @@ void KJFont::recalcSysFont(void)
for(fSize = mHeight; fSize>=4; fSize--)
{
sysFont.setPixelSize ( fSize );
- sysFontMetrics = new QFontMetrics(sysFont);
+ sysFontMetrics = new TQFontMetrics(sysFont);
// kdDebug(66666) << "wanted fSize=" << fSize << ", metric h=" << sysFontMetrics->height() << endl;
// either found a small enough font or found no proper font at all
if ( sysFontMetrics->height() <= mHeight || fSize==4 )
@@ -129,7 +129,7 @@ void KJFont::recalcSysFont(void)
}
}
-QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const
+TQPixmap KJFont::draw(const TQCString &str, int wide, const TQPoint &pos) const
{
if ( mUseSysFont )
return drawSysFont(str,wide,pos);
@@ -137,24 +137,24 @@ QPixmap KJFont::draw(const QCString &str, int wide, const QPoint &pos) const
return drawPixmapFont(str,wide,pos);
}
-QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) const
+TQPixmap KJFont::drawSysFont(const TQCString &s, int wide, const TQPoint &pos) const
{
// kdDebug(66666) << k_funcinfo << "BEGIN, s='" << s << "'" << endl;
- QPoint to(pos);
- QString string(s);
+ TQPoint to(pos);
+ TQString string(s);
int stringWidth = sysFontMetrics->width( string );
// kdDebug(66666) << "final metrics; w=" << stringWidth << ", h=" << sysFontMetrics->height() << endl;
- QPixmap region(
+ TQPixmap region(
(stringWidth > wide ? stringWidth : wide),
mHeight);
- QPainter rp(&region); // region painter
+ TQPainter rp(&region); // region painter
- QBitmap regionMask(
+ TQBitmap regionMask(
(stringWidth > wide ? stringWidth : wide),
mHeight, true); // fully transparent mask
- QPainter mp(&regionMask); // mask painter
+ TQPainter mp(&regionMask); // mask painter
// kdDebug(66666) << "region; w=" << region.width() << ", h=" << region.height() << endl;
@@ -164,7 +164,7 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons
{
freeSpace = wide - stringWidth;
mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
- to += QPoint ( (freeSpace/2), 0 );
+ to += TQPoint ( (freeSpace/2), 0 );
// kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl;
}
@@ -176,13 +176,13 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons
mp.setPen(Qt::color1);
mp.drawText(to.x(), to.y(), region.width()-freeSpace, mHeight, Qt::AlignLeft|Qt::AlignTop, string);
- to += QPoint(region.width()-freeSpace,0);
+ to += TQPoint(region.width()-freeSpace,0);
// kdDebug(66666) << "text width=" << region.width()-freeSpace << endl;
if (freeSpace > 0)
{
mp.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
- to += QPoint ( (freeSpace/2), 0 );
+ to += TQPoint ( (freeSpace/2), 0 );
// kdDebug(66666) << "centering text, freeSpace=" << freeSpace << endl;
}
@@ -192,22 +192,22 @@ QPixmap KJFont::drawSysFont(const QCString &s, int wide, const QPoint &pos) cons
return region;
}
-QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos) const
+TQPixmap KJFont::drawPixmapFont(const TQCString &str, int wide, const TQPoint &pos) const
{
// kdDebug(66666) << k_funcinfo << "BEGIN" << endl;
- QPoint to(pos);
+ TQPoint to(pos);
- QCString string = str.lower();
- QPixmap region(
+ TQCString string = str.lower();
+ TQPixmap region(
(string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide
? string.length()*mWidth+string.length()*mSpacing : wide),
mHeight);
- QBitmap regionMask(
+ TQBitmap regionMask(
(string.length()*mWidth+string.length()*mSpacing > (unsigned int)wide
? string.length()*mWidth+string.length()*mSpacing : wide),
mHeight, true); // fully transparent mask
- QPainter mask( &regionMask );
+ TQPainter mask( &regionMask );
// kdDebug(66666) << "draw: {" << str << "}" << endl;
@@ -217,7 +217,7 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos)
{
freeSpace = wide - string.length()*mWidth+string.length()*mSpacing;
mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
- to += QPoint ( (freeSpace/2), 0 );
+ to += TQPoint ( (freeSpace/2), 0 );
}
// kdDebug(66666) << k_funcinfo << "pixmap width=" << region.width() << endl;
@@ -229,20 +229,20 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos)
char c = string[charPos]; // the character to be drawn next
drawCharacter(&region, &regionMask, to, c);
- to += QPoint(mWidth, 0);
+ to += TQPoint(mWidth, 0);
// draw according to "spacing"
if ( (charPos < string.length()-1) && mSpacing > 0 )
{ // make the spacing-area transparent
mask.fillRect ( to.x(), 0, mSpacing, mHeight, Qt::color0 );
- to += QPoint ( mSpacing, 0 );
+ to += TQPoint ( mSpacing, 0 );
}
}
if (freeSpace > 0)
{
mask.fillRect ( to.x(), 0, (freeSpace/2), mHeight, Qt::color0 );
- to += QPoint ( (freeSpace/2), 0 );
+ to += TQPoint ( (freeSpace/2), 0 );
}
region.setMask( regionMask );
@@ -250,24 +250,24 @@ QPixmap KJFont::drawPixmapFont(const QCString &str, int wide, const QPoint &pos)
return region;
}
-void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const
+void KJFont::drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const
{
- QPoint src=charSource(c);
+ TQPoint src=charSource(c);
int x=src.x();
int y=src.y();
int xs=mWidth;
int ys=mHeight;
- bitBlt(dev, to, &mText, QRect(x,y,xs,ys), Qt::CopyROP);
+ bitBlt(dev, to, &mText, TQRect(x,y,xs,ys), Qt::CopyROP);
// bitBlt mask for transparency
if ( mTransparent )
{
- bitBlt(devMask, to, &mTextMask, QRect(x,y,xs,ys), Qt::OrROP);
+ bitBlt(devMask, to, &mTextMask, TQRect(x,y,xs,ys), Qt::OrROP);
}
else // fill mask
{
- QPainter tempPainter (devMask);
+ TQPainter tempPainter (devMask);
tempPainter.fillRect ( to.x(), 0, xs,ys, Qt::color1 );
}
}
@@ -276,14 +276,14 @@ void KJFont::drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, cha
#include <string.h>
// searches for top/left coordinate of a given character inside the font-pixmap
-QPoint KJFont::charSource(char c) const
+TQPoint KJFont::charSource(char c) const
{
for (int i=0; i<3; i++)
{
const char *pos = strchr(mString[i], c);
if (!pos) continue;
- return QPoint(mWidth*((int)(pos-mString[i])), mHeight*i);
+ return TQPoint(mWidth*((int)(pos-mString[i])), mHeight*i);
}
return charSource(mNullChar);
diff --git a/noatun/modules/kjofol-skin/kjfont.h b/noatun/modules/kjofol-skin/kjfont.h
index 4ea5319b..a40e7854 100644
--- a/noatun/modules/kjofol-skin/kjfont.h
+++ b/noatun/modules/kjofol-skin/kjfont.h
@@ -1,21 +1,21 @@
#ifndef KJFONT_H
#define KJFONT_H
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqfont.h>
class KJLoader;
class KJFont
{
public:
- KJFont(const QString &prefix, KJLoader *parent);
+ KJFont(const TQString &prefix, KJLoader *parent);
// draw the string str to dev at position pos, within rectangle limit in relation to pos
- QPixmap draw(const QCString &str, int wide, const QPoint &pt=QPoint(0,0)) const;
- QPixmap draw(const QString &str, int wide, const QPoint &pt=QPoint(0,0)) const
- { return draw(QCString(str.latin1()), wide, pt); }
+ TQPixmap draw(const TQCString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const;
+ TQPixmap draw(const TQString &str, int wide, const TQPoint &pt=TQPoint(0,0)) const
+ { return draw(TQCString(str.latin1()), wide, pt); }
int fontHeight() const {return mHeight;}
int fontWidth() const {return mWidth;}
@@ -26,24 +26,24 @@ public:
void recalcSysFont(void);
protected:
- QPixmap drawSysFont(const QCString &s, int wide, const QPoint &pos=QPoint(0,0)) const;
- QPixmap drawPixmapFont(const QCString &, int, const QPoint &pos=QPoint(0,0)) const;
+ TQPixmap drawSysFont(const TQCString &s, int wide, const TQPoint &pos=TQPoint(0,0)) const;
+ TQPixmap drawPixmapFont(const TQCString &, int, const TQPoint &pos=TQPoint(0,0)) const;
- void drawCharacter(QPixmap *dev, QBitmap *devMask, const QPoint &to, char c) const;
- QPoint charSource(char c) const;
+ void drawCharacter(TQPixmap *dev, TQBitmap *devMask, const TQPoint &to, char c) const;
+ TQPoint charSource(char c) const;
private:
- QPixmap mText;
- QBitmap mTextMask;
+ TQPixmap mText;
+ TQBitmap mTextMask;
QRgb mTransparentRGB; // this color will be transparent
int mSpacing;
int mWidth, mHeight;
bool mTransparent; // indicates wether there's transparency
const char *mString[3];
char mNullChar;
- QFontMetrics *sysFontMetrics;
- QFont sysFont;
- QColor sysFontColor;
+ TQFontMetrics *sysFontMetrics;
+ TQFont sysFont;
+ TQColor sysFontColor;
bool mUseSysFont;
};
diff --git a/noatun/modules/kjofol-skin/kjloader.cpp b/noatun/modules/kjofol-skin/kjloader.cpp
index 11f96b7a..7a9d70c4 100644
--- a/noatun/modules/kjofol-skin/kjloader.cpp
+++ b/noatun/modules/kjofol-skin/kjloader.cpp
@@ -41,16 +41,16 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qdragobject.h>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qptrvector.h>
-#include <qvbox.h>
-#include <qlabel.h>
+#include <tqdragobject.h>
+#include <tqimage.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqptrvector.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <kaction.h>
#include <kdebug.h>
@@ -73,19 +73,19 @@ class KJToolTip : public QToolTip
{
public:
KJToolTip(KJLoader *parent)
- : QToolTip(parent), mParent(parent)
+ : TQToolTip(parent), mParent(parent)
{}
protected:
- virtual void maybeTip(const QPoint &p)
+ virtual void maybeTip(const TQPoint &p)
{
if ( !mParent->prefs()->displayTooltips() )
return;
- QPtrList<KJWidget> things=mParent->widgetsAt(p);
+ TQPtrList<KJWidget> things=mParent->widgetsAt(p);
for (KJWidget *i=things.first(); i!=0; i=things.next())
{
- QString string=i->tip();
+ TQString string=i->tip();
if (string.length())
{
tip(i->rect(), string);
@@ -103,7 +103,7 @@ KJLoader *KJLoader::kjofol=0;
KJLoader::KJLoader()
- : QWidget(0, "NoatunKJLoader",
+ : TQWidget(0, "NoatunKJLoader",
WType_TopLevel | WStyle_NoBorder | WRepaintNoErase ),
UserInterface(),
moving(false),
@@ -132,10 +132,10 @@ KJLoader::KJLoader()
subwidgets.setAutoDelete(true);
mPrefs = new KJPrefs(this);
- connect ( mPrefs, SIGNAL(configChanged()), this, SLOT(readConfig()) );
+ connect ( mPrefs, TQT_SIGNAL(configChanged()), this, TQT_SLOT(readConfig()) );
- QString skin = mPrefs->skin();
- if ( QFile(skin).exists() )
+ TQString skin = mPrefs->skin();
+ if ( TQFile(skin).exists() )
{
loadSkin(skin);
}
@@ -147,22 +147,22 @@ KJLoader::KJLoader()
}
mHelpMenu = new KHelpMenu(this, kapp->aboutData());
- connect(napp->player(), SIGNAL(timeout()), SLOT(timeUpdate()));
- connect(napp->player(), SIGNAL(stopped()), SLOT(timeUpdate()));
- connect(napp->player(), SIGNAL(newSong()), SLOT(newSong()));
+ connect(napp->player(), TQT_SIGNAL(timeout()), TQT_SLOT(timeUpdate()));
+ connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(timeUpdate()));
+ connect(napp->player(), TQT_SIGNAL(newSong()), TQT_SLOT(newSong()));
- connect(napp, SIGNAL(hideYourself()), SLOT(hide()));
- connect(napp, SIGNAL(showYourself()), SLOT(show()));
-// KStdAction::quit(napp, SLOT(quit()), actionCollection());
+ connect(napp, TQT_SIGNAL(hideYourself()), TQT_SLOT(hide()));
+ connect(napp, TQT_SIGNAL(showYourself()), TQT_SLOT(show()));
+// KStdAction::quit(napp, TQT_SLOT(quit()), actionCollection());
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// newSong();
}
-QPtrList<KJWidget> KJLoader::widgetsAt(const QPoint &pt) const
+TQPtrList<KJWidget> KJLoader::widgetsAt(const TQPoint &pt) const
{
- QPtrList<KJWidget> things;
- for ( QPtrListIterator<KJWidget> i(subwidgets); i.current(); ++i )
+ TQPtrList<KJWidget> things;
+ for ( TQPtrListIterator<KJWidget> i(subwidgets); i.current(); ++i )
if ( (*i)->rect().contains(pt) )
things.append((*i));
@@ -184,9 +184,9 @@ void KJLoader::addChild(KJWidget *c)
// The BIG one ;)
// this methode does all the hard work on loading these weird skins
-void KJLoader::loadSkin(const QString &file)
+void KJLoader::loadSkin(const TQString &file)
{
-// kdDebug(66666) << "<KJLoader::loadSkin(const QString &file)>" << endl;
+// kdDebug(66666) << "<KJLoader::loadSkin(const TQString &file)>" << endl;
// kdDebug(66666) << " file = " << file.latin1() << endl;
if ( file == mCurrentSkin ) // we don't load the same skin again
@@ -371,12 +371,12 @@ void KJLoader::loadSkin(const QString &file)
// I cant believe it, there are skins without a seeker, now THATS stupid :)
if (exist("seekregion"))
- QTimer::singleShot(0, this, SLOT(loadSeeker()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadSeeker()));
// all the regular buttons
- for (QDictIterator<QStringList> i(*this); i.current(); ++i)
+ for (TQDictIterator<TQStringList> i(*this); i.current(); ++i)
{
- QString d=i.currentKey();
+ TQString d=i.currentKey();
if(d.contains("button") &&
!d.startsWith("playlistwindow") && // don't add buttons that belong to the playlistwindow
d != "pitchcontrolbutton" && // both already handled above as they aren't buttons but sliders
@@ -399,7 +399,7 @@ void KJLoader::loadSkin(const QString &file)
if (napp->player()->isPlaying())
newSong();
-// kdDebug(66666) << "</KJLoader::loadSkin(const QString &file)>" << endl;
+// kdDebug(66666) << "</KJLoader::loadSkin(const TQString &file)>" << endl;
}
void KJLoader::loadSeeker()
@@ -451,19 +451,19 @@ void KJLoader::minimize()
showMinimized();
}
-void KJLoader::closeEvent(QCloseEvent*)
+void KJLoader::closeEvent(TQCloseEvent*)
{
-// kdDebug(66666) << "KJLoader::closeEvent(QCloseEvent*)" << endl;
+// kdDebug(66666) << "KJLoader::closeEvent(TQCloseEvent*)" << endl;
unload();
}
-void KJLoader::dragEnterEvent(QDragEnterEvent *event)
+void KJLoader::dragEnterEvent(TQDragEnterEvent *event)
{
// accept uri drops only
event->accept(KURLDrag::canDecode(event));
}
-void KJLoader::dropEvent(QDropEvent *event)
+void KJLoader::dropEvent(TQDropEvent *event)
{
KURL::List urls;
if ( KURLDrag::decode(event,urls) )
@@ -473,7 +473,7 @@ void KJLoader::dropEvent(QDropEvent *event)
}
}
-void KJLoader::wheelEvent(QWheelEvent *e)
+void KJLoader::wheelEvent(TQWheelEvent *e)
{ // from QT-Docu: delta() is 120 for one step
if (e->state() & ControlButton)
napp->player()->setVolume ( napp->player()->volume() + (e->delta()/8) ); // 15% volumechange
@@ -487,11 +487,11 @@ void KJLoader::switchToDockmode()
// kdDebug(66666) << "KJLoader::switchToDockmode()" << endl;
loadSkin( mCurrentDockModeSkin );
- connect(mWin, SIGNAL(activeWindowChanged(WId)), this, SLOT(slotWindowActivate(WId)));
- connect(mWin, SIGNAL(windowRemoved(WId)), this, SLOT(slotWindowRemove(WId)));
- connect(mWin, SIGNAL(stackingOrderChanged()), this, SLOT(slotStackingChanged()));
- connect(mWin, SIGNAL(windowChanged(WId)), this, SLOT(slotWindowChange(WId)));
- connect(mWin, SIGNAL(currentDesktopChanged(int)), this, SLOT(slotDesktopChange(int)));
+ connect(mWin, TQT_SIGNAL(activeWindowChanged(WId)), this, TQT_SLOT(slotWindowActivate(WId)));
+ connect(mWin, TQT_SIGNAL(windowRemoved(WId)), this, TQT_SLOT(slotWindowRemove(WId)));
+ connect(mWin, TQT_SIGNAL(stackingOrderChanged()), this, TQT_SLOT(slotStackingChanged()));
+ connect(mWin, TQT_SIGNAL(windowChanged(WId)), this, TQT_SLOT(slotWindowChange(WId)));
+ connect(mWin, TQT_SIGNAL(currentDesktopChanged(int)), this, TQT_SLOT(slotDesktopChange(int)));
WId activeWin = mWin->activeWindow();
if (activeWin && (activeWin != winId()))
@@ -676,7 +676,7 @@ void KJLoader::slotStackingChanged()
// We seem to get this signal before the window has been restacked,
// so we just schedule a restack.
- QTimer::singleShot ( 10, this, SLOT(restack()) );
+ TQTimer::singleShot ( 10, this, TQT_SLOT(restack()) );
// kdDebug(66666) << "END slotStackingChanged()" << endl;
}
@@ -708,45 +708,45 @@ KJLoader::~KJLoader()
delete mWin;
}
-void KJLoader::paintEvent(QPaintEvent *e)
+void KJLoader::paintEvent(TQPaintEvent *e)
{
- QPainter p(this);
+ TQPainter p(this);
for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next())
if (i->rect().intersects(e->rect()))
i->paint(&p, e->rect().intersect(i->rect()));
-// QWidget::paintEvent(e);
+// TQWidget::paintEvent(e);
}
-void KJLoader::mouseMoveEvent(QMouseEvent *e)
+void KJLoader::mouseMoveEvent(TQMouseEvent *e)
{
if (moving)
{
- move ( QCursor::pos()-mMousePoint );
+ move ( TQCursor::pos()-mMousePoint );
return;
}
-// QWidget::mouseMoveEvent(e);
+// TQWidget::mouseMoveEvent(e);
// not on background but on a widget: pass event to subwidget
if ( !moving && mClickedIn && subwidgets.findRef(mClickedIn) != -1 )
{
mClickedIn->mouseMove (
e->pos()-mClickedIn->rect().topLeft(),
- mClickedIn->rect().contains(mapFromGlobal(QCursor::pos())) );
+ mClickedIn->rect().contains(mapFromGlobal(TQCursor::pos())) );
}
}
-void KJLoader::mousePressEvent(QMouseEvent *e)
+void KJLoader::mousePressEvent(TQMouseEvent *e)
{
-// kdDebug(66666) << "KJLoader::mousePressEvent(QMouseEvent *e)" << endl;
+// kdDebug(66666) << "KJLoader::mousePressEvent(TQMouseEvent *e)" << endl;
-// QWidget::mousePressEvent(e);
+// TQWidget::mousePressEvent(e);
if ( e->button()==RightButton )
NoatunStdAction::ContextMenu::showContextMenu();
else /* if ( e->button()==LeftButton ) */
{
- mMousePoint = mapFromGlobal(QCursor::pos());
+ mMousePoint = mapFromGlobal(TQCursor::pos());
// try to find a KJWidget that is here
for (KJWidget* i=subwidgets.first(); i!=0; i=subwidgets.next())
if (i->rect().contains(mMousePoint))
@@ -763,18 +763,18 @@ void KJLoader::mousePressEvent(QMouseEvent *e)
}
}
-void KJLoader::mouseReleaseEvent(QMouseEvent */*e*/)
+void KJLoader::mouseReleaseEvent(TQMouseEvent */*e*/)
{
-// kdDebug(66666) << "KJLoader::mouseReleaseEvent(QMouseEvent *e)" << endl;
+// kdDebug(66666) << "KJLoader::mouseReleaseEvent(TQMouseEvent *e)" << endl;
-// QWidget::mouseReleaseEvent(e);
+// TQWidget::mouseReleaseEvent(e);
if (!moving && mClickedIn && subwidgets.findRef(mClickedIn)!=-1)
{
- mClickedIn->mouseRelease(mapFromGlobal(QCursor::pos())-
+ mClickedIn->mouseRelease(mapFromGlobal(TQCursor::pos())-
mClickedIn->rect().topLeft(),
mClickedIn->rect().contains(
- mapFromGlobal(QCursor::pos())));
+ mapFromGlobal(TQCursor::pos())));
mClickedIn=0;
}
@@ -804,17 +804,17 @@ void KJLoader::readConfig()
void KJLoader::showSplash()
{
- splashScreen = new QLabel( 0L, "SplashScreen",
+ splashScreen = new TQLabel( 0L, "SplashScreen",
WType_TopLevel | WStyle_NoBorder | WRepaintNoErase | WX11BypassWM );
- QPixmap splashPix = pixmap(item("splashscreen")[1]);
+ TQPixmap splashPix = pixmap(item("splashscreen")[1]);
splashScreen->setPixmap( splashPix );
splashScreen->setBackgroundMode ( NoBackground );
splashScreen->setMask( KJWidget::getMask(image(item("splashscreen")[1])) );
- QSize sh = splashScreen->sizeHint();
+ TQSize sh = splashScreen->sizeHint();
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
splashScreen->move (desk.x() + (desk.width() - sh.width())/2,
desk.y() + (desk.height() - sh.height())/2 );
@@ -822,7 +822,7 @@ void KJLoader::showSplash()
splashScreen->show();
napp->processEvents(); // we want this one time to get the splash actually displayed ASAP
- QTimer::singleShot(3000, this, SLOT(hideSplash()) );
+ TQTimer::singleShot(3000, this, TQT_SLOT(hideSplash()) );
}
void KJLoader::hideSplash()
diff --git a/noatun/modules/kjofol-skin/kjloader.h b/noatun/modules/kjofol-skin/kjloader.h
index 44b507d6..2510b14d 100644
--- a/noatun/modules/kjofol-skin/kjloader.h
+++ b/noatun/modules/kjofol-skin/kjloader.h
@@ -13,10 +13,10 @@
#include <noatun/app.h>
// system includes
-#include <qwidget.h>
-#include <qbitmap.h>
-#include <qptrlist.h>
-#include <qcstring.h>
+#include <tqwidget.h>
+#include <tqbitmap.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
#include <kwinmodule.h>
@@ -30,7 +30,7 @@ class KJFont;
class KJPrefs;
-class KJLoader : public QWidget, public UserInterface, public Parser
+class KJLoader : public TQWidget, public UserInterface, public Parser
{
Q_OBJECT
NOATUNPLUGIND
@@ -43,30 +43,30 @@ public:
public:
void minimize();
KHelpMenu *helpMenu() const { return mHelpMenu; }
- QStringList &item(const QString &key) { return *Parser::find(key); }
+ TQStringList &item(const TQString &key) { return *Parser::find(key); }
// returns path to currently loaded configfile
// can be either a newly loaded one or one of the three below
- QString currentSkin() { return mCurrentSkin; }
+ TQString currentSkin() { return mCurrentSkin; }
// returns path to mainskin-configfile
- QString currentDefaultSkin() { return mCurrentDefaultSkin; }
+ TQString currentDefaultSkin() { return mCurrentDefaultSkin; }
//returns path to dockmode-configfile if present
- QString currentDockModeSkin() { return mCurrentDockModeSkin; }
+ TQString currentDockModeSkin() { return mCurrentDockModeSkin; }
//returns path to winshademode-configfile if present (not supported yet)
- QString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; }
+ TQString currentWinshadeModeSkin() { return mCurrentWinshadeModeSkin; }
KJPrefs *prefs() const { return mPrefs; }
- QPtrList<KJWidget> widgetsAt(const QPoint &pt) const;
+ TQPtrList<KJWidget> widgetsAt(const TQPoint &pt) const;
void removeChild(KJWidget *c);
void addChild(KJWidget *c);
public slots:
- void loadSkin(const QString &file);
+ void loadSkin(const TQString &file);
void readConfig();
void switchToDockmode();
void returnFromDockmode();
@@ -90,15 +90,15 @@ private slots:
void hideSplash();
protected:
- virtual void mouseMoveEvent(QMouseEvent *e);
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
- virtual void paintEvent(QPaintEvent *e);
- virtual void closeEvent(QCloseEvent*e);
- virtual void wheelEvent(QWheelEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void mouseReleaseEvent(TQMouseEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
+ virtual void closeEvent(TQCloseEvent*e);
+ virtual void wheelEvent(TQWheelEvent *e);
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
public:
static KJLoader* kjofol;
@@ -108,20 +108,20 @@ private:
KWinModule *mWin;
WId mDockToWin;
int mDockPositionX, mDockPositionY, mDockPosition;
- QRect mDockWindowRect;
+ TQRect mDockWindowRect;
// ==== end of docking stuff ====
bool moving;
- QPoint mMousePoint;
- QPtrList<KJWidget> subwidgets;
+ TQPoint mMousePoint;
+ TQPtrList<KJWidget> subwidgets;
KJWidget *mClickedIn;
KHelpMenu *mHelpMenu;
KJFont *mText, *mNumbers, *mVolumeFont, *mPitchFont;
- QLabel *splashScreen;
+ TQLabel *splashScreen;
KJToolTip *mTooltips;
- QString mCurrentSkin;
- QString mCurrentDefaultSkin;
- QString mCurrentDockModeSkin;
- QString mCurrentWinshadeModeSkin;
+ TQString mCurrentSkin;
+ TQString mCurrentDefaultSkin;
+ TQString mCurrentDockModeSkin;
+ TQString mCurrentWinshadeModeSkin;
KJPrefs *mPrefs;
};
diff --git a/noatun/modules/kjofol-skin/kjprefs.cpp b/noatun/modules/kjofol-skin/kjprefs.cpp
index 0cadc5ac..4231d0ff 100644
--- a/noatun/modules/kjofol-skin/kjprefs.cpp
+++ b/noatun/modules/kjofol-skin/kjprefs.cpp
@@ -14,19 +14,19 @@
#include "parser.h"
// system includes
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qpixmap.h>
-#include <qtabwidget.h>
-#include <qtextbrowser.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqpixmap.h>
+#include <tqtabwidget.h>
+#include <tqtextbrowser.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <knuminput.h>
#include <kconfig.h>
@@ -43,19 +43,19 @@
#include <kfontcombo.h>
#include <kcolorcombo.h>
-static QString expand(QString s);
+static TQString expand(TQString s);
-KJPrefs::KJPrefs(QObject* parent)
+KJPrefs::KJPrefs(TQObject* parent)
: CModule(i18n("K-Jöfol Skins"), i18n("Skin Selection For the K-Jöfol Plugin"), "style", parent)
{
cfg = KGlobal::config();
- QVBoxLayout *vbox = new QVBoxLayout(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(this);
vbox->setAutoAdd(true);
vbox->setSpacing( 0 );
vbox->setMargin( 0 );
- mTabWidget = new QTabWidget( this, "mTabWidget" );
+ mTabWidget = new TQTabWidget( this, "mTabWidget" );
mSkinselectorWidget = new KJSkinselector ( mTabWidget, "mSkinselectorWidget" );
mGuiSettingsWidget = new KJGuiSettings ( mTabWidget, "mGuiSettingsWidget" );
@@ -63,9 +63,9 @@ KJPrefs::KJPrefs(QObject* parent)
mTabWidget->insertTab( mSkinselectorWidget, i18n("&Skin Selector") );
mTabWidget->insertTab( mGuiSettingsWidget, i18n("O&ther Settings") );
- connect ( mSkinselectorWidget->mSkins, SIGNAL(activated(const QString&)), SLOT(showPreview(const QString&)) );
- connect ( mSkinselectorWidget->installButton, SIGNAL(clicked()), this, SLOT(installNewSkin()) );
- connect ( mSkinselectorWidget->mRemoveButton, SIGNAL(clicked()), this, SLOT(removeSelectedSkin()) );
+ connect ( mSkinselectorWidget->mSkins, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(showPreview(const TQString&)) );
+ connect ( mSkinselectorWidget->installButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(installNewSkin()) );
+ connect ( mSkinselectorWidget->mRemoveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelectedSkin()) );
reopen(); // fill the skinlist and draw a preview
}
@@ -88,7 +88,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog
mGuiSettingsWidget->useSysFont->setChecked( cfg->readBoolEntry("Use SysFont", false) );
mGuiSettingsWidget->cmbSysFont->setCurrentFont(
cfg->readEntry("SysFont Family", KGlobalSettings::generalFont().family()) );
- QColor tmpColor = QColor(255,255,255);
+ TQColor tmpColor = TQColor(255,255,255);
mGuiSettingsWidget->cmbSysFontColor->setColor(
cfg->readColorEntry("SysFont Color", &tmpColor));
@@ -127,18 +127,18 @@ void KJPrefs::reopen() // reload config and set stuff in dialog
break;
}
- QStringList skins;
- QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
+ TQStringList skins;
+ TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
// iterate through all paths where Noatun is searching for kjofol-skins
for (uint i = 0; i < skinLocations.count(); ++i )
{
- QStringList skinDirs = QDir(skinLocations[i]).entryList();
+ TQStringList skinDirs = TQDir(skinLocations[i]).entryList();
// iterate trough all dirs (normally, users can fsck every dir-struct *g*) containing a skin
for (uint k = 2; k < skinDirs.count(); ++k )
{
- QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files );
+ TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
// make a list of all .rc-files in a skindir
- QStringList rcFiles = skinDirCnt.entryList();
+ TQStringList rcFiles = skinDirCnt.entryList();
// iterate trough all those rc.-files in a skindir
for (uint j = 0; j < rcFiles.count(); j++ )
{
@@ -150,14 +150,14 @@ void KJPrefs::reopen() // reload config and set stuff in dialog
skins.sort();
- QString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") );
+ TQString loaded = cfg->readEntry("SkinResource", locate("data", "noatun/skins/kjofol/kjofol/kjofol.rc") );
loaded = loaded.mid(loaded.findRev("/")+1); // remove path
loaded = loaded.left( loaded.length() - 3 ); // remove ".rc"
mSkinselectorWidget->mSkins->clear();
int index = 0;
- for (QStringList::Iterator i=skins.begin(); i!=skins.end(); ++i)
+ for (TQStringList::Iterator i=skins.begin(); i!=skins.end(); ++i)
{
*i = (*i).left( (*i).length() - 3 );
mSkinselectorWidget->mSkins->insertItem(*i);
@@ -174,7 +174,7 @@ void KJPrefs::reopen() // reload config and set stuff in dialog
void KJPrefs::save()
{
// kdDebug(66666) << k_funcinfo << "called." << endl;
- QString skin=::expand ( mSkinselectorWidget->mSkins->currentText() );
+ TQString skin=::expand ( mSkinselectorWidget->mSkins->currentText() );
// first load skin and then save config to prevent
// reloading a broken skin after a crash
@@ -206,7 +206,7 @@ void KJPrefs::save()
emit configChanged();
}
-QString KJPrefs::skin( void ) const
+TQString KJPrefs::skin( void ) const
{
// return full path to currently loaded skin
return ::expand( mSkinselectorWidget->mSkins->currentText() );
@@ -312,24 +312,24 @@ void KJPrefs::setUseSysFont( bool mode )
save(); // not sure if that's a good idea or doing saving by hand in here
}
-QFont KJPrefs::sysFont(void) const
+TQFont KJPrefs::sysFont(void) const
{
- QString family = mGuiSettingsWidget->cmbSysFont->currentFont();
+ TQString family = mGuiSettingsWidget->cmbSysFont->currentFont();
// kdDebug(66666) << k_funcinfo << "family=" << family << endl;
- return QFont( family );
+ return TQFont( family );
}
-void KJPrefs::setSysFont(QFont &fnt)
+void KJPrefs::setSysFont(TQFont &fnt)
{
mGuiSettingsWidget->cmbSysFont->setCurrentFont( fnt.family() );
}
-QColor KJPrefs::sysFontColor(void) const
+TQColor KJPrefs::sysFontColor(void) const
{
return mGuiSettingsWidget->cmbSysFontColor->color();
}
-void KJPrefs::sysFontColor(QColor &c)
+void KJPrefs::sysFontColor(TQColor &c)
{
mGuiSettingsWidget->cmbSysFontColor->setColor( c );
}
@@ -345,19 +345,19 @@ bool KJPrefs::displaySplash( void ) const
}
-void KJPrefs::showPreview(const QString &_skin)
+void KJPrefs::showPreview(const TQString &_skin)
{
Parser p;
p.open( ::expand(_skin) );
- QImage image = p.image(p["BackgroundImage"][1]);
+ TQImage image = p.image(p["BackgroundImage"][1]);
if (!image.isNull())
{
mPixmap.convertFromImage(image);
mPixmap.setMask( KJWidget::getMask(image) );
}
else
- mPixmap=QPixmap();
+ mPixmap=TQPixmap();
mSkinselectorWidget->mPreview->setPixmap(mPixmap);
mSkinselectorWidget->mAboutText->setText(p.about());
@@ -406,7 +406,7 @@ void KJPrefs::installNewSkin( void )
// create a dir with name of the skinarchive
// path to unpack to: pathToTmp/filename.ext/
- QString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" );
+ TQString tmpUnpackPath = locateLocal("tmp", srcFile.fileName()+"/" );
kdDebug(66666) << "tmpUnpackPath: " << tmpUnpackPath.latin1() << endl;
// Our extract-process, TODO: wanna have kio_(un)zip instead :)
@@ -429,10 +429,10 @@ void KJPrefs::installNewSkin( void )
return;
}
- QDir tmpCnt = QDir ( tmpUnpackPath );
- tmpCnt.setFilter ( QDir::Dirs );
+ TQDir tmpCnt = TQDir ( tmpUnpackPath );
+ tmpCnt.setFilter ( TQDir::Dirs );
- QStringList dirList = tmpCnt.entryList();
+ TQStringList dirList = tmpCnt.entryList();
// Iterate trough all subdirs of tmpUnpackPath (including "."!)
for ( unsigned int i = 0; i < dirList.count(); i++ )
{
@@ -440,8 +440,8 @@ void KJPrefs::installNewSkin( void )
if ( dirList[i] == ".." )
continue;
- QDir tmpSubCnt = QDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", QDir::Name|QDir::IgnoreCase, QDir::Files );
- kdDebug(66666) << "Searching for *.rc in " << QString(tmpUnpackPath+dirList[i]).latin1() << endl;
+ TQDir tmpSubCnt = TQDir( tmpUnpackPath + dirList[i], "*.rc;*.RC;*.Rc;*.rC", TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
+ kdDebug(66666) << "Searching for *.rc in " << TQString(tmpUnpackPath+dirList[i]).latin1() << endl;
// oh, no .rc file in current dir, let's go to next dir in list
if ( tmpSubCnt.count() == 0 )
@@ -488,7 +488,7 @@ void KJPrefs::installNewSkin( void )
kdDebug(66666) << "src: " << src.path().latin1() << endl;
kdDebug(66666) << "dst: " << dst.path().latin1() << endl;
KIO::Job *job = KIO::copy(src,dst);
- connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) );
+ connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) );
skinInstalled = true;
}
} // END iterate trough dirList
@@ -508,43 +508,43 @@ void KJPrefs::installNewSkin( void )
void KJPrefs::removeSelectedSkin( void )
{
- QString question = i18n("Are you sure you want to remove %1?\n"
+ TQString question = i18n("Are you sure you want to remove %1?\n"
"This will delete the files installed by this skin ").
arg ( mSkinselectorWidget->mSkins->currentText() );
cfg->setGroup("KJofol-Skins");
- QString loadedSkin = cfg->readEntry("SkinResource", "kjofol");
-// kdDebug(66666) << "loaded Skin Name: " << QFileInfo(loadedSkin).baseName().latin1() << endl;
+ TQString loadedSkin = cfg->readEntry("SkinResource", "kjofol");
+// kdDebug(66666) << "loaded Skin Name: " << TQFileInfo(loadedSkin).baseName().latin1() << endl;
int r = KMessageBox::warningContinueCancel ( this, question, i18n("Confirmation"), KStdGuiItem::del() );
if ( r != KMessageBox::Continue )
return;
- bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == QFileInfo(loadedSkin).baseName() );
+ bool deletingCurrentSkin = ( mSkinselectorWidget->mSkins->currentText() == TQFileInfo(loadedSkin).baseName() );
// Now find the dir to delete !!!
- QString dirToDelete = QString ("");
- QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
+ TQString dirToDelete = TQString ("");
+ TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
// iterate through all paths where Noatun is searching for kjofol-skins
for (uint i = 0; i < skinLocations.count(); ++i )
{
- QStringList skinDirs = QDir(skinLocations[i]).entryList();
+ TQStringList skinDirs = TQDir(skinLocations[i]).entryList();
// iterate trough all dirs containing a skin
for (uint k = 0; k < skinDirs.count(); ++k )
{
- QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files );
+ TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
// make a list of all .rc-files in a skindir
- QStringList rcFiles = skinDirCnt.entryList();
+ TQStringList rcFiles = skinDirCnt.entryList();
// iterate trough all those rc.-files in a skindir
for (uint j = 0; j < rcFiles.count(); j++ )
{
if ( rcFiles[j].left(rcFiles[j].length()-3) == mSkinselectorWidget->mSkins->currentText() ) // found skinname.rc :)
{
- dirToDelete = QString ( skinLocations[i]+skinDirs[k] );
+ dirToDelete = TQString ( skinLocations[i]+skinDirs[k] );
kdDebug(66666) << "FOUND SKIN @ " << dirToDelete.latin1() << endl;
}
}
@@ -555,7 +555,7 @@ void KJPrefs::removeSelectedSkin( void )
{
kdDebug(66666) << "Deleting Skindir: " << dirToDelete.latin1() << endl;
KIO::Job *job = KIO::del( dirToDelete, false, true );
- connect ( job, SIGNAL(result(KIO::Job*)), this, SLOT(slotResult(KIO::Job*)) );
+ connect ( job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotResult(KIO::Job*)) );
}
int item = -1;
@@ -597,51 +597,51 @@ void KJPrefs::slotResult(KIO::Job *job )
// takes name of rc-file without .rc at the end and returns full path to rc-file
-static QString expand(QString s)
+static TQString expand(TQString s)
{
// kdDebug(66666) << "expand( "<< s.latin1() << " )" << endl;
- QStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
+ TQStringList skinLocations = KGlobal::dirs()->findDirs("data", "noatun/skins/kjofol");
// iterate through all paths where Noatun is searching for kjofol-skins
for (uint i = 0; i < skinLocations.count(); ++i )
{
- QStringList skinDirs = QDir(skinLocations[i]).entryList();
+ TQStringList skinDirs = TQDir(skinLocations[i]).entryList();
// iterate trough all dirs containing a skin
for (uint k = 0; k < skinDirs.count(); ++k )
{
- QDir skinDirCnt = QDir ( skinLocations[i]+skinDirs[k], "*.rc", QDir::Name|QDir::IgnoreCase, QDir::Files );
+ TQDir skinDirCnt = TQDir ( skinLocations[i]+skinDirs[k], "*.rc", TQDir::Name|TQDir::IgnoreCase, TQDir::Files );
// make a list of all .rc-files in a skindir
- QStringList rcFiles = skinDirCnt.entryList();
+ TQStringList rcFiles = skinDirCnt.entryList();
// iterate trough all those rc.-files in a skindir
for (uint j = 0; j < rcFiles.count(); j++ )
{
if ( rcFiles[j].left(rcFiles[j].length()-3) == s ) // found $s.rc :)
{
-// kdDebug(66666) << "expand() found: " << QString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl;
+// kdDebug(66666) << "expand() found: " << TQString(skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]).latin1() << endl;
return (skinLocations[i]+skinDirs[k]+"/"+rcFiles[j]);
}
}
}
}
- return QString();
+ return TQString();
}
-QString filenameNoCase(const QString &filename, int badNodes)
+TQString filenameNoCase(const TQString &filename, int badNodes)
{
- QStringList names=QStringList::split('/', filename);
- QString full;
+ TQStringList names=TQStringList::split('/', filename);
+ TQString full;
int number=(int)names.count();
- for (QStringList::Iterator i=names.begin(); i!=names.end(); ++i)
+ for (TQStringList::Iterator i=names.begin(); i!=names.end(); ++i)
{
full+="/";
if (number<=badNodes)
{
- QDir d(full);
- QStringList files=d.entryList();
- files=files.grep(QRegExp("^"+ (*i) + "$", false));
+ TQDir d(full);
+ TQStringList files=d.entryList();
+ files=files.grep(TQRegExp("^"+ (*i) + "$", false));
if (!files.count())
return "";
*i=files.grep(*i, false)[0];
diff --git a/noatun/modules/kjofol-skin/kjprefs.h b/noatun/modules/kjofol-skin/kjprefs.h
index ce1725d5..fcd6dc98 100644
--- a/noatun/modules/kjofol-skin/kjprefs.h
+++ b/noatun/modules/kjofol-skin/kjprefs.h
@@ -6,7 +6,7 @@
#include "kjguisettingswidget.h"
// system includes
-#include <qwidget.h>
+#include <tqwidget.h>
#include <noatun/pref.h>
#include <kio/job.h>
@@ -26,7 +26,7 @@ class KJPrefs : public CModule
{
Q_OBJECT
public:
- KJPrefs(QObject* parent);
+ KJPrefs(TQObject* parent);
// Save which Skin is currently selected
virtual void save();
@@ -34,7 +34,7 @@ public:
// Rebuild the Skinlist
virtual void reopen();
- QString skin( void ) const;
+ TQString skin( void ) const;
int minimumPitch( void ) const;
int maximumPitch( void ) const;
@@ -50,11 +50,11 @@ public:
bool useSysFont( void ) const;
void setUseSysFont( bool );
- QFont sysFont(void) const;
- void setSysFont(QFont&);
+ TQFont sysFont(void) const;
+ void setSysFont(TQFont&);
- QColor sysFontColor(void) const;
- void sysFontColor(QColor &);
+ TQColor sysFontColor(void) const;
+ void sysFontColor(TQColor &);
bool displayTooltips( void ) const;
bool displaySplash( void ) const;
@@ -67,7 +67,7 @@ public slots:
void removeSelectedSkin ( void );
// Show a preview of "skin" in mPixmap
- void showPreview(const QString &skin);
+ void showPreview(const TQString &skin);
// gets called after a KIO-action has finished
// KIO is used for installing/removing skins
@@ -77,11 +77,11 @@ signals:
void configChanged();
private:
- QPixmap mPixmap; // preview Pixmap
+ TQPixmap mPixmap; // preview Pixmap
KConfig *cfg;
// Dialog-Widgets
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
KJSkinselector *mSkinselectorWidget;
KJGuiSettings *mGuiSettingsWidget;
};
@@ -91,6 +91,6 @@ private:
* badNodes is the amount of directories/files (at the end)
* that aren't known)
**/
-QString filenameNoCase(const QString &filename, int badNodes=1);
+TQString filenameNoCase(const TQString &filename, int badNodes=1);
#endif // KJPREFS_H
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());
}
diff --git a/noatun/modules/kjofol-skin/kjseeker.h b/noatun/modules/kjofol-skin/kjseeker.h
index 78fea6fb..048d5127 100644
--- a/noatun/modules/kjofol-skin/kjseeker.h
+++ b/noatun/modules/kjofol-skin/kjseeker.h
@@ -5,32 +5,32 @@
//#include "kjloader.h"
class KJLoader;
-#include <qpainter.h>
+#include <tqpainter.h>
class KJSeeker : public KJWidget
{
public:
- KJSeeker(const QStringList &i, KJLoader *);
+ KJSeeker(const TQStringList &i, KJLoader *);
~KJSeeker();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &pos, bool);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &pos, bool);
void timeUpdate(int mille);
void closest();
private:
- QPixmap *toPixmap(int n);
+ TQPixmap *toPixmap(int n);
private:
- QImage mScale;
- QImage mActive;
- QPixmap *barmode[256];
- QImage *barmodeImages[256];
- QBitmap barModeMask;
+ TQImage mScale;
+ TQImage mActive;
+ TQPixmap *barmode[256];
+ TQImage *barmodeImages[256];
+ TQBitmap barModeMask;
int g;
};
diff --git a/noatun/modules/kjofol-skin/kjsliders.cpp b/noatun/modules/kjofol-skin/kjsliders.cpp
index 8cadd04f..7b884853 100644
--- a/noatun/modules/kjofol-skin/kjsliders.cpp
+++ b/noatun/modules/kjofol-skin/kjsliders.cpp
@@ -32,7 +32,7 @@
* KJVolumeBar
*******************************************/
-KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p)
+KJVolumeBar::KJVolumeBar(const TQStringList &i, KJLoader *p)
: KJWidget(p), mVolume(0), mText(0)
{
int x, y, xs, ys;
@@ -48,18 +48,18 @@ KJVolumeBar::KJVolumeBar(const QStringList &i, KJLoader *p)
mSlider = parent()->pixmap(parser()["volumecontrolimage"][1]);
}
-QString KJVolumeBar::tip()
+TQString KJVolumeBar::tip()
{
return i18n("Volume");
}
-void KJVolumeBar::paint(QPainter *p, const QRect &)
+void KJVolumeBar::paint(TQPainter *p, const TQRect &)
{
// kdDebug(66666) << "x: " << rect().x() << " y: " << rect().y() << endl;
// kdDebug(66666) << "vol x: " << rect().x()+(mVolume*rect().width())/100 << endl;
// center of that slider-pixmap
-// QPoint hotSpot = QPoint( mSlider.width()/2, mSlider.height()/2 );
+// TQPoint hotSpot = TQPoint( mSlider.width()/2, mSlider.height()/2 );
// draw our background
bitBlt(
@@ -89,7 +89,7 @@ void KJVolumeBar::paint(QPainter *p, const QRect &)
mText->repaint();
}
-bool KJVolumeBar::mousePress(const QPoint &pos)
+bool KJVolumeBar::mousePress(const TQPoint &pos)
{
mVolume = (pos.x()*100) / rect().width();
// kdDebug(66666) << "volume: " << mVolume << endl;
@@ -98,11 +98,11 @@ bool KJVolumeBar::mousePress(const QPoint &pos)
return true;
}
-void KJVolumeBar::mouseRelease(const QPoint &, bool)
+void KJVolumeBar::mouseRelease(const TQPoint &, bool)
{
}
-void KJVolumeBar::mouseMove(const QPoint &pos, bool in)
+void KJVolumeBar::mouseMove(const TQPoint &pos, bool in)
{
if (!in)
return;
@@ -120,7 +120,7 @@ void KJVolumeBar::timeUpdate(int)
* KJVolumeBMP
*******************************************/
-KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p)
+KJVolumeBMP::KJVolumeBMP(const TQStringList &i, KJLoader *p)
: KJWidget(p), mVolume(0), mOldVolume(0), mText(0)
{
int x, y, xs, ys;
@@ -138,20 +138,20 @@ KJVolumeBMP::KJVolumeBMP(const QStringList &i, KJLoader *p)
timeUpdate(0);
}
-QString KJVolumeBMP::tip()
+TQString KJVolumeBMP::tip()
{
return i18n("Volume");
}
-void KJVolumeBMP::paint(QPainter *p, const QRect &)
+void KJVolumeBMP::paint(TQPainter *p, const TQRect &)
{
- QRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height());
+ TQRect from(mVolume*mCount/100*mWidth, 0, mWidth, mImages.height());
bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP);
if (mText)
mText->repaint();
}
-bool KJVolumeBMP::mousePress(const QPoint &pos)
+bool KJVolumeBMP::mousePress(const TQPoint &pos)
{
QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() );
@@ -169,10 +169,10 @@ bool KJVolumeBMP::mousePress(const QPoint &pos)
return true;
}
-void KJVolumeBMP::mouseRelease(const QPoint &, bool)
+void KJVolumeBMP::mouseRelease(const TQPoint &, bool)
{}
-void KJVolumeBMP::mouseMove(const QPoint &pos, bool in)
+void KJVolumeBMP::mouseMove(const TQPoint &pos, bool in)
{
if (!in) return;
mousePress(pos);
@@ -195,7 +195,7 @@ void KJVolumeBMP::timeUpdate(int)
* KJPitchBMP
*******************************************/
-KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p)
+KJPitchBMP::KJPitchBMP(const TQStringList &i, KJLoader *p)
: KJWidget(p), mText(0)
{
int x = i[1].toInt();
@@ -212,7 +212,7 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p)
mPos = parent()->image(parser()["pitchcontrolimageposition"][1]);
// makes all pixels with rgb(255,0,255) transparent
- QImage ibackground;
+ TQImage ibackground;
ibackground = parent()->image(parser()["pitchcontrolimage"][1]);
mImages.setMask( getMask(ibackground) );
@@ -239,16 +239,16 @@ KJPitchBMP::KJPitchBMP(const QStringList &i, KJLoader *p)
mText->repaint();
}
-QString KJPitchBMP::tip()
+TQString KJPitchBMP::tip()
{
return i18n("Pitch");
}
-void KJPitchBMP::paint(QPainter *p, const QRect &)
+void KJPitchBMP::paint(TQPainter *p, const TQRect &)
{
float xPos = (int)((mCurrentPitch-mMinPitch)*100.0) * mCount / (int)((mMaxPitch-mMinPitch)*100.0) * mWidth;
- QRect from( (int)xPos, 0, mWidth, mImages.height());
+ TQRect from( (int)xPos, 0, mWidth, mImages.height());
bitBlt(p->device(), rect().topLeft(), &mImages, from, Qt::CopyROP);
@@ -256,7 +256,7 @@ void KJPitchBMP::paint(QPainter *p, const QRect &)
mText->repaint();
}
-bool KJPitchBMP::mousePress(const QPoint &pos)
+bool KJPitchBMP::mousePress(const TQPoint &pos)
{
QRgb color = mPos.pixel ( rect().topLeft().x()+pos.x(), rect().topLeft().y()+pos.y() );
@@ -273,10 +273,10 @@ bool KJPitchBMP::mousePress(const QPoint &pos)
return true;
}
-void KJPitchBMP::mouseRelease(const QPoint &, bool)
+void KJPitchBMP::mouseRelease(const TQPoint &, bool)
{}
-void KJPitchBMP::mouseMove(const QPoint &pos, bool in)
+void KJPitchBMP::mouseMove(const TQPoint &pos, bool in)
{
if (!in) return;
mousePress(pos);
diff --git a/noatun/modules/kjofol-skin/kjsliders.h b/noatun/modules/kjofol-skin/kjsliders.h
index 94f10934..bd3c3324 100644
--- a/noatun/modules/kjofol-skin/kjsliders.h
+++ b/noatun/modules/kjofol-skin/kjsliders.h
@@ -2,7 +2,7 @@
#define KJSLIDERS_H
#include "kjwidget.h"
-#include <qpainter.h>
+#include <tqpainter.h>
class KJLoader;
class KJPitchText;
@@ -12,21 +12,21 @@ class KJVolumeText;
class KJVolumeBMP : public KJWidget
{
public:
- KJVolumeBMP(const QStringList &, KJLoader *parent);
+ KJVolumeBMP(const TQStringList &, KJLoader *parent);
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &pos, bool);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &pos, bool);
virtual void timeUpdate(int);
- virtual void mouseMove(const QPoint &pos, bool);
+ virtual void mouseMove(const TQPoint &pos, bool);
- virtual QString tip();
+ virtual TQString tip();
void setText(KJVolumeText *t) { mText=t; }
private:
- QPixmap mImages;
- QImage mPos;
+ TQPixmap mImages;
+ TQImage mPos;
int mVolume, mOldVolume;
int mWidth, mCount;
KJVolumeText *mText;
@@ -36,21 +36,21 @@ private:
class KJVolumeBar : public KJWidget
{
public:
- KJVolumeBar(const QStringList &, KJLoader *parent);
+ KJVolumeBar(const TQStringList &, KJLoader *parent);
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &pos, bool);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &pos, bool);
virtual void timeUpdate(int);
- virtual void mouseMove(const QPoint &pos, bool);
+ virtual void mouseMove(const TQPoint &pos, bool);
- virtual QString tip();
+ virtual TQString tip();
void setText(KJVolumeText *t) { mText=t; }
private:
- QPixmap mSlider;
- QPixmap mBack;
+ TQPixmap mSlider;
+ TQPixmap mBack;
int mVolume;
KJVolumeText *mText;
};
@@ -59,23 +59,23 @@ private:
class KJPitchBMP : public KJWidget
{
public:
- KJPitchBMP(const QStringList &, KJLoader *parent);
+ KJPitchBMP(const TQStringList &, KJLoader *parent);
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &pos, bool);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &pos, bool);
virtual void timeUpdate(int);
virtual void newFile();
- virtual void mouseMove(const QPoint &pos, bool);
+ virtual void mouseMove(const TQPoint &pos, bool);
virtual void readConfig();
- virtual QString tip();
+ virtual TQString tip();
void setText(KJPitchText *t) { mText=t; }
private:
- QPixmap mImages;
- QImage mPos;
+ TQPixmap mImages;
+ TQImage mPos;
int mWidth, mCount;
float mCurrentPitch;
float mOldPitch;
diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.cpp b/noatun/modules/kjofol-skin/kjtextdisplay.cpp
index 89f92526..c1a17139 100644
--- a/noatun/modules/kjofol-skin/kjtextdisplay.cpp
+++ b/noatun/modules/kjofol-skin/kjtextdisplay.cpp
@@ -35,8 +35,8 @@
* KJFilename
*******************************************/
-KJFilename::KJFilename(const QStringList &l, KJLoader *p)
- : QObject(0), KJWidget(p), mBack(0)
+KJFilename::KJFilename(const TQStringList &l, KJLoader *p)
+ : TQObject(0), KJWidget(p), mBack(0)
{
int x = l[1].toInt();
int y = l[2].toInt();
@@ -50,8 +50,8 @@ KJFilename::KJFilename(const QStringList &l, KJLoader *p)
ys = textFont().fontHeight();
// background under filename-scroller
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect(x,y,xs,ys);
@@ -72,9 +72,9 @@ KJFilename::~KJFilename()
delete mBack;
}
-void KJFilename::paint(QPainter *p, const QRect &)
+void KJFilename::paint(TQPainter *p, const TQRect &)
{
- QPixmap temp ( rect().width(), rect().height() );
+ TQPixmap temp ( rect().width(), rect().height() );
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
@@ -82,17 +82,17 @@ void KJFilename::paint(QPainter *p, const QRect &)
bitBlt( &temp, 0, 0, &mView, 0, 0, rect().width(), rect().height(), Qt::CopyROP);
// and draw it on screen
bitBlt(p->device(), rect().topLeft(), &temp,
- QRect(0,0,-1,-1), Qt::CopyROP);
+ TQRect(0,0,-1,-1), Qt::CopyROP);
}
-void KJFilename::timerEvent(QTimerEvent *)
+void KJFilename::timerEvent(TQTimerEvent *)
{
int height = mView.height();
int width = mView.width();
- QBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask
- QPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap
- QBitmap newMask ( *mView.mask() ); // save old mask
+ TQBitmap cycleMask ( mDistance, height ); // temporary-space for moving parts of the mask
+ TQPixmap cycle ( mDistance, height ); // temporary-space for moving parts of the pixmap
+ TQBitmap newMask ( *mView.mask() ); // save old mask
// copy mask like the same way we're doing it with the pixmap
// a mask does not get copied on a bitblt automatically, we have to do
@@ -111,12 +111,12 @@ void KJFilename::timerEvent(QTimerEvent *)
repaint();
}
-bool KJFilename::mousePress(const QPoint &)
+bool KJFilename::mousePress(const TQPoint &)
{
return true;
}
-void KJFilename::mouseRelease(const QPoint &, bool in)
+void KJFilename::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
@@ -145,7 +145,7 @@ void KJFilename::readConfig()
mLastTitle=""; // invalidate title so it gets repainted on next timeUpdate()
}
-void KJFilename::prepareString(const QCString &str)
+void KJFilename::prepareString(const TQCString &str)
{
killTimers(); // i.e. stop timers
@@ -159,19 +159,19 @@ void KJFilename::timeUpdate(int)
if ( !napp->player()->current() ) // just for safety
return;
- QCString title = QCString( napp->player()->current().title().local8Bit() );
+ TQCString title = TQCString( napp->player()->current().title().local8Bit() );
if ( title == mLastTitle )
return;
mLastTitle = title;
- QCString timestring = napp->player()->lengthString().local8Bit();
+ TQCString timestring = napp->player()->lengthString().local8Bit();
timestring = timestring.mid(timestring.find('/')+1);
prepareString ( title + " (" + timestring + ") ");
}
-QString KJFilename::tip()
+TQString KJFilename::tip()
{
if ( !napp->player()->current() ) // just for safety
return i18n("Filename");
@@ -184,7 +184,7 @@ QString KJFilename::tip()
* KJTime
*******************************************/
-KJTime::KJTime(const QStringList &l, KJLoader *p)
+KJTime::KJTime(const TQStringList &l, KJLoader *p)
: KJWidget(p), mBack(0)
{
int x = l[1].toInt();
@@ -204,8 +204,8 @@ KJTime::KJTime(const QStringList &l, KJLoader *p)
xs = maxNeededWidth;
// background under time-display
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect(x,y,xs,ys);
@@ -220,10 +220,10 @@ KJTime::~KJTime()
delete mBack;
}
-void KJTime::paint(QPainter *p, const QRect &)
+void KJTime::paint(TQPainter *p, const TQRect &)
{
-// kdDebug(66666) << "KJTime::paint(QPainter *p, const QRect &)" << endl;
- QPixmap temp ( rect().width(), rect().height() );
+// kdDebug(66666) << "KJTime::paint(TQPainter *p, const TQRect &)" << endl;
+ TQPixmap temp ( rect().width(), rect().height() );
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
@@ -232,15 +232,15 @@ void KJTime::paint(QPainter *p, const QRect &)
// and draw it on screen
bitBlt(p->device(), rect().topLeft(), &temp,
- QRect(0,0, rect().width(), rect().height()), Qt::CopyROP);
+ TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP);
}
-bool KJTime::mousePress(const QPoint &)
+bool KJTime::mousePress(const TQPoint &)
{
return true;
}
-void KJTime::mouseRelease(const QPoint &, bool in)
+void KJTime::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
@@ -258,10 +258,10 @@ void KJTime::readConfig()
mLastTime=""; // invalidate time so it gets repainted on next timeUpdate()
}
-QString KJTime::lengthString ( void )
+TQString KJTime::lengthString ( void )
{
int pos = 0;
- QString posString;
+ TQString posString;
int secs = 0,
seconds = 0,
minutes = 0,
@@ -316,9 +316,9 @@ void KJTime::timeUpdate(int)
// kdDebug(66666) << "END KJTime::timeUpdate(int)" << endl;
}
-void KJTime::prepareString(const QCString &str)
+void KJTime::prepareString(const TQCString &str)
{
-// kdDebug(66666) << "START KJTime::prepareString(const QCString &str)" << endl;
+// kdDebug(66666) << "START KJTime::prepareString(const TQCString &str)" << endl;
if ( str == mLastTime )
return;
@@ -326,10 +326,10 @@ void KJTime::prepareString(const QCString &str)
mTime = timeFont().draw(str, rect().width());
repaint();
-// kdDebug(66666) << "END KJTime::prepareString(const QCString &str)" << endl;
+// kdDebug(66666) << "END KJTime::prepareString(const TQCString &str)" << endl;
}
-QString KJTime::tip()
+TQString KJTime::tip()
{
if ( countDown )
return i18n("Play time left");
@@ -342,7 +342,7 @@ QString KJTime::tip()
* KJVolumeText
*******************************************/
-KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p)
+KJVolumeText::KJVolumeText(const TQStringList &l, KJLoader *p)
: KJWidget(p), mBack(0)
{
int x=l[1].toInt();
@@ -362,8 +362,8 @@ KJVolumeText::KJVolumeText(const QStringList &l, KJLoader *p)
xs = tempWidth;
// background under volumetext-display
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect(x,y,xs,ys);
@@ -376,9 +376,9 @@ KJVolumeText::~KJVolumeText()
delete mBack;
}
-void KJVolumeText::paint(QPainter *p, const QRect &)
+void KJVolumeText::paint(TQPainter *p, const TQRect &)
{
- QPixmap temp ( rect().width(), rect().height() );
+ TQPixmap temp ( rect().width(), rect().height() );
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
@@ -387,10 +387,10 @@ void KJVolumeText::paint(QPainter *p, const QRect &)
// and draw it on screen
bitBlt(p->device(), rect().topLeft(), &temp,
- QRect(0,0,-1,-1), Qt::CopyROP);
+ TQRect(0,0,-1,-1), Qt::CopyROP);
}
-bool KJVolumeText::mousePress(const QPoint &)
+bool KJVolumeText::mousePress(const TQPoint &)
{
return false;
}
@@ -403,7 +403,7 @@ void KJVolumeText::readConfig()
void KJVolumeText::timeUpdate(int)
{
- QCString volume;
+ TQCString volume;
if (!napp->player()->current())
return;
@@ -413,7 +413,7 @@ void KJVolumeText::timeUpdate(int)
prepareString(volume);
}
-void KJVolumeText::prepareString(const QCString &str)
+void KJVolumeText::prepareString(const TQCString &str)
{
if ( str == mLastVolume )
return;
@@ -424,7 +424,7 @@ void KJVolumeText::prepareString(const QCString &str)
repaint();
}
-QString KJVolumeText::tip()
+TQString KJVolumeText::tip()
{
return i18n("Volume");
}
@@ -434,7 +434,7 @@ QString KJVolumeText::tip()
* KJPitchText
*******************************************/
-KJPitchText::KJPitchText(const QStringList &l, KJLoader *p)
+KJPitchText::KJPitchText(const TQStringList &l, KJLoader *p)
: KJWidget(p), mBack(0)
{
int x = l[1].toInt();
@@ -452,8 +452,8 @@ KJPitchText::KJPitchText(const QStringList &l, KJLoader *p)
xs = tempWidth;
// background under time-display
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect(x,y,xs,ys);
@@ -467,24 +467,24 @@ KJPitchText::~KJPitchText()
}
-void KJPitchText::paint(QPainter *p, const QRect &)
+void KJPitchText::paint(TQPainter *p, const TQRect &)
{
- QPixmap temp ( rect().width(), rect().height() );
+ TQPixmap temp ( rect().width(), rect().height() );
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
// draw time-display into buffer
bitBlt( &temp, 0, 0, &mSpeed, 0, 0, rect().width(), rect().height(), Qt::CopyROP);
// and draw it on screen
- bitBlt(p->device(), rect().topLeft(), &temp, QRect(0,0,-1,-1), Qt::CopyROP);
+ bitBlt(p->device(), rect().topLeft(), &temp, TQRect(0,0,-1,-1), Qt::CopyROP);
}
-bool KJPitchText::mousePress(const QPoint &)
+bool KJPitchText::mousePress(const TQPoint &)
{
return true;
}
-void KJPitchText::mouseRelease(const QPoint &, bool in)
+void KJPitchText::mouseRelease(const TQPoint &, bool in)
{
if (!in)
return;
@@ -506,7 +506,7 @@ void KJPitchText::readConfig()
void KJPitchText::timeUpdate(int)
{
- QCString speed;
+ TQCString speed;
if (!napp->player()->current())
return;
@@ -521,7 +521,7 @@ void KJPitchText::timeUpdate(int)
prepareString ( speed );
}
-void KJPitchText::prepareString(const QCString &str)
+void KJPitchText::prepareString(const TQCString &str)
{
if ( str == mLastPitch )
return;
@@ -532,7 +532,7 @@ void KJPitchText::prepareString(const QCString &str)
repaint();
}
-QString KJPitchText::tip()
+TQString KJPitchText::tip()
{
return i18n("Pitch");
}
@@ -542,7 +542,7 @@ QString KJPitchText::tip()
* KJFileInfo
*******************************************/
-KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p)
+KJFileInfo::KJFileInfo(const TQStringList &l, KJLoader *p)
: KJWidget(p), mBack(0)
{
mInfoType = l[0]; // type of info-display
@@ -564,8 +564,8 @@ KJFileInfo::KJFileInfo(const QStringList &l, KJLoader *p)
xs = maxNeededWidth;
// background under info-display
- QPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = p->pixmap(p->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect(x,y,xs,ys);
@@ -578,9 +578,9 @@ KJFileInfo::~KJFileInfo()
delete mBack;
}
-void KJFileInfo::paint(QPainter *p, const QRect &)
+void KJFileInfo::paint(TQPainter *p, const TQRect &)
{
- QPixmap temp ( rect().width(), rect().height() );
+ TQPixmap temp ( rect().width(), rect().height() );
// draw background into buffer
bitBlt ( &temp, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP );
@@ -589,10 +589,10 @@ void KJFileInfo::paint(QPainter *p, const QRect &)
// and draw it on screen
bitBlt(p->device(), rect().topLeft(), &temp,
- QRect(0,0, rect().width(), rect().height()), Qt::CopyROP);
+ TQRect(0,0, rect().width(), rect().height()), Qt::CopyROP);
}
-bool KJFileInfo::mousePress(const QPoint &)
+bool KJFileInfo::mousePress(const TQPoint &)
{
return false;
}
@@ -609,7 +609,7 @@ void KJFileInfo::timeUpdate(int)
return;
const PlaylistItem &item = napp->player()->current();
- QString prop;
+ TQString prop;
if ( mInfoType == "mp3khzwindow" )
{
@@ -628,7 +628,7 @@ void KJFileInfo::timeUpdate(int)
prepareString( prop.latin1() );
}
-void KJFileInfo::prepareString(const QCString &str)
+void KJFileInfo::prepareString(const TQCString &str)
{
if ( str == mLastTime )
return;
@@ -637,14 +637,14 @@ void KJFileInfo::prepareString(const QCString &str)
repaint();
}
-QString KJFileInfo::tip()
+TQString KJFileInfo::tip()
{
if ( mInfoType == "mp3khzwindow" )
return i18n("Sample rate in kHz");
else if ( mInfoType == "mp3kbpswindow" )
return i18n("Bitrate in kbps");
- return QString();
+ return TQString();
}
#include "kjtextdisplay.moc"
diff --git a/noatun/modules/kjofol-skin/kjtextdisplay.h b/noatun/modules/kjofol-skin/kjtextdisplay.h
index 11098b0c..893efac0 100644
--- a/noatun/modules/kjofol-skin/kjtextdisplay.h
+++ b/noatun/modules/kjofol-skin/kjtextdisplay.h
@@ -6,35 +6,35 @@ class KJLoader;
class KPixmap;
//#include "kjloader.h"
-#include <qobject.h>
-#include <qpainter.h>
+#include <tqobject.h>
+#include <tqpainter.h>
-class KJFilename : public QObject, public KJWidget
+class KJFilename : public TQObject, public KJWidget
{
Q_OBJECT
public:
- KJFilename(const QStringList &, KJLoader *parent);
+ KJFilename(const TQStringList &, KJLoader *parent);
~KJFilename();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &, bool in);
// virtual void newFile();
virtual void timeUpdate(int);
virtual void readConfig();
- void prepareString(const QCString &str);
- virtual QString tip();
+ void prepareString(const TQCString &str);
+ virtual TQString tip();
- virtual void timerEvent(QTimerEvent *);
+ virtual void timerEvent(TQTimerEvent *);
private:
- QCString mLastTitle;
+ TQCString mLastTitle;
int mDistance;
int mTimerUpdates;
int mWidth;
int mTickerPos;
- QPixmap mView;
+ TQPixmap mView;
KPixmap *mBack;
};
@@ -42,29 +42,29 @@ private:
class KJTime : public KJWidget
{
public:
- KJTime(const QStringList &, KJLoader *parent);
+ KJTime(const TQStringList &, KJLoader *parent);
~KJTime();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void timeUpdate(int);
virtual void readConfig();
- void prepareString(const QCString &time);
- virtual QString tip();
+ void prepareString(const TQCString &time);
+ virtual TQString tip();
// enum countModes { Up=0, Down };
private:
- QCString mLastTime;
+ TQCString mLastTime;
int mWidth;
bool countDown;
- QPixmap mTime;
+ TQPixmap mTime;
KPixmap *mBack;
private:
- QString lengthString ( void );
+ TQString lengthString ( void );
};
@@ -72,21 +72,21 @@ private:
class KJVolumeText : public KJWidget
{
public:
- KJVolumeText(const QStringList &, KJLoader *parent);
+ KJVolumeText(const TQStringList &, KJLoader *parent);
~KJVolumeText();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
virtual void timeUpdate(int);
virtual void readConfig();
- void prepareString(const QCString &time);
- virtual QString tip();
+ void prepareString(const TQCString &time);
+ virtual TQString tip();
private:
- QCString mLastVolume;
+ TQCString mLastVolume;
int mWidth;
- QPixmap mVolume;
+ TQPixmap mVolume;
KPixmap *mBack;
};
@@ -94,22 +94,22 @@ private:
class KJPitchText : public KJWidget
{
public:
- KJPitchText(const QStringList &, KJLoader *parent);
+ KJPitchText(const TQStringList &, KJLoader *parent);
~KJPitchText();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void timeUpdate(int);
virtual void readConfig();
- void prepareString(const QCString &time);
- virtual QString tip();
+ void prepareString(const TQCString &time);
+ virtual TQString tip();
private:
- QCString mLastPitch;
+ TQCString mLastPitch;
int mWidth;
- QPixmap mSpeed;
+ TQPixmap mSpeed;
KPixmap *mBack;
};
@@ -117,22 +117,22 @@ private:
class KJFileInfo : public KJWidget
{
public:
- KJFileInfo(const QStringList &, KJLoader *parent);
+ KJFileInfo(const TQStringList &, KJLoader *parent);
~KJFileInfo();
- virtual void paint(QPainter *, const QRect &rect);
- virtual bool mousePress(const QPoint &pos);
+ virtual void paint(TQPainter *, const TQRect &rect);
+ virtual bool mousePress(const TQPoint &pos);
virtual void timeUpdate(int);
virtual void readConfig();
- void prepareString(const QCString &time);
- virtual QString tip();
+ void prepareString(const TQCString &time);
+ virtual TQString tip();
private:
- QCString mLastTime;
- QString mInfoType;
+ TQCString mLastTime;
+ TQString mInfoType;
int mWidth;
- QPixmap mTime;
+ TQPixmap mTime;
KPixmap *mBack;
};
diff --git a/noatun/modules/kjofol-skin/kjvis.cpp b/noatun/modules/kjofol-skin/kjvis.cpp
index 71246089..3bd40f00 100644
--- a/noatun/modules/kjofol-skin/kjvis.cpp
+++ b/noatun/modules/kjofol-skin/kjvis.cpp
@@ -13,8 +13,8 @@
#include <math.h>
//qt includes
-#include <qpainter.h>
-#include <qsize.h>
+#include <tqpainter.h>
+#include <tqsize.h>
//kde includes
#include <kdebug.h>
@@ -35,7 +35,7 @@
void KJVisScope::swapScope(Visuals newOne)
{
//kdDebug(66666) << k_funcinfo << endl;
- QStringList line = parent()->item("analyzerwindow");
+ TQStringList line = parent()->item("analyzerwindow");
KJLoader *p=parent();
p->removeChild(this);
delete this;
@@ -66,7 +66,7 @@ void KJVisScope::swapScope(Visuals newOne)
* KJNullScope
*******************************************/
-KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent)
+KJNullScope::KJNullScope(const TQStringList &l, KJLoader *parent)
: KJVisScope(parent)
{
int x = l[1].toInt();
@@ -75,25 +75,25 @@ KJNullScope::KJNullScope(const QStringList &l, KJLoader *parent)
int ys = l[4].toInt() - y;
// background under vis
- QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
setRect ( x, y, xs, ys );
repaint();
}
-void KJNullScope::paint(QPainter *p, const QRect &)
+void KJNullScope::paint(TQPainter *p, const TQRect &)
{
// just redraw the background
- bitBlt ( p->device(), rect().topLeft(), mBack, QRect(0,0,-1,-1), Qt::CopyROP );
+ bitBlt ( p->device(), rect().topLeft(), mBack, TQRect(0,0,-1,-1), Qt::CopyROP );
}
-bool KJNullScope::mousePress(const QPoint &)
+bool KJNullScope::mousePress(const TQPoint &)
{
return true;
}
-void KJNullScope::mouseRelease(const QPoint &, bool in)
+void KJNullScope::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
@@ -118,7 +118,7 @@ void KJNullScope::readConfig()
* KJFFT - Analyzer like visualization, mono
*************************************************/
-KJFFT::KJFFT(const QStringList &l, KJLoader *parent)
+KJFFT::KJFFT(const TQStringList &l, KJLoader *parent)
: KJVisScope(parent), MonoFFTScope(50), mGradient(0)
{
int x = l[1].toInt();
@@ -131,7 +131,7 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent)
if ( parent->exist("analyzercolor") )
{
- QStringList &col = parser()["analyzercolor"];
+ TQStringList &col = parser()["analyzercolor"];
mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() );
}
else // TODO: what should be default colors for Vis?
@@ -140,15 +140,15 @@ KJFFT::KJFFT(const QStringList &l, KJLoader *parent)
}
// background under vis
- QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
- mAnalyzer = new KPixmap ( QSize(xs,ys) );
+ mAnalyzer = new KPixmap ( TQSize(xs,ys) );
bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
// create a gradient for the bars going from 30% lighter to 30% darker than mColor
- mGradient = new KPixmap ( QSize(xs,ys) );
+ mGradient = new KPixmap ( TQSize(xs,ys) );
KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF),
mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient );
@@ -170,8 +170,8 @@ void KJFFT::scopeEvent(float *d, int size)
int x = 0;
int h = rect().height();
- QBitmap mGradientMask ( rect().width(), h, true );
- QPainter mask( &mGradientMask );
+ TQBitmap mGradientMask ( rect().width(), h, true );
+ TQPainter mask( &mGradientMask );
float *start = d ;
float *end = d + size /*- 1*/;
@@ -206,20 +206,20 @@ void KJFFT::scopeEvent(float *d, int size)
repaint();
}
-void KJFFT::paint(QPainter *p, const QRect &)
+void KJFFT::paint(TQPainter *p, const TQRect &)
{
// put that thing on screen
if ( !napp->player()->isStopped() )
- bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP );
+ bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP );
}
-bool KJFFT::mousePress(const QPoint &)
+bool KJFFT::mousePress(const TQPoint &)
{
return true;
}
-void KJFFT::mouseRelease(const QPoint &, bool in)
+void KJFFT::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
@@ -250,7 +250,7 @@ void KJFFT::readConfig()
* KJStereoFFT - Analyzer like visualization, stereo
*************************************************/
-KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent)
+KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent)
: KJVisScope(parent), StereoFFTScope(50), mGradient(0)
{
//kdDebug(66666) << k_funcinfo << endl;
@@ -265,7 +265,7 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent)
if ( parent->exist("analyzercolor") )
{
- QStringList &col = parser()["analyzercolor"];
+ TQStringList &col = parser()["analyzercolor"];
mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() );
}
else // TODO: what should be default colors for Vis?
@@ -274,15 +274,15 @@ KJStereoFFT::KJStereoFFT(const QStringList &l, KJLoader *parent)
}
// background under vis
- QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
- mAnalyzer = new KPixmap ( QSize(xs,ys) );
+ mAnalyzer = new KPixmap ( TQSize(xs,ys) );
bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
// create a gradient for the bars going from 30% lighter to 30% darker than mColor
- mGradient = new KPixmap ( QSize(xs,ys) );
+ mGradient = new KPixmap ( TQSize(xs,ys) );
KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF),
mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient );
@@ -304,8 +304,8 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len)
unsigned int h = rect().height();
int hh = (int)(rect().height()/2);
- QBitmap mGradientMask ( rect().width(), h, true );
- QPainter mask( &mGradientMask );
+ TQBitmap mGradientMask ( rect().width(), h, true );
+ TQPainter mask( &mGradientMask );
float *start = left;
float *end = left + len;
@@ -359,19 +359,19 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len)
repaint();
}
-void KJStereoFFT::paint(QPainter *p, const QRect &)
+void KJStereoFFT::paint(TQPainter *p, const TQRect &)
{
// put that thing on screen
if ( !napp->player()->isStopped() )
- bitBlt ( p->device(), rect().topLeft(), mAnalyzer, QRect(0,0,-1,-1), Qt::CopyROP );
+ bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP );
}
-bool KJStereoFFT::mousePress(const QPoint &)
+bool KJStereoFFT::mousePress(const TQPoint &)
{
return true;
}
-void KJStereoFFT::mouseRelease(const QPoint &, bool in)
+void KJStereoFFT::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
@@ -399,7 +399,7 @@ void KJStereoFFT::readConfig()
* KJScope - oscilloscope like visualization
*************************************************/
-KJScope::KJScope(const QStringList &l, KJLoader *parent)
+KJScope::KJScope(const TQStringList &l, KJLoader *parent)
: KJVisScope(parent), MonoScope(50)/*, blurnum(0), mOsci(0)*/
{
int x=l[1].toInt();
@@ -413,22 +413,22 @@ KJScope::KJScope(const QStringList &l, KJLoader *parent)
if ( parent->exist("analyzercolor") )
{
- QStringList &col = parser()["analyzercolor"];
+ TQStringList &col = parser()["analyzercolor"];
mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() );
}
else // FIXME: what should be default colors for Vis?
mColor.setRgb ( 255, 255, 255 );
// background under vis
- QPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
- mBack = new KPixmap ( QSize(xs,ys) );
+ TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]);
+ mBack = new KPixmap ( TQSize(xs,ys) );
bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
- mOsci = new KPixmap ( QSize(xs,ys) );
+ mOsci = new KPixmap ( TQSize(xs,ys) );
bitBlt( mOsci, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP );
// create a gradient
- mGradient = new KPixmap ( QSize(xs,ys) );
+ mGradient = new KPixmap ( TQSize(xs,ys) );
KPixmapEffect::gradient ( *mGradient, mColor.light(_KJ_GRADIENT_DIFF),
mColor.dark(_KJ_GRADIENT_DIFF), KPixmapEffect::VerticalGradient );
@@ -459,7 +459,7 @@ void KJScope::scopeEvent(float *d, int size)
int heightHalf = rect().height()/2 /* -1 */;
int x = 0;
- QPainter tempP( mOsci );
+ TQPainter tempP( mOsci );
if ( blurnum == 3 )
{ // clear whole Vis
@@ -487,12 +487,12 @@ void KJScope::scopeEvent(float *d, int size)
// tempP.drawLine(x, heightHalf, x, heightHalf+amp);
if ( amp > 0 )
{
- bitBlt ( tempP.device(), QPoint(x,heightHalf), mGradient, QRect(x,heightHalf,1,amp), Qt::CopyROP );
+ bitBlt ( tempP.device(), TQPoint(x,heightHalf), mGradient, TQRect(x,heightHalf,1,amp), Qt::CopyROP );
}
else
{
amp = -amp;
- bitBlt ( tempP.device(), QPoint(x,heightHalf-amp), mGradient, QRect(x,(heightHalf-amp),1,amp), Qt::CopyROP );
+ bitBlt ( tempP.device(), TQPoint(x,heightHalf-amp), mGradient, TQRect(x,(heightHalf-amp),1,amp), Qt::CopyROP );
}
x++;
}
@@ -500,18 +500,18 @@ void KJScope::scopeEvent(float *d, int size)
repaint();
}
-void KJScope::paint(QPainter *p, const QRect &)
+void KJScope::paint(TQPainter *p, const TQRect &)
{
// put that thing on screen
- bitBlt ( p->device(), rect().topLeft(), mOsci, QRect(0,0,-1,-1), Qt::CopyROP );
+ bitBlt ( p->device(), rect().topLeft(), mOsci, TQRect(0,0,-1,-1), Qt::CopyROP );
}
-bool KJScope::mousePress(const QPoint &)
+bool KJScope::mousePress(const TQPoint &)
{
return true;
}
-void KJScope::mouseRelease(const QPoint &, bool in)
+void KJScope::mouseRelease(const TQPoint &, bool in)
{
if (!in) // only do something if users is still inside the button
return;
diff --git a/noatun/modules/kjofol-skin/kjvis.h b/noatun/modules/kjofol-skin/kjvis.h
index d2a43700..a05103d8 100644
--- a/noatun/modules/kjofol-skin/kjvis.h
+++ b/noatun/modules/kjofol-skin/kjvis.h
@@ -19,10 +19,10 @@ public:
class KJNullScope : public KJVisScope
{
public:
- KJNullScope(const QStringList &, KJLoader *parent);
- virtual void paint(QPainter *p, const QRect &);
- virtual bool mousePress(const QPoint&);
- virtual void mouseRelease(const QPoint &, bool in);
+ KJNullScope(const TQStringList &, KJLoader *parent);
+ virtual void paint(TQPainter *p, const TQRect &);
+ virtual bool mousePress(const TQPoint&);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void readConfig(void);
private:
@@ -35,16 +35,16 @@ private:
class KJFFT : public KJVisScope, public MonoFFTScope
{
public:
- KJFFT(const QStringList &, KJLoader *parent);
- virtual void paint(QPainter *p, const QRect &);
+ KJFFT(const TQStringList &, KJLoader *parent);
+ virtual void paint(TQPainter *p, const TQRect &);
virtual void scopeEvent(float *d, int size);
- virtual bool mousePress(const QPoint&);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual bool mousePress(const TQPoint&);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void readConfig(void);
private:
- QColor mColor;
+ TQColor mColor;
KPixmap *mGradient;
KPixmap *mBack;
KPixmap *mAnalyzer;
@@ -57,16 +57,16 @@ private:
class KJStereoFFT : public KJVisScope, public StereoFFTScope
{
public:
- KJStereoFFT(const QStringList &, KJLoader *parent);
- virtual void paint(QPainter *p, const QRect &);
+ KJStereoFFT(const TQStringList &, KJLoader *parent);
+ virtual void paint(TQPainter *p, const TQRect &);
virtual void scopeEvent(float *left, float *right, int len);
- virtual bool mousePress(const QPoint&);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual bool mousePress(const TQPoint&);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void readConfig(void);
private:
- QColor mColor;
+ TQColor mColor;
KPixmap *mGradient;
KPixmap *mBack;
KPixmap *mAnalyzer;
@@ -79,16 +79,16 @@ private:
class KJScope : public KJVisScope, public MonoScope
{
public:
- KJScope ( const QStringList &, KJLoader *parent);
- virtual void paint(QPainter *p, const QRect &);
+ KJScope ( const TQStringList &, KJLoader *parent);
+ virtual void paint(TQPainter *p, const TQRect &);
virtual void scopeEvent(float *d, int size);
- virtual bool mousePress(const QPoint&);
- virtual void mouseRelease(const QPoint &, bool in);
+ virtual bool mousePress(const TQPoint&);
+ virtual void mouseRelease(const TQPoint &, bool in);
virtual void readConfig(void);
private:
- QColor mColor;
+ TQColor mColor;
KPixmap *mGradient;
KPixmap *mBack;
KPixmap *mOsci;
diff --git a/noatun/modules/kjofol-skin/kjwidget.cpp b/noatun/modules/kjofol-skin/kjwidget.cpp
index e7b6a4d1..b46fb651 100644
--- a/noatun/modules/kjofol-skin/kjwidget.cpp
+++ b/noatun/modules/kjofol-skin/kjwidget.cpp
@@ -12,15 +12,15 @@
// ugly static functions and stuff
#include "helpers.cpp"
-#include <qpainter.h>
+#include <tqpainter.h>
KJWidget::KJWidget(KJLoader *p) : mParent(p)
{
}
-QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent)
+TQBitmap KJWidget::getMask(const TQImage &_rect, register QRgb transparent)
{
- QImage result(_rect.width(), _rect.height(), 1,2, QImage::LittleEndian);
+ 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));
@@ -34,36 +34,36 @@ QBitmap KJWidget::getMask(const QImage &_rect, register QRgb transparent)
for(int width=0; width<_rect.width(); width++)
setPixel1BPP(result, width, height, _rect.pixel(width, height)!=transparent);
}
- QBitmap bm;
+ TQBitmap bm;
bm.convertFromImage(result);
return bm;
}
-void KJWidget::repaint(bool me, const QRect &r, bool clear)
+void KJWidget::repaint(bool me, const TQRect &r, bool clear)
{
- QPainter p(parent());
+ TQPainter p(parent());
if (me)
paint(&p, r.isValid() ? r : rect());
else
parent()->repaint(r.isValid() ? r : rect(), clear);
}
-const QString &KJWidget::backgroundPressed(const QString &bmp) const
+const TQString &KJWidget::backgroundPressed(const TQString &bmp) const
{
if(bmp.isEmpty()) // play safe
{
-// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning QString::null!" << endl;
- return QString::null;
+// kdDebug(66666) << k_funcinfo << "empty argument 'bmp', returning TQString::null!" << endl;
+ return TQString::null;
}
// kdDebug(66666) << k_funcinfo << "Returning pressed pixmap for '" << bmp.latin1() << "'" << endl;
// make absolutely sure the wanted backgroundimagepressedX line is there
- QStringList item = parser()["backgroundimagepressed"+QString::number(bmp.mid(3).toInt())];
+ TQStringList item = parser()["backgroundimagepressed"+TQString::number(bmp.mid(3).toInt())];
if(item.count() < 2)
{
// kdDebug(66666) << k_funcinfo << "backgroundimagepressed doesn't have enough keys in its line!" << endl;
- return QString::null;
+ return TQString::null;
}
else
return item[1];
diff --git a/noatun/modules/kjofol-skin/kjwidget.h b/noatun/modules/kjofol-skin/kjwidget.h
index cc7ddf53..3f63671b 100644
--- a/noatun/modules/kjofol-skin/kjwidget.h
+++ b/noatun/modules/kjofol-skin/kjwidget.h
@@ -9,14 +9,14 @@ public:
KJWidget(KJLoader *);
virtual ~KJWidget() {};
// called when the widget should paint
- virtual void paint(QPainter *, const QRect &) {};
+ virtual void paint(TQPainter *, const TQRect &) {};
// called to receive the rect this widget is in
- virtual QRect rect() const { return mRect; }
+ virtual TQRect rect() const { return mRect; }
// called when pressed in this widget
- virtual bool mousePress(const QPoint &) {return false; }
+ virtual bool mousePress(const TQPoint &) {return false; }
// called when the mouse is released after clicked in this widget
- virtual void mouseRelease(const QPoint &, bool){}
- virtual void mouseMove(const QPoint &, bool) {}
+ virtual void mouseRelease(const TQPoint &, bool){}
+ virtual void mouseMove(const TQPoint &, bool) {}
// called with the current time (mille)
virtual void timeUpdate(int) {}
// called when a new song is playing, player() is ready with it too
@@ -26,15 +26,15 @@ public:
// called when the mouse is moved while clicked in this widget
// repaint myself
- virtual void repaint(bool me=true, const QRect &rect=QRect(), bool clear=false);
+ virtual void repaint(bool me=true, const TQRect &rect=TQRect(), bool clear=false);
- virtual QString tip() { return 0; }
+ virtual TQString tip() { return 0; }
public:
- static QBitmap getMask(const QImage &color, register QRgb=qRgb(255,0,255));
+ static TQBitmap getMask(const TQImage &color, register QRgb=qRgb(255,0,255));
protected:
- const QString &backgroundPressed(const QString &bmp) const;
+ const TQString &backgroundPressed(const TQString &bmp) const;
KJLoader *parent() const {return mParent;}
KJLoader &parser() const {return *mParent;}
@@ -43,11 +43,11 @@ protected:
KJFont &volumeFont() const {return *mParent->mVolumeFont;}
KJFont &pitchFont() const {return *mParent->mPitchFont;}
- void setRect(const QRect& rect) {mRect=rect;}
- void setRect(int x, int y, int xs, int ys) {mRect=QRect(x,y,xs,ys);}
+ void setRect(const TQRect& rect) {mRect=rect;}
+ void setRect(int x, int y, int xs, int ys) {mRect=TQRect(x,y,xs,ys);}
private:
KJLoader *mParent;
- QRect mRect;
+ TQRect mRect;
};
#endif
diff --git a/noatun/modules/kjofol-skin/parser.cpp b/noatun/modules/kjofol-skin/parser.cpp
index df5fdc40..aae5b12e 100644
--- a/noatun/modules/kjofol-skin/parser.cpp
+++ b/noatun/modules/kjofol-skin/parser.cpp
@@ -10,14 +10,14 @@
#include "kjprefs.h"
// system includes
-#include <qtextstream.h>
-#include <qimage.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqimage.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kmimemagic.h>
#include <kurl.h>
-Parser::Parser() : QDict<QStringList>(17,false)
+Parser::Parser() : TQDict<TQStringList>(17,false)
{
mSkinAbout="";
mImageCache.setAutoDelete(true);
@@ -29,27 +29,27 @@ void Parser::conserveMemory()
mImageCache.clear();
}
-void Parser::open(const QString &file)
+void Parser::open(const TQString &file)
{
clear();
mImageCache.clear();
mSkinAbout="";
mDir=KURL(file).directory();
- QFile f(file);
+ TQFile f(file);
if ( !f.exists() )
return;
f.open(IO_ReadOnly);
f.at(0);
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while (!stream.eof())
{
- QString line=stream.readLine();
+ TQString line=stream.readLine();
line=line.simplifyWhiteSpace();
if ((!line.length()) || line[0]=='#')
continue;
- QStringList *l=new QStringList(QStringList::split(" ", (line.lower())));
- QString first=l->first();
+ TQStringList *l=new TQStringList(TQStringList::split(" ", (line.lower())));
+ TQString first=l->first();
// special handling for about-texts as the key "about" can appear multiple
// times and thus does not fit into qdict.
@@ -67,17 +67,17 @@ void Parser::open(const QString &file)
}
}
-QString Parser::fileItem(const QString &i) const
+TQString Parser::fileItem(const TQString &i) const
{
return dir()+'/'+i;
}
-QString Parser::dir() const
+TQString Parser::dir() const
{
return mDir;
}
-Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
+Parser::ImagePixmap* Parser::getPair(const TQString &filenameOld) const
{
// is it in there?
ImagePixmap *pair;
@@ -87,9 +87,9 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
return pair;
}
- QString filename=fileItem(filenameOld);
+ TQString filename=fileItem(filenameOld);
- QImage image;
+ TQImage image;
// Determine file-format trough mimetype (no stupid .ext test)
KMimeMagicResult * result = KMimeMagic::self()->findFileType( filename );
@@ -97,7 +97,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
if ( result->mimeType() == "image/png" )
{
// image = NoatunApp::readPNG(filenameNoCase(filename));
- QImageIO iio;
+ TQImageIO iio;
iio.setFileName( filenameNoCase(filename) );
// forget about gamma-value, fix for broken PNGs
iio.setGamma( 0.00000001 );
@@ -113,12 +113,12 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
}
else
{
- image = QImage(filenameNoCase(filename));
+ image = TQImage(filenameNoCase(filename));
}
//add to the cache
- QPixmap pixmap;
- pixmap.convertFromImage(image, QPixmap::AutoColor|QPixmap::ThresholdDither|QPixmap::AvoidDither);
+ TQPixmap pixmap;
+ pixmap.convertFromImage(image, TQPixmap::AutoColor|TQPixmap::ThresholdDither|TQPixmap::AvoidDither);
pair = new Parser::ImagePixmap;
pair->mImage = image;
pair->mPixmap = pixmap;
@@ -126,7 +126,7 @@ Parser::ImagePixmap* Parser::getPair(const QString &filenameOld) const
return pair;
}
-bool Parser::exist(const QString &i) const
+bool Parser::exist(const TQString &i) const
{
return (bool)find(i);
}
diff --git a/noatun/modules/kjofol-skin/parser.h b/noatun/modules/kjofol-skin/parser.h
index 97e20d99..3f691253 100644
--- a/noatun/modules/kjofol-skin/parser.h
+++ b/noatun/modules/kjofol-skin/parser.h
@@ -2,48 +2,48 @@
#define PARSER_H
// system includes
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qdict.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqdict.h>
-class Parser : public QDict<QStringList>
+class Parser : public TQDict<TQStringList>
{
class ImagePixmap
{
public:
ImagePixmap() : mImage(0), mPixmap(0) {}
~ImagePixmap() {}
- QImage mImage;
- QPixmap mPixmap;
+ TQImage mImage;
+ TQPixmap mPixmap;
};
public:
Parser();
void conserveMemory();
- void open(const QString &file);
+ void open(const TQString &file);
- QString dir() const;
- QPixmap pixmap(const QString &pixmap) const
+ TQString dir() const;
+ TQPixmap pixmap(const TQString &pixmap) const
{ return getPair(pixmap)->mPixmap; }
- QImage image(const QString &image) const
+ TQImage image(const TQString &image) const
{ return getPair(image)->mImage; }
- QString about() const { return mSkinAbout; };
+ TQString about() const { return mSkinAbout; };
- QString fileItem(const QString &file) const;
+ TQString fileItem(const TQString &file) const;
- bool exist(const QString &i) const;
+ bool exist(const TQString &i) const;
public:
- QStringList& operator[](const QString &l) { return *find(l);}
+ TQStringList& operator[](const TQString &l) { return *find(l);}
private:
- ImagePixmap *getPair(const QString &i) const;
+ ImagePixmap *getPair(const TQString &i) const;
private:
- mutable QDict<ImagePixmap> mImageCache;
- QString mDir;
- QString mSkinAbout;
+ mutable TQDict<ImagePixmap> mImageCache;
+ TQString mDir;
+ TQString mSkinAbout;
};
#endif // PARSER_H