Salome HOME
The default colors in preferences for sketch elements and features.
[modules/shaper.git] / src / PartSet / PartSet_PartDataModel.h
index fc61ec1c5018dcf3bd66ca73518340bdbfc37038..9789f79d8e940a84b7754fe3351f3f0b7d7e179e 100644 (file)
@@ -127,6 +127,10 @@ Q_OBJECT
   /// \param theParent a parent model index
   virtual int columnCount(const QModelIndex &theParent = QModelIndex()) const;
 
+  /// Returns the item flags for the given index.
+  /// \param theIndex a model index
+  virtual Qt::ItemFlags flags(const QModelIndex& theIndex) const;
+
   /// Returns the index of the item in the model specified by the given row, column and parent index.
   /// \param theRow a row
   /// \param theColumn a column
@@ -160,8 +164,12 @@ Q_OBJECT
   //! Returns index corresponded to the group
   virtual QModelIndex findGroup(const std::string& theGroup) const;
 
-  //! Return a Part object
-  virtual ResultPartPtr part() const;
+  //! Set an Index which will be considered as a last history index
+  //! \param theIndex a last index for history
+  void setLastHistoryItem(const QModelIndex& theIndex);
+
+  //! Returns last history item
+  QModelIndex lastHistoryItem() const;
 
  private:
 
@@ -171,10 +179,12 @@ Q_OBJECT
   //! Returns defult number of rows
   int getRowsNumber() const;
 
+  int lastHistoryRow() const;
+
   //! Types of QModelIndexes
   enum DataIds
   {
-    MyRoot,
+    //MyRoot,
     ParamsFolder,
     ParamObject,
     ConstructFolder,
@@ -185,7 +195,6 @@ Q_OBJECT
     GroupObject,
     HistoryObject
   };
-
 };
 
 #endif