From: vsr Date: Mon, 22 Oct 2007 14:18:10 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: snapshot_171207~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1bc18718b83ff32f09a9693be4d74f8a0059efb0;p=modules%2Fgeom.git *** empty log message *** --- diff --git a/src/DlgRef/DlgRef_1Sel1Check1Sel_QTD.ui b/src/DlgRef/DlgRef_1Sel1Check1Sel_QTD.ui new file mode 100644 index 000000000..a8b94432f --- /dev/null +++ b/src/DlgRef/DlgRef_1Sel1Check1Sel_QTD.ui @@ -0,0 +1,148 @@ + + DlgRef_1Sel1Check1Sel_QTD + + + + 0 + 0 + 156 + 99 + + + + + 5 + 5 + 0 + 0 + + + + + + + + 0 + + + 0 + + + + + + 5 + 5 + 0 + 0 + + + + + + + + 9 + + + 6 + + + + + + + + + 0 + 0 + 0 + 0 + + + + TL2 + + + false + + + + + + + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + false + + + + + + + + + + + + + qPixmapFromMimeSource + + PushButton1 + LineEdit1 + CheckButton1 + PushButton2 + LineEdit2 + + + + diff --git a/src/DlgRef/DlgRef_1SelExt_QTD.ui b/src/DlgRef/DlgRef_1SelExt_QTD.ui new file mode 100644 index 000000000..6b285a1b2 --- /dev/null +++ b/src/DlgRef/DlgRef_1SelExt_QTD.ui @@ -0,0 +1,94 @@ + + DlgRef_1SelExt_QTD + + + + 0 + 0 + 155 + 51 + + + + + + + + 0 + + + 0 + + + + + + 7 + 7 + 0 + 0 + + + + + + + + 9 + + + 6 + + + + + + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + + + + qPixmapFromMimeSource + + PushButton1 + LineEdit1 + + + + diff --git a/src/DlgRef/DlgRef_1Sel_QTD.ui b/src/DlgRef/DlgRef_1Sel_QTD.ui index 77f8c963e..ffcb8aa8c 100644 --- a/src/DlgRef/DlgRef_1Sel_QTD.ui +++ b/src/DlgRef/DlgRef_1Sel_QTD.ui @@ -82,6 +82,10 @@ qPixmapFromMimeSource + + PushButton1 + LineEdit1 + diff --git a/src/DlgRef/DlgRef_2SelExt_QTD.ui b/src/DlgRef/DlgRef_2SelExt_QTD.ui new file mode 100644 index 000000000..a5ab1a440 --- /dev/null +++ b/src/DlgRef/DlgRef_2SelExt_QTD.ui @@ -0,0 +1,132 @@ + + DlgRef_2SelExt_QTD + + + + 0 + 0 + 155 + 80 + + + + + + + + 0 + + + 6 + + + + + + 7 + 7 + 0 + 0 + + + + + + + + 9 + + + 6 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + false + + + + + + + + 0 + 0 + 0 + 0 + + + + TL1 + + + false + + + + + + + + + + + + + qPixmapFromMimeSource + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + + + + diff --git a/src/DlgRef/GEOM_DlgRef.cxx b/src/DlgRef/GEOM_DlgRef.cxx index d5b1aff90..66aa7e48f 100644 --- a/src/DlgRef/GEOM_DlgRef.cxx +++ b/src/DlgRef/GEOM_DlgRef.cxx @@ -51,6 +51,20 @@ DlgRef_1Sel1Check1List::~DlgRef_1Sel1Check1List() { } +////////////////////////////////////////// +// DlgRef_1Sel1Check1Sel +////////////////////////////////////////// + +DlgRef_1Sel1Check1Sel::DlgRef_1Sel1Check1Sel( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +DlgRef_1Sel1Check1Sel::~DlgRef_1Sel1Check1Sel() +{ +} + ////////////////////////////////////////// // DlgRef_1Sel1Check ////////////////////////////////////////// @@ -191,6 +205,20 @@ DlgRef_1Sel::~DlgRef_1Sel() { } +////////////////////////////////////////// +// DlgRef_1SelExt +////////////////////////////////////////// + +DlgRef_1SelExt::DlgRef_1SelExt( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +DlgRef_1SelExt::~DlgRef_1SelExt() +{ +} + ////////////////////////////////////////// // DlgRef_2Sel1List ////////////////////////////////////////// @@ -303,6 +331,20 @@ DlgRef_2Sel::~DlgRef_2Sel() { } +////////////////////////////////////////// +// DlgRef_2SelExt +////////////////////////////////////////// + +DlgRef_2SelExt::DlgRef_2SelExt( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +DlgRef_2SelExt::~DlgRef_2SelExt() +{ +} + ////////////////////////////////////////// // DlgRef_2Spin ////////////////////////////////////////// diff --git a/src/DlgRef/GEOM_DlgRef.h b/src/DlgRef/GEOM_DlgRef.h index 2ccf7a61c..def39e52b 100644 --- a/src/DlgRef/GEOM_DlgRef.h +++ b/src/DlgRef/GEOM_DlgRef.h @@ -66,6 +66,22 @@ public: ~DlgRef_1Sel1Check1List(); }; +////////////////////////////////////////// +// DlgRef_1Sel1Check1Sel +////////////////////////////////////////// + +#include "ui_DlgRef_1Sel1Check1Sel_QTD.h" + +class DLGREF_EXPORT DlgRef_1Sel1Check1Sel : public QWidget, + public Ui::DlgRef_1Sel1Check1Sel_QTD +{ + Q_OBJECT + +public: + DlgRef_1Sel1Check1Sel( QWidget* = 0, Qt::WindowFlags = 0 ); + ~DlgRef_1Sel1Check1Sel(); +}; + ////////////////////////////////////////// // DlgRef_1Sel1Check ////////////////////////////////////////// @@ -226,6 +242,22 @@ public: ~DlgRef_1Sel(); }; +////////////////////////////////////////// +// DlgRef_1SelExt +////////////////////////////////////////// + +#include "ui_DlgRef_1SelExt_QTD.h" + +class DLGREF_EXPORT DlgRef_1SelExt : public QWidget, + public Ui::DlgRef_1SelExt_QTD +{ + Q_OBJECT + +public: + DlgRef_1SelExt( QWidget* = 0, Qt::WindowFlags = 0 ); + ~DlgRef_1SelExt(); +}; + ////////////////////////////////////////// // DlgRef_2Sel1List ////////////////////////////////////////// @@ -354,6 +386,22 @@ public: ~DlgRef_2Sel(); }; +////////////////////////////////////////// +// DlgRef_2SelExt +////////////////////////////////////////// + +#include "ui_DlgRef_2SelExt_QTD.h" + +class DLGREF_EXPORT DlgRef_2SelExt : public QWidget, + public Ui::DlgRef_2SelExt_QTD +{ + Q_OBJECT + +public: + DlgRef_2SelExt( QWidget* = 0, Qt::WindowFlags = 0 ); + ~DlgRef_2SelExt(); +}; + ////////////////////////////////////////// // DlgRef_2Spin ////////////////////////////////////////// diff --git a/src/DlgRef/Makefile.am b/src/DlgRef/Makefile.am index cc3b6666d..44c4220fe 100644 --- a/src/DlgRef/Makefile.am +++ b/src/DlgRef/Makefile.am @@ -40,6 +40,7 @@ MOC_FILES = \ UIC_FILES = \ ui_DlgRef_1List1Spin1Btn_QTD.h \ ui_DlgRef_1Sel1Check1List_QTD.h \ + ui_DlgRef_1Sel1Check1Sel_QTD.h \ ui_DlgRef_1Sel1Check_QTD.h \ ui_DlgRef_1Sel1Spin1Check_QTD.h \ ui_DlgRef_1Sel1Spin_QTD.h \ @@ -49,6 +50,7 @@ UIC_FILES = \ ui_DlgRef_1Sel4Spin_QTD.h \ ui_DlgRef_1Sel5Spin_QTD.h \ ui_DlgRef_1Sel_QTD.h \ + ui_DlgRef_1SelExt_QTD.h \ ui_DlgRef_1Spin_QTD.h \ ui_DlgRef_2Sel1List_QTD.h \ ui_DlgRef_2Sel1Spin2Check_QTD.h \ @@ -58,6 +60,7 @@ UIC_FILES = \ ui_DlgRef_2Sel3Spin_QTD.h \ ui_DlgRef_2Sel4Spin1Check_QTD.h \ ui_DlgRef_2Sel_QTD.h \ + ui_DlgRef_2SelExt_QTD.h \ ui_DlgRef_2Spin_QTD.h \ ui_DlgRef_3Check_QTD.h \ ui_DlgRef_3Sel1Check_QTD.h \ diff --git a/src/MeasureGUI/GEOM_MeasureGUI.hxx b/src/MeasureGUI/GEOM_MeasureGUI.hxx deleted file mode 100755 index fd447a276..000000000 --- a/src/MeasureGUI/GEOM_MeasureGUI.hxx +++ /dev/null @@ -1,47 +0,0 @@ -// 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 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 -// -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// -// -// -// File : GEOM_MeasureGUI.hxx -// Author : Alexander A. BORODIN -// Module : GEOM - -#ifndef _GEOM_MeasureGUI_HXX_ -#define _GEOM_MeasureGUI_HXX_ - -#ifdef WNT - #if defined MEASUREGUI_EXPORTS - #if defined WIN32 - #define GEOM_MEASUREGUI_EXPORT __declspec( dllexport ) - #else - #define GEOM_MEASUREGUI_EXPORT - #endif - #else - #if defined WIN32 - #define GEOM_MEASUREGUI_EXPORT __declspec( dllimport ) - #else - #define GEOM_MEASUREGUI_EXPORT - #endif - #endif -#else - #define GEOM_MEASUREGUI_EXPORT -#endif - -#endif diff --git a/src/MeasureGUI/Makefile.am b/src/MeasureGUI/Makefile.am index c1a3d62a3..cdb294d2d 100644 --- a/src/MeasureGUI/Makefile.am +++ b/src/MeasureGUI/Makefile.am @@ -1,31 +1,28 @@ -# GEOM MEASUREGUI : +# GEOM MEASUREGUI : # -# 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 : MeasureGUI # -# -# 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,71 +32,88 @@ salomeinclude_HEADERS = # Libraries targets lib_LTLIBRARIES = libMeasureGUI.la -dist_libMeasureGUI_la_SOURCES = \ - MeasureGUI.cxx \ - MeasureGUI_Skeleton_QTD.cxx \ - MeasureGUI_1Sel3LineEdit_QTD.cxx \ - MeasureGUI_1Sel6LineEdit_QTD.cxx \ - MeasureGUI_1Sel12LineEdit_QTD.cxx \ - MeasureGUI_1Sel1TextView_QTD.cxx \ - MeasureGUI_2Sel1LineEdit_QTD.cxx \ - MeasureGUI_Skeleton.cxx \ - MeasureGUI_PropertiesDlg.cxx \ - MeasureGUI_CenterMassDlg.cxx \ - MeasureGUI_InertiaDlg.cxx \ - MeasureGUI_BndBoxDlg.cxx \ - MeasureGUI_DistanceDlg.cxx \ - MeasureGUI_MaxToleranceDlg.cxx \ - MeasureGUI_WhatisDlg.cxx \ - MeasureGUI_CheckShapeDlg.cxx \ +dist_libMeasureGUI_la_SOURCES = \ + MeasureGUI.h \ + MeasureGUI_Widgets.h \ + MeasureGUI_Skeleton.h \ + MeasureGUI_PropertiesDlg.h \ + MeasureGUI_CenterMassDlg.h \ + MeasureGUI_InertiaDlg.h \ + MeasureGUI_BndBoxDlg.h \ + MeasureGUI_DistanceDlg.h \ + MeasureGUI_MaxToleranceDlg.h \ + MeasureGUI_WhatisDlg.h \ + MeasureGUI_CheckShapeDlg.h \ + MeasureGUI_CheckCompoundOfBlocksDlg.h \ + MeasureGUI_PointDlg.h \ + \ + MeasureGUI.cxx \ + MeasureGUI_Widgets.cxx \ + MeasureGUI_Skeleton.cxx \ + MeasureGUI_PropertiesDlg.cxx \ + MeasureGUI_CenterMassDlg.cxx \ + MeasureGUI_InertiaDlg.cxx \ + MeasureGUI_BndBoxDlg.cxx \ + MeasureGUI_DistanceDlg.cxx \ + MeasureGUI_MaxToleranceDlg.cxx \ + MeasureGUI_WhatisDlg.cxx \ + MeasureGUI_CheckShapeDlg.cxx \ MeasureGUI_CheckCompoundOfBlocksDlg.cxx \ MeasureGUI_PointDlg.cxx -MOC_FILES = \ - MeasureGUI_Skeleton_QTD_moc.cxx \ - MeasureGUI_1Sel3LineEdit_QTD_moc.cxx \ - MeasureGUI_1Sel6LineEdit_QTD_moc.cxx \ - MeasureGUI_1Sel12LineEdit_QTD_moc.cxx \ - MeasureGUI_1Sel1TextView_QTD_moc.cxx \ - MeasureGUI_2Sel1LineEdit_QTD_moc.cxx \ - MeasureGUI_Skeleton_moc.cxx \ - MeasureGUI_PropertiesDlg_moc.cxx \ - MeasureGUI_CenterMassDlg_moc.cxx \ - MeasureGUI_InertiaDlg_moc.cxx \ - MeasureGUI_BndBoxDlg_moc.cxx \ - MeasureGUI_DistanceDlg_moc.cxx \ - MeasureGUI_MaxToleranceDlg_moc.cxx \ - MeasureGUI_WhatisDlg_moc.cxx \ - MeasureGUI_CheckShapeDlg_moc.cxx \ - MeasureGUI_CheckCompoundOfBlocksDlg_moc.cxx \ - MeasureGUI_PointDlg_moc.cxx +MOC_FILES = \ + MeasureGUI_Widgets_moc.cxx \ + MeasureGUI_Skeleton_moc.cxx \ + MeasureGUI_PropertiesDlg_moc.cxx \ + MeasureGUI_CenterMassDlg_moc.cxx \ + MeasureGUI_InertiaDlg_moc.cxx \ + MeasureGUI_BndBoxDlg_moc.cxx \ + MeasureGUI_DistanceDlg_moc.cxx \ + MeasureGUI_MaxToleranceDlg_moc.cxx \ + MeasureGUI_WhatisDlg_moc.cxx \ + MeasureGUI_CheckShapeDlg_moc.cxx \ + MeasureGUI_CheckCompoundOfBlocksDlg_moc.cxx \ + MeasureGUI_PointDlg_moc.cxx -nodist_libMeasureGUI_la_SOURCES= \ +nodist_libMeasureGUI_la_SOURCES = \ $(MOC_FILES) +UIC_FILES = \ + ui_MeasureGUI_1Sel12LineEdit_QTD.h \ + ui_MeasureGUI_1Sel1TextView1Check_QTD.h \ + ui_MeasureGUI_1Sel1TextView2ListBox_QTD.h \ + ui_MeasureGUI_1Sel1TextView_QTD.h \ + ui_MeasureGUI_1Sel3LineEdit_QTD.h \ + ui_MeasureGUI_1Sel6LineEdit_QTD.h \ + ui_MeasureGUI_2Sel1LineEdit_QTD.h \ + ui_MeasureGUI_SkeletonBox_QTD.h + +BUILT_SOURCES = $(UIC_FILES) + #LIB_CLIENT_IDL = SALOME_Exception.idl SALOME_GenericObj.idl SALOME_Component.idl #LIB_SERVER_IDL = # additionnal information to compil and link file -libMeasureGUI_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 \ +libMeasureGUI_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 libMeasureGUI_la_LDFLAGS = \ diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx index 3458594d3..cc3722cbe 100644 --- a/src/MeasureGUI/MeasureGUI.cxx +++ b/src/MeasureGUI/MeasureGUI.cxx @@ -1,37 +1,33 @@ -// 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 : MeasureGUI.cxx +// Author : Damien COQUERET, Open CASCADE S.A.S. // -// -// File : MeasureGUI.cxx -// Author : Damien COQUERET -// Module : GEOM -// $Header$ #include "MeasureGUI.h" -#include "SUIT_Desktop.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" -#include "SalomeApp_Application.h" +#include +#include +#include #include "MeasureGUI_PropertiesDlg.h" // Method PROPERTIES #include "MeasureGUI_CenterMassDlg.h" // Method CENTER MASS @@ -44,6 +40,8 @@ #include "MeasureGUI_CheckCompoundOfBlocksDlg.h" // Method CHECKCOMPOUND #include "MeasureGUI_PointDlg.h" // Method POINTCOORDINATES +#include + //======================================================================= // function : MeasureGUI() // purpose : Constructor @@ -72,22 +70,46 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) getGeometryGUI()->EmitSignalDeactivateDialog(); - switch ( theCommandID ) - { - case 701 : new MeasureGUI_PropertiesDlg (getGeometryGUI(), parent); break; // LENGTH, AREA AND VOLUME - case 702 : new MeasureGUI_CenterMassDlg (getGeometryGUI(), parent); break; // CENTER MASS - case 703 : new MeasureGUI_InertiaDlg (getGeometryGUI(), parent); break; // INERTIA - case 7041: new MeasureGUI_BndBoxDlg (getGeometryGUI(), parent); break; // BOUNDING BOX - case 7042: new MeasureGUI_DistanceDlg (getGeometryGUI(), parent); break; // MIN DISTANCE - case 705 : new MeasureGUI_MaxToleranceDlg(getGeometryGUI(), parent); break; // MAXTOLERANCE - case 706 : new MeasureGUI_WhatisDlg (getGeometryGUI(), parent); break; // WHATIS - case 707 : new MeasureGUI_CheckShapeDlg (getGeometryGUI(), parent); break; // CHECKSHAPE - case 7072: new MeasureGUI_CheckCompoundOfBlocksDlg (getGeometryGUI(), parent); break; // CHECKCOMPOUND - case 708 : new MeasureGUI_PointDlg (getGeometryGUI(), parent); break; // POINT COORDINATES - - default: - app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); - break; + QDialog* dlg = 0; + switch ( theCommandID ) { + case 701: + dlg = new MeasureGUI_PropertiesDlg( getGeometryGUI(), parent ); + break; // LENGTH, AREA AND VOLUME + case 702: + dlg = new MeasureGUI_CenterMassDlg( getGeometryGUI(), parent ); + break; // CENTER MASS + case 703: + dlg = new MeasureGUI_InertiaDlg( getGeometryGUI(), parent ); + break; // INERTIA + case 7041: + dlg = new MeasureGUI_BndBoxDlg( getGeometryGUI(), parent ); + break; // BOUNDING BOX + case 7042: + dlg = new MeasureGUI_DistanceDlg( getGeometryGUI(), parent ); + break; // MIN DISTANCE + case 705: + dlg = new MeasureGUI_MaxToleranceDlg( getGeometryGUI(), parent ); + break; // MAXTOLERANCE + case 706: + dlg = new MeasureGUI_WhatisDlg( getGeometryGUI(), parent ); + break; // WHATIS + case 707: + dlg = new MeasureGUI_CheckShapeDlg( getGeometryGUI(), parent ); + break; // CHECKSHAPE + case 7072: + dlg = new MeasureGUI_CheckCompoundOfBlocksDlg( getGeometryGUI(), parent ); + break; // CHECKCOMPOUND + case 708: + dlg = new MeasureGUI_PointDlg( getGeometryGUI(), parent ); + break; // POINT COORDINATES + default: + app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) ); + break; + } + if ( dlg ) { + dlg->updateGeometry(); + dlg->resize( dlg->minimumSize() ); + dlg->show(); } return true; } @@ -98,7 +120,9 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent ) //===================================================================================== extern "C" { -GEOM_MEASUREGUI_EXPORT +#ifdef WIN32 + __declspec( dllexport ) +#endif GEOMGUI* GetLibGUI( GeometryGUI* parent ) { return new MeasureGUI( parent ); diff --git a/src/MeasureGUI/MeasureGUI.h b/src/MeasureGUI/MeasureGUI.h index 295c3a742..6729193f0 100644 --- a/src/MeasureGUI/MeasureGUI.h +++ b/src/MeasureGUI/MeasureGUI.h @@ -1,48 +1,44 @@ -// 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 : MeasureGUI.h +// Author : Damien COQUERET, Open CASCADE S.A.S. // -// -// File : MeasureGUI.h -// Author : Damien COQUERET -// Module : GEOM #ifndef MEASUREGUI_H #define MEASUREGUI_H -#include "GEOM_MeasureGUI.hxx" - -#include "GEOMGUI.h" +#include //================================================================================= // class : MeasureGUI // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI : public GEOMGUI +class MeasureGUI : public GEOMGUI { public: - MeasureGUI( GeometryGUI* parent ); + MeasureGUI( GeometryGUI* ); ~MeasureGUI(); - bool OnGUIEvent( int , SUIT_Desktop* ); + bool OnGUIEvent( int, SUIT_Desktop* ); }; -#endif +#endif // MEASUREGUI_H diff --git a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx deleted file mode 100644 index a8c11caf8..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_1Sel12LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "MeasureGUI_1Sel12LineEdit_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_1Sel12LineEdit_QTD which is a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - */ -MeasureGUI_1Sel12LineEdit_QTD::MeasureGUI_1Sel12LineEdit_QTD( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "MeasureGUI_1Sel12LineEdit_QTD" ); - resize( 131, 171 ); - setCaption( trUtf8( "MeasureGUI_1Sel12LineEdit_QTD" ) ); - MeasureGUI_1Sel12LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel12LineEdit_QTDLayout"); - - GroupBox1 = new QGroupBox( this, "GroupBox1" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); - GroupBox1->setTitle( trUtf8( "" ) ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); - GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); - - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - LineEdit12 = new QLineEdit( GroupBox1, "LineEdit12" ); - - Layout2->addWidget( LineEdit12, 0, 2 ); - - LineEdit11 = new QLineEdit( GroupBox1, "LineEdit11" ); - - Layout2->addWidget( LineEdit11, 0, 1 ); - - LineEdit42 = new QLineEdit( GroupBox1, "LineEdit42" ); - - Layout2->addWidget( LineEdit42, 3, 2 ); - - TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); - TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); - TextLabel5->setText( trUtf8( "TL5" ) ); - - Layout2->addWidget( TextLabel5, 3, 0 ); - - LineEdit31 = new QLineEdit( GroupBox1, "LineEdit31" ); - - Layout2->addWidget( LineEdit31, 2, 1 ); - - LineEdit41 = new QLineEdit( GroupBox1, "LineEdit41" ); - - Layout2->addWidget( LineEdit41, 3, 1 ); - - LineEdit23 = new QLineEdit( GroupBox1, "LineEdit23" ); - - Layout2->addWidget( LineEdit23, 1, 3 ); - - LineEdit33 = new QLineEdit( GroupBox1, "LineEdit33" ); - - Layout2->addWidget( LineEdit33, 2, 3 ); - - LineEdit43 = new QLineEdit( GroupBox1, "LineEdit43" ); - - Layout2->addWidget( LineEdit43, 3, 3 ); - - LineEdit22 = new QLineEdit( GroupBox1, "LineEdit22" ); - - Layout2->addWidget( LineEdit22, 1, 2 ); - - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); - - Layout2->addWidget( TextLabel2, 0, 0 ); - - TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); - TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); - TextLabel4->setText( trUtf8( "TL4" ) ); - - Layout2->addWidget( TextLabel4, 2, 0 ); - - LineEdit13 = new QLineEdit( GroupBox1, "LineEdit13" ); - - Layout2->addWidget( LineEdit13, 0, 3 ); - - LineEdit32 = new QLineEdit( GroupBox1, "LineEdit32" ); - - Layout2->addWidget( LineEdit32, 2, 2 ); - - LineEdit21 = new QLineEdit( GroupBox1, "LineEdit21" ); - - Layout2->addWidget( LineEdit21, 1, 1 ); - - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); - TextLabel3->setText( trUtf8( "TL3" ) ); - - Layout2->addWidget( TextLabel3, 1, 0 ); - - Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout1->addWidget( LineEdit1, 0, 2 ); - QSpacerItem* spacer = new QSpacerItem( 0, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 2, 2 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); - - GroupBox1Layout->addLayout( Layout1, 0, 0 ); - - MeasureGUI_1Sel12LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_1Sel12LineEdit_QTD::~MeasureGUI_1Sel12LineEdit_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h deleted file mode 100644 index 92462c9bb..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_1Sel12LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef MEASUREGUI_1SEL12LINEEDIT_QTD_H -#define MEASUREGUI_1SEL12LINEEDIT_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel12LineEdit_QTD : public QWidget -{ - Q_OBJECT - -public: - MeasureGUI_1Sel12LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_1Sel12LineEdit_QTD(); - - QGroupBox* GroupBox1; - QLineEdit* LineEdit12; - QLineEdit* LineEdit11; - QLineEdit* LineEdit42; - QLabel* TextLabel5; - QLineEdit* LineEdit31; - QLineEdit* LineEdit41; - QLineEdit* LineEdit23; - QLineEdit* LineEdit33; - QLineEdit* LineEdit43; - QLineEdit* LineEdit22; - QLabel* TextLabel2; - QLabel* TextLabel4; - QLineEdit* LineEdit13; - QLineEdit* LineEdit32; - QLineEdit* LineEdit21; - QLabel* TextLabel3; - QLineEdit* LineEdit1; - QPushButton* PushButton1; - QLabel* TextLabel1; - - -protected: - QGridLayout* MeasureGUI_1Sel12LineEdit_QTDLayout; - QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; - QGridLayout* Layout2; -}; - -#endif // MEASUREGUI_1SEL12LINEEDIT_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.ui new file mode 100644 index 000000000..d1913681c --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.ui @@ -0,0 +1,156 @@ + + MeasureGUI_1Sel12LineEdit_QTD + + + + 0 + 0 + 155 + 151 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + + + + 0 + + + 6 + + + + + + + + + + + TL2 + + + + + + + + + + TL4 + + + + + + + + + + + + + + + + + + + + + + + + + TL5 + + + + + + + + + + + + + + + + TL3 + + + + + + + + + TL1 + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + PushButton1 + LineEdit1 + LineEdit11 + LineEdit12 + LineEdit13 + LineEdit21 + LineEdit22 + LineEdit23 + LineEdit31 + LineEdit32 + LineEdit33 + LineEdit41 + LineEdit42 + LineEdit43 + + + + diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView1Check_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel1TextView1Check_QTD.ui new file mode 100644 index 000000000..bb8e889df --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel1TextView1Check_QTD.ui @@ -0,0 +1,81 @@ + + MeasureGUI_1Sel1TextView1Check_QTD + + + + 0 + 0 + 160 + 171 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + Check + + + + + + + TL1 + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + + + + + + + PushButton1 + LineEdit1 + TextView1 + + + + diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView2ListBox_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel1TextView2ListBox_QTD.ui new file mode 100644 index 000000000..40016dd4f --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel1TextView2ListBox_QTD.ui @@ -0,0 +1,94 @@ + + MeasureGUI_1Sel1TextView2ListBox_QTD + + + + 0 + 0 + 235 + 271 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + + + + + + + + + + + + + TL2 + + + + + + + TL3 + + + + + + + TL1 + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + + + + PushButton1 + LineEdit1 + TextView1 + + + + diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.cxx deleted file mode 100644 index c812dad43..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.cxx +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_1Sel1TextView_QTD.ui' -** -** Created: mar oct 28 14:01:15 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "MeasureGUI_1Sel1TextView_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_1Sel1TextView_QTD which is a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - */ -MeasureGUI_1Sel1TextView_QTD::MeasureGUI_1Sel1TextView_QTD( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "MeasureGUI_1Sel1TextView_QTD" ); - resize( 130, 160 ); - setCaption( trUtf8( "MeasureGUI_1Sel1TextView_QTD" ) ); - MeasureGUI_1Sel1TextView_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel1TextView_QTDLayout"); - - GroupBox1 = new QGroupBox( this, "GroupBox1" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); - GroupBox1->setTitle( trUtf8( "" ) ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); - GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); - - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); - - TextEdit1 = new QTextEdit( GroupBox1, "TextEdit1" ); - - Layout1->addMultiCellWidget( TextEdit1, 1, 1, 0, 2 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout1->addWidget( LineEdit1, 0, 2 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - - GroupBox1Layout->addLayout( Layout1, 0, 0 ); - - MeasureGUI_1Sel1TextView_QTDLayout->addWidget( GroupBox1, 0, 0 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_1Sel1TextView_QTD::~MeasureGUI_1Sel1TextView_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h deleted file mode 100644 index 749da70fb..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_1Sel1TextView_QTD.ui' -** -** Created: mar oct 28 14:01:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef MEASUREGUI_1SEL1TEXTVIEW_QTD_H -#define MEASUREGUI_1SEL1TEXTVIEW_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; -class QTextEdit; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel1TextView_QTD : public QWidget -{ - Q_OBJECT - -public: - MeasureGUI_1Sel1TextView_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_1Sel1TextView_QTD(); - - QGroupBox* GroupBox1; - QLabel* TextLabel1; - QTextEdit* TextEdit1; - QLineEdit* LineEdit1; - QPushButton* PushButton1; - - -protected: - QGridLayout* MeasureGUI_1Sel1TextView_QTDLayout; - QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; -}; - -#endif // MEASUREGUI_1SEL1TEXTVIEW_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.ui new file mode 100644 index 000000000..bb070c54b --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.ui @@ -0,0 +1,74 @@ + + MeasureGUI_1Sel1TextView_QTD + + + + 0 + 0 + 155 + 145 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + TL1 + + + + + + + + + + PushButton1 + LineEdit1 + TextView1 + + + + diff --git a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.cxx deleted file mode 100644 index fe73bf13e..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.cxx +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_1Sel3LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:13 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "MeasureGUI_1Sel3LineEdit_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_1Sel3LineEdit_QTD which is a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - */ -MeasureGUI_1Sel3LineEdit_QTD::MeasureGUI_1Sel3LineEdit_QTD( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "MeasureGUI_1Sel3LineEdit_QTD" ); - resize( 129, 141 ); - setCaption( trUtf8( "MeasureGUI_1Sel3LineEdit_QTD" ) ); - MeasureGUI_1Sel3LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel3LineEdit_QTDLayout"); - - GroupBox1 = new QGroupBox( this, "GroupBox1" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); - GroupBox1->setTitle( trUtf8( "" ) ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); - GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout2->addWidget( TextLabel1, 0, 0 ); - - LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" ); - - Layout2->addMultiCellWidget( LineEdit4, 3, 3, 1, 2 ); - - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); - TextLabel3->setText( trUtf8( "TL3" ) ); - - Layout2->addWidget( TextLabel3, 2, 0 ); - - LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); - - Layout2->addMultiCellWidget( LineEdit2, 1, 1, 1, 2 ); - QSpacerItem* spacer = new QSpacerItem( 0, 80, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout2->addItem( spacer, 4, 2 ); - - LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); - - Layout2->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout2->addWidget( LineEdit1, 0, 2 ); - - TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); - TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); - TextLabel4->setText( trUtf8( "TL4" ) ); - - Layout2->addWidget( TextLabel4, 3, 0 ); - - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); - - Layout2->addWidget( TextLabel2, 1, 0 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout2->addWidget( PushButton1, 0, 1 ); - - GroupBox1Layout->addLayout( Layout2, 0, 0 ); - - MeasureGUI_1Sel3LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_1Sel3LineEdit_QTD::~MeasureGUI_1Sel3LineEdit_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h deleted file mode 100644 index 5bd97c8f9..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_1Sel3LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:13 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef MEASUREGUI_1SEL3LINEEDIT_QTD_H -#define MEASUREGUI_1SEL3LINEEDIT_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel3LineEdit_QTD : public QWidget -{ - Q_OBJECT - -public: - MeasureGUI_1Sel3LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_1Sel3LineEdit_QTD(); - - QGroupBox* GroupBox1; - QLabel* TextLabel1; - QLineEdit* LineEdit4; - QLabel* TextLabel3; - QLineEdit* LineEdit2; - QLineEdit* LineEdit3; - QLineEdit* LineEdit1; - QLabel* TextLabel4; - QLabel* TextLabel2; - QPushButton* PushButton1; - - -protected: - QGridLayout* MeasureGUI_1Sel3LineEdit_QTDLayout; - QGridLayout* GroupBox1Layout; - QGridLayout* Layout2; -}; - -#endif // MEASUREGUI_1SEL3LINEEDIT_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.ui new file mode 100644 index 000000000..5b6e0b33a --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.ui @@ -0,0 +1,103 @@ + + MeasureGUI_1Sel3LineEdit_QTD + + + + 0 + 0 + 156 + 123 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + + + + + + + + + + TL3 + + + + + + + TL4 + + + + + + + TL2 + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + TL1 + + + + + + + + + + + + + PushButton1 + LineEdit1 + LineEdit2 + LineEdit3 + LineEdit4 + + + + diff --git a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.cxx deleted file mode 100644 index 88629b699..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.cxx +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_1Sel6LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "MeasureGUI_1Sel6LineEdit_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_1Sel6LineEdit_QTD which is a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - */ -MeasureGUI_1Sel6LineEdit_QTD::MeasureGUI_1Sel6LineEdit_QTD( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "MeasureGUI_1Sel6LineEdit_QTD" ); - resize( 129, 163 ); - setCaption( trUtf8( "MeasureGUI_1Sel6LineEdit_QTD" ) ); - MeasureGUI_1Sel6LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_1Sel6LineEdit_QTDLayout"); - - GroupBox1 = new QGroupBox( this, "GroupBox1" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); - GroupBox1->setTitle( trUtf8( "" ) ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); - GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); - - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - QSpacerItem* spacer = new QSpacerItem( 0, 50, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 2, 2 ); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); - - Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - - LineEdit22 = new QLineEdit( GroupBox1, "LineEdit22" ); - - Layout2->addWidget( LineEdit22, 2, 2 ); - - LineEdit32 = new QLineEdit( GroupBox1, "LineEdit32" ); - - Layout2->addWidget( LineEdit32, 3, 2 ); - - TextLabel4 = new QLabel( GroupBox1, "TextLabel4" ); - TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) ); - TextLabel4->setText( trUtf8( "TL4" ) ); - - Layout2->addWidget( TextLabel4, 1, 0 ); - - LineEdit31 = new QLineEdit( GroupBox1, "LineEdit31" ); - - Layout2->addWidget( LineEdit31, 3, 1 ); - - TextLabel5 = new QLabel( GroupBox1, "TextLabel5" ); - TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) ); - TextLabel5->setText( trUtf8( "TL5" ) ); - - Layout2->addWidget( TextLabel5, 2, 0 ); - - LineEdit11 = new QLineEdit( GroupBox1, "LineEdit11" ); - - Layout2->addWidget( LineEdit11, 1, 1 ); - - TextLabel6 = new QLabel( GroupBox1, "TextLabel6" ); - TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) ); - TextLabel6->setText( trUtf8( "TL6" ) ); - - Layout2->addWidget( TextLabel6, 3, 0 ); - - LineEdit12 = new QLineEdit( GroupBox1, "LineEdit12" ); - - Layout2->addWidget( LineEdit12, 1, 2 ); - - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); - - Layout2->addWidget( TextLabel2, 0, 1 ); - - LineEdit21 = new QLineEdit( GroupBox1, "LineEdit21" ); - - Layout2->addWidget( LineEdit21, 2, 1 ); - - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); - TextLabel3->setText( trUtf8( "TL3" ) ); - - Layout2->addWidget( TextLabel3, 0, 2 ); - - Layout1->addMultiCellLayout( Layout2, 1, 1, 0, 2 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout1->addWidget( LineEdit1, 0, 2 ); - - GroupBox1Layout->addLayout( Layout1, 0, 0 ); - - MeasureGUI_1Sel6LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_1Sel6LineEdit_QTD::~MeasureGUI_1Sel6LineEdit_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h deleted file mode 100644 index 6805664ea..000000000 --- a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_1Sel6LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:13 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef MEASUREGUI_1SEL6LINEEDIT_QTD_H -#define MEASUREGUI_1SEL6LINEEDIT_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_1Sel6LineEdit_QTD : public QWidget -{ - Q_OBJECT - -public: - MeasureGUI_1Sel6LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_1Sel6LineEdit_QTD(); - - QGroupBox* GroupBox1; - QLabel* TextLabel1; - QLineEdit* LineEdit22; - QLineEdit* LineEdit32; - QLabel* TextLabel4; - QLineEdit* LineEdit31; - QLabel* TextLabel5; - QLineEdit* LineEdit11; - QLabel* TextLabel6; - QLineEdit* LineEdit12; - QLabel* TextLabel2; - QLineEdit* LineEdit21; - QLabel* TextLabel3; - QPushButton* PushButton1; - QLineEdit* LineEdit1; - - -protected: - QGridLayout* MeasureGUI_1Sel6LineEdit_QTDLayout; - QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; - QGridLayout* Layout2; -}; - -#endif // MEASUREGUI_1SEL6LINEEDIT_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.ui b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.ui new file mode 100644 index 000000000..eda315ed5 --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.ui @@ -0,0 +1,139 @@ + + MeasureGUI_1Sel6LineEdit_QTD + + + + 0 + 0 + 155 + 151 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + 0 + + + 6 + + + + + + + + + + + TL2 + + + + + + + + + + + + + + + + TL4 + + + + + + + TL3 + + + + + + + TL6 + + + + + + + TL5 + + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + TL1 + + + + + + + + + + + + + PushButton1 + LineEdit1 + LineEdit11 + LineEdit12 + LineEdit21 + LineEdit22 + LineEdit31 + LineEdit32 + + + + diff --git a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx deleted file mode 100644 index 5010e26b8..000000000 --- a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_2Sel1LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "MeasureGUI_2Sel1LineEdit_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_2Sel1LineEdit_QTD which is a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - */ -MeasureGUI_2Sel1LineEdit_QTD::MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "MeasureGUI_2Sel1LineEdit_QTD" ); - resize( 129, 115 ); - setCaption( trUtf8( "MeasureGUI_2Sel1LineEdit_QTD" ) ); - MeasureGUI_2Sel1LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_2Sel1LineEdit_QTDLayout"); - - GroupBox1 = new QGroupBox( this, "GroupBox1" ); - GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) ); - GroupBox1->setTitle( trUtf8( "" ) ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); - GroupBox1->layout()->setSpacing( 6 ); - GroupBox1->layout()->setMargin( 11 ); - GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); - - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - QSpacerItem* spacer = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding ); - Layout1->addItem( spacer, 3, 2 ); - - TextLabel3 = new QLabel( GroupBox1, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); - TextLabel3->setText( trUtf8( "TL3" ) ); - - Layout1->addWidget( TextLabel3, 2, 0 ); - - LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" ); - - Layout1->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 ); - - LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" ); - - Layout1->addWidget( LineEdit2, 1, 2 ); - - TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); - TextLabel2->setText( trUtf8( "TL2" ) ); - - Layout1->addWidget( TextLabel2, 1, 0 ); - - TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); - TextLabel1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel1->sizePolicy().hasHeightForWidth() ) ); - TextLabel1->setText( trUtf8( "TL1" ) ); - - Layout1->addWidget( TextLabel1, 0, 0 ); - - PushButton1 = new QPushButton( GroupBox1, "PushButton1" ); - PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) ); - PushButton1->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton1, 0, 1 ); - - LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" ); - - Layout1->addWidget( LineEdit1, 0, 2 ); - - PushButton2 = new QPushButton( GroupBox1, "PushButton2" ); - PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) ); - PushButton2->setText( trUtf8( "" ) ); - - Layout1->addWidget( PushButton2, 1, 1 ); - - GroupBox1Layout->addLayout( Layout1, 0, 0 ); - - MeasureGUI_2Sel1LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_2Sel1LineEdit_QTD::~MeasureGUI_2Sel1LineEdit_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h deleted file mode 100644 index b70505a87..000000000 --- a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_2Sel1LineEdit_QTD.ui' -** -** Created: mar oct 28 16:11:14 2003 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef MEASUREGUI_2SEL1LINEEDIT_QTD_H -#define MEASUREGUI_2SEL1LINEEDIT_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QGroupBox; -class QLabel; -class QLineEdit; -class QPushButton; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_2Sel1LineEdit_QTD : public QWidget -{ - Q_OBJECT - -public: - MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_2Sel1LineEdit_QTD(); - - QGroupBox* GroupBox1; - QLabel* TextLabel3; - QLineEdit* LineEdit3; - QLineEdit* LineEdit2; - QLabel* TextLabel2; - QLabel* TextLabel1; - QPushButton* PushButton1; - QLineEdit* LineEdit1; - QPushButton* PushButton2; - - -protected: - QGridLayout* MeasureGUI_2Sel1LineEdit_QTDLayout; - QGridLayout* GroupBox1Layout; - QGridLayout* Layout1; -}; - -#endif // MEASUREGUI_2SEL1LINEEDIT_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.ui b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.ui new file mode 100644 index 000000000..b3a7c2603 --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.ui @@ -0,0 +1,108 @@ + + MeasureGUI_2Sel1LineEdit_QTD + + + + 0 + 0 + 156 + 100 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + TL2 + + + + + + + TL3 + + + + + + + + + + + 0 + 0 + 0 + 0 + + + + + + + + + + + TL1 + + + + + + + + + + PushButton1 + LineEdit1 + PushButton2 + LineEdit2 + LineEdit3 + + + + diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx index 225195de5..8fc2a0ce5 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx @@ -1,73 +1,70 @@ -// 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 : MeasureGUI_BndBoxDlg.cxx +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_BndBoxDlg.cxx -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ #include "MeasureGUI_BndBoxDlg.h" -#include "MeasureGUI_1Sel6LineEdit_QTD.h" +#include "MeasureGUI_Widgets.h" -#include "GEOMBase.h" -#include "GEOM_Displayer.h" +#include +//#include #include -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" +#include +#include +#include -#include -#include -#include -#include -#include -#include +// #include +// #include +// #include +// #include +// #include +// #include //================================================================================= // class : MeasureGUI_BndBoxDlg() // purpose : Constructs a MeasureGUI_BndBoxDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PropertiesDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_BOUNDING_BOX" ) ) ); + "GEOM", tr( "ICON_DLG_BOUNDING_BOX" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_BNDBOX_TITLE" ) ); + setWindowTitle( tr( "GEOM_BNDBOX_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_BNDBOX" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_BNDBOX" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel6LineEdit_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel6LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_BNDBOX_OBJDIM" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextLabel2->setText( tr( "GEOM_MIN" ) ); @@ -75,16 +72,18 @@ MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg( GeometryGUI* GUI, QWidget* parent ) myGrp->TextLabel4->setText( tr( "GEOM_X" ) ); myGrp->TextLabel5->setText( tr( "GEOM_Y" ) ); myGrp->TextLabel6->setText( tr( "GEOM_Z" ) ); - myGrp->LineEdit11->setReadOnly( TRUE ); - myGrp->LineEdit12->setReadOnly( TRUE ); - myGrp->LineEdit21->setReadOnly( TRUE ); - myGrp->LineEdit22->setReadOnly( TRUE ); - myGrp->LineEdit31->setReadOnly( TRUE ); - myGrp->LineEdit32->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit11->setReadOnly( true ); + myGrp->LineEdit12->setReadOnly( true ); + myGrp->LineEdit21->setReadOnly( true ); + myGrp->LineEdit22->setReadOnly( true ); + myGrp->LineEdit31->setReadOnly( true ); + myGrp->LineEdit32->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -123,8 +122,7 @@ void MeasureGUI_BndBoxDlg::processObject() { double aXMin, aXMax, aYMin, aYMax, aZMin, aZMax; - if ( !getParameters( aXMin, aXMax, aYMin, aYMax, aZMin, aZMax ) ) - { + if ( !getParameters( aXMin, aXMax, aYMin, aYMax, aZMin, aZMax ) ) { mySelEdit->setText( "" ); myGrp->LineEdit11->setText( "" ); myGrp->LineEdit12->setText( "" ); @@ -133,9 +131,7 @@ void MeasureGUI_BndBoxDlg::processObject() myGrp->LineEdit31->setText( "" ); myGrp->LineEdit32->setText( "" ); } - else - { - + else { myGrp->LineEdit11->setText( tr( "%1" ).arg( aXMin, 12, 'f', 6 ) ); myGrp->LineEdit12->setText( tr( "%1" ).arg( aXMax, 12, 'f', 6 ) ); @@ -157,15 +153,12 @@ bool MeasureGUI_BndBoxDlg::getParameters( double& theXmin, double& theXmax, { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetBoundingBox( myObj, theXmin, theXmax, theYmin, theYmax, theZmin, theZmax ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h index cd563a115..e5624c711 100644 --- a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h +++ b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h @@ -1,65 +1,60 @@ -// 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 : MeasureGUI_BndBoxDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_BndBoxDlg.h -// Author : Nicolas REJNERI -// Module : GEOM - -#ifndef DIALOGBOX_BNDBOX_H -#define DIALOGBOX_BNDBOX_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_BNDBOXDLG_H +#define MEASUREGUI_BNDBOXDLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel6LineEdit_QTD; +class MeasureGUI_1Sel6LineEdit; //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton +class MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_BndBoxDlg(GeometryGUI* GUI, - QWidget* parent); - ~MeasureGUI_BndBoxDlg(); + MeasureGUI_BndBoxDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_BndBoxDlg(); protected: - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); - virtual SALOME_Prs* buildPrs(); + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual SALOME_Prs* buildPrs(); private: - void Init(); - bool getParameters( double& Xmin, double& Xmax, - double& Ymin, double& Ymax, - double& Zmin, double& Zmax ); + void Init(); + bool getParameters( double&, double&, + double&, double&, + double&, double& ); private: - MeasureGUI_1Sel6LineEdit_QTD* myGrp; + MeasureGUI_1Sel6LineEdit* myGrp; }; -#endif // DIALOGBOX_BNDBOX_H +#endif // MEASUREGUI_BNDBOXDLG_H diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx index ec3acf783..abcb6ed22 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx @@ -1,82 +1,84 @@ -// 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 : MeasureGUI_CenterMassDlg.cxx +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_CenterMassDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ #include "MeasureGUI_CenterMassDlg.h" -#include "MeasureGUI_1Sel3LineEdit_QTD.h" +#include "MeasureGUI_Widgets.h" + +#include +#include -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Application.h" -#include "LightApp_SelectionMgr.h" -#include "SalomeApp_Tools.h" +#include +#include +#include +#include +#include #include #include #include #include -#include - //================================================================================= // class : MeasureGUI_CenterMassDlg() // purpose : Constructs a MeasureGUI_CenterMassDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg( GeometryGUI* theGeometryGUI, QWidget* parent ) - : GEOMBase_Skeleton(theGeometryGUI, parent, "MeasureGUI_CenterMassDlg", 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_CENTERMASS"))); - QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); + QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_CENTERMASS" ) ) ); + QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_CMASS_TITLE" ) ); + setWindowTitle( tr( "GEOM_CMASS_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_CMASS" ) ); - RadioButton1->setPixmap( image0 ); - RadioButton2->close( TRUE ); - RadioButton3->close( TRUE ); - - myGrp = new MeasureGUI_1Sel3LineEdit_QTD( this, "myGrp" ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CMASS" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); + mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton3->close(); + + myGrp = new MeasureGUI_1Sel3LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_CENTER" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextLabel2->setText( tr( "GEOM_X" ) ); myGrp->TextLabel3->setText( tr( "GEOM_Y" ) ); myGrp->TextLabel4->setText( tr( "GEOM_Z" ) ); - myGrp->LineEdit2->setReadOnly( TRUE ); - myGrp->LineEdit3->setReadOnly( TRUE ); - myGrp->LineEdit4->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit2->setReadOnly( true ); + myGrp->LineEdit3->setReadOnly( true ); + myGrp->LineEdit4->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 2, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); + /***************************************************************/ myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Center_gravity"; @@ -105,22 +107,18 @@ void MeasureGUI_CenterMassDlg::Init() myEditCurrentArgument = myGrp->LineEdit1; /* 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( myGrp->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( myGrp->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - 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() ) ); initName( tr( "GEOM_POINT") ); globalSelection(); SelectionIntoArgument(); - - /* displays Dialog */ - myGrp->show(); - this->show(); } @@ -160,8 +158,7 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument() erasePreview(); myObj = GEOM::GEOM_Object::_nil(); - if ( IObjectCount() != 1 ) - { + if ( IObjectCount() != 1 ) { processObject(); return; } @@ -170,8 +167,7 @@ void MeasureGUI_CenterMassDlg::SelectionIntoArgument() GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); - if ( !testResult || aSelectedObject->_is_nil() ) - { + if ( !testResult || aSelectedObject->_is_nil() ) { processObject(); return; } @@ -201,8 +197,7 @@ void MeasureGUI_CenterMassDlg::SetEditCurrentArgument() void MeasureGUI_CenterMassDlg::LineEditReturnPressed() { QLineEdit* send = ( QLineEdit* )sender(); - if ( send == myGrp->LineEdit1 ) - { + if ( send == myGrp->LineEdit1 ) { myEditCurrentArgument = myGrp->LineEdit1; GEOMBase_Skeleton::LineEditReturnPressed(); } @@ -217,8 +212,8 @@ void MeasureGUI_CenterMassDlg::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() ) ); globalSelection(); displayPreview(); @@ -230,16 +225,14 @@ void MeasureGUI_CenterMassDlg::ActivateThisDialog() //================================================================================= void MeasureGUI_CenterMassDlg::processObject() { - if ( myObj->_is_nil() ) - { + if ( myObj->_is_nil() ) { myGrp->LineEdit1->setText( "" ); myGrp->LineEdit2->setText( "" ); myGrp->LineEdit3->setText( "" ); myGrp->LineEdit4->setText( "" ); erasePreview(); } - else - { + else { double x = 0, y = 0, z = 0; getParameters( x, y, z ); @@ -258,9 +251,9 @@ void MeasureGUI_CenterMassDlg::processObject() // function : enterEvent() // purpose : //================================================================================= -void MeasureGUI_CenterMassDlg::enterEvent( QEvent* e ) +void MeasureGUI_CenterMassDlg::enterEvent( QEvent* ) { - if ( !GroupConstructors->isEnabled() ) + if ( !mainFrame()->GroupConstructors->isEnabled() ) ActivateThisDialog(); } @@ -290,10 +283,8 @@ bool MeasureGUI_CenterMassDlg::getParameters( double& theX, double& theY, double { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { GEOM::GEOM_Object_var anObj; anObj = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetCentreOfMass( myObj ); if ( !getOperation()->IsDone() ) @@ -315,8 +306,7 @@ bool MeasureGUI_CenterMassDlg::getParameters( double& theX, double& theY, double return true; } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h index 943aee4c3..f96371e68 100644 --- a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h +++ b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h @@ -1,75 +1,70 @@ -// 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 : MeasureGUI_CenterMassDlg.h +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_CenterMassDlg.h -// Author : Lucien PIGNOLONI -// Module : GEOM - -#ifndef DIALOGBOX_CMASS_H -#define DIALOGBOX_CMASS_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_CENTERMASSDLG_H +#define MEASUREGUI_CENTERMASSDLG_H -#include "GEOMBase_Skeleton.h" +#include -class MeasureGUI_1Sel3LineEdit_QTD; +class MeasureGUI_1Sel3LineEdit; //================================================================================= // class : MeasureGUI_CenterMassDlg // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton +class MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_CenterMassDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_CenterMassDlg(); + MeasureGUI_CenterMassDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_CenterMassDlg(); 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 ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + private: - void Init( ); - void enterEvent( QEvent* e ); - void processObject(); - bool getParameters( double&, double&, double& ); - + void Init(); + void enterEvent( QEvent* ); + void processObject(); + bool getParameters( double&, double&, double& ); + private: - GEOM::GEOM_Object_var myObj; - MeasureGUI_1Sel3LineEdit_QTD* myGrp; + GEOM::GEOM_Object_var myObj; + MeasureGUI_1Sel3LineEdit* myGrp; }; -#endif // DIALOGBOX_CMASS_H +#endif // MEASUREGUI_CENTERMASSDLG_H diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx index 92470f71f..1640bc17a 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.cxx @@ -1,62 +1,45 @@ -// 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 : MeasureGUI_CheckCompoundOfBlocksDlg.cxx +// Author : Vladimir KLYACHIN, Open CASCADE S.A.S. (vladimir.klyachin@opencascade.com) // -// -// File : MeasureGUI_CheckCompoundOfBlocksDlg.cxx -// Author : VKN -// Module : GEOM -// $Header$ #include "MeasureGUI_CheckCompoundOfBlocksDlg.h" -#include "MeasureGUI_1Sel1TextView_QTD.h" +#include "MeasureGUI_Widgets.h" -#include "utilities.h" -#include "SUIT_Session.h" -#include "LightApp_SelectionMgr.h" -#include "SalomeApp_Tools.h" -#include "SalomeApp_Application.h" +#include +#include +#include +#include +#include #include #include #include -#include "GEOMBase.h" -#include "GEOMImpl_Types.hxx" - -#include -#include -#include -#include -#include -#include -// QT Includes -#include -#include -#include - -//VRV: porting on Qt 3.0.5 -#if QT_VERSION >= 0x030005 -#include -#endif -//VRV: porting on Qt 3.0.5 + +#include +#include +#include +#include #define TEXTEDIT_FONT_FAMILY "Courier" #define TEXTEDIT_FONT_SIZE 11 @@ -66,61 +49,49 @@ // purpose : Constructs a MeasureGUI_CheckCompoundOfBlocksDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_CheckCompoundOfBlocksDlg::MeasureGUI_CheckCompoundOfBlocksDlg( GeometryGUI* GUI, QWidget* parent ) - : GEOMBase_Skeleton(GUI, parent, "MeasureGUI_CheckCompoundOfBlocksDlg", false, WStyle_Customize | - WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose) + : GEOMBase_Skeleton( GUI, parent, false ) { SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr(); - QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_CHECK_COMPOUND_OF_BLOCKS"))); - QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT"))); + QPixmap image0( aResMgr->loadPixmap( "GEOM", tr( "ICON_DLG_CHECK_COMPOUND_OF_BLOCKS" ) ) ); + QPixmap image1( aResMgr->loadPixmap( "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_CHECK_BLOCKS_COMPOUND" ) ); + setWindowTitle( tr( "GEOM_CHECK_BLOCKS_COMPOUND" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_CHECK_BLOCKS_COMPOUND" ) ); - RadioButton1->setPixmap( image0 ); - RadioButton2->close( TRUE ); - RadioButton3->close( TRUE ); - - myGrp = new MeasureGUI_1Sel1TextView_QTD( this, "myGrp" ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CHECK_BLOCKS_COMPOUND" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); + mainFrame()->RadioButton2->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute( Qt::WA_DeleteOnClose ); + mainFrame()->RadioButton3->close(); + + myGrp = new MeasureGUI_1Sel1TextView2ListBox( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_CHECK_INFOS" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); - myGrp->TextEdit1->setReadOnly( TRUE ); + myGrp->TextView1->setReadOnly( true ); QFont aFont( TEXTEDIT_FONT_FAMILY, TEXTEDIT_FONT_SIZE ); aFont.setStyleHint( QFont::TypeWriter, QFont::PreferAntialias ); - myGrp->TextEdit1->setFont( aFont ); + myGrp->TextView1->setFont( aFont ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - /***************************************************************/ - QGridLayout* aGBLayout = new QGridLayout( myGrp->GroupBox1->layout() ); - aGBLayout->setAlignment( Qt::AlignTop ); - QGridLayout* Layout2 = new QGridLayout( 0, 1, 1, 0, 6, "Layout2"); - myErrorsLbl = new QLabel( tr( "GEOM_CHECK_BLOCKS_COMPOUND_ERRORS" ), myGrp, "Errors" ); - Layout2->addWidget( myErrorsLbl, 0, 0 ); - - myErrorsLBox = new QListBox( myGrp, "ListBlockCompoundErrors" ); - myErrorsLBox->setMinimumSize( 100, 100 ); - Layout2->addWidget( myErrorsLBox, 1, 0 ); - - mySubShapesLbl = new QLabel( tr( "GEOM_CHECK_BLOCKS_COMPOUND_SUBSHAPES" ), - myGrp, "BlockCompoundSubShapes" ); - Layout2->addWidget( mySubShapesLbl, 0, 1 ); - - mySubShapesLBox = new QListBox( myGrp, "ListSubShapes" ); - mySubShapesLBox->setMinimumSize( 100, 100 ); - mySubShapesLBox->setSelectionMode(QListBox::Extended); - Layout2->addWidget( mySubShapesLBox, 1, 1 ); - aGBLayout->addLayout( Layout2, 1, 0 ); - - Layout1->addWidget( myGrp, 2, 0 ); - - connect( myErrorsLBox, SIGNAL( selectionChanged() ), SLOT( onErrorsListSelectionChanged() ) ); - connect( mySubShapesLBox, SIGNAL( selectionChanged() ), SLOT( onSubShapesListSelectionChanged() ) ); + myGrp->TextLabel2->setText( tr( "GEOM_CHECK_BLOCKS_COMPOUND_ERRORS" ) ); + myGrp->TextLabel3->setText( tr( "GEOM_CHECK_BLOCKS_COMPOUND_SUBSHAPES" ) ); + + myGrp->ListBox2->setSelectionMode( QAbstractItemView::ExtendedSelection ); + + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); + + connect( myGrp->ListBox1, SIGNAL( itemSelectionChanged() ), SLOT( onErrorsListSelectionChanged() ) ); + connect( myGrp->ListBox2, SIGNAL( itemSelectionChanged() ), SLOT( onSubShapesListSelectionChanged() ) ); + /***************************************************************/ myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Check_comp_blocks"; @@ -146,23 +117,20 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::Init() myEditCurrentArgument = myGrp->LineEdit1; // 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( myGrp->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( myGrp->LineEdit1, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); + connect( myGrp->PushButton1, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); - connect(myGeomGUI->getApp()->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); initName( tr( "GEOM_BLOCKS_COMPOUND") ); - buttonOk->setEnabled(false); - buttonApply->setEnabled(false); + buttonOk()->setEnabled( false ); + buttonApply()->setEnabled( false ); activateSelection(); SelectionIntoArgument(); - - // displays Dialog - this->show(); } //================================================================================= @@ -171,7 +139,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::Init() //================================================================================= void MeasureGUI_CheckCompoundOfBlocksDlg::ClickOnOk() { - if (ClickOnApply()) + if ( ClickOnApply() ) ClickOnCancel(); } @@ -197,8 +165,8 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::SelectionIntoArgument() erasePreview(); myObj = GEOM::GEOM_Object::_nil(); - if (IObjectCount() != 1) { - myGrp->LineEdit1->setText(""); + if ( IObjectCount() != 1 ) { + myGrp->LineEdit1->setText( "" ); processObject(); return; } @@ -207,14 +175,14 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::SelectionIntoArgument() GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); - if (!testResult || aSelectedObject->_is_nil()) { - myGrp->LineEdit1->setText(""); + if ( !testResult || aSelectedObject->_is_nil() ) { + myGrp->LineEdit1->setText( "" ); processObject(); return; } myObj = aSelectedObject; - myGrp->LineEdit1->setText(GEOMBase::GetName(myObj)); + myGrp->LineEdit1->setText( GEOMBase::GetName( myObj ) ); processObject(); displayPreview(); } @@ -237,7 +205,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::SetEditCurrentArgument() void MeasureGUI_CheckCompoundOfBlocksDlg::LineEditReturnPressed() { QLineEdit* send = (QLineEdit*)sender(); - if (send == myGrp->LineEdit1) { + if ( send == myGrp->LineEdit1 ) { myEditCurrentArgument = myGrp->LineEdit1; GEOMBase_Skeleton::LineEditReturnPressed(); } @@ -252,8 +220,8 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::ActivateThisDialog() GEOMBase_Skeleton::ActivateThisDialog(); LightApp_SelectionMgr* aSel = myGeomGUI->getApp()->selectionMgr(); - if (aSel) - connect(aSel, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); + if ( aSel ) + connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT( SelectionIntoArgument() ) ); activateSelection(); displayPreview(); @@ -268,17 +236,14 @@ bool MeasureGUI_CheckCompoundOfBlocksDlg::getBCErrors( bool& theIsCompoundOfBloc { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { GEOM::GEOM_IBlocksOperations::BCErrors_var aErrs; theIsCompoundOfBlocks = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() )->CheckCompoundOfBlocks( myObj, aErrs ); theErrors = aErrs; } - catch( const SALOME::SALOME_Exception& e ) - { + catch ( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } @@ -293,28 +258,28 @@ bool MeasureGUI_CheckCompoundOfBlocksDlg::getBCErrors( bool& theIsCompoundOfBloc //================================================================================= void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() { - QString aMsg (""); + QString aMsg ( "" ); bool isCompoundOfBlocks; GEOM::GEOM_IBlocksOperations::BCErrors aErrs; - if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) - { - myGrp->TextEdit1->setText( aMsg ); - myErrorsLBox->clear(); - mySubShapesLBox->clear(); + if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) { + myGrp->TextView1->setText( aMsg ); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); erasePreview(); return; } - if (isCompoundOfBlocks) { + if ( isCompoundOfBlocks ) { aMsg += tr( "GEOM_CHECK_BLOCKS_COMPOUND_HAS_NO_ERRORS" ); - buttonOk->setEnabled(false); - buttonApply->setEnabled(false); - } else { + buttonOk()->setEnabled( false ); + buttonApply()->setEnabled( false ); + } + else { aMsg += tr( "GEOM_CHECK_BLOCKS_COMPOUND_HAS_ERRORS" ); - buttonOk->setEnabled(true); - buttonApply->setEnabled(true); + buttonOk()->setEnabled( true ); + buttonApply()->setEnabled( true ); } - myGrp->TextEdit1->setText(aMsg); + myGrp->TextView1->setText( aMsg ); QStringList aErrList; QString aErrStr( "" ); @@ -322,11 +287,9 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() QString aGluedSfx( " # " ); int aConNum = 1; int aGluedNum = 1; - for ( int i = 0, n = aErrs.length(); i < n; i++ ) - { + for ( int i = 0, n = aErrs.length(); i < n; i++ ) { aErrStr = ""; - switch ( aErrs[i].error ) - { + switch ( aErrs[i].error ) { case GEOM::GEOM_IBlocksOperations::NOT_BLOCK : aErrStr = "Not a Block"; break; @@ -336,7 +299,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() case GEOM::GEOM_IBlocksOperations::INVALID_CONNECTION : aErrStr = "Invalid Connection"; aErrStr += aConSfx; - aErrStr += QString::number(aConNum); + aErrStr += QString::number( aConNum ); aConNum++; break; case GEOM::GEOM_IBlocksOperations::NOT_CONNECTED : @@ -345,7 +308,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() case GEOM::GEOM_IBlocksOperations::NOT_GLUED : aErrStr = "Not Glued"; aErrStr += aGluedSfx; - aErrStr += QString::number(aGluedNum); + aErrStr += QString::number( aGluedNum ); aGluedNum++; break; default : @@ -353,12 +316,12 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() break; } if ( !aErrStr.isEmpty() ) - aErrList.append(aErrStr); + aErrList.append( aErrStr ); } - myErrorsLBox->clear(); - mySubShapesLBox->clear(); - myErrorsLBox->insertStringList(aErrList); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); + myGrp->ListBox1->addItems( aErrList ); } //================================================================================= @@ -367,7 +330,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::processObject() //================================================================================= GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation() { - return getGeomEngine()->GetIBlocksOperations(getStudyId()); + return getGeomEngine()->GetIBlocksOperations( getStudyId() ); } //================================================================================= @@ -377,16 +340,15 @@ GEOM::GEOM_IOperations_ptr MeasureGUI_CheckCompoundOfBlocksDlg::createOperation( void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged() { erasePreview(); - int aCurItem = myErrorsLBox->currentItem(); + int aCurItem = myGrp->ListBox1->currentRow(); if ( aCurItem < 0 ) return; bool isCompoundOfBlocks; GEOM::GEOM_IBlocksOperations::BCErrors aErrs; - if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) - { - myGrp->TextEdit1->setText( "" ); - myErrorsLBox->clear(); - mySubShapesLBox->clear(); + if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) { + myGrp->TextView1->setText( "" ); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); return; } @@ -396,23 +358,21 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged() TopoDS_Shape aSubShape; TopTools_IndexedMapOfShape anIndices; QStringList aSubShapeList; - QString aSubShapeName(""); + QString aSubShapeName( "" ); Standard_CString aTypeString; - if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) - { + if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) { TopExp::MapShapes( aSelShape, anIndices); - for ( int i = 0, n = aObjLst.length(); i < n; i++ ) - { + for ( int i = 0, n = aObjLst.length(); i < n; i++ ) { aSubShapeName = ""; aSubShape = anIndices.FindKey(aObjLst[i]); if ( GEOMBase::GetShapeTypeString( aSubShape, aTypeString ) ) - aSubShapeName = QString(aTypeString) + QString("_") + QString::number(aObjLst[i]); + aSubShapeName = QString( aTypeString ) + QString( "_" ) + QString::number( aObjLst[i] ); if ( !aSubShapeName.isEmpty() ) - aSubShapeList.append(aSubShapeName); + aSubShapeList.append( aSubShapeName ); } } - mySubShapesLBox->clear(); - mySubShapesLBox->insertStringList(aSubShapeList); + myGrp->ListBox2->clear(); + myGrp->ListBox2->addItems( aSubShapeList ); } //================================================================================= @@ -422,24 +382,22 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onErrorsListSelectionChanged() void MeasureGUI_CheckCompoundOfBlocksDlg::onSubShapesListSelectionChanged() { erasePreview(); - int aErrCurItem = myErrorsLBox->currentItem(); + int aErrCurItem = myGrp->ListBox1->currentRow(); if ( aErrCurItem < 0 ) return; - QValueList aIds; - for ( int i = 0, n = mySubShapesLBox->count(); i < n; i++ ) - { - if ( mySubShapesLBox->isSelected( i ) ) + QList aIds; + for ( int i = 0, n = myGrp->ListBox2->count(); i < n; i++ ) { + if ( myGrp->ListBox2->item( i )->isSelected() ) aIds.append( i ); } if ( aIds.count() < 1 ) return; bool isCompoundOfBlocks; GEOM::GEOM_IBlocksOperations::BCErrors aErrs; - if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) - { - myGrp->TextEdit1->setText( "" ); - myErrorsLBox->clear(); - mySubShapesLBox->clear(); + if ( !getBCErrors( isCompoundOfBlocks, aErrs ) ) { + myGrp->TextView1->setText( "" ); + myGrp->ListBox1->clear(); + myGrp->ListBox2->clear(); return; } @@ -448,21 +406,17 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onSubShapesListSelectionChanged() TopoDS_Shape aSelShape; TopoDS_Shape aSubShape; TopTools_IndexedMapOfShape anIndices; - if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) - { + if ( !myObj->_is_nil() && GEOMBase::GetShape( myObj, aSelShape ) ) { QString aMess; - if ( !isValid( aMess ) ) - { + if ( !isValid( aMess ) ) { return; } SALOME_Prs* aPrs = 0; TopExp::MapShapes( aSelShape, anIndices); - QValueList::iterator it; - for ( it = aIds.begin(); it != aIds.end(); ++it ) - { + QList::iterator it; + for ( it = aIds.begin(); it != aIds.end(); ++it ) { aSubShape = anIndices.FindKey(aObjLst[(*it)]); - try - { + try { getDisplayer()->SetColor( Quantity_NOC_RED ); getDisplayer()->SetWidth( 3 ); getDisplayer()->SetToActivate( false ); @@ -470,8 +424,7 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::onSubShapesListSelectionChanged() if ( aPrs ) displayPreview( aPrs, true ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch ( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); } } @@ -494,9 +447,9 @@ void MeasureGUI_CheckCompoundOfBlocksDlg::activateSelection() // function : enterEvent() // purpose : //================================================================================= -void MeasureGUI_CheckCompoundOfBlocksDlg::enterEvent(QEvent* e) +void MeasureGUI_CheckCompoundOfBlocksDlg::enterEvent( QEvent* ) { - if (!GroupConstructors->isEnabled()) + if ( !mainFrame()->GroupConstructors->isEnabled() ) ActivateThisDialog(); } @@ -517,10 +470,10 @@ bool MeasureGUI_CheckCompoundOfBlocksDlg::execute( ObjectList& objects ) { GEOM::GEOM_Object_var anObj; - anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())->CheckAndImprove(myObj); + anObj = GEOM::GEOM_IBlocksOperations::_narrow( getOperation() )->CheckAndImprove( myObj ); - if (!anObj->_is_nil()) - objects.push_back(anObj._retn()); + if ( !anObj->_is_nil() ) + objects.push_back( anObj._retn() ); return true; } diff --git a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h index 58c1b2749..ecf310953 100644 --- a/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckCompoundOfBlocksDlg.h @@ -1,86 +1,76 @@ -// 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 : MeasureGUI_CheckCompoundOfBlocksDlg.h +// Author : Vladimir KLYACHIN, Open CASCADE S.A.S. (vladimir.klyachin@opencascade.com) // -// -// File : MeasureGUI_CheckCompoundOfBlocksDlg.h -// Author : VKN -// Module : GEOM - -#ifndef DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H -#define DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_CHECKCOMPOUNDOFBLOCKSDLG_H +#define MEASUREGUI_CHECKCOMPOUNDOFBLOCKSDLG_H -#include "GEOMBase_Skeleton.h" +#include -class MeasureGUI_1Sel1TextView_QTD; -class QListBox; -class QLabel; +class MeasureGUI_1Sel1TextView2ListBox; //================================================================================= // class : MeasureGUI_CheckCompoundOfBlocksDlg // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton + +class MeasureGUI_CheckCompoundOfBlocksDlg : public GEOMBase_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_CheckCompoundOfBlocksDlg(GeometryGUI* GUI, QWidget* theParent); - ~MeasureGUI_CheckCompoundOfBlocksDlg(); - + MeasureGUI_CheckCompoundOfBlocksDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_CheckCompoundOfBlocksDlg(); + protected: - // redefined from GEOMBase_Helper and GEOMBase_Skeleton - virtual GEOM::GEOM_IOperations_ptr createOperation(); - virtual bool isValid( QString& msg ); - virtual bool execute( ObjectList& objects ); - virtual void processObject(); + // redefined from GEOMBase_Helper and GEOMBase_Skeleton + virtual GEOM::GEOM_IOperations_ptr createOperation(); + virtual bool isValid( QString& ); + virtual bool execute( ObjectList& ); + virtual void processObject(); private slots: - void ClickOnOk(); - bool ClickOnApply(); - void ActivateThisDialog(); - void LineEditReturnPressed(); - void SelectionIntoArgument(); - void SetEditCurrentArgument(); - - void onErrorsListSelectionChanged(); - void onSubShapesListSelectionChanged(); - + void ClickOnOk(); + bool ClickOnApply(); + void ActivateThisDialog(); + void LineEditReturnPressed(); + void SelectionIntoArgument(); + void SetEditCurrentArgument(); + + void onErrorsListSelectionChanged(); + void onSubShapesListSelectionChanged(); + private: - void Init(); - void enterEvent( QEvent* e ); - bool getBCErrors( bool& theIsCompoundOfBlocks, - GEOM::GEOM_IBlocksOperations::BCErrors& theErrors); - void activateSelection(); + void Init(); + void enterEvent( QEvent* ); + bool getBCErrors( bool&, + GEOM::GEOM_IBlocksOperations::BCErrors& ); + void activateSelection(); private: - GEOM::GEOM_Object_var myObj; - MeasureGUI_1Sel1TextView_QTD* myGrp; - - QLabel* myErrorsLbl; - QListBox* myErrorsLBox; - QLabel* mySubShapesLbl; - QListBox* mySubShapesLBox; + GEOM::GEOM_Object_var myObj; + MeasureGUI_1Sel1TextView2ListBox* myGrp; }; -#endif // DIALOGBOX_CHECKCOMPOUNDOFBLOCKSDLG_H +#endif // MEASUREGUI_CHECKCOMPOUNDOFBLOCKSDLG_H diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx index 795107a57..811c27448 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx @@ -1,99 +1,74 @@ -// 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 : MeasureGUI_CheckShapeDlg.cxx +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_CheckShapeDlg.cxx -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ #include "MeasureGUI_CheckShapeDlg.h" +#include "MeasureGUI_Widgets.h" -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" - -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include #define TEXTEDIT_FONT_FAMILY "Courier" #define TEXTEDIT_FONT_SIZE 11 -MeasureGUI_1Sel1TextView1Check_QTD::MeasureGUI_1Sel1TextView1Check_QTD(QWidget* parent, - const char* name, WFlags fl) - : MeasureGUI_1Sel1TextView_QTD(parent, name, fl) -{ - CheckBoxGeom = new QCheckBox(GroupBox1, "CheckBoxGeom"); - CheckBoxGeom->setText(tr("CHECK_SHAPE_GEOMETRY")); - Layout1->addMultiCellWidget(CheckBoxGeom, 2, 2, 0, 2); - - CheckBoxGeom->setChecked(false); -} - -MeasureGUI_1Sel1TextView1Check_QTD::~MeasureGUI_1Sel1TextView1Check_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - //================================================================================= // class : MeasureGUI_CheckShapeDlg() // purpose : Constructs a MeasureGUI_CheckShapeDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_CheckShapeDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_CHECKSHAPE" ) ) ); + "GEOM", tr( "ICON_DLG_CHECKSHAPE" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_CHECK_TITLE" ) ); + setWindowTitle( tr( "GEOM_CHECK_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_CHECK_SHAPE" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_CHECK_SHAPE" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel1TextView1Check_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel1TextView1Check( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_CHECK_INFOS" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); - myGrp->TextEdit1->setReadOnly( TRUE ); + myGrp->TextView1->setReadOnly( true ); QFont aFont( TEXTEDIT_FONT_FAMILY, TEXTEDIT_FONT_SIZE ); aFont.setStyleHint( QFont::TypeWriter, QFont::PreferAntialias ); - myGrp->TextEdit1->setFont( aFont ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->TextView1->setFont( aFont ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -122,8 +97,8 @@ void MeasureGUI_CheckShapeDlg::Init() mySelEdit = myGrp->LineEdit1; MeasureGUI_Skeleton::Init(); - connect(myGrp->CheckBoxGeom, SIGNAL(toggled(bool)), - this, SLOT(SelectionIntoArgument())); + connect( myGrp->CheckBox1, SIGNAL( toggled( bool) ), + this, SLOT( SelectionIntoArgument() ) ); } //================================================================================= @@ -134,22 +109,19 @@ bool MeasureGUI_CheckShapeDlg::getParameters ( bool& theIsValid, QString& theMsg { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { char* aMsg; - bool isCheckGeometry = myGrp->CheckBoxGeom->isChecked(); + bool isCheckGeometry = myGrp->CheckBox1->isChecked(); GEOM::GEOM_IMeasureOperations_ptr aMeasureOp = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() ); - if (isCheckGeometry) - theIsValid = aMeasureOp->CheckShapeWithGeometry(myObj, aMsg); + if ( isCheckGeometry ) + theIsValid = aMeasureOp->CheckShapeWithGeometry( myObj, aMsg ); else - theIsValid = aMeasureOp->CheckShape(myObj, aMsg); + theIsValid = aMeasureOp->CheckShape( myObj, aMsg ); theMsg = aMsg; } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } @@ -167,18 +139,18 @@ void MeasureGUI_CheckShapeDlg::processObject() { bool isShapeValid; QString aMsg; - if ( !getParameters( isShapeValid, aMsg ) ) - { - myGrp->TextEdit1->setText( "" ); + if ( !getParameters( isShapeValid, aMsg ) ) { + myGrp->TextView1->setText( "" ); return; } - if (isShapeValid) { - myGrp->TextEdit1->setText("This Shape seems to be valid."); - } else { - QString aDescr ("This Shape is not valid.\n"); + if ( isShapeValid ) { + myGrp->TextView1->setText( "This Shape seems to be valid." ); + } + else { + QString aDescr ( "This Shape is not valid.\n" ); aDescr += aMsg; - myGrp->TextEdit1->setText(aDescr); -// myGrp->TextEdit1->setText("This Shape is not valid."); + myGrp->TextView1->setText( aDescr ); +// myGrp->TextView1->setText("This Shape is not valid."); } } diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h index ba89aff2b..6c94beede 100644 --- a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h +++ b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h @@ -1,77 +1,57 @@ -// 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 : MeasureGUI_CheckShapeDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_CheckShapeDlg.h -// Author : Nicolas REJNERI -// Module : GEOM - -#ifndef DIALOGBOX_CHECKSHAPEDLG_H -#define DIALOGBOX_CHECKSHAPEDLG_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_CHECKSHAPEDLG_H +#define MEASUREGUI_CHECKSHAPEDLG_H #include "MeasureGUI_Skeleton.h" -#include "MeasureGUI_1Sel1TextView_QTD.h" - -class QCheckBox; - -//================================================================================= -// class : MeasureGUI_1Sel1TextView1Check_QTD -// purpose : -//================================================================================= -class MeasureGUI_1Sel1TextView1Check_QTD : public MeasureGUI_1Sel1TextView_QTD -{ - Q_OBJECT -public: - MeasureGUI_1Sel1TextView1Check_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~MeasureGUI_1Sel1TextView1Check_QTD(); - - QCheckBox* CheckBoxGeom; -}; +class MeasureGUI_1Sel1TextView1Check; //================================================================================= // class : MeasureGUI_CheckShapeDlg // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton +class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_CheckShapeDlg(GeometryGUI* GUI, QWidget* parent); - ~MeasureGUI_CheckShapeDlg(); + MeasureGUI_CheckShapeDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_CheckShapeDlg(); protected: - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); private: - void Init(); - bool getParameters(bool& theIsValid, QString& theMsg); + void Init(); + bool getParameters( bool&, QString& ); private: - MeasureGUI_1Sel1TextView1Check_QTD* myGrp; + MeasureGUI_1Sel1TextView1Check* myGrp; }; -#endif // DIALOGBOX_CHECKSHAPEDLG_H +#endif // MEASUREGUI_CHECKSHAPEDLG_H diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx index d7ac8ed90..851ce0172 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx @@ -1,94 +1,85 @@ -// 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 : MeasureGUI_DistanceDlg.cxx +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_DistanceDlg.cxx -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ #include "MeasureGUI_DistanceDlg.h" -#include "MeasureGUI_2Sel1LineEdit_QTD.h" -#include "GEOMBase.h" -#include "GEOM_Displayer.h" +#include "MeasureGUI_Widgets.h" + +#include -#include "SUIT_Session.h" -#include "SUIT_ViewWindow.h" -#include "SOCC_Prs.h" -#include "SOCC_ViewModel.h" -#include "SalomeApp_Tools.h" +#include +#include +#include +#include +#include +#include +#include +#include #include -#include #include #include #include -#include #include #include -#include "utilities.h" - -#include -#include -#include -#include -#include -#include - //================================================================================= // class : MeasureGUI_DistanceDlg() // purpose : Constructs a MeasureGUI_DistanceDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_DistanceDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_MINDIST" ) ) ); + "GEOM", tr( "ICON_DLG_MINDIST" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_MINDIST_TITLE" ) ); + setWindowTitle( tr( "GEOM_MINDIST_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_DISTANCE" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_DISTANCE" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_2Sel1LineEdit_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_2Sel1LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_MINDIST_OBJ" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT_I" ).arg( "1" ) ); myGrp->TextLabel2->setText( tr( "GEOM_OBJECT_I" ).arg( "2" ) ); myGrp->TextLabel3->setText( tr( "GEOM_LENGTH" ) ); - myGrp->LineEdit3->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); - myGrp->PushButton2->setPixmap( image1 ); + myGrp->LineEdit3->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); + myGrp->PushButton2->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); myGrp->LineEdit2->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -122,7 +113,7 @@ void MeasureGUI_DistanceDlg::Init() myEditCurrentArgument = mySelEdit; connect( mySelEdit2, SIGNAL( returnPressed() ), this, SLOT( LineEditReturnPressed() ) ); - connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); + connect( mySelBtn2, SIGNAL( clicked() ), this, SLOT( SetEditCurrentArgument() ) ); MeasureGUI_Skeleton::Init(); @@ -143,9 +134,9 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument() aSelectedObject = GEOM::GEOM_Object::_nil(); if ( myEditCurrentArgument == mySelEdit ) - myObj = aSelectedObject; - else - myObj2 = aSelectedObject; + myObj = aSelectedObject; + else + myObj2 = aSelectedObject; processObject(); } @@ -161,13 +152,11 @@ void MeasureGUI_DistanceDlg::processObject() gp_Pnt aPnt1, aPnt2; double aDist = 0.; - if ( getParameters( aDist, aPnt1, aPnt2 ) ) - { + if ( getParameters( aDist, aPnt1, aPnt2 ) ) { myGrp->LineEdit3->setText( QString( "%1" ).arg( aDist ) ); redisplayPreview(); } - else - { + else { myGrp->LineEdit3->setText( "" ); erasePreview(); } @@ -185,10 +174,8 @@ bool MeasureGUI_DistanceDlg::getParameters( double& theDistance, QString msg; if ( !isValid( msg ) ) return false; - else - { - try - { + else { + try { double x1, y1, z1, x2, y2, z2; theDistance = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetMinDistance( myObj, myObj2, x1, y1, z1, x2, y2, z2 ); @@ -196,8 +183,7 @@ bool MeasureGUI_DistanceDlg::getParameters( double& theDistance, thePnt1.SetCoord( x1, y1, z1 ); thePnt2.SetCoord( x2, y2, z2 ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } @@ -215,13 +201,11 @@ void MeasureGUI_DistanceDlg::SetEditCurrentArgument() { QPushButton* send = ( QPushButton* )sender(); - if( send == mySelBtn ) - { + if ( send == mySelBtn ) { mySelEdit->setFocus(); myEditCurrentArgument = mySelEdit; } - else - { + else { mySelEdit2->setFocus(); myEditCurrentArgument = mySelEdit2; } @@ -238,7 +222,7 @@ void MeasureGUI_DistanceDlg::LineEditReturnPressed() { QLineEdit* send = ( QLineEdit* )sender(); - if( send == mySelEdit ) + if ( send == mySelEdit ) myEditCurrentArgument = mySelEdit; else myEditCurrentArgument = mySelEdit2; @@ -264,13 +248,11 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() try { - if( aDist <= 1.e-9 ) - { + if( aDist <= 1.e-9 ) { BRepBuilderAPI_MakeVertex aMaker( aPnt1 ); return getDisplayer()->BuildPrs( aMaker.Vertex() ); } - else - { + else { BRepBuilderAPI_MakeEdge MakeEdge( aPnt1, aPnt2 ); TopoDS_Vertex aVert1 = BRepBuilderAPI_MakeVertex( aPnt1 ); TopoDS_Vertex aVert2 = BRepBuilderAPI_MakeVertex( aPnt2 ); @@ -286,8 +268,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() gp_Vec va( aPnt3, aPnt1 ); gp_Vec vb( aPnt3, aPnt2 ); - if ( va.IsParallel( vb, Precision::Angular() ) ) - { + if ( va.IsParallel( vb, Precision::Angular() ) ) { aPnt3.SetY( ( aPnt1.Y() + aPnt2.Y() ) / 2 + 100 ); aPnt3.SetZ( ( aPnt1.Z() + aPnt2.Z() ) / 2 ); } @@ -296,7 +277,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() Handle( Geom_Plane ) P = new Geom_Plane( gce_MP.Value() ); Handle( AIS_LengthDimension ) anIO = new AIS_LengthDimension( - aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.latin1() ) ); + aVert1, aVert2, P, aDist, TCollection_ExtendedString( (Standard_CString)aLabel.toLatin1().constData() ) ); SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow(); SOCC_Prs* aPrs = dynamic_cast( ((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs( 0 ) ); @@ -310,8 +291,7 @@ SALOME_Prs* MeasureGUI_DistanceDlg::buildPrs() return aPrs; } } - catch( Standard_Failure ) - { + catch( Standard_Failure ) { return 0; } } diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h index 77c619db3..fd4d697dc 100644 --- a/src/MeasureGUI/MeasureGUI_DistanceDlg.h +++ b/src/MeasureGUI/MeasureGUI_DistanceDlg.h @@ -1,78 +1,70 @@ -// 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 : MeasureGUI_DistanceDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_DistanceDlg.h -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ - -#ifndef DIALOGBOX_DISTANCE_H -#define DIALOGBOX_DISTANCE_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_DISTANCEDLG_H +#define MEASUREGUI_DISTANCEDLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_2Sel1LineEdit_QTD; +class MeasureGUI_2Sel1LineEdit; class gp_Pnt; //================================================================================= // class : MeasureGUI_DistanceDlg // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton -{ - Q_OBJECT +class MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton +{ + Q_OBJECT + public: - MeasureGUI_DistanceDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_DistanceDlg(); -protected: + MeasureGUI_DistanceDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_DistanceDlg(); - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); - virtual SALOME_Prs* buildPrs(); - virtual void SelectionIntoArgument(); - virtual void LineEditReturnPressed(); - virtual void SetEditCurrentArgument(); - virtual bool isValid( QString& msg ); +protected: + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual SALOME_Prs* buildPrs(); + virtual void SelectionIntoArgument(); + virtual void LineEditReturnPressed(); + virtual void SetEditCurrentArgument(); + virtual bool isValid( QString& ); private: - - void Init(); - bool getParameters( double& theDistance, - gp_Pnt& thePnt1, - gp_Pnt& thePnt2 ); + void Init(); + bool getParameters( double&, + gp_Pnt&, + gp_Pnt& ); private: - - QLineEdit* myEditCurrentArgument; - QLineEdit* mySelEdit2; - QPushButton* mySelBtn2; - - MeasureGUI_2Sel1LineEdit_QTD* myGrp; - GEOM::GEOM_Object_var myObj2; - + QLineEdit* myEditCurrentArgument; + QLineEdit* mySelEdit2; + QPushButton* mySelBtn2; + + MeasureGUI_2Sel1LineEdit* myGrp; + GEOM::GEOM_Object_var myObj2; }; -#endif // DIALOGBOX_DISTANCE_H +#endif // MEASUREGUI_DISTANCEDLG_H diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx index cd2a6743e..115768284 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx @@ -1,98 +1,87 @@ -// 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 : MeasureGUI_InertiaDlg.cxx +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_InertiaDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM #include "MeasureGUI_InertiaDlg.h" -#include "MeasureGUI_1Sel12LineEdit_QTD.h" +#include "MeasureGUI_Widgets.h" -#include "GEOMBase.h" +#include -#include -#include -#include #include -#include - -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include //================================================================================= // class : MeasureGUI_InertiaDlg() // purpose : Constructs a MeasureGUI_InertiaDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_InertiaDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr( "ICON_DLG_INERTIA" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM",tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_INERTIA_TITLE" ) ); + setWindowTitle( tr( "GEOM_INERTIA_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_INERTIA_CONSTR" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_INERTIA_CONSTR" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel12LineEdit_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel12LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_MATRIX" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextLabel2->setText( tr( "GEOM_INERTIA_I" ).arg( "1" ) ); myGrp->TextLabel3->setText( tr( "GEOM_INERTIA_I" ).arg( "2" ) ); myGrp->TextLabel4->setText( tr( "GEOM_INERTIA_I" ).arg( "3" ) ); myGrp->TextLabel5->setText( tr( "GEOM_INERTIA_IXYZ" ) ); - myGrp->LineEdit11->setReadOnly( TRUE ); - myGrp->LineEdit12->setReadOnly( TRUE ); - myGrp->LineEdit13->setReadOnly( TRUE ); - myGrp->LineEdit21->setReadOnly( TRUE ); - myGrp->LineEdit22->setReadOnly( TRUE ); - myGrp->LineEdit23->setReadOnly( TRUE ); - myGrp->LineEdit31->setReadOnly( TRUE ); - myGrp->LineEdit32->setReadOnly( TRUE ); - myGrp->LineEdit33->setReadOnly( TRUE ); - myGrp->LineEdit41->setReadOnly( TRUE ); - myGrp->LineEdit42->setReadOnly( TRUE ); - myGrp->LineEdit43->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit11->setReadOnly( true ); + myGrp->LineEdit12->setReadOnly( true ); + myGrp->LineEdit13->setReadOnly( true ); + myGrp->LineEdit21->setReadOnly( true ); + myGrp->LineEdit22->setReadOnly( true ); + myGrp->LineEdit23->setReadOnly( true ); + myGrp->LineEdit31->setReadOnly( true ); + myGrp->LineEdit32->setReadOnly( true ); + myGrp->LineEdit33->setReadOnly( true ); + myGrp->LineEdit41->setReadOnly( true ); + myGrp->LineEdit42->setReadOnly( true ); + myGrp->LineEdit43->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -132,8 +121,7 @@ void MeasureGUI_InertiaDlg::processObject() gp_XYZ anIXYZ; gp_Mat aMat; - if ( !getParameters( aMat, anIXYZ ) ) - { + if ( !getParameters( aMat, anIXYZ ) ) { mySelEdit->setText( "" ); myGrp->LineEdit11->setText( "" ); @@ -152,8 +140,7 @@ void MeasureGUI_InertiaDlg::processObject() myGrp->LineEdit42->setText( "" ); myGrp->LineEdit43->setText( "" ); } - else - { + else { myGrp->LineEdit11->setText( QString( "%1" ).arg( aMat( 1, 1 ), 12, 'e', 4 ) ); myGrp->LineEdit12->setText( QString( "%1" ).arg( aMat( 1, 2 ), 12, 'e', 4 ) ); myGrp->LineEdit13->setText( QString( "%1" ).arg( aMat( 1, 3 ), 12, 'e', 4 ) ); @@ -181,10 +168,8 @@ bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I, { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { double x, y, z; GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetInertia( myObj, I( 1, 1 ), I( 1, 2 ), I( 1, 3 ), @@ -194,8 +179,7 @@ bool MeasureGUI_InertiaDlg::getParameters( gp_Mat& I, theIXYZ.SetCoord( x, y, z ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch ( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.h b/src/MeasureGUI/MeasureGUI_InertiaDlg.h index 0905d5219..ad211d1fa 100644 --- a/src/MeasureGUI/MeasureGUI_InertiaDlg.h +++ b/src/MeasureGUI/MeasureGUI_InertiaDlg.h @@ -1,39 +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 : MeasureGUI_InertiaDlg.h +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_InertiaDlg.h -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ - -#ifndef DIALOGBOX_INERTIA_H -#define DIALOGBOX_INERTIA_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_INERTIADLG_H +#define MEASUREGUI_INERTIADLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel12LineEdit_QTD; +class MeasureGUI_1Sel12LineEdit; class gp_XYZ; class gp_Mat; @@ -42,28 +37,24 @@ class gp_Mat; // purpose : Dialog for displaying moment of inertia //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton +class MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton { - Q_OBJECT - + Q_OBJECT + public: - MeasureGUI_InertiaDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_InertiaDlg(); -protected: - - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); + MeasureGUI_InertiaDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_InertiaDlg(); +protected: + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + private: - - void Init(); - bool getParameters( gp_Mat& theMatrix, - gp_XYZ& theMoment ); - + void Init(); + bool getParameters( gp_Mat&, gp_XYZ& ); + private: - - MeasureGUI_1Sel12LineEdit_QTD* myGrp; + MeasureGUI_1Sel12LineEdit* myGrp; }; -#endif // DIALOGBOX_INERTIA_H +#endif // MEASUREGUI_INERTIADLG_H diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx index ed42f2126..7bdcaff3e 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx @@ -1,68 +1,58 @@ -// 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 : MeasureGUI_MaxToleranceDlg.cxx +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_MaxToleranceDlg.cxx -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ #include "MeasureGUI_MaxToleranceDlg.h" -#include "MeasureGUI_1Sel6LineEdit_QTD.h" - -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" +#include "MeasureGUI_Widgets.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include //================================================================================= // class : MeasureGUI_MaxToleranceDlg() // purpose : Constructs a MeasureGUI_MaxToleranceDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_MaxToleranceDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_TOLERANCE" ) ) ); + "GEOM", tr( "ICON_DLG_TOLERANCE" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_TOLERANCE_TITLE" ) ); + setWindowTitle( tr( "GEOM_TOLERANCE_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_TOLERANCE" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_TOLERANCE" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel6LineEdit_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel6LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_TOLERANCE_CONSTR" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextLabel2->setText( tr( "GEOM_MIN" ) ); @@ -70,16 +60,18 @@ MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg( GeometryGUI* GUI, QWidge myGrp->TextLabel4->setText( tr( "GEOM_TOLERANCE_FACE" ) ); myGrp->TextLabel5->setText( tr( "GEOM_TOLERANCE_EDGE" ) ); myGrp->TextLabel6->setText( tr( "GEOM_TOLERANCE_VERTEX" ) ); - myGrp->LineEdit11->setReadOnly( TRUE ); - myGrp->LineEdit12->setReadOnly( TRUE ); - myGrp->LineEdit21->setReadOnly( TRUE ); - myGrp->LineEdit22->setReadOnly( TRUE ); - myGrp->LineEdit31->setReadOnly( TRUE ); - myGrp->LineEdit32->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->LineEdit11->setReadOnly( true ); + myGrp->LineEdit12->setReadOnly( true ); + myGrp->LineEdit21->setReadOnly( true ); + myGrp->LineEdit22->setReadOnly( true ); + myGrp->LineEdit31->setReadOnly( true ); + myGrp->LineEdit32->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -122,8 +114,7 @@ void MeasureGUI_MaxToleranceDlg::processObject() if ( !getParameters( aMinFaceToler, aMaxFaceToler, aMinEdgeToler, aMaxEdgeToler, - aMinVertexToler, aMaxVertexToler ) ) - { + aMinVertexToler, aMaxVertexToler ) ) { myGrp->LineEdit11->setText( "" ); myGrp->LineEdit12->setText( "" ); @@ -164,16 +155,13 @@ bool MeasureGUI_MaxToleranceDlg::getParameters( double& theMinFaceToler, { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetTolerance( myObj, - theMinFaceToler, theMaxFaceToler, theMinEdgeToler, - theMaxEdgeToler, theMinVertexToler, theMaxVertexToler ); + theMinFaceToler, theMaxFaceToler, theMinEdgeToler, + theMaxEdgeToler, theMinVertexToler, theMaxVertexToler ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h index 1b36bca03..b2039f0d0 100644 --- a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h +++ b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h @@ -1,76 +1,61 @@ -// 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 : MeasureGUI_MaxToleranceDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_MaxToleranceDlg.h -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ - -#ifndef DIALOGBOX_MAXTOLERANCE_H -#define DIALOGBOX_MAXTOLERANCE_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_MAXTOLERANCEDLG_H +#define MEASUREGUI_MAXTOLERANCEDLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel6LineEdit_QTD; +class MeasureGUI_1Sel6LineEdit; //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton +class MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_MaxToleranceDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_MaxToleranceDlg(); + MeasureGUI_MaxToleranceDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_MaxToleranceDlg(); protected: - - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); private: - - void Init(); - bool getParameters( double& theMinFaceToler, - double& theMaxFaceToler, - double& theMinEdgeToler, - double& theMaxEdgeToler, - double& theMinVertexToler, - double& theMaxVertexToler ); - - - + void Init(); + bool getParameters( double&, double&, double&, + double&, double&, double& ); + private: - - MeasureGUI_1Sel6LineEdit_QTD* myGrp; + MeasureGUI_1Sel6LineEdit* myGrp; }; -#endif // DIALOGBOX_MAXTOLERANCE_H +#endif // MEASUREGUI_MAXTOLERANCEDLG_H diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.cxx b/src/MeasureGUI/MeasureGUI_PointDlg.cxx index 1a14cc347..f6d9695a7 100644 --- a/src/MeasureGUI/MeasureGUI_PointDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PointDlg.cxx @@ -1,103 +1,83 @@ -// 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 : MeasureGUI_PointDlg.cxx +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_PointDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ #include "MeasureGUI_PointDlg.h" -#include "GEOMBase.h" +#include "MeasureGUI_Widgets.h" + +#include -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Application.h" -#include "LightApp_SelectionMgr.h" +#include +#include +#include +#include -#include -#include +//#include +//#include #include #include #include #include #include -#include +//#include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include - //================================================================================= // class : MeasureGUI_PointDlg() // purpose : Constructs a MeasureGUI_PointDlg which is a child of 'parent' // //================================================================================= MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PointDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap iconPnt( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_POINT" ) ) ); + "GEOM", tr( "ICON_DLG_POINT" ) ) ); QPixmap iconSelect( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "CAPTION" ) ); + setWindowTitle( tr( "CAPTION" ) ); - GroupConstructors->setTitle( tr( "CAPTION" ) ); - RadioButton1->setPixmap( iconPnt ); + mainFrame()->GroupConstructors->setTitle( tr( "CAPTION" ) ); + mainFrame()->RadioButton1->setIcon( iconPnt ); - QGroupBox* aGrp = new QGroupBox( 2, Qt::Horizontal, tr( "COORDINATES" ), this ); - - new QLabel( tr( "POINT" ), aGrp ); - QFrame* aFrame = new QFrame( aGrp ); - mySelBtn = new QPushButton( aFrame ); - mySelBtn->setPixmap( iconSelect ); - mySelEdit = new QLineEdit( aFrame ); - QHBoxLayout* aLay = new QHBoxLayout( aFrame, 0, 10 ); - aLay->addWidget( mySelBtn ); - aLay->addWidget( mySelEdit ); - - new QLabel( tr( "X" ), aGrp ); - myX = new QLineEdit( aGrp ); - new QLabel( tr( "Y" ), aGrp ); - myY = new QLineEdit( aGrp ); - new QLabel( tr( "Z" ), aGrp ); - myZ = new QLineEdit( aGrp ); - - mySelEdit->setReadOnly( true ); - myX->setReadOnly( true ); - myY->setReadOnly( true ); - myZ->setReadOnly( true ); - - Layout1->addWidget( aGrp, 1, 0 ); + myGrp = new MeasureGUI_1Sel3LineEdit( centralWidget() ); + myGrp->TextLabel1->setText( tr( "POINT" ) ); + myGrp->PushButton1->setIcon( iconSelect ); + myGrp->LineEdit1->setReadOnly( true ); + myGrp->TextLabel2->setText( tr( "X" ) ); + myGrp->TextLabel3->setText( tr( "Y" ) ); + myGrp->TextLabel4->setText( tr( "Z" ) ); + myGrp->LineEdit2->setReadOnly( true ); + myGrp->LineEdit3->setReadOnly( true ); + myGrp->LineEdit4->setReadOnly( true ); + + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#PointCoord"; @@ -108,7 +88,7 @@ MeasureGUI_PointDlg::MeasureGUI_PointDlg( GeometryGUI* GUI, QWidget* parent ) //================================================================================= // function : ~MeasureGUI_PointDlg() // purpose : Destroys the object and frees any allocated resources -//======================myX->setReadOnly( true );=========================================================== +//======================myGrp->LineEdit2->setReadOnly( true );=========================================================== MeasureGUI_PointDlg::~MeasureGUI_PointDlg() { } @@ -140,25 +120,24 @@ void MeasureGUI_PointDlg::activateSelection() //================================================================================= void MeasureGUI_PointDlg::SelectionIntoArgument() { - try - { + try { myObj = GEOM::GEOM_Object::_nil(); - mySelEdit->setText( "" ); - myX->setText( "" ); - myY->setText( "" ); - myZ->setText( "" ); + myGrp->LineEdit1->setText( "" ); + myGrp->LineEdit2->setText( "" ); + myGrp->LineEdit3->setText( "" ); + myGrp->LineEdit4->setText( "" ); Standard_Boolean testResult = Standard_False; GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); - if( !testResult || aSelectedObject->_is_nil() ) + if ( !testResult || aSelectedObject->_is_nil() ) return; myObj = aSelectedObject; TColStd_IndexedMapOfInteger anIndexes; - ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))-> + ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )-> selectionMgr()->GetIndexes( firstIObject(), anIndexes ); TopoDS_Shape aShape; @@ -167,13 +146,11 @@ void MeasureGUI_PointDlg::SelectionIntoArgument() TopoDS_Vertex aPoint; QString aName = GEOMBase::GetName( myObj ); - if ( anIndexes.Extent() == 0 ) - { + if ( anIndexes.Extent() == 0 ) { if ( aShape.ShapeType() == TopAbs_VERTEX ) aPoint = TopoDS::Vertex( aShape ); } - else - { + else { int i = anIndexes( 1 ); TopTools_IndexedMapOfShape aShapes; @@ -185,41 +162,20 @@ void MeasureGUI_PointDlg::SelectionIntoArgument() aPoint = TopoDS::Vertex( aShapes( i ) ); } - if ( !aPoint.IsNull() ) - { + if ( !aPoint.IsNull() ) { gp_Pnt aPnt = BRep_Tool::Pnt( aPoint ); - mySelEdit->setText( aName ); - myX->setText( QString( "%1" ).arg( aPnt.X() ) ); - myY->setText( QString( "%1" ).arg( aPnt.Y() ) ); - myZ->setText( QString( "%1" ).arg( aPnt.Z() ) ); + myGrp->LineEdit1->setText( aName ); + myGrp->LineEdit2->setText( QString( "%1" ).arg( aPnt.X() ) ); + myGrp->LineEdit3->setText( QString( "%1" ).arg( aPnt.Y() ) ); + myGrp->LineEdit4->setText( QString( "%1" ).arg( aPnt.Z() ) ); } } catch( ... ) { myObj = GEOM::GEOM_Object::_nil(); - mySelEdit->setText( "" ); - myX->setText( "" ); - myY->setText( "" ); - myZ->setText( "" ); + myGrp->LineEdit1->setText( "" ); + myGrp->LineEdit2->setText( "" ); + myGrp->LineEdit3->setText( "" ); + myGrp->LineEdit4->setText( "" ); } } - - - - - - - - - - - - - - - - - - - - diff --git a/src/MeasureGUI/MeasureGUI_PointDlg.h b/src/MeasureGUI/MeasureGUI_PointDlg.h index ca2789816..c54e21d33 100644 --- a/src/MeasureGUI/MeasureGUI_PointDlg.h +++ b/src/MeasureGUI/MeasureGUI_PointDlg.h @@ -1,81 +1,58 @@ -// 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 : MeasureGUI_PointDlg.h +// Author : Sergey LITONIN, Open CASCADE S.A.S. (sergey.litonin@opencascade.com) // -// -// File : MeasureGUI_PointDlg.h -// Author : Sergey LITONIN -// Module : GEOM #ifndef MEASUREGUI_POINTDLG_H #define MEASUREGUI_POINTDLG_H -#include "GEOM_MeasureGUI.hxx" - #include "MeasureGUI_Skeleton.h" -class QLineEdit; +class MeasureGUI_1Sel3LineEdit; //================================================================================= // class : MeasureGUI_PointDlg // purpose : Dialog for displaying point coordinates //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_PointDlg : public MeasureGUI_Skeleton +class MeasureGUI_PointDlg : public MeasureGUI_Skeleton { Q_OBJECT public: - MeasureGUI_PointDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_PointDlg(); + MeasureGUI_PointDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_PointDlg(); protected: - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton virtual void activateSelection(); virtual void SelectionIntoArgument(); - + private: - void Init(); -private: - QLineEdit* myX; - QLineEdit* myY; - QLineEdit* myZ; +private: + MeasureGUI_1Sel3LineEdit* myGrp; }; -#endif // DIALOGBOX_PROPERTIES_H - - - - - - - - - - - - - - +#endif // MEASUREGUI_POINTDLG_H diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx index ea3bb594c..13bc440e3 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx @@ -1,85 +1,77 @@ -// 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 : MeasureGUI_PropertiesDlg.cxx +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_PropertiesDlg.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ #include "MeasureGUI_PropertiesDlg.h" -#include "MeasureGUI_1Sel3LineEdit_QTD.h" -#include "GEOM_Displayer.h" -#include "GEOMImpl_Types.hxx" -#include "GEOMBase.h" +#include "MeasureGUI_Widgets.h" -#include "SalomeApp_Tools.h" -#include "utilities.h" -#include "SUIT_Session.h" +#include +#include -#include +#include +#include +#include -#include -#include -#include -#include -#include -#include +#include //================================================================================= // class : MeasureGUI_PropertiesDlg() // purpose : Constructs a MeasureGUI_PropertiesDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_PropertiesDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_BASICPROPERTIES" ) ) ); + "GEOM", tr( "ICON_DLG_BASICPROPERTIES" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_PROPERTIES_TITLE" ) ); + setWindowTitle( tr( "GEOM_PROPERTIES_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_PROPERTIES" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PROPERTIES" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel3LineEdit_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel3LineEdit( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_PROPERTIES_CONSTR" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); myGrp->TextLabel2->setText( tr( "GEOM_LENGTH" ) ); myGrp->TextLabel3->setText( tr( "GEOM_PROPERTIES_SURFACE" ) ); myGrp->TextLabel4->setText( tr( "GEOM_PROPERTIES_VOLUME" ) ); - myGrp->LineEdit2->setReadOnly( TRUE ); - myGrp->LineEdit3->setReadOnly( TRUE ); - myGrp->LineEdit4->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); myGrp->LineEdit1->setReadOnly( true ); - - Layout1->addWidget( myGrp, 1, 0 ); + myGrp->PushButton1->setIcon( image1 ); + myGrp->LineEdit2->setReadOnly( true ); + myGrp->LineEdit3->setReadOnly( true ); + myGrp->LineEdit4->setReadOnly( true ); + + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -117,10 +109,9 @@ void MeasureGUI_PropertiesDlg::Init() void MeasureGUI_PropertiesDlg::activateSelection() { static TColStd_MapOfInteger aTypes; - if ( aTypes.IsEmpty() ) - { + if ( aTypes.IsEmpty() ) { aTypes.Add( GEOM_COMPOUND ); -// aTypes.Add( TopAbs_COMPSOLID ); + // aTypes.Add( TopAbs_COMPSOLID ); aTypes.Add( GEOM_SOLID ); aTypes.Add( GEOM_SHELL ); aTypes.Add( GEOM_FACE ); @@ -139,15 +130,13 @@ void MeasureGUI_PropertiesDlg::processObject() { double aLength, anArea, aVolume; - if ( !getParameters( aLength, anArea, aVolume ) ) - { + if ( !getParameters( aLength, anArea, aVolume ) ) { mySelEdit->setText( "" ); myGrp->LineEdit2->setText( "" ); myGrp->LineEdit3->setText( "" ); myGrp->LineEdit4->setText( "" ); } - else - { + else { myGrp->LineEdit2->setText( QString( "%1" ).arg( aLength ) ); myGrp->LineEdit3->setText( QString( "%1" ).arg( anArea ) ); myGrp->LineEdit4->setText( QString( "%1" ).arg( aVolume ) ); @@ -164,15 +153,12 @@ bool MeasureGUI_PropertiesDlg::getParameters( double& theLength, { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->GetBasicProperties( myObj, theLength, theArea, theVolume ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } @@ -190,7 +176,7 @@ SALOME_Prs* MeasureGUI_PropertiesDlg::buildPrs() TopoDS_Shape aShape, aResult; if ( myObj->_is_nil() || - !GEOMBase::GetShape( myObj, aShape )|| + !GEOMBase::GetShape( myObj, aShape ) || aShape.IsNull() || aShape.ShapeType() != TopAbs_EDGE || !GEOMBase::CreateArrowForLinearEdge( aShape, aResult ) || diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h index 0689c5806..992c23ca4 100644 --- a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h +++ b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h @@ -1,83 +1,62 @@ -// 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 : MeasureGUI_PropertiesDlg.h +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_PropertiesDlg.h -// Author : Lucien PIGNOLONI -// Module : GEOM - -#ifndef DIALOGBOX_PROPERTIES_H -#define DIALOGBOX_PROPERTIES_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_PROPERTIESDLG_H +#define MEASUREGUI_PROPERTIESDLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel3LineEdit_QTD; + +class MeasureGUI_1Sel3LineEdit; //================================================================================= // class : MeasureGUI_PropertiesDlg // purpose : Dialog for displaying length, area and volume //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton +class MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_PropertiesDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_PropertiesDlg(); - + MeasureGUI_PropertiesDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_PropertiesDlg(); + protected: - - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); - virtual void activateSelection(); - virtual SALOME_Prs* buildPrs(); + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + virtual void activateSelection(); + virtual SALOME_Prs* buildPrs(); private: - - void Init(); - bool getParameters( double& theLength, - double& theArea, - double& theVolume ); + void Init(); + bool getParameters( double&, + double&, + double& ); private: - - MeasureGUI_1Sel3LineEdit_QTD* myGrp; + MeasureGUI_1Sel3LineEdit* myGrp; }; -#endif // DIALOGBOX_PROPERTIES_H - - - - - - - - - - - - - - +#endif // MEASUREGUI_PROPERTIESDLG_H diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx index ef4d92e8b..20fdb197a 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.cxx +++ b/src/MeasureGUI/MeasureGUI_Skeleton.cxx @@ -1,50 +1,45 @@ -// 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 : MeasureGUI_Skeleton.cxx +// Author : Damine COQUERET, Open CASCADE S.A.S. // -// -// File : MeasureGUI_Skeleton.cxx -// Author : Damien COQUERET -// Module : GEOM -// $Header$ #include "MeasureGUI_Skeleton.h" -#include "GEOMBase.h" -#include "GEOM_Displayer.h" -#include "GeometryGUI.h" - -#include "LightApp_Application.h" -#include "LightApp_SelectionMgr.h" -#include "SalomeApp_Application.h" -#include "SalomeApp_Tools.h" -#include "SUIT_MessageBox.h" -#include "SUIT_Session.h" -#include "SUIT_OverrideCursor.h" - -#include -#include -#include -#include -#include -#include +#include "MeasureGUI_Widgets.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include //================================================================================= // class : MeasureGUI_Skeleton() @@ -53,30 +48,26 @@ // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, - QWidget* parent, - const char* name ) -: MeasureGUI_Skeleton_QTD( parent, name, false, - WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu | WDestructiveClose ), - GEOMBase_Helper( dynamic_cast( parent ) ), - myGeomGUI( GUI ) +MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, QWidget* parent, + bool modal, Qt::WindowFlags f ) + : QDialog( parent, f ), + GEOMBase_Helper( dynamic_cast( parent ) ), + myGeomGUI( GUI ) { + myMainFrame = new MeasureGUI_SkeletonBox( this ); + QVBoxLayout* topLayout = new QVBoxLayout( this ); + topLayout->setMargin( 0 ); topLayout->setSpacing( 0 ); + topLayout->addWidget( myMainFrame ); + setAttribute( Qt::WA_DeleteOnClose ); + setModal( modal ); mySelBtn = 0; mySelEdit = 0; myDisplayer = 0; myHelpFileName = ""; - if ( !name ) - setName( "MeasureGUI_Skeleton" ); - - buttonClose->setText( tr( "GEOM_BUT_CLOSE" ) ); - buttonHelp->setText(tr("GEOM_BUT_HELP")); - - buttonClose->setAutoDefault( false ); - - GroupMedium->close( TRUE ); - resize( 350, 0 ); + buttonClose()->setText( tr( "GEOM_BUT_CLOSE" ) ); + buttonHelp()->setText( tr( "GEOM_BUT_HELP" ) ); } @@ -86,7 +77,8 @@ MeasureGUI_Skeleton::MeasureGUI_Skeleton( GeometryGUI* GUI, //================================================================================= MeasureGUI_Skeleton::~MeasureGUI_Skeleton() { - myGeomGUI->SetActiveDialogBox( 0 ); + if ( myGeomGUI ) + myGeomGUI->SetActiveDialogBox( 0 ); delete myDisplayer; } @@ -98,39 +90,46 @@ MeasureGUI_Skeleton::~MeasureGUI_Skeleton() void MeasureGUI_Skeleton::Init() { /* init variables */ - myGeomGUI->SetActiveDialogBox((QDialog*)this); + if ( myGeomGUI ) + myGeomGUI->SetActiveDialogBox( (QDialog*)this ); /* signals and slots connections */ - connect( buttonClose, SIGNAL( clicked() ), - this, SLOT( ClickOnCancel() ) ); + connect( buttonClose(), SIGNAL( clicked() ), + this, SLOT( ClickOnCancel() ) ); - connect( buttonHelp, SIGNAL( clicked() ), - this, SLOT( ClickOnHelp() ) ); + connect( buttonHelp(), SIGNAL( clicked() ), + this, SLOT( ClickOnHelp() ) ); - connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), - this, SLOT ( DeactivateActiveDialog() ) ); - - connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), - this, SLOT ( ClickOnCancel() ) ); - - connect( mySelEdit, SIGNAL( returnPressed() ), - this, SLOT( LineEditReturnPressed() ) ); - - connect( mySelBtn, SIGNAL( clicked() ), - this, SLOT ( SetEditCurrentArgument() ) ); - - LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(); - if ( aSel ) + if ( myGeomGUI ) { + connect( myGeomGUI, SIGNAL( SignalDeactivateActiveDialog() ), + this, SLOT ( DeactivateActiveDialog() ) ); + + connect( myGeomGUI, SIGNAL( SignalCloseAllDialogs() ), + this, SLOT ( ClickOnCancel() ) ); + } + + if ( mySelEdit ) { + connect( mySelEdit, SIGNAL( returnPressed() ), + this, SLOT( LineEditReturnPressed() ) ); + } + + if ( mySelBtn ) { + connect( mySelBtn, SIGNAL( clicked() ), + this, SLOT ( SetEditCurrentArgument() ) ); + } + + LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); + if ( aSel ) { connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT ( SelectionIntoArgument() ) ) ; + } /* displays Dialog */ - RadioButton1->setChecked( TRUE ); + mainFrame()->RadioButton1->setChecked( true ); activateSelection(); SelectionIntoArgument(); - show(); } @@ -149,20 +148,20 @@ void MeasureGUI_Skeleton::ClickOnCancel() //================================================================================= void MeasureGUI_Skeleton::ClickOnHelp() { - LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); - if (app) - app->onHelpContextModule(myGeomGUI ? app->moduleName(myGeomGUI->moduleName()) : QString(""), myHelpFileName); + LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() ); + if ( app ) { + app->onHelpContextModule( myGeomGUI ? app->moduleName( myGeomGUI->moduleName() ) : QString( "" ), myHelpFileName ); + } else { - QString platform; + QString platform; #ifdef WIN32 - platform = "winapplication"; + platform = "winapplication"; #else - platform = "application"; + platform = "application"; #endif - SUIT_MessageBox::warn1(0, QObject::tr("WRN_WARNING"), - QObject::tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE"). - arg(app->resourceMgr()->stringValue("ExternalBrowser", platform)).arg(myHelpFileName), - QObject::tr("BUT_OK")); + SUIT_MessageBox::warning( this, tr( "WRN_WARNING" ), + tr( "EXTERNAL_BROWSER_CANNOT_SHOW_PAGE" ). + arg( app->resourceMgr()->stringValue( "ExternalBrowser", platform ) ).arg( myHelpFileName ) ); } } @@ -176,11 +175,13 @@ void MeasureGUI_Skeleton::LineEditReturnPressed() /* If successfull the selection is changed and signal emitted... */ /* so SelectionIntoArgument() is automatically called. */ - const QString objectUserName = mySelEdit->text(); - QWidget* thisWidget = ( QWidget* )this; - - if ( GEOMBase::SelectionByNameInDialogs( thisWidget, objectUserName, selectedIO() ) ) - mySelEdit->setText( objectUserName ); + if ( mySelEdit ) { + const QString objectUserName = mySelEdit->text(); + QWidget* thisWidget = ( QWidget* )this; + + if ( GEOMBase::SelectionByNameInDialogs( thisWidget, objectUserName, selectedIO() ) ) + mySelEdit->setText( objectUserName ); + } } @@ -192,7 +193,7 @@ void MeasureGUI_Skeleton::DeactivateActiveDialog() { setEnabled( false ); - LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(); + LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); if ( aSel ) disconnect( aSel, 0, this, 0 ); @@ -214,7 +215,7 @@ void MeasureGUI_Skeleton::ActivateThisDialog() myGeomGUI->SetActiveDialogBox( ( QDialog* )this ); - LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(); + LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); if ( aSel ) connect( aSel, SIGNAL( currentSelectionChanged() ), this, SLOT ( SelectionIntoArgument() ) ) ; @@ -245,8 +246,7 @@ void MeasureGUI_Skeleton::SelectionIntoArgument() GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), testResult ); - if( !testResult || aSelectedObject->_is_nil() ) - { + if ( !testResult || aSelectedObject->_is_nil() ) { mySelEdit->setText( "" ); processObject(); erasePreview(); @@ -274,7 +274,7 @@ void MeasureGUI_Skeleton::processObject() //================================================================================= void MeasureGUI_Skeleton::closeEvent( QCloseEvent* e ) { - LightApp_SelectionMgr* aSel = ((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(); + LightApp_SelectionMgr* aSel = ( (SalomeApp_Application*)( SUIT_Session::session()->activeApplication() ) )->selectionMgr(); if ( aSel ) disconnect( aSel, 0, this, 0 ); QDialog::closeEvent( e ); @@ -284,9 +284,9 @@ void MeasureGUI_Skeleton::closeEvent( QCloseEvent* e ) // function : enterEvent() // purpose : //================================================================================= -void MeasureGUI_Skeleton::enterEvent(QEvent* e) +void MeasureGUI_Skeleton::enterEvent( QEvent* ) { - if ( GroupConstructors->isEnabled() ) + if ( mainFrame()->GroupConstructors->isEnabled() ) return; ActivateThisDialog(); @@ -308,16 +308,14 @@ SALOME_Prs* MeasureGUI_Skeleton::buildPrs() void MeasureGUI_Skeleton::redisplayPreview() { QString aMess; - if ( !isValid( aMess ) ) - { + if ( !isValid( aMess ) ) { erasePreview( true ); return; } erasePreview( false ); - try - { + try { SUIT_OverrideCursor(); getDisplayer()->SetColor( Quantity_NOC_VIOLET ); @@ -326,8 +324,7 @@ void MeasureGUI_Skeleton::redisplayPreview() if ( SALOME_Prs* aPrs = buildPrs() ) displayPreview( aPrs ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch ( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); } @@ -381,9 +378,28 @@ void MeasureGUI_Skeleton::keyPressEvent( QKeyEvent* e ) if ( e->isAccepted() ) return; - if ( e->key() == Key_F1 ) - { - e->accept(); - ClickOnHelp(); - } + if ( e->key() == Qt::Key_F1 ) { + e->accept(); + ClickOnHelp(); + } +} + +MeasureGUI_SkeletonBox* MeasureGUI_Skeleton::mainFrame() const +{ + return myMainFrame; +} + +QWidget* MeasureGUI_Skeleton::centralWidget() const +{ + return mainFrame()->GroupMedium; +} + +QPushButton* MeasureGUI_Skeleton::buttonClose() const +{ + return mainFrame()->buttonClose; +} + +QPushButton* MeasureGUI_Skeleton::buttonHelp() const +{ + return mainFrame()->buttonHelp; } diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h index 79d5ade21..708cf9c19 100644 --- a/src/MeasureGUI/MeasureGUI_Skeleton.h +++ b/src/MeasureGUI/MeasureGUI_Skeleton.h @@ -1,105 +1,88 @@ -// 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 : MeasureGUI_Skeleton.h +// Author : Damine COQUERET, Open CASCADE S.A.S. // -// -// File : MeasureGUI_Skeleton.h -// Author : Damine COQUERET -// Module : GEOM -// $Header: #ifndef MEASUREGUI_SKELETON_H #define MEASUREGUI_SKELETON_H -#include "GEOM_MeasureGUI.hxx" - -#include "MeasureGUI_Skeleton_QTD.h" -#include "GEOMBase_Helper.h" +#include +#include class GeometryGUI; -class QWidget; +class MeasureGUI_SkeletonBox; class QLineEdit; class QPushButton; class GEOM_Displayer; -class GEOM_MEASUREGUI_EXPORT - MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD, - public GEOMBase_Helper +class MeasureGUI_Skeleton : public QDialog, public GEOMBase_Helper { - Q_OBJECT + Q_OBJECT public: - MeasureGUI_Skeleton( GeometryGUI* GUI, - QWidget* parent, - const char* name ); - ~MeasureGUI_Skeleton(); - + MeasureGUI_Skeleton( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 ); + ~MeasureGUI_Skeleton(); + protected slots: - - virtual void ClickOnCancel(); - virtual void ClickOnHelp(); - virtual void DeactivateActiveDialog(); - virtual void ActivateThisDialog(); - virtual void SelectionIntoArgument(); - virtual void LineEditReturnPressed(); - virtual void SetEditCurrentArgument(); + virtual void ClickOnCancel(); + virtual void ClickOnHelp(); + virtual void DeactivateActiveDialog(); + virtual void ActivateThisDialog(); + virtual void SelectionIntoArgument(); + virtual void LineEditReturnPressed(); + virtual void SetEditCurrentArgument(); protected: - - void Init(); - - void enterEvent( QEvent* e ); - void closeEvent( QCloseEvent* e ); - void keyPressEvent( QKeyEvent* e ); - void redisplayPreview(); - GEOM_Displayer* getDisplayer(); - - virtual bool isValid( QString& msg ); - virtual SALOME_Prs* buildPrs(); - virtual void processObject(); - virtual void activateSelection(); - - virtual GEOM::GEOM_IOperations_ptr createOperation(); + void Init(); + + void enterEvent( QEvent* ); + void closeEvent( QCloseEvent* ); + void keyPressEvent( QKeyEvent* ); + void redisplayPreview(); + GEOM_Displayer* getDisplayer(); + + virtual bool isValid( QString& ); + virtual SALOME_Prs* buildPrs(); + virtual void processObject(); + virtual void activateSelection(); + + virtual GEOM::GEOM_IOperations_ptr createOperation(); + + MeasureGUI_SkeletonBox* mainFrame() const; + QWidget* centralWidget() const; + QPushButton* buttonClose() const; + QPushButton* buttonHelp() const; protected: - - QPushButton* mySelBtn; - QLineEdit* mySelEdit; - GEOM::GEOM_Object_var myObj; - - GeometryGUI* myGeomGUI; - GEOM_Displayer* myDisplayer; - - QString myHelpFileName; + QPushButton* mySelBtn; + QLineEdit* mySelEdit; + GEOM::GEOM_Object_var myObj; + + GeometryGUI* myGeomGUI; + GEOM_Displayer* myDisplayer; + + QString myHelpFileName; + MeasureGUI_SkeletonBox* myMainFrame; }; - + #endif // MEASUREGUI_SKELETON_H - - - - - - - - - - - diff --git a/src/MeasureGUI/MeasureGUI_SkeletonBox_QTD.ui b/src/MeasureGUI/MeasureGUI_SkeletonBox_QTD.ui new file mode 100644 index 000000000..f723ac838 --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_SkeletonBox_QTD.ui @@ -0,0 +1,93 @@ + + MeasureGUI_SkeletonBox_QTD + + + + 0 + 0 + 200 + 92 + + + + + + + + 0 + + + 6 + + + + + + + + + 9 + + + 6 + + + + + &Close + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + &Help + + + + + + + + + + + + + + + + + 9 + + + 6 + + + + + + + + + + + + + + + + diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx deleted file mode 100644 index cc518f461..000000000 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form implementation generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' -** -** Created: Tue Mar 21 10:10:08 2006 -** by: The User Interface Compiler ($Id$) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ - -#include "MeasureGUI_Skeleton_QTD.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/* - * Constructs a MeasureGUI_Skeleton_QTD as a child of 'parent', with the - * name 'name' and widget flags set to 'f'. - * - * The dialog will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal dialog. - */ -MeasureGUI_Skeleton_QTD::MeasureGUI_Skeleton_QTD( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) -{ - if ( !name ) - setName( "MeasureGUI_Skeleton_QTD" ); - setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) ); - setSizeGripEnabled( TRUE ); - MeasureGUI_Skeleton_QTDLayout = new QGridLayout( this, 1, 1, 11, 6, "MeasureGUI_Skeleton_QTDLayout"); - - Layout1 = new QGridLayout( 0, 1, 1, 0, 6, "Layout1"); - - GroupButtons = new QGroupBox( this, "GroupButtons" ); - GroupButtons->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, GroupButtons->sizePolicy().hasHeightForWidth() ) ); - GroupButtons->setColumnLayout(0, Qt::Vertical ); - GroupButtons->layout()->setSpacing( 6 ); - GroupButtons->layout()->setMargin( 11 ); - GroupButtonsLayout = new QGridLayout( GroupButtons->layout() ); - GroupButtonsLayout->setAlignment( Qt::AlignTop ); - - Layout3 = new QGridLayout( 0, 1, 1, 0, 6, "Layout3"); - Spacer1 = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout3->addItem( Spacer1, 0, 1 ); - - buttonClose = new QPushButton( GroupButtons, "buttonClose" ); - - Layout3->addWidget( buttonClose, 0, 0 ); - - buttonHelp = new QPushButton( GroupButtons, "buttonHelp" ); - - Layout3->addWidget( buttonHelp, 0, 2 ); - - GroupButtonsLayout->addLayout( Layout3, 0, 0 ); - - Layout1->addWidget( GroupButtons, 2, 0 ); - - GroupConstructors = new QButtonGroup( this, "GroupConstructors" ); - GroupConstructors->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, GroupConstructors->sizePolicy().hasHeightForWidth() ) ); - GroupConstructors->setColumnLayout(0, Qt::Vertical ); - GroupConstructors->layout()->setSpacing( 6 ); - GroupConstructors->layout()->setMargin( 11 ); - GroupConstructorsLayout = new QGridLayout( GroupConstructors->layout() ); - GroupConstructorsLayout->setAlignment( Qt::AlignTop ); - - Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2"); - - RadioButton1 = new QRadioButton( GroupConstructors, "RadioButton1" ); - Layout2->addWidget( RadioButton1 ); - - GroupConstructorsLayout->addLayout( Layout2, 0, 0 ); - - Layout1->addWidget( GroupConstructors, 0, 0 ); - - GroupMedium = new QGroupBox( this, "GroupMedium" ); - GroupMedium->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupMedium->sizePolicy().hasHeightForWidth() ) ); - - Layout1->addWidget( GroupMedium, 1, 0 ); - - MeasureGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 ); - languageChange(); - resize( QSize(228, 266).expandedTo(minimumSizeHint()) ); - clearWState( WState_Polished ); -} - -/* - * Destroys the object and frees any allocated resources - */ -MeasureGUI_Skeleton_QTD::~MeasureGUI_Skeleton_QTD() -{ - // no need to delete child widgets, Qt does it all for us -} - -/* - * Sets the strings of the subwidgets using the current - * language. - */ -void MeasureGUI_Skeleton_QTD::languageChange() -{ - setCaption( tr( "MeasureGUI_Skeleton_QTD" ) ); - GroupButtons->setTitle( QString::null ); - buttonClose->setText( tr( "&Close" ) ); - buttonHelp->setText( tr( "&Help" ) ); - GroupConstructors->setTitle( QString::null ); - RadioButton1->setText( QString::null ); - GroupMedium->setTitle( QString::null ); -} - diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h deleted file mode 100644 index cdc2f7de4..000000000 --- a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (C) 2005 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 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 -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -/**************************************************************************** -** Form interface generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui' -** -** Created: Tue Mar 21 10:10:08 2006 -** by: The User Interface Compiler ($Id$) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ - -#ifndef MEASUREGUI_SKELETON_QTD_H -#define MEASUREGUI_SKELETON_QTD_H - -#include "GEOM_MeasureGUI.hxx" - -#include -#include - -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QGroupBox; -class QPushButton; -class QButtonGroup; -class QRadioButton; - -class GEOM_MEASUREGUI_EXPORT MeasureGUI_Skeleton_QTD : public QDialog -{ - Q_OBJECT - -public: - MeasureGUI_Skeleton_QTD( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); - ~MeasureGUI_Skeleton_QTD(); - - QGroupBox* GroupButtons; - QPushButton* buttonClose; - QPushButton* buttonHelp; - QButtonGroup* GroupConstructors; - QRadioButton* RadioButton1; - QGroupBox* GroupMedium; - -protected: - QGridLayout* MeasureGUI_Skeleton_QTDLayout; - QGridLayout* Layout1; - QGridLayout* GroupButtonsLayout; - QGridLayout* Layout3; - QSpacerItem* Spacer1; - QGridLayout* GroupConstructorsLayout; - QHBoxLayout* Layout2; - -protected slots: - virtual void languageChange(); - -}; - -#endif // MEASUREGUI_SKELETON_QTD_H diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx index 6ce296232..954c52a8e 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx @@ -1,86 +1,69 @@ -// 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 : MeasureGUI_WhatisDlg.cxx +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_WhatisDlg.cxx -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ #include "MeasureGUI_WhatisDlg.h" -#include "MeasureGUI_1Sel1TextView_QTD.h" -#include "GEOMBase.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include "utilities.h" -#include "SUIT_Session.h" -#include "SalomeApp_Tools.h" - -#include -#include -#include -#include -#include -#include -#include +#include "MeasureGUI_Widgets.h" + +#include + +#include +#include +#include //================================================================================= // class : MeasureGUI_WhatisDlg( ) // purpose : Constructs a MeasureGUI_WhatisDlg which is a child of 'parent', with the // name 'name' and widget flags set to 'f'. // The dialog will by default be modeless, unless you set 'modal' to -// TRUE to construct a modal dialog. +// true to construct a modal dialog. //================================================================================= MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg( GeometryGUI* GUI, QWidget* parent ) -: MeasureGUI_Skeleton( GUI, parent, "MeasureGUI_WhatisDlg" ) + : MeasureGUI_Skeleton( GUI, parent ) { QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_DLG_WHATIS" ) ) ); + "GEOM", tr( "ICON_DLG_WHATIS" ) ) ); QPixmap image1( SUIT_Session::session()->resourceMgr()->loadPixmap( - "GEOM",tr( "ICON_SELECT" ) ) ); + "GEOM", tr( "ICON_SELECT" ) ) ); - setCaption( tr( "GEOM_WHATIS_TITLE" ) ); + setWindowTitle( tr( "GEOM_WHATIS_TITLE" ) ); /***************************************************************/ - GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) ); - RadioButton1->setPixmap( image0 ); + mainFrame()->GroupConstructors->setTitle( tr( "GEOM_WHATIS" ) ); + mainFrame()->RadioButton1->setIcon( image0 ); - myGrp = new MeasureGUI_1Sel1TextView_QTD( this, "myGrp" ); + myGrp = new MeasureGUI_1Sel1TextView( centralWidget() ); myGrp->GroupBox1->setTitle( tr( "GEOM_WHATIS_OBJECT" ) ); myGrp->TextLabel1->setText( tr( "GEOM_OBJECT" ) ); - myGrp->TextEdit1->setReadOnly( TRUE ); - myGrp->PushButton1->setPixmap( image1 ); + myGrp->TextView1->setReadOnly( true ); + myGrp->PushButton1->setIcon( image1 ); myGrp->LineEdit1->setReadOnly( true ); - Layout1->addWidget( myGrp, 1, 0 ); + QVBoxLayout* layout = new QVBoxLayout( centralWidget() ); + layout->setMargin( 0 ); layout->setSpacing( 6 ); + layout->addWidget( myGrp ); /***************************************************************/ @@ -118,7 +101,7 @@ void MeasureGUI_WhatisDlg::Init() void MeasureGUI_WhatisDlg::processObject() { QString aText; - myGrp->TextEdit1->setText( getParameters( aText ) ? aText : QString("") ); + myGrp->TextView1->setText( getParameters( aText ) ? aText : QString( "" ) ); } @@ -130,14 +113,11 @@ bool MeasureGUI_WhatisDlg::getParameters( QString& theText ) { if ( myObj->_is_nil() ) return false; - else - { - try - { + else { + try { theText = GEOM::GEOM_IMeasureOperations::_narrow( getOperation() )->WhatIs( myObj ); } - catch( const SALOME::SALOME_Exception& e ) - { + catch( const SALOME::SALOME_Exception& e ) { SalomeApp_Tools::QtCatchCorbaException( e ); return false; } diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.h b/src/MeasureGUI/MeasureGUI_WhatisDlg.h index 10f3ccf71..04913ec7a 100644 --- a/src/MeasureGUI/MeasureGUI_WhatisDlg.h +++ b/src/MeasureGUI/MeasureGUI_WhatisDlg.h @@ -1,67 +1,57 @@ -// 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 : MeasureGUI_WhatisDlg.h +// Author : Nicolas REJNERI, Open CASCADE S.A.S. // -// -// File : MeasureGUI_WhatisDlg.h -// Author : Nicolas REJNERI -// Module : GEOM -// $Header$ - -#ifndef DIALOGBOX_WHATIS_H -#define DIALOGBOX_WHATIS_H -#include "GEOM_MeasureGUI.hxx" +#ifndef MEASUREGUI_WHATISDLG_H +#define MEASUREGUI_WHATISDLG_H #include "MeasureGUI_Skeleton.h" -class MeasureGUI_1Sel1TextView_QTD; +class MeasureGUI_1Sel1TextView; //================================================================================= // class : DialogBox_PROPERTIES // purpose : //================================================================================= -class GEOM_MEASUREGUI_EXPORT MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton +class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton { - Q_OBJECT - + Q_OBJECT + public: - MeasureGUI_WhatisDlg( GeometryGUI* GUI, - QWidget* parent ); - ~MeasureGUI_WhatisDlg(); + MeasureGUI_WhatisDlg( GeometryGUI*, QWidget* ); + ~MeasureGUI_WhatisDlg(); protected: - - // redefined from GEOMBase_Helper and MeasureGUI_Skeleton - virtual void processObject(); - + // redefined from GEOMBase_Helper and MeasureGUI_Skeleton + virtual void processObject(); + private: - - void Init(); - bool getParameters( QString& ); - + void Init(); + bool getParameters( QString& ); + private: - - MeasureGUI_1Sel1TextView_QTD* myGrp; - + MeasureGUI_1Sel1TextView* myGrp; }; -#endif // DIALOGBOX_WHATIS_H +#endif // MEASUREGUI_WHATISDLG_H diff --git a/src/MeasureGUI/MeasureGUI_Widgets.cxx b/src/MeasureGUI/MeasureGUI_Widgets.cxx new file mode 100644 index 000000000..b2bbf343b --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_Widgets.cxx @@ -0,0 +1,137 @@ +// 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 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 +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// File : MeasureGUI_Widgets.cxx +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#include "MeasureGUI_Widgets.h" + +////////////////////////////////////////// +// MeasureGUI_1Sel12LineEdit +////////////////////////////////////////// + +MeasureGUI_1Sel12LineEdit::MeasureGUI_1Sel12LineEdit( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} +MeasureGUI_1Sel12LineEdit::~MeasureGUI_1Sel12LineEdit() +{ +} + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView1Check +////////////////////////////////////////// + +MeasureGUI_1Sel1TextView1Check::MeasureGUI_1Sel1TextView1Check( QWidget* parent, + Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel1TextView1Check::~MeasureGUI_1Sel1TextView1Check() +{ +} + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView2ListBox +////////////////////////////////////////// + +MeasureGUI_1Sel1TextView2ListBox::MeasureGUI_1Sel1TextView2ListBox( QWidget* parent, + Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel1TextView2ListBox::~MeasureGUI_1Sel1TextView2ListBox() +{ +} + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView +////////////////////////////////////////// + +MeasureGUI_1Sel1TextView::MeasureGUI_1Sel1TextView( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel1TextView::~MeasureGUI_1Sel1TextView() +{ +} + +////////////////////////////////////////// +// MeasureGUI_1Sel3LineEdit +////////////////////////////////////////// + +MeasureGUI_1Sel3LineEdit::MeasureGUI_1Sel3LineEdit( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel3LineEdit::~MeasureGUI_1Sel3LineEdit() +{ +} + +////////////////////////////////////////// +// MeasureGUI_1Sel6LineEdit +////////////////////////////////////////// + +MeasureGUI_1Sel6LineEdit::MeasureGUI_1Sel6LineEdit( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_1Sel6LineEdit::~MeasureGUI_1Sel6LineEdit() +{ +} + +////////////////////////////////////////// +// MeasureGUI_2Sel1LineEdit +////////////////////////////////////////// + +MeasureGUI_2Sel1LineEdit::MeasureGUI_2Sel1LineEdit( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_2Sel1LineEdit::~MeasureGUI_2Sel1LineEdit() +{ +} + +////////////////////////////////////////// +// MeasureGUI_SkeletonBox +////////////////////////////////////////// + +MeasureGUI_SkeletonBox::MeasureGUI_SkeletonBox( QWidget* parent, Qt::WindowFlags f ) +: QWidget( parent, f ) +{ + setupUi( this ); +} + +MeasureGUI_SkeletonBox::~MeasureGUI_SkeletonBox() +{ +} diff --git a/src/MeasureGUI/MeasureGUI_Widgets.h b/src/MeasureGUI/MeasureGUI_Widgets.h new file mode 100644 index 000000000..f56de2fda --- /dev/null +++ b/src/MeasureGUI/MeasureGUI_Widgets.h @@ -0,0 +1,155 @@ +// 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 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 +// +// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// +// File : MeasureGUI_Widgets.h +// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com) +// + +#ifndef MEASUREGUI_WIDGETS_H +#define MEASUREGUI_WIDGETS_H + +////////////////////////////////////////// +// MeasureGUI_1Sel12LineEdit +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel12LineEdit_QTD.h" + +class MeasureGUI_1Sel12LineEdit : public QWidget, + public Ui::MeasureGUI_1Sel12LineEdit_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel12LineEdit( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel12LineEdit(); +}; + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView1Check +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel1TextView1Check_QTD.h" + +class MeasureGUI_1Sel1TextView1Check : public QWidget, + public Ui::MeasureGUI_1Sel1TextView1Check_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel1TextView1Check( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel1TextView1Check(); +}; + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView2ListBox +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel1TextView2ListBox_QTD.h" + +class MeasureGUI_1Sel1TextView2ListBox : public QWidget, + public Ui::MeasureGUI_1Sel1TextView2ListBox_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel1TextView2ListBox( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel1TextView2ListBox(); +}; + +////////////////////////////////////////// +// MeasureGUI_1Sel1TextView +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel1TextView_QTD.h" + +class MeasureGUI_1Sel1TextView : public QWidget, + public Ui::MeasureGUI_1Sel1TextView_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel1TextView( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel1TextView(); +}; + +////////////////////////////////////////// +// MeasureGUI_1Sel3LineEdit +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel3LineEdit_QTD.h" + +class MeasureGUI_1Sel3LineEdit : public QWidget, + public Ui::MeasureGUI_1Sel3LineEdit_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel3LineEdit( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel3LineEdit(); +}; + +////////////////////////////////////////// +// MeasureGUI_1Sel6LineEdit +////////////////////////////////////////// + +#include "ui_MeasureGUI_1Sel6LineEdit_QTD.h" + +class MeasureGUI_1Sel6LineEdit : public QWidget, + public Ui::MeasureGUI_1Sel6LineEdit_QTD +{ + Q_OBJECT + +public: + MeasureGUI_1Sel6LineEdit( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_1Sel6LineEdit(); +}; + +////////////////////////////////////////// +// MeasureGUI_2Sel1LineEdit +////////////////////////////////////////// + +#include "ui_MeasureGUI_2Sel1LineEdit_QTD.h" + +class MeasureGUI_2Sel1LineEdit : public QWidget, + public Ui::MeasureGUI_2Sel1LineEdit_QTD +{ + Q_OBJECT + +public: + MeasureGUI_2Sel1LineEdit( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_2Sel1LineEdit(); +}; + +////////////////////////////////////////// +// MeasureGUI_SkeletonBox +////////////////////////////////////////// + +#include "ui_MeasureGUI_SkeletonBox_QTD.h" + +class MeasureGUI_SkeletonBox : public QWidget, + public Ui::MeasureGUI_SkeletonBox_QTD +{ + Q_OBJECT + +public: + MeasureGUI_SkeletonBox( QWidget* = 0, Qt::WindowFlags = 0 ); + ~MeasureGUI_SkeletonBox(); +}; + +#endif // MEASUREGUI_WIDGETS_H diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui deleted file mode 100644 index 505b87b68..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui +++ /dev/null @@ -1,268 +0,0 @@ - -MeasureGUI_1Sel12LineEdit_QTD - - - MeasureGUI_1Sel12LineEdit_QTD - - - - 0 - 0 - 131 - 171 - - - - MeasureGUI_1Sel12LineEdit_QTD - - - - unnamed - - - 0 - - - 6 - - - - GroupBox1 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - LineEdit12 - - - - - LineEdit11 - - - - - LineEdit42 - - - - - TextLabel5 - - - - 0 - 0 - 0 - 0 - - - - TL5 - - - - - LineEdit31 - - - - - LineEdit41 - - - - - LineEdit23 - - - - - LineEdit33 - - - - - LineEdit43 - - - - - LineEdit22 - - - - - TextLabel2 - - - - 0 - 0 - 0 - 0 - - - - TL2 - - - - - TextLabel4 - - - - 0 - 0 - 0 - 0 - - - - TL4 - - - - - LineEdit13 - - - - - LineEdit32 - - - - - LineEdit21 - - - - - TextLabel3 - - - - 0 - 0 - 0 - 0 - - - - TL3 - - - - - - - LineEdit1 - - - - - Spacer8 - - - Vertical - - - Expanding - - - - 0 - 40 - - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui deleted file mode 100644 index d8e24583e..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui +++ /dev/null @@ -1,116 +0,0 @@ - -MeasureGUI_1Sel1TextView_QTD - - - MeasureGUI_1Sel1TextView_QTD - - - - 0 - 0 - 130 - 160 - - - - MeasureGUI_1Sel1TextView_QTD - - - - unnamed - - - 0 - - - 6 - - - - GroupBox1 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - TextEdit1 - - - - - LineEdit1 - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui deleted file mode 100644 index 07db7bfb0..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui +++ /dev/null @@ -1,191 +0,0 @@ - -MeasureGUI_1Sel3LineEdit_QTD - - - MeasureGUI_1Sel3LineEdit_QTD - - - - 0 - 0 - 129 - 141 - - - - MeasureGUI_1Sel3LineEdit_QTD - - - - unnamed - - - 0 - - - 6 - - - - GroupBox1 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - LineEdit4 - - - - - TextLabel3 - - - - 0 - 0 - 0 - 0 - - - - TL3 - - - - - LineEdit2 - - - - - Spacer8 - - - Vertical - - - Expanding - - - - 0 - 80 - - - - - - LineEdit3 - - - - - LineEdit1 - - - - - TextLabel4 - - - - 0 - 0 - 0 - 0 - - - - TL4 - - - - - TextLabel2 - - - - 0 - 0 - 0 - 0 - - - - TL2 - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui deleted file mode 100644 index b439a76de..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui +++ /dev/null @@ -1,254 +0,0 @@ - -MeasureGUI_1Sel6LineEdit_QTD - - - MeasureGUI_1Sel6LineEdit_QTD - - - - 0 - 0 - 129 - 163 - - - - MeasureGUI_1Sel6LineEdit_QTD - - - - unnamed - - - 0 - - - 6 - - - - GroupBox1 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Spacer8 - - - Vertical - - - Expanding - - - - 0 - 50 - - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - LineEdit22 - - - - - LineEdit32 - - - - - TextLabel4 - - - - 0 - 0 - 0 - 0 - - - - TL4 - - - - - LineEdit31 - - - - - TextLabel5 - - - - 0 - 0 - 0 - 0 - - - - TL5 - - - - - LineEdit11 - - - - - TextLabel6 - - - - 0 - 0 - 0 - 0 - - - - TL6 - - - - - LineEdit12 - - - - - TextLabel2 - - - - 0 - 0 - 0 - 0 - - - - TL2 - - - - - LineEdit21 - - - - - TextLabel3 - - - - 0 - 0 - 0 - 0 - - - - TL3 - - - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - - - - LineEdit1 - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui deleted file mode 100644 index e68cca900..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui +++ /dev/null @@ -1,186 +0,0 @@ - -MeasureGUI_2Sel1LineEdit_QTD - - - MeasureGUI_2Sel1LineEdit_QTD - - - - 0 - 0 - 129 - 115 - - - - MeasureGUI_2Sel1LineEdit_QTD - - - - unnamed - - - 0 - - - 6 - - - - GroupBox1 - - - - 7 - 7 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - Spacer8 - - - Vertical - - - Expanding - - - - 0 - 60 - - - - - - TextLabel3 - - - - 0 - 0 - 0 - 0 - - - - TL3 - - - - - LineEdit3 - - - - - LineEdit2 - - - - - TextLabel2 - - - - 0 - 0 - 0 - 0 - - - - TL2 - - - - - TextLabel1 - - - - 0 - 0 - 0 - 0 - - - - TL1 - - - - - PushButton1 - - - - 0 - 0 - 0 - 0 - - - - - - - - - LineEdit1 - - - - - PushButton2 - - - - 0 - 0 - 0 - 0 - - - - - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui deleted file mode 100644 index 07f94c80d..000000000 --- a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui +++ /dev/null @@ -1,201 +0,0 @@ - -MeasureGUI_Skeleton_QTD - - - MeasureGUI_Skeleton_QTD - - - - 0 - 0 - 228 - 266 - - - - - 5 - 7 - 0 - 0 - - - - MeasureGUI_Skeleton_QTD - - - true - - - - unnamed - - - 11 - - - 6 - - - - Layout1 - - - - unnamed - - - 0 - - - 6 - - - - GroupButtons - - - - 7 - 0 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout3 - - - - unnamed - - - 0 - - - 6 - - - - Spacer1 - - - Horizontal - - - Expanding - - - - 120 - 0 - - - - - - buttonClose - - - &Close - - - - - buttonHelp - - - &Help - - - - - - - - - GroupConstructors - - - - 5 - 0 - 0 - 0 - - - - - - - - unnamed - - - 11 - - - 6 - - - - Layout2 - - - - unnamed - - - 0 - - - 6 - - - - RadioButton1 - - - - - - - - - - - - GroupMedium - - - - 7 - 7 - 0 - 0 - - - - - - - - - - - - diff --git a/src/MeasureGUI/UIFiles/ui_to_cxx b/src/MeasureGUI/UIFiles/ui_to_cxx deleted file mode 100755 index 6ffec252b..000000000 --- a/src/MeasureGUI/UIFiles/ui_to_cxx +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2005 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 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 -# -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -#!/bin/sh - -#uic -o MeasureGUI_Skeleton_QTD.h MeasureGUI_Skeleton_QTD.ui -#uic -o MeasureGUI_Skeleton_QTD.cxx -impl MeasureGUI_Skeleton_QTD.h MeasureGUI_Skeleton_QTD.ui - -uic -o MeasureGUI_1Sel3LineEdit_QTD.h MeasureGUI_1Sel3LineEdit_QTD.ui -uic -o MeasureGUI_1Sel3LineEdit_QTD.cxx -impl MeasureGUI_1Sel3LineEdit_QTD.h MeasureGUI_1Sel3LineEdit_QTD.ui - -uic -o MeasureGUI_1Sel6LineEdit_QTD.h MeasureGUI_1Sel6LineEdit_QTD.ui -uic -o MeasureGUI_1Sel6LineEdit_QTD.cxx -impl MeasureGUI_1Sel6LineEdit_QTD.h MeasureGUI_1Sel6LineEdit_QTD.ui - -uic -o MeasureGUI_1Sel12LineEdit_QTD.h MeasureGUI_1Sel12LineEdit_QTD.ui -uic -o MeasureGUI_1Sel12LineEdit_QTD.cxx -impl MeasureGUI_1Sel12LineEdit_QTD.h MeasureGUI_1Sel12LineEdit_QTD.ui - -uic -o MeasureGUI_2Sel1LineEdit_QTD.h MeasureGUI_2Sel1LineEdit_QTD.ui -uic -o MeasureGUI_2Sel1LineEdit_QTD.cxx -impl MeasureGUI_2Sel1LineEdit_QTD.h MeasureGUI_2Sel1LineEdit_QTD.ui - -#uic -o MeasureGUI_1Sel1TextView_QTD.h MeasureGUI_1Sel1TextView_QTD.ui -#uic -o MeasureGUI_1Sel1TextView_QTD.cxx -impl MeasureGUI_1Sel1TextView_QTD.h MeasureGUI_1Sel1TextView_QTD.ui