From: nds Date: Tue, 26 Nov 2013 13:15:01 +0000 (+0000) Subject: Profile object realization. OCC Viewer embeded into the profile dialog box. X-Git-Tag: issue_132_11_28~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=728fc7c7feee84006b269ae2ed8d5198c8f09e26;p=modules%2Fhydro.git Profile object realization. OCC Viewer embeded into the profile dialog box. --- diff --git a/src/HYDROCurveCreator/OCCViewer_ViewWidget.cxx b/src/HYDROCurveCreator/OCCViewer_ViewWidget.cxx index 791e2f28..fd242ac1 100644 --- a/src/HYDROCurveCreator/OCCViewer_ViewWidget.cxx +++ b/src/HYDROCurveCreator/OCCViewer_ViewWidget.cxx @@ -1,8 +1,6 @@ #include "OCCViewer_ViewWidget.h" -#include - #include #include #include @@ -236,6 +234,10 @@ OCCViewer_ViewWidget::OCCViewer_ViewWidget(QWidget* parent) OCCViewer_ViewWidget::~OCCViewer_ViewWidget() { + delete myViewPort; + + myAISContext.Nullify(); + myV3dViewer.Nullify(); #if OCC_VERSION_LARGE <= 0x06060000 myV3dCollector.Nullify(); #endif diff --git a/src/HYDROCurveCreator/OCCViewer_ViewWidget.h b/src/HYDROCurveCreator/OCCViewer_ViewWidget.h index 494d16e1..1c4efc98 100644 --- a/src/HYDROCurveCreator/OCCViewer_ViewWidget.h +++ b/src/HYDROCurveCreator/OCCViewer_ViewWidget.h @@ -2,6 +2,7 @@ #define OCCVIEWER_VIEWWIDGET_H #include "CurveCreator_Macro.hxx" +#include #include #include diff --git a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx index a1ae6afd..d813fb7a 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx @@ -48,9 +48,8 @@ HYDROGUI_ProfileDlg::HYDROGUI_ProfileDlg( HYDROGUI_Module* theModule, const QStr myEditorWidget = new CurveCreator_Widget( this, NULL ); addWidget( myEditorWidget, 3 ); - //OCCViewer_ViewWindow* aPreview = new OCCViewer_ViewWindow( - OCCViewer_ViewWidget* aViewWidget = new OCCViewer_ViewWidget( this ); - addWidget( aViewWidget, 4 ); + myViewWidget = new OCCViewer_ViewWidget( this ); + addWidget( myViewWidget, 4 ); //myAddElementBox = new QGroupBox( tr( "ADD_ELEMENT" ), this ); //addWidget( myAddElementBox, 2 ); diff --git a/src/HYDROGUI/HYDROGUI_ProfileDlg.h b/src/HYDROGUI/HYDROGUI_ProfileDlg.h index 26659930..dd5f5222 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileDlg.h +++ b/src/HYDROGUI/HYDROGUI_ProfileDlg.h @@ -28,6 +28,7 @@ class QGroupBox; class QLineEdit; class CurveCreator_Widget; +class OCCViewer_ViewWidget; class CurveCreator_ICurve; class OCCViewer_Viewer; @@ -67,6 +68,7 @@ private: QLineEdit* myName; CurveCreator_Widget* myEditorWidget; //QGroupBox* myAddElementBox; + OCCViewer_ViewWidget* myViewWidget; }; #endif