Tailorization
[mussa.git] / qui / SequenceLocationModel.hpp
index f8f729356544927e96856495149a2d902cc1c650..76b933351e889b931da8e834133863e7a1104c48 100644 (file)
@@ -12,7 +12,42 @@ class SequenceLocationModel : public QAbstractTableModel
   public:
     SequenceLocationModel(QObject *parent = 0);
 
-    
+    typedef std::vector<SequenceLocation> model_type;
+    typedef model_type::size_type size_type;
+    typedef model_type::iterator iterator; 
+    typedef model_type::const_iterator const_iterator; 
+    //! \defgroup VectorInterface
+    //! \addtogroup VectorInterface
+    //! \@{
+    //! assign num copies of val to our vector
+    void assign(size_type num, const SequenceLocation& val);
+    //! return a specific element
+    SequenceLocation& at(size_type index);
+    //! return the last element
+    SequenceLocation& back();
+    //! return an iterator to the beginning of the model
+    iterator begin();
+    //! return an iterator to the beginning of the model
+    const_iterator begin() const;
+    //! return an iterator to the end of the model
+    iterator end();
+    //! return an iterator to the end of the model
+    const_iterator end() const;
+    //! is the model empty?
+    bool empty() const;
+    //! return a specific element
+    SequenceLocation& operator[](size_type index);
+    //! remove the last element from our model
+    void pop_back();
+    //! add a sequence location to the end of our model
+    void push_back(SequenceLocation&);
+    //! how many elements are in our model.
+    size_type size() const;
+    //! \@}
+
+    //! \defgroup QtModelInterface
+    //! \addtogroup QtModel
+    //! \@{
     int rowCount(const QModelIndex& parent=QModelIndex()) const;
     int columnCount(const QModelIndex& parent=QModelIndex()) const;
     QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const;
@@ -27,8 +62,9 @@ class SequenceLocationModel : public QAbstractTableModel
     //                const QModelIndex& parent=QModelIndex());
     //bool removeRows(int row, int count);
     //                const QModelIndex& parent=QModelIndex());
+    //! \@}
   private:
-    std::vector<SequenceLocation> sequence_locations;
+    model_type sequence_locations;
 };
 
 #endif