diff options
Diffstat (limited to 'noatun/modules/voiceprint/voiceprint.cpp')
-rw-r--r-- | noatun/modules/voiceprint/voiceprint.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/noatun/modules/voiceprint/voiceprint.cpp b/noatun/modules/voiceprint/voiceprint.cpp index 4f6c7aea..0a82a1ab 100644 --- a/noatun/modules/voiceprint/voiceprint.cpp +++ b/noatun/modules/voiceprint/voiceprint.cpp @@ -2,7 +2,7 @@ #include <noatun/player.h> #include <noatun/app.h> #include <math.h> -#include <qpainter.h> +#include <tqpainter.h> #include "prefs.h" #include <klocale.h> #include <stdio.h> @@ -17,7 +17,7 @@ extern "C" VoicePrint *VoicePrint::voicePrint=0; -VoicePrint::VoicePrint() : QWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() +VoicePrint::VoicePrint() : TQWidget(0,0,WRepaintNoErase), MonoFFTScope(50), Plugin() { voicePrint=this; mOffset=0; @@ -41,7 +41,7 @@ void VoicePrint::init() resizeEvent(0); } -void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) +void VoicePrint::setColors(const TQColor &bg, const TQColor &fg, const TQColor &l) { mProgress=l; mLowColor=bg.rgb(); @@ -49,17 +49,17 @@ void VoicePrint::setColors(const QColor &bg, const QColor &fg, const QColor &l) setBackgroundColor(mLowColor); } -void VoicePrint::closeEvent(QCloseEvent *) +void VoicePrint::closeEvent(TQCloseEvent *) { unload(); } -void VoicePrint::resizeEvent(QResizeEvent *) +void VoicePrint::resizeEvent(TQResizeEvent *) { mOffset=0; mBuffer.resize(size()); - QPainter paint(&mBuffer); - paint.fillRect(QRect(0,0, QWidget::width(), height()), QColor(mLowColor)); + TQPainter paint(&mBuffer); + paint.fillRect(TQRect(0,0, TQWidget::width(), height()), TQColor(mLowColor)); setBands(magic(height()/mSegmentWidth)); } @@ -78,7 +78,7 @@ inline static QRgb averageByIntensity(QRgb bgcolor, QRgb fgcolor, int octet) #undef COLOR -void VoicePrint::paintEvent(QPaintEvent *e) +void VoicePrint::paintEvent(TQPaintEvent *e) { bitBlt(this, e->rect().topLeft(), &mBuffer, e->rect(), Qt::CopyROP); } @@ -88,7 +88,7 @@ void VoicePrint::scopeEvent(float *data, int bands) // save cpu if(isHidden()) return; - QPainter paint(&mBuffer); + TQPainter paint(&mBuffer); // each square has a width of mSegmentWidth float brightness = float(bands * mSegmentWidth); for (int i=0; i<bands ; i++) @@ -100,14 +100,14 @@ void VoicePrint::scopeEvent(float *data, int bands) if (band>255) band=255; else if (band<0) band=0; - QColor area(averageByIntensity(mLowColor, mHighColor, band)); + TQColor area(averageByIntensity(mLowColor, mHighColor, band)); int bandTop=i*height()/bands, bandBottom=(i+1)*height()/bands; paint.fillRect(mOffset, bandTop, mSegmentWidth,bandBottom-bandTop,area); } int newOffset = mOffset+mSegmentWidth; - if (newOffset>QWidget::width()) newOffset=0; + if (newOffset>TQWidget::width()) newOffset=0; paint.fillRect(newOffset, 0, mSegmentWidth, height(), mProgress); // redraw changes with the minimum amount of work |