10 #include "alg/mussa.hpp"
11 #include "alg/glsequence.hpp"
16 /*! \brief Render mussa sequences and paths
18 class PathScene: public QGLWidget
23 PathScene(Mussa *analysis=0, QWidget *parent=0);
25 QSize sizeHint() const;
28 std::vector<GlSequence> tracks;
33 float viewportRight();
34 float viewportCenter();
37 void setClipPlane(int z);
38 //! set the center of the current viewport
39 void setViewportX(float x);
40 //! set our magnification level
44 //! load a mussa parameter file (which specifies an analysis to run)
46 //! load a previously run analysis
47 void loadSavedAnalysis();
48 //! set the soft threshold used by the Nway_Path algorithm
49 void setSoftThreshold(int thres);
50 //! indicate that we should update our scene
54 //! emitted when our analysis has changed
55 void analysisUpdated();
56 void viewportChanged();
65 //! where the "center" of the viewport is
66 float viewport_center;
67 //! true if we have a selection
69 //! indicate which paths are selected
70 std::vector<bool> selectedPaths;
71 //! which track is selected (it only makes sense to have one track selected).
72 unsigned int selectedTrack;
75 void resizeGL(int width, int height);
77 // recompute our current viewport dimensions, used by setViewportX & setZoom
78 void updateViewport(float left, int new_zoom);
81 //! draw all of our sequence tracks
82 void draw_tracks() const;
83 void draw_lines() const;
84 GLuint make_line_list();
85 //! convert opengl selections into the list of paths we should highlight
86 void processSelection(GLuint hits, GLuint buffer[], GLuint bufsize);
87 //! Provide a logical name for a type discriminator for our glName stack
88 enum FeatureType { MussaTracks, MussaPaths };
90 //! \defgroup Selection
91 QRubberBand *rubberBand;
95 void mousePressEvent(QMouseEvent *);
96 void mouseMoveEvent(QMouseEvent *);
97 void mouseReleaseEvent(QMouseEvent *);