]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
NPAL16559: EDF507: Implementation of a more advanced system of measurement.
authorjfa <jfa@opencascade.com>
Fri, 12 Oct 2007 09:06:21 +0000 (09:06 +0000)
committerjfa <jfa@opencascade.com>
Fri, 12 Oct 2007 09:06:21 +0000 (09:06 +0000)
22 files changed:
Makefile.in
idl/GEOM_Gen.idl
resources/angle.png [new file with mode: 0644]
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx
src/GEOM_I/GEOM_IMeasureOperations_i.cc
src/GEOM_I/GEOM_IMeasureOperations_i.hh
src/GEOM_SWIG/GEOM_TestMeasures.py
src/GEOM_SWIG/geompy.py
src/MeasureGUI/Makefile.in
src/MeasureGUI/MeasureGUI.cxx
src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx
src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h
src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_AngleDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_AngleDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx
src/MeasureGUI/MeasureGUI_DistanceDlg.h
src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui
src/MeasureGUI/UIFiles/MeasureGUI_2Sel4LineEdit_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/ui_to_cxx

index 84b64d9311b8514b223f0d7a920637117392c128..e5697da5c47cf7bcfe6a91d2dc70bd47cda8fa27 100644 (file)
@@ -95,6 +95,7 @@ line2points.png \
 lineedge.png \
 linepointvector.png \
 mindist.png \
+angle.png \
 mirrorPoint.png \
 mirrorAxe.png \
 mirrorPlane.png \
index 874ce239be1818c931c4b0ce0705622cdd810a33..edc35ef21c4ef58023896d4c48f2d5d1e482ba10 100644 (file)
@@ -2370,6 +2370,12 @@ module GEOM
                           out double X1, out double Y1, out double Z1,
                           out double X2, out double Y2, out double Z2);
 
+    /*!
+     *  Get angle between the given lines or linear edges.
+     *  \param theShape1,theShape2 Shapes to find angle between. Lines or linear edges.
+     *  \return Value of the angle between the given shapes.
+     */
+    double GetAngle (in GEOM_Object theShape1, in GEOM_Object theShape2);
 
     /*!
      *  Get point coordinates
diff --git a/resources/angle.png b/resources/angle.png
new file mode 100644 (file)
index 0000000..9ec01ae
Binary files /dev/null and b/resources/angle.png differ
index f047467160e107866a003bf267f199f54cc151fa..5925ea6d438023aa229ae0cf69af57eb1cf7929d 100644 (file)
@@ -17,6 +17,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <Standard_Stream.hxx>
 
 #include <GEOMImpl_IMeasureOperations.hxx>
 #include <Geom_BSplineSurface.hxx>
 #include <Geom_RectangularTrimmedSurface.hxx>
 #include <Geom_OffsetSurface.hxx>
+#include <Geom_Line.hxx>
 
 #include <gp_Pln.hxx>
+#include <gp_Lin.hxx>
 
 #include <Standard_Failure.hxx>
 #include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
 
 //=============================================================================
 /*!
- *   constructor:
+ *  Constructor
  */
 //=============================================================================
 GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID)
@@ -100,7 +103,7 @@ GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine
 
 //=============================================================================
 /*!
- *  destructor
+ *  Destructor
  */
 //=============================================================================
 GEOMImpl_IMeasureOperations::~GEOMImpl_IMeasureOperations()
@@ -1291,23 +1294,24 @@ Standard_Real GEOMImpl_IMeasureOperations::GetMinDistance
 }
 
 //=======================================================================
-//function : PointCoordinates
-//purpose  : Get coordinates of point
+/*!
+ *  Get coordinates of point
+ */
 //=======================================================================
-void GEOMImpl_IMeasureOperations::PointCoordinatesHandle(GEOM_Object) theShape,
-                        Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ )
+void GEOMImpl_IMeasureOperations::PointCoordinates (Handle(GEOM_Object) theShape,
+                        Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ)
 {
-  SetErrorCode( KO );
+  SetErrorCode(KO);
 
-  if ( theShape.IsNull() )
+  if (theShape.IsNull())
     return;
 
   Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
-  if ( aRefShape.IsNull() )
+  if (aRefShape.IsNull())
     return;
 
   TopoDS_Shape aShape = aRefShape->GetValue();
-  if ( aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX )
+  if (aShape.IsNull() || aShape.ShapeType() != TopAbs_VERTEX)
   {
     SetErrorCode( "Shape must be a vertex" );
     return;
@@ -1321,15 +1325,84 @@ void GEOMImpl_IMeasureOperations::PointCoordinates( Handle(GEOM_Object) theShape
     theX = aPnt.X();
     theY = aPnt.Y();
     theZ = aPnt.Z();
-    SetErrorCode( OK );
+
+    SetErrorCode(OK);
   }
-  catch ( Standard_Failure )
+  catch (Standard_Failure)
   {
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     SetErrorCode( aFail->GetMessageString() );
   }
 }
 
+//=======================================================================
+/*!
+ *  Compute angle (in degrees) between two lines
+ */
+//=======================================================================
+Standard_Real GEOMImpl_IMeasureOperations::GetAngle (Handle(GEOM_Object) theLine1,
+                                                     Handle(GEOM_Object) theLine2)
+{
+  SetErrorCode(KO);
+
+  Standard_Real anAngle = -1.0;
+
+  if (theLine1.IsNull() || theLine2.IsNull())
+    return anAngle;
+
+  Handle(GEOM_Function) aRefLine1 = theLine1->GetLastFunction();
+  Handle(GEOM_Function) aRefLine2 = theLine2->GetLastFunction();
+  if (aRefLine1.IsNull() || aRefLine2.IsNull())
+    return anAngle;
+
+  TopoDS_Shape aLine1 = aRefLine1->GetValue();
+  TopoDS_Shape aLine2 = aRefLine2->GetValue();
+  if (aLine1.IsNull() || aLine2.IsNull() ||
+      aLine1.ShapeType() != TopAbs_EDGE ||
+      aLine2.ShapeType() != TopAbs_EDGE)
+  {
+    SetErrorCode("Two edges must be given");
+    return anAngle;
+  }
+
+  try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+    OCC_CATCH_SIGNALS;
+#endif
+    TopoDS_Edge E1 = TopoDS::Edge(aLine1);
+    TopoDS_Edge E2 = TopoDS::Edge(aLine2);
+
+    double fp,lp;
+    Handle(Geom_Curve) C1 = BRep_Tool::Curve(E1,fp,lp);
+    Handle(Geom_Curve) C2 = BRep_Tool::Curve(E2,fp,lp);
+
+    if (!C1->IsKind(STANDARD_TYPE(Geom_Line)) ||
+        !C2->IsKind(STANDARD_TYPE(Geom_Line)))
+    {
+      SetErrorCode("The edges must be linear");
+      return anAngle;
+    }
+
+    Handle(Geom_Line) L1 = Handle(Geom_Line)::DownCast(C1);
+    Handle(Geom_Line) L2 = Handle(Geom_Line)::DownCast(C2);
+
+    gp_Lin aLin1 = L1->Lin();
+    gp_Lin aLin2 = L2->Lin();
+
+    anAngle = aLin1.Angle(aLin2);
+    anAngle /= PI180; // convert radians into degrees
+
+    SetErrorCode(OK);
+  }
+  catch (Standard_Failure)
+  {
+    Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+    SetErrorCode(aFail->GetMessageString());
+  }
+
+  return anAngle;
+}
+
 //=======================================================================
 //function : StructuralDump
 //purpose  : Structural (data exchange) style of output.
