From 0cb512c0136abc8b6dded0b7482ab56edf2661ac Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 24 Aug 2017 08:25:47 +0300 Subject: [PATCH] 0029025: TInspector include files are not installed to inc directory by CMake TInspector headers are collected in 'inc/tools' directory. Extending DRAW Commands; Eliminating warnings; Improve Export to ShapeView dialog; Avoid crash with QML using; --- CMakeLists.txt | 3 +- adm/cmake/occt_macros.cmake | 2 +- samples/tools/TInspectorEXE/TInspectorEXE.cxx | 6 +- .../TInspectorEXE_OpenFileDialog.cxx | 4 +- tests/tools/dfbrowser/A1 | 2 +- tests/tools/dfbrowser/A2 | 2 +- .../DFBrowser_AttributePaneStack.cxx | 22 +- .../DFBrowser_AttributePaneStack.hxx | 5 +- tools/DFBrowser/DFBrowser_Communicator.cxx | 6 +- tools/DFBrowser/DFBrowser_Communicator.hxx | 5 +- tools/DFBrowser/DFBrowser_DumpView.cxx | 12 +- .../DFBrowser/DFBrowser_HighlightDelegate.cxx | 4 +- tools/DFBrowser/DFBrowser_Item.cxx | 15 +- tools/DFBrowser/DFBrowser_Item.hxx | 2 +- tools/DFBrowser/DFBrowser_ItemApplication.cxx | 16 +- tools/DFBrowser/DFBrowser_ItemApplication.hxx | 3 +- tools/DFBrowser/DFBrowser_ItemBase.cxx | 15 +- tools/DFBrowser/DFBrowser_ItemBase.hxx | 3 +- tools/DFBrowser/DFBrowser_ItemDocument.cxx | 16 +- tools/DFBrowser/DFBrowser_ItemDocument.hxx | 3 +- tools/DFBrowser/DFBrowser_Module.cxx | 32 +- tools/DFBrowser/DFBrowser_Module.hxx | 5 +- tools/DFBrowser/DFBrowser_OpenApplication.cxx | 3 +- tools/DFBrowser/DFBrowser_PropertyPanel.cxx | 12 +- tools/DFBrowser/DFBrowser_PropertyPanel.hxx | 3 +- tools/DFBrowser/DFBrowser_SearchLine.cxx | 10 +- tools/DFBrowser/DFBrowser_SearchLine.hxx | 3 +- tools/DFBrowser/DFBrowser_SearchLineModel.cxx | 14 +- tools/DFBrowser/DFBrowser_SearchLineModel.hxx | 5 +- tools/DFBrowser/DFBrowser_SearchView.cxx | 12 +- tools/DFBrowser/DFBrowser_SearchView.hxx | 5 +- tools/DFBrowser/DFBrowser_Shortcut.cxx | 4 +- tools/DFBrowser/DFBrowser_Thread.cxx | 12 +- .../DFBrowser/DFBrowser_ThreadItemSearch.cxx | 17 +- .../DFBrowser/DFBrowser_ThreadItemSearch.hxx | 5 +- .../DFBrowser_ThreadItemUsedShapesMap.cxx | 17 +- .../DFBrowser_ThreadItemUsedShapesMap.hxx | 3 +- tools/DFBrowser/DFBrowser_Tools.cxx | 10 +- tools/DFBrowser/DFBrowser_Tools.hxx | 3 +- tools/DFBrowser/DFBrowser_TreeLevelLine.cxx | 12 +- tools/DFBrowser/DFBrowser_TreeLevelLine.hxx | 3 +- .../DFBrowser_TreeLevelLineDelegate.cxx | 4 +- .../DFBrowser_TreeLevelLineModel.cxx | 6 +- .../DFBrowser_TreeLevelLineModel.hxx | 3 +- tools/DFBrowser/DFBrowser_TreeLevelView.cxx | 12 +- tools/DFBrowser/DFBrowser_TreeLevelView.hxx | 3 +- .../DFBrowser_TreeLevelViewModel.cxx | 14 +- tools/DFBrowser/DFBrowser_TreeModel.cxx | 19 +- tools/DFBrowser/DFBrowser_TreeModel.hxx | 5 +- tools/DFBrowser/DFBrowser_TreeView.cxx | 2 +- tools/DFBrowser/DFBrowser_Window.cxx | 160 +++++--- tools/DFBrowser/DFBrowser_Window.hxx | 6 +- .../DFBrowserPane_AttributePane.cxx | 13 +- .../DFBrowserPane_AttributePane.hxx | 2 +- .../DFBrowserPane_AttributePaneCreator.cxx | 89 +++-- .../DFBrowserPane_AttributePaneCreator.hxx | 5 +- .../DFBrowserPane_AttributePaneModel.cxx | 2 +- .../DFBrowserPane_AttributePaneSelector.cxx | 2 +- .../DFBrowserPane_HelperArray.cxx | 8 +- .../DFBrowserPane_HelperExport.cxx | 2 +- .../DFBrowserPane_HelperExport.hxx | 2 +- .../DFBrowserPane_HelperGroupContent.cxx | 2 +- .../DFBrowserPane_ItemDelegateButton.cxx | 2 +- .../DFBrowserPane_TDFReference.cxx | 6 +- .../DFBrowserPane_TDFReference.hxx | 3 +- .../DFBrowserPane_TDFTagSource.cxx | 2 +- .../DFBrowserPane_TDFTagSource.hxx | 3 +- .../DFBrowserPane_TDataStdAsciiString.cxx | 4 +- .../DFBrowserPane_TDataStdAsciiString.hxx | 3 +- .../DFBrowserPane_TDataStdBooleanArray.cxx | 10 +- .../DFBrowserPane_TDataStdBooleanArray.hxx | 6 +- .../DFBrowserPane_TDataStdBooleanList.cxx | 2 +- .../DFBrowserPane_TDataStdBooleanList.hxx | 3 +- .../DFBrowserPane_TDataStdByteArray.cxx | 8 +- .../DFBrowserPane_TDataStdByteArray.hxx | 6 +- .../DFBrowserPane_TDataStdComment.cxx | 4 +- .../DFBrowserPane_TDataStdComment.hxx | 3 +- .../DFBrowserPane_TDataStdCurrent.cxx | 4 +- .../DFBrowserPane_TDataStdCurrent.hxx | 3 +- .../DFBrowserPane_TDataStdDirectory.cxx | 2 +- .../DFBrowserPane_TDataStdDirectory.hxx | 3 +- .../DFBrowserPane_TDataStdExpression.cxx | 4 +- .../DFBrowserPane_TDataStdExpression.hxx | 3 +- .../DFBrowserPane_TDataStdExtStringArray.cxx | 10 +- .../DFBrowserPane_TDataStdExtStringArray.hxx | 6 +- .../DFBrowserPane_TDataStdExtStringList.cxx | 6 +- .../DFBrowserPane_TDataStdExtStringList.hxx | 3 +- .../DFBrowserPane_TDataStdIntPackedMap.cxx | 2 +- .../DFBrowserPane_TDataStdIntPackedMap.hxx | 3 +- .../DFBrowserPane_TDataStdInteger.cxx | 2 +- .../DFBrowserPane_TDataStdInteger.hxx | 3 +- .../DFBrowserPane_TDataStdIntegerArray.cxx | 8 +- .../DFBrowserPane_TDataStdIntegerArray.hxx | 6 +- .../DFBrowserPane_TDataStdIntegerList.cxx | 2 +- .../DFBrowserPane_TDataStdIntegerList.hxx | 3 +- .../DFBrowserPane_TDataStdName.cxx | 4 +- .../DFBrowserPane_TDataStdName.hxx | 3 +- .../DFBrowserPane_TDataStdNamedData.cxx | 12 +- .../DFBrowserPane_TDataStdNamedData.hxx | 3 +- .../DFBrowserPane_TDataStdNoteBook.cxx | 2 +- .../DFBrowserPane_TDataStdNoteBook.hxx | 3 +- .../DFBrowserPane_TDataStdReal.cxx | 2 +- .../DFBrowserPane_TDataStdReal.hxx | 3 +- .../DFBrowserPane_TDataStdRealArray.cxx | 8 +- .../DFBrowserPane_TDataStdRealArray.hxx | 6 +- .../DFBrowserPane_TDataStdRealList.cxx | 2 +- .../DFBrowserPane_TDataStdRealList.hxx | 3 +- .../DFBrowserPane_TDataStdReferenceArray.cxx | 12 +- .../DFBrowserPane_TDataStdReferenceArray.hxx | 6 +- .../DFBrowserPane_TDataStdReferenceList.cxx | 6 +- .../DFBrowserPane_TDataStdReferenceList.hxx | 3 +- .../DFBrowserPane_TDataStdRelation.cxx | 2 +- .../DFBrowserPane_TDataStdRelation.hxx | 3 +- .../DFBrowserPane_TDataStdTick.cxx | 2 +- .../DFBrowserPane_TDataStdTick.hxx | 3 +- .../DFBrowserPane_TDataStdTreeNode.cxx | 16 +- .../DFBrowserPane_TDataStdTreeNode.hxx | 3 +- .../DFBrowserPane_TDataStdTreeNodeItem.cxx | 12 +- .../DFBrowserPane_TDataStdTreeNodeItem.hxx | 3 +- .../DFBrowserPane_TDataStdTreeNodeModel.cxx | 4 +- .../DFBrowserPane_TDataStdTreeNodeModel.hxx | 3 +- .../DFBrowserPane_TDataStdUAttribute.cxx | 4 +- .../DFBrowserPane_TDataStdUAttribute.hxx | 3 +- .../DFBrowserPane_TDataStdVariable.cxx | 2 +- .../DFBrowserPane_TDataStdVariable.hxx | 3 +- .../DFBrowserPane_TDocStdModified.cxx | 2 +- .../DFBrowserPane_TDocStdModified.hxx | 3 +- .../DFBrowserPane_TDocStdOwner.cxx | 9 +- .../DFBrowserPane_TDocStdOwner.hxx | 3 +- .../DFBrowserPane_TDocStdXLink.cxx | 2 +- .../DFBrowserPane_TDocStdXLink.hxx | 3 +- .../DFBrowserPane_TDocStdXLinkRoot.cxx | 2 +- .../DFBrowserPane_TDocStdXLinkRoot.hxx | 3 +- .../DFBrowserPane_TFunctionFunction.cxx | 4 +- .../DFBrowserPane_TFunctionFunction.hxx | 3 +- .../DFBrowserPane_TFunctionGraphNode.cxx | 2 +- .../DFBrowserPane_TFunctionGraphNode.hxx | 3 +- .../DFBrowserPane_TFunctionScope.cxx | 2 +- .../DFBrowserPane_TFunctionScope.hxx | 3 +- .../DFBrowserPane_TNamingNamedShape.cxx | 17 +- .../DFBrowserPane_TNamingNamedShape.hxx | 5 +- .../DFBrowserPane_TNamingNaming.cxx | 9 +- .../DFBrowserPane_TNamingNaming.hxx | 3 +- .../DFBrowserPane_TNamingUsedShapes.cxx | 13 +- .../DFBrowserPane_TNamingUsedShapes.hxx | 3 +- .../DFBrowserPane_TPrsStdAISPresentation.cxx | 7 +- .../DFBrowserPane_TPrsStdAISPresentation.hxx | 3 +- .../DFBrowserPane_TPrsStdAISViewer.cxx | 2 +- .../DFBrowserPane_TPrsStdAISViewer.hxx | 3 +- .../DFBrowserPane/DFBrowserPane_TableView.cxx | 4 +- tools/DFBrowserPane/DFBrowserPane_Tools.cxx | 4 +- tools/DFBrowserPane/DFBrowserPane_Tools.hxx | 3 +- .../DFBrowserPaneXDE_AttributeCommonPane.cxx | 6 +- .../DFBrowserPaneXDE_AttributeCommonPane.hxx | 3 +- .../DFBrowserPaneXDE_AttributePaneCreator.cxx | 40 +- .../DFBrowserPaneXDE_AttributePaneCreator.hxx | 3 +- .../DFBrowserPaneXDE_Tools.cxx | 4 +- .../DFBrowserPaneXDE_XCAFDocArea.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocArea.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocCentroid.cxx | 4 +- .../DFBrowserPaneXDE_XCAFDocCentroid.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocColor.cxx | 4 +- .../DFBrowserPaneXDE_XCAFDocColor.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocColorTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocColorTool.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocDatum.cxx | 4 +- .../DFBrowserPaneXDE_XCAFDocDatum.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocDimTol.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDimTol.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDimTolTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDimTolTool.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDimension.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDimension.hxx | 3 +- .../DFBrowserPaneXDE_XCAFDocDocumentTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocDocumentTool.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocGraphNode.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocGraphNode.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocLayerTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocLayerTool.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocLocation.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocLocation.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocMaterial.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocMaterial.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocMaterialTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocMaterialTool.hxx | 2 +- .../DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx | 12 +- .../DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx | 4 +- .../DFBrowserPaneXDE_XCAFDocShapeTool.cxx | 2 +- .../DFBrowserPaneXDE_XCAFDocShapeTool.hxx | 2 +- .../DFBrowserPaneXDE_XDEDRAW.cxx | 2 +- tools/ShapeView/ShapeView_Communicator.cxx | 4 +- tools/ShapeView/ShapeView_Communicator.hxx | 4 +- tools/ShapeView/ShapeView_ItemBase.hxx | 2 +- tools/ShapeView/ShapeView_ItemRoot.cxx | 4 +- tools/ShapeView/ShapeView_ItemRoot.hxx | 2 +- tools/ShapeView/ShapeView_ItemShape.cxx | 6 +- tools/ShapeView/ShapeView_ItemShape.hxx | 4 +- tools/ShapeView/ShapeView_OpenFileDialog.cxx | 7 +- .../ShapeView/ShapeView_OpenFileViewModel.cxx | 2 +- tools/ShapeView/ShapeView_Tools.cxx | 2 +- tools/ShapeView/ShapeView_TreeModel.cxx | 43 ++- tools/ShapeView/ShapeView_TreeModel.hxx | 17 +- tools/ShapeView/ShapeView_Window.cxx | 114 ++++-- tools/ShapeView/ShapeView_Window.hxx | 5 +- tools/ShapeView/icons/folder_open.png | Bin 794 -> 1957 bytes tools/TInspector/FILES | 2 + tools/TInspector/TInspector_Communicator.cxx | 5 +- tools/TInspector/TInspector_Communicator.hxx | 26 +- .../TInspector_PluginParameters.cxx | 34 ++ .../TInspector_PluginParameters.hxx | 50 +++ tools/TInspector/TInspector_Window.cxx | 162 +++++++-- tools/TInspector/TInspector_Window.hxx | 34 +- .../TInspectorAPI_Communicator.cxx | 2 +- .../TInspectorAPI_Communicator.hxx | 2 +- .../TInspectorAPI_PluginParameters.cxx | 72 +++- .../TInspectorAPI_PluginParameters.hxx | 43 ++- tools/ToolsDraw/ToolsDraw.cxx | 344 +++++++++++++++--- tools/TreeModel/FILES | 2 + tools/TreeModel/TreeModel_ItemBase.cxx | 4 +- tools/TreeModel/TreeModel_ItemBase.hxx | 2 +- tools/TreeModel/TreeModel_MessageDialog.cxx | 123 +++++++ tools/TreeModel/TreeModel_MessageDialog.hxx | 88 +++++ tools/TreeModel/TreeModel_ModelBase.cxx | 4 +- tools/TreeModel/TreeModel_ModelBase.hxx | 2 +- tools/VInspector/FILES | 1 + tools/VInspector/VInspector.qrc | 5 + tools/VInspector/VInspectorAPI_CallBack.cxx | 2 +- tools/VInspector/VInspector_CallBack.cxx | 8 +- tools/VInspector/VInspector_CallBack.hxx | 8 +- tools/VInspector/VInspector_Communicator.cxx | 6 +- tools/VInspector/VInspector_Communicator.hxx | 4 +- tools/VInspector/VInspector_ItemBase.cxx | 4 +- tools/VInspector/VInspector_ItemBase.hxx | 2 +- tools/VInspector/VInspector_ItemContext.cxx | 6 +- tools/VInspector/VInspector_ItemContext.hxx | 2 +- .../VInspector/VInspector_ItemEntityOwner.cxx | 8 +- .../VInspector/VInspector_ItemEntityOwner.hxx | 2 +- .../VInspector_ItemHistoryElement.cxx | 10 +- .../VInspector_ItemHistoryElement.hxx | 2 +- .../VInspector/VInspector_ItemHistoryRoot.cxx | 4 +- .../VInspector/VInspector_ItemHistoryRoot.hxx | 6 +- .../VInspector/VInspector_ItemHistoryType.cxx | 10 +- .../VInspector/VInspector_ItemHistoryType.hxx | 2 +- .../VInspector_ItemHistoryTypeInfo.hxx | 2 +- .../VInspector_ItemPresentableObject.cxx | 12 +- .../VInspector_ItemPresentableObject.hxx | 2 +- tools/VInspector/VInspector_ItemSelection.cxx | 10 +- tools/VInspector/VInspector_ItemSelection.hxx | 2 +- .../VInspector_ItemSensitiveEntity.cxx | 10 +- .../VInspector_ItemSensitiveEntity.hxx | 2 +- tools/VInspector/VInspector_ToolBar.cxx | 29 +- tools/VInspector/VInspector_ToolBar.hxx | 8 +- tools/VInspector/VInspector_Tools.cxx | 2 +- tools/VInspector/VInspector_Tools.hxx | 4 +- tools/VInspector/VInspector_ViewModel.cxx | 31 +- tools/VInspector/VInspector_ViewModel.hxx | 9 +- .../VInspector_ViewModelHistory.cxx | 8 +- .../VInspector_ViewModelHistory.hxx | 6 +- tools/VInspector/VInspector_Window.cxx | 143 ++++++-- tools/VInspector/VInspector_Window.hxx | 16 +- tools/VInspector/icons/treeview_update.png | Bin 0 -> 1101 bytes tools/View/View_Displayer.cxx | 6 +- tools/View/View_Displayer.hxx | 2 +- tools/View/View_ToolBar.cxx | 10 +- tools/View/View_ToolBar.hxx | 4 +- tools/View/View_Viewer.cxx | 2 +- tools/View/View_Widget.cxx | 6 +- tools/View/View_Widget.hxx | 4 +- tools/View/View_Window.cxx | 10 +- tools/View/View_Window.hxx | 2 +- 272 files changed, 1987 insertions(+), 910 deletions(-) create mode 100644 tools/TInspector/TInspector_PluginParameters.cxx create mode 100644 tools/TInspector/TInspector_PluginParameters.hxx create mode 100644 tools/TreeModel/TreeModel_MessageDialog.cxx create mode 100644 tools/TreeModel/TreeModel_MessageDialog.hxx create mode 100644 tools/VInspector/VInspector.qrc create mode 100644 tools/VInspector/icons/treeview_update.png diff --git a/CMakeLists.txt b/CMakeLists.txt index 006cafa41c..43621df7b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -789,8 +789,7 @@ else() # collect all the headers to /inc folder string(TIMESTAMP CURRENT_TIME "%H:%M:%S") message (STATUS "\nInfo: \(${CURRENT_TIME}\) Start collecting all OCCT tool header files into ${CMAKE_BINARY_DIR}/tools/inc ...") - COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "tools") - include_directories (${CMAKE_BINARY_DIR}/${INSTALL_DIR_INCLUDE}/tools) + COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOL_TOOLKITS}" "${CMAKE_SOURCE_DIR}/tools" "${INSTALL_DIR_INCLUDE}/inspector") # check qt 3rdparty path diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index d0a3d99201..3d40a7cc49 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -340,7 +340,7 @@ macro (COLLECT_AND_INSTALL_OCCT_HEADER_FILES ROOT_TARGET_OCCT_DIR OCCT_BUILD_TOO string(TIMESTAMP CURRENT_TIME "%H:%M:%S") message (STATUS "Info: \(${CURRENT_TIME}\) Checking headers in inc folder...") - file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/inc/*") + file (GLOB OCCT_HEADER_FILES_OLD "${ROOT_TARGET_OCCT_DIR}/${OCCT_INSTALL_DIR_PREFIX}/*") foreach (OCCT_HEADER_FILE_OLD ${OCCT_HEADER_FILES_OLD}) get_filename_component (HEADER_FILE_NAME ${OCCT_HEADER_FILE_OLD} NAME) string (REGEX MATCH "^[a-zA-Z0-9]+" PACKAGE_NAME "${HEADER_FILE_NAME}") diff --git a/samples/tools/TInspectorEXE/TInspectorEXE.cxx b/samples/tools/TInspectorEXE/TInspectorEXE.cxx index 5d3e0515ec..7523a95f9e 100644 --- a/samples/tools/TInspectorEXE/TInspectorEXE.cxx +++ b/samples/tools/TInspectorEXE/TInspectorEXE.cxx @@ -14,9 +14,11 @@ // commercial license or contractual agreement. -#include #include -#include + +#include + +#include #include #include diff --git a/samples/tools/TInspectorEXE/TInspectorEXE_OpenFileDialog.cxx b/samples/tools/TInspectorEXE/TInspectorEXE_OpenFileDialog.cxx index 5aa234b77c..4607755c2b 100644 --- a/samples/tools/TInspectorEXE/TInspectorEXE_OpenFileDialog.cxx +++ b/samples/tools/TInspectorEXE/TInspectorEXE_OpenFileDialog.cxx @@ -14,10 +14,10 @@ // commercial license or contractual agreement. #include - -#include #include +#include + #include #include #include diff --git a/tests/tools/dfbrowser/A1 b/tests/tools/dfbrowser/A1 index 2792359f0d..0c636d3e33 100644 --- a/tests/tools/dfbrowser/A1 +++ b/tests/tools/dfbrowser/A1 @@ -7,6 +7,6 @@ set aSetAttr1 100 set aLabel 0:2 SetInteger Doc ${aLabel} ${aSetAttr1} -tinspector -dfbrowser +tinspector -plugins dfbrowser tinspector -update diff --git a/tests/tools/dfbrowser/A2 b/tests/tools/dfbrowser/A2 index 6e29d0025a..3d4fb130b5 100644 --- a/tests/tools/dfbrowser/A2 +++ b/tests/tools/dfbrowser/A2 @@ -5,7 +5,7 @@ pload INSPECTOR chrono qat start # Create a new document and set UndoLimit NewDocument D BinOcaf -tinspector -dfbrowser +tinspector -plugins dfbrowser #NewDocument D cpulimit 300 diff --git a/tools/DFBrowser/DFBrowser_AttributePaneStack.cxx b/tools/DFBrowser/DFBrowser_AttributePaneStack.cxx index 1dd3d27cc3..541f7a1116 100644 --- a/tools/DFBrowser/DFBrowser_AttributePaneStack.cxx +++ b/tools/DFBrowser/DFBrowser_AttributePaneStack.cxx @@ -13,17 +13,17 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_AttributePaneStack.hxx b/tools/DFBrowser/DFBrowser_AttributePaneStack.hxx index ad1b461e4d..e54c39b670 100644 --- a/tools/DFBrowser/DFBrowser_AttributePaneStack.hxx +++ b/tools/DFBrowser/DFBrowser_AttributePaneStack.hxx @@ -16,9 +16,10 @@ #ifndef DFBrowser_AttributePaneStack_H #define DFBrowser_AttributePaneStack_H -#include +#include +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_Communicator.cxx b/tools/DFBrowser/DFBrowser_Communicator.cxx index 550c67626c..10816585d6 100644 --- a/tools/DFBrowser/DFBrowser_Communicator.cxx +++ b/tools/DFBrowser/DFBrowser_Communicator.cxx @@ -14,11 +14,11 @@ // commercial license or contractual agreement. -#include +#include #include -#include -#include +#include +#include // ======================================================================= // function : CreateCommunicator diff --git a/tools/DFBrowser/DFBrowser_Communicator.hxx b/tools/DFBrowser/DFBrowser_Communicator.hxx index 34bffdec8e..548e955331 100644 --- a/tools/DFBrowser/DFBrowser_Communicator.hxx +++ b/tools/DFBrowser/DFBrowser_Communicator.hxx @@ -16,10 +16,11 @@ #ifndef DFBrowser_Communicator_H #define DFBrowser_Communicator_H -#include +#include +#include + #include #include -#include #include diff --git a/tools/DFBrowser/DFBrowser_DumpView.cxx b/tools/DFBrowser/DFBrowser_DumpView.cxx index 8ef0f0de00..405aacbf07 100644 --- a/tools/DFBrowser/DFBrowser_DumpView.cxx +++ b/tools/DFBrowser/DFBrowser_DumpView.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include @@ -52,7 +52,6 @@ void DFBrowser_DumpView::OnTreeViewSelectionChanged (const QItemSelection& theSe QString aDumpInfo; const QModelIndex& anIndex = aFirstColumnSelectedIndices.first(); TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex); -//#define REQUIRE_OCAF_REVIEW:18 : start DFBrowser_ItemPtr anItem; if (anItemBase) anItem = itemDynamicCast (anItemBase); @@ -87,7 +86,6 @@ void DFBrowser_DumpView::OnTreeViewSelectionChanged (const QItemSelection& theSe aFile.close(); QDir aDir; aDir.remove (aFileName.ToCString()); -//#define REQUIRE_OCAF_REVIEW:18 : end if (!aDumpInfo.isEmpty()) { myTextEdit->setVisible (true); diff --git a/tools/DFBrowser/DFBrowser_HighlightDelegate.cxx b/tools/DFBrowser/DFBrowser_HighlightDelegate.cxx index d06d1d8e60..fd5a1a132a 100644 --- a/tools/DFBrowser/DFBrowser_HighlightDelegate.cxx +++ b/tools/DFBrowser/DFBrowser_HighlightDelegate.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include // ======================================================================= diff --git a/tools/DFBrowser/DFBrowser_Item.cxx b/tools/DFBrowser/DFBrowser_Item.cxx index fc4e10168b..b5b6fc8e49 100644 --- a/tools/DFBrowser/DFBrowser_Item.cxx +++ b/tools/DFBrowser/DFBrowser_Item.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -31,7 +31,6 @@ const int INFO_LENGHT = 60; -//#define REQUIRE_OCAF_REVIEW:23 // ======================================================================= // function : hasAttribute // purpose : diff --git a/tools/DFBrowser/DFBrowser_Item.hxx b/tools/DFBrowser/DFBrowser_Item.hxx index 2a226c9cf4..5c10ac1c05 100644 --- a/tools/DFBrowser/DFBrowser_Item.hxx +++ b/tools/DFBrowser/DFBrowser_Item.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowser_Item_H #define DFBrowser_Item_H -#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_ItemApplication.cxx b/tools/DFBrowser/DFBrowser_ItemApplication.cxx index 89ed532e2d..f6555fc13b 100644 --- a/tools/DFBrowser/DFBrowser_ItemApplication.cxx +++ b/tools/DFBrowser/DFBrowser_ItemApplication.cxx @@ -13,20 +13,18 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include +#include +#include #include -//#define REQUIRE_OCAF_REVIEW:21 - // ======================================================================= // function : createChild // purpose : diff --git a/tools/DFBrowser/DFBrowser_ItemApplication.hxx b/tools/DFBrowser/DFBrowser_ItemApplication.hxx index d817553f73..dbc675f385 100644 --- a/tools/DFBrowser/DFBrowser_ItemApplication.hxx +++ b/tools/DFBrowser/DFBrowser_ItemApplication.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowser_ItemApplication_H #define DFBrowser_ItemApplication_H -#include +#include + #include class DFBrowser_ItemApplication; diff --git a/tools/DFBrowser/DFBrowser_ItemBase.cxx b/tools/DFBrowser/DFBrowser_ItemBase.cxx index ae4d0d66d4..9cbd59639d 100644 --- a/tools/DFBrowser/DFBrowser_ItemBase.cxx +++ b/tools/DFBrowser/DFBrowser_ItemBase.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -30,7 +30,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:20 // ======================================================================= // function : Constructor // purpose : diff --git a/tools/DFBrowser/DFBrowser_ItemBase.hxx b/tools/DFBrowser/DFBrowser_ItemBase.hxx index d16eb93850..c1ef3b6e94 100644 --- a/tools/DFBrowser/DFBrowser_ItemBase.hxx +++ b/tools/DFBrowser/DFBrowser_ItemBase.hxx @@ -17,9 +17,10 @@ #define DFBrowser_ItemBase_H #include -#include #include +#include + class DFBrowser_ItemBase; class DFBrowser_Module; typedef QExplicitlySharedDataPointer DFBrowser_ItemBasePtr; diff --git a/tools/DFBrowser/DFBrowser_ItemDocument.cxx b/tools/DFBrowser/DFBrowser_ItemDocument.cxx index dcefc48f51..37029caa97 100644 --- a/tools/DFBrowser/DFBrowser_ItemDocument.cxx +++ b/tools/DFBrowser/DFBrowser_ItemDocument.cxx @@ -13,22 +13,20 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include +#include +#include #include #include #include -//#define REQUIRE_OCAF_REVIEW:22 - // ======================================================================= // function : GetLabel // purpose : diff --git a/tools/DFBrowser/DFBrowser_ItemDocument.hxx b/tools/DFBrowser/DFBrowser_ItemDocument.hxx index 4338369ea6..52b516ae85 100644 --- a/tools/DFBrowser/DFBrowser_ItemDocument.hxx +++ b/tools/DFBrowser/DFBrowser_ItemDocument.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowser_ItemDocument_H #define DFBrowser_ItemDocument_H -#include +#include + #include #include diff --git a/tools/DFBrowser/DFBrowser_Module.cxx b/tools/DFBrowser/DFBrowser_Module.cxx index 404c6f4f5f..0a04c64621 100644 --- a/tools/DFBrowser/DFBrowser_Module.cxx +++ b/tools/DFBrowser/DFBrowser_Module.cxx @@ -13,22 +13,22 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_Module.hxx b/tools/DFBrowser/DFBrowser_Module.hxx index b151276561..d3e2748555 100644 --- a/tools/DFBrowser/DFBrowser_Module.hxx +++ b/tools/DFBrowser/DFBrowser_Module.hxx @@ -16,15 +16,16 @@ #ifndef DFBrowser_Module_H #define DFBrowser_Module_H +#include +#include + #include -#include #include #include #include #include #include #include -#include #include diff --git a/tools/DFBrowser/DFBrowser_OpenApplication.cxx b/tools/DFBrowser/DFBrowser_OpenApplication.cxx index 39b919dc4f..65785a7518 100644 --- a/tools/DFBrowser/DFBrowser_OpenApplication.cxx +++ b/tools/DFBrowser/DFBrowser_OpenApplication.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -32,7 +32,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:24 namespace DFBrowser_OpenApplication { diff --git a/tools/DFBrowser/DFBrowser_PropertyPanel.cxx b/tools/DFBrowser/DFBrowser_PropertyPanel.cxx index 4ec0e9c036..52545a3845 100644 --- a/tools/DFBrowser/DFBrowser_PropertyPanel.cxx +++ b/tools/DFBrowser/DFBrowser_PropertyPanel.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_PropertyPanel.hxx b/tools/DFBrowser/DFBrowser_PropertyPanel.hxx index baa10ad17c..8bfba4b18c 100644 --- a/tools/DFBrowser/DFBrowser_PropertyPanel.hxx +++ b/tools/DFBrowser/DFBrowser_PropertyPanel.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowser_PropertyPanel_H #define DFBrowser_PropertyPanel_H +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_SearchLine.cxx b/tools/DFBrowser/DFBrowser_SearchLine.cxx index 0b89cf9876..101eb37055 100644 --- a/tools/DFBrowser/DFBrowser_SearchLine.cxx +++ b/tools/DFBrowser/DFBrowser_SearchLine.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_SearchLine.hxx b/tools/DFBrowser/DFBrowser_SearchLine.hxx index 9ce3744080..ac8438613c 100644 --- a/tools/DFBrowser/DFBrowser_SearchLine.hxx +++ b/tools/DFBrowser/DFBrowser_SearchLine.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowser_SearchLine_H #define DFBrowser_SearchLine_H -#include // to include DFBrowser_SearchItemInfo +#include // to include DFBrowser_SearchItemInfo + #include #include #include diff --git a/tools/DFBrowser/DFBrowser_SearchLineModel.cxx b/tools/DFBrowser/DFBrowser_SearchLineModel.cxx index 052acc7f12..362b258ac9 100644 --- a/tools/DFBrowser/DFBrowser_SearchLineModel.cxx +++ b/tools/DFBrowser/DFBrowser_SearchLineModel.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -139,6 +139,8 @@ QVariant DFBrowser_SearchLineModel::data (const QModelIndex& theIndex, int theRo anIcon = DFBrowser_Module::GetAttributeInfo (anAttributeName.toUtf8().data(), myModule, DFBrowserPane_ItemRole_Decoration_40x40, 0); } + else + anIcon = DFBrowser_Tools::GetLabelIcon (TDF_Label(), false); return anIcon; } if (theRole == Qt::SizeHintRole) return QSize (80, 80); diff --git a/tools/DFBrowser/DFBrowser_SearchLineModel.hxx b/tools/DFBrowser/DFBrowser_SearchLineModel.hxx index dde4894609..cfc8e9b699 100644 --- a/tools/DFBrowser/DFBrowser_SearchLineModel.hxx +++ b/tools/DFBrowser/DFBrowser_SearchLineModel.hxx @@ -16,11 +16,12 @@ #ifndef DFBrowser_SearchLineModel_H #define DFBrowser_SearchLineModel_H -#include +#include +#include + #include #include #include -#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant diff --git a/tools/DFBrowser/DFBrowser_SearchView.cxx b/tools/DFBrowser/DFBrowser_SearchView.cxx index 6da5a5f160..c0416aa30c 100644 --- a/tools/DFBrowser/DFBrowser_SearchView.cxx +++ b/tools/DFBrowser/DFBrowser_SearchView.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_SearchView.hxx b/tools/DFBrowser/DFBrowser_SearchView.hxx index 5126b5d1de..44fc17728a 100644 --- a/tools/DFBrowser/DFBrowser_SearchView.hxx +++ b/tools/DFBrowser/DFBrowser_SearchView.hxx @@ -16,9 +16,10 @@ #ifndef DFBrowser_SearchView_H #define DFBrowser_SearchView_H -#include +#include +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_Shortcut.cxx b/tools/DFBrowser/DFBrowser_Shortcut.cxx index 2fb7f3aa96..2f644c5aa1 100644 --- a/tools/DFBrowser/DFBrowser_Shortcut.cxx +++ b/tools/DFBrowser/DFBrowser_Shortcut.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_Thread.cxx b/tools/DFBrowser/DFBrowser_Thread.cxx index 757ff8a7b4..a6ed15493e 100644 --- a/tools/DFBrowser/DFBrowser_Thread.cxx +++ b/tools/DFBrowser/DFBrowser_Thread.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx index fd973dc036..b734ba1589 100644 --- a/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx +++ b/tools/DFBrowser/DFBrowser_ThreadItemSearch.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -43,7 +43,6 @@ void DFBrowser_ThreadItemSearch::Run() myDocumentValues.clear(); myDocumentInfoValues.clear(); - //#define REQUIRE_OCAF_REVIEW:25 : start QMap anAdditionalValues; QStringList anInfoValues; QStringList aCurrentPath; @@ -62,7 +61,6 @@ void DFBrowser_ThreadItemSearch::Run() myDocumentValues[aDocId] = anAdditionalValues; myDocumentInfoValues[aDocId] = anInfoValues; } - //#define REQUIRE_OCAF_REVIEW:25 : end } // ======================================================================= @@ -116,8 +114,7 @@ void DFBrowser_ThreadItemSearch::addLabel (const TDF_Label& theLabel, const QStr if (!theValues.contains (anEntry)) { theInfoValues.append (anEntry); - theValues[anEntry] = DFBrowser_SearchItemInfo (DFBrowser_Tools::GetLabelIcon (theLabel, false), - anEntry, theCurrentPath, QDir::separator()); + theValues[anEntry] = DFBrowser_SearchItemInfo ("40x40_label_icon", anEntry, theCurrentPath, QDir::separator()); } } diff --git a/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx b/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx index 6640089b2d..b1112d1a00 100644 --- a/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx +++ b/tools/DFBrowser/DFBrowser_ThreadItemSearch.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowser_ThreadItemSearch_H #define DFBrowser_ThreadItemSearch_H -#include -#include // to include DFBrowser_SearchItemInfo +#include +#include // to include DFBrowser_SearchItemInfo + #include #include diff --git a/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.cxx b/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.cxx index 4b5eb787f2..5a80636808 100644 --- a/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.cxx +++ b/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include -#include -#include +#include +#include #include #include @@ -89,7 +89,10 @@ void DFBrowser_ThreadItemUsedShapesMap::ApplyValues() TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (aDFBrowserModel->FindIndexByAttribute (aRefIt.Key())); if (anItemBase) + { + anItemBase->Reset(); anItemBase->Init(); + } } // clear cache myAttributeRefs.Clear(); @@ -205,7 +208,6 @@ void DFBrowser_ThreadItemUsedShapesMap::addValue (const TCollection_AsciiString& // function : findReferences // purpose : // ======================================================================= -//#define REQUIRE_OCAF_REVIEW:26 : start void DFBrowser_ThreadItemUsedShapesMap::findReferences (Handle(TDF_Attribute) theAttribute, std::list& theReferences) { @@ -219,4 +221,3 @@ void DFBrowser_ThreadItemUsedShapesMap::findReferences (Handle(TDF_Attribute) th anEntryIt != anEntries.end(); anEntryIt++) theReferences.push_back (anEntryIt->first); } -//#define REQUIRE_OCAF_REVIEW:26 : end diff --git a/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.hxx b/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.hxx index d3635891b7..21ecd20138 100644 --- a/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.hxx +++ b/tools/DFBrowser/DFBrowser_ThreadItemUsedShapesMap.hxx @@ -16,7 +16,8 @@ #ifndef DFBROWSER_ThreadItemUsedShapesMap_H #define DFBROWSER_ThreadItemUsedShapesMap_H -#include +#include + #include #include #include diff --git a/tools/DFBrowser/DFBrowser_Tools.cxx b/tools/DFBrowser/DFBrowser_Tools.cxx index 71a57d0697..950ff0e055 100644 --- a/tools/DFBrowser/DFBrowser_Tools.cxx +++ b/tools/DFBrowser/DFBrowser_Tools.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include -#include -#include +#include +#include #include #include @@ -33,8 +33,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:27 - namespace DFBrowser_Tools { // ======================================================================= diff --git a/tools/DFBrowser/DFBrowser_Tools.hxx b/tools/DFBrowser/DFBrowser_Tools.hxx index 3753c502cc..65658a3b7c 100644 --- a/tools/DFBrowser/DFBrowser_Tools.hxx +++ b/tools/DFBrowser/DFBrowser_Tools.hxx @@ -16,9 +16,10 @@ #ifndef DFBrowser_Tools_H #define DFBrowser_Tools_H +#include + #include #include -#include #include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelLine.cxx b/tools/DFBrowser/DFBrowser_TreeLevelLine.cxx index c1be576f31..8714f4f357 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelLine.cxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelLine.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include -#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelLine.hxx b/tools/DFBrowser/DFBrowser_TreeLevelLine.hxx index bcd4b077e1..d24bd27464 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelLine.hxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelLine.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowser_TreeLevelLine_H #define DFBrowser_TreeLevelLine_H +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelLineDelegate.cxx b/tools/DFBrowser/DFBrowser_TreeLevelLineDelegate.cxx index 139584554f..9eb9cc5646 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelLineDelegate.cxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelLineDelegate.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelLineModel.cxx b/tools/DFBrowser/DFBrowser_TreeLevelLineModel.cxx index c1c0a4e152..acdb76368f 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelLineModel.cxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelLineModel.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelLineModel.hxx b/tools/DFBrowser/DFBrowser_TreeLevelLineModel.hxx index b486e363d2..e79467ee60 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelLineModel.hxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelLineModel.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowser_TreeLevelLineModel_H #define DFBrowser_TreeLevelLineModel_H +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelView.cxx b/tools/DFBrowser/DFBrowser_TreeLevelView.cxx index 9663e6f32d..60e899812c 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelView.cxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelView.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelView.hxx b/tools/DFBrowser/DFBrowser_TreeLevelView.hxx index 00a9a7c2ad..6b9118accb 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelView.hxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelView.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowser_TreeLevelView_H #define DFBrowser_TreeLevelView_H +#include + #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeLevelViewModel.cxx b/tools/DFBrowser/DFBrowser_TreeLevelViewModel.cxx index 1b85271c0d..e618568d51 100644 --- a/tools/DFBrowser/DFBrowser_TreeLevelViewModel.cxx +++ b/tools/DFBrowser/DFBrowser_TreeLevelViewModel.cxx @@ -13,18 +13,18 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include diff --git a/tools/DFBrowser/DFBrowser_TreeModel.cxx b/tools/DFBrowser/DFBrowser_TreeModel.cxx index af77057fdf..ce91e80566 100644 --- a/tools/DFBrowser/DFBrowser_TreeModel.cxx +++ b/tools/DFBrowser/DFBrowser_TreeModel.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -30,7 +30,6 @@ #include -//#define REQUIRE_OCAF_REVIEW:19 // ======================================================================= // function : Constructor // purpose : @@ -71,7 +70,6 @@ Handle(TDocStd_Application) DFBrowser_TreeModel::GetTDocStdApplication() const // ======================================================================= QModelIndex DFBrowser_TreeModel::FindIndex (const TDF_Label& theLabel) const { -//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences) TDF_Label aRoot = theLabel.Root(); NCollection_List aLabels; @@ -124,7 +122,6 @@ QModelIndex DFBrowser_TreeModel::FindIndex (const TDF_Label& theLabel) const } } } - //#define REQUIRE_OCAF_REVIEW:10 : end return aParentIndex; } @@ -233,10 +230,8 @@ QModelIndex DFBrowser_TreeModel::FindIndexByAttribute (Handle(TDF_Attribute) the void DFBrowser_TreeModel::ConvertToIndices (const NCollection_List& theReferences, QModelIndexList& theIndices) { -//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences) for (NCollection_List::Iterator aLabelItr (theReferences); aLabelItr.More(); aLabelItr.Next()) theIndices.append (FindIndex (aLabelItr.Value())); -//#define REQUIRE_OCAF_REVIEW:10 : end } // ======================================================================= diff --git a/tools/DFBrowser/DFBrowser_TreeModel.hxx b/tools/DFBrowser/DFBrowser_TreeModel.hxx index ebcd34b54c..1bc3b4b654 100644 --- a/tools/DFBrowser/DFBrowser_TreeModel.hxx +++ b/tools/DFBrowser/DFBrowser_TreeModel.hxx @@ -16,12 +16,13 @@ #ifndef DFBrowser_TreeModel_H #define DFBrowser_TreeModel_H -#include +#include +#include + #include #include #include #include -#include #include #include diff --git a/tools/DFBrowser/DFBrowser_TreeView.cxx b/tools/DFBrowser/DFBrowser_TreeView.cxx index 9ac42fc1cb..33658169d1 100644 --- a/tools/DFBrowser/DFBrowser_TreeView.cxx +++ b/tools/DFBrowser/DFBrowser_TreeView.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include // ======================================================================= // function : SetPredefinedSize diff --git a/tools/DFBrowser/DFBrowser_Window.cxx b/tools/DFBrowser/DFBrowser_Window.cxx index 8c5c2602f1..640dfd1f2c 100644 --- a/tools/DFBrowser/DFBrowser_Window.cxx +++ b/tools/DFBrowser/DFBrowser_Window.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -21,40 +21,44 @@ #include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -100,7 +104,7 @@ const int DEFAULT_BROWSER_HEIGHT = 800; // purpose : // ======================================================================= DFBrowser_Window::DFBrowser_Window() -: myModule (0), myParent (0), myPropertyPanel (0) +: myModule (0), myParent (0), myPropertyPanel (0), myExportToShapeViewDialog (0) { myMainWindow = new QMainWindow (0); @@ -237,6 +241,72 @@ void DFBrowser_Window::UpdateContent() myParameters->SetFileNames(aName, NCollection_List()); } onUpdateClicked(); + + // make parameter items selected if defined + if (myParameters->FindSelectedNames(aName)) + { + const NCollection_List& aSelected = myParameters->GetSelectedNames (aName); + + DFBrowser_TreeModel* aTreeModel = dynamic_cast (myTreeView->model()); + Handle(TDocStd_Application) anApplication = aTreeModel->GetTDocStdApplication(); + + QItemSelectionModel* aSelectionModel = myTreeView->selectionModel(); + aSelectionModel->clear(); + + NCollection_List::Iterator aSelectedIt (aSelected); + if (aSelectedIt.More()) + { + TCollection_AsciiString aLabelEntry = aSelectedIt.Value(); + + TDF_Label aLabel; + for (Standard_Integer aDocId = 1, aNbDoc = anApplication->NbDocuments(); aDocId <= aNbDoc; aDocId++) + { + Handle(TDocStd_Document) aDocument; + anApplication->GetDocument (aDocId, aDocument); + + TDF_Tool::Label(aDocument->GetData(), aLabelEntry.ToCString(), aLabel, Standard_False); + if (!aLabel.IsNull()) + break; + } + if (!aLabel.IsNull()) + { + QModelIndex anIndexToBeSelected = aTreeModel->FindIndex (aLabel); + + TCollection_AsciiString anAttributeType; + aSelectedIt.Next(); + // find attribute by attribute type on the given label + if (aSelectedIt.More()) + { + anAttributeType = aSelectedIt.Value(); + + TreeModel_ItemBasePtr aLabelItem = TreeModel_ModelBase::GetItemByIndex (anIndexToBeSelected); + //DFBrowser_ItemPtr anItem = itemDynamicCast (anItemBase); + for (int aChildId = 0, aNbChildren = aLabelItem->rowCount(); aChildId < aNbChildren; aChildId++) + { + QModelIndex anIndex = aTreeModel->index (aChildId, 0, anIndexToBeSelected); + TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex); + DFBrowser_ItemPtr anItem = itemDynamicCast (anItemBase); + if (anItem->HasAttribute()) + { + // processing attribute in theValue + DFBrowser_ItemApplicationPtr aRootAppItem = itemDynamicCast(aTreeModel->RootItem (0)); + QString anAttributeInfo = DFBrowser_Module::GetAttributeInfo (anItem->GetAttribute(), aRootAppItem->GetModule(), + Qt::DisplayRole, 0).toString(); + if (anAttributeInfo == anAttributeType.ToCString()) + { + anIndexToBeSelected = anIndex; + break; + } + } + } + } + aSelectionModel->select (anIndexToBeSelected, QItemSelectionModel::Select); + myTreeView->scrollTo (anIndexToBeSelected); + } + } + + myParameters->SetSelectedNames(aName, NCollection_List()); + } } // ======================================================================= @@ -326,8 +396,6 @@ void DFBrowser_Window::Init (const NCollection_List& // ======================================================================= void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName) { - //#define REQUIRE_OCAF_REVIEW:28 (check that previous application is correctly closed) : start - QApplication::setOverrideCursor (Qt::WaitCursor); myThread->TerminateThread(); @@ -389,7 +457,6 @@ void DFBrowser_Window::OpenFile (const TCollection_AsciiString& theFileName) myModule->SetInitialTreeViewSelection(); QApplication::restoreOverrideCursor(); } - //#define REQUIRE_OCAF_REVIEW:28 (check that previous application is correctly closed) : end } // ======================================================================= @@ -665,18 +732,27 @@ void DFBrowser_Window::onPaneSelectionChanged (const QItemSelection&, return; TCollection_AsciiString aPluginName ("TKShapeView"); - if (!myParameters->FindParameters (aPluginName)) - return; + NCollection_List aParameters; + if (myParameters->FindParameters (aPluginName)) + aParameters = myParameters->Parameters (aPluginName); - NCollection_List aParameters = myParameters->Parameters (aPluginName); int aParametersCount = aParameters.Extent(); anAttributePane->GetSelectionParameters (aSelectionModel, aParameters); if (aParametersCount != aParameters.Extent()) // some TShapes are added { - myParameters->SetParameters (aPluginName, aParameters); - QMessageBox::information (0, "Information", QString ("TShape %1 is sent to %2 tool.") - .arg (DFBrowserPane_Tools::GetPointerInfo (aParameters.Last()).ToCString()) - .arg (aPluginName.ToCString())); + TCollection_AsciiString aPluginShortName = aPluginName.SubString (3, aPluginName.Length()); + QString aMessage = QString ("TShape %1 is sent to %2.") + .arg (DFBrowserPane_Tools::GetPointerInfo (aParameters.Last()).ToCString()) + .arg (aPluginShortName.ToCString()); + QString aQuestion = QString ("Would you like to activate %1 immediately?\n") + .arg (aPluginShortName.ToCString()).toStdString().c_str(); + if (!myExportToShapeViewDialog) + myExportToShapeViewDialog = new TreeModel_MessageDialog (myParent, aMessage, aQuestion); + else + myExportToShapeViewDialog->SetInformation (aMessage); + myExportToShapeViewDialog->Start(); + + myParameters->SetParameters (aPluginName, aParameters, myExportToShapeViewDialog->IsAccepted()); } return; } @@ -700,9 +776,7 @@ void DFBrowser_Window::onPaneSelectionChanged (const QItemSelection&, Handle(TDF_Attribute) anAttribute = myModule->FindAttribute (aSelectedIndex); NCollection_List aReferences; Handle(Standard_Transient) aPresentation; -//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences) anAttributePane->GetReferences (anAttribute, aReferences, aPresentation); -//#define REQUIRE_OCAF_REVIEW:10 : end QModelIndexList anIndices; DFBrowser_TreeModel* aTreeModel = dynamic_cast (myTreeView->model()); if (!aReferences.IsEmpty()) diff --git a/tools/DFBrowser/DFBrowser_Window.hxx b/tools/DFBrowser/DFBrowser_Window.hxx index 9c1ace1609..20dd55b6f6 100644 --- a/tools/DFBrowser/DFBrowser_Window.hxx +++ b/tools/DFBrowser/DFBrowser_Window.hxx @@ -16,13 +16,14 @@ #ifndef DFBrowser_Window_H #define DFBrowser_Window_H +#include + #include #include #include #include #include #include -#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant @@ -39,6 +40,8 @@ class DFBrowser_Shortcut; class DFBrowser_Thread; class DFBrowser_TreeLevelLine; +class TreeModel_MessageDialog; + class View_ToolBar; class View_Window; @@ -234,6 +237,7 @@ private: DFBrowser_DumpView* myDumpView; //!< Text editor where "Dump" method output is shown DFBrowser_Thread* myThread; //!< Threads manipulator, starting thread items, listens finalizing DFBrowser_Shortcut* myShortcut; //!< Short cut processor, F5 - updates OCAF view model content + TreeModel_MessageDialog* myExportToShapeViewDialog; //!< dialog about exporting TopoDS_Shape to ShapeView plugin Handle(TInspectorAPI_PluginParameters) myParameters; //!< contains application, context, files that should be opened }; diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePane.cxx b/tools/DFBrowserPane/DFBrowserPane_AttributePane.cxx index 9d350142ca..bdcc8a3d9e 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePane.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePane.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -27,8 +27,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:3 : start - // ======================================================================= // function : Constructor // purpose : @@ -154,4 +152,3 @@ QMap DFBrowserPane_AttributePane::getTableColumnWidths() const aValues.insert (aColumnId, DFBrowserPane_Tools::DefaultPanelColumnWidth (aColumnId)); return aValues; } -//#define REQUIRE_OCAF_REVIEW:2 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePane.hxx b/tools/DFBrowserPane/DFBrowserPane_AttributePane.hxx index f5298ab624..972ad80ca7 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePane.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePane.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPane_AttributePane_H #define DFBrowserPane_AttributePane_H -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.cxx b/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.cxx index bcb80c70cc..9869790ed4 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include // the types are defined in TDF library -#include -#include +#include +#include #include #include @@ -68,61 +68,60 @@ // the types are defined in TDataStd.cdl // Basic attributes -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include //Extension -#include -#include -#include +#include +#include +#include // Lists: -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // Arrays: -#include -#include -#include -#include +#include +#include +#include +#include // TDocStd attributes -#include -#include -#include -#include +#include +#include +#include +#include // TPrsStd attributes -#include -#include +#include +#include // TNaming attributes -#include -#include -#include +#include +#include +#include // TFunction attributes -#include -#include -#include +#include +#include +#include -//#define REQUIRE_OCAF_REVIEW:1 : start // ======================================================================= // function : Constructor // purpose : @@ -216,5 +215,3 @@ DFBrowserPane_AttributePaneAPI* DFBrowserPane_AttributePaneCreator::CreateAttrib return aPane; } - -//#define REQUIRE_OCAF_REVIEW : end diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.hxx b/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.hxx index 23f4539149..5e4fdb89bd 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePaneCreator.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowserPane_AttributePaneCreator_H #define DFBrowserPane_AttributePaneCreator_H -#include -#include +#include +#include + #include //! \class DFBrowserPane_AttributePaneCreator diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.cxx b/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.cxx index 3ec1c978d0..ff6aac7f01 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePaneModel.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include // ======================================================================= // function : Constructor diff --git a/tools/DFBrowserPane/DFBrowserPane_AttributePaneSelector.cxx b/tools/DFBrowserPane/DFBrowserPane_AttributePaneSelector.cxx index 951807a143..870a2f68d4 100644 --- a/tools/DFBrowserPane/DFBrowserPane_AttributePaneSelector.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_AttributePaneSelector.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_HelperArray.cxx b/tools/DFBrowserPane/DFBrowserPane_HelperArray.cxx index c5dc6c26ed..7848c10ece 100644 --- a/tools/DFBrowserPane/DFBrowserPane_HelperArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_HelperArray.cxx @@ -13,17 +13,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include -#include +#include #include #include #include #include -//#define REQUIRE_OCAF_REVIEW:6 : start // ======================================================================= // function : Constructor // purpose : @@ -86,4 +85,3 @@ void DFBrowserPane_HelperArray::GetShortAttributeInfo (const Handle(TDF_Attribut for (int aRowId = 0, aRows = myValuesModel->rowCount(); aRowId < aRows; aRowId++) theValues.append (myValuesModel->data (myValuesModel->index (aRowId, 0))); } -//#define REQUIRE_OCAF_REVIEW:6 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_HelperExport.cxx b/tools/DFBrowserPane/DFBrowserPane_HelperExport.cxx index 39155d41aa..9cdf77fae4 100644 --- a/tools/DFBrowserPane/DFBrowserPane_HelperExport.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_HelperExport.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_HelperExport.hxx b/tools/DFBrowserPane/DFBrowserPane_HelperExport.hxx index 0cd6e3214e..2760592458 100644 --- a/tools/DFBrowserPane/DFBrowserPane_HelperExport.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_HelperExport.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPane_HelperExport_H #define DFBrowserPane_HelperExport_H -#include +#include #include #ifdef _MSC_VER diff --git a/tools/DFBrowserPane/DFBrowserPane_HelperGroupContent.cxx b/tools/DFBrowserPane/DFBrowserPane_HelperGroupContent.cxx index 1784239fb2..fff0ba17f8 100644 --- a/tools/DFBrowserPane/DFBrowserPane_HelperGroupContent.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_HelperGroupContent.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_ItemDelegateButton.cxx b/tools/DFBrowserPane/DFBrowserPane_ItemDelegateButton.cxx index a93f539d5a..4c8652017d 100644 --- a/tools/DFBrowserPane/DFBrowserPane_ItemDelegateButton.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_ItemDelegateButton.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFReference.cxx b/tools/DFBrowserPane/DFBrowserPane_TDFReference.cxx index 427b089e3f..12197a9597 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDFReference.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDFReference.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFReference.hxx b/tools/DFBrowserPane/DFBrowserPane_TDFReference.hxx index 322080253a..2c71d42317 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDFReference.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDFReference.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDFReference_H #define DFBrowserPane_TDFReference_H -#include +#include + #include //! \class DFBrowserPane_TDFReference diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx index 6e5d242ef2..b9ccdc7556 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx index 642ced4192..ec23701f54 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDFTagSource.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDFTagSource_H #define DFBrowserPane_TDFTagSource_H -#include +#include + #include //! \class DFBrowserPane_TDFTagSource diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx index d82cf2f0da..d4a357adf6 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.cxx @@ -13,14 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include #include -//#define REQUIRE_OCAF_REVIEW:4 : start // ======================================================================= // function : GetValues // purpose : @@ -32,4 +31,3 @@ void DFBrowserPane_TDataStdAsciiString::GetValues (const Handle(TDF_Attribute)& if (!anAttribute.IsNull()) theValues.append (anAttribute->Get().ToCString()); } -//#define REQUIRE_OCAF_REVIEW:4 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx index 5881db86b1..f254fb5abe 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdAsciiString.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdAsciiString_H #define DFBrowserPane_TDataStdAsciiString_H -#include +#include + #include //! \class DFBrowserPane_TDataStdAsciiString diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx index 6c90ec2eb6..e6f8749bef 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -28,7 +28,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:5 : start // ======================================================================= // function : CreateWidget // purpose : @@ -84,4 +83,3 @@ void DFBrowserPane_TDataStdBooleanArray::GetShortAttributeInfo (const Handle(TDF myArrayTableHelper.Init (aValues); return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues); } -//#define REQUIRE_OCAF_REVIEW:5 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx index dff3588032..12b391577a 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdBooleanArray_H #define DFBrowserPane_TDataStdBooleanArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdBooleanArray //! \brief The class to manipulate of TDataStd_BooleanArray attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx index 4c33194ee1..f16c641e6d 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx index 5cb2a9d435..976660f9eb 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdBooleanList.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdBooleanList_H #define DFBrowserPane_TDataStdBooleanList_H -#include +#include + #include //! \class DFBrowserPane_TDataStdBooleanList diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx index cd0424c124..94d5ad9c16 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx index 907c5b8fc3..ff2c995251 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdByteArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdByteArray_H #define DFBrowserPane_TDataStdByteArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdByteArray //! \brief The class to manipulate of TDataStd_ByteArra attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx index 27e7f6c05b..482aab26c4 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx index ca2b861452..94bce618dc 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdComment.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdComment_H #define DFBrowserPane_TDataStdComment_H -#include +#include + #include //! \class DFBrowserPane_TDataStdComment diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx index 9e89559cb1..eade6ead4e 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx index 70162601a9..e545148663 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdCurrent.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdCurrent_H #define DFBrowserPane_TDataStdCurrent_H -#include +#include + #include //! \class DFBrowserPane_TDataStdCurrent diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx index 18dfa0e01e..6437bad91a 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx index c9e0855f9b..d91fe71eb1 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdDirectory.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdDirectory_H #define DFBrowserPane_TDataStdDirectory_H -#include +#include + #include //! \class DFBrowserPane_TDataStdDirectory diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx index 74394bd370..bea934fa48 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx index 6f9a908f80..dc0afb86aa 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExpression.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdExpression_H #define DFBrowserPane_TDataStdExpression_H -#include +#include + #include //! \class DFBrowserPane_TDataStdExpression diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx index dad9a52a70..23a2aa5da8 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx index 5bd1eecc40..ad18e5b99f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdExtStringArray_H #define DFBrowserPane_TDataStdExtStringArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdExtStringArray //! \brief The class to manipulate of TDataStd_ExtStringArray attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx index 141f9db5df..179dfc473c 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include @@ -22,7 +22,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:7 : start (DFBrowserPane_Tools) // ======================================================================= // function : GetValues // purpose : @@ -36,4 +35,3 @@ void DFBrowserPane_TDataStdExtStringList::GetValues (const Handle(TDF_Attribute) for (TDataStd_ListIteratorOfListOfExtendedString aValuesIt(anAttribute->List()); aValuesIt.More(); aValuesIt.Next()) theValues.append (DFBrowserPane_Tools::ToString (aValuesIt.Value())); } -//#define REQUIRE_OCAF_REVIEW:7 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx index ebe1c84064..64f81f25ae 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdExtStringList.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdExtStringList_H #define DFBrowserPane_TDataStdExtStringList_H -#include +#include + #include //! \class DFBrowserPane_TDataStdExtStringList diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx index 7256cc1e48..7af9521ef2 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx index e423a19b7c..03fad8c712 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntPackedMap.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdIntPackedMap_H #define DFBrowserPane_TDataStdIntPackedMap_H -#include +#include + #include //! \class DFBrowserPane_TDataStdIntPackedMap diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx index 81e395753f..b2ca9afbce 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx index 77f961e4dd..96a2acaaa7 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdInteger.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdInteger_H #define DFBrowserPane_TDataStdInteger_H -#include +#include + #include //! \class DFBrowserPane_TDataStdInteger diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx index 01bd09a210..bf03586c9f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx index 2777b9cba6..1e28774cc1 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdIntegerArray_H #define DFBrowserPane_TDataStdIntegerArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdIntegerArray //! \brief The class to manipulate of TDataStd_IntegerArray attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx index 5eea2e3733..969960f334 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx index 314671618a..b916b1215b 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdIntegerList.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdIntegerList_H #define DFBrowserPane_TDataStdIntegerList_H -#include +#include + #include //! \class DFBrowserPane_TDataStdIntegerList diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx index 2551bff1b4..cc386a2280 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx index cc227019cd..a1aa102773 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdName.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdName_H #define DFBrowserPane_TDataStdName_H -#include +#include + #include //! \class DFBrowserPane_TDataStdName diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx index a31e6e99c4..0ceaa4309d 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -48,7 +48,6 @@ 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"; -//#define REQUIRE_OCAF_REVIEW:9 : start // ======================================================================= // function : Constructor // purpose : @@ -236,4 +235,3 @@ QList DFBrowserPane_TDataStdNamedData::getPartOfValues (const QString& } return aValues; } -//#define REQUIRE_OCAF_REVIEW:9 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx index 480379bea3..e8bf511d44 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdNamedData.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdNamedData_H #define DFBrowserPane_TDataStdNamedData_H -#include +#include + #include class DFBrowserPane_AttributePaneModel; diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx index 4b22a72279..8f904902e1 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx index dfb1d81104..501d0e35eb 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdNoteBook.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdNoteBook_H #define DFBrowserPane_TDataStdNoteBook_H -#include +#include + #include //! \class DFBrowserPane_TDataStdNoteBook diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx index d593b41b37..a85e2e0f50 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx index a083ae008e..7019b0d1dd 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReal.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdReal_H #define DFBrowserPane_TDataStdReal_H -#include +#include + #include //! \class DFBrowserPane_TDataStdReal diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx index ed76ecd59a..5523478e59 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx index e95511cfb2..02d9b5cc35 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdRealArray_H #define DFBrowserPane_TDataStdRealArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdRealArray //! \brief The class to manipulate of TDataStd_RealArray attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx index b419e8a6cf..debc605cfa 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx index c211372bac..cce96e2f1f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRealList.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdRealList_H #define DFBrowserPane_TDataStdRealList_H -#include +#include + #include //! \class DFBrowserPane_TDataStdRealList diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.cxx index 58973da213..efcbf82388 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -28,7 +28,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences) // ======================================================================= // function : CreateWidget // purpose : @@ -108,4 +107,3 @@ void DFBrowserPane_TDataStdReferenceArray::GetReferences (const Handle(TDF_Attri theRefLabels.Append (aLabel); } } -//#define REQUIRE_OCAF_REVIEW:10 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.hxx index a544d17869..6f32974fd9 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceArray.hxx @@ -16,10 +16,10 @@ #ifndef DFBrowserPane_TDataStdReferenceArray_H #define DFBrowserPane_TDataStdReferenceArray_H -#include -#include +#include +#include -#include +#include //! \class DFBrowserPane_TDataStdReferenceArray //! \brief The class to manipulate of TDataStd_ReferenceArray attribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.cxx index 54643b0a3e..49ece11480 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.hxx index 8e84b6a56c..a2b227691e 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdReferenceList.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdReferenceList_H #define DFBrowserPane_TDataStdReferenceList_H -#include +#include + #include //! \class DFBrowserPane_TDataStdReferenceList diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx index bb8076ae8c..05529ab19b 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx index 9035a81ff7..4d81123940 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdRelation.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdRelation_H #define DFBrowserPane_TDataStdRelation_H -#include +#include + #include //! \class DFBrowserPane_TDataStdRelation diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx index 5e9d27b191..d956d4e4dd 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx index a31056bf03..4b07cc621a 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTick.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdTick_H #define DFBrowserPane_TDataStdTick_H -#include +#include + #include //! \class DFBrowserPane_TDataStdTick diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.cxx index b1f20f369e..b1cd494a89 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -30,7 +30,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:11 // ======================================================================= // function : Constructor // purpose : @@ -55,9 +54,6 @@ QWidget* DFBrowserPane_TDataStdTreeNode::CreateWidget (QWidget* theParent) myTableView = new DFBrowserPane_TableView (aMainWidget, getTableColumnWidths()); DFBrowserPane_TableView::SetFixedRowCount (1, myTableView->GetTableView()); myTableView->SetModel (myPaneModel); - QTableView* aTableView = myTableView->GetTableView(); - aTableView->setSelectionModel (mySelectionModels.front()); - aTableView->setSelectionBehavior (QAbstractItemView::SelectRows); QVBoxLayout* aLay = new QVBoxLayout (aMainWidget); aLay->setContentsMargins (0, 0, 0, 0); diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.hxx index 79d1366ae2..9057060869 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNode.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdTreeNode_H #define DFBrowserPane_TDataStdTreeNode_H -#include +#include + #include class QAbstractItemModel; diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.cxx index c04896544a..99f1ec9c7e 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include -#include -#include +#include +#include #include #include @@ -29,8 +29,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:11 - // ======================================================================= // function : Init // purpose : diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.hxx index f1a98c728f..43dea90478 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeItem.hxx @@ -16,9 +16,10 @@ #ifndef DFBrowserPane_TDataStdTreeNodeItem_H #define DFBrowserPane_TDataStdTreeNodeItem_H +#include + #include #include -#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.cxx index 44f570eaf3..78f1f9489c 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.hxx index 4d08445bec..22bc9dad81 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdTreeNodeModel.hxx @@ -16,9 +16,10 @@ #ifndef DFBrowserPane_TDataStdTreeNodeMode_H #define DFBrowserPane_TDataStdTreeNodeMode_H +#include + #include #include -#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx index cb9638cedc..d8a152939d 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx index 12ea9020a5..a98fb4a498 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdUAttribute.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdUAttribute_H #define DFBrowserPane_TDataStdUAttribute_H -#include +#include + #include //! \class DFBrowserPane_TDataStdUAttribute diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx index cf70e27daa..e23d3b88f1 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx index 2f30e16240..5bb6efa8e6 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDataStdVariable.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDataStdVariable_H #define DFBrowserPane_TDataStdVariable_H -#include +#include + #include //! \class DFBrowserPane_TDataStdVariable diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx index c5f1152013..f2fdcff8ce 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx index 0b223f5489..2f52c31d60 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdModified.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDocStdModified_H #define DFBrowserPane_TDocStdModified_H -#include +#include + #include //! \class DFBrowserPane_TDocStdModified diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx index 9fc7efe300..7c1b217264 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -31,7 +31,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:12 // ======================================================================= // function : Constructor // purpose : diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx index d961a63e0b..142b8900fd 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdOwner.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDocStdOwner_H #define DFBrowserPane_TDocStdOwner_H -#include +#include + #include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx index e9081b6b86..13b802b877 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx index 4e6c34c6ad..da9deefdf5 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLink.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDocStdXLink_H #define DFBrowserPane_TDocStdXLink_H -#include +#include + #include //! \class DFBrowserPane_TDocStdXLink diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx index 4462f43480..c9cb50c062 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx index e0b6c04a9f..60e6ce7f3f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TDocStdXLinkRoot.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TDocStdXLinkRoot_H #define DFBrowserPane_TDocStdXLinkRoot_H -#include +#include + #include //! \class DFBrowserPane_TDocStdXLinkRoot diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx index f5ce3cd548..9622a86b48 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx index a45e355593..46745c4fe3 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionFunction.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TFunctionFunction_H #define DFBrowserPane_TFunctionFunction_H -#include +#include + #include //! \class DFBrowserPane_TFunctionFunction diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx index fdfa94dc5d..1b659fc127 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx index e3caef7020..11f44e8723 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionGraphNode.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TFunctionGraphNode_H #define DFBrowserPane_TFunctionGraphNode_H -#include +#include + #include //! \class DFBrowserPane_TFunctionGraphNode diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx index 64de46cc66..6a754518c8 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx index e65d814d48..67ecf8035f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TFunctionScope.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TFunctionScope_H #define DFBrowserPane_TFunctionScope_H -#include +#include + #include //! \class DFBrowserPane_TFunctionScope diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx b/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx index 7488fe1588..8257fe8bca 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -52,7 +52,6 @@ const int COLUMN_POINTER_WIDTH = 110; const int COLUMN_REFERENCE_WIDTH = 90; const int COLUMN_EVOLUTION_WIDTH = 90; -//#define REQUIRE_OCAF_REVIEW:13 // ======================================================================= // function : Constructor // purpose : diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.hxx b/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.hxx index 84020e2f37..4efe150296 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingNamedShape.hxx @@ -16,8 +16,9 @@ #ifndef DFBrowserPane_TNamingNamedShape_H #define DFBrowserPane_TNamingNamedShape_H -#include -#include +#include +#include + #include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.cxx b/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.cxx index f3001ba9b6..a4d52e86b1 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.cxx @@ -13,14 +13,14 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -36,7 +36,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:14 // ======================================================================= // function : Constructor // purpose : diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.hxx b/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.hxx index 2aae1ec089..73e5d87b18 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingNaming.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TNamingNaming_H #define DFBrowserPane_TNamingNaming_H -#include +#include + #include class DFBrowserPane_AttributePaneModel; diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.cxx b/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.cxx index ea25583bf0..9f4d68dce2 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.cxx @@ -13,15 +13,15 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -39,7 +39,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:15 // ======================================================================= // function : Constructor // purpose : @@ -138,7 +137,7 @@ void DFBrowserPane_TNamingUsedShapes::GetShortAttributeInfo (const Handle(TDF_At if (anAttribute.IsNull()) return; - theValues.append (QString ("[%1]").arg (anAttribute->Map().Extent())); + theValues.append (QString ("%1").arg (anAttribute->Map().Extent())); } // ======================================================================= diff --git a/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.hxx b/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.hxx index ffbe64266e..9ed95c950c 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TNamingUsedShapes.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TNamingUsedShapes_H #define DFBrowserPane_TNamingUsedShapes_H -#include +#include + #include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx index 73f14d7b9c..42b1e0a356 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.cxx @@ -13,17 +13,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include #include #include -//#define REQUIRE_OCAF_REVIEW:16 // ======================================================================= // function : Constructor // purpose : diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx index e806c8c918..d925f816da 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISPresentation.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TPrsStdAISPresentation_H #define DFBrowserPane_TPrsStdAISPresentation_H -#include +#include + #include //! \class DFBrowserPane_TPrsStdAISPresentation diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx index c9b60b63fc..c00555029f 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx index f115975b4a..f1e7e8d48b 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_TPrsStdAISViewer.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_TPrsStdAISViewer_H #define DFBrowserPane_TPrsStdAISViewer_H -#include +#include + #include //! \class DFBrowserPane_TPrsStdAISViewer diff --git a/tools/DFBrowserPane/DFBrowserPane_TableView.cxx b/tools/DFBrowserPane/DFBrowserPane_TableView.cxx index a65336f81d..97706d1b63 100644 --- a/tools/DFBrowserPane/DFBrowserPane_TableView.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_TableView.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowserPane/DFBrowserPane_Tools.cxx b/tools/DFBrowserPane/DFBrowserPane_Tools.cxx index 22bd3dbd59..b95d968e0b 100644 --- a/tools/DFBrowserPane/DFBrowserPane_Tools.cxx +++ b/tools/DFBrowserPane/DFBrowserPane_Tools.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -39,7 +39,6 @@ #include -//#define REQUIRE_OCAF_REVIEW:8 : start const int TABLE_COLUMN_0_WIDTH = 200; const int TABLE_COLUMN_OTHER_WIDTH = 120; @@ -132,4 +131,3 @@ TCollection_AsciiString DFBrowserPane_Tools::ToName (const DFBrowserPane_OcctEnu } return aSStream.str().c_str(); } -//#define REQUIRE_OCAF_REVIEW:8 : end diff --git a/tools/DFBrowserPane/DFBrowserPane_Tools.hxx b/tools/DFBrowserPane/DFBrowserPane_Tools.hxx index e7b7c3d8e3..5508708f33 100644 --- a/tools/DFBrowserPane/DFBrowserPane_Tools.hxx +++ b/tools/DFBrowserPane/DFBrowserPane_Tools.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPane_Tools_H #define DFBrowserPane_Tools_H -#include +#include + #include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx index 73c8840202..26465b23b8 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx index 846cd9713d..64adc76aa1 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributeCommonPane.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_AttributeCommonPane_H #define DFBrowserPaneXDE_AttributeCommonPane_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx index 3a6bf041a8..8c0641fe11 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.cxx @@ -13,26 +13,26 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -57,7 +57,6 @@ #include #include -//#define REQUIRE_OCAF_REVIEW:2 : start // ======================================================================= // function : Constructor // purpose : @@ -137,4 +136,3 @@ DFBrowserPane_AttributePaneAPI* DFBrowserPaneXDE_AttributePaneCreator::createXDE aPane = new DFBrowserPaneXDE_XCAFDocShapeTool(); return aPane; } -//#define REQUIRE_OCAF_REVIEW:2 : end diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx index 097de00ab2..2520a02651 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_AttributePaneCreator.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H #define DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx index 24c9f3092d..46b7cbdbb0 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_Tools.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx index 4499960227..dd0017eeeb 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx index 0d2f20aaf5..5098d7b7c9 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocArea.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocArea_H #define DFBrowserPaneXDE_XCAFDocArea_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx index 8ca936128f..e5e17c01c0 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx index b143d964cd..90683296a6 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocCentroid.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocCentroid_H #define DFBrowserPaneXDE_XCAFDocCentroid_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx index d517b6b946..d0f2596d2f 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx index 5698ae50c9..de4fb781fb 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColor.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocColor_H #define DFBrowserPaneXDE_XCAFDocColor_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx index 558b2d6962..1e6202e84c 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include // ======================================================================= diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx index 178b77d0eb..f445f022af 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocColorTool.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocColorTool_H #define DFBrowserPaneXDE_XCAFDocColorTool_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx index f3ee134508..d7bbc92223 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx index c17a09187c..7aedc1d271 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDatum.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocDatum_H #define DFBrowserPaneXDE_XCAFDocDatum_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx index b011452873..6024a3dccf 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx index 1719bb4b1e..cf8171e2d3 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTol.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocDimTol_H #define DFBrowserPaneXDE_XCAFDocDimTol_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx index a6ca6f16b3..21c9af9595 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx index 7231abf586..c69e0b1385 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocDimTolTool_H #define DFBrowserPaneXDE_XCAFDocDimTolTool_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx index 9bb71467f1..67b42270c1 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx index aa5accf1a9..bb75c8722c 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDimension.hxx @@ -16,7 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocDimension_H #define DFBrowserPaneXDE_XCAFDocDimension_H -#include +#include + #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx index ebc44ab7a1..0366a0b41b 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx index 88203b95e9..12217219d6 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocDocumentTool_H #define DFBrowserPaneXDE_XCAFDocDocumentTool_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx index 499ee956f8..bacf238c5c 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx index 5c1520b53a..7afad776cf 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocGeomTolerance_H #define DFBrowserPaneXDE_XCAFDocGeomTolerance_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx index 4f06db431f..aa3fc5b4c6 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx index 70847970ad..798b4dd658 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocGraphNode.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocGraphNode_H #define DFBrowserPaneXDE_XCAFDocGraphNode_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx index 50ce324888..d3f0b0b70f 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx index 5c06c1e3e9..95e8d5b3ac 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLayerTool.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocLayerTool_H #define DFBrowserPaneXDE_XCAFDocLayerTool_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx index 692b28ade4..790cb24ec6 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx index be53fb3e95..d1f4a100f4 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocLocation.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocLocation_H #define DFBrowserPaneXDE_XCAFDocLocation_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx index 7f430234e1..ace15f9fff 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx index 0fb82f4cfc..c457e18e5b 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterial.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocMaterial_H #define DFBrowserPaneXDE_XCAFDocMaterial_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx index 12088e8efe..00bc4217ad 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx index d5b1f543db..085aa00b8b 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocMaterialTool_H #define DFBrowserPaneXDE_XCAFDocMaterialTool_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx index 343570d817..b4a98f201f 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.cxx @@ -13,13 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx index 28933820d7..1090ccef4a 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx @@ -16,8 +16,8 @@ #ifndef DFBrowserPaneXDE_XCAFDocShapeMapTool_H #define DFBrowserPaneXDE_XCAFDocShapeMapTool_H -#include -#include +#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx index 731d376ccd..7a7aa80dda 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx index 4c599a3f69..703bbda988 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XCAFDocShapeTool.hxx @@ -16,7 +16,7 @@ #ifndef DFBrowserPaneXDE_XCAFDocShapeTool_H #define DFBrowserPaneXDE_XCAFDocShapeTool_H -#include +#include #include #include diff --git a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx index 75d663ecdd..17280152c4 100644 --- a/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx +++ b/tools/DFBrowserPaneXDE/DFBrowserPaneXDE_XDEDRAW.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/ShapeView/ShapeView_Communicator.cxx b/tools/ShapeView/ShapeView_Communicator.cxx index 5ecff2ef8d..c1d89ecd41 100644 --- a/tools/ShapeView/ShapeView_Communicator.cxx +++ b/tools/ShapeView/ShapeView_Communicator.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include #include #include diff --git a/tools/ShapeView/ShapeView_Communicator.hxx b/tools/ShapeView/ShapeView_Communicator.hxx index 535b9d28fc..a32657a03e 100644 --- a/tools/ShapeView/ShapeView_Communicator.hxx +++ b/tools/ShapeView/ShapeView_Communicator.hxx @@ -16,8 +16,8 @@ #ifndef ShapeView_Communicator_H #define ShapeView_Communicator_H -#include -#include +#include +#include //! \class ShapeView_Communicator. //! \brief This is a connector from TInspector application to ShapeView window diff --git a/tools/ShapeView/ShapeView_ItemBase.hxx b/tools/ShapeView/ShapeView_ItemBase.hxx index 535c87175c..3e0559c501 100644 --- a/tools/ShapeView/ShapeView_ItemBase.hxx +++ b/tools/ShapeView/ShapeView_ItemBase.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include class ShapeView_ItemBase; typedef QExplicitlySharedDataPointer ShapeView_ItemBasePtr; diff --git a/tools/ShapeView/ShapeView_ItemRoot.cxx b/tools/ShapeView/ShapeView_ItemRoot.cxx index 6d784bb88c..64d1dbec32 100644 --- a/tools/ShapeView/ShapeView_ItemRoot.cxx +++ b/tools/ShapeView/ShapeView_ItemRoot.cxx @@ -14,8 +14,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include // ======================================================================= // function : GetShape diff --git a/tools/ShapeView/ShapeView_ItemRoot.hxx b/tools/ShapeView/ShapeView_ItemRoot.hxx index 63b95efd42..370ab5b272 100644 --- a/tools/ShapeView/ShapeView_ItemRoot.hxx +++ b/tools/ShapeView/ShapeView_ItemRoot.hxx @@ -17,7 +17,7 @@ #define ShapeView_ItemRoot_H #include -#include +#include #include #include diff --git a/tools/ShapeView/ShapeView_ItemShape.cxx b/tools/ShapeView/ShapeView_ItemShape.cxx index 631e116261..88bf5f0985 100644 --- a/tools/ShapeView/ShapeView_ItemShape.cxx +++ b/tools/ShapeView/ShapeView_ItemShape.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/tools/ShapeView/ShapeView_ItemShape.hxx b/tools/ShapeView/ShapeView_ItemShape.hxx index 3ab29ceb47..eaac833772 100644 --- a/tools/ShapeView/ShapeView_ItemShape.hxx +++ b/tools/ShapeView/ShapeView_ItemShape.hxx @@ -16,7 +16,7 @@ #ifndef ShapeView_ItemShape_H #define ShapeView_ItemShape_H -#include +#include #include #include #include @@ -45,7 +45,7 @@ public: virtual ~ShapeView_ItemShape() Standard_OVERRIDE {}; //! Returns the current shape - const TopoDS_Shape& GetItemShape() const { return myShape; } + const TopoDS_Shape& GetItemShape() const { initItem(); return myShape; } //! Returns child(extracted) shape for the current shape by the index //! \param theRowId an index of child shape diff --git a/tools/ShapeView/ShapeView_OpenFileDialog.cxx b/tools/ShapeView/ShapeView_OpenFileDialog.cxx index 8c027418f6..06cad9da18 100644 --- a/tools/ShapeView/ShapeView_OpenFileDialog.cxx +++ b/tools/ShapeView/ShapeView_OpenFileDialog.cxx @@ -13,8 +13,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include #include #include @@ -208,7 +208,8 @@ void ShapeView_OpenFileDialog::onSelectClicked() anEnteredPath = aDirName; } - QString aFileName = QFileDialog::getOpenFileName (0, "Open document", anEnteredPath); + QString aFilter (tr ("BREP file (*.brep*)")); + QString aFileName = QFileDialog::getOpenFileName (0, "Open document", anEnteredPath, aFilter); if (aFileName.isEmpty()) return; // do nothing, left the previous value diff --git a/tools/ShapeView/ShapeView_OpenFileViewModel.cxx b/tools/ShapeView/ShapeView_OpenFileViewModel.cxx index 01dc6af59c..12db8132b8 100644 --- a/tools/ShapeView/ShapeView_OpenFileViewModel.cxx +++ b/tools/ShapeView/ShapeView_OpenFileViewModel.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/ShapeView/ShapeView_Tools.cxx b/tools/ShapeView/ShapeView_Tools.cxx index 4968689054..72a5d6649c 100644 --- a/tools/ShapeView/ShapeView_Tools.cxx +++ b/tools/ShapeView/ShapeView_Tools.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/ShapeView/ShapeView_TreeModel.cxx b/tools/ShapeView/ShapeView_TreeModel.cxx index 2f5f49bc1c..a44b112544 100644 --- a/tools/ShapeView/ShapeView_TreeModel.cxx +++ b/tools/ShapeView/ShapeView_TreeModel.cxx @@ -13,8 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include +#include +#include +#include +#include +#include // ======================================================================= // function : Constructor @@ -84,3 +87,39 @@ QVariant ShapeView_TreeModel::headerData (int theSection, Qt::Orientation theOri } return QVariant(); } + +// ======================================================================= +// function : FindIndex +// purpose : +// ======================================================================= +QModelIndex ShapeView_TreeModel::FindIndex (const TopoDS_Shape& theShape) const +{ + QModelIndex aParentIndex = index (0, 0); + TreeModel_ItemBasePtr aParentItem = TreeModel_ModelBase::GetItemByIndex (aParentIndex); // application item + for (int aChildId = 0, aCount = aParentItem->rowCount(); aChildId < aCount; aChildId++) + { + QModelIndex anIndex = index (aChildId, 0, aParentIndex); + ShapeView_ItemShapePtr anItem = itemDynamicCast (TreeModel_ModelBase::GetItemByIndex (anIndex)); + if (anItem && anItem->GetItemShape() == theShape) + return anIndex; + } + return QModelIndex(); +} + +// ======================================================================= +// function : SingleSelected +// purpose : +// ======================================================================= +QModelIndex ShapeView_TreeModel::SingleSelected (const QModelIndexList& theIndices, const int theCellId, + const Qt::Orientation theOrientation) +{ + QModelIndexList aFirstColumnSelectedIndices; + for (QModelIndexList::const_iterator anIndicesIt = theIndices.begin(); anIndicesIt != theIndices.end(); anIndicesIt++) + { + QModelIndex anIndex = *anIndicesIt; + if ((theOrientation == Qt::Horizontal && anIndex.column() == theCellId) || + (theOrientation == Qt::Vertical && anIndex.row() == theCellId)) + aFirstColumnSelectedIndices.append (anIndex); + } + return aFirstColumnSelectedIndices.size() == 1 ? aFirstColumnSelectedIndices.first() : QModelIndex(); +} diff --git a/tools/ShapeView/ShapeView_TreeModel.hxx b/tools/ShapeView/ShapeView_TreeModel.hxx index 77a34b78a0..210e8bb882 100644 --- a/tools/ShapeView/ShapeView_TreeModel.hxx +++ b/tools/ShapeView/ShapeView_TreeModel.hxx @@ -16,10 +16,10 @@ #ifndef ShapeView_TreeModel_H #define ShapeView_TreeModel_H -#include +#include #include #include -#include +#include #include #include @@ -64,6 +64,19 @@ public: //! \return the header data Standard_EXPORT virtual QVariant headerData (int theSection, Qt::Orientation theOrientation, int theRole = Qt::DisplayRole ) const Standard_OVERRIDE; + //! Returns model index of the shape. + //! \param theShape a shape object + //! \return the model index + QModelIndex FindIndex (const TopoDS_Shape& theShape) const; + + //! Returns single selected item in the cell of given orientation. If the orientation is Horizontal, + //! in the cell id colum, one row should be selected. + //! \param theIndices a container of selected indices + //! \param theCellId column index if orientation is horizontal, row index otherwise + //! \param theOrientation an orientation to apply the cell index + //! \return model index from the list + Standard_EXPORT static QModelIndex SingleSelected (const QModelIndexList& theIndices, const int theCellId, + const Qt::Orientation theOrientation = Qt::Horizontal); private: QMap myRootItems; //!< container of root items, for each column own root item diff --git a/tools/ShapeView/ShapeView_Window.cxx b/tools/ShapeView/ShapeView_Window.cxx index 739cfe22a5..11fe0703b9 100644 --- a/tools/ShapeView/ShapeView_Window.cxx +++ b/tools/ShapeView/ShapeView_Window.cxx @@ -13,18 +13,22 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include #include #include @@ -127,19 +131,9 @@ ShapeView_Window::ShapeView_Window (QWidget* theParent, const TCollection_AsciiS { myMainWindow = new QMainWindow (theParent); - QWidget* aCentralWidget = new QWidget (myMainWindow); - QGridLayout* aParentLay = new QGridLayout (aCentralWidget); - aParentLay->setContentsMargins (0, 0, 0, 0); - myMainWindow->setCentralWidget (aCentralWidget); - - ShapeView_OpenButton* aButton = new ShapeView_OpenButton (0); - connect (aButton, SIGNAL (OpenFile (const QString&)), this, SLOT (onOpenFile (const QString&))); - aButton->setObjectName ("TKShapeView"); - aParentLay->addWidget (aButton->StartButton(), 0, 2); - myTreeView = new ShapeView_TreeView (myMainWindow); ((ShapeView_TreeView*)myTreeView)->SetPredefinedSize (SHAPEVIEW_DEFAULT_TREE_VIEW_WIDTH, - SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT); + SHAPEVIEW_DEFAULT_TREE_VIEW_HEIGHT); myTreeView->setContextMenuPolicy (Qt::CustomContextMenu); connect (myTreeView, SIGNAL (customContextMenuRequested (const QPoint&)), this, SLOT (onTreeViewContextMenuRequested (const QPoint&))); @@ -161,11 +155,7 @@ ShapeView_Window::ShapeView_Window (QWidget* theParent, const TCollection_AsciiS myTreeView->setColumnWidth (4, LOCATION_COLUMN_WIDTH); myTreeView->setColumnWidth (5, FLAGS_COLUMN_WIDTH); - QDockWidget* aTreeViewWidget = new QDockWidget (tr ("ShapeView"), myMainWindow); - aTreeViewWidget->setFeatures (QDockWidget::NoDockWidgetFeatures); - aTreeViewWidget->setWidget (myTreeView); - myMainWindow->addDockWidget (Qt::LeftDockWidgetArea, aTreeViewWidget); - myMainWindow->setCorner (Qt::BottomLeftCorner, Qt::LeftDockWidgetArea); + myMainWindow->setCentralWidget (myTreeView); // view myViewWindow = new View_Window (myMainWindow); @@ -173,7 +163,7 @@ ShapeView_Window::ShapeView_Window (QWidget* theParent, const TCollection_AsciiS QDockWidget* aViewDockWidget = new QDockWidget (tr ("View"), myMainWindow); aViewDockWidget->setWidget (myViewWindow); - myMainWindow->addDockWidget (Qt::BottomDockWidgetArea, aViewDockWidget); + myMainWindow->addDockWidget (Qt::RightDockWidgetArea, aViewDockWidget); myMainWindow->resize (DEFAULT_SHAPE_VIEW_WIDTH, DEFAULT_SHAPE_VIEW_HEIGHT); myMainWindow->move (DEFAULT_SHAPE_VIEW_POSITION_X, DEFAULT_SHAPE_VIEW_POSITION_Y); @@ -226,6 +216,32 @@ void ShapeView_Window::UpdateContent() NCollection_List aNames; myParameters->SetFileNames (aName, aNames); } + // make TopoDS_TShape selected if exist in select parameters + NCollection_List anObjects; + if (myParameters->GetSelectedObjects(aName, anObjects)) + { + ShapeView_TreeModel* aModel = dynamic_cast (myTreeView->model()); + QItemSelectionModel* aSelectionModel = myTreeView->selectionModel(); + aSelectionModel->clear(); + for (NCollection_List::Iterator aParamsIt (anObjects); + aParamsIt.More(); aParamsIt.Next()) + { + Handle(Standard_Transient) anObject = aParamsIt.Value(); + Handle(TopoDS_TShape) aShapePointer = Handle(TopoDS_TShape)::DownCast (anObject); + if (aShapePointer.IsNull()) + continue; + + TopoDS_Shape aShape; + aShape.TShape (aShapePointer); + + QModelIndex aShapeIndex = aModel->FindIndex (aShape); + if (!aShapeIndex.isValid()) + continue; + aSelectionModel->select (aShapeIndex, QItemSelectionModel::Select); + myTreeView->scrollTo (aShapeIndex); + } + myParameters->SetSelected (aName, NCollection_List()); + } } // ======================================================================= @@ -299,13 +315,27 @@ void ShapeView_Window::addShape (const TopoDS_Shape& theShape) // ======================================================================= void ShapeView_Window::onTreeViewContextMenuRequested (const QPoint& thePosition) { - QMenu* aMenu = new QMenu(myMainWindow); - aMenu->addAction (createAction ("Clear view", SLOT (onClearView()))); - if (!myTemporaryDirectory.IsEmpty()) - aMenu->addAction (createAction ("BREP view", SLOT (onBREPView()))); - aMenu->addAction (createAction ("Close All BREP views", SLOT (onCloseAllBREPViews()))); - aMenu->addAction (createAction ("BREP directory", SLOT (onBREPDirectory()))); + QItemSelectionModel* aModel = myTreeView->selectionModel(); + if (!aModel) + return; + + QModelIndex anIndex = ShapeView_TreeModel::SingleSelected (aModel->selectedIndexes(), 0); + TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex); + if (!anItemBase) + return; + QMenu* aMenu = new QMenu(myMainWindow); + ShapeView_ItemRootPtr aRootItem = itemDynamicCast (anItemBase); + if (aRootItem) { + aMenu->addAction (createAction("Load BREP file", SLOT (onLoadFile()))); + aMenu->addAction (createAction ("Remove all shape items", SLOT (onClearView()))); + } + else { + if (!myTemporaryDirectory.IsEmpty()) + aMenu->addAction (createAction ("BREP view", SLOT (onBREPView()))); + aMenu->addAction (createAction ("Close All BREP views", SLOT (onCloseAllBREPViews()))); + aMenu->addAction (createAction ("BREP directory", SLOT (onBREPDirectory()))); + } QPoint aPoint = myTreeView->mapToGlobal (thePosition); aMenu->exec (aPoint); } @@ -324,6 +354,20 @@ void ShapeView_Window::onBREPDirectory() viewFile (aFileName); } +// ======================================================================= +// function : onLoadFile +// purpose : +// ======================================================================= +void ShapeView_Window::onLoadFile() +{ + QString aDataDirName = QDir::currentPath(); + + QString aFileName = ShapeView_OpenFileDialog::OpenFile(0, aDataDirName); + aFileName = QDir().toNativeSeparators (aFileName); + if (!aFileName.isEmpty()) + onOpenFile(aFileName); +} + // ======================================================================= // function : onBREPView // purpose : diff --git a/tools/ShapeView/ShapeView_Window.hxx b/tools/ShapeView/ShapeView_Window.hxx index 11c57fd729..31cd1d38ce 100644 --- a/tools/ShapeView/ShapeView_Window.hxx +++ b/tools/ShapeView/ShapeView_Window.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include #include #ifdef _MSC_VER @@ -110,6 +110,9 @@ protected slots: //! Removes all shapes in tree view void onClearView() { RemoveAllShapes(); } + //! Load BREP file and updates tree model to have shape of the file + void onLoadFile(); + //! View BREP files of selected items if exist void onBREPView(); diff --git a/tools/ShapeView/icons/folder_open.png b/tools/ShapeView/icons/folder_open.png index 9bfd58b38acd312759d4e37b400bce6919b47384..b0a139ebc65294d49ed5be9612931ffbba86b339 100644 GIT binary patch delta 1940 zcmV;F2W$A62Bi-niBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^pPPbe;RZ} zSaefwW^{L9a%BKeVQFr3E>1;MAa*k@H7+qQF!XYv000LeNkl6*7JH6t&Cf`cH5is0aoVzhuW!)*{m3@gpN(N>C& zfLxM`1H*6`QHJ|P_wr_6WH0`|fBEkBKQk(Wg9`QH^T7P)ch32q^E>DK!3DtY#@CG* z*nN2u!VCPZKabWW^Re@@cX0Y}FzhS}fY%{cEIIos)?ZkLnDQM^RYYQE*;cIiaS^;T z-J!Xv;!)@JP9HuB@#T?t?f4|b>s2W3EyB+?OHtHQi2Sbe_-A__zH2#we`7a}LTyaI z+h=AYx;U6-_xri;!K2`v<&HfS;rQ146%Oc?2rJo$_4&&XUK$8h)h^`TID*{f9Aq}> zplvvacw-#qp7cSsQB8A4Uk)E0g{e6s5n8+fGjpHD($l`yyH3&XgM9yTRYESVf=~7^ zY%X34ttkod_4~26HX2*5e+1x-1DiExe(q*Jb1j108R8TRQ|9AqB{kmEfT^U z1koH|!@L=yH3Fhbjp_>@BU$;R)z}%w8q%=z;vA^jq7l`)6A|Vxgf<5w=z0JGn*8B^ zZ8iM9pJ?qH`MlLgf6Wq`O13gU5`!sVxwagZ#`&-`yg}yi_qX_LDZdMb=uD&t{|AbQ zDGkAbpQdA1$EVod5sJ|EAOyDsAh2~E-mhJR2^oLnG22;}#7H-^>tpGd!JC5^?C-GD zzXnU)E3g=S?Yzv-bFANqW>%v!0fq}7Ax$+L8T&^=x6hIEf7sDjp5%e~`O^{68;Whc zTM*I{h~S=$n00!bbz<%cP_yBr-lGsL;S8{t!Tt(M?QHT=KW5p!Yj_9Z#wQT%DoC9g z{Mx1_^3OXY<92%%e(5@amB}Np@UkyH{ci}u{u7L~rX^T)?)AIDtpc>sZoGFL1nhaLY5 zgJ0eRhv4@FbfwYRIyz^WYZ$0z`U8-Kuo|^~tO(B=d0oc2c9=l@0-KmFExuNJSp#}< z99LGq>2w|21*Ae;^QTjmxcV<-+Cz}f$WTyUWO4K%e@v?(IudX~YZD+7Q=+*0dta;q zq)rMjt%az01>)*d@}iZdbI&1}6OtC=f%LskK&Kk^aAIYKL-*MTq$r=`rqTt7N&_Vww3$I-!Gy zj^{vdcW_(<-vOfi01Ouckex84zW_CaVFj~)0j+1A#+i&+kh;=2&%8V1JT@mQqo+7M zf2U(m(59N#YJ7{=sDRX+$?R=+?RvgjE&r8diFs%gI}3Myaowv zWLrJUZ`wqkI^=xen7v(qE7c`I(!a~je|N|Al2Ay^dsvZ0bigu}O(YYB0PV_o1%}0t z%rU6D6nJ0ueFP+;JTY@#L97LL1q(!k6XWz%ft5v80Lj z1(&f2Xh}o{-|g2gZ-sQ7-Cs4I4!94B#z7R0C1VBw&&zhQeboZ`i$Y`J7G!?zf5~{x z1nhQ2H~+@}M)N$g=aw?AgH$#XQqi-J3dWJKgQt+TWiuev`m?{1ah$&U2fl-gh5`=l zdkXc1A-wxINYyK8JR4H+3&dv#Oo3F&;8lwtH8J~wpaHX&aY@?cirj-V>^;S1Nq|(( zd97JXA*;v-Ltr%|12Z>qlsgXLY8&;y*~?JC!FT@%E~DQ@DoLR~b@WKaa30tO aT>cMe5{#!wC}qC@0000~@he;IT| zSaefwW^{L9a%BK;VQFr3E^cLXAT%y8E-^DS16z6k00NguL_t(&L+zV6kLoZKM)UuW z*f+6nq63Mwfr3p!0>oO;AfTh5;1~M&vz27xalwc@~ey8UL}q6{}jUf3ilS@lh(33M-XL{O{`r4LX+YpguvdSY)kMi;tln zILP=W1>mxr&*uVl;2`6x6p&7*1((Z(kEh>>py9iedc7|ArpecLDK-!jjYj#H`W*=p z|4a&im_nhz`u#rZbUJ|m`vQ!VAN+SI0Ai5G1O+?k42Q#xm|s$AwHir~f5h5nu}2Et zw9R1~pX$4)gS-QFr9dSyu`UER{+*rw~=v>$Q=hg6!K!QRwx0UMaYq z)F5iWgChkKS+m*X{rX@kBoYZ%3TA0FiJ?d=7IURwQRv%Bd_O>a=19S!(D8WW{rX@k zAhUI(U~TnwyYYT~Fcmyff3QmSdcAnRK9~v~Ddu)8@kq&JGQ3Y8NQLL~DXL{hipge~ zg>~deBx0oe#3RMjJ(B%??_NHTl1wIfzdo1>)9KVmQR#NOUMc48!z`=@I&+GtkR`ZU zQ0@pRsE`MP0q@rbQvpvg@udJE1r_pQvEcpsU@D+O9*ss)3Qn2Rf9b^g^}$rYe6m`t zq!d)h_xqjq>w~F)JJ0!imQqZGEP<5A;~}M(3RwavcokAij^b9xXbUN(?vcfyBgLfn zlHG1+q^L|L6R#9J0J7ht3ckQ&q$vE7V(vaneDfSn2hkQArb3n#G74j~Ei{J1q1d1d zDrEfg2HF-X9Pi<95ZFQ(W7Z!oXUC5KzNrZS0000tgKy diff --git a/tools/TInspector/FILES b/tools/TInspector/FILES index 2c39e567fe..f6733979ac 100644 --- a/tools/TInspector/FILES +++ b/tools/TInspector/FILES @@ -1,5 +1,7 @@ TInspector.qrc TInspector_Communicator.cxx TInspector_Communicator.hxx +TInspector_PluginParameters.cxx +TInspector_PluginParameters.hxx TInspector_Window.cxx TInspector_Window.hxx diff --git a/tools/TInspector/TInspector_Communicator.cxx b/tools/TInspector/TInspector_Communicator.cxx index e69723a614..41790a1c66 100644 --- a/tools/TInspector/TInspector_Communicator.cxx +++ b/tools/TInspector/TInspector_Communicator.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include -#include +#include #include #include @@ -43,7 +43,6 @@ TInspector_Communicator::TInspector_Communicator() new QApplication (argc, argv); } myWindow = new TInspector_Window(); - QObject::connect (qApp, SIGNAL (lastWindowClosed()), myWindow, SLOT (OnLastApplicationWindowClosed())); } // ======================================================================= diff --git a/tools/TInspector/TInspector_Communicator.hxx b/tools/TInspector/TInspector_Communicator.hxx index 0b961f0202..ff59ecfcaf 100644 --- a/tools/TInspector/TInspector_Communicator.hxx +++ b/tools/TInspector/TInspector_Communicator.hxx @@ -16,7 +16,7 @@ #ifndef TInspector_Communicator_H #define TInspector_Communicator_H -#include +#include #include #include @@ -43,16 +43,25 @@ public: //! \param thePluginName a name of the plugin void RegisterPlugin (const TCollection_AsciiString& thePluginName) { myWindow->RegisterPlugin (thePluginName); } + //! Returns list of registered plugins + //! \return container of plugin names + NCollection_List RegisteredPlugins() const { return myWindow->RegisteredPlugins(); } + //! Stores parameters for the plugin //! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application) - void Init (const NCollection_List& theParameters) { myWindow->Init ("", theParameters); } + //! \param theAppend boolean state whethe the parameters should be added to existing + void Init (const NCollection_List& theParameters, + const Standard_Boolean theAppend = Standard_False) + { myWindow->Init ("", theParameters, theAppend); } //! Stores parameters for the plugin //! \param thePluginName a name of the plugin //! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application) + //! \param theAppend boolean state whethe the parameters should be added to existing void Init (const TCollection_AsciiString& thePluginName, - const NCollection_List& theParameters) - { myWindow->Init (thePluginName, theParameters); } + const NCollection_List& theParameters, + const Standard_Boolean theAppend = Standard_False) + { myWindow->Init (thePluginName, theParameters, theAppend); } //! UpdateContent for the TInspector window void UpdateContent() { myWindow->UpdateContent(); } @@ -68,6 +77,15 @@ public: //! \param thePluginName a name of the plugin void Activate (const TCollection_AsciiString& thePluginName) { myWindow->ActivateTool (thePluginName); } + //! Set item selected in the active plugin + //! \param theItemName a containerr of name of items in plugin that should become selected + void SetSelected (const NCollection_List& theItemNames) { myWindow->SetSelected (theItemNames); } + + //! Sets objects to be selected in the plugin + //! \param theObjects an objects + Standard_EXPORT void SetSelected (const NCollection_List& theObjects) + { myWindow->SetSelected (theObjects); } + //! Change window visibility //! \param theVisible boolean state Standard_EXPORT virtual void SetVisible (const bool theVisible); diff --git a/tools/TInspector/TInspector_PluginParameters.cxx b/tools/TInspector/TInspector_PluginParameters.cxx new file mode 100644 index 0000000000..50ffd7de10 --- /dev/null +++ b/tools/TInspector/TInspector_PluginParameters.cxx @@ -0,0 +1,34 @@ +// 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 + +// ======================================================================= +// function : SetParameters +// purpose : +// ======================================================================= +void TInspector_PluginParameters::SetParameters (const TCollection_AsciiString& thePluginName, + const NCollection_List& theParameters, + const Standard_Boolean& theToActivatePlugin) +{ + TInspectorAPI_PluginParameters::SetParameters (thePluginName, theParameters, Standard_False); + + if (!theToActivatePlugin) + return; + + SetSelected (thePluginName, theParameters); + myWindow->ActivateTool (thePluginName); +} diff --git a/tools/TInspector/TInspector_PluginParameters.hxx b/tools/TInspector/TInspector_PluginParameters.hxx new file mode 100644 index 0000000000..ea88aae622 --- /dev/null +++ b/tools/TInspector/TInspector_PluginParameters.hxx @@ -0,0 +1,50 @@ +// 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 DFBrowser_Communicator_H +#define DFBrowser_Communicator_H + +#include +#include + +#include +#include + +//! \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 +{ +public: + + //! Constructor + Standard_EXPORT TInspector_PluginParameters (TInspector_Window* theWindow) : myWindow (theWindow) {} + + //! Destructor + virtual ~TInspector_PluginParameters() Standard_OVERRIDE {} + + //! Stores the parameters for plugin + //! \param thePluginName a plugin name + //! \param theParameters a list of parameters + //! \param theToActivatePlugin a state whether the plugin should be immediately activated + Standard_EXPORT virtual void SetParameters (const TCollection_AsciiString& thePluginName, + const NCollection_List& theParameters, + const Standard_Boolean& theToActivatePlugin = Standard_False) Standard_OVERRIDE; + +private: + + TInspector_Window* myWindow; //!< the current window +}; + +#endif diff --git a/tools/TInspector/TInspector_Window.cxx b/tools/TInspector/TInspector_Window.cxx index 8fea026a4b..08813a7192 100644 --- a/tools/TInspector/TInspector_Window.cxx +++ b/tools/TInspector/TInspector_Window.cxx @@ -13,9 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include +#include -#include +#include +#include #include #include @@ -65,7 +67,35 @@ TInspector_Window::TInspector_Window() myMainWindow->move (TINSPECTOR_DEFAULT_POSITION_X, TINSPECTOR_DEFAULT_POSITION_Y); myMainWindow->setDockOptions (QMainWindow::VerticalTabs); - myParameters = new TInspectorAPI_PluginParameters(); + myParameters = new TInspector_PluginParameters (this); +} + +// ======================================================================= +// function : RegisterPlugin +// purpose : +// ======================================================================= +void TInspector_Window::RegisterPlugin (const TCollection_AsciiString& thePluginName) +{ + TInspector_ToolInfo anInfo; + int aToolId; + if (FindPlugin (thePluginName, anInfo, aToolId)) + return; + + myToolNames.append (TInspector_ToolInfo (thePluginName)); +} + +// ======================================================================= +// function : RegisteredPlugins +// purpose : +// ======================================================================= +NCollection_List TInspector_Window::RegisteredPlugins() const +{ + NCollection_List aPlugins; + + for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) + aPlugins.Append (myToolNames[aToolId].myName); + + return aPlugins; } // ======================================================================= @@ -73,13 +103,14 @@ TInspector_Window::TInspector_Window() // purpose : // ======================================================================= void TInspector_Window::Init (const TCollection_AsciiString& thePluginName, - const NCollection_List& theParameters) + const NCollection_List& theParameters, + const Standard_Boolean theAppend) { if (thePluginName.IsEmpty()) { // Init all plugins by the given parameters for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) - Init (myToolNames[aToolId].myName, theParameters); + Init (myToolNames[aToolId].myName, theParameters, theAppend); // temporary activation of the first tool if (!myToolNames.isEmpty()) @@ -87,24 +118,38 @@ void TInspector_Window::Init (const TCollection_AsciiString& thePluginName, return; } - myParameters->SetParameters (thePluginName, theParameters); - - for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) + if (theAppend) { - TInspector_ToolInfo anInfo = myToolNames[aToolId]; - if (anInfo.myName != thePluginName) - continue; + NCollection_List aParameters; + if (myParameters->FindParameters (thePluginName)) + aParameters = myParameters->Parameters (thePluginName); - if (anInfo.myCommunicator) - break; + for (NCollection_List::Iterator anIterator (theParameters); + anIterator.More(); anIterator.Next()) + aParameters.Append (anIterator.Value()); - QPushButton* aButton = new QPushButton(anInfo.myName.ToCString(), myButtonWidget); - connect (aButton, SIGNAL (clicked (bool)), this, SLOT (onButtonClicked())); - myButtonLay->insertWidget (myButtonLay->count()-1, aButton); - anInfo.myButton = aButton; - myToolNames[aToolId] = anInfo; - break; + myParameters->SetParameters (thePluginName, aParameters, Standard_False); } + else + myParameters->SetParameters (thePluginName, theParameters, Standard_False); + + TInspector_ToolInfo anInfo; + int aToolId; + if (!FindPlugin (thePluginName, anInfo, aToolId)) + return; + + if (anInfo.myButton) + return; + + QString aButtonName = anInfo.myName.ToCString(); + if (aButtonName.indexOf("TK") == 0) + aButtonName = aButtonName.mid(2); + + QPushButton* aButton = new QPushButton(aButtonName, myButtonWidget); + connect (aButton, SIGNAL (clicked (bool)), this, SLOT (onButtonClicked())); + myButtonLay->insertWidget (myButtonLay->count()-1, aButton); + anInfo.myButton = aButton; + myToolNames[aToolId] = anInfo; } // ======================================================================= @@ -146,6 +191,44 @@ void TInspector_Window::ActivateTool (const TCollection_AsciiString& thePluginNa onCommuncatorNameChanged(); } +// ======================================================================= +// function : SetSelected +// purpose : +// ======================================================================= +void TInspector_Window::SetSelected (const NCollection_List& theItemNames) +{ + TInspector_ToolInfo anInfo; + if (!ActiveToolInfo (anInfo)) + return; + + myParameters->SetSelectedNames (anInfo.myName, theItemNames); + + TInspectorAPI_Communicator* aCommunicator = anInfo.myCommunicator; + if (aCommunicator) + { + aCommunicator->UpdateContent(); + } +} + +// ======================================================================= +// function : SetSelected +// purpose : +// ======================================================================= +void TInspector_Window::SetSelected (const NCollection_List& theObjects) +{ + TInspector_ToolInfo anInfo; + if (!ActiveToolInfo (anInfo)) + return; + + myParameters->SetSelected (anInfo.myName, theObjects); + + TInspectorAPI_Communicator* aCommunicator = anInfo.myCommunicator; + if (aCommunicator) + { + aCommunicator->UpdateContent(); + } +} + // ======================================================================= // function : SetOpenButton // purpose : @@ -166,6 +249,14 @@ void TInspector_Window::SetOpenButton (QPushButton* theButton) void TInspector_Window::OpenFile (const TCollection_AsciiString& thePluginName, const TCollection_AsciiString& theFileName) { + if (thePluginName.IsEmpty()) + { + // Apply file name to all plugins + for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) + OpenFile (myToolNames[aToolId].myName, theFileName); + return; + } + myParameters->AddFileName (thePluginName, theFileName); TInspector_ToolInfo anInfo; @@ -221,16 +312,6 @@ bool TInspector_Window::LoadPlugin (const TCollection_AsciiString& thePluginName return aLoaded; } -// ======================================================================= -// function : onLastApplicationWindowClosed -// purpose : -// ======================================================================= -void TInspector_Window::OnLastApplicationWindowClosed() -{ - for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) - delete myToolNames[aToolId].myCommunicator; -} - // ======================================================================= // function : onButtonClicked // purpose : @@ -238,7 +319,7 @@ void TInspector_Window::OnLastApplicationWindowClosed() void TInspector_Window::onButtonClicked() { QPushButton* aButton = (QPushButton*)sender(); - ActivateTool (TCollection_AsciiString (aButton->text().toStdString().c_str())); + ActivateTool (TCollection_AsciiString ("TK") + aButton->text().toStdString().c_str()); } // ======================================================================= @@ -275,3 +356,24 @@ bool TInspector_Window::ActiveToolInfo (TInspector_Window::TInspector_ToolInfo& } return false; } + +// ======================================================================= +// function : FindPlugin +// purpose : +// ======================================================================= +bool TInspector_Window::FindPlugin (const TCollection_AsciiString& thePluginName, TInspector_ToolInfo& theToolInfo, + int& theToolId) +{ + for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++) + { + TInspector_ToolInfo anInfo = myToolNames[aToolId]; + if (anInfo.myName != thePluginName) + continue; + theToolInfo = anInfo; + theToolId = aToolId; + return true; + } + + return false; +} + \ No newline at end of file diff --git a/tools/TInspector/TInspector_Window.hxx b/tools/TInspector/TInspector_Window.hxx index 1887707f19..ecac17cd16 100644 --- a/tools/TInspector/TInspector_Window.hxx +++ b/tools/TInspector/TInspector_Window.hxx @@ -20,7 +20,7 @@ #include #include #include -#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant @@ -70,14 +70,19 @@ public: //! Appends the plugin names into internal conainer //! \param thePluginName a name of the plugin - void RegisterPlugin (const TCollection_AsciiString& thePluginName) - { myToolNames.append (TInspector_ToolInfo(thePluginName)); } + Standard_EXPORT void RegisterPlugin (const TCollection_AsciiString& thePluginName); + + //! Returns list of registered plugins + //! \return container of plugin names + Standard_EXPORT NCollection_List RegisteredPlugins() const; //! Stores parameters for the plugin. If the plugin name is empty, it inits all plugins with the parameters //! \param thePluginName a name of the plugin //! \param theParameters container of parameters(e.g. AIS_InteractiveContext, TDocStd_Application) + //! \param theAppend boolean state whethe the parameters should be added to existing Standard_EXPORT void Init (const TCollection_AsciiString& thePluginName, - const NCollection_List& theParameters); + const NCollection_List& theParameters, + const Standard_Boolean theAppend = Standard_False); //! Appends to container of parameters the given name, if the given parameter is active, cal UpdateContent //! \param thePluginName a name of the plugin @@ -95,6 +100,14 @@ public: //! \param thePluginName a name of the plugin Standard_EXPORT void ActivateTool (const TCollection_AsciiString& thePluginName); + //! Set item selected in the active plugin + //! \param theItemNames a container of name of items in plugin that should become selected + Standard_EXPORT void SetSelected (const NCollection_List& theItemNames); + + //! Sets objects to be selected in the plugin + //! \param theObjects an objects + Standard_EXPORT void SetSelected (const NCollection_List& theObjects); + //! Sets open button. Stores into objectName for the button the name of the current plugin to know where //! the file should be applied //! \param theButton a button @@ -105,11 +118,6 @@ public: //! \param theInfo an output parameter for plugin info Standard_EXPORT bool LoadPlugin (const TCollection_AsciiString& thePluginName, TInspector_ToolInfo& theInfo); -public slots: - - //! Destroys loaded communicators - Standard_EXPORT void OnLastApplicationWindowClosed(); - protected slots: //! Activates plugin correspnded to the clicked button @@ -124,6 +132,14 @@ protected: //! \param theToolInfo an information about plugin bool ActiveToolInfo (TInspector_ToolInfo& theToolInfo) const; + //! Returns true if there is plugin registered by the given name + //! \param thePluginName a name of the plugin + //! \param theToolInfo an output parameter for plugin information + //! \param theToolId an index in internal map + //! \return true if the plugin is found + bool FindPlugin (const TCollection_AsciiString& thePluginName, TInspector_ToolInfo& theToolInfo, + int& theToolId); + private: QWidget* myEmptyWidget; //!< widget that is active in tools stack while no one plugin is loaded diff --git a/tools/TInspectorAPI/TInspectorAPI_Communicator.cxx b/tools/TInspectorAPI/TInspectorAPI_Communicator.cxx index 459e4680ba..877f6ee86f 100644 --- a/tools/TInspectorAPI/TInspectorAPI_Communicator.cxx +++ b/tools/TInspectorAPI/TInspectorAPI_Communicator.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/TInspectorAPI/TInspectorAPI_Communicator.hxx b/tools/TInspectorAPI/TInspectorAPI_Communicator.hxx index 18991cc822..ee26363c31 100644 --- a/tools/TInspectorAPI/TInspectorAPI_Communicator.hxx +++ b/tools/TInspectorAPI/TInspectorAPI_Communicator.hxx @@ -22,7 +22,7 @@ #if OCC_VERSION_HEX > 0x060901 #include #endif -#include +#include //! The Communicator is an interface that should be implemented for a separate plugin //! It will be placed in layout of the given parent. After the plugin is created, it is possible to diff --git a/tools/TInspectorAPI/TInspectorAPI_PluginParameters.cxx b/tools/TInspectorAPI/TInspectorAPI_PluginParameters.cxx index 3db7210768..1bf0725f14 100644 --- a/tools/TInspectorAPI/TInspectorAPI_PluginParameters.cxx +++ b/tools/TInspectorAPI/TInspectorAPI_PluginParameters.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #if OCC_VERSION_HEX <= 0x060901 IMPLEMENT_STANDARD_HANDLE (TInspectorAPI_PluginParameters, Standard_Transient) @@ -31,11 +31,12 @@ TInspectorAPI_PluginParameters::TInspectorAPI_PluginParameters() } // ======================================================================= -// function : SetParameters +// function : SetParameters // purpose : // ======================================================================= void TInspectorAPI_PluginParameters::SetParameters (const TCollection_AsciiString& thePluginName, - const NCollection_List& theParameters) + const NCollection_List& theParameters, + const Standard_Boolean&) { if (theParameters.Size() > 0) myParameters.Bind (thePluginName, theParameters); @@ -44,7 +45,7 @@ void TInspectorAPI_PluginParameters::SetParameters (const TCollection_AsciiStrin } // ======================================================================= -// function : AddFileName +// function : AddFileName // purpose : // ======================================================================= void TInspectorAPI_PluginParameters::AddFileName (const TCollection_AsciiString& thePluginName, @@ -61,7 +62,7 @@ void TInspectorAPI_PluginParameters::AddFileName (const TCollection_AsciiString& } // ======================================================================= -// function : SetFileNames +// function : SetFileNames // purpose : // ======================================================================= void TInspectorAPI_PluginParameters::SetFileNames (const TCollection_AsciiString& thePluginName, @@ -70,12 +71,34 @@ void TInspectorAPI_PluginParameters::SetFileNames (const TCollection_AsciiString if (theFileNames.Size() > 0) myFileNames.Bind (thePluginName, theFileNames); else - myFileNames.UnBind(thePluginName); + myFileNames.UnBind (thePluginName); +} + +// ======================================================================= +// function : SetSelectedNames +// purpose : +// ======================================================================= +void TInspectorAPI_PluginParameters::SetSelectedNames (const TCollection_AsciiString& thePluginName, + const NCollection_List& theItemNames) +{ + mySelectedItemNames.Bind (thePluginName, theItemNames); +} +// ======================================================================= +// function : SetSelected +// purpose : +// ======================================================================= +void TInspectorAPI_PluginParameters::SetSelected (const TCollection_AsciiString& thePluginName, + const NCollection_List& theObjects) +{ + if (theObjects.Size() > 0) + mySelectedObjects.Bind (thePluginName, theObjects); + else + mySelectedObjects.UnBind (thePluginName); } // ======================================================================= -// function : FindParameters +// function : FindParameters // purpose : // ======================================================================= bool TInspectorAPI_PluginParameters::FindParameters (const TCollection_AsciiString& thePluginName) @@ -84,7 +107,7 @@ bool TInspectorAPI_PluginParameters::FindParameters (const TCollection_AsciiStri } // ======================================================================= -// function : Parameters +// function : Parameters // purpose : // ======================================================================= const NCollection_List& TInspectorAPI_PluginParameters::Parameters @@ -94,7 +117,7 @@ const NCollection_List& TInspectorAPI_PluginParamete } // ======================================================================= -// function : FindFileNames +// function : FindFileNames // purpose : // ======================================================================= bool TInspectorAPI_PluginParameters::FindFileNames (const TCollection_AsciiString& thePluginName) @@ -103,7 +126,7 @@ bool TInspectorAPI_PluginParameters::FindFileNames (const TCollection_AsciiStrin } // ======================================================================= -// function : FileNames +// function : FileNames // purpose : // ======================================================================= const NCollection_List& TInspectorAPI_PluginParameters::FileNames @@ -111,3 +134,32 @@ const NCollection_List& TInspectorAPI_PluginParameters: { return myFileNames.Find (thePluginName); } + +// ======================================================================= +// function : FindSelectedNames +// purpose : +// ======================================================================= +bool TInspectorAPI_PluginParameters::FindSelectedNames (const TCollection_AsciiString& thePluginName) +{ + return mySelectedItemNames.IsBound(thePluginName); +} + +// ======================================================================= +// function : GetSelectedNames +// purpose : +// ======================================================================= +const NCollection_List& TInspectorAPI_PluginParameters::GetSelectedNames + (const TCollection_AsciiString& thePluginName) +{ + return mySelectedItemNames.Find (thePluginName); +} + +// ======================================================================= +// function : GetSelectedObjects +// purpose : +// ======================================================================= +Standard_Boolean TInspectorAPI_PluginParameters::GetSelectedObjects (const TCollection_AsciiString& thePluginName, + NCollection_List& theObjects) +{ + return mySelectedObjects.Find (thePluginName, theObjects); +} diff --git a/tools/TInspectorAPI/TInspectorAPI_PluginParameters.hxx b/tools/TInspectorAPI/TInspectorAPI_PluginParameters.hxx index c59c9cf937..ea5c1ec4db 100644 --- a/tools/TInspectorAPI/TInspectorAPI_PluginParameters.hxx +++ b/tools/TInspectorAPI/TInspectorAPI_PluginParameters.hxx @@ -44,21 +44,35 @@ public: //! Stores the parameters for plugin //! \param thePluginName a plugin name //! \param theParameters a list of parameters - Standard_EXPORT void SetParameters (const TCollection_AsciiString& thePluginName, - const NCollection_List& theParameters); + //! \param theToActivatePlugin a state whether the plugin should be immediately activated, to be used in a heir + Standard_EXPORT virtual void SetParameters (const TCollection_AsciiString& thePluginName, + const NCollection_List& theParameters, + const Standard_Boolean& theToActivatePlugin = Standard_False); - //! Add a file name for the plugin + //! Adds a file name for the plugin //! \param thePluginName a plugin name //! \param theFileName a name Standard_EXPORT void AddFileName (const TCollection_AsciiString& thePluginName, const TCollection_AsciiString& theFileName); - //! Set file names for the plugin + //! Sets file names for the plugin //! \param thePluginName a plugin name //! \param theFileNames container of names Standard_EXPORT void SetFileNames (const TCollection_AsciiString& thePluginName, const NCollection_List& theFileNames); + //! Sets a name of item to be selected in the plugin + //! \param thePluginName a plugin name + //! \param theItemNames a container of names to be selected + Standard_EXPORT void SetSelectedNames (const TCollection_AsciiString& thePluginName, + const NCollection_List& theItemNames); + + //! Sets objects to be selected in the plugin + //! \param thePluginName a plugin name + //! \param theObjects an objects + Standard_EXPORT void SetSelected (const TCollection_AsciiString& thePluginName, + const NCollection_List& theObjects); + //! Returns true if there are parameters set for the given plugin //! \param thePluginName a plugin name //! \return boolean result @@ -81,6 +95,23 @@ public: Standard_EXPORT const NCollection_List& FileNames( const TCollection_AsciiString& thePluginName); + //! Returns true if there are file names set for the given plugin + //! \param thePluginName a plugin name + //! \return boolean result + Standard_EXPORT bool FindSelectedNames (const TCollection_AsciiString& thePluginName); + + //! Returns name to be selected in the plugin + //! \param thePluginName a plugin name + //! \return container of names + Standard_EXPORT const NCollection_List& GetSelectedNames ( + const TCollection_AsciiString& thePluginName); + + //! Returns objects set for the given plugin + //! \param thePluginName a plugin name + //! \return container of objects + Standard_EXPORT Standard_Boolean GetSelectedObjects (const TCollection_AsciiString& thePluginName, + NCollection_List& theObjects); + #if OCC_VERSION_HEX <= 0x060901 DEFINE_STANDARD_RTTI (TInspectorAPI_PluginParameters) #else @@ -91,6 +122,10 @@ private: NCollection_DataMap > myParameters; //! container of names NCollection_DataMap > myFileNames; + //! container of select item names + NCollection_DataMap > mySelectedItemNames; + //! container of select objects + NCollection_DataMap > mySelectedObjects; }; #endif diff --git a/tools/ToolsDraw/ToolsDraw.cxx b/tools/ToolsDraw/ToolsDraw.cxx index 480a311c9e..0cd3a7b069 100644 --- a/tools/ToolsDraw/ToolsDraw.cxx +++ b/tools/ToolsDraw/ToolsDraw.cxx @@ -13,19 +13,73 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include +#include #include +#include +#include +#include #include +#include #include +#include #include #include -#include +#include +#include #include -#include +#include + +#if ! defined(_WIN32) +extern ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); +#else +Standard_EXPORT ViewerTest_DoubleMapOfInteractiveAndName& GetMapOfAIS(); +#endif static TInspector_Communicator* MyCommunicator; +// ======================================================================= +// function : convertToPluginName +// purpose : defines plugin library name by the command argument +// ======================================================================= +Standard_Boolean convertToPluginName (const TCollection_AsciiString& theArgument, + TCollection_AsciiString& thePluginName) +{ + TCollection_AsciiString anArgument = theArgument; + anArgument.LowerCase(); + + 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; } + + return Standard_False; +} + +// ======================================================================= +// function : getArgumentPlugins +// purpose : fills container of plugin names by the next following plugin names +// ======================================================================= +void getArgumentPlugins (Standard_Integer theArgsNb, const char** theArgs, Standard_Integer& theIt, + NCollection_List& thePlugins) +{ + while (theIt != theArgsNb) + { + TCollection_AsciiString aPluginName; + if (convertToPluginName (theArgs[theIt], aPluginName)) + { + if (!thePlugins.Contains (aPluginName)) + thePlugins.Append (aPluginName); + } + else + { + break; + } + theIt++; + } + theIt--; // the last not processed parameter is the next argument +} + // ======================================================================= // function : tinspector // purpose : @@ -34,76 +88,240 @@ static int tinspector (Draw_Interpretor&/* di*/, Standard_Integer theArgsNb, con { if (theArgsNb < 1) { - std::cerr << "Error: wrong number of arguments.\n"; + std::cout << "Error: wrong number of arguments.\n"; return 1; } - if (!MyCommunicator) - MyCommunicator = new TInspector_Communicator(); - NCollection_List aParameters; - + // parse command arguments NCollection_List aPlugins; - bool aNeedToUpdateContent = false, aNeedToActivateAllPlugins = false; + NCollection_DataMap > aParameters; + NCollection_DataMap anOpenFileParameters; + TCollection_AsciiString aPluginNameToActivate; + Standard_Boolean aNeedToUpdateContent = Standard_False, + aNeedToHideInspector = Standard_False, + aNeedToShowInspector = Standard_False; + + NCollection_List aDefaultParameters; + TCollection_AsciiString aDefaultOpenFileParameter; + + NCollection_List anObjectsToSelect; + NCollection_List anItemNamesToSelect; + for (Standard_Integer anIt = 1; anIt < theArgsNb; ++anIt) { TCollection_AsciiString aParam (theArgs[anIt]); aParam.LowerCase(); - TCollection_AsciiString aPluginName; - if (aParam == "-dfbrowser") - aPluginName = "TKDFBrowser"; - else if (aParam == "-shapeview") - aPluginName = "TKShapeView"; - else if (aParam == "-vinspector") - aPluginName = "TKVInspector"; - else if (aParam == "-all") - aNeedToActivateAllPlugins = true; - else if (aParam == "-update") - aNeedToUpdateContent = true; - - if (!aPluginName.IsEmpty() && !aPlugins.Contains (aPluginName)) - aPlugins.Append (aPluginName); + if (aParam.IsEqual ("-plugins")) // [-plugins {name1 [name2] ... [name3] | all}] + { + anIt++; + getArgumentPlugins(theArgsNb, theArgs, anIt, aPlugins); + } + else if (aParam.IsEqual ("-activate")) // [-activate name] + { + anIt++; + if (anIt == theArgsNb) + { + cout << "Empty argument of '" << aParam << "'.\n"; + return 1; + } + TCollection_AsciiString aPluginName; + if (convertToPluginName (theArgs[anIt], aPluginName)) + aPluginNameToActivate = aPluginName; + } + else if (aParam.IsEqual ("-shape")) // [-shape object [name1] ... [nameN]] + { + anIt++; + if (anIt == theArgsNb) + { + cout << "Empty argument of '" << aParam << "'.\n"; + return 1; + } + TopoDS_Shape aShape = DBRep::Get (theArgs[anIt]); + anIt++; + if (aShape.IsNull()) + { + cout << "Wrong shape name: " << aParam << ".\n"; + return 1; + } + NCollection_List anArgPlugins; + getArgumentPlugins(theArgsNb, theArgs, anIt, anArgPlugins); + if (anArgPlugins.IsEmpty()) + aDefaultParameters.Append(aShape.TShape()); + else + { + for (NCollection_List::Iterator anArgIt (anArgPlugins); + anArgIt.More(); anArgIt.Next()) + { + NCollection_List aPluginParameters; + aParameters.Find(anArgIt.Value(), aPluginParameters); + aPluginParameters.Append(aShape.TShape()); + aParameters.Bind (anArgIt.Value(), aPluginParameters); + } + } + } + else if (aParam.IsEqual ("-open")) // [-open file_name [name1] ... [nameN]] + { + anIt++; + if (anIt == theArgsNb) + { + cout << "Empty argument of '" << aParam << "'.\n"; + return 1; + } + TCollection_AsciiString aFileName (theArgs[anIt]); + anIt++; + + NCollection_List anArgPlugins; + getArgumentPlugins(theArgsNb, theArgs, anIt, anArgPlugins); + if (anArgPlugins.IsEmpty()) + aDefaultOpenFileParameter = aFileName; + else + { + for (NCollection_List::Iterator anArgIt (anArgPlugins); + anArgIt.More(); anArgIt.Next()) + { + NCollection_List aPluginParameters; + aParameters.Find(anArgIt.Value(), aPluginParameters); + anOpenFileParameters.Bind(anArgIt.Value(), aFileName); + } + } + } + else if (aParam.IsEqual ("-update")) // [-update] + { + aNeedToUpdateContent = Standard_True; + } + else if (aParam.IsEqual ("-select")) // [-select {name|object}] + { + anIt++; + if (anIt == theArgsNb) + { + cout << "Empty argument of '" << aParam << "'.\n"; + return 1; + } + // search shape with given name + TopoDS_Shape aShape = DBRep::Get (theArgs[anIt]); + if (!aShape.IsNull()) + { + anObjectsToSelect.Append(aShape.TShape()); + } + // search prsentations with given name + if (GetMapOfAIS().IsBound2(theArgs[anIt])) + { + Handle(AIS_InteractiveObject) anIO = Handle(AIS_InteractiveObject)::DownCast + (GetMapOfAIS().Find2 (theArgs[anIt])); + if (!anIO.IsNull()) + anObjectsToSelect.Append(anIO); + } + // give parameters as a container of names + TCollection_AsciiString aParam (theArgs[anIt]); + while (!aParam.StartsWith ("-")) + { + anItemNamesToSelect.Append (aParam); + anIt++; + if (anIt >= theArgsNb) + break; + aParam = theArgs[anIt]; + } + anIt--; + } + else if (aParam.IsEqual ("-show")) // [-show {0|1} = 1] + { + anIt++; + if (anIt == theArgsNb) + { + cout << "Empty argument of '" << aParam << "'.\n"; + return 1; + } + aNeedToHideInspector = Draw::Atoi (theArgs[anIt]) == 0; + aNeedToShowInspector = Draw::Atoi (theArgs[anIt]) > 0; + } + else + { + cout << "Wrong argument of command: " << aParam.ToCString() << "\n"; + return 1; + } } - // DFBrowser only parameter + // start inspector + Standard_Boolean isTInspectorCreation = !MyCommunicator; + if (!MyCommunicator) + MyCommunicator = new TInspector_Communicator(); + + Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext(); + if (!aContext.IsNull()) + aDefaultParameters.Append (aContext); + + // Sets OCAF application into DFBrowser const Handle(TDocStd_Application)& anApplication = DDocStd::GetApplication(); // Initialize standard document formats at creation - they should // be available even if this DRAW plugin is not loaded by pload command if (!anApplication.IsNull()) - aParameters.Append (anApplication); + { + NCollection_List aDFBrowserParameters; + aParameters.Find("TKDFBrowser", aDFBrowserParameters); + aDFBrowserParameters.Append(anApplication); + aParameters.Bind ("TKDFBrowser", aDFBrowserParameters); + } - const Handle(AIS_InteractiveContext)& aContext = ViewerTest::GetAISContext(); - if (!aContext.IsNull()) - aParameters.Append (aContext); + // by starting, if the plugns were not defined, register all + if (isTInspectorCreation) + { + if (aPlugins.IsEmpty()) + { + aPlugins.Append("TKDFBrowser"); + aPlugins.Append("TKShapeView"); + aPlugins.Append("TKVInspector"); + } + aPluginNameToActivate = !aPluginNameToActivate.IsEmpty() ? aPluginNameToActivate : aPlugins.First(); + } - if (aNeedToActivateAllPlugins) + // register plugin from parameters + for (NCollection_List::Iterator aPluginNameIt (aPlugins); + aPluginNameIt.More(); aPluginNameIt.Next()) + MyCommunicator->RegisterPlugin (aPluginNameIt.Value()); + + // init all registered plugins with the default and parameters values + NCollection_List aRegisteredPlugins = MyCommunicator->RegisteredPlugins(); + for (NCollection_List::Iterator anIterator (aRegisteredPlugins); + anIterator.More(); anIterator.Next()) { - MyCommunicator->RegisterPlugin ("TKDFBrowser"); - MyCommunicator->RegisterPlugin ("TKShapeView"); - MyCommunicator->RegisterPlugin ("TKVInspector"); + TCollection_AsciiString aPluginName = anIterator.Value(); + NCollection_List aParameterValues; + aParameters.Find (aPluginName, aParameterValues); - TCollection_AsciiString aLastPluginName = "TKDFBrowser"; - MyCommunicator->Init (aParameters); - MyCommunicator->Activate (aLastPluginName); + for (NCollection_List::Iterator aDefIt(aDefaultParameters); + aDefIt.More(); aDefIt.Next()) + aParameterValues.Append (aDefIt.Value()); + MyCommunicator->Init (aPluginName, aParameterValues, Standard_True); } - if (!aNeedToActivateAllPlugins) + if (!aPluginNameToActivate.IsEmpty()) + MyCommunicator->Activate (!aPluginNameToActivate.IsEmpty() ? aPluginNameToActivate : aPlugins.First()); + + if (!anOpenFileParameters.IsEmpty()) { - TCollection_AsciiString aLastPluginName; - for (NCollection_List::Iterator aPluginNameIt (aPlugins); - aPluginNameIt.More(); aPluginNameIt.Next()) - { - aLastPluginName = aPluginNameIt.Value(); - MyCommunicator->RegisterPlugin (aLastPluginName); - MyCommunicator->Init (aLastPluginName, aParameters); - } - MyCommunicator->Activate (aLastPluginName); + for (NCollection_DataMap::Iterator anOpenIt + (anOpenFileParameters); anOpenIt.More(); anOpenIt.Next()) + MyCommunicator->OpenFile(anOpenIt.Key(), anOpenIt.Value()); } + else if (!aDefaultOpenFileParameter.IsEmpty()) // open file in active plugin + MyCommunicator->OpenFile("", aDefaultOpenFileParameter); + + if (!anObjectsToSelect.IsEmpty()) + MyCommunicator->SetSelected(anObjectsToSelect); + + if (!anItemNamesToSelect.IsEmpty()) + MyCommunicator->SetSelected(anItemNamesToSelect); if (aNeedToUpdateContent) MyCommunicator->UpdateContent(); - MyCommunicator->SetVisible (true); + if (isTInspectorCreation || aNeedToShowInspector) + MyCommunicator->SetVisible (true); + + if (aNeedToHideInspector) + MyCommunicator->SetVisible (false); + return 0; } @@ -117,14 +335,32 @@ void ToolsDraw::Commands(Draw_Interpretor& theCommands) // display theCommands.Add ("tinspector", - "tinspector\n" - "[-all]\n" - "[-tinspector]\n" - "[-dfbrowser]\n" - "[-shaperview]\n" - "[-vinspector]\n" - "[-update]\n" - "\tStarts tool of inspection.\n", + "tinspector [-plugins {name1 ... [nameN] | all}]" + "\n\t\t: [-activate name]" + "\n\t\t: [-shape object [name1] ... [nameN]]" + "\n\t\t: [-open file_name [name1] ... [nameN]]" + "\n\t\t: [-update]" + "\n\t\t: [-select {object | name1 ... [nameN]}]" + "\n\t\t: [-show {0|1} = 1]" + "\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: 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: If at the first call this option is not used, 'all' option is applyed;" + "\n\t\t: -activate active the plugin in the tool view." + "\n\t\t: If at the first call this option is not used, the first plugin is activated;" + "\n\t\t: -shape initialize plugin/s by the shape object. If 'name' is empty, initializes all plugins;" + "\n\t\t: -open gives the file to the plugin/s. If the plugin is active, after open, update content will be done;" + "\n\t\t: -update updates content of the active plugin;" + "\n\t\t: -select set the parameter that should be selected in an active tool view." + "\n\t\t: Depending on active tool the parameter is:" + "\n\t\t: ShapeView: 'object' is an instance of TopoDS_Shape TShape," + "\n\t\t: DFBrowser: 'name' is an entry of TDF_Label and name2(optionaly) for TDF_Attribute type name," + "\n\t\t: VInspector: 'object' is an instance of AIS_InteractiveObject;" + "\n\t\t: -show set tool view visible or hidden. The first call of this command will show it.", __FILE__, tinspector, group); } diff --git a/tools/TreeModel/FILES b/tools/TreeModel/FILES index 2ef4a694c1..6bb591504c 100644 --- a/tools/TreeModel/FILES +++ b/tools/TreeModel/FILES @@ -1,5 +1,7 @@ TreeModel_ItemBase.cxx TreeModel_ItemBase.hxx TreeModel_ItemRole.hxx +TreeModel_MessageDialog.cxx +TreeModel_MessageDialog.hxx TreeModel_ModelBase.cxx TreeModel_ModelBase.hxx diff --git a/tools/TreeModel/TreeModel_ItemBase.cxx b/tools/TreeModel/TreeModel_ItemBase.cxx index b7bd152dfe..75a3957284 100644 --- a/tools/TreeModel/TreeModel_ItemBase.cxx +++ b/tools/TreeModel/TreeModel_ItemBase.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include #include diff --git a/tools/TreeModel/TreeModel_ItemBase.hxx b/tools/TreeModel/TreeModel_ItemBase.hxx index 85315a3fee..57f4000a3c 100644 --- a/tools/TreeModel/TreeModel_ItemBase.hxx +++ b/tools/TreeModel/TreeModel_ItemBase.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant diff --git a/tools/TreeModel/TreeModel_MessageDialog.cxx b/tools/TreeModel/TreeModel_MessageDialog.cxx new file mode 100644 index 0000000000..be2fbd9dcb --- /dev/null +++ b/tools/TreeModel/TreeModel_MessageDialog.cxx @@ -0,0 +1,123 @@ +// 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 + +#include +#include +#include +#include +#include +#include + +// ======================================================================= +// function : Constructor +// purpose : +// ======================================================================= +TreeModel_MessageDialog::TreeModel_MessageDialog (QWidget* theParent, const QString& theInformation, + const QString& theQuestion) +: QDialog (theParent), myDoNotShowItAgain (false), myPreviousAnswer (false), myInformation (theInformation), + myQuestion (theQuestion) +{ + setWindowTitle ("Information"); + + QGridLayout* aLayout = new QGridLayout (this); + QString anInformation = theInformation; + if (!theQuestion.isEmpty()) + anInformation += QString("\n\n%2").arg (myQuestion); + myInformationLabel = new QLabel (anInformation, this); + myInformationLabel->setWordWrap (true); + aLayout->addWidget (myInformationLabel, 0, 0, 1, 3); + + myDoNotShowCheckBox = new QCheckBox ("Don't show this dialog again. Do the same next time.", this); + connect (myDoNotShowCheckBox, SIGNAL (toggled (bool)), this, SLOT (onDonNotShowToggled (bool) )); + aLayout->addWidget (myDoNotShowCheckBox, 1, 0, 1, 3); + + myOkButton = new QPushButton ("Ok", this); + myCancelButton = new QPushButton ("Cancel", this); + connect (myOkButton, SIGNAL (clicked()), this, SLOT (onOkClicked() )); + connect (myCancelButton, SIGNAL (clicked()), this, SLOT (onCancelClicked() )); + aLayout->addWidget (myOkButton, 2, 1); + aLayout->addWidget (myCancelButton, 2, 2); + + aLayout->setColumnStretch (0, 1); + + SetInformation (theInformation); +} + +// ======================================================================= +// function : Start +// purpose : +// ======================================================================= +void TreeModel_MessageDialog::Start() +{ + if (!myDoNotShowItAgain) + { + QString anInformation = myInformation; + if (!myQuestion.isEmpty()) + anInformation += QString("\n\n%2").arg (myQuestion); + myInformationLabel->setText (anInformation); + exec(); + return; + } + + if (IsAccepted()) + return; + + // tool tip information window + QWidget* aWidget = new QWidget (this, Qt::Popup); + QVBoxLayout* aLayout = new QVBoxLayout (aWidget); + aLayout->addWidget (new QLabel(myInformation, aWidget)); + aWidget->move(QCursor::pos()); + aWidget->show(); +} + +// ======================================================================= +// function : onOkClicked +// purpose : +// ======================================================================= +void TreeModel_MessageDialog::onOkClicked() +{ + myPreviousAnswer = true; + if (myDoNotShowItAgain) + setToolTipInfoMode(); + + accept(); +} + +// ======================================================================= +// function : onCancelClicked +// purpose : +// ======================================================================= +void TreeModel_MessageDialog::onCancelClicked() +{ + myPreviousAnswer = false; + if (myDoNotShowItAgain) + setToolTipInfoMode(); + + reject(); +} + +// ======================================================================= +// function : setToolTipInfoMode +// purpose : +// ======================================================================= +void TreeModel_MessageDialog::setToolTipInfoMode() +{ + //setWindowFlags (Qt::FramelessWindowHint); + //myDoNotShowCheckBox->setVisible (false); + //myOkButton->setVisible (false); + //myCancelButton->setVisible (false); +} diff --git a/tools/TreeModel/TreeModel_MessageDialog.hxx b/tools/TreeModel/TreeModel_MessageDialog.hxx new file mode 100644 index 0000000000..433acc1b83 --- /dev/null +++ b/tools/TreeModel/TreeModel_MessageDialog.hxx @@ -0,0 +1,88 @@ +// 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 TreeModel_MessageDialog_H +#define TreeModel_MessageDialog_H + +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable : 4127) // conditional expression is constant +#endif +#include +#include +#include +#include +#include + +class DFBrowser_Module; +class QWidget; + +//! \class TreeModel_MessageDialog +//! Dialog providing information and a question. +//! It has a check box to do not the dialog again. In this case the previous value will be used as a result +class TreeModel_MessageDialog : public QDialog +{ + Q_OBJECT +public: + + //! Constructor + Standard_EXPORT TreeModel_MessageDialog (QWidget* theParent, const QString& theInformation, const QString& theQuestion); + + //! Destructor + virtual ~TreeModel_MessageDialog() {} + + //! Fills message dialog with the information + //! \param theInformation text + void SetInformation (const QString& theInformation) { myInformation = theInformation; } + + //! Returns result of the dialog + //! \bool true if the dialog was accepted + bool IsAccepted() { return myPreviousAnswer; } + + //! Either perform exec() for the dialog or show tool tip information depending do not be shown again state + Standard_EXPORT void Start(); + +private slots: + //! Processing this checkbox, store result in the dialog field to use by the next dialog start + //! \param theState current changed state of the check box + void onDonNotShowToggled (bool theState) { myDoNotShowItAgain = theState; } + + //! Processing action button. Stores accept choice, change dialog state if do not show it again is on + void onOkClicked(); + + //! Processing action button. Stores reject choice, change dialog state if do not show it again is on + void onCancelClicked(); + +private: + //! Change state of the dialog to message tool tip. Only information control will be shown in the dialog + void setToolTipInfoMode(); + +private: + bool myDoNotShowItAgain; //! state if the dialog should not be shown again, the latest result is used as answer + bool myPreviousAnswer; //! the previous cached result of the dialog + + QString myInformation; //! the information text + QString myQuestion; //! the question text + + QLabel* myInformationLabel; //! message control + QCheckBox* myDoNotShowCheckBox; //! choice whether the dialog will be shown again + QPushButton* myOkButton; //! accept button + QPushButton* myCancelButton; //! reject button +}; + + +#endif diff --git a/tools/TreeModel/TreeModel_ModelBase.cxx b/tools/TreeModel/TreeModel_ModelBase.cxx index cb738f3c3b..58eef1039c 100644 --- a/tools/TreeModel/TreeModel_ModelBase.cxx +++ b/tools/TreeModel/TreeModel_ModelBase.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include // ======================================================================= // function : Constructor diff --git a/tools/TreeModel/TreeModel_ModelBase.hxx b/tools/TreeModel/TreeModel_ModelBase.hxx index f1d186d768..38b98d5a30 100644 --- a/tools/TreeModel/TreeModel_ModelBase.hxx +++ b/tools/TreeModel/TreeModel_ModelBase.hxx @@ -17,7 +17,7 @@ #define TreeModel_ModelBase_H #include -#include +#include #include #include diff --git a/tools/VInspector/FILES b/tools/VInspector/FILES index 94d3c0664c..b52b057fb5 100644 --- a/tools/VInspector/FILES +++ b/tools/VInspector/FILES @@ -1,3 +1,4 @@ +VInspector.qrc VInspector_CallBack.cxx VInspector_CallBack.hxx VInspector_CallBackMode.hxx diff --git a/tools/VInspector/VInspector.qrc b/tools/VInspector/VInspector.qrc new file mode 100644 index 0000000000..ed3792b188 --- /dev/null +++ b/tools/VInspector/VInspector.qrc @@ -0,0 +1,5 @@ + + + icons/treeview_update.png + + diff --git a/tools/VInspector/VInspectorAPI_CallBack.cxx b/tools/VInspector/VInspectorAPI_CallBack.cxx index 042ae2cb8a..bdb5fb3cfe 100644 --- a/tools/VInspector/VInspectorAPI_CallBack.cxx +++ b/tools/VInspector/VInspectorAPI_CallBack.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #if OCC_VERSION_HEX <= 0x060901 IMPLEMENT_STANDARD_HANDLE(VInspectorAPI_CallBack, Standard_Transient) diff --git a/tools/VInspector/VInspector_CallBack.cxx b/tools/VInspector/VInspector_CallBack.cxx index df8e020199..ffbf64013a 100644 --- a/tools/VInspector/VInspector_CallBack.cxx +++ b/tools/VInspector/VInspector_CallBack.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include @@ -21,9 +21,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include diff --git a/tools/VInspector/VInspector_CallBack.hxx b/tools/VInspector/VInspector_CallBack.hxx index 53e33608b4..57bdeae4ff 100644 --- a/tools/VInspector/VInspector_CallBack.hxx +++ b/tools/VInspector/VInspector_CallBack.hxx @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class AIS_InteractiveObject; class SelectMgr_EntityOwner; diff --git a/tools/VInspector/VInspector_Communicator.cxx b/tools/VInspector/VInspector_Communicator.cxx index 4495fe6eda..654dc939c2 100644 --- a/tools/VInspector/VInspector_Communicator.cxx +++ b/tools/VInspector/VInspector_Communicator.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include +#include +#include #include diff --git a/tools/VInspector/VInspector_Communicator.hxx b/tools/VInspector/VInspector_Communicator.hxx index 4d271944fc..fdffb12b48 100644 --- a/tools/VInspector/VInspector_Communicator.hxx +++ b/tools/VInspector/VInspector_Communicator.hxx @@ -18,9 +18,9 @@ #include #include -#include +#include -#include +#include //! \class VInspector_Communicator. //! \brief This is a connector from TInspector application to VInspector view diff --git a/tools/VInspector/VInspector_ItemBase.cxx b/tools/VInspector/VInspector_ItemBase.cxx index bde1fb1d84..323db67bff 100644 --- a/tools/VInspector/VInspector_ItemBase.cxx +++ b/tools/VInspector/VInspector_ItemBase.cxx @@ -14,8 +14,8 @@ // commercial license or contractual agreement. -#include -#include +#include +#include // ======================================================================= // function : GetContext diff --git a/tools/VInspector/VInspector_ItemBase.hxx b/tools/VInspector/VInspector_ItemBase.hxx index db7245cacc..ca065ffd37 100644 --- a/tools/VInspector/VInspector_ItemBase.hxx +++ b/tools/VInspector/VInspector_ItemBase.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include class VInspector_ItemBase; typedef QExplicitlySharedDataPointer VInspector_ItemBasePtr; diff --git a/tools/VInspector/VInspector_ItemContext.cxx b/tools/VInspector/VInspector_ItemContext.cxx index de4e1f1283..9a8a91cc77 100644 --- a/tools/VInspector/VInspector_ItemContext.cxx +++ b/tools/VInspector/VInspector_ItemContext.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include -#include -#include +#include +#include #include diff --git a/tools/VInspector/VInspector_ItemContext.hxx b/tools/VInspector/VInspector_ItemContext.hxx index 3073dcae59..76a2a990c3 100644 --- a/tools/VInspector/VInspector_ItemContext.hxx +++ b/tools/VInspector/VInspector_ItemContext.hxx @@ -17,7 +17,7 @@ #define VInspector_ItemContext_H #include -#include +#include class VInspector_ItemContext; typedef QExplicitlySharedDataPointer VInspector_ItemContextPtr; diff --git a/tools/VInspector/VInspector_ItemEntityOwner.cxx b/tools/VInspector/VInspector_ItemEntityOwner.cxx index 380c73eab7..2201a72705 100644 --- a/tools/VInspector/VInspector_ItemEntityOwner.cxx +++ b/tools/VInspector/VInspector_ItemEntityOwner.cxx @@ -13,10 +13,10 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/tools/VInspector/VInspector_ItemEntityOwner.hxx b/tools/VInspector/VInspector_ItemEntityOwner.hxx index 36303e4521..598ca26d81 100644 --- a/tools/VInspector/VInspector_ItemEntityOwner.hxx +++ b/tools/VInspector/VInspector_ItemEntityOwner.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include class QItemSelectionModel; diff --git a/tools/VInspector/VInspector_ItemHistoryElement.cxx b/tools/VInspector/VInspector_ItemHistoryElement.cxx index d67e3d71c4..f6a6b1df65 100644 --- a/tools/VInspector/VInspector_ItemHistoryElement.cxx +++ b/tools/VInspector/VInspector_ItemHistoryElement.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include // ======================================================================= // function : data diff --git a/tools/VInspector/VInspector_ItemHistoryElement.hxx b/tools/VInspector/VInspector_ItemHistoryElement.hxx index 56ac3ac1f1..07bdc0ade1 100644 --- a/tools/VInspector/VInspector_ItemHistoryElement.hxx +++ b/tools/VInspector/VInspector_ItemHistoryElement.hxx @@ -17,7 +17,7 @@ #define VInspector_ItemHistoryElement_H #include -#include +#include class VInspector_ItemHistoryElement; typedef QExplicitlySharedDataPointer VInspector_ItemHistoryElementPtr; diff --git a/tools/VInspector/VInspector_ItemHistoryRoot.cxx b/tools/VInspector/VInspector_ItemHistoryRoot.cxx index 848b09cd79..7a5c2bd501 100644 --- a/tools/VInspector/VInspector_ItemHistoryRoot.cxx +++ b/tools/VInspector/VInspector_ItemHistoryRoot.cxx @@ -13,9 +13,9 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include +#include // ======================================================================= // function : Constructor diff --git a/tools/VInspector/VInspector_ItemHistoryRoot.hxx b/tools/VInspector/VInspector_ItemHistoryRoot.hxx index ad1ac7591d..42630670d4 100644 --- a/tools/VInspector/VInspector_ItemHistoryRoot.hxx +++ b/tools/VInspector/VInspector_ItemHistoryRoot.hxx @@ -17,9 +17,9 @@ #define VInspector_ItemHistoryRoot_H #include -#include -#include -#include +#include +#include +#include class VInspector_ItemHistoryRoot; typedef QExplicitlySharedDataPointer VInspector_ItemHistoryRootPtr; diff --git a/tools/VInspector/VInspector_ItemHistoryType.cxx b/tools/VInspector/VInspector_ItemHistoryType.cxx index 5fcfd0aa20..bd8f90a9a9 100644 --- a/tools/VInspector/VInspector_ItemHistoryType.cxx +++ b/tools/VInspector/VInspector_ItemHistoryType.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include // ======================================================================= // function : PointerInfo diff --git a/tools/VInspector/VInspector_ItemHistoryType.hxx b/tools/VInspector/VInspector_ItemHistoryType.hxx index d2384db1ba..875a9b6418 100644 --- a/tools/VInspector/VInspector_ItemHistoryType.hxx +++ b/tools/VInspector/VInspector_ItemHistoryType.hxx @@ -17,7 +17,7 @@ #define VInspector_ItemHistoryType_H #include -#include +#include class VInspector_ItemHistoryType; typedef QExplicitlySharedDataPointer VInspector_ItemHistoryTypePtr; diff --git a/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx b/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx index 1763d92229..e01b36b2b6 100644 --- a/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx +++ b/tools/VInspector/VInspector_ItemHistoryTypeInfo.hxx @@ -16,7 +16,7 @@ #ifndef VInspector_ItemHistoryTypeInfo_H #define VInspector_ItemHistoryTypeInfo_H -#include +#include //! \class VInspector_ItemHistoryTypeInfo //! History info for a type item. It contains container of information for the element diff --git a/tools/VInspector/VInspector_ItemPresentableObject.cxx b/tools/VInspector/VInspector_ItemPresentableObject.cxx index aa9ef134b3..47664b1ad7 100644 --- a/tools/VInspector/VInspector_ItemPresentableObject.cxx +++ b/tools/VInspector/VInspector_ItemPresentableObject.cxx @@ -13,16 +13,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/tools/VInspector/VInspector_ItemPresentableObject.hxx b/tools/VInspector/VInspector_ItemPresentableObject.hxx index 9ca4a7ee70..ed5765200f 100644 --- a/tools/VInspector/VInspector_ItemPresentableObject.hxx +++ b/tools/VInspector/VInspector_ItemPresentableObject.hxx @@ -17,7 +17,7 @@ #define VInspector_ItemPresentableObject_H #include -#include +#include #include #include diff --git a/tools/VInspector/VInspector_ItemSelection.cxx b/tools/VInspector/VInspector_ItemSelection.cxx index 94383e0ca4..faaa5b14f6 100644 --- a/tools/VInspector/VInspector_ItemSelection.cxx +++ b/tools/VInspector/VInspector_ItemSelection.cxx @@ -13,16 +13,16 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/tools/VInspector/VInspector_ItemSelection.hxx b/tools/VInspector/VInspector_ItemSelection.hxx index 1f9cc7a93d..f1565a6c03 100644 --- a/tools/VInspector/VInspector_ItemSelection.hxx +++ b/tools/VInspector/VInspector_ItemSelection.hxx @@ -17,7 +17,7 @@ #define VInspector_ItemSelection_H #include -#include +#include #include diff --git a/tools/VInspector/VInspector_ItemSensitiveEntity.cxx b/tools/VInspector/VInspector_ItemSensitiveEntity.cxx index 2fb7135e79..49044062e8 100644 --- a/tools/VInspector/VInspector_ItemSensitiveEntity.cxx +++ b/tools/VInspector/VInspector_ItemSensitiveEntity.cxx @@ -14,7 +14,7 @@ // commercial license or contractual agreement. -#include +#include #include #include @@ -24,10 +24,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/tools/VInspector/VInspector_ItemSensitiveEntity.hxx b/tools/VInspector/VInspector_ItemSensitiveEntity.hxx index b62aad6cd4..ecda9976e7 100644 --- a/tools/VInspector/VInspector_ItemSensitiveEntity.hxx +++ b/tools/VInspector/VInspector_ItemSensitiveEntity.hxx @@ -19,7 +19,7 @@ #include #include #include -#include +#include class SelectBasics_EntityOwner; class VInspector_ItemSensitiveEntity; diff --git a/tools/VInspector/VInspector_ToolBar.cxx b/tools/VInspector/VInspector_ToolBar.cxx index 9c5aff0209..e84d7199f4 100644 --- a/tools/VInspector/VInspector_ToolBar.cxx +++ b/tools/VInspector/VInspector_ToolBar.cxx @@ -13,12 +13,13 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include -#include +#include #include + // ======================================================================= // function : Constructor // purpose : @@ -26,34 +27,42 @@ VInspector_ToolBar::VInspector_ToolBar (QWidget* theParent) : QObject (theParent) { - myActionsMap[VInspector_ToolActionType_UpdateId] = new QToolButton (theParent); + myActionsMap[VInspector_ToolActionType_UpdateId] = new QPushButton (theParent); + myActionsMap[VInspector_ToolActionType_UpdateId]->setIcon (QIcon (":/icons/treeview_update.png")); + myActionsMap[VInspector_ToolActionType_UpdateId]->setText (tr ("Update Tree Model")); + myActionsMap[VInspector_ToolActionType_UpdateId]->setToolTip (tr ("Update Tree Model")); + myActionsMap[VInspector_ToolActionType_UpdateId]->setText ("Update"); - myActionsMap[VInspector_ToolActionType_SelectPresentationsId] = new QToolButton (theParent); + myActionsMap[VInspector_ToolActionType_SelectPresentationsId] = new QPushButton (theParent); myActionsMap[VInspector_ToolActionType_SelectPresentationsId]->setText ("Select Presentations"); myActionsMap[VInspector_ToolActionType_SelectPresentationsId]->setCheckable (true); + myActionsMap[VInspector_ToolActionType_SelectPresentationsId]->setFixedHeight(20); - myActionsMap[VInspector_ToolActionType_SelectOwnersId] = new QToolButton (theParent); + myActionsMap[VInspector_ToolActionType_SelectOwnersId] = new QPushButton (theParent); myActionsMap[VInspector_ToolActionType_SelectOwnersId]->setText ("Select Owners"); myActionsMap[VInspector_ToolActionType_SelectOwnersId]->setCheckable (true); + myActionsMap[VInspector_ToolActionType_SelectPresentationsId]->setFixedHeight(25); myMainWindow = new QWidget (theParent); QHBoxLayout* aLay = new QHBoxLayout (myMainWindow); - for (QMap::ConstIterator anActionsIt = myActionsMap.begin(); + aLay->setMargin(0); + for (QMap::ConstIterator anActionsIt = myActionsMap.begin(); anActionsIt != myActionsMap.end(); anActionsIt++) { - QToolButton* aBtn = anActionsIt.value(); + QPushButton* aBtn = anActionsIt.value(); connect (aBtn, SIGNAL (clicked()), this, SLOT (onActionClicked())); aLay->addWidget (aBtn); } + aLay->addStretch(1); } // ======================================================================= // function : GetToolButton // purpose : // ======================================================================= -QToolButton* VInspector_ToolBar::GetToolButton (const VInspector_ToolActionType& theActionId ) const +QPushButton* VInspector_ToolBar::GetToolButton (const VInspector_ToolActionType& theActionId ) const { return myActionsMap.contains (theActionId) ? myActionsMap[theActionId] : 0; } @@ -65,9 +74,9 @@ QToolButton* VInspector_ToolBar::GetToolButton (const VInspector_ToolActionType& void VInspector_ToolBar::onActionClicked() { int anId = -1; - QToolButton* aSenderBtn = (QToolButton*)sender(); + QPushButton* aSenderBtn = (QPushButton*)sender(); - for (QMap::ConstIterator anActionsIt = myActionsMap.begin(); + for (QMap::ConstIterator anActionsIt = myActionsMap.begin(); anActionsIt != myActionsMap.end(); anActionsIt++) { if (anActionsIt.value() != aSenderBtn) diff --git a/tools/VInspector/VInspector_ToolBar.hxx b/tools/VInspector/VInspector_ToolBar.hxx index dae4819b58..5e8257eaf1 100644 --- a/tools/VInspector/VInspector_ToolBar.hxx +++ b/tools/VInspector/VInspector_ToolBar.hxx @@ -18,7 +18,7 @@ #include #include -#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects @@ -27,7 +27,7 @@ #include class QWidget; -class QToolButton; +class QPushButton; //! \class VInspector_ToolBar //! Container of View tool bar actions @@ -48,7 +48,7 @@ public: //! Returns tool button by action index //! \param theActionId index of action - Standard_EXPORT QToolButton* GetToolButton (const VInspector_ToolActionType& theActionId) const; + Standard_EXPORT QPushButton* GetToolButton (const VInspector_ToolActionType& theActionId) const; signals: @@ -64,7 +64,7 @@ private slots: private: QWidget* myMainWindow; //!< the main control - QMap myActionsMap; //!< container of type into button + QMap myActionsMap; //!< container of type into button }; #endif diff --git a/tools/VInspector/VInspector_Tools.cxx b/tools/VInspector/VInspector_Tools.cxx index c63bdb9200..414f349eb3 100644 --- a/tools/VInspector/VInspector_Tools.cxx +++ b/tools/VInspector/VInspector_Tools.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/VInspector/VInspector_Tools.hxx b/tools/VInspector/VInspector_Tools.hxx index 6a82baa679..a3bd96a6e4 100644 --- a/tools/VInspector/VInspector_Tools.hxx +++ b/tools/VInspector/VInspector_Tools.hxx @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant diff --git a/tools/VInspector/VInspector_ViewModel.cxx b/tools/VInspector/VInspector_ViewModel.cxx index f5dc9372dd..86a4060317 100644 --- a/tools/VInspector/VInspector_ViewModel.cxx +++ b/tools/VInspector/VInspector_ViewModel.cxx @@ -13,12 +13,12 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -80,6 +80,27 @@ QModelIndexList VInspector_ViewModel::FindPointers (const QStringList& thePointe return anIndices; } +// ======================================================================= +// function : FindIndex +// purpose : +// ======================================================================= +QModelIndex VInspector_ViewModel::FindIndex (const Handle(AIS_InteractiveObject)& thePresentation) const +{ + QModelIndex aParentIndex = index (0, 0); + TreeModel_ItemBasePtr aParentItem = TreeModel_ModelBase::GetItemByIndex (aParentIndex); // context item + for (int aRowId = 0, aCount = aParentItem->rowCount(); aRowId < aCount; aRowId++) + { + QModelIndex anIndex = index (aRowId, 0, aParentIndex); + TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex (anIndex); + VInspector_ItemPresentableObjectPtr anItemPrs = itemDynamicCast(anItemBase); + if (!anItemPrs) + continue; + if (anItemPrs->GetInteractiveObject() == thePresentation) + return anIndex; + } + return QModelIndex(); +} + // ======================================================================= // function : headerData // purpose : diff --git a/tools/VInspector/VInspector_ViewModel.hxx b/tools/VInspector/VInspector_ViewModel.hxx index c1d6c18e9f..f73f063d30 100644 --- a/tools/VInspector/VInspector_ViewModel.hxx +++ b/tools/VInspector/VInspector_ViewModel.hxx @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -60,6 +60,11 @@ public: //! \return container of indices Standard_EXPORT QModelIndexList FindPointers (const QStringList& thePointers); + //! Returns tree model index of the presentation item in the tree view. + //! \param thePresentation a presentation + //! \return model index if the value is found or Null model index + Standard_EXPORT QModelIndex FindIndex (const Handle(AIS_InteractiveObject)& thePresentation) const; + //! Returns root item by column //! \param theColumn an index of the column //! \return root item instance diff --git a/tools/VInspector/VInspector_ViewModelHistory.cxx b/tools/VInspector/VInspector_ViewModelHistory.cxx index 7b158be064..77839f2b67 100644 --- a/tools/VInspector/VInspector_ViewModelHistory.cxx +++ b/tools/VInspector/VInspector_ViewModelHistory.cxx @@ -13,11 +13,11 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include -#include -#include -#include +#include +#include +#include #include diff --git a/tools/VInspector/VInspector_ViewModelHistory.hxx b/tools/VInspector/VInspector_ViewModelHistory.hxx index dc23eacc1a..76b6f2f634 100644 --- a/tools/VInspector/VInspector_ViewModelHistory.hxx +++ b/tools/VInspector/VInspector_ViewModelHistory.hxx @@ -17,15 +17,15 @@ #define VInspector_ViewModelHistory_H #include -#include -#include +#include +#include #include #include #include #include -#include +#include //! \class VInspector_ViewModelHistory //! The class that visualizes methods called in AIS interactive context. diff --git a/tools/VInspector/VInspector_Window.cxx b/tools/VInspector/VInspector_Window.cxx index e0b3ef3a58..0d2d970e14 100644 --- a/tools/VInspector/VInspector_Window.cxx +++ b/tools/VInspector/VInspector_Window.cxx @@ -13,17 +13,28 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -55,11 +66,18 @@ const int VINSPECTOR_DEFAULT_HEIGHT = 800; const int VINSPECTOR_DEFAULT_POSITION_X = 200; 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_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 + // ======================================================================= // function : Constructor // purpose : // ======================================================================= VInspector_Window::VInspector_Window() +: myParent (0), myExportToShapeViewDialog (0), myViewWindow (0) { myMainWindow = new QMainWindow (0); @@ -91,7 +109,7 @@ VInspector_Window::VInspector_Window() VInspector_ViewModelHistory* aHistoryModel = new VInspector_ViewModelHistory (myHistoryView); myHistoryView->setModel (aHistoryModel); - QItemSelectionModel* aSelectionModel = new QItemSelectionModel (myTreeView->model()); + QItemSelectionModel* aSelectionModel = new QItemSelectionModel (myHistoryView->model()); myHistoryView->setSelectionModel (aSelectionModel); connect (aSelectionModel, SIGNAL (selectionChanged (const QItemSelection&, const QItemSelection&)), this, SLOT (onHistoryViewSelectionChanged (const QItemSelection&, const QItemSelection&))); @@ -102,7 +120,7 @@ VInspector_Window::VInspector_Window() myHistoryView->setColumnWidth (3, COLUMN_3_WIDTH); myHistoryView->setColumnWidth (4, HISTORY_AIS_NAME_COLUMN_WIDTH); - QDockWidget* aHistoryDockWidget = new QDockWidget (tr ("Tree Level Line"), myMainWindow); + QDockWidget* aHistoryDockWidget = new QDockWidget (tr ("HistoryView"), myMainWindow); aHistoryDockWidget->setWidget (myHistoryView); myMainWindow->addDockWidget (Qt::BottomDockWidgetArea, aHistoryDockWidget); @@ -119,11 +137,11 @@ VInspector_Window::VInspector_Window() // ======================================================================= void VInspector_Window::SetParent (void* theParent) { - QWidget* aParent = (QWidget*)theParent; - if (!aParent) + myParent = (QWidget*)theParent; + if (!myParent) return; - QLayout* aLayout = aParent->layout(); + QLayout* aLayout = myParent->layout(); if (aLayout) aLayout->addWidget (GetMainWindow()); } @@ -147,6 +165,29 @@ void VInspector_Window::UpdateContent() NCollection_List aNames; myParameters->SetFileNames(aName, aNames); } + + // make AIS_InteractiveObject selected selected if exist in select parameters + NCollection_List anObjects; + if (myParameters->GetSelectedObjects(aName, anObjects)) + { + VInspector_ViewModel* aViewModel = dynamic_cast(myTreeView->model()); + QItemSelectionModel* aSelectionModel = myTreeView->selectionModel(); + aSelectionModel->clear(); + for (NCollection_List::Iterator aParamsIt (anObjects); + aParamsIt.More(); aParamsIt.Next()) + { + Handle(Standard_Transient) anObject = aParamsIt.Value(); + Handle(AIS_InteractiveObject) aPresentation = Handle(AIS_InteractiveObject)::DownCast (anObject); + if (aPresentation.IsNull()) + continue; + + QModelIndex aPresentationIndex = aViewModel->FindIndex (aPresentation); + if (!aPresentationIndex.isValid()) + continue; + aSelectionModel->select (aPresentationIndex, QItemSelectionModel::Select); + myTreeView->scrollTo (aPresentationIndex); + } + } } // ======================================================================= @@ -218,11 +259,17 @@ void VInspector_Window::SetContext (const Handle(AIS_InteractiveContext)& theCon void VInspector_Window::OpenFile(const TCollection_AsciiString& theFileName) { VInspector_ViewModel* aViewModel = dynamic_cast (myTreeView->model()); + if (!aViewModel) + { + Handle(AIS_InteractiveContext) aContext = createView(); + SetContext (aContext); + aViewModel = dynamic_cast (myTreeView->model()); + } if (!aViewModel) return; - + Handle(AIS_InteractiveContext) aContext = aViewModel->GetContext(); - if (aContext.IsNull()) + if (!aContext) return; TopoDS_Shape aShape = VInspector_Tools::ReadShape (theFileName); @@ -351,29 +398,39 @@ void VInspector_Window::onExportToShapeView() return; TCollection_AsciiString aPluginName ("TKShapeView"); - if (myParameters->FindParameters(aPluginName)) - { - NCollection_List aPluginParameters = myParameters->Parameters(aPluginName); + NCollection_List aParameters; + if (myParameters->FindParameters (aPluginName)) + aParameters = myParameters->Parameters (aPluginName); - QStringList anExportedPointers; - for (NCollection_List::Iterator anIOIt (aSelectedPresentations); anIOIt.More(); anIOIt.Next()) - { - Handle(AIS_Shape) aShapePresentation = Handle(AIS_Shape)::DownCast (anIOIt.Value()); - if (aShapePresentation.IsNull()) - continue; + QStringList anExportedPointers; + for (NCollection_List::Iterator anIOIt (aSelectedPresentations); anIOIt.More(); anIOIt.Next()) + { + Handle(AIS_Shape) aShapePresentation = Handle(AIS_Shape)::DownCast (anIOIt.Value()); + if (aShapePresentation.IsNull()) + continue; - const TopoDS_Shape& aShape = aShapePresentation->Shape(); - if (aShape.IsNull()) - continue; - aPluginParameters.Append (aShape.TShape()); - anExportedPointers.append (VInspector_Tools::GetPointerInfo (aShape.TShape(), true).ToCString()); - } - if (anExportedPointers.empty()) - return; - myParameters->SetParameters (aPluginName, aPluginParameters); - QMessageBox::information (0, "Information", QString("TShapes '%1' are sent to %2 tool.") - .arg (anExportedPointers.join(", ").arg (QString (aPluginName.ToCString())))); + const TopoDS_Shape& aShape = aShapePresentation->Shape(); + if (aShape.IsNull()) + continue; + aParameters.Append (aShape.TShape()); + anExportedPointers.append (VInspector_Tools::GetPointerInfo (aShape.TShape(), true).ToCString()); } + if (anExportedPointers.empty()) + return; + + TCollection_AsciiString aPluginShortName = aPluginName.SubString (3, aPluginName.Length()); + QString aMessage = QString ("TShape %1 is sent to %2.") + .arg (anExportedPointers.join(", ")) + .arg (aPluginShortName.ToCString()); + QString aQuestion = QString ("Would you like to activate %1 immediately?\n") + .arg (aPluginShortName.ToCString()).toStdString().c_str(); + if (!myExportToShapeViewDialog) + myExportToShapeViewDialog = new TreeModel_MessageDialog (myParent, aMessage, aQuestion); + else + myExportToShapeViewDialog->SetInformation (aMessage); + myExportToShapeViewDialog->Start(); + + myParameters->SetParameters (aPluginName, aParameters); } // ======================================================================= @@ -451,3 +508,17 @@ void VInspector_Window::displaySelectedPresentations(const bool theToDisplay) } aContext->UpdateCurrentViewer(); } + +// ======================================================================= +// function : createView +// purpose : +// ======================================================================= +Handle(AIS_InteractiveContext) VInspector_Window::createView() +{ + myViewWindow = new View_Window (0); + myViewWindow->GetView()->SetPredefinedSize (VINSPECTOR_DEFAULT_VIEW_WIDTH, VINSPECTOR_DEFAULT_VIEW_HEIGHT); + myViewWindow->move (VINSPECTOR_DEFAULT_VIEW_POSITION_X, VINSPECTOR_DEFAULT_VIEW_POSITION_Y); + myViewWindow->show(); + + return myViewWindow->GetView()->GetViewer()->GetContext(); +} diff --git a/tools/VInspector/VInspector_Window.hxx b/tools/VInspector/VInspector_Window.hxx index 3515ef3ebc..7fa4664aba 100644 --- a/tools/VInspector/VInspector_Window.hxx +++ b/tools/VInspector/VInspector_Window.hxx @@ -20,14 +20,17 @@ #include #include #include -#include -#include +#include +#include #include #include #include +class TreeModel_MessageDialog; + class VInspector_ToolBar; +class View_Window; class QAbstractItemModel; class QAction; @@ -126,14 +129,23 @@ private: //! \param theToDisplay if true, presentation is displayed otherwise erased void displaySelectedPresentations (const bool theToDisplay); + //! Creates an istance of 3D view to initialize context. + //! \return a context of created view. + Handle(AIS_InteractiveContext) createView(); + private: + QWidget* myParent; //!< widget, comes when Init window, the window control lays in the layout, updates window title + QMainWindow* myMainWindow; //!< main control VInspector_ToolBar* myToolBar; //!< tool bar actions QTreeView* myTreeView; //!< tree view of AIS content QTreeView* myHistoryView; //!< history of AIS context calls Handle(VInspector_CallBack) myCallBack; //!< AIS context call back, if set + TreeModel_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 + Handle(TInspectorAPI_PluginParameters) myParameters; //!< plugins parameters container }; diff --git a/tools/VInspector/icons/treeview_update.png b/tools/VInspector/icons/treeview_update.png new file mode 100644 index 0000000000000000000000000000000000000000..134d316403dd9747daa7ad2b544b41cd2a92aea7 GIT binary patch literal 1101 zcmV-T1hV^yP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1L8?UK~y+TV;~YR zLNWQkBX=Tu_Pk@dg`2J<=4`uHAG!8!mGk_|!NwiC%c7oYv|l0g009HHpNd?3X#g)2GDs@FQ%$JcX!b)x{F z&B?QOI~4D`e>(Bt>u*+@UVM{W`1}v&gs1!04LVXr4G_;|kyI)f04b`;){II>UKlW|Xrvn~Jrsg}kww29V1Q#4JF} z48*J)%5Jh;E*%$>I0%pdC>B8m zV2e#gVPSP%Zs)o}=BTxA8PfIv4LkOqq2|tihPGG#*^16!HIN|S)-f07h?}*Aq3-m5 zhVHBX8K&I*&#>^#f40s`M+J>T`Ju{)1Cqu*Ts$$ol}rtXJ~2$Z_Mc$}&~*zQ{byYL z@;~R~vls?4g_hJy_?NdUnCG`EsHe9p$j8?!h{sebiu>m)i0kQbi)fgt@pu*Va3u81 z;z*t_lOuh~bdKy9Q@IM~Oc6@yDv*(};DnmRz~Jf{!(F)b_-gNCPwwk%et2JU(cSwz z6RzH8t2uF>J8{+;aea3MpfXVSf;53JD9wQ|I}o!0F(?8NK;18i*K+HOVvB?f;B1r~j}At==f=(X0$qhBZ0K z+sA{vj+(bYE@UgceuSaq%|E8h$G;d-AO2@ZxbmMN>d1e_(4BwT0+t;S@b2-Ga;^~8 z(h6k*86s(&CMRN%9wuuN;>TcY%nCIM0+d|J`Pnnh9AQg3eU>L+X$4F4(fbV1C;l@; z?ElXYy6rzh$j1N7!K*&91us0#=|6oHyI1dKcIU>6JZ5S0`Q^+MfkvRZUd5xHPcUlD zBtfr*E;0JA{KF8m`aeS?(9nbf{~1z_{%1@+^p7QK?Hew~iYe@} zMxda;Qk2=-vxvJEivd}%*kt85O)=ndZth|CnsAOKc+qo~_^mHlQ}*8Ch+V&$+odLq zS4u+|sE(vUmytnIl8ax>Rgu>;){@6G$&OpsUze9x3S +#include #include #include #include #include #include -#include -#include +#include +#include // ======================================================================= // function : Constructor diff --git a/tools/View/View_Displayer.hxx b/tools/View/View_Displayer.hxx index a67ec44ad6..7b788031bd 100644 --- a/tools/View/View_Displayer.hxx +++ b/tools/View/View_Displayer.hxx @@ -22,7 +22,7 @@ #include #include #include -#include +#include class V3d_View; diff --git a/tools/View/View_ToolBar.cxx b/tools/View/View_ToolBar.cxx index 3887e18279..2373a35813 100644 --- a/tools/View/View_ToolBar.cxx +++ b/tools/View/View_ToolBar.cxx @@ -14,7 +14,7 @@ // commercial license or contractual agreement. -#include +#include #include #include @@ -42,7 +42,7 @@ View_ToolBar::View_ToolBar (QWidget* theParent) QHBoxLayout* aViewSelectorLay = new QHBoxLayout (aViewSelectorWidget); aViewSelectorLay->setContentsMargins (0, 0, 0, 0); aViewSelectorLay->setContentsMargins (0, 0, 0, 0); - aViewSelectorLay->addWidget (new QLabel (tr ("View: "), aViewSelectorWidget)); + aViewSelectorLay->addWidget (new QLabel (tr ("Context: "), aViewSelectorWidget)); myViewSelector = new QComboBox (aViewSelectorWidget); myViewSelector->setMinimumWidth (DEFAULT_COMBO_WIDTH_MINIMUM); aViewSelectorLay->addWidget (myViewSelector); @@ -63,14 +63,16 @@ View_ToolBar::View_ToolBar (QWidget* theParent) myActionsMap[View_ToolActionType_KeepViewId] = new QToolButton (theParent); myActionsMap[View_ToolActionType_KeepViewId]->setIcon (QIcon (":/icons/keep_view_on.png")); - myActionsMap[View_ToolActionType_KeepViewId]->setText (tr ("Keep View On")); + myActionsMap[View_ToolActionType_KeepViewId]->setText (tr ("Multi")); myActionsMap[View_ToolActionType_KeepViewId]->setToolTip (tr ("Keep View On: does not clear previously shown presentation")); + myActionsMap[View_ToolActionType_KeepViewId]->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); myActionsMap[View_ToolActionType_KeepViewId]->setCheckable (true); myActionsMap[View_ToolActionType_KeepViewId]->setChecked (false); myActionsMap[View_ToolActionType_KeepViewOffId] = new QToolButton (theParent); myActionsMap[View_ToolActionType_KeepViewOffId]->setIcon (QIcon (":/icons/keep_view_off.png")); - myActionsMap[View_ToolActionType_KeepViewOffId]->setText (QObject::tr ("Keep View Off")); + myActionsMap[View_ToolActionType_KeepViewOffId]->setText (QObject::tr ("Single")); + myActionsMap[View_ToolActionType_KeepViewOffId]->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); myActionsMap[View_ToolActionType_KeepViewOffId]->setToolTip (tr ("Keep View Off: clear previously shown presentation")); myActionsMap[View_ToolActionType_KeepViewOffId]->setCheckable (true); myActionsMap[View_ToolActionType_KeepViewOffId]->setChecked (true); diff --git a/tools/View/View_ToolBar.hxx b/tools/View/View_ToolBar.hxx index c81d2c0ff1..a4fcd5db49 100644 --- a/tools/View/View_ToolBar.hxx +++ b/tools/View/View_ToolBar.hxx @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects diff --git a/tools/View/View_Viewer.cxx b/tools/View/View_Viewer.cxx index 73550fbd68..1b2ed6c105 100644 --- a/tools/View/View_Viewer.cxx +++ b/tools/View/View_Viewer.cxx @@ -13,7 +13,7 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#include +#include #include #include diff --git a/tools/View/View_Widget.cxx b/tools/View/View_Widget.cxx index aaaac60495..a72d908342 100644 --- a/tools/View/View_Widget.cxx +++ b/tools/View/View_Widget.cxx @@ -17,12 +17,12 @@ #define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */ #endif -#include +#include #include #include -#include -#include +#include +#include #include #include diff --git a/tools/View/View_Widget.hxx b/tools/View/View_Widget.hxx index cd83e451b3..06d6ccbba9 100644 --- a/tools/View/View_Widget.hxx +++ b/tools/View/View_Widget.hxx @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects diff --git a/tools/View/View_Window.cxx b/tools/View/View_Window.cxx index 0a7684c12a..e6939689c4 100644 --- a/tools/View/View_Window.cxx +++ b/tools/View/View_Window.cxx @@ -17,12 +17,12 @@ #define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */ #endif -#include +#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/tools/View/View_Window.hxx b/tools/View/View_Window.hxx index 8150238885..61556f4d42 100644 --- a/tools/View/View_Window.hxx +++ b/tools/View/View_Window.hxx @@ -17,7 +17,7 @@ #define View_Window_H #include -#include +#include #ifdef _MSC_VER #pragma warning(disable : 4127) // conditional expression is constant -- 2.20.1