keep motifs after closing window
[mussa.git] / qui / motif_editor / MotifModel.hpp
index 02ffe7cde176cca23e985f71396f86c0589d4c40..5cf288a99c6a1b21b0614b7bdc4911799f08ad66 100644 (file)
@@ -2,6 +2,7 @@
 #define _MOTIF_MODEL_HPP_
 
 #include "alg/sequence.hpp"
+#include "alg/mussa.hpp"
 #include "qui/motif_editor/MotifElement.hpp"
 #include "qui/motif_editor/MotifEditorDelegate.hpp"
 
@@ -14,7 +15,7 @@ class MotifModel : public QAbstractTableModel
   Q_OBJECT
 
   public:
-    MotifModel(QObject *parent = 0);
+    MotifModel(MussaRef m, QObject *parent = 0);
 
     typedef std::vector<MotifElement> model_type;
     typedef model_type::size_type size_type;
@@ -22,6 +23,10 @@ class MotifModel : public QAbstractTableModel
     typedef model_type::const_iterator const_iterator; 
 
     enum cell_names { EnabledCell, ColorCell, NameCell, SequenceCell };
+
+    //! return what analysis we were attached to
+    const MussaRef getAnalysis() const;
+    
     //! \defgroup VectorInterface
     //! \addtogroup VectorInterface
     //! \@{
@@ -74,6 +79,7 @@ class MotifModel : public QAbstractTableModel
     //                const QModelIndex& parent=QModelIndex());
     //! \@}
   private:     
+    MussaRef analysis;
     model_type motifs;
 };