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

0031362: Inspectors - MessageView plugin for message alerts

- 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.
This commit is contained in:
nds
2021-04-26 18:01:38 +03:00
committed by bugmaster
parent 9a5bfc1c07
commit d16ecfe28e
239 changed files with 6001 additions and 8009 deletions

View File

@@ -16,112 +16,24 @@
#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;
}