0029743: Samples - Inspector tool - crash by selecting TNaming_UsedShapes tree item
[occt.git] / tools / DFBrowserPane / DFBrowserPane_TNamingUsedShapes.hxx
CommitLineData
14bbbdcb 1// Created on: 2017-06-16
2// Created by: Natalia ERMOLAEVA
3// Copyright (c) 2017 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 DFBrowserPane_TNamingUsedShapes_H
17#define DFBrowserPane_TNamingUsedShapes_H
18
0cb512c0 19#include <inspector/DFBrowserPane_AttributePane.hxx>
20
14bbbdcb 21#include <Standard.hxx>
22#include <TCollection_AsciiString.hxx>
23
24class QWidget;
25
26//! \class DFBrowserPane_TNamingUsedShapes
27//! \brief The class to manipulate of TNaming_UsedShapes attribute
28class DFBrowserPane_TNamingUsedShapes : public DFBrowserPane_AttributePane
29{
30public:
31
32 //! Constructor
33 Standard_EXPORT DFBrowserPane_TNamingUsedShapes();
34
35 //! Destructor
36 virtual ~DFBrowserPane_TNamingUsedShapes() {}
37
14bbbdcb 38 //! Returns values to fill the table view model
39 //! \param theAttribute a current attribute
40 //! \param theValues a container of values
41 Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
42 QList<QVariant>& theValues) Standard_OVERRIDE;
43
44 //! Returns brief attribute information. In general case, it returns GetValues() result.
45 //! \param theAttribute a current attribute
46 //! \param theValues a result list of values
47 Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
48 QList<QVariant>& theValues) Standard_OVERRIDE;
49
14bbbdcb 50 //! Returns container of Attribute references to the attribute
51 //! \param theAttribute a current attribute
52 //! \param theRefAttributes a container of attribute references, to be selected in tree view
53 //! \param theRefPresentation handle of presentation for the references, to be visualized
54 Standard_EXPORT virtual void GetAttributeReferences (const Handle(TDF_Attribute)& theAttribute,
55 NCollection_List<Handle(TDF_Attribute)>& theRefAttributes,
56 Handle(Standard_Transient)& theRefPresentation) Standard_OVERRIDE;
57
d2c90917 58protected:
59 //! Defines widths of table columns
60 //! \return container of widths
61 Standard_EXPORT virtual QMap<int, int> getTableColumnWidths() const;
62
14bbbdcb 63};
64
65#endif