]> OCCT Git - occt.git/commitdiff
0031362: Inspectors - MessageView plugin for message alerts
authornds <nds@opencascade.com>
Mon, 26 Apr 2021 15:01:38 +0000 (18:01 +0300)
committerbugmaster <bugmaster@opencascade.com>
Tue, 18 May 2021 16:23:10 +0000 (19:23 +0300)
- append new MessageView plugin to display content of Message_Report;

- correct DumpJson of TDataStd array attributes to print Lower/Upper values;
- correct remove level of Message_Report to store stop time during removing all levels;
- append DumpJson for TFunction, TPrsStd attributes;
- correct DumpJson of XCAFDoc tools due to simplify performance of it;
- move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside;
- remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes;
- add new property panel in DFBrowser (synchronized with the same in other plugins);
- add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view;
- rename in DFBrowser "Property Panel" into "Property Panel (custom)";
- implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now;
- implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape;
- remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way;
- remove History panel in VInspector as not used, MessageView will be better solution for this;
- implement item and actions in VInspector for setting Lights in the view.

241 files changed:
adm/TOOLS
src/Message/Message_PrinterToReport.cxx
src/Message/Message_Report.cxx
src/TDF/TDF_Attribute.cxx
src/TDataStd/TDataStd_BooleanArray.cxx
src/TDataStd/TDataStd_ByteArray.cxx
src/TDataStd/TDataStd_ExtStringArray.cxx
src/TDataStd/TDataStd_IntegerArray.cxx
src/TDataStd/TDataStd_RealArray.cxx
src/TDataStd/TDataStd_ReferenceArray.cxx
src/TDataStd/TDataStd_UAttribute.cxx
src/TFunction/TFunction_Function.cxx
src/TFunction/TFunction_Function.hxx
src/TNaming/TNaming_NamedShape.cxx
src/TPrsStd/TPrsStd_AISPresentation.cxx
src/TPrsStd/TPrsStd_AISPresentation.hxx
src/TPrsStd/TPrsStd_AISViewer.cxx
src/TPrsStd/TPrsStd_AISViewer.hxx
src/XCAFDoc/XCAFDoc.cxx
src/XCAFDoc/XCAFDoc.hxx
src/XCAFDoc/XCAFDoc_ShapeMapTool.cxx
src/XCAFDoc/XCAFDoc_ShapeTool.cxx
src/XDEDRAW/XDEDRAW.cxx
tools/Convert/Convert_Tools.cxx
tools/Convert/Convert_Tools.hxx
tools/DFBrowser/DFBrowser_Item.cxx
tools/DFBrowser/DFBrowser_Module.cxx
tools/DFBrowser/DFBrowser_TreeLevelViewModel.cxx
tools/DFBrowser/DFBrowser_TreeModel.cxx
tools/DFBrowser/DFBrowser_Window.cxx
tools/DFBrowser/DFBrowser_Window.hxx
tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.cxx
tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.cxx
tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx
tools/DFBrowserPane/DFBrowserPane_TNamingNaming.cxx
tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx [deleted file]
tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx [deleted file]
tools/DFBrowserPane/FILES
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx [deleted file]
tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.hxx [deleted file]
tools/DFBrowserPaneXDE/FILES [deleted file]
tools/MessageModel/FILES [new file with mode: 0644]
tools/MessageModel/MessageModel.qrc [new file with mode: 0644]
tools/MessageModel/MessageModel_ActionType.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_Actions.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_Actions.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemAlert.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemAlert.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemBase.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemBase.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemReport.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemReport.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemRoot.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_ItemRoot.hxx [new file with mode: 0644]
tools/MessageModel/MessageModel_TreeModel.cxx [new file with mode: 0644]
tools/MessageModel/MessageModel_TreeModel.hxx [new file with mode: 0644]
tools/MessageModel/icons/item_shape.png [new file with mode: 0644]
tools/MessageModel/icons/item_streamValues.png [new file with mode: 0644]
tools/MessageView/FILES [new file with mode: 0644]
tools/MessageView/MessageView_ActionsTest.cxx [new file with mode: 0644]
tools/MessageView/MessageView_ActionsTest.hxx [new file with mode: 0644]
tools/MessageView/MessageView_Communicator.cxx [new file with mode: 0644]
tools/MessageView/MessageView_Communicator.hxx [new file with mode: 0644]
tools/MessageView/MessageView_MetricStatisticModel.cxx [new file with mode: 0644]
tools/MessageView/MessageView_MetricStatisticModel.hxx [new file with mode: 0644]
tools/MessageView/MessageView_VisibilityState.cxx [new file with mode: 0644]
tools/MessageView/MessageView_VisibilityState.hxx [new file with mode: 0644]
tools/MessageView/MessageView_Window.cxx [new file with mode: 0644]
tools/MessageView/MessageView_Window.hxx [new file with mode: 0644]
tools/TInspector/TInspector_PluginParameters.hxx
tools/TInspectorEXE/TInspectorEXE.cxx
tools/TKDFBrowser/PACKAGES
tools/TKMessageModel/CMakeLists.txt [new file with mode: 0644]
tools/TKMessageModel/EXTERNLIB [new file with mode: 0644]
tools/TKMessageModel/FILES [new file with mode: 0644]
tools/TKMessageModel/PACKAGES [new file with mode: 0644]
tools/TKMessageView/CMakeLists.txt [new file with mode: 0644]
tools/TKMessageView/EXTERNLIB [new file with mode: 0644]
tools/TKMessageView/FILES [new file with mode: 0644]
tools/TKMessageView/PACKAGES [new file with mode: 0644]
tools/ToolsDraw/ToolsDraw.cxx
tools/TreeModel/TreeModel_ColumnType.hxx
tools/TreeModel/TreeModel_ContextMenu.cxx
tools/TreeModel/TreeModel_ItemBase.cxx
tools/TreeModel/TreeModel_ItemBase.hxx
tools/TreeModel/TreeModel_ItemProperties.cxx
tools/TreeModel/TreeModel_ItemProperties.hxx
tools/TreeModel/TreeModel_ItemStream.cxx
tools/TreeModel/TreeModel_ItemStream.hxx
tools/TreeModel/TreeModel_ModelBase.cxx
tools/TreeModel/TreeModel_ModelBase.hxx
tools/TreeModel/TreeModel_Tools.cxx
tools/VInspector/FILES
tools/VInspector/VInspectorAPI_CallBack.cxx [deleted file]
tools/VInspector/VInspectorAPI_CallBack.hxx [deleted file]
tools/VInspector/VInspector_CallBack.cxx [deleted file]
tools/VInspector/VInspector_CallBack.hxx [deleted file]
tools/VInspector/VInspector_CallBackMode.hxx [deleted file]
tools/VInspector/VInspector_Communicator.cxx
tools/VInspector/VInspector_ItemBase.cxx
tools/VInspector/VInspector_ItemBase.hxx
tools/VInspector/VInspector_ItemContextProperties.cxx
tools/VInspector/VInspector_ItemGraphic3dCLight.cxx [new file with mode: 0644]
tools/VInspector/VInspector_ItemGraphic3dCLight.hxx [new file with mode: 0644]
tools/VInspector/VInspector_ItemHistoryElement.cxx [deleted file]
tools/VInspector/VInspector_ItemHistoryElement.hxx [deleted file]
tools/VInspector/VInspector_ItemHistoryRoot.cxx [deleted file]
tools/VInspector/VInspector_ItemHistoryRoot.hxx [deleted file]
tools/VInspector/VInspector_ItemHistoryType.cxx [deleted file]
tools/VInspector/VInspector_ItemHistoryType.hxx [deleted file]
tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx [deleted file]
tools/VInspector/VInspector_ItemPresentableObject.hxx
tools/VInspector/VInspector_Tools.hxx
tools/VInspector/VInspector_ViewModel.cxx
tools/VInspector/VInspector_ViewModelHistory.cxx [deleted file]
tools/VInspector/VInspector_ViewModelHistory.hxx [deleted file]
tools/VInspector/VInspector_Window.cxx
tools/VInspector/VInspector_Window.hxx
tools/View/View_DisplayPreview.cxx
tools/View/View_DisplayPreview.hxx
tools/View/View_Displayer.cxx
tools/View/View_PreviewParameters.cxx
tools/View/View_PreviewParameters.hxx
tools/View/View_ToolButton.hxx
tools/View/View_Widget.cxx
tools/ViewControl/FILES
tools/ViewControl/ViewControl_ColorSelector.cxx [new file with mode: 0644]
tools/ViewControl/ViewControl_ColorSelector.hxx [new file with mode: 0644]
tools/ViewControl/ViewControl_EditType.hxx
tools/ViewControl/ViewControl_Table.cxx
tools/ViewControl/ViewControl_TableItemDelegate.cxx [new file with mode: 0644]
tools/ViewControl/ViewControl_TableItemDelegate.hxx [new file with mode: 0644]
tools/ViewControl/ViewControl_TableModelValues.hxx
tools/ViewControl/ViewControl_Tools.cxx
tools/ViewControl/ViewControl_Tools.hxx

index b106a7c10bca46ca90821160ae370e4e3d4d8a06..57ddcfcc647d3402a54f4626ffc7134b7bd1e7f1 100644 (file)
--- a/adm/TOOLS
+++ b/adm/TOOLS
@@ -1,4 +1,4 @@
-TModelingData TKShapeView
+TModelingData TKShapeView TKMessageModel TKMessageView
 TVisualization TKView TKVInspector
 TApplicationFramework TKTreeModel TKTInspectorAPI TKDFBrowser
 TTool TKTInspector TKToolsDraw TInspectorEXE
\ No newline at end of file
index b59c4a1853a477dce281b774c39fcc597d0f839d..634147f452e654d2c43e13f31083053933cf2af9 100644 (file)
@@ -96,8 +96,9 @@ void Message_PrinterToReport::send (const TCollection_AsciiString& theString,
 {
   if (!myName.IsEmpty())
   {
-    send (myName, theGravity);
+    TCollection_AsciiString aName = myName;
     myName.Clear();
+    send (aName, theGravity);
   }
 
   const Handle(Message_Report)& aReport = Report();
index 2b038c1726c3fe9d741c9b83fa1348ca7117ae54..b63bd7137fb38b5ebca4beb45a37f59fc762f865 100644 (file)
@@ -227,10 +227,7 @@ void Message_Report::RemoveLevel (Message_Level* theLevel)
   for (int aLevelIndex = myAlertLevels.Size(); aLevelIndex >= 1; aLevelIndex--)
   {
     Message_Level* aLevel = myAlertLevels.Value (aLevelIndex);
-    if (myAlertLevels.Size() == 1) // the last level, the root item should be stopped
-    {
-      Message_AttributeMeter::StopAlert (aLevel->RootAlert());
-    }
+    Message_AttributeMeter::StopAlert (aLevel->RootAlert());
 
     myAlertLevels.Remove (aLevelIndex);
     if (aLevel == theLevel)
index fd5560e9ce7285beff6183a60d8a8699aa00583b..2baacc3b97a96f596f88e9c4b40c7d5bbc4cdc0d 100644 (file)
@@ -424,7 +424,6 @@ void TDF_Attribute::DumpJson (Standard_OStream& theOStream, Standard_Integer) co
 
   OCCT_DUMP_FIELD_VALUE_GUID (theOStream, ID())
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, Transaction())
-  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, UntilTransaction())
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsValid())
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, IsNew())
index 2f2268233f1355ebfeabfb24c78b23764bd27063..3f509acef15e092789270f04a8fe02c44a16dfad 100644 (file)
@@ -332,11 +332,17 @@ void TDataStd_BooleanArray::DumpJson (Standard_OStream& theOStream, Standard_Int
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
-  for (TColStd_Array1OfByte::Iterator aValueIt (myValues->Array1()); aValueIt.More(); aValueIt.Next())
+  if (!myValues.IsNull())
   {
-    const Standard_Byte& aValue = aValueIt.Value();
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
-  }
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValues->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValues->Upper())
+
+    for (TColStd_Array1OfByte::Iterator aValueIt (myValues->Array1()); aValueIt.More(); aValueIt.Next())
+    {
+      const Standard_Byte& aValue = aValueIt.Value();
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    }
+  }  
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myLower)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myUpper)
 }
index 0a1264e516b6dd96529dda30cbd9c7c4281a49a7..e8d3cf0e1a012e224c53ed80393767a92add1c9f 100644 (file)
@@ -320,10 +320,16 @@ void TDataStd_ByteArray::DumpJson (Standard_OStream& theOStream, Standard_Intege
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
   
-  for (TColStd_Array1OfByte::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  if (!myValue.IsNull())
   {
-    const Standard_Byte& aValue = aValueIt.Value();
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Upper())
+
+    for (TColStd_Array1OfByte::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+    {
+      const Standard_Byte& aValue = aValueIt.Value();
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    }
   }
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
 }
index 75e4fadf55ebf31fbbbaf8e97053963411bfa5e7..a9e565723f6e71d28458b27b5f5efe283813a99f 100644 (file)
@@ -346,10 +346,16 @@ void TDataStd_ExtStringArray::DumpJson (Standard_OStream& theOStream, Standard_I
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
-  for (TColStd_Array1OfExtendedString::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  if (!myValue.IsNull())
   {
-    const TCollection_ExtendedString& aValue = aValueIt.Value();
-    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Upper())
+
+    for (TColStd_Array1OfExtendedString::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+    {
+      const TCollection_ExtendedString& aValue = aValueIt.Value();
+      OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aValue)
+    }
   }
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
index 9ccd6651aed9e053d2e8985f3f371c6f2e61f448..d827b1e604397d2a77215f1ba1f0d08b63c47afe 100644 (file)
@@ -348,10 +348,16 @@ void TDataStd_IntegerArray::DumpJson (Standard_OStream& theOStream, Standard_Int
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
-  for (TColStd_Array1OfInteger::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  if (!myValue.IsNull())
   {
-    const Standard_Integer& aValue = aValueIt.Value();
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Upper())
+
+    for (TColStd_Array1OfInteger::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+    {
+      const Standard_Integer& aValue = aValueIt.Value();
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+     }
   }
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
index c919ec21cc1ccf3d83f73ba628368d7cf648aa43..90bf7b32f960103ab965b6f63d85e4865d618640 100644 (file)
@@ -344,10 +344,16 @@ void TDataStd_RealArray::DumpJson (Standard_OStream& theOStream, Standard_Intege
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
-  for (TColStd_Array1OfReal::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+  if (!myValue.IsNull())
   {
-    const Standard_Real& aValue = aValueIt.Value();
-    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myValue->Upper())
+
+    for (TColStd_Array1OfReal::Iterator aValueIt (myValue->Array1()); aValueIt.More(); aValueIt.Next())
+    {
+      const Standard_Real& aValue = aValueIt.Value();
+      OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, aValue)
+    }
   }
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myIsDelta)
index 949f34b7a1c91a98124089e1b3449aa3125e59c8..2d94dd66c7d587dc88b54764848eccba56b76556 100644 (file)
@@ -343,11 +343,17 @@ void TDataStd_ReferenceArray::DumpJson (Standard_OStream& theOStream, Standard_I
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 
-  TCollection_AsciiString aLabel;
-  for (TDataStd_LabelArray1::Iterator anArrayIt (myArray->Array1()); anArrayIt.More(); anArrayIt.Next())
+  if (!myArray.IsNull())
   {
-    aLabel.Clear();
-    TDF_Tool::Entry (anArrayIt.Value(), aLabel);
-    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArray->Lower())
+    OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myArray->Upper())
+
+    TCollection_AsciiString aLabel;
+    for (TDataStd_LabelArray1::Iterator anArrayIt (myArray->Array1()); anArrayIt.More(); anArrayIt.Next())
+    {
+      aLabel.Clear();
+      TDF_Tool::Entry (anArrayIt.Value(), aLabel);
+      OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+    }
   }
 }
index 3e19a272ed091f6312b32317da63b814715757ae..77a9671dfa9a65cb1c9f628332092ec69901c983 100644 (file)
@@ -140,5 +140,7 @@ void TDataStd_UAttribute::DumpJson (Standard_OStream& theOStream, Standard_Integ
 {
   OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
 
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
 }
index e93d5dd5a632a461c2511a7430ed70ede41b9039..c5f1f500afe464c1c98bec0250879e1b4b6d739c 100644 (file)
@@ -16,6 +16,7 @@
 
 
 #include <Standard_DomainError.hxx>
+#include <Standard_Dump.hxx>
 #include <Standard_GUID.hxx>
 #include <Standard_Type.hxx>
 #include <TDF_Attribute.hxx>
@@ -185,3 +186,17 @@ Standard_OStream& TFunction_Function::Dump (Standard_OStream& anOS) const
   TDF_Attribute::Dump(anOS);
   return anOS;
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TFunction_Function::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myDriverGUID)
+  OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myFailure)
+}
index ebd248e7139c66826c37d4eba28e5a8490917fe1..f2a27a944b6ad972a4d5b66ae4e1bc5b797866e5 100644 (file)
@@ -95,6 +95,9 @@ public:
   
   Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(TFunction_Function,TDF_Attribute)
 
 private:
index f29d527ffa976b2597be202556d7eb6075604b8d..a056e10152d462aa3b187bcb3069cdef07ba6fb7 100644 (file)
@@ -1670,9 +1670,13 @@ void TNaming_NamedShape::DumpJson (Standard_OStream& theOStream, Standard_Intege
 
   OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
   
-  TCollection_AsciiString aLabel;
-  TDF_Tool::Entry (myNode->Label(), aLabel);
-  OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  TNaming_Node* p = myNode;
+  if (p != 0L)
+  {
+    TCollection_AsciiString aLabel;
+    TDF_Tool::Entry (myNode->Label(), aLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aLabel)
+  }
   OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myEvolution)
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myVersion)
 }
index 2dbb051b67bb58aae7176877d7eb929ccc1bbe3c..ce6eeda59ec02984dcd85368793826bbba7df79c 100644 (file)
@@ -1067,3 +1067,16 @@ void TPrsStd_AISPresentation::ActivateSelectionMode()
     } 
   }
 }
+
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TPrsStd_AISPresentation::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myAIS.get())
+}
index a9dee8baea9b7f7aa8c259a191d78cf71696c8e3..ba5527323ff4bf17c461fb3d18409733e56b1a91 100644 (file)
@@ -197,6 +197,9 @@ public:
   //! update AIS viewer according to delta
   Standard_EXPORT virtual Standard_Boolean AfterUndo (const Handle(TDF_AttributeDelta)& anAttDelta, const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
+
   DEFINE_STANDARD_RTTIEXT(TPrsStd_AISPresentation,TDF_Attribute)
 
 protected:
index 45db3140b698b188462c7d1aa4991c8800467cde..ca836098f87e71411cc89076b1fb81d20379b8cd 100644 (file)
@@ -233,4 +233,16 @@ void TPrsStd_AISViewer::Paste (const Handle(TDF_Attribute)&,
 {
 }
 
+//=======================================================================
+//function : DumpJson
+//purpose  : 
+//=======================================================================
+void TPrsStd_AISViewer::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+  OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+  OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+
+  OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, myInteractiveContext.get())
+}
 
index 66b61eb9ca99031934b385a9cfb52910c29f1b26..0140c05e300a5166144daa0ba8c22d5af8ca7736 100644 (file)
@@ -92,6 +92,8 @@ public:
   
   Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE;
 
+  //! Dumps the content of me into the stream
+  Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
 
 
 
index d00a8d281ac0bfb7d2c219a9a8f4ab944ca0e806..b97a20f5d81c1877fdc5e7528b5e2c025892468b 100644 (file)
 #include <XCAFDoc.hxx>
 #include <XCAFDoc_ColorType.hxx>
 
+#include <Quantity_ColorRGBA.hxx>
+
+#include <Standard_GUID.hxx>
+#include <TCollection_HAsciiString.hxx>
+#include <TDF_Attribute.hxx>
 #include <TDF_Label.hxx>
+#include <TDF_Reference.hxx>
 #include <TDF_Tool.hxx>
+#include <TDataStd_AsciiString.hxx>
+#include <TDataStd_Integer.hxx>
+#include <TDataStd_Comment.hxx>
+#include <TDataStd_ByteArray.hxx>
+#include <TDataStd_IntegerArray.hxx>
 #include <TDataStd_Name.hxx>
+#include <TDataStd_RealArray.hxx>
+#include <TDataStd_Real.hxx>
+#include <TDataStd_TreeNode.hxx>
+#include <TDataStd_UAttribute.hxx>
 #include <TDocStd_Document.hxx>
-#include <Standard_GUID.hxx>
+#include <TNaming_NamedShape.hxx>
+#include <TopoDS_Shape.hxx>
+#include <XCAFDoc_Area.hxx>
+#include <XCAFDoc_Centroid.hxx>
+#include <XCAFDoc_Color.hxx>
+#include <XCAFDoc_DimTol.hxx>
+#include <XCAFDoc_GraphNode.hxx>
+#include <XCAFDoc_Material.hxx>
+#include <XCAFDoc_ShapeMapTool.hxx>
+#include <XCAFDoc_Volume.hxx>
 
 //=======================================================================
 //function : ShapeRefGUID
@@ -303,3 +327,260 @@ const Standard_GUID& XCAFDoc::LockGUID()
   static const Standard_GUID ID("efd213eb-6dfd-11d4-b9c8-0060b0ee281b");
   return ID;
 }
+
+//=======================================================================
+//function : AttributeInfo
+//purpose  :
+//=======================================================================
+TCollection_AsciiString XCAFDoc::AttributeInfo (const Handle(TDF_Attribute)& theAtt)
+{
+  TCollection_AsciiString anInfo;
+
+  if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_TreeNode)) ) {
+    Standard_CString type = "";
+    if ( theAtt->ID() == XCAFDoc::ShapeRefGUID() ) type = "Shape Instance Link";
+    else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorGen) ) type = "Generic Color Link";
+    else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorSurf) ) type = "Surface Color Link";
+    else if ( theAtt->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorCurv) ) type = "Curve Color Link";
+    else if ( theAtt->ID() == XCAFDoc::DimTolRefGUID() ) type = "DGT Link";
+    else if ( theAtt->ID() == XCAFDoc::DatumRefGUID() ) type = "Datum Link";
+    else if ( theAtt->ID() == XCAFDoc::MaterialRefGUID() ) type = "Material Link";
+    Handle(TDataStd_TreeNode) TN = Handle(TDataStd_TreeNode)::DownCast(theAtt);
+    TCollection_AsciiString ref;
+    if ( TN->HasFather() ) {
+      TDF_Tool::Entry ( TN->Father()->Label(), ref );
+      anInfo = type;
+      anInfo += TCollection_AsciiString (" ==> ") + ref;
+    }
+    else {
+      anInfo = type;
+      anInfo += TCollection_AsciiString (" <== (") + ref;
+      Handle(TDataStd_TreeNode) child = TN->First();
+      while ( ! child.IsNull() ) {
+        TDF_Tool::Entry ( child->Label(), ref );
+        if ( child != TN->First() ) anInfo +=  ", " ;
+        anInfo += ref;
+        child = child->Next();
+      }
+      anInfo += ")";
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDF_Reference)) ) {
+    Handle(TDF_Reference) val = Handle(TDF_Reference)::DownCast ( theAtt );
+    TCollection_AsciiString ref;
+    TDF_Tool::Entry ( val->Get(), ref );
+    anInfo += TCollection_AsciiString ("==> ") + ref;
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDF_TagSource)) ) {
+    Handle(TDF_TagSource) val = Handle(TDF_TagSource)::DownCast ( theAtt );
+    anInfo += TCollection_AsciiString ( val->Get() );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Integer)) ) {
+    Handle(TDataStd_Integer) val = Handle(TDataStd_Integer)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get() );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Real)) ) {
+    Handle(TDataStd_Real) val = Handle(TDataStd_Real)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get() );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Name)) ) {
+    Handle(TDataStd_Name) val = Handle(TDataStd_Name)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get(), '?' );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_Comment)) ) {
+    Handle(TDataStd_Comment) val = Handle(TDataStd_Comment)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get(), '?' );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_AsciiString)) ) {
+    Handle(TDataStd_AsciiString) val = Handle(TDataStd_AsciiString)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get(), '?' );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_IntegerArray)) ) {
+    Handle(TDataStd_IntegerArray) val = Handle(TDataStd_IntegerArray)::DownCast ( theAtt );
+    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
+      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
+      anInfo += TCollection_AsciiString ( val->Value(j) );
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_RealArray)) ) {
+    Handle(TDataStd_RealArray) val = Handle(TDataStd_RealArray)::DownCast ( theAtt );
+    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
+      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
+      anInfo += TCollection_AsciiString ( val->Value(j) );
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_ByteArray)) ) {
+    Handle(TDataStd_ByteArray) val = Handle(TDataStd_ByteArray)::DownCast ( theAtt );
+    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
+      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
+      anInfo += TCollection_AsciiString ( val->Value(j) );
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TNaming_NamedShape)) ) {
+    Handle(TNaming_NamedShape) val = Handle(TNaming_NamedShape)::DownCast ( theAtt );
+    TopoDS_Shape S = val->Get();
+    if (!S.IsNull())
+      anInfo = S.TShape()->DynamicType()->Name();
+    else
+      anInfo = "Empty Shape";
+    if ( ! S.Location().IsIdentity() ) anInfo += TCollection_AsciiString ( "(located)" );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_ShapeMapTool)) ) {
+
+    Handle(XCAFDoc_ShapeMapTool) anAttr = Handle(XCAFDoc_ShapeMapTool)::DownCast ( theAtt );
+    anInfo += TCollection_AsciiString (anAttr->GetMap().Extent());
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Volume)) ) {
+    Handle(XCAFDoc_Volume) val = Handle(XCAFDoc_Volume)::DownCast ( theAtt );
+    anInfo += TCollection_AsciiString ( val->Get() );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Area)) ) {
+    Handle(XCAFDoc_Area) val = Handle(XCAFDoc_Area)::DownCast ( theAtt );
+    anInfo = TCollection_AsciiString ( val->Get() );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Centroid)) ) {
+    Handle(XCAFDoc_Centroid) val = Handle(XCAFDoc_Centroid)::DownCast ( theAtt );
+    gp_Pnt myCentroid = val->Get();
+    anInfo = "(" ;
+    anInfo += TCollection_AsciiString ( myCentroid.X() );
+    anInfo += TCollection_AsciiString ( " , " );
+    anInfo += TCollection_AsciiString ( TCollection_AsciiString ( myCentroid.Y() ) );
+    anInfo += TCollection_AsciiString ( " , " );
+    anInfo += TCollection_AsciiString ( myCentroid.Z() );
+    anInfo += TCollection_AsciiString ( ")" );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(TDataStd_UAttribute)) ) {
+    if ( theAtt->ID() == XCAFDoc::AssemblyGUID() ) anInfo += TCollection_AsciiString ( "is assembly" );
+    if ( theAtt->ID() == XCAFDoc::InvisibleGUID() ) anInfo += TCollection_AsciiString ( "invisible" );
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Color)) ) {
+    Handle(XCAFDoc_Color) val = Handle(XCAFDoc_Color)::DownCast ( theAtt );
+    Quantity_ColorRGBA C = val->GetColorRGBA();
+    char string[260];
+    Sprintf ( string, "%s (%g, %g, %g, %g)", C.GetRGB().StringName ( C.GetRGB().Name() ),
+      C.GetRGB().Red(), C.GetRGB().Green(), C.GetRGB().Blue(), C.Alpha());
+    anInfo = string;
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_DimTol)) ) {
+    Handle(XCAFDoc_DimTol) val = Handle(XCAFDoc_DimTol)::DownCast ( theAtt );
+    Standard_Integer kind = val->GetKind();
+    Handle(TColStd_HArray1OfReal) HAR = val->GetVal();
+    if(kind<20) { //dimension
+      anInfo = "Diameter (ValueRange[";
+      anInfo += TCollection_AsciiString ( HAR->Value(1) );
+      anInfo += TCollection_AsciiString ( "," );
+      anInfo += TCollection_AsciiString ( HAR->Value(2) );
+      anInfo += TCollection_AsciiString ( "])" );
+    }
+    else {
+      switch (kind) {
+      case 21: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_1"; break;
+      case 22: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_2"; break;
+      case 23: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_3"; break;
+      case 24: anInfo = "AngularityTolerance"; break;
+      case 25: anInfo = "CircularRunoutTolerance"; break;
+      case 26: anInfo = "CoaxialityTolerance"; break;
+      case 27: anInfo = "ConcentricityTolerance"; break;
+      case 28: anInfo = "ParallelismTolerance"; break;
+      case 29: anInfo = "PerpendicularityTolerance"; break;
+      case 30: anInfo = "SymmetryTolerance"; break;
+      case 31: anInfo = "TotalRunoutTolerance"; break;
+      case 35: anInfo = "ModifiedGeometricTolerance_1"; break;
+      case 36: anInfo = "ModifiedGeometricTolerance_2"; break;
+      case 37: anInfo = "ModifiedGeometricTolerance_3"; break;
+      case 38: anInfo = "CylindricityTolerance"; break;
+      case 39: anInfo = "FlatnessTolerance"; break;
+      case 40: anInfo = "LineProfileTolerance"; break;
+      case 41: anInfo = "PositionTolerance"; break;
+      case 42: anInfo = "RoundnessTolerance"; break;
+      case 43: anInfo = "StraightnessTolerance"; break;
+      case 44: anInfo = "SurfaceProfileTolerance"; break;
+      }
+      if (anInfo.Length() > 0) {
+        anInfo += " (Value=";
+        anInfo += TCollection_AsciiString (HAR->Value (1));
+        anInfo += ")";
+      }
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_Material)) ) {
+    Handle(XCAFDoc_Material) val = Handle(XCAFDoc_Material)::DownCast ( theAtt );
+    Standard_Real dens = val->GetDensity();
+    Standard_CString dimdens = "g/cu sm";
+    if(dens==0) 
+      anInfo = val->GetName()->ToCString();
+    else {
+      anInfo = val->GetName()->ToCString();
+      anInfo += "(density=";
+      anInfo += TCollection_AsciiString ( dens );
+      anInfo += dimdens;
+      anInfo += ")";
+    }
+  }
+  else if ( theAtt->IsKind(STANDARD_TYPE(XCAFDoc_GraphNode)) ) {
+    Standard_CString type;
+    if ( theAtt->ID() == XCAFDoc::LayerRefGUID() ) {
+      type = "Layer Instance Link";
+    }
+    else if ( theAtt->ID() == XCAFDoc::SHUORefGUID() ) {
+      type = "SHUO Instance Link";
+    }
+    else if ( theAtt->ID() == XCAFDoc::DatumTolRefGUID() ) {
+      type = "DatumToler Link";
+    }
+    else if ( theAtt->ID() == XCAFDoc::DimensionRefFirstGUID() ) {
+      type = "Dimension Link First";
+    }
+    else if ( theAtt->ID() == XCAFDoc::DimensionRefSecondGUID() ) {
+      type = "Dimension Link Second";
+    }
+    else if ( theAtt->ID() == XCAFDoc::GeomToleranceRefGUID() ){
+      type = "GeomTolerance Link";
+    }
+    else if ( theAtt->ID() == XCAFDoc::DatumRefGUID() ){
+      type = "Datum Link";
+    }
+    else if (theAtt->ID() == XCAFDoc::ViewRefShapeGUID()){
+      type = "View Shape Link";
+    }
+    else if (theAtt->ID() == XCAFDoc::ViewRefGDTGUID()){
+      type = "View GD&T Link";
+    }
+    else if (theAtt->ID() == XCAFDoc::ViewRefPlaneGUID()) {
+      type = "View Clipping Plane Link";
+    }
+    else
+      return TCollection_AsciiString();
+
+    Handle(XCAFDoc_GraphNode) DETGN = Handle(XCAFDoc_GraphNode)::DownCast(theAtt);
+    TCollection_AsciiString ref;
+    Standard_Integer ii = 1;
+    if (DETGN->NbFathers()!=0) {
+
+      TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
+      anInfo = type;
+      anInfo += " ==> (";
+      anInfo += ref;
+      for (ii = 2; ii <= DETGN->NbFathers(); ii++) {
+        TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
+        anInfo += ", ";
+        anInfo += ref;
+      }
+      anInfo += ") ";
+    }
+    ii = 1;
+    if (DETGN->NbChildren()!=0) {
+      TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
+      anInfo += type;
+      anInfo += " <== (";
+      anInfo += ref;
+      for (ii = 2; ii <= DETGN->NbChildren (); ii++) {
+        TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
+        anInfo += ", ";
+        anInfo += ref;
+      }
+      anInfo += ") ";
+    }
+  }
+  return anInfo;
+}
index c4bc8f29965c3dc51b059418412d3b87dad1f2f5..a533ee437bcc5b040254e242f9bddb5e9322bda0 100644 (file)
 #include <Standard.hxx>
 #include <Standard_DefineAlloc.hxx>
 #include <Standard_Handle.hxx>
+#include <TCollection_AsciiString.hxx>
 
 #include <XCAFDoc_ColorType.hxx>
+class TDF_Attribute;
 class Standard_GUID;
 class XCAFDoc_DocumentTool;
 class XCAFDoc_Location;
@@ -133,6 +135,11 @@ public:
   //! Returns GUID for UAttribute identifying lock flag
   Standard_EXPORT static const Standard_GUID& LockGUID();
 
+  //! Prints attribute information into a string.
+  //! @param theAtt an XDE attribute
+  //! @return the generated info value
+  Standard_EXPORT static TCollection_AsciiString AttributeInfo (const Handle(TDF_Attribute)& theAtt);
+
 };
 
 #endif // _XCAFDoc_HeaderFile
index 4d1235ac8955ddcb955c79ded93c711f5d29b0fe..50258276b5ec0fefee6befd0ee0ca5103c52b6f8 100644 (file)
@@ -162,7 +162,7 @@ void XCAFDoc_ShapeMapTool::DumpJson (Standard_OStream& theOStream, Standard_Inte
 
   for (TopTools_IndexedMapOfShape::Iterator aMapIt (myMap); aMapIt.More(); aMapIt.Next())
   {
-    const TopoDS_Shape& aShape = aMapIt.Value();
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aShape)
+    const Handle(TopoDS_TShape)& aShape = aMapIt.Value().TShape();
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, aShape)
   }
 }
index f7ebd963428ac780d99476201a6da87c09859f48..0598161e0b2276905dcc628994e812d184478c65 100644 (file)
@@ -2154,29 +2154,32 @@ void XCAFDoc_ShapeTool::DumpJson (Standard_OStream& theOStream, Standard_Integer
 
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aShapeLabelIt (myShapeLabels); aShapeLabelIt.More(); aShapeLabelIt.Next())
   {
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aShapeLabelIt.Key())
+    const TopoDS_Shape aShape = aShapeLabelIt.Key();
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aShape)
 
     TCollection_AsciiString aShapeLabel;
     TDF_Tool::Entry (aShapeLabelIt.Value(), aShapeLabel);
     OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aShapeLabel)
   }
-  
+
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSubShapeIt (mySubShapes); aSubShapeIt.More(); aSubShapeIt.Next())
   {
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aSubShapeIt.Key())
+    const TopoDS_Shape aSubShape = aSubShapeIt.Key();
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSubShape)
 
-    TCollection_AsciiString aSubShape;
-    TDF_Tool::Entry (aSubShapeIt.Value(), aSubShape);
-    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSubShape)
+    TCollection_AsciiString aSubShapeLabel;
+    TDF_Tool::Entry (aSubShapeIt.Value(), aSubShapeLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSubShapeLabel)
   }
-  
+
   for (XCAFDoc_DataMapOfShapeLabel::Iterator aSimpleShapeIt (mySimpleShapes); aSimpleShapeIt.More(); aSimpleShapeIt.Next())
   {
-    OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, &aSimpleShapeIt.Key())
+    const TopoDS_Shape aSimpleShape = aSimpleShapeIt.Key();
+    OCCT_DUMP_FIELD_VALUE_POINTER (theOStream, &aSimpleShape)
 
-    TCollection_AsciiString aSimpleShape;
-    TDF_Tool::Entry (aSimpleShapeIt.Value(), aSimpleShape);
-    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSimpleShape)
+    TCollection_AsciiString aSimpleShapeLabel;
+    TDF_Tool::Entry (aSimpleShapeIt.Value(), aSimpleShapeLabel);
+    OCCT_DUMP_FIELD_VALUE_STRING (theOStream, aSimpleShapeLabel)
   }
 
   OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, hasSimpleShapes)
index 0d3b11181b413c4f8800fe40a287a2ed5954f269..563c9e3d989f9cb36c8c49f7f3093d82505ccc27 100644 (file)
@@ -941,224 +941,10 @@ static Standard_Integer XAttributeValue (Draw_Interpretor& di, Standard_Integer
 
   if ( ! itr.More() ) { std::cout << "Syntax error: Attribute #" << num << " not found\n"; return 1; }
 
-  const Handle(TDF_Attribute)& att = itr.Value();
-  if ( att->IsKind(STANDARD_TYPE(TDataStd_TreeNode)) ) {
-    Standard_CString type = "";
-    if ( att->ID() == XCAFDoc::ShapeRefGUID() ) type = "Shape Instance Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorGen) ) type = "Generic Color Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorSurf) ) type = "Surface Color Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorCurv) ) type = "Curve Color Link";
-    else if ( att->ID() == XCAFDoc::DimTolRefGUID() ) type = "DGT Link";
-    else if ( att->ID() == XCAFDoc::DatumRefGUID() ) type = "Datum Link";
-    else if ( att->ID() == XCAFDoc::MaterialRefGUID() ) type = "Material Link";
-    Handle(TDataStd_TreeNode) TN = Handle(TDataStd_TreeNode)::DownCast(att);
-    TCollection_AsciiString ref;
-    if ( TN->HasFather() ) {
-      TDF_Tool::Entry ( TN->Father()->Label(), ref );
-      di << type << " ==> " << ref.ToCString();
-    }
-    else {
-      di << type << " <== (" << ref.ToCString();
-      Handle(TDataStd_TreeNode) child = TN->First();
-      while ( ! child.IsNull() ) {
-        TDF_Tool::Entry ( child->Label(), ref );
-        if ( child != TN->First() ) di << ", ";
-        di << ref.ToCString();
-        child = child->Next();
-      }
-      di << ")";
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDF_Reference)) ) {
-    Handle(TDF_Reference) val = Handle(TDF_Reference)::DownCast ( att );
-    TCollection_AsciiString ref;
-    TDF_Tool::Entry ( val->Get(), ref );
-    di << "==> " << ref.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_Integer)) ) {
-    Handle(TDataStd_Integer) val = Handle(TDataStd_Integer)::DownCast ( att );
-    TCollection_AsciiString str ( val->Get() );
-    di << str.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_Real)) ) {
-    Handle(TDataStd_Real) val = Handle(TDataStd_Real)::DownCast ( att );
-    TCollection_AsciiString str ( val->Get() );
-    di << str.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_Name)) ) {
-    Handle(TDataStd_Name) val = Handle(TDataStd_Name)::DownCast ( att );
-    di << val->Get();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_Comment)) ) {
-    Handle(TDataStd_Comment) val = Handle(TDataStd_Comment)::DownCast ( att );
-    di << val->Get();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_AsciiString)) ) {
-    Handle(TDataStd_AsciiString) val = Handle(TDataStd_AsciiString)::DownCast ( att );
-    di << val->Get();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_IntegerArray)) ) {
-    Handle(TDataStd_IntegerArray) val = Handle(TDataStd_IntegerArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) di << ", ";
-      TCollection_AsciiString str ( val->Value(j) );
-      di << str.ToCString();
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_RealArray)) ) {
-    Handle(TDataStd_RealArray) val = Handle(TDataStd_RealArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) di << ", ";
-      TCollection_AsciiString str ( val->Value(j) );
-      di << str.ToCString();
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_ByteArray)) ) {
-    Handle(TDataStd_ByteArray) val = Handle(TDataStd_ByteArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) di << ", ";
-      TCollection_AsciiString str ( val->Value(j) );
-      di << str.ToCString();
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TNaming_NamedShape)) ) {
-    Handle(TNaming_NamedShape) val = Handle(TNaming_NamedShape)::DownCast ( att );
-    TopoDS_Shape S = val->Get();
-    di << S.TShape()->DynamicType()->Name();
-    if ( ! S.Location().IsIdentity() ) di << "(located)";
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_Volume)) ) {
-    Handle(XCAFDoc_Volume) val = Handle(XCAFDoc_Volume)::DownCast ( att );
-    TCollection_AsciiString str ( val->Get() );
-    di << str.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_Area)) ) {
-    Handle(XCAFDoc_Area) val = Handle(XCAFDoc_Area)::DownCast ( att );
-    TCollection_AsciiString str ( val->Get() );
-    di << str.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_Centroid)) ) {
-    Handle(XCAFDoc_Centroid) val = Handle(XCAFDoc_Centroid)::DownCast ( att );
-    gp_Pnt myCentroid = val->Get();
-    di << "(" ;
-    di << myCentroid.X();
-    di <<" , ";
-    di << myCentroid.Y();
-    di <<" , ";
-    di << myCentroid.Z();
-    di << ")";
-  }
-  else if ( att->IsKind(STANDARD_TYPE(TDataStd_UAttribute)) ) {
-    if ( att->ID() == XCAFDoc::AssemblyGUID() ) di << "is assembly";
-    if ( att->ID() == XCAFDoc::InvisibleGUID() ) di << "invisible";
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_Color)) ) {
-    Handle(XCAFDoc_Color) val = Handle(XCAFDoc_Color)::DownCast ( att );
-    Quantity_ColorRGBA C = val->GetColorRGBA();
-    char string[260];
-    Sprintf ( string, "%s (%g, %g, %g, %g)", C.GetRGB().StringName ( C.GetRGB().Name() ),
-      C.GetRGB().Red(), C.GetRGB().Green(), C.GetRGB().Blue(), C.Alpha());
-    di << string;
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_DimTol)) ) {
-    Handle(XCAFDoc_DimTol) val = Handle(XCAFDoc_DimTol)::DownCast ( att );
-    Standard_Integer kind = val->GetKind();
-    Handle(TColStd_HArray1OfReal) HAR = val->GetVal();
-    if(kind<20) { //dimension
-      di<<"Diameter (ValueRange["<<HAR->Value(1)<<","<<HAR->Value(2)<<"])";
-    }
-    else {
-      switch(kind) {
-      case 21: di << "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_1 (Value="<<HAR->Value(1)<<")"; break;
-      case 22: di << "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_2 (Value="<<HAR->Value(1)<<")"; break;
-      case 23: di << "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_3 (Value="<<HAR->Value(1)<<")"; break;
-      case 24: di << "AngularityTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 25: di << "CircularRunoutTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 26: di << "CoaxialityTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 27: di << "ConcentricityTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 28: di << "ParallelismTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 29: di << "PerpendicularityTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 30: di << "SymmetryTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 31: di << "TotalRunoutTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 35: di << "ModifiedGeometricTolerance_1 (Value="<<HAR->Value(1)<<")"; break;
-      case 36: di << "ModifiedGeometricTolerance_2 (Value="<<HAR->Value(1)<<")"; break;
-      case 37: di << "ModifiedGeometricTolerance_3 (Value="<<HAR->Value(1)<<")"; break;
-      case 38: di << "CylindricityTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 39: di << "FlatnessTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 40: di << "LineProfileTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 41: di << "PositionTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 42: di << "RoundnessTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 43: di << "StraightnessTolerance (Value="<<HAR->Value(1)<<")"; break;
-      case 44: di << "SurfaceProfileTolerance (Value="<<HAR->Value(1)<<")"; break;
-      }
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_Material)) ) {
-    Handle(XCAFDoc_Material) val = Handle(XCAFDoc_Material)::DownCast ( att );
-    Standard_Real dens = val->GetDensity();
-    Standard_CString dimdens = "g/cu sm";
-    if(dens==0) 
-      di<<val->GetName()->ToCString();
-    else
-      di<<val->GetName()->ToCString()<<"(density="<<dens<<dimdens<<")";
-  }
-  else if ( att->IsKind(STANDARD_TYPE(XCAFDoc_GraphNode)) ) {
-    Standard_CString type;
-    if ( att->ID() == XCAFDoc::LayerRefGUID() ) {
-      type = "Layer Instance Link";
-    }
-    else if ( att->ID() == XCAFDoc::SHUORefGUID() ) {
-      type = "SHUO Instance Link";
-    }
-    else if ( att->ID() == XCAFDoc::DatumTolRefGUID() ) {
-      type = "DatumToler Link";
-    }
-    else if ( att->ID() == XCAFDoc::DimensionRefFirstGUID() ) {
-      type = "Dimension Link First";
-    }
-    else if ( att->ID() == XCAFDoc::DimensionRefSecondGUID() ) {
-      type = "Dimension Link Second";
-    }
-    else if ( att->ID() == XCAFDoc::GeomToleranceRefGUID() ){
-      type = "GeomTolerance Link";
-    }
-    else if ( att->ID() == XCAFDoc::DatumRefGUID() ){
-      type = "Datum Link";
-    }
-    else if (att->ID() == XCAFDoc::ViewRefShapeGUID()){
-      type = "View Shape Link";
-    }
-    else if (att->ID() == XCAFDoc::ViewRefGDTGUID()){
-      type = "View GD&T Link";
-    }
-    else if (att->ID() == XCAFDoc::ViewRefPlaneGUID()) {
-      type = "View Clipping Plane Link";
-    }
-    else return 0;
-
-    Handle(XCAFDoc_GraphNode) DETGN = Handle(XCAFDoc_GraphNode)::DownCast(att);
-    TCollection_AsciiString ref;
-    Standard_Integer ii = 1;
-    if (DETGN->NbFathers()!=0) {
-
-      TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
-      di << type<< " ==> (" << ref.ToCString();
-      for (ii = 2; ii <= DETGN->NbFathers(); ii++) {
-       TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
-         di << ", " << ref.ToCString();
-       }
-      di << ") ";
-    }
-    ii = 1;
-    if (DETGN->NbChildren()!=0) {
-      TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
-      di << type<< " <== (" << ref.ToCString();
-      for (ii = 2; ii <= DETGN->NbChildren(); ii++) {
-       TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
-         di << ", " << ref.ToCString();
-       }
-      di << ")";
-    }
+  TCollection_AsciiString anInfo = XCAFDoc::AttributeInfo ( itr.Value() );
+  if (!anInfo.IsEmpty())
+  {
+    di << anInfo.ToCString();
   }
   return 0;
 }
index 411fb1fd40333ec98cbfb22ac828073d908406ef..d121e66cc68329db5edba3ad78ade6c7cd46d969 100644 (file)
@@ -16,6 +16,7 @@
 #include <inspector/Convert_Tools.hxx>
 #include <inspector/Convert_TransientShape.hxx>
 
+#include <AIS_Line.hxx>
 #include <AIS_Plane.hxx>
 #include <AIS_Shape.hxx>
 #include <BRep_Builder.hxx>
@@ -24,6 +25,7 @@
 #include <BRepPreviewAPI_MakeBox.hxx>
 #include <BRepTools.hxx>
 #include <gp_XY.hxx>
+#include <Geom_Line.hxx>
 #include <Geom_Plane.hxx>
 #include <Prs3d_PlaneAspect.hxx>
 #include <Standard_Dump.hxx>
@@ -71,7 +73,9 @@ void Convert_Tools::ConvertStreamToPresentations (const Standard_SStream& theSSt
   gp_Dir aDir;
   if (aDir.InitFromJson (theSStream, aStartPos))
   {
-    thePresentations.Append (new Convert_TransientShape (BRepBuilderAPI_MakeEdge (gp::Origin(), aDir.XYZ())));
+    gp_Lin aLin (gp::Origin(), aDir);
+    Handle(Geom_Line) aGeomLine = new Geom_Line (aLin);
+    CreatePresentation (aGeomLine, thePresentations);
     return;
   }
 
@@ -209,6 +213,18 @@ Standard_Boolean Convert_Tools::CreateBoxShape (const gp_Pnt& thePntMin, const g
   return Standard_True;
 }
 
+//=======================================================================
+//function : CreatePresentation
+//purpose  :
+//=======================================================================
+void Convert_Tools::CreatePresentation (const Handle(Geom_Line)& theLine,
+                                        NCollection_List<Handle(Standard_Transient)>& thePresentations)
+{
+  Handle(AIS_Line) aLinePrs = new AIS_Line (theLine);
+  aLinePrs->SetColor (Quantity_NOC_TOMATO);
+  thePresentations.Append (aLinePrs);
+}
+
 //=======================================================================
 //function : CreatePresentation
 //purpose  :
@@ -248,11 +264,13 @@ void Convert_Tools::CreatePresentation (const gp_Trsf& theTrsf,
     return;
 
   Handle(AIS_Shape) aSourcePrs = new AIS_Shape (aBoxShape);
+  aSourcePrs->Attributes()->SetAutoTriangulation (Standard_False);
   aSourcePrs->SetColor (Quantity_NOC_WHITE);
   aSourcePrs->SetTransparency (0.5);
   thePresentations.Append (aSourcePrs);
 
   Handle(AIS_Shape) aTransformedPrs = new AIS_Shape (aBoxShape);
+  aTransformedPrs->Attributes()->SetAutoTriangulation (Standard_False);
   aTransformedPrs->SetColor (Quantity_NOC_TOMATO);
   aTransformedPrs->SetTransparency (0.5);
   aTransformedPrs->SetLocalTransformation (theTrsf);
index 728c096c74cc0037f198b61f63198d6010330017..faffa6989aec38b430063740c2a65627b9adc08d 100644 (file)
@@ -38,6 +38,7 @@
 #include <QVariant>
 #include <Standard_WarningsRestore.hxx>
 
+class Geom_Line;
 class Geom_Plane;
 class Geom_Transformation;
 
@@ -85,15 +86,21 @@ public:
                                                           const gp_Pnt& thePntMax,
                                                           TopoDS_Shape& theShape);
 
+  //! Creates presentation AIS_Line
+  //! \param theLine source line
+  //! \param thePresentations container to collect new presentations
+  Standard_EXPORT static void CreatePresentation (const Handle(Geom_Line)& theLine,
+    NCollection_List<Handle(Standard_Transient)>& thePresentations);
+
   //! Creates presentation AIS_Plane
   //! \param thePlane source plane
-  //! \param thePresentations container to collect new presentation/s
+  //! \param thePresentations container to collect new presentations
   Standard_EXPORT static void CreatePresentation (const Handle(Geom_Plane)& thePlane,
     NCollection_List<Handle(Standard_Transient)>& thePresentations);
 
   //! Creates two presentations base on gp_Trsf: box in initial place and transformed box
   //! \param thePlane source plane
-  //! \param thePresentations container to collect new presentation/s
+  //! \param thePresentations container to collect new presentations
   Standard_EXPORT static void CreatePresentation (const gp_Trsf& theTrsf,
     NCollection_List<Handle(Standard_Transient)>& thePresentations);
 
index 28f482ac3c1f17941380f24099b68871b670d48d..ee7df57475b3ff452b491b3e5f6aa03ec2886744 100644 (file)
@@ -18,6 +18,7 @@
 #include <inspector/DFBrowser_ItemRole.hxx>
 #include <inspector/DFBrowser_Module.hxx>
 #include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Window.hxx>
 
 #include <inspector/DFBrowserPane_AttributePane.hxx>
 #include <inspector/DFBrowserPane_ItemRole.hxx>
@@ -31,8 +32,6 @@
 #include <QObject>
 #include <Standard_WarningsRestore.hxx>
 
-//#define USE_DUMPJSON
-
 // =======================================================================
 // function : hasAttribute
 // purpose :
@@ -158,13 +157,14 @@ void DFBrowser_Item::initStream (Standard_OStream& theOStream) const
   if (!HasAttribute())
     return;
 
-#ifdef USE_DUMPJSON
-  Handle(TDF_Attribute) anAttribute = GetAttribute();
-  if (!anAttribute.IsNull())
-    anAttribute->DumpJson (theOStream);
-#else
-  (void)theOStream;
-#endif
+  if (DFBrowser_Window::IsUseDumpJson())
+  {
+    Handle(TDF_Attribute) anAttribute = GetAttribute();
+    if (!anAttribute.IsNull())
+    {
+      anAttribute->DumpJson (theOStream);
+    }
+  }
 }
 
 // =======================================================================
index c4e9fc543b031c8f6070ebd4f7aba64dc297ddca..3b7e25e3c398d0d8d0964f458b3ecc75d5ff6026 100644 (file)
 #include <inspector/DFBrowserPane_ItemRole.hxx>
 #include <inspector/DFBrowserPane_Tools.hxx>
 
-#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
-#include <inspector/DFBrowserPaneXDE_Tools.hxx>
-
 #include <XCAFApp_Application.hxx>
+#include <XCAFDoc.hxx>
 
 #include <Standard_WarningsDisable.hxx>
 #include <QItemSelectionModel>
@@ -68,8 +66,6 @@ void DFBrowser_Module::SetApplication (const Handle(TDocStd_Application)& theApp
 
   myPaneCreators.clear();
   RegisterPaneCreator (new DFBrowserPane_AttributePaneCreator());
-  if (!theApplication.IsNull() && DFBrowserPaneXDE_Tools::IsXDEApplication (theApplication))
-    RegisterPaneCreator (new DFBrowserPaneXDE_AttributePaneCreator (myPaneCreators[0]));
 }
 
 // =======================================================================
@@ -185,8 +181,17 @@ QVariant DFBrowser_Module::GetAttributeInfo (Handle(TDF_Attribute) theAttribute,
       anAttributePane = dynamic_cast<DFBrowserPane_AttributePane*> (anAPIPane);
   }
 
+  TCollection_AsciiString anInfo;
+  if (theRole == DFBrowser_ItemRole_AdditionalInfo)
+  {
+    anInfo = XCAFDoc::AttributeInfo (theAttribute);
+  }
   QVariant aValue;
-  if (anAttributePane)
+  if (!anInfo.IsEmpty())
+  {
+    aValue = anInfo.ToCString();
+  }
+  else if (anAttributePane)
     aValue = anAttributePane->GetAttributeInfo (theAttribute,
                theRole == DFBrowser_ItemRole_AdditionalInfo ? DFBrowserPane_ItemRole_ShortInfo : theRole,
                theColumnId);
index 59c6a7f14f0c42b906d5fd4ec4997f1c441b66b7..4cefdc25f511080454fbb7a52320555b386eaf6e 100644 (file)
@@ -126,7 +126,7 @@ QVariant DFBrowser_TreeLevelViewModel::data (const QModelIndex& theIndex, int th
 Qt::ItemFlags DFBrowser_TreeLevelViewModel::flags (const QModelIndex& theIndex) const
 {
   if (!theIndex.isValid())
-    return 0;
+    return Qt::NoItemFlags;
   Qt::ItemFlags aFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
 
   return aFlags;
index 23ab2c2aa837e07d1034ab245d8a4ae4f73aa5f5..70857bc046c8f010b358c1de83628e2ba8014c22 100644 (file)
@@ -49,7 +49,7 @@ DFBrowser_TreeModel::DFBrowser_TreeModel (QObject* theParent)
 // =======================================================================
 void DFBrowser_TreeModel::InitColumns()
 {
-  SetHeaderItem (0, TreeModel_HeaderSection ("Name"));
+  setHeaderItem (0, TreeModel_HeaderSection ("Name"));
 }
 
 // =======================================================================
index b7e94c7ffbe1ea4a40e01e5ac42e940e40500891..a41b589fe84d3794037a499e11178a06976cc671 100644 (file)
@@ -51,7 +51,7 @@
 #include <OSD_Directory.hxx>
 #include <OSD_Environment.hxx>
 #include <OSD_Protection.hxx>
-#include <OSD_Thread.hxx>
+
 #include <inspector/View_Displayer.hxx>
 #include <inspector/View_ToolBar.hxx>
 #include <inspector/View_Viewer.hxx>
@@ -62,7 +62,6 @@
 #include <inspector/ViewControl_Tools.hxx>
 
 #include <Standard_WarningsDisable.hxx>
-#include <Standard_ThreadId.hxx>
 #include <QAction>
 #include <QApplication>
 #include <QComboBox>
@@ -72,6 +71,7 @@
 #include <QList>
 #include <QMainWindow>
 #include <QItemSelectionModel>
+#include <QPushButton>
 #include <QTabWidget>
 #include <QToolBar>
 #include <QTreeView>
@@ -99,7 +99,7 @@ const int DFBROWSER_DEFAULT_POSITION_Y = 60;
 const int DEFAULT_PROPERTY_PANEL_HEIGHT = 200;
 const int DEFAULT_BROWSER_HEIGHT = 800;
 
-//#define USE_DUMPJSON
+static Standard_Boolean MyIsUseDumpJson = Standard_False;
 
 // =======================================================================
 // function : Constructor
@@ -160,23 +160,30 @@ DFBrowser_Window::DFBrowser_Window()
   connect (aLevelView, SIGNAL (indexDoubleClicked (const QModelIndex&)),
            this, SLOT (onLevelDoubleClicked (const QModelIndex&)));
 
-  // property widget
-  QDockWidget* aPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel"), myMainWindow);
+  // property custom panel with specific parameters of attributes
+  QDockWidget* aPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel (custom)"), myMainWindow);
   aPropertyPanelWidget->setObjectName (aPropertyPanelWidget->windowTitle());
   aPropertyPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
   aPropertyPanelWidget->setWidget (myPropertyPanel->GetControl());
   myMainWindow->addDockWidget (Qt::RightDockWidgetArea, aPropertyPanelWidget);
 
-  // property view
-#ifdef USE_DUMPJSON
-  myPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel (DumpJson)"), myMainWindow);
+  // property panel
+  myUseDumpJson = new QWidget(myMainWindow);
+  QVBoxLayout* aLay = new QVBoxLayout(myUseDumpJson);
+  QPushButton* aUseDumpJson = new QPushButton ("Use DumpJson", myMainWindow);
+  aLay->addWidget (aUseDumpJson);
+  aLay->addStretch(1);
+  connect(aUseDumpJson, SIGNAL (clicked (bool)), this, SLOT (onUseDumpJson()));
+  myUseDumpJson->setVisible (false);
+
+  myPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel"), myMainWindow);
   myPropertyView = new ViewControl_PropertyView (myMainWindow,
     QSize(DFBROWSER_DEFAULT_VIEW_WIDTH, DFBROWSER_DEFAULT_VIEW_HEIGHT));
   myPropertyPanelWidget->setObjectName (myPropertyPanelWidget->windowTitle());
   myPropertyPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
   myPropertyPanelWidget->setWidget (myPropertyView->GetControl());
+  updatePropertyPanelWidget();
   myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myPropertyPanelWidget);
-#endif
 
   // dump view window
   QWidget* aDumpWidget = new QWidget(myMainWindow);
@@ -204,14 +211,10 @@ DFBrowser_Window::DFBrowser_Window()
   myViewWindow->Displayer()->SetAttributeColor (Quantity_Color(aHColor.red() / 255., aHColor.green() / 255.,
                                                 aHColor.blue() / 255., Quantity_TOC_sRGB), View_PresentationType_Additional);
 
-  myMainWindow->splitDockWidget (aPropertyPanelWidget, aViewDockWidget, Qt::Vertical);
+  myMainWindow->splitDockWidget (myPropertyPanelWidget, aViewDockWidget, Qt::Vertical);
+  myMainWindow->tabifyDockWidget (myPropertyPanelWidget, aPropertyPanelWidget);
 
-#ifdef USE_DUMPJSON
-  myMainWindow->tabifyDockWidget (aDumpDockWidget, myPropertyPanelWidget);
-  myMainWindow->tabifyDockWidget (myPropertyPanelWidget, aViewDockWidget);
-#else
   myMainWindow->tabifyDockWidget (aDumpDockWidget, aViewDockWidget);
-#endif
 
   myTreeView->resize (DFBROWSER_DEFAULT_TREE_VIEW_WIDTH, DFBROWSER_DEFAULT_TREE_VIEW_HEIGHT);
 
@@ -641,6 +644,24 @@ TCollection_AsciiString DFBrowser_Window::TmpDirectory()
   return aTmpDir;
 }
 
+// =======================================================================
+// function : SetUseDumpJson
+// purpose :
+// =======================================================================
+void DFBrowser_Window::SetUseDumpJson (const Standard_Boolean theValue)
+{
+  MyIsUseDumpJson = theValue;
+}
+
+// =======================================================================
+// function : IsUseDumpJson
+// purpose :
+// =======================================================================
+Standard_Boolean DFBrowser_Window::IsUseDumpJson()
+{
+  return MyIsUseDumpJson;
+}
+
 // =======================================================================
 // function : onTreeViewContextMenuRequested
 // purpose :
@@ -652,6 +673,12 @@ void DFBrowser_Window::onTreeViewContextMenuRequested (const QPoint& thePosition
   aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Expand All"), SLOT (onExpandAll()), GetMainWindow(), this));
   aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Collapse All"), SLOT (onCollapseAll()), GetMainWindow(), this));
 
+  aMenu->addSeparator();
+  QAction* aUseDumpJsonAction = ViewControl_Tools::CreateAction (tr ("Use DumpJson"), SLOT (onUseDumpJson()), GetMainWindow(), this);
+  aUseDumpJsonAction->setCheckable(true);
+  aUseDumpJsonAction->setChecked (IsUseDumpJson());
+  aMenu->addAction (aUseDumpJsonAction);
+
   QPoint aPoint = myTreeView->mapToGlobal (thePosition);
   aMenu->exec (aPoint);
 }
@@ -706,6 +733,20 @@ void DFBrowser_Window::onCollapseAll()
   }
 }
 
+// =======================================================================
+// function : onUseDumpJson
+// purpose :
+// =======================================================================
+void DFBrowser_Window::onUseDumpJson()
+{
+  SetUseDumpJson(!IsUseDumpJson());
+  updatePropertyPanelWidget();
+
+  QApplication::setOverrideCursor (Qt::WaitCursor);
+  myModule->UpdateTreeModel();
+  QApplication::restoreOverrideCursor();
+}
+
 // =======================================================================
 // function : onTreeViewSelectionChanged
 // purpose :
@@ -716,10 +757,10 @@ void DFBrowser_Window::onTreeViewSelectionChanged (const QItemSelection& theSele
   if (!myModule)
     return;
 
-#ifdef USE_DUMPJSON
-  if (myPropertyPanelWidget->toggleViewAction()->isChecked())
-    myPropertyView->Init (ViewControl_Tools::CreateTableModelValues (myTreeView->selectionModel()));
-#endif
+  if (IsUseDumpJson() && myPropertyPanelWidget->toggleViewAction()->isChecked())
+  {
+      myPropertyView->Init (ViewControl_Tools::CreateTableModelValues (myTreeView->selectionModel()));
+  }
 
   // previuos selection should be cleared in the panel selectors
   DFBrowser_AttributePaneStack* anAttributePaneStack = myPropertyPanel->GetAttributesStack();
@@ -1004,3 +1045,15 @@ void DFBrowser_Window::findPresentations (const QModelIndexList& theIndices, AIS
     thePresentations.Append (aPresentation);
   }
 }
+
+// =======================================================================
+// function : updatePropertyPanelWidget
+// purpose :
+// =======================================================================
+void DFBrowser_Window::updatePropertyPanelWidget()
+{
+  bool aUseDumpJson = IsUseDumpJson();
+
+  myUseDumpJson->setVisible (!aUseDumpJson);
+  myPropertyPanelWidget->setWidget (aUseDumpJson ? myPropertyView->GetControl() : myUseDumpJson);
+}
index bec443556334a9791813b169b9b57e6401502e30..eb4459e1054e346a87944c1c6f490e6649da400b 100644 (file)
@@ -118,6 +118,12 @@ public:
   //! \return string value
   Standard_EXPORT static TCollection_AsciiString TmpDirectory();
 
+  //! Sets whether DumpJson is used when the tree view is generated
+  Standard_EXPORT static void SetUseDumpJson(const Standard_Boolean theValue);
+
+  //! Returns whether DumpJson is used when the tree view is generated
+  Standard_EXPORT static Standard_Boolean IsUseDumpJson();
+
 private slots:
 
   //! Cleans history in tree level line, clears cache of thread processing, starts threads for application
@@ -136,6 +142,9 @@ private slots:
   //! Collapses all levels for all selected items
   void onCollapseAll();
 
+  //! Setting flag whether DumpJSon should be applied to build tree model items structure 
+  void onUseDumpJson();
+
   //! Updates all controls by changed selection in OCAF tree view
   //! \param theSelected list of selected tree view items
   //! \param theDeselected list of deselected tree view items
@@ -208,6 +217,9 @@ protected:
   //! \return container of presentations or NULL
   void findPresentations (const QModelIndexList& theIndices, AIS_ListOfInteractive& thePresentations);
 
+  //! Updates content of Property Panel dock widget. It contains button to activate DumpJson or view with content of it.
+  void updatePropertyPanelWidget();
+
 private:
 
   DFBrowser_Module* myModule; //!< current module
@@ -216,6 +228,7 @@ private:
   DFBrowser_TreeLevelLine* myTreeLevelLine; //!< navigate line of tree levels to the selected item
   QTreeView* myTreeView; //!< OCAF tree view
   QDockWidget* myPropertyPanelWidget; //!< property pane dockable widget
+  QWidget* myUseDumpJson; //!< button to activate/deactivate using of DumpJson
   DFBrowser_PropertyPanel* myPropertyPanel; //!< property panel shows full information about attribute or search view
   ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist
   View_Window* myViewWindow; //!< V3d view to visualize presentations/references if it can be build for a selected item
index 872a590ac5ed69e4ab74df5d84f4b4594ae208d3..800bc5759f53946adba6bf47640febb602d8c4a7 100644 (file)
 #include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
 
 #include <TDF_Attribute.hxx>
-
 #include <TDF_Reference.hxx>
 
-// the types are defined in TDF library
-#include <inspector/DFBrowserPane_TDFReference.hxx>
-#include <inspector/DFBrowserPane_TDFTagSource.hxx>
-
-#include <TDataStd_Current.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDataStd_Comment.hxx>
-#include <TDataStd_Integer.hxx>
-#include <TDataStd_IntegerArray.hxx>
-#include <TDataStd_Real.hxx>
-#include <TDataStd_RealArray.hxx>
-#include <TDataStd_ExtStringArray.hxx>
-#include <TDataStd_UAttribute.hxx>
 #include <TDataStd_TreeNode.hxx>
-#include <TDataStd_Directory.hxx>
-#include <TDataStd_NoteBook.hxx>
-#include <TDataStd_Expression.hxx>
-#include <TDataStd_Relation.hxx>
-#include <TDataStd_Variable.hxx>
-#include <TDataStd_Tick.hxx>
-#include <TDataStd_AsciiString.hxx>
-#include <TDataStd_IntPackedMap.hxx>
-#include <TDataStd_IntegerList.hxx>
-#include <TDataStd_RealList.hxx>
-#include <TDataStd_ExtStringList.hxx>
-#include <TDataStd_BooleanList.hxx>
 #include <TDataStd_ReferenceList.hxx>
-#include <TDataStd_BooleanArray.hxx>
 #include <TDataStd_ReferenceArray.hxx>
-#include <TDataStd_ByteArray.hxx>
-#include <TDataStd_NamedData.hxx>
-
-#include <TDocStd_Modified.hxx>
-#include <TDocStd_Owner.hxx>
-#include <TDocStd_XLink.hxx>
-#include <TDocStd_XLinkRoot.hxx>
-#include <TPrsStd_AISViewer.hxx>
-#include <TPrsStd_AISPresentation.hxx>
 
 #include <TNaming_NamedShape.hxx>
 #include <TNaming_Naming.hxx>
 #include <TNaming_UsedShapes.hxx>
 
-#include <TFunction_Function.hxx>
-#include <TFunction_GraphNode.hxx>
-#include <TFunction_Scope.hxx>
-
-// the types are defined in TDataStd.cdl
-// Basic  attributes
-#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
-#include <inspector/DFBrowserPane_TDataStdName.hxx>
-#include <inspector/DFBrowserPane_TDataStdComment.hxx>
-#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
-#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
-#include <inspector/DFBrowserPane_TDataStdReal.hxx>
-#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
-#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
-#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
-
-#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
-#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
-#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
-#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
-#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
-#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
-
-//Extension
-#include <inspector/DFBrowserPane_TDataStdTick.hxx>
-#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
-#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
-// Lists:
-#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
-#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
-#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
-#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
+#include <inspector/DFBrowserPane_TDFReference.hxx>
 #include <inspector/DFBrowserPane_TDataStdReferenceList.hxx>
-
-// Arrays:
-#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
 #include <inspector/DFBrowserPane_TDataStdReferenceArray.hxx>
-#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
-#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
-
-// TDocStd attributes
-#include <inspector/DFBrowserPane_TDocStdModified.hxx>
-#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
-#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
-#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
-
-// TPrsStd attributes
-#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
-#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
-
-// TNaming attributes
+#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
 #include <inspector/DFBrowserPane_TNamingNamedShape.hxx>
 #include <inspector/DFBrowserPane_TNamingNaming.hxx>
 #include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
 
-// TFunction attributes
-#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
-#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
-#include <inspector/DFBrowserPane_TFunctionScope.hxx>
-
 // =======================================================================
 // function : Constructor
 // purpose :
@@ -131,86 +43,18 @@ DFBrowserPane_AttributePaneAPI* DFBrowserPane_AttributePaneCreator::CreateAttrib
   DFBrowserPane_AttributePaneAPI* aPane = 0;
   if (theAttributeName == STANDARD_TYPE (TDF_Reference)->Name())
     aPane = new DFBrowserPane_TDFReference();
-  else if (theAttributeName == STANDARD_TYPE (TDF_TagSource)->Name())
-    aPane = new DFBrowserPane_TDFTagSource();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Current)->Name()) // Basic  attributes
-    aPane = new DFBrowserPane_TDataStdCurrent();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Name)->Name())
-    aPane = new DFBrowserPane_TDataStdName();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Comment)->Name())
-    aPane = new DFBrowserPane_TDataStdComment();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Integer)->Name())
-    aPane = new DFBrowserPane_TDataStdInteger();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_IntegerArray)->Name())
-    aPane = new DFBrowserPane_TDataStdIntegerArray();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Real)->Name())
-    aPane = new DFBrowserPane_TDataStdReal();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_RealArray)->Name())
-    aPane = new DFBrowserPane_TDataStdRealArray();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_ExtStringArray)->Name())
-    aPane = new DFBrowserPane_TDataStdExtStringArray();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_UAttribute)->Name())
-    aPane = new DFBrowserPane_TDataStdUAttribute();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_TreeNode)->Name()) // Attributes for organization
+  else if (theAttributeName == STANDARD_TYPE (TDataStd_TreeNode)->Name())
     aPane = new DFBrowserPane_TDataStdTreeNode();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Directory)->Name())
-    aPane = new DFBrowserPane_TDataStdDirectory();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_NoteBook)->Name()) // Other attributes
-    aPane = new DFBrowserPane_TDataStdNoteBook();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Expression)->Name())
-    aPane = new DFBrowserPane_TDataStdExpression();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Relation)->Name())
-    aPane = new DFBrowserPane_TDataStdRelation();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Variable)->Name())
-    aPane = new DFBrowserPane_TDataStdVariable();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_Tick)->Name()) //Extension
-    aPane = new DFBrowserPane_TDataStdTick();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_AsciiString)->Name())
-    aPane = new DFBrowserPane_TDataStdAsciiString();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_IntPackedMap)->Name())
-    aPane = new DFBrowserPane_TDataStdIntPackedMap();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_IntegerList)->Name()) // Lists
-    aPane = new DFBrowserPane_TDataStdIntegerList();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_RealList)->Name())
-    aPane = new DFBrowserPane_TDataStdRealList();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_ExtStringList)->Name())
-    aPane = new DFBrowserPane_TDataStdExtStringList();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_BooleanList)->Name())
-    aPane = new DFBrowserPane_TDataStdBooleanList();
   else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceList)->Name())
     aPane = new DFBrowserPane_TDataStdReferenceList();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_BooleanArray)->Name()) // Arrays:
-    aPane = new DFBrowserPane_TDataStdBooleanArray();
   else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceArray)->Name())
     aPane = new DFBrowserPane_TDataStdReferenceArray();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_ByteArray)->Name())
-    aPane = new DFBrowserPane_TDataStdByteArray();
-  else if (theAttributeName == STANDARD_TYPE (TDataStd_NamedData)->Name())
-    aPane = new DFBrowserPane_TDataStdNamedData();
-  else if (theAttributeName == STANDARD_TYPE (TDocStd_Modified)->Name()) // TDocStd attributes
-    aPane = new DFBrowserPane_TDocStdModified();
-  else if (theAttributeName == STANDARD_TYPE (TDocStd_Owner)->Name())
-    aPane = new DFBrowserPane_TDocStdOwner();
-  else if (theAttributeName == STANDARD_TYPE (TDocStd_XLink)->Name())
-    aPane = new DFBrowserPane_TDocStdXLink();
-  else if (theAttributeName == STANDARD_TYPE (TDocStd_XLinkRoot)->Name())
-    aPane = new DFBrowserPane_TDocStdXLinkRoot();
-  else if (theAttributeName == STANDARD_TYPE (TPrsStd_AISViewer)->Name()) // TPrsStd attributes
-    aPane = new DFBrowserPane_TPrsStdAISViewer();
-  else if (theAttributeName == STANDARD_TYPE (TPrsStd_AISPresentation)->Name())
-    aPane = new DFBrowserPane_TPrsStdAISPresentation();
-  else if (theAttributeName == STANDARD_TYPE (TNaming_NamedShape)->Name()) // TNaming attributes
+  else if (theAttributeName == STANDARD_TYPE (TNaming_NamedShape)->Name())
     aPane = new DFBrowserPane_TNamingNamedShape();
   else if (theAttributeName == STANDARD_TYPE (TNaming_Naming)->Name())
     aPane = new DFBrowserPane_TNamingNaming();
   else if (theAttributeName == STANDARD_TYPE (TNaming_UsedShapes)->Name())
     aPane = new DFBrowserPane_TNamingUsedShapes();
-  else if (theAttributeName == STANDARD_TYPE (TFunction_Function)->Name()) // TFunction attributes
-    aPane = new DFBrowserPane_TFunctionFunction();
-  else if (theAttributeName == STANDARD_TYPE (TFunction_GraphNode)->Name())
-    aPane = new DFBrowserPane_TFunctionGraphNode();
-  else if (theAttributeName == STANDARD_TYPE (TFunction_Scope)->Name())
-    aPane = new DFBrowserPane_TFunctionScope();
 
   return aPane;
 }
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx
deleted file mode 100644 (file)
index fa0d1a1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDFTagSource.hxx>
-
-#include <TDF_TagSource.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDFTagSource::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDF_TagSource) anAttribute = Handle(TDF_TagSource)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append ("Get");
-  theValues.append (anAttribute->Get());
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx
deleted file mode 100644 (file)
index ec23701..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDFTagSource_H
-#define DFBrowserPane_TDFTagSource_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDFTagSource
-//! \brief The class to manipulate of TDF_TagSource attribute
-class DFBrowserPane_TDFTagSource : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDFTagSource() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDFTagSource() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx
deleted file mode 100644 (file)
index 991f9fb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
-
-#include <TDataStd_AsciiString.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QIcon>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdAsciiString::GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                                   QList<QVariant>& theValues)
-{
-  Handle(TDataStd_AsciiString) anAttribute = Handle(TDataStd_AsciiString)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append ("Get");
-  theValues.append (anAttribute->Get().ToCString());
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx
deleted file mode 100644 (file)
index f254fb5..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdAsciiString_H
-#define DFBrowserPane_TDataStdAsciiString_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdAsciiString
-//! \brief The class to manipulate of TDataStd_AsciiString attribute
-class DFBrowserPane_TDataStdAsciiString : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdAsciiString() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdAsciiString() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx
deleted file mode 100644 (file)
index 3e6e49d..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <TDataStd_BooleanArray.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QGridLayout>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdBooleanArray::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-
-  myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdBooleanArray::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdBooleanArray::GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                                    QList<QVariant>& theValues)
-{
-  Handle(TDataStd_BooleanArray) anAttribute = Handle(TDataStd_BooleanArray)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append (anAttribute->Lower());
-  theValues.append (anAttribute->Upper());
-  for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
-    theValues.append (anAttribute->Value (aValueId));
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdBooleanArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                                QList<QVariant>& theValues)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-  return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx
deleted file mode 100644 (file)
index 12b3915..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdBooleanArray_H
-#define DFBrowserPane_TDataStdBooleanArray_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdBooleanArray
-//! \brief The class to manipulate of TDataStd_BooleanArray attribute
-class DFBrowserPane_TDataStdBooleanArray : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdBooleanArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPane_TDataStdBooleanArray() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Calls Init of array table helper
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns short attribute information using array table helper
-  //! \param theAttribute a current attribute
-  //! \param theValues container of output values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx
deleted file mode 100644 (file)
index 57006af..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
-
-#include <TDataStd_BooleanList.hxx>
-#include <TDataStd_ListIteratorOfListOfByte.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdBooleanList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_BooleanList) anAttribute = Handle(TDataStd_BooleanList)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  for (TDataStd_ListIteratorOfListOfByte aBoolListIt (anAttribute->List()); aBoolListIt.More(); aBoolListIt.Next())
-  {
-    theValues.append ("Value");
-    theValues.append (aBoolListIt.Value());
-  }
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx
deleted file mode 100644 (file)
index 976660f..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdBooleanList_H
-#define DFBrowserPane_TDataStdBooleanList_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdBooleanList
-//! \brief The class to manipulate of TDataStd_BooleanList attribute
-class DFBrowserPane_TDataStdBooleanList : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdBooleanList() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdBooleanList() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx
deleted file mode 100644 (file)
index e442a07..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <TDataStd_ByteArray.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdByteArray::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-
-  myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdByteArray::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdByteArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_ByteArray) anAttribute = Handle(TDataStd_ByteArray)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append (anAttribute->Lower());
-  theValues.append (anAttribute->Upper());
-  for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
-    theValues.append (anAttribute->Value (aValueId));
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdByteArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                             QList<QVariant>& theValues)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-  return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx
deleted file mode 100644 (file)
index ff2c995..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdByteArray_H
-#define DFBrowserPane_TDataStdByteArray_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdByteArray
-//! \brief The class to manipulate of TDataStd_ByteArra attribute
-class DFBrowserPane_TDataStdByteArray : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdByteArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPane_TDataStdByteArray() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Calls Init of array table helper
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns short attribute information using array table helper
-  //! \param theAttribute a current attribute
-  //! \param theValues container of output values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx
deleted file mode 100644 (file)
index 74cc65d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdComment.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_Comment.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdComment::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Comment) anAttribute = Handle(TDataStd_Comment)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append ("Get");
-  theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Get()));
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx
deleted file mode 100644 (file)
index 94bce61..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdComment_H
-#define DFBrowserPane_TDataStdComment_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdComment
-//! \brief The class to manipulate of TDataStd_Comment attribute
-class DFBrowserPane_TDataStdComment : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdComment() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdComment() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx
deleted file mode 100644 (file)
index 94b3b79..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_Current.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdCurrent::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Current) anAttribute = Handle(TDataStd_Current)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append ("GetLabel");
-  theValues.append (DFBrowserPane_Tools::GetEntry (anAttribute->GetLabel()).ToCString());
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx
deleted file mode 100644 (file)
index e545148..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdCurrent_H
-#define DFBrowserPane_TDataStdCurrent_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdCurrent
-//! \brief The class to manipulate of TDataStd_Current attribute
-class DFBrowserPane_TDataStdCurrent : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdCurrent() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdCurrent() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx
deleted file mode 100644 (file)
index 248a592..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
-
-#include <TDataStd_Directory.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdDirectory::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx
deleted file mode 100644 (file)
index d91fe71..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdDirectory_H
-#define DFBrowserPane_TDataStdDirectory_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdDirectory
-//! \brief The class to manipulate of TDataStd_Directory attribute
-class DFBrowserPane_TDataStdDirectory : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdDirectory() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdDirectory() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx
deleted file mode 100644 (file)
index bea27d3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_Expression.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdExpression::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Expression) anAttribute = Handle(TDataStd_Expression)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append ("GetExpression");
-  theValues.append (DFBrowserPane_Tools::ToString (anAttribute->GetExpression()));
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx
deleted file mode 100644 (file)
index dc0afb8..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdExpression_H
-#define DFBrowserPane_TDataStdExpression_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdExpression
-//! \brief The class to manipulate of TDataStd_Expression attribute
-class DFBrowserPane_TDataStdExpression : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdExpression() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdExpression() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx
deleted file mode 100644 (file)
index 5bae000..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <TDataStd_ExtStringArray.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdExtStringArray::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-
-  myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdExtStringArray::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdExtStringArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_ExtStringArray) anAttribute = Handle(TDataStd_ExtStringArray)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append (anAttribute->Lower());
-  theValues.append (anAttribute->Upper());
-  for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
-    theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Value(aValueId)));
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdExtStringArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                                 QList<QVariant>& theValues)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-  return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx
deleted file mode 100644 (file)
index ad18e5b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdExtStringArray_H
-#define DFBrowserPane_TDataStdExtStringArray_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdExtStringArray
-//! \brief The class to manipulate of TDataStd_ExtStringArray attribute
-class DFBrowserPane_TDataStdExtStringArray : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdExtStringArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPane_TDataStdExtStringArray() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Calls Init of array table helper
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns short attribute information using array table helper
-  //! \param theAttribute a current attribute
-  //! \param theValues container of output values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx
deleted file mode 100644 (file)
index 7d652c0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_ExtStringList.hxx>
-#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdExtStringList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_ExtStringList) anAttribute = Handle(TDataStd_ExtStringList)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  for (TDataStd_ListIteratorOfListOfExtendedString aValuesIt(anAttribute->List()); aValuesIt.More(); aValuesIt.Next())
-  {
-    theValues.append ("Value");
-    theValues.append (DFBrowserPane_Tools::ToString (aValuesIt.Value()));
-  }
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx
deleted file mode 100644 (file)
index 64f81f2..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdExtStringList_H
-#define DFBrowserPane_TDataStdExtStringList_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdExtStringList
-//! \brief The class to manipulate of TDataStd_ExtStringList attribute
-class DFBrowserPane_TDataStdExtStringList : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdExtStringList() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdExtStringList() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx
deleted file mode 100644 (file)
index 2b2381e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
-
-#include <TDataStd_IntPackedMap.hxx>
-#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdIntPackedMap::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_IntPackedMap) anAttribute = Handle(TDataStd_IntPackedMap)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  int anIndexInMap = 0;
-  for (TColStd_MapIteratorOfPackedMapOfInteger aValueIt(anAttribute->GetMap()); aValueIt.More(); aValueIt.Next(), anIndexInMap++)
-  {
-    theValues.append (QString ("GetMap [%1]").arg(anIndexInMap));
-    theValues.append (aValueIt.Key());
-  }
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx
deleted file mode 100644 (file)
index 03fad8c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdIntPackedMap_H
-#define DFBrowserPane_TDataStdIntPackedMap_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdIntPackedMap
-//! \brief The class to manipulate of TDataStd_IntPackedMap attribute
-class DFBrowserPane_TDataStdIntPackedMap : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdIntPackedMap() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdIntPackedMap() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx
deleted file mode 100644 (file)
index 18bbeb5..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
-
-#include <TDataStd_Integer.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdInteger::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Integer) anAttribute = Handle(TDataStd_Integer)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append ("Get");
-  theValues.append (anAttribute->Get());
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx
deleted file mode 100644 (file)
index 96a2aca..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdInteger_H
-#define DFBrowserPane_TDataStdInteger_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdInteger
-//! \brief The class to manipulate of TDataStd_Integer attribute
-class DFBrowserPane_TDataStdInteger : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdInteger() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdInteger() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx
deleted file mode 100644 (file)
index da404bf..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <TDataStd_IntegerArray.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdIntegerArray::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-
-  myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdIntegerArray::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdIntegerArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_IntegerArray) anAttribute = Handle(TDataStd_IntegerArray)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append (anAttribute->Lower());
-  theValues.append (anAttribute->Upper());
-  for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
-    theValues.append (anAttribute->Value(aValueId));
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdIntegerArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                                QList<QVariant>& theValues)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-  return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx
deleted file mode 100644 (file)
index 1e28774..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdIntegerArray_H
-#define DFBrowserPane_TDataStdIntegerArray_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdIntegerArray
-//! \brief The class to manipulate of TDataStd_IntegerArray attribute
-class DFBrowserPane_TDataStdIntegerArray : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdIntegerArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPane_TDataStdIntegerArray() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Calls Init of array table helper
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns short attribute information using array table helper
-  //! \param theAttribute a current attribute
-  //! \param theValues container of output values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx
deleted file mode 100644 (file)
index 06a3ec1..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
-
-#include <TDataStd_IntegerList.hxx>
-#include <TColStd_ListIteratorOfListOfInteger.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdIntegerList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_IntegerList) anAttribute = Handle(TDataStd_IntegerList)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  for (TColStd_ListIteratorOfListOfInteger aValuesIt (anAttribute->List()); aValuesIt.More(); aValuesIt.Next())
-  {
-    theValues.append ("Value");
-    theValues.append (aValuesIt.Value());
-  }
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx
deleted file mode 100644 (file)
index b916b12..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdIntegerList_H
-#define DFBrowserPane_TDataStdIntegerList_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdIntegerList
-//! \brief The class to manipulate of TDataStd_IntegerList attribute
-class DFBrowserPane_TDataStdIntegerList : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdIntegerList() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdIntegerList() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx
deleted file mode 100644 (file)
index 1f1a0d3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdName.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_Name.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdName::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Name) anAttribute = Handle(TDataStd_Name)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append ("Get");
-  theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Get()));
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx
deleted file mode 100644 (file)
index a1aa102..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdName_H
-#define DFBrowserPane_TDataStdName_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdName
-//! \brief The class to manipulate of TDataStd_Name attribute
-class DFBrowserPane_TDataStdName : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdName() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdName() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx
deleted file mode 100644 (file)
index 155147d..0000000
+++ /dev/null
@@ -1,242 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TColStd_DataMapOfStringInteger.hxx>
-#include <TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx>
-#include <TColStd_HArray1OfInteger.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-
-#include <TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx>
-#include <TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx>
-#include <TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx>
-#include <TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx>
-#include <TDataStd_DataMapIteratorOfDataMapOfStringString.hxx>
-#include <TDataStd_DataMapOfStringByte.hxx>
-#include <TDataStd_DataMapOfStringHArray1OfInteger.hxx>
-#include <TDataStd_DataMapOfStringReal.hxx>
-#include <TDataStd_DataMapOfStringString.hxx>
-#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
-#include <TDataStd_NamedData.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QTableView>
-#include <QTabWidget>
-#include <QVariant>
-#include <QVBoxLayout>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-static const QString VALUES_INTEGER =    "values_integer";
-static const QString VALUES_REAL =       "values_real";
-static const QString VALUES_STRING =     "values_string";
-static const QString VALUES_BYTE =       "values_byte";
-static const QString VALUES_INT_ARRAY =  "values_int_array";
-static const QString VALUES_REAL_ARRAY = "values_real_array";
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPane_TDataStdNamedData::DFBrowserPane_TDataStdNamedData()
- : DFBrowserPane_AttributePane(), myRealValues (0), myStringValues(0), myByteValues(0), myIntArrayValues(0),
- myRealArrayValues(0)
-{
-  myPaneModel = createPaneModel();
-  myRealValuesModel = createPaneModel();
-  myStringValuesModel = createPaneModel();
-  myByteValuesModel = createPaneModel();
-  myIntArrayValuesModel = createPaneModel();
-  myRealArrayModel = createPaneModel();
-}
-
-// =======================================================================
-// function : createPaneModel
-// purpose :
-// =======================================================================
-DFBrowserPane_AttributePaneModel* DFBrowserPane_TDataStdNamedData::createPaneModel()
-{
-  DFBrowserPane_AttributePaneModel* aTableModel = new DFBrowserPane_AttributePaneModel();
-  aTableModel->SetColumnCount (2);
-  aTableModel->SetItalicColumns (QList<int>());
-  return aTableModel;
-}
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdNamedData::CreateWidget (QWidget* theParent)
-{
-  QTabWidget* aMainWidget = new QTabWidget (theParent);
-  // gray text is visualized by default, better the black one (Qt4)
-  QPalette aPalette = aMainWidget->palette();
-  aPalette.setColor(QPalette::Foreground, Qt::black);
-  aMainWidget->setPalette (aPalette);
-
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-  aMainWidget->addTab (myTableView, "Integers");
-
-  myRealValues = new DFBrowserPane_TableView (aMainWidget);
-  myRealValues->SetModel (myRealValuesModel);
-  aMainWidget->addTab (myRealValues, "Reals");
-
-  myStringValues = new DFBrowserPane_TableView (aMainWidget);
-  myStringValues->SetModel (myStringValuesModel);
-  aMainWidget->addTab (myStringValues, "Strings");
-
-  myByteValues = new DFBrowserPane_TableView (aMainWidget);
-  myByteValues->SetModel (myByteValuesModel);
-  aMainWidget->addTab (myByteValues, "Bytes");
-
-  myIntArrayValues = new DFBrowserPane_TableView (aMainWidget);
-  myIntArrayValues->SetModel (myIntArrayValuesModel);
-  aMainWidget->addTab (myIntArrayValues, "ArraysOfIntegers");
-
-  myRealArrayValues = new DFBrowserPane_TableView (aMainWidget);
-  myRealArrayValues->SetModel (myRealArrayModel);
-  aMainWidget->addTab (myRealArrayValues, "ArraysOfReals");
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdNamedData::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-
-  getPaneModel()->Init (getPartOfValues (VALUES_INTEGER, VALUES_REAL, aValues));
-  if (myTableView)
-    myTableView->GetTableView()->resizeColumnToContents (0);
-  myRealValuesModel->Init (getPartOfValues (VALUES_REAL, VALUES_STRING, aValues));
-  if (myRealValues)
-    myRealValues->GetTableView()->resizeColumnToContents (0);
-  myStringValuesModel->Init (getPartOfValues (VALUES_STRING, VALUES_BYTE, aValues));
-  if (myStringValues)
-    myStringValues->GetTableView()->resizeColumnToContents (0);
-  myByteValuesModel->Init (getPartOfValues (VALUES_BYTE, VALUES_INT_ARRAY, aValues));
-  if (myByteValues)
-    myByteValues->GetTableView()->resizeColumnToContents (0);
-  myIntArrayValuesModel->Init (getPartOfValues (VALUES_INT_ARRAY, VALUES_REAL_ARRAY, aValues));
-  if (myIntArrayValues)
-    myIntArrayValues->GetTableView()->resizeColumnToContents (0);
-  myRealArrayModel->Init (getPartOfValues (VALUES_REAL_ARRAY, "", aValues));
-  if (myRealArrayValues)
-    myRealArrayValues->GetTableView()->resizeColumnToContents (0);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdNamedData::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_NamedData) anAttribute = Handle(TDataStd_NamedData)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append (VALUES_INTEGER);
-  for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIntIter(anAttribute->GetIntegersContainer());
-       anIntIter.More(); anIntIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (anIntIter.Key()));
-    theValues.append (anIntIter.Value());
-  }
-  theValues.append (VALUES_REAL);
-  for (TDataStd_DataMapIteratorOfDataMapOfStringReal aRealIter(anAttribute->GetRealsContainer());
-       aRealIter.More(); aRealIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (aRealIter.Key()));
-    theValues.append (aRealIter.Value());
-  }
-  theValues.append (VALUES_STRING);
-  for (TDataStd_DataMapIteratorOfDataMapOfStringString aStrIter(anAttribute->GetStringsContainer());
-       aStrIter.More(); aStrIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (aStrIter.Key()));
-    theValues.append (DFBrowserPane_Tools::ToString (aStrIter.Value()));
-  }
-  theValues.append (VALUES_BYTE);
-  for (TDataStd_DataMapIteratorOfDataMapOfStringByte aByteIter(anAttribute->GetBytesContainer());
-       aByteIter.More(); aByteIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (aByteIter.Key()));
-    theValues.append (aByteIter.Value());
-  }
-  theValues.append (VALUES_INT_ARRAY);
-  QStringList anArrayValues;
-  for (TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger anIntArrayIter(anAttribute->GetArraysOfIntegersContainer());
-       anIntArrayIter.More(); anIntArrayIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (anIntArrayIter.Key()));
-    anArrayValues.clear();
-    const Handle(TColStd_HArray1OfInteger)& aSubIt = anIntArrayIter.Value();
-    if (!aSubIt.IsNull())
-    {
-      for (Standard_Integer aLowerId = aSubIt->Lower(), i = aLowerId, anUpperId = aSubIt->Upper(); i <= anUpperId; i++)
-        anArrayValues.append (QString::number (aSubIt->Value (i)));
-    }
-    theValues.append (anArrayValues.join (QString (',')));
-  }
-  theValues.append (VALUES_REAL_ARRAY);
-  for (TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal aRealArrayIter (anAttribute->GetArraysOfRealsContainer());
-       aRealArrayIter.More(); aRealArrayIter.Next())
-  {
-    theValues.append (DFBrowserPane_Tools::ToString (aRealArrayIter.Key()));
-    anArrayValues.clear();
-    const Handle(TColStd_HArray1OfReal)& aSubIt = aRealArrayIter.Value();
-    if (!aSubIt.IsNull())
-    {
-      for (Standard_Integer aLowerId = aSubIt->Lower(), i = aLowerId, anUpperId = aSubIt->Upper(); i <= anUpperId; i++)
-        anArrayValues.append (QString::number (aSubIt->Value (i)));
-    }
-    theValues.append (anArrayValues.join (QString (',')));
-  }
-}
-
-// =======================================================================
-// function : getPartOfValues
-// purpose :
-// =======================================================================
-QList<QVariant> DFBrowserPane_TDataStdNamedData::getPartOfValues (const QString& theKey1, const QString& theKey2,
-                                                                  const QList<QVariant>& theValues) const
-{
-  QList<QVariant> aValues;
-
-  bool aFoundKey1 = false, aFoundKey2 = false;
-  for (int aValueId = 0; aValueId < theValues.size() && !aFoundKey2; aValueId++)
-  {
-    QString aValue = theValues[aValueId].toString();
-    if (!aFoundKey1)
-      aFoundKey1 = aValue == theKey1;
-    else
-    {
-      aFoundKey2 = aValue == theKey2;
-      if (!aFoundKey2)
-        aValues.append (aValue);
-    }
-  }
-  return aValues;
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx
deleted file mode 100644 (file)
index 1e8516a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdNamedData_H
-#define DFBrowserPane_TDataStdNamedData_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-class DFBrowserPane_AttributePaneModel;
-class DFBrowserPane_TableView;
-
-//! \class DFBrowserPane_TDataStdNamedData
-//! \brief The class to manipulate of TDataStd_NamedData attribute
-//! This pane contains six pair of table views, where values of this data container presented
-//! The first table in pair presents size of a separate data container, the second presents values
-//! Each control for data container is grouped in a checkable group box to switch off/on using of a container.
-class DFBrowserPane_TDataStdNamedData : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdNamedData();
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdNamedData() {}
-
-  //! Creates a new widget that contains containers for attribute values
-  //! \param theParent a parent widget
-  //! \return pane widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Gets values of attribute using GetValues(), after fill tables if the pane with the values and Init the view model
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model. The values are separated by an auxiliary key for getPartOfValues
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  //! Obtains sub container of a general values container for given keys to fill tables for this kind
-  //! \param theKey1 a key where values are started
-  //! \param theKey2 a key before that the values are got
-  //! \param theValues a full container of values for the current attribute
-  //! \returns sub container
-  QList<QVariant> getPartOfValues (const QString& theKey1, const QString& theKey2,
-                                   const QList<QVariant>& theValues) const;
-
-  //! Creates a model with two columns: "Name" to "Value". The orientation is horizontal
-  DFBrowserPane_AttributePaneModel* createPaneModel();
-
-private:
-  //! myPaneMode and myTableView are used for int values
-
-  DFBrowserPane_AttributePaneModel* myRealValuesModel; //!< real values model
-  DFBrowserPane_TableView* myRealValues; //!< values table view
-
-  DFBrowserPane_AttributePaneModel* myStringValuesModel; //!< string values model
-  DFBrowserPane_TableView* myStringValues; //!< values table view
-
-  DFBrowserPane_AttributePaneModel* myByteValuesModel; //!< byte values model
-  DFBrowserPane_TableView* myByteValues; //!< values table view
-
-  DFBrowserPane_AttributePaneModel* myIntArrayValuesModel; //!< int array values model
-  DFBrowserPane_TableView* myIntArrayValues; //!< values table view
-
-  DFBrowserPane_AttributePaneModel* myRealArrayModel; //!< real array values model
-  DFBrowserPane_TableView* myRealArrayValues; //!< values table view
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx
deleted file mode 100644 (file)
index d8aab88..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
-
-#include <TDataStd_NoteBook.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdNoteBook::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx
deleted file mode 100644 (file)
index 501d0e3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdNoteBook_H
-#define DFBrowserPane_TDataStdNoteBook_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdNoteBook
-//! \brief The class to manipulate of TDataStd_NoteBook attribute
-class DFBrowserPane_TDataStdNoteBook : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdNoteBook() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdNoteBook() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx
deleted file mode 100644 (file)
index 27f4b82..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdReal.hxx>
-
-#include <TDataStd_Real.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdReal::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_Real) anAttribute = Handle(TDataStd_Real)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  theValues.append ("Get");
-  theValues.append (anAttribute->Get());
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx
deleted file mode 100644 (file)
index 7019b0d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdReal_H
-#define DFBrowserPane_TDataStdReal_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdReal
-//! \brief The class to manipulate of TDataStd_Real attribute
-class DFBrowserPane_TDataStdReal : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdReal() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdReal() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx
deleted file mode 100644 (file)
index 1a00c23..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-
-#include <TDataStd_RealArray.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPane_TDataStdRealArray::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (getPaneModel());
-
-  myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdRealArray::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdRealArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_RealArray) anAttribute = Handle(TDataStd_RealArray)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append (anAttribute->Lower());
-  theValues.append (anAttribute->Upper());
-  for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
-    theValues.append (anAttribute->Value(aValueId));
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdRealArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                             QList<QVariant>& theValues)
-{
-  QList<QVariant> aValues;
-  GetValues (theAttribute, aValues);
-  myArrayTableHelper.Init (aValues);
-  return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx
deleted file mode 100644 (file)
index 02d9b5c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdRealArray_H
-#define DFBrowserPane_TDataStdRealArray_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperArray.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdRealArray
-//! \brief The class to manipulate of TDataStd_RealArray attribute
-class DFBrowserPane_TDataStdRealArray : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDataStdRealArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPane_TDataStdRealArray() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Calls Init of array table helper
-  //! \param theAttribute a current attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns short attribute information using array table helper
-  //! \param theAttribute a current attribute
-  //! \param theValues container of output values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx
deleted file mode 100644 (file)
index eeed59b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
-
-#include <TColStd_ListIteratorOfListOfReal.hxx>
-#include <TDataStd_RealList.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdRealList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_RealList) anAttribute = Handle(TDataStd_RealList)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  for (TColStd_ListIteratorOfListOfReal aRealListIt(anAttribute->List()); aRealListIt.More(); aRealListIt.Next())
-  {
-    theValues.append ("Value");
-    theValues.append (aRealListIt.Value());
-  }
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx
deleted file mode 100644 (file)
index cce96e2..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdRealList_H
-#define DFBrowserPane_TDataStdRealList_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdRealList
-//! \brief The class to manipulate of TDataStd_RealList attribute
-class DFBrowserPane_TDataStdRealList : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdRealList() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdRealList() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx
deleted file mode 100644 (file)
index d963d5d..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
-
-#include <TDataStd_Relation.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdRelation::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx
deleted file mode 100644 (file)
index 4d81123..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdRelation_H
-#define DFBrowserPane_TDataStdRelation_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdRelation
-//! \brief The class to manipulate of TDataStd_Relation attribute
-class DFBrowserPane_TDataStdRelation : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdRelation() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdRelation() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx
deleted file mode 100644 (file)
index 075051e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdTick.hxx>
-
-#include <TDataStd_Tick.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdTick::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx
deleted file mode 100644 (file)
index 4b07cc6..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdTick_H
-#define DFBrowserPane_TDataStdTick_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdTick
-//! \brief The class to manipulate of TDataStd_Tick attribute
-class DFBrowserPane_TDataStdTick : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdTick() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdTick() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
index 4f8a4847f0dabca1173e63ebad4041ef783c60a6..0d6b98f12fa9cb65aa094ea319b1c1256f3c7c47 100644 (file)
@@ -37,7 +37,7 @@ DFBrowserPane_TDataStdTreeNodeModel::DFBrowserPane_TDataStdTreeNodeModel (QObjec
 // =======================================================================
 void DFBrowserPane_TDataStdTreeNodeModel::InitColumns()
 {
-  SetHeaderItem (0, TreeModel_HeaderSection ("Name"));
+  setHeaderItem (0, TreeModel_HeaderSection ("Name"));
 }
 
 // =======================================================================
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx
deleted file mode 100644 (file)
index af4ada0..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDataStd_UAttribute.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdUAttribute::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDataStd_UAttribute) anAttribute = Handle(TDataStd_UAttribute)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  char aStr[256];
-  theAttribute->ID().ToCString(aStr);
-  TCollection_AsciiString aString(aStr);
-
-  theValues.append ("ID");
-  theValues.append (DFBrowserPane_Tools::ToString (aString));
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx
deleted file mode 100644 (file)
index a98fb4a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdUAttribute_H
-#define DFBrowserPane_TDataStdUAttribute_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdUAttribute
-//! \brief The class to manipulate of TDataStd_UAttribute attribute
-class DFBrowserPane_TDataStdUAttribute : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDataStdUAttribute() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdUAttribute() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx
deleted file mode 100644 (file)
index f711313..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
-
-#include <TDataStd_Variable.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDataStdVariable::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx
deleted file mode 100644 (file)
index 5bb6efa..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDataStdVariable_H
-#define DFBrowserPane_TDataStdVariable_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDataStdVariable
-//! \brief The class to manipulate of TDataStd_Variable attribute
-class DFBrowserPane_TDataStdVariable : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TDataStdVariable() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDataStdVariable() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx
deleted file mode 100644 (file)
index 3ef0e87..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDocStdModified.hxx>
-
-#include <TDocStd_Modified.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDocStdModified::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx
deleted file mode 100644 (file)
index 2f52c31..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDocStdModified_H
-#define DFBrowserPane_TDocStdModified_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDocStdModified
-//! \brief The class to manipulate of TDocStd_Modified attribute
-class DFBrowserPane_TDocStdModified : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDocStdModified() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDocStdModified() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx
deleted file mode 100644 (file)
index 88d57a7..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TDocStd_Document.hxx>
-#include <TDocStd_Owner.hxx>
-#include <TDF_Delta.hxx>
-#include <TDF_ListIteratorOfDeltaList.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QGridLayout>
-#include <QGroupBox>
-#include <QTableView>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPane_TDocStdOwner::DFBrowserPane_TDocStdOwner()
- : DFBrowserPane_AttributePane()
-{
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDocStdOwner::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDocStd_Owner) anAttribute = Handle(TDocStd_Owner)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  Handle(TDocStd_Document) aDocument = anAttribute->GetDocument();
-  if (aDocument.IsNull())
-    return;
-
-  TCollection_AsciiString aDocumentInfo = Standard_Dump::GetPointerInfo (aDocument).ToCString();
-  TColStd_SequenceOfExtendedString anExtensions;
-  aDocument->Extensions(anExtensions);
-  TCollection_AsciiString aSeparationStr = "---------------------------";
-  theValues << aSeparationStr.ToCString() << aSeparationStr.ToCString()
-            << STANDARD_TYPE (CDM_Document)->Name() << aDocumentInfo.ToCString()
-            << aSeparationStr.ToCString() << aSeparationStr.ToCString()
-            << "StorageFormat" << DFBrowserPane_Tools::ToString (aDocument->StorageFormat())
-            << "Extensions" << convertToString (anExtensions)
-            << "FromReferencesNumber" << QString::number (aDocument->FromReferencesNumber())
-            << "ToReferencesNumber" << QString::number (aDocument->ToReferencesNumber())
-            << "IsReadOnly" << DFBrowserPane_Tools::BoolToStr (aDocument->IsReadOnly())
-            << "Modifications" << QString::number (aDocument->Modifications());
-
-  TColStd_SequenceOfExtendedString aComments;
-  aDocument->Extensions(aComments);
-  // if the document application is empty, Application() sents an exception, it is called in LoadResources() of:
-  // FindFileExtension, FindDescription and others, so we need the check for it
-  bool isDocumentOpened = aDocument->IsOpened();
-
-  // CDM_Document methods
-  theValues << "Comments" << convertToString (aComments)
-   //         << "Presentation" << DFBrowserPane_Tools::ToString (aDocument->Presentation())
-            << "IsStored" << DFBrowserPane_Tools::BoolToStr (aDocument->IsStored())
-            << "StorageVersion" << QString::number (aDocument->StorageVersion())
-            << "Folder" << (aDocument->IsStored() ? DFBrowserPane_Tools::ToString (aDocument->Folder()) : "")
-            << "HasRequestedFolder" << DFBrowserPane_Tools::BoolToStr (aDocument->HasRequestedFolder())
-            << "RequestedFolder" << (aDocument->HasRequestedFolder() ? DFBrowserPane_Tools::ToString (aDocument->RequestedFolder()) : "")
-            << "RequestedName" << DFBrowserPane_Tools::ToString (aDocument->RequestedName())
-            << "HasRequestedPreviousVersion" << DFBrowserPane_Tools::BoolToStr (aDocument->HasRequestedPreviousVersion())
-            << "RequestedPreviousVersion" << (aDocument->HasRequestedPreviousVersion() ?
-                                              DFBrowserPane_Tools::ToString (aDocument->RequestedPreviousVersion()) : "")
-            << "RequestedComment" << DFBrowserPane_Tools::ToString (aDocument->RequestedComment())
-            << "FindFileExtension" << (isDocumentOpened ? DFBrowserPane_Tools::BoolToStr (aDocument->FindFileExtension()) : "")
-            << "FileExtension" << (isDocumentOpened ? DFBrowserPane_Tools::ToString (aDocument->FileExtension()) : "")
-            << "FindDescription" << (isDocumentOpened ? DFBrowserPane_Tools::BoolToStr (aDocument->FindDescription()) : "")
-            << "Description" << (isDocumentOpened ? DFBrowserPane_Tools::ToString (aDocument->Description()) : "")
-            << "IsModified" << DFBrowserPane_Tools::BoolToStr (aDocument->IsModified())
-            << "IsOpened" << DFBrowserPane_Tools::BoolToStr (aDocument->IsOpened())
-            << "CanClose" << DFBrowserPane_Tools::ToName(DB_CDM_CAN_CLOSE_STATUS, aDocument->CanClose()).ToCString()
-            << "ReferenceCounter" << QString::number (aDocument->ReferenceCounter());
-
-  // TDocStd_Document methods
-  TCollection_AsciiString aDocumentDataInfo = !aDocument->GetData().IsNull()
-    ? Standard_Dump::GetPointerInfo (aDocument->GetData()).ToCString() : "";
-  theValues << aSeparationStr.ToCString() << aSeparationStr.ToCString()
-            << STANDARD_TYPE (TDocStd_Document)->Name() << ""
-            << aSeparationStr.ToCString() << aSeparationStr.ToCString()
-            << "IsSaved" << DFBrowserPane_Tools::BoolToStr (aDocument->IsSaved())
-            << "IsChanged" << DFBrowserPane_Tools::BoolToStr (aDocument->IsChanged())
-            << "GetSavedTime" << QString::number (aDocument->GetSavedTime())
-            << "GetName" << (aDocument->IsSaved() ? DFBrowserPane_Tools::ToString (aDocument->GetName()) : "")
-            << "GetPath" << (aDocument->IsSaved() ? DFBrowserPane_Tools::ToString (aDocument->GetPath()) : "")
-            << "GetData" << aDocumentDataInfo.ToCString()
-            << "Main" << DFBrowserPane_Tools::GetEntry (aDocument->Main()).ToCString()
-            << "IsEmpty" << DFBrowserPane_Tools::BoolToStr (aDocument->IsEmpty())
-            << "IsValid" << DFBrowserPane_Tools::BoolToStr (aDocument->IsValid())
-            << "HasOpenCommand" << DFBrowserPane_Tools::BoolToStr (aDocument->HasOpenCommand())
-            << "GetUndoLimit" << QString::number (aDocument->GetUndoLimit())
-            << "GetAvailableUndos" << QString::number (aDocument->GetAvailableUndos())
-            << "GetUndos" << convertToString (aDocument->GetUndos())
-            << "GetAvailableRedos" << QString::number (aDocument->GetAvailableRedos())
-            << "GetRedos" << convertToString (aDocument->GetRedos())
-            << "EmptyLabelsSavingMode" << DFBrowserPane_Tools::BoolToStr (aDocument->EmptyLabelsSavingMode())
-            << "IsNestedTransactionMode" << DFBrowserPane_Tools::BoolToStr (aDocument->IsNestedTransactionMode())
-            << "ModificationMode" << DFBrowserPane_Tools::BoolToStr (aDocument->ModificationMode());
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDocStdOwner::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                        QList<QVariant>& theValues)
-{
-  Handle(TDocStd_Owner) anAttribute = Handle(TDocStd_Owner)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-
-  Handle(TDocStd_Document) aDocument = anAttribute->GetDocument();
-  if (aDocument.IsNull())
-    return;
-
-  theValues.append (DFBrowserPane_Tools::ToString (aDocument->StorageFormat()));
-}
-
-// =======================================================================
-// function : convertToString
-// purpose :
-// =======================================================================
-QString DFBrowserPane_TDocStdOwner::convertToString (const TDF_DeltaList& theDeltaList)
-{
-  QStringList aNames;
-
-  for (TDF_ListIteratorOfDeltaList aDeltaIt (theDeltaList); aDeltaIt.More(); aDeltaIt.Next())
-  {
-    QString aName = DFBrowserPane_Tools::ToString (aDeltaIt.Value()->Name());
-    aNames.append (aName.isEmpty() ? "-" : aName);
-  }
-  return QString ("[%1]").arg (aNames.join (";"));
-}
-
-// =======================================================================
-// function : convertToString
-// purpose :
-// =======================================================================
-QString DFBrowserPane_TDocStdOwner::convertToString (const TColStd_SequenceOfExtendedString& theExtensions)
-{
-  QStringList aNames;
-  for (Standard_Integer anExtensionId = 1, aNumber = theExtensions.Length(); anExtensionId <= aNumber; anExtensionId++)
-    aNames.append (DFBrowserPane_Tools::ToString (theExtensions(anExtensionId)));
-
-  return QString ("[%1]").arg (aNames.join (";"));
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx
deleted file mode 100644 (file)
index 142b890..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDocStdOwner_H
-#define DFBrowserPane_TDocStdOwner_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TColStd_SequenceOfExtendedString.hxx>
-#include <TDF_DeltaList.hxx>
-
-//! \class DFBrowserPane_TDocStdOwner
-//! \brief The class to manipulate of TDocStd_Owner attribute
-class DFBrowserPane_TDocStdOwner : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TDocStdOwner();
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDocStdOwner() {}
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  //! Generate string container by the parameter list
-  //! \param a list of TDF delta
-  //! \param string result
-  static QString convertToString (const TDF_DeltaList& theList);
-
-  //! Generate string container by the parameter list
-  //! \param a list of extensions
-  //! \param string result
-  static QString convertToString (const TColStd_SequenceOfExtendedString& theExtensions);
-
-  //! Generate string container by the ext string value
-  //! \param an ext string [short*]
-  //! \param string result
-  static QString convertToString (const Standard_ExtString& theValue) { (void)theValue; return ""; }
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx
deleted file mode 100644 (file)
index d1f2421..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
-
-#include <TDocStd_XLink.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDocStdXLink::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TDocStd_XLink) anAttribute = Handle(TDocStd_XLink)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  theValues.append ("LabelEntry");
-  theValues.append (anAttribute->LabelEntry().ToCString());
-  theValues.append ("DocumentEntry");
-  theValues.append (anAttribute->DocumentEntry().ToCString());
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx
deleted file mode 100644 (file)
index da9deef..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDocStdXLink_H
-#define DFBrowserPane_TDocStdXLink_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDocStdXLink
-//! \brief The class to manipulate of TDocStd_XLink attribute
-class DFBrowserPane_TDocStdXLink : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDocStdXLink() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDocStdXLink() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx
deleted file mode 100644 (file)
index 76833bb..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
-
-#include <TDocStd_XLinkRoot.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TDocStdXLinkRoot::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx
deleted file mode 100644 (file)
index 60e6ce7..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TDocStdXLinkRoot_H
-#define DFBrowserPane_TDocStdXLinkRoot_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TDocStdXLinkRoot
-//! \brief The class to manipulate of TDocStd_XLinkRoot attribute
-class DFBrowserPane_TDocStdXLinkRoot : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TDocStdXLinkRoot() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TDocStdXLinkRoot() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx
deleted file mode 100644 (file)
index 8170388..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TFunction_Function.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TFunctionFunction::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TFunction_Function) anAttribute = Handle(TFunction_Function)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  char aStr[256];
-  anAttribute->GetDriverGUID().ToCString (aStr);
-  TCollection_AsciiString aString(aStr);
-
-  theValues.append ("GetDriverGUID");
-  theValues.append (DFBrowserPane_Tools::ToString(aString));
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx
deleted file mode 100644 (file)
index 46745c4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TFunctionFunction_H
-#define DFBrowserPane_TFunctionFunction_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TFunctionFunction
-//! \brief The class to manipulate of TFunction_Function attribute
-class DFBrowserPane_TFunctionFunction : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TFunctionFunction() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TFunctionFunction() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx
deleted file mode 100644 (file)
index 381b197..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
-
-#include <TFunction_GraphNode.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TFunctionGraphNode::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx
deleted file mode 100644 (file)
index 11f44e8..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TFunctionGraphNode_H
-#define DFBrowserPane_TFunctionGraphNode_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TFunctionGraphNode
-//! \brief The class to manipulate of TFunction_GraphNode attribute
-class DFBrowserPane_TFunctionGraphNode : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TFunctionGraphNode() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TFunctionGraphNode() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx
deleted file mode 100644 (file)
index 57e8ffd..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TFunctionScope.hxx>
-
-#include <TFunction_Scope.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TFunctionScope::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx
deleted file mode 100644 (file)
index 67ecf80..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TFunctionScope_H
-#define DFBrowserPane_TFunctionScope_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TFunctionScope
-//! \brief The class to manipulate of TFunction_Scope attribute
-class DFBrowserPane_TFunctionScope : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPane_TFunctionScope() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TFunctionScope() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
index e9220e56bcdb68143a0b1513867d614e27675c11..c93f7bf8f0d2ad42eb2ce9d41276616ec799f950 100644 (file)
@@ -421,7 +421,11 @@ void DFBrowserPane_TNamingNamedShape::GetReferences (const Handle(TDF_Attribute)
   }
   TopoDS_Shape aShape = getSelectedShapes();
   if (!aShape.IsNull())
-    theRefPresentation = new AIS_Shape (aShape);
+  {
+    Handle(AIS_Shape) aPresentation = new AIS_Shape (aShape);
+    aPresentation->Attributes()->SetAutoTriangulation (Standard_False);
+    theRefPresentation = aPresentation;
+  }
 }
 
 // =======================================================================
index afd1cbe085c7ae8936576d61b37b867c1eb3b282..89a570bbe920d8146cd99615da4e039fe9ac64fe 100644 (file)
@@ -175,8 +175,11 @@ Handle(Standard_Transient) DFBrowserPane_TNamingNaming::GetPresentation (const H
   }
   TopoDS_Shape aShape = aComp;
   if (!aShape.IsNull() && aHasShapes)
-    aPresentation = new AIS_Shape (aShape);
-
+  {
+    Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
+    aPrs->Attributes()->SetAutoTriangulation (Standard_False);
+    aPresentation = aPrs;
+  }
   return aPresentation;
 }
 
diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx
deleted file mode 100644 (file)
index 4a3e759..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <TPrsStd_AISPresentation.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPane_TPrsStdAISPresentation::DFBrowserPane_TPrsStdAISPresentation()
- : DFBrowserPane_AttributePane()
-{
-}
-
-// =======================================================================
-// function : toString
-// purpose :
-// =======================================================================
-QString toString (const Quantity_NameOfColor& theNameOfColor)
-{
-  Quantity_Color aColor(theNameOfColor);
-  return QString ("(%1, %2, %3)").arg (aColor.Red()).arg (aColor.Green()).arg (aColor.Blue());
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPane_TPrsStdAISPresentation::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TPrsStd_AISPresentation) anAttribute = Handle(TPrsStd_AISPresentation)::DownCast (theAttribute);
-  if (anAttribute.IsNull())
-    return;
-  Handle(AIS_InteractiveObject) anIO = anAttribute->GetAIS();
-
-  char aStr[256];
-  anAttribute->GetDriverGUID().ToCString(aStr);
-  TCollection_AsciiString aString(aStr);
-
-  theValues << "GetDriverGUID" << DFBrowserPane_Tools::ToString (aString)
-            << "GetAIS" << (anIO.IsNull() ? "Null" : anAttribute->DynamicType()->Name())
-            << "IsDisplayed" << DFBrowserPane_Tools::BoolToStr (anAttribute->IsDisplayed())
-            << "GetContext()" << ((!anIO.IsNull() && !anIO->GetContext().IsNull()) ?
-                                 Standard_Dump::GetPointerInfo (anIO->GetContext()).ToCString() : "")
-            << "HasOwnMaterial" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnMaterial())
-            << "Material" << (anAttribute->HasOwnMaterial() ?
-                             DFBrowserPane_Tools::ToName (DB_MATERIAL_TYPE, anAttribute->Material()) : "").ToCString()
-            << "Transparency" << TCollection_AsciiString (anAttribute->Transparency()).ToCString()
-            << "HasOwnColor" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnColor())
-            << "Color" << (anAttribute->HasOwnColor() ? toString (anAttribute->Color()) : "")
-            << "HasOwnWidth"<< DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnWidth())
-            << "Width"<< (anAttribute->HasOwnWidth() ? QString::number (anAttribute->Width()) : "")
-            << "HasOwnMode"<< DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnMode())
-            << "Width"<< (anAttribute->HasOwnMode() ? DFBrowserPane_Tools::ToName (
-                          DB_DISPLAY_MODE, anAttribute->Mode()) : "").ToCString()
-            << "HasOwnSelectionMode" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnSelectionMode())
-            << "SelectionMode" << (anAttribute->HasOwnSelectionMode() ?
-                                   QString::number (anAttribute->SelectionMode()) : "");
-}
-
-// =======================================================================
-// function : GetPresentation
-// purpose :
-// =======================================================================
-Handle(Standard_Transient) DFBrowserPane_TPrsStdAISPresentation::GetPresentation (
-                                                    const Handle(TDF_Attribute)& theAttribute)
-{
-  Handle(Standard_Transient) aPresentation;
-
-  Handle(TPrsStd_AISPresentation) anAttribute = Handle(TPrsStd_AISPresentation)::DownCast (theAttribute);
-  if (!anAttribute.IsNull())
-    aPresentation = anAttribute->GetAIS();
-
-  return aPresentation;
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx
deleted file mode 100644 (file)
index d925f81..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TPrsStdAISPresentation_H
-#define DFBrowserPane_TPrsStdAISPresentation_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TPrsStdAISPresentation
-//! \brief The class to manipulate of TPrsStdAIS_Presentation attribute
-class DFBrowserPane_TPrsStdAISPresentation : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPane_TPrsStdAISPresentation();
-
-  //! Destructor
-  virtual ~DFBrowserPane_TPrsStdAISPresentation() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns presentation of the attribute to be visualized in the view
-  //! \param theAttribute a current attribute
-  //! \return handle of presentation if the attribute has, to be visualized
-  Standard_EXPORT virtual Handle(Standard_Transient) GetPresentation
-    (const Handle (TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx
deleted file mode 100644 (file)
index eecf1ee..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <AIS_InteractiveContext.hxx>
-#include <TPrsStd_AISViewer.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : 
-// purpose :
-// =======================================================================
-void DFBrowserPane_TPrsStdAISViewer::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(TPrsStd_AISViewer) aViewerAttribute = Handle(TPrsStd_AISViewer)::DownCast (theAttribute);
-  if (!aViewerAttribute)
-    return;
-
-  Handle(AIS_InteractiveContext) aContext = aViewerAttribute->GetInteractiveContext();
-  TCollection_AsciiString aPointerInfo = !aContext.IsNull()
-    ? Standard_Dump::GetPointerInfo (aContext).ToCString() : "";
-
-  theValues << "GetInteractiveContext" << aPointerInfo.ToCString();
-
-}
diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx
deleted file mode 100644 (file)
index f1e7e8d..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPane_TPrsStdAISViewer_H
-#define DFBrowserPane_TPrsStdAISViewer_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-
-//! \class DFBrowserPane_TPrsStdAISViewer
-//! \brief The class to manipulate of TPrsStd_AISViewer attribute
-class DFBrowserPane_TPrsStdAISViewer : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPane_TPrsStdAISViewer() {}
-
-  //! Destructor
-  virtual ~DFBrowserPane_TPrsStdAISViewer() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  virtual void GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
index 1eac7a6433775abce04fdec2afc5a7b0e1a4ad26..e07ebdaec0d35adbb22e21209b8152381fbb0891 100644 (file)
@@ -19,82 +19,18 @@ DFBrowserPane_OcctEnumType.hxx
 DFBrowserPane_SelectionKind.hxx
 DFBrowserPane_TableView.cxx
 DFBrowserPane_TableView.hxx
-DFBrowserPane_TDataStdAsciiString.cxx
-DFBrowserPane_TDataStdAsciiString.hxx
-DFBrowserPane_TDataStdBooleanArray.cxx
-DFBrowserPane_TDataStdBooleanArray.hxx
-DFBrowserPane_TDataStdBooleanList.cxx
-DFBrowserPane_TDataStdBooleanList.hxx
-DFBrowserPane_TDataStdByteArray.cxx
-DFBrowserPane_TDataStdByteArray.hxx
-DFBrowserPane_TDataStdComment.cxx
-DFBrowserPane_TDataStdComment.hxx
-DFBrowserPane_TDataStdCurrent.cxx
-DFBrowserPane_TDataStdCurrent.hxx
-DFBrowserPane_TDataStdDirectory.cxx
-DFBrowserPane_TDataStdDirectory.hxx
-DFBrowserPane_TDataStdExpression.cxx
-DFBrowserPane_TDataStdExpression.hxx
-DFBrowserPane_TDataStdExtStringArray.cxx
-DFBrowserPane_TDataStdExtStringArray.hxx
-DFBrowserPane_TDataStdExtStringList.cxx
-DFBrowserPane_TDataStdExtStringList.hxx
-DFBrowserPane_TDataStdInteger.cxx
-DFBrowserPane_TDataStdInteger.hxx
-DFBrowserPane_TDataStdIntegerArray.cxx
-DFBrowserPane_TDataStdIntegerArray.hxx
-DFBrowserPane_TDataStdIntegerList.cxx
-DFBrowserPane_TDataStdIntegerList.hxx
-DFBrowserPane_TDataStdIntPackedMap.cxx
-DFBrowserPane_TDataStdIntPackedMap.hxx
-DFBrowserPane_TDataStdName.cxx
-DFBrowserPane_TDataStdName.hxx
-DFBrowserPane_TDataStdNamedData.cxx
-DFBrowserPane_TDataStdNamedData.hxx
-DFBrowserPane_TDataStdNoteBook.cxx
-DFBrowserPane_TDataStdNoteBook.hxx
-DFBrowserPane_TDataStdReal.cxx
-DFBrowserPane_TDataStdReal.hxx
-DFBrowserPane_TDataStdRealArray.cxx
-DFBrowserPane_TDataStdRealArray.hxx
-DFBrowserPane_TDataStdRealList.cxx
-DFBrowserPane_TDataStdRealList.hxx
 DFBrowserPane_TDataStdReferenceArray.cxx
 DFBrowserPane_TDataStdReferenceArray.hxx
 DFBrowserPane_TDataStdReferenceList.cxx
 DFBrowserPane_TDataStdReferenceList.hxx
-DFBrowserPane_TDataStdRelation.cxx
-DFBrowserPane_TDataStdRelation.hxx
-DFBrowserPane_TDataStdTick.cxx
-DFBrowserPane_TDataStdTick.hxx
 DFBrowserPane_TDataStdTreeNode.cxx
 DFBrowserPane_TDataStdTreeNode.hxx
 DFBrowserPane_TDataStdTreeNodeItem.cxx
 DFBrowserPane_TDataStdTreeNodeItem.hxx
 DFBrowserPane_TDataStdTreeNodeModel.cxx
 DFBrowserPane_TDataStdTreeNodeModel.hxx
-DFBrowserPane_TDataStdUAttribute.cxx
-DFBrowserPane_TDataStdUAttribute.hxx
-DFBrowserPane_TDataStdVariable.cxx
-DFBrowserPane_TDataStdVariable.hxx
 DFBrowserPane_TDFReference.cxx
 DFBrowserPane_TDFReference.hxx
-DFBrowserPane_TDFTagSource.cxx
-DFBrowserPane_TDFTagSource.hxx
-DFBrowserPane_TDocStdModified.cxx
-DFBrowserPane_TDocStdModified.hxx
-DFBrowserPane_TDocStdOwner.cxx
-DFBrowserPane_TDocStdOwner.hxx
-DFBrowserPane_TDocStdXLink.cxx
-DFBrowserPane_TDocStdXLink.hxx
-DFBrowserPane_TDocStdXLinkRoot.cxx
-DFBrowserPane_TDocStdXLinkRoot.hxx
-DFBrowserPane_TFunctionFunction.cxx
-DFBrowserPane_TFunctionFunction.hxx
-DFBrowserPane_TFunctionGraphNode.cxx
-DFBrowserPane_TFunctionGraphNode.hxx
-DFBrowserPane_TFunctionScope.cxx
-DFBrowserPane_TFunctionScope.hxx
 DFBrowserPane_TNamingNamedShape.cxx
 DFBrowserPane_TNamingNamedShape.hxx
 DFBrowserPane_TNamingNaming.cxx
@@ -102,8 +38,4 @@ DFBrowserPane_TNamingNaming.hxx
 DFBrowserPane_TNamingUsedShapes.cxx
 DFBrowserPane_TNamingUsedShapes.hxx
 DFBrowserPane_Tools.cxx
-DFBrowserPane_Tools.hxx
-DFBrowserPane_TPrsStdAISPresentation.cxx
-DFBrowserPane_TPrsStdAISPresentation.hxx
-DFBrowserPane_TPrsStdAISViewer.cxx
-DFBrowserPane_TPrsStdAISViewer.hxx
\ No newline at end of file
+DFBrowserPane_Tools.hxx
\ No newline at end of file
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx
deleted file mode 100644 (file)
index 35e15ae..0000000
+++ /dev/null
@@ -1,215 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
-
-#include <inspector/DFBrowserPane_ItemRole.hxx>
-#include <inspector/DFBrowserPaneXDE_XDEDRAW.hxx>
-
-#include <TDataStd_TreeNode.hxx>
-#include <TDF_Reference.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <XCAFDoc_Volume.hxx>
-#include <XCAFDoc_Area.hxx>
-#include <XCAFDoc_Centroid.hxx>
-#include <TDataStd_UAttribute.hxx>
-#include <XCAFDoc_Color.hxx>
-#include <XCAFDoc_DimTol.hxx>
-#include <XCAFDoc_Material.hxx>
-#include <XCAFDoc_GraphNode.hxx>
-
-#include <set>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QStringList>
-#include <Standard_WarningsRestore.hxx>
-
-static std::set<Standard_CString> AttributeTypes;
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_AttributeCommonPane::DFBrowserPaneXDE_AttributeCommonPane (DFBrowserPane_AttributePaneAPI* theStandardPane)
-: DFBrowserPane_AttributePane()
-{
-  myStandardPane = dynamic_cast<DFBrowserPane_AttributePane*> (theStandardPane);
-}
-
-// =======================================================================
-// function : ProcessAttribute
-// purpose :
-// =======================================================================
-bool DFBrowserPaneXDE_AttributeCommonPane::ProcessAttribute (Standard_CString theAttributeType)
-{
-  if (AttributeTypes.empty())
-  {
-    AttributeTypes.insert (STANDARD_TYPE (TDataStd_TreeNode)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (TDF_Reference)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (TNaming_NamedShape)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Volume)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Area)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Centroid)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (TDataStd_UAttribute)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Color)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_DimTol)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Material)->Name());
-    AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_GraphNode)->Name());
-  }
-  return AttributeTypes.find (theAttributeType) != AttributeTypes.end();
-}
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPaneXDE_AttributeCommonPane::CreateWidget (QWidget* theParent)
-{
-  return myStandardPane ? myStandardPane->CreateWidget (theParent) : 0;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  if (myStandardPane)
-    myStandardPane->Init (theAttribute);
-}
-
-// =======================================================================
-// function : GetSelectionModels
-// purpose :
-// =======================================================================
-std::list<QItemSelectionModel*> DFBrowserPaneXDE_AttributeCommonPane::GetSelectionModels()
-{
-  return myStandardPane ? myStandardPane->GetSelectionModels() : std::list<QItemSelectionModel*>();
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  if (myStandardPane)
-    myStandardPane->GetValues (theAttribute, theValues);
-}
-
-// =======================================================================
-// function : GetAttributeInfo
-// purpose :
-// =======================================================================
-QVariant DFBrowserPaneXDE_AttributeCommonPane::GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                                 int theRole, int theColumnId)
-{
-  QVariant aValue;
-  if (myStandardPane)
-  {
-    if (theRole == DFBrowserPane_ItemRole_ShortInfo)
-    {
-      QList<QVariant> aValues;
-      GetShortAttributeInfo (theAttribute, aValues);
-      QStringList anInfoList;
-      for (QList<QVariant>::const_iterator aValuesIt = aValues.begin(); aValuesIt != aValues.end(); aValuesIt++)
-        anInfoList.append (aValuesIt->toString());
-      aValue = anInfoList.join (", ");
-    }
-    else
-      aValue = myStandardPane->GetAttributeInfo (theAttribute, theRole, theColumnId);
-  }
-  else
-    aValue = DFBrowserPane_AttributePane::GetAttributeInfoByType (theAttribute->DynamicType()->Name(),
-                                                                  theRole, theColumnId);
-  return aValue;
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::GetShortAttributeInfo (
-                          const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  theValues.append (DFBrowserPaneXDE_XDEDRAW::GetAttributeInfo (theAttribute).ToCString());
-}
-
-// =======================================================================
-// function : GetSelectionKind
-// purpose :
-// =======================================================================
-int DFBrowserPaneXDE_AttributeCommonPane::GetSelectionKind (QItemSelectionModel* theModel)
-{
-  if (myStandardPane)
-    return myStandardPane->GetSelectionKind (theModel);
-
-  return DFBrowserPane_AttributePane::GetSelectionKind (theModel);
-}
-
-// =======================================================================
-// function : GetSelectionParameters
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::GetSelectionParameters (QItemSelectionModel* theModel,
-                                    NCollection_List<Handle(Standard_Transient)>& theParameters,
-                                    NCollection_List<TCollection_AsciiString>& theItemNames)
-{
-  if (myStandardPane)
-    myStandardPane->GetSelectionParameters (theModel, theParameters, theItemNames);
-
-  DFBrowserPane_AttributePane::GetSelectionParameters (theModel, theParameters, theItemNames);
-}
-
-// =======================================================================
-// function : GetPresentation
-// purpose :
-// =======================================================================
-Handle(Standard_Transient) DFBrowserPaneXDE_AttributeCommonPane::GetPresentation (
-                                           const Handle(TDF_Attribute)& theAttribute)
-{
-  Handle(Standard_Transient) anIO;
-  if (myStandardPane)
-    anIO = myStandardPane->GetPresentation (theAttribute);
-  return anIO;
-}
-
-// =======================================================================
-// function : GetReferences
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::GetReferences (
-                                       const Handle(TDF_Attribute)& theAttribute,
-                                       NCollection_List<TDF_Label>& theRefLabels,
-                                       Handle(Standard_Transient)& theRefPresentation)
-{
-  Handle(Standard_Transient) anIO;
-  if (myStandardPane)
-    myStandardPane->GetReferences (theAttribute, theRefLabels, theRefPresentation);
-}
-
-// =======================================================================
-// function : GetAttributeReferences
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_AttributeCommonPane::GetAttributeReferences (
-                                       const Handle(TDF_Attribute)& theAttribute,
-                                       NCollection_List<Handle(TDF_Attribute)>& theRefAttributes,
-                                       Handle(Standard_Transient)& theRefPresentation)
-{
-  Handle(Standard_Transient) anIO;
-  if (myStandardPane)
-    myStandardPane->GetAttributeReferences (theAttribute, theRefAttributes, theRefPresentation);
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx
deleted file mode 100644 (file)
index c15e30c..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_AttributeCommonPane_H
-#define DFBrowserPaneXDE_AttributeCommonPane_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QVariant>
-#include <Standard_WarningsRestore.hxx>
-
-class QWidget;
-class QItemSelectionModel;
-
-//! \class DFBrowserPaneXDE_AttributeCommonPane
-//! \brief It covers standard attribute panes. The purpose is to return XDE specific short information for
-//! several kinds of attributes. The other functionality is the same as for standard panes, it just sends
-//! it to the panes.
-class DFBrowserPaneXDE_AttributeCommonPane : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_AttributeCommonPane (DFBrowserPane_AttributePaneAPI* theStandardPane);
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_AttributeCommonPane() {}
-
-  //! Returns true if this type can be processed by this pane. It contains standard attributes that
-  //! have difference in presentation (TDataStd_TreeNode, TDF_Reference, TNaming_NamedShape and TDataStd_UAttribute).
-  //! Also it contains XCAFDoc attributes (should be implemented in this package or pane will be empty)
-  //! \param theAttributeType an attribute type
-  Standard_EXPORT static bool ProcessAttribute (Standard_CString theAttributeType);
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Initializes the content of the pane by the parameter attribute
-  //! \param theAttribute an OCAF attribute
-  Standard_EXPORT void Init (const Handle(TDF_Attribute)& theAttribute);
-
-  //! Returns list of selection models. In default implementation it contains a selection model for the table view
-  //! \returns container of models
-  Standard_EXPORT virtual std::list<QItemSelectionModel*> GetSelectionModels() Standard_OVERRIDE;
-
-  //! Returns information for the given attribute
-  //! \param theAttribute a current attribute
-  //! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
-  //! \param theColumnId a tree model column
-  //! \return value, interpreted by tree model depending on the role
-  Standard_EXPORT virtual QVariant GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                     int theRole, int theColumnId) Standard_OVERRIDE;
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns selection kind for the model, it may be General selection or Additional selection for example
-  //! \param theModel one of selection models provided by this pane
-  //! \return selection kind
-  Standard_EXPORT virtual int GetSelectionKind (QItemSelectionModel* theModel) Standard_OVERRIDE;
-
-  //! Returns selection parameters, that may be useful for communicate between tools
-  //! \param theModel one of selection models provided by this pane
-  //! \theParameters a container of parameters, might be extended depending on the pane state(e.g. selection)
-  //! \theItemNames names to be selected for each selection parameter
-  Standard_EXPORT virtual void GetSelectionParameters (QItemSelectionModel* theModel,
-                                       NCollection_List<Handle(Standard_Transient)>& theParameters,
-                                       NCollection_List<TCollection_AsciiString>& theItemNames) Standard_OVERRIDE;
-
-  //! Returns presentation of the attribute to be visualized in the view
-  //! \param theAttribute a current attribute
-  //! \return handle of presentation if the attribute has, to be visualized
-  Standard_EXPORT virtual Handle(Standard_Transient) GetPresentation
-    (const Handle (TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns container of Label references to the attribute
-  //! \param theAttribute a current attribute
-  //! \param theRefLabels a container of label references, to be selected in tree view
-  //! \param theRefPresentation handle of presentation for the references, to be visualized
-  Standard_EXPORT virtual void GetReferences (const Handle(TDF_Attribute)& theAttribute,
-                                              NCollection_List<TDF_Label>& theRefLabels,
-                                              Handle(Standard_Transient)& theRefPresentation) Standard_OVERRIDE;
-
-  //! Returns container of Attribute references to the attribute
-  //! \param theAttribute a current attribute
-  //! \param theRefAttributes a container of attribute references, to be selected in tree view
-  //! \param theRefPresentation handle of presentation for the references, to be visualized
-  Standard_EXPORT virtual void GetAttributeReferences (const Handle(TDF_Attribute)& theAttribute,
-                                       NCollection_List<Handle(TDF_Attribute)>& theRefAttributes,
-                                       Handle(Standard_Transient)& theRefPresentation) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_AttributePane* myStandardPane; //!< pane, that corresponds to the current type of attribute
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx
deleted file mode 100644 (file)
index 7ace10a..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
-
-#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocLocation.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocMaterial.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
-#include <inspector/DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
-
-#include <XCAFDoc_Area.hxx>
-#include <XCAFDoc_Centroid.hxx>
-#include <XCAFDoc_Color.hxx>
-#include <XCAFDoc_ColorTool.hxx>
-#include <XCAFDoc_Datum.hxx>
-#include <XCAFDoc_Dimension.hxx>
-#include <XCAFDoc_GeomTolerance.hxx>
-#include <XCAFDoc_DimTol.hxx>
-#include <XCAFDoc_DimTolTool.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-#include <XCAFDoc_GraphNode.hxx>
-#include <XCAFDoc_LayerTool.hxx>
-#include <XCAFDoc_Location.hxx>
-#include <XCAFDoc_Material.hxx>
-#include <XCAFDoc_MaterialTool.hxx>
-#include <XCAFDoc_ShapeMapTool.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-#include <XCAFDoc_ShapeMapTool.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_AttributePaneCreator::DFBrowserPaneXDE_AttributePaneCreator(
-                                       DFBrowserPane_AttributePaneCreatorAPI* theStandardPaneCreator)
-: myStandardPaneCreator (theStandardPaneCreator)
-{
-}
-
-// =======================================================================
-// function : CreateAttributePane
-// purpose :
-// =======================================================================
-DFBrowserPane_AttributePaneAPI* DFBrowserPaneXDE_AttributePaneCreator::CreateAttributePane (Standard_CString theAttributeName)
-{
-  DFBrowserPane_AttributePaneAPI* aPane = 0;
-  if (DFBrowserPaneXDE_AttributeCommonPane::ProcessAttribute (theAttributeName))
-  {
-    DFBrowserPane_AttributePaneAPI* aStandardPane = myStandardPaneCreator->CreateAttributePane (theAttributeName);
-    if (!aStandardPane)
-      aStandardPane = createXDEPane (theAttributeName);
-    aPane = new DFBrowserPaneXDE_AttributeCommonPane (aStandardPane);
-  }
-  else
-   aPane = createXDEPane (theAttributeName);
-
-  return aPane;
-}
-
-// =======================================================================
-// function : createXDEPane
-// purpose :
-// =======================================================================
-DFBrowserPane_AttributePaneAPI* DFBrowserPaneXDE_AttributePaneCreator::createXDEPane (Standard_CString theAttributeName)
-{
-  DFBrowserPane_AttributePaneAPI* aPane = 0;
-  if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeMapTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocShapeMapTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Area)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocArea();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Centroid)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocCentroid();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Color)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocColor();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ColorTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocColorTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Datum)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocDatum();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Dimension)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocDimension();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DimTol)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocDimTol();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DimTolTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocDimTolTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DocumentTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocDocumentTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_GeomTolerance)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocGeomTolerance();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_GraphNode)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocGraphNode();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_LayerTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocLayerTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Location)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocLocation();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Material)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocMaterial();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_MaterialTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocMaterialTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeMapTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocShapeMapTool();
-  else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeTool)->Name())
-    aPane = new DFBrowserPaneXDE_XCAFDocShapeTool();
-  return aPane;
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx
deleted file mode 100644 (file)
index eae3231..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
-#define DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
-
-#include <inspector/DFBrowserPane_AttributePaneCreatorAPI.hxx>
-
-#include <Standard.hxx>
-#include <Standard_Macro.hxx>
-
-class DFBrowserPane_AttributePaneAPI;
-
-//! \class DFBrowserPaneXDE_AttributePaneCreator
-//! \brief This class can creates attribute pane for XDE attribute name.
-//! It creates the following panes:
-//! - custom panes for XCAFDoc attributes own panes
-//! - extended panes (modified short information) for several types of attribute (use AttributeCommonPane)
-//! - common panes described in DFBrowserPane library
-class DFBrowserPaneXDE_AttributePaneCreator : public DFBrowserPane_AttributePaneCreatorAPI
-{
-public:
-
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_AttributePaneCreator (DFBrowserPane_AttributePaneCreatorAPI* theStandardPaneCreator);
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_AttributePaneCreator() Standard_OVERRIDE {}
-
-  //! Creates attribute panes for XCAFDoc attributes, extended and common panes from DFBrowserPane library
-  //! \param theAttributeName a type of attribute
-  //! \return an attribute pane if it can be created for this type
-  Standard_EXPORT virtual DFBrowserPane_AttributePaneAPI* CreateAttributePane
-    (Standard_CString theAttributeName) Standard_OVERRIDE;
-
-protected:
-
-  //! Creates pane for XCAFDoc attribute name
-  //! \param theAttributeName a type of attribute
-  //! \return an attribute pane if it can be created for this type
-  DFBrowserPane_AttributePaneAPI* createXDEPane (Standard_CString theAttributeName);
-
-private:
-
-  DFBrowserPane_AttributePaneCreatorAPI* myStandardPaneCreator; //! pane creator for panes from DFBrowserPane library
-};
-
-#endif 
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx
deleted file mode 100644 (file)
index 46b7cbd..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_Tools.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDF_ChildIterator.hxx>
-#include <TDF_Tool.hxx>
-#include <TDocStd_Document.hxx>
-
-#include <Standard_GUID.hxx>
-
-#include <XCAFDoc_Area.hxx>
-#include <XCAFDoc_Centroid.hxx>
-#include <XCAFDoc_Color.hxx>
-#include <XCAFDoc_Datum.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-#include <XCAFDoc_GraphNode.hxx>
-#include <XCAFDoc_Location.hxx>
-#include <XCAFDoc_Material.hxx>
-#include <XCAFDoc_Volume.hxx>
-
-namespace DFBrowserPaneXDE_Tools
-{
-
-  // =======================================================================
-  // function : IsXDEApplication
-  // purpose :
-  // =======================================================================
-  bool IsXDEApplication (const Handle(TDocStd_Application)& theApplication)
-  {
-    bool isXDEApp = false;
-
-    Handle(TDocStd_Document) aDocument;
-    Standard_Integer aNbDoc = theApplication->NbDocuments();
-    if (aNbDoc == 0)
-      return isXDEApp;
-
-    theApplication->GetDocument (1, aDocument);
-    if (aDocument.IsNull())
-      return isXDEApp;
-
-    for (TDF_ChildIterator aLabelsIt (aDocument->Main().Root()); aLabelsIt.More() && !isXDEApp; aLabelsIt.Next())
-    {
-      const TDF_Label aLabel = aLabelsIt.Value();
-      if (aLabel.IsNull())
-        break;
-      Handle(TDF_Attribute) anAttribute;
-      aLabel.FindAttribute (XCAFDoc_DocumentTool::GetID(), anAttribute);
-      isXDEApp = !anAttribute.IsNull();
-    }
-    return isXDEApp;
-  }
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.hxx
deleted file mode 100644 (file)
index 5246649..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_Tools_H
-#define DFBrowserPaneXDE_Tools_H
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_Label.hxx>
-#include <TDocStd_Application.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QMap>
-#include <QWidget>
-#include <QString>
-#include <Standard_WarningsRestore.hxx>
-
-class DFBrowserPane_AttributePaneAPI;
-
-//! \namespace DFBrowserPaneXDE_Tools
-//! The namespace that gives auxiliary methods for XCAFDoc elements manipulation
-namespace DFBrowserPaneXDE_Tools
-{
-  //! Returns true if the application is XDE: application has document where there is XCAFDoc_DocumentTool attribute in
-  //! a child label of the root
-  //! \param theApplication checked application
-  //! \return boolean value 
-  Standard_EXPORT bool IsXDEApplication (const Handle(TDocStd_Application)& theApplication);
-}
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx
deleted file mode 100644 (file)
index 1bcab62..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
-
-#include <XCAFDoc_Area.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocArea::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Area) anAttr = Handle(XCAFDoc_Area)::DownCast (theAttribute);
-  theValues.append ("Get");
-  theValues.append (anAttr->Get());
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx
deleted file mode 100644 (file)
index 5098d7b..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocArea_H
-#define DFBrowserPaneXDE_XCAFDocArea_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocArea
-//! \brief The class to manipulate of XCAF_DocArea attribute
-class DFBrowserPaneXDE_XCAFDocArea : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocArea() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocArea() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx
deleted file mode 100644 (file)
index f87e5be..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-
-#include <XCAFDoc_Centroid.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_XCAFDocCentroid::DFBrowserPaneXDE_XCAFDocCentroid()
-: DFBrowserPane_AttributePane()
-{
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocCentroid::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Centroid) anAttr = Handle(XCAFDoc_Centroid)::DownCast (theAttribute);
-  gp_Pnt aPoint = anAttr->Get();
-  theValues << "Get: X" << aPoint.X()
-            << "Get: Y" << aPoint.Y()
-            << "Get: Z" << aPoint.Z();
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocCentroid::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                              QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Centroid) anAttr = Handle(XCAFDoc_Centroid)::DownCast (theAttribute);
-  gp_Pnt aPoint = anAttr->Get();
-  theValues.append (QString ("(%1, %2, %3)").arg (aPoint.X()).arg (aPoint.Y()).arg (aPoint.Z()));
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx
deleted file mode 100644 (file)
index 9068329..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocCentroid_H
-#define DFBrowserPaneXDE_XCAFDocCentroid_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocCentroid
-//! \brief The class to manipulate of XCAFDoc_Centroid attribute
-class DFBrowserPaneXDE_XCAFDocCentroid : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_XCAFDocCentroid();
-
-  //! Destructor
-  Standard_EXPORT virtual ~DFBrowserPaneXDE_XCAFDocCentroid() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx
deleted file mode 100644 (file)
index 926f890..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-
-#include <XCAFDoc_Color.hxx>
-
-#include <Quantity_Color.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QColor>
-#include <Standard_WarningsRestore.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_XCAFDocColor::DFBrowserPaneXDE_XCAFDocColor()
-: DFBrowserPane_AttributePane()
-{
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocColor::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Color) anAttr = Handle(XCAFDoc_Color)::DownCast (theAttribute);
-  const Quantity_Color& aColor = anAttr->GetColor();
-
-  theValues << "GetColor: Red" << aColor.Red();
-  theValues << "GetColor: Green" << aColor.Green();
-  theValues << "GetColor: Blue" << aColor.Blue();
-
-  theValues << "GetColor: Name" << aColor.Name();
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocColor::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                           QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Color) anAttr = Handle(XCAFDoc_Color)::DownCast (theAttribute);
-  const Quantity_Color& aColor = anAttr->GetColor();
-  theValues.append (QString ("(%1, %2, %3)").arg (aColor.Red()).arg (aColor.Green()).arg (aColor.Blue()));
-}
-
-// =======================================================================
-// function : GetAttributeInfo
-// purpose :
-// =======================================================================
-QVariant DFBrowserPaneXDE_XCAFDocColor::GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute, int theRole, int theColumnId)
-{
-  if (theColumnId != 0)
-    return DFBrowserPane_AttributePane::GetAttributeInfo (theAttribute, theRole, theColumnId);
-
-  switch (theRole)
-  {
-    case Qt::BackgroundRole:
-    {
-      const Quantity_Color& aColor = Handle(XCAFDoc_Color)::DownCast (theAttribute)->GetColor();
-      return QColor ((int)(aColor.Red()*255.), (int)(aColor.Green()*255.), (int)(aColor.Blue()*255.));
-    }
-    default:
-    break;
-  }
-  return DFBrowserPane_AttributePane::GetAttributeInfo (theAttribute, theRole, theColumnId);
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx
deleted file mode 100644 (file)
index de4fb78..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocColor_H
-#define DFBrowserPaneXDE_XCAFDocColor_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocColor
-//! \brief The class to manipulate of XCAFDoc_Color attribute
-class DFBrowserPaneXDE_XCAFDocColor : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_XCAFDocColor();
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocColor() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns information for the given attribute
-  //! \param theAttribute a current attribute
-  //! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
-  //! \param theColumnId a tree model column
-  //! \return value, interpreted by tree model depending on the role
-  Standard_EXPORT virtual QVariant GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                     int theRole, int theColumnId) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx
deleted file mode 100644 (file)
index 1e6202e..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
-
-#include <XCAFDoc_Area.hxx>
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocColorTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx
deleted file mode 100644 (file)
index f445f02..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocColorTool_H
-#define DFBrowserPaneXDE_XCAFDocColorTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_
-//! \brief The class to manipulate of XCAFDoc_ColorTool attribute
-class DFBrowserPaneXDE_XCAFDocColorTool : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocColorTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocColorTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx
deleted file mode 100644 (file)
index 9eb4009..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-
-#include <TCollection_HAsciiString.hxx>
-
-#include <XCAFDoc_Datum.hxx>
-#include <XCAFDimTolObjects_DatumObject.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_XCAFDocDatum::DFBrowserPaneXDE_XCAFDocDatum()
-: DFBrowserPane_AttributePane()
-{
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDatum::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Datum) anAttr = Handle(XCAFDoc_Datum)::DownCast (theAttribute);
-
-  Handle(TCollection_HAsciiString) aName = anAttr->GetName();
-  Handle(TCollection_HAsciiString) aDescription = anAttr->GetDescription();
-  Handle(TCollection_HAsciiString) anIdentification = anAttr->GetIdentification();
-
-  theValues << "Name" << (!aName.IsNull() ? aName->ToCString() : QString (""))
-            << "Description" << (!aDescription.IsNull() ? aDescription->ToCString() : QString (""))
-            << "Identification" << (!anIdentification.IsNull() ? anIdentification->ToCString() : QString (""));
-
-  Handle(XCAFDimTolObjects_DatumObject) anObject = anAttr->GetObject();
-  Handle(TCollection_HAsciiString) anObjectName;
-  if (!anObject.IsNull())
-    anObjectName = anObject->GetName();
-  theValues << "Object" << (!anObjectName.IsNull() ? anObjectName->ToCString() : "Empty Name");
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDatum::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_Datum) anAttr = Handle(XCAFDoc_Datum)::DownCast (theAttribute);
-
-  Handle(TCollection_HAsciiString) aName = anAttr->GetName();
-  theValues << (!aName.IsNull() ? aName->ToCString() : QString (""));
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx
deleted file mode 100644 (file)
index 7aedc1d..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocDatum_H
-#define DFBrowserPaneXDE_XCAFDocDatum_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocDatum
-//! \brief The class to manipulate of XCAFDoc_Datum attribute
-class DFBrowserPaneXDE_XCAFDocDatum : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_XCAFDocDatum();
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocDatum() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx
deleted file mode 100644 (file)
index 6024a3d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
-
-#include <XCAFDoc_DimTol.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDimTol::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx
deleted file mode 100644 (file)
index cf8171e..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocDimTol_H
-#define DFBrowserPaneXDE_XCAFDocDimTol_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocDimTol
-//! \brief The class to manipulate of XCAFDoc_DimTol attribute
-class DFBrowserPaneXDE_XCAFDocDimTol : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocDimTol() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocDimTol() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx
deleted file mode 100644 (file)
index 21c9af9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
-
-#include <XCAFDoc_DimTolTool.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDimTolTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx
deleted file mode 100644 (file)
index c69e0b1..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocDimTolTool_H
-#define DFBrowserPaneXDE_XCAFDocDimTolTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocDimTolTool
-//! \brief The class to manipulate of XCAFDoc_DimTolTool attribute
-class DFBrowserPaneXDE_XCAFDocDimTolTool : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocDimTolTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocDimTolTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx
deleted file mode 100644 (file)
index 67b4227..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
-
-#include <XCAFDoc_Dimension.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDimension::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx
deleted file mode 100644 (file)
index bb75c87..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocDimension_H
-#define DFBrowserPaneXDE_XCAFDocDimension_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocDimension
-//! \brief The class to manipulate of XCAFDoc_Dimension attribute
-class DFBrowserPaneXDE_XCAFDocDimension : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocDimension() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocDimension() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx
deleted file mode 100644 (file)
index 0366a0b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
-
-#include <XCAFDoc_DocumentTool.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocDocumentTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx
deleted file mode 100644 (file)
index 1221721..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocDocumentTool_H
-#define DFBrowserPaneXDE_XCAFDocDocumentTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_
-//! \brief The class to manipulate of XCAFDoc_DocumentTool attribute
-class DFBrowserPaneXDE_XCAFDocDocumentTool : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocDocumentTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocDocumentTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx
deleted file mode 100644 (file)
index bacf238..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
-
-#include <XCAFDoc_GeomTolerance.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocGeomTolerance::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx
deleted file mode 100644 (file)
index 7afad77..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocGeomTolerance_H
-#define DFBrowserPaneXDE_XCAFDocGeomTolerance_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocGeomTolerance
-//! \brief The class to manipulate of XCAFDoc_GeomTolerance attribute
-class DFBrowserPaneXDE_XCAFDocGeomTolerance : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocGeomTolerance() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocGeomTolerance() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx
deleted file mode 100644 (file)
index aa3fc5b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
-
-#include <XCAFDoc_GraphNode.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocGraphNode::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx
deleted file mode 100644 (file)
index 798b4dd..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocGraphNode_H
-#define DFBrowserPaneXDE_XCAFDocGraphNode_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocGraphNode
-//! \brief The class to manipulate of XCAFDoc_GraphNode attribute
-class DFBrowserPaneXDE_XCAFDocGraphNode : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocGraphNode() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocGraphNode() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx
deleted file mode 100644 (file)
index d3f0b0b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
-
-#include <XCAFDoc_Area.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocLayerTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx
deleted file mode 100644 (file)
index 95e8d5b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocLayerTool_H
-#define DFBrowserPaneXDE_XCAFDocLayerTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocLayerTool
-//! \brief The class to manipulate of XCAFDoc_LayerTool attribute
-class DFBrowserPaneXDE_XCAFDocLayerTool : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocLayerTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocLayerTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx
deleted file mode 100644 (file)
index 790cb24..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocLocation.hxx>
-
-#include <XCAFDoc_Location.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocLocation::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx
deleted file mode 100644 (file)
index d1f4a10..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocLocation_H
-#define DFBrowserPaneXDE_XCAFDocLocation_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocLocation
-//! \brief The class to manipulate of XCAFDoc_Location attribute
-class DFBrowserPaneXDE_XCAFDocLocation : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocLocation() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocLocation() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx
deleted file mode 100644 (file)
index ace15f9..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocMaterial.hxx>
-
-#include <XCAFDoc_Material.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocMaterial::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx
deleted file mode 100644 (file)
index c457e18..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocMaterial_H
-#define DFBrowserPaneXDE_XCAFDocMaterial_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocMaterial
-//! \brief The class to manipulate of XCAFDoc_Material attribute
-class DFBrowserPaneXDE_XCAFDocMaterial : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocMaterial() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocMaterial() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx
deleted file mode 100644 (file)
index 00bc421..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
-
-#include <XCAFDoc_MaterialTool.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocMaterialTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx
deleted file mode 100644 (file)
index 085aa00..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocMaterialTool_H
-#define DFBrowserPaneXDE_XCAFDocMaterialTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XCAFDocMaterialTool
-//! \brief The class to manipulate of XCAFDoc_MaterialTool attribute
-class DFBrowserPaneXDE_XCAFDocMaterialTool : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocMaterialTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocMaterialTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx
deleted file mode 100644 (file)
index 7cec914..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
-
-#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
-#include <inspector/DFBrowserPane_HelperExport.hxx>
-#include <inspector/DFBrowserPane_ItemDelegateButton.hxx>
-#include <inspector/DFBrowserPane_TableView.hxx>
-#include <inspector/DFBrowserPane_Tools.hxx>
-
-#include <AIS_Shape.hxx>
-#include <BRepTools.hxx>
-#include <BRep_Builder.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Compound.hxx>
-#include <XCAFDoc_ShapeMapTool.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QEvent>
-#include <QFileDialog>
-#include <QGridLayout>
-#include <QHeaderView>
-#include <QIcon>
-#include <QMap>
-#include <QPainter>
-#include <QStyledItemDelegate>
-#include <QTableView>
-#include <QVariant>
-#include <QWidget>
-#include <Standard_WarningsRestore.hxx>
-
-const int COLUMN_EXPORT_WIDTH = 20;
-const int COLUMN_TYPE_WIDTH = 70;
-const int COLUMN_POINTER_WIDTH = 110;
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-DFBrowserPaneXDE_XCAFDocShapeMapTool::DFBrowserPaneXDE_XCAFDocShapeMapTool()
-: DFBrowserPane_AttributePane(), myHelperExport (0)
-{
-  QList<QVariant> aHeaderValues;
-  aHeaderValues << "TShape"<< "Type" << "";
-
-  getPaneModel()->SetHeaderValues (aHeaderValues, Qt::Horizontal);
-  getPaneModel()->SetColumnCount (aHeaderValues.count());
-  getPaneModel()->SetItalicColumns (QList<int>());
-}
-
-// =======================================================================
-// function : CreateWidget
-// purpose :
-// =======================================================================
-QWidget* DFBrowserPaneXDE_XCAFDocShapeMapTool::CreateWidget (QWidget* theParent)
-{
-  QWidget* aMainWidget = new QWidget (theParent);
-  aMainWidget->setVisible (false);
-
-  myTableView = new DFBrowserPane_TableView (aMainWidget);
-  myTableView->SetModel (myPaneModel);
-  QTableView* aTableView = myTableView->GetTableView();
-  aTableView->setSelectionModel (mySelectionModels.front());
-  aTableView->horizontalHeader()->setStretchLastSection (false);
-
-  aTableView->setColumnWidth (0, COLUMN_POINTER_WIDTH);
-  aTableView->setColumnWidth (1, COLUMN_TYPE_WIDTH);
-  aTableView->setColumnWidth (2, COLUMN_EXPORT_WIDTH);
-  aTableView->verticalHeader()->setVisible (true);
-  DFBrowserPane_ItemDelegateButton* anItemDelegate = new DFBrowserPane_ItemDelegateButton (aTableView,
-                                                                                           ":/icons/export_shape.png");
-  QObject::connect (anItemDelegate, SIGNAL (buttonPressed (const QModelIndex&)),
-                    &myHelperExport, SLOT (OnButtonPressed (const QModelIndex&)));
-  aTableView->setItemDelegateForColumn (2, anItemDelegate);
-
-  QGridLayout* aLay = new QGridLayout (aMainWidget);
-  aLay->setContentsMargins (0, 0, 0, 0);
-  aLay->addWidget (myTableView, 0, 0);
-
-  return aMainWidget;
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocShapeMapTool::Init (const Handle(TDF_Attribute)& theAttribute)
-{
-  DFBrowserPane_AttributePaneAPI::Init (theAttribute);
-}
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocShapeMapTool::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_ShapeMapTool) anAttr = Handle(XCAFDoc_ShapeMapTool)::DownCast (theAttribute);
-
-  const TopTools_IndexedMapOfShape& aShapeMap = anAttr->GetMap();
-  for (int aShapeValueId = 1, aNbShapes = aShapeMap.Extent(); aShapeValueId <= aNbShapes; aShapeValueId++)
-  {
-    const TopoDS_Shape& aShape = aShapeMap(aShapeValueId);
-
-    if (!aShape.IsNull())
-      theValues << Standard_Dump::GetPointerInfo (aShape.TShape()->This()).ToCString()
-                << DFBrowserPane_Tools::ShapeTypeInfo (aShape)
-                << "";
-    else
-      theValues << "" << "" << "";
-  }
-}
-
-// =======================================================================
-// function : GetShortAttributeInfo
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocShapeMapTool::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                                  QList<QVariant>& theValues)
-{
-  Handle(XCAFDoc_ShapeMapTool) anAttr = Handle(XCAFDoc_ShapeMapTool)::DownCast (theAttribute);
-  theValues.append (QString ("[%1]").arg (anAttr->GetMap().Extent()));
-}
-
-// =======================================================================
-// function : GetPresentation
-// purpose :
-// =======================================================================
-Handle(Standard_Transient) DFBrowserPaneXDE_XCAFDocShapeMapTool::GetPresentation (const Handle(TDF_Attribute)& theAttribute)
-{
-  Handle(AIS_InteractiveObject) aPresentation;
-
-  Handle(XCAFDoc_ShapeMapTool) anAttr = Handle(XCAFDoc_ShapeMapTool)::DownCast (theAttribute);
-  if (anAttr.IsNull())
-    return aPresentation;
-
-  BRep_Builder aBuilder;
-  TopoDS_Compound aComp;
-  aBuilder.MakeCompound (aComp);
-
-  const TopTools_IndexedMapOfShape& aShapeMap = anAttr->GetMap();
-  for (int aShapeValueId = 1, aNbShapes = aShapeMap.Extent(); aShapeValueId <= aNbShapes; aShapeValueId++)
-  {
-    const TopoDS_Shape& aShape = aShapeMap(aShapeValueId);
-    if (!aShape.IsNull())
-      aBuilder.Add (aComp, aShape);
-  }
-  aPresentation = new AIS_Shape (aComp);
-  return aPresentation;
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx
deleted file mode 100644 (file)
index 1090cce..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocShapeMapTool_H
-#define DFBrowserPaneXDE_XCAFDocShapeMapTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <inspector/DFBrowserPane_HelperExport.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-class DFBrowserPane_TableView;
-class QWidget;
-
-//! \class DFBrowserPaneXDE_
-//! \brief The class to manipulate of XCAFDoc_ShapeMapTool attribute
-class DFBrowserPaneXDE_XCAFDocShapeMapTool : public DFBrowserPane_AttributePane
-{
-public:
-  //! Constructor
-  Standard_EXPORT DFBrowserPaneXDE_XCAFDocShapeMapTool();
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocShapeMapTool() {}
-
-  //! Creates table view and call create widget of array table helper
-  //! \param theParent a parent widget
-  //! \return a new widget
-  Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
-
-  //! Initializes the content of the pane by the parameter attribute
-  //! \param theAttribute an OCAF attribute
-  Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-  //! Returns brief attribute information. In general case, it returns GetValues() result.
-  //! \param theAttribute a current attribute
-  //! \param theValues a result list of values
-  Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
-                                                      QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-
-  //! Returns presentation of the attribute to be visualized in the view
-  //! \param theAttribute a current attribute
-  //! \return handle of presentation if the attribute has, to be visualized
-  Standard_EXPORT virtual Handle(Standard_Transient) GetPresentation
-    (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
-
-private:
-
-  DFBrowserPane_HelperExport myHelperExport; //!< processing of Export button click
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx
deleted file mode 100644 (file)
index 7a7aa80..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
-
-#include <XCAFDoc_ShapeTool.hxx>
-
-// =======================================================================
-// function : GetValues
-// purpose :
-// =======================================================================
-void DFBrowserPaneXDE_XCAFDocShapeTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
-{
-}
-
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx
deleted file mode 100644 (file)
index 703bbda..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef DFBrowserPaneXDE_XCAFDocShapeTool_H
-#define DFBrowserPaneXDE_XCAFDocShapeTool_H
-
-#include <inspector/DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_
-//! \brief The class to manipulate of XCAFDoc_ShapeTool attribute
-class DFBrowserPaneXDE_XCAFDocShapeTool : public DFBrowserPane_AttributePane
-{
-public:
-
-  //! Constructor
-  DFBrowserPaneXDE_XCAFDocShapeTool() {}
-
-  //! Destructor
-  virtual ~DFBrowserPaneXDE_XCAFDocShapeTool() {}
-
-  //! Returns values to fill the table view model
-  //! \param theAttribute a current attribute
-  //! \param theValues a container of values
-  Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
-                                          QList<QVariant>& theValues) Standard_OVERRIDE;
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx
deleted file mode 100644 (file)
index a3b7632..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/DFBrowserPaneXDE_XDEDRAW.hxx>
-
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_HAsciiString.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-
-#include <TDataStd_AsciiString.hxx>
-#include <TDataStd_ByteArray.hxx>
-#include <TDataStd_Comment.hxx>
-#include <TDataStd_Integer.hxx>
-#include <TDataStd_IntegerArray.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDataStd_Real.hxx>
-#include <TDataStd_RealArray.hxx>
-#include <TDataStd_TreeNode.hxx>
-#include <TDataStd_UAttribute.hxx>
-
-#include <TDF_Reference.hxx>
-#include <TDF_Tool.hxx>
-
-#include <TNaming_NamedShape.hxx>
-#include <TopoDS_Shape.hxx>
-
-#include <XCAFDoc.hxx>
-#include <XCAFDoc_Area.hxx>
-#include <XCAFDoc_Centroid.hxx>
-#include <XCAFDoc_Color.hxx>
-#include <XCAFDoc_ColorTool.hxx>
-#include <XCAFDoc_DimTol.hxx>
-#include <XCAFDoc_Dimension.hxx>
-#include <XCAFDoc_GeomTolerance.hxx>
-#include <XCAFDoc_Datum.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-#include <XCAFDoc_GraphNode.hxx>
-#include <XCAFDoc_LayerTool.hxx>
-#include <XCAFDoc_Material.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-#include <XCAFDoc_Volume.hxx>
-
-// =======================================================================
-// function : GetAttributeInfo
-// purpose :
-// =======================================================================
-TCollection_AsciiString DFBrowserPaneXDE_XDEDRAW::GetAttributeInfo (Handle(TDF_Attribute) att)
-{
-  TCollection_AsciiString anInfo;
-
-  if ( att->IsKind(STANDARD_TYPE (TDataStd_TreeNode)) ) {
-    Standard_CString type = "";
-    if ( att->ID() == XCAFDoc::ShapeRefGUID() ) type = "Shape Instance Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorGen) ) type = "Generic Color Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorSurf) ) type = "Surface Color Link";
-    else if ( att->ID() == XCAFDoc::ColorRefGUID(XCAFDoc_ColorCurv) ) type = "Curve Color Link";
-    else if ( att->ID() == XCAFDoc::DimTolRefGUID() ) type = "DGT Link";
-    else if ( att->ID() == XCAFDoc::DatumRefGUID() ) type = "Datum Link";
-    else if ( att->ID() == XCAFDoc::MaterialRefGUID() ) type = "Material Link";
-    Handle(TDataStd_TreeNode) TN = Handle(TDataStd_TreeNode)::DownCast (att);
-    TCollection_AsciiString ref;
-    if ( TN->HasFather() ) {
-      TDF_Tool::Entry ( TN->Father()->Label(), ref );
-      anInfo = type;
-      anInfo += TCollection_AsciiString (" ==> ") + ref.ToCString();
-    }
-    else {
-      anInfo = type;
-      anInfo += TCollection_AsciiString (" <== (") + ref.ToCString();
-      Handle(TDataStd_TreeNode) child = TN->First();
-      while ( ! child.IsNull() ) {
-        TDF_Tool::Entry ( child->Label(), ref );
-        if ( child != TN->First() ) anInfo +=  ", " ;
-        anInfo += ref.ToCString();
-        child = child->Next();
-      }
-      anInfo += ")";
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDF_Reference)) ) {
-    Handle(TDF_Reference) val = Handle(TDF_Reference)::DownCast ( att );
-    TCollection_AsciiString ref;
-    TDF_Tool::Entry ( val->Get(), ref );
-    anInfo += TCollection_AsciiString ("==> ") + ref.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_Integer)) ) {
-    Handle(TDataStd_Integer) val = Handle(TDataStd_Integer)::DownCast ( att );
-    anInfo = TCollection_AsciiString ( val->Get() );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_Real)) ) {
-    Handle(TDataStd_Real) val = Handle(TDataStd_Real)::DownCast ( att );
-    anInfo = TCollection_AsciiString ( val->Get() );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_Name)) ) {
-    Handle(TDataStd_Name) val = Handle(TDataStd_Name)::DownCast ( att );
-    anInfo = TCollection_AsciiString ( val->Get(), '?' );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_Comment)) ) {
-    Handle(TDataStd_Comment) val = Handle(TDataStd_Comment)::DownCast ( att );
-    anInfo = TCollection_AsciiString ( val->Get(), '?' );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_AsciiString)) ) {
-    Handle(TDataStd_AsciiString) val = Handle(TDataStd_AsciiString)::DownCast ( att );
-    anInfo = TCollection_AsciiString ( val->Get(), '?' );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_IntegerArray)) ) {
-    Handle(TDataStd_IntegerArray) val = Handle(TDataStd_IntegerArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
-      anInfo += TCollection_AsciiString ( val->Value(j) );
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_RealArray)) ) {
-    Handle(TDataStd_RealArray) val = Handle(TDataStd_RealArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
-      anInfo += TCollection_AsciiString ( val->Value(j) );
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_ByteArray)) ) {
-    Handle(TDataStd_ByteArray) val = Handle(TDataStd_ByteArray)::DownCast ( att );
-    for ( Standard_Integer j=val->Lower(); j <= val->Upper(); j++ ) {
-      if ( j > val->Lower() ) anInfo += TCollection_AsciiString ( ", " );
-      anInfo += TCollection_AsciiString ( val->Value(j) );
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TNaming_NamedShape)) ) {
-    Handle(TNaming_NamedShape) val = Handle(TNaming_NamedShape)::DownCast ( att );
-    TopoDS_Shape S = val->Get();
-    if (!S.IsNull())
-      anInfo = S.TShape()->DynamicType()->Name();
-    else
-      anInfo = "Empty Shape";
-    if ( ! S.Location().IsIdentity() ) anInfo += TCollection_AsciiString ( "(located)" );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_Volume)) ) {
-    Handle(XCAFDoc_Volume) val = Handle(XCAFDoc_Volume)::DownCast ( att );
-    anInfo += TCollection_AsciiString ( val->Get() );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_Area)) ) {
-    Handle(XCAFDoc_Area) val = Handle(XCAFDoc_Area)::DownCast ( att );
-    TCollection_AsciiString str ( val->Get() );
-    anInfo = str.ToCString();
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_Centroid)) ) {
-    Handle(XCAFDoc_Centroid) val = Handle(XCAFDoc_Centroid)::DownCast ( att );
-    gp_Pnt myCentroid = val->Get();
-    anInfo = "(" ;
-    anInfo += TCollection_AsciiString ( myCentroid.X() ).ToCString();
-    anInfo += TCollection_AsciiString ( " , " );
-    anInfo += TCollection_AsciiString ( TCollection_AsciiString ( myCentroid.Y() ).ToCString() );
-    anInfo += TCollection_AsciiString ( " , " );
-    anInfo += TCollection_AsciiString ( myCentroid.Z() ).ToCString();
-    anInfo += TCollection_AsciiString ( ")" );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (TDataStd_UAttribute)) ) {
-    if ( att->ID() == XCAFDoc::AssemblyGUID() ) anInfo += TCollection_AsciiString ( "is assembly" );
-    if ( att->ID() == XCAFDoc::InvisibleGUID() ) anInfo += TCollection_AsciiString ( "invisible" );
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_Color)) ) {
-    Handle(XCAFDoc_Color) val = Handle(XCAFDoc_Color)::DownCast ( att );
-    Quantity_Color C = val->GetColor();
-    char string[260];
-    Sprintf ( string, "%s (%g, %g, %g)", C.StringName ( C.Name() ),
-              C.Red(), C.Green(), C.Blue() );
-    anInfo = string;
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_DimTol)) ) {
-    Handle(XCAFDoc_DimTol) val = Handle(XCAFDoc_DimTol)::DownCast ( att );
-    Standard_Integer kind = val->GetKind();
-    Handle(TColStd_HArray1OfReal) HAR = val->GetVal();
-    if(kind<20) { //dimension
-      anInfo = "Diameter (ValueRange[";
-      anInfo += TCollection_AsciiString ( HAR->Value(1) );
-      anInfo += TCollection_AsciiString ( "," );
-      anInfo += TCollection_AsciiString ( HAR->Value(2) );
-      anInfo += TCollection_AsciiString ( "])" );
-    }
-    else {
-      switch (kind) {
-      case 21: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_1"; break;
-      case 22: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_2"; break;
-      case 23: anInfo = "GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol_3"; break;
-      case 24: anInfo = "AngularityTolerance"; break;
-      case 25: anInfo = "CircularRunoutTolerance"; break;
-      case 26: anInfo = "CoaxialityTolerance"; break;
-      case 27: anInfo = "ConcentricityTolerance"; break;
-      case 28: anInfo = "ParallelismTolerance"; break;
-      case 29: anInfo = "PerpendicularityTolerance"; break;
-      case 30: anInfo = "SymmetryTolerance"; break;
-      case 31: anInfo = "TotalRunoutTolerance"; break;
-      case 35: anInfo = "ModifiedGeometricTolerance_1"; break;
-      case 36: anInfo = "ModifiedGeometricTolerance_2"; break;
-      case 37: anInfo = "ModifiedGeometricTolerance_3"; break;
-      case 38: anInfo = "CylindricityTolerance"; break;
-      case 39: anInfo = "FlatnessTolerance"; break;
-      case 40: anInfo = "LineProfileTolerance"; break;
-      case 41: anInfo = "PositionTolerance"; break;
-      case 42: anInfo = "RoundnessTolerance"; break;
-      case 43: anInfo = "StraightnessTolerance"; break;
-      case 44: anInfo = "SurfaceProfileTolerance"; break;
-      }
-      if (anInfo.Length() > 0) {
-        anInfo += " (Value=";
-        anInfo += TCollection_AsciiString (HAR->Value (1));
-        anInfo += ")";
-      }
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_Material)) ) {
-    Handle(XCAFDoc_Material) val = Handle(XCAFDoc_Material)::DownCast ( att );
-    Standard_Real dens = val->GetDensity();
-    Standard_CString dimdens = "g/cu sm";
-    if(dens==0) 
-      anInfo = val->GetName()->ToCString();
-    else {
-      anInfo = val->GetName()->ToCString();
-      anInfo += "(density=";
-      anInfo += TCollection_AsciiString ( dens );
-      anInfo += dimdens;
-      anInfo += ")";
-    }
-  }
-  else if ( att->IsKind(STANDARD_TYPE (XCAFDoc_GraphNode)) ) {
-    Standard_CString type;
-    if ( att->ID() == XCAFDoc::LayerRefGUID() ) {
-      type = "Layer Instance Link";
-    }
-    else if ( att->ID() == XCAFDoc::SHUORefGUID() ) {
-      type = "SHUO Instance Link";
-    }
-    else if ( att->ID() == XCAFDoc::DatumTolRefGUID() ) {
-      type = "DatumToler Link";
-    }
-    else if ( att->ID() == XCAFDoc::DimensionRefFirstGUID() ) {
-      type = "Dimension Link First";
-    }
-    else if ( att->ID() == XCAFDoc::DimensionRefSecondGUID() ) {
-      type = "Dimension Link Second";
-    }
-    else if ( att->ID() == XCAFDoc::GeomToleranceRefGUID() ){
-      type = "GeomTolerance Link";
-    }
-    else
-      return TCollection_AsciiString();
-
-    Handle(XCAFDoc_GraphNode) DETGN = Handle(XCAFDoc_GraphNode)::DownCast (att);
-    TCollection_AsciiString ref;
-    Standard_Integer ii = 1;
-    if (DETGN->NbFathers()!=0) {
-
-      TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
-      anInfo = type;
-      anInfo += " ==> (";
-      anInfo += ref;
-      for (ii = 2; ii <= DETGN->NbFathers(); ii++) {
-        TDF_Tool::Entry ( DETGN->GetFather(ii)->Label(), ref );
-        anInfo += ", ";
-        anInfo += ref.ToCString();
-      }
-      anInfo += ") ";
-    }
-    ii = 1;
-    if (DETGN->NbChildren ()!=0) {
-      TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
-      anInfo += type;
-      anInfo += " <== (";
-      anInfo += ref;
-      for (ii = 2; ii <= DETGN->NbChildren (); ii++) {
-        TDF_Tool::Entry ( DETGN->GetChild(ii)->Label(), ref );
-        anInfo += ", ";
-        anInfo += ref;
-      }
-      anInfo += ") ";
-    }
-  }
-  return anInfo;
-}
diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.hxx
deleted file mode 100644 (file)
index ac8cf37..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef _DFBrowserPaneXDE_XDEDRAW__H
-#define _DFBrowserPaneXDE_XDEDRAW__H
-
-#include <Standard.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TDF_Attribute.hxx>
-
-//! \class DFBrowserPaneXDE_XDEDRAW
-//! \brief The tool that gives auxiliary methods for XDE elements manipulation
-class DFBrowserPaneXDE_XDEDRAW
-{
-public:
-  //! Dumps the attribute information into a string. The similar information is provided in Draw for XDE format
-  //! \param theAttribute
-  //! \return the GUID value
-  Standard_EXPORT static TCollection_AsciiString GetAttributeInfo (Handle(TDF_Attribute) theAttribute);
-};
-
-#endif
diff --git a/tools/DFBrowserPaneXDE/FILES b/tools/DFBrowserPaneXDE/FILES
deleted file mode 100644 (file)
index 7da2747..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-DFBrowserPaneXDE_AttributeCommonPane.cxx
-DFBrowserPaneXDE_AttributeCommonPane.hxx
-DFBrowserPaneXDE_AttributePaneCreator.cxx
-DFBrowserPaneXDE_AttributePaneCreator.hxx
-DFBrowserPaneXDE_Tools.cxx
-DFBrowserPaneXDE_Tools.hxx
-DFBrowserPaneXDE_XCAFDocArea.cxx
-DFBrowserPaneXDE_XCAFDocArea.hxx
-DFBrowserPaneXDE_XCAFDocCentroid.cxx
-DFBrowserPaneXDE_XCAFDocCentroid.hxx
-DFBrowserPaneXDE_XCAFDocColor.cxx
-DFBrowserPaneXDE_XCAFDocColor.hxx
-DFBrowserPaneXDE_XCAFDocColorTool.cxx
-DFBrowserPaneXDE_XCAFDocColorTool.hxx
-DFBrowserPaneXDE_XCAFDocDatum.cxx
-DFBrowserPaneXDE_XCAFDocDatum.hxx
-DFBrowserPaneXDE_XCAFDocDimension.cxx
-DFBrowserPaneXDE_XCAFDocDimension.hxx
-DFBrowserPaneXDE_XCAFDocDimTol.cxx
-DFBrowserPaneXDE_XCAFDocDimTol.hxx
-DFBrowserPaneXDE_XCAFDocDimTolTool.cxx
-DFBrowserPaneXDE_XCAFDocDimTolTool.hxx
-DFBrowserPaneXDE_XCAFDocDocumentTool.cxx
-DFBrowserPaneXDE_XCAFDocDocumentTool.hxx
-DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx
-DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx
-DFBrowserPaneXDE_XCAFDocGraphNode.cxx
-DFBrowserPaneXDE_XCAFDocGraphNode.hxx
-DFBrowserPaneXDE_XCAFDocLayerTool.cxx
-DFBrowserPaneXDE_XCAFDocLayerTool.hxx
-DFBrowserPaneXDE_XCAFDocLocation.cxx
-DFBrowserPaneXDE_XCAFDocLocation.hxx
-DFBrowserPaneXDE_XCAFDocMaterial.cxx
-DFBrowserPaneXDE_XCAFDocMaterial.hxx
-DFBrowserPaneXDE_XCAFDocMaterialTool.cxx
-DFBrowserPaneXDE_XCAFDocMaterialTool.hxx
-DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx
-DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx
-DFBrowserPaneXDE_XCAFDocShapeTool.cxx
-DFBrowserPaneXDE_XCAFDocShapeTool.hxx
-DFBrowserPaneXDE_XDEDRAW.cxx
-DFBrowserPaneXDE_XDEDRAW.hxx
diff --git a/tools/MessageModel/FILES b/tools/MessageModel/FILES
new file mode 100644 (file)
index 0000000..dd94755
--- /dev/null
@@ -0,0 +1,14 @@
+MessageModel.qrc
+MessageModel_Actions.cxx
+MessageModel_Actions.hxx
+MessageModel_ActionType.hxx
+MessageModel_ItemAlert.cxx
+MessageModel_ItemAlert.hxx
+MessageModel_ItemBase.cxx
+MessageModel_ItemBase.hxx
+MessageModel_ItemReport.cxx
+MessageModel_ItemReport.hxx
+MessageModel_ItemRoot.cxx
+MessageModel_ItemRoot.hxx
+MessageModel_TreeModel.cxx
+MessageModel_TreeModel.hxx
diff --git a/tools/MessageModel/MessageModel.qrc b/tools/MessageModel/MessageModel.qrc
new file mode 100644 (file)
index 0000000..8b794a8
--- /dev/null
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+    <qresource>
+        <file>icons/item_shape.png</file>
+        <file>icons/item_streamValues.png</file>
+    </qresource>
+</RCC>
diff --git a/tools/MessageModel/MessageModel_ActionType.hxx b/tools/MessageModel/MessageModel_ActionType.hxx
new file mode 100644 (file)
index 0000000..52b059a
--- /dev/null
@@ -0,0 +1,31 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_ActionType_H
+#define MessageModel_ActionType_H
+
+//! Kind of action type for tree view context menu item
+enum MessageModel_ActionType
+{
+  MessageModel_ActionType_Activate, //!< set Message_Report active
+  MessageModel_ActionType_Deactivate, //!< set Message_Report not active
+  MessageModel_ActionType_Clear, //!< clear Message_Report alerts
+  MessageModel_ActionType_ExportToShapeView, //!< export TopoDS_Shape of selected item into TKShapeView plugin
+  MessageModel_ActionType_TestMetric, //!< test alerts
+  MessageModel_ActionType_TestMessenger, //!< test message view on messenger printer to report
+  MessageModel_ActionType_TestReportTree //!< test message view on hierarchical report
+};
+
+#endif
diff --git a/tools/MessageModel/MessageModel_Actions.cxx b/tools/MessageModel/MessageModel_Actions.cxx
new file mode 100644 (file)
index 0000000..cca845d
--- /dev/null
@@ -0,0 +1,263 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_Actions.hxx>
+
+#include <inspector/MessageModel_ItemReport.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_TreeModel.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+#include <inspector/ViewControl_Tools.hxx>
+
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <Message.hxx>
+#include <Message_AlertExtended.hxx>
+#include <Message_Messenger.hxx>
+#include <Message_PrinterToReport.hxx>
+#include <OSD_Chronometer.hxx>
+#include <Quantity_Color.hxx>
+#include <Quantity_ColorRGBA.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopoDS_AlertAttribute.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QAction>
+#include <QFileDialog>
+#include <QItemSelectionModel>
+#include <QMenu>
+#include <QMessageBox>
+#include <QWidget>
+#include <Standard_WarningsRestore.hxx>
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+MessageModel_Actions::MessageModel_Actions (QWidget* theParent,
+                                            MessageModel_TreeModel* theTreeModel,
+                                            QItemSelectionModel* theModel)
+: QObject (theParent), myTreeModel (theTreeModel), mySelectionModel (theModel)
+{
+  myActions.insert (MessageModel_ActionType_Activate,
+                    ViewControl_Tools::CreateAction (tr ("Activate"), SLOT (OnActivateReport()), parent(), this));
+  myActions.insert (MessageModel_ActionType_Deactivate,
+                    ViewControl_Tools::CreateAction (tr ("Deactivate"), SLOT (OnDeactivateReport()), parent(), this));
+  myActions.insert (MessageModel_ActionType_Clear,
+                    ViewControl_Tools::CreateAction (tr ("Clear"), SLOT (OnClearReport()), parent(), this));
+  myActions.insert (MessageModel_ActionType_ExportToShapeView,
+                    ViewControl_Tools::CreateAction (tr ("Export to ShapeView"), SLOT (OnExportToShapeView()), parent(), this));
+}
+
+// =======================================================================
+// function : GetAction
+// purpose :
+// =======================================================================
+QAction* MessageModel_Actions::GetAction (const MessageModel_ActionType& theType)
+{
+  return myActions.contains (theType) ? myActions[theType] : 0;
+}
+
+// =======================================================================
+// function : AddMenuActions
+// purpose :
+// =======================================================================
+void MessageModel_Actions::AddMenuActions (const QModelIndexList& theSelectedIndices, QMenu* theMenu)
+{
+  MessageModel_ItemRootPtr aRootItem;
+  MessageModel_ItemReportPtr aReportItem;
+  MessageModel_ItemAlertPtr anAlertItem;
+  for (QModelIndexList::const_iterator aSelIt = theSelectedIndices.begin(); aSelIt != theSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    aRootItem = itemDynamicCast<MessageModel_ItemRoot> (anItemBase);
+    if (aRootItem)
+      break;
+
+    aReportItem = itemDynamicCast<MessageModel_ItemReport> (anItemBase);
+    if (aReportItem)
+      break;
+
+    anAlertItem = itemDynamicCast<MessageModel_ItemAlert> (anItemBase);
+    if (anAlertItem)
+      break;
+  }
+
+  if (aReportItem && !aReportItem->GetReport().IsNull())
+  {
+    theMenu->addAction (myActions[MessageModel_ActionType_Deactivate]);
+    theMenu->addAction (myActions[MessageModel_ActionType_Activate]);
+    theMenu->addAction (myActions[MessageModel_ActionType_Clear]);
+  }
+  else if (anAlertItem)
+  {
+    theMenu->addAction (myActions[MessageModel_ActionType_ExportToShapeView]);
+  }
+
+  theMenu->addSeparator();
+}
+
+// =======================================================================
+// function : getSelectedReport
+// purpose :
+// =======================================================================
+Handle(Message_Report) MessageModel_Actions::getSelectedReport (QModelIndex& theReportIndex) const
+{
+  MessageModel_ItemReportPtr aReportItem;
+  QModelIndexList aSelectedIndices = mySelectionModel->selectedIndexes();
+  for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    aReportItem = itemDynamicCast<MessageModel_ItemReport> (anItemBase);
+    theReportIndex = anIndex;
+    if (aReportItem)
+      break;
+  }
+  if (!aReportItem)
+    return NULL;
+
+  return aReportItem->GetReport();
+}
+
+// =======================================================================
+// function : OnActivateReport
+// purpose :
+// =======================================================================
+static Handle(Message_PrinterToReport) MyPrinterToReport;
+static Message_SequenceOfPrinters MyDeactivatedPrinters;
+
+void MessageModel_Actions::OnActivateReport()
+{
+  if (MyPrinterToReport.IsNull())
+    MyPrinterToReport = new Message_PrinterToReport();
+
+  if (MyPrinterToReport->Report()->IsActiveInMessenger())
+    return;
+
+  MyDeactivatedPrinters = Message::DefaultMessenger()->Printers();
+  Message::DefaultMessenger()->ChangePrinters().Clear();
+
+  Message::DefaultMessenger()->AddPrinter (MyPrinterToReport);
+  Message::DefaultReport()->UpdateActiveInMessenger();
+
+  myTreeModel->UpdateTreeModel();
+}
+
+// =======================================================================
+// function : OnDeactivateReport
+// purpose :
+// =======================================================================
+void MessageModel_Actions::OnDeactivateReport()
+{
+  if (MyPrinterToReport.IsNull() || !MyPrinterToReport->Report()->IsActiveInMessenger())
+    return;
+
+  Message::DefaultMessenger()->RemovePrinter (MyPrinterToReport);
+  Message::DefaultMessenger()->ChangePrinters().Assign (MyDeactivatedPrinters);
+
+  myTreeModel->UpdateTreeModel();
+}
+
+// =======================================================================
+// function : OnClearReport
+// purpose :
+// =======================================================================
+void MessageModel_Actions::OnClearReport()
+{
+  QModelIndex aReportIndex;
+  Handle(Message_Report) aReport = getSelectedReport (aReportIndex);
+  if (aReport.IsNull())
+    return;
+
+  aReport->Clear();
+  myTreeModel->UpdateTreeModel();
+}
+
+// =======================================================================
+// function : OnExportToShapeView
+// purpose :
+// =======================================================================
+void MessageModel_Actions::OnExportToShapeView()
+{
+  TCollection_AsciiString aPluginName ("TKShapeView");
+
+  NCollection_List<Handle(Standard_Transient)> aPluginParameters;
+  if (myParameters->FindParameters (aPluginName))
+    aPluginParameters = myParameters->Parameters (aPluginName);
+  NCollection_List<TCollection_AsciiString> anItemNames;
+  if (myParameters->FindSelectedNames (aPluginName))
+    anItemNames = myParameters->GetSelectedNames (aPluginName);
+
+  QModelIndexList aSelectedIndices = mySelectionModel->selectedIndexes();
+  QStringList anExportedPointers;
+  for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    MessageModel_ItemAlertPtr anAlertItem = itemDynamicCast<MessageModel_ItemAlert> (anItemBase);
+    if (!anAlertItem)
+      continue;
+
+    Handle(Message_Alert) anAlert = anAlertItem->GetAlert();
+    if (anAlert.IsNull())
+      continue;
+
+    Handle(Message_AlertExtended) anExtAlert = Handle(Message_AlertExtended)::DownCast (anAlert);
+    if (anExtAlert.IsNull())
+      continue;
+
+    Handle(Message_Attribute) anAttribute = anExtAlert->Attribute();
+    if (anAttribute.IsNull())
+      continue;
+
+    if (!anAttribute->IsKind (STANDARD_TYPE (TopoDS_AlertAttribute)))
+      continue;
+
+    const TopoDS_Shape aShape = Handle(TopoDS_AlertAttribute)::DownCast (anAttribute)->GetShape();
+    if (aShape.IsNull())
+      continue;
+    aPluginParameters.Append (aShape.TShape());
+    anItemNames.Append (TInspectorAPI_PluginParameters::ParametersToString (aShape));
+
+    anExportedPointers.append (Standard_Dump::GetPointerInfo (aShape.TShape(), true).ToCString());
+  }
+
+  if (anExportedPointers.empty())
+      return;
+  myParameters->SetSelectedNames (aPluginName, anItemNames);
+  myParameters->SetParameters (aPluginName, aPluginParameters);
+  QMessageBox::information (0, "Information", QString ("TShapes '%1' are sent to %2 tool.")
+    .arg (anExportedPointers.join (", ")).arg (QString (aPluginName.ToCString())));
+}
diff --git a/tools/MessageModel/MessageModel_Actions.hxx b/tools/MessageModel/MessageModel_Actions.hxx
new file mode 100644 (file)
index 0000000..091a69d
--- /dev/null
@@ -0,0 +1,98 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_Actions_H
+#define MessageModel_Actions_H
+
+#include <Standard.hxx>
+#include <Standard_Transient.hxx>
+
+#include <inspector/MessageModel_ActionType.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QObject>
+#include <QMap>
+#include <QModelIndexList>
+#include <QPoint>
+#include <QString>
+#include <Standard_WarningsRestore.hxx>
+
+class Message_Report;
+class MessageModel_TreeModel;
+
+class QAction;
+class QItemSelectionModel;
+class QMenu;
+class QWidget;
+
+//! \class MessageModel_Actions
+//! \brief This is a listener of popup context menu items and selection change in message model
+class MessageModel_Actions : public QObject
+{
+  Q_OBJECT
+
+public:
+
+  //! Constructor
+  Standard_EXPORT MessageModel_Actions (QWidget* theParent,
+                                        MessageModel_TreeModel* theTreeModel,
+                                        QItemSelectionModel* theModel);
+
+  //! Destructor
+  virtual ~MessageModel_Actions() Standard_OVERRIDE {}
+
+  //! Returns action by the type
+  //! \param theType an action type
+  //! \return an action instance if it exists
+  Standard_EXPORT QAction* GetAction (const MessageModel_ActionType& theType);
+
+  //! Fills popup menu with actions depending on the current selection
+  //! \param theSelectedIndices tree model selected indices
+  //! \param theMenu menu to be filled
+  Standard_EXPORT void AddMenuActions (const QModelIndexList& theSelectedIndices, QMenu* theMenu);
+
+  //! Sets parameters container, it should be used when the plugin is initialized or in update content
+  //! \param theParameters a parameters container
+  void SetParameters (const Handle(TInspectorAPI_PluginParameters)& theParameters)
+  { myParameters = theParameters; }
+
+public slots:
+  //! Set selected report active
+  void OnActivateReport();
+
+  //! Set selected report not active
+  void OnDeactivateReport();
+
+  //! Clears container of alerts of selected report
+  void OnClearReport();
+
+  //! Exports the first selected shape into ShapeViewer plugin.
+  void OnExportToShapeView();
+
+protected:
+  //! Returns report of selected tree view item if a report item is selected
+  //! \param theReportIndex tree model index of the found report
+  //! \return report instance or NULL
+  Handle(Message_Report) getSelectedReport (QModelIndex& theReportIndex) const;
+
+protected:
+  MessageModel_TreeModel* myTreeModel; //< tree model
+  QItemSelectionModel* mySelectionModel; //< selection model
+  Handle(TInspectorAPI_PluginParameters) myParameters; //!< plugins parameters container
+  QMap<MessageModel_ActionType, QAction*> myActions; //!< container of all actions
+};
+
+#endif
diff --git a/tools/MessageModel/MessageModel_ItemAlert.cxx b/tools/MessageModel/MessageModel_ItemAlert.cxx
new file mode 100644 (file)
index 0000000..e25378e
--- /dev/null
@@ -0,0 +1,327 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_ItemAlert.hxx>
+
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_ItemReport.hxx>
+#include <inspector/MessageModel_TreeModel.hxx>
+
+#include <inspector/Convert_TransientShape.hxx>
+#include <inspector/TreeModel_ItemProperties.hxx>
+#include <inspector/TreeModel_Tools.hxx>
+#include <inspector/ViewControl_Tools.hxx>
+
+#include <Message_AlertExtended.hxx>
+#include <Message_AttributeMeter.hxx>
+#include <Message_AttributeStream.hxx>
+#include <Message_CompositeAlerts.hxx>
+#include <Precision.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopoDS_AlertAttribute.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QColor>
+#include <QIcon>
+#include <Standard_WarningsRestore.hxx>
+
+// =======================================================================
+// function : initValue
+// purpose :
+// =======================================================================
+QVariant MessageModel_ItemAlert::initValue (const int theRole) const
+{
+  QVariant aParentValue = MessageModel_ItemBase::initValue (theRole);
+  if (aParentValue.isValid())
+    return aParentValue;
+
+  MessageModel_ItemReportPtr aReportItem = MessageModel_ItemReport::FindReportItem (Parent());
+  if (!aReportItem)
+    return QVariant();
+
+  Handle(Message_Report) aReport = aReportItem->GetReport();
+  if (aReport.IsNull())
+    return QVariant();
+
+  if (theRole == Qt::ForegroundRole)
+  {
+    if (!aReport->IsActiveInMessenger())
+      return QColor(Qt::darkGray);
+
+    return QVariant();
+  }
+
+  Handle(Message_Alert) anAlert = getAlert();
+  Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast(anAlert);
+
+  // if the alert is composite, process the real alert
+  if (theRole == Qt::DecorationRole && Column() == 0)
+  {
+    if (anExtendedAlert.IsNull())
+      return QVariant();
+
+    Handle(Message_Attribute) anAttribute = anExtendedAlert->Attribute();
+    if (anAttribute.IsNull())
+      return QVariant();
+
+    if (anAttribute->IsKind (STANDARD_TYPE (TopoDS_AlertAttribute)))
+      return QIcon (":/icons/item_shape.png");
+    else if (!Handle(Message_AttributeStream)::DownCast (anAttribute).IsNull())
+      return QIcon (":/icons/item_streamValues.png");
+    else
+      return QVariant();
+  }
+
+  if (theRole != Qt::DisplayRole && theRole != Qt::ToolTipRole)
+    return QVariant();
+
+  if (anAlert.IsNull())
+    return QVariant();
+
+  if (Column() == 0)
+  {
+    if (theRole == Qt::DisplayRole)
+    {
+      TCollection_AsciiString aMessageKey = anAlert->GetMessageKey();
+      if (aMessageKey.IsEmpty() && !Properties().IsNull())
+        aMessageKey = Properties()->Key();
+      return aMessageKey.ToCString();
+    }
+    else
+      return anAlert->DynamicType()->Name();
+  }
+
+  Message_MetricType aMetricType;
+  int aPosition;
+  if (MessageModel_TreeModel::IsMetricColumn (Column(), aMetricType, aPosition))
+  {
+    if (anExtendedAlert.IsNull())
+      return QVariant();
+
+    Handle(Message_AttributeMeter) anAttribute = Handle(Message_AttributeMeter)::DownCast (anExtendedAlert->Attribute());
+    if (anAttribute.IsNull() || !anAttribute->HasMetric (aMetricType))
+      return QVariant();
+
+    if (!anAttribute->IsMetricValid (aMetricType))
+      return QVariant ("in process");
+
+    if (aMetricType == Message_MetricType_ProcessCPUUserTime ||
+        aMetricType == Message_MetricType_ProcessCPUSystemTime ||
+        aMetricType == Message_MetricType_WallClock)
+    {
+      Standard_Real aCumulativeMetric = anAttribute->StopValue (aMetricType) - anAttribute->StartValue (aMetricType);
+      if (fabs (aCumulativeMetric) < Precision::Confusion())
+        return QVariant();
+
+      if (aPosition == 0) return aCumulativeMetric;
+      else if (aPosition == 1)
+      {
+        Standard_Real aReportCumulativeMetric = MessageModel_ItemReport::CumulativeMetric (aReport, aMetricType);
+        if (fabs (aReportCumulativeMetric) > Precision::Confusion())
+          return 100. * aCumulativeMetric / aReportCumulativeMetric;
+        else
+          return QVariant();
+      }
+    }
+    else
+    {
+      if (aPosition == 0) return anAttribute->StopValue (aMetricType);
+      else if (aPosition == 1)
+      {
+        Standard_Real aCumulativeMetric = anAttribute->StopValue (aMetricType) - anAttribute->StartValue (aMetricType);
+        if (fabs (aCumulativeMetric) < Precision::Confusion())
+          return QVariant();
+        else
+          return aCumulativeMetric;
+      }
+
+    }
+  }
+  return QVariant();
+}
+
+// =======================================================================
+// function : initRowCount
+// purpose :
+// =======================================================================
+int MessageModel_ItemAlert::initRowCount() const
+{
+  const Handle(Message_Alert)& anAlert = getAlert();
+  if (anAlert.IsNull())
+    return 0;
+
+  Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast(anAlert);
+  if (anExtendedAlert.IsNull())
+    return 0;
+
+  Handle(Message_CompositeAlerts) aCompositeAlert = anExtendedAlert->CompositeAlerts();
+  if (aCompositeAlert.IsNull())
+    return 0;
+
+  MessageModel_ItemAlert* aCurrentItem = (MessageModel_ItemAlert*)this;
+  for (int aGravityId = Message_Trace; aGravityId <= Message_Fail; aGravityId++)
+  {
+    const Message_ListOfAlert& anAlerts  = aCompositeAlert->Alerts ((Message_Gravity)aGravityId);
+    {
+      for (Message_ListOfAlert::Iterator anIt(anAlerts); anIt.More(); anIt.Next())
+      {
+        Message_ListOfAlert aCurAlerts;
+        aCurAlerts.Append (anIt.Value());
+        aCurrentItem->myChildAlerts.Bind(myChildAlerts.Size(), aCurAlerts);
+      }
+    }
+  }
+  return aCurrentItem->myChildAlerts.Size();
+}
+
+// =======================================================================
+// function : initStream
+// purpose :
+// =======================================================================
+void MessageModel_ItemAlert::initStream (Standard_OStream& theOStream) const
+{
+  Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast (getAlert());
+  if (anExtendedAlert.IsNull() || anExtendedAlert->Attribute().IsNull())
+    return;
+
+  Handle(Message_Attribute) anAttribute = anExtendedAlert->Attribute();
+  if (anAttribute.IsNull())
+    return;
+
+  if (Handle(Message_AttributeStream)::DownCast(anAttribute).IsNull())
+    return;
+
+  Handle(Message_AttributeStream) anAttributeStream = Handle(Message_AttributeStream)::DownCast (anExtendedAlert->Attribute());
+  theOStream << anAttributeStream->Stream().str();
+}
+
+// =======================================================================
+// function : SetStream
+// purpose :
+// =======================================================================
+bool MessageModel_ItemAlert::SetStream (const Standard_SStream& theSStream, Standard_Integer& theStartPos,
+                                        Standard_Integer& theLastPos) const
+{
+  Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast (getAlert());
+  if (anExtendedAlert.IsNull() || anExtendedAlert->Attribute().IsNull())
+    return false;
+
+  Handle(Message_Attribute) anAttribute = anExtendedAlert->Attribute();
+  if (anAttribute.IsNull())
+    return false;
+
+  if (Handle(Message_AttributeStream)::DownCast(anAttribute).IsNull())
+    return false;
+
+  Handle(Message_AttributeStream) anAttributeStream = Handle(Message_AttributeStream)::DownCast (anExtendedAlert->Attribute());
+  TCollection_AsciiString aStreamValue = Standard_Dump::Text (anAttributeStream->Stream());
+
+  TCollection_AsciiString aNewValue = Standard_Dump::Text (theSStream);
+
+  Standard_SStream aStream;
+  aStream << aStreamValue.SubString (1, theStartPos - 1);
+  aStream << aNewValue;
+  if (theLastPos + 1 <= aStreamValue.Length())
+    aStream << aStreamValue.SubString (theLastPos + 1, aStreamValue.Length());
+
+  anAttributeStream->SetStream (aStream);
+
+  return true;
+}
+
+// =======================================================================
+// function : createChild
+// purpose :
+// =======================================================================
+TreeModel_ItemBasePtr MessageModel_ItemAlert::createChild (int theRow, int theColumn)
+{
+  return MessageModel_ItemAlert::CreateItem (currentItem(), theRow, theColumn);
+}
+
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void MessageModel_ItemAlert::Init()
+{
+  MessageModel_ItemReportPtr aReportItem = itemDynamicCast<MessageModel_ItemReport> (Parent());
+  MessageModel_ItemAlertPtr anAlertItem;
+  Handle(Message_Alert) anAlert;
+  if (aReportItem)
+  {
+    Message_ListOfAlert anAlerts;
+    if (aReportItem->GetChildAlerts (Row(), anAlerts))
+    {
+      myAlert = anAlerts.First();
+    }
+  }
+  else
+  {
+    anAlertItem = itemDynamicCast<MessageModel_ItemAlert> (Parent());
+    if (anAlertItem)
+    {
+      Message_ListOfAlert anAlerts;
+      if (anAlertItem->GetChildAlerts (Row(), anAlerts))
+      {
+        myAlert = anAlerts.First();
+      }
+    }
+  }
+
+  Handle(Message_AlertExtended) anExtendedAlert = Handle(Message_AlertExtended)::DownCast(myAlert);
+  if (!anExtendedAlert.IsNull() && !anExtendedAlert->Attribute().IsNull())
+  {
+    Handle(Message_Attribute) anAttribute = anExtendedAlert->Attribute();
+    if (!anAttribute.IsNull())
+    {
+      if (anAttribute->IsKind (STANDARD_TYPE (TopoDS_AlertAttribute)))
+        myPresentation = new Convert_TransientShape (Handle(TopoDS_AlertAttribute)::DownCast (anAttribute)->GetShape());
+    }
+  }
+  MessageModel_ItemBase::Init();
+}
+
+// =======================================================================
+// function : Reset
+// purpose :
+// =======================================================================
+void MessageModel_ItemAlert::Reset()
+{
+  MessageModel_ItemBase::Reset();
+  myAlert = Handle(Message_Alert)();
+  myChildAlerts.Clear();
+  myPresentation = NULL;
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void MessageModel_ItemAlert::initItem() const
+{
+  if (IsInitialized())
+    return;
+  const_cast<MessageModel_ItemAlert*>(this)->Init();
+}
+
+// =======================================================================
+// function : getAlert
+// purpose :
+// =======================================================================
+const Handle(Message_Alert)& MessageModel_ItemAlert::getAlert() const
+{
+  initItem();
+  return myAlert;
+}
diff --git a/tools/MessageModel/MessageModel_ItemAlert.hxx b/tools/MessageModel/MessageModel_ItemAlert.hxx
new file mode 100644 (file)
index 0000000..0c2597c
--- /dev/null
@@ -0,0 +1,117 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_ItemAlert_H
+#define MessageModel_ItemAlert_H
+
+#include <inspector/MessageModel_ItemBase.hxx>
+
+#include <Message_Alert.hxx>
+#include <Message_ListOfAlert.hxx>
+#include <Message_Report.hxx>
+#include <NCollection_DataMap.hxx>
+#include <NCollection_List.hxx>
+#include <NCollection_Vector.hxx>
+#include <Standard.hxx>
+#include <TopoDS_Shape.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QMap>
+#include <QVariant>
+#include <Standard_WarningsRestore.hxx>
+
+class QAbstractTableModel;
+class MessageModel_ItemAlert;
+
+typedef QExplicitlySharedDataPointer<MessageModel_ItemAlert> MessageModel_ItemAlertPtr;
+
+//! \class MessageModel_ItemAlert
+//! This item is connected to Message_Alert.
+//! Parent is either MessageModel_ItemRoot or MessageModel_ItemAlert, children are MessageModel_ItemAlert or no children
+class MessageModel_ItemAlert : public MessageModel_ItemBase
+{
+public:
+  //! Creates an item wrapped by a shared pointer
+  //! \param theRow the item row positition in the parent item
+  //! \param theColumn the item column positition in the parent item
+  //! \return the pointer to the created item
+  static MessageModel_ItemAlertPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  { return MessageModel_ItemAlertPtr (new MessageModel_ItemAlert (theParent, theRow, theColumn)); }
+
+  //! Destructor
+  virtual ~MessageModel_ItemAlert() Standard_OVERRIDE {};
+
+  //! Returns the current shape
+  const Handle(Message_Alert)& GetAlert() const { return myAlert; }
+
+  //! Returns alert of the report for the parameter row
+  Standard_Boolean GetChildAlerts (const int theRow, Message_ListOfAlert& theAlerts) const { return myChildAlerts.Find(theRow, theAlerts); }
+
+  //! Inits the item, fills internal containers
+  Standard_EXPORT virtual void Init() Standard_OVERRIDE;
+
+  //! Resets cached values
+  Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
+
+  //! Return data value for the role.
+  //! \param theRole a value role
+  //! \return the value
+  Standard_EXPORT virtual QVariant initValue (const int theRole) const Standard_OVERRIDE;
+
+  //! \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 bool SetStream (const Standard_SStream& theSStream, Standard_Integer& theStartPos,
+                                          Standard_Integer& theLastPos) const Standard_OVERRIDE;
+
+  //! Returns presentation of the attribute to be visualized in the view
+  //! \thePresentations [out] container of presentation handles to be visualized
+  virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations) Standard_OVERRIDE
+  { TreeModel_ItemBase::Presentations (thePresentations); thePresentations.Append (myPresentation); }
+
+protected:
+
+  //! Initialize the current 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;
+
+  //! Creates a child item in the given position.
+  //! \param theRow the child row position
+  //! \param theColumn the child column position
+  //! \return the created item
+  virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
+
+  //! Returns current alert, initialized item if it has not been initialized yet
+  //! \return alert value
+  const Handle(Message_Alert)& getAlert() const;
+
+private:
+
+  //! Constructor
+  MessageModel_ItemAlert (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  : MessageModel_ItemBase (theParent, theRow, theColumn) {}
+
+private:
+  Handle(Message_Alert) myAlert; //!< current alert item
+  NCollection_DataMap<Standard_Integer, Message_ListOfAlert> myChildAlerts; //!< container of child alerts
+  Handle(Standard_Transient) myPresentation; //!< item presentation
+};
+
+#endif
diff --git a/tools/MessageModel/MessageModel_ItemBase.cxx b/tools/MessageModel/MessageModel_ItemBase.cxx
new file mode 100644 (file)
index 0000000..88378d3
--- /dev/null
@@ -0,0 +1,35 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_ItemBase.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+
+// =======================================================================
+// function : GetRootItem
+// purpose :
+// =======================================================================
+TreeModel_ItemBasePtr MessageModel_ItemBase::GetRootItem() const
+{
+  TreeModel_ItemBasePtr anItem = Parent();
+  while (anItem)
+  {
+    if (MessageModel_ItemRootPtr aThisRootItem = itemDynamicCast<MessageModel_ItemRoot> (anItem))
+    {
+      return aThisRootItem;
+    }
+    anItem = anItem->Parent();
+  }
+  return TreeModel_ItemBasePtr();
+}
diff --git a/tools/MessageModel/MessageModel_ItemBase.hxx b/tools/MessageModel/MessageModel_ItemBase.hxx
new file mode 100644 (file)
index 0000000..0b77bec
--- /dev/null
@@ -0,0 +1,52 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_ItemBase_H
+#define MessageModel_ItemBase_H
+
+#include <Standard.hxx>
+#include <TopoDS_Shape.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
+class MessageModel_ItemBase;
+typedef QExplicitlySharedDataPointer<MessageModel_ItemBase> MessageModel_ItemBasePtr;
+
+//! \class MessageModel_ItemBase
+// \brief Declaration of the tree model base item.
+class MessageModel_ItemBase : public TreeModel_ItemBase
+{
+public:
+
+  //! Resets cached values
+  virtual void Reset() Standard_OVERRIDE { TreeModel_ItemBase::Reset(); }
+
+protected:
+
+  //! Initialize the current item. It creates a backup of the specific item information
+  virtual void initItem() const {};
+
+  //! Constructor
+  //! param theParent a parent item
+  //! \param theRow the item row positition in the parent item
+  //! \param theColumn the item column positition in the parent item
+  MessageModel_ItemBase (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  : TreeModel_ItemBase (theParent, theRow, theColumn) {}
+
+  //! Return root item
+  //! \return an item instance
+  TreeModel_ItemBasePtr GetRootItem() const;
+};
+
+#endif
\ No newline at end of file
diff --git a/tools/MessageModel/MessageModel_ItemReport.cxx b/tools/MessageModel/MessageModel_ItemReport.cxx
new file mode 100644 (file)
index 0000000..0034651
--- /dev/null
@@ -0,0 +1,232 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_ItemReport.hxx>
+
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_TreeModel.hxx>
+
+#include <Message.hxx>
+#include <Message_Alert.hxx>
+#include <Message_AttributeMeter.hxx>
+#include <Message_Messenger.hxx>
+#include <Message_PrinterToReport.hxx>
+#include <OSD_Path.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QColor>
+#include <Standard_WarningsRestore.hxx>
+
+// =======================================================================
+// function : initValue
+// purpose :
+// =======================================================================
+QVariant MessageModel_ItemReport::initValue (const int theRole) const
+{
+  QVariant aParentValue = MessageModel_ItemBase::initValue (theRole);
+  if (aParentValue.isValid())
+    return aParentValue;
+
+  const Handle(Message_Report)& aReport = getReport();
+  if (aReport.IsNull())
+    return QVariant();
+
+  if (theRole == Qt::ForegroundRole)
+  {
+    if (!aReport->IsActiveInMessenger())
+      return QColor(Qt::darkGray);
+
+    return QVariant();
+  }
+  if (theRole == Qt::ToolTipRole && !myDescription.IsEmpty() && Column() == 0) // display the exported file name in tool tip
+  {
+    OSD_Path aPath(myDescription);
+    return QString ("%1%2").arg (aPath.Name().ToCString()).arg (aPath.Extension().ToCString());
+  }
+
+  if (theRole != Qt::DisplayRole)
+    return QVariant();
+
+  if (Column() == 0)
+    return aReport->DynamicType()->Name();
+
+  Message_MetricType aMetricType;
+  int aPosition;
+  if (MessageModel_TreeModel::IsMetricColumn (Column(), aMetricType, aPosition) &&
+      (aMetricType == Message_MetricType_ProcessCPUUserTime || aMetricType == Message_MetricType_ProcessCPUSystemTime ||
+       aMetricType == Message_MetricType_WallClock))
+  {
+    if (aPosition == 0) return CumulativeMetric (aReport, aMetricType);
+    else if (aPosition == 1) return "100";
+  }
+  return QVariant();
+}
+
+// =======================================================================
+// function : initRowCount
+// purpose :
+// =======================================================================
+int MessageModel_ItemReport::initRowCount() const
+{
+  const Handle(Message_Report)& aReport = getReport();
+  if (aReport.IsNull())
+    return 0;
+
+  MessageModel_ItemReport* aCurrentItem = (MessageModel_ItemReport*)this;
+  for (int aGravityId = Message_Trace; aGravityId <= Message_Fail; aGravityId++)
+  {
+    const Message_ListOfAlert& anAlerts = aReport->GetAlerts ((Message_Gravity)aGravityId);
+    for (Message_ListOfAlert::Iterator anIt(anAlerts); anIt.More(); anIt.Next())
+    {
+      Message_ListOfAlert aCurAlerts;
+      aCurAlerts.Append (anIt.Value());
+      aCurrentItem->myChildAlerts.Bind(myChildAlerts.Size(), aCurAlerts);
+    }
+  }
+  return aCurrentItem->myChildAlerts.Size();
+}
+
+// =======================================================================
+// function : createChild
+// purpose :
+// =======================================================================
+TreeModel_ItemBasePtr MessageModel_ItemReport::createChild (int theRow, int theColumn)
+{
+  return MessageModel_ItemAlert::CreateItem (currentItem(), theRow, theColumn);
+}
+
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void MessageModel_ItemReport::Init()
+{
+  MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (Parent());
+  myReport = aRootItem ? aRootItem->GetReport (Row(), myDescription) : Handle(Message_Report)();
+
+  MessageModel_ItemBase::Init();
+}
+
+// =======================================================================
+// function : getReport
+// purpose :
+// =======================================================================
+const Handle(Message_Report)& MessageModel_ItemReport::getReport() const
+{
+  initItem();
+  return myReport;
+}
+
+// =======================================================================
+// function : Reset
+// purpose :
+// =======================================================================
+void MessageModel_ItemReport::Reset()
+{
+  MessageModel_ItemBase::Reset();
+  myReport = Handle(Message_Report)();
+  myChildAlerts.Clear();
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void MessageModel_ItemReport::initItem() const
+{
+  if (IsInitialized())
+    return;
+  const_cast<MessageModel_ItemReport*>(this)->Init();
+}
+
+// =======================================================================
+// function : FindReportItem
+// purpose :
+// =======================================================================
+MessageModel_ItemReportPtr MessageModel_ItemReport::FindReportItem (const TreeModel_ItemBasePtr& theItem)
+{
+  TreeModel_ItemBasePtr anItem = theItem;
+  while (anItem)
+  {
+    if (MessageModel_ItemReportPtr aReportItem = itemDynamicCast<MessageModel_ItemReport>(anItem))
+      return aReportItem;
+
+    anItem = anItem->Parent();
+  }
+  return MessageModel_ItemReportPtr();
+}
+
+// =======================================================================
+// function : FindReport
+// purpose :
+// =======================================================================
+Handle(Message_Report) MessageModel_ItemReport::FindReport (const MessageModel_ItemBasePtr& theItem)
+{
+  Handle(Message_Report) aReport;
+
+  MessageModel_ItemBasePtr anItem = theItem;
+  while (anItem)
+  {
+    MessageModel_ItemReportPtr aReportItem = itemDynamicCast<MessageModel_ItemReport>(anItem);
+
+    if (aReportItem)
+      return aReportItem->GetReport();
+
+    anItem = itemDynamicCast<MessageModel_ItemBase>(anItem->Parent());
+  }
+  return NULL;
+}
+
+// =======================================================================
+// function : CumulativeMetric
+// purpose :
+// =======================================================================
+Standard_Real MessageModel_ItemReport::CumulativeMetric (const Handle(Message_Report)& theReport, const Message_MetricType theMetricType)
+{
+  if (!theReport->ActiveMetrics().Contains (theMetricType))
+    return 0;
+
+  Standard_Real aMetric = 0;
+  for (int iGravity = Message_Trace; iGravity <= Message_Fail; ++iGravity)
+  {
+    const Message_ListOfAlert& anAlerts = theReport->GetAlerts ((Message_Gravity)iGravity);
+    Handle(Message_AttributeMeter) aFirstAttribute/*, aLastAttribute*/;
+    for (Message_ListOfAlert::Iterator anAlertsIterator (anAlerts); anAlertsIterator.More(); anAlertsIterator.Next())
+    {
+      Handle(Message_AlertExtended) anAlert = Handle(Message_AlertExtended)::DownCast (anAlertsIterator.Value());
+      if (anAlert.IsNull())
+        continue;
+      Handle(Message_AttributeMeter) anAttribute = Handle(Message_AttributeMeter)::DownCast (anAlert->Attribute());
+      if (anAttribute.IsNull() || !anAttribute->HasMetric (theMetricType) || !anAttribute->IsMetricValid (theMetricType))
+        continue;
+
+      //if (aFirstAttribute.IsNull())
+      //  aFirstAttribute = anAttribute;
+      //else
+      //{
+        //aLastAttribute = anAttribute;
+      //}
+      aMetric += anAttribute->StopValue (theMetricType) - anAttribute->StartValue (theMetricType);
+    }
+    //if (aFirstAttribute.IsNull())
+    //  continue;
+    //if (aLastAttribute.IsNull())
+    //  aLastAttribute = aFirstAttribute;
+
+    //aMetric += aLastAttribute->StopValue (theMetricType) - aFirstAttribute->StartValue (theMetricType);
+  }
+  return aMetric;
+}
diff --git a/tools/MessageModel/MessageModel_ItemReport.hxx b/tools/MessageModel/MessageModel_ItemReport.hxx
new file mode 100644 (file)
index 0000000..5a8d551
--- /dev/null
@@ -0,0 +1,117 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_ItemReport_H
+#define MessageModel_ItemReport_H
+
+#include <inspector/MessageModel_ItemBase.hxx>
+#include <Standard.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <Message_Alert.hxx>
+#include <Message_Report.hxx>
+#include <NCollection_DataMap.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QMap>
+#include <QVariant>
+#include <Standard_WarningsRestore.hxx>
+
+class MessageModel_ItemReport;
+typedef QExplicitlySharedDataPointer<MessageModel_ItemReport> MessageModel_ItemReportPtr;
+
+//! \class MessageModel_ItemReport
+//! This item is connected to Message_Alert.
+//! Parent is MessageModel_ItemRoot, children are MessageModel_ItemAlert or no children
+class MessageModel_ItemReport : public MessageModel_ItemBase
+{
+public:
+
+  //! Creates an item wrapped by a shared pointer
+  //! \param theRow the item row positition in the parent item
+  //! \param theColumn the item column positition in the parent item
+  //! \return the pointer to the created item
+  static MessageModel_ItemReportPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  { return MessageModel_ItemReportPtr (new MessageModel_ItemReport (theParent, theRow, theColumn)); }
+
+  //! Destructor
+  virtual ~MessageModel_ItemReport() Standard_OVERRIDE {};
+
+  //! Returns the current shape
+  const Handle(Message_Report)& GetReport() const { return myReport; }
+
+  //! Returns alert of the report for the parameter row
+  Standard_Boolean GetChildAlerts (const int theRow, Message_ListOfAlert& theAlerts) const { return myChildAlerts.Find(theRow, theAlerts); }
+
+  //! Returns the report description or NULL
+  const TCollection_AsciiString& GetDescription() const { return myDescription; }
+
+  //! Inits the item, fills internal containers
+  Standard_EXPORT virtual void Init() Standard_OVERRIDE;
+
+  //! Resets cached values
+  Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
+
+  //! Return data value for the role.
+  //! \param theRole a value role
+  //! \return the value
+  Standard_EXPORT virtual QVariant initValue (const int theRole) const Standard_OVERRIDE;
+
+  //! \return number of children.
+  Standard_EXPORT virtual int initRowCount() const Standard_OVERRIDE;
+
+  //! Returns report of the tree model item. Iterates up by parents intil the report item is found.
+  //! \return an item or NULL
+  Standard_EXPORT static MessageModel_ItemReportPtr FindReportItem (const TreeModel_ItemBasePtr& theItem);
+
+  //! Returns report of the item
+  static Handle(Message_Report) FindReport (const MessageModel_ItemBasePtr& thetItem);
+
+  //! Returns report cumulative metric as stop time of the last alert minus start time of the first alert
+  Standard_EXPORT static Standard_Real CumulativeMetric (const Handle(Message_Report)& theReport, const Message_MetricType theMetricType);
+
+protected:
+
+  //! Initialize the current item.
+  virtual void initItem() const Standard_OVERRIDE;
+
+  //! Creates a child item in the given position.
+  //! \param theRow the child row position
+  //! \param theColumn the child column position
+  //! \return the created item
+  virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
+
+  //! Returns number of child shapes. Init item if it is not initialized
+  //! \return integer value
+  int getRowCount() const;
+
+  //! Returns current shape, initialized item if it has not been initialized yet
+  //! \return shape value
+  const Handle(Message_Report)& getReport() const;
+
+private:
+
+  //! Constructor
+  MessageModel_ItemReport (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  : MessageModel_ItemBase (theParent, theRow, theColumn) {}
+
+private:
+
+  NCollection_DataMap<Standard_Integer, Message_ListOfAlert> myChildAlerts; //!< container of child alerts
+
+  Handle(Message_Report) myReport; //!< current report
+  TCollection_AsciiString myDescription; //!< description
+};
+
+#endif
diff --git a/tools/MessageModel/MessageModel_ItemRoot.cxx b/tools/MessageModel/MessageModel_ItemRoot.cxx
new file mode 100644 (file)
index 0000000..7f424e4
--- /dev/null
@@ -0,0 +1,95 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_ItemReport.hxx>
+
+// =======================================================================
+// function : SetReport
+// purpose :
+// =======================================================================
+void MessageModel_ItemRoot::SetReport (const int theRowId, const Handle(Message_Report)& theReport,
+                                       const TCollection_AsciiString& theReportDescription)
+{
+  NCollection_List<MessageModel_ReportInformation>::Iterator aReportsIt (myReports);
+  for (int aRowId = 0; aReportsIt.More(); aReportsIt.Next(), aRowId++)
+  {
+    if (aRowId == theRowId)
+      break;
+  }
+  aReportsIt.Value().myReport = theReport;
+  aReportsIt.Value().myDescription = theReportDescription;
+}
+
+// =======================================================================
+// function : GetReport
+// purpose :
+// =======================================================================
+const Handle(Message_Report)& MessageModel_ItemRoot::GetReport (const int theRowId,
+  TCollection_AsciiString& theReportDescription)
+{
+  NCollection_List<MessageModel_ReportInformation>::Iterator aReportsIt (myReports);
+  for (int aRowId = 0; aReportsIt.More(); aReportsIt.Next(), aRowId++)
+  {
+    if (aRowId == theRowId)
+      break;
+  }
+  theReportDescription = aReportsIt.Value().myDescription;
+  return aReportsIt.Value().myReport;
+}
+
+// =======================================================================
+// function : HasReport
+// purpose :
+// =======================================================================
+Standard_Boolean MessageModel_ItemRoot::HasReport (const Handle(Message_Report)& theReport)
+{
+  NCollection_List<MessageModel_ReportInformation>::Iterator aReportsIt (myReports);
+  for (int aRowId = 0; aReportsIt.More(); aReportsIt.Next(), aRowId++)
+  {
+    if (aReportsIt.Value().myReport == theReport)
+      return Standard_True;
+  }
+  return Standard_False;
+}
+
+// =======================================================================
+// function : initValue
+// purpose :
+// =======================================================================
+QVariant MessageModel_ItemRoot::initValue (const int theRole) const
+{
+  QVariant aParentValue = MessageModel_ItemBase::initValue (theRole);
+  if (aParentValue.isValid())
+    return aParentValue;
+
+  if (Column() != 0)
+    return QVariant();
+
+  if (theRole == Qt::DisplayRole)
+    return myName.IsEmpty() ? "Message_Reports" : myName.ToCString();
+
+  return QVariant();
+}
+
+// =======================================================================
+// function : createChild
+// purpose :
+// =======================================================================
+TreeModel_ItemBasePtr MessageModel_ItemRoot::createChild (int theRow, int theColumn)
+{
+  return MessageModel_ItemReport::CreateItem (currentItem(), theRow, theColumn);
+}
+
diff --git a/tools/MessageModel/MessageModel_ItemRoot.hxx b/tools/MessageModel/MessageModel_ItemRoot.hxx
new file mode 100644 (file)
index 0000000..9e59a54
--- /dev/null
@@ -0,0 +1,117 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_ItemRoot_H
+#define MessageModel_ItemRoot_H
+
+#include <Message_Alert.hxx>
+#include <Message_Report.hxx>
+#include <NCollection_List.hxx>
+#include <Standard.hxx>
+#include <TCollection_AsciiString.hxx>
+
+#include <inspector/MessageModel_ItemBase.hxx>
+
+class MessageModel_ItemRoot;
+typedef QExplicitlySharedDataPointer<MessageModel_ItemRoot> MessageModel_ItemRootPtr;
+
+//! \struct to extend report by description
+struct MessageModel_ReportInformation
+{
+  //! Constructor
+  MessageModel_ReportInformation (Handle(Message_Report) theReport, const TCollection_AsciiString& theDescription)
+    : myReport (theReport), myDescription (theDescription) {}
+
+  Handle(Message_Report) myReport; //! report
+  TCollection_AsciiString myDescription; //! report description
+};
+
+//! \class MessageModel_ItemRoot
+//! Collects message reports that should be visualized in tree view. Reports are cached and if reports are not needed,
+//! cache should be cleared using RemoveAllReports
+//! Parent is NULL, children are MessageModel_ItemReport items.
+class MessageModel_ItemRoot : public MessageModel_ItemBase
+{
+public:
+
+  //! Creates an item wrapped by a shared pointer
+  static MessageModel_ItemRootPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+    { return MessageModel_ItemRootPtr (new MessageModel_ItemRoot (theParent, theRow, theColumn)); }
+
+  //! Destructor
+  virtual ~MessageModel_ItemRoot() Standard_OVERRIDE {};
+
+  //! Appends new report
+  //! \param theReport a report instance
+  //! \param theReportDescription an additional report information
+  void AddReport (const Handle(Message_Report)& theReport, const TCollection_AsciiString& theReportDescription)
+  { myReports.Append (MessageModel_ReportInformation (theReport, theReportDescription)); }
+
+  //! Set report, se it into the given row index
+  //! \param theRowId a report child row
+  //! \param theReport a report instance
+  //! \param theReportDescription an additional report information
+  Standard_EXPORT void SetReport (const int theRowId, const Handle(Message_Report)& theReport,
+    const TCollection_AsciiString& theReportDescription = "");
+
+  //! Returns true if report exists is in the list of the current reports
+  //! \param theReport a report instance
+  //! \return boolen value
+  Standard_EXPORT Standard_Boolean HasReport (const Handle(Message_Report)& theReport);
+
+  //!< Returns processed reports
+  const NCollection_List<MessageModel_ReportInformation>& Reports() const { return myReports; }
+
+  //! Clears internal container of added reports
+  void RemoveAllReports() { myReports.Clear(); }
+
+  //! Returns report by the number
+  //! \param theRowId an index of the report in the internal container.
+  Standard_EXPORT const Handle(Message_Report)& GetReport (const int theRowId, TCollection_AsciiString& theReportDescription);
+
+  //! Set the item name
+  //! \param theName text value
+  void SetName (const TCollection_AsciiString& theName) { myName = theName; }
+
+protected:
+
+  //! Return data value for the role.
+  //! \param theRole a value role
+  //! \return the value
+  virtual QVariant initValue (const int theRole) const Standard_OVERRIDE;
+
+  //! \return number of children.
+  virtual int initRowCount() const Standard_OVERRIDE { return myReports.Size(); }
+
+  //! Creates a child item in the given position.
+  //! \param theRow the child row position
+  //! \param theColumn the child column position
+  //! \return the created item
+  virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
+
+private:
+
+  //! Constructor
+  //! param theParent a parent item
+  MessageModel_ItemRoot (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  : MessageModel_ItemBase (theParent, theRow, theColumn) {}
+
+private:
+
+  NCollection_List<MessageModel_ReportInformation> myReports; //!< reports sent by algorithms
+  TCollection_AsciiString myName; //!< DisplayRole data, if defined
+};
+
+#endif
diff --git a/tools/MessageModel/MessageModel_TreeModel.cxx b/tools/MessageModel/MessageModel_TreeModel.cxx
new file mode 100644 (file)
index 0000000..c4f9f8d
--- /dev/null
@@ -0,0 +1,193 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageModel_TreeModel.hxx>
+
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_ItemReport.hxx>
+#include <inspector/TreeModel_ColumnType.hxx>
+
+#include <Message.hxx>
+
+const int COLUMN_NAME_WIDTH = 230;
+const int COLUMN_SIZE_WIDTH = 30;
+
+const int COLUMN_REAL_VALUE_WIDTH = 115;
+const int COLUMN_PERCENT_VALUE_WIDTH = 50;
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+MessageModel_TreeModel::MessageModel_TreeModel (QObject* theParent)
+: TreeModel_ModelBase (theParent)
+{
+}
+
+// =======================================================================
+// function : InitColumns
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::InitColumns()
+{
+  // 0 - Name, 1 - visibility, 2 - Row
+  setHeaderItem (TreeModel_ColumnType_Name,       TreeModel_HeaderSection ("Name", COLUMN_NAME_WIDTH));
+  setHeaderItem (TreeModel_ColumnType_Visibility, TreeModel_HeaderSection ("Visibility", TreeModel_ModelBase::ColumnVisibilityWidth()));
+  setHeaderItem (TreeModel_ColumnType_Row,        TreeModel_HeaderSection ("Row", COLUMN_SIZE_WIDTH, Standard_True /*hidden*/));
+
+  int aNextIndex = 3;
+  for (int aMetricId = (int)Message_MetricType_None + 1; aMetricId <= (int)Message_MetricType_MemHeapUsage; aMetricId++)
+  {
+    Message_MetricType aMetricType = (Message_MetricType)aMetricId;
+    OSD_MemInfo::Counter aMemInfo;
+    bool isMemInfo = Message::ToOSDMetric (aMetricType, aMemInfo);
+
+    setHeaderItem (aNextIndex++,
+      TreeModel_HeaderSection (QString("%1 [%2]").arg (Message::MetricToString (aMetricType)).arg(isMemInfo ? "Mb" : "s"),
+      COLUMN_REAL_VALUE_WIDTH));
+    setHeaderItem (aNextIndex++, TreeModel_HeaderSection (isMemInfo ? "Delta" : "%", COLUMN_PERCENT_VALUE_WIDTH));
+  }
+}
+
+// =======================================================================
+// function : GetMetricColumns
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::GetMetricColumns (const Message_MetricType theMetricType, QList<int>& theMetricColumns)
+{
+  theMetricColumns.clear();
+  int aNextIndex = 3; // after default parent columns, see InitColumns
+  for (int aMetricId = (int)Message_MetricType_None + 1; aMetricId <= (int)Message_MetricType_MemHeapUsage; aMetricId++)
+  {
+    if (theMetricType != (Message_MetricType)aMetricId)
+    {
+      aNextIndex += 2;
+      continue;
+    }
+    theMetricColumns.append (aNextIndex++);
+    theMetricColumns.append (aNextIndex++);
+  }
+}
+
+// =======================================================================
+// function : IsMetricColumn
+// purpose :
+// =======================================================================
+bool MessageModel_TreeModel::IsMetricColumn (const int theColumnId, Message_MetricType& theMetricType, int& thePosition)
+{
+  int aNextIndex = 3; // after default parent columns, see InitColumns
+  for (int aMetricId = (int)Message_MetricType_None + 1; aMetricId <= (int)Message_MetricType_MemHeapUsage; aMetricId++)
+  {
+    if (theColumnId == aNextIndex || theColumnId == aNextIndex + 1)
+    {
+      theMetricType = (Message_MetricType)aMetricId;
+      thePosition = theColumnId - aNextIndex;
+      return true;
+    }
+    aNextIndex += 2;
+  }
+  return false;
+}
+
+// =======================================================================
+// function : createRootItem
+// purpose :
+// =======================================================================
+TreeModel_ItemBasePtr MessageModel_TreeModel::createRootItem (const int theColumnId)
+{
+  return MessageModel_ItemRoot::CreateItem (TreeModel_ItemBasePtr(), 0, theColumnId);
+}
+
+// =======================================================================
+// function : HasReport
+// purpose :
+// =======================================================================
+Standard_Boolean MessageModel_TreeModel::HasReport (const Handle(Message_Report)& theReport)
+{
+  if (columnCount() == 0)
+    return Standard_False;
+
+  MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (RootItem (0));
+  return aRootItem && aRootItem->HasReport (theReport);
+}
+
+// =======================================================================
+// function : AddReport
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::AddReport (const Handle(Message_Report)& theReport,
+                                        const TCollection_AsciiString& theReportDescription)
+{
+  for (int aColId = 0, aNbColumns = columnCount(); aColId < aNbColumns; aColId++)
+  {
+    MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (RootItem (aColId));
+    if (!aRootItem)
+      continue;
+    aRootItem->AddReport (theReport, theReportDescription);
+  }
+
+  Reset();
+  EmitLayoutChanged();
+}
+
+// =======================================================================
+// function : SetReport
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::SetReport (const int theRowId, const Handle(Message_Report)& theReport,
+                                        const TCollection_AsciiString& theReportDescription)
+{
+  for (int aColId = 0, aNbColumns = columnCount(); aColId < aNbColumns; aColId++)
+  {
+    MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (RootItem (aColId));
+    if (!aRootItem)
+      continue;
+    aRootItem->SetReport (theRowId, theReport, theReportDescription);
+  }
+  Reset();
+  EmitLayoutChanged();
+}
+
+// =======================================================================
+// function : Reports
+// purpose :
+// =======================================================================
+const NCollection_List<MessageModel_ReportInformation>& MessageModel_TreeModel::Reports() const
+{
+  MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (RootItem (0));
+  return aRootItem->Reports();
+}
+
+// =======================================================================
+// function : UpdateTreeModel
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::SetRootItemName (const TCollection_AsciiString& theName)
+{
+  MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (RootItem (0));
+  if (aRootItem)
+    aRootItem->SetName (theName);
+}
+
+// =======================================================================
+// function : UpdateTreeModel
+// purpose :
+// =======================================================================
+void MessageModel_TreeModel::UpdateTreeModel()
+{
+  Reset();
+  EmitLayoutChanged();
+}
diff --git a/tools/MessageModel/MessageModel_TreeModel.hxx b/tools/MessageModel/MessageModel_TreeModel.hxx
new file mode 100644 (file)
index 0000000..3a2c69c
--- /dev/null
@@ -0,0 +1,94 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageModel_TreeModel_H
+#define MessageModel_TreeModel_H
+
+#include <inspector/MessageModel_ItemBase.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <Standard.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <Message_Report.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QMap>
+#include <QObject>
+#include <Standard_WarningsRestore.hxx>
+
+class MessageModel_TreeModel;
+
+//! \class MessageModel_TreeModel
+//! View model to visualize MessageReport/s content
+class MessageModel_TreeModel : public TreeModel_ModelBase
+{
+public:
+
+  //! Constructor
+  Standard_EXPORT MessageModel_TreeModel (QObject* theParent);
+
+  //! Destructor
+  virtual ~MessageModel_TreeModel() Standard_OVERRIDE {};
+
+  //! Creates model columns and root items.
+  Standard_EXPORT virtual void InitColumns() Standard_OVERRIDE;
+
+  //!< Returns columns of the model for the metric
+  //!< \param theMetricType metric
+  //!< \param theMetricColumns [out] container of metric columns
+  static Standard_EXPORT void GetMetricColumns (const Message_MetricType theMetricType, QList<int>& theMetricColumns);
+
+  //!< Returns metric type for the column
+  //!< \param theColumnId [in] index of the tree column
+  //!< \param theMetricType [out] metric type if found
+  //!< \param thePosition [out] index of the metric column, 0 - is metric, 1 - is delta
+  //!< \return true if the column has metric parameters
+  static Standard_EXPORT bool IsMetricColumn (const int theColumnId, Message_MetricType& theMetricType, int& thePosition);
+
+  //! Returns true if parameter report was added into the model
+  //! \param theReport a report instance
+  //! \return boolen value
+  Standard_EXPORT Standard_Boolean HasReport (const Handle(Message_Report)& theReport);
+
+  //! Add shape, append it to the model root item
+  //! \param theReport a report instance
+  //! \param theReportDescription an additional report information
+  Standard_EXPORT void AddReport (const Handle(Message_Report)& theReport,
+    const TCollection_AsciiString& theReportDescription = "");
+
+  //! Set report, se it into the given row index
+  //! \param theRowId a report child row
+  //! \param theReport a report instance
+  //! \param theReportDescription an additional report information
+  Standard_EXPORT void SetReport (const int theRowId, const Handle(Message_Report)& theReport,
+    const TCollection_AsciiString& theReportDescription = "");
+
+  //!< Returns processed reports
+  Standard_EXPORT const NCollection_List<MessageModel_ReportInformation>& Reports() const;
+
+  //! Sets the text value of the Root item, only "Name" column accepts the parameter value
+  //! \theName visulized text of root item
+  Standard_EXPORT void SetRootItemName (const TCollection_AsciiString& theName);
+
+  //! Updates tree model
+  Standard_EXPORT void UpdateTreeModel();
+
+protected:
+  //! Creates root item
+  //! \param theColumnId index of a column
+  virtual TreeModel_ItemBasePtr createRootItem (const int theColumnId) Standard_OVERRIDE;
+};
+
+#endif
diff --git a/tools/MessageModel/icons/item_shape.png b/tools/MessageModel/icons/item_shape.png
new file mode 100644 (file)
index 0000000..a808bc5
Binary files /dev/null and b/tools/MessageModel/icons/item_shape.png differ
diff --git a/tools/MessageModel/icons/item_streamValues.png b/tools/MessageModel/icons/item_streamValues.png
new file mode 100644 (file)
index 0000000..7181f94
Binary files /dev/null and b/tools/MessageModel/icons/item_streamValues.png differ
diff --git a/tools/MessageView/FILES b/tools/MessageView/FILES
new file mode 100644 (file)
index 0000000..7d7b86b
--- /dev/null
@@ -0,0 +1,10 @@
+MessageView_ActionsTest.cxx
+MessageView_ActionsTest.hxx
+MessageView_Communicator.cxx
+MessageView_Communicator.hxx
+MessageView_MetricStatisticModel.cxx
+MessageView_MetricStatisticModel.hxx
+MessageView_VisibilityState.cxx
+MessageView_VisibilityState.hxx
+MessageView_Window.cxx
+MessageView_Window.hxx
diff --git a/tools/MessageView/MessageView_ActionsTest.cxx b/tools/MessageView/MessageView_ActionsTest.cxx
new file mode 100644 (file)
index 0000000..c085a11
--- /dev/null
@@ -0,0 +1,347 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageView_ActionsTest.hxx>
+
+#include <inspector/MessageModel_ItemReport.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_TreeModel.hxx>
+#include <inspector/ViewControl_Tools.hxx>
+
+#include <Message.hxx>
+#include <Message_AlertExtended.hxx>
+#include <Message_Level.hxx>
+#include <Message_Messenger.hxx>
+
+#include <gp_Ax1.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Ax3.hxx>
+#include <Bnd_Box.hxx>
+#include <Bnd_OBB.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <OSD_Chronometer.hxx>
+#include <Quantity_Color.hxx>
+#include <Quantity_ColorRGBA.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopoDS_AlertAttribute.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QAction>
+#include <QFileDialog>
+#include <QItemSelectionModel>
+#include <QMenu>
+#include <QMessageBox>
+#include <QWidget>
+#include <Standard_WarningsRestore.hxx>
+
+#include <ctime>
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+MessageView_ActionsTest::MessageView_ActionsTest (QWidget* theParent,
+  MessageModel_TreeModel* theTreeModel, QItemSelectionModel* theModel)
+: QObject (theParent), myTreeModel (theTreeModel), mySelectionModel (theModel)
+{
+  myActions.insert (MessageModel_ActionType_TestMetric,
+                    ViewControl_Tools::CreateAction ("Test <metric>", SLOT (OnTestMetric()), parent(), this));
+  myActions.insert (MessageModel_ActionType_TestMessenger,
+                    ViewControl_Tools::CreateAction ("Test <Message_Messenger>", SLOT (OnTestMessenger()), parent(), this));
+  myActions.insert (MessageModel_ActionType_TestReportTree,
+                    ViewControl_Tools::CreateAction ("Test <Tree of messages>", SLOT (OnTestReportTree()), parent(), this));
+}
+
+// =======================================================================
+// function : AddMenuActions
+// purpose :
+// =======================================================================
+void MessageView_ActionsTest::AddMenuActions (const QModelIndexList& theSelectedIndices, QMenu* theMenu)
+{
+  MessageModel_ItemReportPtr aReportItem;
+  for (QModelIndexList::const_iterator aSelIt = theSelectedIndices.begin(); aSelIt != theSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    MessageModel_ItemRootPtr aRootItem = itemDynamicCast<MessageModel_ItemRoot> (anItemBase);
+    if (aRootItem)
+      continue;
+
+    aReportItem = itemDynamicCast<MessageModel_ItemReport> (anItemBase);
+    if (aReportItem)
+      break;
+
+    MessageModel_ItemAlertPtr anAlertItem = itemDynamicCast<MessageModel_ItemAlert> (anItemBase);
+    if (anAlertItem)
+      continue;
+  }
+
+  if (aReportItem && !aReportItem->GetReport().IsNull())
+  {
+    theMenu->addAction (myActions[MessageModel_ActionType_TestMetric]);
+    theMenu->addAction (myActions[MessageModel_ActionType_TestMessenger]);
+    theMenu->addAction (myActions[MessageModel_ActionType_TestReportTree]);
+
+    bool isReportEnabled = aReportItem->GetReport()->IsActiveInMessenger();
+    myActions[MessageModel_ActionType_TestMetric]->setEnabled (isReportEnabled);
+    myActions[MessageModel_ActionType_TestMessenger]->setEnabled (isReportEnabled);
+    myActions[MessageModel_ActionType_TestReportTree]->setEnabled (isReportEnabled);
+  }
+  theMenu->addSeparator();
+}
+
+// =======================================================================
+// function : getSelectedReport
+// purpose :
+// =======================================================================
+Handle(Message_Report) MessageView_ActionsTest::getSelectedReport (QModelIndex& theReportIndex) const
+{
+  MessageModel_ItemReportPtr aReportItem;
+  QModelIndexList aSelectedIndices = mySelectionModel->selectedIndexes();
+  for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    aReportItem = itemDynamicCast<MessageModel_ItemReport> (anItemBase);
+    theReportIndex = anIndex;
+    if (aReportItem)
+      break;
+  }
+  if (!aReportItem)
+    return NULL;
+
+  return aReportItem->GetReport();
+}
+
+// =======================================================================
+// function : OnTestMetric
+// purpose :
+// =======================================================================
+void MessageView_ActionsTest::OnTestMetric()
+{
+  QModelIndex aReportIndex;
+  Handle(Message_Report) aReport = getSelectedReport (aReportIndex);
+  if (aReport.IsNull())
+    return;
+
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestMetric()");
+  unsigned int start_time =  clock();
+
+  Standard_Integer aCounter = 1500;
+  Standard_Real aValue = 0., aValue2 = 0.1;
+
+  for (int aTopIt = 0; aTopIt < 4; aTopIt++)
+  {
+    Message::SendInfo() << "Calculate";
+    for (int j = 0; j < aCounter; j++)
+    {
+      for (int i = 0; i < aCounter; i++)
+      {
+        aValue = (aValue * 2. + 3.) * 0.5 - 0.3 * 0.5;
+
+        Standard_Real aValue3 = aValue + aValue2 * 0.2;
+        (void)aValue3;
+      }
+    }
+  }
+
+  myTreeModel->UpdateTreeModel();
+
+  unsigned int end_time = clock();
+  std::cout << "clock() = " << end_time - start_time << std::endl;
+}
+
+// =======================================================================
+// function : createShapeOnLevel
+// purpose :
+// =======================================================================
+void createShapeOnLevel()
+{
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY ("createShapeOnLevel")
+
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+
+  BRepBuilderAPI_MakeEdge aBuilder (gp_Pnt (0., 0., 0.), gp_Pnt (20., 10., 20.));
+  TopoDS_Shape aShape = aBuilder.Shape();
+
+  Message::DefaultMessenger() << aShape;
+}
+
+// =======================================================================
+// function : createShape
+// purpose :
+// =======================================================================
+void createShape()
+{
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+  BRepBuilderAPI_MakeEdge aBuilder (gp_Pnt (0., 0., 0.), gp_Pnt (20., 10., 20.));
+  TopoDS_Shape aShape = aBuilder.Shape();
+
+  Message::DefaultMessenger() << aShape;
+  createShapeOnLevel();
+}
+
+// =======================================================================
+// function : OnTestMessenger
+// purpose :
+// =======================================================================
+void MessageView_ActionsTest::OnTestMessenger()
+{
+  // string messages
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestMessenger()")
+
+  Message::DefaultMessenger()->Send ("Values");
+  Message::DefaultMessenger()->Send ("Values second");
+
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+  // gp_XYZ
+  {
+    gp_XYZ aCoords (1.3, 2.3, 3.4);
+    aCoords.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // gp_Dir
+  {
+    gp_Dir aDir (0.3, 0.3, 0.4);
+    aDir.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // gp_Ax1
+  {
+    gp_Ax1 aCoords (gp_Pnt (1.3, 2.3, 3.4), gp_Dir (0.3, 0.3, 0.4));
+    aCoords.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // gp_Ax2
+  {
+    gp_Ax2 aCoords (gp_Pnt (10.3, 20.3, 30.4), gp_Dir (0.3, 0.3, 0.4));
+    aCoords.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // gp_Ax3
+  {
+    gp_Ax3 aPln (gp_Pnt (10., 20., 15.), gp_Dir (0., 0., 1.), gp_Dir (1., 0., 0.));
+    aPln.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // gp_Trsf
+  {
+    gp_Trsf aTrsf;
+    aTrsf.SetRotation (gp::OZ(), 0.3);
+    aTrsf.SetTranslationPart (gp_Vec (15., 15., 15.));
+    aTrsf.SetScaleFactor (3.);
+
+    aTrsf.DumpJson (sout);
+    sout.Flush(Standard_True);
+  }
+  // Bnd_Box
+  {
+    Bnd_Box aBox (gp_Pnt (20., 15., 10.), gp_Pnt (25., 20., 15.));
+    aBox.DumpJson (sout);
+    sout.Flush (Standard_True);
+  }
+  // Bnd_OBB
+  {
+    Bnd_OBB anOBB (gp_Pnt (-10., -15., -10.), gp_Dir (1., 0., 0.), gp_Dir (0., 1., 0.), gp_Dir (0., 0., 1.),
+                  5., 10., 5.);
+    anOBB.DumpJson (sout);
+    sout.Flush (Standard_True);
+  }
+  // Quantity_ColorRGBA
+  {
+    Quantity_ColorRGBA aColor (0.2f, 0.8f, 0.8f, 0.2f);
+    aColor.DumpJson (sout);
+    sout.Flush (Standard_True);
+  }
+  // Quantity_Color
+  {
+    Quantity_Color aColor (0.8, 0.8, 0.8, Quantity_TOC_RGB);
+    aColor.DumpJson (sout);
+    sout.Flush (Standard_True);
+  }
+  //shape messages
+  {
+    createShape();
+  }
+  myTreeModel->UpdateTreeModel();
+}
+
+// =======================================================================
+// function : levelAlerts
+// purpose :
+// =======================================================================
+void levelAlerts (const int theCurrentLevel, const int theTopLevel)
+{
+  if (theTopLevel - theCurrentLevel <= 0)
+    return;
+
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY (TCollection_AsciiString ("Level: " ) + theCurrentLevel)
+
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+  sout << "Alert(" << theCurrentLevel << "): " << 1 << ", " << 2 << std::endl;
+  sout << "Alert(" << theCurrentLevel << "): " << 3 << ", " << 4 << std::endl;
+
+  levelAlerts (theCurrentLevel + 1, theTopLevel);
+
+  sout << "Alert(" << theCurrentLevel << "): " << 4 << ", " << 5 << std::endl;
+}
+
+// =======================================================================
+// function : levelAlert
+// purpose :
+// =======================================================================
+void levelAlert (const int theCurrentLevel, const int theTopLevel)
+{
+  if (theTopLevel - theCurrentLevel <= 0)
+    return;
+
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY ("levelAlert")
+
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+  sout << "Level: " << theCurrentLevel << "(Single, no alerts on the level)" << std::endl;
+
+  levelAlerts (theCurrentLevel + 1, theTopLevel);
+}
+
+// =======================================================================
+// function : OnTestReportTree
+// purpose :
+// =======================================================================
+void MessageView_ActionsTest::OnTestReportTree()
+{
+  OCCT_ADD_MESSAGE_LEVEL_SENTRY ("MessageModel_Actions::OnTestReportTree()")
+  Message_Messenger::StreamBuffer sout = Message::SendInfo();
+
+  int aTopLevel = 3;
+  levelAlerts (1, aTopLevel);
+
+  sout << "Alert: " << 4 << std::endl;
+  levelAlert (1, aTopLevel);
+
+  myTreeModel->UpdateTreeModel();
+}
diff --git a/tools/MessageView/MessageView_ActionsTest.hxx b/tools/MessageView/MessageView_ActionsTest.hxx
new file mode 100644 (file)
index 0000000..047277e
--- /dev/null
@@ -0,0 +1,81 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageView_ActionsTest_H
+#define MessageView_ActionsTest_H
+
+#include <Standard.hxx>
+#include <Standard_Handle.hxx>
+#include <Standard_Transient.hxx>
+
+#include <inspector/MessageModel_ActionType.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QObject>
+#include <QMap>
+#include <QModelIndexList>
+#include <QPoint>
+#include <QString>
+#include <Standard_WarningsRestore.hxx>
+
+class Message_Report;
+class MessageModel_TreeModel;
+
+class QAction;
+class QItemSelectionModel;
+class QMenu;
+class QWidget;
+
+//! \class MessageView_ActionsTest
+//! Window that unites all MessageView controls.
+class MessageView_ActionsTest : public QObject
+{
+  Q_OBJECT
+public:
+
+  //! Constructor
+  MessageView_ActionsTest (QWidget* theParent, MessageModel_TreeModel* theTreeModel, QItemSelectionModel* theModel);
+
+  //! Destructor
+  virtual ~MessageView_ActionsTest() {}
+
+  //! Fills popup menu with actions depending on the current selection
+  //! \param theSelectedIndices tree model selected indices
+  //! \param theMenu menu to be filled
+  Standard_EXPORT void AddMenuActions (const QModelIndexList& theSelectedIndices, QMenu* theMenu);
+
+public slots:
+  //! Sending several alerts to check metric of message-alert-tool mechanizm
+  void OnTestMetric();
+
+  //! Sending several alerts to check property panel/presentations of messenger-alert-tool mechanizm
+  void OnTestMessenger();
+
+  //! Check tree of alerts
+  void OnTestReportTree();
+
+protected:
+  //! Returns report of selected tree view item if a report item is selected
+  //! \param theReportIndex tree model index of the found report
+  //! \return report instance or NULL
+  Handle(Message_Report) getSelectedReport (QModelIndex& theReportIndex) const;
+
+protected:
+  MessageModel_TreeModel* myTreeModel; //< tree model
+  QItemSelectionModel* mySelectionModel; //< selection model
+  QMap<MessageModel_ActionType, QAction*> myActions; //!< container of all actions
+};
+
+#endif
diff --git a/tools/MessageView/MessageView_Communicator.cxx b/tools/MessageView/MessageView_Communicator.cxx
new file mode 100644 (file)
index 0000000..9eacbac
--- /dev/null
@@ -0,0 +1,25 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageView_Communicator.hxx>
+
+// =======================================================================
+// function :  CreateCommunicator
+// purpose : Creates a communicator by the library loading
+// =======================================================================
+Standard_EXPORTEXTERNC TInspectorAPI_Communicator* CreateCommunicator()
+{
+  return new MessageView_Communicator();
+}
diff --git a/tools/MessageView/MessageView_Communicator.hxx b/tools/MessageView/MessageView_Communicator.hxx
new file mode 100644 (file)
index 0000000..b8cbf3b
--- /dev/null
@@ -0,0 +1,66 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageView_Communicator_H
+#define MessageView_Communicator_H
+
+#include <inspector/MessageView_Window.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
+
+//! \class MessageView_Communicator.
+//! \brief This is a connector from TInspector application to MessageView window
+class MessageView_Communicator : public TInspectorAPI_Communicator
+{
+public:
+
+  //! Constructor
+  MessageView_Communicator() : TInspectorAPI_Communicator(), myWindow (new MessageView_Window (0)) {}
+
+  //! Destructor
+  virtual ~MessageView_Communicator() Standard_OVERRIDE {}
+
+  //! Provides the container with a parent where this container should be inserted.
+  //! If Qt implementation, it should be QWidget with QLayout set inside
+  //! \param theParent a parent class
+  virtual void SetParent (void* theParent) Standard_OVERRIDE { myWindow->SetParent (theParent); }
+
+  //! Sets parameters container, it should be used when the plugin is initialized or in update content
+  //! \param theParameters a parameters container
+  virtual void SetParameters (const Handle(TInspectorAPI_PluginParameters)& theParameters) Standard_OVERRIDE
+  { myWindow->SetParameters (theParameters); }
+
+  //! Provide container for actions available in inspector on general level
+  //! \param theMenu if Qt implementation, it is QMenu object
+  virtual void FillActionsMenu(void* theMenu) Standard_OVERRIDE { myWindow->FillActionsMenu (theMenu); }
+
+  //! Returns plugin preferences, empty implementation by default
+  //! \param theItem container of preference elements
+  virtual void GetPreferences (TInspectorAPI_PreferencesDataMap& theItem) Standard_OVERRIDE
+  { myWindow->GetPreferences (theItem); }
+
+  //! Stores plugin preferences, empty implementation by default
+  //! \param theItem container of preference elements
+  virtual void SetPreferences (const TInspectorAPI_PreferencesDataMap& theItem) Standard_OVERRIDE
+  { myWindow->SetPreferences (theItem); }
+
+  //! Calls update of the plugin's content
+  virtual void UpdateContent() Standard_OVERRIDE { myWindow->UpdateContent(); }
+
+private:
+
+  MessageView_Window* myWindow; //!< current window
+};
+
+#endif
diff --git a/tools/MessageView/MessageView_MetricStatisticModel.cxx b/tools/MessageView/MessageView_MetricStatisticModel.cxx
new file mode 100644 (file)
index 0000000..4991be2
--- /dev/null
@@ -0,0 +1,157 @@
+// Created on: 2021-04-27
+// Created by: Svetlana SHUTINA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageView_MetricStatisticModel.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_ItemReport.hxx>
+
+#include <Message_AlertExtended.hxx>
+#include <Message_Attribute.hxx>
+#include <Message_AttributeMeter.hxx>
+#include <Message_CompositeAlerts.hxx>
+#include <Message_Report.hxx>
+
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void MessageView_MetricStatisticModel::Init (const TreeModel_ItemBasePtr theItemBase)
+{
+  MessageModel_ItemReportPtr aReportItem = itemDynamicCast<MessageModel_ItemReport> (theItemBase);
+  if (aReportItem)
+  {
+    Handle(Message_Report) aReport = aReportItem->GetReport();
+    const Message_ListOfAlert& anAlerts = aReport->GetAlerts (Message_Info);
+    for (Message_ListOfAlert::Iterator anIt(anAlerts); anIt.More(); anIt.Next())
+    {
+      appendAlert (anIt.Value());
+    }
+  }
+  else
+  {
+    MessageModel_ItemAlertPtr anAlertItem = itemDynamicCast<MessageModel_ItemAlert> (theItemBase);
+    if (anAlertItem)
+    {
+      appendAlert (anAlertItem->GetAlert());
+    }
+  }
+  std::map<double, std::list<QString>> aTmpMap;
+  std::list<double> aTimes;
+  for (QMap<QString, QPair<int, double> >::Iterator anIterValue = myValues.begin();
+       anIterValue != myValues.end(); ++anIterValue)
+  {
+    std::map<double, std::list<QString>>::iterator anIter = aTmpMap.find (anIterValue.value().second);
+    if (anIter != aTmpMap.end())
+    {
+      aTmpMap.at (anIterValue.value().second).push_back (anIterValue.key());
+    }
+    else
+    {
+      std::list<QString> list;
+      list.push_back (anIterValue.key());
+      aTmpMap.insert (std::pair<double, std::list<QString> > (anIterValue.value().second, list));
+      aTimes.push_back (anIterValue.value().second);
+    }
+  }
+  aTimes.sort();
+  aTimes.reverse();
+
+  for (std::list<double>::iterator anIter = aTimes.begin(); anIter != aTimes.end(); anIter++)
+  {
+    double aTime = *anIter;
+    std::list<QString> names = aTmpMap.at (aTime);
+    for (std::list<QString>::iterator name = names.begin(); name != names.end(); name++)
+    {
+      int nb = myValues.find (*name).value().first;
+      RowValues value = {*name, nb, aTime};
+      setValueByIndex (-1, value);
+    }
+  }
+}
+
+// =======================================================================
+// function : appendAlert
+// purpose :
+// =======================================================================
+void MessageView_MetricStatisticModel::appendAlert(const Handle(Message_Alert)& theAlert)
+{
+  Handle(Message_AlertExtended) anExtAlert = Handle(Message_AlertExtended)::DownCast (theAlert);
+  if (anExtAlert.IsNull())
+  {
+    return;
+  }
+  Handle(Message_Attribute) anAttr = anExtAlert->Attribute();
+  Handle(Message_AttributeMeter) anAttrMeter = Handle(Message_AttributeMeter)::DownCast (anAttr);
+  if(anAttrMeter.IsNull())
+  {
+    return;
+  }
+
+  int aCount = 1;
+  double aTime = 0;
+  if (myValues.contains (anAttr->GetName().ToCString()))
+  {
+    aCount = myValues.value (anAttr->GetName().ToCString()).first + 1;
+    aTime = myValues.value (anAttr->GetName().ToCString()).second
+          + anAttrMeter->StopValue (myMetricType) - anAttrMeter->StartValue (myMetricType);
+  }
+  else
+  {
+    aCount = 1;
+    aTime = anAttrMeter->StopValue (myMetricType) - anAttrMeter->StartValue (myMetricType);
+  }
+  myValues[anAttr->GetName().ToCString()] = qMakePair (aCount, aTime);
+
+  if (!anExtAlert->CompositeAlerts().IsNull())
+  {
+    const Message_ListOfAlert& anAlerts = anExtAlert->CompositeAlerts()->Alerts (Message_Info);
+    for (Message_ListOfAlert::Iterator anIt (anAlerts); anIt.More(); anIt.Next())
+    {
+      appendAlert (anIt.Value());
+    }
+  }
+}
+
+// =======================================================================
+// function : data
+// purpose :
+// =======================================================================
+QVariant MessageView_MetricStatisticModel::data (const QModelIndex& theIndex, int theRole) const
+{
+  switch (theRole)
+  {
+    case Qt::DisplayRole:
+    {
+      switch (theIndex.column())
+      {
+        case 0: return mySortValues[theIndex.row()].myName;
+        case 1: return mySortValues[theIndex.row()].myCounter;
+        case 2: return mySortValues[theIndex.row()].myTime;
+      }
+      break;
+    }
+    default: break;
+  }
+  return QVariant();
+}
+
+// =======================================================================
+// function : setValueByIndex
+// purpose :
+// =======================================================================
+void MessageView_MetricStatisticModel::setValueByIndex (const int theIndex, const RowValues theValue)
+{
+  mySortValues.insert (theIndex == -1 ? mySortValues.size() : theIndex, theValue);
+}
diff --git a/tools/MessageView/MessageView_MetricStatisticModel.hxx b/tools/MessageView/MessageView_MetricStatisticModel.hxx
new file mode 100644 (file)
index 0000000..f31131d
--- /dev/null
@@ -0,0 +1,93 @@
+// Created on: 2021-04-27
+// Created by: Svetlana SHUTINA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#pragma once
+
+#include <inspector/TreeModel_ItemBase.hxx>
+
+#include <Message_Alert.hxx>
+#include <Message_MetricType.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QAbstractTableModel>
+#include <Standard_WarningsRestore.hxx>
+
+//! @class MessageView_MetricStatisticModel
+//! Table model that sums for parameter alert the number of calls and
+//! metric time spent on the alert and its children.
+//! It visualizes a table with statistic information:
+//! the 1st column is alert name, the 2nd column is a counter of the name appearance,
+//! the 3rd column is the cummulative time.
+//! Tables rows are sorted by descending time.
+class MessageView_MetricStatisticModel : public QAbstractTableModel
+{
+private:
+  // Struct to describe a row of the table
+  struct RowValues
+  {
+    QString myName; //!< string values
+    int myCounter;  //!< count of the values
+    double myTime;  //!< total time
+  };
+
+public:
+  //! Constructor
+  MessageView_MetricStatisticModel (const Message_MetricType& theType, QObject* theParent = 0)
+   : QAbstractTableModel (theParent), myMetricType (theType) {}
+
+  //! Destructor
+  virtual ~MessageView_MetricStatisticModel() {}
+
+  //! Fills map of the fields values
+  //! \param theItemBase a parent item.
+  Standard_EXPORT void Init (const TreeModel_ItemBasePtr theItemBase);
+
+  //! Returns content of the model index for the given role,
+  //! it is obtained from internal container of values.
+  //! It returns value only for DisplayRole
+  //! \param theIndex a model index
+  //! \param theRole a view role
+  //! \return value intepreted depending on the given role
+  Standard_EXPORT virtual QVariant data (const QModelIndex& theIndex, int theRole = Qt::DisplayRole) const Standard_OVERRIDE;
+
+  //! Returns number of rows
+  //! \param theParent an index of the parent item
+  //! \return an integer value
+  Standard_EXPORT virtual int rowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return myValues.size(); }
+
+  //! Returns number of columns
+  //! \param theParent an index of the parent item
+  //! \return an integer value
+  Standard_EXPORT virtual int columnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return 3; }
+
+private:
+
+  //! Sorts values and fills map of the fields values depends on unique text identifier. It's recursive.
+  //! \param theAlert unique text identifier. The alert should have attribute of the metric type
+  void appendAlert (const Handle(Message_Alert)& theAlert);
+
+  //! Adds theValues in the map to position theIndex
+  //! If theIndex is -1, the element will be added in the end of the map
+  //! \param theIndex the serial number in the map
+  //! \param theValues the field values
+  void setValueByIndex (const int theIndex, const RowValues theValues);
+
+private:
+  Message_MetricType myMetricType;             //!< current metric type
+  QMap<QString, QPair<int, double> > myValues; //!< map of fields values
+  QMap<int, RowValues> mySortValues;           //!< sorted map of fields values
+};
diff --git a/tools/MessageView/MessageView_VisibilityState.cxx b/tools/MessageView/MessageView_VisibilityState.cxx
new file mode 100644 (file)
index 0000000..6ad8e35
--- /dev/null
@@ -0,0 +1,81 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageView_VisibilityState.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+
+#include <Message_AlertExtended.hxx>
+#include <Message_AttributeStream.hxx>
+
+#include <TopoDS_AlertAttribute.hxx>
+
+// =======================================================================
+// function : CanBeVisible
+// purpose :
+// =======================================================================
+bool MessageView_VisibilityState::CanBeVisible (const QModelIndex& theIndex) const
+{
+  MessageModel_ItemAlertPtr anAlertItem = getAlertItem (theIndex);
+  if (anAlertItem)
+  {
+    NCollection_List<Handle(Standard_Transient)> aPresentations;
+    anAlertItem->Presentations (aPresentations);
+    if (!aPresentations.IsEmpty())
+      return true;
+  }
+  return false;
+}
+
+// =======================================================================
+// function : SetVisible
+// purpose :
+// =======================================================================
+bool MessageView_VisibilityState::SetVisible (const QModelIndex&, const bool, const bool)
+{
+  return false;
+}
+
+// =======================================================================
+// function : IsVisible
+// purpose :
+// =======================================================================
+bool MessageView_VisibilityState::IsVisible (const QModelIndex&) const
+{
+  return false;
+}
+
+// =======================================================================
+// function : OnClicked
+// purpose :
+// =======================================================================
+void MessageView_VisibilityState::OnClicked (const QModelIndex& theIndex)
+{
+  processClicked (theIndex);
+  emit itemClicked (theIndex);
+}
+
+// =======================================================================
+// function : getAlertItem
+// purpose :
+// =======================================================================
+MessageModel_ItemAlertPtr MessageView_VisibilityState::getAlertItem (const QModelIndex& theIndex) const
+{
+  TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (theIndex);
+  if (!anItemBase)
+    return MessageModel_ItemAlertPtr();
+
+  MessageModel_ItemAlertPtr anAlertItem = itemDynamicCast<MessageModel_ItemAlert>(anItemBase);
+  return anAlertItem;
+}
diff --git a/tools/MessageView/MessageView_VisibilityState.hxx b/tools/MessageView/MessageView_VisibilityState.hxx
new file mode 100644 (file)
index 0000000..db37120
--- /dev/null
@@ -0,0 +1,87 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageView_VisibilityState_H
+#define MessageView_VisibilityState_H
+
+#include <inspector/TreeModel_VisibilityState.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/View_Displayer.hxx>
+
+#include <Standard.hxx>
+#include <Standard_Macro.hxx>
+#include <TopoDS_Shape.hxx>
+
+class TreeModel_ModelBase;
+
+//! \class MessageView_VisibilityState
+//! \brief Class provides connection between model and visualization control
+class MessageView_VisibilityState : public QObject, public TreeModel_VisibilityState
+{
+  Q_OBJECT
+public:
+  //! Constructor
+  MessageView_VisibilityState (TreeModel_ModelBase* theModel)
+  : TreeModel_VisibilityState (theModel), myPresentationType (View_PresentationType_Main) {}
+
+  //! Destructor
+  ~MessageView_VisibilityState() {}
+
+  //! Sets current displayer
+  //! \theDisplayer class that provides connection to visualized objects
+  void SetDisplayer (View_Displayer* theDisplayer) { myDisplayer = theDisplayer; }
+
+  //! Sets presentation type for displayer
+  //! \param theType type value
+  void SetPresentationType (const View_PresentationType theType) { myPresentationType = theType; }
+
+  //! Returns true if visibility of the item can be changed
+  //! \param theIndex tree model index
+  //! \return boolean value
+  Standard_EXPORT virtual bool CanBeVisible (const QModelIndex& theIndex) const Standard_OVERRIDE;
+
+  //! Sets visibility state
+  //! \theIndex tree model index
+  //! \param theState visibility state
+  //! \param toEmitDataChanged boolean flag whether emit of the model should be done immediatelly
+  //! \return true if state is changed
+  Standard_EXPORT virtual bool SetVisible (const QModelIndex& theIndex, const bool theState, const bool toEmitDataChanged) Standard_OVERRIDE;
+
+  //! Returns visibility state value
+  Standard_EXPORT virtual bool IsVisible (const QModelIndex& theIndex) const Standard_OVERRIDE;
+
+public slots:
+  //! Processes the mouse clicked on the index.
+  //! It changes the item visibility if model allows to change it.
+  //! \theIndex tree model index
+  void OnClicked (const QModelIndex& theIndex);
+
+signals:
+  //! Signal after OnClicked is performed
+  //! \theIndex tree model index
+  void itemClicked (const QModelIndex& theIndex);
+
+protected:
+  //! Gets the alert item
+  //! \theIndex tree model index
+  //! \return item or NULL
+  MessageModel_ItemAlertPtr getAlertItem (const QModelIndex& theIndex) const;
+
+private:
+  View_Displayer* myDisplayer; //! view displayer
+  View_PresentationType myPresentationType; //! presentation type
+};
+
+#endif
diff --git a/tools/MessageView/MessageView_Window.cxx b/tools/MessageView/MessageView_Window.cxx
new file mode 100644 (file)
index 0000000..65dbd8e
--- /dev/null
@@ -0,0 +1,719 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/MessageView_Window.hxx>
+#include <inspector/MessageView_VisibilityState.hxx>
+#include <inspector/MessageView_ActionsTest.hxx>
+
+#include <inspector/MessageModel_Actions.hxx>
+#include <inspector/MessageModel_ItemAlert.hxx>
+#include <inspector/MessageModel_ItemReport.hxx>
+#include <inspector/MessageModel_ItemRoot.hxx>
+#include <inspector/MessageModel_TreeModel.hxx>
+#include <inspector/MessageView_MetricStatisticModel.hxx>
+
+#include <inspector/TreeModel_Tools.hxx>
+
+#include <inspector/ViewControl_PropertyView.hxx>
+#include <inspector/ViewControl_TableModelValues.hxx>
+#include <inspector/ViewControl_TreeView.hxx>
+#include <inspector/Convert_Tools.hxx>
+
+#include <inspector/View_Viewer.hxx>
+#include <inspector/View_Widget.hxx>
+
+#include <AIS_Shape.hxx>
+#include <Graphic3d_Camera.hxx>
+#include <Message.hxx>
+#include <TCollection_AsciiString.hxx>
+
+#include <inspector/ViewControl_Tools.hxx>
+#include <inspector/View_Displayer.hxx>
+#include <inspector/View_ToolBar.hxx>
+#include <inspector/View_Widget.hxx>
+#include <inspector/View_Window.hxx>
+#include <inspector/View_Viewer.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QApplication>
+#include <QAction>
+#include <QDockWidget>
+#include <QFile>
+#include <QFileDialog>
+#include <QHeaderView>
+#include <QLayout>
+#include <QMainWindow>
+#include <QMenu>
+#include <QMessageBox>
+#include <QPushButton>
+#include <QTextStream>
+#include <QToolBar>
+#include <QToolButton>
+#include <QTreeView>
+#include <QWidget>
+#include <Standard_WarningsRestore.hxx>
+
+const int DEFAULT_SHAPE_VIEW_WIDTH = 400;
+const int DEFAULT_SHAPE_VIEW_HEIGHT = 450;
+const int DEFAULT_SHAPE_VIEW_POSITION_X = 60;
+const int DEFAULT_SHAPE_VIEW_POSITION_Y = 60;
+
+const int MESSAGEVIEW_DEFAULT_TREE_VIEW_WIDTH = 950;
+const int MESSAGEVIEW_DEFAULT_TREE_VIEW_HEIGHT = 500;
+
+const int MESSAGEVIEW_DEFAULT_VIEW_WIDTH = 200;
+const int MESSAGEVIEW_DEFAULT_VIEW_HEIGHT = 300;
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+MessageView_Window::MessageView_Window (QWidget* theParent)
+: QObject (theParent)
+{
+  myMainWindow = new QMainWindow (theParent);
+
+  myTreeView = new ViewControl_TreeView (myMainWindow);
+  ((ViewControl_TreeView*)myTreeView)->SetPredefinedSize (QSize (MESSAGEVIEW_DEFAULT_TREE_VIEW_WIDTH,
+                                                                 MESSAGEVIEW_DEFAULT_TREE_VIEW_HEIGHT));
+  MessageModel_TreeModel* aModel = new MessageModel_TreeModel (myTreeView);
+  aModel->InitColumns();
+
+  connect (myTreeView->header(), SIGNAL (sectionResized (int, int, int)),
+           this, SLOT(onHeaderResized (int, int, int)));
+
+  myTreeView->setModel (aModel);
+  MessageView_VisibilityState* aVisibilityState = new MessageView_VisibilityState (aModel);
+  aModel->SetVisibilityState (aVisibilityState);
+  connect (aVisibilityState, SIGNAL (itemClicked (const QModelIndex&)),
+           this, SLOT(onTreeViewVisibilityClicked(const QModelIndex&)));
+
+  TreeModel_Tools::UseVisibilityColumn (myTreeView);
+  TreeModel_Tools::SetDefaultHeaderSections (myTreeView);
+
+  QItemSelectionModel* aSelectionModel = new QItemSelectionModel (aModel);
+  myTreeView->setSelectionMode (QAbstractItemView::ExtendedSelection);
+  myTreeView->setSelectionModel (aSelectionModel);
+  connect (aSelectionModel, SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)),
+           this, SLOT (onTreeViewSelectionChanged (const QItemSelection&, const QItemSelection&)));
+
+  myTreeViewActions = new MessageModel_Actions (myMainWindow, aModel, aSelectionModel);
+  myTestViewActions = new MessageView_ActionsTest (myMainWindow, aModel, aSelectionModel);
+
+  myTreeView->setContextMenuPolicy (Qt::CustomContextMenu);
+  connect (myTreeView, SIGNAL (customContextMenuRequested (const QPoint&)),
+          this, SLOT (onTreeViewContextMenuRequested (const QPoint&)));
+
+  connect (myTreeView->header(), SIGNAL (sectionResized (int, int, int)),
+           this, SLOT(onHeaderResized (int, int, int)));
+
+  QModelIndex aParentIndex = myTreeView->model()->index (0, 0);
+  myTreeView->setExpanded (aParentIndex, true);
+
+  myMainWindow->setCentralWidget (myTreeView);
+
+  // property view
+  myPropertyView = new ViewControl_PropertyView (myMainWindow);
+  myPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel"), myMainWindow);
+  myPropertyPanelWidget->setObjectName (myPropertyPanelWidget->windowTitle());
+  myPropertyPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
+  myPropertyPanelWidget->setWidget (myPropertyView->GetControl());
+  myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myPropertyPanelWidget);
+  connect (myPropertyPanelWidget->toggleViewAction(), SIGNAL(toggled(bool)), this, SLOT (onPropertyPanelShown (bool)));
+  connect (myPropertyView, SIGNAL (propertyViewDataChanged()), this, SLOT (onPropertyViewDataChanged()));
+
+  myCustomView = new QTableView (myMainWindow);
+  myCustomPanelWidget = new QDockWidget (tr ("PropertyPanel (custom)"), myMainWindow);
+  myCustomPanelWidget->setObjectName (myCustomPanelWidget->windowTitle());
+  myCustomPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
+  myCustomPanelWidget->setWidget (myCustomView);
+  myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myCustomPanelWidget);
+
+  // view
+  myViewWindow = new View_Window (myMainWindow, NULL, false);
+  connect (myViewWindow, SIGNAL(eraseAllPerformed()), this, SLOT(onEraseAllPerformed()));
+  aVisibilityState->SetDisplayer (myViewWindow->Displayer());
+  aVisibilityState->SetPresentationType (View_PresentationType_Main);
+  myViewWindow->ViewWidget()->SetPredefinedSize (MESSAGEVIEW_DEFAULT_VIEW_WIDTH, MESSAGEVIEW_DEFAULT_VIEW_HEIGHT);
+
+  myViewDockWidget = new QDockWidget (tr ("View"), myMainWindow);
+  myViewDockWidget->setObjectName (myViewDockWidget->windowTitle());
+  myViewDockWidget->setWidget (myViewWindow);
+  myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myViewDockWidget);
+
+  myMainWindow->tabifyDockWidget (myCustomPanelWidget, myViewDockWidget);
+
+  myMainWindow->resize (DEFAULT_SHAPE_VIEW_WIDTH, DEFAULT_SHAPE_VIEW_HEIGHT);
+  myMainWindow->move (DEFAULT_SHAPE_VIEW_POSITION_X, DEFAULT_SHAPE_VIEW_POSITION_Y);
+
+  updateVisibleColumns();
+}
+
+// =======================================================================
+// function : SetParent
+// purpose :
+// =======================================================================
+void MessageView_Window::SetParent (void* theParent)
+{
+  QWidget* aParent = (QWidget*)theParent;
+  if (aParent)
+  {
+    QLayout* aLayout = aParent->layout();
+    if (aLayout)
+      aLayout->addWidget (GetMainWindow());
+  }
+  else
+  {
+    GetMainWindow()->setParent (0);
+    GetMainWindow()->setVisible (true);
+  }
+}
+
+// =======================================================================
+// function : FillActionsMenu
+// purpose :
+// =======================================================================
+void MessageView_Window::FillActionsMenu (void* theMenu)
+{
+  QMenu* aMenu = (QMenu*)theMenu;
+  QList<QDockWidget*> aDockwidgets = myMainWindow->findChildren<QDockWidget*>();
+  for (QList<QDockWidget*>::iterator it = aDockwidgets.begin(); it != aDockwidgets.end(); ++it)
+  {
+    QDockWidget* aDockWidget = *it;
+    if (aDockWidget->parentWidget() == myMainWindow)
+      aMenu->addAction (aDockWidget->toggleViewAction());
+  }
+}
+
+// =======================================================================
+// function : GetPreferences
+// purpose :
+// =======================================================================
+void MessageView_Window::GetPreferences (TInspectorAPI_PreferencesDataMap& theItem)
+{
+  theItem.Clear();
+  theItem.Bind ("geometry",  TreeModel_Tools::ToString (myMainWindow->saveState()).toStdString().c_str());
+
+  QMap<QString, QString> anItems;
+  TreeModel_Tools::SaveState (myTreeView, anItems);
+  for (QMap<QString, QString>::const_iterator anItemsIt = anItems.begin(); anItemsIt != anItems.end(); anItemsIt++)
+  {
+    theItem.Bind (anItemsIt.key().toStdString().c_str(), anItemsIt.value().toStdString().c_str());
+  }
+
+  anItems.clear();
+  View_Window::SaveState(myViewWindow, anItems);
+  for (QMap<QString, QString>::const_iterator anItemsIt = anItems.begin(); anItemsIt != anItems.end(); anItemsIt++)
+  {
+    theItem.Bind (anItemsIt.key().toStdString().c_str(), anItemsIt.value().toStdString().c_str());
+  }
+}
+
+// =======================================================================
+// function : SetPreferences
+// purpose :
+// =======================================================================
+void MessageView_Window::SetPreferences (const TInspectorAPI_PreferencesDataMap& theItem)
+{
+  for (TInspectorAPI_IteratorOfPreferencesDataMap anItemIt (theItem); anItemIt.More(); anItemIt.Next())
+  {
+    if (anItemIt.Key().IsEqual ("geometry"))
+      myMainWindow->restoreState (TreeModel_Tools::ToByteArray (anItemIt.Value().ToCString()));
+    else if (TreeModel_Tools::RestoreState (myTreeView, anItemIt.Key().ToCString(), anItemIt.Value().ToCString()))
+      continue;
+    else if (myViewWindow && View_Window::RestoreState(myViewWindow, anItemIt.Key().ToCString(), anItemIt.Value().ToCString()))
+      continue;
+  }
+}
+
+// =======================================================================
+// function : UpdateContent
+// purpose :
+// =======================================================================
+void MessageView_Window::UpdateContent()
+{
+  TCollection_AsciiString aName = "TKMessageView";
+  if (myParameters->FindParameters (aName))
+  {
+    NCollection_List<Handle(Standard_Transient)> aParameters = myParameters->Parameters (aName);
+    // Init will remove from parameters those, that are processed only one time (TShape)
+    Init (aParameters);
+    myParameters->SetParameters (aName, aParameters);
+  }
+  Handle(Message_Report) aDefaultReport = Message::DefaultReport();
+  MessageModel_TreeModel* aViewModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+  if (!aDefaultReport.IsNull() && !aViewModel->HasReport (aDefaultReport))
+  {
+    addReport (aDefaultReport);
+  }
+
+  updateTreeModel();
+  updateVisibleColumns();
+}
+
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void MessageView_Window::Init (NCollection_List<Handle(Standard_Transient)>& theParameters)
+{
+  Handle(AIS_InteractiveContext) aContext;
+  NCollection_List<Handle(Standard_Transient)> aParameters;
+
+  Handle(Graphic3d_Camera) aViewCamera;
+
+  for (NCollection_List<Handle(Standard_Transient)>::Iterator aParamsIt (theParameters);
+       aParamsIt.More(); aParamsIt.Next())
+  {
+    Handle(Standard_Transient) anObject = aParamsIt.Value();
+    Handle(Message_Report) aMessageReport = Handle(Message_Report)::DownCast (anObject);
+    if (!aMessageReport.IsNull())
+    {
+      addReport (aMessageReport);
+    }
+    else if (!Handle(AIS_InteractiveContext)::DownCast (anObject).IsNull())
+    {
+      aParameters.Append (anObject);
+      if (aContext.IsNull())
+        aContext = Handle(AIS_InteractiveContext)::DownCast (anObject);
+    }
+    else if (!Handle(Graphic3d_Camera)::DownCast (anObject).IsNull())
+    {
+      aViewCamera = Handle(Graphic3d_Camera)::DownCast (anObject);
+    }
+  }
+  MessageModel_TreeModel* aTreeModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+  if (!aTreeModel)
+    return;
+
+  aTreeModel->EmitLayoutChanged();
+
+  if (!aContext.IsNull())
+  {
+    myViewWindow->SetContext (View_ContextType_External, aContext);
+  }
+  theParameters = aParameters;
+}
+
+// =======================================================================
+// function : updateTreeModel
+// purpose :
+// =======================================================================
+void MessageView_Window::updateTreeModel()
+{
+  MessageModel_TreeModel* aViewModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+  if (!aViewModel)
+    return;
+
+  aViewModel->UpdateTreeModel();
+}
+
+// =======================================================================
+// function : addReport
+// purpose :
+// =======================================================================
+void MessageView_Window::addReport (const Handle(Message_Report)& theReport,
+                                    const TCollection_AsciiString& theReportDescription)
+{
+  MessageModel_TreeModel* aModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+  aModel->AddReport (theReport, theReportDescription);
+}
+
+// =======================================================================
+// function : onTreeViewVisibilityClicked
+// purpose :
+// =======================================================================
+void MessageView_Window::onTreeViewVisibilityClicked(const QModelIndex& theIndex)
+{
+  MessageModel_TreeModel* aTreeModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+  TreeModel_VisibilityState* aVisibilityState = aTreeModel->GetVisibilityState();
+  if (!aVisibilityState->IsVisible (theIndex))
+    myPropertyView->ClearActiveTablesSelection();
+}
+
+// =======================================================================
+// function : onTreeViewSelectionChanged
+// purpose :
+// =======================================================================
+void MessageView_Window::onTreeViewSelectionChanged (const QItemSelection&, const QItemSelection&)
+{
+  if (!myPropertyPanelWidget->toggleViewAction()->isChecked())
+    return;
+
+  updatePropertyPanelBySelection();
+  updatePreviewPresentation();
+}
+
+// =======================================================================
+// function : onTreeViewContextMenuRequested
+// purpose :
+// =======================================================================
+void MessageView_Window::onTreeViewContextMenuRequested (const QPoint& thePosition)
+{
+  QMenu* aMenu = new QMenu (GetMainWindow());
+
+  MessageModel_ItemRootPtr aRootItem;
+  MessageModel_ItemReportPtr aReportItem;
+  QModelIndexList aSelectedIndices = myTreeView->selectionModel()->selectedIndexes();
+
+  for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    aRootItem = itemDynamicCast<MessageModel_ItemRoot> (anItemBase);
+    if (aRootItem)
+      break;
+    aReportItem = itemDynamicCast<MessageModel_ItemReport> (anItemBase);
+    if (aReportItem)
+      break;
+  }
+  if (aRootItem)
+  {
+    aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Create Default Report"),
+                      SLOT (onCreateDefaultReport()), myMainWindow, this));
+  }
+  else if (aReportItem)
+  {
+    aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Export Report"), SLOT (onExportReport()), myMainWindow, this));
+
+    QAction* anAction = ViewControl_Tools::CreateAction (tr ("WallClock Metric statistic"),
+      SLOT (onMetricStatistic()), myMainWindow, this);
+    anAction->setCheckable (true);
+    aMenu->addAction (anAction);
+  }
+  aMenu->addSeparator();
+
+  aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Preview children presentations"), SLOT (onPreviewChildren()), myMainWindow, this));
+  aMenu->addSeparator();
+
+  myTreeViewActions->AddMenuActions (aSelectedIndices, aMenu);
+  addActivateMetricActions (aMenu);
+
+  aMenu->addSeparator();
+  myTestViewActions->AddMenuActions (aSelectedIndices, aMenu);
+
+  QPoint aPoint = myTreeView->mapToGlobal (thePosition);
+  aMenu->exec (aPoint);
+}
+
+// =======================================================================
+// function : onPropertyPanelShown
+// purpose :
+// =======================================================================
+void MessageView_Window::onPropertyPanelShown (bool isToggled)
+{
+  if (!isToggled)
+    return;
+
+  updatePropertyPanelBySelection();
+}
+
+// =======================================================================
+// function : onPropertyViewDataChanged
+// purpose :
+// =======================================================================
+void MessageView_Window::onPropertyViewDataChanged()
+{
+  QItemSelectionModel* aModel = myTreeView->selectionModel();
+  if (!aModel)
+    return;
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
+  TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+  if (!anItemBase)
+    return;
+
+  updatePropertyPanelBySelection();
+  updatePreviewPresentation();
+}
+
+// =======================================================================
+// function : onHeaderResized
+// purpose :
+// =======================================================================
+void MessageView_Window::onHeaderResized (int theSectionId, int, int)
+{
+  TreeModel_ModelBase* aViewModel = dynamic_cast<TreeModel_ModelBase*> (myTreeView->model());
+
+  TreeModel_HeaderSection* aSection = aViewModel->ChangeHeaderItem (theSectionId);
+  aSection->SetWidth (myTreeView->columnWidth (theSectionId));
+}
+
+// =======================================================================
+// function : onEraseAllPerformed
+// purpose :
+// =======================================================================
+void MessageView_Window::onEraseAllPerformed()
+{
+  MessageModel_TreeModel* aTreeModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+
+  aTreeModel->Reset();
+  aTreeModel->EmitLayoutChanged();
+}
+
+// =======================================================================
+// function : onExportReport
+// purpose :
+// =======================================================================
+void MessageView_Window::onExportReport()
+{
+  QItemSelectionModel* aModel = myTreeView->selectionModel();
+  if (!aModel)
+    return;
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
+  TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+  if (!anItemBase)
+    return;
+  MessageModel_ItemReportPtr aReportItem = itemDynamicCast<MessageModel_ItemReport>(anItemBase);
+  if (!aReportItem)
+    return;
+
+  QString aFilter (tr ("Document file (*.json *)"));
+  QString aSelectedFilter;
+  QString aFileName = QFileDialog::getSaveFileName (0, tr ("Export report to file"), QString(), aFilter, &aSelectedFilter);
+
+  Handle(Message_Report) aReport = aReportItem->GetReport();
+  Standard_SStream aStream;
+  aReport->DumpJson(aStream);
+
+  QFile aLogFile(aFileName);
+  if (!aLogFile.open(QFile::WriteOnly | QFile::Text))
+  {
+    return;
+  }
+  QTextStream anOut( &aLogFile );
+  anOut << Standard_Dump::FormatJson (aStream).ToCString();
+  aLogFile.close();
+}
+
+// =======================================================================
+// function : onCreateDefaultReport
+// purpose :
+// =======================================================================
+void MessageView_Window::onCreateDefaultReport()
+{
+  if (!Message::DefaultReport().IsNull())
+  {
+    return;
+  }
+
+  addReport (Message::DefaultReport (Standard_True));
+}
+
+// =======================================================================
+// function : onPreviewChildren
+// purpose :
+// =======================================================================
+void MessageView_Window::onPreviewChildren()
+{
+  QItemSelectionModel* aModel = myTreeView->selectionModel();
+  if (!aModel)
+    return;
+
+  QModelIndexList aSelectedIndices = myTreeView->selectionModel()->selectedIndexes();
+  NCollection_List<Handle(Standard_Transient)> aPresentations;
+  TreeModel_ModelBase::SubItemsPresentations (aSelectedIndices, aPresentations);
+
+  displayer()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations);
+}
+
+// =======================================================================
+// function : onMetricStatistic
+// purpose :
+// =======================================================================
+void MessageView_Window::onMetricStatistic()
+{
+  QItemSelectionModel* aModel = myTreeView->selectionModel();
+  if (!aModel)
+  {
+    return;
+  }
+
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
+  TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+  if (!anItemBase)
+  {
+    return;
+  }
+
+  MessageView_MetricStatisticModel* aUnitByNameModel = new MessageView_MetricStatisticModel (Message_MetricType_WallClock, myCustomView);
+  aUnitByNameModel->Init (anItemBase);
+  myCustomView->setModel (aUnitByNameModel);
+}
+
+// =======================================================================
+// function : addActivateMetricActions
+// purpose :
+// =======================================================================
+void MessageView_Window::addActivateMetricActions (QMenu* theMenu)
+{
+  Handle(Message_Report) aReport = Message::DefaultReport();
+  if (aReport.IsNull())
+  {
+    return;
+  }
+
+  QMenu* aSubMenu = new QMenu ("Activate metric");
+  for (int aMetricId = (int)Message_MetricType_None + 1; aMetricId <= (int)Message_MetricType_MemHeapUsage; aMetricId++)
+  {
+    Message_MetricType aMetricType = (Message_MetricType)aMetricId;
+    QAction* anAction = ViewControl_Tools::CreateAction (Message::MetricToString (aMetricType),
+      SLOT (OnActivateMetric()), parent(), this);
+    anAction->setCheckable (true);
+    anAction->setChecked (aReport->ActiveMetrics().Contains (aMetricType));
+    aSubMenu->addAction (anAction);
+  }
+  aSubMenu->addSeparator();
+  aSubMenu->addAction (ViewControl_Tools::CreateAction ("Deactivate all", SLOT (OnDeactivateAllMetrics()), parent(), this));
+
+  theMenu->addMenu (aSubMenu);
+}
+
+// =======================================================================
+// function : OnActivateMetric
+// purpose :
+// =======================================================================
+void MessageView_Window::OnActivateMetric()
+{
+  QAction* anAction = (QAction*)(sender());
+
+  Message_MetricType aMetricType;
+  if (!Message::MetricFromString (anAction->text().toStdString().c_str(), aMetricType))
+    return;
+
+  Handle(Message_Report) aReport = Message::DefaultReport();
+  const NCollection_IndexedMap<Message_MetricType>& anActiveMetrics = aReport->ActiveMetrics();
+  aReport->SetActiveMetric (aMetricType, !anActiveMetrics.Contains (aMetricType));
+
+  updateVisibleColumns();
+}
+
+// =======================================================================
+// function : OnDeactivateAllMetrics
+// purpose :
+// =======================================================================
+void MessageView_Window::OnDeactivateAllMetrics()
+{
+  Handle(Message_Report) aReport = Message::DefaultReport();
+  if (aReport.IsNull())
+    return;
+  aReport->ClearMetrics();
+
+  updateVisibleColumns();
+}
+
+// =======================================================================
+// function : displayer
+// purpose :
+// =======================================================================
+View_Displayer* MessageView_Window::displayer()
+{
+  return myViewWindow->Displayer();
+}
+
+// =======================================================================
+// function : updatePropertyPanelBySelection
+// purpose :
+// =======================================================================
+void MessageView_Window::updatePropertyPanelBySelection()
+{
+  ViewControl_TableModelValues* aTableValues = 0;
+
+  QItemSelectionModel* aModel = myTreeView->selectionModel();
+  if (!aModel)
+    return;
+
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (aModel->selectedIndexes(), 0);
+  TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+  if (anItemBase)
+  {
+    Handle(TreeModel_ItemProperties) anItemProperties = anItemBase->Properties ();
+    if (!anItemProperties.IsNull())
+    {
+      aTableValues = new ViewControl_TableModelValues();
+      aTableValues->SetProperties (anItemProperties);
+    }
+  }
+  myPropertyView->Init (aTableValues);
+}
+
+// =======================================================================
+// function : updatePreviewPresentation
+// purpose :
+// =======================================================================
+void MessageView_Window::updatePreviewPresentation()
+{
+  Handle(AIS_InteractiveContext) aContext = myViewWindow->ViewToolBar()->CurrentContext();
+  if (aContext.IsNull())
+    return;
+
+  NCollection_List<Handle(Standard_Transient)> aPresentations;
+  QModelIndexList aSelectedIndices = myTreeView->selectionModel()->selectedIndexes();
+  for (QModelIndexList::const_iterator aSelIt = aSelectedIndices.begin(); aSelIt != aSelectedIndices.end(); aSelIt++)
+  {
+    QModelIndex anIndex = *aSelIt;
+    if (anIndex.column() != 0)
+      continue;
+
+    TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
+    if (!anItemBase)
+      continue;
+
+    anItemBase->Presentations (aPresentations);
+  }
+
+  displayer()->UpdatePreview (View_DisplayActionType_DisplayId, aPresentations);
+}
+
+// =======================================================================
+// function : updateVisibleColumns
+// purpose :
+// =======================================================================
+void MessageView_Window::updateVisibleColumns()
+{
+  MessageModel_TreeModel* aViewModel = dynamic_cast<MessageModel_TreeModel*> (myTreeView->model());
+
+  NCollection_IndexedMap<Message_MetricType> anActiveMetrics;
+  for (NCollection_List<MessageModel_ReportInformation>::Iterator anIterator (aViewModel->Reports()); anIterator.More(); anIterator.Next())
+  {
+    Handle(Message_Report) aReport = anIterator.Value().myReport;
+    for (NCollection_IndexedMap<Message_MetricType>::Iterator aMetricsIterator (aReport->ActiveMetrics()); aMetricsIterator.More(); aMetricsIterator.Next())
+    {
+      if (anActiveMetrics.Contains (aMetricsIterator.Value()))
+        continue;
+      anActiveMetrics.Add (aMetricsIterator.Value());
+    }
+  }
+
+  for (int aMetricId = (int)Message_MetricType_None + 1; aMetricId <= (int)Message_MetricType_MemHeapUsage; aMetricId++)
+  {
+    Message_MetricType aMetricType = (Message_MetricType)aMetricId;
+    QList<int> aMetricColumns;
+    aViewModel->GetMetricColumns (aMetricType, aMetricColumns);
+    bool isColumnHidden = !anActiveMetrics.Contains (aMetricType);
+    for (int i = 0; i < aMetricColumns.size(); i++)
+    {
+      int aColumnId = aMetricColumns[i];
+      myTreeView->setColumnHidden (aColumnId, isColumnHidden);
+      TreeModel_HeaderSection* aSection = aViewModel->ChangeHeaderItem (aColumnId);
+      aSection->SetIsHidden (isColumnHidden);
+    }
+  }
+}
diff --git a/tools/MessageView/MessageView_Window.hxx b/tools/MessageView/MessageView_Window.hxx
new file mode 100644 (file)
index 0000000..5ef7066
--- /dev/null
@@ -0,0 +1,197 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef MessageView_Window_H
+#define MessageView_Window_H
+
+#include <Message_Report.hxx>
+#include <Standard.hxx>
+#include <TCollection_AsciiString.hxx>
+
+#include <inspector/MessageModel_Actions.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+
+#include <AIS_InteractiveContext.hxx>
+#include <AIS_InteractiveObject.hxx>
+#include <TopoDS_Shape.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QItemSelection>
+#include <QList>
+#include <QModelIndexList>
+#include <QObject>
+#include <QPoint>
+#include <QString>
+#include <QTableView>
+#include <QTreeView>
+#include <Standard_WarningsRestore.hxx>
+
+class View_Displayer;
+class View_Window;
+
+class ViewControl_PropertyView;
+
+class MessageView_ActionsTest;
+
+class QDockWidget;
+class QMainWindow;
+class QMenu;
+class QWidget;
+
+//! \class MessageView_Window
+//! Window that unites all MessageView controls.
+class MessageView_Window : public QObject
+{
+  Q_OBJECT
+public:
+
+  //! Constructor
+  Standard_EXPORT MessageView_Window (QWidget* theParent);
+
+  //! Destructor
+  virtual ~MessageView_Window() {}
+
+  //! Provides the container with a parent where this container should be inserted.
+  //! If Qt implementation, it should be QWidget with QLayout set inside
+  //! \param theParent a parent class
+  Standard_EXPORT void SetParent (void* theParent);
+
+  //! Sets parameters container, it should be used when the plugin is initialized or in update content
+  //! \param theParameters a parameters container
+  void SetParameters (const Handle(TInspectorAPI_PluginParameters)& theParameters)
+  { myParameters = theParameters; myTreeViewActions->SetParameters (theParameters); }
+
+  //! Provide container for actions available in inspector on general level
+  //! \param theMenu if Qt implementation, it is QMenu object
+  Standard_EXPORT virtual void FillActionsMenu (void* theMenu);
+
+  //! Returns plugin preferences: dock widgets state, tree view columns.
+  //! \param theItem container of preference elements
+  Standard_EXPORT void GetPreferences (TInspectorAPI_PreferencesDataMap& theItem);
+
+  //! Applies plugin preferences
+  //! \param theItem container of preference elements
+  Standard_EXPORT void SetPreferences (const TInspectorAPI_PreferencesDataMap& theItem);
+
+  //! Applyes parameters to Init controls, opens files if there are in parameters, updates OCAF tree view model
+  Standard_EXPORT void UpdateContent();
+
+  //! Returns main control
+  QMainWindow* GetMainWindow() const { return myMainWindow; }
+
+  //! Returns current tree view
+  QTreeView* GetTreeView() const { return myTreeView; }
+
+protected:
+  //! Appends shape into tree view model
+  //! \param theShape a shape instance
+  //! \param theReportDescription an additional report information
+  void addReport (const Handle(Message_Report)& theReport,
+                  const TCollection_AsciiString& theReportDescription = "");
+
+private:
+
+  //! Fills controls of the plugin by parameters:
+  //! - Fine AIS_InteractiveObject and fills View if it if it differs from the current context
+  //! \param theParameters a parameters container
+  void Init (NCollection_List<Handle(Standard_Transient)>& theParameters);
+
+  //! Updates tree model
+  void updateTreeModel();
+
+protected slots:
+  //! Updates property view selection in table if the item is hidden
+  //! \param theIndex tree view model index
+  void onTreeViewVisibilityClicked(const QModelIndex& theIndex);
+
+  //! Udpates all controls by changed selection in OCAF tree view
+  //! \param theSelected list of selected tree view items
+  //! \param theDeselected list of deselected tree view items
+  void onTreeViewSelectionChanged (const QItemSelection& theSelected, const QItemSelection& theDeselected);
+
+  //! Shows context menu for tree view selected item. It contains expand/collapse actions.
+  //! \param thePosition a clicked point
+  void onTreeViewContextMenuRequested (const QPoint& thePosition);
+
+  //! Display content of selected tree view item if isToggled is true
+  //! \param isToggled true if the property dock widget is shown
+  void onPropertyPanelShown (bool isToggled);
+
+  //! Update tree view item, preview presentation by item value change
+  void onPropertyViewDataChanged();
+
+  //! Update tree view header item width
+  void onHeaderResized (int theSectionId, int, int);
+
+  //! Updates visibility states by erase all in context
+  void onEraseAllPerformed();
+
+  //! Export report into document
+  void onExportReport();
+
+  //! Create default report into document
+  void onCreateDefaultReport();
+
+  //! Iterates by children items of selected items and display its presentations if found
+  void onPreviewChildren();
+
+  //! Creates the table that sums the number of calls and
+  //! the time spent on the functionality inside the value.
+  void onMetricStatistic();
+
+  //! Switch active state in report for clicked type of metric
+  void OnActivateMetric();
+
+  //! Deactivate all types of metrics for the current report
+  void OnDeactivateAllMetrics();
+
+protected:
+  //! Appends items to activate report metrics
+  void addActivateMetricActions (QMenu* theMenu);
+
+  //! Returns displayer where the presentations/preview should be shown/erased
+  //! If default view is created, it returns displayer of this view
+  Standard_EXPORT View_Displayer* displayer();
+
+  //! Updates property panel content by item selected in tree view.
+  void updatePropertyPanelBySelection();
+
+  //!< Updates presentation of preview for parameter shapes. Creates a compound of the shapes
+  void updatePreviewPresentation();
+
+  //!< Sets reports metric columns visible if used
+  void updateVisibleColumns();
+
+private:
+  QMainWindow* myMainWindow; //!< main control, parent for all MessageView controls
+  QDockWidget* myViewDockWidget; //!< view dock widget to hide/show
+
+  QDockWidget* myPropertyPanelWidget; //!< property pane dockable widget
+  ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist
+
+  View_Window* myViewWindow; //!< OCC 3d view to visualize presentations
+  QTreeView* myTreeView; //!< tree view visualized shapes
+  MessageModel_Actions* myTreeViewActions; //!< processing history view actions
+  MessageView_ActionsTest* myTestViewActions; //!< check view actions
+
+  QTableView* myCustomView;         //!< table that units messages by name.
+  QDockWidget* myCustomPanelWidget; //!< panel for table that units messages by name.
+
+  Handle(TInspectorAPI_PluginParameters) myParameters; //!< plugins parameters container
+
+  Handle(AIS_InteractiveObject) myPreviewPresentation; //!< presentation of preview for a selected object
+};
+
+#endif
index a46da81f24d2999d866e99cde79144e82b9b0641..13ebd3fc6360c95765c95df16cbc963b5aab3fd9 100644 (file)
@@ -23,8 +23,6 @@
 #include <inspector/TInspector_Preferences.hxx>
 #include <inspector/TInspector_Window.hxx>
 
-class TInspector_ReportCallBack;
-
 //! \class TInspector_PluginParameters.
 //! \brief This is plugin parameters extended by a possibility to activate module during setting new parameters
 class TInspector_PluginParameters : public TInspectorAPI_PluginParameters
@@ -71,7 +69,6 @@ public:
 private:
 
   TInspector_Window* myWindow; //!< the current window
-  Handle(TInspector_ReportCallBack) myReportCallBack; //!< inspector report callback for automatic view update
   TInspector_Preferences* myPreferences; //!< the preferences loader
 };
 
index b22e57eb815911f0f4120dced5d1074aa2114bc7..15aa5bf0bce8d9ee4cedabfad56a22389f8966ac 100644 (file)
@@ -19,6 +19,8 @@
 
 #include <inspector/TInspector_Communicator.hxx>
 
+#include <Message.hxx>
+#include <Message_Report.hxx>
 #include <OSD_Environment.hxx>
 
 #include <Standard_WarningsDisable.hxx>
@@ -104,6 +106,9 @@ int main (int argc, char** argv)
 
     if (!strcmp (argv[anArgId], "vinspector"))
       aPlugins.insert ("TKVInspector");
+
+    if (!strcmp (argv[anArgId], "messageview"))
+      aPlugins.insert ("TKMessageView");
   }
   NCollection_List<Handle(Standard_Transient)> aParameters;
 
@@ -122,6 +127,7 @@ int main (int argc, char** argv)
     aPlugins.insert("TKDFBrowser");
     aPlugins.insert("TKShapeView");
     aPlugins.insert("TKVInspector");
+    aPlugins.insert("TKMessageView");
 
     anActivatedPluginName = "TKDFBrowser";
   }
index 5e27b7759a581ee8162004f151554566c8da4cc6..487d7241bfd663c0ffd6e3cbde41ef60545403b3 100644 (file)
@@ -1,3 +1,2 @@
 DFBrowserPane
-DFBrowserPaneXDE
 DFBrowser
diff --git a/tools/TKMessageModel/CMakeLists.txt b/tools/TKMessageModel/CMakeLists.txt
new file mode 100644 (file)
index 0000000..911ffb1
--- /dev/null
@@ -0,0 +1,5 @@
+project(TKMessageModel)
+
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool)
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool)
diff --git a/tools/TKMessageModel/EXTERNLIB b/tools/TKMessageModel/EXTERNLIB
new file mode 100644 (file)
index 0000000..54b0274
--- /dev/null
@@ -0,0 +1,10 @@
+TKMath
+TKBin
+TKBRep
+TKGeomBase
+TKG3d
+TKTInspectorAPI
+TKService
+TKTopAlgo
+TKTreeModel
+CSF_QT
diff --git a/tools/TKMessageModel/FILES b/tools/TKMessageModel/FILES
new file mode 100644 (file)
index 0000000..ca4f0e5
--- /dev/null
@@ -0,0 +1,2 @@
+EXTERNLIB
+PACKAGES
diff --git a/tools/TKMessageModel/PACKAGES b/tools/TKMessageModel/PACKAGES
new file mode 100644 (file)
index 0000000..9021fbf
--- /dev/null
@@ -0,0 +1 @@
+MessageModel
diff --git a/tools/TKMessageView/CMakeLists.txt b/tools/TKMessageView/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9b3c1aa
--- /dev/null
@@ -0,0 +1,5 @@
+project(TKMessageView)
+
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool)
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
+OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit_prepare_tool)
diff --git a/tools/TKMessageView/EXTERNLIB b/tools/TKMessageView/EXTERNLIB
new file mode 100644 (file)
index 0000000..84e5b5d
--- /dev/null
@@ -0,0 +1,13 @@
+TKTInspectorAPI
+TKMath
+TKMessageModel
+TKBin
+TKBRep
+TKGeomBase
+TKG3d
+TKService
+TKTopAlgo
+TKTreeModel
+TKView
+TKXml
+CSF_QT
diff --git a/tools/TKMessageView/FILES b/tools/TKMessageView/FILES
new file mode 100644 (file)
index 0000000..ca4f0e5
--- /dev/null
@@ -0,0 +1,2 @@
+EXTERNLIB
+PACKAGES
diff --git a/tools/TKMessageView/PACKAGES b/tools/TKMessageView/PACKAGES
new file mode 100644 (file)
index 0000000..46a67b2
--- /dev/null
@@ -0,0 +1 @@
+MessageView
index 57a5ea548ff7770e3cc66dc95863d14c3a47b6b3..adc55d794b5f0750460e505ebc1e9727565484d9 100644 (file)
@@ -62,6 +62,7 @@ Standard_Boolean convertToPluginName (const TCollection_AsciiString& theArgument
   if (anArgument == "dfbrowser")       { thePluginName = "TKDFBrowser"; return Standard_True; }
   else if (anArgument == "shapeview")  { thePluginName = "TKShapeView"; return Standard_True; }
   else if (anArgument == "vinspector") { thePluginName = "TKVInspector"; return Standard_True; }
+  else if (anArgument == "messageview") { thePluginName = "TKMessageView"; return Standard_True; }
 
   return Standard_False;
 }
@@ -305,6 +306,7 @@ static int tinspector (Draw_Interpretor& di, Standard_Integer theArgsNb, const c
       aPlugins.Append ("TKDFBrowser");
       aPlugins.Append ("TKShapeView");
       aPlugins.Append ("TKVInspector");
+      aPlugins.Append ("TKMessageView");
     }
     aPluginNameToActivate = !aPluginNameToActivate.IsEmpty() ? aPluginNameToActivate : aPlugins.First();
   }
@@ -391,10 +393,10 @@ void ToolsDraw::Commands(Draw_Interpretor& theCommands)
     "\n\t\t: Starts tool of inspection."
     "\n\t\t: Options:"
     "\n\t\t:  -plugins enters plugins that should be added in the inspector."
-    "\n\t\t:           Available names are: dfbrowser, vinspector and shapeview."
+    "\n\t\t:           Available names are: dfbrowser, vinspector, shapeview and messageview."
     "\n\t\t:           Plugins order will be the same as defined in arguments."
     "\n\t\t:           'all' adds all available plugins in the order:"
-    "\n\t\t:                 DFBrowser, VInspector and ShapeView."
+    "\n\t\t:                 DFBrowser, VInspector, ShapeView and MessageView."
     "\n\t\t:           If at the first call this option is not used, 'all' option is applied;"
     "\n\t\t:  -activate activates the plugin in the tool view."
     "\n\t\t:           If at the first call this option is not used, the first plugin is activated;"
index 80cb3f97daa9f6b5d8fbed1743efbfd028d488c5..520cec6fdfd415f15590622da423b9dea3fb1650 100644 (file)
@@ -24,7 +24,8 @@
 enum TreeModel_ColumnType
 {
   TreeModel_ColumnType_Name = 0, //! name column
-  TreeModel_ColumnType_Visibility //! visibility state column
+  TreeModel_ColumnType_Visibility, //! visibility state column
+  TreeModel_ColumnType_Row //! row of the item column
 };
 
 #endif
index 9a60792c6098179c2a22a107cb7a7a67559563a7..9cd0d07ab6f9ee4db73fd73848b89a01dc43870d 100644 (file)
@@ -55,7 +55,7 @@ void TreeModel_ContextMenu::onTreeViewHeaderContextMenuRequested (const QPoint&
   int aNbSections = aModel->columnCount();
   for (int aColumnId = 0; aColumnId < aNbSections; aColumnId++)
   {
-    QAction* anAction = ViewControl_Tools::CreateAction (aModel->GetHeaderItem (aColumnId).GetName(),
+    QAction* anAction = ViewControl_Tools::CreateAction (aModel->ChangeHeaderItem (aColumnId)->GetName(),
                                                        SLOT (onColumnVisibilityChanged()), myTreeView, this);
     anAction->setCheckable (true);
     anAction->setChecked (!myTreeView->isColumnHidden (aColumnId));
index 1b23b909cbc3a923cd57195c77f98898d48bc6a7..605da32b3bc29353c5c6a359fe3d5b5cfff421ef 100644 (file)
@@ -13,6 +13,7 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement. 
 
+#include <inspector/TreeModel_ColumnType.hxx>
 #include <inspector/TreeModel_ItemBase.hxx>
 #include <inspector/TreeModel_ItemProperties.hxx>
 #include <inspector/TreeModel_ItemRole.hxx>
@@ -195,7 +196,7 @@ QVariant TreeModel_ItemBase::initValue (const int theItemRole) const
 
   switch (Column())
   {
-    case 1: { return Row(); }
+    case TreeModel_ColumnType_Row: { return Row(); }
   }
 
   return QVariant();
index 226d743fcbe46281fc139d2bd6c72f34a8742035..e852589cffeab3f03c6039fff2c69ac889161e6e 100644 (file)
@@ -150,6 +150,12 @@ public:
   //! Returns the item properties
   const Handle(TreeModel_ItemProperties)& Properties() const { return myProperties; }
 
+  //! Updates item by the item properties value
+  virtual void StoreItemProperties (const int theRow, const int theColumn, const QVariant& theValue)
+    { (void)theRow, (void)theColumn; (void)theValue; }
+
+  //! Returns presentation of the item to be visualized in the view
+  //! \thePresentations [out] container of presentation handles
   Standard_EXPORT virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations);
 protected:
 
index 631d2f2c1822e2a62377a9103c5ddfb0759a5fe8..1265d80d499210822ce010b62c62ed55515eda2c 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <BRepBuilderAPI_MakeVertex.hxx>
 #include <gp_XYZ.hxx>
+#include <Quantity_ColorRGBA.hxx>
 #include <Standard_Dump.hxx>
 
 #include <Standard_WarningsDisable.hxx>
@@ -37,8 +38,15 @@ void TreeModel_ItemProperties::Init ()
 {
   myRowValues.Clear();
 
-  const Standard_SStream& aStream = Item()->Stream();
+  InitByStream (Item()->Stream());
+}
 
+// =======================================================================
+// function : InitByStream
+// purpose :
+// =======================================================================
+void TreeModel_ItemProperties::InitByStream (const Standard_SStream& aStream)
+{
   NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue> aValues;
   TCollection_AsciiString aStreamText = Standard_Dump::Text (aStream);
   Standard_Dump::SplitJson (aStreamText, aValues);
@@ -48,8 +56,15 @@ void TreeModel_ItemProperties::Init ()
   Standard_DumpValue aKeyValue;
   if (!aStreamParent)
   {
-    const Handle(Standard_Transient)& anItemObject = Item()->Object();
-    aKey = anItemObject.IsNull() ? "Dump" : anItemObject->DynamicType()->Name();
+    if (!Item() || Item()->Object().IsNull())
+    {
+      aKey = "Dump";
+    }
+    else
+    {
+      const Handle(Standard_Transient)& anItemObject = Item()->Object();
+      aKey = anItemObject.IsNull() ? "Dump" : anItemObject->DynamicType()->Name();
+    }
     aKeyValue = Standard_DumpValue (aStreamText, 1);
 
     myKey = aKey;
@@ -95,6 +110,11 @@ void TreeModel_ItemProperties::Init ()
         (int)(aGreen * aDelta), (int)(aBlue * aDelta)));
     }
   }
+  // in case if the stream alert has empty key avalue, use as the key the first row value
+  if ((myKey.IsEmpty() || myKey.IsEqual ("Dump")) && myRowValues.Size() > 0)
+  {
+    myKey = myRowValues.FindFromIndex (1).Value.toString().toStdString().c_str();
+  }
 }
 
 // =======================================================================
@@ -165,18 +185,94 @@ ViewControl_EditType TreeModel_ItemProperties::EditType (const int, const int th
   if (theColumn == 0)
     return ViewControl_EditType_None;
 
+  Quantity_Color aColor;
+  if (Convert_Tools::ConvertStreamToColor (Item()->Stream(), aColor))
+  {
+    return ViewControl_EditType_Color;
+  }
   return ViewControl_EditType_Line;
 }
 
+// =======================================================================
+// function : ReplaceValue
+// purpose :
+// =======================================================================
+Standard_Boolean ReplaceValue (const TCollection_AsciiString& theFromValue,
+                               const TCollection_AsciiString& theToValue,
+                               Standard_DumpValue& theStreamValue)
+{
+  TCollection_AsciiString aStreamValue = theStreamValue.myValue;
+
+  int aPosition = aStreamValue.FirstLocationInSet (theFromValue, 1, aStreamValue.Length());
+  if (aPosition < 1)
+    return Standard_False;
+
+  aPosition += 2; // due to 'FirstLocationInSet' returns position taking into account '"\' as 1 position
+
+  TCollection_AsciiString aPartStart = aStreamValue.SubString(1, aPosition - 1);
+  TCollection_AsciiString aPartFinal = aStreamValue.SubString(aPosition + theFromValue.Length(),
+                                                              aStreamValue.Length());
+  theStreamValue.myValue = aPartStart + theToValue + aPartFinal;
+
+  return Standard_True;
+}
+
 // =======================================================================
 // function : SetData
 // 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 theRole)
 {
   if (theColumn == 0)
     return false;
-  return false;
+
+  if (theRole != Qt::DisplayRole && theRole != Qt::EditRole)
+    return false;
+
+  if (myRowValues.Size() == 1 && theColumn == 1)
+  {
+    TCollection_AsciiString aStreamValue (theValue.toString().toStdString().c_str());
+    NCollection_IndexedDataMap<TCollection_AsciiString, Standard_DumpValue> aKeyToValues;
+    if (Standard_Dump::SplitJson (aStreamValue, aKeyToValues))
+    {
+      Standard_SStream aStream;
+      aStream << aStreamValue.ToCString();
+
+      int aStartPos = 1;
+      Quantity_ColorRGBA aColor;
+      if (aColor.InitFromJson (aStream, aStartPos))
+      {
+        Standard_Real aRed, aGreen, aBlue;
+        aColor.GetRGB().Values (aRed, aGreen, aBlue, Quantity_TOC_sRGB);
+        int aDelta = 255;
+        myRowValues.ChangeFromIndex (1).CustomValues.insert ((int)Qt::BackgroundRole, QColor((int)(aRed * aDelta),
+          (int)(aGreen * aDelta), (int)(aBlue * aDelta)));
+      }
+      Standard_DumpValue aValue = aKeyToValues.FindFromIndex (1);
+      myStreamValue.myValue = aValue.myValue.ToCString();
+      myRowValues.ChangeFromIndex (1).Value = aValue.myValue.ToCString();
+
+      Item()->StoreItemProperties (theRow, theColumn, theValue);
+      return true;
+    }
+    TCollection_AsciiString aFromValue = myRowValues.ChangeFromIndex (1).Value.toString().toStdString().c_str();
+    if (ReplaceValue(aFromValue, aStreamValue, myStreamValue))
+    {
+      aStreamValue = myStreamValue.myValue;
+      if (Standard_Dump::SplitJson (aStreamValue, aKeyToValues))
+      {
+        Standard_DumpValue aValue = aKeyToValues.FindFromIndex (1);
+        myRowValues.ChangeFromIndex (1).Value = aValue.myValue.ToCString();
+
+        Item()->StoreItemProperties (theRow, theColumn, aStreamValue.ToCString());
+        return true;
+      }
+    }
+  }
+
+  myRowValues.ChangeFromIndex (theRow + 1).Value = theValue;
+  Item()->StoreItemProperties (theRow, theColumn, theValue);
+  return true;
 }
 
 // =======================================================================
@@ -185,6 +281,10 @@ bool TreeModel_ItemProperties::SetData (const int /*theRow*/, const int theColum
 // =======================================================================
 void TreeModel_ItemProperties::Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations)
 {
+  if (!Item())
+  {
+    return;
+  }
   const Standard_SStream& aStream = Item()->Stream();
   Convert_Tools::ConvertStreamToPresentations (aStream, 1, -1, thePresentations);
 }
index 60709c20991366e737537031bb2501daa74f9407..6c2c499d2a29f780c9ed2670c45b963e8b31d5dc 100644 (file)
@@ -73,6 +73,9 @@ public:
   //! Sets the current item
   void SetItem (const TreeModel_ItemBasePtr& theItem) { myItem = theItem; }
 
+  //! Fills properties with the stream value
+  Standard_EXPORT void InitByStream (const Standard_SStream& theStream);
+
   //! Returns the current item
   TreeModel_ItemBasePtr Item() const { return myItem; }
 
@@ -80,7 +83,7 @@ public:
   Standard_EXPORT void Init();
 
   //! If the item has internal values, they should be reset here.
-  Standard_EXPORT virtual void Reset();
+  Standard_EXPORT void Reset();
 
   //! Returns number of table rows
   //! \return an integer value
@@ -108,18 +111,18 @@ public:
   //! \param theColumn a model index column
   //! \param theRole a view role
   //! \return true if the value is changed
-  Standard_EXPORT virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue,
-                                        int theRole = Qt::DisplayRole);
+  Standard_EXPORT bool SetData (const int theRow, const int theColumn, const QVariant& theValue,
+                                int theRole = Qt::DisplayRole);
 
   //! Returns presentation of the attribute to be visualized in the view
   //! \thePresentations [out] container of presentation handles to be visualized
-  Standard_EXPORT virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations);
+  Standard_EXPORT void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations);
 
   //! Returns flags for the item: ItemIsEnabled | Qt::ItemIsSelectable.
   //! Additional flag for the column 1 is Qt::ItemIsEditable.
   //! \param theIndex a model index
   //! \return flags
-  Standard_EXPORT virtual Qt::ItemFlags TableFlags (const int theRow, const int theColumn) const;
+  Standard_EXPORT Qt::ItemFlags TableFlags (const int theRow, const int theColumn) const;
 
   //! Returns stream value of the item to fulfill property panel.
   //! \return stream value or dummy
index efa8b36d532ebe6623941886ec5792cc9979966f..a1a8562f6bb88481f8902a674f0904ac78392d1f 100644 (file)
@@ -87,6 +87,15 @@ QVariant TreeModel_ItemStream::initValue (const int theItemRole) const
   return QVariant();
 }
 
+// =======================================================================
+// function : StoreItemProperties
+// purpose :
+// =======================================================================
+void TreeModel_ItemStream::StoreItemProperties (const int, const int, const QVariant& theValue)
+{
+  Parent()->StoreItemProperties (-1, -1, theValue);
+}
+
 // =======================================================================
 // function : initStream
 // purpose :
index 776cefe8e0eee3600680238ee435f92894769931..800e014cb1eec42f5840124b1779f454b99fbfdd 100644 (file)
@@ -60,6 +60,12 @@ public:
   //! \return the value
   Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
 
+  //! Stores values of the item properties into the item object
+  //! \param theRow the child row position
+  //! \param theColumn the child column position
+  //! \param theValue the cell value
+  Standard_EXPORT virtual void StoreItemProperties (const int theRow, const int theColumn, const QVariant& theValue) Standard_OVERRIDE;
+
 protected:
   //! Returns stream value of the item to fulfill property panel.
   //! \return stream value or dummy
index a87cbe662ee767d024f82a581eae42c29b0bf807..5dd4055b7e027ed4f5dae409bc25710dc6509f04 100644 (file)
@@ -16,6 +16,7 @@
 #include <inspector/TreeModel_ModelBase.hxx>
 
 #include <inspector/TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemProperties.hxx>
 #include <inspector/TreeModel_Tools.hxx>
 #include <inspector/TreeModel_VisibilityState.hxx>
 
@@ -46,9 +47,9 @@ TreeModel_ModelBase::TreeModel_ModelBase (QObject* theParent)
 // =======================================================================
 void TreeModel_ModelBase::InitColumns()
 {
-  SetHeaderItem (0, TreeModel_HeaderSection ("Name", COLUMN_NAME_WIDTH));
-  SetHeaderItem (1, TreeModel_HeaderSection ("Visibility", TreeModel_ModelBase::ColumnVisibilityWidth()));
-  SetHeaderItem (2, TreeModel_HeaderSection ("Row", COLUMN_SIZE_WIDTH));
+  setHeaderItem (TreeModel_ColumnType_Name,       TreeModel_HeaderSection ("Name", COLUMN_NAME_WIDTH));
+  setHeaderItem (TreeModel_ColumnType_Visibility, TreeModel_HeaderSection ("Visibility", TreeModel_ModelBase::ColumnVisibilityWidth()));
+  setHeaderItem (TreeModel_ColumnType_Row,        TreeModel_HeaderSection ("Row", COLUMN_SIZE_WIDTH));
 }
 
 // =======================================================================
@@ -177,7 +178,7 @@ QVariant TreeModel_ModelBase::headerData (int theSection, Qt::Orientation theOri
   if (IsUseVisibilityColumn() && theSection == TreeModel_ColumnType_Visibility)
     return QVariant();
 
-  return GetHeaderItem (theSection).GetName();
+  return myHeaderValues[theSection].GetName();
 }
 
 // =======================================================================
@@ -231,23 +232,6 @@ void TreeModel_ModelBase::EmitDataChanged (const QModelIndex& theTopLeft, const
 #endif
 }
 
-// =======================================================================
-// function : SetHeaderItem
-// purpose :
-// =======================================================================
-void TreeModel_ModelBase::SetHeaderItem (const int theColumnId, const TreeModel_HeaderSection& theSection)
-{
-  if (theSection.IsEmpty())
-  {
-    // remove section
-    myHeaderValues.remove (theColumnId);
-    myRootItems.remove (theColumnId);
-  }
-
-  myHeaderValues[theColumnId] = theSection;
-  createRoot (theColumnId);
-}
-
 // =======================================================================
 // function : Selected
 // purpose :
@@ -295,6 +279,40 @@ QList<TreeModel_ItemBasePtr> TreeModel_ModelBase::SelectedItems (const QModelInd
   return anItems;
 }
 
+// =======================================================================
+// function : SubItemsPresentations
+// purpose :
+// =======================================================================
+void TreeModel_ModelBase::SubItemsPresentations (const QModelIndexList& theIndices,
+                                                 NCollection_List<Handle(Standard_Transient)>& thePresentations)
+{
+  QList<TreeModel_ItemBasePtr> anItems;
+
+  for (QModelIndexList::const_iterator anIndicesIt = theIndices.begin(); anIndicesIt != theIndices.end(); anIndicesIt++)
+  {
+    TreeModel_ItemBasePtr anItem = TreeModel_ModelBase::GetItemByIndex (*anIndicesIt);
+    if (!anItem || anItems.contains (anItem))
+      continue;
+    subItemsPresentations (anItem, thePresentations);
+  }
+}
+
+// =======================================================================
+// function : subItemPresentations
+// purpose :
+// =======================================================================
+void TreeModel_ModelBase::subItemsPresentations (const TreeModel_ItemBasePtr& theItem,
+                                                 NCollection_List<Handle(Standard_Transient)>& thePresentations)
+{
+  theItem->Presentations (thePresentations);
+
+  QList<TreeModel_ItemBasePtr> anItems;
+  for (int aRowId = 0; aRowId < theItem->rowCount(); aRowId++)
+  {
+    subItemsPresentations (theItem->Child (aRowId, theItem->Column()), thePresentations);
+  }
+}
+
 // =======================================================================
 // function : createRoot
 // purpose :
@@ -304,6 +322,23 @@ void TreeModel_ModelBase::createRoot (const int theColumnId)
   myRootItems.insert (theColumnId, createRootItem (theColumnId));
 }
 
+// =======================================================================
+// function : setHeaderItem
+// purpose :
+// =======================================================================
+void TreeModel_ModelBase::setHeaderItem (const int theColumnId, const TreeModel_HeaderSection& theSection)
+{
+  if (theSection.IsEmpty())
+  {
+    // remove section
+    myHeaderValues.remove (theColumnId);
+    myRootItems.remove (theColumnId);
+  }
+
+  myHeaderValues[theColumnId] = theSection;
+  createRoot (theColumnId);
+}
+
 // =======================================================================
 // function :  getIndexValue
 // purpose :
index c41d692ca68c7d3a3c28c440f722ec515dd4a38d..c3bee852e27787b8cff9562bc0c2ce69ad031b99 100644 (file)
@@ -138,15 +138,10 @@ public:
   //! \return the number of rows
   Standard_EXPORT virtual int rowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE;
 
-  //! Returns whether the column is hidden by default
+  //! Returns header item, that can be modified
   //! \param theColumnId a column index
-  //! \return header section values container
-  TreeModel_HeaderSection GetHeaderItem (const int theColumnId) const { return myHeaderValues[theColumnId]; }
-
-  //! Sets header properties item.
-  //! \param theColumnId a column index
-  //! \param theSection a section value
-  Standard_EXPORT void SetHeaderItem (const int theColumnId, const TreeModel_HeaderSection& theSection);
+  //! \return header section value
+  TreeModel_HeaderSection* ChangeHeaderItem (const int theColumnId) { return &myHeaderValues[theColumnId]; }
 
   //! Returns count of columns in the model
   //! \param theParent an index of the parent item
@@ -180,16 +175,33 @@ public:
   //! \return model items from the list
   Standard_EXPORT static QList<TreeModel_ItemBasePtr> SelectedItems (const QModelIndexList& theIndices);
 
+  //! Returns presentations of sub items
+  //! \param theIndices a container of selected indices
+  //! \thePresentations [out] container of presentations
+  Standard_EXPORT static void SubItemsPresentations (const QModelIndexList& theIndices,
+                                                     NCollection_List<Handle(Standard_Transient)>& thePresentations);
+
 protected:
   //! Creates root item
   //! \param theColumnId index of a column
   virtual TreeModel_ItemBasePtr createRootItem (const int theColumnId) = 0;
 
+  //! Sets header properties item.
+  //! \param theColumnId a column index
+  //! \param theSection a section value
+  Standard_EXPORT void setHeaderItem (const int theColumnId, const TreeModel_HeaderSection& theSection);
+
   //! Converts the item shared pointer to void* type
   //! \param theItem
   //!  \return an item pointer
   Standard_EXPORT static void* getIndexValue (const TreeModel_ItemBasePtr& theItem);
 
+  //! Returns presentations of sub items. Recursive method to get presentations of all children
+  //! \param theItem an item to get own presentations and presentations of children
+  //! \thePresentations [out] container of presentations found
+  static void subItemsPresentations (const TreeModel_ItemBasePtr& theItem,
+                                    NCollection_List<Handle(Standard_Transient)>& thePresentations);
+
 private:
   //! Creates root item
   //! \param theColumnId index of a column
index e3d8b2afa54f7d917b1ec5861f55a0e0751314c1..fb93b334dd1691d34c26f8cb062ed8619b89134c 100644 (file)
@@ -86,19 +86,17 @@ QByteArray TreeModel_Tools::ToByteArray (const QString& theValue)
 void TreeModel_Tools::SaveState (QTreeView* theTreeView, QMap<QString, QString>& theItems,
                                  const QString& thePrefix)
 {
-  QStringList aColumnWidths, aHiddenColumns;
+  QStringList aColumnWidths;
   for (int aColumnId = 0; aColumnId < theTreeView->model()->columnCount(); aColumnId++)
   {
     if (theTreeView->isColumnHidden (aColumnId))
     {
-      aHiddenColumns.append (QString::number (aColumnId));
       aColumnWidths.append (QString());
     }
     else
       aColumnWidths.append (QString::number (theTreeView->columnWidth (aColumnId)));
   }
   theItems[thePrefix + "columns_width"] = aColumnWidths.join (",");
-  theItems[thePrefix + "columns_hidden"] = aHiddenColumns.join (",");
 }
 
 // =======================================================================
@@ -115,25 +113,10 @@ bool TreeModel_Tools::RestoreState (QTreeView* theTreeView, const QString& theKe
     {
       bool isOk;
       int aWidth = aValues.at (aColumnId).toInt (&isOk);
-      if (isOk && !theTreeView->isColumnHidden (aColumnId)) // do not resize hidden columnsa
+      if (isOk && !theTreeView->isColumnHidden (aColumnId)) // do not resize hidden columns
         theTreeView->setColumnWidth (aColumnId, aWidth);
     }
   }
-  else if (theKey == thePrefix + "columns_hidden")
-  {
-    int aColumnSize = theTreeView->model()->columnCount();
-    QStringList aValues = theValue.split (",", QString::SkipEmptyParts);
-    QList<int> aColumnIds;
-    for (int aValueId = 0; aValueId < aValues.size(); aValueId++)
-    {
-      if (aValueId < aColumnSize)
-        aColumnIds.append (aValues.at (aValueId).toInt());
-    }
-    for (int aColumnId = 0; aColumnId < aColumnSize; aColumnId++)
-    {
-      theTreeView->setColumnHidden (aColumnId, aColumnIds.contains(aColumnId) == true);
-    }
-  }
   else
     return false;
   return true;
@@ -149,9 +132,9 @@ void TreeModel_Tools::SetDefaultHeaderSections(QTreeView* theTreeView)
 
   for (int aColumnId = 0, aNbColumns = aTreeModel->columnCount(); aColumnId < aNbColumns; aColumnId++)
   {
-    TreeModel_HeaderSection aSection = aTreeModel->GetHeaderItem (aColumnId);
-    theTreeView->setColumnWidth (aColumnId, aSection.GetWidth());
-    theTreeView->setColumnHidden (aColumnId, aSection.IsHidden());
+    TreeModel_HeaderSection* aSection = aTreeModel->ChangeHeaderItem (aColumnId);
+    theTreeView->setColumnWidth (aColumnId, aSection->GetWidth());
+    theTreeView->setColumnHidden (aColumnId, aSection->IsHidden());
   }
 }
 
@@ -170,8 +153,10 @@ void TreeModel_Tools::UseVisibilityColumn (QTreeView* theTreeView, const bool th
   aHeader->moveSection (TreeModel_ColumnType_Name, TreeModel_ColumnType_Visibility);
 
   TreeModel_ModelBase* aModel = dynamic_cast<TreeModel_ModelBase*> (theTreeView->model());
-  aModel->SetHeaderItem (TreeModel_ColumnType_Visibility,
-    TreeModel_HeaderSection ("Visibility", TreeModel_ModelBase::ColumnVisibilityWidth()));
+  TreeModel_HeaderSection* anItem = aModel->ChangeHeaderItem ((int)TreeModel_ColumnType_Visibility);
+  anItem->SetIsHidden (theActive);
+  anItem->SetWidth (TreeModel_ModelBase::ColumnVisibilityWidth());
+
   aModel->SetUseVisibilityColumn (theActive);
 }
 
index 85d375571085a670727c7609309990203147d725..5b4359799d1051f3e417d7837912ce8fb07a6970 100644 (file)
@@ -1,9 +1,4 @@
 VInspector.qrc
-VInspectorAPI_CallBack.cxx
-VInspectorAPI_CallBack.hxx
-VInspector_CallBack.cxx
-VInspector_CallBack.hxx
-VInspector_CallBackMode.hxx
 VInspector_Communicator.cxx
 VInspector_Communicator.hxx
 VInspector_ItemBase.cxx
@@ -12,13 +7,8 @@ VInspector_ItemContext.cxx
 VInspector_ItemContext.hxx
 VInspector_ItemContextProperties.cxx
 VInspector_ItemContextProperties.hxx
-VInspector_ItemHistoryElement.cxx
-VInspector_ItemHistoryElement.hxx
-VInspector_ItemHistoryRoot.cxx
-VInspector_ItemHistoryRoot.hxx
-VInspector_ItemHistoryType.cxx
-VInspector_ItemHistoryType.hxx
-VInspector_ItemHistoryTypeInfo.hxx
+VInspector_ItemGraphic3dCLight.cxx
+VInspector_ItemGraphic3dCLight.hxx
 VInspector_ItemPresentableObject.cxx
 VInspector_ItemPresentableObject.hxx
 VInspector_ItemSelectMgrViewerSelector.cxx
@@ -32,7 +22,5 @@ VInspector_Tools.cxx
 VInspector_Tools.hxx
 VInspector_ViewModel.cxx
 VInspector_ViewModel.hxx
-VInspector_ViewModelHistory.cxx
-VInspector_ViewModelHistory.hxx
 VInspector_Window.cxx
 VInspector_Window.hxx
diff --git a/tools/VInspector/VInspectorAPI_CallBack.cxx b/tools/VInspector/VInspectorAPI_CallBack.cxx
deleted file mode 100644 (file)
index accb7a3..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspectorAPI_CallBack.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(VInspectorAPI_CallBack, Standard_Transient)
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-VInspectorAPI_CallBack::VInspectorAPI_CallBack()
-{
-}
diff --git a/tools/VInspector/VInspectorAPI_CallBack.hxx b/tools/VInspector/VInspectorAPI_CallBack.hxx
deleted file mode 100644 (file)
index 0b8e812..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspectorAPI_CallBack_H
-#define VInspectorAPI_CallBack_H
-
-#include <Standard.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Transient.hxx>
-#include <TColStd_ListOfInteger.hxx>
-#include <TopoDS_Shape.hxx>
-
-class AIS_InteractiveObject;
-class SelectMgr_EntityOwner;
-
-//! \class VInspectorAPI_CallBack
-//! API of AIS_InteractiveContext methods to provide information about the actions
-class VInspectorAPI_CallBack : public Standard_Transient
-{
-
-public:
-
-  //! Constructor
-  Standard_EXPORT VInspectorAPI_CallBack();
-
-  //! Destructor
-  virtual ~VInspectorAPI_CallBack() {}
-
-  //! Processing method of context
-  virtual void Display(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void Redisplay(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void Remove(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void Load(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void ActivatedModes (Handle(AIS_InteractiveObject) thePrs, TColStd_ListOfInteger& theList) = 0;
-
-  //! Processing method of context
-  virtual void Activate(Handle(AIS_InteractiveObject) thePrs, const Standard_Integer theMode) = 0;
-
-  //! Processing method of context
-  virtual void Deactivate(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void Deactivate(Handle(AIS_InteractiveObject) thePrs, const Standard_Integer theMode) = 0;
-
-  //! Processing method of context
-  virtual void AddOrRemoveSelected (const TopoDS_Shape& theShape) = 0;
-
-  //! Processing method of context
-  virtual void AddOrRemoveSelected (Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void AddOrRemoveSelected (Handle(SelectMgr_EntityOwner) theOwner) = 0;
-
-  //! Processing method of context
-  virtual void ClearSelected() = 0;
-
-  //! Processing method of context
-  virtual void ClearSelected(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void MoveTo (const Standard_Integer theXPix, const Standard_Integer theYPix) = 0;
-
-  //! Processing method of context
-  virtual void SetSelected(Handle(AIS_InteractiveObject) thePrs) = 0;
-
-  //! Processing method of context
-  virtual void Select() = 0;
-
-  //! Processing method of context
-  virtual void ShiftSelect() = 0;
-
-  DEFINE_STANDARD_RTTIEXT(VInspectorAPI_CallBack, Standard_Transient)
-};
-
-#endif
diff --git a/tools/VInspector/VInspector_CallBack.cxx b/tools/VInspector/VInspector_CallBack.cxx
deleted file mode 100644 (file)
index a910141..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspector_CallBack.hxx>
-
-#include <AIS_InteractiveContext.hxx>
-#include <AIS_InteractiveObject.hxx>
-
-#include <SelectMgr_EntityOwner.hxx>
-
-#include <inspector/VInspector_CallBackMode.hxx>
-#include <inspector/VInspector_Tools.hxx>
-#include <inspector/VInspector_ViewModelHistory.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(VInspector_CallBack, VInspectorAPI_CallBack)
-
-// =======================================================================
-// function : Activate
-// purpose :
-// =======================================================================
-void VInspector_CallBack::Activate (Handle(AIS_InteractiveObject) thePrs, const Standard_Integer theMode)
-{
-  if (!myHistoryModel)
-    return;
-
-  QList<QVariant> anInfo;
-  if (!thePrs.IsNull())
-    anInfo = VInspector_Tools::GetInfo (thePrs);
-  else
-  {
-    anInfo.append ("Activate");
-    anInfo.append ("");
-    anInfo.append ("");
-  }
-  anInfo[0] = QString ("%1: %2").arg (anInfo[0].toString()).arg (theMode);
-  myHistoryModel->AddElement (VInspector_CallBackMode_Activate, anInfo);
-}
-
-// =======================================================================
-// function : AddOrRemoveSelected
-// purpose :
-// =======================================================================
-void VInspector_CallBack::AddOrRemoveSelected (const TopoDS_Shape& theShape)
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  aValues.append (""); // Name
-  aValues.append (""); // Pointer
-  aValues.append (VInspector_Tools::GetShapeTypeInfo (theShape.ShapeType()).ToCString()); // Shape Type
-  aValues.append (VInspector_Tools::GetSelectedInfoPointers (myContext)); // SelectionInfo
-  myHistoryModel->AddElement (VInspector_CallBackMode_AddOrRemoveSelectedShape, aValues);
-}
-
-// =======================================================================
-// function : AddOrRemoveSelected
-// purpose :
-// =======================================================================
-void VInspector_CallBack::AddOrRemoveSelected (Handle(AIS_InteractiveObject) thePrs)
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues = VInspector_Tools::GetInfo (thePrs);
-  aValues.append (VInspector_Tools::GetSelectedInfoPointers (myContext)); // SelectionInfo
-  myHistoryModel->AddElement (VInspector_CallBackMode_AddOrRemoveSelected, aValues);
-}
-
-// =======================================================================
-// function : AddOrRemoveSelected
-// purpose :
-// =======================================================================
-void VInspector_CallBack::AddOrRemoveSelected (Handle(SelectMgr_EntityOwner) theOwner)
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  aValues.append (""); // Name
-  aValues.append (Standard_Dump::GetPointerInfo (theOwner, true).ToCString()); // Pointer
-  aValues.append (""); // Shape type
-  aValues.append (VInspector_Tools::GetSelectedInfoPointers (myContext)); // SelectionInfo
-
-  myHistoryModel->AddElement (VInspector_CallBackMode_AddOrRemoveSelectedOwner, aValues);
-}
-
-// =======================================================================
-// function : ClearSelected
-// purpose :
-// =======================================================================
-void VInspector_CallBack::ClearSelected()
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  myHistoryModel->AddElement (VInspector_CallBackMode_ClearSelected, aValues);
-}
-
-// =======================================================================
-// function : MoveTo
-// purpose :
-// =======================================================================
-void VInspector_CallBack::MoveTo (const Standard_Integer/* theXPix*/, const Standard_Integer/* theYPix*/)
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  aValues = VInspector_Tools::GetHighlightInfo (myContext);
-  myHistoryModel->AddElement (VInspector_CallBackMode_MoveTo, aValues);
-}
-
-// =======================================================================
-// function : Select
-// purpose :
-// =======================================================================
-void VInspector_CallBack::Select()
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  aValues = VInspector_Tools::GetSelectedInfo (myContext);
-  myHistoryModel->AddElement (VInspector_CallBackMode_Select, aValues);
-}
-
-// =======================================================================
-// function : ShiftSelect
-// purpose :
-// =======================================================================
-void VInspector_CallBack::ShiftSelect()
-{
-  if (!myHistoryModel)
-    return;
-  QList<QVariant> aValues;
-  aValues = VInspector_Tools::GetSelectedInfo (myContext);
-  myHistoryModel->AddElement (VInspector_CallBackMode_ShiftSelect, aValues);
-}
-
-// =======================================================================
-// function : GetInfo
-// purpose :
-// =======================================================================
-QString VInspector_CallBack::GetInfo (const VInspector_CallBackMode& theMode)
-{
-  switch (theMode)
-  {
-    case VInspector_CallBackMode_None:                     return "None";
-    case VInspector_CallBackMode_Display:                  return "Display";
-    case VInspector_CallBackMode_Redisplay:                return "Redisplay";
-    case VInspector_CallBackMode_Remove:                   return "Remove";
-    case VInspector_CallBackMode_Load:                     return "Load";
-    case VInspector_CallBackMode_ActivatedModes:           return "ActivatedModes";
-    case VInspector_CallBackMode_Activate:                 return "Activate";
-    case VInspector_CallBackMode_Deactivate:               return "Deactivate";
-    case VInspector_CallBackMode_AddOrRemoveSelectedShape: return "AddOrRemoveSelectedShape";
-    case VInspector_CallBackMode_AddOrRemoveSelected:      return "AddOrRemoveSelected";
-    case VInspector_CallBackMode_AddOrRemoveSelectedOwner: return "AddOrRemoveSelectedOwner";
-    case VInspector_CallBackMode_ClearSelected:            return "ClearSelected";
-    case VInspector_CallBackMode_MoveTo:                   return "MoveTo";
-    case VInspector_CallBackMode_SetSelected:              return "SetSelected";
-    case VInspector_CallBackMode_Select:                   return "Select";
-    case VInspector_CallBackMode_ShiftSelect:              return "ShiftSelect";
-    default: break;
-  }
-  return QString();
-}
diff --git a/tools/VInspector/VInspector_CallBack.hxx b/tools/VInspector/VInspector_CallBack.hxx
deleted file mode 100644 (file)
index 668e1a8..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_CallBack_H
-#define VInspector_CallBack_H
-
-#include <AIS_InteractiveContext.hxx>
-#include <Standard.hxx>
-#include <inspector/VInspectorAPI_CallBack.hxx>
-#include <inspector/VInspector_CallBackMode.hxx>
-#include <inspector/VInspector_ViewModelHistory.hxx>
-#include <inspector/VInspector_Tools.hxx>
-
-class AIS_InteractiveObject;
-class SelectMgr_EntityOwner;
-
-//! \class VInspector_CallBack
-//! Updates inspector state on actions in context
-class VInspector_CallBack : public VInspectorAPI_CallBack
-{
-public:
-
-  //! Constructor
-  VInspector_CallBack() : VInspectorAPI_CallBack() {}
-
-  //! Destructor
-  virtual ~VInspector_CallBack() {}
-
-  //! Appends displayed presentation into history model
-  //! \param thePrs the presentation
-  virtual void Display (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Display, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends redisplayed presentation into history model
-  //! \param thePrs the presentation
-  virtual void Redisplay (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Redisplay, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends removed presentation into history model
-  //! \param thePrs the presentation
-  virtual void Remove (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Remove, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends loaded presentation into history model
-  //! \param thePrs the presentation
-  virtual void Load (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Load, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends information about modes activation
-  //! \param thePrs the presentation
-  //! \param theModes the selection modes
-  virtual void ActivatedModes (Handle(AIS_InteractiveObject) thePrs, TColStd_ListOfInteger& theModes) Standard_OVERRIDE
-  { (void)thePrs; (void)theModes; }
-
-  //! Appends information about mode activation
-  //! \param thePrs the presentation
-  //! \param theModes the selection mode
-  Standard_EXPORT virtual void Activate (Handle(AIS_InteractiveObject) thePrs,
-                                         const Standard_Integer theMode) Standard_OVERRIDE;
-
-  //! Appends information about modes deactivation
-  //! \param thePrs the presentation
-  virtual void Deactivate (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Deactivate, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends information about modes deactivation
-  //! \param thePrs the presentation
-  //! \param theMode the selection mode
-  virtual void Deactivate (Handle(AIS_InteractiveObject) thePrs, const Standard_Integer theMode) Standard_OVERRIDE
-  { (void)theMode;
-    if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_Deactivate, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends information about selection change
-  //! \param theShape the selected shape
-  Standard_EXPORT virtual void AddOrRemoveSelected (const TopoDS_Shape& theShape) Standard_OVERRIDE;
-
-  //! Appends information about selection change
-  //! \param thePrs the selected presentation
-  Standard_EXPORT virtual void AddOrRemoveSelected (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE;
-
-  //! Appends information about selection change
-  //! \param theOwner the selected owner
-  Standard_EXPORT virtual void AddOrRemoveSelected (Handle(SelectMgr_EntityOwner) theOwner) Standard_OVERRIDE;
-
-  //! Appends information about selection clear
-  Standard_EXPORT virtual void ClearSelected() Standard_OVERRIDE;
-
-  //! Appends information about selection clear
-  //! \param thePrs the selected presentation
-  virtual void ClearSelected (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_ClearSelected, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends information about moving to point
-  //! \param theXPix a pixels on horizontal
-  //! \param theYPix a pixels on vertical
-  Standard_EXPORT virtual void MoveTo (const Standard_Integer theXPix, const Standard_Integer theYPix) Standard_OVERRIDE;
-
-  //! Appends information about setting selection
-  //! \param thePrs the selected presentation
-  virtual void SetSelected (Handle(AIS_InteractiveObject) thePrs) Standard_OVERRIDE
-  { if (myHistoryModel != 0) myHistoryModel->AddElement (VInspector_CallBackMode_SetSelected, VInspector_Tools::GetInfo (thePrs)); }
-
-  //! Appends information about select
-  Standard_EXPORT virtual void Select() Standard_OVERRIDE;
-
-  //! Appends information about shift select
-  Standard_EXPORT virtual void ShiftSelect() Standard_OVERRIDE;
-
-  //! Sets history model, it will be filled by actions in context
-  //! \param theHistoryModel the view model
-  void SetHistoryModel (VInspector_ViewModelHistory* theHistoryModel) { myHistoryModel = theHistoryModel; }
-
-  //! Sets context, where actions happen
-  //! \param theContext a context instance
-  void SetContext (const Handle(AIS_InteractiveContext)& theContext) { myContext = theContext; }
-  DEFINE_STANDARD_RTTIEXT(VInspector_CallBack, VInspectorAPI_CallBack)
-
-  //! Returns string information of call back mode
-  //! \param theMode type of AIS action
-  //! \return information text
-  static QString GetInfo (const VInspector_CallBackMode& theMode);
-
-private:
-  VInspector_ViewModelHistory* myHistoryModel; //!< the current history model, fulfilled by context actions
-  Handle(AIS_InteractiveContext) myContext; //!< the listened context
-};
-
-#endif 
diff --git a/tools/VInspector/VInspector_CallBackMode.hxx b/tools/VInspector/VInspector_CallBackMode.hxx
deleted file mode 100644 (file)
index 53b73ca..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_CallBackMode_H
-#define VInspector_CallBackMode_H
-
-//! History context modes corresponding to actions in AIS_InteractiveContext
-enum VInspector_CallBackMode
-{
-  VInspector_CallBackMode_None, //!< undefined 
-  VInspector_CallBackMode_Display, //!< Display
-  VInspector_CallBackMode_Redisplay, //!< Redisplay
-  VInspector_CallBackMode_Remove, //!< Remove
-  VInspector_CallBackMode_Load, //!< Load
-  VInspector_CallBackMode_ActivatedModes, //!< ActivatedModes
-  VInspector_CallBackMode_Activate, //!< Activate
-  VInspector_CallBackMode_Deactivate, //!< Deactivate
-  VInspector_CallBackMode_AddOrRemoveSelectedShape, //!< AddOrRemoveSelectedShape for TopoDS_Shape
-  VInspector_CallBackMode_AddOrRemoveSelected, //!< AddOrRemoveSelectedShape for Presentation
-  VInspector_CallBackMode_AddOrRemoveSelectedOwner, //!< AddOrRemoveSelectedShape for Owner
-  VInspector_CallBackMode_ClearSelected, //!< ClearSelected
-  VInspector_CallBackMode_MoveTo, //!< MoveTo
-  VInspector_CallBackMode_SetSelected, //!< SetSelected
-  VInspector_CallBackMode_Select, //!< Select
-  VInspector_CallBackMode_ShiftSelect //!< ShiftSelect
-};
-
-#endif 
index b68f66664fc988fbaab8a896410838d0275daeac..394a3a3246f6a93c2c2a1a843882cf03b155e41e 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <inspector/VInspector_Communicator.hxx>
 
-#include <inspector/VInspector_CallBack.hxx>
 #include <inspector/VInspector_Window.hxx>
 
 #include <AIS_InteractiveContext.hxx>
index 591ecb0661d4de1871ac655b98f15b45dc46a59d..3ac0a4e0223681da98223304c15c7874dd23e072 100644 (file)
@@ -43,7 +43,7 @@ QVariant VInspector_ItemBase::initValue (const int theItemRole) const
     case 3: return Standard_Dump::GetPointerInfo (Object(), true).ToCString();
   }
 
-  return QVariant();
+  return TreeModel_ItemBase::initValue (theItemRole);
 }
 
 // =======================================================================
index 322306c83b823d3d7207ad8a53ae2dd4942ca434..2ea34f3d01dd16f077b92193d2ef5ee77da01b7b 100644 (file)
@@ -51,11 +51,6 @@ public:
   //! \return the value
   Standard_EXPORT virtual QVariant initValue (const int theItemRole) const Standard_OVERRIDE;
 
-  //! Returns presentation of the attribute to be visualized in the view
-  //! \thePresentations [out] container of presentation handles to be visualized
-  virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations)
-  { (void)thePresentations; }
-
   //! Returns transform persistent of the item or NULL
   Handle(Graphic3d_TransformPers) TransformPersistence() const { return myTransformPersistence; }
 
index 020d02821cb609f3072d307573503f03a1162e82..afe22ffbf65f0bc98d21c40f75a7f64cc8f57f4b 100644 (file)
 #include <inspector/VInspector_ItemContextProperties.hxx>
 
 #include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemGraphic3dCLight.hxx>
 #include <inspector/VInspector_ItemV3dViewer.hxx>
 #include <inspector/VInspector_ItemSelectMgrViewerSelector.hxx>
 
+#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
+
 // =======================================================================
 // function : initValue
 // purpose :
@@ -41,7 +45,24 @@ QVariant VInspector_ItemContextProperties::initValue (int theItemRole) const
 // =======================================================================
 int VInspector_ItemContextProperties::initRowCount() const
 {
-  return 2; // V3d_Viewer, SelectMgr_ViewerSelector
+  int aLightsCount = 0;
+
+  VInspector_ItemContextPtr aParentContextItem = itemDynamicCast<VInspector_ItemContext>(Parent());
+  if (aParentContextItem)
+  {
+    Handle(AIS_InteractiveContext) aContext = aParentContextItem->GetContext();
+    Handle(V3d_Viewer) aViewer = aContext->CurrentViewer();
+    if (!aViewer.IsNull())
+    {
+      if (!aViewer->ActiveViews().IsEmpty())
+      {
+        Handle(V3d_View) aView = aViewer->ActiveViews().First();
+        if (!aView.IsNull())
+          aLightsCount = aView->ActiveLights().Extent();
+      }
+    }
+  }
+  return 2 + aLightsCount; // V3d_Viewer, SelectMgr_ViewerSelector
 }
 
 // =======================================================================
@@ -52,8 +73,12 @@ TreeModel_ItemBasePtr VInspector_ItemContextProperties::createChild (int theRow,
 {
   if (theRow == 0)
     return VInspector_ItemV3dViewer::CreateItem (currentItem(), theRow, theColumn);
-
-  return VInspector_ItemSelectMgrViewerSelector::CreateItem (currentItem(), theRow, theColumn);
+  else if (theRow == 1)
+    return VInspector_ItemSelectMgrViewerSelector::CreateItem (currentItem(), theRow, theColumn);
+  else // lights
+  {
+    return VInspector_ItemGraphic3dCLight::CreateItem (currentItem(), theRow, theColumn);
+  }
 }
 
 // =======================================================================
diff --git a/tools/VInspector/VInspector_ItemGraphic3dCLight.cxx b/tools/VInspector/VInspector_ItemGraphic3dCLight.cxx
new file mode 100644 (file)
index 0000000..07b462e
--- /dev/null
@@ -0,0 +1,234 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/VInspector_ItemGraphic3dCLight.hxx>
+
+#include <AIS.hxx>
+#include <AIS_InteractiveContext.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemContextProperties.hxx>
+#include <inspector/TreeModel_ItemProperties.hxx>
+
+#include <V3d_View.hxx>
+#include <V3d_Viewer.hxx>
+
+// =======================================================================
+// function : initRowCount
+// purpose :
+// =======================================================================
+int VInspector_ItemGraphic3dCLight::initRowCount() const
+{
+  return 0;
+}
+
+// =======================================================================
+// function : initValue
+// purpose :
+// =======================================================================
+QVariant VInspector_ItemGraphic3dCLight::initValue (const int theItemRole) const
+{
+  QVariant aParentValue = VInspector_ItemBase::initValue (theItemRole);
+  if (aParentValue.isValid())
+    return aParentValue;
+
+  if (theItemRole == Qt::ForegroundRole)
+  {
+    if (GetLight().IsNull())
+      return QVariant();
+
+    if (!GetLight()->IsEnabled())
+      return QColor(Qt::darkGray);
+
+    return QVariant();
+  }
+
+  if (theItemRole != Qt::DisplayRole && theItemRole != Qt::EditRole && theItemRole != Qt::ToolTipRole)
+    return QVariant();
+
+  if (GetLight().IsNull())
+    return Column() == 0 ? "Empty light" : "";
+
+  if (Column() != 0)
+    return QVariant();
+
+  switch (GetLight()->Type())
+  {
+    case Graphic3d_TOLS_AMBIENT:     return "Ambient light";
+    case Graphic3d_TOLS_DIRECTIONAL: return "Directional light";
+    case Graphic3d_TOLS_POSITIONAL:  return "Positional light";
+    case Graphic3d_TOLS_SPOT:        return "Spot light";
+    default: break;
+  }
+  return QVariant();
+}
+
+// =======================================================================
+// function : Init
+// purpose :
+// =======================================================================
+void VInspector_ItemGraphic3dCLight::Init()
+{
+  VInspector_ItemContextPropertiesPtr aParentItem = itemDynamicCast<VInspector_ItemContextProperties>(Parent());
+  Handle(Graphic3d_CLight) aLight;
+  if (aParentItem)
+  {
+    VInspector_ItemContextPtr aParentContextItem = itemDynamicCast<VInspector_ItemContext>(aParentItem->Parent());
+    if (aParentContextItem)
+    {
+      Handle(AIS_InteractiveContext) aContext = aParentContextItem->GetContext();
+      Handle(V3d_Viewer) aViewer = aContext->CurrentViewer();
+      if (!aViewer.IsNull())
+      {
+        int aLightId = Row() - 2 /*in parent*/;
+        int aCurrentId = 0;
+        for (V3d_ListOfLightIterator aLightsIt (aViewer->ActiveLightIterator()); aLightsIt.More(); aLightsIt.Next(), aCurrentId++)
+        {
+          if (aCurrentId != aLightId)
+            continue;
+          aLight = aLightsIt.Value();
+        }
+      }
+    }
+  }
+  myLight = aLight;
+  TreeModel_ItemBase::Init();
+}
+
+// =======================================================================
+// function : Reset
+// purpose :
+// =======================================================================
+void VInspector_ItemGraphic3dCLight::Reset()
+{
+  VInspector_ItemBase::Reset();
+
+  myLight = NULL;
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void VInspector_ItemGraphic3dCLight::StoreItemProperties (const int theRow, const int theColumn, const QVariant& theValue)
+{
+  if (myLight.IsNull())
+    return;
+
+  const Handle(TreeModel_ItemProperties)& aProperties = Properties();
+  if (theRow == -1 && theColumn == -1) // processing sub-item value
+  {
+    Standard_SStream aStream;
+    aStream << theValue.toString().toStdString().c_str();
+
+    int aStartPos = 1;
+    Quantity_ColorRGBA aColor;
+    if (aColor.InitFromJson (aStream, aStartPos))
+    {
+      myLight->SetColor (aColor.GetRGB());
+      return;
+    }
+
+    // "Direction"
+    gp_Dir aDir;
+    if (aDir.InitFromJson (aStream, aStartPos))
+    {
+      myLight->SetDirection (aDir);
+      return;
+    }
+
+    // "Position"
+    gp_Pnt aPnt;
+    if (aPnt.InitFromJson (aStream, aStartPos))
+    {
+      myLight->SetPosition (aPnt);
+      return;
+    }
+  }
+
+  QString aPropertyName = aProperties->Data(theRow, 0).toString();
+  QVariant aPropertyValue = aProperties->Data(theRow, 1);
+  if (aPropertyName == "Position")
+  {
+  }
+  else if (aPropertyName == "Intensity")
+  {
+    myLight->SetIntensity ((Standard_ShortReal)aPropertyValue.toReal());
+  }
+  else if (aPropertyName == "ConstAttenuation")
+  {
+    myLight->SetAttenuation ((Standard_ShortReal)aPropertyValue.toReal(),
+                             (Standard_ShortReal)aProperties->Data(theRow + 1, 1).toReal());
+  }
+  else if (aPropertyName == "LinearAttenuation")
+  {
+    myLight->SetAttenuation ((Standard_ShortReal)aProperties->Data(theRow - 1, 1).toReal(),
+                             (Standard_ShortReal)aPropertyValue.toReal());
+  }
+  else if (aPropertyName == "Angle")
+  {
+    myLight->SetAngle ((Standard_ShortReal)aPropertyValue.toReal());
+  }
+  else if (aPropertyName == "Concentration")
+  {
+    myLight->SetConcentration ((Standard_ShortReal)aPropertyValue.toReal());
+  }
+  else if (aPropertyName == "Range")
+  {
+    myLight->SetRange ((Standard_ShortReal)aPropertyValue.toReal());
+  }
+  else if (aPropertyName == "Smoothness")
+  {
+    if (myLight->Type() == Graphic3d_TOLS_DIRECTIONAL)
+    {
+      myLight->SetSmoothAngle ((Standard_ShortReal)aPropertyValue.toReal());
+    }
+    else
+    {
+      myLight->SetSmoothRadius ((Standard_ShortReal)aPropertyValue.toReal());
+    }
+  }
+  else if (aPropertyName == "IsHeadlight")
+  {
+    myLight->SetHeadlight (aPropertyValue.toInt() == 1);
+  }
+  else if (aPropertyName == "IsEnabled")
+  {
+    myLight->SetEnabled (aPropertyValue.toInt() == 1);
+  }
+}
+
+// =======================================================================
+// function : initItem
+// purpose :
+// =======================================================================
+void VInspector_ItemGraphic3dCLight::initItem() const
+{
+  if (IsInitialized())
+    return;
+  const_cast<VInspector_ItemGraphic3dCLight*>(this)->Init();
+}
+
+// =======================================================================
+// function : initStream
+// purpose :
+// =======================================================================
+void VInspector_ItemGraphic3dCLight::initStream (Standard_OStream& theOStream) const
+{
+  Handle(Graphic3d_CLight) aLight = GetLight();
+  if (aLight.IsNull())
+    return;
+
+  aLight->DumpJson (theOStream);
+}
diff --git a/tools/VInspector/VInspector_ItemGraphic3dCLight.hxx b/tools/VInspector/VInspector_ItemGraphic3dCLight.hxx
new file mode 100644 (file)
index 0000000..4fac119
--- /dev/null
@@ -0,0 +1,88 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef VInspector_ItemGraphic3dCLight_H
+#define VInspector_ItemGraphic3dCLight_H
+
+#include <Standard.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
+
+#include <Graphic3d_CLight.hxx>
+
+class VInspector_ItemGraphic3dCLight;
+typedef QExplicitlySharedDataPointer<VInspector_ItemGraphic3dCLight> VInspector_ItemGraphic3dCLightPtr;
+
+//! \class VInspector_ItemGraphic3dCLight
+//! Parent item is context properties, that corresponds to AIS_InteractiveContext
+class VInspector_ItemGraphic3dCLight : public VInspector_ItemBase
+{
+public:
+
+  //! Creates an item wrapped by a shared pointer
+  static VInspector_ItemGraphic3dCLightPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+  { return VInspector_ItemGraphic3dCLightPtr (new VInspector_ItemGraphic3dCLight (theParent, theRow, theColumn)); }
+
+  //! Destructor
+  virtual ~VInspector_ItemGraphic3dCLight() Standard_OVERRIDE {};
+
+  //! Inits the item, fills internal containers
+  Standard_EXPORT virtual void Init() Standard_OVERRIDE;
+
+  //! Resets cached values
+  Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
+
+  //! Returns data object of the item.
+  //! \return object
+  virtual const Handle(Standard_Transient)& Object() const { initItem(); return myLight; }
+
+  //! Returns the current light, init item if it was not initialized yet
+  //! \return interactive object
+  Handle(Graphic3d_CLight) GetLight() const { return Handle(Graphic3d_CLight)::DownCast (Object()); }
+
+  //! Updates item by the item properties value
+  virtual void StoreItemProperties (const int theRow, const int theColumn, const QVariant& theValue) Standard_OVERRIDE;
+
+protected:
+  //! Initializes the current item. It is empty because Reset() is also empty.
+  virtual void initItem() const Standard_OVERRIDE;
+
+  //! Returns number of displayed presentations
+  //! \return rows count
+  Standard_EXPORT virtual int initRowCount() const Standard_OVERRIDE;
+
+  //! Returns item information for the given role. Fills internal container if it was not filled yet
+  //! \param theItemRole a value role
+  //! \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;
+
+private:
+
+  //! Constructor
+  //! param theParent a parent item
+  //! \param theRow the item row positition in the parent item
+  //! \param theColumn the item column positition in the parent item
+  VInspector_ItemGraphic3dCLight(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
+    : VInspector_ItemBase(theParent, theRow, theColumn) {}
+
+protected:
+
+  Handle(Graphic3d_CLight) myLight; //!< the current light
+};
+
+#endif
diff --git a/tools/VInspector/VInspector_ItemHistoryElement.cxx b/tools/VInspector/VInspector_ItemHistoryElement.cxx
deleted file mode 100644 (file)
index ef57992..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspector_ItemHistoryElement.hxx>
-
-#include <inspector/VInspector_ItemHistoryRoot.hxx>
-#include <inspector/VInspector_ItemHistoryType.hxx>
-#include <inspector/VInspector_ItemHistoryElement.hxx>
-#include <inspector/VInspector_Tools.hxx>
-
-// =======================================================================
-// function : data
-// purpose :
-// =======================================================================
-QVariant VInspector_ItemHistoryElement::initValue(const int theRole) const
-{
-  QVariant aParentValue = VInspector_ItemBase::initValue (theRole);
-  if (aParentValue.isValid())
-    return aParentValue;
-
-  if (theRole != Qt::DisplayRole && theRole != Qt::EditRole && theRole != Qt::ToolTipRole)
-    return QVariant();
-
-  switch (Column())
-  {
-    case 0: return getName();
-    case 2: return QVariant();
-    case 3: return GetPointerInfo();
-    case 4: return GetShapeTypeInfo();
-    default: break;
-  }
-  return QVariant();
-}
-
-// =======================================================================
-// function : Init
-// purpose :
-// =======================================================================
-void VInspector_ItemHistoryElement::Init()
-{
-  VInspector_ItemHistoryTypePtr aParentItem = itemDynamicCast<VInspector_ItemHistoryType>(Parent());
-  VInspector_ItemHistoryRootPtr aRootItem = itemDynamicCast<VInspector_ItemHistoryRoot>(aParentItem->Parent());
-
-  const VInspector_ItemHistoryTypeInfo& aTypeInfo = aRootItem->GetTypeInfo (aParentItem->Row());
-  QList<QList<QVariant>> anElements = aTypeInfo.myElements;
-
-  int aRowId = Row();
-  QList<QVariant> anInfo = anElements.at(aRowId);
-  int anInfoSize = anInfo.size();
-
-  myName = anInfoSize > 0 ? anInfo[0].toString() : QString ("Element: %1").arg (aRowId);
-  myPointerInfo = anInfoSize > 1 ? anInfo[1].toString() : QString();
-  myShapeTypeInfo = anInfoSize > 2 ? anInfo[2].toString() : QString();
-
-  TreeModel_ItemBase::Init();
-}
-
-// =======================================================================
-// function : initItem
-// purpose :
-// =======================================================================
-void VInspector_ItemHistoryElement::initItem() const
-{
-  if (IsInitialized())
-    return;
-  const_cast<VInspector_ItemHistoryElement*>(this)->Init();
-  // an empty method to don't initialize the main label, as it was not cleared in Reset()
-}
-
-// =======================================================================
-// function : getName
-// purpose :
-// =======================================================================
-QString VInspector_ItemHistoryElement::getName() const
-{
-  initItem();
-  return myName;
-}
-
-// =======================================================================
-// function : GetPointerInfo
-// purpose :
-// =======================================================================
-QString VInspector_ItemHistoryElement::GetPointerInfo() const
-{
-  initItem();
-  return myPointerInfo;
-}
-
-// =======================================================================
-// function : GetShapeTypeInfo
-// purpose :
-// =======================================================================
-QString VInspector_ItemHistoryElement::GetShapeTypeInfo() const
-{
-  initItem();
-  return myShapeTypeInfo;
-}
diff --git a/tools/VInspector/VInspector_ItemHistoryElement.hxx b/tools/VInspector/VInspector_ItemHistoryElement.hxx
deleted file mode 100644 (file)
index 70a1977..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_ItemHistoryElement_H
-#define VInspector_ItemHistoryElement_H
-
-#include <Standard.hxx>
-#include <inspector/VInspector_ItemBase.hxx>
-
-class VInspector_ItemHistoryElement;
-typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryElement> VInspector_ItemHistoryElementPtr;
-
-//! \class VInspector_ItemHistoryElement
-//! Item shows name, pointer and shape type values of item history type information
-//! Parent is item history type, there are no children.
-class VInspector_ItemHistoryElement : public VInspector_ItemBase
-{
-
-public:
-
-  //! Creates an item wrapped by a shared pointer
-  static VInspector_ItemHistoryElementPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
-  { return VInspector_ItemHistoryElementPtr (new VInspector_ItemHistoryElement (theParent, theRow, theColumn)); }
-
-  //! Destructor
-  virtual ~VInspector_ItemHistoryElement() {}
-
-  //! Inits the item, fills internal containers
-  Standard_EXPORT virtual void Init() Standard_OVERRIDE;
-
-  //! Resets cached values
-  virtual void Reset() Standard_OVERRIDE { TreeModel_ItemBase::Reset(); }
-
-  //! Returns pointer string value
-  QString PointerInfo() const { return myPointerInfo; }
-
-  //! \return number of children.
-  virtual int initRowCount() const Standard_OVERRIDE { return 0; }
-
-  //! Returns item information for the given role. Fills internal container if it was not filled yet
-  //! \param theItemRole a value role
-  //! \return the value
-  Standard_EXPORT virtual QVariant initValue(const int theItemRole) const Standard_OVERRIDE;
-
-protected:
-
-  //! Initialize the current item. It is empty because Reset() is also empty.
-  virtual void initItem() const Standard_OVERRIDE;
-
-  //! Creates a child item in the given position.
-  //! \param theRow the child row position
-  //! \param theColumn the child column position
-  //! \return the created item
-  virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE
-  { (void)theRow; (void)theColumn; return TreeModel_ItemBasePtr(); }
-
-  //! Returns the item text value, initialize item if it has not been initialized yet
-  QString getName() const;
-
-  //! Returns the item pointer value, initialize item if it has not been initialized yet
-  QString GetPointerInfo() const;
-
-  //! Returns the shape type text value, initialize item if it has not been initialized yet
-  QString GetShapeTypeInfo() const;
-
-private:
-
-  //! Constructor
-  //! \param theParent a parent item
-  VInspector_ItemHistoryElement(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
-  : VInspector_ItemBase(theParent, theRow, theColumn) {}
-
-private:
-
-  QString myName;  //!< cached text value
-  QString myPointerInfo;  //!< cached pointer text value
-  QString myShapeTypeInfo;  //!<cached shape type text value 
-};
-
-#endif
diff --git a/tools/VInspector/VInspector_ItemHistoryRoot.cxx b/tools/VInspector/VInspector_ItemHistoryRoot.cxx
deleted file mode 100644 (file)
index 77f9512..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspector_ItemHistoryRoot.hxx>
-
-#include <inspector/VInspector_ItemHistoryType.hxx>
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-VInspector_ItemHistoryRoot::VInspector_ItemHistoryRoot(TreeModel_ItemBasePtr theParent,
-                                                       const int theRow, const int theColumn)
-: VInspector_ItemBase (theParent, theRow, theColumn), myFirstIndex (0), myLastIndex (0), myInfoMaxSize (10)
-{
-}
-
-// =======================================================================
-// function : AddElement
-// purpose :
-// =======================================================================
-void VInspector_ItemHistoryRoot::AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo)
-{
-  if (!myLastIndex)
-  {
-    myInfoMap[myLastIndex] = VInspector_ItemHistoryTypeInfo(theMode, theInfo);
-    myLastIndex++;
-  }
-  else
-  {
-    if (myInfoMap[myLastIndex].myMode == theMode)
-      myInfoMap[myLastIndex].AddElement(theInfo);
-    else
-    {
-      myLastIndex++;
-      myInfoMap[myLastIndex] = VInspector_ItemHistoryTypeInfo(theMode, theInfo);
-    }
-  }
-
-  // clear cache
-  if (myInfoMap.size() >= myInfoMaxSize)
-  {
-    myInfoMap.remove (myFirstIndex);
-    myFirstIndex++;
-  }
-}
-
-// =======================================================================
-// function : GetTypeInfo
-// purpose :
-// =======================================================================
-const VInspector_ItemHistoryTypeInfo& VInspector_ItemHistoryRoot::GetTypeInfo (const int theChildRowIndex)
-{
-  int anInfoMapIndex = theChildRowIndex + myFirstIndex;
-
-  bool aReversed = true;
-  if (aReversed)
-    anInfoMapIndex = (myInfoMap.size() - myFirstIndex) - 1 - anInfoMapIndex;
-
-  return myInfoMap[anInfoMapIndex];
-}
-
-// =======================================================================
-// function : initValue
-// purpose :
-// =======================================================================
-QVariant VInspector_ItemHistoryRoot::initValue (const int theRole) const
-{
-  QVariant aParentValue = VInspector_ItemBase::initValue (theRole);
-  if (aParentValue.isValid())
-    return aParentValue;
-
-  if (theRole != Qt::DisplayRole && theRole != Qt::EditRole && theRole != Qt::ToolTipRole)
-    return QVariant();
-  switch (Column())
-  {
-    case 0: return "History";
-    case 2: return theRole == Qt::ToolTipRole ? QVariant ("Count of children") : QVariant (rowCount());
-    default:
-      break;
-  }
-  return QVariant();
-}
-
-// =======================================================================
-// function : createChild
-// purpose :
-// =======================================================================
-TreeModel_ItemBasePtr VInspector_ItemHistoryRoot::createChild (int theRow, int theColumn)
-{
-  return VInspector_ItemHistoryType::CreateItem (currentItem(), theRow, theColumn);
-}
-
diff --git a/tools/VInspector/VInspector_ItemHistoryRoot.hxx b/tools/VInspector/VInspector_ItemHistoryRoot.hxx
deleted file mode 100644 (file)
index d0b16d5..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_ItemHistoryRoot_H
-#define VInspector_ItemHistoryRoot_H
-
-#include <Standard.hxx>
-#include <inspector/VInspector_ItemBase.hxx>
-#include <inspector/VInspector_ItemHistoryTypeInfo.hxx>
-#include <inspector/VInspector_CallBackMode.hxx>
-
-class VInspector_ItemHistoryRoot;
-typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryRoot> VInspector_ItemHistoryRootPtr;
-
-//! \class VInspector_ItemHistoryRoot
-//! Item in history tree model. Has container of VInspector_ItemHistoryTypeInfo. Each element is a child item.
-//! Parent item is NULL, children are ItemHistoryType items 
-class VInspector_ItemHistoryRoot : public VInspector_ItemBase
-{
-
-public:
-
-  //! Creates an item wrapped by a shared pointer
-  static VInspector_ItemHistoryRootPtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
-  { return VInspector_ItemHistoryRootPtr (new VInspector_ItemHistoryRoot (theParent, theRow, theColumn)); }
-
-  //! Destructor
-  virtual ~VInspector_ItemHistoryRoot() {}
-
-  //! Sets maximum count of history elements in internal container.
-  //! \param theSize a size value
-  void SetHistoryTypesMaxAmount (const int theSize) { myInfoMaxSize = theSize; }
-
-  //! Appends new history element into internal container. If the container already has maximum number
-  //! of values, the first container is removed.
-  //! \param theMode a type of the element
-  //! \param theInfo a history information element
-  Standard_EXPORT void AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo);
-
-  //! Returns history item information for the child item
-  //! \param theChildRowIndex a child index 
-  Standard_EXPORT const VInspector_ItemHistoryTypeInfo& GetTypeInfo (const int theChildRowIndex);
-
-protected:
-
-  //! Return data value for the role. It should be reimplemented in child
-  //! \param theRole a value role
-  //! \return the value
-  virtual QVariant initValue(const int theRole) const;
-
-  //! \return number of children. It should be reimplemented in child
-  virtual int initRowCount() const Standard_OVERRIDE { return myInfoMap.size(); }
-
-  //! Creates a child item in the given position.
-  //! \param theRow the child row position
-  //! \param theColumn the child column position
-  //! \return the created item
-  virtual TreeModel_ItemBasePtr createChild (int theRow, int theColumn) Standard_OVERRIDE;
-
-private:
-
-  //! Constructor
-  //! \param theParent a parent item
-  VInspector_ItemHistoryRoot(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn);
-
-private:
-
-  QMap<int, VInspector_ItemHistoryTypeInfo> myInfoMap; //!< container of whole callback info, bounded by maximum size value
-  int myFirstIndex; //!< the first index in the information map, the first index is incremented if max value of container is achieved 
-  int myLastIndex; //!< the last index in the information map, is incremented when new element is added
-  int myInfoMaxSize; //!< maximum number of elements in information map
-};
-
-#endif
diff --git a/tools/VInspector/VInspector_ItemHistoryType.cxx b/tools/VInspector/VInspector_ItemHistoryType.cxx
deleted file mode 100644 (file)
index 70ab2c9..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspector_ItemHistoryType.hxx>
-
-#include <inspector/VInspector_CallBack.hxx>
-#include <inspector/VInspector_ItemHistoryRoot.hxx>
-#include <inspector/VInspector_ItemHistoryElement.hxx>
-#include <inspector/VInspector_Tools.hxx>
-
-// =======================================================================
-// function : PointerInfo
-// purpose :
-// =======================================================================
-QString VInspector_ItemHistoryType::PointerInfo() const
-{
-  if (rowCount() <= 0)
-    return QString();
-
-  VInspector_ItemHistoryRootPtr aParentItem = itemDynamicCast<VInspector_ItemHistoryRoot>(Parent());
-  const VInspector_ItemHistoryTypeInfo& aTypeInfo = aParentItem->GetTypeInfo(Row());
-  if (aTypeInfo.myElements.size() < rowCount())
-    return QString();
-  QList<QVariant> anElements = aTypeInfo.myElements[rowCount() - 1]; // the last item
-  return anElements.size() > 1 ? anElements[1].toString() : QString();
-}
-
-// =======================================================================
-// function : PointerInfo
-// purpose :
-// =======================================================================
-QString VInspector_ItemHistoryType::OwnerInfo() const
-{
-  if (rowCount() <= 0)
-    return QString();
-
-  VInspector_ItemHistoryRootPtr aParentItem = itemDynamicCast<VInspector_ItemHistoryRoot>(Parent());
-  const VInspector_ItemHistoryTypeInfo& aTypeInfo = aParentItem->GetTypeInfo(Row());
-  if ( aTypeInfo.myElements.size() < rowCount())
-    return QString();
-  QList<QVariant> anElements = aTypeInfo.myElements[rowCount() - 1]; // the last item
-  return anElements.size() > 3 ? anElements[3].toString() : QString();
-}
-
-// =======================================================================
-// function : data
-// purpose :
-// =======================================================================
-QVariant VInspector_ItemHistoryType::initValue(const int theRole) const
-{
-  QVariant aParentValue = VInspector_ItemBase::initValue (theRole);
-  if (aParentValue.isValid())
-    return aParentValue;
-
-  if (theRole != Qt::DisplayRole && theRole != Qt::EditRole && theRole != Qt::ToolTipRole)
-    return QVariant();
-
-  VInspector_ItemHistoryRootPtr aParentItem = itemDynamicCast<VInspector_ItemHistoryRoot>(Parent());
-  const VInspector_ItemHistoryTypeInfo& aTypeInfo = aParentItem->GetTypeInfo(Row());
-  int aRowCount = rowCount();
-  if (aRowCount <= 0 || aTypeInfo.myElements.size() < aRowCount)
-    return QVariant();
-
-  QList<QVariant> anElements = rowCount() > 0 ? aTypeInfo.myElements[rowCount() - 1] : QList<QVariant>(); // the last item
-  int anInfoSize = anElements.size();
-  switch (Column())
-  {
-    case 0: return VInspector_CallBack::GetInfo(aTypeInfo.myMode);
-    case 3: return rowCount();
-    case 4: return anInfoSize > 1 ? anElements[1].toString() : QVariant(); // pointer info
-    case 5: return anInfoSize > 2 ? anElements[2].toString() : QVariant(); // shape type
-    case 6: return anInfoSize > 0 ? anElements[0].toString() : QVariant(); // AIS name
-    case 7: return anInfoSize > 3 ? anElements[3].toString() : QVariant(); // owner info
-    default: break;
-  }
-  return QVariant();
-}
-
-// =======================================================================
-// function : rowCount
-// purpose :
-// =======================================================================
-int VInspector_ItemHistoryType::initRowCount() const
-{
-  VInspector_ItemHistoryRootPtr aParentItem = itemDynamicCast<VInspector_ItemHistoryRoot>(Parent());
-  const VInspector_ItemHistoryTypeInfo& aTypeInfo = aParentItem->GetTypeInfo(Row());
-  return aTypeInfo.myElements.size();
-}
-
-// =======================================================================
-// function : createChild
-// purpose :
-// =======================================================================
-TreeModel_ItemBasePtr VInspector_ItemHistoryType::createChild (int theRow, int theColumn)
-{
-  return VInspector_ItemHistoryElement::CreateItem (currentItem(), theRow, theColumn);
-}
-
-// =======================================================================
-// function : initItem
-// purpose :
-// =======================================================================
-void VInspector_ItemHistoryType::initItem() const
-{
-  if (IsInitialized())
-    return;
-  const_cast<VInspector_ItemHistoryType*>(this)->Init();
-  // an empty method to don't initialize the main label, as it was not cleared in Reset()
-}
diff --git a/tools/VInspector/VInspector_ItemHistoryType.hxx b/tools/VInspector/VInspector_ItemHistoryType.hxx
deleted file mode 100644 (file)
index 1632e83..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_ItemHistoryType_H
-#define VInspector_ItemHistoryType_H
-
-#include <Standard.hxx>
-#include <inspector/VInspector_ItemBase.hxx>
-
-class VInspector_ItemHistoryType;
-typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryType> VInspector_ItemHistoryTypePtr;
-
-//! \class VInspector_ItemHistoryType
-//! Item to show history type. Also it shows the element information of the first sub-item
-//! Parent is item history root item, children are item history elements
-class VInspector_ItemHistoryType : public VInspector_ItemBase
-{
-
-public:
-
-  //! Creates an item wrapped by a shared pointer
-  static VInspector_ItemHistoryTypePtr CreateItem (TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
-  { return VInspector_ItemHistoryTypePtr (new VInspector_ItemHistoryType (theParent, theRow, theColumn)); }
-
-  //! Destructor
-  virtual ~VInspector_ItemHistoryType() {}
-
-  //! Returns the pointer info of the first child item, initialize item if it has not been initialized yet.
-  Standard_EXPORT QString PointerInfo() const;
-
-  //! Returns the owner info of the first child item, initialize item if it has not been initialized yet.
-  Standard_EXPORT QString OwnerInfo() const;
-
-protected:
-
-  //! Return data value for the role.
-  //! \param theRole a value role
-  //! \return the value
-  virtual QVariant initValue(const int theRole) const;
-
-  //! \return number of children.
-  virtual int initRowCount() const Standard_OVERRIDE;
-
-    //! Initialize the current item. It is empty because Reset() is also empty.
-  virtual void initItem() const Standard_OVERRIDE;
-
-protected:
-
-  //! Creates a child item in the given position.
-  //! \param theRow the child row position
-  //! \param theColumn the child column position
-  //! \return the created item
-  virtual TreeModel_ItemBasePtr createChild(int theRow, int theColumn) Standard_OVERRIDE;
-
-private:
-
-  //! Constructor
-  //! \param theParent a parent item
-  VInspector_ItemHistoryType(TreeModel_ItemBasePtr theParent, const int theRow, const int theColumn)
-    : VInspector_ItemBase(theParent, theRow, theColumn) {}
-
-};
-
-#endif
diff --git a/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx b/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx
deleted file mode 100644 (file)
index 933a62b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_ItemHistoryTypeInfo_H
-#define VInspector_ItemHistoryTypeInfo_H
-
-#include <inspector/VInspector_CallBackMode.hxx>
-
-//! \class VInspector_ItemHistoryTypeInfo
-//! History info for a type item. It contains container of information for the element
-struct VInspector_ItemHistoryTypeInfo
-{
-
-  //! Constructor
-  VInspector_ItemHistoryTypeInfo() : myMode(VInspector_CallBackMode_None) {}
-
-  //! Destructor
-  VInspector_ItemHistoryTypeInfo (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo)
-    : myMode(theMode) { AddElement(theInfo); }
-
-  //! Append new element
-  //! \param theInfo an information element
-  void AddElement (const QList<QVariant>& theInfo) { myElements.append (theInfo); }
-
-  VInspector_CallBackMode myMode; //!< history element mode
-  QList<QList<QVariant>> myElements; //!< container of elements information
-};
-
-#endif 
index 28ea2399535ddb60096c370342f5add140e1d726..31df492fc618596430fef21264ac72251f1c74bd 100644 (file)
@@ -61,7 +61,7 @@ public:
 
   //! Returns presentation of the attribute to be visualized in the view
   //! \thePresentations [out] container of presentation handles to be visualized
-  Standard_EXPORT virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations);
+  Standard_EXPORT virtual void Presentations (NCollection_List<Handle(Standard_Transient)>& thePresentations) Standard_OVERRIDE;
 
 protected:
 
index 6e988a9f06717cd48d395c8024abfc715e793542..8255e06af0fb55244d04103ddd15c240d0d62be2 100644 (file)
@@ -31,7 +31,6 @@
 #include <TopLoc_Location.hxx>
 #include <TopoDS_Shape.hxx>
 
-#include <inspector/VInspector_CallBackMode.hxx>
 #include <inspector/View_DisplayActionType.hxx>
 
 #include <inspector/TreeModel_ItemBase.hxx>
index 2ca792b334b158835662706cc562885cd7648344..894d0a3ba3087fa9c53402afa0fef4596cc05096 100644 (file)
@@ -43,8 +43,8 @@ void VInspector_ViewModel::InitColumns()
 {
   TreeModel_ModelBase::InitColumns();
 
-  SetHeaderItem (3, TreeModel_HeaderSection ("Pointer", COLUMN_POINTER_WIDTH));
-  SetHeaderItem (4, TreeModel_HeaderSection ("SelectedOwners", -1));
+  setHeaderItem (3, TreeModel_HeaderSection ("Pointer", COLUMN_POINTER_WIDTH));
+  setHeaderItem (4, TreeModel_HeaderSection ("SelectedOwners", -1));
 }
 
 // =======================================================================
diff --git a/tools/VInspector/VInspector_ViewModelHistory.cxx b/tools/VInspector/VInspector_ViewModelHistory.cxx
deleted file mode 100644 (file)
index 980dc1e..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#include <inspector/VInspector_ViewModelHistory.hxx>
-
-#include <inspector/VInspector_ItemHistoryElement.hxx>
-#include <inspector/VInspector_ItemHistoryRoot.hxx>
-#include <inspector/VInspector_ItemHistoryType.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QStringList>
-#include <Standard_WarningsRestore.hxx>
-
-const int COLUMN_NAME_WIDTH = 230;
-const int COLUMN_SIZE_WIDTH = 30;
-const int COLUMN_POINTER_WIDTH = 70;
-const int COLUMN_SHAPE_TYPE_WIDTH = 75;
-const int COLUMN_AIS_NAME_WIDTH = 75;
-const int COLUMN_SELECTED_WIDTH = 75;
-
-const int COLUMN_5_WIDTH = 120;
-const int COLUMN_6_WIDTH = 65;
-const int COLUMN_7_WIDTH = 70;
-
-const int HISTORY_AIS_NAME_COLUMN_WIDTH = 140;
-
-
-// =======================================================================
-// function : Constructor
-// purpose :
-// =======================================================================
-VInspector_ViewModelHistory::VInspector_ViewModelHistory (QObject* theParent, const int theHistoryTypesMaxAmount)
-: TreeModel_ModelBase (theParent), myHistoryTypesMaxAmount (theHistoryTypesMaxAmount)
-{
-}
-
-// =======================================================================
-// function : InitColumns
-// purpose :
-// =======================================================================
-void VInspector_ViewModelHistory::InitColumns()
-{
-  TreeModel_ModelBase::InitColumns();
-
-  SetHeaderItem (0, TreeModel_HeaderSection ("Name", COLUMN_NAME_WIDTH));
-  SetHeaderItem (1, TreeModel_HeaderSection ("Visibility", COLUMN_SIZE_WIDTH)); // visualization item
-  SetHeaderItem (2, TreeModel_HeaderSection ("Size", COLUMN_SIZE_WIDTH));
-  SetHeaderItem (3, TreeModel_HeaderSection ("Pointer", COLUMN_POINTER_WIDTH));
-  SetHeaderItem (4, TreeModel_HeaderSection ("Shape type", COLUMN_SHAPE_TYPE_WIDTH));
-  SetHeaderItem (5, TreeModel_HeaderSection ("AIS Name", COLUMN_AIS_NAME_WIDTH));
-  SetHeaderItem (6, TreeModel_HeaderSection ("Selected/Highlighted", -1));
-
-  for (int aColumnId = 0, aNbColumns = columnCount(); aColumnId < aNbColumns; aColumnId++)
-  {
-    VInspector_ItemHistoryRootPtr aRootItem = itemDynamicCast<VInspector_ItemHistoryRoot> (myRootItems[aColumnId]);
-    aRootItem->SetHistoryTypesMaxAmount (myHistoryTypesMaxAmount);
-  }
-}
-
-// =======================================================================
-// function : createRootItem
-// purpose :
-// =======================================================================
-TreeModel_ItemBasePtr VInspector_ViewModelHistory::createRootItem (const int theColumnId)
-{
-  return VInspector_ItemHistoryRoot::CreateItem (TreeModel_ItemBasePtr(), 0, theColumnId);
-}
-
-// =======================================================================
-// function : AddElement
-// purpose :
-// =======================================================================
-void VInspector_ViewModelHistory::AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo)
-{
-  // fill root item by the application
-  for (int aColId = 0, aNbColumns = columnCount(); aColId < aNbColumns; aColId++)
-  {
-    VInspector_ItemHistoryRootPtr aRootItem = itemDynamicCast<VInspector_ItemHistoryRoot>(myRootItems[aColId]);
-    aRootItem->AddElement(theMode, theInfo);
-  }
-  Reset();
-  EmitLayoutChanged();
-}
-
-// =======================================================================
-// function : GetSelectedPointers
-// purpose :
-// =======================================================================
-QStringList VInspector_ViewModelHistory::GetSelectedPointers (const QModelIndex& theIndex)
-{
-  QStringList aPointers;
-  TreeModel_ItemBasePtr anItem = TreeModel_ModelBase::GetItemByIndex (theIndex);
-  if (!anItem)
-    return aPointers;
-
-  VInspector_ItemHistoryTypePtr aHistoryItem = itemDynamicCast<VInspector_ItemHistoryType>(anItem);
-  if (aHistoryItem)
-  {
-    QString aPointerInfo = aHistoryItem->PointerInfo();
-    QString anOwnerInfo = aHistoryItem->OwnerInfo();
-
-    if (!aPointerInfo.isEmpty())
-      aPointers.append (aPointerInfo);
-    if (!anOwnerInfo.isEmpty())
-      aPointers.append (anOwnerInfo.split (", "));
-  }
-  else
-  {
-    VInspector_ItemHistoryElementPtr anElementItem = itemDynamicCast<VInspector_ItemHistoryElement>(anItem);
-    if (anElementItem)
-    {
-      QString aPointerInfo = anElementItem->PointerInfo();
-      if (!aPointerInfo.isEmpty())
-        aPointers.append (aPointerInfo);
-    }
-  }
-  return aPointers;
-}
diff --git a/tools/VInspector/VInspector_ViewModelHistory.hxx b/tools/VInspector/VInspector_ViewModelHistory.hxx
deleted file mode 100644 (file)
index 3040234..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-// Created on: 2017-06-16
-// Created by: Natalia ERMOLAEVA
-// Copyright (c) 2017 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement. 
-
-#ifndef VInspector_ViewModelHistory_H
-#define VInspector_ViewModelHistory_H
-
-#include <Standard.hxx>
-#include <inspector/VInspector_ItemBase.hxx>
-#include <inspector/VInspector_CallBackMode.hxx>
-
-#include <Standard_WarningsDisable.hxx>
-#include <QByteArray>
-#include <QHash>
-#include <QMap>
-#include <QObject>
-#include <Standard_WarningsRestore.hxx>
-
-#include <inspector/TreeModel_ModelBase.hxx>
-
-//! \class VInspector_ViewModelHistory
-//! The class that visualizes methods called in AIS interactive context.
-class VInspector_ViewModelHistory : public TreeModel_ModelBase
-{
-  Q_OBJECT
-
-public:
-
-  //! Constructor
-  Standard_EXPORT VInspector_ViewModelHistory (QObject* theParent, const int theHistoryTypesMaxAmount = 50);
-
-  //! Destructor
-  virtual ~VInspector_ViewModelHistory() {}
-
-  //! Creates model columns and root items.
-  Standard_EXPORT virtual void InitColumns() Standard_OVERRIDE;
-
-  //! Append new element under the root item
-  Standard_EXPORT void AddElement (const VInspector_CallBackMode& theMode, const QList<QVariant>& theInfo);
-
-  //! Returns container of pointer information for selected presentation or owner item
-  //! \param theIndex an index of tree view model
-  //! \param container of strings
-  Standard_EXPORT QStringList GetSelectedPointers (const QModelIndex& theIndex);
-
-protected:
-
-  //! Creates root item
-  //! \param theColumnId index of a column
-  Standard_EXPORT virtual TreeModel_ItemBasePtr createRootItem (const int theColumnId) Standard_OVERRIDE;
-
-private:
-  int myHistoryTypesMaxAmount; //!< maximum types in history
-};
-
-#endif
index 17fc850e6dd16e3e6ed5b49d4daa4256e5e1c732..08a7bbac2096964e9742893833343e8c24f65469 100644 (file)
 #include <inspector/VInspector_ToolBar.hxx>
 #include <inspector/VInspector_Tools.hxx>
 #include <inspector/VInspector_ViewModel.hxx>
-#include <inspector/VInspector_CallBack.hxx>
 #include <inspector/VInspector_Communicator.hxx>
 #include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemContextProperties.hxx>
+#include <inspector/VInspector_ItemGraphic3dCLight.hxx>
 #include <inspector/VInspector_ToolBar.hxx>
 #include <inspector/VInspector_Tools.hxx>
 #include <inspector/VInspector_ViewModel.hxx>
-#include <inspector/VInspector_ViewModelHistory.hxx>
 
 #include <inspector/ViewControl_PropertyView.hxx>
 #include <inspector/ViewControl_TreeView.hxx>
@@ -77,9 +77,6 @@ const int VINSPECTOR_DEFAULT_POSITION_Y = 60;
 const int VINSPECTOR_DEFAULT_VIEW_WIDTH = 400;
 const int VINSPECTOR_DEFAULT_VIEW_HEIGHT = 1000;
 
-const int VINSPECTOR_DEFAULT_HISTORY_VIEW_WIDTH = 400;
-const int VINSPECTOR_DEFAULT_HISTORY_VIEW_HEIGHT = 50;
-
 const int VINSPECTOR_DEFAULT_VIEW_POSITION_X = 200 + 900 + 100; // TINSPECTOR_DEFAULT_POSITION_X + TINSPECTOR_DEFAULT_WIDTH + 100
 const int VINSPECTOR_DEFAULT_VIEW_POSITION_Y = 60; // TINSPECTOR_DEFAULT_POSITION_Y + 50
 
@@ -114,9 +111,8 @@ VInspector_Window::VInspector_Window()
   aTreeModel->InitColumns();
   myTreeView->setModel (aTreeModel);
   // hide Visibility column
-  TreeModel_HeaderSection anItem = aTreeModel->GetHeaderItem ((int)TreeModel_ColumnType_Visibility);
-  anItem.SetIsHidden (true);
-  aTreeModel->SetHeaderItem ((int)TreeModel_ColumnType_Visibility, anItem);
+  TreeModel_HeaderSection* anItem = aTreeModel->ChangeHeaderItem ((int)TreeModel_ColumnType_Visibility);
+  anItem->SetIsHidden (true);
 
   connect (myTreeView, SIGNAL(customContextMenuRequested(const QPoint&)),
            this, SLOT (onTreeViewContextMenuRequested(const QPoint&)));
@@ -141,40 +137,6 @@ VInspector_Window::VInspector_Window()
   myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myPropertyPanelWidget);
   connect (myPropertyPanelWidget->toggleViewAction(), SIGNAL(toggled(bool)), this, SLOT (onPropertyPanelShown (bool)));
 
-  myHistoryView = new ViewControl_TreeView (myMainWindow);
-  myHistoryView->setSelectionBehavior (QAbstractItemView::SelectRows);
-  ((ViewControl_TreeView*)myHistoryView)->SetPredefinedSize (QSize (VINSPECTOR_DEFAULT_HISTORY_VIEW_WIDTH,
-                                                                    VINSPECTOR_DEFAULT_HISTORY_VIEW_HEIGHT));
-  myHistoryView->setContextMenuPolicy (Qt::CustomContextMenu);
-  myHistoryView->header()->setStretchLastSection (true);
-  new TreeModel_ContextMenu (myHistoryView);
-
-  myHistoryView->setSelectionMode (QAbstractItemView::ExtendedSelection);
-  VInspector_ViewModelHistory* aHistoryModel = new VInspector_ViewModelHistory (myHistoryView);
-  aHistoryModel->InitColumns();
-  myHistoryView->setModel (aHistoryModel);
-
-  QItemSelectionModel* aSelectionModel = new QItemSelectionModel (aHistoryModel);
-  myHistoryView->setSelectionModel (aSelectionModel);
-  connect (aSelectionModel, SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)),
-    this, SLOT (onHistoryViewSelectionChanged (const QItemSelection&, const QItemSelection&)));
-
-  anItem = aHistoryModel->GetHeaderItem (0);
-  // hide Visibility column
-  TreeModel_Tools::UseVisibilityColumn (myHistoryView, false);
-  anItem = aHistoryModel->GetHeaderItem ((int)TreeModel_ColumnType_Visibility);
-  anItem.SetIsHidden (true);
-  aHistoryModel->SetHeaderItem ((int)TreeModel_ColumnType_Visibility, anItem);
-
-  QModelIndex aParentIndex = myHistoryView->model()->index (0, 0);
-  myHistoryView->setExpanded (aParentIndex, true);
-
-  QDockWidget* aHistoryDockWidget = new QDockWidget (tr ("HistoryView"), myMainWindow);
-  aHistoryDockWidget->setObjectName (aHistoryDockWidget->windowTitle());
-  aHistoryDockWidget->setTitleBarWidget (new QWidget(myMainWindow));
-  aHistoryDockWidget->setWidget (myHistoryView);
-  myMainWindow->addDockWidget (Qt::BottomDockWidgetArea, aHistoryDockWidget);
-
   myMainWindow->resize (450, 800);
   myMainWindow->move (60, 20);
 
@@ -263,7 +225,6 @@ void VInspector_Window::SetPreferences (const TInspectorAPI_PreferencesDataMap&
   if (theItem.IsEmpty())
   {
     TreeModel_Tools::SetDefaultHeaderSections (myTreeView);
-    TreeModel_Tools::SetDefaultHeaderSections (myHistoryView);
     return;
   }
 
@@ -275,9 +236,6 @@ void VInspector_Window::SetPreferences (const TInspectorAPI_PreferencesDataMap&
       myMainWindow->restoreState (TreeModel_Tools::ToByteArray (anItemValue.ToCString()));
     else if (TreeModel_Tools::RestoreState (myTreeView, anItemKey.ToCString(), anItemValue.ToCString()))
       continue;
-    else if (TreeModel_Tools::RestoreState (myHistoryView, anItemKey.ToCString(), anItemValue.ToCString(),
-                                            "history_view_"))
-      continue;
     else if (View_PreviewParameters::RestoreState (displayer()->DisplayPreview()->GetPreviewParameters(), anItemKey.ToCString(),
       anItemValue.ToCString(), "preview_parameters_"))
       continue;
@@ -334,14 +292,6 @@ void VInspector_Window::UpdateContent()
        myTreeView->scrollTo (aPresentationIndex);
     }
   }
-
-  if (!myCallBack.IsNull())
-  {
-    VInspector_ViewModelHistory* aHistoryModel = dynamic_cast<VInspector_ViewModelHistory*>
-      (myHistoryView->model());
-    aHistoryModel->Reset();
-    aHistoryModel->EmitLayoutChanged();
-  }
 }
 
 // =======================================================================
@@ -417,7 +367,6 @@ bool VInspector_Window::Init (const NCollection_List<Handle(Standard_Transient)>
     return Standard_False;
 
   Handle(AIS_InteractiveContext) aContext;
-  Handle(VInspector_CallBack) aCallBack;
   Standard_Boolean isModelUpdated = Standard_False;
 
   for (NCollection_List<Handle(Standard_Transient)>::Iterator aParamsIt (theParameters); aParamsIt.More(); aParamsIt.Next())
@@ -426,23 +375,12 @@ bool VInspector_Window::Init (const NCollection_List<Handle(Standard_Transient)>
     if (aContext.IsNull())
       aContext = Handle(AIS_InteractiveContext)::DownCast (anObject);
 
-    if (aCallBack.IsNull())
-      aCallBack = Handle(VInspector_CallBack)::DownCast (anObject);
   }
   if (aViewModel->GetContext() != aContext)
     SetContext(aContext);
   else
     isModelUpdated = Standard_True;
 
-  if (!aCallBack.IsNull() && aCallBack != myCallBack)
-  {
-    myCallBack = aCallBack;
-    VInspector_ViewModelHistory* aHistoryModel = dynamic_cast<VInspector_ViewModelHistory*>
-      (myHistoryView->model());
-    myCallBack->SetContext(aContext);
-    myCallBack->SetHistoryModel(aHistoryModel);
-  }
-
   if (isModelUpdated)
     UpdateTreeModel();
 
@@ -462,9 +400,6 @@ void VInspector_Window::SetContext (const Handle(AIS_InteractiveContext)& theCon
   aViewModel->SetContext (theContext);
   myTreeView->setExpanded (aViewModel->index (0, 0), true);
 
-  if (!myCallBack.IsNull())
-    myCallBack->SetContext (theContext);
-
   if (myDisplayer)
     myDisplayer->SetContext (theContext);
 }
@@ -485,6 +420,14 @@ bool VInspector_Window::OpenFile(const TCollection_AsciiString& theFileName)
   {
     aContext = createView();
     SetContext (aContext);
+
+    const Handle(V3d_Viewer) aViewer = aViewModel->GetContext()->CurrentViewer();
+    if (!aViewer.IsNull())
+    {
+      addLight (Graphic3d_TOLS_POSITIONAL, aViewer);
+      addLight (Graphic3d_TOLS_SPOT, aViewer);
+    }
+
     isModelUpdated = true;
   }
 
@@ -493,6 +436,8 @@ bool VInspector_Window::OpenFile(const TCollection_AsciiString& theFileName)
     return isModelUpdated;
 
   Handle(AIS_Shape) aPresentation = new AIS_Shape (aShape);
+  aPresentation->Attributes()->SetAutoTriangulation (Standard_False);
+
   View_Displayer* aDisplayer = myViewWindow->Displayer();
   aDisplayer->DisplayPresentation (aPresentation);
   aContext->UpdateCurrentViewer();
@@ -516,10 +461,28 @@ void VInspector_Window::onTreeViewContextMenuRequested(const QPoint& thePosition
   TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex);
   if (anItemBase)
   {
-    if (itemDynamicCast<VInspector_ItemContext> (anItemBase))
+    if (itemDynamicCast<VInspector_ItemContextProperties> (anItemBase))
+    {
+      aMenu->addSeparator();
+      QMenu* anExplodeMenu = aMenu->addMenu ("Add Light");
+
+      anExplodeMenu->addAction (ViewControl_Tools::CreateAction ("Ambient", SLOT (onAddLight()), myMainWindow, this));
+      anExplodeMenu->addAction (ViewControl_Tools::CreateAction ("Directional", SLOT (onAddLight()), myMainWindow, this));
+      anExplodeMenu->addAction (ViewControl_Tools::CreateAction ("Positional", SLOT (onAddLight()), myMainWindow, this));
+      anExplodeMenu->addAction (ViewControl_Tools::CreateAction ("Spot", SLOT (onAddLight()), myMainWindow, this));
+    }
+
+    if (itemDynamicCast<VInspector_ItemGraphic3dCLight> (anItemBase))
     {
-      aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Export to MessageView"), SLOT (onExportToMessageView()), GetMainWindow(), this));
       aMenu->addSeparator();
+      aMenu->addAction (ViewControl_Tools::CreateAction ("Remove Light", SLOT (onRemoveLight()), myMainWindow, this));
+      VInspector_ItemGraphic3dCLightPtr anItemLight = itemDynamicCast<VInspector_ItemGraphic3dCLight> (anItemBase);
+      if (!anItemLight->GetLight().IsNull())
+      {
+        bool isOn = anItemLight->GetLight()->IsEnabled();
+        aMenu->addAction (ViewControl_Tools::CreateAction (isOn ? "OFF Light" : "ON Light", SLOT (onOnOffLight()),
+                          myMainWindow, this));
+      }
     }
   }
 
@@ -535,9 +498,6 @@ void VInspector_Window::onTreeViewContextMenuRequested(const QPoint& thePosition
   aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Expand All"), SLOT (onExpandAll()), GetMainWindow(), this));
   aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Collapse All"), SLOT (onCollapseAll()), GetMainWindow(), this));
 
-  aMenu->addSeparator();
-  aMenu->addAction (ViewControl_Tools::CreateAction ("Test AddChild", SLOT (OnTestAddChild()), GetMainWindow(), this));
-
   QPoint aPoint = myTreeView->mapToGlobal (thePosition);
   aMenu->exec(aPoint);
 }
@@ -606,25 +566,6 @@ void VInspector_Window::onTreeViewSelectionChanged (const QItemSelection&,
   displayer()->UpdatePreview (View_DisplayActionType_DisplayId, aSelPresentations);
 }
 
-// =======================================================================
-// function : onHistoryViewSelectionChanged
-// purpose :
-// =======================================================================
-void VInspector_Window::onHistoryViewSelectionChanged (const QItemSelection& theSelected,
-                                                       const QItemSelection&)
-{
-  VInspector_ViewModelHistory* aHistoryModel = dynamic_cast<VInspector_ViewModelHistory*> (myHistoryView->model());
-  if (!aHistoryModel)
-    return;
-
-  if (theSelected.size() == 0)
-    return;
-
-  QModelIndexList aSelectedIndices = theSelected.indexes();
-  QStringList aPointers = aHistoryModel->GetSelectedPointers(aSelectedIndices.first());
-  selectTreeViewItems (aPointers);
-}
-
 // =======================================================================
 // function : onExportToShapeView
 // purpose :
@@ -636,12 +577,7 @@ void VInspector_Window::onExportToShapeView()
 
   TCollection_AsciiString aPluginName ("TKShapeView");
   NCollection_List<Handle(Standard_Transient)> aParameters;
-  if (myParameters->FindParameters (aPluginName))
-    aParameters = myParameters->Parameters (aPluginName);
-
   NCollection_List<TCollection_AsciiString> anItemNames;
-  if (myParameters->FindSelectedNames (aPluginName))
-    anItemNames = myParameters->GetSelectedNames (aPluginName);
 
   QStringList anExportedPointers;
   if (aSelectedShapes.Extent() > 0)
@@ -661,24 +597,6 @@ void VInspector_Window::onExportToShapeView()
     }
   }
 
-  // search for objects to be exported
-  QList<TreeModel_ItemBasePtr> anItems = TreeModel_ModelBase::SelectedItems (myTreeView->selectionModel()->selectedIndexes());
-  for (QList<TreeModel_ItemBasePtr>::const_iterator anItemIt = anItems.begin(); anItemIt != anItems.end(); ++anItemIt)
-  {
-    TreeModel_ItemBasePtr anItem = *anItemIt;
-    VInspector_ItemBasePtr aVItem = itemDynamicCast<VInspector_ItemBase>(anItem);
-    if (!aVItem)
-    continue;
-
-    const Handle(Standard_Transient)& anObject = aVItem->Object();
-    if (anObject.IsNull())
-      continue;
-
-    aParameters.Append (anObject);
-    anItemNames.Append (anObject->DynamicType()->Name());
-    anExportedPointers.append (Standard_Dump::GetPointerInfo (anObject, true).ToCString());
-  }
-
   if (anExportedPointers.isEmpty())
     return;
 
@@ -698,6 +616,97 @@ void VInspector_Window::onExportToShapeView()
   myParameters->SetParameters (aPluginName, aParameters, myExportToShapeViewDialog->IsAccepted());
 }
 
+// =======================================================================
+// function : onAddLight
+// purpose :
+// =======================================================================
+void VInspector_Window::onAddLight()
+{
+  VInspector_ViewModel* aViewModel = dynamic_cast<VInspector_ViewModel*> (myTreeView->model());
+  if (!aViewModel)
+    return;
+  const Handle(V3d_Viewer) aViewer = aViewModel->GetContext()->CurrentViewer();
+  if (aViewer.IsNull())
+    return;
+
+  QAction* anAction = (QAction*)sender();
+  QString aText = anAction->text();
+
+  Graphic3d_TypeOfLightSource aLightSourceType = Graphic3d_TOLS_AMBIENT;
+
+  if (aText == "Ambient")           { aLightSourceType = Graphic3d_TOLS_AMBIENT; }
+  else if (aText == "Directional")  { aLightSourceType = Graphic3d_TOLS_DIRECTIONAL; }
+  else if (aText == "Positional")   { aLightSourceType = Graphic3d_TOLS_POSITIONAL; }
+  else if (aText == "Spot")         { aLightSourceType = Graphic3d_TOLS_SPOT; }
+  else                              { return; }
+
+  addLight(aLightSourceType, aViewer);
+}
+
+// =======================================================================
+// function : onRemoveLight
+// purpose :
+// =======================================================================
+void VInspector_Window::onRemoveLight()
+{
+  VInspector_ViewModel* aViewModel = dynamic_cast<VInspector_ViewModel*> (myTreeView->model());
+  const Handle(V3d_Viewer) aViewer = aViewModel ? aViewModel->GetContext()->CurrentViewer() : NULL;
+  if (aViewer.IsNull())
+  {
+    return;
+  }
+
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (myTreeView->selectionModel()->selectedIndexes(), 0);
+  VInspector_ItemGraphic3dCLightPtr aLightItem = itemDynamicCast<VInspector_ItemGraphic3dCLight> (
+    TreeModel_ModelBase::GetItemByIndex (anIndex));
+  if (!aLightItem)
+  {
+    return;
+  }
+
+  if (aViewer->ActiveLights().Extent() == 1) // not possible to remove the latest light
+  {
+    return;
+  }
+
+  Handle(Graphic3d_CLight) aLight = aLightItem->GetLight();
+  aViewer->DelLight (aLight);
+  aViewer->UpdateLights();
+
+  aViewer->Invalidate();
+  aViewer->Redraw();
+  UpdateTreeModel();
+}
+
+// =======================================================================
+// function : onOnOffLight
+// purpose :
+// =======================================================================
+void VInspector_Window::onOnOffLight()
+{
+  VInspector_ViewModel* aViewModel = dynamic_cast<VInspector_ViewModel*> (myTreeView->model());
+  const Handle(V3d_Viewer) aViewer = aViewModel ? aViewModel->GetContext()->CurrentViewer() : NULL;
+  if (aViewer.IsNull())
+  {
+    return;
+  }
+
+  QModelIndex anIndex = TreeModel_ModelBase::SingleSelected (myTreeView->selectionModel()->selectedIndexes(), 0);
+
+  VInspector_ItemGraphic3dCLightPtr anItemLight = itemDynamicCast<VInspector_ItemGraphic3dCLight> (
+    TreeModel_ModelBase::GetItemByIndex (anIndex));
+  if (anItemLight->GetLight().IsNull())
+    return;
+
+  bool isOn = anItemLight->GetLight()->IsEnabled();
+  anItemLight->GetLight()->SetEnabled (!isOn);
+
+  aViewer->UpdateLights();
+  aViewer->Invalidate();
+  aViewer->Redraw();
+  UpdateTreeModel();
+}
+
 // =======================================================================
 // function : onDisplayActionTypeClicked
 // purpose :
@@ -760,23 +769,6 @@ void VInspector_Window::onCollapseAll()
   }
 }
 
-// =======================================================================
-// function : UpdateTreeModel
-// purpose :
-// =======================================================================
-void VInspector_Window::OnTestAddChild()
-{
-  Handle(AIS_Shape) aPresentation = new AIS_Shape (BRepBuilderAPI_MakeVertex (gp_Pnt()));
-
-  aPresentation->AddChild (new AIS_Shape (BRepBuilderAPI_MakeVertex (gp_Pnt (10., 10., 10.))));
-  aPresentation->AddChild (new AIS_Shape (BRepBuilderAPI_MakeVertex (gp_Pnt(20., 10., 10.))));
-  aPresentation->AddChild (new AIS_Shape (BRepBuilderAPI_MakeVertex (gp_Pnt(30., 10., 10.))));
-
-  displayer()->DisplayPresentation (aPresentation);
-
-  UpdateTreeModel();
-}
-
 // =======================================================================
 // function : UpdateTreeModel
 // purpose :
@@ -912,3 +904,32 @@ View_Displayer* VInspector_Window::displayer()
 
   return myDisplayer;
 }
+
+// =======================================================================
+// function : addLight
+// purpose :
+// =======================================================================
+void VInspector_Window::addLight (const Graphic3d_TypeOfLightSource& theSourceLight,
+                                  const Handle(V3d_Viewer)& theViewer)
+{
+  Standard_Boolean aNeedDirection = theSourceLight == Graphic3d_TOLS_DIRECTIONAL ||
+                                    theSourceLight == Graphic3d_TOLS_SPOT;
+
+  Handle(Graphic3d_CLight) aLight = new Graphic3d_CLight (theSourceLight);
+  if (aNeedDirection)
+  {
+    aLight->SetDirection (gp::DZ());
+  }
+  if (theSourceLight == Graphic3d_TOLS_SPOT)
+  {
+    aLight->SetAngle ((Standard_ShortReal)M_PI - ShortRealEpsilon());
+    aLight->SetPosition (gp_Pnt (-100, -100, -100));
+  }
+
+  theViewer->AddLight (aLight);
+  theViewer->SetLightOn (aLight);
+
+  theViewer->Invalidate();
+  theViewer->Redraw();
+  UpdateTreeModel();
+}
index 3c986eed5041ff8ff4bf62d02bd611dd2d122d26..8077b46fba1f678265b4ab4a144f8ed2cb357181 100644 (file)
@@ -21,7 +21,6 @@
 #include <SelectMgr_EntityOwner.hxx>
 
 #include <inspector/TInspectorAPI_PluginParameters.hxx>
-#include <inspector/VInspector_CallBack.hxx>
 #include <inspector/View_DisplayActionType.hxx>
 
 #include <Standard_WarningsDisable.hxx>
@@ -119,12 +118,6 @@ private slots:
   //! \param isToggled true if the property dock widget is shown
   void onPropertyPanelShown (bool isToggled);
 
-  //! Synchronization selection between history and tree view. Selection by history view
-  //! \param theSelected a selected items
-  //! \param theDeselected a deselected items
-  void onHistoryViewSelectionChanged (const QItemSelection& theSelected,
-                                      const QItemSelection& theDeselected);
-
   //! Processes selection in tree view: make presentation or owner selected in the context if corresponding
   //! check box is checked
   //! \param theSelected a selected items
@@ -134,6 +127,15 @@ private slots:
   //! Exports the first selected shape into ShapeViewer plugin.
   void onExportToShapeView();
 
+  //! Appends lights into the active V3d view
+  void onAddLight();
+
+  //! Removes selected light from the active V3d view
+  void onRemoveLight();
+
+  //! Switch On/Off for selected light
+  void onOnOffLight();
+
   //! Apply activated display action
   void onDisplayActionTypeClicked();
 
@@ -146,9 +148,6 @@ private slots:
   //! Collapse all levels for all selected items
   void onCollapseAll();
 
-  //! Creates a tree of inherited presentable objects
-  void OnTestAddChild();
-
 private:
 
   //! Inits the window content by the given context
@@ -179,6 +178,11 @@ private:
   //! \return a context of created view.
   Handle(AIS_InteractiveContext) createView();
 
+  //! Creates a new default light into V3d viewer
+  //! \param theSourceLight type of light source
+  //! \param theViewer viewer to add the created light
+  void addLight (const Graphic3d_TypeOfLightSource& theSourceLight, const Handle(V3d_Viewer)& theViewer);
+
 private:
 
   QWidget* myParent; //!< widget, comes when Init window, the window control lays in the layout, updates window title
@@ -190,8 +194,6 @@ private:
   ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist
 
   QTreeView* myTreeView; //!< tree view of AIS content
-  QTreeView* myHistoryView; //!< history of AIS context calls
-  Handle(VInspector_CallBack) myCallBack; //!< AIS context call back, if set
 
   ViewControl_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin
   View_Window* myViewWindow; //!< temporary view window, it is created if Open is called but context is still NULL
index e129416f33ba0e9c1845de546d8985c5f3b1e57e..75687c691de0476e9fa2dc5e72325b8edf5576cb 100644 (file)
@@ -116,7 +116,9 @@ void View_DisplayPreview::UpdatePreview (const View_DisplayActionType,
     Handle(AIS_InteractiveObject) aPrs = Handle(AIS_InteractiveObject)::DownCast (anIterator.Value());
     if (!aPrs.IsNull() && aPrs->GetContext().IsNull()/*is not displayed in another context*/)
     {
-      myContext->Display (aPrs, aPreviewDisplayMode, -1/*does not participate in selection*/, Standard_True);
+      myContext->Display (aPrs, aPreviewDisplayMode,
+                          View_DisplayPreview::PreviewSelectionMode()/*participate only in custom selection*/,
+                          Standard_True);
       enableGlobalClipping(aPrs, false);
       myPreviewReadyPresentations.Append (aPrs);
     }
@@ -125,11 +127,15 @@ void View_DisplayPreview::UpdatePreview (const View_DisplayActionType,
   if (myPreviewPresentation.IsNull())
   {
     myPreviewPresentation = new AIS_Shape (aCompound);
+    myPreviewPresentation->Attributes()->SetAutoTriangulation (Standard_False);
+
     Quantity_Color aColor(Quantity_NOC_TOMATO);
     myPreviewPresentation->Attributes()->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_O_PLUS, aColor, 3.0));
     myPreviewPresentation->SetAttributes (myPreviewParameters->GetDrawer());
 
-    myContext->Display (myPreviewPresentation, aPreviewDisplayMode, -1/*does not participate in selection*/, Standard_True);
+    myContext->Display (myPreviewPresentation, aPreviewDisplayMode,
+                        View_DisplayPreview::PreviewSelectionMode()/*participate only in custom selection*/,
+                        Standard_True);
     enableGlobalClipping(myPreviewPresentation, false);
   }
   else
index 15cc67b611cf538fe3655f299a6e16699ce28daf..f8eaef2c3d7597f02f9ce13c60babfd36866b90d 100644 (file)
@@ -58,6 +58,9 @@ public:
   //! Returns true if preview presentation is shown
   Standard_Boolean HasPreview() const { return !myPreviewPresentation.IsNull(); }
 
+  //! Custom preview selection mode
+  static Standard_Integer PreviewSelectionMode() { return 100; }
+
 private:
 
   //! Returns the current context
index 82592275d70709aeb867e80ee3efa373c6e2061a..7028cf5274b589139a36e1e929f5f10ae5c78898 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <inspector/View_DisplayPreview.hxx>
 #include <inspector/View_Viewer.hxx>
-#include <inspector/View_Widget.hxx>
 
 // =======================================================================
 // function : Constructor
@@ -116,7 +115,7 @@ void View_Displayer::DisplayPresentation (const Handle(Standard_Transient)& theP
     aDisplayed.Append (aPresentation);
   }
 
-  if (!myIsKeepPresentations || myFitAllActive)
+  if (myFitAllActive)
     fitAllView();
 
   myDisplayed.Bind (theType, aDisplayed);
@@ -292,7 +291,7 @@ void View_Displayer::UpdatePreview (const View_DisplayActionType theType,
                                     const NCollection_List<Handle(Standard_Transient)>& thePresentations)
 {
   myDisplayPreview->UpdatePreview (theType, thePresentations);
-  if (!myIsKeepPresentations || myFitAllActive)
+  if (myFitAllActive)
     fitAllView();
 }
 
@@ -377,7 +376,10 @@ Handle(AIS_InteractiveObject) View_Displayer::FindPresentation (const TopoDS_Sha
 // =======================================================================
 Handle(Standard_Transient) View_Displayer::CreatePresentation (const TopoDS_Shape& theShape)
 {
-  return new AIS_Shape (theShape);
+  Handle(AIS_Shape) aPresentation = new AIS_Shape (theShape);
+  aPresentation->Attributes()->SetAutoTriangulation (Standard_False);
+
+  return aPresentation;
 }
 
 // =======================================================================
index 44e296838443eb89b010f6cffc85b4043e15ea52..43daa474d5c143b2eee15b8a7be0471ca017d46b 100644 (file)
@@ -16,6 +16,7 @@
 #include <inspector/View_PreviewParameters.hxx>
 
 #include <Prs3d_Drawer.hxx>
+#include <Prs3d_LineAspect.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <Prs3d_ShadingAspect.hxx>
 
 // function : Constructor
 // purpose :
 // =======================================================================
-View_PreviewParameters::View_PreviewParameters()
+View_PreviewParameters::View_PreviewParameters (const Standard_Boolean theToTransparent)
 {
   myDrawer = new Prs3d_Drawer();
 
   Quantity_Color aColor(Quantity_NOC_TOMATO);
-  Standard_ShortReal aTransparency = 0.8f;
 
   // point parameters
   myDrawer->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_O_PLUS, aColor, 3.0));
@@ -42,10 +42,16 @@ View_PreviewParameters::View_PreviewParameters()
   myDrawer->ShadingAspect()->SetColor (aColor);
   myDrawer->ShadingAspect()->SetMaterial (aShadingMaterial);
 
-  myDrawer->ShadingAspect()->Aspect()->ChangeFrontMaterial().SetTransparency (aTransparency);
-  myDrawer->ShadingAspect()->Aspect()->ChangeBackMaterial() .SetTransparency (aTransparency);
-  myDrawer->SetTransparency (aTransparency);
+  myDrawer->SetLineAspect (new Prs3d_LineAspect (aColor, Aspect_TOL_SOLID, 1.));
 
+  if (theToTransparent)
+  {
+    Standard_ShortReal aTransparency = 0.8f;
+
+    myDrawer->ShadingAspect()->Aspect()->ChangeFrontMaterial().SetTransparency (aTransparency);
+    myDrawer->ShadingAspect()->Aspect()->ChangeBackMaterial() .SetTransparency (aTransparency);
+    myDrawer->SetTransparency (aTransparency);
+  }
   // common parameters
   myDrawer->SetZLayer (Graphic3d_ZLayerId_Topmost);
 }
index c330028021f353d5f08465a6b24fe23d417597fa..e2f41d6f614ed3c9e76fd957fce17d4c6ce1518c 100644 (file)
@@ -33,7 +33,7 @@ class View_PreviewParameters
 public:
 
   //! Constructor
-  Standard_EXPORT View_PreviewParameters ();
+  Standard_EXPORT View_PreviewParameters (const Standard_Boolean theToTransparent = Standard_True);
 
   //! Destructor
   virtual ~View_PreviewParameters() {}
index d21b45bb1ad7b122a4f537139f8e12e4abf2f318..7549493bb3cc65c9439c9e4643bd389bc43c6e29 100644 (file)
@@ -22,7 +22,7 @@
 #include <QWidget>
 #include <Standard_WarningsRestore.hxx>
 
-//! \class View_Widget
+//! \class View_ToolButton
 //! \brief It is a Qt control that implements change checked state for button by double click event
 //! Button becomes checked by double click mouse pressed and unchecked by the next press mouse
 class View_ToolButton : public QToolButton
index a8fd07c5633f825db6fe91ad63a93ff939508bde..6954e566545db9566d93b09c655821751fd96cd1 100644 (file)
@@ -306,6 +306,11 @@ void View_Widget::mouseReleaseEvent (QMouseEvent* theEvent)
 // =======================================================================
 void View_Widget::mouseMoveEvent (QMouseEvent* theEvent)
 {
+  if (myViewer->GetView().IsNull())
+  {
+    return;
+  }
+
   myController->UpdateMousePosition (Graphic3d_Vec2i (theEvent->x(), theEvent->y()),
                                      keyMouse (theEvent->button()),
                                      keyFlag (theEvent->modifiers()), Standard_False);
index 9fda7a71be65a026c13b8b0e5f8964df7ed89b31..337fbc5ee3feb4db3d3052cab1b76f1ba71efe35 100644 (file)
@@ -1,3 +1,5 @@
+ViewControl_ColorSelector.cxx
+ViewControl_ColorSelector.hxx
 ViewControl_EditType.hxx
 ViewControl_MessageDialog.cxx
 ViewControl_MessageDialog.hxx
@@ -5,6 +7,8 @@ ViewControl_PropertyView.cxx
 ViewControl_PropertyView.hxx
 ViewControl_Table.cxx
 ViewControl_Table.hxx
+ViewControl_TableItemDelegate.cxx
+ViewControl_TableItemDelegate.hxx
 ViewControl_TableModel.cxx
 ViewControl_TableModel.hxx
 ViewControl_TableModelValues.cxx
diff --git a/tools/ViewControl/ViewControl_ColorSelector.cxx b/tools/ViewControl/ViewControl_ColorSelector.cxx
new file mode 100644 (file)
index 0000000..67fff81
--- /dev/null
@@ -0,0 +1,518 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/ViewControl_ColorSelector.hxx>
+#include <inspector/ViewControl_TableItemDelegate.hxx>
+#include <inspector/ViewControl_TableModel.hxx>
+#include <inspector/ViewControl_TableModelValues.hxx>
+#include <inspector/ViewControl_Tools.hxx>
+#include <inspector/TreeModel_Tools.hxx>
+
+#include <Standard_Dump.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QAbstractTableModel>
+#include <QDialogButtonBox>
+#include <QHeaderView>
+#include <QGridLayout>
+#include <QItemSelectionModel>
+#include <QPainter>
+#include <QPushButton>
+#include <QTableView>
+#include <QWidget>
+#include <Standard_WarningsRestore.hxx>
+
+//! Kinds of delegate cell in OCCT Color model to present a custom presentation (rect bounded by a colored frame)
+enum ViewControl_ColorDelegateKind
+{
+  ViewControl_ColorDelegateKind_None, //!< usual item
+  ViewControl_ColorDelegateKind_Activated, //!< active item
+  ViewControl_ColorDelegateKind_Highlighted, //!< highlighted item
+  ViewControl_ColorDelegateKind_Selected //!< selected item
+};
+
+//! Model for a table of parameters: Current Color, Red, Green, Blue, Alpha, OCCT color name
+class ViewControl_ParametersModel : public ViewControl_TableModelValues
+{
+public:
+  ViewControl_ParametersModel (ViewControl_ColorSelector* theSelector)
+    : ViewControl_TableModelValues(), mySelector (theSelector) {}
+  virtual ~ViewControl_ParametersModel() {}
+
+  //! Inits model by the parameter color
+  //! \param theColor model active color
+  void SetColor (const Quantity_ColorRGBA& theColor, ViewControl_TableModel* theModel)
+  { myColor = theColor; theModel->EmitLayoutChanged(); }
+
+  //! Returns current selected color
+  //! \return color value
+  Quantity_ColorRGBA GetColor() const { return myColor; }
+
+  //! Returns item information(short) for display role.
+  //! \param theIndex a model index
+  //! \param theRole a view role
+  //! \return value intepreted depending on the given role
+  Standard_EXPORT virtual QVariant Data (const int theRow, const int theColumn,
+                                         int theRole = Qt::DisplayRole) const Standard_OVERRIDE
+  {
+    //(void)theRow; (void)theColumn; (void) theRole;
+    if (theRole == Qt::BackgroundRole && theColumn == 1 && theRow == 0)
+      return ViewControl_ColorSelector::ColorToQColor (myColor);
+
+    if (theRole == Qt::ForegroundRole && theColumn == 1 && theRow >= 2 && theRow <= 5)
+      return ViewControl_TableModelValues::EditCellColor();
+
+    if (theRole != Qt::DisplayRole)
+    return QVariant();
+
+    bool isFirstColumn = theColumn == 0;
+    switch (theRow)
+    {
+      case 0: return isFirstColumn ? QVariant ("Color") : QVariant ();
+      case 1:
+      {
+        if (isFirstColumn)
+          return QVariant ("Name");
+        Quantity_NameOfColor aColorName;
+        if (ViewControl_ColorSelector::IsExactColorName(myColor, aColorName))
+          return Quantity_Color::StringName(aColorName);
+      }
+      break;
+      case 2: return isFirstColumn ? QVariant ("Red") : ViewControl_Tools::ToVariant (myColor.GetRGB().Red());
+      case 3: return isFirstColumn ? QVariant ("Green") : ViewControl_Tools::ToVariant (myColor.GetRGB().Green());
+      case 4: return isFirstColumn ? QVariant ("Blue") : ViewControl_Tools::ToVariant (myColor.GetRGB().Blue());
+      case 5: return isFirstColumn ? QVariant ("Alpha") : ViewControl_Tools::ToVariant (myColor.Alpha());
+      case 6: return isFirstColumn ? QVariant ("Near Name") 
+                                   : Quantity_Color::StringName(myColor.GetRGB().Name());
+    }
+    return QVariant();
+  }
+
+  //! Sets content of the model index for the given role, it is applyed to internal container of values
+  //! \param theRow a model index row
+  //! \param theColumn a model index column
+  //! \param theRole a view role
+  //! \return true if the value is changed
+  virtual bool SetData (const int theRow, const int theColumn, const QVariant& theValue, int)
+  {
+    if (theColumn != 1 || theRow < 2 || theRow > 5)
+      return false;
+
+    switch (theRow)
+    {
+      case 2:
+      case 3:
+      case 4:
+      {
+        myColor.ChangeRGB().SetValues (theRow == 2 ? ViewControl_Tools::ToShortRealValue (theValue) : myColor.GetRGB().Red(),
+                                       theRow == 3 ? ViewControl_Tools::ToShortRealValue (theValue) : myColor.GetRGB().Green(),
+                                       theRow == 4 ? ViewControl_Tools::ToShortRealValue (theValue) : myColor.GetRGB().Blue(),
+                                       Quantity_TOC_RGB);
+      }
+      break;
+      case 5: myColor.SetAlpha (ViewControl_Tools::ToShortRealValue (theValue)); break;
+    }
+    mySelector->ParameterColorChanged();
+    return true;
+  }
+
+  //! Returns number of tree level line items = colums in table view
+  virtual int ColumnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return 2; }
+
+  //! Returns onlly one row in table view
+  virtual int RowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return 7; }
+
+  //! Returns editable flag for color RGB and alpha rows
+  //! \return flags
+  Qt::ItemFlags Flags (const QModelIndex& theIndex) const
+  {
+    Qt::ItemFlags aFlags = ViewControl_TableModelValues::Flags (theIndex);
+
+    if (theIndex.column() == 1 && theIndex.row() >= 2 && theIndex.row() <= 5)
+      aFlags = aFlags | Qt::ItemIsEditable;
+
+    return aFlags;
+  }
+
+  //! Returns type of edit control for the model index. By default, it is an empty control
+  //! \param theRow a model index row
+  //! \param theColumn a model index column
+  //! \return edit type
+  virtual ViewControl_EditType GetEditType (const int theRow, const int theColumn) const
+  {
+    if (theColumn == 1 && theRow >= 2 && theRow <= 5)
+      return ViewControl_EditType_Double;
+
+    return ViewControl_EditType_None;
+  }
+
+private:
+  Quantity_ColorRGBA myColor;
+  ViewControl_ColorSelector* mySelector;
+};
+
+//! Table of parameters: Red, Green, Blue, Alpha, OCCT color name
+class ViewControl_OCCTColorModel : public QAbstractTableModel
+{
+public:
+  ViewControl_OCCTColorModel (QObject* theParent)
+    : QAbstractTableModel (theParent), myCurrentIndexKind (ViewControl_ColorDelegateKind_None) {}
+  virtual ~ViewControl_OCCTColorModel() {}
+
+  //! Sets current color, that should have custom presented
+  //! \param theColor current color
+  //! \param theKind presentation kind
+  void SetColor (const Quantity_NameOfColor& theColor, const ViewControl_ColorDelegateKind theKind)
+  {
+    int aColorPosition = (int)theColor;
+    int aRow = (int) (aColorPosition / columnCount());
+    int aColumn = aColorPosition - aRow * columnCount();
+    myCurrentIndex = index (aRow, aColumn);
+    myCurrentIndexKind = theKind;
+
+    emit layoutChanged();
+  }
+
+  //! Returns OCCT name of color if index position does not exceed Quantity_NameOfColor elements
+  //! \param theIndex model index
+  //! \param theNameOfColor [out] OCCT color name
+  //! \return true if the color is found
+  bool GetOCCTColor (const QModelIndex& theIndex, Quantity_NameOfColor& theNameOfColor) const
+  {
+    int aNameOfColorId = theIndex.row() * columnCount() + theIndex.column();
+    if (aNameOfColorId > Quantity_NOC_WHITE)
+      return false;
+    theNameOfColor = (Quantity_NameOfColor)aNameOfColorId;
+    return true;
+  }
+
+  //! Returns index that has custom presentation
+  //! \return model index
+  QModelIndex GetCurrentIndex() const { return myCurrentIndex; }
+
+  //! Returns index color kind that has custom presentation
+  //! \return kind
+  ViewControl_ColorDelegateKind GetCurrentIndexKind() const { return myCurrentIndexKind; }
+
+  //! Returns item information(short) for display role.
+  //! \param theIndex a model index
+  //! \param theRole a view role
+  //! \return value intepreted depending on the given role
+  Standard_EXPORT virtual QVariant data (const QModelIndex& theIndex,
+                                         int theRole = Qt::DisplayRole) const Standard_OVERRIDE
+  {
+    if (theRole != Qt::ToolTipRole) // background is processed in table item delegate
+      return QVariant();
+
+    Quantity_NameOfColor aNameOfColor;
+    if (!GetOCCTColor (theIndex, aNameOfColor))
+      return QVariant();
+
+    if (theRole == Qt::ToolTipRole)
+      return QString("%1").arg (ViewControl_ColorSelector::ColorToString (Quantity_Color (aNameOfColor)));
+    return QVariant();
+  }
+
+  //! Returns number of tree level line items = colums in table view
+  virtual int columnCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return 26; }
+
+  //! Returns onlly one row in table view
+  virtual int rowCount (const QModelIndex& theParent = QModelIndex()) const Standard_OVERRIDE
+  { (void)theParent; return 20; }
+
+  //! Returns color for the delegate kind
+  //! \param theKind kind
+  //! \return color
+  static QColor GetKindColor (const ViewControl_ColorDelegateKind theKind)
+  {
+    switch (theKind)
+    {
+      case ViewControl_ColorDelegateKind_Activated:
+      case ViewControl_ColorDelegateKind_Highlighted: return Qt::blue;
+      case ViewControl_ColorDelegateKind_Selected: return Qt::black;
+      default: break;
+    }
+    return QColor();
+  }
+
+private:
+  QModelIndex myCurrentIndex; //!< index to be presented through item delegate
+  ViewControl_ColorDelegateKind myCurrentIndexKind; //!< kind of custom item
+};
+
+//! \class DFBrowser_HighlightDelegate
+//! \brief An item delegate to paint in highlight color the cell when the mouse cursor is over it
+class ViewControl_OCCTColorDelegate : public QItemDelegate
+{
+public:
+
+  //! Constructor
+  ViewControl_OCCTColorDelegate (QObject* theParent = 0) : QItemDelegate (theParent) {}
+
+  //! Destructor
+  virtual ~ViewControl_OCCTColorDelegate() Standard_OVERRIDE {}
+
+  //! Redefine of the parent virtual method to color the cell rectangle in highlight style
+  //! \param thePainter a painter
+  //! \param theOption a paint options
+  //! \param theIndex a view index
+  virtual void paint (QPainter* thePainter, const QStyleOptionViewItem& theOption,
+                      const QModelIndex& theIndex) const Standard_OVERRIDE
+  {
+    QRect aBaseRect = theOption.rect;
+    int aNameOfColorId = theIndex.row() * theIndex.model()->columnCount(theIndex) + theIndex.column();
+    Quantity_NameOfColor aNameOfColor = Quantity_NOC_WHITE;
+    if (aNameOfColorId < (int)Quantity_NOC_WHITE)
+      aNameOfColor = (Quantity_NameOfColor)aNameOfColorId;
+
+    Quantity_Color anOCCTColor (aNameOfColor);
+    QColor aQColor = ViewControl_ColorSelector::ColorToQColor (Quantity_ColorRGBA (anOCCTColor));
+    thePainter->fillRect (aBaseRect, aQColor);
+
+    QColor aColor;
+    // highlight cell
+    if (theOption.state & QStyle::State_MouseOver)
+      aColor = ViewControl_OCCTColorModel::GetKindColor (ViewControl_ColorDelegateKind_Highlighted);
+    else
+    {
+      const ViewControl_OCCTColorModel* aTableModel = dynamic_cast<const ViewControl_OCCTColorModel*> (theIndex.model());
+      QModelIndex anIndex = aTableModel->GetCurrentIndex();
+      if (anIndex.isValid() && anIndex.row() == theIndex.row() && anIndex.column() == theIndex.column())
+        aColor = ViewControl_OCCTColorModel::GetKindColor (aTableModel->GetCurrentIndexKind());
+    }
+    
+    if (aColor.isValid())
+    {
+      int aRectSize = 2;
+      thePainter->fillRect (QRect (aBaseRect.topLeft(), QPoint (aBaseRect.bottomLeft().x() + aRectSize, aBaseRect.bottomLeft().y())),
+                            aColor);
+      thePainter->fillRect (QRect (QPoint (aBaseRect.topRight().x() - aRectSize, aBaseRect.topRight().y()), aBaseRect.bottomRight()),
+                            aColor);
+      thePainter->fillRect (QRect (QPoint (aBaseRect.topLeft().x() + aRectSize, aBaseRect.topLeft().y()),
+                                   QPoint (aBaseRect.topRight().x() - aRectSize, aBaseRect.topRight().y() + aRectSize)),
+                            aColor);
+      thePainter->fillRect (QRect (QPoint (aBaseRect.bottomLeft().x() + aRectSize, aBaseRect.bottomLeft().y() - aRectSize),
+                                   QPoint (aBaseRect.bottomRight().x() - aRectSize, aBaseRect.bottomRight().y())),
+                            aColor);
+    }
+  }
+};
+
+//! Color picker class
+class ViewControl_ColorPicker : public QWidget
+{
+public:
+  ViewControl_ColorPicker (QWidget* theParent) : QWidget (theParent) {}
+  virtual ~ViewControl_ColorPicker() {}
+};
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+ViewControl_ColorSelector::ViewControl_ColorSelector (QWidget* theParent)
+: QDialog (theParent)
+{
+  QGridLayout* aLayout = new QGridLayout (this);
+  aLayout->setContentsMargins (0, 0, 0, 0);
+
+  myParameters = new QTableView (this);
+  ViewControl_TableModel* aTableModel = new ViewControl_TableModel (myParameters);
+  aTableModel->SetModelValues (new ViewControl_ParametersModel (this));
+  myParameters->setModel(aTableModel);
+
+  ViewControl_TableItemDelegate* anItemDelegate = new ViewControl_TableItemDelegate();
+  anItemDelegate->SetModelValues (aTableModel->ModelValues());
+  myParameters->setItemDelegate(anItemDelegate);
+
+  myParameters->verticalHeader()->setDefaultSectionSize (myParameters->verticalHeader()->minimumSectionSize());
+  myParameters->verticalHeader()->setVisible (false);
+  myParameters->horizontalHeader()->setVisible (false);
+  myParameters->setMinimumHeight (myParameters->verticalHeader()->minimumSectionSize() * aTableModel->rowCount() +
+                                  TreeModel_Tools::HeaderSectionMargin());
+
+  QItemSelectionModel* aSelectionModel = new QItemSelectionModel (myParameters->model());
+  myParameters->setSelectionMode (QAbstractItemView::SingleSelection);
+  myParameters->setSelectionModel (aSelectionModel);
+
+  aLayout->addWidget (myParameters, 0, 0);
+
+  myColorPicker = new ViewControl_ColorPicker (this);
+  aLayout->addWidget (myColorPicker, 0, 1);
+
+  myOCCTColors = new QTableView (this);
+  myOCCTColors->setFixedSize (525, 405);
+  myOCCTColors->verticalHeader()->setDefaultSectionSize (20);
+  myOCCTColors->verticalHeader()->setVisible (false);
+  myOCCTColors->horizontalHeader()->setDefaultSectionSize (20);
+  myOCCTColors->horizontalHeader()->setVisible (false);
+  myOCCTColors->setModel(new ViewControl_OCCTColorModel(myOCCTColors));
+
+  myOCCTColors->viewport()->setAttribute (Qt::WA_Hover);
+  myOCCTColors->setItemDelegate (new ViewControl_OCCTColorDelegate (myOCCTColors));
+
+  aSelectionModel = new QItemSelectionModel (myOCCTColors->model());
+  myOCCTColors->setSelectionMode (QAbstractItemView::SingleSelection);
+  myOCCTColors->setSelectionModel (aSelectionModel);
+  connect (aSelectionModel, SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)),
+          this, SLOT (onOCCTColorsTableSelectionChanged (const QItemSelection&, const QItemSelection&)));
+  aLayout->addWidget (myOCCTColors, 1, 0, 1, 2);
+
+  QWidget* aBtnWidget = new QWidget (this);
+  aLayout->addWidget (aBtnWidget, 2, 0, 1, 2);
+
+  QHBoxLayout* aBtnLayout = new QHBoxLayout (aBtnWidget);
+  myOkButton = new QPushButton ("Ok", aBtnWidget);
+  myCancelButton = new QPushButton ("Cancel", aBtnWidget);
+  connect (myOkButton, SIGNAL (clicked()), this, SLOT (accept()));
+  connect (myCancelButton, SIGNAL (clicked()), this, SLOT (reject()));
+  aBtnLayout->addStretch ();
+  aBtnLayout->addWidget (myOkButton);
+  aBtnLayout->addWidget (myCancelButton);
+}
+
+// =======================================================================
+// function : SetStreamValue
+// purpose :
+// =======================================================================
+void ViewControl_ColorSelector::SetStreamValue (const QString& theValue)
+{
+  Quantity_ColorRGBA aColor = StringToColorRGBA (theValue);
+  // parameters model
+  ViewControl_TableModel* aTableModel = dynamic_cast<ViewControl_TableModel*> (myParameters->model());
+  ViewControl_ParametersModel* aParametersModel = dynamic_cast<ViewControl_ParametersModel*> (aTableModel->ModelValues());
+  aParametersModel->SetColor (aColor, aTableModel);
+
+  // OCCT color model
+  Quantity_NameOfColor aColorName;
+  bool isExactColorName = ViewControl_ColorSelector::IsExactColorName(aColor, aColorName);
+  ViewControl_OCCTColorModel* anOCCTColorModel = dynamic_cast<ViewControl_OCCTColorModel*>(myOCCTColors->model());
+  anOCCTColorModel->SetColor (aColorName, isExactColorName ? ViewControl_ColorDelegateKind_Selected
+                                                           : ViewControl_ColorDelegateKind_Activated);
+}
+
+// =======================================================================
+// function : GetStreamValue
+// purpose :
+// =======================================================================
+QString ViewControl_ColorSelector::GetStreamValue() const
+{
+  ViewControl_TableModel* aTableModel = dynamic_cast<ViewControl_TableModel*> (myParameters->model());
+  ViewControl_ParametersModel* aParametersModel = dynamic_cast<ViewControl_ParametersModel*> (aTableModel->ModelValues());
+
+  Quantity_ColorRGBA aColor = aParametersModel->GetColor();
+
+  Standard_SStream aStream;
+  aColor.DumpJson (aStream);
+
+  return Standard_Dump::Text (aStream).ToCString();
+}
+
+// =======================================================================
+// function : ParameterColorChanged
+// purpose :
+// =======================================================================
+void ViewControl_ColorSelector::ParameterColorChanged()
+{
+  ViewControl_TableModel* aTableModel = dynamic_cast<ViewControl_TableModel*> (myParameters->model());
+  ViewControl_ParametersModel* aParametersModel = dynamic_cast<ViewControl_ParametersModel*> (aTableModel->ModelValues());
+  Quantity_ColorRGBA aColor = aParametersModel->GetColor();
+
+  // OCCT color model
+  Quantity_NameOfColor aColorName;
+  bool isExactColorName = ViewControl_ColorSelector::IsExactColorName(aColor, aColorName);
+  ViewControl_OCCTColorModel* anOCCTColorModel = dynamic_cast<ViewControl_OCCTColorModel*>(myOCCTColors->model());
+  anOCCTColorModel->SetColor (aColorName, isExactColorName ? ViewControl_ColorDelegateKind_Selected
+                                                           : ViewControl_ColorDelegateKind_Activated);
+}
+
+// =======================================================================
+// function : ColorToString
+// purpose :
+// =======================================================================
+QString ViewControl_ColorSelector::ColorToString (const Quantity_Color& theColor)
+{
+  Standard_Real aRed, aGreen, aBlue;
+  theColor.Values (aRed, aGreen, aBlue, Quantity_TOC_RGB);
+  return QString::number (aRed) + ViewControl_ColorSelector::ColorSeparator() +
+         QString::number (aGreen) + ViewControl_ColorSelector::ColorSeparator() +
+         QString::number (aBlue);
+}
+
+// =======================================================================
+// function : ColorToQColor
+// purpose :
+// =======================================================================
+QColor ViewControl_ColorSelector::ColorToQColor (const Quantity_ColorRGBA& theColor)
+{
+  int aDelta = 255;
+
+  Standard_Real aRed, aGreen, aBlue;
+  theColor.GetRGB().Values (aRed, aGreen, aBlue, Quantity_TOC_RGB);
+
+  return QColor((int)(aRed * aDelta), (int)(aGreen * aDelta), (int)(aBlue * aDelta));
+}
+
+// =======================================================================
+// function : StringToColorRGBA
+// purpose :
+// =======================================================================
+Quantity_ColorRGBA ViewControl_ColorSelector::StringToColorRGBA (const QString& theColor)
+{
+  Quantity_ColorRGBA aColorRGBA;
+  Standard_SStream aStream;
+  aStream << theColor.toStdString();
+  int aStreamPos = 1;
+  aColorRGBA.InitFromJson (aStream, aStreamPos);
+  return aColorRGBA;
+}
+
+// =======================================================================
+// function : IsExactColorName
+// purpose :
+// =======================================================================
+Standard_Boolean ViewControl_ColorSelector::IsExactColorName (const Quantity_ColorRGBA& theColor,
+                                                              Quantity_NameOfColor& theColorName)
+{
+  theColorName = theColor.GetRGB().Name();
+  return Quantity_Color (theColorName).IsEqual (theColor.GetRGB());
+}
+
+// =======================================================================
+// function : onOCCTColorsTableSelectionChanged
+// purpose :
+// =======================================================================
+void ViewControl_ColorSelector::onOCCTColorsTableSelectionChanged (const QItemSelection& theSelected, const QItemSelection&)
+{
+  QModelIndexList aSelectedIndices = theSelected.indexes();
+  if (aSelectedIndices.size() != 1)
+    return;
+
+  ViewControl_OCCTColorModel* anOCCTColorModel = dynamic_cast<ViewControl_OCCTColorModel*>(myOCCTColors->model());
+  Quantity_NameOfColor aNameOfColor;
+  if (!anOCCTColorModel->GetOCCTColor (aSelectedIndices.first(), aNameOfColor))
+    return;
+
+  anOCCTColorModel->SetColor (aNameOfColor, ViewControl_ColorDelegateKind_Selected);
+
+  // parameters model
+  ViewControl_TableModel* aTableModel = dynamic_cast<ViewControl_TableModel*> (myParameters->model());
+  ViewControl_ParametersModel* aParametersModel = dynamic_cast<ViewControl_ParametersModel*> (aTableModel->ModelValues());
+  Quantity_Color anOCCTColor (aNameOfColor);
+  aParametersModel->SetColor (Quantity_ColorRGBA (anOCCTColor), aTableModel);
+}
diff --git a/tools/ViewControl/ViewControl_ColorSelector.hxx b/tools/ViewControl/ViewControl_ColorSelector.hxx
new file mode 100644 (file)
index 0000000..6836156
--- /dev/null
@@ -0,0 +1,93 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef ViewControl_ColorSelector_H
+#define ViewControl_ColorSelector_H
+
+#include <Quantity_ColorRGBA.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QColor>
+#include <QDialog>
+#include <QItemSelection>
+#include <QString>
+#include <QWidget>
+#include <Standard_WarningsRestore.hxx>
+
+class ViewControl_ColorPicker;
+class QPushButton;
+class QTableView;
+
+//! \class ViewControl_ColorSelector
+//! \brief Selector of OCCT color
+class ViewControl_ColorSelector : public QDialog
+{
+  Q_OBJECT
+public:
+
+  //! Constructor
+  ViewControl_ColorSelector (QWidget* theParent);
+
+  //! Destructor
+  virtual ~ViewControl_ColorSelector() Standard_OVERRIDE {}
+
+  //! Inits control by the color value
+  //! \param theColor text color value
+  void SetStreamValue (const QString& theColor);
+
+  //! Returns current selected color value
+  //! \return text color value
+  QString GetStreamValue() const;
+
+  //! Updates OCCT color model by changing color in parameter model
+  void ParameterColorChanged();
+
+  //! Converts color to string value in form: r;g;b
+  //! \param theColor color value
+  //! \return text value
+  static QString ColorToString (const Quantity_Color& theColor);
+
+  //! Converts color to QColor value in form: r;g;b;a
+  //! \param theColor color value
+  //! \return qt color value
+  static QColor ColorToQColor (const Quantity_ColorRGBA& theColor);
+
+  //! Converts string to color value from a form: r;g;b;a
+  //! \param theColor text color value
+  //! \return color value
+  static Quantity_ColorRGBA StringToColorRGBA (const QString& theColor);
+
+  static Standard_Boolean IsExactColorName (const Quantity_ColorRGBA& theColor,
+                                            Quantity_NameOfColor& theColorName);
+
+private:
+  //! Returns symbol used as a separtor of color components in string conversion
+  //! \return symbol value
+  static QString ColorSeparator() { return ";"; }
+
+private slots:
+  //! Slots listen selection change and update the current control content by selection
+  //! \param theSelected container of selected items
+  //! \param theDeselected container of items that become deselected
+  void onOCCTColorsTableSelectionChanged (const QItemSelection& theSelected, const QItemSelection& theDeselected);
+
+private:
+  QTableView* myParameters; //!< current color parameters (RGB, alpha, color name)
+  ViewControl_ColorPicker* myColorPicker; //!< color picker
+  QTableView* myOCCTColors; //!< OCCT color values
+  QPushButton* myOkButton; //!< accept button
+  QPushButton* myCancelButton; //!< reject button
+};
+#endif
index 7d12ae011534f72206ddb481c99ce6a075f256f3..657f68eca1866b5fe825abd399f110a5174c5e5b 100644 (file)
@@ -21,6 +21,7 @@ enum ViewControl_EditType
 {
   ViewControl_EditType_None, //!< View widget is null
   ViewControl_EditType_Bool, //!< check box widget
+  ViewControl_EditType_Color, //!< color selector widget
   ViewControl_EditType_Double, //!< line edit widget used double validator
   ViewControl_EditType_Line, //!< line edit widget
   ViewControl_EditType_Spin, //!< spin box widget
index 76269f21b09378520d426728199a47facf94cd7b..3bd70ffc2f633ae9eaefa8651bbea1c12eb61973 100644 (file)
@@ -14,6 +14,7 @@
 // commercial license or contractual agreement. 
 
 #include <inspector/ViewControl_Table.hxx>
+#include <inspector/ViewControl_TableItemDelegate.hxx>
 #include <inspector/ViewControl_TableModel.hxx>
 #include <inspector/ViewControl_Tools.hxx>
 
@@ -46,6 +47,8 @@ ViewControl_Table::ViewControl_Table (QWidget* theParent)
   myTableView = new QTableView (myMainWidget);
   myTableView->setVerticalScrollMode (QAbstractItemView::ScrollPerPixel);
 
+  myTableView->setItemDelegate (new ViewControl_TableItemDelegate (theParent));
+
   QHeaderView* aVHeader = myTableView->verticalHeader();
   int aDefCellSize = aVHeader->minimumSectionSize();
   aVHeader->setDefaultSectionSize (aDefCellSize);
@@ -82,6 +85,9 @@ void ViewControl_Table::Init (ViewControl_TableModelValues* theModelValues)
 
   myTableView->horizontalHeader()->setVisible (theModelValues->IsHeaderVisible (Qt::Horizontal));
 
+  ViewControl_TableItemDelegate* anItemDelegate = dynamic_cast<ViewControl_TableItemDelegate*>(myTableView->itemDelegate());
+  anItemDelegate->SetModelValues (theModelValues);
+
   myTableView->verticalHeader()->setVisible (theModelValues->IsHeaderVisible (Qt::Vertical));
   int aSectionSize;
   if (theModelValues->DefaultSectionSize (Qt::Vertical, aSectionSize) )
diff --git a/tools/ViewControl/ViewControl_TableItemDelegate.cxx b/tools/ViewControl/ViewControl_TableItemDelegate.cxx
new file mode 100644 (file)
index 0000000..68a3eca
--- /dev/null
@@ -0,0 +1,193 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#include <inspector/ViewControl_TableItemDelegate.hxx>
+#include <inspector/ViewControl_ColorSelector.hxx>
+#include <inspector/ViewControl_TableModelValues.hxx>
+#include <inspector/ViewControl_EditType.hxx>
+#include <inspector/TreeModel_ItemProperties.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QFont>
+#include <QCheckBox>
+#include <QComboBox>
+#include <QDoubleValidator>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QSpinBox>
+#include <Standard_WarningsRestore.hxx>
+
+// =======================================================================
+// function : Constructor
+// purpose :
+// =======================================================================
+ViewControl_TableItemDelegate::ViewControl_TableItemDelegate (QObject* theParent)
+ : QItemDelegate (theParent), myModelValues (0)
+{
+}
+
+// =======================================================================
+// function : createEditor
+// purpose :
+// =======================================================================
+QWidget* ViewControl_TableItemDelegate::createEditor (QWidget* theParent,
+                                                      const QStyleOptionViewItem&,
+                                                      const QModelIndex& theIndex) const
+{
+  if (!myModelValues)
+    return 0;
+
+  int aRow = theIndex.row();
+  int aColumn = theIndex.column();
+  ViewControl_EditType anEditType = myModelValues->EditType (aRow, aColumn);
+
+  QWidget* anEditor = createEditorControl (theParent, anEditType);
+  initEditorParameters (anEditor, anEditType, myModelValues, aRow, aColumn);
+  return anEditor;
+}
+
+// =======================================================================
+// function : setEditorData
+// purpose :
+// =======================================================================
+void ViewControl_TableItemDelegate::setEditorData (QWidget* theEditor, const QModelIndex& theIndex) const
+{
+  if (!myModelValues)
+    return;
+
+  int aRow = theIndex.row();
+  int aColumn = theIndex.column();
+  ViewControl_EditType anEditType = myModelValues->EditType (aRow, aColumn);
+
+  setEditorValue (theEditor, anEditType, theIndex.model()->data(theIndex));
+}
+
+// =======================================================================
+// function : setModelData
+// purpose :
+// =======================================================================
+void ViewControl_TableItemDelegate::setModelData (QWidget* theEditor, QAbstractItemModel* theModel,
+                                                  const QModelIndex& theIndex) const
+{
+  if (!myModelValues)
+    return;
+
+  int aRow = theIndex.row();
+  int aColumn = theIndex.column();
+  ViewControl_EditType anEditType = myModelValues->EditType (aRow, aColumn);
+  theModel->setData (theIndex, getEditorValue (theEditor, anEditType));
+}
+
+// =======================================================================
+// function : createEditorControl
+// purpose :
+// =======================================================================
+QWidget* ViewControl_TableItemDelegate::createEditorControl (QWidget* theParent, const ViewControl_EditType theEditType)
+{
+  switch (theEditType)
+  {
+    case ViewControl_EditType_None: return 0;
+    case ViewControl_EditType_Bool: return new QComboBox (theParent);
+    case ViewControl_EditType_Color: return new ViewControl_ColorSelector (theParent);
+    case ViewControl_EditType_Double:
+    {
+      QLineEdit* aLineEdit = new QLineEdit (theParent);
+      aLineEdit->setValidator (new QDoubleValidator (theParent));
+      return aLineEdit;
+    }
+    case ViewControl_EditType_Line: return new QLineEdit (theParent);
+    case ViewControl_EditType_Spin:
+    {
+      QSpinBox* aSpinBox = new QSpinBox (theParent);
+      aSpinBox->setRange (IntegerFirst(), IntegerLast());
+      return aSpinBox;
+    }
+    case ViewControl_EditType_DoAction: return new QPushButton (theParent);
+
+    default: return 0;
+  }
+}
+
+// =======================================================================
+// function : initEditorParameters
+// purpose :
+// =======================================================================
+void ViewControl_TableItemDelegate::initEditorParameters (QWidget* theEditor,
+                                                          const ViewControl_EditType theEditType,
+                                                          ViewControl_TableModelValues*,
+                                                          const int, const int)
+{
+  switch (theEditType)
+  {
+    case ViewControl_EditType_Bool:
+    {
+      (qobject_cast<QComboBox*> (theEditor))->insertItem(0, "true");
+      (qobject_cast<QComboBox*> (theEditor))->insertItem(1, "false");
+      break;
+    }
+    case ViewControl_EditType_Double:
+    {
+    }
+    default: break;
+  }
+}
+
+// =======================================================================
+// function : setEditorValue
+// purpose :
+// =======================================================================
+void ViewControl_TableItemDelegate::setEditorValue (QWidget* theEditor, const ViewControl_EditType theEditType,
+                                                    const QVariant& theValue) const
+{
+  switch (theEditType)
+  {
+    case ViewControl_EditType_None: break;
+    case ViewControl_EditType_Bool: (qobject_cast<QComboBox*>(theEditor))->setCurrentIndex (theValue.toBool() ? 0 : 1); break;
+    case ViewControl_EditType_Color:
+    {
+      if (!myModelValues)
+        break;
+
+      const TCollection_AsciiString& aStreamValue = myModelValues->Properties()->StreamValue();
+      (qobject_cast<ViewControl_ColorSelector*>(theEditor))->SetStreamValue (aStreamValue.ToCString());
+      break;
+    }
+    case ViewControl_EditType_Double:
+    case ViewControl_EditType_Line: (qobject_cast<QLineEdit*>(theEditor))->setText (theValue.toString()); break;
+    case ViewControl_EditType_Spin: (qobject_cast<QSpinBox*>(theEditor))->setValue (theValue.toInt()); break;
+    case ViewControl_EditType_DoAction: (qobject_cast<QPushButton*>(theEditor))->setText ("UnSelect"); break;
+    default: break;
+  }
+}
+
+// =======================================================================
+// function : getEditorValue
+// purpose :
+// =======================================================================
+
+QVariant ViewControl_TableItemDelegate::getEditorValue (QWidget* theEditor, const ViewControl_EditType theEditType)
+{
+  switch (theEditType)
+  {
+    case ViewControl_EditType_None: return QVariant();
+    case ViewControl_EditType_Bool: return (qobject_cast<QComboBox*>(theEditor))->currentIndex() == 0 ? true : false;
+    case ViewControl_EditType_Color: return (qobject_cast<ViewControl_ColorSelector*>(theEditor))->GetStreamValue();
+    case ViewControl_EditType_Double:
+    case ViewControl_EditType_Line: return (qobject_cast<QLineEdit*>(theEditor))->text();
+    case ViewControl_EditType_Spin: return (qobject_cast<QSpinBox*>(theEditor))->value();
+    case ViewControl_EditType_DoAction: return QVariant ("Clicked");
+    default: return QVariant();
+  }
+}
diff --git a/tools/ViewControl/ViewControl_TableItemDelegate.hxx b/tools/ViewControl/ViewControl_TableItemDelegate.hxx
new file mode 100644 (file)
index 0000000..7e2aced
--- /dev/null
@@ -0,0 +1,98 @@
+// Created on: 2021-04-27
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2021 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement. 
+
+#ifndef ViewControl_TableItemDelegate_H
+#define ViewControl_TableItemDelegate_H
+
+#include <Standard_Macro.hxx>
+#include <inspector/ViewControl_EditType.hxx>
+
+#include <Standard_WarningsDisable.hxx>
+#include <QItemDelegate>
+#include <Standard_WarningsRestore.hxx>
+
+class ViewControl_TableModelValues;
+
+//! \class ViewControl_TableItemDelegate
+//! \brief This is an implementation for table cell editor
+class ViewControl_TableItemDelegate : public QItemDelegate
+{
+public:
+
+  //! Constructor
+  //! \param theParent parent object
+  Standard_EXPORT ViewControl_TableItemDelegate (QObject* theParent = 0);
+
+  //! Destructor
+  virtual ~ViewControl_TableItemDelegate() Standard_OVERRIDE {}
+
+  //! Sets table model values
+  //! \param theModelValues instance of model values
+  void SetModelValues (ViewControl_TableModelValues* theModelValues) { myModelValues = theModelValues; }
+
+  //! Creates widget editor: spin box, combo box or line edit
+  //! \param theParent parent widget
+  //! \param theOption style option
+  //! \param theIndex index of requested widget
+  virtual QWidget* createEditor (QWidget* theParent, const QStyleOptionViewItem& theOption,
+                                 const QModelIndex& theIndex) const Standard_OVERRIDE;
+
+  //! Sets the data to be displayed and edited by the editor from the data model item specified by the model index
+  //! \param theEditor editor to be filled
+  //! \param theIndex index of requested widget, contains information about model
+  virtual void setEditorData (QWidget* theEditor, const QModelIndex& theIndex) const Standard_OVERRIDE;
+
+  //! Gets data from the editor widget and stores it in the specified model at the item index.
+  //! \param theEditor editor to be filled
+  //! \param theModel data model
+  //! \param theIndex index of requested widget, contains information about model
+  virtual void setModelData (QWidget* theEditor, QAbstractItemModel* theModel,
+                             const QModelIndex& theIndex) const Standard_OVERRIDE;
+
+private:
+  //! Creates an editor
+  //! \param theParent parent widget
+  //! \param theEditType edition control type
+  //! \return edit control
+  static QWidget* createEditorControl (QWidget* theParent, const ViewControl_EditType theEditType);
+
+  //! Inits an editor by model values parameters
+  //! \param theEditor editor
+  //! \param theEditType edition control type
+  //! \param theModelValues custom implementation to provide parameters
+  //! \param theRow a model index row
+  //! \param theColumn a model index column
+  //! \return edit control
+  static void initEditorParameters (QWidget* theEditor, const ViewControl_EditType theEditType,
+                                    ViewControl_TableModelValues* theModelValues,
+                                    const int theRow, const int theColumn);
+
+  //! Sets editor value
+  //! \param theEditor editor
+  //! \param theEditType editor typ
+  //! \param theValue new value
+  void setEditorValue (QWidget* theEditor, const ViewControl_EditType theEditType, const QVariant& theValue) const;
+
+  //! Returns value of spin box editor
+  //! \param theEditor editor
+  //! \param theEditType editor typ
+  //! \return current value
+  static QVariant getEditorValue (QWidget* theEditor, const ViewControl_EditType theEditType);
+
+private:
+  ViewControl_TableModelValues* myModelValues; //!< table model values
+};
+
+#endif
index 71e7e58fc87e1e8f0a24f2fb95986404b1758fba..dff895aa8c7c9d05c33b265d6fb1fe85a8c5512b 100644 (file)
@@ -44,7 +44,7 @@ public:
   virtual ~ViewControl_TableModelValues() {}
 
   //! Returns item table properties builder
-  Handle(TreeModel_ItemProperties) Properties() const { return myProperties; }
+  const Handle(TreeModel_ItemProperties)& Properties() const { return myProperties; }
 
   //! Sets item table properties builder
   void SetProperties (const Handle(TreeModel_ItemProperties)& theProperties) { myProperties = theProperties; }
index 1ad884d5d454caf8f71b3ec7ddceb80198d89ce9..bb27e601a80eb99626534deba6cf19618faf6bce 100644 (file)
@@ -106,3 +106,39 @@ ViewControl_TableModelValues* ViewControl_Tools::CreateTableModelValues (QItemSe
   aTableValues->SetProperties (anItemProperties);
   return aTableValues;
 }
+
+// =======================================================================
+// function : ToVariant
+// purpose :
+// =======================================================================
+QVariant ViewControl_Tools::ToVariant (const Standard_ShortReal theValue)
+{
+  return QVariant (QLocale().toString (theValue));
+}
+
+// =======================================================================
+// function : ToVariant
+// purpose :
+// =======================================================================
+QVariant ViewControl_Tools::ToVariant (const Standard_Real theValue)
+{
+  return QVariant (QLocale().toString (theValue));
+}
+
+// =======================================================================
+// function : ToRealValue
+// purpose :
+// =======================================================================
+Standard_ShortReal ViewControl_Tools::ToShortRealValue (const QVariant& theValue)
+{
+  return QLocale().toFloat (theValue.toString());
+}
+
+// =======================================================================
+// function : ToRealValue
+// purpose :
+// =======================================================================
+Standard_Real ViewControl_Tools::ToRealValue (const QVariant& theValue)
+{
+  return QLocale().toDouble (theValue.toString());
+}
index 39994b6cbeb8f83aa5ee05249ebd330e7ce7344d..db33e8c986da6ffd6ba8226da56ee65eba8d6e48 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <Standard_WarningsDisable.hxx>
 #include <QString>
+#include <QVariant>
 #include <Standard_WarningsRestore.hxx>
 
 class ViewControl_TableModelValues;
@@ -63,6 +64,26 @@ public:
   //! It is created if the selection contains only one item and it has a property item
   Standard_EXPORT static ViewControl_TableModelValues* CreateTableModelValues (QItemSelectionModel* theSelectionModel);
 
+  //! Convert real value to string value
+  //! \param theValue a short real value
+  //! \return the string value
+  Standard_EXPORT static QVariant ToVariant (const Standard_ShortReal theValue);
+
+  //! Convert real value to string value
+  //! \param theValue a real value
+  //! \return the string value
+  Standard_EXPORT static QVariant ToVariant (const Standard_Real theValue);
+
+  //! Convert real value to real value
+  //! \param theValue a string value
+  //! \return the real value
+  Standard_EXPORT static Standard_ShortReal ToShortRealValue (const QVariant& theValue);
+
+  //! Convert real value to string value
+  //! \param theValue a string value
+  //! \return the real value
+  Standard_EXPORT static Standard_Real ToRealValue (const QVariant& theValue);
+
 };
 
 #endif