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

@@ -14,6 +14,7 @@
// commercial license or contractual agreement.
#include <inspector/TreeModel_ItemBase.hxx>
#include <inspector/TreeModel_ItemRole.hxx>
#include <Standard_WarningsDisable.hxx>
@@ -45,8 +46,19 @@ void TreeModel_ItemBase::Reset()
anItem->Reset();
}
m_bInitialized = false;
mycachedValues.clear();
myCachedValues.clear();
}
// =======================================================================
// function : Reset
// purpose :
// =======================================================================
void TreeModel_ItemBase::Reset (int theRole)
{
if (!myCachedValues.contains (theRole))
return;
myCachedValues.remove (theRole);
}
// =======================================================================
@@ -84,11 +96,11 @@ const TreeModel_ItemBasePtr TreeModel_ItemBase::currentItem()
// =======================================================================
QVariant TreeModel_ItemBase::cachedValue (const int theItemRole) const
{
if (mycachedValues.contains (theItemRole))
return mycachedValues[theItemRole];
if (myCachedValues.contains (theItemRole))
return myCachedValues[theItemRole];
const_cast<TreeModel_ItemBase*>(this)->mycachedValues.insert (theItemRole,
const_cast<TreeModel_ItemBase*>(this)->myCachedValues.insert (theItemRole,
theItemRole == TreeModel_ItemRole_RowCountRole ? QVariant (initRowCount()) : initValue (theItemRole));
return mycachedValues.contains (theItemRole) ? mycachedValues[theItemRole] : QVariant();
return myCachedValues.contains (theItemRole) ? myCachedValues[theItemRole] : QVariant();
}