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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user