better motif editor
[mussa.git] / qui / motif_editor / MotifElement.hpp
1 #ifndef MOTIFELEMENT_HPP_
2 #define MOTIFELEMENT_HPP_
3
4 #include <QColor>
5 #include <QString>
6
7 #include "alg/color.hpp"
8 #include "alg/sequence.hpp"
9
10 class MotifElement {
11 public:
12   MotifElement();
13   MotifElement(const Sequence& seq, Color c=Color(1.0,0.0,0.0,1.0));
14
15   //! is the element "empty"
16   bool isEmpty() const;
17   
18   //! should we search the analysis for this element?
19   bool isEnabled() const;
20   //! set the state for searching the analysis for this element?
21   void setEnabled(bool);
22   
23   //! return color should this motif be drawn as
24   Color getColor() const;
25   //! set what color this motif should be drawn as
26   void setColor(const Color& c);
27   //! return QColor should this motif should be drawn as
28   QColor getQColor() const;
29   //! set color using QColor
30   void setQColor(const QColor& c);
31   
32   //! return sequence
33   const Sequence& getSequence() const;
34   //! set sequence
35   void setSequence(const Sequence& seq);
36   //! set sequence text
37   void setSequence(const std::string& seq_text);
38   //! get sequence text
39   QString getSequenceText() const;
40   
41   //! get sequence name
42   std::string getName() const;
43   //! set sequence name
44   void setName(const std::string& seq_name);
45   
46 protected:
47   //! search for motif
48   bool enabled;
49   //! store motif color
50   Color color;
51   //! store sequence
52   Sequence motif;
53 };
54 #endif /*MOTIFELEMENT_HPP_*/