define window for showing a mussa alignment
[mussa.git] / qui / seqbrowser / SequenceBrowser.hpp
1 #ifndef _PATHSCENE_H_
2 #define _PATHSCENE_H_
3
4 #include <QGLWidget>
5 #include <QRectF>
6 #include <QPoint>
7 #include <vector>
8 #include <GL/gl.h>
9
10 #include <set>
11
12 #include "alg/mussa.hpp"
13 #include "alg/glsequence.hpp"
14 #include "alg/glseqbrowser.hpp"
15
16 class QMouseEvent;
17 class QRubberBand;
18
19 /*! \brief Render mussa sequences and paths 
20  */
21 class SequenceBrowser: public QGLWidget, public GlSeqBrowser
22 {
23   Q_OBJECT
24
25 public: 
26   SequenceBrowser(QWidget *parent=0);
27
28   QSize sizeHint() const;
29
30   void clear();
31   void push_sequence(const Sequence &s);
32   void push_sequence(GlSequence &);
33       
34 public slots:
35   void setClipPlane(int z);
36   //! set the center of the current viewport
37   void setViewportCenter(float x);
38   //! set our magnification level
39   void setZoom(int);
40
41 signals:
42   //! emited when someone adds to our list of tracks
43   void tracksChanged();
44   void viewportChanged();
45
46 private:
47   void initializeGL();
48   void resizeGL(int height, int width);
49   void paintGL();
50
51   //! \defgroup Selection
52   QRubberBand *rubberBand;
53   QPoint bandOrigin;
54   bool drawingBand;
55   void mousePressEvent(QMouseEvent *);
56   void mouseMoveEvent(QMouseEvent *);
57   void mouseReleaseEvent(QMouseEvent *);
58 };
59 #endif