provide a user interface to edit motifs
[mussa.git] / qui / motif_editor / MotifDetail.hpp
1 #ifndef _MOTIF_DETAIL_H
2 #define _MOTIF_DETAIL_H
3
4 #include <string>
5
6 #include <QColor>
7 #include <QLineEdit>
8 #include <QPushButton>
9 #include <QRegExpValidator>
10 #include <QWidget>
11
12 //#include "alg/sequence.hpp"
13 #include "alg/color.hpp"
14
15 class MotifDetail : public QWidget
16 {
17   Q_OBJECT
18
19 public:
20   MotifDetail(QWidget *parent=0);
21   MotifDetail(const MotifDetail &);
22   MotifDetail(std::string& m, Color& c, QWidget *parent=0);
23
24   void setMotif(const std::string& m);
25   std::string motif() const;
26
27   void setColor(const Color&);
28   Color color() const;
29   QColor qcolor() const;
30
31 public slots:
32   void promptColor();
33
34 private:
35   void setupWidget();
36   
37   Color motif_color;
38
39   // widgets
40   QPushButton colorButton;
41   QLineEdit motifText;
42 };
43 #endif