0029695: Shape Healing - infinite loop in ShapeFix_IntersectionTool
[occt.git] / tools / VInspector / VInspector_ViewModelHistory.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 VInspector_ViewModelHistory_H
17#define VInspector_ViewModelHistory_H
18
19#include <Standard.hxx>
0cb512c0 20#include <inspector/VInspector_ItemBase.hxx>
21#include <inspector/VInspector_CallBackMode.hxx>
14bbbdcb 22
130eb114 23#include <Standard_WarningsDisable.hxx>
14bbbdcb 24#include <QByteArray>
25#include <QHash>
26#include <QMap>
27#include <QObject>
130eb114 28#include <Standard_WarningsRestore.hxx>
14bbbdcb 29
0cb512c0 30#include <inspector/TreeModel_ModelBase.hxx>
14bbbdcb 31
32//! \class VInspector_ViewModelHistory
33//! The class that visualizes methods called in AIS interactive context.
34class VInspector_ViewModelHistory : public TreeModel_ModelBase
35{
36 Q_OBJECT
37
38public:
39
40 //! Constructor
41 Standard_EXPORT VInspector_ViewModelHistory (QObject* theParent, const int theHistoryTypesMaxAmount = 50);
42
43 //! Destructor
44 virtual ~VInspector_ViewModelHistory() Standard_OVERRIDE {};
45
46 //! Append new element under the root item
47 Standard_EXPORT void AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo);
48
49 //! Returns container of pointer information for selected presentation or owner item
50 //! \param theIndex an index of tree view model
51 //! \param container of strings
52 Standard_EXPORT QStringList GetSelectedPointers (const QModelIndex& theIndex);
53
54 //! Returns root item by column
55 //! \param theColumn an index of the column
56 //! \return root item instance
57 virtual TreeModel_ItemBasePtr RootItem(const int theColumn) const Standard_OVERRIDE { return myRootItems[theColumn]; }
58
6822a3be 59protected:
60
61 //! Creates root item
62 //! \param theColumnId index of a column
63 virtual void createRootItem (const int theColumnId) Standard_OVERRIDE;
14bbbdcb 64
65private:
66
67 QMap<int, TreeModel_ItemBasePtr> myRootItems; //!< container of root items, for each column own root item
68};
69
70#endif