index b889d3872e171235cfe22ef91f8c205ded8bf0e3..2c221f3f32fa523fb2b32c2682d3399a72438f97 100644 (file)
@@ -122,8 +122,10 @@ class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
                                                 Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1,
                                                 Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2);
 
-  Standard_EXPORT void PointCoordinates(Handle(GEOM_Object) theShape,
-                                        Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ );
+  Standard_EXPORT void PointCoordinates (Handle(GEOM_Object) theShape,
+                                         Standard_Real& theX, Standard_Real& theY, Standard_Real& theZ);
+
+  Standard_EXPORT Standard_Real GetAngle (Handle(GEOM_Object) theLine1, Handle(GEOM_Object) theLine2);
 
  public:
   Standard_EXPORT static gp_Ax3 GetPosition (const TopoDS_Shape& theShape);
index 6167bf0e10d19fb470fc4c2e083eda28c7e449b7..7be30405664d6ece01d23a17357ef47f0f4e8596 100644 (file)
@@ -17,6 +17,7 @@
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #include <Standard_Stream.hxx>
 
 #include "GEOM_IMeasureOperations_i.hh"
@@ -392,8 +393,8 @@ CORBA::Double GEOM_IMeasureOperations_i::GetMinDistance
  *  PointCoordinates
  */
 //=============================================================================
-void GEOM_IMeasureOperations_i::PointCoordinates(
-  GEOM::GEOM_Object_ptr theShape, CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z )
+void GEOM_IMeasureOperations_i::PointCoordinates (GEOM::GEOM_Object_ptr theShape,
+                                                 CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z)
 
 {
   //Set a not done flag
@@ -412,3 +413,28 @@ void GEOM_IMeasureOperations_i::PointCoordinates(
   // Get shape parameters
   GetOperations()->PointCoordinates( aShape, X, Y, Z );
 }
+
+//=============================================================================
+/*!
+ *  GetAngle
+ */
+//=============================================================================
+CORBA::Double GEOM_IMeasureOperations_i::GetAngle (GEOM::GEOM_Object_ptr theShape1,
+                                                  GEOM::GEOM_Object_ptr theShape2)
+{
+  //Set a not done flag
+  GetOperations()->SetNotDone();
+
+  if (theShape1 == NULL || theShape2 == NULL) return -1.0;
+
+  //Get the reference shapes
+  Handle(GEOM_Object) aShape1 = GetOperations()->GetEngine()->GetObject
+    (theShape1->GetStudyID(), theShape1->GetEntry());
+  Handle(GEOM_Object) aShape2 = GetOperations()->GetEngine()->GetObject
+    (theShape2->GetStudyID(), theShape2->GetEntry());
+
+  if (aShape1.IsNull() || aShape2.IsNull()) return -1.0;
+
+  // Get the angle
+  return GetOperations()->GetAngle(aShape1, aShape2);
+}
index 1776441890322b6b14c019a0623d91ea2532690a..702162edc82592875de2b6c75355fc3656c44a99 100644 (file)
@@ -84,9 +84,11 @@ class GEOM_IMeasureOperations_i :
                                 CORBA::Double& X1, CORBA::Double& Y1, CORBA::Double& Z1,
                                 CORBA::Double& X2, CORBA::Double& Y2, CORBA::Double& Z2);
 
+  void PointCoordinates (GEOM::GEOM_Object_ptr theShape,
+                        CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z);
 
-  void PointCoordinates( GEOM::GEOM_Object_ptr theShape,
-    CORBA::Double& X, CORBA::Double& Y, CORBA::Double& Z );
+  CORBA::Double GetAngle (GEOM::GEOM_Object_ptr theShape1,
+                         GEOM::GEOM_Object_ptr theShape2);
 
   ::GEOMImpl_IMeasureOperations* GetOperations()
   { return (::GEOMImpl_IMeasureOperations*)GetImpl(); }
index c18c3064836a642128e01261f8289c65cfe756a3..1ca3cbccdd3f63b53ae0d1530bcf85ead5ed3519 100644 (file)
@@ -120,6 +120,30 @@ def TestMeasureOperations (geompy, math):
 
   print "\nMinimal distance between Box and Cube = ", MinDist
 
+  MinDistComps = geompy.MinDistanceComponents(box, cube)
+  print "\nMinimal distance between Box and Cube = ", MinDistComps[0]
+  print "Its components are  (", MinDistComps[1], ", ", MinDistComps[2], ", ", MinDistComps[3], ")"
+
+  ####### Angle #######
+
+  OX  = geompy.MakeVectorDXDYDZ(10, 0,0)
+  OXY = geompy.MakeVectorDXDYDZ(10,10,0)
+
+  # in one plane
+  Angle = geompy.GetAngle(OX, OXY)
+
+  print "\nAngle between OX and OXY = ", Angle
+  if math.fabs(Angle - 45.0) > 1e-05:
+    print "  Error: returned angle is", Angle, "while must be 45.0"
+
+  # not in one plane
+  OXY_shift = geompy.MakeTranslation(OXY,10,-10,20)
+  Angle = geompy.GetAngle(OX, OXY_shift)
+
+  print "Angle between OX and OXY_shift = ", Angle
+  if math.fabs(Angle - 45.0) > 1e-05:
+    print "  Error: returned angle is", Angle, "while must be 45.0"
+
   ####### Position (LCS) #######
 
   Pos = geompy.GetPosition(box)
