1 // Created on: 2017-06-16
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2017 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef VInspector_ItemHistoryType_H
17 #define VInspector_ItemHistoryType_H
19 #include <Standard.hxx>
20 #include <inspector/VInspector_ItemBase.hxx>
22 class VInspector_ItemHistoryType;
23 typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryType> VInspector_ItemHistoryTypePtr;
25 //! \class VInspector_ItemHistoryType
26 //! Item to show history type. Also it shows the element information of the first sub-item
27 //! Parent is item history root item, children are item history elements
28 class VInspector_ItemHistoryType : public VInspector_ItemBase
33 //! Creates an item wrapped by a shared pointer
34 static VInspector_ItemHistoryTypePtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
35 { return VInspector_ItemHistoryTypePtr (new VInspector_ItemHistoryType (theParent, theRow, theColumn)); }
38 virtual ~VInspector_ItemHistoryType() Standard_OVERRIDE {};
40 //! Returns the pointer info of the first child item, initialize item if it has not been initialized yet.
41 Standard_EXPORT QString PointerInfo() const;
43 //! Returns the owner info of the first child item, initialize item if it has not been initialized yet.
44 Standard_EXPORT QString OwnerInfo() const;
48 //! Return data value for the role.
49 //! \param theRole a value role
51 virtual QVariant initValue(const int theRole) const;
53 //! \return number of children.
54 virtual int initRowCount() const Standard_OVERRIDE;
56 //! Initialize the current item. It is empty because Reset() is also empty.
57 virtual void initItem() const Standard_OVERRIDE;
61 //! Creates a child item in the given position.
62 //! \param theRow the child row position
63 //! \param theColumn the child column position
64 //! \return the created item
65 virtual TreeModel_ItemBasePtr createChild(int theRow, int theColumn) Standard_OVERRIDE;
70 //! param theParent a parent item
71 VInspector_ItemHistoryType(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
72 : VInspector_ItemBase(theParent, theRow, theColumn) {}