Salome HOME
Copyright update 2020
[modules/shaper.git] / src / XGUI / XGUI_DataModel.h
index f5805c328f57788d7aa0d7ef47455f6c8b248cdd..cfd0a7b1b9e11b0cf1a22bef25ff6ec4c9dda3fe 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -28,7 +28,6 @@
 
 #include <QAbstractItemModel>
 
-class Config_DataModelReader;
 class XGUI_Workshop;
 class ModuleBase_ITreeNode;
 
@@ -155,9 +154,23 @@ public:
   /// \param theIndex an index to check
   bool hasIndex(const QModelIndex& theIndex) const;
 
+  /// Returns true if the given node is a parto of the data tree
+  /// \param theNode a node to check
+  bool hasNode(ModuleBase_ITreeNode* theNode) const;
+
+  /// Returns document of the given index
+  /// \param theIndex an index to check
   DocumentPtr document(const QModelIndex& theIndex) const;
 
+  /// Returns index for the node and column
+  /// \param theNode a node
+  /// \param thCol a column
+  QModelIndex getIndex(ModuleBase_ITreeNode* theNode, int thCol) const;
+
 signals:
+  /// Signal send before tree rebuild
+  void beforeTreeRebuild();
+
   /// Signal about tree had been rebuilt
   void treeRebuilt();
 
@@ -171,8 +184,6 @@ private:
 
   QModelIndex getParentIndex(ModuleBase_ITreeNode* theNode, int thCol) const;
 
-  QModelIndex getIndex(ModuleBase_ITreeNode* theNode, int thCol) const;
-
   void updateSubTree(ModuleBase_ITreeNode* theParent);
 
   /// Find a root index which contains objects of the given document