index 61228920c6f7c4ab4750bde6d3972eb4eaf25456..ba1cb7c27630ddb0143928d089a9298b5f6fb489 100644 (file)
@@ -2040,6 +2040,29 @@ def MinDistance(theShape1, theShape2):
       print "MinDistance : ", MeasuOp.GetErrorCode()
     return aTuple[0]
 
+## Get minimal distance between the given shapes.
+#  @param theShape1,theShape2 Shapes to find minimal distance between.
+#  @return Value of the minimal distance between the given shapes.
+#
+#  Example: see GEOM_TestMeasures.py
+def MinDistanceComponents(theShape1, theShape2):
+    aTuple = MeasuOp.GetMinDistance(theShape1, theShape2)
+    if MeasuOp.IsDone() == 0:
+      print "MinDistanceComponents : ", MeasuOp.GetErrorCode()
+    aRes = [aTuple[0], aTuple[4] - aTuple[1], aTuple[5] - aTuple[2], aTuple[6] - aTuple[3]]
+    return aRes
+
+## Get angle between the given shapes.
+#  @param theShape1,theShape2 Lines or linear edges to find angle between.
+#  @return Value of the angle between the given shapes.
+#
+#  Example: see GEOM_TestMeasures.py
+def GetAngle(theShape1, theShape2):
+    anAngle = MeasuOp.GetAngle(theShape1, theShape2)
+    if MeasuOp.IsDone() == 0:
+      print "GetAngle : ", MeasuOp.GetErrorCode()
+    return anAngle
+
 ## Get min and max tolerances of sub-shapes of theShape
 #  @param theShape Shape, to get tolerances of.
 #  @return [FaceMin,FaceMax, EdgeMin,EdgeMax, VertMin,VertMax]
index 7c3f45974d864479b56fe087f1330935ab656d09..8391f494e2c82bf043837e31ca2687ee432cf6dc 100644 (file)
@@ -47,12 +47,14 @@ LIB_SRC =   MeasureGUI.cxx \
                MeasureGUI_1Sel12LineEdit_QTD.cxx \
                MeasureGUI_1Sel1TextView_QTD.cxx \
                MeasureGUI_2Sel1LineEdit_QTD.cxx \
+               MeasureGUI_2Sel4LineEdit_QTD.cxx \
                MeasureGUI_Skeleton.cxx \
                MeasureGUI_PropertiesDlg.cxx \
                MeasureGUI_CenterMassDlg.cxx \
                MeasureGUI_InertiaDlg.cxx \
                MeasureGUI_BndBoxDlg.cxx \
                MeasureGUI_DistanceDlg.cxx \
+               MeasureGUI_AngleDlg.cxx \
                MeasureGUI_MaxToleranceDlg.cxx \
                MeasureGUI_WhatisDlg.cxx \
                MeasureGUI_CheckShapeDlg.cxx \
@@ -66,12 +68,14 @@ LIB_MOC = \
                MeasureGUI_1Sel12LineEdit_QTD.h \
                MeasureGUI_1Sel1TextView_QTD.h \
                MeasureGUI_2Sel1LineEdit_QTD.h \
+               MeasureGUI_2Sel4LineEdit_QTD.h \
                MeasureGUI_Skeleton.h \
                MeasureGUI_PropertiesDlg.h \
                MeasureGUI_CenterMassDlg.h \
                MeasureGUI_InertiaDlg.h \
                MeasureGUI_BndBoxDlg.h \
                MeasureGUI_DistanceDlg.h \
+               MeasureGUI_AngleDlg.h \
                MeasureGUI_MaxToleranceDlg.h \
                MeasureGUI_WhatisDlg.h \
                MeasureGUI_CheckShapeDlg.h \
index 2b2186d9153da08ca40f76172df6fa7a704e3eeb..b872ced4c3762d23d7a27ce43c74859ab6e5856b 100644 (file)
@@ -38,6 +38,7 @@
 #include "MeasureGUI_InertiaDlg.h"       // Method INERTIA
 #include "MeasureGUI_BndBoxDlg.h"        // Method BNDBOX
 #include "MeasureGUI_DistanceDlg.h"      // Method DISTANCE
+#include "MeasureGUI_AngleDlg.h"         // Method ANGLE
 #include "MeasureGUI_MaxToleranceDlg.h"  // Method MAXTOLERANCE
 #include "MeasureGUI_WhatisDlg.h"        // Method WHATIS
 #include "MeasureGUI_CheckShapeDlg.h"    // Method CHECKSHAPE
@@ -79,6 +80,7 @@ bool MeasureGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
     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 7043: new MeasureGUI_AngleDlg       (getGeometryGUI(), parent); break; // ANGLE
     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
index 5010e26b8aad293e4b0a0d73ec52da93c70087d4..ad4fba90b85a90c7f127ac47f114af8fecad4a92 100644 (file)
@@ -1,57 +1,36 @@
-// 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)
+** Created: Tue Oct 9 14:45:59 2007
+**      by: The User Interface Compiler ($Id$)
 **
 ** WARNING! All changes made in this file will be lost!
 ****************************************************************************/
+
 #include "MeasureGUI_2Sel1LineEdit_QTD.h"
 
 #include <qvariant.h>
+#include <qpushbutton.h>
 #include <qgroupbox.h>
 #include <qlabel.h>
 #include <qlineedit.h>
-#include <qpushbutton.h>
 #include <qlayout.h>
 #include <qtooltip.h>
 #include <qwhatsthis.h>
 
-/* 
- *  Constructs a MeasureGUI_2Sel1LineEdit_QTD which is a child of 'parent', with the 
+/*
+ *  Constructs a MeasureGUI_2Sel1LineEdit_QTD as 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 )
+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 );
@@ -59,38 +38,14 @@ MeasureGUI_2Sel1LineEdit_QTD::MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent,  co
     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 );
 
@@ -98,18 +53,40 @@ MeasureGUI_2Sel1LineEdit_QTD::MeasureGUI_2Sel1LineEdit_QTD( QWidget* parent,  co
 
     Layout1->addWidget( LineEdit1, 0, 2 );
 
+    TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
+    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel2, 1, 0 );
+
     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 );
 
+    LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
+
+    Layout1->addWidget( LineEdit2, 1, 2 );
+
+    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel3, 2, 0 );
+
+    LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
+
+    Layout1->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 );
+    Spacer8 = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( Spacer8, 3, 2 );
+
     GroupBox1Layout->addLayout( Layout1, 0, 0 );
 
     MeasureGUI_2Sel1LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
+    languageChange();
+    resize( QSize(129, 115).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
 }
 
-/*  
+/*
  *  Destroys the object and frees any allocated resources
  */
 MeasureGUI_2Sel1LineEdit_QTD::~MeasureGUI_2Sel1LineEdit_QTD()
