TInspector headers are collected in 'inc/tools' directory.
Extending DRAW Commands;
Eliminating warnings;
Improve Export to ShapeView dialog;
Avoid crash with QML using;
# collect all the headers to <binary dir>/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
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}")
// commercial license or contractual agreement.
-#include <OSD_Environment.hxx>
#include <TInspectorEXE_OpenFileDialog.hxx>
-#include <TInspector_Communicator.hxx>
+
+#include <inspector/TInspector_Communicator.hxx>
+
+#include <OSD_Environment.hxx>
#include <QAction>
#include <QApplication>
// commercial license or contractual agreement.
#include <TInspectorEXE_OpenFileDialog.hxx>
-
-#include <TInspector_Communicator.hxx>
#include <TInspectorEXE_OpenFileViewModel.hxx>
+#include <inspector/TInspector_Communicator.hxx>
+
#include <QApplication>
#include <QCompleter>
#include <QDir>
set aLabel 0:2
SetInteger Doc ${aLabel} ${aSetAttr1}
-tinspector -dfbrowser
+tinspector -plugins dfbrowser
tinspector -update
chrono qat start
# Create a new document and set UndoLimit
NewDocument D BinOcaf
-tinspector -dfbrowser
+tinspector -plugins dfbrowser
#NewDocument D
cpulimit 300
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_AttributePaneStack.hxx>
-
-#include <DFBrowserPane_AttributePaneAPI.hxx>
-#include <DFBrowserPane_AttributePaneSelector.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeLevelView.hxx>
-#include <DFBrowser_TreeModel.hxx>
-#include <DFBrowser_SearchView.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_AttributePaneStack.hxx>
+
+#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneSelector.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
+#include <inspector/DFBrowser_SearchView.hxx>
+#include <inspector/DFBrowser_Window.hxx>
#include <TDF_Attribute.hxx>
#ifndef DFBrowser_AttributePaneStack_H
#define DFBrowser_AttributePaneStack_H
-#include <DFBrowser_AttributePaneType.hxx>
+#include <inspector/DFBrowser_AttributePaneType.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QMap>
#include <QItemSelection>
// commercial license or contractual agreement.
-#include <DFBrowser_Communicator.hxx>
+#include <inspector/DFBrowser_Communicator.hxx>
#include <CDF_Session.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Window.hxx>
// =======================================================================
// function : CreateCommunicator
#ifndef DFBrowser_Communicator_H
#define DFBrowser_Communicator_H
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
+
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-#include <TInspectorAPI_Communicator.hxx>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_DumpView.hxx>
+#include <inspector/DFBrowser_DumpView.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_Window.hxx>
-#include <DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
#include <OSD_OpenFile.hxx>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
#include <QAbstractItemModel>
#include <QDir>
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<DFBrowser_Item> (anItemBase);
aFile.close();
QDir aDir;
aDir.remove (aFileName.ToCString());
-//#define REQUIRE_OCAF_REVIEW:18 : end
if (!aDumpInfo.isEmpty())
{
myTextEdit->setVisible (true);
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_HighlightDelegate.hxx>
+#include <inspector/DFBrowser_HighlightDelegate.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_Window.hxx>
#include <QPainter>
// =======================================================================
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_Item.hxx>
-#include <DFBrowser_ItemRole.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_ItemRole.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDF_AttributeIterator.hxx>
#include <TDF_ChildIterator.hxx>
const int INFO_LENGHT = 60;
-//#define REQUIRE_OCAF_REVIEW:23
// =======================================================================
// function : hasAttribute
// purpose :
#ifndef DFBrowser_Item_H
#define DFBrowser_Item_H
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
#include <TDF_Attribute.hxx>
#include <Standard.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_ItemApplication.hxx>
+#include <inspector/DFBrowser_ItemApplication.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_ItemDocument.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemDocument.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
#include <QObject>
-//#define REQUIRE_OCAF_REVIEW:21
-
// =======================================================================
// function : createChild
// purpose :
#ifndef DFBrowser_ItemApplication_H
#define DFBrowser_ItemApplication_H
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
+
#include <TDocStd_Application.hxx>
class DFBrowser_ItemApplication;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Name.hxx>
#include <TDF_ChildIterator.hxx>
#include <QIcon>
#include <QVariant>
-//#define REQUIRE_OCAF_REVIEW:20
// =======================================================================
// function : Constructor
// purpose :
#define DFBrowser_ItemBase_H
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <TDF_Label.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
class DFBrowser_ItemBase;
class DFBrowser_Module;
typedef QExplicitlySharedDataPointer<DFBrowser_ItemBase> DFBrowser_ItemBasePtr;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_ItemDocument.hxx>
+#include <inspector/DFBrowser_ItemDocument.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_ItemApplication.hxx>
-#include <DFBrowser_ItemDocument.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemApplication.hxx>
+#include <inspector/DFBrowser_ItemDocument.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
#include <QIcon>
#include <QLabel>
#include <QObject>
-//#define REQUIRE_OCAF_REVIEW:22
-
// =======================================================================
// function : GetLabel
// purpose :
#ifndef DFBrowser_ItemDocument_H
#define DFBrowser_ItemDocument_H
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
+
#include <Standard.hxx>
#include <TDocStd_Document.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Module.hxx>
-
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_ItemApplication.hxx>
-#include <DFBrowser_ItemBase.hxx>
-#include <DFBrowser_ItemRole.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeModel.hxx>
-
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_AttributePaneCreator.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_Tools.hxx>
-
-#include <DFBrowserPaneXDE_AttributePaneCreator.hxx>
-#include <DFBrowserPaneXDE_Tools.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemApplication.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemRole.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
+
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
+
+#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
+#include <inspector/DFBrowserPaneXDE_Tools.hxx>
#include <XCAFApp_Application.hxx>
#ifndef DFBrowser_Module_H
#define DFBrowser_Module_H
+#include <inspector/DFBrowser_TreeModel.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <AIS_InteractiveContext.hxx>
-#include <DFBrowser_TreeModel.hxx>
#include <NCollection_Map.hxx>
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_Attribute.hxx>
#include <TDocStd_Application.hxx>
#include <TopoDS_Shape.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_OpenApplication.hxx>
+#include <inspector/DFBrowser_OpenApplication.hxx>
#include <BinDrivers.hxx>
#include <BinLDrivers.hxx>
#include <XmlXCAFDrivers.hxx>
#include <UTL.hxx>
-//#define REQUIRE_OCAF_REVIEW:24
namespace DFBrowser_OpenApplication
{
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_PropertyPanel.hxx>
+#include <inspector/DFBrowser_PropertyPanel.hxx>
-#include <DFBrowser_AttributePaneStack.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_SearchView.hxx>
-#include <DFBrowser_Window.hxx>
-#include <DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_AttributePaneStack.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_SearchView.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
#include <QAbstractItemModel>
#include <QGridLayout>
#ifndef DFBrowser_PropertyPanel_H
#define DFBrowser_PropertyPanel_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QItemSelection>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_SearchLine.hxx>
-#include <DFBrowser_SearchLineModel.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_SearchLineModel.hxx>
+#include <inspector/DFBrowser_Window.hxx>
-#include <DFBrowserPane_Tools.hxx>
-#include <DFBrowser_Module.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowser_Module.hxx>
#include <TDocStd_Application.hxx>
#include <TDocStd_Document.hxx>
#ifndef DFBrowser_SearchLine_H
#define DFBrowser_SearchLine_H
-#include <DFBrowser_SearchLineModel.hxx> // to include DFBrowser_SearchItemInfo
+#include <inspector/DFBrowser_SearchLineModel.hxx> // to include DFBrowser_SearchItemInfo
+
#include <Standard.hxx>
#include <TDocStd_Application.hxx>
#include <TDF_Label.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_SearchLineModel.hxx>
+#include <inspector/DFBrowser_SearchLineModel.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <QDir>
#include <QIcon>
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);
#ifndef DFBrowser_SearchLineModel_H
#define DFBrowser_SearchLineModel_H
-#include <DFBrowser_SearchItemInfo.hxx>
+#include <inspector/DFBrowser_SearchItemInfo.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
-#include <TreeModel_ItemBase.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_SearchView.hxx>
+#include <inspector/DFBrowser_SearchView.hxx>
-#include <DFBrowser_HighlightDelegate.hxx>
-#include <DFBrowser_SearchLine.hxx>
-#include <DFBrowser_SearchLineModel.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_HighlightDelegate.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_SearchLineModel.hxx>
+#include <inspector/DFBrowser_Window.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <QAbstractProxyModel>
#include <QGridLayout>
#ifndef DFBrowser_SearchView_H
#define DFBrowser_SearchView_H
-#include <DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QItemSelection>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Shortcut.hxx>
+#include <inspector/DFBrowser_Shortcut.hxx>
-#include <DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Module.hxx>
#include <QApplication>
#include <QKeyEvent>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Thread.hxx>
-#include <DFBrowser_ThreadItemSearch.hxx>
-#include <DFBrowser_ThreadItemUsedShapesMap.hxx>
-#include <DFBrowser_TreeLevelLine.hxx>
-#include <DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_Thread.hxx>
+#include <inspector/DFBrowser_ThreadItemSearch.hxx>
+#include <inspector/DFBrowser_ThreadItemUsedShapesMap.hxx>
+#include <inspector/DFBrowser_TreeLevelLine.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_Window.hxx>
#include <QThread>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_ThreadItemSearch.hxx>
+#include <inspector/DFBrowser_ThreadItemSearch.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeModel.hxx>
-#include <DFBrowser_SearchLine.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Comment.hxx>
#include <TDataStd_Name.hxx>
myDocumentValues.clear();
myDocumentInfoValues.clear();
- //#define REQUIRE_OCAF_REVIEW:25 : start
QMap<QString, DFBrowser_SearchItemInfo> anAdditionalValues;
QStringList anInfoValues;
QStringList aCurrentPath;
myDocumentValues[aDocId] = anAdditionalValues;
myDocumentInfoValues[aDocId] = anInfoValues;
}
- //#define REQUIRE_OCAF_REVIEW:25 : end
}
// =======================================================================
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());
}
}
#ifndef DFBrowser_ThreadItemSearch_H
#define DFBrowser_ThreadItemSearch_H
-#include <DFBrowser_ThreadItem.hxx>
-#include <DFBrowser_SearchLineModel.hxx> // to include DFBrowser_SearchItemInfo
+#include <inspector/DFBrowser_ThreadItem.hxx>
+#include <inspector/DFBrowser_SearchLineModel.hxx> // to include DFBrowser_SearchItemInfo
+
#include <Standard.hxx>
#include <TDF_Label.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_ThreadItemUsedShapesMap.hxx>
+#include <inspector/DFBrowser_ThreadItemUsedShapesMap.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeModel.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
-#include <DFBrowserPane_TNamingUsedShapes.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TNaming_DataMapIteratorOfDataMapOfShapePtrRefShape.hxx>
#include <TNaming_PtrRefShape.hxx>
TreeModel_ItemBasePtr anItemBase = TreeModel_ModelBase::GetItemByIndex
(aDFBrowserModel->FindIndexByAttribute (aRefIt.Key()));
if (anItemBase)
+ {
+ anItemBase->Reset();
anItemBase->Init();
+ }
}
// clear cache
myAttributeRefs.Clear();
// function : findReferences
// purpose :
// =======================================================================
-//#define REQUIRE_OCAF_REVIEW:26 : start
void DFBrowser_ThreadItemUsedShapesMap::findReferences (Handle(TDF_Attribute) theAttribute,
std::list<TCollection_AsciiString>& theReferences)
{
anEntryIt != anEntries.end(); anEntryIt++)
theReferences.push_back (anEntryIt->first);
}
-//#define REQUIRE_OCAF_REVIEW:26 : end
#ifndef DFBROWSER_ThreadItemUsedShapesMap_H
#define DFBROWSER_ThreadItemUsedShapesMap_H
-#include <DFBrowser_ThreadItem.hxx>
+#include <inspector/DFBrowser_ThreadItem.hxx>
+
#include <NCollection_DataMap.hxx>
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
-#include <DFBrowserPane_AttributePaneCreator.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_Tool.hxx>
#include <QPalette>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:27
-
namespace DFBrowser_Tools
{
// =======================================================================
#ifndef DFBrowser_Tools_H
#define DFBrowser_Tools_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
#include <Standard_GUID.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <TDocStd_Document.hxx>
#include <TDF_Label.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeLevelLine.hxx>
+#include <inspector/DFBrowser_TreeLevelLine.hxx>
-#include <DFBrowser_SearchLine.hxx>
-#include <DFBrowser_Window.hxx>
-#include <DFBrowser_TreeLevelLineDelegate.hxx>
-#include <DFBrowser_TreeLevelLineModel.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_TreeLevelLineDelegate.hxx>
+#include <inspector/DFBrowser_TreeLevelLineModel.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <QAbstractItemModel>
#include <QFrame>
#ifndef DFBrowser_TreeLevelLine_H
#define DFBrowser_TreeLevelLine_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QItemSelection>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeLevelLineDelegate.hxx>
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_TreeLevelLineDelegate.hxx>
+#include <inspector/DFBrowser_Window.hxx>
#include <QPainter>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeLevelLineModel.hxx>
+#include <inspector/DFBrowser_TreeLevelLineModel.hxx>
-#include <DFBrowser_ItemBase.hxx>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
#include <QIcon>
#include <QWidget>
#ifndef DFBrowser_TreeLevelLineModel_H
#define DFBrowser_TreeLevelLineModel_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QAbstractTableModel>
#include <QObject>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_TreeLevelViewModel.hxx>
-#include <DFBrowser_Window.hxx>
-#include <DFBrowserPane_Tools.hxx>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_TreeLevelViewModel.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
#include <QItemSelectionModel>
#ifndef DFBrowser_TreeLevelView_H
#define DFBrowser_TreeLevelView_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QObject>
#include <QItemSelection>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeLevelViewModel.hxx>
+#include <inspector/DFBrowser_TreeLevelViewModel.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_ItemRole.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemRole.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
#include <TDF_AttributeIterator.hxx>
#include <TDF_ChildIterator.hxx>
#include <TDF_Label.hxx>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
#include <QIcon>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeModel.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_ItemApplication.hxx>
-#include <DFBrowser_ItemDocument.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Window.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemApplication.hxx>
+#include <inspector/DFBrowser_ItemDocument.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Window.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <NCollection_List.hxx>
#include <TDocStd_Application.hxx>
#include <QAbstractItemModel>
-//#define REQUIRE_OCAF_REVIEW:19
// =======================================================================
// function : Constructor
// purpose :
// =======================================================================
QModelIndex DFBrowser_TreeModel::FindIndex (const TDF_Label& theLabel) const
{
-//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences)
TDF_Label aRoot = theLabel.Root();
NCollection_List<TDF_Label> aLabels;
}
}
}
- //#define REQUIRE_OCAF_REVIEW:10 : end
return aParentIndex;
}
void DFBrowser_TreeModel::ConvertToIndices (const NCollection_List<TDF_Label>& theReferences,
QModelIndexList& theIndices)
{
-//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences)
for (NCollection_List<TDF_Label>::Iterator aLabelItr (theReferences); aLabelItr.More(); aLabelItr.Next())
theIndices.append (FindIndex (aLabelItr.Value()));
-//#define REQUIRE_OCAF_REVIEW:10 : end
}
// =======================================================================
#ifndef DFBrowser_TreeModel_H
#define DFBrowser_TreeModel_H
-#include <DFBrowser_ItemBase.hxx>
+#include <inspector/DFBrowser_ItemBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
+
#include <NCollection_List.hxx>
#include <Standard.hxx>
#include <TDF_Label.hxx>
#include <TDocStd_Application.hxx>
-#include <TreeModel_ModelBase.hxx>
#include <QByteArray>
#include <QHash>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_TreeView.hxx>
+#include <inspector/DFBrowser_TreeView.hxx>
// =======================================================================
// function : SetPredefinedSize
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowser_Window.hxx>
+#include <inspector/DFBrowser_Window.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <CDF_Session.hxx>
-#include <DFBrowserPane_AttributePaneAPI.hxx>
-
-#include <DFBrowser_AttributePaneStack.hxx>
-#include <DFBrowser_AttributePaneType.hxx>
-#include <DFBrowser_DumpView.hxx>
-#include <DFBrowser_Item.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_OpenApplication.hxx>
-#include <DFBrowser_PropertyPanel.hxx>
-#include <DFBrowser_SearchLine.hxx>
-#include <DFBrowser_SearchView.hxx>
-#include <DFBrowser_Shortcut.hxx>
-#include <DFBrowser_Thread.hxx>
-#include <DFBrowser_ThreadItemSearch.hxx>
-#include <DFBrowser_ThreadItemUsedShapesMap.hxx>
-#include <DFBrowser_Tools.hxx>
-#include <DFBrowser_TreeLevelLine.hxx>
-#include <DFBrowser_TreeLevelView.hxx>
-#include <DFBrowser_TreeModel.hxx>
-#include <DFBrowser_TreeView.hxx>
-
-#include <DFBrowserPane_AttributePaneSelector.hxx>
-#include <DFBrowserPane_SelectionKind.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
+
+#include <inspector/DFBrowser_AttributePaneStack.hxx>
+#include <inspector/DFBrowser_AttributePaneType.hxx>
+#include <inspector/DFBrowser_DumpView.hxx>
+#include <inspector/DFBrowser_Item.hxx>
+#include <inspector/DFBrowser_ItemApplication.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_OpenApplication.hxx>
+#include <inspector/DFBrowser_PropertyPanel.hxx>
+#include <inspector/DFBrowser_SearchLine.hxx>
+#include <inspector/DFBrowser_SearchView.hxx>
+#include <inspector/DFBrowser_Shortcut.hxx>
+#include <inspector/DFBrowser_Thread.hxx>
+#include <inspector/DFBrowser_ThreadItemSearch.hxx>
+#include <inspector/DFBrowser_ThreadItemUsedShapesMap.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_TreeLevelLine.hxx>
+#include <inspector/DFBrowser_TreeLevelView.hxx>
+#include <inspector/DFBrowser_TreeModel.hxx>
+#include <inspector/DFBrowser_TreeView.hxx>
+
+#include <inspector/DFBrowserPane_AttributePaneSelector.hxx>
+#include <inspector/DFBrowserPane_SelectionKind.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <OSD_Directory.hxx>
#include <OSD_Environment.hxx>
#include <OSD_Protection.hxx>
-#include <View_Displayer.hxx>
-#include <View_ToolBar.hxx>
-#include <View_Viewer.hxx>
-#include <View_Widget.hxx>
-#include <View_Window.hxx>
+#include <inspector/View_Displayer.hxx>
+#include <inspector/View_ToolBar.hxx>
+#include <inspector/View_Viewer.hxx>
+#include <inspector/View_Widget.hxx>
+#include <inspector/View_Window.hxx>
+
+#include <TDF_Tool.hxx>
+#include <inspector/TreeModel_MessageDialog.hxx>
#include <QAction>
#include <QApplication>
// purpose :
// =======================================================================
DFBrowser_Window::DFBrowser_Window()
-: myModule (0), myParent (0), myPropertyPanel (0)
+: myModule (0), myParent (0), myPropertyPanel (0), myExportToShapeViewDialog (0)
{
myMainWindow = new QMainWindow (0);
myParameters->SetFileNames(aName, NCollection_List<TCollection_AsciiString>());
}
onUpdateClicked();
+
+ // make parameter items selected if defined
+ if (myParameters->FindSelectedNames(aName))
+ {
+ const NCollection_List<TCollection_AsciiString>& aSelected = myParameters->GetSelectedNames (aName);
+
+ DFBrowser_TreeModel* aTreeModel = dynamic_cast<DFBrowser_TreeModel*> (myTreeView->model());
+ Handle(TDocStd_Application) anApplication = aTreeModel->GetTDocStdApplication();
+
+ QItemSelectionModel* aSelectionModel = myTreeView->selectionModel();
+ aSelectionModel->clear();
+
+ NCollection_List<TCollection_AsciiString>::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<DFBrowser_Item> (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<DFBrowser_Item> (anItemBase);
+ if (anItem->HasAttribute())
+ {
+ // processing attribute in theValue
+ DFBrowser_ItemApplicationPtr aRootAppItem = itemDynamicCast<DFBrowser_ItemApplication>(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<TCollection_AsciiString>());
+ }
}
// =======================================================================
// =======================================================================
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();
myModule->SetInitialTreeViewSelection();
QApplication::restoreOverrideCursor();
}
- //#define REQUIRE_OCAF_REVIEW:28 (check that previous application is correctly closed) : end
}
// =======================================================================
return;
TCollection_AsciiString aPluginName ("TKShapeView");
- if (!myParameters->FindParameters (aPluginName))
- return;
+ NCollection_List<Handle(Standard_Transient)> aParameters;
+ if (myParameters->FindParameters (aPluginName))
+ aParameters = myParameters->Parameters (aPluginName);
- NCollection_List<Handle(Standard_Transient)> 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;
}
Handle(TDF_Attribute) anAttribute = myModule->FindAttribute (aSelectedIndex);
NCollection_List<TDF_Label> 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<DFBrowser_TreeModel*> (myTreeView->model());
if (!aReferences.IsEmpty())
#ifndef DFBrowser_Window_H
#define DFBrowser_Window_H
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+
#include <AIS_InteractiveObject.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <NCollection_List.hxx>
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDF_Label.hxx>
-#include <TInspectorAPI_PluginParameters.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant
class DFBrowser_Thread;
class DFBrowser_TreeLevelLine;
+class TreeModel_MessageDialog;
+
class View_ToolBar;
class View_Window;
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
};
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
#include <AIS_InteractiveObject.hxx>
#include <QTableView>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:3 : start
-
// =======================================================================
// function : Constructor
// purpose :
aValues.insert (aColumnId, DFBrowserPane_Tools::DefaultPanelColumnWidth (aColumnId));
return aValues;
}
-//#define REQUIRE_OCAF_REVIEW:2 : end
#ifndef DFBrowserPane_AttributePane_H
#define DFBrowserPane_AttributePane_H
-#include <DFBrowserPane_AttributePaneAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_AttributePaneCreator.hxx>
+#include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
#include <TDF_Attribute.hxx>
#include <TDF_Reference.hxx>
// the types are defined in TDF library
-#include <DFBrowserPane_TDFReference.hxx>
-#include <DFBrowserPane_TDFTagSource.hxx>
+#include <inspector/DFBrowserPane_TDFReference.hxx>
+#include <inspector/DFBrowserPane_TDFTagSource.hxx>
#include <TDataStd_Current.hxx>
#include <TDataStd_Name.hxx>
// the types are defined in TDataStd.cdl
// Basic attributes
-#include <DFBrowserPane_TDataStdCurrent.hxx>
-#include <DFBrowserPane_TDataStdName.hxx>
-#include <DFBrowserPane_TDataStdComment.hxx>
-#include <DFBrowserPane_TDataStdInteger.hxx>
-#include <DFBrowserPane_TDataStdIntegerArray.hxx>
-#include <DFBrowserPane_TDataStdReal.hxx>
-#include <DFBrowserPane_TDataStdRealArray.hxx>
-#include <DFBrowserPane_TDataStdExtStringArray.hxx>
-#include <DFBrowserPane_TDataStdUAttribute.hxx>
-
-#include <DFBrowserPane_TDataStdTreeNode.hxx>
-#include <DFBrowserPane_TDataStdDirectory.hxx>
-#include <DFBrowserPane_TDataStdNoteBook.hxx>
-#include <DFBrowserPane_TDataStdExpression.hxx>
-#include <DFBrowserPane_TDataStdRelation.hxx>
-#include <DFBrowserPane_TDataStdVariable.hxx>
+#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
+#include <inspector/DFBrowserPane_TDataStdName.hxx>
+#include <inspector/DFBrowserPane_TDataStdComment.hxx>
+#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdReal.hxx>
+#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
+
+#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
+#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
+#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
+#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
+#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
+#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
//Extension
-#include <DFBrowserPane_TDataStdTick.hxx>
-#include <DFBrowserPane_TDataStdAsciiString.hxx>
-#include <DFBrowserPane_TDataStdIntPackedMap.hxx>
+#include <inspector/DFBrowserPane_TDataStdTick.hxx>
+#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
// Lists:
-#include <DFBrowserPane_TDataStdIntegerList.hxx>
-#include <DFBrowserPane_TDataStdRealList.hxx>
-#include <DFBrowserPane_TDataStdExtStringList.hxx>
-#include <DFBrowserPane_TDataStdBooleanList.hxx>
-#include <DFBrowserPane_TDataStdReferenceList.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
+#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
+#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
+#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
+#include <inspector/DFBrowserPane_TDataStdReferenceList.hxx>
// Arrays:
-#include <DFBrowserPane_TDataStdBooleanArray.hxx>
-#include <DFBrowserPane_TDataStdReferenceArray.hxx>
-#include <DFBrowserPane_TDataStdByteArray.hxx>
-#include <DFBrowserPane_TDataStdNamedData.hxx>
+#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdReferenceArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
// TDocStd attributes
-#include <DFBrowserPane_TDocStdModified.hxx>
-#include <DFBrowserPane_TDocStdOwner.hxx>
-#include <DFBrowserPane_TDocStdXLink.hxx>
-#include <DFBrowserPane_TDocStdXLinkRoot.hxx>
+#include <inspector/DFBrowserPane_TDocStdModified.hxx>
+#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
+#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
+#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
// TPrsStd attributes
-#include <DFBrowserPane_TPrsStdAISViewer.hxx>
-#include <DFBrowserPane_TPrsStdAISPresentation.hxx>
+#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
+#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
// TNaming attributes
-#include <DFBrowserPane_TNamingNamedShape.hxx>
-#include <DFBrowserPane_TNamingNaming.hxx>
-#include <DFBrowserPane_TNamingUsedShapes.hxx>
+#include <inspector/DFBrowserPane_TNamingNamedShape.hxx>
+#include <inspector/DFBrowserPane_TNamingNaming.hxx>
+#include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
// TFunction attributes
-#include <DFBrowserPane_TFunctionFunction.hxx>
-#include <DFBrowserPane_TFunctionGraphNode.hxx>
-#include <DFBrowserPane_TFunctionScope.hxx>
+#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
+#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
+#include <inspector/DFBrowserPane_TFunctionScope.hxx>
-//#define REQUIRE_OCAF_REVIEW:1 : start
// =======================================================================
// function : Constructor
// purpose :
return aPane;
}
-
-//#define REQUIRE_OCAF_REVIEW : end
#ifndef DFBrowserPane_AttributePaneCreator_H
#define DFBrowserPane_AttributePaneCreator_H
-#include <DFBrowserPane_AttributePaneAPI.hxx>
-#include <DFBrowserPane_AttributePaneCreatorAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneCreatorAPI.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_AttributePaneCreator
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
// =======================================================================
// function : Constructor
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_AttributePaneSelector.hxx>
+#include <inspector/DFBrowserPane_AttributePaneSelector.hxx>
#include <QItemSelectionModel>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
#include <QList>
#include <QVariant>
#include <QGridLayout>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:6 : start
// =======================================================================
// function : Constructor
// purpose :
for (int aRowId = 0, aRows = myValuesModel->rowCount(); aRowId < aRows; aRowId++)
theValues.append (myValuesModel->data (myValuesModel->index (aRowId, 0)));
}
-//#define REQUIRE_OCAF_REVIEW:6 : end
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_HelperExport.hxx>
+#include <inspector/DFBrowserPane_HelperExport.hxx>
#include <BRepTools.hxx>
#include <TCollection_AsciiString.hxx>
#ifndef DFBrowserPane_HelperExport_H
#define DFBrowserPane_HelperExport_H
-#include <DFBrowserPane.hxx>
+#include <inspector/DFBrowserPane.hxx>
#include <TopoDS_Shape.hxx>
#ifdef _MSC_VER
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_HelperGroupContent.hxx>
+#include <inspector/DFBrowserPane_HelperGroupContent.hxx>
#include <QHBoxLayout>
#include <QWidget>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_ItemDelegateButton.hxx>
+#include <inspector/DFBrowserPane_ItemDelegateButton.hxx>
#include <QAbstractItemModel>
#include <QEvent>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDFReference.hxx>
+#include <inspector/DFBrowserPane_TDFReference.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDF_Reference.hxx>
#ifndef DFBrowserPane_TDFReference_H
#define DFBrowserPane_TDFReference_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDFReference
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDFTagSource.hxx>
+#include <inspector/DFBrowserPane_TDFTagSource.hxx>
#include <TDF_TagSource.hxx>
#ifndef DFBrowserPane_TDFTagSource_H
#define DFBrowserPane_TDFTagSource_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDFTagSource
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdAsciiString.hxx>
+#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
#include <TDataStd_AsciiString.hxx>
#include <QVariant>
#include <QIcon>
-//#define REQUIRE_OCAF_REVIEW:4 : start
// =======================================================================
// function : GetValues
// purpose :
if (!anAttribute.IsNull())
theValues.append (anAttribute->Get().ToCString());
}
-//#define REQUIRE_OCAF_REVIEW:4 : end
#ifndef DFBrowserPane_TDataStdAsciiString_H
#define DFBrowserPane_TDataStdAsciiString_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdAsciiString
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdBooleanArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
#include <TDataStd_BooleanArray.hxx>
#include <QWidget>
#include <QGridLayout>
-//#define REQUIRE_OCAF_REVIEW:5 : start
// =======================================================================
// function : CreateWidget
// purpose :
myArrayTableHelper.Init (aValues);
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
}
-//#define REQUIRE_OCAF_REVIEW:5 : end
#ifndef DFBrowserPane_TDataStdBooleanArray_H
#define DFBrowserPane_TDataStdBooleanArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdBooleanArray
//! \brief The class to manipulate of TDataStd_BooleanArray attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdBooleanList.hxx>
+#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
#include <TDataStd_BooleanList.hxx>
#include <TDataStd_ListIteratorOfListOfByte.hxx>
#ifndef DFBrowserPane_TDataStdBooleanList_H
#define DFBrowserPane_TDataStdBooleanList_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdBooleanList
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdByteArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
#include <TDataStd_ByteArray.hxx>
#ifndef DFBrowserPane_TDataStdByteArray_H
#define DFBrowserPane_TDataStdByteArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdByteArray
//! \brief The class to manipulate of TDataStd_ByteArra attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdComment.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdComment.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Comment.hxx>
#ifndef DFBrowserPane_TDataStdComment_H
#define DFBrowserPane_TDataStdComment_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdComment
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdCurrent.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Current.hxx>
#ifndef DFBrowserPane_TDataStdCurrent_H
#define DFBrowserPane_TDataStdCurrent_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdCurrent
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdDirectory.hxx>
+#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
#include <TDataStd_Directory.hxx>
#ifndef DFBrowserPane_TDataStdDirectory_H
#define DFBrowserPane_TDataStdDirectory_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdDirectory
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdExpression.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Expression.hxx>
#include <QVariant>
#ifndef DFBrowserPane_TDataStdExpression_H
#define DFBrowserPane_TDataStdExpression_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdExpression
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdExtStringArray.hxx>
-#include <DFBrowserPane_Tools.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
#include <TDataStd_ExtStringArray.hxx>
#ifndef DFBrowserPane_TDataStdExtStringArray_H
#define DFBrowserPane_TDataStdExtStringArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdExtStringArray
//! \brief The class to manipulate of TDataStd_ExtStringArray attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdExtStringList.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_ExtStringList.hxx>
#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
#include <QVariant>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:7 : start (DFBrowserPane_Tools)
// =======================================================================
// function : GetValues
// purpose :
for (TDataStd_ListIteratorOfListOfExtendedString aValuesIt(anAttribute->List()); aValuesIt.More(); aValuesIt.Next())
theValues.append (DFBrowserPane_Tools::ToString (aValuesIt.Value()));
}
-//#define REQUIRE_OCAF_REVIEW:7 : end
#ifndef DFBrowserPane_TDataStdExtStringList_H
#define DFBrowserPane_TDataStdExtStringList_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdExtStringList
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdIntPackedMap.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
#include <TDataStd_IntPackedMap.hxx>
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
#ifndef DFBrowserPane_TDataStdIntPackedMap_H
#define DFBrowserPane_TDataStdIntPackedMap_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdIntPackedMap
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdInteger.hxx>
+#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
#include <TDataStd_Integer.hxx>
#ifndef DFBrowserPane_TDataStdInteger_H
#define DFBrowserPane_TDataStdInteger_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdInteger
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdIntegerArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
#include <TDataStd_IntegerArray.hxx>
#ifndef DFBrowserPane_TDataStdIntegerArray_H
#define DFBrowserPane_TDataStdIntegerArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdIntegerArray
//! \brief The class to manipulate of TDataStd_IntegerArray attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdIntegerList.hxx>
+#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
#include <TDataStd_IntegerList.hxx>
#include <TColStd_ListIteratorOfListOfInteger.hxx>
#ifndef DFBrowserPane_TDataStdIntegerList_H
#define DFBrowserPane_TDataStdIntegerList_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdIntegerList
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdName.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdName.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_Name.hxx>
#ifndef DFBrowserPane_TDataStdName_H
#define DFBrowserPane_TDataStdName_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdName
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdNamedData.hxx>
+#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperGroupContent.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperGroupContent.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TColStd_DataMapOfStringInteger.hxx>
#include <TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx>
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 :
}
return aValues;
}
-//#define REQUIRE_OCAF_REVIEW:9 : end
#ifndef DFBrowserPane_TDataStdNamedData_H
#define DFBrowserPane_TDataStdNamedData_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
class DFBrowserPane_AttributePaneModel;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdNoteBook.hxx>
+#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
#include <TDataStd_NoteBook.hxx>
#ifndef DFBrowserPane_TDataStdNoteBook_H
#define DFBrowserPane_TDataStdNoteBook_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdNoteBook
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdReal.hxx>
+#include <inspector/DFBrowserPane_TDataStdReal.hxx>
#include <TDataStd_Real.hxx>
#ifndef DFBrowserPane_TDataStdReal_H
#define DFBrowserPane_TDataStdReal_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdReal
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdRealArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
#include <TDataStd_RealArray.hxx>
#ifndef DFBrowserPane_TDataStdRealArray_H
#define DFBrowserPane_TDataStdRealArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdRealArray
//! \brief The class to manipulate of TDataStd_RealArray attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdRealList.hxx>
+#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
#include <TDataStd_RealList.hxx>
#ifndef DFBrowserPane_TDataStdRealList_H
#define DFBrowserPane_TDataStdRealList_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdRealList
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdReferenceArray.hxx>
+#include <inspector/DFBrowserPane_TDataStdReferenceArray.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_ReferenceArray.hxx>
#include <QVariant>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:10 : start (GetReferences)
// =======================================================================
// function : CreateWidget
// purpose :
theRefLabels.Append (aLabel);
}
}
-//#define REQUIRE_OCAF_REVIEW:10 : end
#ifndef DFBrowserPane_TDataStdReferenceArray_H
#define DFBrowserPane_TDataStdReferenceArray_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <Standard.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperArray.hxx>
-#include <DFBrowserPane_HelperArray.hxx>
+#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdReferenceArray
//! \brief The class to manipulate of TDataStd_ReferenceArray attribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdReferenceList.hxx>
+#include <inspector/DFBrowserPane_TDataStdReferenceList.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_ReferenceList.hxx>
#include <TDF_ListIteratorOfLabelList.hxx>
#ifndef DFBrowserPane_TDataStdReferenceList_H
#define DFBrowserPane_TDataStdReferenceList_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdReferenceList
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdRelation.hxx>
+#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
#include <TDataStd_Relation.hxx>
#ifndef DFBrowserPane_TDataStdRelation_H
#define DFBrowserPane_TDataStdRelation_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdRelation
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdTick.hxx>
+#include <inspector/DFBrowserPane_TDataStdTick.hxx>
#include <TDataStd_Tick.hxx>
#ifndef DFBrowserPane_TDataStdTick_H
#define DFBrowserPane_TDataStdTick_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdTick
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdTreeNode.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_TDataStdTreeNodeItem.hxx>
-#include <DFBrowserPane_TDataStdTreeNodeModel.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNodeItem.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNodeModel.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_TreeNode.hxx>
#include <QWidget>
#include <QItemSelectionModel>
-//#define REQUIRE_OCAF_REVIEW:11
// =======================================================================
// function : Constructor
// purpose :
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);
#ifndef DFBrowserPane_TDataStdTreeNode_H
#define DFBrowserPane_TDataStdTreeNode_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
class QAbstractItemModel;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdTreeNodeItem.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNodeItem.hxx>
-#include <DFBrowser_Module.hxx>
-#include <DFBrowser_Tools.hxx>
+#include <inspector/DFBrowser_Module.hxx>
+#include <inspector/DFBrowser_Tools.hxx>
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDataStd_ChildNodeIterator.hxx>
#include <QIcon>
#include <QObject>
-//#define REQUIRE_OCAF_REVIEW:11
-
// =======================================================================
// function : Init
// purpose :
#ifndef DFBrowserPane_TDataStdTreeNodeItem_H
#define DFBrowserPane_TDataStdTreeNodeItem_H
+#include <inspector/TreeModel_ItemBase.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
-#include <TreeModel_ItemBase.hxx>
#include <QList>
#include <QMap>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdTreeNodeModel.hxx>
-#include <DFBrowserPane_TDataStdTreeNodeItem.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNodeModel.hxx>
+#include <inspector/DFBrowserPane_TDataStdTreeNodeItem.hxx>
#include <TDataStd_TreeNode.hxx>
#ifndef DFBrowserPane_TDataStdTreeNodeMode_H
#define DFBrowserPane_TDataStdTreeNodeMode_H
+#include <inspector/TreeModel_ModelBase.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
-#include <TreeModel_ModelBase.hxx>
#include <QObject>
#include <QHash>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdUAttribute.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDataStd_UAttribute.hxx>
#ifndef DFBrowserPane_TDataStdUAttribute_H
#define DFBrowserPane_TDataStdUAttribute_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdUAttribute
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDataStdVariable.hxx>
+#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
#include <TDataStd_Variable.hxx>
#ifndef DFBrowserPane_TDataStdVariable_H
#define DFBrowserPane_TDataStdVariable_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDataStdVariable
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDocStdModified.hxx>
+#include <inspector/DFBrowserPane_TDocStdModified.hxx>
#include <TDocStd_Modified.hxx>
#ifndef DFBrowserPane_TDocStdModified_H
#define DFBrowserPane_TDocStdModified_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDocStdModified
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDocStdOwner.hxx>
+#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDocStd_Document.hxx>
#include <TDocStd_Owner.hxx>
#include <QGroupBox>
#include <QTableView>
-//#define REQUIRE_OCAF_REVIEW:12
// =======================================================================
// function : Constructor
// purpose :
#ifndef DFBrowserPane_TDocStdOwner_H
#define DFBrowserPane_TDocStdOwner_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TColStd_SequenceOfExtendedString.hxx>
#include <TDF_DeltaList.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDocStdXLink.hxx>
+#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
#include <TDocStd_XLink.hxx>
#ifndef DFBrowserPane_TDocStdXLink_H
#define DFBrowserPane_TDocStdXLink_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDocStdXLink
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TDocStdXLinkRoot.hxx>
+#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
#include <TDocStd_XLinkRoot.hxx>
#ifndef DFBrowserPane_TDocStdXLinkRoot_H
#define DFBrowserPane_TDocStdXLinkRoot_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TDocStdXLinkRoot
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TFunctionFunction.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TFunction_Function.hxx>
#ifndef DFBrowserPane_TFunctionFunction_H
#define DFBrowserPane_TFunctionFunction_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TFunctionFunction
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TFunctionGraphNode.hxx>
+#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
#include <TFunction_GraphNode.hxx>
#ifndef DFBrowserPane_TFunctionGraphNode_H
#define DFBrowserPane_TFunctionGraphNode_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TFunctionGraphNode
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TFunctionScope.hxx>
+#include <inspector/DFBrowserPane_TFunctionScope.hxx>
#include <TFunction_Scope.hxx>
#ifndef DFBrowserPane_TFunctionScope_H
#define DFBrowserPane_TFunctionScope_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TFunctionScope
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TNamingNamedShape.hxx>
+#include <inspector/DFBrowserPane_TNamingNamedShape.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_ItemDelegateButton.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPane_HelperExport.hxx>
-#include <DFBrowserPane_SelectionKind.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_ItemDelegateButton.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPane_HelperExport.hxx>
+#include <inspector/DFBrowserPane_SelectionKind.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_Shape.hxx>
const int COLUMN_REFERENCE_WIDTH = 90;
const int COLUMN_EVOLUTION_WIDTH = 90;
-//#define REQUIRE_OCAF_REVIEW:13
// =======================================================================
// function : Constructor
// purpose :
#ifndef DFBrowserPane_TNamingNamedShape_H
#define DFBrowserPane_TNamingNamedShape_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_HelperExport.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperExport.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
#include <TNaming_NamedShape.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TNamingNaming.hxx>
+#include <inspector/DFBrowserPane_TNamingNaming.hxx>
#include <AIS_Shape.hxx>
#include <BRep_Builder.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDF_Label.hxx>
#include <TNaming_ListIteratorOfListOfNamedShape.hxx>
#include <QVariant>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:14
// =======================================================================
// function : Constructor
// purpose :
#ifndef DFBrowserPane_TNamingNaming_H
#define DFBrowserPane_TNamingNaming_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
class DFBrowserPane_AttributePaneModel;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TNamingUsedShapes.hxx>
+#include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
#include <AIS_Shape.hxx>
#include <BRep_Builder.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_AttributePaneSelector.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_AttributePaneSelector.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TDF_Label.hxx>
#include <QVariant>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:15
// =======================================================================
// function : Constructor
// purpose :
if (anAttribute.IsNull())
return;
- theValues.append (QString ("[%1]").arg (anAttribute->Map().Extent()));
+ theValues.append (QString ("%1").arg (anAttribute->Map().Extent()));
}
// =======================================================================
#ifndef DFBrowserPane_TNamingUsedShapes_H
#define DFBrowserPane_TNamingUsedShapes_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <NCollection_DataMap.hxx>
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TPrsStdAISPresentation.hxx>
+#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <TPrsStd_AISPresentation.hxx>
#include <QVariant>
#include <QWidget>
-//#define REQUIRE_OCAF_REVIEW:16
// =======================================================================
// function : Constructor
// purpose :
#ifndef DFBrowserPane_TPrsStdAISPresentation_H
#define DFBrowserPane_TPrsStdAISPresentation_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TPrsStdAISPresentation
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TPrsStdAISViewer.hxx>
+#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
#include <TPrsStd_AISViewer.hxx>
#ifndef DFBrowserPane_TPrsStdAISViewer_H
#define DFBrowserPane_TPrsStdAISViewer_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
//! \class DFBrowserPane_TPrsStdAISViewer
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <QWidget>
#include <QTableView>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <AIS_DisplayMode.hxx>
#include <Graphic3d_MaterialAspect.hxx>
#include <sstream>
-//#define REQUIRE_OCAF_REVIEW:8 : start
const int TABLE_COLUMN_0_WIDTH = 200;
const int TABLE_COLUMN_OTHER_WIDTH = 120;
}
return aSStream.str().c_str();
}
-//#define REQUIRE_OCAF_REVIEW:8 : end
#ifndef DFBrowserPane_Tools_H
#define DFBrowserPane_Tools_H
-#include <DFBrowserPane_OcctEnumType.hxx>
+#include <inspector/DFBrowserPane_OcctEnumType.hxx>
+
#include <Standard.hxx>
#include <TCollection_ExtendedString.hxx>
#include <TDF_Label.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_AttributeCommonPane.hxx>
+#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
-#include <DFBrowserPane_ItemRole.hxx>
-#include <DFBrowserPaneXDE_XDEDRAW.hxx>
+#include <inspector/DFBrowserPane_ItemRole.hxx>
+#include <inspector/DFBrowserPaneXDE_XDEDRAW.hxx>
#include <TDataStd_TreeNode.hxx>
#include <TDF_Reference.hxx>
#ifndef DFBrowserPaneXDE_AttributeCommonPane_H
#define DFBrowserPaneXDE_AttributeCommonPane_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TopoDS_Shape.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_AttributePaneCreator.hxx>
+#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
-#include <DFBrowserPaneXDE_AttributeCommonPane.hxx>
-#include <DFBrowserPaneXDE_XCAFDocArea.hxx>
-#include <DFBrowserPaneXDE_XCAFDocCentroid.hxx>
-#include <DFBrowserPaneXDE_XCAFDocColor.hxx>
-#include <DFBrowserPaneXDE_XCAFDocColorTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocDatum.hxx>
-#include <DFBrowserPaneXDE_XCAFDocDimension.hxx>
-#include <DFBrowserPaneXDE_XCAFDocDimTol.hxx>
-#include <DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
-#include <DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
-#include <DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocLocation.hxx>
-#include <DFBrowserPaneXDE_XCAFDocMaterial.hxx>
-#include <DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
-#include <DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
+#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocLocation.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocMaterial.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
#include <Standard_Version.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_ShapeMapTool.hxx>
-//#define REQUIRE_OCAF_REVIEW:2 : start
// =======================================================================
// function : Constructor
// purpose :
aPane = new DFBrowserPaneXDE_XCAFDocShapeTool();
return aPane;
}
-//#define REQUIRE_OCAF_REVIEW:2 : end
#ifndef DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
#define DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
-#include <DFBrowserPane_AttributePaneCreatorAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneCreatorAPI.hxx>
+
#include <Standard.hxx>
#include <Standard_Macro.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_Tools.hxx>
+#include <inspector/DFBrowserPaneXDE_Tools.hxx>
-#include <DFBrowserPane_AttributePaneAPI.hxx>
+#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
#include <TCollection_AsciiString.hxx>
#include <TDataStd_Name.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocArea.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
#include <XCAFDoc_Area.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocArea_H
#define DFBrowserPaneXDE_XCAFDocArea_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocCentroid.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
#include <XCAFDoc_Centroid.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocCentroid_H
#define DFBrowserPaneXDE_XCAFDocCentroid_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocColor.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
#include <XCAFDoc_Color.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocColor_H
#define DFBrowserPaneXDE_XCAFDocColor_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocColorTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
#include <XCAFDoc_Area.hxx>
// =======================================================================
#ifndef DFBrowserPaneXDE_XCAFDocColorTool_H
#define DFBrowserPaneXDE_XCAFDocColorTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocDatum.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
#include <Standard_Version.hxx>
#include <TCollection_HAsciiString.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocDatum_H
#define DFBrowserPaneXDE_XCAFDocDatum_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocDimTol.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
#include <XCAFDoc_DimTol.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocDimTol_H
#define DFBrowserPaneXDE_XCAFDocDimTol_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
#include <XCAFDoc_DimTolTool.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocDimTolTool_H
#define DFBrowserPaneXDE_XCAFDocDimTolTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocDimension.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
#include <XCAFDoc_Dimension.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocDimension_H
#define DFBrowserPaneXDE_XCAFDocDimension_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
#include <XCAFDoc_DocumentTool.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocDocumentTool_H
#define DFBrowserPaneXDE_XCAFDocDocumentTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
#include <XCAFDoc_GeomTolerance.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocGeomTolerance_H
#define DFBrowserPaneXDE_XCAFDocGeomTolerance_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
#include <XCAFDoc_GraphNode.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocGraphNode_H
#define DFBrowserPaneXDE_XCAFDocGraphNode_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
#include <XCAFDoc_Area.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocLayerTool_H
#define DFBrowserPaneXDE_XCAFDocLayerTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocLocation.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocLocation.hxx>
#include <XCAFDoc_Location.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocLocation_H
#define DFBrowserPaneXDE_XCAFDocLocation_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocMaterial.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocMaterial.hxx>
#include <XCAFDoc_Material.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocMaterial_H
#define DFBrowserPaneXDE_XCAFDocMaterial_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
#include <XCAFDoc_MaterialTool.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocMaterialTool_H
#define DFBrowserPaneXDE_XCAFDocMaterialTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
-#include <DFBrowserPane_AttributePaneModel.hxx>
-#include <DFBrowserPane_HelperExport.hxx>
-#include <DFBrowserPane_ItemDelegateButton.hxx>
-#include <DFBrowserPane_TableView.hxx>
-#include <DFBrowserPane_Tools.hxx>
+#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
+#include <inspector/DFBrowserPane_HelperExport.hxx>
+#include <inspector/DFBrowserPane_ItemDelegateButton.hxx>
+#include <inspector/DFBrowserPane_TableView.hxx>
+#include <inspector/DFBrowserPane_Tools.hxx>
#include <AIS_Shape.hxx>
#include <BRepTools.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocShapeMapTool_H
#define DFBrowserPaneXDE_XCAFDocShapeMapTool_H
-#include <DFBrowserPane_AttributePane.hxx>
-#include <DFBrowserPane_HelperExport.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_HelperExport.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
+#include <inspector/DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#ifndef DFBrowserPaneXDE_XCAFDocShapeTool_H
#define DFBrowserPaneXDE_XCAFDocShapeTool_H
-#include <DFBrowserPane_AttributePane.hxx>
+#include <inspector/DFBrowserPane_AttributePane.hxx>
#include <Standard.hxx>
#include <TDF_Attribute.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <DFBrowserPaneXDE_XDEDRAW.hxx>
+#include <inspector/DFBrowserPaneXDE_XDEDRAW.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_HAsciiString.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_Communicator.hxx>
+#include <inspector/ShapeView_Communicator.hxx>
-#include <ShapeView_Window.hxx>
+#include <inspector/ShapeView_Window.hxx>
#include <OSD_Directory.hxx>
#include <OSD_Environment.hxx>
#include <OSD_Path.hxx>
#ifndef ShapeView_Communicator_H
#define ShapeView_Communicator_H
-#include <ShapeView_Window.hxx>
-#include <TInspectorAPI_Communicator.hxx>
+#include <inspector/ShapeView_Window.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
//! \class ShapeView_Communicator.
//! \brief This is a connector from TInspector application to ShapeView window
#include <Standard.hxx>
#include <TopoDS_Shape.hxx>
-#include <TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
class ShapeView_ItemBase;
typedef QExplicitlySharedDataPointer<ShapeView_ItemBase> ShapeView_ItemBasePtr;
// commercial license or contractual agreement.
-#include <ShapeView_ItemRoot.hxx>
-#include <ShapeView_ItemShape.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
// =======================================================================
// function : GetShape
#define ShapeView_ItemRoot_H
#include <NCollection_List.hxx>
-#include <ShapeView_ItemBase.hxx>
+#include <inspector/ShapeView_ItemBase.hxx>
#include <Standard.hxx>
#include <TopoDS_Shape.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_ItemShape.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
#include <Adaptor3d_Curve.hxx>
#include <BRep_Tool.hxx>
#include <Geom_Curve.hxx>
#include <GeomAdaptor_Curve.hxx>
-#include <ShapeView_ItemRoot.hxx>
-#include <ShapeView_ItemShape.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#ifndef ShapeView_ItemShape_H
#define ShapeView_ItemShape_H
-#include <ShapeView_ItemBase.hxx>
+#include <inspector/ShapeView_ItemBase.hxx>
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
#include <TopoDS_Shape.hxx>
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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_OpenFileDialog.hxx>
-#include <ShapeView_OpenFileViewModel.hxx>
+#include <inspector/ShapeView_OpenFileDialog.hxx>
+#include <inspector/ShapeView_OpenFileViewModel.hxx>
#include <QGroupBox>
#include <QHBoxLayout>
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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_OpenFileViewModel.hxx>
+#include <inspector/ShapeView_OpenFileViewModel.hxx>
#include <QApplication>
#include <QFileInfo>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_Tools.hxx>
+#include <inspector/ShapeView_Tools.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_TreeModel.hxx>
-#include <ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_TreeModel.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_TreeModel.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
// =======================================================================
// function : Constructor
}
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<ShapeView_ItemShape> (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();
+}
#ifndef ShapeView_TreeModel_H
#define ShapeView_TreeModel_H
-#include <ShapeView_ItemBase.hxx>
+#include <inspector/ShapeView_ItemBase.hxx>
#include <Standard.hxx>
#include <TopoDS_Shape.hxx>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
#include <QMap>
#include <QObject>
//! \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<int, TreeModel_ItemBasePtr> myRootItems; //!< container of root items, for each column own root item
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ShapeView_Window.hxx>
-#include <ShapeView_ItemShape.hxx>
-#include <ShapeView_TreeModel.hxx>
-
-#include <View_Displayer.hxx>
-#include <View_ToolBar.hxx>
-#include <View_Widget.hxx>
-#include <View_Window.hxx>
-#include <View_Viewer.hxx>
-
-#include <ShapeView_OpenFileDialog.hxx>
-#include <ShapeView_Tools.hxx>
+#include <inspector/ShapeView_Window.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
+#include <inspector/ShapeView_TreeModel.hxx>
+#include <inspector/View_Displayer.hxx>
+#include <inspector/View_ToolBar.hxx>
+#include <inspector/View_Widget.hxx>
+#include <inspector/View_Window.hxx>
+#include <inspector/View_Viewer.hxx>
+
+#include <inspector/ShapeView_Window.hxx>
+#include <inspector/ShapeView_ItemRoot.hxx>
+#include <inspector/ShapeView_ItemShape.hxx>
+#include <inspector/ShapeView_TreeModel.hxx>
+#include <inspector/ShapeView_OpenFileDialog.hxx>
+#include <inspector/ShapeView_Tools.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
{
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&)));
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);
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);
NCollection_List<TCollection_AsciiString> aNames;
myParameters->SetFileNames (aName, aNames);
}
+ // make TopoDS_TShape selected if exist in select parameters
+ NCollection_List<Handle(Standard_Transient)> anObjects;
+ if (myParameters->GetSelectedObjects(aName, anObjects))
+ {
+ ShapeView_TreeModel* aModel = dynamic_cast<ShapeView_TreeModel*> (myTreeView->model());
+ QItemSelectionModel* aSelectionModel = myTreeView->selectionModel();
+ aSelectionModel->clear();
+ for (NCollection_List<Handle(Standard_Transient)>::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<Handle(Standard_Transient)>());
+ }
}
// =======================================================================
// =======================================================================
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<ShapeView_ItemRoot> (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);
}
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 :
#include <Standard.hxx>
#include <TCollection_AsciiString.hxx>
-#include <TInspectorAPI_PluginParameters.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
#include <TopoDS_Shape.hxx>
#ifdef _MSC_VER
//! 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();
TInspector.qrc
TInspector_Communicator.cxx
TInspector_Communicator.hxx
+TInspector_PluginParameters.cxx
+TInspector_PluginParameters.hxx
TInspector_Window.cxx
TInspector_Window.hxx
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TInspector_Communicator.hxx>
+#include <inspector/TInspector_Communicator.hxx>
#include <OSD_Environment.hxx>
#include <TCollection_AsciiString.hxx>
-#include <TInspector_Window.hxx>
+#include <inspector/TInspector_Window.hxx>
#include <QApplication>
#include <QDir>
new QApplication (argc, argv);
}
myWindow = new TInspector_Window();
- QObject::connect (qApp, SIGNAL (lastWindowClosed()), myWindow, SLOT (OnLastApplicationWindowClosed()));
}
// =======================================================================
#ifndef TInspector_Communicator_H
#define TInspector_Communicator_H
-#include <TInspector_Window.hxx>
+#include <inspector/TInspector_Window.hxx>
#include <NCollection_List.hxx>
#include <Standard.hxx>
//! \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<TCollection_AsciiString> 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<Handle(Standard_Transient)>& theParameters) { myWindow->Init ("", theParameters); }
+ //! \param theAppend boolean state whethe the parameters should be added to existing
+ void Init (const NCollection_List<Handle(Standard_Transient)>& 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<Handle(Standard_Transient)>& theParameters)
- { myWindow->Init (thePluginName, theParameters); }
+ const NCollection_List<Handle(Standard_Transient)>& theParameters,
+ const Standard_Boolean theAppend = Standard_False)
+ { myWindow->Init (thePluginName, theParameters, theAppend); }
//! UpdateContent for the TInspector window
void UpdateContent() { myWindow->UpdateContent(); }
//! \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<TCollection_AsciiString>& theItemNames) { myWindow->SetSelected (theItemNames); }
+
+ //! Sets objects to be selected in the plugin
+ //! \param theObjects an objects
+ Standard_EXPORT void SetSelected (const NCollection_List<Handle(Standard_Transient)>& theObjects)
+ { myWindow->SetSelected (theObjects); }
+
//! Change window visibility
//! \param theVisible boolean state
Standard_EXPORT virtual void SetVisible (const bool theVisible);
--- /dev/null
+// Created on: 2017-06-16
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+
+#include <inspector/TInspector_PluginParameters.hxx>
+
+// =======================================================================
+// function : SetParameters
+// purpose :
+// =======================================================================
+void TInspector_PluginParameters::SetParameters (const TCollection_AsciiString& thePluginName,
+ const NCollection_List<Handle(Standard_Transient)>& theParameters,
+ const Standard_Boolean& theToActivatePlugin)
+{
+ TInspectorAPI_PluginParameters::SetParameters (thePluginName, theParameters, Standard_False);
+
+ if (!theToActivatePlugin)
+ return;
+
+ SetSelected (thePluginName, theParameters);
+ myWindow->ActivateTool (thePluginName);
+}
--- /dev/null
+// 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 <Standard.hxx>
+#include <Standard_Macro.hxx>
+
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+#include <inspector/TInspector_Window.hxx>
+
+//! \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<Handle(Standard_Transient)>& theParameters,
+ const Standard_Boolean& theToActivatePlugin = Standard_False) Standard_OVERRIDE;
+
+private:
+
+ TInspector_Window* myWindow; //!< the current window
+};
+
+#endif
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TInspector_Window.hxx>
+#include <inspector/TInspector_Window.hxx>
+#include <inspector/TInspector_Window.hxx>
-#include <TInspectorAPI_Communicator.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
+#include <inspector/TInspector_PluginParameters.hxx>
#include <QApplication>
#include <QDockWidget>
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<TCollection_AsciiString> TInspector_Window::RegisteredPlugins() const
+{
+ NCollection_List<TCollection_AsciiString> aPlugins;
+
+ for (int aToolId = 0, aSize = myToolNames.size(); aToolId < aSize; aToolId++)
+ aPlugins.Append (myToolNames[aToolId].myName);
+
+ return aPlugins;
}
// =======================================================================
// purpose :
// =======================================================================
void TInspector_Window::Init (const TCollection_AsciiString& thePluginName,
- const NCollection_List<Handle(Standard_Transient)>& theParameters)
+ const NCollection_List<Handle(Standard_Transient)>& 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())
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<Handle(Standard_Transient)> aParameters;
+ if (myParameters->FindParameters (thePluginName))
+ aParameters = myParameters->Parameters (thePluginName);
- if (anInfo.myCommunicator)
- break;
+ for (NCollection_List<Handle(Standard_Transient)>::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;
}
// =======================================================================
onCommuncatorNameChanged();
}
+// =======================================================================
+// function : SetSelected
+// purpose :
+// =======================================================================
+void TInspector_Window::SetSelected (const NCollection_List<TCollection_AsciiString>& 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<Handle(Standard_Transient)>& 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 :
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;
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 :
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());
}
// =======================================================================
}
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
#include <Standard.hxx>
#include <Standard_Transient.hxx>
#include <TCollection_AsciiString.hxx>
-#include <TInspectorAPI_PluginParameters.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant
//! 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<TCollection_AsciiString> 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<Handle(Standard_Transient)>& theParameters);
+ const NCollection_List<Handle(Standard_Transient)>& 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
//! \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<TCollection_AsciiString>& theItemNames);
+
+ //! Sets objects to be selected in the plugin
+ //! \param theObjects an objects
+ Standard_EXPORT void SetSelected (const NCollection_List<Handle(Standard_Transient)>& 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
//! \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
//! \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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TInspectorAPI_Communicator.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
#include <cstdio>
#include <map>
#if OCC_VERSION_HEX > 0x060901
#include <Standard_Handle.hxx>
#endif
-#include <TInspectorAPI_PluginParameters.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
//! 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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TInspectorAPI_PluginParameters.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
#if OCC_VERSION_HEX <= 0x060901
IMPLEMENT_STANDARD_HANDLE (TInspectorAPI_PluginParameters, Standard_Transient)
}
// =======================================================================
-// function : SetParameters
+// function : SetParameters
// purpose :
// =======================================================================
void TInspectorAPI_PluginParameters::SetParameters (const TCollection_AsciiString& thePluginName,
- const NCollection_List<Handle(Standard_Transient)>& theParameters)
+ const NCollection_List<Handle(Standard_Transient)>& theParameters,
+ const Standard_Boolean&)
{
if (theParameters.Size() > 0)
myParameters.Bind (thePluginName, theParameters);
}
// =======================================================================
-// function : AddFileName
+// function : AddFileName
// purpose :
// =======================================================================
void TInspectorAPI_PluginParameters::AddFileName (const TCollection_AsciiString& thePluginName,
}
// =======================================================================
-// function : SetFileNames
+// function : SetFileNames
// purpose :
// =======================================================================
void TInspectorAPI_PluginParameters::SetFileNames (const TCollection_AsciiString& thePluginName,
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<TCollection_AsciiString>& theItemNames)
+{
+ mySelectedItemNames.Bind (thePluginName, theItemNames);
+}
+// =======================================================================
+// function : SetSelected
+// purpose :
+// =======================================================================
+void TInspectorAPI_PluginParameters::SetSelected (const TCollection_AsciiString& thePluginName,
+ const NCollection_List<Handle(Standard_Transient)>& 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)
}
// =======================================================================
-// function : Parameters
+// function : Parameters
// purpose :
// =======================================================================
const NCollection_List<Handle(Standard_Transient)>& TInspectorAPI_PluginParameters::Parameters
}
// =======================================================================
-// function : FindFileNames
+// function : FindFileNames
// purpose :
// =======================================================================
bool TInspectorAPI_PluginParameters::FindFileNames (const TCollection_AsciiString& thePluginName)
}
// =======================================================================
-// function : FileNames
+// function : FileNames
// purpose :
// =======================================================================
const NCollection_List<TCollection_AsciiString>& TInspectorAPI_PluginParameters::FileNames
{
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<TCollection_AsciiString>& 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<Handle(Standard_Transient)>& theObjects)
+{
+ return mySelectedObjects.Find (thePluginName, theObjects);
+}
//! 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<Handle(Standard_Transient)>& 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<Handle(Standard_Transient)>& 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<TCollection_AsciiString>& 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<TCollection_AsciiString>& 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<Handle(Standard_Transient)>& theObjects);
+
//! Returns true if there are parameters set for the given plugin
//! \param thePluginName a plugin name
//! \return boolean result
Standard_EXPORT const NCollection_List<TCollection_AsciiString>& 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<TCollection_AsciiString>& 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<Handle(Standard_Transient)>& theObjects);
+
#if OCC_VERSION_HEX <= 0x060901
DEFINE_STANDARD_RTTI (TInspectorAPI_PluginParameters)
#else
NCollection_DataMap<TCollection_AsciiString, NCollection_List<Handle(Standard_Transient)> > myParameters;
//! container of names
NCollection_DataMap<TCollection_AsciiString, NCollection_List<TCollection_AsciiString> > myFileNames;
+ //! container of select item names
+ NCollection_DataMap<TCollection_AsciiString, NCollection_List<TCollection_AsciiString> > mySelectedItemNames;
+ //! container of select objects
+ NCollection_DataMap<TCollection_AsciiString, NCollection_List<Handle(Standard_Transient)> > mySelectedObjects;
};
#endif
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ToolsDraw.hxx>
+#include <inspector/ToolsDraw.hxx>
+#include <inspector/ToolsDraw.hxx>
#include <AIS_InteractiveContext.hxx>
+#include <BRep_Builder.hxx>
+#include <BRepTools.hxx>
+#include <DBRep.hxx>
#include <DDocStd.hxx>
+#include <Draw.hxx>
#include <Draw_PluginMacro.hxx>
+#include <NCollection_DataMap.hxx>
#include <Standard_Stream.hxx>
#include <TDocStd_Application.hxx>
-#include <TInspector_Communicator.hxx>
+#include <inspector/TInspector_Communicator.hxx>
+#include <TopoDS_Shape.hxx>
#include <ViewerTest.hxx>
-#include <DDocStd.hxx>
+#include <ViewerTest_DoubleMapOfInteractiveAndName.hxx>
+
+#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<TCollection_AsciiString>& 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 :
{
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<Handle(Standard_Transient)> aParameters;
-
+ // parse command arguments
NCollection_List<TCollection_AsciiString> aPlugins;
- bool aNeedToUpdateContent = false, aNeedToActivateAllPlugins = false;
+ NCollection_DataMap<TCollection_AsciiString, NCollection_List<Handle(Standard_Transient)> > aParameters;
+ NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString > anOpenFileParameters;
+ TCollection_AsciiString aPluginNameToActivate;
+ Standard_Boolean aNeedToUpdateContent = Standard_False,
+ aNeedToHideInspector = Standard_False,
+ aNeedToShowInspector = Standard_False;
+
+ NCollection_List<Handle(Standard_Transient)> aDefaultParameters;
+ TCollection_AsciiString aDefaultOpenFileParameter;
+
+ NCollection_List<Handle(Standard_Transient)> anObjectsToSelect;
+ NCollection_List<TCollection_AsciiString> 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<TCollection_AsciiString> anArgPlugins;
+ getArgumentPlugins(theArgsNb, theArgs, anIt, anArgPlugins);
+ if (anArgPlugins.IsEmpty())
+ aDefaultParameters.Append(aShape.TShape());
+ else
+ {
+ for (NCollection_List<TCollection_AsciiString>::Iterator anArgIt (anArgPlugins);
+ anArgIt.More(); anArgIt.Next())
+ {
+ NCollection_List<Handle(Standard_Transient)> 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<TCollection_AsciiString> anArgPlugins;
+ getArgumentPlugins(theArgsNb, theArgs, anIt, anArgPlugins);
+ if (anArgPlugins.IsEmpty())
+ aDefaultOpenFileParameter = aFileName;
+ else
+ {
+ for (NCollection_List<TCollection_AsciiString>::Iterator anArgIt (anArgPlugins);
+ anArgIt.More(); anArgIt.Next())
+ {
+ NCollection_List<Handle(Standard_Transient)> 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<Handle(Standard_Transient)> 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<TCollection_AsciiString>::Iterator aPluginNameIt (aPlugins);
+ aPluginNameIt.More(); aPluginNameIt.Next())
+ MyCommunicator->RegisterPlugin (aPluginNameIt.Value());
+
+ // init all registered plugins with the default and parameters values
+ NCollection_List<TCollection_AsciiString> aRegisteredPlugins = MyCommunicator->RegisteredPlugins();
+ for (NCollection_List<TCollection_AsciiString>::Iterator anIterator (aRegisteredPlugins);
+ anIterator.More(); anIterator.Next())
{
- MyCommunicator->RegisterPlugin ("TKDFBrowser");
- MyCommunicator->RegisterPlugin ("TKShapeView");
- MyCommunicator->RegisterPlugin ("TKVInspector");
+ TCollection_AsciiString aPluginName = anIterator.Value();
+ NCollection_List<Handle(Standard_Transient)> aParameterValues;
+ aParameters.Find (aPluginName, aParameterValues);
- TCollection_AsciiString aLastPluginName = "TKDFBrowser";
- MyCommunicator->Init (aParameters);
- MyCommunicator->Activate (aLastPluginName);
+ for (NCollection_List<Handle(Standard_Transient)>::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<TCollection_AsciiString>::Iterator aPluginNameIt (aPlugins);
- aPluginNameIt.More(); aPluginNameIt.Next())
- {
- aLastPluginName = aPluginNameIt.Value();
- MyCommunicator->RegisterPlugin (aLastPluginName);
- MyCommunicator->Init (aLastPluginName, aParameters);
- }
- MyCommunicator->Activate (aLastPluginName);
+ for (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString >::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;
}
// 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);
}
TreeModel_ItemBase.cxx
TreeModel_ItemBase.hxx
TreeModel_ItemRole.hxx
+TreeModel_MessageDialog.cxx
+TreeModel_MessageDialog.hxx
TreeModel_ModelBase.cxx
TreeModel_ModelBase.hxx
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
-#include <TreeModel_ItemRole.hxx>
+#include <inspector/TreeModel_ItemRole.hxx>
#include <QStringList>
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-#include <TreeModel_ItemRole.hxx>
+#include <inspector/TreeModel_ItemRole.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant
--- /dev/null
+// Created on: 2017-06-16
+// Created by: Natalia ERMOLAEVA
+// Copyright (c) 2017 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <inspector/TreeModel_MessageDialog.hxx>
+
+#include <QCheckBox>
+#include <QCursor>
+#include <QGridLayout>
+#include <QLabel>
+#include <QPushButton>
+#include <QWidget>
+
+// =======================================================================
+// 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);
+}
--- /dev/null
+// 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 <Standard.hxx>
+#include <Standard_Macro.hxx>
+
+#ifdef _MSC_VER
+#pragma warning(disable : 4127) // conditional expression is constant
+#endif
+#include <QCheckBox>
+#include <QDialog>
+#include <QLabel>
+#include <QPushButton>
+#include <QString>
+
+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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
-#include <TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
// =======================================================================
// function : Constructor
#define TreeModel_ModelBase_H
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
#include <QAbstractItemModel>
#include <QExplicitlySharedDataPointer>
+VInspector.qrc
VInspector_CallBack.cxx
VInspector_CallBack.hxx
VInspector_CallBackMode.hxx
--- /dev/null
+<!DOCTYPE RCC><RCC version="1.0">
+ <qresource>
+ <file>icons/treeview_update.png</file>
+ </qresource>
+</RCC>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspectorAPI_CallBack.hxx>
+#include <inspector/VInspectorAPI_CallBack.hxx>
#if OCC_VERSION_HEX <= 0x060901
IMPLEMENT_STANDARD_HANDLE(VInspectorAPI_CallBack, Standard_Transient)
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_CallBack.hxx>
+#include <inspector/VInspector_CallBack.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <Standard_Version.hxx>
-#include <VInspector_CallBackMode.hxx>
-#include <VInspector_Tools.hxx>
-#include <VInspector_ViewModelHistory.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_Tools.hxx>
+#include <inspector/VInspector_ViewModelHistory.hxx>
#include <QStringList>
#include <AIS_InteractiveContext.hxx>
#include <Standard.hxx>
-#include <VInspectorAPI_CallBack.hxx>
-#include <VInspector_CallBackMode.hxx>
-#include <VInspector_ViewModelHistory.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspectorAPI_CallBack.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_ViewModelHistory.hxx>
+#include <inspector/VInspector_Tools.hxx>
class AIS_InteractiveObject;
class SelectMgr_EntityOwner;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_Communicator.hxx>
+#include <inspector/VInspector_Communicator.hxx>
-#include <VInspector_CallBack.hxx>
-#include <VInspector_Window.hxx>
+#include <inspector/VInspector_CallBack.hxx>
+#include <inspector/VInspector_Window.hxx>
#include <AIS_InteractiveContext.hxx>
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-#include <VInspector_Window.hxx>
+#include <inspector/VInspector_Window.hxx>
-#include <TInspectorAPI_Communicator.hxx>
+#include <inspector/TInspectorAPI_Communicator.hxx>
//! \class VInspector_Communicator.
//! \brief This is a connector from TInspector application to VInspector view
// commercial license or contractual agreement.
-#include <VInspector_ItemBase.hxx>
-#include <VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
// =======================================================================
// function : GetContext
#include <AIS_InteractiveContext.hxx>
#include <Standard.hxx>
-#include <TreeModel_ItemBase.hxx>
+#include <inspector/TreeModel_ItemBase.hxx>
class VInspector_ItemBase;
typedef QExplicitlySharedDataPointer<VInspector_ItemBase> VInspector_ItemBasePtr;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <SelectMgr_EntityOwner.hxx>
-#include <VInspector_ItemPresentableObject.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_Tools.hxx>
#include <QStringList>
#define VInspector_ItemContext_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
class VInspector_ItemContext;
typedef QExplicitlySharedDataPointer<VInspector_ItemContext> VInspector_ItemContextPtr;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemEntityOwner.hxx>
-#include <VInspector_ItemSensitiveEntity.hxx>
-#include <VInspector_ItemPresentableObject.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_ItemEntityOwner.hxx>
+#include <inspector/VInspector_ItemSensitiveEntity.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_Tools.hxx>
#include <SelectMgr_SensitiveEntity.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
#include <AIS_InteractiveObject.hxx>
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
class QItemSelectionModel;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemHistoryElement.hxx>
+#include <inspector/VInspector_ItemHistoryElement.hxx>
-#include <VInspector_ItemHistoryRoot.hxx>
-#include <VInspector_ItemHistoryType.hxx>
-#include <VInspector_ItemHistoryElement.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_ItemHistoryRoot.hxx>
+#include <inspector/VInspector_ItemHistoryType.hxx>
+#include <inspector/VInspector_ItemHistoryElement.hxx>
+#include <inspector/VInspector_Tools.hxx>
// =======================================================================
// function : data
#define VInspector_ItemHistoryElement_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
class VInspector_ItemHistoryElement;
typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryElement> VInspector_ItemHistoryElementPtr;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemHistoryRoot.hxx>
+#include <inspector/VInspector_ItemHistoryRoot.hxx>
-#include <VInspector_ItemHistoryType.hxx>
+#include <inspector/VInspector_ItemHistoryType.hxx>
// =======================================================================
// function : Constructor
#define VInspector_ItemHistoryRoot_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
-#include <VInspector_ItemHistoryTypeInfo.hxx>
-#include <VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemHistoryTypeInfo.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
class VInspector_ItemHistoryRoot;
typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryRoot> VInspector_ItemHistoryRootPtr;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemHistoryType.hxx>
+#include <inspector/VInspector_ItemHistoryType.hxx>
-#include <VInspector_CallBack.hxx>
-#include <VInspector_ItemHistoryRoot.hxx>
-#include <VInspector_ItemHistoryElement.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_CallBack.hxx>
+#include <inspector/VInspector_ItemHistoryRoot.hxx>
+#include <inspector/VInspector_ItemHistoryElement.hxx>
+#include <inspector/VInspector_Tools.hxx>
// =======================================================================
// function : PointerInfo
#define VInspector_ItemHistoryType_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
class VInspector_ItemHistoryType;
typedef QExplicitlySharedDataPointer<VInspector_ItemHistoryType> VInspector_ItemHistoryTypePtr;
#ifndef VInspector_ItemHistoryTypeInfo_H
#define VInspector_ItemHistoryTypeInfo_H
-#include <VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
//! \class VInspector_ItemHistoryTypeInfo
//! History info for a type item. It contains container of information for the element
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
#include <AIS_Shape.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
-#include <VInspector_ItemContext.hxx>
-#include <VInspector_ItemEntityOwner.hxx>
-#include <VInspector_ItemSelection.hxx>
-#include <VInspector_Tools.hxx>
-#include <VInspector_ViewModel.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemEntityOwner.hxx>
+#include <inspector/VInspector_ItemSelection.hxx>
+#include <inspector/VInspector_Tools.hxx>
+#include <inspector/VInspector_ViewModel.hxx>
#include <NCollection_List.hxx>
#include <Prs3d.hxx>
#define VInspector_ItemPresentableObject_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
#include <AIS_InteractiveObject.hxx>
#include <NCollection_List.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ItemSelection.hxx>
+#include <inspector/VInspector_ItemSelection.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <SelectMgr_Selection.hxx>
#include <SelectMgr_SensitiveEntity.hxx>
-#include <VInspector_ItemContext.hxx>
-#include <VInspector_ItemPresentableObject.hxx>
-#include <VInspector_ItemSensitiveEntity.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_ItemSensitiveEntity.hxx>
+#include <inspector/VInspector_Tools.hxx>
#include <QStringList>
#define VInspector_ItemSelection_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
#include <SelectMgr_Selection.hxx>
// commercial license or contractual agreement.
-#include <VInspector_ItemSensitiveEntity.hxx>
+#include <inspector/VInspector_ItemSensitiveEntity.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
#include <Standard_Version.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <TopoDS_Shape.hxx>
-#include <VInspector_ItemContext.hxx>
-#include <VInspector_ItemEntityOwner.hxx>
-#include <VInspector_ItemSelection.hxx>
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemEntityOwner.hxx>
+#include <inspector/VInspector_ItemSelection.hxx>
+#include <inspector/VInspector_Tools.hxx>
#include <QStringList>
#include <QColor>
#include <SelectMgr_SensitiveEntity.hxx>
#include <SelectBasics_SensitiveEntity.hxx>
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
class SelectBasics_EntityOwner;
class VInspector_ItemSensitiveEntity;
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ToolBar.hxx>
+#include <inspector/VInspector_ToolBar.hxx>
#include <QHBoxLayout>
-#include <QToolButton>
+#include <QPushButton>
#include <QWidget>
+
// =======================================================================
// function : Constructor
// purpose :
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<VInspector_ToolActionType, QToolButton*>::ConstIterator anActionsIt = myActionsMap.begin();
+ aLay->setMargin(0);
+ for (QMap<VInspector_ToolActionType, QPushButton*>::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;
}
void VInspector_ToolBar::onActionClicked()
{
int anId = -1;
- QToolButton* aSenderBtn = (QToolButton*)sender();
+ QPushButton* aSenderBtn = (QPushButton*)sender();
- for (QMap<VInspector_ToolActionType, QToolButton*>::ConstIterator anActionsIt = myActionsMap.begin();
+ for (QMap<VInspector_ToolActionType, QPushButton*>::ConstIterator anActionsIt = myActionsMap.begin();
anActionsIt != myActionsMap.end(); anActionsIt++)
{
if (anActionsIt.value() != aSenderBtn)
#include <Standard.hxx>
#include <Standard_Macro.hxx>
-#include <VInspector_ToolActionType.hxx>
+#include <inspector/VInspector_ToolActionType.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects
#include <QObject>
class QWidget;
-class QToolButton;
+class QPushButton;
//! \class VInspector_ToolBar
//! Container of View tool bar actions
//! 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:
private:
QWidget* myMainWindow; //!< the main control
- QMap<VInspector_ToolActionType, QToolButton*> myActionsMap; //!< container of type into button
+ QMap<VInspector_ToolActionType, QPushButton*> myActionsMap; //!< container of type into button
};
#endif
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_Tools.hxx>
+#include <inspector/VInspector_Tools.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_ListOfInteractive.hxx>
#include <TopLoc_Location.hxx>
#include <TopoDS_Shape.hxx>
-#include <VInspector_CallBackMode.hxx>
-#include <VInspector_SelectionType.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_SelectionType.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ViewModel.hxx>
+#include <inspector/VInspector_ViewModel.hxx>
-#include <VInspector_ItemContext.hxx>
-#include <VInspector_ItemEntityOwner.hxx>
-#include <VInspector_ItemPresentableObject.hxx>
-#include <VInspector_ItemSensitiveEntity.hxx>
+#include <inspector/VInspector_ItemContext.hxx>
+#include <inspector/VInspector_ItemEntityOwner.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_ItemSensitiveEntity.hxx>
#include <SelectBasics_EntityOwner.hxx>
#include <QItemSelectionModel>
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<VInspector_ItemPresentableObject>(anItemBase);
+ if (!anItemPrs)
+ continue;
+ if (anItemPrs->GetInteractiveObject() == thePresentation)
+ return anIndex;
+ }
+ return QModelIndex();
+}
+
// =======================================================================
// function : headerData
// purpose :
#include <NCollection_List.hxx>
#include <SelectBasics_EntityOwner.hxx>
#include <Standard.hxx>
-#include <TreeModel_ModelBase.hxx>
-#include <VInspector_ItemBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
#include <QByteArray>
#include <QHash>
//! \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
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_ViewModelHistory.hxx>
+#include <inspector/VInspector_ViewModelHistory.hxx>
-#include <VInspector_ItemHistoryElement.hxx>
-#include <VInspector_ItemHistoryRoot.hxx>
-#include <VInspector_ItemHistoryType.hxx>
+#include <inspector/VInspector_ItemHistoryElement.hxx>
+#include <inspector/VInspector_ItemHistoryRoot.hxx>
+#include <inspector/VInspector_ItemHistoryType.hxx>
#include <QStringList>
#define VInspector_ViewModelHistory_H
#include <Standard.hxx>
-#include <VInspector_ItemBase.hxx>
-#include <VInspector_CallBackMode.hxx>
+#include <inspector/VInspector_ItemBase.hxx>
+#include <inspector/VInspector_CallBackMode.hxx>
#include <QByteArray>
#include <QHash>
#include <QMap>
#include <QObject>
-#include <TreeModel_ModelBase.hxx>
+#include <inspector/TreeModel_ModelBase.hxx>
//! \class VInspector_ViewModelHistory
//! The class that visualizes methods called in AIS interactive context.
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <VInspector_Window.hxx>
+#include <inspector/VInspector_Window.hxx>
#include <AIS_Shape.hxx>
-#include <VInspector_CallBack.hxx>
-#include <VInspector_Communicator.hxx>
-#include <VInspector_ItemEntityOwner.hxx>
-#include <VInspector_ItemPresentableObject.hxx>
-#include <VInspector_ToolBar.hxx>
-#include <VInspector_Tools.hxx>
-#include <VInspector_ViewModel.hxx>
-#include <VInspector_ViewModelHistory.hxx>
+
+#include <inspector/TreeModel_MessageDialog.hxx>
+
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_ToolBar.hxx>
+#include <inspector/VInspector_Tools.hxx>
+#include <inspector/VInspector_ViewModel.hxx>
+#include <inspector/VInspector_ViewModelHistory.hxx>
+#include <inspector/VInspector_CallBack.hxx>
+#include <inspector/VInspector_Communicator.hxx>
+#include <inspector/VInspector_ItemEntityOwner.hxx>
+#include <inspector/VInspector_ItemPresentableObject.hxx>
+#include <inspector/VInspector_ToolBar.hxx>
+#include <inspector/VInspector_Tools.hxx>
+#include <inspector/VInspector_ViewModel.hxx>
+#include <inspector/VInspector_ViewModelHistory.hxx>
+
+#include <inspector/View_Widget.hxx>
+#include <inspector/View_Window.hxx>
#include <QApplication>
#include <QDockWidget>
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);
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&)));
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);
// =======================================================================
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());
}
NCollection_List<TCollection_AsciiString> aNames;
myParameters->SetFileNames(aName, aNames);
}
+
+ // make AIS_InteractiveObject selected selected if exist in select parameters
+ NCollection_List<Handle(Standard_Transient)> anObjects;
+ if (myParameters->GetSelectedObjects(aName, anObjects))
+ {
+ VInspector_ViewModel* aViewModel = dynamic_cast<VInspector_ViewModel*>(myTreeView->model());
+ QItemSelectionModel* aSelectionModel = myTreeView->selectionModel();
+ aSelectionModel->clear();
+ for (NCollection_List<Handle(Standard_Transient)>::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);
+ }
+ }
}
// =======================================================================
void VInspector_Window::OpenFile(const TCollection_AsciiString& theFileName)
{
VInspector_ViewModel* aViewModel = dynamic_cast<VInspector_ViewModel*> (myTreeView->model());
+ if (!aViewModel)
+ {
+ Handle(AIS_InteractiveContext) aContext = createView();
+ SetContext (aContext);
+ aViewModel = dynamic_cast<VInspector_ViewModel*> (myTreeView->model());
+ }
if (!aViewModel)
return;
-
+
Handle(AIS_InteractiveContext) aContext = aViewModel->GetContext();
- if (aContext.IsNull())
+ if (!aContext)
return;
TopoDS_Shape aShape = VInspector_Tools::ReadShape (theFileName);
return;
TCollection_AsciiString aPluginName ("TKShapeView");
- if (myParameters->FindParameters(aPluginName))
- {
- NCollection_List<Handle(Standard_Transient)> aPluginParameters = myParameters->Parameters(aPluginName);
+ NCollection_List<Handle(Standard_Transient)> aParameters;
+ if (myParameters->FindParameters (aPluginName))
+ aParameters = myParameters->Parameters (aPluginName);
- QStringList anExportedPointers;
- for (NCollection_List<Handle(AIS_InteractiveObject)>::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<Handle(AIS_InteractiveObject)>::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);
}
// =======================================================================
}
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();
+}
#include <NCollection_List.hxx>
#include <SelectBasics_EntityOwner.hxx>
#include <Standard.hxx>
-#include <TInspectorAPI_PluginParameters.hxx>
-#include <VInspector_CallBack.hxx>
+#include <inspector/TInspectorAPI_PluginParameters.hxx>
+#include <inspector/VInspector_CallBack.hxx>
#include <QObject>
#include <QItemSelection>
#include <QMainWindow>
+class TreeModel_MessageDialog;
+
class VInspector_ToolBar;
+class View_Window;
class QAbstractItemModel;
class QAction;
//! \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
};
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <View_Displayer.hxx>
+#include <inspector/View_Displayer.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <V3d_View.hxx>
#include <V3d_Viewer.hxx>
-#include <View_Viewer.hxx>
-#include <View_Widget.hxx>
+#include <inspector/View_Viewer.hxx>
+#include <inspector/View_Widget.hxx>
// =======================================================================
// function : Constructor
#include <NCollection_DataMap.hxx>
#include <NCollection_Shared.hxx>
#include <Quantity_Color.hxx>
-#include <View_PresentationType.hxx>
+#include <inspector/View_PresentationType.hxx>
class V3d_View;
// commercial license or contractual agreement.
-#include <View_ToolBar.hxx>
+#include <inspector/View_ToolBar.hxx>
#include <QComboBox>
#include <QHBoxLayout>
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);
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);
#include <AIS_InteractiveContext.hxx>
#include <Standard.hxx>
-#include <View_ContextType.hxx>
-#include <View_ToolActionType.hxx>
+#include <inspector/View_ContextType.hxx>
+#include <inspector/View_ToolActionType.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <View_Viewer.hxx>
+#include <inspector/View_Viewer.hxx>
#include <OpenGl_GraphicDriver.hxx>
#include <Standard_ExtString.hxx>
#define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */
#endif
-#include <View_Widget.hxx>
+#include <inspector/View_Widget.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <Standard_Version.hxx>
-#include <View_ViewActionType.hxx>
-#include <View_Viewer.hxx>
+#include <inspector/View_ViewActionType.hxx>
+#include <inspector/View_Viewer.hxx>
#include <QColorDialog>
#include <QCursor>
#include <AIS_InteractiveContext.hxx>
#include <V3d_View.hxx>
-#include <View_ViewActionType.hxx>
-#include <View_Viewer.hxx>
+#include <inspector/View_ViewActionType.hxx>
+#include <inspector/View_Viewer.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127 4718) // conditional expression is constant, recursive call has no side effects
#define QT_CLEAN_NAMESPACE /* avoid definition of INT32 and INT8 */
#endif
-#include <View_Window.hxx>
+#include <inspector/View_Window.hxx>
-#include <View_Displayer.hxx>
-#include <View_ToolBar.hxx>
-#include <View_Viewer.hxx>
-#include <View_Widget.hxx>
+#include <inspector/View_Displayer.hxx>
+#include <inspector/View_ToolBar.hxx>
+#include <inspector/View_Viewer.hxx>
+#include <inspector/View_Widget.hxx>
#include <QComboBox>
#include <QDockWidget>
#define View_Window_H
#include <AIS_InteractiveContext.hxx>
-#include <View_ContextType.hxx>
+#include <inspector/View_ContextType.hxx>
#ifdef _MSC_VER
#pragma warning(disable : 4127) // conditional expression is constant