mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0031362: Inspectors - MessageView plugin for message alerts
- append new MessageView plugin to display content of Message_Report; - correct DumpJson of TDataStd array attributes to print Lower/Upper values; - correct remove level of Message_Report to store stop time during removing all levels; - append DumpJson for TFunction, TPrsStd attributes; - correct DumpJson of XCAFDoc tools due to simplify performance of it; - move AttributeInfo functionality from XDEDRAW into a static public method of XCAFDoc to call it outside; - remove obsolete pane classes in DFBrowser plugin, now we may use DumpJSon panel to visualize this content of attributes; - add new property panel in DFBrowser (synchronized with the same in other plugins); - add button to switch ON DumpJson in DFBrowser(OFF by default, for better performance), also there is a context menu item in tree view; - rename in DFBrowser "Property Panel" into "Property Panel (custom)"; - implement ViewControl_ColorSeletor and setting color in TreeModel_ItemProperties. Use only for light in VInspector now; - implement setting false for all created AIS_Shape presentation to don't modify source TopoDS_Shape; - remove not use VInspector_CallBack. It's possible using Message_Report/MessageView to track commands way; - remove History panel in VInspector as not used, MessageView will be better solution for this; - implement item and actions in VInspector for setting Lights in the view.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <inspector/Convert_Tools.hxx>
|
||||
#include <inspector/Convert_TransientShape.hxx>
|
||||
|
||||
#include <AIS_Line.hxx>
|
||||
#include <AIS_Plane.hxx>
|
||||
#include <AIS_Shape.hxx>
|
||||
#include <BRep_Builder.hxx>
|
||||
@@ -24,6 +25,7 @@
|
||||
#include <BRepPreviewAPI_MakeBox.hxx>
|
||||
#include <BRepTools.hxx>
|
||||
#include <gp_XY.hxx>
|
||||
#include <Geom_Line.hxx>
|
||||
#include <Geom_Plane.hxx>
|
||||
#include <Prs3d_PlaneAspect.hxx>
|
||||
#include <Standard_Dump.hxx>
|
||||
@@ -71,7 +73,9 @@ void Convert_Tools::ConvertStreamToPresentations (const Standard_SStream& theSSt
|
||||
gp_Dir aDir;
|
||||
if (aDir.InitFromJson (theSStream, aStartPos))
|
||||
{
|
||||
thePresentations.Append (new Convert_TransientShape (BRepBuilderAPI_MakeEdge (gp::Origin(), aDir.XYZ())));
|
||||
gp_Lin aLin (gp::Origin(), aDir);
|
||||
Handle(Geom_Line) aGeomLine = new Geom_Line (aLin);
|
||||
CreatePresentation (aGeomLine, thePresentations);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -209,6 +213,18 @@ Standard_Boolean Convert_Tools::CreateBoxShape (const gp_Pnt& thePntMin, const g
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreatePresentation
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void Convert_Tools::CreatePresentation (const Handle(Geom_Line)& theLine,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations)
|
||||
{
|
||||
Handle(AIS_Line) aLinePrs = new AIS_Line (theLine);
|
||||
aLinePrs->SetColor (Quantity_NOC_TOMATO);
|
||||
thePresentations.Append (aLinePrs);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : CreatePresentation
|
||||
//purpose :
|
||||
@@ -248,11 +264,13 @@ void Convert_Tools::CreatePresentation (const gp_Trsf& theTrsf,
|
||||
return;
|
||||
|
||||
Handle(AIS_Shape) aSourcePrs = new AIS_Shape (aBoxShape);
|
||||
aSourcePrs->Attributes()->SetAutoTriangulation (Standard_False);
|
||||
aSourcePrs->SetColor (Quantity_NOC_WHITE);
|
||||
aSourcePrs->SetTransparency (0.5);
|
||||
thePresentations.Append (aSourcePrs);
|
||||
|
||||
Handle(AIS_Shape) aTransformedPrs = new AIS_Shape (aBoxShape);
|
||||
aTransformedPrs->Attributes()->SetAutoTriangulation (Standard_False);
|
||||
aTransformedPrs->SetColor (Quantity_NOC_TOMATO);
|
||||
aTransformedPrs->SetTransparency (0.5);
|
||||
aTransformedPrs->SetLocalTransformation (theTrsf);
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class Geom_Line;
|
||||
class Geom_Plane;
|
||||
class Geom_Transformation;
|
||||
|
||||
@@ -85,15 +86,21 @@ public:
|
||||
const gp_Pnt& thePntMax,
|
||||
TopoDS_Shape& theShape);
|
||||
|
||||
//! Creates presentation AIS_Line
|
||||
//! \param theLine source line
|
||||
//! \param thePresentations container to collect new presentations
|
||||
Standard_EXPORT static void CreatePresentation (const Handle(Geom_Line)& theLine,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations);
|
||||
|
||||
//! Creates presentation AIS_Plane
|
||||
//! \param thePlane source plane
|
||||
//! \param thePresentations container to collect new presentation/s
|
||||
//! \param thePresentations container to collect new presentations
|
||||
Standard_EXPORT static void CreatePresentation (const Handle(Geom_Plane)& thePlane,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations);
|
||||
|
||||
//! Creates two presentations base on gp_Trsf: box in initial place and transformed box
|
||||
//! \param thePlane source plane
|
||||
//! \param thePresentations container to collect new presentation/s
|
||||
//! \param thePresentations container to collect new presentations
|
||||
Standard_EXPORT static void CreatePresentation (const gp_Trsf& theTrsf,
|
||||
NCollection_List<Handle(Standard_Transient)>& thePresentations);
|
||||
|
||||
|
@@ -18,6 +18,7 @@
|
||||
#include <inspector/DFBrowser_ItemRole.hxx>
|
||||
#include <inspector/DFBrowser_Module.hxx>
|
||||
#include <inspector/DFBrowser_Tools.hxx>
|
||||
#include <inspector/DFBrowser_Window.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_ItemRole.hxx>
|
||||
@@ -31,8 +32,6 @@
|
||||
#include <QObject>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
//#define USE_DUMPJSON
|
||||
|
||||
// =======================================================================
|
||||
// function : hasAttribute
|
||||
// purpose :
|
||||
@@ -158,13 +157,14 @@ void DFBrowser_Item::initStream (Standard_OStream& theOStream) const
|
||||
if (!HasAttribute())
|
||||
return;
|
||||
|
||||
#ifdef USE_DUMPJSON
|
||||
Handle(TDF_Attribute) anAttribute = GetAttribute();
|
||||
if (!anAttribute.IsNull())
|
||||
anAttribute->DumpJson (theOStream);
|
||||
#else
|
||||
(void)theOStream;
|
||||
#endif
|
||||
if (DFBrowser_Window::IsUseDumpJson())
|
||||
{
|
||||
Handle(TDF_Attribute) anAttribute = GetAttribute();
|
||||
if (!anAttribute.IsNull())
|
||||
{
|
||||
anAttribute->DumpJson (theOStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -27,10 +27,8 @@
|
||||
#include <inspector/DFBrowserPane_ItemRole.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_Tools.hxx>
|
||||
|
||||
#include <XCAFApp_Application.hxx>
|
||||
#include <XCAFDoc.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QItemSelectionModel>
|
||||
@@ -68,8 +66,6 @@ void DFBrowser_Module::SetApplication (const Handle(TDocStd_Application)& theApp
|
||||
|
||||
myPaneCreators.clear();
|
||||
RegisterPaneCreator (new DFBrowserPane_AttributePaneCreator());
|
||||
if (!theApplication.IsNull() && DFBrowserPaneXDE_Tools::IsXDEApplication (theApplication))
|
||||
RegisterPaneCreator (new DFBrowserPaneXDE_AttributePaneCreator (myPaneCreators[0]));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
@@ -185,8 +181,17 @@ QVariant DFBrowser_Module::GetAttributeInfo (Handle(TDF_Attribute) theAttribute,
|
||||
anAttributePane = dynamic_cast<DFBrowserPane_AttributePane*> (anAPIPane);
|
||||
}
|
||||
|
||||
TCollection_AsciiString anInfo;
|
||||
if (theRole == DFBrowser_ItemRole_AdditionalInfo)
|
||||
{
|
||||
anInfo = XCAFDoc::AttributeInfo (theAttribute);
|
||||
}
|
||||
QVariant aValue;
|
||||
if (anAttributePane)
|
||||
if (!anInfo.IsEmpty())
|
||||
{
|
||||
aValue = anInfo.ToCString();
|
||||
}
|
||||
else if (anAttributePane)
|
||||
aValue = anAttributePane->GetAttributeInfo (theAttribute,
|
||||
theRole == DFBrowser_ItemRole_AdditionalInfo ? DFBrowserPane_ItemRole_ShortInfo : theRole,
|
||||
theColumnId);
|
||||
|
@@ -126,7 +126,7 @@ QVariant DFBrowser_TreeLevelViewModel::data (const QModelIndex& theIndex, int th
|
||||
Qt::ItemFlags DFBrowser_TreeLevelViewModel::flags (const QModelIndex& theIndex) const
|
||||
{
|
||||
if (!theIndex.isValid())
|
||||
return 0;
|
||||
return Qt::NoItemFlags;
|
||||
Qt::ItemFlags aFlags = Qt::ItemIsEnabled | Qt::ItemIsSelectable;
|
||||
|
||||
return aFlags;
|
||||
|
@@ -49,7 +49,7 @@ DFBrowser_TreeModel::DFBrowser_TreeModel (QObject* theParent)
|
||||
// =======================================================================
|
||||
void DFBrowser_TreeModel::InitColumns()
|
||||
{
|
||||
SetHeaderItem (0, TreeModel_HeaderSection ("Name"));
|
||||
setHeaderItem (0, TreeModel_HeaderSection ("Name"));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -51,7 +51,7 @@
|
||||
#include <OSD_Directory.hxx>
|
||||
#include <OSD_Environment.hxx>
|
||||
#include <OSD_Protection.hxx>
|
||||
#include <OSD_Thread.hxx>
|
||||
|
||||
#include <inspector/View_Displayer.hxx>
|
||||
#include <inspector/View_ToolBar.hxx>
|
||||
#include <inspector/View_Viewer.hxx>
|
||||
@@ -62,7 +62,6 @@
|
||||
#include <inspector/ViewControl_Tools.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <Standard_ThreadId.hxx>
|
||||
#include <QAction>
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
@@ -72,6 +71,7 @@
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QItemSelectionModel>
|
||||
#include <QPushButton>
|
||||
#include <QTabWidget>
|
||||
#include <QToolBar>
|
||||
#include <QTreeView>
|
||||
@@ -99,7 +99,7 @@ const int DFBROWSER_DEFAULT_POSITION_Y = 60;
|
||||
const int DEFAULT_PROPERTY_PANEL_HEIGHT = 200;
|
||||
const int DEFAULT_BROWSER_HEIGHT = 800;
|
||||
|
||||
//#define USE_DUMPJSON
|
||||
static Standard_Boolean MyIsUseDumpJson = Standard_False;
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
@@ -160,23 +160,30 @@ DFBrowser_Window::DFBrowser_Window()
|
||||
connect (aLevelView, SIGNAL (indexDoubleClicked (const QModelIndex&)),
|
||||
this, SLOT (onLevelDoubleClicked (const QModelIndex&)));
|
||||
|
||||
// property widget
|
||||
QDockWidget* aPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel"), myMainWindow);
|
||||
// property custom panel with specific parameters of attributes
|
||||
QDockWidget* aPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel (custom)"), myMainWindow);
|
||||
aPropertyPanelWidget->setObjectName (aPropertyPanelWidget->windowTitle());
|
||||
aPropertyPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
|
||||
aPropertyPanelWidget->setWidget (myPropertyPanel->GetControl());
|
||||
myMainWindow->addDockWidget (Qt::RightDockWidgetArea, aPropertyPanelWidget);
|
||||
|
||||
// property view
|
||||
#ifdef USE_DUMPJSON
|
||||
myPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel (DumpJson)"), myMainWindow);
|
||||
// property panel
|
||||
myUseDumpJson = new QWidget(myMainWindow);
|
||||
QVBoxLayout* aLay = new QVBoxLayout(myUseDumpJson);
|
||||
QPushButton* aUseDumpJson = new QPushButton ("Use DumpJson", myMainWindow);
|
||||
aLay->addWidget (aUseDumpJson);
|
||||
aLay->addStretch(1);
|
||||
connect(aUseDumpJson, SIGNAL (clicked (bool)), this, SLOT (onUseDumpJson()));
|
||||
myUseDumpJson->setVisible (false);
|
||||
|
||||
myPropertyPanelWidget = new QDockWidget (tr ("PropertyPanel"), myMainWindow);
|
||||
myPropertyView = new ViewControl_PropertyView (myMainWindow,
|
||||
QSize(DFBROWSER_DEFAULT_VIEW_WIDTH, DFBROWSER_DEFAULT_VIEW_HEIGHT));
|
||||
myPropertyPanelWidget->setObjectName (myPropertyPanelWidget->windowTitle());
|
||||
myPropertyPanelWidget->setTitleBarWidget (new QWidget(myMainWindow));
|
||||
myPropertyPanelWidget->setWidget (myPropertyView->GetControl());
|
||||
updatePropertyPanelWidget();
|
||||
myMainWindow->addDockWidget (Qt::RightDockWidgetArea, myPropertyPanelWidget);
|
||||
#endif
|
||||
|
||||
// dump view window
|
||||
QWidget* aDumpWidget = new QWidget(myMainWindow);
|
||||
@@ -204,14 +211,10 @@ DFBrowser_Window::DFBrowser_Window()
|
||||
myViewWindow->Displayer()->SetAttributeColor (Quantity_Color(aHColor.red() / 255., aHColor.green() / 255.,
|
||||
aHColor.blue() / 255., Quantity_TOC_sRGB), View_PresentationType_Additional);
|
||||
|
||||
myMainWindow->splitDockWidget (aPropertyPanelWidget, aViewDockWidget, Qt::Vertical);
|
||||
myMainWindow->splitDockWidget (myPropertyPanelWidget, aViewDockWidget, Qt::Vertical);
|
||||
myMainWindow->tabifyDockWidget (myPropertyPanelWidget, aPropertyPanelWidget);
|
||||
|
||||
#ifdef USE_DUMPJSON
|
||||
myMainWindow->tabifyDockWidget (aDumpDockWidget, myPropertyPanelWidget);
|
||||
myMainWindow->tabifyDockWidget (myPropertyPanelWidget, aViewDockWidget);
|
||||
#else
|
||||
myMainWindow->tabifyDockWidget (aDumpDockWidget, aViewDockWidget);
|
||||
#endif
|
||||
|
||||
myTreeView->resize (DFBROWSER_DEFAULT_TREE_VIEW_WIDTH, DFBROWSER_DEFAULT_TREE_VIEW_HEIGHT);
|
||||
|
||||
@@ -641,6 +644,24 @@ TCollection_AsciiString DFBrowser_Window::TmpDirectory()
|
||||
return aTmpDir;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : SetUseDumpJson
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowser_Window::SetUseDumpJson (const Standard_Boolean theValue)
|
||||
{
|
||||
MyIsUseDumpJson = theValue;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : IsUseDumpJson
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Boolean DFBrowser_Window::IsUseDumpJson()
|
||||
{
|
||||
return MyIsUseDumpJson;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : onTreeViewContextMenuRequested
|
||||
// purpose :
|
||||
@@ -652,6 +673,12 @@ void DFBrowser_Window::onTreeViewContextMenuRequested (const QPoint& thePosition
|
||||
aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Expand All"), SLOT (onExpandAll()), GetMainWindow(), this));
|
||||
aMenu->addAction (ViewControl_Tools::CreateAction (tr ("Collapse All"), SLOT (onCollapseAll()), GetMainWindow(), this));
|
||||
|
||||
aMenu->addSeparator();
|
||||
QAction* aUseDumpJsonAction = ViewControl_Tools::CreateAction (tr ("Use DumpJson"), SLOT (onUseDumpJson()), GetMainWindow(), this);
|
||||
aUseDumpJsonAction->setCheckable(true);
|
||||
aUseDumpJsonAction->setChecked (IsUseDumpJson());
|
||||
aMenu->addAction (aUseDumpJsonAction);
|
||||
|
||||
QPoint aPoint = myTreeView->mapToGlobal (thePosition);
|
||||
aMenu->exec (aPoint);
|
||||
}
|
||||
@@ -706,6 +733,20 @@ void DFBrowser_Window::onCollapseAll()
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : onUseDumpJson
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowser_Window::onUseDumpJson()
|
||||
{
|
||||
SetUseDumpJson(!IsUseDumpJson());
|
||||
updatePropertyPanelWidget();
|
||||
|
||||
QApplication::setOverrideCursor (Qt::WaitCursor);
|
||||
myModule->UpdateTreeModel();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : onTreeViewSelectionChanged
|
||||
// purpose :
|
||||
@@ -716,10 +757,10 @@ void DFBrowser_Window::onTreeViewSelectionChanged (const QItemSelection& theSele
|
||||
if (!myModule)
|
||||
return;
|
||||
|
||||
#ifdef USE_DUMPJSON
|
||||
if (myPropertyPanelWidget->toggleViewAction()->isChecked())
|
||||
myPropertyView->Init (ViewControl_Tools::CreateTableModelValues (myTreeView->selectionModel()));
|
||||
#endif
|
||||
if (IsUseDumpJson() && myPropertyPanelWidget->toggleViewAction()->isChecked())
|
||||
{
|
||||
myPropertyView->Init (ViewControl_Tools::CreateTableModelValues (myTreeView->selectionModel()));
|
||||
}
|
||||
|
||||
// previuos selection should be cleared in the panel selectors
|
||||
DFBrowser_AttributePaneStack* anAttributePaneStack = myPropertyPanel->GetAttributesStack();
|
||||
@@ -1004,3 +1045,15 @@ void DFBrowser_Window::findPresentations (const QModelIndexList& theIndices, AIS
|
||||
thePresentations.Append (aPresentation);
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : updatePropertyPanelWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowser_Window::updatePropertyPanelWidget()
|
||||
{
|
||||
bool aUseDumpJson = IsUseDumpJson();
|
||||
|
||||
myUseDumpJson->setVisible (!aUseDumpJson);
|
||||
myPropertyPanelWidget->setWidget (aUseDumpJson ? myPropertyView->GetControl() : myUseDumpJson);
|
||||
}
|
||||
|
@@ -118,6 +118,12 @@ public:
|
||||
//! \return string value
|
||||
Standard_EXPORT static TCollection_AsciiString TmpDirectory();
|
||||
|
||||
//! Sets whether DumpJson is used when the tree view is generated
|
||||
Standard_EXPORT static void SetUseDumpJson(const Standard_Boolean theValue);
|
||||
|
||||
//! Returns whether DumpJson is used when the tree view is generated
|
||||
Standard_EXPORT static Standard_Boolean IsUseDumpJson();
|
||||
|
||||
private slots:
|
||||
|
||||
//! Cleans history in tree level line, clears cache of thread processing, starts threads for application
|
||||
@@ -136,6 +142,9 @@ private slots:
|
||||
//! Collapses all levels for all selected items
|
||||
void onCollapseAll();
|
||||
|
||||
//! Setting flag whether DumpJSon should be applied to build tree model items structure
|
||||
void onUseDumpJson();
|
||||
|
||||
//! Updates all controls by changed selection in OCAF tree view
|
||||
//! \param theSelected list of selected tree view items
|
||||
//! \param theDeselected list of deselected tree view items
|
||||
@@ -208,6 +217,9 @@ protected:
|
||||
//! \return container of presentations or NULL
|
||||
void findPresentations (const QModelIndexList& theIndices, AIS_ListOfInteractive& thePresentations);
|
||||
|
||||
//! Updates content of Property Panel dock widget. It contains button to activate DumpJson or view with content of it.
|
||||
void updatePropertyPanelWidget();
|
||||
|
||||
private:
|
||||
|
||||
DFBrowser_Module* myModule; //!< current module
|
||||
@@ -216,6 +228,7 @@ private:
|
||||
DFBrowser_TreeLevelLine* myTreeLevelLine; //!< navigate line of tree levels to the selected item
|
||||
QTreeView* myTreeView; //!< OCAF tree view
|
||||
QDockWidget* myPropertyPanelWidget; //!< property pane dockable widget
|
||||
QWidget* myUseDumpJson; //!< button to activate/deactivate using of DumpJson
|
||||
DFBrowser_PropertyPanel* myPropertyPanel; //!< property panel shows full information about attribute or search view
|
||||
ViewControl_PropertyView* myPropertyView; //!< property control to display model item values if exist
|
||||
View_Window* myViewWindow; //!< V3d view to visualize presentations/references if it can be build for a selected item
|
||||
|
@@ -16,112 +16,24 @@
|
||||
#include <inspector/DFBrowserPane_AttributePaneCreator.hxx>
|
||||
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
#include <TDF_Reference.hxx>
|
||||
|
||||
// the types are defined in TDF library
|
||||
#include <inspector/DFBrowserPane_TDFReference.hxx>
|
||||
#include <inspector/DFBrowserPane_TDFTagSource.hxx>
|
||||
|
||||
#include <TDataStd_Current.hxx>
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDataStd_Comment.hxx>
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataStd_IntegerArray.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
#include <TDataStd_ExtStringArray.hxx>
|
||||
#include <TDataStd_UAttribute.hxx>
|
||||
#include <TDataStd_TreeNode.hxx>
|
||||
#include <TDataStd_Directory.hxx>
|
||||
#include <TDataStd_NoteBook.hxx>
|
||||
#include <TDataStd_Expression.hxx>
|
||||
#include <TDataStd_Relation.hxx>
|
||||
#include <TDataStd_Variable.hxx>
|
||||
#include <TDataStd_Tick.hxx>
|
||||
#include <TDataStd_AsciiString.hxx>
|
||||
#include <TDataStd_IntPackedMap.hxx>
|
||||
#include <TDataStd_IntegerList.hxx>
|
||||
#include <TDataStd_RealList.hxx>
|
||||
#include <TDataStd_ExtStringList.hxx>
|
||||
#include <TDataStd_BooleanList.hxx>
|
||||
#include <TDataStd_ReferenceList.hxx>
|
||||
#include <TDataStd_BooleanArray.hxx>
|
||||
#include <TDataStd_ReferenceArray.hxx>
|
||||
#include <TDataStd_ByteArray.hxx>
|
||||
#include <TDataStd_NamedData.hxx>
|
||||
|
||||
#include <TDocStd_Modified.hxx>
|
||||
#include <TDocStd_Owner.hxx>
|
||||
#include <TDocStd_XLink.hxx>
|
||||
#include <TDocStd_XLinkRoot.hxx>
|
||||
#include <TPrsStd_AISViewer.hxx>
|
||||
#include <TPrsStd_AISPresentation.hxx>
|
||||
|
||||
#include <TNaming_NamedShape.hxx>
|
||||
#include <TNaming_Naming.hxx>
|
||||
#include <TNaming_UsedShapes.hxx>
|
||||
|
||||
#include <TFunction_Function.hxx>
|
||||
#include <TFunction_GraphNode.hxx>
|
||||
#include <TFunction_Scope.hxx>
|
||||
|
||||
// the types are defined in TDataStd.cdl
|
||||
// Basic attributes
|
||||
#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdName.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdComment.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdReal.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
|
||||
|
||||
//Extension
|
||||
#include <inspector/DFBrowserPane_TDataStdTick.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
|
||||
// Lists:
|
||||
#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
|
||||
#include <inspector/DFBrowserPane_TDFReference.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdReferenceList.hxx>
|
||||
|
||||
// Arrays:
|
||||
#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdReferenceArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
|
||||
|
||||
// TDocStd attributes
|
||||
#include <inspector/DFBrowserPane_TDocStdModified.hxx>
|
||||
#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
|
||||
#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
|
||||
#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
|
||||
|
||||
// TPrsStd attributes
|
||||
#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
|
||||
#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
|
||||
|
||||
// TNaming attributes
|
||||
#include <inspector/DFBrowserPane_TDataStdTreeNode.hxx>
|
||||
#include <inspector/DFBrowserPane_TNamingNamedShape.hxx>
|
||||
#include <inspector/DFBrowserPane_TNamingNaming.hxx>
|
||||
#include <inspector/DFBrowserPane_TNamingUsedShapes.hxx>
|
||||
|
||||
// TFunction attributes
|
||||
#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
|
||||
#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
|
||||
#include <inspector/DFBrowserPane_TFunctionScope.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
@@ -131,86 +43,18 @@ DFBrowserPane_AttributePaneAPI* DFBrowserPane_AttributePaneCreator::CreateAttrib
|
||||
DFBrowserPane_AttributePaneAPI* aPane = 0;
|
||||
if (theAttributeName == STANDARD_TYPE (TDF_Reference)->Name())
|
||||
aPane = new DFBrowserPane_TDFReference();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDF_TagSource)->Name())
|
||||
aPane = new DFBrowserPane_TDFTagSource();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Current)->Name()) // Basic attributes
|
||||
aPane = new DFBrowserPane_TDataStdCurrent();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Name)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdName();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Comment)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdComment();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Integer)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdInteger();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_IntegerArray)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdIntegerArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Real)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdReal();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_RealArray)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdRealArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_ExtStringArray)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdExtStringArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_UAttribute)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdUAttribute();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_TreeNode)->Name()) // Attributes for organization
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_TreeNode)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdTreeNode();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Directory)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdDirectory();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_NoteBook)->Name()) // Other attributes
|
||||
aPane = new DFBrowserPane_TDataStdNoteBook();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Expression)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdExpression();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Relation)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdRelation();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Variable)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdVariable();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_Tick)->Name()) //Extension
|
||||
aPane = new DFBrowserPane_TDataStdTick();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_AsciiString)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdAsciiString();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_IntPackedMap)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdIntPackedMap();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_IntegerList)->Name()) // Lists
|
||||
aPane = new DFBrowserPane_TDataStdIntegerList();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_RealList)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdRealList();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_ExtStringList)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdExtStringList();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_BooleanList)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdBooleanList();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceList)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdReferenceList();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_BooleanArray)->Name()) // Arrays:
|
||||
aPane = new DFBrowserPane_TDataStdBooleanArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_ReferenceArray)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdReferenceArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_ByteArray)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdByteArray();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDataStd_NamedData)->Name())
|
||||
aPane = new DFBrowserPane_TDataStdNamedData();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDocStd_Modified)->Name()) // TDocStd attributes
|
||||
aPane = new DFBrowserPane_TDocStdModified();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDocStd_Owner)->Name())
|
||||
aPane = new DFBrowserPane_TDocStdOwner();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDocStd_XLink)->Name())
|
||||
aPane = new DFBrowserPane_TDocStdXLink();
|
||||
else if (theAttributeName == STANDARD_TYPE (TDocStd_XLinkRoot)->Name())
|
||||
aPane = new DFBrowserPane_TDocStdXLinkRoot();
|
||||
else if (theAttributeName == STANDARD_TYPE (TPrsStd_AISViewer)->Name()) // TPrsStd attributes
|
||||
aPane = new DFBrowserPane_TPrsStdAISViewer();
|
||||
else if (theAttributeName == STANDARD_TYPE (TPrsStd_AISPresentation)->Name())
|
||||
aPane = new DFBrowserPane_TPrsStdAISPresentation();
|
||||
else if (theAttributeName == STANDARD_TYPE (TNaming_NamedShape)->Name()) // TNaming attributes
|
||||
else if (theAttributeName == STANDARD_TYPE (TNaming_NamedShape)->Name())
|
||||
aPane = new DFBrowserPane_TNamingNamedShape();
|
||||
else if (theAttributeName == STANDARD_TYPE (TNaming_Naming)->Name())
|
||||
aPane = new DFBrowserPane_TNamingNaming();
|
||||
else if (theAttributeName == STANDARD_TYPE (TNaming_UsedShapes)->Name())
|
||||
aPane = new DFBrowserPane_TNamingUsedShapes();
|
||||
else if (theAttributeName == STANDARD_TYPE (TFunction_Function)->Name()) // TFunction attributes
|
||||
aPane = new DFBrowserPane_TFunctionFunction();
|
||||
else if (theAttributeName == STANDARD_TYPE (TFunction_GraphNode)->Name())
|
||||
aPane = new DFBrowserPane_TFunctionGraphNode();
|
||||
else if (theAttributeName == STANDARD_TYPE (TFunction_Scope)->Name())
|
||||
aPane = new DFBrowserPane_TFunctionScope();
|
||||
|
||||
return aPane;
|
||||
}
|
||||
|
@@ -1,37 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDFTagSource.hxx>
|
||||
|
||||
#include <TDF_TagSource.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDFTagSource::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDF_TagSource) anAttribute = Handle(TDF_TagSource)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append ("Get");
|
||||
theValues.append (anAttribute->Get());
|
||||
}
|
||||
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDFTagSource_H
|
||||
#define DFBrowserPane_TDFTagSource_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDFTagSource
|
||||
//! \brief The class to manipulate of TDF_TagSource attribute
|
||||
class DFBrowserPane_TDFTagSource : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDFTagSource() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDFTagSource() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,38 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdAsciiString.hxx>
|
||||
|
||||
#include <TDataStd_AsciiString.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QIcon>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdAsciiString::GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_AsciiString) anAttribute = Handle(TDataStd_AsciiString)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append ("Get");
|
||||
theValues.append (anAttribute->Get().ToCString());
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdAsciiString_H
|
||||
#define DFBrowserPane_TDataStdAsciiString_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdAsciiString
|
||||
//! \brief The class to manipulate of TDataStd_AsciiString attribute
|
||||
class DFBrowserPane_TDataStdAsciiString : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdAsciiString() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdAsciiString() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,83 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdBooleanArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <TDataStd_BooleanArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QGridLayout>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdBooleanArray::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QWidget* aMainWidget = new QWidget (theParent);
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
|
||||
myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdBooleanArray::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdBooleanArray::GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_BooleanArray) anAttribute = Handle(TDataStd_BooleanArray)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append (anAttribute->Lower());
|
||||
theValues.append (anAttribute->Upper());
|
||||
for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
|
||||
theValues.append (anAttribute->Value (aValueId));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdBooleanArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdBooleanArray_H
|
||||
#define DFBrowserPane_TDataStdBooleanArray_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdBooleanArray
|
||||
//! \brief The class to manipulate of TDataStd_BooleanArray attribute
|
||||
class DFBrowserPane_TDataStdBooleanArray : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdBooleanArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPane_TDataStdBooleanArray() {}
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Calls Init of array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns short attribute information using array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues container of output values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdBooleanList.hxx>
|
||||
|
||||
#include <TDataStd_BooleanList.hxx>
|
||||
#include <TDataStd_ListIteratorOfListOfByte.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdBooleanList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_BooleanList) anAttribute = Handle(TDataStd_BooleanList)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
for (TDataStd_ListIteratorOfListOfByte aBoolListIt (anAttribute->List()); aBoolListIt.More(); aBoolListIt.Next())
|
||||
{
|
||||
theValues.append ("Value");
|
||||
theValues.append (aBoolListIt.Value());
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdBooleanList_H
|
||||
#define DFBrowserPane_TDataStdBooleanList_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdBooleanList
|
||||
//! \brief The class to manipulate of TDataStd_BooleanList attribute
|
||||
class DFBrowserPane_TDataStdBooleanList : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdBooleanList() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdBooleanList() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,81 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdByteArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <TDataStd_ByteArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdByteArray::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QWidget* aMainWidget = new QWidget (theParent);
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
|
||||
myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdByteArray::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdByteArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_ByteArray) anAttribute = Handle(TDataStd_ByteArray)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append (anAttribute->Lower());
|
||||
theValues.append (anAttribute->Upper());
|
||||
for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
|
||||
theValues.append (anAttribute->Value (aValueId));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdByteArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdByteArray_H
|
||||
#define DFBrowserPane_TDataStdByteArray_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdByteArray
|
||||
//! \brief The class to manipulate of TDataStd_ByteArra attribute
|
||||
class DFBrowserPane_TDataStdByteArray : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdByteArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPane_TDataStdByteArray() {}
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Calls Init of array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns short attribute information using array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues container of output values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,37 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdComment.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_Comment.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdComment::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Comment) anAttribute = Handle(TDataStd_Comment)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append ("Get");
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Get()));
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdComment_H
|
||||
#define DFBrowserPane_TDataStdComment_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdComment
|
||||
//! \brief The class to manipulate of TDataStd_Comment attribute
|
||||
class DFBrowserPane_TDataStdComment : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdComment() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdComment() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,37 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdCurrent.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_Current.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdCurrent::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Current) anAttribute = Handle(TDataStd_Current)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append ("GetLabel");
|
||||
theValues.append (DFBrowserPane_Tools::GetEntry (anAttribute->GetLabel()).ToCString());
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdCurrent_H
|
||||
#define DFBrowserPane_TDataStdCurrent_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdCurrent
|
||||
//! \brief The class to manipulate of TDataStd_Current attribute
|
||||
class DFBrowserPane_TDataStdCurrent : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdCurrent() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdCurrent() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,30 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdDirectory.hxx>
|
||||
|
||||
#include <TDataStd_Directory.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdDirectory::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdDirectory_H
|
||||
#define DFBrowserPane_TDataStdDirectory_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdDirectory
|
||||
//! \brief The class to manipulate of TDataStd_Directory attribute
|
||||
class DFBrowserPane_TDataStdDirectory : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdDirectory() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdDirectory() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,38 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdExpression.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_Expression.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdExpression::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Expression) anAttribute = Handle(TDataStd_Expression)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append ("GetExpression");
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anAttribute->GetExpression()));
|
||||
}
|
||||
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdExpression_H
|
||||
#define DFBrowserPane_TDataStdExpression_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdExpression
|
||||
//! \brief The class to manipulate of TDataStd_Expression attribute
|
||||
class DFBrowserPane_TDataStdExpression : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdExpression() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdExpression() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,81 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdExtStringArray.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <TDataStd_ExtStringArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdExtStringArray::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QWidget* aMainWidget = new QWidget (theParent);
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
|
||||
myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdExtStringArray::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdExtStringArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_ExtStringArray) anAttribute = Handle(TDataStd_ExtStringArray)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append (anAttribute->Lower());
|
||||
theValues.append (anAttribute->Upper());
|
||||
for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Value(aValueId)));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdExtStringArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
|
||||
}
|
@@ -1,61 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdExtStringArray_H
|
||||
#define DFBrowserPane_TDataStdExtStringArray_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdExtStringArray
|
||||
//! \brief The class to manipulate of TDataStd_ExtStringArray attribute
|
||||
class DFBrowserPane_TDataStdExtStringArray : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdExtStringArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPane_TDataStdExtStringArray() {}
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Calls Init of array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns short attribute information using array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues container of output values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdExtStringList.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_ExtStringList.hxx>
|
||||
#include <TDataStd_ListIteratorOfListOfExtendedString.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdExtStringList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_ExtStringList) anAttribute = Handle(TDataStd_ExtStringList)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
for (TDataStd_ListIteratorOfListOfExtendedString aValuesIt(anAttribute->List()); aValuesIt.More(); aValuesIt.Next())
|
||||
{
|
||||
theValues.append ("Value");
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aValuesIt.Value()));
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdExtStringList_H
|
||||
#define DFBrowserPane_TDataStdExtStringList_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdExtStringList
|
||||
//! \brief The class to manipulate of TDataStd_ExtStringList attribute
|
||||
class DFBrowserPane_TDataStdExtStringList : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdExtStringList() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdExtStringList() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdIntPackedMap.hxx>
|
||||
|
||||
#include <TDataStd_IntPackedMap.hxx>
|
||||
#include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdIntPackedMap::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_IntPackedMap) anAttribute = Handle(TDataStd_IntPackedMap)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
int anIndexInMap = 0;
|
||||
for (TColStd_MapIteratorOfPackedMapOfInteger aValueIt(anAttribute->GetMap()); aValueIt.More(); aValueIt.Next(), anIndexInMap++)
|
||||
{
|
||||
theValues.append (QString ("GetMap [%1]").arg(anIndexInMap));
|
||||
theValues.append (aValueIt.Key());
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdIntPackedMap_H
|
||||
#define DFBrowserPane_TDataStdIntPackedMap_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdIntPackedMap
|
||||
//! \brief The class to manipulate of TDataStd_IntPackedMap attribute
|
||||
class DFBrowserPane_TDataStdIntPackedMap : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdIntPackedMap() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdIntPackedMap() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,36 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdInteger.hxx>
|
||||
|
||||
#include <TDataStd_Integer.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdInteger::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Integer) anAttribute = Handle(TDataStd_Integer)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append ("Get");
|
||||
theValues.append (anAttribute->Get());
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdInteger_H
|
||||
#define DFBrowserPane_TDataStdInteger_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdInteger
|
||||
//! \brief The class to manipulate of TDataStd_Integer attribute
|
||||
class DFBrowserPane_TDataStdInteger : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdInteger() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdInteger() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,81 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdIntegerArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <TDataStd_IntegerArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdIntegerArray::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QWidget* aMainWidget = new QWidget (theParent);
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
|
||||
myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdIntegerArray::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdIntegerArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_IntegerArray) anAttribute = Handle(TDataStd_IntegerArray)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append (anAttribute->Lower());
|
||||
theValues.append (anAttribute->Upper());
|
||||
for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
|
||||
theValues.append (anAttribute->Value(aValueId));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdIntegerArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
|
||||
}
|
@@ -1,61 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdIntegerArray_H
|
||||
#define DFBrowserPane_TDataStdIntegerArray_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdIntegerArray
|
||||
//! \brief The class to manipulate of TDataStd_IntegerArray attribute
|
||||
class DFBrowserPane_TDataStdIntegerArray : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdIntegerArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPane_TDataStdIntegerArray() {}
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Calls Init of array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns short attribute information using array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues container of output values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdIntegerList.hxx>
|
||||
|
||||
#include <TDataStd_IntegerList.hxx>
|
||||
#include <TColStd_ListIteratorOfListOfInteger.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdIntegerList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_IntegerList) anAttribute = Handle(TDataStd_IntegerList)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
for (TColStd_ListIteratorOfListOfInteger aValuesIt (anAttribute->List()); aValuesIt.More(); aValuesIt.Next())
|
||||
{
|
||||
theValues.append ("Value");
|
||||
theValues.append (aValuesIt.Value());
|
||||
}
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdIntegerList_H
|
||||
#define DFBrowserPane_TDataStdIntegerList_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdIntegerList
|
||||
//! \brief The class to manipulate of TDataStd_IntegerList attribute
|
||||
class DFBrowserPane_TDataStdIntegerList : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdIntegerList() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdIntegerList() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,38 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdName.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_Name.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdName::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Name) anAttribute = Handle(TDataStd_Name)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append ("Get");
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anAttribute->Get()));
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdName_H
|
||||
#define DFBrowserPane_TDataStdName_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdName
|
||||
//! \brief The class to manipulate of TDataStd_Name attribute
|
||||
class DFBrowserPane_TDataStdName : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdName() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdName() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,242 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdNamedData.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TColStd_DataMapOfStringInteger.hxx>
|
||||
#include <TColStd_DataMapIteratorOfDataMapOfStringInteger.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <TColStd_HArray1OfReal.hxx>
|
||||
|
||||
#include <TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx>
|
||||
#include <TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx>
|
||||
#include <TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx>
|
||||
#include <TDataStd_DataMapIteratorOfDataMapOfStringReal.hxx>
|
||||
#include <TDataStd_DataMapIteratorOfDataMapOfStringString.hxx>
|
||||
#include <TDataStd_DataMapOfStringByte.hxx>
|
||||
#include <TDataStd_DataMapOfStringHArray1OfInteger.hxx>
|
||||
#include <TDataStd_DataMapOfStringReal.hxx>
|
||||
#include <TDataStd_DataMapOfStringString.hxx>
|
||||
#include <TDataStd_HDataMapOfStringHArray1OfInteger.hxx>
|
||||
#include <TDataStd_NamedData.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QTableView>
|
||||
#include <QTabWidget>
|
||||
#include <QVariant>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
static const QString VALUES_INTEGER = "values_integer";
|
||||
static const QString VALUES_REAL = "values_real";
|
||||
static const QString VALUES_STRING = "values_string";
|
||||
static const QString VALUES_BYTE = "values_byte";
|
||||
static const QString VALUES_INT_ARRAY = "values_int_array";
|
||||
static const QString VALUES_REAL_ARRAY = "values_real_array";
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_TDataStdNamedData::DFBrowserPane_TDataStdNamedData()
|
||||
: DFBrowserPane_AttributePane(), myRealValues (0), myStringValues(0), myByteValues(0), myIntArrayValues(0),
|
||||
myRealArrayValues(0)
|
||||
{
|
||||
myPaneModel = createPaneModel();
|
||||
myRealValuesModel = createPaneModel();
|
||||
myStringValuesModel = createPaneModel();
|
||||
myByteValuesModel = createPaneModel();
|
||||
myIntArrayValuesModel = createPaneModel();
|
||||
myRealArrayModel = createPaneModel();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : createPaneModel
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_AttributePaneModel* DFBrowserPane_TDataStdNamedData::createPaneModel()
|
||||
{
|
||||
DFBrowserPane_AttributePaneModel* aTableModel = new DFBrowserPane_AttributePaneModel();
|
||||
aTableModel->SetColumnCount (2);
|
||||
aTableModel->SetItalicColumns (QList<int>());
|
||||
return aTableModel;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdNamedData::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QTabWidget* aMainWidget = new QTabWidget (theParent);
|
||||
// gray text is visualized by default, better the black one (Qt4)
|
||||
QPalette aPalette = aMainWidget->palette();
|
||||
aPalette.setColor(QPalette::Foreground, Qt::black);
|
||||
aMainWidget->setPalette (aPalette);
|
||||
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
aMainWidget->addTab (myTableView, "Integers");
|
||||
|
||||
myRealValues = new DFBrowserPane_TableView (aMainWidget);
|
||||
myRealValues->SetModel (myRealValuesModel);
|
||||
aMainWidget->addTab (myRealValues, "Reals");
|
||||
|
||||
myStringValues = new DFBrowserPane_TableView (aMainWidget);
|
||||
myStringValues->SetModel (myStringValuesModel);
|
||||
aMainWidget->addTab (myStringValues, "Strings");
|
||||
|
||||
myByteValues = new DFBrowserPane_TableView (aMainWidget);
|
||||
myByteValues->SetModel (myByteValuesModel);
|
||||
aMainWidget->addTab (myByteValues, "Bytes");
|
||||
|
||||
myIntArrayValues = new DFBrowserPane_TableView (aMainWidget);
|
||||
myIntArrayValues->SetModel (myIntArrayValuesModel);
|
||||
aMainWidget->addTab (myIntArrayValues, "ArraysOfIntegers");
|
||||
|
||||
myRealArrayValues = new DFBrowserPane_TableView (aMainWidget);
|
||||
myRealArrayValues->SetModel (myRealArrayModel);
|
||||
aMainWidget->addTab (myRealArrayValues, "ArraysOfReals");
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdNamedData::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
|
||||
getPaneModel()->Init (getPartOfValues (VALUES_INTEGER, VALUES_REAL, aValues));
|
||||
if (myTableView)
|
||||
myTableView->GetTableView()->resizeColumnToContents (0);
|
||||
myRealValuesModel->Init (getPartOfValues (VALUES_REAL, VALUES_STRING, aValues));
|
||||
if (myRealValues)
|
||||
myRealValues->GetTableView()->resizeColumnToContents (0);
|
||||
myStringValuesModel->Init (getPartOfValues (VALUES_STRING, VALUES_BYTE, aValues));
|
||||
if (myStringValues)
|
||||
myStringValues->GetTableView()->resizeColumnToContents (0);
|
||||
myByteValuesModel->Init (getPartOfValues (VALUES_BYTE, VALUES_INT_ARRAY, aValues));
|
||||
if (myByteValues)
|
||||
myByteValues->GetTableView()->resizeColumnToContents (0);
|
||||
myIntArrayValuesModel->Init (getPartOfValues (VALUES_INT_ARRAY, VALUES_REAL_ARRAY, aValues));
|
||||
if (myIntArrayValues)
|
||||
myIntArrayValues->GetTableView()->resizeColumnToContents (0);
|
||||
myRealArrayModel->Init (getPartOfValues (VALUES_REAL_ARRAY, "", aValues));
|
||||
if (myRealArrayValues)
|
||||
myRealArrayValues->GetTableView()->resizeColumnToContents (0);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdNamedData::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_NamedData) anAttribute = Handle(TDataStd_NamedData)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append (VALUES_INTEGER);
|
||||
for (TColStd_DataMapIteratorOfDataMapOfStringInteger anIntIter(anAttribute->GetIntegersContainer());
|
||||
anIntIter.More(); anIntIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anIntIter.Key()));
|
||||
theValues.append (anIntIter.Value());
|
||||
}
|
||||
theValues.append (VALUES_REAL);
|
||||
for (TDataStd_DataMapIteratorOfDataMapOfStringReal aRealIter(anAttribute->GetRealsContainer());
|
||||
aRealIter.More(); aRealIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aRealIter.Key()));
|
||||
theValues.append (aRealIter.Value());
|
||||
}
|
||||
theValues.append (VALUES_STRING);
|
||||
for (TDataStd_DataMapIteratorOfDataMapOfStringString aStrIter(anAttribute->GetStringsContainer());
|
||||
aStrIter.More(); aStrIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aStrIter.Key()));
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aStrIter.Value()));
|
||||
}
|
||||
theValues.append (VALUES_BYTE);
|
||||
for (TDataStd_DataMapIteratorOfDataMapOfStringByte aByteIter(anAttribute->GetBytesContainer());
|
||||
aByteIter.More(); aByteIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aByteIter.Key()));
|
||||
theValues.append (aByteIter.Value());
|
||||
}
|
||||
theValues.append (VALUES_INT_ARRAY);
|
||||
QStringList anArrayValues;
|
||||
for (TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger anIntArrayIter(anAttribute->GetArraysOfIntegersContainer());
|
||||
anIntArrayIter.More(); anIntArrayIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (anIntArrayIter.Key()));
|
||||
anArrayValues.clear();
|
||||
const Handle(TColStd_HArray1OfInteger)& aSubIt = anIntArrayIter.Value();
|
||||
if (!aSubIt.IsNull())
|
||||
{
|
||||
for (Standard_Integer aLowerId = aSubIt->Lower(), i = aLowerId, anUpperId = aSubIt->Upper(); i <= anUpperId; i++)
|
||||
anArrayValues.append (QString::number (aSubIt->Value (i)));
|
||||
}
|
||||
theValues.append (anArrayValues.join (QString (',')));
|
||||
}
|
||||
theValues.append (VALUES_REAL_ARRAY);
|
||||
for (TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal aRealArrayIter (anAttribute->GetArraysOfRealsContainer());
|
||||
aRealArrayIter.More(); aRealArrayIter.Next())
|
||||
{
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aRealArrayIter.Key()));
|
||||
anArrayValues.clear();
|
||||
const Handle(TColStd_HArray1OfReal)& aSubIt = aRealArrayIter.Value();
|
||||
if (!aSubIt.IsNull())
|
||||
{
|
||||
for (Standard_Integer aLowerId = aSubIt->Lower(), i = aLowerId, anUpperId = aSubIt->Upper(); i <= anUpperId; i++)
|
||||
anArrayValues.append (QString::number (aSubIt->Value (i)));
|
||||
}
|
||||
theValues.append (anArrayValues.join (QString (',')));
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : getPartOfValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QList<QVariant> DFBrowserPane_TDataStdNamedData::getPartOfValues (const QString& theKey1, const QString& theKey2,
|
||||
const QList<QVariant>& theValues) const
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
|
||||
bool aFoundKey1 = false, aFoundKey2 = false;
|
||||
for (int aValueId = 0; aValueId < theValues.size() && !aFoundKey2; aValueId++)
|
||||
{
|
||||
QString aValue = theValues[aValueId].toString();
|
||||
if (!aFoundKey1)
|
||||
aFoundKey1 = aValue == theKey1;
|
||||
else
|
||||
{
|
||||
aFoundKey2 = aValue == theKey2;
|
||||
if (!aFoundKey2)
|
||||
aValues.append (aValue);
|
||||
}
|
||||
}
|
||||
return aValues;
|
||||
}
|
@@ -1,88 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdNamedData_H
|
||||
#define DFBrowserPane_TDataStdNamedData_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
class DFBrowserPane_AttributePaneModel;
|
||||
class DFBrowserPane_TableView;
|
||||
|
||||
//! \class DFBrowserPane_TDataStdNamedData
|
||||
//! \brief The class to manipulate of TDataStd_NamedData attribute
|
||||
//! This pane contains six pair of table views, where values of this data container presented
|
||||
//! The first table in pair presents size of a separate data container, the second presents values
|
||||
//! Each control for data container is grouped in a checkable group box to switch off/on using of a container.
|
||||
class DFBrowserPane_TDataStdNamedData : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdNamedData();
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdNamedData() {}
|
||||
|
||||
//! Creates a new widget that contains containers for attribute values
|
||||
//! \param theParent a parent widget
|
||||
//! \return pane widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Gets values of attribute using GetValues(), after fill tables if the pane with the values and Init the view model
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model. The values are separated by an auxiliary key for getPartOfValues
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
//! Obtains sub container of a general values container for given keys to fill tables for this kind
|
||||
//! \param theKey1 a key where values are started
|
||||
//! \param theKey2 a key before that the values are got
|
||||
//! \param theValues a full container of values for the current attribute
|
||||
//! \returns sub container
|
||||
QList<QVariant> getPartOfValues (const QString& theKey1, const QString& theKey2,
|
||||
const QList<QVariant>& theValues) const;
|
||||
|
||||
//! Creates a model with two columns: "Name" to "Value". The orientation is horizontal
|
||||
DFBrowserPane_AttributePaneModel* createPaneModel();
|
||||
|
||||
private:
|
||||
//! myPaneMode and myTableView are used for int values
|
||||
|
||||
DFBrowserPane_AttributePaneModel* myRealValuesModel; //!< real values model
|
||||
DFBrowserPane_TableView* myRealValues; //!< values table view
|
||||
|
||||
DFBrowserPane_AttributePaneModel* myStringValuesModel; //!< string values model
|
||||
DFBrowserPane_TableView* myStringValues; //!< values table view
|
||||
|
||||
DFBrowserPane_AttributePaneModel* myByteValuesModel; //!< byte values model
|
||||
DFBrowserPane_TableView* myByteValues; //!< values table view
|
||||
|
||||
DFBrowserPane_AttributePaneModel* myIntArrayValuesModel; //!< int array values model
|
||||
DFBrowserPane_TableView* myIntArrayValues; //!< values table view
|
||||
|
||||
DFBrowserPane_AttributePaneModel* myRealArrayModel; //!< real array values model
|
||||
DFBrowserPane_TableView* myRealArrayValues; //!< values table view
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdNoteBook.hxx>
|
||||
|
||||
#include <TDataStd_NoteBook.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdNoteBook::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdNoteBook_H
|
||||
#define DFBrowserPane_TDataStdNoteBook_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdNoteBook
|
||||
//! \brief The class to manipulate of TDataStd_NoteBook attribute
|
||||
class DFBrowserPane_TDataStdNoteBook : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdNoteBook() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdNoteBook() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,37 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdReal.hxx>
|
||||
|
||||
#include <TDataStd_Real.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdReal::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_Real) anAttribute = Handle(TDataStd_Real)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append ("Get");
|
||||
theValues.append (anAttribute->Get());
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdReal_H
|
||||
#define DFBrowserPane_TDataStdReal_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdReal
|
||||
//! \brief The class to manipulate of TDataStd_Real attribute
|
||||
class DFBrowserPane_TDataStdReal : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdReal() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdReal() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,81 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdRealArray.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
|
||||
#include <TDataStd_RealArray.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPane_TDataStdRealArray::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
QWidget* aMainWidget = new QWidget (theParent);
|
||||
myTableView = new DFBrowserPane_TableView (aMainWidget);
|
||||
myTableView->SetModel (getPaneModel());
|
||||
|
||||
myArrayTableHelper.CreateWidget (aMainWidget, myTableView);
|
||||
|
||||
return aMainWidget;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdRealArray::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdRealArray::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_RealArray) anAttribute = Handle(TDataStd_RealArray)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append (anAttribute->Lower());
|
||||
theValues.append (anAttribute->Upper());
|
||||
for (int aValueId = anAttribute->Lower(); aValueId <= anAttribute->Upper(); aValueId++)
|
||||
theValues.append (anAttribute->Value(aValueId));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdRealArray::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetValues (theAttribute, aValues);
|
||||
myArrayTableHelper.Init (aValues);
|
||||
return myArrayTableHelper.GetShortAttributeInfo (theAttribute, theValues);
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdRealArray_H
|
||||
#define DFBrowserPane_TDataStdRealArray_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <inspector/DFBrowserPane_HelperArray.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdRealArray
|
||||
//! \brief The class to manipulate of TDataStd_RealArray attribute
|
||||
class DFBrowserPane_TDataStdRealArray : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDataStdRealArray() : DFBrowserPane_AttributePane(), myArrayTableHelper(getPaneModel()) {}
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPane_TDataStdRealArray() {}
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Calls Init of array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
Standard_EXPORT virtual void Init (const Handle(TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns short attribute information using array table helper
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues container of output values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_HelperArray myArrayTableHelper; //!< common interface to fill array pane
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdRealList.hxx>
|
||||
|
||||
#include <TColStd_ListIteratorOfListOfReal.hxx>
|
||||
#include <TDataStd_RealList.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdRealList::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_RealList) anAttribute = Handle(TDataStd_RealList)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
for (TColStd_ListIteratorOfListOfReal aRealListIt(anAttribute->List()); aRealListIt.More(); aRealListIt.Next())
|
||||
{
|
||||
theValues.append ("Value");
|
||||
theValues.append (aRealListIt.Value());
|
||||
}
|
||||
}
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdRealList_H
|
||||
#define DFBrowserPane_TDataStdRealList_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdRealList
|
||||
//! \brief The class to manipulate of TDataStd_RealList attribute
|
||||
class DFBrowserPane_TDataStdRealList : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdRealList() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdRealList() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,32 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdRelation.hxx>
|
||||
|
||||
#include <TDataStd_Relation.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdRelation::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdRelation_H
|
||||
#define DFBrowserPane_TDataStdRelation_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdRelation
|
||||
//! \brief The class to manipulate of TDataStd_Relation attribute
|
||||
class DFBrowserPane_TDataStdRelation : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdRelation() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdRelation() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdTick_H
|
||||
#define DFBrowserPane_TDataStdTick_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdTick
|
||||
//! \brief The class to manipulate of TDataStd_Tick attribute
|
||||
class DFBrowserPane_TDataStdTick : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdTick() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdTick() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -37,7 +37,7 @@ DFBrowserPane_TDataStdTreeNodeModel::DFBrowserPane_TDataStdTreeNodeModel (QObjec
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdTreeNodeModel::InitColumns()
|
||||
{
|
||||
SetHeaderItem (0, TreeModel_HeaderSection ("Name"));
|
||||
setHeaderItem (0, TreeModel_HeaderSection ("Name"));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdUAttribute.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDataStd_UAttribute.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdUAttribute::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDataStd_UAttribute) anAttribute = Handle(TDataStd_UAttribute)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
char aStr[256];
|
||||
theAttribute->ID().ToCString(aStr);
|
||||
TCollection_AsciiString aString(aStr);
|
||||
|
||||
theValues.append ("ID");
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aString));
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdUAttribute_H
|
||||
#define DFBrowserPane_TDataStdUAttribute_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdUAttribute
|
||||
//! \brief The class to manipulate of TDataStd_UAttribute attribute
|
||||
class DFBrowserPane_TDataStdUAttribute : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdUAttribute() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdUAttribute() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDataStdVariable.hxx>
|
||||
|
||||
#include <TDataStd_Variable.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDataStdVariable::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDataStdVariable_H
|
||||
#define DFBrowserPane_TDataStdVariable_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDataStdVariable
|
||||
//! \brief The class to manipulate of TDataStd_Variable attribute
|
||||
class DFBrowserPane_TDataStdVariable : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TDataStdVariable() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDataStdVariable() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,30 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDocStdModified.hxx>
|
||||
|
||||
#include <TDocStd_Modified.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDocStdModified::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDocStdModified_H
|
||||
#define DFBrowserPane_TDocStdModified_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDocStdModified
|
||||
//! \brief The class to manipulate of TDocStd_Modified attribute
|
||||
class DFBrowserPane_TDocStdModified : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDocStdModified() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDocStdModified() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,171 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDocStdOwner.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_TableView.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TDocStd_Document.hxx>
|
||||
#include <TDocStd_Owner.hxx>
|
||||
#include <TDF_Delta.hxx>
|
||||
#include <TDF_ListIteratorOfDeltaList.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QTableView>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_TDocStdOwner::DFBrowserPane_TDocStdOwner()
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDocStdOwner::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDocStd_Owner) anAttribute = Handle(TDocStd_Owner)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
Handle(TDocStd_Document) aDocument = anAttribute->GetDocument();
|
||||
if (aDocument.IsNull())
|
||||
return;
|
||||
|
||||
TCollection_AsciiString aDocumentInfo = Standard_Dump::GetPointerInfo (aDocument).ToCString();
|
||||
TColStd_SequenceOfExtendedString anExtensions;
|
||||
aDocument->Extensions(anExtensions);
|
||||
TCollection_AsciiString aSeparationStr = "---------------------------";
|
||||
theValues << aSeparationStr.ToCString() << aSeparationStr.ToCString()
|
||||
<< STANDARD_TYPE (CDM_Document)->Name() << aDocumentInfo.ToCString()
|
||||
<< aSeparationStr.ToCString() << aSeparationStr.ToCString()
|
||||
<< "StorageFormat" << DFBrowserPane_Tools::ToString (aDocument->StorageFormat())
|
||||
<< "Extensions" << convertToString (anExtensions)
|
||||
<< "FromReferencesNumber" << QString::number (aDocument->FromReferencesNumber())
|
||||
<< "ToReferencesNumber" << QString::number (aDocument->ToReferencesNumber())
|
||||
<< "IsReadOnly" << DFBrowserPane_Tools::BoolToStr (aDocument->IsReadOnly())
|
||||
<< "Modifications" << QString::number (aDocument->Modifications());
|
||||
|
||||
TColStd_SequenceOfExtendedString aComments;
|
||||
aDocument->Extensions(aComments);
|
||||
// if the document application is empty, Application() sents an exception, it is called in LoadResources() of:
|
||||
// FindFileExtension, FindDescription and others, so we need the check for it
|
||||
bool isDocumentOpened = aDocument->IsOpened();
|
||||
|
||||
// CDM_Document methods
|
||||
theValues << "Comments" << convertToString (aComments)
|
||||
// << "Presentation" << DFBrowserPane_Tools::ToString (aDocument->Presentation())
|
||||
<< "IsStored" << DFBrowserPane_Tools::BoolToStr (aDocument->IsStored())
|
||||
<< "StorageVersion" << QString::number (aDocument->StorageVersion())
|
||||
<< "Folder" << (aDocument->IsStored() ? DFBrowserPane_Tools::ToString (aDocument->Folder()) : "")
|
||||
<< "HasRequestedFolder" << DFBrowserPane_Tools::BoolToStr (aDocument->HasRequestedFolder())
|
||||
<< "RequestedFolder" << (aDocument->HasRequestedFolder() ? DFBrowserPane_Tools::ToString (aDocument->RequestedFolder()) : "")
|
||||
<< "RequestedName" << DFBrowserPane_Tools::ToString (aDocument->RequestedName())
|
||||
<< "HasRequestedPreviousVersion" << DFBrowserPane_Tools::BoolToStr (aDocument->HasRequestedPreviousVersion())
|
||||
<< "RequestedPreviousVersion" << (aDocument->HasRequestedPreviousVersion() ?
|
||||
DFBrowserPane_Tools::ToString (aDocument->RequestedPreviousVersion()) : "")
|
||||
<< "RequestedComment" << DFBrowserPane_Tools::ToString (aDocument->RequestedComment())
|
||||
<< "FindFileExtension" << (isDocumentOpened ? DFBrowserPane_Tools::BoolToStr (aDocument->FindFileExtension()) : "")
|
||||
<< "FileExtension" << (isDocumentOpened ? DFBrowserPane_Tools::ToString (aDocument->FileExtension()) : "")
|
||||
<< "FindDescription" << (isDocumentOpened ? DFBrowserPane_Tools::BoolToStr (aDocument->FindDescription()) : "")
|
||||
<< "Description" << (isDocumentOpened ? DFBrowserPane_Tools::ToString (aDocument->Description()) : "")
|
||||
<< "IsModified" << DFBrowserPane_Tools::BoolToStr (aDocument->IsModified())
|
||||
<< "IsOpened" << DFBrowserPane_Tools::BoolToStr (aDocument->IsOpened())
|
||||
<< "CanClose" << DFBrowserPane_Tools::ToName(DB_CDM_CAN_CLOSE_STATUS, aDocument->CanClose()).ToCString()
|
||||
<< "ReferenceCounter" << QString::number (aDocument->ReferenceCounter());
|
||||
|
||||
// TDocStd_Document methods
|
||||
TCollection_AsciiString aDocumentDataInfo = !aDocument->GetData().IsNull()
|
||||
? Standard_Dump::GetPointerInfo (aDocument->GetData()).ToCString() : "";
|
||||
theValues << aSeparationStr.ToCString() << aSeparationStr.ToCString()
|
||||
<< STANDARD_TYPE (TDocStd_Document)->Name() << ""
|
||||
<< aSeparationStr.ToCString() << aSeparationStr.ToCString()
|
||||
<< "IsSaved" << DFBrowserPane_Tools::BoolToStr (aDocument->IsSaved())
|
||||
<< "IsChanged" << DFBrowserPane_Tools::BoolToStr (aDocument->IsChanged())
|
||||
<< "GetSavedTime" << QString::number (aDocument->GetSavedTime())
|
||||
<< "GetName" << (aDocument->IsSaved() ? DFBrowserPane_Tools::ToString (aDocument->GetName()) : "")
|
||||
<< "GetPath" << (aDocument->IsSaved() ? DFBrowserPane_Tools::ToString (aDocument->GetPath()) : "")
|
||||
<< "GetData" << aDocumentDataInfo.ToCString()
|
||||
<< "Main" << DFBrowserPane_Tools::GetEntry (aDocument->Main()).ToCString()
|
||||
<< "IsEmpty" << DFBrowserPane_Tools::BoolToStr (aDocument->IsEmpty())
|
||||
<< "IsValid" << DFBrowserPane_Tools::BoolToStr (aDocument->IsValid())
|
||||
<< "HasOpenCommand" << DFBrowserPane_Tools::BoolToStr (aDocument->HasOpenCommand())
|
||||
<< "GetUndoLimit" << QString::number (aDocument->GetUndoLimit())
|
||||
<< "GetAvailableUndos" << QString::number (aDocument->GetAvailableUndos())
|
||||
<< "GetUndos" << convertToString (aDocument->GetUndos())
|
||||
<< "GetAvailableRedos" << QString::number (aDocument->GetAvailableRedos())
|
||||
<< "GetRedos" << convertToString (aDocument->GetRedos())
|
||||
<< "EmptyLabelsSavingMode" << DFBrowserPane_Tools::BoolToStr (aDocument->EmptyLabelsSavingMode())
|
||||
<< "IsNestedTransactionMode" << DFBrowserPane_Tools::BoolToStr (aDocument->IsNestedTransactionMode())
|
||||
<< "ModificationMode" << DFBrowserPane_Tools::BoolToStr (aDocument->ModificationMode());
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDocStdOwner::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDocStd_Owner) anAttribute = Handle(TDocStd_Owner)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
|
||||
Handle(TDocStd_Document) aDocument = anAttribute->GetDocument();
|
||||
if (aDocument.IsNull())
|
||||
return;
|
||||
|
||||
theValues.append (DFBrowserPane_Tools::ToString (aDocument->StorageFormat()));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : convertToString
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QString DFBrowserPane_TDocStdOwner::convertToString (const TDF_DeltaList& theDeltaList)
|
||||
{
|
||||
QStringList aNames;
|
||||
|
||||
for (TDF_ListIteratorOfDeltaList aDeltaIt (theDeltaList); aDeltaIt.More(); aDeltaIt.Next())
|
||||
{
|
||||
QString aName = DFBrowserPane_Tools::ToString (aDeltaIt.Value()->Name());
|
||||
aNames.append (aName.isEmpty() ? "-" : aName);
|
||||
}
|
||||
return QString ("[%1]").arg (aNames.join (";"));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : convertToString
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QString DFBrowserPane_TDocStdOwner::convertToString (const TColStd_SequenceOfExtendedString& theExtensions)
|
||||
{
|
||||
QStringList aNames;
|
||||
for (Standard_Integer anExtensionId = 1, aNumber = theExtensions.Length(); anExtensionId <= aNumber; anExtensionId++)
|
||||
aNames.append (DFBrowserPane_Tools::ToString (theExtensions(anExtensionId)));
|
||||
|
||||
return QString ("[%1]").arg (aNames.join (";"));
|
||||
}
|
@@ -1,67 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDocStdOwner_H
|
||||
#define DFBrowserPane_TDocStdOwner_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TColStd_SequenceOfExtendedString.hxx>
|
||||
#include <TDF_DeltaList.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDocStdOwner
|
||||
//! \brief The class to manipulate of TDocStd_Owner attribute
|
||||
class DFBrowserPane_TDocStdOwner : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TDocStdOwner();
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDocStdOwner() {}
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
//! Generate string container by the parameter list
|
||||
//! \param a list of TDF delta
|
||||
//! \param string result
|
||||
static QString convertToString (const TDF_DeltaList& theList);
|
||||
|
||||
//! Generate string container by the parameter list
|
||||
//! \param a list of extensions
|
||||
//! \param string result
|
||||
static QString convertToString (const TColStd_SequenceOfExtendedString& theExtensions);
|
||||
|
||||
//! Generate string container by the ext string value
|
||||
//! \param an ext string [short*]
|
||||
//! \param string result
|
||||
static QString convertToString (const Standard_ExtString& theValue) { (void)theValue; return ""; }
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,38 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDocStdXLink.hxx>
|
||||
|
||||
#include <TDocStd_XLink.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDocStdXLink::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TDocStd_XLink) anAttribute = Handle(TDocStd_XLink)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
theValues.append ("LabelEntry");
|
||||
theValues.append (anAttribute->LabelEntry().ToCString());
|
||||
theValues.append ("DocumentEntry");
|
||||
theValues.append (anAttribute->DocumentEntry().ToCString());
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDocStdXLink_H
|
||||
#define DFBrowserPane_TDocStdXLink_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDocStdXLink
|
||||
//! \brief The class to manipulate of TDocStd_XLink attribute
|
||||
class DFBrowserPane_TDocStdXLink : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDocStdXLink() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDocStdXLink() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TDocStdXLinkRoot.hxx>
|
||||
|
||||
#include <TDocStd_XLinkRoot.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TDocStdXLinkRoot::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TDocStdXLinkRoot_H
|
||||
#define DFBrowserPane_TDocStdXLinkRoot_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TDocStdXLinkRoot
|
||||
//! \brief The class to manipulate of TDocStd_XLinkRoot attribute
|
||||
class DFBrowserPane_TDocStdXLinkRoot : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TDocStdXLinkRoot() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TDocStdXLinkRoot() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TFunctionFunction.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TFunction_Function.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TFunctionFunction::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TFunction_Function) anAttribute = Handle(TFunction_Function)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
char aStr[256];
|
||||
anAttribute->GetDriverGUID().ToCString (aStr);
|
||||
TCollection_AsciiString aString(aStr);
|
||||
|
||||
theValues.append ("GetDriverGUID");
|
||||
theValues.append (DFBrowserPane_Tools::ToString(aString));
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TFunctionFunction_H
|
||||
#define DFBrowserPane_TFunctionFunction_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TFunctionFunction
|
||||
//! \brief The class to manipulate of TFunction_Function attribute
|
||||
class DFBrowserPane_TFunctionFunction : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TFunctionFunction() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TFunctionFunction() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TFunctionGraphNode.hxx>
|
||||
|
||||
#include <TFunction_GraphNode.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TFunctionGraphNode::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TFunctionGraphNode_H
|
||||
#define DFBrowserPane_TFunctionGraphNode_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TFunctionGraphNode
|
||||
//! \brief The class to manipulate of TFunction_GraphNode attribute
|
||||
class DFBrowserPane_TFunctionGraphNode : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TFunctionGraphNode() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TFunctionGraphNode() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,31 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TFunctionScope.hxx>
|
||||
|
||||
#include <TFunction_Scope.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TFunctionScope::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TFunctionScope_H
|
||||
#define DFBrowserPane_TFunctionScope_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TFunctionScope
|
||||
//! \brief The class to manipulate of TFunction_Scope attribute
|
||||
class DFBrowserPane_TFunctionScope : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPane_TFunctionScope() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TFunctionScope() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -421,7 +421,11 @@ void DFBrowserPane_TNamingNamedShape::GetReferences (const Handle(TDF_Attribute)
|
||||
}
|
||||
TopoDS_Shape aShape = getSelectedShapes();
|
||||
if (!aShape.IsNull())
|
||||
theRefPresentation = new AIS_Shape (aShape);
|
||||
{
|
||||
Handle(AIS_Shape) aPresentation = new AIS_Shape (aShape);
|
||||
aPresentation->Attributes()->SetAutoTriangulation (Standard_False);
|
||||
theRefPresentation = aPresentation;
|
||||
}
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
@@ -175,8 +175,11 @@ Handle(Standard_Transient) DFBrowserPane_TNamingNaming::GetPresentation (const H
|
||||
}
|
||||
TopoDS_Shape aShape = aComp;
|
||||
if (!aShape.IsNull() && aHasShapes)
|
||||
aPresentation = new AIS_Shape (aShape);
|
||||
|
||||
{
|
||||
Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
|
||||
aPrs->Attributes()->SetAutoTriangulation (Standard_False);
|
||||
aPresentation = aPrs;
|
||||
}
|
||||
return aPresentation;
|
||||
}
|
||||
|
||||
|
@@ -1,97 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TPrsStdAISPresentation.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <TPrsStd_AISPresentation.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <QWidget>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_TPrsStdAISPresentation::DFBrowserPane_TPrsStdAISPresentation()
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : toString
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QString toString (const Quantity_NameOfColor& theNameOfColor)
|
||||
{
|
||||
Quantity_Color aColor(theNameOfColor);
|
||||
return QString ("(%1, %2, %3)").arg (aColor.Red()).arg (aColor.Green()).arg (aColor.Blue());
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TPrsStdAISPresentation::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TPrsStd_AISPresentation) anAttribute = Handle(TPrsStd_AISPresentation)::DownCast (theAttribute);
|
||||
if (anAttribute.IsNull())
|
||||
return;
|
||||
Handle(AIS_InteractiveObject) anIO = anAttribute->GetAIS();
|
||||
|
||||
char aStr[256];
|
||||
anAttribute->GetDriverGUID().ToCString(aStr);
|
||||
TCollection_AsciiString aString(aStr);
|
||||
|
||||
theValues << "GetDriverGUID" << DFBrowserPane_Tools::ToString (aString)
|
||||
<< "GetAIS" << (anIO.IsNull() ? "Null" : anAttribute->DynamicType()->Name())
|
||||
<< "IsDisplayed" << DFBrowserPane_Tools::BoolToStr (anAttribute->IsDisplayed())
|
||||
<< "GetContext()" << ((!anIO.IsNull() && !anIO->GetContext().IsNull()) ?
|
||||
Standard_Dump::GetPointerInfo (anIO->GetContext()).ToCString() : "")
|
||||
<< "HasOwnMaterial" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnMaterial())
|
||||
<< "Material" << (anAttribute->HasOwnMaterial() ?
|
||||
DFBrowserPane_Tools::ToName (DB_MATERIAL_TYPE, anAttribute->Material()) : "").ToCString()
|
||||
<< "Transparency" << TCollection_AsciiString (anAttribute->Transparency()).ToCString()
|
||||
<< "HasOwnColor" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnColor())
|
||||
<< "Color" << (anAttribute->HasOwnColor() ? toString (anAttribute->Color()) : "")
|
||||
<< "HasOwnWidth"<< DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnWidth())
|
||||
<< "Width"<< (anAttribute->HasOwnWidth() ? QString::number (anAttribute->Width()) : "")
|
||||
<< "HasOwnMode"<< DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnMode())
|
||||
<< "Width"<< (anAttribute->HasOwnMode() ? DFBrowserPane_Tools::ToName (
|
||||
DB_DISPLAY_MODE, anAttribute->Mode()) : "").ToCString()
|
||||
<< "HasOwnSelectionMode" << DFBrowserPane_Tools::BoolToStr (anAttribute->HasOwnSelectionMode())
|
||||
<< "SelectionMode" << (anAttribute->HasOwnSelectionMode() ?
|
||||
QString::number (anAttribute->SelectionMode()) : "");
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetPresentation
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Handle(Standard_Transient) DFBrowserPane_TPrsStdAISPresentation::GetPresentation (
|
||||
const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
Handle(Standard_Transient) aPresentation;
|
||||
|
||||
Handle(TPrsStd_AISPresentation) anAttribute = Handle(TPrsStd_AISPresentation)::DownCast (theAttribute);
|
||||
if (!anAttribute.IsNull())
|
||||
aPresentation = anAttribute->GetAIS();
|
||||
|
||||
return aPresentation;
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TPrsStdAISPresentation_H
|
||||
#define DFBrowserPane_TPrsStdAISPresentation_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TPrsStdAISPresentation
|
||||
//! \brief The class to manipulate of TPrsStdAIS_Presentation attribute
|
||||
class DFBrowserPane_TPrsStdAISPresentation : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPane_TPrsStdAISPresentation();
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TPrsStdAISPresentation() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns presentation of the attribute to be visualized in the view
|
||||
//! \param theAttribute a current attribute
|
||||
//! \return handle of presentation if the attribute has, to be visualized
|
||||
Standard_EXPORT virtual Handle(Standard_Transient) GetPresentation
|
||||
(const Handle (TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPane_TPrsStdAISViewer.hxx>
|
||||
#include <inspector/DFBrowserPane_Tools.hxx>
|
||||
|
||||
#include <AIS_InteractiveContext.hxx>
|
||||
#include <TPrsStd_AISViewer.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function :
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPane_TPrsStdAISViewer::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(TPrsStd_AISViewer) aViewerAttribute = Handle(TPrsStd_AISViewer)::DownCast (theAttribute);
|
||||
if (!aViewerAttribute)
|
||||
return;
|
||||
|
||||
Handle(AIS_InteractiveContext) aContext = aViewerAttribute->GetInteractiveContext();
|
||||
TCollection_AsciiString aPointerInfo = !aContext.IsNull()
|
||||
? Standard_Dump::GetPointerInfo (aContext).ToCString() : "";
|
||||
|
||||
theValues << "GetInteractiveContext" << aPointerInfo.ToCString();
|
||||
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPane_TPrsStdAISViewer_H
|
||||
#define DFBrowserPane_TPrsStdAISViewer_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
|
||||
//! \class DFBrowserPane_TPrsStdAISViewer
|
||||
//! \brief The class to manipulate of TPrsStd_AISViewer attribute
|
||||
class DFBrowserPane_TPrsStdAISViewer : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPane_TPrsStdAISViewer() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPane_TPrsStdAISViewer() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
virtual void GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -19,82 +19,18 @@ DFBrowserPane_OcctEnumType.hxx
|
||||
DFBrowserPane_SelectionKind.hxx
|
||||
DFBrowserPane_TableView.cxx
|
||||
DFBrowserPane_TableView.hxx
|
||||
DFBrowserPane_TDataStdAsciiString.cxx
|
||||
DFBrowserPane_TDataStdAsciiString.hxx
|
||||
DFBrowserPane_TDataStdBooleanArray.cxx
|
||||
DFBrowserPane_TDataStdBooleanArray.hxx
|
||||
DFBrowserPane_TDataStdBooleanList.cxx
|
||||
DFBrowserPane_TDataStdBooleanList.hxx
|
||||
DFBrowserPane_TDataStdByteArray.cxx
|
||||
DFBrowserPane_TDataStdByteArray.hxx
|
||||
DFBrowserPane_TDataStdComment.cxx
|
||||
DFBrowserPane_TDataStdComment.hxx
|
||||
DFBrowserPane_TDataStdCurrent.cxx
|
||||
DFBrowserPane_TDataStdCurrent.hxx
|
||||
DFBrowserPane_TDataStdDirectory.cxx
|
||||
DFBrowserPane_TDataStdDirectory.hxx
|
||||
DFBrowserPane_TDataStdExpression.cxx
|
||||
DFBrowserPane_TDataStdExpression.hxx
|
||||
DFBrowserPane_TDataStdExtStringArray.cxx
|
||||
DFBrowserPane_TDataStdExtStringArray.hxx
|
||||
DFBrowserPane_TDataStdExtStringList.cxx
|
||||
DFBrowserPane_TDataStdExtStringList.hxx
|
||||
DFBrowserPane_TDataStdInteger.cxx
|
||||
DFBrowserPane_TDataStdInteger.hxx
|
||||
DFBrowserPane_TDataStdIntegerArray.cxx
|
||||
DFBrowserPane_TDataStdIntegerArray.hxx
|
||||
DFBrowserPane_TDataStdIntegerList.cxx
|
||||
DFBrowserPane_TDataStdIntegerList.hxx
|
||||
DFBrowserPane_TDataStdIntPackedMap.cxx
|
||||
DFBrowserPane_TDataStdIntPackedMap.hxx
|
||||
DFBrowserPane_TDataStdName.cxx
|
||||
DFBrowserPane_TDataStdName.hxx
|
||||
DFBrowserPane_TDataStdNamedData.cxx
|
||||
DFBrowserPane_TDataStdNamedData.hxx
|
||||
DFBrowserPane_TDataStdNoteBook.cxx
|
||||
DFBrowserPane_TDataStdNoteBook.hxx
|
||||
DFBrowserPane_TDataStdReal.cxx
|
||||
DFBrowserPane_TDataStdReal.hxx
|
||||
DFBrowserPane_TDataStdRealArray.cxx
|
||||
DFBrowserPane_TDataStdRealArray.hxx
|
||||
DFBrowserPane_TDataStdRealList.cxx
|
||||
DFBrowserPane_TDataStdRealList.hxx
|
||||
DFBrowserPane_TDataStdReferenceArray.cxx
|
||||
DFBrowserPane_TDataStdReferenceArray.hxx
|
||||
DFBrowserPane_TDataStdReferenceList.cxx
|
||||
DFBrowserPane_TDataStdReferenceList.hxx
|
||||
DFBrowserPane_TDataStdRelation.cxx
|
||||
DFBrowserPane_TDataStdRelation.hxx
|
||||
DFBrowserPane_TDataStdTick.cxx
|
||||
DFBrowserPane_TDataStdTick.hxx
|
||||
DFBrowserPane_TDataStdTreeNode.cxx
|
||||
DFBrowserPane_TDataStdTreeNode.hxx
|
||||
DFBrowserPane_TDataStdTreeNodeItem.cxx
|
||||
DFBrowserPane_TDataStdTreeNodeItem.hxx
|
||||
DFBrowserPane_TDataStdTreeNodeModel.cxx
|
||||
DFBrowserPane_TDataStdTreeNodeModel.hxx
|
||||
DFBrowserPane_TDataStdUAttribute.cxx
|
||||
DFBrowserPane_TDataStdUAttribute.hxx
|
||||
DFBrowserPane_TDataStdVariable.cxx
|
||||
DFBrowserPane_TDataStdVariable.hxx
|
||||
DFBrowserPane_TDFReference.cxx
|
||||
DFBrowserPane_TDFReference.hxx
|
||||
DFBrowserPane_TDFTagSource.cxx
|
||||
DFBrowserPane_TDFTagSource.hxx
|
||||
DFBrowserPane_TDocStdModified.cxx
|
||||
DFBrowserPane_TDocStdModified.hxx
|
||||
DFBrowserPane_TDocStdOwner.cxx
|
||||
DFBrowserPane_TDocStdOwner.hxx
|
||||
DFBrowserPane_TDocStdXLink.cxx
|
||||
DFBrowserPane_TDocStdXLink.hxx
|
||||
DFBrowserPane_TDocStdXLinkRoot.cxx
|
||||
DFBrowserPane_TDocStdXLinkRoot.hxx
|
||||
DFBrowserPane_TFunctionFunction.cxx
|
||||
DFBrowserPane_TFunctionFunction.hxx
|
||||
DFBrowserPane_TFunctionGraphNode.cxx
|
||||
DFBrowserPane_TFunctionGraphNode.hxx
|
||||
DFBrowserPane_TFunctionScope.cxx
|
||||
DFBrowserPane_TFunctionScope.hxx
|
||||
DFBrowserPane_TNamingNamedShape.cxx
|
||||
DFBrowserPane_TNamingNamedShape.hxx
|
||||
DFBrowserPane_TNamingNaming.cxx
|
||||
@@ -102,8 +38,4 @@ DFBrowserPane_TNamingNaming.hxx
|
||||
DFBrowserPane_TNamingUsedShapes.cxx
|
||||
DFBrowserPane_TNamingUsedShapes.hxx
|
||||
DFBrowserPane_Tools.cxx
|
||||
DFBrowserPane_Tools.hxx
|
||||
DFBrowserPane_TPrsStdAISPresentation.cxx
|
||||
DFBrowserPane_TPrsStdAISPresentation.hxx
|
||||
DFBrowserPane_TPrsStdAISViewer.cxx
|
||||
DFBrowserPane_TPrsStdAISViewer.hxx
|
||||
DFBrowserPane_Tools.hxx
|
@@ -1,215 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_ItemRole.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XDEDRAW.hxx>
|
||||
|
||||
#include <TDataStd_TreeNode.hxx>
|
||||
#include <TDF_Reference.hxx>
|
||||
#include <TNaming_NamedShape.hxx>
|
||||
#include <XCAFDoc_Volume.hxx>
|
||||
#include <XCAFDoc_Area.hxx>
|
||||
#include <XCAFDoc_Centroid.hxx>
|
||||
#include <TDataStd_UAttribute.hxx>
|
||||
#include <XCAFDoc_Color.hxx>
|
||||
#include <XCAFDoc_DimTol.hxx>
|
||||
#include <XCAFDoc_Material.hxx>
|
||||
#include <XCAFDoc_GraphNode.hxx>
|
||||
|
||||
#include <set>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QStringList>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
static std::set<Standard_CString> AttributeTypes;
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPaneXDE_AttributeCommonPane::DFBrowserPaneXDE_AttributeCommonPane (DFBrowserPane_AttributePaneAPI* theStandardPane)
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
myStandardPane = dynamic_cast<DFBrowserPane_AttributePane*> (theStandardPane);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : ProcessAttribute
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
bool DFBrowserPaneXDE_AttributeCommonPane::ProcessAttribute (Standard_CString theAttributeType)
|
||||
{
|
||||
if (AttributeTypes.empty())
|
||||
{
|
||||
AttributeTypes.insert (STANDARD_TYPE (TDataStd_TreeNode)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (TDF_Reference)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (TNaming_NamedShape)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Volume)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Area)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Centroid)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (TDataStd_UAttribute)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Color)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_DimTol)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_Material)->Name());
|
||||
AttributeTypes.insert (STANDARD_TYPE (XCAFDoc_GraphNode)->Name());
|
||||
}
|
||||
return AttributeTypes.find (theAttributeType) != AttributeTypes.end();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateWidget
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QWidget* DFBrowserPaneXDE_AttributeCommonPane::CreateWidget (QWidget* theParent)
|
||||
{
|
||||
return myStandardPane ? myStandardPane->CreateWidget (theParent) : 0;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : Init
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::Init (const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
if (myStandardPane)
|
||||
myStandardPane->Init (theAttribute);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetSelectionModels
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
std::list<QItemSelectionModel*> DFBrowserPaneXDE_AttributeCommonPane::GetSelectionModels()
|
||||
{
|
||||
return myStandardPane ? myStandardPane->GetSelectionModels() : std::list<QItemSelectionModel*>();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
if (myStandardPane)
|
||||
myStandardPane->GetValues (theAttribute, theValues);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QVariant DFBrowserPaneXDE_AttributeCommonPane::GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
int theRole, int theColumnId)
|
||||
{
|
||||
QVariant aValue;
|
||||
if (myStandardPane)
|
||||
{
|
||||
if (theRole == DFBrowserPane_ItemRole_ShortInfo)
|
||||
{
|
||||
QList<QVariant> aValues;
|
||||
GetShortAttributeInfo (theAttribute, aValues);
|
||||
QStringList anInfoList;
|
||||
for (QList<QVariant>::const_iterator aValuesIt = aValues.begin(); aValuesIt != aValues.end(); aValuesIt++)
|
||||
anInfoList.append (aValuesIt->toString());
|
||||
aValue = anInfoList.join (", ");
|
||||
}
|
||||
else
|
||||
aValue = myStandardPane->GetAttributeInfo (theAttribute, theRole, theColumnId);
|
||||
}
|
||||
else
|
||||
aValue = DFBrowserPane_AttributePane::GetAttributeInfoByType (theAttribute->DynamicType()->Name(),
|
||||
theRole, theColumnId);
|
||||
return aValue;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::GetShortAttributeInfo (
|
||||
const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
theValues.append (DFBrowserPaneXDE_XDEDRAW::GetAttributeInfo (theAttribute).ToCString());
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetSelectionKind
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
int DFBrowserPaneXDE_AttributeCommonPane::GetSelectionKind (QItemSelectionModel* theModel)
|
||||
{
|
||||
if (myStandardPane)
|
||||
return myStandardPane->GetSelectionKind (theModel);
|
||||
|
||||
return DFBrowserPane_AttributePane::GetSelectionKind (theModel);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetSelectionParameters
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::GetSelectionParameters (QItemSelectionModel* theModel,
|
||||
NCollection_List<Handle(Standard_Transient)>& theParameters,
|
||||
NCollection_List<TCollection_AsciiString>& theItemNames)
|
||||
{
|
||||
if (myStandardPane)
|
||||
myStandardPane->GetSelectionParameters (theModel, theParameters, theItemNames);
|
||||
|
||||
DFBrowserPane_AttributePane::GetSelectionParameters (theModel, theParameters, theItemNames);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetPresentation
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Handle(Standard_Transient) DFBrowserPaneXDE_AttributeCommonPane::GetPresentation (
|
||||
const Handle(TDF_Attribute)& theAttribute)
|
||||
{
|
||||
Handle(Standard_Transient) anIO;
|
||||
if (myStandardPane)
|
||||
anIO = myStandardPane->GetPresentation (theAttribute);
|
||||
return anIO;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetReferences
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::GetReferences (
|
||||
const Handle(TDF_Attribute)& theAttribute,
|
||||
NCollection_List<TDF_Label>& theRefLabels,
|
||||
Handle(Standard_Transient)& theRefPresentation)
|
||||
{
|
||||
Handle(Standard_Transient) anIO;
|
||||
if (myStandardPane)
|
||||
myStandardPane->GetReferences (theAttribute, theRefLabels, theRefPresentation);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetAttributeReferences
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_AttributeCommonPane::GetAttributeReferences (
|
||||
const Handle(TDF_Attribute)& theAttribute,
|
||||
NCollection_List<Handle(TDF_Attribute)>& theRefAttributes,
|
||||
Handle(Standard_Transient)& theRefPresentation)
|
||||
{
|
||||
Handle(Standard_Transient) anIO;
|
||||
if (myStandardPane)
|
||||
myStandardPane->GetAttributeReferences (theAttribute, theRefAttributes, theRefPresentation);
|
||||
}
|
@@ -1,124 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_AttributeCommonPane_H
|
||||
#define DFBrowserPaneXDE_AttributeCommonPane_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QVariant>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class QWidget;
|
||||
class QItemSelectionModel;
|
||||
|
||||
//! \class DFBrowserPaneXDE_AttributeCommonPane
|
||||
//! \brief It covers standard attribute panes. The purpose is to return XDE specific short information for
|
||||
//! several kinds of attributes. The other functionality is the same as for standard panes, it just sends
|
||||
//! it to the panes.
|
||||
class DFBrowserPaneXDE_AttributeCommonPane : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPaneXDE_AttributeCommonPane (DFBrowserPane_AttributePaneAPI* theStandardPane);
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_AttributeCommonPane() {}
|
||||
|
||||
//! Returns true if this type can be processed by this pane. It contains standard attributes that
|
||||
//! have difference in presentation (TDataStd_TreeNode, TDF_Reference, TNaming_NamedShape and TDataStd_UAttribute).
|
||||
//! Also it contains XCAFDoc attributes (should be implemented in this package or pane will be empty)
|
||||
//! \param theAttributeType an attribute type
|
||||
Standard_EXPORT static bool ProcessAttribute (Standard_CString theAttributeType);
|
||||
|
||||
//! Creates table view and call create widget of array table helper
|
||||
//! \param theParent a parent widget
|
||||
//! \return a new widget
|
||||
Standard_EXPORT virtual QWidget* CreateWidget (QWidget* theParent) Standard_OVERRIDE;
|
||||
|
||||
//! Initializes the content of the pane by the parameter attribute
|
||||
//! \param theAttribute an OCAF attribute
|
||||
Standard_EXPORT void Init (const Handle(TDF_Attribute)& theAttribute);
|
||||
|
||||
//! Returns list of selection models. In default implementation it contains a selection model for the table view
|
||||
//! \returns container of models
|
||||
Standard_EXPORT virtual std::list<QItemSelectionModel*> GetSelectionModels() Standard_OVERRIDE;
|
||||
|
||||
//! Returns information for the given attribute
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
|
||||
//! \param theColumnId a tree model column
|
||||
//! \return value, interpreted by tree model depending on the role
|
||||
Standard_EXPORT virtual QVariant GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
int theRole, int theColumnId) Standard_OVERRIDE;
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns selection kind for the model, it may be General selection or Additional selection for example
|
||||
//! \param theModel one of selection models provided by this pane
|
||||
//! \return selection kind
|
||||
Standard_EXPORT virtual int GetSelectionKind (QItemSelectionModel* theModel) Standard_OVERRIDE;
|
||||
|
||||
//! Returns selection parameters, that may be useful for communicate between tools
|
||||
//! \param theModel one of selection models provided by this pane
|
||||
//! \theParameters a container of parameters, might be extended depending on the pane state(e.g. selection)
|
||||
//! \theItemNames names to be selected for each selection parameter
|
||||
Standard_EXPORT virtual void GetSelectionParameters (QItemSelectionModel* theModel,
|
||||
NCollection_List<Handle(Standard_Transient)>& theParameters,
|
||||
NCollection_List<TCollection_AsciiString>& theItemNames) Standard_OVERRIDE;
|
||||
|
||||
//! Returns presentation of the attribute to be visualized in the view
|
||||
//! \param theAttribute a current attribute
|
||||
//! \return handle of presentation if the attribute has, to be visualized
|
||||
Standard_EXPORT virtual Handle(Standard_Transient) GetPresentation
|
||||
(const Handle (TDF_Attribute)& theAttribute) Standard_OVERRIDE;
|
||||
|
||||
//! Returns container of Label references to the attribute
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theRefLabels a container of label references, to be selected in tree view
|
||||
//! \param theRefPresentation handle of presentation for the references, to be visualized
|
||||
Standard_EXPORT virtual void GetReferences (const Handle(TDF_Attribute)& theAttribute,
|
||||
NCollection_List<TDF_Label>& theRefLabels,
|
||||
Handle(Standard_Transient)& theRefPresentation) Standard_OVERRIDE;
|
||||
|
||||
//! Returns container of Attribute references to the attribute
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theRefAttributes a container of attribute references, to be selected in tree view
|
||||
//! \param theRefPresentation handle of presentation for the references, to be visualized
|
||||
Standard_EXPORT virtual void GetAttributeReferences (const Handle(TDF_Attribute)& theAttribute,
|
||||
NCollection_List<Handle(TDF_Attribute)>& theRefAttributes,
|
||||
Handle(Standard_Transient)& theRefPresentation) Standard_OVERRIDE;
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_AttributePane* myStandardPane; //!< pane, that corresponds to the current type of attribute
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,130 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_AttributePaneCreator.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_AttributeCommonPane.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDimTolTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDocumentTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocGeomTolerance.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocGraphNode.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocLayerTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocLocation.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocMaterial.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocMaterialTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocShapeMapTool.hxx>
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocShapeTool.hxx>
|
||||
|
||||
#include <XCAFDoc_Area.hxx>
|
||||
#include <XCAFDoc_Centroid.hxx>
|
||||
#include <XCAFDoc_Color.hxx>
|
||||
#include <XCAFDoc_ColorTool.hxx>
|
||||
#include <XCAFDoc_Datum.hxx>
|
||||
#include <XCAFDoc_Dimension.hxx>
|
||||
#include <XCAFDoc_GeomTolerance.hxx>
|
||||
#include <XCAFDoc_DimTol.hxx>
|
||||
#include <XCAFDoc_DimTolTool.hxx>
|
||||
#include <XCAFDoc_DocumentTool.hxx>
|
||||
#include <XCAFDoc_GraphNode.hxx>
|
||||
#include <XCAFDoc_LayerTool.hxx>
|
||||
#include <XCAFDoc_Location.hxx>
|
||||
#include <XCAFDoc_Material.hxx>
|
||||
#include <XCAFDoc_MaterialTool.hxx>
|
||||
#include <XCAFDoc_ShapeMapTool.hxx>
|
||||
#include <XCAFDoc_ShapeTool.hxx>
|
||||
#include <XCAFDoc_ShapeMapTool.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPaneXDE_AttributePaneCreator::DFBrowserPaneXDE_AttributePaneCreator(
|
||||
DFBrowserPane_AttributePaneCreatorAPI* theStandardPaneCreator)
|
||||
: myStandardPaneCreator (theStandardPaneCreator)
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : CreateAttributePane
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_AttributePaneAPI* DFBrowserPaneXDE_AttributePaneCreator::CreateAttributePane (Standard_CString theAttributeName)
|
||||
{
|
||||
DFBrowserPane_AttributePaneAPI* aPane = 0;
|
||||
if (DFBrowserPaneXDE_AttributeCommonPane::ProcessAttribute (theAttributeName))
|
||||
{
|
||||
DFBrowserPane_AttributePaneAPI* aStandardPane = myStandardPaneCreator->CreateAttributePane (theAttributeName);
|
||||
if (!aStandardPane)
|
||||
aStandardPane = createXDEPane (theAttributeName);
|
||||
aPane = new DFBrowserPaneXDE_AttributeCommonPane (aStandardPane);
|
||||
}
|
||||
else
|
||||
aPane = createXDEPane (theAttributeName);
|
||||
|
||||
return aPane;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : createXDEPane
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPane_AttributePaneAPI* DFBrowserPaneXDE_AttributePaneCreator::createXDEPane (Standard_CString theAttributeName)
|
||||
{
|
||||
DFBrowserPane_AttributePaneAPI* aPane = 0;
|
||||
if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeMapTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocShapeMapTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Area)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocArea();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Centroid)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocCentroid();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Color)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocColor();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ColorTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocColorTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Datum)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocDatum();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Dimension)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocDimension();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DimTol)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocDimTol();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DimTolTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocDimTolTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_DocumentTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocDocumentTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_GeomTolerance)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocGeomTolerance();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_GraphNode)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocGraphNode();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_LayerTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocLayerTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Location)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocLocation();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_Material)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocMaterial();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_MaterialTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocMaterialTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeMapTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocShapeMapTool();
|
||||
else if (theAttributeName == STANDARD_TYPE (XCAFDoc_ShapeTool)->Name())
|
||||
aPane = new DFBrowserPaneXDE_XCAFDocShapeTool();
|
||||
return aPane;
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
|
||||
#define DFBrowserPaneXDE_ATTRIBUTEPANECREATOR_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneCreatorAPI.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Macro.hxx>
|
||||
|
||||
class DFBrowserPane_AttributePaneAPI;
|
||||
|
||||
//! \class DFBrowserPaneXDE_AttributePaneCreator
|
||||
//! \brief This class can creates attribute pane for XDE attribute name.
|
||||
//! It creates the following panes:
|
||||
//! - custom panes for XCAFDoc attributes own panes
|
||||
//! - extended panes (modified short information) for several types of attribute (use AttributeCommonPane)
|
||||
//! - common panes described in DFBrowserPane library
|
||||
class DFBrowserPaneXDE_AttributePaneCreator : public DFBrowserPane_AttributePaneCreatorAPI
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPaneXDE_AttributePaneCreator (DFBrowserPane_AttributePaneCreatorAPI* theStandardPaneCreator);
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_AttributePaneCreator() Standard_OVERRIDE {}
|
||||
|
||||
//! Creates attribute panes for XCAFDoc attributes, extended and common panes from DFBrowserPane library
|
||||
//! \param theAttributeName a type of attribute
|
||||
//! \return an attribute pane if it can be created for this type
|
||||
Standard_EXPORT virtual DFBrowserPane_AttributePaneAPI* CreateAttributePane
|
||||
(Standard_CString theAttributeName) Standard_OVERRIDE;
|
||||
|
||||
protected:
|
||||
|
||||
//! Creates pane for XCAFDoc attribute name
|
||||
//! \param theAttributeName a type of attribute
|
||||
//! \return an attribute pane if it can be created for this type
|
||||
DFBrowserPane_AttributePaneAPI* createXDEPane (Standard_CString theAttributeName);
|
||||
|
||||
private:
|
||||
|
||||
DFBrowserPane_AttributePaneCreatorAPI* myStandardPaneCreator; //! pane creator for panes from DFBrowserPane library
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,69 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_Tools.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneAPI.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TDataStd_Name.hxx>
|
||||
#include <TDF_ChildIterator.hxx>
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <TDocStd_Document.hxx>
|
||||
|
||||
#include <Standard_GUID.hxx>
|
||||
|
||||
#include <XCAFDoc_Area.hxx>
|
||||
#include <XCAFDoc_Centroid.hxx>
|
||||
#include <XCAFDoc_Color.hxx>
|
||||
#include <XCAFDoc_Datum.hxx>
|
||||
#include <XCAFDoc_DocumentTool.hxx>
|
||||
#include <XCAFDoc_GraphNode.hxx>
|
||||
#include <XCAFDoc_Location.hxx>
|
||||
#include <XCAFDoc_Material.hxx>
|
||||
#include <XCAFDoc_Volume.hxx>
|
||||
|
||||
namespace DFBrowserPaneXDE_Tools
|
||||
{
|
||||
|
||||
// =======================================================================
|
||||
// function : IsXDEApplication
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
bool IsXDEApplication (const Handle(TDocStd_Application)& theApplication)
|
||||
{
|
||||
bool isXDEApp = false;
|
||||
|
||||
Handle(TDocStd_Document) aDocument;
|
||||
Standard_Integer aNbDoc = theApplication->NbDocuments();
|
||||
if (aNbDoc == 0)
|
||||
return isXDEApp;
|
||||
|
||||
theApplication->GetDocument (1, aDocument);
|
||||
if (aDocument.IsNull())
|
||||
return isXDEApp;
|
||||
|
||||
for (TDF_ChildIterator aLabelsIt (aDocument->Main().Root()); aLabelsIt.More() && !isXDEApp; aLabelsIt.Next())
|
||||
{
|
||||
const TDF_Label aLabel = aLabelsIt.Value();
|
||||
if (aLabel.IsNull())
|
||||
break;
|
||||
Handle(TDF_Attribute) anAttribute;
|
||||
aLabel.FindAttribute (XCAFDoc_DocumentTool::GetID(), anAttribute);
|
||||
isXDEApp = !anAttribute.IsNull();
|
||||
}
|
||||
return isXDEApp;
|
||||
}
|
||||
}
|
@@ -1,43 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_Tools_H
|
||||
#define DFBrowserPaneXDE_Tools_H
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDocStd_Application.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QMap>
|
||||
#include <QWidget>
|
||||
#include <QString>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
class DFBrowserPane_AttributePaneAPI;
|
||||
|
||||
//! \namespace DFBrowserPaneXDE_Tools
|
||||
//! The namespace that gives auxiliary methods for XCAFDoc elements manipulation
|
||||
namespace DFBrowserPaneXDE_Tools
|
||||
{
|
||||
//! Returns true if the application is XDE: application has document where there is XCAFDoc_DocumentTool attribute in
|
||||
//! a child label of the root
|
||||
//! \param theApplication checked application
|
||||
//! \return boolean value
|
||||
Standard_EXPORT bool IsXDEApplication (const Handle(TDocStd_Application)& theApplication);
|
||||
}
|
||||
|
||||
#endif
|
@@ -1,30 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocArea.hxx>
|
||||
|
||||
#include <XCAFDoc_Area.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocArea::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Area) anAttr = Handle(XCAFDoc_Area)::DownCast (theAttribute);
|
||||
theValues.append ("Get");
|
||||
theValues.append (anAttr->Get());
|
||||
}
|
||||
|
@@ -1,43 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocArea_H
|
||||
#define DFBrowserPaneXDE_XCAFDocArea_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocArea
|
||||
//! \brief The class to manipulate of XCAF_DocArea attribute
|
||||
class DFBrowserPaneXDE_XCAFDocArea : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPaneXDE_XCAFDocArea() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocArea() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,53 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocCentroid.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
|
||||
#include <XCAFDoc_Centroid.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPaneXDE_XCAFDocCentroid::DFBrowserPaneXDE_XCAFDocCentroid()
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocCentroid::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Centroid) anAttr = Handle(XCAFDoc_Centroid)::DownCast (theAttribute);
|
||||
gp_Pnt aPoint = anAttr->Get();
|
||||
theValues << "Get: X" << aPoint.X()
|
||||
<< "Get: Y" << aPoint.Y()
|
||||
<< "Get: Z" << aPoint.Z();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocCentroid::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Centroid) anAttr = Handle(XCAFDoc_Centroid)::DownCast (theAttribute);
|
||||
gp_Pnt aPoint = anAttr->Get();
|
||||
theValues.append (QString ("(%1, %2, %3)").arg (aPoint.X()).arg (aPoint.Y()).arg (aPoint.Z()));
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocCentroid_H
|
||||
#define DFBrowserPaneXDE_XCAFDocCentroid_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocCentroid
|
||||
//! \brief The class to manipulate of XCAFDoc_Centroid attribute
|
||||
class DFBrowserPaneXDE_XCAFDocCentroid : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPaneXDE_XCAFDocCentroid();
|
||||
|
||||
//! Destructor
|
||||
Standard_EXPORT virtual ~DFBrowserPaneXDE_XCAFDocCentroid() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,84 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocColor.hxx>
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
|
||||
#include <XCAFDoc_Color.hxx>
|
||||
|
||||
#include <Quantity_Color.hxx>
|
||||
|
||||
#include <Standard_WarningsDisable.hxx>
|
||||
#include <QColor>
|
||||
#include <Standard_WarningsRestore.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPaneXDE_XCAFDocColor::DFBrowserPaneXDE_XCAFDocColor()
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocColor::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Color) anAttr = Handle(XCAFDoc_Color)::DownCast (theAttribute);
|
||||
const Quantity_Color& aColor = anAttr->GetColor();
|
||||
|
||||
theValues << "GetColor: Red" << aColor.Red();
|
||||
theValues << "GetColor: Green" << aColor.Green();
|
||||
theValues << "GetColor: Blue" << aColor.Blue();
|
||||
|
||||
theValues << "GetColor: Name" << aColor.Name();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocColor::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Color) anAttr = Handle(XCAFDoc_Color)::DownCast (theAttribute);
|
||||
const Quantity_Color& aColor = anAttr->GetColor();
|
||||
theValues.append (QString ("(%1, %2, %3)").arg (aColor.Red()).arg (aColor.Green()).arg (aColor.Blue()));
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
QVariant DFBrowserPaneXDE_XCAFDocColor::GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute, int theRole, int theColumnId)
|
||||
{
|
||||
if (theColumnId != 0)
|
||||
return DFBrowserPane_AttributePane::GetAttributeInfo (theAttribute, theRole, theColumnId);
|
||||
|
||||
switch (theRole)
|
||||
{
|
||||
case Qt::BackgroundRole:
|
||||
{
|
||||
const Quantity_Color& aColor = Handle(XCAFDoc_Color)::DownCast (theAttribute)->GetColor();
|
||||
return QColor ((int)(aColor.Red()*255.), (int)(aColor.Green()*255.), (int)(aColor.Blue()*255.));
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return DFBrowserPane_AttributePane::GetAttributeInfo (theAttribute, theRole, theColumnId);
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocColor_H
|
||||
#define DFBrowserPaneXDE_XCAFDocColor_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocColor
|
||||
//! \brief The class to manipulate of XCAFDoc_Color attribute
|
||||
class DFBrowserPaneXDE_XCAFDocColor : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPaneXDE_XCAFDocColor();
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocColor() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns information for the given attribute
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theRole a role of information, used by tree model (e.g. DisplayRole, icon, background and so on)
|
||||
//! \param theColumnId a tree model column
|
||||
//! \return value, interpreted by tree model depending on the role
|
||||
Standard_EXPORT virtual QVariant GetAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
int theRole, int theColumnId) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,26 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocColorTool.hxx>
|
||||
|
||||
#include <XCAFDoc_Area.hxx>
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocColorTool::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocColorTool_H
|
||||
#define DFBrowserPaneXDE_XCAFDocColorTool_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_
|
||||
//! \brief The class to manipulate of XCAFDoc_ColorTool attribute
|
||||
class DFBrowserPaneXDE_XCAFDocColorTool : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPaneXDE_XCAFDocColorTool() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocColorTool() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,67 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDatum.hxx>
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePaneModel.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <XCAFDoc_Datum.hxx>
|
||||
#include <XCAFDimTolObjects_DatumObject.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : Constructor
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
DFBrowserPaneXDE_XCAFDocDatum::DFBrowserPaneXDE_XCAFDocDatum()
|
||||
: DFBrowserPane_AttributePane()
|
||||
{
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocDatum::GetValues (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Datum) anAttr = Handle(XCAFDoc_Datum)::DownCast (theAttribute);
|
||||
|
||||
Handle(TCollection_HAsciiString) aName = anAttr->GetName();
|
||||
Handle(TCollection_HAsciiString) aDescription = anAttr->GetDescription();
|
||||
Handle(TCollection_HAsciiString) anIdentification = anAttr->GetIdentification();
|
||||
|
||||
theValues << "Name" << (!aName.IsNull() ? aName->ToCString() : QString (""))
|
||||
<< "Description" << (!aDescription.IsNull() ? aDescription->ToCString() : QString (""))
|
||||
<< "Identification" << (!anIdentification.IsNull() ? anIdentification->ToCString() : QString (""));
|
||||
|
||||
Handle(XCAFDimTolObjects_DatumObject) anObject = anAttr->GetObject();
|
||||
Handle(TCollection_HAsciiString) anObjectName;
|
||||
if (!anObject.IsNull())
|
||||
anObjectName = anObject->GetName();
|
||||
theValues << "Object" << (!anObjectName.IsNull() ? anObjectName->ToCString() : "Empty Name");
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : GetShortAttributeInfo
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocDatum::GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute, QList<QVariant>& theValues)
|
||||
{
|
||||
Handle(XCAFDoc_Datum) anAttr = Handle(XCAFDoc_Datum)::DownCast (theAttribute);
|
||||
|
||||
Handle(TCollection_HAsciiString) aName = anAttr->GetName();
|
||||
theValues << (!aName.IsNull() ? aName->ToCString() : QString (""));
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocDatum_H
|
||||
#define DFBrowserPaneXDE_XCAFDocDatum_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocDatum
|
||||
//! \brief The class to manipulate of XCAFDoc_Datum attribute
|
||||
class DFBrowserPaneXDE_XCAFDocDatum : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
Standard_EXPORT DFBrowserPaneXDE_XCAFDocDatum();
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocDatum() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
|
||||
//! Returns brief attribute information. In general case, it returns GetValues() result.
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a result list of values
|
||||
Standard_EXPORT virtual void GetShortAttributeInfo (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,27 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDimTol.hxx>
|
||||
|
||||
#include <XCAFDoc_DimTol.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocDimTol::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
@@ -1,41 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocDimTol_H
|
||||
#define DFBrowserPaneXDE_XCAFDocDimTol_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocDimTol
|
||||
//! \brief The class to manipulate of XCAFDoc_DimTol attribute
|
||||
class DFBrowserPaneXDE_XCAFDocDimTol : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
DFBrowserPaneXDE_XCAFDocDimTol() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocDimTol() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,42 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef DFBrowserPaneXDE_XCAFDocDimTolTool_H
|
||||
#define DFBrowserPaneXDE_XCAFDocDimTolTool_H
|
||||
|
||||
#include <inspector/DFBrowserPane_AttributePane.hxx>
|
||||
#include <Standard.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
|
||||
//! \class DFBrowserPaneXDE_XCAFDocDimTolTool
|
||||
//! \brief The class to manipulate of XCAFDoc_DimTolTool attribute
|
||||
class DFBrowserPaneXDE_XCAFDocDimTolTool : public DFBrowserPane_AttributePane
|
||||
{
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
DFBrowserPaneXDE_XCAFDocDimTolTool() {}
|
||||
|
||||
//! Destructor
|
||||
virtual ~DFBrowserPaneXDE_XCAFDocDimTolTool() {}
|
||||
|
||||
//! Returns values to fill the table view model
|
||||
//! \param theAttribute a current attribute
|
||||
//! \param theValues a container of values
|
||||
Standard_EXPORT virtual void GetValues (const Handle(TDF_Attribute)& theAttribute,
|
||||
QList<QVariant>& theValues) Standard_OVERRIDE;
|
||||
};
|
||||
|
||||
#endif
|
@@ -1,27 +0,0 @@
|
||||
// Created on: 2017-06-16
|
||||
// Created by: Natalia ERMOLAEVA
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <inspector/DFBrowserPaneXDE_XCAFDocDimension.hxx>
|
||||
|
||||
#include <XCAFDoc_Dimension.hxx>
|
||||
|
||||
// =======================================================================
|
||||
// function : GetValues
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void DFBrowserPaneXDE_XCAFDocDimension::GetValues (const Handle(TDF_Attribute)&, QList<QVariant>&)
|
||||
{
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user