0032429: Coding - Warnings during compilation on macosx arm64 with option BUILD_Inspe...
[occt.git] / tools / VInspector / VInspector_ItemContextProperties.hxx
1 // Created on: 2020-02-10
2 // Created by: Natalia ERMOLAEVA
3 // Copyright (c) 2020 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement. 
15
16 #ifndef VInspector_ItemContextProperties_H
17 #define VInspector_ItemContextProperties_H
18
19 #include <Standard.hxx>
20 #include <inspector/VInspector_ItemBase.hxx>
21
22 #include <AIS_InteractiveObject.hxx>
23 #include <TCollection_AsciiString.hxx>
24
25 class VInspector_ItemContextProperties;
26 typedef QExplicitlySharedDataPointer<VInspector_ItemContextProperties> VInspector_ItemContextPropertiesPtr;
27
28 //! \class VInspector_ItemContextProperties
29 //! Item presents additional level of information in the tree model.
30 //! Parent is item context, child is v3d viewer item.
31 class VInspector_ItemContextProperties : public VInspector_ItemBase
32 {
33 public:
34
35   //! Creates an item wrapped by a shared pointer
36   static VInspector_ItemContextPropertiesPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
37   { return VInspector_ItemContextPropertiesPtr (new VInspector_ItemContextProperties (theParent, theRow, theColumn)); }
38
39   //! Destructor
40   virtual ~VInspector_ItemContextProperties() Standard_OVERRIDE {};
41
42 protected:
43   //! Initializes the current item. It is empty because Reset() is also empty.
44   virtual void initItem() const Standard_OVERRIDE;
45
46   //! Returns number of item selected
47   //! \return rows count
48   virtual int initRowCount() const Standard_OVERRIDE;
49
50   //! Returns item information for the given role. Fills internal container if it was not filled yet
51   //! \param theItemRole a value role
52   //! \return the value
53   virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
54
55   //! Creates a child item in the given position.
56   //! \param theRow the child row position
57   //! \param theColumn the child column position
58   //! \return the created item
59   virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
60
61 private:
62
63   //! Constructor
64   //! param theParent a parent item
65   VInspector_ItemContextProperties (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
66     : VInspector_ItemBase (theParent, theRow, theColumn) {}
67
68 };
69
70 #endif