1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0029674: Improvements in Inspector tool

- preferences for dock windows geometry, tree view columns and current view projection;
- ViewControl package for common functionality between plugins;
- processing Location and Orientation for external TopoDS_Shape object
- 'F5' key to update content of each plugin
- visibility column in tree view (used now only in ShapeView)
- properties child item for context (presents tree of current Filters of context)
This commit is contained in:
nds
2018-03-23 16:08:11 +03:00
committed by bugmaster
parent 6dfdbb7ab8
commit 6822a3bef1
135 changed files with 4187 additions and 1603 deletions

View File

@@ -87,6 +87,10 @@ public:
//! If the item has internal values, there should be reseted here.
Standard_EXPORT virtual void Reset();
//! Resets the item cached value for the parameter role.
//! \param theRole an item role
Standard_EXPORT virtual void Reset(int theRole);
//! Gets the parent of the item, or TreeModel_ItemBasePtr() if it has no parent.
//! \return pointer to the item
TreeModel_ItemBasePtr Parent() const { return m_pParent; };
@@ -108,6 +112,11 @@ public:
//! \return the child item or TreeModel_ItemBasePtr() if it does not exist
Standard_EXPORT TreeModel_ItemBasePtr Child (int theRow, int theColumn, const bool isToCreate = true);
//! Sets a custom value for the role in an internal cache
//! \param theValue a value
//! \param theRole a value role
void SetCustomData(const QVariant theValue, int theRole) { myCachedValues.insert (theRole, theValue); }
//! Returns the data stored under the given role for the current item
//! \param theIndex the item model index
//! \param theRole the item model role
@@ -154,7 +163,7 @@ private:
typedef QHash< QPair<int, int>, TreeModel_ItemBasePtr > PositionToItemHash;
PositionToItemHash m_ChildItems; //!< the hash of item children
QMap<int, QVariant> mycachedValues; //!< cached values, should be cleared by reset
QMap<int, QVariant> myCachedValues; //!< cached values, should be cleared by reset
TreeModel_ItemBasePtr m_pParent; //!< the parent item
int m_iRow; //!< the item row position in the parent item
int m_iColumn; //!< the item column position in the parent item