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
42 //! load a mussa parameter file (which specifies an analysis to run)
44 //! load a previously run analysis
45 void loadSavedAnalysis();
46 //! set the soft threshold used by the Nway_Path algorithm
47 void setSoftThreshold(int thres);
48 //! indicate that we should update our scene
52 //! emitted when our analysis has changed
53 void analysisUpdated();
54 void viewportChanged();
63 //! where the "center" of the viewport is
64 float viewport_center;
65 //! true if we have a selection
67 //! indicate which paths are selected
68 std::vector<bool> selectedPaths;
69 //! which track is selected (it only makes sense to have one track selected).
70 unsigned int selectedTrack;
73 void resizeGL(int width, int height);
75 // recompute our current viewport dimensions, used by setViewportX & setZoom
76 void updateViewport(float left, int new_zoom);
79 //! draw all of our sequence tracks
80 void draw_tracks() const;
81 void draw_lines() const;
82 GLuint make_line_list();
83 //! convert opengl selections into the list of paths we should highlight
84 void processSelection(GLuint hits, GLuint buffer[], GLuint bufsize);
85 //! Provide a logical name for a type discriminator for our glName stack
86 enum FeatureType { MussaTracks, MussaPaths };
88 //! \defgroup Selection
89 QRubberBand *rubberBand;
93 void mousePressEvent(QMouseEvent *);
94 void mouseMoveEvent(QMouseEvent *);
95 void mouseReleaseEvent(QMouseEvent *);