diff --git a/plugins/bit_invader/graph.cpp b/plugins/bit_invader/graph.cpp index 7921c05e9..bb3a6a69b 100644 --- a/plugins/bit_invader/graph.cpp +++ b/plugins/bit_invader/graph.cpp @@ -50,7 +50,7 @@ graph::graph( const QString & _text, QWidget * _parent) : QWidget( _parent ) { - m_background = 0; + m_background = NULL; setFixedSize( 128, 101 ); @@ -63,20 +63,20 @@ graph::graph( const QString & _text, QWidget * _parent) : graph::~graph() { - delete m_background; +// delete m_background; } -void graph::setBackground( QPixmap * pixmap ) +void graph::setBackground( const QPixmap &_pixmap ) { -// m_background = pixmap; -// setErasePixmap ( *m_background ); + m_background = _pixmap; + setErasePixmap ( m_background ); } -void graph::setSamplePointer( float * pointer, int length ) +void graph::setSamplePointer( float * _pointer, int _length ) { - samplePointer = pointer; - sampleLength = length; + samplePointer = _pointer; + sampleLength = _length; } void graph::mouseMoveEvent ( QMouseEvent * _me ) @@ -143,9 +143,9 @@ void graph::paintEvent( QPaintEvent * ) QPainter p( &draw_pm, this ); #endif - if (m_background != 0) { - p.drawPixmap( 0, 0, *m_background ); - } +// if (m_background != NULL) { + p.drawPixmap( 0, 0, m_background ); +// } p.setPen( QColor( 0xFF, 0xAA, 0x00 ) ); diff --git a/plugins/bit_invader/graph.h b/plugins/bit_invader/graph.h index 103bc24e2..b70ae1696 100644 --- a/plugins/bit_invader/graph.h +++ b/plugins/bit_invader/graph.h @@ -60,7 +60,7 @@ public: void setSamplePointer( float * pointer, int length ); - void setBackground ( QPixmap * pixmap ); + void setBackground ( const QPixmap & _pixmap ); signals: void sampleSizeChanged( float f ); @@ -72,7 +72,7 @@ protected: virtual void mouseMoveEvent( QMouseEvent * _me ); private: - QPixmap * m_background; + QPixmap m_background; float *samplePointer;