diff options
Diffstat (limited to 'noatun/modules/kjofol-skin/kjvis.cpp')
-rw-r--r-- | noatun/modules/kjofol-skin/kjvis.cpp | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/noatun/modules/kjofol-skin/kjvis.cpp b/noatun/modules/kjofol-skin/kjvis.cpp index 3bd40f00..8915e434 100644 --- a/noatun/modules/kjofol-skin/kjvis.cpp +++ b/noatun/modules/kjofol-skin/kjvis.cpp @@ -35,8 +35,8 @@ void KJVisScope::swapScope(Visuals newOne) { //kdDebug(66666) << k_funcinfo << endl; - TQStringList line = parent()->item("analyzerwindow"); - KJLoader *p=parent(); + TQStringList line = tqparent()->item("analyzerwindow"); + KJLoader *p=tqparent(); p->removeChild(this); delete this; @@ -66,8 +66,8 @@ void KJVisScope::swapScope(Visuals newOne) * KJNullScope *******************************************/ -KJNullScope::KJNullScope(const TQStringList &l, KJLoader *parent) - : KJVisScope(parent) +KJNullScope::KJNullScope(const TQStringList &l, KJLoader *tqparent) + : KJVisScope(tqparent) { int x = l[1].toInt(); int y = l[2].toInt(); @@ -75,17 +75,17 @@ KJNullScope::KJNullScope(const TQStringList &l, KJLoader *parent) int ys = l[4].toInt() - y; // background under vis - TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + TQPixmap tmp = tqparent->pixmap(tqparent->item("backgroundimage")[1]); mBack = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); setRect ( x, y, xs, ys ); - repaint(); + tqrepaint(); } void KJNullScope::paint(TQPainter *p, const TQRect &) { // just redraw the background - bitBlt ( p->device(), rect().topLeft(), mBack, TQRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mBack, TQRect(0,0,-1,-1), TQt::CopyROP ); } bool KJNullScope::mousePress(const TQPoint &) @@ -98,7 +98,7 @@ void KJNullScope::mouseRelease(const TQPoint &, bool in) if (!in) // only do something if users is still inside the button return; - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope(FFT); } @@ -108,7 +108,7 @@ void KJNullScope::readConfig() Visuals v = (Visuals) KJLoader::kjofol->prefs()->visType(); if ( v != Null ) { - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope ( v ); } } @@ -118,8 +118,8 @@ void KJNullScope::readConfig() * KJFFT - Analyzer like visualization, mono *************************************************/ -KJFFT::KJFFT(const TQStringList &l, KJLoader *parent) - : KJVisScope(parent), MonoFFTScope(50), mGradient(0) +KJFFT::KJFFT(const TQStringList &l, KJLoader *tqparent) + : KJVisScope(tqparent), MonoFFTScope(50), mGradient(0) { int x = l[1].toInt(); int y = l[2].toInt(); @@ -129,7 +129,7 @@ KJFFT::KJFFT(const TQStringList &l, KJLoader *parent) // each bar will be 1px wide mMultiples=1; - if ( parent->exist("analyzercolor") ) + if ( tqparent->exist("analyzercolor") ) { TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); @@ -140,12 +140,12 @@ KJFFT::KJFFT(const TQStringList &l, KJLoader *parent) } // background under vis - TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + TQPixmap tmp = tqparent->pixmap(tqparent->item("backgroundimage")[1]); mBack = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); mAnalyzer = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor mGradient = new KPixmap ( TQSize(xs,ys) ); @@ -163,7 +163,7 @@ void KJFFT::scopeEvent(float *d, int size) if ( !napp->player()->isPlaying() ) // don't draw if we aren't playing (either paused or stopped) { if ( napp->player()->isStopped() ) // clear vis-window if playing has been stopped - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); return; } @@ -171,12 +171,12 @@ void KJFFT::scopeEvent(float *d, int size) int h = rect().height(); TQBitmap mGradientMask ( rect().width(), h, true ); - TQPainter mask( &mGradientMask ); + TQPainter tqmask( &mGradientMask ); float *start = d ; float *end = d + size /*- 1*/; - // loop creating the mask for vis-gradient + // loop creating the tqmask for vis-gradient for ( ; start < end; ++start ) { // 5 has been 8 before and I have no idea how this scaling works :/ @@ -191,26 +191,26 @@ void KJFFT::scopeEvent(float *d, int size) else if ( amp > h ) amp = h; // make a part of the analyzer-gradient visible - mask.fillRect ( x, (h-amp), mMultiples, amp, Qt::color1 ); + tqmask.fillRect ( x, (h-amp), mMultiples, amp, TQt::color1 ); x += mMultiples; } - // done creating our mask + // done creating our tqmask // draw background of vis into it - bitBlt ( mAnalyzer, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt ( mAnalyzer, 0, 0, mBack, 0, 0, -1, -1, TQt::CopyROP ); // draw the analyzer mGradient->setMask(mGradientMask); - bitBlt ( mAnalyzer, 0, 0, mGradient, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt ( mAnalyzer, 0, 0, mGradient, 0, 0, -1, -1, TQt::CopyROP ); - repaint(); + tqrepaint(); } void KJFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), TQt::CopyROP ); } @@ -225,7 +225,7 @@ void KJFFT::mouseRelease(const TQPoint &, bool in) return; stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope(Mono); } @@ -236,7 +236,7 @@ void KJFFT::readConfig() if ( v != FFT ) { stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope ( v ); return; } @@ -250,8 +250,8 @@ void KJFFT::readConfig() * KJStereoFFT - Analyzer like visualization, stereo *************************************************/ -KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent) - : KJVisScope(parent), StereoFFTScope(50), mGradient(0) +KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *tqparent) + : KJVisScope(tqparent), StereoFFTScope(50), mGradient(0) { //kdDebug(66666) << k_funcinfo << endl; @@ -263,7 +263,7 @@ KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent) // each bar will be 1px wide mMultiples=1; - if ( parent->exist("analyzercolor") ) + if ( tqparent->exist("analyzercolor") ) { TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); @@ -274,12 +274,12 @@ KJStereoFFT::KJStereoFFT(const TQStringList &l, KJLoader *parent) } // background under vis - TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + TQPixmap tmp = tqparent->pixmap(tqparent->item("backgroundimage")[1]); mBack = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); mAnalyzer = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mAnalyzer, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); // create a gradient for the bars going from 30% lighter to 30% darker than mColor mGradient = new KPixmap ( TQSize(xs,ys) ); @@ -297,7 +297,7 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) if ( !napp->player()->isPlaying() ) // don't draw if we aren't playing (either paused or stopped) { if ( napp->player()->isStopped() ) // clear vis-window if playing has been stopped - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); return; } @@ -305,7 +305,7 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) int hh = (int)(rect().height()/2); TQBitmap mGradientMask ( rect().width(), h, true ); - TQPainter mask( &mGradientMask ); + TQPainter tqmask( &mGradientMask ); float *start = left; float *end = left + len; @@ -313,7 +313,7 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) int amp = 0; int x = 0; - // loop creating the mask for vis-gradient + // loop creating the tqmask for vis-gradient for ( ; start < end; ++start ) { n = log((*start)+1) * (float)hh * 5; @@ -324,16 +324,16 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) else if ( amp > hh ) amp = hh; // make a part of the analyzer-gradient visible - mask.fillRect ( x, (h-amp), mMultiples, amp, Qt::color1 ); + tqmask.fillRect ( x, (h-amp), mMultiples, amp, TQt::color1 ); x += mMultiples; } - // done creating our mask + // done creating our tqmask start = right; end = right + len; x = 0; - // loop creating the mask for vis-gradient + // loop creating the tqmask for vis-gradient for ( ; start < end; ++start ) { n = log((*start)+1) * (float)hh * 5; @@ -344,26 +344,26 @@ void KJStereoFFT::scopeEvent(float *left, float *right, int len) else if ( amp > hh ) amp = hh; // make a part of the analyzer-gradient visible - mask.fillRect ( x, 0, mMultiples, amp, Qt::color1 ); + tqmask.fillRect ( x, 0, mMultiples, amp, TQt::color1 ); x += mMultiples; } // draw background of vis into it - bitBlt ( mAnalyzer, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt ( mAnalyzer, 0, 0, mBack, 0, 0, -1, -1, TQt::CopyROP ); // draw the analyzer mGradient->setMask(mGradientMask); - bitBlt ( mAnalyzer, 0, 0, mGradient, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt ( mAnalyzer, 0, 0, mGradient, 0, 0, -1, -1, TQt::CopyROP ); - repaint(); + tqrepaint(); } void KJStereoFFT::paint(TQPainter *p, const TQRect &) { // put that thing on screen if ( !napp->player()->isStopped() ) - bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mAnalyzer, TQRect(0,0,-1,-1), TQt::CopyROP ); } bool KJStereoFFT::mousePress(const TQPoint &) @@ -376,7 +376,7 @@ void KJStereoFFT::mouseRelease(const TQPoint &, bool in) if (!in) // only do something if users is still inside the button return; stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope(Null); } @@ -387,7 +387,7 @@ void KJStereoFFT::readConfig() if ( v != StereoFFT ) { stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope ( v ); return; } @@ -399,8 +399,8 @@ void KJStereoFFT::readConfig() * KJScope - oscilloscope like visualization *************************************************/ -KJScope::KJScope(const TQStringList &l, KJLoader *parent) - : KJVisScope(parent), MonoScope(50)/*, blurnum(0), mOsci(0)*/ +KJScope::KJScope(const TQStringList &l, KJLoader *tqparent) + : KJVisScope(tqparent), MonoScope(50)/*, blurnum(0), mOsci(0)*/ { int x=l[1].toInt(); int y=l[2].toInt(); @@ -411,7 +411,7 @@ KJScope::KJScope(const TQStringList &l, KJLoader *parent) // kdDebug(66666) << "Analyzer Window " << x << "," << y << " " << mWidth << "," << mHeight << endl; - if ( parent->exist("analyzercolor") ) + if ( tqparent->exist("analyzercolor") ) { TQStringList &col = parser()["analyzercolor"]; mColor.setRgb ( col[1].toInt(), col[2].toInt(), col[3].toInt() ); @@ -420,12 +420,12 @@ KJScope::KJScope(const TQStringList &l, KJLoader *parent) mColor.setRgb ( 255, 255, 255 ); // background under vis - TQPixmap tmp = parent->pixmap(parent->item("backgroundimage")[1]); + TQPixmap tmp = tqparent->pixmap(tqparent->item("backgroundimage")[1]); mBack = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mBack, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); mOsci = new KPixmap ( TQSize(xs,ys) ); - bitBlt( mOsci, 0, 0, &tmp, x, y, xs, ys, Qt::CopyROP ); + bitBlt( mOsci, 0, 0, &tmp, x, y, xs, ys, TQt::CopyROP ); // create a gradient mGradient = new KPixmap ( TQSize(xs,ys) ); @@ -447,8 +447,8 @@ void KJScope::scopeEvent(float *d, int size) { if ( napp->player()->isStopped() ) { - bitBlt ( mOsci, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); - repaint(); + bitBlt ( mOsci, 0, 0, mBack, 0, 0, -1, -1, TQt::CopyROP ); + tqrepaint(); } return; } @@ -463,7 +463,7 @@ void KJScope::scopeEvent(float *d, int size) if ( blurnum == 3 ) { // clear whole Vis - bitBlt ( mOsci, 0, 0, mBack, 0, 0, -1, -1, Qt::CopyROP ); + bitBlt ( mOsci, 0, 0, mBack, 0, 0, -1, -1, TQt::CopyROP ); tempP.setPen( mColor.light(110) ); // 10% lighter than mColor blurnum=0; } @@ -487,23 +487,23 @@ void KJScope::scopeEvent(float *d, int size) // tempP.drawLine(x, heightHalf, x, heightHalf+amp); if ( amp > 0 ) { - bitBlt ( tempP.device(), TQPoint(x,heightHalf), mGradient, TQRect(x,heightHalf,1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf), mGradient, TQRect(x,heightHalf,1,amp), TQt::CopyROP ); } else { amp = -amp; - bitBlt ( tempP.device(), TQPoint(x,heightHalf-amp), mGradient, TQRect(x,(heightHalf-amp),1,amp), Qt::CopyROP ); + bitBlt ( tempP.device(), TQPoint(x,heightHalf-amp), mGradient, TQRect(x,(heightHalf-amp),1,amp), TQt::CopyROP ); } x++; } - repaint(); + tqrepaint(); } void KJScope::paint(TQPainter *p, const TQRect &) { // put that thing on screen - bitBlt ( p->device(), rect().topLeft(), mOsci, TQRect(0,0,-1,-1), Qt::CopyROP ); + bitBlt ( p->device(), rect().topLeft(), mOsci, TQRect(0,0,-1,-1), TQt::CopyROP ); } bool KJScope::mousePress(const TQPoint &) @@ -517,7 +517,7 @@ void KJScope::mouseRelease(const TQPoint &, bool in) return; stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope(/*Null*/ StereoFFT); } @@ -528,7 +528,7 @@ void KJScope::readConfig() if ( v != Mono ) { stop(); - parent()->repaint(rect(), false); + tqparent()->tqrepaint(rect(), false); swapScope ( v ); return; } |