summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjvis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/kjofol-skin/kjvis.cpp')
-rw-r--r--noatun/modules/kjofol-skin/kjvis.cpp94
1 files changed, 47 insertions, 47 deletions
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;