X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_DataModel.h;h=d08ccc42a8f301529b7d0e5f6352c3e1f6ac6b36;hb=220bd2b37119be1c65abf88a88792445cb9d99f8;hp=70f537651933431b8d340810a009752992c43930;hpb=d296db28ebf945ae475f2331cd2e8f813618866b;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_DataModel.h b/src/XGUI/XGUI_DataModel.h index 70f537651..d08ccc42a 100644 --- a/src/XGUI/XGUI_DataModel.h +++ b/src/XGUI/XGUI_DataModel.h @@ -13,9 +13,9 @@ #include #include #include -#include #include +#include /**\class XGUI_DataModel * \ingroup GUI @@ -27,10 +27,12 @@ * - An index which contains internal pointer as ModelAPI_Object its the object * - An index which contains internal pointer as ModelAPI_Document is a folder which belongs to this document */ -class XGUI_EXPORT XGUI_DataModel : public ModuleBase_IDocumentDataModel, public Events_Listener +class XGUI_EXPORT XGUI_DataModel : public QAbstractItemModel, public Events_Listener { Q_OBJECT public: + /// Constructor + /// \param theParent a parent object XGUI_DataModel(QObject* theParent); /// Event Listener method @@ -132,6 +134,13 @@ private: /// \param theDoc a document which contains this folder int folderId(std::string theType, ModelAPI_Document* theDoc = 0); + /// Removes a row from branch of tree + /// \param theStart - start row to update indexes + /// \param theSize - number of indexes in the folder + /// \param theParent - index of parent folder + void rebuildBranch(int theRow, int theCount, const QModelIndex& theParent = QModelIndex()); + + /// Returns list of folders types which can not be shown empty /// \param fromRoot - root document flag QStringList listOfShowNotEmptyFolders(bool fromRoot = true) const;