aaff9a729a9cc59d3f01f9ed3c8d38e7dc8760d9
[mussa.git] / qui / motif_editor / MotifEditor.hpp
1 #ifndef MOTIF_EDITOR_H
2 #define MOTIF_EDITOR_H
3
4 #include <vector>
5
6 #include <QPushButton>
7 #include <QScrollArea>
8 #include <QTableView>
9 #include <QVBoxLayout>
10 #include <QWidget>
11
12 #include "alg/mussa.hpp"
13 #include "qui/motif_editor/MotifModel.hpp"
14
15 class MotifEditor : public QWidget
16 {
17   Q_OBJECT
18
19 public:
20   MotifEditor(MussaRef m, QWidget *parent=0);
21
22   //! update our window title
23   void updateTitle();
24   //! resize cells
25   void updateView();
26   
27 public slots:
28   //! create model and attach it to the table view  
29   void updateModel();
30   //! called to apply motif changes to the analysis
31   void updateAnalysisMotifs();
32
33 signals:
34   //! emitted when the use has applied the motif changes
35   void changedMotifs();
36   
37 private:
38   //! initialize all our gui widgets
39   void setupWidgets();
40   MussaRef analysis;
41
42   QPushButton *applyButton;
43   QVBoxLayout *editor_layout;
44   QHBoxLayout *button_layout;
45   QTableView *table;
46   MotifEditorDelegate *delegate;
47         
48         MotifModel *model;
49 };
50 #endif