From b6eba2db9b179bee3dc4b988617bd5ba7424108d Mon Sep 17 00:00:00 2001 From: nds Date: Wed, 11 Dec 2019 01:40:15 +0300 Subject: [PATCH] 0030268: Inspectors - improvements in VInspector plugin # Dump for OCCT objects. It improves perfomance during the dump parsing in inspector items. A cache creating for property view values. # ItemPresentableObject has no custom children due to the dump children count is not fixed (e.g. computed selections count) # GetStream() has been replaced by initStream() + Stream() # VInspector_ViewModel::FindPointers do nothing as it was poor performance of it when it parses BVH tree. --- src/SelectMgr/SelectMgr_Selection.cxx | 4 +- tools/MessageModel/MessageModel_ItemAlert.cxx | 4 +- tools/MessageModel/MessageModel_ItemAlert.hxx | 8 +- .../MessageModel/MessageModel_ItemReport.cxx | 4 +- .../MessageModel/MessageModel_ItemReport.hxx | 8 +- tools/TreeModel/TreeModel_ItemBase.cxx | 17 ++- tools/TreeModel/TreeModel_ItemBase.hxx | 10 +- tools/TreeModel/TreeModel_ItemProperties.cxx | 102 ++++++++---------- tools/TreeModel/TreeModel_ItemProperties.hxx | 21 +++- tools/TreeModel/TreeModel_ItemStream.cxx | 8 +- tools/TreeModel/TreeModel_ItemStream.hxx | 5 +- tools/VInspector/VInspector_ItemBVHTree.cxx | 4 +- tools/VInspector/VInspector_ItemBVHTree.hxx | 8 +- tools/VInspector/VInspector_ItemContext.cxx | 4 +- tools/VInspector/VInspector_ItemContext.hxx | 8 +- .../VInspector_ItemGraphic3dCamera.cxx | 6 +- .../VInspector_ItemGraphic3dCamera.hxx | 8 +- .../VInspector_ItemGraphic3dGroup.cxx | 4 +- .../VInspector_ItemGraphic3dGroup.hxx | 8 +- .../VInspector_ItemPresentableObject.cxx | 15 +-- .../VInspector_ItemPresentableObject.hxx | 8 +- .../VInspector/VInspector_ItemPrs3dAspect.cxx | 4 +- .../VInspector/VInspector_ItemPrs3dAspect.hxx | 2 +- .../VInspector/VInspector_ItemPrs3dDrawer.cxx | 4 +- .../VInspector/VInspector_ItemPrs3dDrawer.hxx | 8 +- ...VInspector_ItemSelectBasicsEntityOwner.cxx | 4 +- ...VInspector_ItemSelectBasicsEntityOwner.hxx | 8 +- .../VInspector_ItemSelectMgrBaseFrustum.cxx | 4 +- .../VInspector_ItemSelectMgrBaseFrustum.hxx | 8 +- ...ector_ItemSelectMgrSelectableObjectSet.cxx | 4 +- ...ector_ItemSelectMgrSelectableObjectSet.hxx | 8 +- ...or_ItemSelectMgrSelectingVolumeManager.cxx | 4 +- ...or_ItemSelectMgrSelectingVolumeManager.hxx | 8 +- ...Inspector_ItemSelectMgrSensitiveEntity.cxx | 4 +- ...Inspector_ItemSelectMgrSensitiveEntity.hxx | 8 +- ...VInspector_ItemSelectMgrViewerSelector.cxx | 4 +- ...VInspector_ItemSelectMgrViewerSelector.hxx | 6 +- tools/VInspector/VInspector_ItemV3dViewer.cxx | 4 +- tools/VInspector/VInspector_ItemV3dViewer.hxx | 4 +- tools/VInspector/VInspector_ViewModel.cxx | 2 + .../ViewControl/ViewControl_PropertyView.cxx | 2 +- 41 files changed, 194 insertions(+), 170 deletions(-) diff --git a/src/SelectMgr/SelectMgr_Selection.cxx b/src/SelectMgr/SelectMgr_Selection.cxx index 7a1cef72f1..8df00b29a8 100644 --- a/src/SelectMgr/SelectMgr_Selection.cxx +++ b/src/SelectMgr/SelectMgr_Selection.cxx @@ -133,9 +133,9 @@ void SelectMgr_Selection::DumpJson (Standard_OStream& theOStream, const Standard OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myEntityIter); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myMode); - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpdateStatus); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySelectionState); - OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBVHUpdateStatus); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySensFactor); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpdateStatus); + OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myBVHUpdateStatus); OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsCustomSens); } diff --git a/tools/MessageModel/MessageModel_ItemAlert.cxx b/tools/MessageModel/MessageModel_ItemAlert.cxx index f5b2219541..bcec35a4cd 100644 --- a/tools/MessageModel/MessageModel_ItemAlert.cxx +++ b/tools/MessageModel/MessageModel_ItemAlert.cxx @@ -202,10 +202,10 @@ int MessageModel_ItemAlert::initRowCount() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void MessageModel_ItemAlert::GetStream (Standard_OStream& OS) const +void MessageModel_ItemAlert::initStream (Standard_OStream& OS) const { Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast (getAlert()); if (anExtendedAlert.IsNull() || anExtendedAlert->Attribute().IsNull()) diff --git a/tools/MessageModel/MessageModel_ItemAlert.hxx b/tools/MessageModel/MessageModel_ItemAlert.hxx index 6938a2f00e..1c21ffa288 100644 --- a/tools/MessageModel/MessageModel_ItemAlert.hxx +++ b/tools/MessageModel/MessageModel_ItemAlert.hxx @@ -74,10 +74,6 @@ public: //! \return number of children. Standard_EXPORT virtual int initRowCount() const Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& OS) const Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy Standard_EXPORT virtual bool SetStream (const Standard_SStream& theSStream, Standard_Integer& theStartPos, @@ -109,6 +105,10 @@ protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& OS) const Standard_OVERRIDE; + //! Creates a child item in the given position. //! \param theRow the child row position //! \param theColumn the child column position diff --git a/tools/MessageModel/MessageModel_ItemReport.cxx b/tools/MessageModel/MessageModel_ItemReport.cxx index 06b3accb15..c68a286759 100644 --- a/tools/MessageModel/MessageModel_ItemReport.cxx +++ b/tools/MessageModel/MessageModel_ItemReport.cxx @@ -200,10 +200,10 @@ Handle(Message_Report) MessageModel_ItemReport::FindReport (const MessageModel_I } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void MessageModel_ItemReport::GetStream (Standard_OStream& theOStream) const +void MessageModel_ItemReport::initStream (Standard_OStream& theOStream) const { Handle(Message_Report) aReport = GetReport(); if (aReport.IsNull()) diff --git a/tools/MessageModel/MessageModel_ItemReport.hxx b/tools/MessageModel/MessageModel_ItemReport.hxx index e0bfa260e8..b0f67c7686 100644 --- a/tools/MessageModel/MessageModel_ItemReport.hxx +++ b/tools/MessageModel/MessageModel_ItemReport.hxx @@ -78,10 +78,6 @@ public: //! Returns report of the item static Handle(Message_Report) FindReport (const MessageModel_ItemBasePtr& thetItem); - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy Standard_EXPORT virtual bool SetStream (const Standard_SStream& theSStream, Standard_Integer& theStartPos, @@ -92,6 +88,10 @@ protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + //! Creates a child item in the given position. //! \param theRow the child row position //! \param theColumn the child column position diff --git a/tools/TreeModel/TreeModel_ItemBase.cxx b/tools/TreeModel/TreeModel_ItemBase.cxx index f7ce1dccd4..31b62c871e 100644 --- a/tools/TreeModel/TreeModel_ItemBase.cxx +++ b/tools/TreeModel/TreeModel_ItemBase.cxx @@ -54,6 +54,7 @@ void TreeModel_ItemBase::Reset() //myProperties = 0; } myCachedValues.clear(); + myStream.str (""); } // ======================================================================= @@ -112,7 +113,7 @@ QVariant TreeModel_ItemBase::cachedValue (const int theItemRole) const QVariant aValueToCache; if (theItemRole == TreeModel_ItemRole_RowCountRole) - aValueToCache = initRowCount() + m_iStreamChildren; + aValueToCache = initRowCount() + const_cast(this)->initStreamRowCount(); else aValueToCache = initValue (theItemRole); @@ -128,13 +129,22 @@ void TreeModel_ItemBase::Init() { m_bInitialized = true; + initStream(myStream); + initStreamRowCount(); +} + +// ======================================================================= +// function : initStreamRowCount +// purpose : +// ======================================================================= +int TreeModel_ItemBase::initStreamRowCount() +{ //NCollection_List aHierarchicalValues; int aStreamChildrenCount = 0; if (Column() == 0) { - //NCollection_IndexedDataMap aValues; Standard_SStream aStream; - GetStream (aStream); + initStream (aStream); if (!Standard_Dump::Text (aStream).IsEmpty()) { if (!myProperties) @@ -168,6 +178,7 @@ void TreeModel_ItemBase::Init() //if (aHierarchicalValues.Size() == 1) } m_iStreamChildren = aStreamChildrenCount;//aHierarchicalValues.Extent(); + return m_iStreamChildren; } // ======================================================================= diff --git a/tools/TreeModel/TreeModel_ItemBase.hxx b/tools/TreeModel/TreeModel_ItemBase.hxx index 9271e8cb5b..4ce5af07bd 100644 --- a/tools/TreeModel/TreeModel_ItemBase.hxx +++ b/tools/TreeModel/TreeModel_ItemBase.hxx @@ -102,7 +102,7 @@ public: //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy - virtual void GetStream (Standard_OStream& theOStream) const { (void)theOStream; } + const Standard_SStream& Stream() const { return myStream; } //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy @@ -181,14 +181,22 @@ protected: //! \return number of children. It should be reimplemented in child virtual int initRowCount() const = 0; + //! \return number of children. It should be reimplemented in child + Standard_EXPORT int initStreamRowCount(); + //! Return data value for the role. It should be reimplemented in child //! \param theItemRole a value role //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + virtual void initStream (Standard_OStream& theOStream) const { (void)theOStream; } + protected: Handle(TreeModel_ItemProperties) myProperties; //!< the properties int m_iStreamChildren; //!< the count of stream items + Standard_SStream myStream; //!< stream value private: diff --git a/tools/TreeModel/TreeModel_ItemProperties.cxx b/tools/TreeModel/TreeModel_ItemProperties.cxx index 4813754b34..d183f8d0d1 100644 --- a/tools/TreeModel/TreeModel_ItemProperties.cxx +++ b/tools/TreeModel/TreeModel_ItemProperties.cxx @@ -31,8 +31,9 @@ IMPLEMENT_STANDARD_RTTIEXT(TreeModel_ItemProperties, Standard_Transient) void TreeModel_ItemProperties::Init () { - Standard_SStream aStream; - Item()->GetStream (aStream); + myRowValues.Clear(); + + const Standard_SStream& aStream = Item()->Stream(); NCollection_IndexedDataMap aValues; TCollection_AsciiString aStreamText = Standard_Dump::Text (aStream); @@ -43,19 +44,6 @@ void TreeModel_ItemProperties::Init () Standard_DumpValue aKeyValue; if (!aStreamParent) { - Standard_SStream aStream; - Item()->GetStream (aStream); - - //aKey = aValues.FindKey (1); - //aKeyValue = aValues.FindFromIndex (1); - - //// one row value, like gp_XYZ, without additional { for type - //aValues.Clear(); - //if (!Standard_Dump::SplitJson (aKeyValue.myValue, aValues)) - //{ - // aKeyValue = Standard_DumpValue (aStreamText, 1); - //} - Handle(Standard_Transient) anItemObject = Item()->GetObject(); aKey = anItemObject.IsNull() ? "Dump" : anItemObject->DynamicType()->Name(); aKeyValue = Standard_DumpValue (aStreamText, 1); @@ -83,20 +71,24 @@ void TreeModel_ItemProperties::Init () if (Standard_Dump::HasChildKey (aValue.myValue)) myChildren.Add (aValues.FindKey (anIndex), aValue); else - myValues.Add (aValues.FindKey (anIndex), aValue); + { + TreeModel_RowValue aRowValue (aValue.myStartPosition, aValues.FindKey (anIndex).ToCString(), aValue.myValue.ToCString()); + myRowValues.Add (myRowValues.Size() + 1, aRowValue); + } } + if (myRowValues.Size() == 1) + { + Quantity_Color aColor; + if (Convert_Tools::ConvertStreamToColor (aStream, aColor)) + { + Standard_Real aRed, aGreen, aBlue; + aColor.Values (aRed, aGreen, aBlue, Quantity_TOC_RGB); - //aValues.Clear(); - //if (!Standard_Dump::SplitJson (myStreamValue.myValue, aValues)) - //{ - // return; - //} - //for (Standard_Integer anIndex = 1; anIndex <= aValues.Size(); anIndex++) - //{ - // Standard_DumpValue aValue = aValues.FindFromIndex (anIndex); - // if (!Standard_Dump::HasChildKey (aValue.myValue)) - // myValues.Add (aValues.FindKey (anIndex), aValue); - //} + int aDelta = 255; + myRowValues.ChangeFromIndex (1).myCustomValues.insert ((int)Qt::BackgroundRole, QColor((int)(aRed * aDelta), + (int)(aGreen * aDelta), (int)(aBlue * aDelta))); + } + } } // ======================================================================= @@ -109,7 +101,7 @@ void TreeModel_ItemProperties::Reset() myStreamValue = Standard_DumpValue(); myChildren.Clear(); - myValues.Clear(); + myRowValues.Clear(); } // ======================================================================= @@ -119,7 +111,7 @@ void TreeModel_ItemProperties::Reset() int TreeModel_ItemProperties::RowCount() const { - return Values().Size(); + return RowValues().Size(); } // ======================================================================= @@ -131,24 +123,16 @@ QVariant TreeModel_ItemProperties::Data (const int theRow, const int theColumn, { if (theColumn == 1 && theRole == Qt::BackgroundRole) { - Quantity_Color aColor; - Standard_SStream aStream; - Item()->GetStream (aStream); - if (Convert_Tools::ConvertStreamToColor (aStream, aColor)) - { - Standard_Real aRed, aGreen, aBlue; - aColor.Values (aRed, aGreen, aBlue, Quantity_TOC_RGB); - - int aDelta = 255; - return QColor((int)(aRed * aDelta), (int)(aGreen * aDelta), (int)(aBlue * aDelta)); - } + const QMap& aCachedValues = RowValues().FindFromIndex (theRow + 1).myCustomValues; + if (aCachedValues.contains ((int)theRole)) + return aCachedValues[(int)theRole]; } if (theRole != Qt::DisplayRole && theRole != Qt::ToolTipRole) return QVariant(); - if (theColumn == 0) return Values().FindKey (theRow + 1).ToCString(); - else if (theColumn == 1) return Values().FindFromIndex (theRow + 1).myValue.ToCString(); + if (theColumn == 0) return RowValues().FindFromIndex (theRow + 1).myKey; + else if (theColumn == 1) return RowValues().FindFromIndex (theRow + 1).myValue; return QVariant(); } @@ -171,7 +155,7 @@ ViewControl_EditType TreeModel_ItemProperties::GetEditType (const int, const int // purpose : // ======================================================================= -bool TreeModel_ItemProperties::SetData (const int theRow, const int theColumn, const QVariant& theValue, int) +bool TreeModel_ItemProperties::SetData (const int /*theRow*/, const int theColumn, const QVariant& /*theValue*/, int) { if (theColumn == 0) return false; @@ -184,27 +168,27 @@ bool TreeModel_ItemProperties::SetData (const int theRow, const int theColumn, c if (!aParent) return false; - Standard_SStream aStream; - Item()->GetStream (aStream); + //const Standard_SStream& aStream = Item()->Stream(); //TCollection_AsciiString aStreamValue = Standard_Dump::Text (aStream); - Standard_DumpValue aValue = Values().FindFromIndex (theRow + 1); - Standard_Integer aStartPos = aValue.myStartPosition; - Standard_Integer aLastPos = aStartPos + aValue.myValue.Length() - 1; + //Standard_DumpValue aValue = Values().FindFromIndex (theRow + 1); + //Standard_Integer aStartPos = aValue.myStartPosition; + //Standard_Integer aLastPos = aStartPos + aValue.myValue.Length() - 1; - aStream.str (""); - //aStream << aStreamValue.SubString (1, aStartPos - 1); - aStream << theValue.toString().toStdString().c_str(); - //if (aLastPos + 1 <= aStreamValue.Length()) - // aStream << aStreamValue.SubString (aLastPos + 1, aStreamValue.Length()); + //aStream.str (""); + ////aStream << aStreamValue.SubString (1, aStartPos - 1); + //aStream << theValue.toString().toStdString().c_str(); + ////if (aLastPos + 1 <= aStreamValue.Length()) + //// aStream << aStreamValue.SubString (aLastPos + 1, aStreamValue.Length()); - //TCollection_AsciiString aStreamValue_debug = Standard_Dump::Text (aStream); + ////TCollection_AsciiString aStreamValue_debug = Standard_Dump::Text (aStream); - Item()->SetStream (aStream, aStartPos, aLastPos); - Item()->Reset(); + //Item()->SetStream (aStream, aStartPos, aLastPos); + //Item()->Reset(); - return true; + //return true; + return false; } // ======================================================================= @@ -219,9 +203,7 @@ void TreeModel_ItemProperties::GetPresentations (const int theRow, const int the if (theRow < 0) // full presentation { - Standard_SStream aStream; - Item()->GetStream (aStream); - + const Standard_SStream& aStream = Item()->Stream(); Convert_Tools::ConvertStreamToPresentations (aStream, 1, -1, thePresentations); return; } diff --git a/tools/TreeModel/TreeModel_ItemProperties.hxx b/tools/TreeModel/TreeModel_ItemProperties.hxx index 64dbe80a3e..ed60428498 100644 --- a/tools/TreeModel/TreeModel_ItemProperties.hxx +++ b/tools/TreeModel/TreeModel_ItemProperties.hxx @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -52,6 +53,18 @@ class TreeModel_ItemProperties : public Standard_Transient TreeModel_DimType_Columns //! defines number of columns }; + //! container of values in a row of property table + struct TreeModel_RowValue + { + TreeModel_RowValue (const Standard_Integer theValueStartPosition, const QVariant theKey, QVariant theValue) + : myValueStartPosition (theValueStartPosition), myKey (theKey), myValue (theValue) {} + + Standard_Integer myValueStartPosition; //!< start position of the key + QVariant myKey; //!< value in the first column + QVariant myValue; //!< value in the second column + QMap myCustomValues; //!< custom values, e.g. key is Background, value is defined color + }; + public: //! Constructor TreeModel_ItemProperties() {} @@ -129,7 +142,10 @@ public: const TCollection_AsciiString& StreamValue() const { return myStreamValue.myValue; } //! Returns children stream values - const NCollection_IndexedDataMap& Values() const { initItem(); return myValues; } + //const NCollection_IndexedDataMap& Values() const { initItem(); return myValues; } + + //! Returns children stream values + const NCollection_IndexedDataMap& RowValues() const { initItem(); return myRowValues; } //! Returns children stream values const NCollection_IndexedDataMap& Children() const { initItem(); return myChildren; } @@ -146,8 +162,9 @@ private: TCollection_AsciiString myKey; //!< the item key Standard_DumpValue myStreamValue; //!< the stream value NCollection_IndexedDataMap myChildren; //!< the children + NCollection_IndexedDataMap myRowValues; //!< the values - NCollection_IndexedDataMap myValues; //!< the values + //NCollection_IndexedDataMap myValues; //!< the values }; #endif \ No newline at end of file diff --git a/tools/TreeModel/TreeModel_ItemStream.cxx b/tools/TreeModel/TreeModel_ItemStream.cxx index 76296d8a11..02aead5110 100644 --- a/tools/TreeModel/TreeModel_ItemStream.cxx +++ b/tools/TreeModel/TreeModel_ItemStream.cxx @@ -43,7 +43,7 @@ void TreeModel_ItemStream::Init() //if (!aStreamParent) //{ // Standard_SStream aStream; - // Parent()->GetStream (aStream); + // Parent()->Stream (aStream); // NCollection_IndexedDataMap aValues; // Standard_Dump::SplitJson (Standard_Dump::Text (aStream), aValues); @@ -96,6 +96,7 @@ void TreeModel_ItemStream::Init() aStreamChildrenCount = myProperties->Children().Extent(); } m_iStreamChildren = aStreamChildrenCount;//aHierarchicalValues.Extent(); + initStream (myStream); } // ======================================================================= @@ -109,6 +110,7 @@ void TreeModel_ItemStream::Reset() //myChildren.Clear(); + myStream.str (""); TreeModel_ItemBase::Reset(); } @@ -155,10 +157,10 @@ QVariant TreeModel_ItemStream::initValue (const int theItemRole) const //} // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void TreeModel_ItemStream::GetStream (Standard_OStream& theOStream) const +void TreeModel_ItemStream::initStream (Standard_OStream& theOStream) const { if (!Properties()) return; diff --git a/tools/TreeModel/TreeModel_ItemStream.hxx b/tools/TreeModel/TreeModel_ItemStream.hxx index 288963011b..632d3cd438 100644 --- a/tools/TreeModel/TreeModel_ItemStream.hxx +++ b/tools/TreeModel/TreeModel_ItemStream.hxx @@ -73,11 +73,10 @@ public: //const NCollection_IndexedDataMap& GetChildren() const // { initItem(); return myChildren; } +protected: //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy - virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - -protected: + virtual void initStream (Standard_OStream& theOStream) const; //! Initialize the current item. It creates a backup of the specific item information //! Do nothing as context has been already set into item diff --git a/tools/VInspector/VInspector_ItemBVHTree.cxx b/tools/VInspector/VInspector_ItemBVHTree.cxx index 7ce6f67aad..92dd1f959b 100644 --- a/tools/VInspector/VInspector_ItemBVHTree.cxx +++ b/tools/VInspector/VInspector_ItemBVHTree.cxx @@ -136,10 +136,10 @@ void VInspector_ItemBVHTree::initItem() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemBVHTree::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemBVHTree::initStream (Standard_OStream& theOStream) const { opencascade::handle > aBVHTree = GetTree(); if (aBVHTree.IsNull()) diff --git a/tools/VInspector/VInspector_ItemBVHTree.hxx b/tools/VInspector/VInspector_ItemBVHTree.hxx index ea91796cc6..3500417863 100644 --- a/tools/VInspector/VInspector_ItemBVHTree.hxx +++ b/tools/VInspector/VInspector_ItemBVHTree.hxx @@ -54,10 +54,6 @@ public: opencascade::handle > GetTree() const { return opencascade::handle >::DownCast (GetObject()); } - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; @@ -71,6 +67,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + //! Build presentation shape //! \return generated shape of the item parameters virtual TopoDS_Shape buildPresentationShape() Standard_OVERRIDE; diff --git a/tools/VInspector/VInspector_ItemContext.cxx b/tools/VInspector/VInspector_ItemContext.cxx index 3558b84927..57445893a3 100644 --- a/tools/VInspector/VInspector_ItemContext.cxx +++ b/tools/VInspector/VInspector_ItemContext.cxx @@ -160,10 +160,10 @@ TreeModel_ItemBasePtr VInspector_ItemContext::createChild (int theRow, int theCo } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemContext::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemContext::initStream (Standard_OStream& theOStream) const { Handle(AIS_InteractiveContext) aContext = GetContext(); if (aContext.IsNull()) diff --git a/tools/VInspector/VInspector_ItemContext.hxx b/tools/VInspector/VInspector_ItemContext.hxx index 1d3fe7a264..86ee993b38 100644 --- a/tools/VInspector/VInspector_ItemContext.hxx +++ b/tools/VInspector/VInspector_ItemContext.hxx @@ -51,10 +51,6 @@ public: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - //! Inits the item, fills internal containers Standard_EXPORT virtual void Init() Standard_OVERRIDE; @@ -67,6 +63,10 @@ protected: //! Do nothing as context has been already set into item virtual void initItem() const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemGraphic3dCamera.cxx b/tools/VInspector/VInspector_ItemGraphic3dCamera.cxx index fcf7dc382a..b43cf839a9 100644 --- a/tools/VInspector/VInspector_ItemGraphic3dCamera.cxx +++ b/tools/VInspector/VInspector_ItemGraphic3dCamera.cxx @@ -64,10 +64,10 @@ void VInspector_ItemGraphic3dCamera::Reset() } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemGraphic3dCamera::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemGraphic3dCamera::initStream (Standard_OStream& theOStream) const { Handle(Graphic3d_Camera) aCamera = GetCamera(); if (aCamera.IsNull()) @@ -93,7 +93,7 @@ void VInspector_ItemGraphic3dCamera::initItem() const // ======================================================================= int VInspector_ItemGraphic3dCamera::initRowCount() const { - Handle(Graphic3d_Camera) aCamera = GetCamera(); // we need Init() call for having GetStream() filled + Handle(Graphic3d_Camera) aCamera = GetCamera(); // we need Init() call for having Stream() filled return 0; } diff --git a/tools/VInspector/VInspector_ItemGraphic3dCamera.hxx b/tools/VInspector/VInspector_ItemGraphic3dCamera.hxx index e01b8d6af7..0434789b67 100644 --- a/tools/VInspector/VInspector_ItemGraphic3dCamera.hxx +++ b/tools/VInspector/VInspector_ItemGraphic3dCamera.hxx @@ -54,10 +54,6 @@ public: //! Resets cached values Standard_EXPORT virtual void Reset() Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Build presentation shape //! \return generated shape of the item parameters @@ -81,6 +77,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemGraphic3dGroup.cxx b/tools/VInspector/VInspector_ItemGraphic3dGroup.cxx index 7f3292bafd..f823b00b62 100644 --- a/tools/VInspector/VInspector_ItemGraphic3dGroup.cxx +++ b/tools/VInspector/VInspector_ItemGraphic3dGroup.cxx @@ -104,10 +104,10 @@ QVariant VInspector_ItemGraphic3dGroup::initValue (const int theItemRole) const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemGraphic3dGroup::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemGraphic3dGroup::initStream (Standard_OStream& theOStream) const { Handle(Graphic3d_Group) aGroup = GetGroup(); if (aGroup.IsNull()) diff --git a/tools/VInspector/VInspector_ItemGraphic3dGroup.hxx b/tools/VInspector/VInspector_ItemGraphic3dGroup.hxx index bb669d9513..e3f06db0af 100644 --- a/tools/VInspector/VInspector_ItemGraphic3dGroup.hxx +++ b/tools/VInspector/VInspector_ItemGraphic3dGroup.hxx @@ -56,10 +56,6 @@ public: //! Resets cached values Standard_EXPORT virtual void Reset() Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It creates a backup of the specific item information @@ -75,6 +71,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemPresentableObject.cxx b/tools/VInspector/VInspector_ItemPresentableObject.cxx index f5b361348c..0732eb332b 100644 --- a/tools/VInspector/VInspector_ItemPresentableObject.cxx +++ b/tools/VInspector/VInspector_ItemPresentableObject.cxx @@ -133,7 +133,9 @@ QVariant VInspector_ItemPresentableObject::initValue (int theItemRole) const // ======================================================================= int VInspector_ItemPresentableObject::initRowCount() const { - if (Column() != 0) + return 0; + + /*if (Column() != 0) return 0; int aNbProperties = 2; // "Properties", "Presentations" @@ -151,7 +153,7 @@ int VInspector_ItemPresentableObject::initRowCount() const int aNbSelected = !anIO.IsNull() ? anIO->Selections().Size() : 0; #endif - return aNbProperties + aNbSelected; + return aNbProperties + aNbSelected;*/ } // ======================================================================= @@ -160,12 +162,13 @@ int VInspector_ItemPresentableObject::initRowCount() const // ======================================================================= TreeModel_ItemBasePtr VInspector_ItemPresentableObject::createChild (int theRow, int theColumn) { - if (theRow == 0) + return TreeModel_ItemBasePtr(); + /*if (theRow == 0) return VInspector_ItemFolderObject::CreateItem (currentItem(), theRow, theColumn); if (theRow == 1) return VInspector_ItemPresentations::CreateItem (currentItem(), theRow, theColumn); else - return VInspector_ItemSelectMgrSelection::CreateItem(currentItem(), theRow, theColumn); + return VInspector_ItemSelectMgrSelection::CreateItem(currentItem(), theRow, theColumn);*/ } // ======================================================================= @@ -273,10 +276,10 @@ void VInspector_ItemPresentableObject::GetPresentations (NCollection_List& thePresentations); - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. @@ -82,6 +78,10 @@ protected: //! \return the value virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + //! Creates a child item in the given position. //! \param theRow the child row position //! \param theColumn the child column position diff --git a/tools/VInspector/VInspector_ItemPrs3dAspect.cxx b/tools/VInspector/VInspector_ItemPrs3dAspect.cxx index 36b8506571..54acebdf93 100644 --- a/tools/VInspector/VInspector_ItemPrs3dAspect.cxx +++ b/tools/VInspector/VInspector_ItemPrs3dAspect.cxx @@ -117,10 +117,10 @@ int VInspector_ItemPrs3dAspect::initRowCount() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemPrs3dAspect::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemPrs3dAspect::initStream (Standard_OStream& theOStream) const { Handle(Prs3d_BasicAspect) anAspect = GetAspect(); if (anAspect.IsNull()) diff --git a/tools/VInspector/VInspector_ItemPrs3dAspect.hxx b/tools/VInspector/VInspector_ItemPrs3dAspect.hxx index 7d5dbc858c..c1d59ff1fb 100644 --- a/tools/VInspector/VInspector_ItemPrs3dAspect.hxx +++ b/tools/VInspector/VInspector_ItemPrs3dAspect.hxx @@ -78,7 +78,7 @@ protected: //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; //! Creates a child item in the given position. //! \param theRow the child row position diff --git a/tools/VInspector/VInspector_ItemPrs3dDrawer.cxx b/tools/VInspector/VInspector_ItemPrs3dDrawer.cxx index cc049f1c13..51cf553b51 100644 --- a/tools/VInspector/VInspector_ItemPrs3dDrawer.cxx +++ b/tools/VInspector/VInspector_ItemPrs3dDrawer.cxx @@ -159,10 +159,10 @@ void VInspector_ItemPrs3dDrawer::initItem() const // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemPrs3dDrawer::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemPrs3dDrawer::initStream (Standard_OStream& theOStream) const { Handle(Prs3d_Drawer) aDrawer = GetDrawer(); if (aDrawer.IsNull()) diff --git a/tools/VInspector/VInspector_ItemPrs3dDrawer.hxx b/tools/VInspector/VInspector_ItemPrs3dDrawer.hxx index 0ffa87aee5..1ebe753546 100644 --- a/tools/VInspector/VInspector_ItemPrs3dDrawer.hxx +++ b/tools/VInspector/VInspector_ItemPrs3dDrawer.hxx @@ -63,10 +63,6 @@ public: TCollection_AsciiString& theName, Standard_Boolean& theOwnAspect) const; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. @@ -81,6 +77,10 @@ protected: //! \return the value virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + //! Creates a child item in the given position. //! \param theRow the child row position //! \param theColumn the child column position diff --git a/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.cxx b/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.cxx index add2403288..bc0a6647e1 100644 --- a/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.cxx +++ b/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.cxx @@ -156,10 +156,10 @@ void VInspector_ItemSelectBasicsEntityOwner::initItem() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectBasicsEntityOwner::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectBasicsEntityOwner::initStream (Standard_OStream& theOStream) const { Handle(SelectMgr_EntityOwner) anEntityOwner = getEntityOwner(); if (anEntityOwner.IsNull()) diff --git a/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.hxx b/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.hxx index 3562070488..37867725f0 100644 --- a/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.hxx +++ b/tools/VInspector/VInspector_ItemSelectBasicsEntityOwner.hxx @@ -52,10 +52,6 @@ public: //! Returns the current entity owner Handle(SelectBasics_EntityOwner) EntityOwner() const { return myOwner; } - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! \return number of children. virtual int initRowCount() const Standard_OVERRIDE{ return 0; } @@ -68,6 +64,10 @@ protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Build presentation shape //! \return generated shape of the item parameters diff --git a/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.cxx b/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.cxx index c6a6fc851f..8bf574262d 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.cxx +++ b/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.cxx @@ -104,10 +104,10 @@ void VInspector_ItemSelectMgrBaseFrustum::initItem() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectMgrBaseFrustum::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectMgrBaseFrustum::initStream (Standard_OStream& theOStream) const { Handle(SelectMgr_BaseFrustum) aFrustum = GetFrustum(); diff --git a/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.hxx b/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.hxx index 984490af7e..c55c1bc66b 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.hxx +++ b/tools/VInspector/VInspector_ItemSelectMgrBaseFrustum.hxx @@ -53,10 +53,6 @@ public: Standard_EXPORT Handle(SelectMgr_BaseFrustum) GetFrustum() const { return Handle(SelectMgr_BaseFrustum)::DownCast (GetObject()); } - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; @@ -70,6 +66,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.cxx b/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.cxx index 4092108135..753a1f5f75 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.cxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.cxx @@ -141,10 +141,10 @@ opencascade::handle > VInspector_ItemSelectMgrSelecta } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectMgrSelectableObjectSet::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectMgrSelectableObjectSet::initStream (Standard_OStream& theOStream) const { SelectMgr_SelectableObjectSet aSet; if (!GetSelectableObjectSet (aSet)) diff --git a/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.hxx b/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.hxx index b312b99f94..599345f8cc 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.hxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSelectableObjectSet.hxx @@ -58,10 +58,6 @@ public: //! Returns child BVH tree of the row opencascade::handle > GetBVHTree (const int theRow, TCollection_AsciiString& theName) const; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; @@ -75,6 +71,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.cxx b/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.cxx index 80725372da..18c5350283 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.cxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.cxx @@ -120,10 +120,10 @@ Standard_Boolean VInspector_ItemSelectMgrSelectingVolumeManager::GetViewerSelect } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectMgrSelectingVolumeManager::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectMgrSelectingVolumeManager::initStream (Standard_OStream& theOStream) const { SelectMgr_SelectingVolumeManager aVolumeManager; if (!GetViewerSelector (aVolumeManager)) diff --git a/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.hxx b/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.hxx index 3c1eff6282..9527989492 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.hxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSelectingVolumeManager.hxx @@ -57,10 +57,6 @@ public: //! Returns frustum Frustum for row = 0, FrustumSet for row = 1 Handle(SelectMgr_BaseFrustum) GetFrustum (const int theRow) const; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; @@ -74,6 +70,10 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.cxx b/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.cxx index 8ee5bbc9c0..2ca080cc1f 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.cxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.cxx @@ -156,10 +156,10 @@ void VInspector_ItemSelectMgrSensitiveEntity::Reset() } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectMgrSensitiveEntity::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectMgrSensitiveEntity::initStream (Standard_OStream& theOStream) const { Handle(SelectMgr_SensitiveEntity) anEntity = GetSensitiveEntity(); if (anEntity.IsNull()) diff --git a/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.hxx b/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.hxx index 6ae54355a3..51b6e7c328 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.hxx +++ b/tools/VInspector/VInspector_ItemSelectMgrSensitiveEntity.hxx @@ -55,10 +55,6 @@ public: //! Resets cached values Standard_EXPORT virtual void Reset() Standard_OVERRIDE; - //! Returns stream value of the item to fulfill property panel. - //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - protected: //! Initialize the current item. It is empty because Reset() is also empty. @@ -72,6 +68,10 @@ protected: //! \return the value virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; + //! Returns stream value of the item to fulfill property panel. + //! \return stream value or dummy + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + protected: //! Creates a child item in the given position. diff --git a/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.cxx b/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.cxx index c1104b05a7..f234f9cfb5 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.cxx +++ b/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.cxx @@ -216,10 +216,10 @@ void VInspector_ItemSelectMgrViewerSelector::initItem() const } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemSelectMgrViewerSelector::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemSelectMgrViewerSelector::initStream (Standard_OStream& theOStream) const { Handle(SelectMgr_ViewerSelector) aViewerSelector = GetViewerSelector(); if (aViewerSelector.IsNull()) diff --git a/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.hxx b/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.hxx index f1509a7dac..3d172f4101 100644 --- a/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.hxx +++ b/tools/VInspector/VInspector_ItemSelectMgrViewerSelector.hxx @@ -95,11 +95,11 @@ protected: //! \return the value Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE; +protected: + //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; - -protected: + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; //! Build presentation shape //! \return generated shape of the item parameters diff --git a/tools/VInspector/VInspector_ItemV3dViewer.cxx b/tools/VInspector/VInspector_ItemV3dViewer.cxx index aee1f4a86f..f4cba690a1 100644 --- a/tools/VInspector/VInspector_ItemV3dViewer.cxx +++ b/tools/VInspector/VInspector_ItemV3dViewer.cxx @@ -127,10 +127,10 @@ void VInspector_ItemV3dViewer::Reset() } // ======================================================================= -// function : GetStream +// function : initStream // purpose : // ======================================================================= -void VInspector_ItemV3dViewer::GetStream (Standard_OStream& theOStream) const +void VInspector_ItemV3dViewer::initStream (Standard_OStream& theOStream) const { Handle(V3d_Viewer) aViewer = GetViewer(); if (aViewer.IsNull()) diff --git a/tools/VInspector/VInspector_ItemV3dViewer.hxx b/tools/VInspector/VInspector_ItemV3dViewer.hxx index 575a4f5470..5f72ff40ac 100644 --- a/tools/VInspector/VInspector_ItemV3dViewer.hxx +++ b/tools/VInspector/VInspector_ItemV3dViewer.hxx @@ -59,11 +59,11 @@ public: Standard_EXPORT Handle(V3d_Viewer) GetViewer() const { return Handle(V3d_Viewer)::DownCast (GetObject()); } +protected: //! Returns stream value of the item to fulfill property panel. //! \return stream value or dummy - Standard_EXPORT virtual void GetStream (Standard_OStream& theOStream) const Standard_OVERRIDE; + Standard_EXPORT virtual void initStream (Standard_OStream& theOStream) const Standard_OVERRIDE; -protected: //! Initialize the current item. It is empty because Reset() is also empty. virtual void initItem() const Standard_OVERRIDE; diff --git a/tools/VInspector/VInspector_ViewModel.cxx b/tools/VInspector/VInspector_ViewModel.cxx index ea7fac8a5f..3bc538d87c 100644 --- a/tools/VInspector/VInspector_ViewModel.cxx +++ b/tools/VInspector/VInspector_ViewModel.cxx @@ -112,6 +112,8 @@ void VInspector_ViewModel::FindPointers (const QStringList& thePointers, const QModelIndex& theParent, QModelIndexList& theFoundIndices) { + return; // should be used after GetObject of items is improved, as it takes a lot of time on BVH item + if (thePointers.isEmpty()) return; diff --git a/tools/ViewControl/ViewControl_PropertyView.cxx b/tools/ViewControl/ViewControl_PropertyView.cxx index cea23c8714..237f3f3d95 100644 --- a/tools/ViewControl/ViewControl_PropertyView.cxx +++ b/tools/ViewControl/ViewControl_PropertyView.cxx @@ -109,7 +109,7 @@ void ViewControl_PropertyView::Init (ViewControl_TableModelValues* theTableValue aTable->Init (theTableValues); ViewControl_Tools::SetDefaultHeaderSections (aTable->GetTableView(), Qt::Horizontal); } - aTable->SetActive (theTableValues); + aTable->SetActive (theTableValues != 0); if (theTableValues) myAttributesStack->setCurrentWidget (myTableWidget); -- 2.39.5