bugfixes, GUI-improvements
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@35 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -46,7 +46,10 @@ public:
|
||||
|
||||
inline virtual void play( void )
|
||||
{
|
||||
m_instrument->play();
|
||||
if( m_instrument != NULL )
|
||||
{
|
||||
m_instrument->play();
|
||||
}
|
||||
}
|
||||
|
||||
inline virtual bool done( void ) const
|
||||
@@ -56,7 +59,7 @@ public:
|
||||
|
||||
inline virtual void checkValidity( void )
|
||||
{
|
||||
if( !m_instrument->valid() )
|
||||
if( m_instrument != NULL && !m_instrument->valid() )
|
||||
{
|
||||
m_instrument = NULL;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
|
||||
#include "tool_button.h"
|
||||
|
||||
|
||||
class nStateButton : public toolButton
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -80,7 +81,7 @@ protected:
|
||||
|
||||
|
||||
private:
|
||||
vvector<QPair<QPixmap *, QString> > m_states;
|
||||
vvector<QPair<QPixmap, QString> > m_states;
|
||||
QString m_generalToolTip;
|
||||
|
||||
int m_curState;
|
||||
|
||||
@@ -54,6 +54,7 @@ class lcdSpinBox;
|
||||
class lmmsMainWin;
|
||||
class pattern;
|
||||
class projectNotes;
|
||||
class textFloat;
|
||||
class timeLine;
|
||||
class toolButton;
|
||||
|
||||
@@ -281,7 +282,8 @@ private:
|
||||
|
||||
QSlider * m_masterVolumeSlider;
|
||||
QSlider * m_masterPitchSlider;
|
||||
|
||||
textFloat * m_mvsStatus;
|
||||
textFloat * m_mpsStatus;
|
||||
|
||||
toolButton * m_addBBTrackButton;
|
||||
toolButton * m_addSampleTrackButton;
|
||||
|
||||
@@ -31,10 +31,12 @@
|
||||
#ifdef QT4
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPixmap>
|
||||
|
||||
#else
|
||||
|
||||
#include <qwidget.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -47,19 +49,36 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void setTitle( const QString & _title );
|
||||
void setText( const QString & _text );
|
||||
void setPixmap( const QPixmap & _pixmap );
|
||||
|
||||
void reparent( QWidget * _new_parent );
|
||||
|
||||
void setVisibilityTimeOut( int _msecs );
|
||||
|
||||
|
||||
static textFloat * displayMessage( const QString & _msg,
|
||||
int _timeout = 2000,
|
||||
QWidget * _parent = NULL,
|
||||
int _add_y_margin = 0 );
|
||||
static textFloat * displayMessage( const QString & _title,
|
||||
const QString & _msg,
|
||||
const QPixmap & _pixmap =
|
||||
QPixmap(),
|
||||
int _timeout = 2000,
|
||||
QWidget * _parent = NULL );
|
||||
|
||||
|
||||
protected:
|
||||
virtual void paintEvent( QPaintEvent * _me );
|
||||
virtual void mousePressEvent( QMouseEvent * _me );
|
||||
|
||||
|
||||
private:
|
||||
QString m_title;
|
||||
QString m_text;
|
||||
QPixmap m_pixmap;
|
||||
|
||||
} ;
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ public:
|
||||
m_colorStandard( s_stdColor ),
|
||||
m_colorHighlighted( s_hlColor )
|
||||
{
|
||||
// setup colors
|
||||
leaveEvent( NULL );
|
||||
}
|
||||
|
||||
~toolButton();
|
||||
@@ -66,6 +68,7 @@ public:
|
||||
{
|
||||
m_colorHighlighted = _color;
|
||||
}
|
||||
|
||||
#ifndef QT4
|
||||
inline void setIcon( const QPixmap & _icon )
|
||||
{
|
||||
@@ -73,6 +76,7 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
protected:
|
||||
virtual void enterEvent( QEvent * _ev );
|
||||
virtual void leaveEvent( QEvent * _ev );
|
||||
|
||||
Reference in New Issue
Block a user