make the path view independent of type of connection
[mussa.git] / qui / PathWidget.hpp
1 #ifndef _PATH_WIDGET_H_
2 #define _PATH_WIDGET_H_
3
4 #include <QScrollBar>
5 #include <QWidget>
6
7 #include "qui/PathScene.hpp"
8
9 class PathWidget : public QWidget
10 {
11   Q_OBJECT 
12
13 public:
14   PathWidget(QWidget *parent=0);
15   PathScene scene;
16
17 public slots:
18   //! update the scrollbar with current viewport information
19   void updateScrollBar();
20   //! update scene with the properly scalled scrollbar offset
21   void setViewportCenter(int x);
22
23 private:
24   QScrollBar viewportBar;
25   int thumb;
26
27   float range;
28   float scale;
29 };
30
31 #endif