better motif editor
[mussa.git] / qui / motif_editor / MotifEditor.hpp
index b5a457957c653dc33a5c94e0780e63c442f7be49..b404dce967a8567de1c5f03b4d9d14036c3395bf 100644 (file)
@@ -4,11 +4,13 @@
 #include <vector>
 
 #include <QPushButton>
+#include <QScrollArea>
+#include <QTableView>
 #include <QVBoxLayout>
 #include <QWidget>
 
 #include "alg/mussa.hpp"
-#include "qui/motif_editor/MotifDetail.hpp"
+#include "qui/motif_editor/MotifModel.hpp"
 
 class MotifEditor : public QWidget
 {
@@ -16,22 +18,31 @@ class MotifEditor : public QWidget
 
 public:
   MotifEditor(Mussa* m, QWidget *parent=0);
-  MotifEditor(const MotifEditor&);
 
+  //! update our window title
+  void updateTitle();
+  //! resize cells
+  void updateView();
+  
 public slots:
-  // called to apply motif changes
+  //! create model and attach it to the table view  
+  void updateModel();
+  //! called to apply motif changes
   void updateMotifs();
 
 signals:
-  // emitted when the use has applied the motif changes
+  //! emitted when the use has applied the motif changes
   void changedMotifs();
   
 private:
   Mussa* analysis;
 
-  QPushButton applyButton;
-  QVBoxLayout layout;
-
-  std::vector<MotifDetail *> motif_details;
+  QPushButton *applyButton;
+  QVBoxLayout *editor_layout;
+  QHBoxLayout *button_layout;
+  QTableView *table;
+  MotifEditorDelegate *delegate;
+       
+       MotifModel *model;
 };
 #endif