1 #include "qui/motif_editor/MotifEditor.hpp"
5 MotifElement::MotifElement() :
7 color(Color(1.0,0.0,0.0,1.0)),
12 MotifElement::MotifElement(const Sequence& seq, Color c) :
19 bool MotifElement::isEmpty() const
21 if (motif.get_name().size() == 0 and motif.size() == 0) {
26 //! should we search the analysis for this element?
27 bool MotifElement::isEnabled() const
32 //! set the state for searching the analysis for this element?
33 void MotifElement::setEnabled(bool enabled_)
38 //! return color should this motif be drawn as
39 Color MotifElement::getColor() const
44 //! set what color this motif should be drawn as
45 void MotifElement::setColor(const Color& c)
50 //! return color should this motif be drawn as
51 QColor MotifElement::getQColor() const
54 qcolor.setRgbF(color.r(), color.g(), color.b(), color.a());
58 //! set what color this motif should be drawn as
59 void MotifElement::setQColor(const QColor& c)
61 color = Color(c.redF(), c.greenF(), c.blueF(), c.alphaF());
65 const Sequence& MotifElement::getSequence() const
71 void MotifElement::setSequence(const Sequence& seq)
77 void MotifElement::setSequence(const std::string& seq_text)
79 motif.set_sequence(seq_text);
82 QString MotifElement::getSequenceText() const
84 return QString(motif.get_sequence().c_str());
88 std::string MotifElement::getName() const
90 return motif.get_name();
94 void MotifElement::setName(const std::string& seq_name)
96 motif.set_fasta_header(seq_name);