@@ -117,3 +94,11 @@ MeasureGUI_2Sel1LineEdit_QTD::~MeasureGUI_2Sel1LineEdit_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_2Sel1LineEdit_QTD::languageChange()
+{
+}
+
index b77968ec3c580dc33a9e2ac8c80e2b53248f9366..aeeb6775ffbffd6ab332f83276f872f987943fad 100644 (file)
@@ -1,45 +1,29 @@
-// 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)
+** Created: Tue Oct 9 14:45:55 2007
+**      by: The User Interface Compiler ($Id$)
 **
 ** WARNING! All changes made in this file will be lost!
 ****************************************************************************/
+
 #ifndef MEASUREGUI_2SEL1LINEEDIT_QTD_H
 #define MEASUREGUI_2SEL1LINEEDIT_QTD_H
 
 #include <qvariant.h>
 #include <qwidget.h>
-class QVBoxLayout; 
-class QHBoxLayout; 
-class QGridLayout; 
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
 class QGroupBox;
 class QLabel;
-class QLineEdit;
 class QPushButton;
+class QLineEdit;
 
 class MeasureGUI_2Sel1LineEdit_QTD : public QWidget
-{ 
+{
     Q_OBJECT
 
 public:
@@ -47,20 +31,24 @@ public:
     ~MeasureGUI_2Sel1LineEdit_QTD();
 
     QGroupBox* GroupBox1;
-    QLabel* TextLabel3;
-    QLineEdit* LineEdit3;
-    QLineEdit* LineEdit2;
-    QLabel* TextLabel2;
     QLabel* TextLabel1;
     QPushButton* PushButton1;
     QLineEdit* LineEdit1;
+    QLabel* TextLabel2;
     QPushButton* PushButton2;
-
+    QLineEdit* LineEdit2;
+    QLabel* TextLabel3;
+    QLineEdit* LineEdit3;
 
 protected:
     QGridLayout* MeasureGUI_2Sel1LineEdit_QTDLayout;
     QGridLayout* GroupBox1Layout;
     QGridLayout* Layout1;
+    QSpacerItem* Spacer8;
+
+protected slots:
+    virtual void languageChange();
+
 };
 
 #endif // MEASUREGUI_2SEL1LINEEDIT_QTD_H
diff --git a/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.cxx
new file mode 100644 (file)
index 0000000..3c5563c
--- /dev/null
@@ -0,0 +1,131 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'MeasureGUI_2Sel4LineEdit_QTD.ui'
+**
+** Created: Tue Oct 9 14:32:18 2007
+**      by: The User Interface Compiler ($Id$)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#include "MeasureGUI_2Sel4LineEdit_QTD.h"
+
+#include <qvariant.h>
+#include <qpushbutton.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/*
+ *  Constructs a MeasureGUI_2Sel4LineEdit_QTD as a child of 'parent', with the
+ *  name 'name' and widget flags set to 'f'.
+ */
+MeasureGUI_2Sel4LineEdit_QTD::MeasureGUI_2Sel4LineEdit_QTD( QWidget* parent, const char* name, WFlags fl )
+    : QWidget( parent, name, fl )
+{
+    if ( !name )
+       setName( "MeasureGUI_2Sel4LineEdit_QTD" );
+    MeasureGUI_2Sel4LineEdit_QTDLayout = new QGridLayout( this, 1, 1, 0, 6, "MeasureGUI_2Sel4LineEdit_QTDLayout"); 
+
+    GroupBox1 = new QGroupBox( this, "GroupBox1" );
+    GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, GroupBox1->sizePolicy().hasHeightForWidth() ) );
+    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() ) );
+
+    Layout1->addWidget( TextLabel1, 0, 0 );
+
+    PushButton1 = new QPushButton( GroupBox1, "PushButton1" );
+    PushButton1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton1->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( PushButton1, 0, 1 );
+
+    LineEdit1 = new QLineEdit( GroupBox1, "LineEdit1" );
+
+    Layout1->addWidget( LineEdit1, 0, 2 );
+
+    TextLabel2 = new QLabel( GroupBox1, "TextLabel2" );
+    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel2, 1, 0 );
+
+    PushButton2 = new QPushButton( GroupBox1, "PushButton2" );
+    PushButton2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, PushButton2->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( PushButton2, 1, 1 );
+
+    LineEdit2 = new QLineEdit( GroupBox1, "LineEdit2" );
+
+    Layout1->addWidget( LineEdit2, 1, 2 );
+
+    TextLabel3 = new QLabel( GroupBox1, "TextLabel3" );
+    TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel3, 2, 0 );
+
+    LineEdit3 = new QLineEdit( GroupBox1, "LineEdit3" );
+
+    Layout1->addMultiCellWidget( LineEdit3, 2, 2, 1, 2 );
+
+    TextLabel4 = new QLabel( GroupBox1, "TextLabel4" );
+    TextLabel4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel4->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel4, 3, 0 );
+
+    LineEdit4 = new QLineEdit( GroupBox1, "LineEdit4" );
+
+    Layout1->addMultiCellWidget( LineEdit4, 3, 3, 1, 2 );
+
+    TextLabel5 = new QLabel( GroupBox1, "TextLabel5" );
+    TextLabel5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel5, 4, 0 );
+
+    LineEdit5 = new QLineEdit( GroupBox1, "LineEdit5" );
+
+    Layout1->addMultiCellWidget( LineEdit5, 4, 4, 1, 2 );
+
+    TextLabel6 = new QLabel( GroupBox1, "TextLabel6" );
+    TextLabel6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, TextLabel6->sizePolicy().hasHeightForWidth() ) );
+
+    Layout1->addWidget( TextLabel6, 5, 0 );
+
+    LineEdit6 = new QLineEdit( GroupBox1, "LineEdit6" );
+
+    Layout1->addMultiCellWidget( LineEdit6, 5, 5, 1, 2 );
+    Spacer8 = new QSpacerItem( 0, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
+    Layout1->addItem( Spacer8, 6, 2 );
+
+    GroupBox1Layout->addLayout( Layout1, 0, 0 );
+
+    MeasureGUI_2Sel4LineEdit_QTDLayout->addWidget( GroupBox1, 0, 0 );
+    languageChange();
+    resize( QSize(129, 163).expandedTo(minimumSizeHint()) );
+    clearWState( WState_Polished );
+}
+
+/*
+ *  Destroys the object and frees any allocated resources
+ */
+MeasureGUI_2Sel4LineEdit_QTD::~MeasureGUI_2Sel4LineEdit_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_2Sel4LineEdit_QTD::languageChange()
+{
+}
+
diff --git a/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.h b/src/MeasureGUI/MeasureGUI_2Sel4LineEdit_QTD.h
new file mode 100644 (file)
index 0000000..605c71d
--- /dev/null
@@ -0,0 +1,60 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'MeasureGUI_2Sel4LineEdit_QTD.ui'
+**
+** Created: Tue Oct 9 14:31:27 2007
+**      by: The User Interface Compiler ($Id$)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+
+#ifndef MEASUREGUI_2SEL4LINEEDIT_QTD_H
+#define MEASUREGUI_2SEL4LINEEDIT_QTD_H
+
+#include <qvariant.h>
+#include <qwidget.h>
+
+class QVBoxLayout;
+class QHBoxLayout;
+class QGridLayout;
+class QSpacerItem;
+class QGroupBox;
+class QLabel;
+class QPushButton;
+class QLineEdit;
+
+class MeasureGUI_2Sel4LineEdit_QTD : public QWidget
+{
+    Q_OBJECT
+
+public:
+    MeasureGUI_2Sel4LineEdit_QTD( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+    ~MeasureGUI_2Sel4LineEdit_QTD();
+
+    QGroupBox* GroupBox1;
+    QLabel* TextLabel1;
+    QPushButton* PushButton1;
+    QLineEdit* LineEdit1;
+    QLabel* TextLabel2;
+    QPushButton* PushButton2;
+    QLineEdit* LineEdit2;
+    QLabel* TextLabel3;
+    QLineEdit* LineEdit3;
+    QLabel* TextLabel4;
+    QLineEdit* LineEdit4;
+    QLabel* TextLabel5;
+    QLineEdit* LineEdit5;
+    QLabel* TextLabel6;
+    QLineEdit* LineEdit6;
+
+protected:
+    QGridLayout* MeasureGUI_2Sel4LineEdit_QTDLayout;
+    QGridLayout* GroupBox1Layout;
+    QGridLayout* Layout1;
+    QSpacerItem* Spacer8;
+
+protected slots:
+    virtual void languageChange();
+
+};
+
+#endif // MEASUREGUI_2SEL4LINEEDIT_QTD_H
diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.cxx b/src/MeasureGUI/MeasureGUI_AngleDlg.cxx
new file mode 100644 (file)
index 0000000..468d678
--- /dev/null
@@ -0,0 +1,330 @@
+//  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
+//
+//  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
+//
+//
+//
+//  File   : MeasureGUI_AngleDlg.cxx
+//  Author : Julia DOROVSKIKH
+//  Module : GEOM
+//  $Header$
+
+#include "MeasureGUI_AngleDlg.h"
+
+#include "MeasureGUI_2Sel1LineEdit_QTD.h"
+
+#include "GEOMBase.h"
+#include "GEOM_Displayer.h"
+#include "DlgRef_SpinBox.h"
+
+#include "SUIT_Session.h"
+#include "SUIT_ViewWindow.h"
+#include "SOCC_Prs.h"
+#include "SOCC_ViewModel.h"
+#include "SalomeApp_Tools.h"
+
+// OCCT Includes
+#include <AIS_AngleDimension.hxx>
+#include <AIS_ListIteratorOfListOfInteractive.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <TopExp.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <Geom_Plane.hxx>
+#include <gce_MakePln.hxx>
+#include <Precision.hxx>
+
+// QT Includes
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+
+#include "GEOMImpl_Types.hxx"
+
+#include "utilities.h"
+
+#include <Standard_Failure.hxx>
+#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
+
+//=================================================================================
+// class    : MeasureGUI_AngleDlg()
+// purpose  : Constructs a MeasureGUI_AngleDlg 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.
+//=================================================================================
+MeasureGUI_AngleDlg::MeasureGUI_AngleDlg (GeometryGUI* GUI, QWidget* parent)
+  : MeasureGUI_Skeleton(GUI, parent, "MeasureGUI_AngleDlg")
+{
+  QPixmap image0 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_ANGLE")));
+  QPixmap image1 (SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_MEASURE_ANGLE_TITLE"));
+
+  // Widgets
+
+  GroupConstructors->setTitle(tr("GEOM_MEASURE_ANGLE_ANGLE"));
+  RadioButton1->setPixmap(image0);
+
+  myGrp = new MeasureGUI_2Sel1LineEdit_QTD(this, "myGrp");
+  myGrp->GroupBox1->setTitle(tr("GEOM_MEASURE_ANGLE_OBJ"));
+  myGrp->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
+  myGrp->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
+  myGrp->TextLabel3->setText(tr("GEOM_MEASURE_ANGLE_IS"));
+  myGrp->LineEdit3->setReadOnly(TRUE);
+  myGrp->PushButton1->setPixmap(image1);
+  myGrp->PushButton2->setPixmap(image1);
+  myGrp->LineEdit1->setReadOnly(true);
+  myGrp->LineEdit2->setReadOnly(true);
+
+  Layout1->addWidget(myGrp, 1, 0);
+
+  // Help page reference
+  myHelpFileName = "files/salome2_sp3_measuregui_functions.htm#Angle";
+
+  // Initialisation
+  Init();
+}
+
+//=================================================================================
+// function : ~MeasureGUI_AngleDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_AngleDlg::~MeasureGUI_AngleDlg()
+{
+}
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_AngleDlg::Init()
+{
+  mySelBtn   = myGrp->PushButton1;
+  mySelEdit  = myGrp->LineEdit1;
+  mySelBtn2  = myGrp->PushButton2;
+  mySelEdit2 = myGrp->LineEdit2;
+
+  myEditCurrentArgument = mySelEdit;
+
+  connect(mySelEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(mySelBtn2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  globalSelection(GEOM_LINE);
+  MeasureGUI_Skeleton::Init();
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection has changed
+//=================================================================================
+void MeasureGUI_AngleDlg::SelectionIntoArgument()
+{
+  Standard_Boolean testResult = Standard_False;
+  GEOM::GEOM_Object_var aSelectedObject =
+    GEOMBase::ConvertIOinGEOMObject(firstIObject(), testResult);
+
+  if (!testResult)
+    aSelectedObject = GEOM::GEOM_Object::_nil();
+
+  if (myEditCurrentArgument == mySelEdit)
+    myObj = aSelectedObject;
+  else
+    myObj2 = aSelectedObject;
+
+  processObject();
+}
+
+//=================================================================================
+// function : processObject()
+// purpose  : Fill dialogs fields in accordance with myObj and myObj2
+//=================================================================================
+void MeasureGUI_AngleDlg::processObject()
+{
+  myGrp->LineEdit1->setText(!myObj->_is_nil()  ? GEOMBase::GetName(myObj ) : "");
+  myGrp->LineEdit2->setText(!myObj2->_is_nil() ? GEOMBase::GetName(myObj2) : "");
+
+  double anAngle = 0.;
+  if (getParameters(anAngle))
+  {
+    myGrp->LineEdit3->setText(DlgRef_SpinBox::PrintDoubleValue(anAngle));
+    redisplayPreview();
+  }
+  else
+  {
+    myGrp->LineEdit3->setText("");
+    erasePreview();
+  }
+}
+
+//=================================================================================
+// function : getParameters()
+// purpose  : Get angle between objects
+//=================================================================================
+bool MeasureGUI_AngleDlg::getParameters (double& theAngle)
+{
+  QString msg;
+  if (isValid(msg)) {
+    try {
+      theAngle = GEOM::GEOM_IMeasureOperations::_narrow(getOperation())->GetAngle(myObj, myObj2);
+    }
+    catch(const SALOME::SALOME_Exception& e) {
+      SalomeApp_Tools::QtCatchCorbaException(e);
+      return false;
+    }
+
+    return getOperation()->IsDone();
+  }
+
+  return false;
+}
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_AngleDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if (send == mySelBtn) {
+    mySelEdit->setFocus();
+    myEditCurrentArgument = mySelEdit;
+  }
+  else {
+    mySelEdit2->setFocus();
+    myEditCurrentArgument = mySelEdit2;
+  }
+
+  globalSelection(GEOM_LINE);
+  SelectionIntoArgument();
+}
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_AngleDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+
+  if (send == mySelEdit)
+    myEditCurrentArgument = mySelEdit;
+  else
+    myEditCurrentArgument = mySelEdit2;
+
+  if (GEOMBase::SelectionByNameInDialogs(this, mySelEdit->text(), selectedIO()))
+    mySelEdit->setText(mySelEdit->text());
+}
+
+//=================================================================================
+// function : buildPrs()
+// purpose  :
+//=================================================================================
+SALOME_Prs* MeasureGUI_AngleDlg::buildPrs()
+{
+  double anAngle = 0.;
+
+  SUIT_ViewWindow* vw = SUIT_Session::session()->activeApplication()->desktop()->activeWindow();
+
+  if (myObj->_is_nil() || myObj2->_is_nil() || !getParameters(anAngle) ||
+      vw->getViewManager()->getType() != OCCViewer_Viewer::Type())
+    return 0;
+
+  if (anAngle > Precision::Angular())
+  {
+    try
+    {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+      OCC_CATCH_SIGNALS;
+#endif
+      TopoDS_Shape S1, S2;
+      if (GEOMBase::GetShape(myObj , S1, TopAbs_EDGE) &&
+          GEOMBase::GetShape(myObj2, S2, TopAbs_EDGE))
+      {
+        TopoDS_Edge anEdge1 = TopoDS::Edge(S1);
+        TopoDS_Edge anEdge2 = TopoDS::Edge(S2);
+
+        // Build a plane for angle dimension presentation {P11, P12, P3}
+        TopoDS_Vertex V11, V12, V21, V22;
+        TopExp::Vertices(anEdge1, V11, V12);
+        TopExp::Vertices(anEdge2, V21, V22);
+
+        gp_Pnt aP11 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge1));
+        gp_Pnt aP12 = BRep_Tool::Pnt(TopExp::LastVertex (anEdge1));
+
+        gp_Pnt aP21 = BRep_Tool::Pnt(TopExp::FirstVertex(anEdge2));
+        gp_Pnt aP22 = BRep_Tool::Pnt(TopExp::LastVertex (anEdge2));
+
+        //        *P3
+        //         \
+        //          \
+        //           *P22
+        //          /
+        //         /
+        // P11    /         P12
+        // *-----/----------*
+        //  \   /
+        //   \ /
+        //    *P21
+        gp_Pnt aP3 (aP22.XYZ() + aP11.XYZ() - aP21.XYZ());
+
+        gce_MakePln gce_MP (aP11, aP12, aP3);
+        Handle(Geom_Plane) aPlane = new Geom_Plane(gce_MP.Value());
+
+        // Build the angle dimension presentation
+        QString aLabel;
+        aLabel.sprintf("%.1f", anAngle);
+
+        Handle(AIS_AngleDimension) anIO = new AIS_AngleDimension
+          (anEdge1, anEdge2, aPlane, anAngle * PI180,
+           TCollection_ExtendedString((Standard_CString)aLabel.latin1()));
+
+        SOCC_Prs* aPrs =
+          dynamic_cast<SOCC_Prs*>(((SOCC_Viewer*)(vw->getViewManager()->getViewModel()))->CreatePrs(0));
+
+        if (aPrs)
+          aPrs->AddObject(anIO);
+
+        return aPrs;
+      }
+    }
+    catch(Standard_Failure)
+    {
+    }
+  }
+
+  return 0;
+}
+
+//=================================================================================
+// function : isValid()
+// purpose  :
+//=================================================================================
+bool MeasureGUI_AngleDlg::isValid(QString& msg)
+{
+  return MeasureGUI_Skeleton::isValid(msg) && !myObj2->_is_nil();
+}
diff --git a/src/MeasureGUI/MeasureGUI_AngleDlg.h b/src/MeasureGUI/MeasureGUI_AngleDlg.h
new file mode 100644 (file)
index 0000000..0ef32ab
--- /dev/null
@@ -0,0 +1,71 @@
+//  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 
+// 
+//  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
+//
+//
+//
+//  File   : MeasureGUI_AngleDlg.h
+//  Author : Julia DOROVSKIKH
+//  Module : GEOM
+
+#ifndef DIALOGBOX_ANGLE_H
+#define DIALOGBOX_ANGLE_H
+
+#include "GEOM_MeasureGUI.hxx"
+
+#include "MeasureGUI_Skeleton.h"
+
+class MeasureGUI_2Sel1LineEdit_QTD;
+
+//=================================================================================
+// class    : MeasureGUI_AngleDlg
+// purpose  :
+//=================================================================================
+class GEOM_MEASUREGUI_EXPORT MeasureGUI_AngleDlg : public MeasureGUI_Skeleton
+{ 
+  Q_OBJECT
+
+public:
+  MeasureGUI_AngleDlg (GeometryGUI* GUI, QWidget* parent);
+  ~MeasureGUI_AngleDlg();
+
+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& msg);
+
+private:
+  void                          Init();
+  bool                          getParameters (double& theAngle);
+
+private:
+  QLineEdit*                    myEditCurrentArgument;
+  QLineEdit*                    mySelEdit2;
+  QPushButton*                  mySelBtn2;
+  MeasureGUI_2Sel1LineEdit_QTD* myGrp;
+
+  GEOM::GEOM_Object_var         myObj2;
+};
+
+#endif // DIALOGBOX_ANGLE_H
index 163b19653b0c00f783aa9561db2a6aa8ebc892dd..93c37b8370bd521d443e75c29da458a04a2b3c2f 100644 (file)
@@ -27,7 +27,7 @@
 //  $Header$
 
 #include "MeasureGUI_DistanceDlg.h"
