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_ViewModelHistory_H
17 #define VInspector_ViewModelHistory_H
19 #include <Standard.hxx>
20 #include <inspector/VInspector_ItemBase.hxx>
21 #include <inspector/VInspector_CallBackMode.hxx>
23 #include <Standard_WarningsDisable.hxx>
28 #include <Standard_WarningsRestore.hxx>
30 #include <inspector/TreeModel_ModelBase.hxx>
32 //! \class VInspector_ViewModelHistory
33 //! The class that visualizes methods called in AIS interactive context.
34 class VInspector_ViewModelHistory : public TreeModel_ModelBase
41 Standard_EXPORT VInspector_ViewModelHistory (QObject* theParent, const int theHistoryTypesMaxAmount = 50);
44 virtual ~VInspector_ViewModelHistory() {}
46 //! Creates model columns and root items.
47 Standard_EXPORT virtual void InitColumns() Standard_OVERRIDE;
49 //! Append new element under the root item
50 Standard_EXPORT void AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo);
52 //! Returns container of pointer information for selected presentation or owner item
53 //! \param theIndex an index of tree view model
54 //! \param container of strings
55 Standard_EXPORT QStringList GetSelectedPointers (const QModelIndex& theIndex);
60 //! \param theColumnId index of a column
61 Standard_EXPORT virtual TreeModel_ItemBasePtr createRootItem (const int theColumnId) Standard_OVERRIDE;
64 int myHistoryTypesMaxAmount; //!< maximum types in history