From 3d8f7f6985ff862c10cbaa4ecdf5c4b515a47e22 Mon Sep 17 00:00:00 2001 From: Andreas Brandmaier Date: Sat, 21 Jan 2006 21:11:52 +0000 Subject: [PATCH] fixed background image - still needs an image with higher quality! git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@52 0778d3d1-df1d-0410-868b-ea421aaaa00d --- plugins/bit_invader/graph.cpp | 22 +++++++++++----------- plugins/bit_invader/graph.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) 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;