-#include "MeasureGUI_2Sel1LineEdit_QTD.h"
+#include "MeasureGUI_2Sel4LineEdit_QTD.h"
 #include "GEOMBase.h"
 #include "GEOM_Displayer.h"
 #include "DlgRef_SpinBox.h"
@@ -78,12 +78,18 @@ MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg( GeometryGUI* GUI, QWidget* paren
   GroupConstructors->setTitle( tr( "GEOM_DISTANCE" ) );
   RadioButton1->setPixmap( image0 );
 
-  myGrp = new MeasureGUI_2Sel1LineEdit_QTD( this, "myGrp" );
+  myGrp = new MeasureGUI_2Sel4LineEdit_QTD( this, "myGrp" );
   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->TextLabel4->setText( tr( "GEOM_DX" ) );
+  myGrp->TextLabel5->setText( tr( "GEOM_DY" ) );
+  myGrp->TextLabel6->setText( tr( "GEOM_DZ" ) );
   myGrp->LineEdit3->setReadOnly( TRUE );
+  myGrp->LineEdit4->setReadOnly( TRUE );
+  myGrp->LineEdit5->setReadOnly( TRUE );
+  myGrp->LineEdit6->setReadOnly( TRUE );
   myGrp->PushButton1->setPixmap( image1 );
   myGrp->PushButton2->setPixmap( image1 );
   myGrp->LineEdit1->setReadOnly( true );
@@ -152,7 +158,7 @@ void MeasureGUI_DistanceDlg::SelectionIntoArgument()
 
 //=================================================================================
 // function : processObject()
-// purpose  : Fill dialogs fileds in accordance with myObj and myObj2
+// purpose  : Fill dialogs fields in accordance with myObj and myObj2
 //=================================================================================
 void MeasureGUI_DistanceDlg::processObject()
 {
@@ -161,14 +167,23 @@ void MeasureGUI_DistanceDlg::processObject()
 
   gp_Pnt aPnt1, aPnt2;
   double aDist = 0.;
-  if ( getParameters( aDist, aPnt1, aPnt2 ) )
+  if (getParameters(aDist, aPnt1, aPnt2))
   {
     myGrp->LineEdit3->setText( DlgRef_SpinBox::PrintDoubleValue( aDist ) );
+
+    gp_XYZ aVec = aPnt2.XYZ() - aPnt1.XYZ();
+    myGrp->LineEdit4->setText( DlgRef_SpinBox::PrintDoubleValue( aVec.X() ) );
+    myGrp->LineEdit5->setText( DlgRef_SpinBox::PrintDoubleValue( aVec.Y() ) );
+    myGrp->LineEdit6->setText( DlgRef_SpinBox::PrintDoubleValue( aVec.Z() ) );
+
     redisplayPreview();
   }
   else
   {
     myGrp->LineEdit3->setText( "" );
+    myGrp->LineEdit4->setText( "" );
+    myGrp->LineEdit5->setText( "" );
+    myGrp->LineEdit6->setText( "" );
     erasePreview();
   }
 }
index cd4702a3adb555a31bb540540cf1d9957a481da3..795b6355880a5837fd6200ff16e91173452a4805 100644 (file)
@@ -17,7 +17,7 @@
 //  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
 //
 //
 //
@@ -31,7 +31,7 @@
 
 #include "MeasureGUI_Skeleton.h"
 
-class MeasureGUI_2Sel1LineEdit_QTD;
+class MeasureGUI_2Sel4LineEdit_QTD;
 class gp_Pnt;
 
 #if defined WNT && defined MEASUREGUI_EXPORTS
@@ -74,7 +74,7 @@ private:
     QLineEdit*                          mySelEdit2;
     QPushButton*                        mySelBtn2;
 
-    MeasureGUI_2Sel1LineEdit_QTD*       myGrp;
+    MeasureGUI_2Sel4LineEdit_QTD*       myGrp;
     GEOM::GEOM_Object_var               myObj2;
 
 };
