Mercurial > hg > svgui
comparison widgets/Panner.h @ 174:96b8a790730a
* Wire up the Panner widget in the pane, and do some tidying in Pane
author | Chris Cannam |
---|---|
date | Thu, 19 Oct 2006 13:05:39 +0000 |
parents | 9c40dc10c88c |
children | 42118892f428 |
comparison
equal
deleted
inserted
replaced
173:9c40dc10c88c | 174:96b8a790730a |
---|---|
25 public: | 25 public: |
26 Panner(QWidget *parent = 0); | 26 Panner(QWidget *parent = 0); |
27 virtual ~Panner(); | 27 virtual ~Panner(); |
28 | 28 |
29 void setDefaultRectCentre(float, float); | 29 void setDefaultRectCentre(float, float); |
30 | |
31 void setThumbColour(QColor colour); | |
32 void setAlpha(int backgroundAlpha, int thumbAlpha); | |
30 | 33 |
31 virtual void mousePressEvent(QMouseEvent *e); | 34 virtual void mousePressEvent(QMouseEvent *e); |
32 virtual void mouseDoubleClickEvent(QMouseEvent *e); | 35 virtual void mouseDoubleClickEvent(QMouseEvent *e); |
33 virtual void mouseMoveEvent(QMouseEvent *e); | 36 virtual void mouseMoveEvent(QMouseEvent *e); |
34 virtual void mouseReleaseEvent(QMouseEvent *e); | 37 virtual void mouseReleaseEvent(QMouseEvent *e); |
100 | 103 |
101 float m_defaultCentreX; | 104 float m_defaultCentreX; |
102 float m_defaultCentreY; | 105 float m_defaultCentreY; |
103 bool m_defaultsSet; | 106 bool m_defaultsSet; |
104 | 107 |
108 QColor m_thumbColour; | |
109 int m_backgroundAlpha; | |
110 int m_thumbAlpha; | |
111 | |
105 float centreX() const { return m_rectX + m_rectWidth/2; } | 112 float centreX() const { return m_rectX + m_rectWidth/2; } |
106 float centreY() const { return m_rectY + m_rectHeight/2; } | 113 float centreY() const { return m_rectY + m_rectHeight/2; } |
107 | 114 |
108 bool m_clicked; | 115 bool m_clicked; |
109 QPoint m_clickPos; | 116 QPoint m_clickPos; |