a503a673971c2c5ab661a7f4ce101ce29d4bb1f5
[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, std::string& name, QWidget *parent=0);
23
24   void setMotif(const std::string& m);
25   std::string motif() const;
26
27   void setName(const std::string& name);
28   std::string name() const;
29
30   void setColor(const Color&);
31   Color color() const;
32   QColor qcolor() const;
33
34 public slots:
35   void promptColor();
36
37 private:
38   void setupWidget();
39   
40   Color motif_color;
41
42   // widgets
43   QPushButton colorButton;
44   QLineEdit motifText;
45   QLineEdit motifName;
46 };
47 #endif