index e68cca900e3dc8533b923f7c5c4a46917b130641..0cb627406856a798dbfbd2b1fba41afb0d777dd2 100644 (file)
@@ -12,9 +12,6 @@
             <height>115</height>
         </rect>
     </property>
-    <property name="caption">
-        <string>MeasureGUI_2Sel1LineEdit_QTD</string>
-    </property>
     <grid>
         <property name="name">
             <cstring>unnamed</cstring>
@@ -37,9 +34,6 @@
                     <verstretch>0</verstretch>
                 </sizepolicy>
             </property>
-            <property name="title">
-                <string></string>
-            </property>
             <grid>
                 <property name="name">
                     <cstring>unnamed</cstring>
                         <property name="spacing">
                             <number>6</number>
                         </property>
-                        <spacer row="3" column="2">
-                            <property name="name">
-                                <cstring>Spacer8</cstring>
-                            </property>
-                            <property name="orientation">
-                                <enum>Vertical</enum>
-                            </property>
-                            <property name="sizeType">
-                                <enum>Expanding</enum>
-                            </property>
-                            <property name="sizeHint">
-                                <size>
-                                    <width>0</width>
-                                    <height>60</height>
-                                </size>
-                            </property>
-                        </spacer>
-                        <widget class="QLabel" row="2" column="0">
+                        <widget class="QLabel" row="0" column="0">
                             <property name="name">
