summaryrefslogtreecommitdiffstats
path: root/noatun/modules/voiceprint
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/voiceprint
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/voiceprint')
-rw-r--r--noatun/modules/voiceprint/prefs.cpp28
-rw-r--r--noatun/modules/voiceprint/prefs.h4
-rw-r--r--noatun/modules/voiceprint/voiceprint.cpp22
-rw-r--r--noatun/modules/voiceprint/voiceprint.h14
4 files changed, 34 insertions, 34 deletions
diff --git a/noatun/modules/voiceprint/prefs.cpp b/noatun/modules/voiceprint/prefs.cpp
index 48998680..230c542f 100644
--- a/noatun/modules/voiceprint/prefs.cpp
+++ b/noatun/modules/voiceprint/prefs.cpp
@@ -3,33 +3,33 @@
#include <klocale.h>
#include <kglobal.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kcolorbutton.h>
#include <kconfig.h>
-Prefs::Prefs(QObject* parent)
+Prefs::Prefs(TQObject* parent)
: CModule(i18n("Voiceprint"), i18n("Options for the Voiceprint Visualization"), "xapp", parent)
{
- QVBoxLayout *king=new QVBoxLayout(this);
- QHBoxLayout *minor;
+ QVBoxLayout *king=new TQVBoxLayout(this);
+ TQHBoxLayout *minor;
- QLabel *label;
+ TQLabel *label;
mForeground=new KColorButton(this);
- label=new QLabel(mForeground, i18n("&Foreground color:"), this);
- minor=new QHBoxLayout(king);
+ label=new TQLabel(mForeground, i18n("&Foreground color:"), this);
+ minor=new TQHBoxLayout(king);
minor->addWidget(label);
minor->addWidget(mForeground);
mBackground=new KColorButton(this);
- label=new QLabel(mBackground, i18n("&Background color:"), this);
- minor=new QHBoxLayout(king);
+ label=new TQLabel(mBackground, i18n("&Background color:"), this);
+ minor=new TQHBoxLayout(king);
minor->addWidget(label);
minor->addWidget(mBackground);
mLine=new KColorButton(this);
- label=new QLabel(mForeground, i18n("&Sweep color:"), this);
- minor=new QHBoxLayout(king);
+ label=new TQLabel(mForeground, i18n("&Sweep color:"), this);
+ minor=new TQHBoxLayout(king);
minor->addWidget(label);
minor->addWidget(mLine);
@@ -40,8 +40,8 @@ void Prefs::reopen()
{
KConfig *config=KGlobal::config();
config->setGroup("VoicePrint");
- QColor black(0, 0, 0);
- QColor blue(0, 0, 222);
+ TQColor black(0, 0, 0);
+ TQColor blue(0, 0, 222);
mBackground->setColor(config->readColorEntry("Background", &black));
mForeground->setColor(config->readColorEntry("Foreground", &blue));
mLine->setColor(config->readColorEntry("Line", &black));
diff --git a/noatun/modules/voiceprint/prefs.h b/noatun/modules/voiceprint/prefs.h
index 6541b4de..65f4cf3d 100644
--- a/noatun/modules/voiceprint/prefs.h
+++ b/noatun/modules/voiceprint/prefs.h
@@ -1,7 +1,7 @@
#ifndef PREFS_H
#define PREFS_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <noatun/pref.h>
class KColorButton;
@@ -10,7 +10,7 @@ class Prefs : public CModule
{
Q_OBJECT
public:
- Prefs(QObject* parent);
+ Prefs(TQObject* parent);
virtual void save();
virtual void reopen();
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
diff --git a/noatun/modules/voiceprint/voiceprint.h b/noatun/modules/voiceprint/voiceprint.h
index ab5af69d..4d78909a 100644
--- a/noatun/modules/voiceprint/voiceprint.h
+++ b/noatun/modules/voiceprint/voiceprint.h
@@ -3,7 +3,7 @@
#include <noatun/plugin.h>
-class VoicePrint : public QWidget, public MonoFFTScope, public Plugin
+class VoicePrint : public TQWidget, public MonoFFTScope, public Plugin
{
Q_OBJECT
@@ -11,21 +11,21 @@ public:
VoicePrint();
virtual ~VoicePrint();
- void setColors(const QColor &bg, const QColor &fg, const QColor &l);
+ void setColors(const TQColor &bg, const TQColor &fg, const TQColor &l);
void init();
protected:
- virtual void closeEvent(QCloseEvent *);
+ virtual void closeEvent(TQCloseEvent *);
virtual void scopeEvent(float *data, int bands);
- virtual void resizeEvent(QResizeEvent *);
- virtual void paintEvent(QPaintEvent *);
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void paintEvent(TQPaintEvent *);
public:
static VoicePrint* voicePrint;
private:
- QColor mProgress;
- QPixmap mBuffer;
+ TQColor mProgress;
+ TQPixmap mBuffer;
QRgb mLowColor, mHighColor;
int mOffset, mSegmentWidth;
};