mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-16 04:10:33 +05:00
*** empty log message ***
This commit is contained in:
parent
b6cf20bd37
commit
f70f07e7db
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>217</width>
|
<width>213</width>
|
||||||
<height>120</height>
|
<height>116</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle" >
|
<property name="windowTitle" >
|
||||||
@ -26,11 +26,14 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" >
|
<layout class="QGridLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
<number>11</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item rowspan="4" row="0" column="0" >
|
||||||
|
<widget class="QTreeWidget" name="ListView1" />
|
||||||
|
</item>
|
||||||
<item row="3" column="1" >
|
<item row="3" column="1" >
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
@ -41,14 +44,21 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" >
|
<property name="sizeHint" >
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>16</width>
|
||||||
<height>23</height>
|
<height>120</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item rowspan="4" row="0" column="0" >
|
<item row="2" column="1" >
|
||||||
<widget class="QListView" name="ListView1" />
|
<widget class="QPushButton" name="PushButton1" >
|
||||||
|
<property name="text" >
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QSpinBox" name="SpinBox1" />
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" >
|
<item row="0" column="1" >
|
||||||
<widget class="QLabel" name="TextLabel1" >
|
<widget class="QLabel" name="TextLabel1" >
|
||||||
@ -60,16 +70,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QSpinBox" name="SpinBox1" />
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<widget class="QPushButton" name="PushButton1" >
|
|
||||||
<property name="text" >
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -77,6 +77,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11" />
|
<layoutdefault spacing="6" margin="11" />
|
||||||
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
<pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>ListView1</tabstop>
|
||||||
|
<tabstop>SpinBox1</tabstop>
|
||||||
|
<tabstop>PushButton1</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
@ -74,7 +74,7 @@ GEOMBase_Skeleton::GEOMBase_Skeleton( GeometryGUI* theGeometryGUI, QWidget* pare
|
|||||||
myRBGroup->addButton( myMainFrame->RadioButton1, 0 );
|
myRBGroup->addButton( myMainFrame->RadioButton1, 0 );
|
||||||
myRBGroup->addButton( myMainFrame->RadioButton2, 1 );
|
myRBGroup->addButton( myMainFrame->RadioButton2, 1 );
|
||||||
myRBGroup->addButton( myMainFrame->RadioButton3, 2 );
|
myRBGroup->addButton( myMainFrame->RadioButton3, 2 );
|
||||||
myRBGroup->addButton( myMainFrame->RadioButton4, 4 );
|
myRBGroup->addButton( myMainFrame->RadioButton4, 3 );
|
||||||
|
|
||||||
connect( myRBGroup, SIGNAL( buttonClicked( int ) ), this, SIGNAL( constructorsClicked( int ) ) );
|
connect( myRBGroup, SIGNAL( buttonClicked( int ) ), this, SIGNAL( constructorsClicked( int ) ) );
|
||||||
|
|
||||||
|
@ -1,31 +1,28 @@
|
|||||||
# GEOM GEOMBASE :
|
# GEOM GEOMBASE :
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published by the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
# version 2.1 of the License.
|
# version 2.1 of the License.
|
||||||
#
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
# File : Makefile.am
|
||||||
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
|
# Package : GEOMBase
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# File : Makefile.in
|
|
||||||
# Author : Damien COQUERET (OCC)
|
|
||||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
|
||||||
# Module : GEOM
|
|
||||||
# $Header:
|
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
@ -33,26 +30,26 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
|||||||
lib_LTLIBRARIES = libGEOMBase.la
|
lib_LTLIBRARIES = libGEOMBase.la
|
||||||
|
|
||||||
# header files
|
# header files
|
||||||
salomeinclude_HEADERS = \
|
salomeinclude_HEADERS = \
|
||||||
GEOMBase.h \
|
GEOMBase.h \
|
||||||
GEOMBase_Skeleton.h \
|
GEOMBase_Skeleton.h \
|
||||||
GEOMBase_Helper.h \
|
GEOMBase_Helper.h \
|
||||||
GEOM_Operation.h \
|
GEOM_Operation.h \
|
||||||
GEOM_GEOMBase.hxx
|
GEOM_GEOMBase.hxx
|
||||||
|
|
||||||
dist_libGEOMBase_la_SOURCES = \
|
dist_libGEOMBase_la_SOURCES = \
|
||||||
GEOMBase.cxx \
|
GEOMBase.cxx \
|
||||||
GEOMBase_Skeleton.cxx \
|
GEOMBase_Skeleton.cxx \
|
||||||
GEOMBase_aParameterDlg.cxx \
|
GEOMBase_aParameterDlg.cxx \
|
||||||
GEOMBase_Helper.cxx \
|
GEOMBase_Helper.cxx \
|
||||||
GEOM_Operation.cxx
|
GEOM_Operation.cxx
|
||||||
|
|
||||||
MOC_FILES = \
|
MOC_FILES = \
|
||||||
GEOMBase_Skeleton_moc.cxx \
|
GEOMBase_Skeleton_moc.cxx \
|
||||||
GEOMBase_aParameterDlg_moc.cxx
|
GEOMBase_aParameterDlg_moc.cxx
|
||||||
|
|
||||||
nodist_libGEOMBase_la_SOURCES= \
|
nodist_libGEOMBase_la_SOURCES = \
|
||||||
$(MOC_FILES)
|
$(MOC_FILES)
|
||||||
|
|
||||||
#LIB_CLIENT_IDL = SALOME_Exception.idl \
|
#LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||||
# SALOMEDS.idl \
|
# SALOMEDS.idl \
|
||||||
@ -65,29 +62,29 @@ nodist_libGEOMBase_la_SOURCES= \
|
|||||||
|
|
||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
|
|
||||||
libGEOMBase_la_CPPFLAGS = \
|
libGEOMBase_la_CPPFLAGS = \
|
||||||
$(QT_INCLUDES) \
|
$(QT_INCLUDES) \
|
||||||
$(VTK_INCLUDES) \
|
$(VTK_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(PYTHON_INCLUDES) \
|
$(PYTHON_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
-I$(srcdir)/../OBJECT \
|
-I$(srcdir)/../OBJECT \
|
||||||
-I$(srcdir)/../GEOMClient \
|
-I$(srcdir)/../GEOMClient \
|
||||||
-I$(srcdir)/../GEOMImpl \
|
-I$(srcdir)/../GEOMImpl \
|
||||||
-I$(srcdir)/../GEOMGUI \
|
-I$(srcdir)/../GEOMGUI \
|
||||||
-I$(srcdir)/../DlgRef \
|
-I$(srcdir)/../DlgRef \
|
||||||
-I$(top_builddir)/src/DlgRef \
|
-I$(top_builddir)/src/DlgRef \
|
||||||
-I$(top_builddir)/idl \
|
-I$(top_builddir)/idl \
|
||||||
-I$(top_builddir)/salome_adm/unix
|
-I$(top_builddir)/salome_adm/unix
|
||||||
|
|
||||||
libGEOMBase_la_LDFLAGS = \
|
libGEOMBase_la_LDFLAGS = \
|
||||||
../../idl/libSalomeIDLGEOM.la \
|
../../idl/libSalomeIDLGEOM.la \
|
||||||
../GEOMGUI/libGEOM.la \
|
../GEOMGUI/libGEOM.la \
|
||||||
../DlgRef/libDlgRef.la \
|
../DlgRef/libDlgRef.la \
|
||||||
$(KERNEL_LDFLAGS) -lOpUtil \
|
$(KERNEL_LDFLAGS) -lOpUtil \
|
||||||
$(GUI_LDFLAGS) -lsuit -lOCCViewer -lVTKViewer -lSVTK -lSalomePrs -lSalomeApp -lCAM \
|
$(GUI_LDFLAGS) -lsuit -lOCCViewer -lVTKViewer -lSVTK -lSalomePrs -lSalomeApp -lCAM \
|
||||||
$(CAS_LDPATH) -lTKPrim
|
$(CAS_LDPATH) -lTKPrim
|
||||||
|
@ -1,31 +1,28 @@
|
|||||||
# GEOM GEOMFiltersSelection : filter selector for the viewer
|
# GEOM GEOMFiltersSelection : filter selector for the viewer
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published by the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
# version 2.1 of the License.
|
# version 2.1 of the License.
|
||||||
#
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
# File : Makefile.am
|
||||||
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
|
# Package : GEOMFiltersSelection
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# File : Makefile.in
|
|
||||||
# Author : Patrick GOLDBRONN (CEA)
|
|
||||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
|
||||||
# Module : GEOM
|
|
||||||
# $Header$
|
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
@ -33,43 +30,43 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
|||||||
lib_LTLIBRARIES = libGEOMFiltersSelection.la
|
lib_LTLIBRARIES = libGEOMFiltersSelection.la
|
||||||
|
|
||||||
# header files
|
# header files
|
||||||
salomeinclude_HEADERS = \
|
salomeinclude_HEADERS = \
|
||||||
GEOM_SelectionFilter.h \
|
GEOM_SelectionFilter.h \
|
||||||
GEOM_EdgeFilter.h \
|
GEOM_EdgeFilter.h \
|
||||||
GEOM_FaceFilter.h \
|
GEOM_FaceFilter.h \
|
||||||
GEOM_TypeFilter.h \
|
GEOM_TypeFilter.h \
|
||||||
GEOM_PreviewFilter.h \
|
GEOM_PreviewFilter.h \
|
||||||
GEOM_LogicalFilter.h \
|
GEOM_LogicalFilter.h \
|
||||||
GEOM_OCCFilter.h
|
GEOM_OCCFilter.h
|
||||||
|
|
||||||
# Sources
|
# Sources
|
||||||
dist_libGEOMFiltersSelection_la_SOURCES = \
|
dist_libGEOMFiltersSelection_la_SOURCES = \
|
||||||
GEOM_SelectionFilter.cxx \
|
GEOM_SelectionFilter.cxx \
|
||||||
GEOM_EdgeFilter.cxx \
|
GEOM_EdgeFilter.cxx \
|
||||||
GEOM_FaceFilter.cxx \
|
GEOM_FaceFilter.cxx \
|
||||||
GEOM_TypeFilter.cxx \
|
GEOM_TypeFilter.cxx \
|
||||||
GEOM_PreviewFilter.cxx \
|
GEOM_PreviewFilter.cxx \
|
||||||
GEOM_LogicalFilter.cxx \
|
GEOM_LogicalFilter.cxx \
|
||||||
GEOM_OCCFilter.cxx
|
GEOM_OCCFilter.cxx
|
||||||
|
|
||||||
# LIB_CLIENT_IDL= GEOM_Gen.idl SALOMEDS.idl SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl
|
# LIB_CLIENT_IDL= GEOM_Gen.idl SALOMEDS.idl SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl
|
||||||
|
|
||||||
|
|
||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
libGEOMFiltersSelection_la_CPPFLAGS = \
|
libGEOMFiltersSelection_la_CPPFLAGS = \
|
||||||
$(QT_INCLUDES) \
|
$(QT_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
-I$(srcdir)/../GEOMClient \
|
-I$(srcdir)/../GEOMClient \
|
||||||
-I$(top_builddir)/idl \
|
-I$(top_builddir)/idl \
|
||||||
-I$(top_builddir)/salome_adm/unix
|
-I$(top_builddir)/salome_adm/unix
|
||||||
|
|
||||||
libGEOMFiltersSelection_la_LDFLAGS = \
|
libGEOMFiltersSelection_la_LDFLAGS = \
|
||||||
../../idl/libSalomeIDLGEOM.la \
|
../../idl/libSalomeIDLGEOM.la \
|
||||||
../GEOMClient/libGEOMClient.la \
|
../GEOMClient/libGEOMClient.la \
|
||||||
$(GUI_LDFLAGS) -lsuit -lSalomeApp -lSalomeSession \
|
$(GUI_LDFLAGS) -lsuit -lSalomeApp -lSalomeSession \
|
||||||
$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA -lSalomeContainer -lTOOLSDS
|
$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA -lSalomeContainer -lTOOLSDS
|
||||||
|
@ -1,31 +1,28 @@
|
|||||||
# GEOM GEOMGUI : GUI for Geometry component
|
# GEOM GEOMGUI : GUI for Geometry component
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published by the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
# version 2.1 of the License.
|
# version 2.1 of the License.
|
||||||
#
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
# File : Makefile.am
|
||||||
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
|
# Package : GEOMGUI
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# File : Makefile.in
|
|
||||||
# Author : Marc Tajchman (CEA)
|
|
||||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
|
||||||
# Module : GEOM
|
|
||||||
# $Header$
|
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
@ -33,35 +30,35 @@ include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
|||||||
lib_LTLIBRARIES = libGEOM.la
|
lib_LTLIBRARIES = libGEOM.la
|
||||||
|
|
||||||
# header files
|
# header files
|
||||||
salomeinclude_HEADERS = \
|
salomeinclude_HEADERS = \
|
||||||
GeometryGUI.h \
|
GeometryGUI.h \
|
||||||
GEOMGUI.h \
|
GEOMGUI.h \
|
||||||
GEOM_Displayer.h \
|
GEOM_Displayer.h \
|
||||||
GEOMGUI_OCCSelector.h \
|
GEOMGUI_OCCSelector.h \
|
||||||
GEOMGUI_Selection.h \
|
GEOMGUI_Selection.h \
|
||||||
GeometryGUI_Swig.hxx \
|
GeometryGUI_Swig.hxx \
|
||||||
GeometryGUI_Swig.i \
|
GeometryGUI_Swig.i \
|
||||||
GEOM_GEOMGUI.hxx
|
GEOM_GEOMGUI.hxx
|
||||||
|
|
||||||
dist_libGEOM_la_SOURCES = \
|
dist_libGEOM_la_SOURCES = \
|
||||||
GeometryGUI.cxx \
|
GeometryGUI.cxx \
|
||||||
GEOMGUI.cxx \
|
GEOMGUI.cxx \
|
||||||
GEOM_Displayer.cxx \
|
GEOM_Displayer.cxx \
|
||||||
GEOMGUI_OCCSelector.cxx \
|
GEOMGUI_OCCSelector.cxx \
|
||||||
GEOMGUI_Selection.cxx \
|
GEOMGUI_Selection.cxx \
|
||||||
GeometryGUI_Swig.cxx
|
GeometryGUI_Swig.cxx
|
||||||
|
|
||||||
MOC_FILES = \
|
MOC_FILES = \
|
||||||
GeometryGUI_moc.cxx
|
GeometryGUI_moc.cxx
|
||||||
|
|
||||||
|
|
||||||
nodist_libGEOM_la_SOURCES= \
|
nodist_libGEOM_la_SOURCES = \
|
||||||
$(MOC_FILES)
|
$(MOC_FILES)
|
||||||
|
|
||||||
# resources files
|
# resources files
|
||||||
nodist_salomeres_DATA= \
|
nodist_salomeres_DATA = \
|
||||||
GEOM_images.qm \
|
GEOM_images.qm \
|
||||||
GEOM_msg_en.qm \
|
GEOM_msg_en.qm \
|
||||||
GEOM_msg_fr.qm
|
GEOM_msg_fr.qm
|
||||||
|
|
||||||
#LIB_CLIENT_IDL = SALOME_Exception.idl \
|
#LIB_CLIENT_IDL = SALOME_Exception.idl \
|
||||||
@ -75,28 +72,28 @@ nodist_salomeres_DATA= \
|
|||||||
|
|
||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
|
|
||||||
libGEOM_la_CPPFLAGS = \
|
libGEOM_la_CPPFLAGS = \
|
||||||
$(QT_INCLUDES) \
|
$(QT_INCLUDES) \
|
||||||
$(VTK_INCLUDES) \
|
$(VTK_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(PYTHON_INCLUDES) \
|
$(PYTHON_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
-I$(srcdir)/../OBJECT \
|
-I$(srcdir)/../OBJECT \
|
||||||
-I$(srcdir)/../GEOMFiltersSelection \
|
-I$(srcdir)/../GEOMFiltersSelection \
|
||||||
-I$(srcdir)/../GEOMClient \
|
-I$(srcdir)/../GEOMClient \
|
||||||
-I$(srcdir)/../GEOMImpl \
|
-I$(srcdir)/../GEOMImpl \
|
||||||
-I$(top_builddir)/idl \
|
-I$(top_builddir)/idl \
|
||||||
-I$(top_builddir)/salome_adm/unix
|
-I$(top_builddir)/salome_adm/unix
|
||||||
|
|
||||||
libGEOM_la_LDFLAGS = \
|
libGEOM_la_LDFLAGS = \
|
||||||
../GEOMFiltersSelection/libGEOMFiltersSelection.la \
|
../GEOMFiltersSelection/libGEOMFiltersSelection.la \
|
||||||
../GEOMClient/libGEOMClient.la \
|
../GEOMClient/libGEOMClient.la \
|
||||||
../OBJECT/libGEOMObject.la \
|
../OBJECT/libGEOMObject.la \
|
||||||
$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA \
|
$(KERNEL_LDFLAGS) -lSalomeLifeCycleCORBA \
|
||||||
$(GUI_LDFLAGS) -lOCCViewer -lVTKViewer -lCAM -lSOCC -lSVTK -lEvent
|
$(GUI_LDFLAGS) -lOCCViewer -lVTKViewer -lCAM -lSOCC -lSVTK -lEvent
|
||||||
# -lSalomeApp
|
# -lSalomeApp
|
||||||
# -lToolsGUI
|
# -lToolsGUI
|
||||||
|
@ -1,31 +1,28 @@
|
|||||||
# GEOM OPERATIONGUI :
|
# GEOM OPERATIONGUI :
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
#
|
#
|
||||||
# This library is free software; you can redistribute it and/or
|
# This library is free software; you can redistribute it and/or
|
||||||
# modify it under the terms of the GNU Lesser General Public
|
# modify it under the terms of the GNU Lesser General Public
|
||||||
# License as published by the Free Software Foundation; either
|
# License as published by the Free Software Foundation; either
|
||||||
# version 2.1 of the License.
|
# version 2.1 of the License.
|
||||||
#
|
#
|
||||||
# This library is distributed in the hope that it will be useful,
|
# This library is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
# Lesser General Public License for more details.
|
# Lesser General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public
|
# You should have received a copy of the GNU Lesser General Public
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
# File : Makefile.am
|
||||||
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
|
# Package : OperationGUI
|
||||||
#
|
#
|
||||||
#
|
|
||||||
# File : Makefile.in
|
|
||||||
# Author : Damien COQUERET (OCC)
|
|
||||||
# Modified by : Alexander BORODIN (OCN) - autotools usage
|
|
||||||
# Module : GEOM
|
|
||||||
# $Header:
|
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
|
||||||
@ -35,24 +32,32 @@ salomeinclude_HEADERS =
|
|||||||
# Libraries targets
|
# Libraries targets
|
||||||
lib_LTLIBRARIES = libOperationGUI.la
|
lib_LTLIBRARIES = libOperationGUI.la
|
||||||
|
|
||||||
dist_libOperationGUI_la_SOURCES = \
|
dist_libOperationGUI_la_SOURCES = \
|
||||||
OperationGUI.cxx \
|
OperationGUI.h \
|
||||||
OperationGUI_ArchimedeDlg.cxx \
|
OperationGUI_ArchimedeDlg.h \
|
||||||
OperationGUI_PartitionDlg.cxx \
|
OperationGUI_PartitionDlg.h \
|
||||||
OperationGUI_MaterialDlg.cxx \
|
OperationGUI_MaterialDlg.h \
|
||||||
OperationGUI_FilletDlg.cxx \
|
OperationGUI_FilletDlg.h \
|
||||||
OperationGUI_ChamferDlg.cxx \
|
OperationGUI_ChamferDlg.h \
|
||||||
|
OperationGUI_ClippingDlg.h \
|
||||||
|
\
|
||||||
|
OperationGUI.cxx \
|
||||||
|
OperationGUI_ArchimedeDlg.cxx \
|
||||||
|
OperationGUI_PartitionDlg.cxx \
|
||||||
|
OperationGUI_MaterialDlg.cxx \
|
||||||
|
OperationGUI_FilletDlg.cxx \
|
||||||
|
OperationGUI_ChamferDlg.cxx \
|
||||||
OperationGUI_ClippingDlg.cxx
|
OperationGUI_ClippingDlg.cxx
|
||||||
|
|
||||||
MOC_FILES = \
|
MOC_FILES = \
|
||||||
OperationGUI_ArchimedeDlg_moc.cxx \
|
OperationGUI_ArchimedeDlg_moc.cxx \
|
||||||
OperationGUI_PartitionDlg_moc.cxx \
|
OperationGUI_PartitionDlg_moc.cxx \
|
||||||
OperationGUI_MaterialDlg_moc.cxx \
|
OperationGUI_MaterialDlg_moc.cxx \
|
||||||
OperationGUI_FilletDlg_moc.cxx \
|
OperationGUI_FilletDlg_moc.cxx \
|
||||||
OperationGUI_ChamferDlg_moc.cxx \
|
OperationGUI_ChamferDlg_moc.cxx \
|
||||||
OperationGUI_ClippingDlg_moc.cxx
|
OperationGUI_ClippingDlg_moc.cxx
|
||||||
|
|
||||||
nodist_libOperationGUI_la_SOURCES= \
|
nodist_libOperationGUI_la_SOURCES = \
|
||||||
$(MOC_FILES)
|
$(MOC_FILES)
|
||||||
|
|
||||||
#LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl SALOME_Exception.idl
|
#LIB_CLIENT_IDL = SALOME_GenericObj.idl SALOME_Component.idl SALOME_Exception.idl
|
||||||
@ -61,25 +66,26 @@ nodist_libOperationGUI_la_SOURCES= \
|
|||||||
|
|
||||||
# additionnal information to compil and link file
|
# additionnal information to compil and link file
|
||||||
|
|
||||||
libOperationGUI_la_CPPFLAGS = \
|
libOperationGUI_la_CPPFLAGS = \
|
||||||
$(QT_INCLUDES) \
|
$(QT_INCLUDES) \
|
||||||
$(VTK_INCLUDES) \
|
$(VTK_INCLUDES) \
|
||||||
$(CAS_CPPFLAGS) \
|
$(CAS_CPPFLAGS) \
|
||||||
$(PYTHON_INCLUDES) \
|
$(PYTHON_INCLUDES) \
|
||||||
$(BOOST_CPPFLAGS) \
|
$(BOOST_CPPFLAGS) \
|
||||||
$(KERNEL_CXXFLAGS) \
|
$(KERNEL_CXXFLAGS) \
|
||||||
$(GUI_CXXFLAGS) \
|
$(GUI_CXXFLAGS) \
|
||||||
$(CORBA_CXXFLAGS) \
|
$(CORBA_CXXFLAGS) \
|
||||||
$(CORBA_INCLUDES) \
|
$(CORBA_INCLUDES) \
|
||||||
-I$(srcdir)/../GEOMGUI \
|
-I$(srcdir)/../GEOMGUI \
|
||||||
-I$(srcdir)/../DlgRef \
|
-I$(srcdir)/../DlgRef \
|
||||||
-I$(srcdir)/../GEOMBase \
|
-I$(srcdir)/../GEOMBase \
|
||||||
-I$(srcdir)/../OBJECT \
|
-I$(srcdir)/../OBJECT \
|
||||||
-I$(srcdir)/../GEOMClient \
|
-I$(srcdir)/../GEOMClient \
|
||||||
-I$(srcdir)/../GEOMImpl \
|
-I$(srcdir)/../GEOMImpl \
|
||||||
-I$(top_builddir)/idl \
|
-I$(top_builddir)/src/DlgRef \
|
||||||
|
-I$(top_builddir)/idl \
|
||||||
-I$(top_builddir)/salome_adm/unix
|
-I$(top_builddir)/salome_adm/unix
|
||||||
|
|
||||||
libOperationGUI_la_LDFLAGS = \
|
libOperationGUI_la_LDFLAGS = \
|
||||||
../GEOMBase/libGEOMBase.la \
|
../GEOMBase/libGEOMBase.la \
|
||||||
$(CAS_LDPATH) -lTKFillet
|
$(CAS_LDPATH) -lTKFillet
|
||||||
|
@ -1,36 +1,35 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI.cxx
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI.cxx
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI.h"
|
#include "OperationGUI.h"
|
||||||
|
|
||||||
#include "SUIT_Session.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SUIT_Desktop.h"
|
|
||||||
#include "SalomeApp_Application.h"
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
@ -40,16 +39,14 @@
|
|||||||
#include "OperationGUI_ArchimedeDlg.h" // Method ARCHIMEDE
|
#include "OperationGUI_ArchimedeDlg.h" // Method ARCHIMEDE
|
||||||
#include "OperationGUI_FilletDlg.h" // Method FILLET
|
#include "OperationGUI_FilletDlg.h" // Method FILLET
|
||||||
#include "OperationGUI_ChamferDlg.h" // Method CHAMFER
|
#include "OperationGUI_ChamferDlg.h" // Method CHAMFER
|
||||||
|
#include "OperationGUI_ClippingDlg.h" // Clipping dialog box
|
||||||
#include "OperationGUI_ClippingDlg.h"
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// function : OperationGUI()
|
// function : OperationGUI()
|
||||||
// purpose : Constructor
|
// purpose : Constructor
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
OperationGUI::OperationGUI(GeometryGUI* parent) : GEOMGUI(parent)
|
OperationGUI::OperationGUI( GeometryGUI* parent ) :
|
||||||
|
GEOMGUI( parent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,19 +66,18 @@ OperationGUI::~OperationGUI()
|
|||||||
bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
||||||
{
|
{
|
||||||
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
SalomeApp_Application* app = getGeometryGUI()->getApp();
|
||||||
if (!app) return false;
|
if ( !app ) return false;
|
||||||
|
|
||||||
getGeometryGUI()->EmitSignalDeactivateDialog();
|
getGeometryGUI()->EmitSignalDeactivateDialog();
|
||||||
|
|
||||||
switch (theCommandID)
|
switch ( theCommandID ) {
|
||||||
{
|
case 503: ( new OperationGUI_PartitionDlg( getGeometryGUI(), parent ) )->show(); break;
|
||||||
case 503: (new OperationGUI_PartitionDlg(getGeometryGUI(), parent))->show(); break;
|
case 504: ( new OperationGUI_ArchimedeDlg( getGeometryGUI(), parent ) )->show(); break;
|
||||||
case 504: (new OperationGUI_ArchimedeDlg(getGeometryGUI(), parent))->show(); break;
|
case 505: ( new OperationGUI_FilletDlg ( getGeometryGUI(), parent ) )->show(); break;
|
||||||
case 505: (new OperationGUI_FilletDlg (getGeometryGUI(), parent))->show(); break;
|
case 506: ( new OperationGUI_ChamferDlg ( getGeometryGUI(), parent ) )->show(); break;
|
||||||
case 506: (new OperationGUI_ChamferDlg (getGeometryGUI(), parent))->show(); break;
|
case 507: ( new OperationGUI_ClippingDlg ( getGeometryGUI(), parent ) )->show(); break;
|
||||||
case 507: (new OperationGUI_ClippingDlg (getGeometryGUI(), parent))->show(); break;
|
|
||||||
default:
|
default:
|
||||||
app->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
|
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -93,10 +89,10 @@ bool OperationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
|
|||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
__declspec( dllexport )
|
__declspec( dllexport )
|
||||||
#endif
|
#endif
|
||||||
GEOMGUI* GetLibGUI(GeometryGUI* parent)
|
GEOMGUI* GetLibGUI( GeometryGUI* parent )
|
||||||
{
|
{
|
||||||
return new OperationGUI(parent);
|
return new OperationGUI( parent );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,32 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI.h
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI.h
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef OPERATIONGUI_H
|
#ifndef OPERATIONGUI_H
|
||||||
#define OPERATIONGUI_H
|
#define OPERATIONGUI_H
|
||||||
|
|
||||||
#include "GEOMGUI.h"
|
#include <GEOMGUI.h>
|
||||||
#include "GEOMBase.h"
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI
|
// class : OperationGUI
|
||||||
@ -38,10 +35,10 @@
|
|||||||
class OperationGUI : public GEOMGUI
|
class OperationGUI : public GEOMGUI
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
OperationGUI( GeometryGUI* parent );
|
OperationGUI( GeometryGUI* );
|
||||||
~OperationGUI();
|
~OperationGUI();
|
||||||
|
|
||||||
bool OnGUIEvent(int theCommandID, SUIT_Desktop* parent);
|
bool OnGUIEvent( int, SUIT_Desktop* );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // OPERATIONGUI_H
|
||||||
|
@ -1,40 +1,39 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ArchimedeDlg.cxx
|
||||||
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ArchimedeDlg.cxx
|
|
||||||
// Author : Nicolas REJNERI
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI_ArchimedeDlg.h"
|
#include "OperationGUI_ArchimedeDlg.h"
|
||||||
#include "DlgRef_1Sel3Spin.h"
|
|
||||||
|
|
||||||
#include "SUIT_Desktop.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <GEOMBase.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
|
|
||||||
#include <qlabel.h>
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_ArchimedeDlg()
|
// class : OperationGUI_ArchimedeDlg()
|
||||||
@ -44,33 +43,37 @@
|
|||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
OperationGUI_ArchimedeDlg::OperationGUI_ArchimedeDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, "ArchimedeDlg", false,
|
: GEOMBase_Skeleton( theGeometryGUI, parent, false )
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
QPixmap image0(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_ARCHIMEDE")));
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_ARCHIMEDE" ) ) );
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
|
||||||
setCaption(tr("GEOM_ARCHIMEDE_TITLE"));
|
setWindowTitle( tr( "GEOM_ARCHIMEDE_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_ARCHIMEDE"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_ARCHIMEDE" ) );
|
||||||
RadioButton1->setPixmap(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->close(TRUE);
|
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close(TRUE);
|
mainFrame()->RadioButton2->close();
|
||||||
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPoints = new DlgRef_1Sel3Spin(this, "GroupPoints");
|
GroupPoints = new DlgRef_1Sel3Spin( centralWidget() );
|
||||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_ARGUMENTS"));
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_ARGUMENTS" ) );
|
||||||
GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
|
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_WEIGHT"));
|
GroupPoints->TextLabel2->setText( tr( "GEOM_WEIGHT" ) );
|
||||||
GroupPoints->TextLabel3->setText(tr("GEOM_WATER_DENSITY"));
|
GroupPoints->TextLabel3->setText( tr( "GEOM_WATER_DENSITY" ) );
|
||||||
GroupPoints->TextLabel4->setText(tr("GEOM_MESHING_DEFLECTION"));
|
GroupPoints->TextLabel4->setText( tr( "GEOM_MESHING_DEFLECTION" ) );
|
||||||
GroupPoints->PushButton1->setPixmap(image1);
|
GroupPoints->PushButton1->setIcon( image1 );
|
||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
Layout1->addWidget(GroupPoints, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("archimede.htm");
|
setHelpFileName( "archimede.htm" );
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
Init();
|
Init();
|
||||||
@ -98,31 +101,33 @@ void OperationGUI_ArchimedeDlg::Init()
|
|||||||
|
|
||||||
/* Get setting of myStep value from file configuration */
|
/* Get setting of myStep value from file configuration */
|
||||||
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
|
||||||
double myStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100);
|
double myStep = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100 );
|
||||||
|
|
||||||
double SpecificStep1 = 0.1;
|
double SpecificStep1 = 0.1;
|
||||||
double SpecificStep2 = 0.01;
|
double SpecificStep2 = 0.01;
|
||||||
/* min, max, myStep and decimals for spin boxes & initial values */
|
/* min, max, myStep and decimals for spin boxes & initial values */
|
||||||
GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, myStep, 3);
|
initSpinBox( GroupPoints->SpinBox_DX, 0.001, COORD_MAX, myStep, 3 );
|
||||||
GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep1, 3);
|
initSpinBox( GroupPoints->SpinBox_DY, 0.001, COORD_MAX, SpecificStep1, 3 );
|
||||||
GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep2, 3);
|
initSpinBox( GroupPoints->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep2, 3 );
|
||||||
|
|
||||||
GroupPoints->SpinBox_DX->SetValue( 100.0 );
|
GroupPoints->SpinBox_DX->setValue( 100.0 );
|
||||||
GroupPoints->SpinBox_DY->SetValue( 1.0 );
|
GroupPoints->SpinBox_DY->setValue( 1.0 );
|
||||||
GroupPoints->SpinBox_DZ->SetValue( 0.01 );
|
GroupPoints->SpinBox_DZ->setValue( 0.01 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DX, SLOT(SetStep(double)));
|
// VSR: TODO ->>
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DY, SLOT(SetStep(double)));
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DX, SLOT( SetStep( double ) ) );
|
||||||
connect(myGeomGUI, SIGNAL(SignalDefaultStepValueChanged(double)), GroupPoints->SpinBox_DZ, SLOT(SetStep(double)));
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DY, SLOT( SetStep( double ) ) );
|
||||||
|
connect( myGeomGUI, SIGNAL( SignalDefaultStepValueChanged( double ) ), GroupPoints->SpinBox_DZ, SLOT( SetStep( double ) ) );
|
||||||
|
// <<-
|
||||||
|
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
|
connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ),
|
||||||
this, SLOT(SelectionIntoArgument()));
|
this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_ARCHIMEDE" ) );
|
initName( tr( "GEOM_ARCHIMEDE" ) );
|
||||||
|
|
||||||
@ -172,8 +177,7 @@ void OperationGUI_ArchimedeDlg::SelectionIntoArgument()
|
|||||||
Standard_Boolean testResult = Standard_False;
|
Standard_Boolean testResult = Standard_False;
|
||||||
myShape = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult );
|
myShape = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult );
|
||||||
|
|
||||||
if ( !testResult || myShape->_is_nil() || !GEOMBase::IsShape( myShape ) )
|
if ( !testResult || myShape->_is_nil() || !GEOMBase::IsShape( myShape ) ) {
|
||||||
{
|
|
||||||
myShape = GEOM::GEOM_Object::_nil();
|
myShape = GEOM::GEOM_Object::_nil();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -189,13 +193,12 @@ void OperationGUI_ArchimedeDlg::SelectionIntoArgument()
|
|||||||
void OperationGUI_ArchimedeDlg::LineEditReturnPressed()
|
void OperationGUI_ArchimedeDlg::LineEditReturnPressed()
|
||||||
{
|
{
|
||||||
QLineEdit* send = (QLineEdit*)sender();
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
if(send == GroupPoints->LineEdit1)
|
if ( send == GroupPoints->LineEdit1 )
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -206,9 +209,8 @@ void OperationGUI_ArchimedeDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
globalSelection( GEOM_ALLSHAPES );
|
globalSelection( GEOM_ALLSHAPES );
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -216,12 +218,11 @@ void OperationGUI_ArchimedeDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ArchimedeDlg::enterEvent(QEvent* e)
|
void OperationGUI_ArchimedeDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if(GroupConstructors->isEnabled())
|
if ( mainFrame()->GroupConstructors->isEnabled() )
|
||||||
return;
|
return;
|
||||||
this->ActivateThisDialog();
|
this->ActivateThisDialog();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -251,9 +252,9 @@ bool OperationGUI_ArchimedeDlg::execute( ObjectList& objects )
|
|||||||
{
|
{
|
||||||
GEOM::GEOM_Object_var anObj;
|
GEOM::GEOM_Object_var anObj;
|
||||||
|
|
||||||
double aWeight = GroupPoints->SpinBox_DX->GetValue();
|
double aWeight = GroupPoints->SpinBox_DX->value();
|
||||||
double aWaterDensity = GroupPoints->SpinBox_DY->GetValue();
|
double aWaterDensity = GroupPoints->SpinBox_DY->value();
|
||||||
double aMeshDeflection = GroupPoints->SpinBox_DZ->GetValue();
|
double aMeshDeflection = GroupPoints->SpinBox_DZ->value();
|
||||||
|
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
|
getOperation() )->MakeArchimede( myShape, aWeight, aWaterDensity, aMeshDeflection );
|
||||||
|
@ -1,34 +1,32 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ArchimedeDlg.h
|
||||||
|
// Author : Nicolas REJNERI, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ArchimedeDlg.h
|
|
||||||
// Author : Nicolas REJNERI
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_ARCHIMEDE_H
|
#ifndef OPERATIONGUI_ARCHIMEDEDLG_H
|
||||||
#define DIALOGBOX_ARCHIMEDE_H
|
#define OPERATIONGUI_ARCHIMEDEDLG_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
class DlgRef_1Sel3Spin;
|
class DlgRef_1Sel3Spin;
|
||||||
|
|
||||||
@ -38,33 +36,33 @@ class DlgRef_1Sel3Spin;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_ArchimedeDlg : public GEOMBase_Skeleton
|
class OperationGUI_ArchimedeDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_ArchimedeDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
|
OperationGUI_ArchimedeDlg( GeometryGUI* , QWidget* );
|
||||||
~OperationGUI_ArchimedeDlg();
|
~OperationGUI_ArchimedeDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& msg );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GEOM::GEOM_Object_var myShape;
|
GEOM::GEOM_Object_var myShape;
|
||||||
DlgRef_1Sel3Spin* GroupPoints;
|
DlgRef_1Sel3Spin* GroupPoints;
|
||||||
double myStep;
|
double myStep;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_ARCHIMEDE_H
|
#endif // OPERATIONGUI_ARCHIMEDEDLG_H
|
||||||
|
@ -1,47 +1,46 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ChamferDlg.cxx
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ChamferDlg.cxx
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI_ChamferDlg.h"
|
#include "OperationGUI_ChamferDlg.h"
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "SUIT_Desktop.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <GEOMBase.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
#include "OCCViewer_ViewModel.h"
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_ViewWindow.h>
|
||||||
|
#include <SUIT_ViewManager.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
#include <OCCViewer_ViewModel.h>
|
||||||
|
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
|
|
||||||
#include <qlabel.h>
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include "qpixmap.h"
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_ChamferDlg()
|
// class : OperationGUI_ChamferDlg()
|
||||||
@ -50,105 +49,89 @@
|
|||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_ChamferDlg::OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QWidget* parent)
|
OperationGUI_ChamferDlg::OperationGUI_ChamferDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, "ChamferDlg", false,
|
: GEOMBase_Skeleton( theGeometryGUI, parent, false )
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
myConstructorId = -1;
|
QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CHAMFER_ALL" ) ) );
|
||||||
|
QPixmap image2( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CHAMFER_EDGE" ) ) );
|
||||||
|
QPixmap image3( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CHAMFER_FACE" ) ) );
|
||||||
|
QPixmap iconSelect( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
|
||||||
QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_ALL")));
|
setWindowTitle( tr( "GEOM_CHAMFER_TITLE" ) );
|
||||||
QPixmap image2(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_EDGE")));
|
|
||||||
QPixmap image3(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CHAMFER_FACE")));
|
|
||||||
QPixmap iconSelect(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT")));
|
|
||||||
|
|
||||||
setCaption( tr( "GEOM_CHAMFER_TITLE" ) );
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CHAMFER" ) );
|
||||||
|
|
||||||
GroupConstructors->setTitle( tr( "GEOM_CHAMFER" ) );
|
mainFrame()->RadioButton1->setIcon( image1 );
|
||||||
|
mainFrame()->RadioButton2->setIcon( image2 );
|
||||||
RadioButton1->setPixmap( image1 );
|
mainFrame()->RadioButton3->setIcon( image3 );
|
||||||
RadioButton2->setPixmap( image2 );
|
|
||||||
RadioButton3->setPixmap( image3 );
|
|
||||||
|
|
||||||
// Create first group
|
// Create first group
|
||||||
|
|
||||||
myGrp1 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_ALL" ), this );
|
myGrp1 = new QGroupBox( tr( "GEOM_CHAMFER_ALL" ), centralWidget() );
|
||||||
|
|
||||||
QGroupBox* aSelGrp1 = new QGroupBox( 3, Qt::Horizontal, myGrp1 );
|
QGridLayout* aLayout = new QGridLayout( myGrp1 );
|
||||||
aSelGrp1->setFrameStyle( QFrame::NoFrame );
|
aLayout->setMargin( 9 ); aLayout->setSpacing( 6 );
|
||||||
aSelGrp1->setInsideMargin( 0 );
|
|
||||||
|
|
||||||
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp1, MainObj1 );
|
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, myGrp1, aLayout, MainObj1 );
|
||||||
|
|
||||||
QGroupBox* aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp1 );
|
int row = aLayout->rowCount();
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
aLayout->addWidget( new QLabel( tr( "D" ), myGrp1 ), row, 0 );
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
aLayout->addWidget( ( mySpinBox[ SpinBox1 ] = new QDoubleSpinBox( myGrp1 ) ), row++, 2 );
|
||||||
|
aLayout->setRowStretch( row, 10 );
|
||||||
new QLabel( tr( "D" ), aSpinGrp );
|
|
||||||
mySpinBox[ SpinBox1 ] = new DlgRef_SpinBox( aSpinGrp );
|
|
||||||
|
|
||||||
( new QFrame( myGrp1 ) )->setSizePolicy(
|
|
||||||
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
|
||||||
|
|
||||||
// Create second group
|
// Create second group
|
||||||
|
|
||||||
myGrp2 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_EDGES" ), this );
|
myGrp2 = new QGroupBox( tr( "GEOM_CHAMFER_EDGES" ), centralWidget() );
|
||||||
|
|
||||||
QGroupBox* aSelGrp2 = new QGroupBox( 3, Qt::Horizontal, myGrp2 );
|
aLayout = new QGridLayout( myGrp2 );
|
||||||
aSelGrp2->setFrameStyle( QFrame::NoFrame );
|
aLayout->setMargin( 9 ); aLayout->setSpacing( 6 );
|
||||||
aSelGrp2->setInsideMargin( 0 );
|
|
||||||
|
|
||||||
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp2, MainObj2 );
|
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, myGrp2, aLayout, MainObj2 );
|
||||||
createSelWg( tr( "FACE_1" ), iconSelect, aSelGrp2, Face1 );
|
createSelWg( tr( "FACE_1" ), iconSelect, myGrp2, aLayout, Face1 );
|
||||||
createSelWg( tr( "FACE_2" ), iconSelect, aSelGrp2, Face2 );
|
createSelWg( tr( "FACE_2" ), iconSelect, myGrp2, aLayout, Face2 );
|
||||||
|
|
||||||
aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp2 );
|
row = aLayout->rowCount();
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D1" ), aSpinGrp );
|
aLayout->addWidget( new QLabel( tr( "GEOM_D1" ), myGrp2 ), row, 0 );
|
||||||
mySpinBox[ SpinBox21 ] = new DlgRef_SpinBox( aSpinGrp );
|
aLayout->addWidget( ( mySpinBox[ SpinBox21 ] = new QDoubleSpinBox( myGrp2 ) ), row++, 2 );
|
||||||
|
aLayout->addWidget( new QLabel( tr( "GEOM_D2" ), myGrp2 ), row, 0 );
|
||||||
new QLabel( tr( "GEOM_D2" ), aSpinGrp );
|
aLayout->addWidget( ( mySpinBox[ SpinBox22 ] = new QDoubleSpinBox( myGrp2 ) ), row++, 2 );
|
||||||
mySpinBox[ SpinBox22 ] = new DlgRef_SpinBox( aSpinGrp );
|
aLayout->setRowStretch( row, 10 );
|
||||||
|
|
||||||
// Create third group
|
// Create third group
|
||||||
|
|
||||||
myGrp3 = new QGroupBox( 1, Qt::Horizontal, tr( "GEOM_CHAMFER_FACES" ), this );
|
myGrp3 = new QGroupBox( tr( "GEOM_CHAMFER_FACES" ), centralWidget() );
|
||||||
|
|
||||||
QGroupBox* aSelGrp3 = new QGroupBox( 3, Qt::Horizontal, myGrp3 );
|
aLayout = new QGridLayout( myGrp3 );
|
||||||
aSelGrp3->setFrameStyle( QFrame::NoFrame );
|
aLayout->setMargin( 9 ); aLayout->setSpacing( 6 );
|
||||||
aSelGrp3->setInsideMargin( 0 );
|
|
||||||
|
|
||||||
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, aSelGrp3, MainObj3 );
|
createSelWg( tr( "GEOM_MAIN_OBJECT" ), iconSelect, myGrp3, aLayout, MainObj3 );
|
||||||
createSelWg( tr( "SELECTED_FACES" ), iconSelect, aSelGrp3, Faces );
|
createSelWg( tr( "SELECTED_FACES" ), iconSelect, myGrp3, aLayout, Faces );
|
||||||
|
|
||||||
aSpinGrp = new QGroupBox( 1, Qt::Vertical, myGrp3 );
|
row = aLayout->rowCount();
|
||||||
aSpinGrp->setFrameStyle( QFrame::NoFrame );
|
|
||||||
aSpinGrp->setInsideMargin( 0 );
|
|
||||||
|
|
||||||
new QLabel( tr( "GEOM_D1" ), aSpinGrp );
|
aLayout->addWidget( new QLabel( tr( "GEOM_D1" ), myGrp3 ), row, 0 );
|
||||||
mySpinBox[ SpinBox31 ] = new DlgRef_SpinBox( aSpinGrp );
|
aLayout->addWidget( ( mySpinBox[ SpinBox31 ] = new QDoubleSpinBox( myGrp3 ) ), row++, 2 );
|
||||||
|
aLayout->addWidget( new QLabel( tr( "GEOM_D2" ), myGrp3 ), row, 0 );
|
||||||
new QLabel( tr( "GEOM_D2" ), aSpinGrp );
|
aLayout->addWidget( ( mySpinBox[ SpinBox32 ] = new QDoubleSpinBox( myGrp3 ) ), row++, 2 );
|
||||||
mySpinBox[ SpinBox32 ] = new DlgRef_SpinBox( aSpinGrp );
|
aLayout->setRowStretch( row, 10 );
|
||||||
|
|
||||||
( new QLabel( myGrp3 ) )->setSizePolicy(
|
|
||||||
QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
|
|
||||||
|
|
||||||
// Add groups to layout
|
// Add groups to layout
|
||||||
|
|
||||||
Layout1->addWidget( myGrp1, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
Layout1->addWidget( myGrp2, 2, 0 );
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
Layout1->addWidget( myGrp3, 2, 0 );
|
layout->addWidget( myGrp1 );
|
||||||
|
layout->addWidget( myGrp2 );
|
||||||
|
layout->addWidget( myGrp3 );
|
||||||
|
|
||||||
// Set range of spinboxes
|
// Set range of spinboxes
|
||||||
|
|
||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
QMap< int, QDoubleSpinBox* >::iterator anIter;
|
||||||
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
||||||
anIter.data()->RangeStepAndValidator( 0.001, COORD_MAX, SpecificStep, 3 );
|
initSpinBox( anIter.value(), 0.001, COORD_MAX, SpecificStep, 3 );
|
||||||
|
|
||||||
setHelpFileName("chamfer.htm");
|
setHelpFileName( "chamfer.htm" );
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
Init();
|
Init();
|
||||||
@ -172,46 +155,41 @@ void OperationGUI_ChamferDlg::Init()
|
|||||||
{
|
{
|
||||||
myConstructorId = -1;
|
myConstructorId = -1;
|
||||||
reset();
|
reset();
|
||||||
RadioButton1->setChecked( true );
|
|
||||||
myEditCurrentArgument = mySelName[ MainObj1 ];
|
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
|
|
||||||
// main buttons
|
// main buttons
|
||||||
connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
// group box
|
// group box
|
||||||
connect( GroupConstructors, SIGNAL( clicked( int ) ),
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
this, SLOT( ConstructorsClicked( int ) ) );
|
|
||||||
|
|
||||||
// push buttons
|
// push buttons
|
||||||
QMap< int, QPushButton* >::iterator anIterBtn;
|
QMap< int, QPushButton* >::iterator anIterBtn;
|
||||||
for ( anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn )
|
for ( anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn )
|
||||||
connect( anIterBtn.data(), SIGNAL( clicked() ),
|
connect( anIterBtn.value(), SIGNAL( clicked() ),
|
||||||
this, SLOT( SetEditCurrentArgument() ) );
|
this, SLOT( SetEditCurrentArgument() ) );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
QMap< int, QLineEdit* >::iterator anIterLE2;
|
QMap< int, QLineEdit* >::iterator anIterLE2;
|
||||||
for ( anIterLE2 = mySelName.begin(); anIterLE2 != mySelName.end(); ++anIterLE2 )
|
for ( anIterLE2 = mySelName.begin(); anIterLE2 != mySelName.end(); ++anIterLE2 )
|
||||||
connect( anIterLE2.data(), SIGNAL( returnPressed() ),
|
connect( anIterLE2.value(), SIGNAL( returnPressed() ),
|
||||||
this, SLOT( LineEditReturnPressed() ) );
|
this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
// spin boxes
|
// spin boxes
|
||||||
QMap< int, DlgRef_SpinBox* >::iterator anIterSpin;
|
QMap< int, QDoubleSpinBox* >::iterator anIterSpin;
|
||||||
for ( anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin )
|
for ( anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin )
|
||||||
connect( anIterSpin.data(), SIGNAL( valueChanged( double ) ),
|
connect( anIterSpin.value(), SIGNAL( valueChanged( double ) ),
|
||||||
this, SLOT( ValueChangedInSpinBox( double ) ) );
|
this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_CHAMFER" ) );
|
initName( tr( "GEOM_CHAMFER" ) );
|
||||||
|
|
||||||
myGrp2->hide();
|
ConstructorsClicked( 0 );
|
||||||
myGrp3->hide();
|
|
||||||
myGrp1->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -222,59 +200,55 @@ void OperationGUI_ChamferDlg::Init()
|
|||||||
void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
||||||
{
|
{
|
||||||
// Activate next widget
|
// Activate next widget
|
||||||
if (myGeomGUI->getApp()->desktop()->activeWindow()->getViewManager()->getType()
|
if ( myGeomGUI->getApp()->desktop()->activeWindow()->getViewManager()->getType()
|
||||||
!= OCCViewer_Viewer::Type())
|
!= OCCViewer_Viewer::Type() ) {
|
||||||
{
|
mainFrame()->RadioButton1->setChecked( true );
|
||||||
RadioButton1->setChecked( true );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (myConstructorId == constructorId)
|
if ( myConstructorId == constructorId )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Get values from previous widget
|
// Get values from previous widget
|
||||||
double D1 = 5, D2 = 5;
|
double D1 = 5, D2 = 5;
|
||||||
if ( myConstructorId == 0 )
|
if ( myConstructorId == 0 )
|
||||||
D1 = D2 = mySpinBox[ SpinBox1 ]->GetValue();
|
D1 = D2 = mySpinBox[ SpinBox1 ]->value();
|
||||||
else if ( myConstructorId == 1 )
|
else if ( myConstructorId == 1 ) {
|
||||||
{
|
D1 = mySpinBox[ SpinBox21 ]->value();
|
||||||
D1 = mySpinBox[ SpinBox21 ]->GetValue();
|
D2 = mySpinBox[ SpinBox22 ]->value();
|
||||||
D2 = mySpinBox[ SpinBox22 ]->GetValue();
|
|
||||||
}
|
}
|
||||||
else if ( myConstructorId == 2 )
|
else if ( myConstructorId == 2 ) {
|
||||||
{
|
D1 = mySpinBox[ SpinBox31 ]->value();
|
||||||
D1 = mySpinBox[ SpinBox31 ]->GetValue();
|
D2 = mySpinBox[ SpinBox32 ]->value();
|
||||||
D2 = mySpinBox[ SpinBox32 ]->GetValue();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
myConstructorId = constructorId;
|
myConstructorId = constructorId;
|
||||||
|
|
||||||
switch ( constructorId )
|
switch ( constructorId ) {
|
||||||
{
|
case 0:
|
||||||
case 0:
|
myGrp2->hide();
|
||||||
myGrp1->show();
|
myGrp3->hide();
|
||||||
myGrp2->hide();
|
myGrp1->show();
|
||||||
myGrp3->hide();
|
mySpinBox[ SpinBox1 ]->setValue( D1 );
|
||||||
mySpinBox[ SpinBox1 ]->SetValue( D1 );
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
myGrp1->hide();
|
myGrp1->hide();
|
||||||
myGrp2->show();
|
myGrp3->hide();
|
||||||
myGrp3->hide();
|
myGrp2->show();
|
||||||
mySpinBox[ SpinBox21 ]->SetValue( D1 );
|
mySpinBox[ SpinBox21 ]->setValue( D1 );
|
||||||
mySpinBox[ SpinBox22 ]->SetValue( D2 );
|
mySpinBox[ SpinBox22 ]->setValue( D2 );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
myGrp1->hide();
|
myGrp1->hide();
|
||||||
myGrp2->hide();
|
myGrp2->hide();
|
||||||
myGrp3->show();
|
myGrp3->show();
|
||||||
mySpinBox[ SpinBox31 ]->SetValue( D1 );
|
mySpinBox[ SpinBox31 ]->setValue( D1 );
|
||||||
mySpinBox[ SpinBox32 ]->SetValue( D2 );
|
mySpinBox[ SpinBox32 ]->setValue( D2 );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( constructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
if ( constructorId == 0 ) myEditCurrentArgument = mySelName[ MainObj1 ];
|
||||||
else if ( constructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
else if ( constructorId == 1 ) myEditCurrentArgument = mySelName[ MainObj2 ];
|
||||||
else myEditCurrentArgument = mySelName[ MainObj3 ];
|
else myEditCurrentArgument = mySelName[ MainObj3 ];
|
||||||
@ -290,6 +264,10 @@ void OperationGUI_ChamferDlg::ConstructorsClicked( int constructorId )
|
|||||||
else
|
else
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,24 +308,21 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
// Get index of current selection focus
|
// Get index of current selection focus
|
||||||
int aCurrFocus = -1;
|
int aCurrFocus = -1;
|
||||||
QMap< int, QLineEdit* >::iterator anIter;
|
QMap< int, QLineEdit* >::iterator anIter;
|
||||||
for ( anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter )
|
for ( anIter = mySelName.begin(); anIter != mySelName.end(); ++anIter ) {
|
||||||
if ( myEditCurrentArgument == anIter.data() )
|
if ( myEditCurrentArgument == anIter.value() ) {
|
||||||
{
|
|
||||||
aCurrFocus = anIter.key();
|
aCurrFocus = anIter.key();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If selection of main object is activated
|
// If selection of main object is activated
|
||||||
if ( aCurrFocus == MainObj1 || aCurrFocus == MainObj2 || aCurrFocus == MainObj3 )
|
if ( aCurrFocus == MainObj1 || aCurrFocus == MainObj2 || aCurrFocus == MainObj3 ) {
|
||||||
{
|
if ( IObjectCount() == 1 ) {
|
||||||
if ( IObjectCount() == 1 )
|
|
||||||
{
|
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
||||||
|
|
||||||
if ( aResult && !anObj->_is_nil() )
|
if ( aResult && !anObj->_is_nil() ) {
|
||||||
{
|
|
||||||
myShape = anObj;
|
myShape = anObj;
|
||||||
mySelName[ aCurrFocus ]->setText( GEOMBase::GetName( anObj ) );
|
mySelName[ aCurrFocus ]->setText( GEOMBase::GetName( anObj ) );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
@ -360,21 +335,17 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
enableWidgets();
|
enableWidgets();
|
||||||
}
|
}
|
||||||
// If face selection of second tab is activated
|
// If face selection of second tab is activated
|
||||||
else if ( aCurrFocus == Face1 || aCurrFocus == Face2 )
|
else if ( aCurrFocus == Face1 || aCurrFocus == Face2 ) {
|
||||||
{
|
if ( IObjectCount() == 1 ) {
|
||||||
if ( IObjectCount() == 1 )
|
|
||||||
{
|
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
||||||
|
|
||||||
if ( aResult && !anObj->_is_nil() )
|
if ( aResult && !anObj->_is_nil() ) {
|
||||||
{
|
|
||||||
TColStd_IndexedMapOfInteger anIndexes;
|
TColStd_IndexedMapOfInteger anIndexes;
|
||||||
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
||||||
|
|
||||||
if ( anIndexes.Extent() == 1 )
|
if ( anIndexes.Extent() == 1 ) {
|
||||||
{
|
|
||||||
int anIndex = anIndexes( 1 );
|
int anIndex = anIndexes( 1 );
|
||||||
QString aFaceName = QString( GEOMBase::GetName( anObj ) ) + ":%1";
|
QString aFaceName = QString( GEOMBase::GetName( anObj ) ) + ":%1";
|
||||||
myEditCurrentArgument->setText( aFaceName.arg( anIndex ) );
|
myEditCurrentArgument->setText( aFaceName.arg( anIndex ) );
|
||||||
@ -388,36 +359,32 @@ void OperationGUI_ChamferDlg::SelectionIntoArgument()
|
|||||||
myFace[ aCurrFocus ] = -1;
|
myFace[ aCurrFocus ] = -1;
|
||||||
}
|
}
|
||||||
// If face selection of third tab is activated
|
// If face selection of third tab is activated
|
||||||
else if ( aCurrFocus == Faces )
|
else if ( aCurrFocus == Faces ) {
|
||||||
{
|
if ( IObjectCount() == 1 ) {
|
||||||
if ( IObjectCount() == 1 )
|
|
||||||
{
|
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
||||||
|
|
||||||
if ( aResult && !anObj->_is_nil() )
|
if ( aResult && !anObj->_is_nil() ) {
|
||||||
{
|
TColStd_IndexedMapOfInteger anIndexes;
|
||||||
TColStd_IndexedMapOfInteger anIndexes;
|
( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
||||||
((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
|
||||||
|
if ( anIndexes.Extent() > 0 ) {
|
||||||
if ( anIndexes.Extent() > 0 )
|
QString aFaceName;
|
||||||
{
|
if ( anIndexes.Extent() == 1 ) {
|
||||||
QString aFaceName;
|
int anIndex = anIndexes( 1 );
|
||||||
if ( anIndexes.Extent() == 1 )
|
|
||||||
{
|
aFaceName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
||||||
int anIndex = anIndexes( 1 );
|
}
|
||||||
|
else {
|
||||||
aFaceName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
aFaceName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
aFaceName = tr( "GEOM_MEN_POPUP_NAME" ).arg( anIndexes.Extent() );
|
myEditCurrentArgument->setText( aFaceName );
|
||||||
|
myFaces = anIndexes;
|
||||||
myEditCurrentArgument->setText( aFaceName );
|
displayPreview();
|
||||||
myFaces = anIndexes;
|
return;
|
||||||
displayPreview();
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
myFaces.Clear();
|
myFaces.Clear();
|
||||||
@ -435,8 +402,8 @@ void OperationGUI_ChamferDlg::LineEditReturnPressed()
|
|||||||
|
|
||||||
QMap< int, QLineEdit* >::iterator anIterLE;
|
QMap< int, QLineEdit* >::iterator anIterLE;
|
||||||
for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE )
|
for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE )
|
||||||
if ( anIterLE.data() == aSender )
|
if ( anIterLE.value() == aSender )
|
||||||
myEditCurrentArgument = anIterLE.data();
|
myEditCurrentArgument = anIterLE.value();
|
||||||
|
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
@ -451,12 +418,12 @@ void OperationGUI_ChamferDlg::SetEditCurrentArgument()
|
|||||||
QPushButton* aSender = ( QPushButton* )sender();
|
QPushButton* aSender = ( QPushButton* )sender();
|
||||||
|
|
||||||
QMap< int, QPushButton* >::iterator anIter;
|
QMap< int, QPushButton* >::iterator anIter;
|
||||||
for ( anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter )
|
for ( anIter = mySelBtn.begin(); anIter != mySelBtn.end(); ++anIter ) {
|
||||||
if ( anIter.data() == aSender )
|
if ( anIter.value() == aSender ) {
|
||||||
{
|
|
||||||
mySelName[ anIter.key() ]->setFocus();
|
mySelName[ anIter.key() ]->setFocus();
|
||||||
myEditCurrentArgument = mySelName[ anIter.key() ];
|
myEditCurrentArgument = mySelName[ anIter.key() ];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
}
|
}
|
||||||
@ -470,8 +437,8 @@ void OperationGUI_ChamferDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect( ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT( SelectionIntoArgument() ) );
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
displayPreview();
|
displayPreview();
|
||||||
@ -482,9 +449,9 @@ void OperationGUI_ChamferDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ChamferDlg::enterEvent(QEvent* e)
|
void OperationGUI_ChamferDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
this->ActivateThisDialog();
|
this->ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,7 +460,7 @@ void OperationGUI_ChamferDlg::enterEvent(QEvent* e)
|
|||||||
// function : ValueChangedInSpinBox()
|
// function : ValueChangedInSpinBox()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ChamferDlg::ValueChangedInSpinBox( double newValue )
|
void OperationGUI_ChamferDlg::ValueChangedInSpinBox( double )
|
||||||
{
|
{
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -506,13 +473,18 @@ void OperationGUI_ChamferDlg::ValueChangedInSpinBox( double newValue )
|
|||||||
void OperationGUI_ChamferDlg::createSelWg( const QString& theLbl,
|
void OperationGUI_ChamferDlg::createSelWg( const QString& theLbl,
|
||||||
QPixmap& thePix,
|
QPixmap& thePix,
|
||||||
QWidget* theParent,
|
QWidget* theParent,
|
||||||
|
QGridLayout* theLayout,
|
||||||
const int theId )
|
const int theId )
|
||||||
{
|
{
|
||||||
new QLabel( theLbl, theParent );
|
QLabel* lab = new QLabel( theLbl, theParent );
|
||||||
mySelBtn[ theId ] = new QPushButton( theParent );
|
mySelBtn[ theId ] = new QPushButton( theParent );
|
||||||
mySelBtn[ theId ]->setPixmap( thePix );
|
mySelBtn[ theId ]->setIcon( thePix );
|
||||||
mySelName[ theId ] = new QLineEdit( theParent );
|
mySelName[ theId ] = new QLineEdit( theParent );
|
||||||
mySelName[ theId ]->setReadOnly( true );
|
mySelName[ theId ]->setReadOnly( true );
|
||||||
|
int row = theLayout->rowCount();
|
||||||
|
theLayout->addWidget( lab, row, 0 );
|
||||||
|
theLayout->addWidget( mySelBtn[ theId ], row, 1 );
|
||||||
|
theLayout->addWidget( mySelName[ theId ], row, 2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -522,14 +494,14 @@ void OperationGUI_ChamferDlg::createSelWg( const QString& theLbl,
|
|||||||
void OperationGUI_ChamferDlg::reset()
|
void OperationGUI_ChamferDlg::reset()
|
||||||
{
|
{
|
||||||
// Set Initial values of spinboxes
|
// Set Initial values of spinboxes
|
||||||
QMap< int, DlgRef_SpinBox* >::iterator anIter;
|
QMap< int, QDoubleSpinBox* >::iterator anIter;
|
||||||
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
for ( anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter )
|
||||||
anIter.data()->SetValue( 5 );
|
anIter.value()->setValue( 5 );
|
||||||
|
|
||||||
// clear line edits
|
// clear line edits
|
||||||
QMap< int, QLineEdit* >::iterator anIterLE;
|
QMap< int, QLineEdit* >::iterator anIterLE;
|
||||||
for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE )
|
for ( anIterLE = mySelName.begin(); anIterLE != mySelName.end(); ++anIterLE )
|
||||||
anIterLE.data()->setText( "" );
|
anIterLE.value()->setText( "" );
|
||||||
|
|
||||||
// constructor id
|
// constructor id
|
||||||
int aConstructorId = getConstructorId();
|
int aConstructorId = getConstructorId();
|
||||||
@ -551,15 +523,6 @@ void OperationGUI_ChamferDlg::reset()
|
|||||||
enableWidgets();
|
enableWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getConstructorId()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
int OperationGUI_ChamferDlg::getConstructorId() const
|
|
||||||
{
|
|
||||||
return GroupConstructors->id( GroupConstructors->selected() );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : activateSelection
|
// function : activateSelection
|
||||||
// purpose : Activate selection in accordance with myEditCurrentArgument
|
// purpose : Activate selection in accordance with myEditCurrentArgument
|
||||||
@ -653,18 +616,16 @@ bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
|||||||
if ( anId == 0 )
|
if ( anId == 0 )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeChamferAll( myShape,
|
getOperation() )->MakeChamferAll( myShape,
|
||||||
mySpinBox[ SpinBox1 ]->GetValue() );
|
mySpinBox[ SpinBox1 ]->value() );
|
||||||
else if ( anId == 1 )
|
else if ( anId == 1 )
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeChamferEdge( myShape,
|
getOperation() )->MakeChamferEdge( myShape,
|
||||||
mySpinBox[ SpinBox21 ]->GetValue(),
|
mySpinBox[ SpinBox21 ]->value(),
|
||||||
mySpinBox[ SpinBox22 ]->GetValue(),
|
mySpinBox[ SpinBox22 ]->value(),
|
||||||
myFace[ Face1 ],
|
myFace[ Face1 ],
|
||||||
myFace[ Face2 ] );
|
myFace[ Face2 ] );
|
||||||
else if ( anId == 2 )
|
else if ( anId == 2 )
|
||||||
{
|
{
|
||||||
|
|
||||||
int i = 0;
|
|
||||||
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var anArray = new GEOM::ListOfLong;
|
||||||
anArray->length( myFaces.Extent() );
|
anArray->length( myFaces.Extent() );
|
||||||
|
|
||||||
@ -674,8 +635,8 @@ bool OperationGUI_ChamferDlg::execute( ObjectList& objects )
|
|||||||
|
|
||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeChamferFaces( myShape,
|
getOperation() )->MakeChamferFaces( myShape,
|
||||||
mySpinBox[ SpinBox31 ]->GetValue(),
|
mySpinBox[ SpinBox31 ]->value(),
|
||||||
mySpinBox[ SpinBox32 ]->GetValue(),
|
mySpinBox[ SpinBox32 ]->value(),
|
||||||
anArray );
|
anArray );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,37 +1,43 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ChamferDlg.h
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ChamferDlg.h
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_CHAMFER_H
|
#ifndef OPERATIONGUI_CHAMFERDLG_H
|
||||||
#define DIALOGBOX_CHAMFER_H
|
#define OPERATIONGUI_CHAMFERDLG_H
|
||||||
|
|
||||||
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
|
|
||||||
class DlgRef_SpinBox;
|
#include <QMap>
|
||||||
|
|
||||||
|
class QDoubleSpinBox;
|
||||||
|
class QGroupBox;
|
||||||
|
class QPushButton;
|
||||||
|
class QLineEdit;
|
||||||
|
class QDoubleSpinBox;
|
||||||
|
class QGridLayout;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_ChamferDlg
|
// class : OperationGUI_ChamferDlg
|
||||||
@ -39,54 +45,54 @@ class DlgRef_SpinBox;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_ChamferDlg : public GEOMBase_Skeleton
|
class OperationGUI_ChamferDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces };
|
enum { MainObj1, MainObj2, Face1, Face2, MainObj3, Faces };
|
||||||
enum { SpinBox1, SpinBox21, SpinBox22, SpinBox31, SpinBox32 };
|
enum { SpinBox1, SpinBox21, SpinBox22, SpinBox31, SpinBox32 };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_ChamferDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
|
OperationGUI_ChamferDlg( GeometryGUI*, QWidget* );
|
||||||
virtual ~OperationGUI_ChamferDlg();
|
virtual ~OperationGUI_ChamferDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& msg );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ValueChangedInSpinBox( double newValue );
|
void ValueChangedInSpinBox( double );
|
||||||
void ConstructorsClicked( int constructorId );
|
void ConstructorsClicked( int );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent( QEvent* e );
|
void enterEvent( QEvent* );
|
||||||
void reset();
|
void reset();
|
||||||
void createSelWg( const QString&, QPixmap&, QWidget*, const int );
|
void createSelWg( const QString&, QPixmap&, QWidget*,
|
||||||
int getConstructorId() const;
|
QGridLayout*, const int );
|
||||||
void activateSelection();
|
void activateSelection();
|
||||||
void enableWidgets();
|
void enableWidgets();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int myConstructorId;
|
int myConstructorId;
|
||||||
|
|
||||||
GEOM::GEOM_Object_var myShape;
|
GEOM::GEOM_Object_var myShape;
|
||||||
QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
|
QMap< int, int > myFace; // indexes of faces from second tab ( Face1,2 )
|
||||||
TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
|
TColStd_IndexedMapOfInteger myFaces; // indexes of faces from first tab ( Faces )
|
||||||
|
|
||||||
QFrame* myGrp1;
|
QGroupBox* myGrp1;
|
||||||
QFrame* myGrp2;
|
QGroupBox* myGrp2;
|
||||||
QFrame* myGrp3;
|
QGroupBox* myGrp3;
|
||||||
|
|
||||||
QMap< int, QPushButton* > mySelBtn;
|
QMap< int, QPushButton* > mySelBtn;
|
||||||
QMap< int, QLineEdit* > mySelName;
|
QMap< int, QLineEdit* > mySelName;
|
||||||
QMap< int, DlgRef_SpinBox* > mySpinBox;
|
QMap< int, QDoubleSpinBox* > mySpinBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_CHAMFER_H
|
#endif // OPERATIONGUI_CHAMFERDLG_H
|
||||||
|
@ -1,57 +1,48 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ClippingDlg.cxx
|
||||||
|
// Author : Michael Zorin, Open CASCADE S.A.S. (mikhail.zorin@opencascade.com)
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ClippingDlg.cxx
|
|
||||||
// Author : Michael Zorin
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header:
|
|
||||||
|
|
||||||
#include "OperationGUI_ClippingDlg.h"
|
#include "OperationGUI_ClippingDlg.h"
|
||||||
#include "DlgRef_SpinBox.h"
|
|
||||||
|
|
||||||
#include "SUIT_Session.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "SUIT_ViewWindow.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SVTK_ViewWindow.h"
|
#include <GEOMBase.h>
|
||||||
#include "SVTK_ViewModel.h"
|
|
||||||
|
|
||||||
#include "OCCViewer_ViewWindow.h"
|
#include <SUIT_Session.h>
|
||||||
#include "OCCViewer_ViewPort3d.h"
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SUIT_ViewManager.h>
|
||||||
|
#include <SVTK_ViewWindow.h>
|
||||||
|
#include <SVTK_ViewModel.h>
|
||||||
|
#include <OCCViewer_ViewWindow.h>
|
||||||
|
#include <OCCViewer_ViewPort3d.h>
|
||||||
|
#include <VTKViewer.h>
|
||||||
|
|
||||||
#include "utilities.h"
|
// OCC Includes
|
||||||
#include <V3d_View.hxx>
|
#include <V3d_View.hxx>
|
||||||
#include <V3d.hxx>
|
#include <V3d.hxx>
|
||||||
|
|
||||||
//#include <V3d_Plane.hxx>
|
|
||||||
|
|
||||||
// QT Includes
|
|
||||||
#include <qapplication.h>
|
|
||||||
#include <qgroupbox.h>
|
|
||||||
#include <qlabel.h>
|
|
||||||
#include <qpushbutton.h>
|
|
||||||
#include <qcombobox.h>
|
|
||||||
|
|
||||||
// VTK Includes
|
// VTK Includes
|
||||||
#include "VTKViewer.h"
|
|
||||||
#include <vtkCamera.h>
|
#include <vtkCamera.h>
|
||||||
#include <vtkRenderer.h>
|
#include <vtkRenderer.h>
|
||||||
|
|
||||||
@ -59,66 +50,60 @@
|
|||||||
// class : OperationGUI_ClippingDlg()
|
// class : OperationGUI_ClippingDlg()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_ClippingDlg::OperationGUI_ClippingDlg(GeometryGUI* theGeometryGUI, QWidget* parent)
|
OperationGUI_ClippingDlg::OperationGUI_ClippingDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
||||||
: GEOMBase_Skeleton(theGeometryGUI, parent, "OperationGUI_ClippingDlg", false,
|
: GEOMBase_Skeleton( theGeometryGUI, parent, false )
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
setCaption( tr( "Change clipping range" ) );
|
setWindowTitle( tr( "Change clipping range" ) );
|
||||||
|
|
||||||
GroupConstructors->close();
|
mainFrame()->GroupConstructors->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
GroupBoxName->close();
|
mainFrame()->GroupConstructors->close();
|
||||||
|
mainFrame()->GroupBoxName->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
mainFrame()->GroupBoxName->close();
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupArguments = new QGroupBox( this, "GroupArguments" );
|
GroupArguments = new QGroupBox( centralWidget() );
|
||||||
GroupArguments->setColumnLayout(0, Qt::Vertical );
|
QGridLayout* GroupArgumentsLayout = new QGridLayout( GroupArguments );
|
||||||
GroupArguments->layout()->setSpacing( 0 );
|
|
||||||
GroupArguments->layout()->setMargin( 0 );
|
|
||||||
QGridLayout* GroupArgumentsLayout = new QGridLayout( GroupArguments->layout() );
|
|
||||||
GroupArgumentsLayout->setAlignment( Qt::AlignTop );
|
|
||||||
GroupArgumentsLayout->setSpacing( 6 );
|
GroupArgumentsLayout->setSpacing( 6 );
|
||||||
GroupArgumentsLayout->setMargin( 11 );
|
GroupArgumentsLayout->setMargin( 9 );
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
TextLabelNear = new QLabel( GroupArguments, "TextLabelNear" );
|
TextLabelNear = new QLabel( tr( "Near" ), GroupArguments );
|
||||||
TextLabelNear->setText( tr( "Near" ) );
|
|
||||||
TextLabelNear->setFixedWidth(74);
|
|
||||||
GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 );
|
GroupArgumentsLayout->addWidget( TextLabelNear, 0, 0 );
|
||||||
|
|
||||||
SpinBox_Near = new DlgRef_SpinBox( GroupArguments, "SpinBox_Near");
|
SpinBox_Near = new QDoubleSpinBox( GroupArguments );
|
||||||
GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 );
|
GroupArgumentsLayout->addWidget( SpinBox_Near, 0, 1 );
|
||||||
|
|
||||||
TextLabelFar = new QLabel( GroupArguments, "TextLabelFar" );
|
TextLabelFar = new QLabel( tr( "Far" ), GroupArguments );
|
||||||
TextLabelFar->setText( tr( "Far" ) );
|
|
||||||
TextLabelFar->setFixedWidth(74);
|
|
||||||
GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 );
|
GroupArgumentsLayout->addWidget( TextLabelFar, 0, 2 );
|
||||||
|
|
||||||
SpinBox_Far = new DlgRef_SpinBox( GroupArguments, "SpinBox_Far");
|
SpinBox_Far = new QDoubleSpinBox( GroupArguments );
|
||||||
GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 );
|
GroupArgumentsLayout->addWidget( SpinBox_Far, 0, 3 );
|
||||||
|
|
||||||
resetButton = new QPushButton( GroupArguments, "resetButton" );
|
resetButton = new QPushButton( tr( "Reset" ), GroupArguments );
|
||||||
resetButton->setText( tr( "Reset" ) );
|
|
||||||
GroupArgumentsLayout->addWidget( resetButton, 0, 4 );
|
GroupArgumentsLayout->addWidget( resetButton, 0, 4 );
|
||||||
|
|
||||||
TypeCB = new QComboBox( GroupArguments, "TypeCB" );
|
TypeCB = new QComboBox( GroupArguments );
|
||||||
TypeCB->insertItem(tr("OFF"));
|
TypeCB->addItem( tr( "OFF" ) );
|
||||||
TypeCB->insertItem(tr("BACK"));
|
TypeCB->addItem( tr( "BACK" ) );
|
||||||
TypeCB->insertItem(tr("FRONT"));
|
TypeCB->addItem( tr( "FRONT" ) );
|
||||||
TypeCB->insertItem(tr("SLICE"));
|
TypeCB->addItem( tr( "SLICE" ) );
|
||||||
GroupArgumentsLayout->addMultiCellWidget( TypeCB, 1, 1, 0, 4 );
|
GroupArgumentsLayout->addWidget( TypeCB, 1, 0, 1, 5 );
|
||||||
|
|
||||||
Layout1->addWidget( GroupArguments, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupArguments );
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
SpinBox_Near->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 );
|
initSpinBox( SpinBox_Near, COORD_MIN, COORD_MAX, 10.0, 3 );
|
||||||
SpinBox_Far->RangeStepAndValidator( COORD_MIN, COORD_MAX, 10.0, 3 );
|
initSpinBox( SpinBox_Far, COORD_MIN, COORD_MAX, 10.0, 3 );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
connect( resetButton, SIGNAL (clicked() ), this, SLOT( onReset() ) ) ;
|
connect( resetButton, SIGNAL( clicked() ), this, SLOT( onReset() ) ) ;
|
||||||
|
|
||||||
setHelpFileName("none.htm");
|
setHelpFileName( "none.htm" );
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@ -138,77 +123,74 @@ OperationGUI_ClippingDlg::~ OperationGUI_ClippingDlg()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ClippingDlg::Init()
|
void OperationGUI_ClippingDlg::Init()
|
||||||
{
|
{
|
||||||
SUIT_ViewWindow* anActiveWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
SUIT_ViewWindow* anActiveWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||||
if (!anActiveWindow)
|
if ( !anActiveWindow )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
|
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
||||||
{
|
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
||||||
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
if ( !aVTKFrame )
|
||||||
if( !aVTKFrame )
|
return;
|
||||||
return;
|
|
||||||
|
TextLabelNear->setText( tr( "Near" ) );
|
||||||
TextLabelNear->setText( tr( "Near" ) );
|
TextLabelFar->setText( tr( "Far" ) );
|
||||||
TextLabelFar->setText( tr( "Far" ) );
|
|
||||||
|
TypeCB->hide();
|
||||||
TypeCB->hide();
|
|
||||||
|
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
||||||
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
if ( !aRenderer ) return;
|
||||||
if(!aRenderer) return;
|
|
||||||
|
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
||||||
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
if ( anActiveCamera == NULL ) {
|
||||||
if( anActiveCamera == NULL ){
|
|
||||||
MESSAGE("Trying to reset clipping range of non-existant camera");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the plane equation for the camera view plane
|
|
||||||
double vn[3];
|
|
||||||
anActiveCamera->GetViewPlaneNormal(vn);
|
|
||||||
double position[3];
|
|
||||||
anActiveCamera->GetPosition(position);
|
|
||||||
|
|
||||||
vtkFloatingPointType bounds[6];
|
|
||||||
aRenderer->ComputeVisiblePropBounds(bounds);
|
|
||||||
|
|
||||||
double center[3];
|
|
||||||
center[0] = (bounds[0] + bounds[1])/2.0;
|
|
||||||
center[1] = (bounds[2] + bounds[3])/2.0;
|
|
||||||
center[2] = (bounds[4] + bounds[5])/2.0;
|
|
||||||
|
|
||||||
double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
|
|
||||||
(bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
|
|
||||||
(bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
|
|
||||||
|
|
||||||
double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
|
|
||||||
(position[1]-center[1])*(position[1]-center[1]) +
|
|
||||||
(position[2]-center[2])*(position[2]-center[2]));
|
|
||||||
|
|
||||||
vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
|
|
||||||
|
|
||||||
SpinBox_Near->SetValue(range[0]);
|
|
||||||
SpinBox_Far->SetValue(range[1]);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() )
|
|
||||||
{
|
// Find the plane equation for the camera view plane
|
||||||
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
double vn[3];
|
||||||
|
anActiveCamera->GetViewPlaneNormal( vn );
|
||||||
TextLabelNear->setText( tr( "Depth" ) );
|
double position[3];
|
||||||
TextLabelFar->setText( tr( "Thickness" ) );
|
anActiveCamera->GetPosition( position );
|
||||||
|
|
||||||
Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView();
|
vtkFloatingPointType bounds[6];
|
||||||
|
aRenderer->ComputeVisiblePropBounds( bounds );
|
||||||
double depth, thickness;
|
|
||||||
int ztype= view3d->ZClipping(depth, thickness);
|
double center[3];
|
||||||
SpinBox_Near->SetValue(depth);
|
center[0] = ( bounds[0] + bounds[1] ) / 2.0;
|
||||||
SpinBox_Far->SetValue(thickness);
|
center[1] = ( bounds[2] + bounds[3] ) / 2.0;
|
||||||
TypeCB->setCurrentItem(ztype);
|
center[2] = ( bounds[4] + bounds[5] ) / 2.0;
|
||||||
|
|
||||||
//Handle(V3d_Plane) aPlane = new V3d_Plane( aOCCFrame->getViewer()->getViewer3d() ,0, 0, 1, -100);
|
double width = sqrt( ( bounds[1]-bounds[0] ) * ( bounds[1]-bounds[0] ) +
|
||||||
//aPlane->Display(view3d);
|
( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) +
|
||||||
}
|
( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) );
|
||||||
|
|
||||||
|
double distance = sqrt( ( position[0]-center[0] ) * ( position[0]-center[0] ) +
|
||||||
|
( position[1]-center[1] ) * ( position[1]-center[1] ) +
|
||||||
|
( position[2]-center[2] ) * ( position[2]-center[2] ) );
|
||||||
|
|
||||||
|
vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 };
|
||||||
|
|
||||||
|
SpinBox_Near->setValue( range[0] );
|
||||||
|
SpinBox_Far->setValue( range[1] );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||||
|
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
||||||
|
|
||||||
|
TextLabelNear->setText( tr( "Depth" ) );
|
||||||
|
TextLabelFar->setText( tr( "Thickness" ) );
|
||||||
|
|
||||||
|
Handle(V3d_View) view3d = ( (OCCViewer_ViewPort3d*)aOCCFrame->getViewPort() )->getView();
|
||||||
|
|
||||||
|
double depth, thickness;
|
||||||
|
int ztype = view3d->ZClipping( depth, thickness );
|
||||||
|
SpinBox_Near->setValue( depth );
|
||||||
|
SpinBox_Far->setValue( thickness );
|
||||||
|
TypeCB->setCurrentIndex( ztype );
|
||||||
|
|
||||||
|
//Handle(V3d_Plane) aPlane = new V3d_Plane( aOCCFrame->getViewer()->getViewer3d() ,0, 0, 1, -100);
|
||||||
|
//aPlane->Display(view3d);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,46 +200,43 @@ void OperationGUI_ClippingDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool OperationGUI_ClippingDlg::ClickOnApply()
|
bool OperationGUI_ClippingDlg::ClickOnApply()
|
||||||
{
|
{
|
||||||
SUIT_ViewWindow* anActiveWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
SUIT_ViewWindow* anActiveWindow = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||||
if (!anActiveWindow)
|
if ( !anActiveWindow )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
|
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
||||||
{
|
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
||||||
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
if ( !aVTKFrame )
|
||||||
if( !aVTKFrame )
|
return false;
|
||||||
return false;
|
|
||||||
|
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
||||||
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
if ( !aRenderer ) return false;
|
||||||
if(!aRenderer) return false;
|
|
||||||
|
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
||||||
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
if ( anActiveCamera == NULL ) {
|
||||||
if( anActiveCamera == NULL ){
|
return false;
|
||||||
MESSAGE("Trying to reset clipping range of non-existant camera");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
vtkFloatingPointType range[2] = { SpinBox_Near->GetValue(), SpinBox_Far->GetValue() };
|
|
||||||
if (range[0] < 0.0) range[0] = 0.0;
|
|
||||||
anActiveCamera->SetClippingRange( range );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() )
|
|
||||||
{
|
vtkFloatingPointType range[2] = { SpinBox_Near->value(), SpinBox_Far->value() };
|
||||||
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
if ( range[0] < 0.0 ) range[0] = 0.0;
|
||||||
|
anActiveCamera->SetClippingRange( range );
|
||||||
Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView();
|
|
||||||
|
return true;
|
||||||
double depth = SpinBox_Near->GetValue();
|
}
|
||||||
double thickness = SpinBox_Far->GetValue();
|
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||||
int aType = TypeCB->currentItem();
|
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
||||||
|
|
||||||
view3d->SetZClippingType(V3d_TypeOfZclipping(aType));
|
Handle(V3d_View) view3d = ( (OCCViewer_ViewPort3d*)aOCCFrame->getViewPort() )->getView();
|
||||||
view3d->SetZClippingDepth(depth);
|
|
||||||
view3d->SetZClippingWidth(thickness);
|
double depth = SpinBox_Near->value();
|
||||||
}
|
double thickness = SpinBox_Far->value();
|
||||||
|
int aType = TypeCB->currentIndex();
|
||||||
|
|
||||||
|
view3d->SetZClippingType( V3d_TypeOfZclipping( aType ) );
|
||||||
|
view3d->SetZClippingDepth( depth );
|
||||||
|
view3d->SetZClippingWidth( thickness );
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,8 +246,8 @@ bool OperationGUI_ClippingDlg::ClickOnApply()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ClippingDlg::ClickOnOk()
|
void OperationGUI_ClippingDlg::ClickOnOk()
|
||||||
{
|
{
|
||||||
ClickOnApply();
|
if ( ClickOnApply() )
|
||||||
ClickOnCancel();
|
ClickOnCancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -284,10 +263,9 @@ void OperationGUI_ClippingDlg::onActivate()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_ClippingDlg::enterEvent(QEvent*)
|
void OperationGUI_ClippingDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
this->setEnabled(true);
|
this->setEnabled( true );
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -307,70 +285,65 @@ void OperationGUI_ClippingDlg::onReset()
|
|||||||
{
|
{
|
||||||
SUIT_ViewWindow* anActiveWindow =
|
SUIT_ViewWindow* anActiveWindow =
|
||||||
SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
|
||||||
if (!anActiveWindow)
|
if ( !anActiveWindow )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() )
|
if ( anActiveWindow->getViewManager()->getType() == SVTK_Viewer::Type() ) {
|
||||||
{
|
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
||||||
SVTK_ViewWindow* aVTKFrame = dynamic_cast<SVTK_ViewWindow*>( anActiveWindow );
|
if ( !aVTKFrame )
|
||||||
if( !aVTKFrame )
|
return;
|
||||||
return;
|
|
||||||
|
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
||||||
vtkRenderer* aRenderer = aVTKFrame->getRenderer();
|
if ( !aRenderer ) return;
|
||||||
if(!aRenderer) return;
|
|
||||||
|
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
||||||
vtkCamera* anActiveCamera = aRenderer->GetActiveCamera();
|
if ( anActiveCamera == NULL ) {
|
||||||
if( anActiveCamera == NULL ){
|
|
||||||
MESSAGE("Trying to reset clipping range of non-existant camera");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the plane equation for the camera view plane
|
|
||||||
double vn[3];
|
|
||||||
anActiveCamera->GetViewPlaneNormal(vn);
|
|
||||||
double position[3];
|
|
||||||
anActiveCamera->GetPosition(position);
|
|
||||||
|
|
||||||
vtkFloatingPointType bounds[6];
|
|
||||||
aRenderer->ComputeVisiblePropBounds(bounds);
|
|
||||||
|
|
||||||
double center[3];
|
|
||||||
center[0] = (bounds[0] + bounds[1])/2.0;
|
|
||||||
center[1] = (bounds[2] + bounds[3])/2.0;
|
|
||||||
center[2] = (bounds[4] + bounds[5])/2.0;
|
|
||||||
|
|
||||||
double width = sqrt((bounds[1]-bounds[0])*(bounds[1]-bounds[0]) +
|
|
||||||
(bounds[3]-bounds[2])*(bounds[3]-bounds[2]) +
|
|
||||||
(bounds[5]-bounds[4])*(bounds[5]-bounds[4]));
|
|
||||||
|
|
||||||
double distance = sqrt((position[0]-center[0])*(position[0]-center[0]) +
|
|
||||||
(position[1]-center[1])*(position[1]-center[1]) +
|
|
||||||
(position[2]-center[2])*(position[2]-center[2]));
|
|
||||||
|
|
||||||
vtkFloatingPointType range[2] = {distance - width/2.0, distance + width/2.0};
|
|
||||||
|
|
||||||
SpinBox_Near->SetValue(range[0]);
|
|
||||||
SpinBox_Far->SetValue(range[1]);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() )
|
|
||||||
{
|
// Find the plane equation for the camera view plane
|
||||||
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
double vn[3];
|
||||||
|
anActiveCamera->GetViewPlaneNormal( vn );
|
||||||
TextLabelNear->setText( tr( "Depth" ) );
|
double position[3];
|
||||||
TextLabelFar->setText( tr( "Thickness" ) );
|
anActiveCamera->GetPosition( position );
|
||||||
|
|
||||||
Handle(V3d_View) view3d = ((OCCViewer_ViewPort3d*)aOCCFrame->getViewPort())->getView();
|
vtkFloatingPointType bounds[6];
|
||||||
|
aRenderer->ComputeVisiblePropBounds( bounds );
|
||||||
view3d->SetZClippingType(V3d_TypeOfZclipping(0));
|
|
||||||
view3d->ZFitAll();
|
double center[3];
|
||||||
double depth, thickness;
|
center[0] = ( bounds[0] + bounds[1] ) / 2.0;
|
||||||
int ztype= view3d->ZClipping(depth, thickness);
|
center[1] = ( bounds[2] + bounds[3] ) / 2.0;
|
||||||
SpinBox_Near->SetValue(0);
|
center[2] = ( bounds[4] + bounds[5] ) / 2.0;
|
||||||
SpinBox_Far->SetValue(1000);
|
|
||||||
TypeCB->setCurrentItem(ztype);
|
double width = sqrt( ( bounds[1]-bounds[0] ) * ( bounds[1]-bounds[0] ) +
|
||||||
}
|
( bounds[3]-bounds[2] ) * ( bounds[3]-bounds[2] ) +
|
||||||
|
( bounds[5]-bounds[4] ) * ( bounds[5]-bounds[4] ) );
|
||||||
return;
|
|
||||||
|
double distance = sqrt( ( position[0]-center[0] ) * ( position[0]-center[0] ) +
|
||||||
|
( position[1]-center[1] ) * ( position[1]-center[1] ) +
|
||||||
|
( position[2]-center[2] ) * ( position[2]-center[2] ) );
|
||||||
|
|
||||||
|
vtkFloatingPointType range[2] = { distance - width/2.0, distance + width/2.0 };
|
||||||
|
|
||||||
|
SpinBox_Near->setValue( range[0] );
|
||||||
|
SpinBox_Far->setValue( range[1] );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if ( anActiveWindow->getViewManager()->getType() == OCCViewer_Viewer::Type() ) {
|
||||||
|
OCCViewer_ViewWindow* aOCCFrame = dynamic_cast<OCCViewer_ViewWindow*>( anActiveWindow );
|
||||||
|
|
||||||
|
TextLabelNear->setText( tr( "Depth" ) );
|
||||||
|
TextLabelFar->setText( tr( "Thickness" ) );
|
||||||
|
|
||||||
|
Handle(V3d_View) view3d = ( (OCCViewer_ViewPort3d*)aOCCFrame->getViewPort() )->getView();
|
||||||
|
|
||||||
|
view3d->SetZClippingType( V3d_TypeOfZclipping( 0 ) );
|
||||||
|
view3d->ZFitAll();
|
||||||
|
double depth, thickness;
|
||||||
|
int ztype= view3d->ZClipping( depth, thickness );
|
||||||
|
SpinBox_Near->setValue( 0 );
|
||||||
|
SpinBox_Far->setValue( 1000 );
|
||||||
|
TypeCB->setCurrentIndex( ztype );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,38 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_ClippingDlg.h
|
||||||
|
// Author : Michael Zorin, Open CASCADE S.A.S. (mikhail.zorin@opencascade.com)
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_ClippingDlg.h
|
|
||||||
// Author : Michael Zorin
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_CLIPPINGRANGE_H
|
#ifndef OPERATIONGUI_CLIPPINGDLG_H
|
||||||
#define DIALOGBOX_CLIPPING_H
|
#define OPERATIONGUI_CLIPPINGDLG_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
class QGroupBox;
|
class QGroupBox;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class QComboBox;
|
class QComboBox;
|
||||||
class DlgRef_SpinBox;
|
class QDoubleSpinBox;
|
||||||
|
|
||||||
enum ViewerTypes { VTK, OCC, OTHER };
|
enum ViewerTypes { VTK, OCC, OTHER };
|
||||||
|
|
||||||
@ -44,33 +42,34 @@ enum ViewerTypes { VTK, OCC, OTHER };
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_ClippingDlg : public GEOMBase_Skeleton
|
class OperationGUI_ClippingDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_ClippingDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0);
|
OperationGUI_ClippingDlg( GeometryGUI*, QWidget* = 0 );
|
||||||
~OperationGUI_ClippingDlg();
|
~OperationGUI_ClippingDlg();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
ViewerTypes myViewerType;
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
void enterEvent( QEvent* );
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
|
||||||
void enterEvent(QEvent* e);
|
private:
|
||||||
|
ViewerTypes myViewerType;
|
||||||
QGroupBox* GroupArguments;
|
|
||||||
QLabel* TextLabelNear;
|
QGroupBox* GroupArguments;
|
||||||
DlgRef_SpinBox* SpinBox_Near;
|
QLabel* TextLabelNear;
|
||||||
QLabel* TextLabelFar;
|
QDoubleSpinBox* SpinBox_Near;
|
||||||
DlgRef_SpinBox* SpinBox_Far;
|
QLabel* TextLabelFar;
|
||||||
QPushButton* resetButton;
|
QDoubleSpinBox* SpinBox_Far;
|
||||||
QComboBox* TypeCB;
|
QPushButton* resetButton;
|
||||||
|
QComboBox* TypeCB;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void onActivate();
|
void onActivate();
|
||||||
void onReset();
|
void onReset();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_CLIPPINGRANGE_H
|
#endif // OPERATIONGUI_CLIPPINGDLG_H
|
||||||
|
@ -1,48 +1,47 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_FilletDlg.cxx
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_FilletDlg.cxx
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI_FilletDlg.h"
|
#include "OperationGUI_FilletDlg.h"
|
||||||
#include "DlgRef_1Sel1Spin.h"
|
|
||||||
#include "DlgRef_2Sel1Spin.h"
|
|
||||||
|
|
||||||
#include "SUIT_Desktop.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "SUIT_Session.h"
|
#include <GeometryGUI.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <GEOMBase.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
#include "OCCViewer_ViewModel.h"
|
#include <SUIT_Desktop.h>
|
||||||
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SUIT_ViewWindow.h>
|
||||||
|
#include <SUIT_ViewManager.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
#include <OCCViewer_ViewModel.h>
|
||||||
|
|
||||||
#include "qlabel.h"
|
|
||||||
#include "qpixmap.h"
|
|
||||||
#include <TColStd_MapOfInteger.hxx>
|
#include <TColStd_MapOfInteger.hxx>
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
#include <list>
|
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOMImpl_Types.hxx>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_FilletDlg()
|
// class : OperationGUI_FilletDlg()
|
||||||
@ -51,65 +50,64 @@
|
|||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_FilletDlg::OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWidget* parent)
|
OperationGUI_FilletDlg::OperationGUI_FilletDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, "OperationGUI_FilletDlg", false,
|
: GEOMBase_Skeleton( theGeometryGUI, parent, false )
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
myConstructorId = -1;
|
|
||||||
|
|
||||||
SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
|
SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
|
||||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_ALL")));
|
QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_ALL" ) ) );
|
||||||
QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_EDGE")));
|
QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_EDGE" ) ) );
|
||||||
QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_FACE")));
|
QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_FILLET_FACE" ) ) );
|
||||||
|
|
||||||
QPixmap iconSelect(aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
|
QPixmap iconSelect( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
|
||||||
setCaption(tr("GEOM_FILLET_TITLE"));
|
setWindowTitle( tr( "GEOM_FILLET_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle( tr( "GEOM_FILLET" ) );
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_FILLET" ) );
|
||||||
RadioButton1->setPixmap( image0 );
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setPixmap( image1 );
|
mainFrame()->RadioButton2->setIcon( image1 );
|
||||||
RadioButton3->setPixmap( image2 );
|
mainFrame()->RadioButton3->setIcon( image2 );
|
||||||
|
|
||||||
Group1 = new DlgRef_1Sel1Spin( this, "Group1" );
|
Group1 = new DlgRef_1Sel1Spin( centralWidget() );
|
||||||
Group1->GroupBox1->setTitle( tr( "GEOM_FILLET_ALL" ) );
|
Group1->GroupBox1->setTitle( tr( "GEOM_FILLET_ALL" ) );
|
||||||
Group1->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
Group1->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
||||||
Group1->TextLabel2->setText( tr( "GEOM_RADIUS" ) );
|
Group1->TextLabel2->setText( tr( "GEOM_RADIUS" ) );
|
||||||
Group1->PushButton1->setPixmap( iconSelect );
|
Group1->PushButton1->setIcon( iconSelect );
|
||||||
Group1->LineEdit1->setReadOnly( true );
|
Group1->LineEdit1->setReadOnly( true );
|
||||||
|
|
||||||
Group2 = new DlgRef_2Sel1Spin( this, "Group2" );
|
Group2 = new DlgRef_2Sel1Spin( centralWidget() );
|
||||||
Group2->GroupBox1->setTitle( tr( "GEOM_FILLET_EDGES" ) );
|
Group2->GroupBox1->setTitle( tr( "GEOM_FILLET_EDGES" ) );
|
||||||
Group2->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
Group2->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
||||||
Group2->TextLabel2->setText( tr( "SELECTED_EDGES" ) );
|
Group2->TextLabel2->setText( tr( "SELECTED_EDGES" ) );
|
||||||
Group2->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
Group2->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
||||||
Group2->PushButton1->setPixmap( iconSelect );
|
Group2->PushButton1->setIcon( iconSelect );
|
||||||
Group2->PushButton2->setPixmap( iconSelect );
|
Group2->PushButton2->setIcon( iconSelect );
|
||||||
Group2->LineEdit1->setReadOnly( true );
|
Group2->LineEdit1->setReadOnly( true );
|
||||||
Group2->LineEdit2->setReadOnly( true );
|
Group2->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Group3 = new DlgRef_2Sel1Spin( this, "Group3" );
|
Group3 = new DlgRef_2Sel1Spin( centralWidget() );
|
||||||
Group3->GroupBox1->setTitle(tr( "GEOM_FILLET_FACES" ) );
|
Group3->GroupBox1->setTitle( tr( "GEOM_FILLET_FACES" ) );
|
||||||
Group3->TextLabel1->setText(tr( "GEOM_MAIN_OBJECT" ) );
|
Group3->TextLabel1->setText( tr( "GEOM_MAIN_OBJECT" ) );
|
||||||
Group3->TextLabel2->setText(tr( "SELECTED_FACES" ) );
|
Group3->TextLabel2->setText( tr( "SELECTED_FACES" ) );
|
||||||
Group3->TextLabel3->setText(tr( "GEOM_RADIUS" ) );
|
Group3->TextLabel3->setText( tr( "GEOM_RADIUS" ) );
|
||||||
Group3->PushButton1->setPixmap( iconSelect );
|
Group3->PushButton1->setIcon( iconSelect );
|
||||||
Group3->PushButton2->setPixmap( iconSelect );
|
Group3->PushButton2->setIcon( iconSelect );
|
||||||
Group3->LineEdit1->setReadOnly( true );
|
Group3->LineEdit1->setReadOnly( true );
|
||||||
Group3->LineEdit2->setReadOnly( true );
|
Group3->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Layout1->addWidget( Group1, 2, 0 );
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
Layout1->addWidget( Group2, 2, 0 );
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
Layout1->addWidget( Group3, 2, 0 );
|
layout->addWidget( Group1 );
|
||||||
|
layout->addWidget( Group2 );
|
||||||
|
layout->addWidget( Group3 );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
double SpecificStep = 10.0;
|
double SpecificStep = 10.0;
|
||||||
Group1->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
initSpinBox( Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3 );
|
||||||
Group2->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
initSpinBox( Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3 );
|
||||||
Group3->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, SpecificStep, 3);
|
initSpinBox( Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3 );
|
||||||
|
|
||||||
setHelpFileName("fillet.htm");
|
setHelpFileName( "fillet.htm" );
|
||||||
|
|
||||||
/* Initialisations */
|
/* Initialisations */
|
||||||
Init();
|
Init();
|
||||||
@ -133,42 +131,38 @@ void OperationGUI_FilletDlg::Init()
|
|||||||
{
|
{
|
||||||
myConstructorId = -1;
|
myConstructorId = -1;
|
||||||
reset();
|
reset();
|
||||||
RadioButton1->setChecked( true );
|
|
||||||
myEditCurrentArgument = Group1->LineEdit1;
|
|
||||||
|
|
||||||
// main buttons
|
// main buttons
|
||||||
connect( buttonOk , SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect( buttonApply, SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
|
|
||||||
// group box
|
// group box
|
||||||
connect( GroupConstructors, SIGNAL( clicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
// push buttons
|
// push buttons
|
||||||
connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( Group1->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( Group2->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect(Group3->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( Group3->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect(Group2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( Group2->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect(Group3->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( Group3->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
|
|
||||||
// line edits
|
// line edits
|
||||||
connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( Group1->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( Group2->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect(Group3->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( Group3->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
// spin boxes
|
// spin boxes
|
||||||
connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect( Group1->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect( Group2->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
|
connect( Group3->SpinBox_DX, SIGNAL( valueChanged( double ) ), this, SLOT( ValueChangedInSpinBox( double ) ) );
|
||||||
|
|
||||||
// selection
|
// selection
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_FILLET" ) );
|
initName( tr( "GEOM_FILLET" ) );
|
||||||
|
|
||||||
Group2->hide();
|
ConstructorsClicked( 0 );
|
||||||
Group3->hide();
|
|
||||||
Group1->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -179,9 +173,8 @@ void OperationGUI_FilletDlg::Init()
|
|||||||
void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
||||||
{
|
{
|
||||||
if ( SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
|
if ( SUIT_Session::session()->activeApplication()->desktop()->activeWindow()->getViewManager()->getType()
|
||||||
!= OCCViewer_Viewer::Type() )
|
!= OCCViewer_Viewer::Type() ) {
|
||||||
{
|
mainFrame()->RadioButton1->setChecked( true );
|
||||||
RadioButton1->setChecked( true );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,33 +183,32 @@ void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
|||||||
|
|
||||||
// Get radius from previous widget
|
// Get radius from previous widget
|
||||||
double R = 5;
|
double R = 5;
|
||||||
if ( myConstructorId == 0 ) R = Group1->SpinBox_DX->GetValue();
|
if ( myConstructorId == 0 ) R = Group1->SpinBox_DX->value();
|
||||||
else if ( myConstructorId == 1 ) R = Group2->SpinBox_DX->GetValue();
|
else if ( myConstructorId == 1 ) R = Group2->SpinBox_DX->value();
|
||||||
else R = Group3->SpinBox_DX->GetValue();
|
else R = Group3->SpinBox_DX->value();
|
||||||
|
|
||||||
myConstructorId = constructorId;
|
myConstructorId = constructorId;
|
||||||
|
|
||||||
switch ( constructorId )
|
switch ( constructorId ) {
|
||||||
{
|
case 0:
|
||||||
case 0:
|
Group2->hide();
|
||||||
Group1->show();
|
Group3->hide();
|
||||||
Group2->hide();
|
Group1->show();
|
||||||
Group3->hide();
|
Group1->SpinBox_DX->setValue( R );
|
||||||
Group1->SpinBox_DX->SetValue( R );
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
Group1->hide();
|
Group1->hide();
|
||||||
Group2->show();
|
Group3->hide();
|
||||||
Group3->hide();
|
Group2->show();
|
||||||
Group2->SpinBox_DX->SetValue( R );
|
Group2->SpinBox_DX->setValue( R );
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Group1->hide();
|
Group1->hide();
|
||||||
Group2->hide();
|
Group2->hide();
|
||||||
Group3->show();
|
Group3->show();
|
||||||
Group3->SpinBox_DX->SetValue( R );
|
Group3->SpinBox_DX->setValue( R );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,14 +219,17 @@ void OperationGUI_FilletDlg::ConstructorsClicked( int constructorId )
|
|||||||
activateSelection();
|
activateSelection();
|
||||||
enableWidgets();
|
enableWidgets();
|
||||||
|
|
||||||
if ( !myShape->_is_nil() )
|
if ( !myShape->_is_nil() ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( myShape ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( myShape ) );
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
myEditCurrentArgument->setText( "" );
|
myEditCurrentArgument->setText( "" );
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,7 +251,7 @@ void OperationGUI_FilletDlg::ClickOnOk()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool OperationGUI_FilletDlg::ClickOnApply()
|
bool OperationGUI_FilletDlg::ClickOnApply()
|
||||||
{
|
{
|
||||||
if ( !onAccept() )
|
if ( !onAccept() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
initName();
|
initName();
|
||||||
@ -275,16 +270,13 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
|
|||||||
// If selection of main object is activated
|
// If selection of main object is activated
|
||||||
if ( myEditCurrentArgument == Group1->LineEdit1 ||
|
if ( myEditCurrentArgument == Group1->LineEdit1 ||
|
||||||
myEditCurrentArgument == Group2->LineEdit1 ||
|
myEditCurrentArgument == Group2->LineEdit1 ||
|
||||||
myEditCurrentArgument == Group3->LineEdit1 )
|
myEditCurrentArgument == Group3->LineEdit1 ) {
|
||||||
{
|
if ( IObjectCount() == 1 ) {
|
||||||
if ( IObjectCount() == 1 )
|
|
||||||
{
|
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
||||||
|
|
||||||
if ( aResult && !anObj->_is_nil() )
|
if ( aResult && !anObj->_is_nil() ) {
|
||||||
{
|
|
||||||
myShape = anObj;
|
myShape = anObj;
|
||||||
myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) );
|
myEditCurrentArgument->setText( GEOMBase::GetName( anObj ) );
|
||||||
displayPreview();
|
displayPreview();
|
||||||
@ -298,24 +290,19 @@ void OperationGUI_FilletDlg::SelectionIntoArgument()
|
|||||||
}
|
}
|
||||||
// If face or edge selection is activated
|
// If face or edge selection is activated
|
||||||
else if ( myEditCurrentArgument == Group2->LineEdit2 ||
|
else if ( myEditCurrentArgument == Group2->LineEdit2 ||
|
||||||
myEditCurrentArgument == Group3->LineEdit2 )
|
myEditCurrentArgument == Group3->LineEdit2 ) {
|
||||||
{
|
if ( IObjectCount() == 1 ) {
|
||||||
if ( IObjectCount() == 1 )
|
|
||||||
{
|
|
||||||
Standard_Boolean aResult = Standard_False;
|
Standard_Boolean aResult = Standard_False;
|
||||||
GEOM::GEOM_Object_var anObj =
|
GEOM::GEOM_Object_var anObj =
|
||||||
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
GEOMBase::ConvertIOinGEOMObject( firstIObject(), aResult );
|
||||||
|
|
||||||
if ( aResult && !anObj->_is_nil() )
|
if ( aResult && !anObj->_is_nil() ) {
|
||||||
{
|
|
||||||
TColStd_IndexedMapOfInteger anIndexes;
|
TColStd_IndexedMapOfInteger anIndexes;
|
||||||
myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
myGeomGUI->getApp()->selectionMgr()->GetIndexes( firstIObject(), anIndexes );
|
||||||
|
|
||||||
if ( anIndexes.Extent() > 0 )
|
if ( anIndexes.Extent() > 0 ) {
|
||||||
{
|
|
||||||
QString aName;
|
QString aName;
|
||||||
if ( anIndexes.Extent() == 1 )
|
if ( anIndexes.Extent() == 1 ) {
|
||||||
{
|
|
||||||
int anIndex = anIndexes( 1 );
|
int anIndex = anIndexes( 1 );
|
||||||
|
|
||||||
aName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
aName = QString( GEOMBase::GetName( anObj ) ) + QString( ":%1" ).arg( anIndex );
|
||||||
@ -358,7 +345,6 @@ void OperationGUI_FilletDlg::LineEditReturnPressed()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -370,28 +356,23 @@ void OperationGUI_FilletDlg::SetEditCurrentArgument()
|
|||||||
{
|
{
|
||||||
QPushButton* send = (QPushButton*)sender();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
|
|
||||||
if ( send == Group1->PushButton1 )
|
if ( send == Group1->PushButton1 ) {
|
||||||
{
|
|
||||||
Group1->LineEdit1->setFocus();
|
Group1->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = Group1->LineEdit1;
|
myEditCurrentArgument = Group1->LineEdit1;
|
||||||
}
|
}
|
||||||
else if( send == Group2->PushButton1 )
|
else if ( send == Group2->PushButton1 ) {
|
||||||
{
|
|
||||||
Group2->LineEdit1->setFocus();
|
Group2->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = Group2->LineEdit1;
|
myEditCurrentArgument = Group2->LineEdit1;
|
||||||
}
|
}
|
||||||
else if( send == Group2->PushButton2 )
|
else if ( send == Group2->PushButton2 ) {
|
||||||
{
|
|
||||||
Group2->LineEdit2->setFocus();
|
Group2->LineEdit2->setFocus();
|
||||||
myEditCurrentArgument = Group2->LineEdit2;
|
myEditCurrentArgument = Group2->LineEdit2;
|
||||||
}
|
}
|
||||||
else if ( send == Group3->PushButton1 )
|
else if ( send == Group3->PushButton1 ) {
|
||||||
{
|
|
||||||
Group3->LineEdit1->setFocus();
|
Group3->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = Group3->LineEdit1;
|
myEditCurrentArgument = Group3->LineEdit1;
|
||||||
}
|
}
|
||||||
else if( send == Group3->PushButton2 )
|
else if ( send == Group3->PushButton2 ) {
|
||||||
{
|
|
||||||
Group3->LineEdit1->setFocus();
|
Group3->LineEdit1->setFocus();
|
||||||
myEditCurrentArgument = Group3->LineEdit2;
|
myEditCurrentArgument = Group3->LineEdit2;
|
||||||
}
|
}
|
||||||
@ -408,8 +389,8 @@ void OperationGUI_FilletDlg::ActivateThisDialog()
|
|||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
|
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
activateSelection();
|
activateSelection();
|
||||||
displayPreview();
|
displayPreview();
|
||||||
@ -420,9 +401,9 @@ void OperationGUI_FilletDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_FilletDlg::enterEvent( QEvent* e )
|
void OperationGUI_FilletDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if ( !GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
this->ActivateThisDialog();
|
this->ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,7 +411,7 @@ void OperationGUI_FilletDlg::enterEvent( QEvent* e )
|
|||||||
// function : ValueChangedInSpinBox()
|
// function : ValueChangedInSpinBox()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_FilletDlg::ValueChangedInSpinBox( double newValue )
|
void OperationGUI_FilletDlg::ValueChangedInSpinBox( double )
|
||||||
{
|
{
|
||||||
displayPreview();
|
displayPreview();
|
||||||
}
|
}
|
||||||
@ -442,9 +423,9 @@ void OperationGUI_FilletDlg::ValueChangedInSpinBox( double newValue )
|
|||||||
void OperationGUI_FilletDlg::reset()
|
void OperationGUI_FilletDlg::reset()
|
||||||
{
|
{
|
||||||
// Set Initial values of spinboxes
|
// Set Initial values of spinboxes
|
||||||
Group1->SpinBox_DX->SetValue( 5 );
|
Group1->SpinBox_DX->setValue( 5 );
|
||||||
Group2->SpinBox_DX->SetValue( 5 );
|
Group2->SpinBox_DX->setValue( 5 );
|
||||||
Group3->SpinBox_DX->SetValue( 5 );
|
Group3->SpinBox_DX->setValue( 5 );
|
||||||
|
|
||||||
Group1->LineEdit1->setText( "" );
|
Group1->LineEdit1->setText( "" );
|
||||||
Group2->LineEdit1->setText( "" );
|
Group2->LineEdit1->setText( "" );
|
||||||
@ -471,15 +452,6 @@ void OperationGUI_FilletDlg::reset()
|
|||||||
enableWidgets();
|
enableWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
|
||||||
// function : getConstructorId()
|
|
||||||
// purpose :
|
|
||||||
//=================================================================================
|
|
||||||
int OperationGUI_FilletDlg::getConstructorId() const
|
|
||||||
{
|
|
||||||
return GroupConstructors->id( GroupConstructors->selected() );
|
|
||||||
}
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : activateSelection
|
// function : activateSelection
|
||||||
// purpose : Activate selection in accordance with myEditCurrentArgument
|
// purpose : Activate selection in accordance with myEditCurrentArgument
|
||||||
@ -491,8 +463,7 @@ void OperationGUI_FilletDlg::activateSelection()
|
|||||||
localSelection( myShape, TopAbs_EDGE );
|
localSelection( myShape, TopAbs_EDGE );
|
||||||
else if ( !myShape->_is_nil() && myEditCurrentArgument == Group3->LineEdit2 )
|
else if ( !myShape->_is_nil() && myEditCurrentArgument == Group3->LineEdit2 )
|
||||||
localSelection( myShape, TopAbs_FACE );
|
localSelection( myShape, TopAbs_FACE );
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
TColStd_MapOfInteger aMap;
|
TColStd_MapOfInteger aMap;
|
||||||
aMap.Add( GEOM_SHELL );
|
aMap.Add( GEOM_SHELL );
|
||||||
aMap.Add( GEOM_SOLID );
|
aMap.Add( GEOM_SOLID );
|
||||||
@ -513,24 +484,20 @@ void OperationGUI_FilletDlg::enableWidgets()
|
|||||||
|
|
||||||
bool toEnable = !myShape->_is_nil();
|
bool toEnable = !myShape->_is_nil();
|
||||||
|
|
||||||
if ( anId == 1 )
|
if ( anId == 1 ) {
|
||||||
{
|
|
||||||
Group2->LineEdit2->setEnabled( toEnable );
|
Group2->LineEdit2->setEnabled( toEnable );
|
||||||
Group2->PushButton2->setEnabled( toEnable );
|
Group2->PushButton2->setEnabled( toEnable );
|
||||||
|
|
||||||
if ( !toEnable )
|
if ( !toEnable ) {
|
||||||
{
|
|
||||||
Group2->LineEdit2->setText( "" );
|
Group2->LineEdit2->setText( "" );
|
||||||
myEdges.Clear();
|
myEdges.Clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( anId == 2 )
|
else if ( anId == 2 ) {
|
||||||
{
|
|
||||||
Group3->LineEdit2->setEnabled( toEnable );
|
Group3->LineEdit2->setEnabled( toEnable );
|
||||||
Group3->PushButton2->setEnabled( toEnable );
|
Group3->PushButton2->setEnabled( toEnable );
|
||||||
|
|
||||||
if ( !toEnable )
|
if ( !toEnable ) {
|
||||||
{
|
|
||||||
Group3->LineEdit2->setText( "" );
|
Group3->LineEdit2->setText( "" );
|
||||||
myFaces.Clear();
|
myFaces.Clear();
|
||||||
}
|
}
|
||||||
@ -574,8 +541,7 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeFilletAll( myShape,
|
getOperation() )->MakeFilletAll( myShape,
|
||||||
getRadius() );
|
getRadius() );
|
||||||
else if ( anId == 1 )
|
else if ( anId == 1 ) {
|
||||||
{
|
|
||||||
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
||||||
aList->length( myEdges.Extent() );
|
aList->length( myEdges.Extent() );
|
||||||
|
|
||||||
@ -585,9 +551,7 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
anObj = GEOM::GEOM_ILocalOperations::_narrow(
|
||||||
getOperation() )->MakeFilletEdges( myShape, getRadius(), aList );
|
getOperation() )->MakeFilletEdges( myShape, getRadius(), aList );
|
||||||
}
|
}
|
||||||
else if ( anId == 2 )
|
else if ( anId == 2 ) {
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
|
||||||
aList->length( myFaces.Extent() );
|
aList->length( myFaces.Extent() );
|
||||||
|
|
||||||
@ -611,7 +575,7 @@ bool OperationGUI_FilletDlg::execute( ObjectList& objects )
|
|||||||
double OperationGUI_FilletDlg::getRadius() const
|
double OperationGUI_FilletDlg::getRadius() const
|
||||||
{
|
{
|
||||||
int anId = getConstructorId();
|
int anId = getConstructorId();
|
||||||
if ( anId == 0 ) return Group1->SpinBox_DX->GetValue();
|
if ( anId == 0 ) return Group1->SpinBox_DX->value();
|
||||||
else if ( anId == 1 ) return Group2->SpinBox_DX->GetValue();
|
else if ( anId == 1 ) return Group2->SpinBox_DX->value();
|
||||||
else return Group3->SpinBox_DX->GetValue();
|
else return Group3->SpinBox_DX->value();
|
||||||
}
|
}
|
||||||
|
@ -1,34 +1,32 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_FilletDlg.h
|
||||||
|
// Author : Damien COQUERET, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_FilletDlg.h
|
|
||||||
// Author : Damien COQUERET
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_FILLET_H
|
#ifndef OPERATIONGUI_FILLETDLG_H
|
||||||
#define DIALOGBOX_FILLET_H
|
#define OPERATIONGUI_FILLETDLG_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
|
|
||||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||||
|
|
||||||
@ -41,47 +39,46 @@ class DlgRef_2Sel1Spin;
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_FilletDlg : public GEOMBase_Skeleton
|
class OperationGUI_FilletDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_FilletDlg(GeometryGUI* theGeometryGUI, QWidget* parent);
|
OperationGUI_FilletDlg( GeometryGUI*, QWidget* );
|
||||||
~OperationGUI_FilletDlg();
|
~OperationGUI_FilletDlg();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& msg );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ValueChangedInSpinBox( double newValue );
|
void ValueChangedInSpinBox( double );
|
||||||
void ConstructorsClicked( int constructorId );
|
void ConstructorsClicked( int );
|
||||||
|
|
||||||
|
private:
|
||||||
|
void Init();
|
||||||
|
void enterEvent( QEvent* );
|
||||||
|
void reset();
|
||||||
|
void activateSelection();
|
||||||
|
void enableWidgets();
|
||||||
|
double getRadius() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
int myConstructorId;
|
||||||
void enterEvent( QEvent* e );
|
|
||||||
void reset();
|
GEOM::GEOM_Object_var myShape;
|
||||||
int getConstructorId() const;
|
TColStd_IndexedMapOfInteger myEdges;
|
||||||
void activateSelection();
|
TColStd_IndexedMapOfInteger myFaces;
|
||||||
void enableWidgets();
|
|
||||||
double getRadius() const;
|
DlgRef_1Sel1Spin* Group1;
|
||||||
|
DlgRef_2Sel1Spin* Group2;
|
||||||
private:
|
DlgRef_2Sel1Spin* Group3;
|
||||||
int myConstructorId;
|
|
||||||
|
|
||||||
GEOM::GEOM_Object_var myShape;
|
|
||||||
TColStd_IndexedMapOfInteger myEdges;
|
|
||||||
TColStd_IndexedMapOfInteger myFaces;
|
|
||||||
|
|
||||||
DlgRef_1Sel1Spin* Group1;
|
|
||||||
DlgRef_2Sel1Spin* Group2;
|
|
||||||
DlgRef_2Sel1Spin* Group3;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_FILLET_H
|
#endif // OPERATIONGUI_FILLETDLG_H
|
||||||
|
@ -1,44 +1,38 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 CEA
|
// Copyright (C) 2003 CEA
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_MaterialDlg.cxx
|
||||||
|
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S. (julia.dorovskikh@opencascade.com)
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_MaterialDlg.cxx
|
|
||||||
// Author : Julia DOROVSKIKH
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI_MaterialDlg.h"
|
#include "OperationGUI_MaterialDlg.h"
|
||||||
#include "OperationGUI_PartitionDlg.h"
|
#include "OperationGUI_PartitionDlg.h"
|
||||||
|
|
||||||
#include "SUIT_Session.h"
|
#include <GEOM_DlgRef.h>
|
||||||
#include "SalomeApp_Application.h"
|
#include <GEOMBase.h>
|
||||||
#include "LightApp_SelectionMgr.h"
|
#include <GeometryGUI.h>
|
||||||
|
|
||||||
#include "utilities.h"
|
#include <SUIT_Session.h>
|
||||||
|
#include <SUIT_ResourceMgr.h>
|
||||||
#include <qlabel.h>
|
#include <SalomeApp_Application.h>
|
||||||
#include <qlistview.h>
|
#include <LightApp_SelectionMgr.h>
|
||||||
#include <qspinbox.h>
|
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_MaterialDlg()
|
// class : OperationGUI_MaterialDlg()
|
||||||
@ -47,40 +41,42 @@ using namespace std;
|
|||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_MaterialDlg::OperationGUI_MaterialDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
OperationGUI_MaterialDlg::OperationGUI_MaterialDlg( GeometryGUI* theGeometryGUI, QWidget* parent,
|
||||||
const char* name, GEOM::ListOfGO ListShapes,
|
GEOM::ListOfGO ListShapes, bool modal )
|
||||||
bool modal, WFlags fl)
|
: GEOMBase_Skeleton( theGeometryGUI, parent, modal )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, name, modal, WStyle_Customize |
|
|
||||||
WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
myListShapes = ListShapes;
|
myListShapes = ListShapes;
|
||||||
myParentDlg = parent;
|
|
||||||
|
QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_PARTITION" ) ) );
|
||||||
|
|
||||||
QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_PARTITION")));
|
setWindowTitle( tr( "GEOM_MATERIAL_TITLE" ) );
|
||||||
|
|
||||||
setCaption(tr("GEOM_MATERIAL_TITLE"));
|
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_PARTITION"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PARTITION" ) );
|
||||||
RadioButton1->setPixmap(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->close(TRUE);
|
mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
RadioButton3->close(TRUE);
|
mainFrame()->RadioButton2->close();
|
||||||
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
GroupPoints = new DlgRef_1List1Spin1Btn_QTD(this, "GroupPoints");
|
GroupPoints = new DlgRef_1List1Spin1Btn( centralWidget() );
|
||||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
|
||||||
|
|
||||||
myShapeCol = GroupPoints->ListView1->addColumn(tr("GEOM_MATERIAL_SHAPE"));
|
QStringList columns;
|
||||||
myMaterCol = GroupPoints->ListView1->addColumn(tr("GEOM_MATERIAL_MATERIAL"));
|
columns << tr( "GEOM_MATERIAL_SHAPE" ) << tr( "GEOM_MATERIAL_MATERIAL" );
|
||||||
GroupPoints->ListView1->setSelectionMode(QListView::Extended);
|
GroupPoints->ListView1->setHeaderLabels( columns );
|
||||||
GroupPoints->ListView1->setSorting(-1);
|
GroupPoints->ListView1->setSelectionMode( QAbstractItemView::ExtendedSelection );
|
||||||
|
GroupPoints->ListView1->setSortingEnabled( false );
|
||||||
|
|
||||||
GroupPoints->TextLabel1->setText(tr("GEOM_MATERIAL_ID"));
|
GroupPoints->TextLabel1->setText( tr( "GEOM_MATERIAL_ID" ) );
|
||||||
GroupPoints->PushButton1->setText(tr("GEOM_MATERIAL_SET"));
|
GroupPoints->PushButton1->setText( tr( "GEOM_MATERIAL_SET" ) );
|
||||||
|
|
||||||
Layout1->addWidget(GroupPoints, 1, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("partition.htm");
|
setHelpFileName( "partition.htm" );
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@ -102,43 +98,32 @@ void OperationGUI_MaterialDlg::Init()
|
|||||||
{
|
{
|
||||||
// get materials list from the parent dialog
|
// get materials list from the parent dialog
|
||||||
OperationGUI_PartitionDlg* aParentDlg =
|
OperationGUI_PartitionDlg* aParentDlg =
|
||||||
dynamic_cast<OperationGUI_PartitionDlg*>(myParentDlg);
|
qobject_cast<OperationGUI_PartitionDlg*>( parentWidget() );
|
||||||
if (aParentDlg)
|
if ( aParentDlg )
|
||||||
myListMaterials = aParentDlg->GetListMaterials();
|
myListMaterials = aParentDlg->GetListMaterials();
|
||||||
|
|
||||||
/* list filling */
|
/* list filling */
|
||||||
MESSAGE("Filling list with " << myListShapes.length() << " objects");
|
for ( int ind = 0; ind < myListShapes.length(); ind++ ) {
|
||||||
QString aMaterialId;
|
|
||||||
QListViewItem *anItem = NULL;
|
|
||||||
for (int ind = 0; ind < myListShapes.length(); ind++) {
|
|
||||||
GEOM::GEOM_Object_var anObject = myListShapes[ind];
|
GEOM::GEOM_Object_var anObject = myListShapes[ind];
|
||||||
if (!anObject->_is_nil()) {
|
if ( !anObject->_is_nil() ) {
|
||||||
MESSAGE("Insert " << GEOMBase::GetName( anObject ));
|
QStringList labels;
|
||||||
if (ind < myListMaterials.length())
|
labels << GEOMBase::GetName( anObject );
|
||||||
aMaterialId = QString::number(myListMaterials[ind]);
|
labels << ( ind < myListMaterials.length() ?
|
||||||
else
|
QString::number( myListMaterials[ind] ) : QString( "0" ) );
|
||||||
aMaterialId = "0";
|
GroupPoints->ListView1->addTopLevelItem( new QTreeWidgetItem( labels ) );
|
||||||
if (anItem)
|
|
||||||
// insert after aPrevItem
|
|
||||||
anItem = new QListViewItem(GroupPoints->ListView1, anItem,
|
|
||||||
GEOMBase::GetName( anObject ), aMaterialId);
|
|
||||||
else
|
|
||||||
// the first item creation
|
|
||||||
anItem = new QListViewItem(GroupPoints->ListView1,
|
|
||||||
GEOMBase::GetName( anObject ), aMaterialId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MESSAGE("Filled");
|
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
buttonApply->close(TRUE);
|
buttonApply()->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
buttonCancel->setText(tr("GEOM_BUT_CANCEL"));
|
buttonApply()->close();
|
||||||
|
buttonCancel()->setText( tr( "GEOM_BUT_CANCEL" ) );
|
||||||
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetMaterial()));
|
|
||||||
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetMaterial() ) );
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -148,28 +133,22 @@ void OperationGUI_MaterialDlg::Init()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_MaterialDlg::ClickOnOk()
|
void OperationGUI_MaterialDlg::ClickOnOk()
|
||||||
{
|
{
|
||||||
SUIT_Session::session()->activeApplication()->putInfo(tr(""));
|
SUIT_Session::session()->activeApplication()->putInfo( "" );
|
||||||
|
|
||||||
int nbSh = myListShapes.length();
|
int nbSh = myListShapes.length();
|
||||||
myListMaterials.length(nbSh);
|
myListMaterials.length( nbSh );
|
||||||
|
|
||||||
QListViewItemIterator it (GroupPoints->ListView1);
|
QTreeWidgetItemIterator it( GroupPoints->ListView1 );
|
||||||
for (int i = 0; it.current() != 0; it++, i++) {
|
for ( int i = 0; *it; it++, i++ )
|
||||||
QString aMatIdStr = it.current()->text(myMaterCol);
|
myListMaterials[i] = (*it)->text( 1 ).toInt();
|
||||||
myListMaterials[i] = aMatIdStr.toInt();
|
|
||||||
MESSAGE("For shape # " << i << " material ID = " << myListMaterials[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// set materials list to the parent dialog
|
// set materials list to the parent dialog
|
||||||
OperationGUI_PartitionDlg* aParentDlg =
|
OperationGUI_PartitionDlg* aParentDlg =
|
||||||
dynamic_cast<OperationGUI_PartitionDlg*>(myParentDlg);
|
qobject_cast<OperationGUI_PartitionDlg*>( parentWidget() );
|
||||||
if (aParentDlg)
|
if ( aParentDlg )
|
||||||
{
|
aParentDlg->SetListMaterials( myListMaterials );
|
||||||
aParentDlg->SetListMaterials(myListMaterials);
|
|
||||||
}
|
|
||||||
|
|
||||||
ClickOnCancel();
|
ClickOnCancel();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -199,15 +178,13 @@ void OperationGUI_MaterialDlg::SelectionIntoArgument()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_MaterialDlg::SetMaterial()
|
void OperationGUI_MaterialDlg::SetMaterial()
|
||||||
{
|
{
|
||||||
int aMatId = GroupPoints->SpinBox1->value();
|
QString aMatIdStr = QString::number( GroupPoints->SpinBox1->value() );
|
||||||
QString aMatIdStr;
|
QList<QTreeWidgetItem*> selectedItems = GroupPoints->ListView1->selectedItems();
|
||||||
aMatIdStr.setNum(aMatId);
|
|
||||||
QListViewItemIterator it (GroupPoints->ListView1);
|
QListIterator<QTreeWidgetItem*> it( selectedItems );
|
||||||
for (; it.current() != 0; it++) {
|
while ( it.hasNext() ) {
|
||||||
if (it.current()->isSelected())
|
it.next()->setText( 1, aMatIdStr );
|
||||||
it.current()->setText(myMaterCol, aMatIdStr);
|
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -218,8 +195,8 @@ void OperationGUI_MaterialDlg::SetMaterial()
|
|||||||
void OperationGUI_MaterialDlg::ActivateThisDialog()
|
void OperationGUI_MaterialDlg::ActivateThisDialog()
|
||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(),
|
connect( ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,8 +205,8 @@ void OperationGUI_MaterialDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_MaterialDlg::enterEvent(QEvent* e)
|
void OperationGUI_MaterialDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if (!GroupConstructors->isEnabled())
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
this->ActivateThisDialog();
|
this->ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
@ -1,35 +1,33 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 CEA
|
// Copyright (C) 2003 CEA
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_MaterialDlg.h
|
||||||
|
// Author : Julia DOROVSKIKH, Open CASCADE S.A.S. (julia.dorovskikh@opencascade.com)
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_MaterialDlg.h
|
|
||||||
// Author : Julia DOROVSKIKH
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_MATERIAL_H
|
#ifndef OPERATIONGUI_MATERIALDLG_H
|
||||||
#define DIALOGBOX_MATERIAL_H
|
#define OPERATIONGUI_MATERIALDLG_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_1List1Spin1Btn_QTD.h"
|
|
||||||
|
|
||||||
|
class DlgRef_1List1Spin1Btn;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_MaterialDlg
|
// class : OperationGUI_MaterialDlg
|
||||||
@ -37,33 +35,28 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_MaterialDlg : public GEOMBase_Skeleton
|
class OperationGUI_MaterialDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_MaterialDlg (GeometryGUI* theGeometryGUI, QWidget* parent,
|
OperationGUI_MaterialDlg( GeometryGUI*, QWidget*, GEOM::ListOfGO,
|
||||||
const char* name, GEOM::ListOfGO ListShapes,
|
bool = false );
|
||||||
bool modal = FALSE, WFlags fl = 0);
|
~OperationGUI_MaterialDlg();
|
||||||
~OperationGUI_MaterialDlg();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
|
|
||||||
QWidget* myParentDlg;
|
private:
|
||||||
|
GEOM::ListOfGO myListShapes;
|
||||||
GEOM::ListOfGO myListShapes;
|
GEOM::ListOfLong myListMaterials;
|
||||||
GEOM::ListOfLong myListMaterials;
|
|
||||||
|
DlgRef_1List1Spin1Btn* GroupPoints;
|
||||||
DlgRef_1List1Spin1Btn_QTD* GroupPoints;
|
|
||||||
|
|
||||||
int myShapeCol;
|
|
||||||
int myMaterCol;
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetMaterial();
|
void SetMaterial();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_MATERIAL_H
|
#endif // OPERATIONGUI_MATERIALDLG_H
|
||||||
|
@ -1,46 +1,42 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_PartitionDlg.cxx
|
||||||
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_PartitionDlg.cxx
|
|
||||||
// Author : Lucien PIGNOLONI
|
|
||||||
// Module : GEOM
|
|
||||||
// $Header$
|
|
||||||
|
|
||||||
#include "OperationGUI_PartitionDlg.h"
|
#include "OperationGUI_PartitionDlg.h"
|
||||||
#include "OperationGUI_MaterialDlg.h"
|
#include "OperationGUI_MaterialDlg.h"
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <GEOM_DlgRef.h>
|
||||||
|
#include <GeometryGUI.h>
|
||||||
|
#include <GEOMBase.h>
|
||||||
|
|
||||||
#include "SUIT_Desktop.h"
|
#include <GEOMImpl_Types.hxx>
|
||||||
#include "SUIT_Session.h"
|
|
||||||
#include "SalomeApp_Application.h"
|
|
||||||
#include "LightApp_SelectionMgr.h"
|
|
||||||
|
|
||||||
#include <qcheckbox.h>
|
#include <SUIT_Desktop.h>
|
||||||
#include <qcombobox.h>
|
#include <SUIT_Session.h>
|
||||||
#include <qlabel.h>
|
#include <SUIT_ResourceMgr.h>
|
||||||
|
#include <SalomeApp_Application.h>
|
||||||
#include "utilities.h"
|
#include <LightApp_SelectionMgr.h>
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_PartitionDlg()
|
// class : OperationGUI_PartitionDlg()
|
||||||
@ -49,38 +45,41 @@
|
|||||||
// The dialog will by default be modeless, unless you set 'modal' to
|
// The dialog will by default be modeless, unless you set 'modal' to
|
||||||
// TRUE to construct a modal dialog.
|
// TRUE to construct a modal dialog.
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
OperationGUI_PartitionDlg::OperationGUI_PartitionDlg(GeometryGUI* theGeometryGUI, QWidget* parent)
|
OperationGUI_PartitionDlg::OperationGUI_PartitionDlg( GeometryGUI* theGeometryGUI, QWidget* parent )
|
||||||
:GEOMBase_Skeleton(theGeometryGUI, parent, "OperationGUI_PartitionDlg", false,
|
: GEOMBase_Skeleton( theGeometryGUI, parent, false )
|
||||||
WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
|
|
||||||
{
|
{
|
||||||
SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
|
SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
|
||||||
QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_PARTITION")));
|
QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_PARTITION" ) ) );
|
||||||
QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_PARTITION_PLANE")));
|
QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_PARTITION_PLANE" ) ) );
|
||||||
QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
|
QPixmap image2( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) );
|
||||||
|
|
||||||
setCaption(tr("GEOM_PARTITION_TITLE"));
|
setWindowTitle( tr( "GEOM_PARTITION_TITLE" ) );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
GroupConstructors->setTitle(tr("GEOM_PARTITION"));
|
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PARTITION" ) );
|
||||||
RadioButton1->setPixmap(image0);
|
mainFrame()->RadioButton1->setIcon( image0 );
|
||||||
RadioButton2->setPixmap(image1);
|
mainFrame()->RadioButton2->setIcon( image1 );
|
||||||
RadioButton3->close(TRUE);
|
mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose );
|
||||||
|
mainFrame()->RadioButton3->close();
|
||||||
|
|
||||||
// Full partition (contains half-space partition)
|
// Full partition (contains half-space partition)
|
||||||
GroupPoints = new DlgRef_2Sel1List_QTD(this, "GroupPoints");
|
GroupPoints = new DlgRef_2Sel1List( centralWidget() );
|
||||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
|
||||||
GroupPoints->TextLabel1->setText(tr("GEOM_OBJECTS"));
|
GroupPoints->TextLabel1->setText( tr( "GEOM_OBJECTS" ) );
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
|
GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECT" ) );
|
||||||
GroupPoints->TextLabel3->setText(tr("GEOM_RECONSTRUCTION_LIMIT"));
|
GroupPoints->TextLabel3->setText( tr( "GEOM_RECONSTRUCTION_LIMIT" ) );
|
||||||
GroupPoints->PushButton1->setPixmap(image2);
|
GroupPoints->PushButton1->setIcon( image2 );
|
||||||
GroupPoints->PushButton2->setPixmap(image2);
|
GroupPoints->PushButton2->setIcon( image2 );
|
||||||
GroupPoints->LineEdit1->setReadOnly( true );
|
GroupPoints->LineEdit1->setReadOnly( true );
|
||||||
GroupPoints->LineEdit2->setReadOnly( true );
|
GroupPoints->LineEdit2->setReadOnly( true );
|
||||||
|
|
||||||
Layout1->addWidget(GroupPoints, 2, 0);
|
QVBoxLayout* layout = new QVBoxLayout( centralWidget() );
|
||||||
|
layout->setMargin( 0 ); layout->setSpacing( 6 );
|
||||||
|
layout->addWidget( GroupPoints );
|
||||||
|
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
|
|
||||||
setHelpFileName("partition.htm");
|
setHelpFileName( "partition.htm" );
|
||||||
|
|
||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
@ -95,6 +94,15 @@ OperationGUI_PartitionDlg::~OperationGUI_PartitionDlg()
|
|||||||
// no need to delete child widgets, Qt does it all for us
|
// no need to delete child widgets, Qt does it all for us
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OperationGUI_PartitionDlg::SetListMaterials( GEOM::ListOfLong ListMaterials )
|
||||||
|
{
|
||||||
|
myListMaterials = ListMaterials;
|
||||||
|
}
|
||||||
|
|
||||||
|
GEOM::ListOfLong OperationGUI_PartitionDlg::GetListMaterials()
|
||||||
|
{
|
||||||
|
return myListMaterials;
|
||||||
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// function : Init()
|
// function : Init()
|
||||||
@ -103,30 +111,32 @@ OperationGUI_PartitionDlg::~OperationGUI_PartitionDlg()
|
|||||||
void OperationGUI_PartitionDlg::Init()
|
void OperationGUI_PartitionDlg::Init()
|
||||||
{
|
{
|
||||||
/* type for sub shape selection */
|
/* type for sub shape selection */
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SOLID"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SOLID" ) );
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_SHELL"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_SHELL" ) );
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_FACE"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_FACE" ) );
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_WIRE"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_WIRE" ) );
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_EDGE"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_EDGE" ) );
|
||||||
GroupPoints->ComboBox1->insertItem(tr("GEOM_RECONSTRUCTION_LIMIT_VERTEX"));
|
GroupPoints->ComboBox1->addItem( tr( "GEOM_RECONSTRUCTION_LIMIT_VERTEX" ) );
|
||||||
|
|
||||||
/* signals and slots connections */
|
/* signals and slots connections */
|
||||||
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
|
connect( buttonOk(), SIGNAL( clicked() ), this, SLOT( ClickOnOk() ) );
|
||||||
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
|
connect( buttonApply(), SIGNAL( clicked() ), this, SLOT( ClickOnApply() ) );
|
||||||
connect(GroupConstructors, SIGNAL(clicked(int)), this, SLOT(ConstructorsClicked(int)));
|
|
||||||
|
connect( this, SIGNAL( constructorsClicked( int ) ), this, SLOT( ConstructorsClicked( int ) ) );
|
||||||
|
|
||||||
connect(GroupPoints->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( GroupPoints->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
connect(GroupPoints->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
|
connect( GroupPoints->PushButton2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) );
|
||||||
|
|
||||||
connect(GroupPoints->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( GroupPoints->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
connect(GroupPoints->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
|
connect( GroupPoints->LineEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) );
|
||||||
|
|
||||||
connect(GroupPoints->ComboBox1, SIGNAL(activated(int)), this, SLOT(ComboTextChanged()));
|
connect( GroupPoints->ComboBox1, SIGNAL( activated( int ) ), this, SLOT( ComboTextChanged() ) );
|
||||||
|
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
initName( tr( "GEOM_PARTITION" ) );
|
initName( tr( "GEOM_PARTITION" ) );
|
||||||
|
|
||||||
ConstructorsClicked( 0 );
|
ConstructorsClicked( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,50 +145,45 @@ void OperationGUI_PartitionDlg::Init()
|
|||||||
// function : ConstructorsClicked()
|
// function : ConstructorsClicked()
|
||||||
// purpose : Radio button management
|
// purpose : Radio button management
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_PartitionDlg::ConstructorsClicked(int constructorId)
|
void OperationGUI_PartitionDlg::ConstructorsClicked( int constructorId )
|
||||||
{
|
{
|
||||||
disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
|
disconnect( myGeomGUI->getApp()->selectionMgr(), 0, this, 0 );
|
||||||
globalSelection();
|
globalSelection();
|
||||||
|
|
||||||
myListShapes.length(0);
|
myListShapes.length( 0 );
|
||||||
myListTools.length(0);
|
myListTools.length( 0 );
|
||||||
myListKeepInside.length(0);
|
myListKeepInside.length( 0 );
|
||||||
myListRemoveInside.length(0);
|
myListRemoveInside.length( 0 );
|
||||||
myListMaterials.length(0);
|
myListMaterials.length( 0 );
|
||||||
|
|
||||||
switch (constructorId)
|
switch ( constructorId ) {
|
||||||
{
|
case 0: /*Full partition */
|
||||||
case 0: /*Full partition */
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION" ) );
|
||||||
{
|
GroupPoints->TextLabel2->setText( tr( "GEOM_TOOL_OBJECT" ) );
|
||||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION"));
|
GroupPoints->TextLabel3->show();
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_TOOL_OBJECT"));
|
GroupPoints->ComboBox1->show();
|
||||||
resize(0, 0);
|
|
||||||
GroupPoints->TextLabel3->show();
|
GroupPoints->ComboBox1->setCurrentIndex( 0 );
|
||||||
GroupPoints->ComboBox1->show();
|
break;
|
||||||
|
case 1: /*Half-space partition */
|
||||||
GroupPoints->ComboBox1->setCurrentItem(0);
|
GroupPoints->GroupBox1->setTitle( tr( "GEOM_PARTITION_HALFSPACE" ) );
|
||||||
break;
|
GroupPoints->TextLabel3->hide();
|
||||||
}
|
GroupPoints->ComboBox1->hide();
|
||||||
case 1: /*Half-space partition */
|
GroupPoints->TextLabel2->setText( tr( "GEOM_PLANE" ) );
|
||||||
{
|
break;
|
||||||
|
}
|
||||||
GroupPoints->GroupBox1->setTitle(tr("GEOM_PARTITION_HALFSPACE"));
|
|
||||||
GroupPoints->TextLabel3->hide();
|
|
||||||
GroupPoints->ComboBox1->hide();
|
|
||||||
GroupPoints->TextLabel2->setText(tr("GEOM_PLANE"));
|
|
||||||
resize(0, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
GroupPoints->LineEdit1->clear();
|
GroupPoints->LineEdit1->clear();
|
||||||
GroupPoints->LineEdit2->clear();
|
GroupPoints->LineEdit2->clear();
|
||||||
|
|
||||||
|
qApp->processEvents();
|
||||||
|
updateGeometry();
|
||||||
|
resize( minimumSize() );
|
||||||
|
|
||||||
myEditCurrentArgument->setFocus();
|
myEditCurrentArgument->setFocus();
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
MESSAGE(width()<<" "<<height());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -219,10 +224,8 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
int nbSel = GEOMBase::GetNameOfSelectedIObjects( selectedIO(), aString, true );
|
int nbSel = GEOMBase::GetNameOfSelectedIObjects( selectedIO(), aString, true );
|
||||||
|
|
||||||
if ( nbSel < 1 )
|
if ( nbSel < 1 ) {
|
||||||
{
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
|
|
||||||
{
|
|
||||||
myListShapes.length( 0 );
|
myListShapes.length( 0 );
|
||||||
myListMaterials.length( 0 );
|
myListMaterials.length( 0 );
|
||||||
}
|
}
|
||||||
@ -232,21 +235,20 @@ void OperationGUI_PartitionDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
// One and only one plane can be selected
|
// One and only one plane can be selected
|
||||||
|
|
||||||
if ( getConstructorId() == 1 && myEditCurrentArgument == GroupPoints->LineEdit2 && nbSel != 1 )
|
if ( getConstructorId() == 1 &&
|
||||||
{
|
myEditCurrentArgument == GroupPoints->LineEdit2 &&
|
||||||
|
nbSel != 1 ) {
|
||||||
myListTools.length( 0 );
|
myListTools.length( 0 );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( myEditCurrentArgument == GroupPoints->LineEdit1 )
|
if ( myEditCurrentArgument == GroupPoints->LineEdit1 ) {
|
||||||
{
|
|
||||||
GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListShapes, true );
|
GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListShapes, true );
|
||||||
myListMaterials.length( 0 );
|
myListMaterials.length( 0 );
|
||||||
if ( !myListShapes.length() )
|
if ( !myListShapes.length() )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 )
|
else if ( myEditCurrentArgument == GroupPoints->LineEdit2 ) {
|
||||||
{
|
|
||||||
GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListTools, true );
|
GEOMBase::ConvertListOfIOInListOfGO( selectedIO(), myListTools, true );
|
||||||
if ( !myListTools.length() )
|
if ( !myListTools.length() )
|
||||||
return;
|
return;
|
||||||
@ -264,12 +266,11 @@ void OperationGUI_PartitionDlg::SetEditCurrentArgument()
|
|||||||
{
|
{
|
||||||
QPushButton* send = (QPushButton*)sender();
|
QPushButton* send = (QPushButton*)sender();
|
||||||
|
|
||||||
if(send == GroupPoints->PushButton1)
|
if ( send == GroupPoints->PushButton1 )
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit1;
|
myEditCurrentArgument = GroupPoints->LineEdit1;
|
||||||
else if(send == GroupPoints->PushButton2)
|
else if ( send == GroupPoints->PushButton2 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = GroupPoints->LineEdit2;
|
myEditCurrentArgument = GroupPoints->LineEdit2;
|
||||||
if( getConstructorId()==1 )
|
if ( getConstructorId() == 1 )
|
||||||
globalSelection( GEOM_PLANE );
|
globalSelection( GEOM_PLANE );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,12 +289,11 @@ void OperationGUI_PartitionDlg::LineEditReturnPressed()
|
|||||||
{
|
{
|
||||||
QLineEdit* send = (QLineEdit*)sender();
|
QLineEdit* send = (QLineEdit*)sender();
|
||||||
|
|
||||||
if(send == GroupPoints->LineEdit1 ||
|
if ( send == GroupPoints->LineEdit1 ||
|
||||||
send == GroupPoints->LineEdit2 )
|
send == GroupPoints->LineEdit2 ) {
|
||||||
{
|
|
||||||
myEditCurrentArgument = send;
|
myEditCurrentArgument = send;
|
||||||
GEOMBase_Skeleton::LineEditReturnPressed();
|
GEOMBase_Skeleton::LineEditReturnPressed();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -304,8 +304,8 @@ void OperationGUI_PartitionDlg::LineEditReturnPressed()
|
|||||||
void OperationGUI_PartitionDlg::ActivateThisDialog()
|
void OperationGUI_PartitionDlg::ActivateThisDialog()
|
||||||
{
|
{
|
||||||
GEOMBase_Skeleton::ActivateThisDialog();
|
GEOMBase_Skeleton::ActivateThisDialog();
|
||||||
connect(myGeomGUI->getApp()->selectionMgr(),
|
connect( myGeomGUI->getApp()->selectionMgr(),
|
||||||
SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
|
SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) );
|
||||||
|
|
||||||
ConstructorsClicked( getConstructorId() );
|
ConstructorsClicked( getConstructorId() );
|
||||||
}
|
}
|
||||||
@ -315,9 +315,9 @@ void OperationGUI_PartitionDlg::ActivateThisDialog()
|
|||||||
// function : enterEvent()
|
// function : enterEvent()
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
void OperationGUI_PartitionDlg::enterEvent(QEvent* e)
|
void OperationGUI_PartitionDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if (!GroupConstructors->isEnabled())
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
this->ActivateThisDialog();
|
this->ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -336,10 +336,10 @@ GEOM::GEOM_IOperations_ptr OperationGUI_PartitionDlg::createOperation()
|
|||||||
// function : isValid
|
// function : isValid
|
||||||
// purpose :
|
// purpose :
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
bool OperationGUI_PartitionDlg::isValid( QString& msg )
|
bool OperationGUI_PartitionDlg::isValid( QString& )
|
||||||
{
|
{
|
||||||
return (myListShapes.length() || myListTools.length() ||
|
return ( myListShapes.length() || myListTools.length() ||
|
||||||
myListKeepInside.length() || myListRemoveInside.length());
|
myListKeepInside.length() || myListRemoveInside.length() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -357,11 +357,10 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
|||||||
int aLimit = GetLimit();
|
int aLimit = GetLimit();
|
||||||
int aConstructorId = getConstructorId();
|
int aConstructorId = getConstructorId();
|
||||||
|
|
||||||
if (aConstructorId == 1)
|
if ( aConstructorId == 1 )
|
||||||
aLimit = GEOM::SHAPE;
|
aLimit = GEOM::SHAPE;
|
||||||
|
|
||||||
if (isValid( msg )) {
|
if ( isValid( msg ) ) {
|
||||||
|
|
||||||
anObj = GEOM::GEOM_IBooleanOperations::_narrow(getOperation())->
|
anObj = GEOM::GEOM_IBooleanOperations::_narrow(getOperation())->
|
||||||
MakePartition(myListShapes, myListTools,
|
MakePartition(myListShapes, myListTools,
|
||||||
myListKeepInside, myListRemoveInside,
|
myListKeepInside, myListRemoveInside,
|
||||||
@ -369,7 +368,7 @@ bool OperationGUI_PartitionDlg::execute( ObjectList& objects )
|
|||||||
res = true;
|
res = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!anObj->_is_nil())
|
if ( !anObj->_is_nil() )
|
||||||
objects.push_back( anObj._retn() );
|
objects.push_back( anObj._retn() );
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -392,7 +391,7 @@ void OperationGUI_PartitionDlg::closeEvent( QCloseEvent* e )
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void OperationGUI_PartitionDlg::ComboTextChanged()
|
void OperationGUI_PartitionDlg::ComboTextChanged()
|
||||||
{
|
{
|
||||||
bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3;
|
//bool IsEnabled = GroupPoints->ComboBox1->currentItem() < 3;
|
||||||
//GroupPoints->LineEdit3->setEnabled(IsEnabled);
|
//GroupPoints->LineEdit3->setEnabled(IsEnabled);
|
||||||
//GroupPoints->LineEdit4->setEnabled(IsEnabled);
|
//GroupPoints->LineEdit4->setEnabled(IsEnabled);
|
||||||
//GroupPoints->TextLabel4->setEnabled(IsEnabled);
|
//GroupPoints->TextLabel4->setEnabled(IsEnabled);
|
||||||
@ -408,10 +407,9 @@ void OperationGUI_PartitionDlg::ComboTextChanged()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
int OperationGUI_PartitionDlg::GetLimit() const
|
int OperationGUI_PartitionDlg::GetLimit() const
|
||||||
{
|
{
|
||||||
int aLimit = GroupPoints->ComboBox1->currentItem();
|
int aLimit = GroupPoints->ComboBox1->currentIndex();
|
||||||
|
|
||||||
switch(aLimit)
|
switch ( aLimit ) {
|
||||||
{
|
|
||||||
case 0: aLimit = GEOM::SOLID ; break;
|
case 0: aLimit = GEOM::SOLID ; break;
|
||||||
case 1: aLimit = GEOM::SHELL ; break;
|
case 1: aLimit = GEOM::SHELL ; break;
|
||||||
case 2: aLimit = GEOM::FACE ; break;
|
case 2: aLimit = GEOM::FACE ; break;
|
||||||
|
@ -1,35 +1,34 @@
|
|||||||
// GEOM GEOMGUI : GUI for Geometry component
|
// GEOM GEOMGUI : GUI for Geometry component
|
||||||
//
|
//
|
||||||
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License.
|
// version 2.1 of the License.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
//
|
//
|
||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
// File : OperationGUI_PartitionDlg.h
|
||||||
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// File : OperationGUI_PartitionDlg.h
|
|
||||||
// Author : Lucien PIGNOLONI
|
|
||||||
// Module : GEOM
|
|
||||||
|
|
||||||
#ifndef DIALOGBOX_PARTITION_H
|
#ifndef OPERATIONGUI_PARTITIONDLG_H
|
||||||
#define DIALOGBOX_PARTITION_H
|
#define OPERATIONGUI_PARTITIONDLG_H
|
||||||
|
|
||||||
#include "GEOMBase_Skeleton.h"
|
#include <GEOMBase_Skeleton.h>
|
||||||
#include "DlgRef_2Sel1List_QTD.h"
|
|
||||||
|
class DlgRef_2Sel1List;
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
// class : OperationGUI_PartitionDlg
|
// class : OperationGUI_PartitionDlg
|
||||||
@ -37,48 +36,46 @@
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
class OperationGUI_PartitionDlg : public GEOMBase_Skeleton
|
class OperationGUI_PartitionDlg : public GEOMBase_Skeleton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OperationGUI_PartitionDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0);
|
OperationGUI_PartitionDlg( GeometryGUI*, QWidget* = 0 );
|
||||||
~OperationGUI_PartitionDlg();
|
~OperationGUI_PartitionDlg();
|
||||||
|
|
||||||
void SetListMaterials(GEOM::ListOfLong ListMaterials)
|
void SetListMaterials( GEOM::ListOfLong );
|
||||||
{ myListMaterials = ListMaterials; }
|
GEOM::ListOfLong GetListMaterials();
|
||||||
|
|
||||||
GEOM::ListOfLong GetListMaterials()
|
|
||||||
{ return myListMaterials; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// redefined from GEOMBase_Helper
|
// redefined from GEOMBase_Helper
|
||||||
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
||||||
virtual bool isValid( QString& );
|
virtual bool isValid( QString& );
|
||||||
virtual bool execute( ObjectList& objects );
|
virtual bool execute( ObjectList& );
|
||||||
|
|
||||||
virtual void closeEvent( QCloseEvent* e );
|
virtual void closeEvent( QCloseEvent* );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
void enterEvent(QEvent* e);
|
void enterEvent( QEvent* );
|
||||||
int GetLimit() const;
|
int GetLimit() const;
|
||||||
|
|
||||||
GEOM::ListOfGO myListShapes;
|
private:
|
||||||
GEOM::ListOfLong myListMaterials;
|
GEOM::ListOfGO myListShapes;
|
||||||
GEOM::ListOfGO myListTools;
|
GEOM::ListOfLong myListMaterials;
|
||||||
GEOM::ListOfGO myListRemoveInside;
|
GEOM::ListOfGO myListTools;
|
||||||
GEOM::ListOfGO myListKeepInside;
|
GEOM::ListOfGO myListRemoveInside;
|
||||||
|
GEOM::ListOfGO myListKeepInside;
|
||||||
|
|
||||||
DlgRef_2Sel1List_QTD* GroupPoints;
|
DlgRef_2Sel1List* GroupPoints;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ClickOnOk();
|
void ClickOnOk();
|
||||||
bool ClickOnApply();
|
bool ClickOnApply();
|
||||||
void ActivateThisDialog();
|
void ActivateThisDialog();
|
||||||
void LineEditReturnPressed();
|
void LineEditReturnPressed();
|
||||||
void SelectionIntoArgument();
|
void SelectionIntoArgument();
|
||||||
void SetEditCurrentArgument();
|
void SetEditCurrentArgument();
|
||||||
void ComboTextChanged();
|
void ComboTextChanged();
|
||||||
void ConstructorsClicked(int constructorId);
|
void ConstructorsClicked( int );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_PARTITION_H
|
#endif // OPERATIONGUI_PARTITIONDLG_H
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#
|
#
|
||||||
# File : Makefile.am
|
# File : Makefile.am
|
||||||
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
# Author : Alexander BORODIN, Open CASCADE S.A.S. (alexander.borodin@opencascade.com)
|
||||||
# Package : BooleanGUI
|
# Package : TransformationGUI
|
||||||
#
|
#
|
||||||
|
|
||||||
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
include $(top_srcdir)/adm_local/unix/make_common_starter.am
|
||||||
|
@ -360,7 +360,7 @@ void TransformationGUI_MultiRotationDlg::ActivateThisDialog()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void TransformationGUI_MultiRotationDlg::enterEvent( QEvent* )
|
void TransformationGUI_MultiRotationDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if( !mainFrame()->GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ void TransformationGUI_MultiTranslationDlg::ActivateThisDialog()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void TransformationGUI_MultiTranslationDlg::enterEvent( QEvent* )
|
void TransformationGUI_MultiTranslationDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if( !mainFrame()->GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ void TransformationGUI_ScaleDlg::ActivateThisDialog()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void TransformationGUI_ScaleDlg::enterEvent( QEvent* )
|
void TransformationGUI_ScaleDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if( !mainFrame()->GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -348,7 +348,7 @@ void TransformationGUI_TranslationDlg::ActivateThisDialog()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void TransformationGUI_TranslationDlg::enterEvent( QEvent* )
|
void TransformationGUI_TranslationDlg::enterEvent( QEvent* )
|
||||||
{
|
{
|
||||||
if( !mainFrame()->GroupConstructors->isEnabled() )
|
if ( !mainFrame()->GroupConstructors->isEnabled() )
|
||||||
ActivateThisDialog();
|
ActivateThisDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user