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
This commit is contained in:
Andreas Brandmaier
2006-01-21 21:11:52 +00:00
parent 858449d9bd
commit 3d8f7f6985
2 changed files with 13 additions and 13 deletions

View File

@@ -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 ) );

View File

@@ -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;