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