summaryrefslogtreecommitdiffstats
path: root/amarok/src/analyzers
diff options
context:
space:
mode:
Diffstat (limited to 'amarok/src/analyzers')
-rw-r--r--amarok/src/analyzers/analyzerbase.cpp38
-rw-r--r--amarok/src/analyzers/analyzerbase.h54
-rw-r--r--amarok/src/analyzers/analyzerfactory.cpp18
-rw-r--r--amarok/src/analyzers/baranalyzer.cpp18
-rw-r--r--amarok/src/analyzers/baranalyzer.h14
-rw-r--r--amarok/src/analyzers/blockanalyzer.cpp62
-rw-r--r--amarok/src/analyzers/blockanalyzer.h24
-rw-r--r--amarok/src/analyzers/boomanalyzer.cpp44
-rw-r--r--amarok/src/analyzers/boomanalyzer.h12
-rw-r--r--amarok/src/analyzers/glanalyzer.cpp2
-rw-r--r--amarok/src/analyzers/glanalyzer.h2
-rw-r--r--amarok/src/analyzers/glanalyzer2.cpp10
-rw-r--r--amarok/src/analyzers/glanalyzer2.h8
-rw-r--r--amarok/src/analyzers/glanalyzer3.cpp10
-rw-r--r--amarok/src/analyzers/glanalyzer3.h12
-rw-r--r--amarok/src/analyzers/sonogram.cpp12
-rw-r--r--amarok/src/analyzers/sonogram.h4
-rw-r--r--amarok/src/analyzers/turbine.cpp4
-rw-r--r--amarok/src/analyzers/turbine.h2
19 files changed, 175 insertions, 175 deletions
diff --git a/amarok/src/analyzers/analyzerbase.cpp b/amarok/src/analyzers/analyzerbase.cpp
index 04e19e26..27fb7abc 100644
--- a/amarok/src/analyzers/analyzerbase.cpp
+++ b/amarok/src/analyzers/analyzerbase.cpp
@@ -18,7 +18,7 @@
#include "analyzerbase.h"
#include <cmath> //interpolate()
#include "enginecontroller.h"
-#include <qevent.h> //event()
+#include <tqevent.h> //event()
// INSTRUCTIONS Base2D
@@ -26,7 +26,7 @@
// 2. otherwise you can use the constructor to initialise things
// 3. reimplement analyze(), and paint to canvas(), Base2D will update the widget when you return control to it
// 4. if you want to manipulate the scope, reimplement transform()
-// 5. for convenience <vector> <qpixmap.h> <qwdiget.h> are pre-included
+// 5. for convenience <vector> <tqpixmap.h> <qwdiget.h> are pre-included
// TODO make an INSTRUCTIONS file
//can't mod scope in analyze you have to use transform
@@ -35,30 +35,30 @@
// make the linker happy only for gcc < 4.0
#if !( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 0 ) )
-template class Analyzer::Base<QWidget>;
+template class Analyzer::Base<TQWidget>;
#endif
template<class W>
-Analyzer::Base<W>::Base( QWidget *parent, uint timeout, uint scopeSize )
+Analyzer::Base<W>::Base( TQWidget *parent, uint timeout, uint scopeSize )
: W( parent )
, m_timeout( timeout )
, m_fht( new FHT(scopeSize) )
{}
template<class W> bool
-Analyzer::Base<W>::event( QEvent *e )
+Analyzer::Base<W>::event( TQEvent *e )
{
switch( e->type() ) {
-/* case QEvent::Paint:
+/* case TQEvent::Paint:
if( !canvas()->isNull() )
bitBlt( this, 0, 0, canvas() );
return true; //no propagate event*/
- case QEvent::Hide:
+ case TQEvent::Hide:
m_timer.stop();
break;
- case QEvent::Show:
+ case TQEvent::Show:
m_timer.start( timeout() );
break;
@@ -66,7 +66,7 @@ Analyzer::Base<W>::event( QEvent *e )
break;
}
- return QWidget::event( e );
+ return TQWidget::event( e );
}
template<class W> void
@@ -188,12 +188,12 @@ Analyzer::Base<W>::demo() //virtual
-Analyzer::Base2D::Base2D( QWidget *parent, uint timeout, uint scopeSize )
- : Base<QWidget>( parent, timeout, scopeSize )
+Analyzer::Base2D::Base2D( TQWidget *parent, uint timeout, uint scopeSize )
+ : Base<TQWidget>( parent, timeout, scopeSize )
{
setWFlags( Qt::WNoAutoErase ); //no flicker
- connect( &m_timer, SIGNAL( timeout() ), SLOT( draw() ) );
+ connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}
void
@@ -203,24 +203,24 @@ Analyzer::Base2D::polish()
//we use polish for initialzing (instead of ctor)
//because we need to know the widget's final size
- QWidget::polish();
+ TQWidget::polish();
init(); //virtual
}
void
-Analyzer::Base2D::resizeEvent( QResizeEvent *e )
+Analyzer::Base2D::resizeEvent( TQResizeEvent *e )
{
m_background.resize( size() );
m_canvas.resize( size() );
m_background.fill( backgroundColor() );
eraseCanvas(); //this is necessary
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
void
-Analyzer::Base2D::paletteChange( const QPalette& )
+Analyzer::Base2D::paletteChange( const TQPalette& )
{
m_background.fill( backgroundColor() );
eraseCanvas();
@@ -229,10 +229,10 @@ Analyzer::Base2D::paletteChange( const QPalette& )
#ifdef HAVE_QGLWIDGET
-Analyzer::Base3D::Base3D( QWidget *parent, uint timeout, uint scopeSize )
- : Base<QGLWidget>( parent, timeout, scopeSize )
+Analyzer::Base3D::Base3D( TQWidget *parent, uint timeout, uint scopeSize )
+ : Base<TQGLWidget>( parent, timeout, scopeSize )
{
- connect( &m_timer, SIGNAL( timeout() ), SLOT( draw() ) );
+ connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}
#endif
diff --git a/amarok/src/analyzers/analyzerbase.h b/amarok/src/analyzers/analyzerbase.h
index ba3ecb30..d8270026 100644
--- a/amarok/src/analyzers/analyzerbase.h
+++ b/amarok/src/analyzers/analyzerbase.h
@@ -12,13 +12,13 @@
#endif
#include "fht.h" //stack allocated and convenience
-#include <qpixmap.h> //stack allocated and convenience
-#include <qtimer.h> //stack allocated
-#include <qwidget.h> //baseclass
+#include <tqpixmap.h> //stack allocated and convenience
+#include <tqtimer.h> //stack allocated
+#include <tqwidget.h> //baseclass
#include <vector> //included for convenience
#ifdef HAVE_QGLWIDGET
-#include <qgl.h> //baseclass
+#include <tqgl.h> //baseclass
#ifdef Q_WS_MACX
#include <OpenGL/gl.h> //included for convenience
#include <OpenGL/glu.h> //included for convenience
@@ -28,12 +28,12 @@
#endif
#else
//this is a workaround for compile problems due to moc
-#define QGLWidget QWidget
+#define TQGLWidget QWidget
#endif
-class QEvent;
-class QPaintEvent;
-class QResizeEvent;
+class TQEvent;
+class TQPaintEvent;
+class TQResizeEvent;
namespace Analyzer {
@@ -46,7 +46,7 @@ public:
uint timeout() const { return m_timeout; }
protected:
- Base( QWidget*, uint, uint = 7 );
+ Base( TQWidget*, uint, uint = 7 );
~Base() { delete m_fht; }
void drawFrame();
@@ -64,43 +64,43 @@ protected:
}
private:
- bool event( QEvent* );
+ bool event( TQEvent* );
protected:
- QTimer m_timer;
+ TQTimer m_timer;
uint m_timeout;
FHT *m_fht;
};
-class Base2D : public Base<QWidget>
+class Base2D : public Base<TQWidget>
{
Q_OBJECT
public:
- const QPixmap *background() const { return &m_background; }
- const QPixmap *canvas() const { return &m_canvas; }
+ const TQPixmap *background() const { return &m_background; }
+ const TQPixmap *canvas() const { return &m_canvas; }
private slots:
void draw() { drawFrame(); bitBlt( this, 0, 0, canvas() ); }
protected:
- Base2D( QWidget*, uint timeout, uint scopeSize = 7 );
+ Base2D( TQWidget*, uint timeout, uint scopeSize = 7 );
virtual void init() {}
- QPixmap *background() { return &m_background; }
- QPixmap *canvas() { return &m_canvas; }
+ TQPixmap *background() { return &m_background; }
+ TQPixmap *canvas() { return &m_canvas; }
void eraseCanvas() { bitBlt( canvas(), 0, 0, background() ); }
- void paintEvent( QPaintEvent* ) { if( !m_canvas.isNull() ) bitBlt( this, 0, 0, canvas() ); }
- void resizeEvent( QResizeEvent* );
- void paletteChange( const class QPalette& );
+ void paintEvent( TQPaintEvent* ) { if( !m_canvas.isNull() ) bitBlt( this, 0, 0, canvas() ); }
+ void resizeEvent( TQResizeEvent* );
+ void paletteChange( const class TQPalette& );
void polish();
private:
- QPixmap m_background;
- QPixmap m_canvas;
+ TQPixmap m_background;
+ TQPixmap m_canvas;
};
@@ -111,17 +111,17 @@ private:
//3. we have to declare a ctor (to satisfy the inheritance)
//4. the slot must also by visible (!)
//TODO find out how to stop moc generating a metaobject for this class
-class Base3D : public Base<QGLWidget>
+class Base3D : public Base<TQGLWidget>
{
Q_OBJECT
#ifdef HAVE_QGLWIDGET
protected:
- Base3D( QWidget*, uint, uint = 7 );
+ Base3D( TQWidget*, uint, uint = 7 );
private slots:
void draw() { drawFrame(); }
#else
protected:
- Base3D( QWidget *w, uint i1, uint i2 ) : Base<QGLWidget>( w, i1, i2 ) {}
+ Base3D( TQWidget *w, uint i1, uint i2 ) : Base<TQGLWidget>( w, i1, i2 ) {}
private slots:
void draw() {}
#endif
@@ -138,8 +138,8 @@ class Factory
//but I can't be arsed, nor can I see much reason to do so
//yet!
public:
- static QWidget* createAnalyzer( QWidget* );
- static QWidget* createPlaylistAnalyzer( QWidget *);
+ static TQWidget* createAnalyzer( TQWidget* );
+ static TQWidget* createPlaylistAnalyzer( TQWidget *);
};
diff --git a/amarok/src/analyzers/analyzerfactory.cpp b/amarok/src/analyzers/analyzerfactory.cpp
index 91c28b01..16b10acd 100644
--- a/amarok/src/analyzers/analyzerfactory.cpp
+++ b/amarok/src/analyzers/analyzerfactory.cpp
@@ -32,17 +32,17 @@
#include "glanalyzer3.h"
#endif
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
//separate from analyzerbase.cpp to save compile time
-QWidget *Analyzer::Factory::createAnalyzer( QWidget *parent )
+TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
{
//new XmmsWrapper(); //toplevel
- QWidget *analyzer = 0;
+ TQWidget *analyzer = 0;
switch( AmarokConfig::currentAnalyzer() )
{
@@ -72,8 +72,8 @@ QWidget *Analyzer::Factory::createAnalyzer( QWidget *parent )
#else
case 5:
#endif
- analyzer = new QLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
- static_cast<QLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
+ analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
+ static_cast<TQLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
break;
default:
@@ -85,9 +85,9 @@ QWidget *Analyzer::Factory::createAnalyzer( QWidget *parent )
return analyzer;
}
-QWidget *Analyzer::Factory::createPlaylistAnalyzer( QWidget *parent)
+TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *parent)
{
- QWidget *analyzer = 0;
+ TQWidget *analyzer = 0;
switch( AmarokConfig::currentPlaylistAnalyzer() )
{
case 1:
@@ -113,8 +113,8 @@ QWidget *Analyzer::Factory::createPlaylistAnalyzer( QWidget *parent)
#else
case 4:
#endif
- analyzer = new QLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
- static_cast<QLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
+ analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
+ static_cast<TQLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
break;
default:
diff --git a/amarok/src/analyzers/baranalyzer.cpp b/amarok/src/analyzers/baranalyzer.cpp
index 61af801b..24a24c9c 100644
--- a/amarok/src/analyzers/baranalyzer.cpp
+++ b/amarok/src/analyzers/baranalyzer.cpp
@@ -14,10 +14,10 @@
#include "baranalyzer.h"
#include <cmath> //log10(), etc.
#include "debug.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-BarAnalyzer::BarAnalyzer( QWidget *parent )
+BarAnalyzer::BarAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 12, 8 )
//, m_bands( BAND_COUNT )
//, barVector( BAND_COUNT, 0 )
@@ -27,7 +27,7 @@ BarAnalyzer::BarAnalyzer( QWidget *parent )
//roof pixmaps don't depend on size() so we do in the ctor
m_bg = parent->paletteBackgroundColor();
- QColor fg( 0xff, 0x50, 0x70 );
+ TQColor fg( 0xff, 0x50, 0x70 );
#define m_bg backgroundColor()
double dr = double(m_bg.red() - fg.red()) / (NUM_ROOFS-1); //-1 because we start loop below at 0
@@ -37,13 +37,13 @@ BarAnalyzer::BarAnalyzer( QWidget *parent )
for ( uint i = 0; i < NUM_ROOFS; ++i )
{
m_pixRoof[i].resize( COLUMN_WIDTH, 1 );
- m_pixRoof[i].fill( QColor( fg.red()+int(dr*i), fg.green()+int(dg*i), fg.blue()+int(db*i) ) );
+ m_pixRoof[i].fill( TQColor( fg.red()+int(dr*i), fg.green()+int(dg*i), fg.blue()+int(db*i) ) );
}
#undef m_bg
}
-void BarAnalyzer::resizeEvent( QResizeEvent * e )
+void BarAnalyzer::resizeEvent( TQResizeEvent * e )
{
debug() << "Baranalyzer Resized(" << width() << "x" << height() << ")" << endl;
Analyzer::Base2D::resizeEvent( e );
@@ -80,7 +80,7 @@ void BarAnalyzer::init()
m_pixBarGradient.resize( height()*COLUMN_WIDTH, height() );
m_pixCompose.resize( size() );
- QPainter p( &m_pixBarGradient );
+ TQPainter p( &m_pixBarGradient );
for ( int x=0, r=0x40, g=0x30, b=0xff, r2=255-r;
x < height(); ++x )
{
@@ -88,14 +88,14 @@ void BarAnalyzer::init()
{
const double fraction = (double)y / height();
-// p.setPen( QColor( r + (int)(r2 * fraction), g, b - (int)(255 * fraction) ) );
- p.setPen( QColor( r + (int)(r2 * fraction), g, b ) );
+// p.setPen( TQColor( r + (int)(r2 * fraction), g, b - (int)(255 * fraction) ) );
+ p.setPen( TQColor( r + (int)(r2 * fraction), g, b ) );
p.drawLine( x*COLUMN_WIDTH, height() - y, (x+1)*COLUMN_WIDTH, height() - y );
}
}
- setMinimumSize( QSize( BAND_COUNT * COLUMN_WIDTH, 10 ) );
+ setMinimumSize( TQSize( BAND_COUNT * COLUMN_WIDTH, 10 ) );
}
diff --git a/amarok/src/analyzers/baranalyzer.h b/amarok/src/analyzers/baranalyzer.h
index f8869d5d..6eb470c8 100644
--- a/amarok/src/analyzers/baranalyzer.h
+++ b/amarok/src/analyzers/baranalyzer.h
@@ -14,7 +14,7 @@ typedef std::vector<uint> aroofMemVec;
class BarAnalyzer : public Analyzer::Base2D
{
public:
- BarAnalyzer( QWidget* );
+ BarAnalyzer( TQWidget* );
void init();
virtual void analyze( const Scope& );
@@ -24,7 +24,7 @@ class BarAnalyzer : public Analyzer::Base2D
* Resizes the widget to a new geometry according to @p e
* @param e The resize-event
*/
- void resizeEvent( QResizeEvent * e);
+ void resizeEvent( TQResizeEvent * e);
uint BAND_COUNT;
int MAX_DOWN;
@@ -35,7 +35,7 @@ class BarAnalyzer : public Analyzer::Base2D
static const uint COLUMN_WIDTH = 4;
protected:
- QPixmap m_pixRoof[NUM_ROOFS];
+ TQPixmap m_pixRoof[NUM_ROOFS];
//vector<uint> m_roofMem[BAND_COUNT];
//Scope m_bands; //copy of the Scope to prevent creating/destroying a Scope every iteration
@@ -45,13 +45,13 @@ class BarAnalyzer : public Analyzer::Base2D
std::vector<int> roofVector; //positions of roofs
std::vector<uint> roofVelocityVector; //speed that roofs falls
- const QPixmap *gradient() const { return &m_pixBarGradient; }
+ const TQPixmap *gradient() const { return &m_pixBarGradient; }
private:
- QPixmap m_pixBarGradient;
- QPixmap m_pixCompose;
+ TQPixmap m_pixBarGradient;
+ TQPixmap m_pixCompose;
Scope m_scope; //so we don't create a vector every frame
- QColor m_bg;
+ TQColor m_bg;
};
#endif
diff --git a/amarok/src/analyzers/blockanalyzer.cpp b/amarok/src/analyzers/blockanalyzer.cpp
index f58bc832..886243d8 100644
--- a/amarok/src/analyzers/blockanalyzer.cpp
+++ b/amarok/src/analyzers/blockanalyzer.cpp
@@ -19,17 +19,17 @@
#include <klocale.h> //mousePressEvent
#include <kpopupmenu.h> //mousePressEvent
-#include <qevent.h> //mousePressEvent
-#include <qpainter.h> //paletteChange()
+#include <tqevent.h> //mousePressEvent
+#include <tqpainter.h> //paletteChange()
#include <stdlib.h>
static inline uint myMax( uint v1, uint v2 ) { return v1 > v2 ? v1 : v2; }
-namespace Amarok { extern KConfig *config( const QString& ); }
+namespace Amarok { extern KConfig *config( const TQString& ); }
-BlockAnalyzer::BlockAnalyzer( QWidget *parent )
+BlockAnalyzer::BlockAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 20, 9 )
, m_columns( 0 ) //uint
, m_rows( 0 ) //uint
@@ -38,7 +38,7 @@ BlockAnalyzer::BlockAnalyzer( QWidget *parent )
, m_topBarPixmap( WIDTH, HEIGHT )
, m_scope( MIN_COLUMNS ) //Scope
, m_store( 1 << 8, 0 ) //vector<uint>
- , m_fade_bars( FADE_SIZE ) //vector<QPixmap>
+ , m_fade_bars( FADE_SIZE ) //vector<TQPixmap>
, m_fade_pos( 1 << 8, 50 ) //vector<uint>
, m_fade_intensity( 1 << 8, 32 ) //vector<uint>
{
@@ -58,9 +58,9 @@ BlockAnalyzer::~BlockAnalyzer()
}
void
-BlockAnalyzer::resizeEvent( QResizeEvent *e )
+BlockAnalyzer::resizeEvent( TQResizeEvent *e )
{
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
canvas()->resize( size() );
background()->resize( size() );
@@ -223,21 +223,21 @@ adjustToLimits( int &b, int &f, uint &amount )
* @return the adjusted form of fg
*/
QColor
-ensureContrast( const QColor &bg, const QColor &fg, uint _amount = 150 )
+ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
{
class OutputOnExit {
public:
- OutputOnExit( const QColor &color ) : c( color ) {}
+ OutputOnExit( const TQColor &color ) : c( color ) {}
~OutputOnExit() { int h,s,v; c.getHsv( &h, &s, &v ); }
private:
- const QColor &c;
+ const TQColor &c;
};
// hack so I don't have to cast everywhere
#define amount static_cast<int>(_amount)
-// #define STAMP debug() << (QValueList<int>() << fh << fs << fv) << endl;
-// #define STAMP1( string ) debug() << string << ": " << (QValueList<int>() << fh << fs << fv) << endl;
-// #define STAMP2( string, value ) debug() << string << "=" << value << ": " << (QValueList<int>() << fh << fs << fv) << endl;
+// #define STAMP debug() << (TQValueList<int>() << fh << fs << fv) << endl;
+// #define STAMP1( string ) debug() << string << ": " << (TQValueList<int>() << fh << fs << fv) << endl;
+// #define STAMP2( string, value ) debug() << string << "=" << value << ": " << (TQValueList<int>() << fh << fs << fv) << endl;
OutputOnExit allocateOnTheStack( fg );
@@ -319,28 +319,28 @@ ensureContrast( const QColor &bg, const QColor &fg, uint _amount = 150 )
// STAMP
- return QColor( fh, fs, fv, QColor::Hsv );
+ return TQColor( fh, fs, fv, TQColor::Hsv );
}
// STAMP
if( fv > bv && bv > amount )
- return QColor( fh, fs, bv - amount, QColor::Hsv );
+ return TQColor( fh, fs, bv - amount, TQColor::Hsv );
// STAMP
if( fv < bv && fv > amount )
- return QColor( fh, fs, fv - amount, QColor::Hsv );
+ return TQColor( fh, fs, fv - amount, TQColor::Hsv );
// STAMP
if( fv > bv && (255 - fv > amount) )
- return QColor( fh, fs, fv + amount, QColor::Hsv );
+ return TQColor( fh, fs, fv + amount, TQColor::Hsv );
// STAMP
if( fv < bv && (255 - bv > amount ) )
- return QColor( fh, fs, bv + amount, QColor::Hsv );
+ return TQColor( fh, fs, bv + amount, TQColor::Hsv );
// STAMP
// debug() << "Something went wrong!\n";
@@ -352,10 +352,10 @@ ensureContrast( const QColor &bg, const QColor &fg, uint _amount = 150 )
}
void
-BlockAnalyzer::paletteChange( const QPalette& ) //virtual
+BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
{
- const QColor bg = palette().active().background();
- const QColor fg = ensureContrast( bg, KGlobalSettings::activeTitleColor() );
+ const TQColor bg = palette().active().background();
+ const TQColor fg = ensureContrast( bg, KGlobalSettings::activeTitleColor() );
m_topBarPixmap.fill( fg );
@@ -366,18 +366,18 @@ BlockAnalyzer::paletteChange( const QPalette& ) //virtual
bar()->fill( bg );
- QPainter p( bar() );
+ TQPainter p( bar() );
for( int y = 0; (uint)y < m_rows; ++y )
//graduate the fg color
- p.fillRect( 0, y*(HEIGHT+1), WIDTH, HEIGHT, QColor( r+int(dr*y), g+int(dg*y), b+int(db*y) ) );
+ p.fillRect( 0, y*(HEIGHT+1), WIDTH, HEIGHT, TQColor( r+int(dr*y), g+int(dg*y), b+int(db*y) ) );
{
- const QColor bg = palette().active().background().dark( 112 );
+ const TQColor bg = palette().active().background().dark( 112 );
//make a complimentary fadebar colour
//TODO dark is not always correct, dumbo!
int h,s,v; palette().active().background().dark( 150 ).getHsv( &h, &s, &v );
- const QColor fg( h + 120, s, v, QColor::Hsv );
+ const TQColor fg( h + 120, s, v, TQColor::Hsv );
const double dr = fg.red() - bg.red();
const double dg = fg.green() - bg.green();
@@ -387,10 +387,10 @@ BlockAnalyzer::paletteChange( const QPalette& ) //virtual
// Precalculate all fade-bar pixmaps
for( uint y = 0; y < FADE_SIZE; ++y ) {
m_fade_bars[y].fill( palette().active().background() );
- QPainter f( &m_fade_bars[y] );
+ TQPainter f( &m_fade_bars[y] );
for( int z = 0; (uint)z < m_rows; ++z ) {
const double Y = 1.0 - (log10( FADE_SIZE - y ) / log10( FADE_SIZE ));
- f.fillRect( 0, z*(HEIGHT+1), WIDTH, HEIGHT, QColor( r+int(dr*Y), g+int(dg*Y), b+int(db*Y) ) );
+ f.fillRect( 0, z*(HEIGHT+1), WIDTH, HEIGHT, TQColor( r+int(dr*Y), g+int(dg*Y), b+int(db*Y) ) );
}
}
}
@@ -401,12 +401,12 @@ BlockAnalyzer::paletteChange( const QPalette& ) //virtual
void
BlockAnalyzer::drawBackground()
{
- const QColor bg = palette().active().background();
- const QColor bgdark = bg.dark( 112 );
+ const TQColor bg = palette().active().background();
+ const TQColor bgdark = bg.dark( 112 );
background()->fill( bg );
- QPainter p( background() );
+ TQPainter p( background() );
for( int x = 0; (uint)x < m_columns; ++x )
for( int y = 0; (uint)y < m_rows; ++y )
p.fillRect( x*(WIDTH+1), y*(HEIGHT+1) + m_y, WIDTH, HEIGHT, bgdark );
@@ -415,7 +415,7 @@ BlockAnalyzer::drawBackground()
}
void
-BlockAnalyzer::contextMenuEvent( QContextMenuEvent *e )
+BlockAnalyzer::contextMenuEvent( TQContextMenuEvent *e )
{
//this is hard to read in order to be compact, apologies..
//the id of each menu item is the value of the attribute it represents,
diff --git a/amarok/src/analyzers/blockanalyzer.h b/amarok/src/analyzers/blockanalyzer.h
index a03c99e0..68aaedd9 100644
--- a/amarok/src/analyzers/blockanalyzer.h
+++ b/amarok/src/analyzers/blockanalyzer.h
@@ -6,11 +6,11 @@
#define BLOCKANALYZER_H
#include "analyzerbase.h"
-#include <qcolor.h>
+#include <tqcolor.h>
-class QResizeEvent;
-class QMouseEvent;
-class QPalette;
+class TQResizeEvent;
+class TQMouseEvent;
+class TQPalette;
/**
@@ -20,7 +20,7 @@ class QPalette;
class BlockAnalyzer : public Analyzer::Base2D
{
public:
- BlockAnalyzer( QWidget* );
+ BlockAnalyzer( TQWidget* );
~BlockAnalyzer();
static const uint HEIGHT = 2;
@@ -33,26 +33,26 @@ public:
protected:
virtual void transform( Scope& );
virtual void analyze( const Scope& );
- virtual void resizeEvent( QResizeEvent* );
- virtual void contextMenuEvent( QContextMenuEvent* );
- virtual void paletteChange( const QPalette& );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void contextMenuEvent( TQContextMenuEvent* );
+ virtual void paletteChange( const TQPalette& );
void drawBackground();
void determineStep();
private:
- QPixmap* const bar() { return &m_barPixmap; }
+ TQPixmap* const bar() { return &m_barPixmap; }
uint m_columns, m_rows; //number of rows and columns of blocks
uint m_y; //y-offset from top of widget
- QPixmap m_barPixmap;
- QPixmap m_topBarPixmap;
+ TQPixmap m_barPixmap;
+ TQPixmap m_topBarPixmap;
Scope m_scope; //so we don't create a vector every frame
std::vector<float> m_store; //current bar heights
std::vector<float> m_yscale;
//FIXME why can't I namespace these? c++ issue?
- std::vector<QPixmap> m_fade_bars;
+ std::vector<TQPixmap> m_fade_bars;
std::vector<uint> m_fade_pos;
std::vector<int> m_fade_intensity;
diff --git a/amarok/src/analyzers/boomanalyzer.cpp b/amarok/src/analyzers/boomanalyzer.cpp
index 1f9d8c71..3505c82c 100644
--- a/amarok/src/analyzers/boomanalyzer.cpp
+++ b/amarok/src/analyzers/boomanalyzer.cpp
@@ -4,13 +4,13 @@
#include "amarok.h"
#include "boomanalyzer.h"
#include <cmath>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qslider.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqslider.h>
+#include <tqspinbox.h>
-BoomAnalyzer::BoomAnalyzer( QWidget *parent )
+BoomAnalyzer::BoomAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 10, 9 )
, K_barHeight( 1.271 )//1.471
, F_peakSpeed( 1.103 )//1.122
@@ -20,25 +20,25 @@ BoomAnalyzer::BoomAnalyzer( QWidget *parent )
, peak_speed( BAND_COUNT, 0.01 )
, barPixmap( COLUMN_WIDTH, 50 )
{
- QWidget *o, *box = new QWidget( this, 0, WType_TopLevel );
- QSpinBox *m;
+ TQWidget *o, *box = new TQWidget( this, 0, WType_TopLevel );
+ TQSpinBox *m;
int v;
- (new QGridLayout( box, 2, 3 ))->setAutoAdd( true );
+ (new TQGridLayout( box, 2, 3 ))->setAutoAdd( true );
v = int(K_barHeight*1000);
- new QLabel( "Bar fall-rate:", box );
- o = new QSlider( 100, 2000, 100, v, Qt::Horizontal, box );
- (m = new QSpinBox( 100, 2000, 1, box ))->setValue( v );
- connect( o, SIGNAL(valueChanged(int)), SLOT(changeK_barHeight( int )) );
- connect( o, SIGNAL(valueChanged(int)), m, SLOT(setValue( int )) );
+ new TQLabel( "Bar fall-rate:", box );
+ o = new TQSlider( 100, 2000, 100, v, Qt::Horizontal, box );
+ (m = new TQSpinBox( 100, 2000, 1, box ))->setValue( v );
+ connect( o, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changeK_barHeight( int )) );
+ connect( o, TQT_SIGNAL(valueChanged(int)), m, TQT_SLOT(setValue( int )) );
v = int(F_peakSpeed*1000);
- new QLabel( "Peak acceleration: ", box );
- o = new QSlider( 1000, 1300, 50, v, Qt::Horizontal, box );
- (m = new QSpinBox( 1000, 1300, 1, box ))->setValue( v );
- connect( o, SIGNAL(valueChanged(int)), SLOT(changeF_peakSpeed( int )) );
- connect( o, SIGNAL(valueChanged(int)), m, SLOT(setValue( int )) );
+ new TQLabel( "Peak acceleration: ", box );
+ o = new TQSlider( 1000, 1300, 50, v, Qt::Horizontal, box );
+ (m = new TQSpinBox( 1000, 1300, 1, box ))->setValue( v );
+ connect( o, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changeF_peakSpeed( int )) );
+ connect( o, TQT_SIGNAL(valueChanged(int)), m, TQT_SLOT(setValue( int )) );
//box->show();
}
@@ -66,12 +66,12 @@ BoomAnalyzer::init()
barPixmap.resize( COLUMN_WIDTH-2, HEIGHT );
- QPainter p( &barPixmap );
+ TQPainter p( &barPixmap );
for( uint y = 0; y < HEIGHT; ++y )
{
const double F = (double)y * h;
- p.setPen( QColor( 255 - int(229.0 * F), 255 - int(229.0 * F), 255 - int(191.0 * F) ) );
+ p.setPen( TQColor( 255 - int(229.0 * F), 255 - int(229.0 * F), 255 - int(191.0 * F) ) );
p.drawLine( 0, y, COLUMN_WIDTH-2, y );
}
}
@@ -101,7 +101,7 @@ BoomAnalyzer::analyze( const Scope &scope )
{
eraseCanvas();
- QPainter p( canvas() );
+ TQPainter p( canvas() );
float h;
const uint MAX_HEIGHT = height() - 1;
diff --git a/amarok/src/analyzers/boomanalyzer.h b/amarok/src/analyzers/boomanalyzer.h
index 55c5ec3a..37007649 100644
--- a/amarok/src/analyzers/boomanalyzer.h
+++ b/amarok/src/analyzers/boomanalyzer.h
@@ -15,7 +15,7 @@ class BoomAnalyzer : public Analyzer::Base2D
{
Q_OBJECT
public:
- BoomAnalyzer( QWidget* );
+ BoomAnalyzer( TQWidget* );
virtual void init();
virtual void transform( Scope &s );
@@ -35,17 +35,17 @@ protected:
std::vector<float> peak_height;
std::vector<float> peak_speed;
- QPixmap barPixmap;
+ TQPixmap barPixmap;
};
namespace Amarok
{
namespace ColorScheme
{
- extern QColor Base;
- extern QColor Text;
- extern QColor Background;
- extern QColor Foreground;
+ extern TQColor Base;
+ extern TQColor Text;
+ extern TQColor Background;
+ extern TQColor Foreground;
}
}
diff --git a/amarok/src/analyzers/glanalyzer.cpp b/amarok/src/analyzers/glanalyzer.cpp
index ec8a6bc4..21382efe 100644
--- a/amarok/src/analyzers/glanalyzer.cpp
+++ b/amarok/src/analyzers/glanalyzer.cpp
@@ -24,7 +24,7 @@
#include <kdebug.h>
-GLAnalyzer::GLAnalyzer( QWidget *parent )
+GLAnalyzer::GLAnalyzer( TQWidget *parent )
: Analyzer::Base3D(parent, 15)
, m_oldy(32, -10.0f)
, m_peaks(32)
diff --git a/amarok/src/analyzers/glanalyzer.h b/amarok/src/analyzers/glanalyzer.h
index 394c4638..d25583f5 100644
--- a/amarok/src/analyzers/glanalyzer.h
+++ b/amarok/src/analyzers/glanalyzer.h
@@ -48,7 +48,7 @@ private:
GLfloat x, y;
public:
- GLAnalyzer(QWidget *);
+ GLAnalyzer(TQWidget *);
~GLAnalyzer();
void analyze( const Scope & );
diff --git a/amarok/src/analyzers/glanalyzer2.cpp b/amarok/src/analyzers/glanalyzer2.cpp
index 6f3d1c83..bee9b816 100644
--- a/amarok/src/analyzers/glanalyzer2.cpp
+++ b/amarok/src/analyzers/glanalyzer2.cpp
@@ -24,11 +24,11 @@
#include "glanalyzer2.h"
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <sys/time.h>
-GLAnalyzer2::GLAnalyzer2( QWidget *parent ):
+GLAnalyzer2::GLAnalyzer2( TQWidget *parent ):
Analyzer::Base3D(parent, 15)
{
//initialize openGL context before managing GL calls
@@ -297,18 +297,18 @@ void GLAnalyzer2::setTextureMatrix( float rot, float scale )
glMatrixMode( GL_MODELVIEW );
}
-bool GLAnalyzer2::loadTexture( QString fileName, GLuint& textureID )
+bool GLAnalyzer2::loadTexture( TQString fileName, GLuint& textureID )
{
//reset texture ID to the default EMPTY value
textureID = 0;
//load image
- QImage tmp;
+ TQImage tmp;
if ( !tmp.load( fileName ) )
return false;
//convert it to suitable format (flipped RGBA)
- QImage texture = QGLWidget::convertToGLFormat( tmp );
+ TQImage texture = TQGLWidget::convertToGLFormat( tmp );
if ( texture.isNull() )
return false;
diff --git a/amarok/src/analyzers/glanalyzer2.h b/amarok/src/analyzers/glanalyzer2.h
index 3aeb98ae..77ef9c9d 100644
--- a/amarok/src/analyzers/glanalyzer2.h
+++ b/amarok/src/analyzers/glanalyzer2.h
@@ -22,14 +22,14 @@
#ifdef HAVE_QGLWIDGET
#include "analyzerbase.h"
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class GLAnalyzer2 : public Analyzer::Base3D
{
public:
- GLAnalyzer2(QWidget *);
+ GLAnalyzer2(TQWidget *);
~GLAnalyzer2();
void analyze( const Scope & );
void paused();
@@ -65,7 +65,7 @@ private:
void drawFullDot( float r, float g, float b, float a );
void setTextureMatrix( float rot, float scale );
- bool loadTexture(QString file, GLuint& textureID);
+ bool loadTexture(TQString file, GLuint& textureID);
void freeTexture(GLuint& textureID);
};
diff --git a/amarok/src/analyzers/glanalyzer3.cpp b/amarok/src/analyzers/glanalyzer3.cpp
index cc7ce4c7..7a69301a 100644
--- a/amarok/src/analyzers/glanalyzer3.cpp
+++ b/amarok/src/analyzers/glanalyzer3.cpp
@@ -24,7 +24,7 @@
#include "glanalyzer3.h"
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <sys/time.h>
#ifndef HAVE_FABSF
@@ -121,7 +121,7 @@ class Paddle
};
-GLAnalyzer3::GLAnalyzer3( QWidget *parent ):
+GLAnalyzer3::GLAnalyzer3( TQWidget *parent ):
Analyzer::Base3D(parent, 15)
{
//initialize openGL context before managing GL calls
@@ -445,18 +445,18 @@ void GLAnalyzer3::drawScrollGrid( float scroll, float color[4] )
glMatrixMode( GL_MODELVIEW );
}
-bool GLAnalyzer3::loadTexture( QString fileName, GLuint& textureID )
+bool GLAnalyzer3::loadTexture( TQString fileName, GLuint& textureID )
{
//reset texture ID to the default EMPTY value
textureID = 0;
//load image
- QImage tmp;
+ TQImage tmp;
if ( !tmp.load( fileName ) )
return false;
//convert it to suitable format (flipped RGBA)
- QImage texture = QGLWidget::convertToGLFormat( tmp );
+ TQImage texture = TQGLWidget::convertToGLFormat( tmp );
if ( texture.isNull() )
return false;
diff --git a/amarok/src/analyzers/glanalyzer3.h b/amarok/src/analyzers/glanalyzer3.h
index 7abd7614..e33009c5 100644
--- a/amarok/src/analyzers/glanalyzer3.h
+++ b/amarok/src/analyzers/glanalyzer3.h
@@ -22,17 +22,17 @@
#define GLBOUNCER_H
#include "analyzerbase.h"
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
-class QWidget;
+class TQWidget;
class Ball;
class Paddle;
class GLAnalyzer3 : public Analyzer::Base3D
{
public:
- GLAnalyzer3(QWidget *);
+ GLAnalyzer3(TQWidget *);
~GLAnalyzer3();
void analyze( const Scope & );
void paused();
@@ -62,7 +62,7 @@ private:
static const int NUMBER_OF_BALLS = 16;
- QPtrList<Ball> balls;
+ TQPtrList<Ball> balls;
Paddle * leftPaddle, * rightPaddle;
float unitX, unitY;
GLuint ballTexture;
@@ -72,7 +72,7 @@ private:
void drawHFace( float y );
void drawScrollGrid( float scroll, float color[4] );
- bool loadTexture(QString file, GLuint& textureID);
+ bool loadTexture(TQString file, GLuint& textureID);
void freeTexture(GLuint& textureID);
};
diff --git a/amarok/src/analyzers/sonogram.cpp b/amarok/src/analyzers/sonogram.cpp
index b29563db..60e7749c 100644
--- a/amarok/src/analyzers/sonogram.cpp
+++ b/amarok/src/analyzers/sonogram.cpp
@@ -11,10 +11,10 @@
//
//
-#include <qpainter.h>
+#include <tqpainter.h>
#include "sonogram.h"
-Sonogram::Sonogram(QWidget *parent) :
+Sonogram::Sonogram(TQWidget *parent) :
Analyzer::Base2D(parent, 16, 9)
{
}
@@ -31,9 +31,9 @@ void Sonogram::init()
}
-void Sonogram::resizeEvent(QResizeEvent *e)
+void Sonogram::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
canvas()->resize(size());
background()->resize(size());
@@ -51,8 +51,8 @@ void Sonogram::resizeEvent(QResizeEvent *e)
void Sonogram::analyze(const Scope &s)
{
int x = width() - 1;
- QColor c;
- QPainter p(canvas());
+ TQColor c;
+ TQPainter p(canvas());
bitBlt(canvas(), 0, 0, canvas(), 1, 0, x, height());
Scope::const_iterator it = s.begin(), end = s.end();
diff --git a/amarok/src/analyzers/sonogram.h b/amarok/src/analyzers/sonogram.h
index 609c9b2c..09075a6e 100644
--- a/amarok/src/analyzers/sonogram.h
+++ b/amarok/src/analyzers/sonogram.h
@@ -23,7 +23,7 @@
class Sonogram : public Analyzer::Base2D
{
public:
- Sonogram(QWidget*);
+ Sonogram(TQWidget*);
~Sonogram();
protected:
@@ -31,7 +31,7 @@ protected:
void analyze(const Scope&);
void transform(Scope&);
void demo();
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
};
#endif
diff --git a/amarok/src/analyzers/turbine.cpp b/amarok/src/analyzers/turbine.cpp
index d2e75640..43b013c4 100644
--- a/amarok/src/analyzers/turbine.cpp
+++ b/amarok/src/analyzers/turbine.cpp
@@ -8,7 +8,7 @@
//
#include <cmath>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "amarok.h"
#include "turbine.h"
@@ -17,7 +17,7 @@ void TurbineAnalyzer::analyze( const Scope &scope )
{
eraseCanvas();
- QPainter p( canvas() );
+ TQPainter p( canvas() );
float h;
const uint hd2 = height() / 2;
const uint MAX_HEIGHT = hd2 - 1;
diff --git a/amarok/src/analyzers/turbine.h b/amarok/src/analyzers/turbine.h
index d75c6053..6ad34fbc 100644
--- a/amarok/src/analyzers/turbine.h
+++ b/amarok/src/analyzers/turbine.h
@@ -14,7 +14,7 @@
class TurbineAnalyzer : public BoomAnalyzer
{
public:
- TurbineAnalyzer( QWidget *parent ) : BoomAnalyzer( parent ) {}
+ TurbineAnalyzer( TQWidget *parent ) : BoomAnalyzer( parent ) {}
void analyze( const Scope& );
};