1 #include "qui/GlSequence.h"
6 GlSequence::GlSequence(const Sequence &s)
12 seq_height(gl_track_height)
16 GlSequence::GlSequence(const GlSequence &s)
21 seq_width(s.seq_width),
22 seq_height(s.seq_height)
26 GlSequence &GlSequence::operator=(const GlSequence & s)
29 const_cast<Sequence &>(seq) = s.seq;
33 seq_width = s.seq_width;
34 seq_height = s.seq_height;
39 const Sequence &GlSequence::sequence() const
44 void GlSequence::setX(GLfloat value)
49 GLfloat GlSequence::x() const
54 void GlSequence::setY(GLfloat value)
59 GLfloat GlSequence::y() const
64 void GlSequence::setWidth(GLfloat value)
69 GLfloat GlSequence::width() const
75 void GlSequence::draw() const
77 glLineWidth(seq_height);
78 glColor3f(0.0, 0.0, 0.0);
79 // draw main sequence track
81 glVertex3f(seq_x, seq_y, seq_z);
82 glVertex3f(seq_x+seq_width, seq_y, seq_z);
83 //clog << "drawing " << seq_x << " " << seq_y << " " << seq_width
87 GLfloat annotation_z = seq_z + 1.0;
88 std::list<annot> annots = seq.annotations();
89 for (std::list<annot>::const_iterator annot_itor = annots.begin();
90 annot_itor != annots.end();
91 ++annot_itor, ++annotation_z)
93 glColor3f(0.0, 0.5, 0.0);
95 glVertex3f(annot_itor->start, seq_y, annotation_z);
96 glVertex3f(annot_itor->end , seq_y, annotation_z);