Tool for inserting changelog into rst documents (i.e. manual)
[mussa.git] / qui / motif_editor / MotifDetail.hpp
1 #ifndef _MOTIF_DETAIL_H
2 #define _MOTIF_DETAIL_H
3
4 #include <string>
5
6 #include <QCheckBox>
7 #include <QColor>
8 #include <QLineEdit>
9 #include <QPushButton>
10 #include <QRegExpValidator>
11 #include <QWidget>
12
13 //#include "alg/sequence.hpp"
14 #include "alg/color.hpp"
15
16 class MotifDetail : public QWidget
17 {
18   Q_OBJECT
19
20 public:
21   MotifDetail(QWidget *parent=0);
22   MotifDetail(const MotifDetail &);
23   MotifDetail(std::string& m, Color& c, std::string& name, QWidget *parent=0);
24
25   void setMotif(const std::string& m);
26   std::string motif() const;
27
28   void setName(const std::string& name);
29   std::string name() const;
30
31   void setColor(const Color&);
32   Color color() const;
33   QColor qcolor() const;
34
35   // is this motif enabled?
36   bool enabled() const;
37
38 public slots:
39   void promptColor();
40
41 private:
42   void setupWidget();
43   
44   Color motif_color;
45
46   // widgets
47   QCheckBox enabledButton;
48   QPushButton colorButton;
49   QLineEdit motifText;
50   QLineEdit motifName;
51 };
52 #endif