-                                <cstring>TextLabel3</cstring>
+                                <cstring>TextLabel1</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
                                     <verstretch>0</verstretch>
                                 </sizepolicy>
                             </property>
-                            <property name="text">
-                                <string>TL3</string>
-                            </property>
-                        </widget>
-                        <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
-                            <property name="name">
-                                <cstring>LineEdit3</cstring>
-                            </property>
-                        </widget>
-                        <widget class="QLineEdit" row="1" column="2">
-                            <property name="name">
-                                <cstring>LineEdit2</cstring>
-                            </property>
                         </widget>
-                        <widget class="QLabel" row="1" column="0">
+                        <widget class="QPushButton" row="0" column="1">
                             <property name="name">
-                                <cstring>TextLabel2</cstring>
+                                <cstring>PushButton1</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
                                     <verstretch>0</verstretch>
                                 </sizepolicy>
                             </property>
-                            <property name="text">
-                                <string>TL2</string>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
                             </property>
                         </widget>
-                        <widget class="QLabel" row="0" column="0">
+                        <widget class="QLabel" row="1" column="0">
                             <property name="name">
-                                <cstring>TextLabel1</cstring>
+                                <cstring>TextLabel2</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
                                     <verstretch>0</verstretch>
                                 </sizepolicy>
                             </property>
