all: targets
include alg/module.mk
-include alg/test/module.mk
include gui/module.mk
+include test/module.mk
include module.mk
# process what the module.mks defined
+++ /dev/null
-#include "alg/glsequence.h"
-
-#include <iostream>
-using namespace std;
-
-GlSequence::GlSequence(const Sequence &s)
- : seq(s),
- seq_x(0.0),
- seq_y(0.0),
- seq_z(1.0),
- seq_width(s.size()),
- seq_height(gl_track_height)
-{
-}
-
-GlSequence::GlSequence(const GlSequence &s)
- : seq(s.seq),
- seq_x(s.seq_x),
- seq_y(s.seq_y),
- seq_z(s.seq_z),
- seq_width(s.seq_width),
- seq_height(s.seq_height)
-{
-}
-
-GlSequence &GlSequence::operator=(const GlSequence & s)
-{
- if (this != &s) {
- const_cast<Sequence &>(seq) = s.seq;
- seq_x = s.seq_x;
- seq_y = s.seq_y;
- seq_z = s.seq_z;
- seq_width = s.seq_width;
- seq_height = s.seq_height;
- }
- return *this;
-}
-
-const Sequence &GlSequence::sequence() const
-{
- return seq;
-}
-
-void GlSequence::setX(GLfloat value)
-{
- seq_x = value;
-}
-
-GLfloat GlSequence::x() const
-{
- return seq_x;
-}
-
-void GlSequence::setY(GLfloat value)
-{
- seq_y = value;
-}
-
-GLfloat GlSequence::y() const
-{
- return seq_y;
-}
-
-void GlSequence::setWidth(GLfloat value)
-{
- seq_width = value;
-}
-
-GLfloat GlSequence::width() const
-{
- return seq_width;
-}
-
-
-void GlSequence::draw() const
-{
- glLineWidth(seq_height);
- glColor3f(0.0, 0.0, 0.0);
- // draw main sequence track
- glBegin(GL_LINES);
- glVertex3f(seq_x, seq_y, seq_z);
- glVertex3f(seq_x+seq_width, seq_y, seq_z);
- clog << "drawing " << seq_x << " " << seq_y << " " << seq_width
- << std::endl;
- glEnd();
- // draw annotations
- GLfloat annotation_z = seq_z + 1.0;
- std::list<annot> annots = seq.annotations();
- for (std::list<annot>::const_iterator annot_itor = annots.begin();
- annot_itor != annots.end();
- ++annot_itor, ++annotation_z)
- {
- glColor3f(0.0, 0.5, 0.0);
- glBegin(GL_LINES);
- glVertex3f(annot_itor->start, seq_y, annotation_z);
- glVertex3f(annot_itor->end , seq_y, annotation_z);
- glEnd();
- }
-}
+++ /dev/null
-#ifndef _GL_SEQUENCE_H_
-#define _GL_SEQUENCE_H_
-
-#include "alg/sequence.hh"
-#include <GL/gl.h>
-
-//! Manage rendering a mussa sequence track
-/*! The idea is this will keep track of the location of where the sequence
- * is being rendered, and handle displaying annotations on that track
- */
-class GlSequence
-{
-public:
- GlSequence(const Sequence & s);
- GlSequence(const GlSequence & s);
- GlSequence &operator=(const GlSequence &s);
-
- void draw() const;
-
- const Sequence &sequence() const;
- void setX(GLfloat);
- GLfloat x() const;
- void setY(GLfloat);
- GLfloat y() const;
- void setWidth(GLfloat);
- GLfloat width() const;
-
-private:
- const Sequence& seq;
- GLfloat seq_x;
- GLfloat seq_y;
- GLfloat seq_z;
- GLfloat seq_width;
- GLfloat seq_height;
-};
-
-const float gl_track_height = 10.0;
-
-#endif
SOURCES.cxx := flp.cxx \
flp_seqcomp.cxx \
- glsequence.cxx \
mussa_class.cxx \
nway_paths.cxx \
nway_entropy.cxx \
-CURDIR := $(BASEDIR)alg/test/
+CURDIR := $(BASEDIR)test/
SOURCES.cxx := test_flp.cxx \
test_glsequence.cxx \
test_main.cxx \
test_mussa.cxx \
test_nway.cxx \
- test_sequence.cxx
+ test_sequence.cxx \
+ ../qui/GlSequence.cxx
TESTSRC := $(addprefix $(CURDIR), $(SOURCES.cxx))
#include <string>
-#include "alg/glsequence.h"
+#include "qui/GlSequence.h"
#include "alg/sequence.hh"
using namespace std;
# Input
HEADERS += mussa_exceptions.hh \
+ qui/GlSequence.h \
qui/PathWindow.h \
qui/PathScene.h \
qui/ThresholdWidget.h \
qui/ImageScaler.h \
qui/ImageSaveDialog.h \
alg/flp.hh \
- alg/glsequence.h \
alg/mussa_class.hh \
alg/nway_paths.hh \
alg/sequence.hh
SOURCES += mussagl.cxx \
+ qui/GlSequence.cxx \
qui/PathWindow.cxx \
qui/PathScene.cxx \
qui/ThresholdWidget.cxx \
qui/ImageSaveDialog.cxx \
alg/flp.cxx \
alg/flp_seqcomp.cxx \
- alg/glsequence.cxx \
alg/mussa_class.cxx \
alg/nway_entropy.cxx \
alg/nway_other.cxx \
--- /dev/null
+#include "qui/GlSequence.h"
+
+#include <iostream>
+using namespace std;
+
+GlSequence::GlSequence(const Sequence &s)
+ : seq(s),
+ seq_x(0.0),
+ seq_y(0.0),
+ seq_z(1.0),
+ seq_width(s.size()),
+ seq_height(gl_track_height)
+{
+}
+
+GlSequence::GlSequence(const GlSequence &s)
+ : seq(s.seq),
+ seq_x(s.seq_x),
+ seq_y(s.seq_y),
+ seq_z(s.seq_z),
+ seq_width(s.seq_width),
+ seq_height(s.seq_height)
+{
+}
+
+GlSequence &GlSequence::operator=(const GlSequence & s)
+{
+ if (this != &s) {
+ const_cast<Sequence &>(seq) = s.seq;
+ seq_x = s.seq_x;
+ seq_y = s.seq_y;
+ seq_z = s.seq_z;
+ seq_width = s.seq_width;
+ seq_height = s.seq_height;
+ }
+ return *this;
+}
+
+const Sequence &GlSequence::sequence() const
+{
+ return seq;
+}
+
+void GlSequence::setX(GLfloat value)
+{
+ seq_x = value;
+}
+
+GLfloat GlSequence::x() const
+{
+ return seq_x;
+}
+
+void GlSequence::setY(GLfloat value)
+{
+ seq_y = value;
+}
+
+GLfloat GlSequence::y() const
+{
+ return seq_y;
+}
+
+void GlSequence::setWidth(GLfloat value)
+{
+ seq_width = value;
+}
+
+GLfloat GlSequence::width() const
+{
+ return seq_width;
+}
+
+
+void GlSequence::draw() const
+{
+ glLineWidth(seq_height);
+ glColor3f(0.0, 0.0, 0.0);
+ // draw main sequence track
+ glBegin(GL_LINES);
+ glVertex3f(seq_x, seq_y, seq_z);
+ glVertex3f(seq_x+seq_width, seq_y, seq_z);
+ clog << "drawing " << seq_x << " " << seq_y << " " << seq_width
+ << std::endl;
+ glEnd();
+ // draw annotations
+ GLfloat annotation_z = seq_z + 1.0;
+ std::list<annot> annots = seq.annotations();
+ for (std::list<annot>::const_iterator annot_itor = annots.begin();
+ annot_itor != annots.end();
+ ++annot_itor, ++annotation_z)
+ {
+ glColor3f(0.0, 0.5, 0.0);
+ glBegin(GL_LINES);
+ glVertex3f(annot_itor->start, seq_y, annotation_z);
+ glVertex3f(annot_itor->end , seq_y, annotation_z);
+ glEnd();
+ }
+}
--- /dev/null
+#ifndef _GL_SEQUENCE_H_
+#define _GL_SEQUENCE_H_
+
+#include "alg/sequence.hh"
+#include <GL/gl.h>
+
+//! Manage rendering a mussa sequence track
+/*! The idea is this will keep track of the location of where the sequence
+ * is being rendered, and handle displaying annotations on that track
+ */
+class GlSequence
+{
+public:
+ GlSequence(const Sequence & s);
+ GlSequence(const GlSequence & s);
+ GlSequence &operator=(const GlSequence &s);
+
+ void draw() const;
+
+ const Sequence &sequence() const;
+ void setX(GLfloat);
+ GLfloat x() const;
+ void setY(GLfloat);
+ GLfloat y() const;
+ void setWidth(GLfloat);
+ GLfloat width() const;
+
+private:
+ const Sequence& seq;
+ GLfloat seq_x;
+ GLfloat seq_y;
+ GLfloat seq_z;
+ GLfloat seq_width;
+ GLfloat seq_height;
+};
+
+const float gl_track_height = 10.0;
+
+#endif
#include <GL/gl.h>
#include <math.h>
-#include "alg/glsequence.h"
+#include "qui/GlSequence.h"
using namespace std;
#include <vector>
#include "alg/mussa_class.hh"
-#include "alg/glsequence.h"
+#include "qui/GlSequence.h"
class QMouseEvent;
class QRubberBand;