diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /noatun/modules/voiceprint | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/voiceprint')
-rw-r--r-- | noatun/modules/voiceprint/prefs.cpp | 6 | ||||
-rw-r--r-- | noatun/modules/voiceprint/prefs.h | 3 | ||||
-rw-r--r-- | noatun/modules/voiceprint/voiceprint.cpp | 18 | ||||
-rw-r--r-- | noatun/modules/voiceprint/voiceprint.h | 3 |
4 files changed, 16 insertions, 14 deletions
diff --git a/noatun/modules/voiceprint/prefs.cpp b/noatun/modules/voiceprint/prefs.cpp index 230c542f..a50db7ff 100644 --- a/noatun/modules/voiceprint/prefs.cpp +++ b/noatun/modules/voiceprint/prefs.cpp @@ -8,10 +8,10 @@ #include <kcolorbutton.h> #include <kconfig.h> -Prefs::Prefs(TQObject* parent) - : CModule(i18n("Voiceprint"), i18n("Options for the Voiceprint Visualization"), "xapp", parent) +Prefs::Prefs(TQObject* tqparent) + : CModule(i18n("Voiceprint"), i18n("Options for the Voiceprint Visualization"), "xapp", tqparent) { - QVBoxLayout *king=new TQVBoxLayout(this); + TQVBoxLayout *king=new TQVBoxLayout(this); TQHBoxLayout *minor; TQLabel *label; diff --git a/noatun/modules/voiceprint/prefs.h b/noatun/modules/voiceprint/prefs.h index 65f4cf3d..1803fe9b 100644 --- a/noatun/modules/voiceprint/prefs.h +++ b/noatun/modules/voiceprint/prefs.h @@ -9,8 +9,9 @@ class KColorButton; class Prefs : public CModule { Q_OBJECT + TQ_OBJECT public: - Prefs(TQObject* parent); + Prefs(TQObject* tqparent); virtual void save(); virtual void reopen(); diff --git a/noatun/modules/voiceprint/voiceprint.cpp b/noatun/modules/voiceprint/voiceprint.cpp index 0a82a1ab..234aafd0 100644 --- a/noatun/modules/voiceprint/voiceprint.cpp +++ b/noatun/modules/voiceprint/voiceprint.cpp @@ -35,7 +35,7 @@ VoicePrint::~VoicePrint() void VoicePrint::init() { - Prefs *p=new Prefs(this); + Prefs *p=new Prefs(TQT_TQOBJECT(this)); p->reopen(); p->save(); resizeEvent(0); @@ -66,13 +66,13 @@ void VoicePrint::resizeEvent(TQResizeEvent *) #define COLOR(color, bgcolor, fgcolor, foctet) \ (int)( color(bgcolor) + (foctet) * (color(fgcolor) - color(bgcolor)) ) -inline static QRgb averageByIntensity(QRgb bgcolor, QRgb fgcolor, int octet) +inline static TQRgb averageByIntensity(TQRgb bgcolor, TQRgb fgcolor, int octet) { float foctet = octet / 255.0; - return qRgb(COLOR(qRed, bgcolor, fgcolor, foctet), - COLOR(qGreen, bgcolor, fgcolor, foctet), - COLOR(qBlue, bgcolor, fgcolor, foctet) + return tqRgb(COLOR(tqRed, bgcolor, fgcolor, foctet), + COLOR(tqGreen, bgcolor, fgcolor, foctet), + COLOR(tqBlue, bgcolor, fgcolor, foctet) ); } @@ -80,7 +80,7 @@ inline static QRgb averageByIntensity(QRgb bgcolor, QRgb fgcolor, int octet) void VoicePrint::paintEvent(TQPaintEvent *e) { - bitBlt(this, e->rect().topLeft(), &mBuffer, e->rect(), Qt::CopyROP); + bitBlt(this, e->rect().topLeft(), &mBuffer, e->rect(), TQt::CopyROP); } void VoicePrint::scopeEvent(float *data, int bands) @@ -113,12 +113,12 @@ void VoicePrint::scopeEvent(float *data, int bands) // redraw changes with the minimum amount of work if(newOffset != 0) { - repaint(mOffset,0,mSegmentWidth*2,height(),false); + tqrepaint(mOffset,0,mSegmentWidth*2,height(),false); } else { - repaint(mOffset,0,mSegmentWidth,height(),false); - repaint(newOffset,0,mSegmentWidth,height(),false); + tqrepaint(mOffset,0,mSegmentWidth,height(),false); + tqrepaint(newOffset,0,mSegmentWidth,height(),false); } mOffset = newOffset; } diff --git a/noatun/modules/voiceprint/voiceprint.h b/noatun/modules/voiceprint/voiceprint.h index 4d78909a..1d02bae6 100644 --- a/noatun/modules/voiceprint/voiceprint.h +++ b/noatun/modules/voiceprint/voiceprint.h @@ -6,6 +6,7 @@ class VoicePrint : public TQWidget, public MonoFFTScope, public Plugin { Q_OBJECT + TQ_OBJECT public: VoicePrint(); @@ -26,7 +27,7 @@ public: private: TQColor mProgress; TQPixmap mBuffer; - QRgb mLowColor, mHighColor; + TQRgb mLowColor, mHighColor; int mOffset, mSegmentWidth; }; #endif |