-                            <property name="text">
-                                <string>TL1</string>
-                            </property>
                         </widget>
-                        <widget class="QPushButton" row="0" column="1">
+                        <widget class="QPushButton" row="1" column="1">
                             <property name="name">
-                                <cstring>PushButton1</cstring>
+                                <cstring>PushButton2</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
                                     <verstretch>0</verstretch>
                                 </sizepolicy>
                             </property>
-                            <property name="text">
-                                <string></string>
-                            </property>
                         </widget>
-                        <widget class="QLineEdit" row="0" column="2">
+                        <widget class="QLineEdit" row="1" column="2">
                             <property name="name">
-                                <cstring>LineEdit1</cstring>
+                                <cstring>LineEdit2</cstring>
                             </property>
                         </widget>
-                        <widget class="QPushButton" row="1" column="1">
+                        <widget class="QLabel" row="2" column="0">
                             <property name="name">
-                                <cstring>PushButton2</cstring>
+                                <cstring>TextLabel3</cstring>
                             </property>
                             <property name="sizePolicy">
                                 <sizepolicy>
                                     <verstretch>0</verstretch>
                                 </sizepolicy>
                             </property>
-                            <property name="text">
-                                <string></string>
+                        </widget>
+                        <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit3</cstring>
                             </property>
                         </widget>
+                        <spacer row="3" column="2">
+                            <property name="name">
+                                <cstring>Spacer8</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>0</width>
+                                    <height>60</height>
+                                </size>
+                            </property>
+                        </spacer>
                     </grid>
                 </widget>
             </grid>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_2Sel4LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_2Sel4LineEdit_QTD.ui
new file mode 100644 (file)
index 0000000..8fb9b31
--- /dev/null
@@ -0,0 +1,219 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_2Sel4LineEdit_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_2Sel4LineEdit_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>129</width>
+            <height>163</height>
+        </rect>
+    </property>
+    <grid>
+        <property name="name">
+            <cstring>unnamed</cstring>
+        </property>
+        <property name="margin">
+            <number>0</number>
+        </property>
+        <property name="spacing">
+            <number>6</number>
+        </property>
+        <widget class="QGroupBox" row="0" column="0">
+            <property name="name">
+                <cstring>GroupBox1</cstring>
+            </property>
+            <property name="sizePolicy">
+                <sizepolicy>
+                    <hsizetype>7</hsizetype>
+                    <vsizetype>7</vsizetype>
+                    <horstretch>0</horstretch>
+                    <verstretch>0</verstretch>
+                </sizepolicy>
+            </property>
+            <grid>
+                <property name="name">
+                    <cstring>unnamed</cstring>
+                </property>
+                <property name="margin">
+                    <number>11</number>
+                </property>
+                <property name="spacing">
+                    <number>6</number>
+                </property>
+                <widget class="QLayoutWidget" row="0" column="0">
+                    <property name="name">
+                        <cstring>Layout1</cstring>
+                    </property>
+                    <grid>
+                        <property name="name">
+                            <cstring>unnamed</cstring>
+                        </property>
+                        <property name="margin">
+                            <number>0</number>
+                        </property>
+                        <property name="spacing">
+                            <number>6</number>
+                        </property>
+                        <widget class="QLabel" row="0" column="0">
+                            <property name="name">
+                                <cstring>TextLabel1</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QPushButton" row="0" column="1">
+                            <property name="name">
+                                <cstring>PushButton1</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="1" column="0">
+                            <property name="name">
+                                <cstring>TextLabel2</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QPushButton" row="1" column="1">
+                            <property name="name">
+                                <cstring>PushButton2</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="1" column="2">
+                            <property name="name">
+                                <cstring>LineEdit2</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="2" column="0">
+                            <property name="name">
+                                <cstring>TextLabel3</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit3</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="3" column="0">
+                            <property name="name">
+                                <cstring>TextLabel4</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit4</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="4" column="0">
+                            <property name="name">
+                                <cstring>TextLabel5</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="4" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit5</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLabel" row="5" column="0">
+                            <property name="name">
+                                <cstring>TextLabel6</cstring>
+                            </property>
+                            <property name="sizePolicy">
+                                <sizepolicy>
+                                    <hsizetype>0</hsizetype>
+                                    <vsizetype>0</vsizetype>
+                                    <horstretch>0</horstretch>
+                                    <verstretch>0</verstretch>
+                                </sizepolicy>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="5" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit6</cstring>
+                            </property>
+                        </widget>
+                        <spacer row="6" column="2">
+                            <property name="name">
+                                <cstring>Spacer8</cstring>
+                            </property>
+                            <property name="orientation">
+                                <enum>Vertical</enum>
+                            </property>
+                            <property name="sizeType">
+                                <enum>Expanding</enum>
+                            </property>
+                            <property name="sizeHint">
+                                <size>
+                                    <width>0</width>
+                                    <height>60</height>
+                                </size>
+                            </property>
+                        </spacer>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
index 6ffec252bfd0dbeb71728a05b596bea78a4d055f..eea9301e50c164bbb8a7f63f0f6c1deaee900c00 100755 (executable)
@@ -34,5 +34,8 @@ uic -o MeasureGUI_1Sel12LineEdit_QTD.cxx -impl MeasureGUI_1Sel12LineEdit_QTD.h M
 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_2Sel4LineEdit_QTD.h MeasureGUI_2Sel4LineEdit_QTD.ui
+uic -o MeasureGUI_2Sel4LineEdit_QTD.cxx -impl MeasureGUI_2Sel4LineEdit_QTD.h MeasureGUI_2Sel4LineEdit_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