Improve graph and bitinvader

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1105 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-06-08 12:59:42 +00:00
parent efc8c7bbfa
commit 239e4fb4bd
4 changed files with 81 additions and 21 deletions

View File

@@ -41,7 +41,14 @@ class EXPORT graph : public QWidget, public modelView
{
Q_OBJECT
public:
graph( QWidget * _parent );
enum graphStyle
{
NearestStyle,
LinearStyle,
NumGraphStyles
};
graph( QWidget * _parent, graphStyle _style = graph::LinearStyle );
virtual ~graph();
void setForeground( const QPixmap & _pixmap );
@@ -51,6 +58,17 @@ public:
return castModel<graphModel>();
}
inline graphStyle getGraphStyle( void )
{
return m_graphStyle;
}
inline void setGraphStyle( graphStyle _s )
{
m_graphStyle = _s;
update();
}
protected:
virtual void paintEvent( QPaintEvent * _pe );
@@ -73,6 +91,7 @@ private:
QPixmap m_foreground;
graphModel * m_graphModel;
graphStyle m_graphStyle;
bool m_mouseDown;
int m_lastCursorX;