Salome HOME
DCQ : New Archi DCQ_07_01_04
authordcq <dcq@opencascade.com>
Tue, 6 Jan 2004 16:37:35 +0000 (16:37 +0000)
committerdcq <dcq@opencascade.com>
Tue, 6 Jan 2004 16:37:35 +0000 (16:37 +0000)
40 files changed:
src/MeasureGUI/Makefile.in [new file with mode: 0644]
src/MeasureGUI/MeasureGUI.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_BndBoxDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_CenterMassDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_CheckShapeDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_DistanceDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_DistanceDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_InertiaDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_InertiaDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_PropertiesDlg.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_Skeleton.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_Skeleton.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_Skeleton_QTD.h [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_WhatisDlg.cxx [new file with mode: 0644]
src/MeasureGUI/MeasureGUI_WhatisDlg.h [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui [new file with mode: 0644]
src/MeasureGUI/UIFiles/ui_to_cxx [new file with mode: 0755]

diff --git a/src/MeasureGUI/Makefile.in b/src/MeasureGUI/Makefile.in
new file mode 100644 (file)
index 0000000..2b983be
--- /dev/null
@@ -0,0 +1,89 @@
+#  GEOM MEASUREGUI : 
+#
+#  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   : Makefile.in
+#  Author : Damien COQUERET (OCC)
+#  Module : GEOM
+#  $Header: 
+
+top_srcdir=@top_srcdir@
+top_builddir=../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# header files 
+EXPORT_HEADERS=
+
+# Libraries targets
+LIB = libMeasureGUI.la 
+
+LIB_SRC =      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
+
+LIB_MOC = \
+               MeasureGUI.h \
+               MeasureGUI_Skeleton_QTD.h \
+               MeasureGUI_1Sel3LineEdit_QTD.h \
+               MeasureGUI_1Sel6LineEdit_QTD.h \
+               MeasureGUI_1Sel12LineEdit_QTD.h \
+               MeasureGUI_1Sel1TextView_QTD.h \
+               MeasureGUI_2Sel1LineEdit_QTD.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
+
+LIB_CLIENT_IDL = 
+
+LIB_SERVER_IDL = 
+
+# additionnal information to compil and link file
+
+CPPFLAGS += $(QT_INCLUDES) $(VTK_INCLUDES) $(OCC_INCLUDES) $(PYTHON_INCLUDES) -I${KERNEL_ROOT_DIR}/include/salome
+CXXFLAGS += -I${KERNEL_ROOT_DIR}/include/salome
+
+LDFLAGS += -lGEOMBase
+
+@CONCLUDE@
diff --git a/src/MeasureGUI/MeasureGUI.cxx b/src/MeasureGUI/MeasureGUI.cxx
new file mode 100644 (file)
index 0000000..d2a67da
--- /dev/null
@@ -0,0 +1,157 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+using namespace std;
+#include "MeasureGUI.h"
+
+#include "SALOMEGUI_QtCatchCorbaException.hxx"
+
+#include "MeasureGUI_PropertiesDlg.h"    // Method PROPERTIES
+#include "MeasureGUI_CenterMassDlg.h"    // Method CENTER MASS
+#include "MeasureGUI_InertiaDlg.h"       // Method INERTIA
+#include "MeasureGUI_BndBoxDlg.h"        // Method BNDBOX
+#include "MeasureGUI_DistanceDlg.h"      // Method DISTANCE
+#include "MeasureGUI_MaxToleranceDlg.h"  // Method MAXTOLERANCE
+#include "MeasureGUI_WhatisDlg.h"        // Method WHATIS
+#include "MeasureGUI_CheckShapeDlg.h"    // Method CHECKSHAPE
+
+//=======================================================================
+// function : MeasureGUI()
+// purpose  : Constructor
+//=======================================================================
+MeasureGUI::MeasureGUI() :
+  QObject()
+{
+  myGeomBase = new GEOMBase();
+  myGeomGUI = GEOMContext::GetGeomGUI();
+  myGeom = myGeomGUI->myComponentGeom;
+}
+
+
+//=======================================================================
+// function : ~MeasureGUI()
+// purpose  : Destructor
+//=======================================================================
+MeasureGUI::~MeasureGUI()
+{
+}
+
+
+//=======================================================================
+// function : OnGUIEvent()
+// purpose  : 
+//=======================================================================
+bool MeasureGUI::OnGUIEvent(int theCommandID, QAD_Desktop* parent)
+{
+  MeasureGUI* myMeasureGUI = new MeasureGUI();
+  myMeasureGUI->myGeomGUI->EmitSignalDeactivateDialog();
+  SALOME_Selection* Sel = SALOME_Selection::Selection(QAD_Application::getDesktop()->getActiveStudy()->getSelection());
+
+  switch (theCommandID)
+    {
+    case 701: // PROPERTIES (Length, surface, volume)
+      {
+       MeasureGUI_PropertiesDlg *aDlg = new MeasureGUI_PropertiesDlg(parent, "", Sel);
+       break;
+      }
+    case 702: // CDG : Center of mass
+      {
+       MeasureGUI_CenterMassDlg *aDlg = new MeasureGUI_CenterMassDlg(parent, "", myMeasureGUI, Sel);
+       break;
+      }
+    case 703: // INERTIA
+      {
+       MeasureGUI_InertiaDlg *aDlg = new MeasureGUI_InertiaDlg(parent, "", Sel);
+       break;
+      }
+    case 7041: // BOUNDING BOX
+      {
+       MeasureGUI_BndBoxDlg *aDlg = new MeasureGUI_BndBoxDlg(parent, "", Sel);
+       break;
+      }
+    case 7042: // MIN DISTANCE
+      {
+       MeasureGUI_DistanceDlg *aDlg = new MeasureGUI_DistanceDlg(parent, "", Sel);
+       break;
+      }
+    case 705: // MAXTOLERANCE
+      {
+       MeasureGUI_MaxToleranceDlg *aDlg = new MeasureGUI_MaxToleranceDlg(parent, "", Sel);
+       break;
+      }
+    case 706: // WHATIS
+      {
+       MeasureGUI_WhatisDlg *aDlg = new MeasureGUI_WhatisDlg(parent, "", Sel);
+       break;
+      }
+    case 707: // CHECKSHAPE
+     {
+       MeasureGUI_CheckShapeDlg *aDlg = new MeasureGUI_CheckShapeDlg(parent, "", Sel);
+       break;
+     }
+    default:
+      {
+       parent->putInfo(tr("GEOM_PRP_COMMAND").arg(theCommandID));
+       break;
+      }
+    }
+  return true;
+}
+
+
+//=====================================================================================
+// function : MakeCDGAndDisplay()
+// purpose  :
+//=====================================================================================
+void MeasureGUI::MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape)
+{
+  try {
+    GEOM::GEOM_Shape_var result = myGeom->MakeCDG(Shape);
+    if(result->_is_nil()) {
+      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_ABORT"));
+      return;
+    }
+    result->NameType(tr("GEOM_POINT"));
+    if(myGeomBase->Display(result))
+      QAD_Application::getDesktop()->putInfo(tr("GEOM_PRP_DONE"));
+  }  
+  catch(const SALOME::SALOME_Exception& S_ex) {
+    QtCatchCorbaException(S_ex);
+  }
+  return;
+}
+
+
+//=====================================================================================
+// EXPORTED METHODS
+//=====================================================================================
+extern "C"
+{
+  bool OnGUIEvent(int theCommandID, QAD_Desktop* parent)
+  {return MeasureGUI::OnGUIEvent(theCommandID, parent);}
+}
diff --git a/src/MeasureGUI/MeasureGUI.h b/src/MeasureGUI/MeasureGUI.h
new file mode 100644 (file)
index 0000000..751574e
--- /dev/null
@@ -0,0 +1,56 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI.h
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef MEASUREGUI_H
+#define MEASUREGUI_H
+
+#include "GEOMBase.h"
+
+//=================================================================================
+// class    : MeasureGUI
+// purpose  :
+//=================================================================================
+class MeasureGUI : public QObject
+{
+  Q_OBJECT /* for QT compatibility */
+
+public :
+  MeasureGUI();
+  ~MeasureGUI();
+
+  static bool OnGUIEvent(int theCommandID, QAD_Desktop* parent);
+
+  void MakeCDGAndDisplay(GEOM::GEOM_Shape_ptr Shape);
+
+  GEOMBase* myGeomBase;
+  GEOMContext* myGeomGUI;
+  GEOM::GEOM_Gen_var myGeom;   /* Current Geom Component */
+
+};
+
+#endif
diff --git a/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel12LineEdit_QTD.cxx
new file mode 100644 (file)
index 0000000..a83fbe4
--- /dev/null
@@ -0,0 +1,150 @@
+/****************************************************************************
+** 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 <qvariant.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_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
new file mode 100644 (file)
index 0000000..6d63c89
--- /dev/null
@@ -0,0 +1,59 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+class 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_1Sel1TextView_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel1TextView_QTD.cxx
new file mode 100644 (file)
index 0000000..c5c2263
--- /dev/null
@@ -0,0 +1,77 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qtextedit.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  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
new file mode 100644 (file)
index 0000000..baa5b78
--- /dev/null
@@ -0,0 +1,44 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+class QTextEdit;
+
+class 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_1Sel3LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel3LineEdit_QTD.cxx
new file mode 100644 (file)
index 0000000..af0be4f
--- /dev/null
@@ -0,0 +1,104 @@
+/****************************************************************************
+** 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 <qvariant.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_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
new file mode 100644 (file)
index 0000000..1312639
--- /dev/null
@@ -0,0 +1,48 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+class 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_1Sel6LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_1Sel6LineEdit_QTD.cxx
new file mode 100644 (file)
index 0000000..9883295
--- /dev/null
@@ -0,0 +1,132 @@
+/****************************************************************************
+** 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 <qvariant.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_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
new file mode 100644 (file)
index 0000000..cc8157a
--- /dev/null
@@ -0,0 +1,54 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+class 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_2Sel1LineEdit_QTD.cxx b/src/MeasureGUI/MeasureGUI_2Sel1LineEdit_QTD.cxx
new file mode 100644 (file)
index 0000000..0efb7a2
--- /dev/null
@@ -0,0 +1,100 @@
+/****************************************************************************
+** 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 <qvariant.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 
+ *  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
new file mode 100644 (file)
index 0000000..192f6ef
--- /dev/null
@@ -0,0 +1,47 @@
+/****************************************************************************
+** 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 <qvariant.h>
+#include <qwidget.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QGroupBox;
+class QLabel;
+class QLineEdit;
+class QPushButton;
+
+class 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_BndBoxDlg.cxx b/src/MeasureGUI/MeasureGUI_BndBoxDlg.cxx
new file mode 100644 (file)
index 0000000..fc9feff
--- /dev/null
@@ -0,0 +1,243 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_BndBoxDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_BndBoxDlg.h"
+
+#include <BRepPrimAPI_MakeBox.hxx>
+#include <BRepBndLib.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_BndBoxDlg::MeasureGUI_BndBoxDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BOUNDING_BOX")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_BNDBOX_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_BNDBOX"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_BNDBOX_OBJDIM"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextLabel2->setText(tr("GEOM_MIN"));
+  GroupC1->TextLabel3->setText(tr("GEOM_MAX"));
+  GroupC1->TextLabel4->setText(tr("GEOM_X"));
+  GroupC1->TextLabel5->setText(tr("GEOM_Y"));
+  GroupC1->TextLabel6->setText(tr("GEOM_Z"));
+  GroupC1->LineEdit11->setReadOnly(TRUE);
+  GroupC1->LineEdit12->setReadOnly(TRUE);
+  GroupC1->LineEdit21->setReadOnly(TRUE);
+  GroupC1->LineEdit22->setReadOnly(TRUE);
+  GroupC1->LineEdit31->setReadOnly(TRUE);
+  GroupC1->LineEdit32->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_BndBoxDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_BndBoxDlg::~MeasureGUI_BndBoxDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_BndBoxDlg::SelectionIntoArgument()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
+    return;
+
+  GroupC1->LineEdit1->setText(aString);
+
+  this->CalculateAndDisplayBndBox(S);
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  if(!mySimulationTopoDs.IsNull())
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateAndDisplayBndBox()
+// purpose  :
+//=================================================================================
+void MeasureGUI_BndBoxDlg::CalculateAndDisplayBndBox(const TopoDS_Shape& S)
+{
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+
+  if(S.IsNull()) 
+    return;
+
+  Standard_Real axmin, aymin, azmin, axmax, aymax, azmax;
+  Bnd_Box B;
+
+  try {
+    BRepBndLib::Add(S,B);
+    B.Get(axmin, aymin, azmin, axmax, aymax, azmax);
+    GroupC1->LineEdit11->setText(tr("%1").arg(axmin, 12, 'f', 6));
+    GroupC1->LineEdit12->setText(tr("%1").arg(axmax, 12, 'f', 6));
+    GroupC1->LineEdit21->setText(tr("%1").arg(aymin, 12, 'f', 6));
+    GroupC1->LineEdit22->setText(tr("%1").arg(aymax, 12, 'f', 6));
+    GroupC1->LineEdit31->setText(tr("%1").arg(azmin, 12, 'f', 6));
+    GroupC1->LineEdit32->setText(tr("%1").arg(azmax, 12, 'f', 6));
+    
+    mySimulationTopoDs = BRepPrimAPI_MakeBox(gp_Pnt(axmin, aymin, azmin), gp_Pnt(axmax, aymax, azmax)).Shape();
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs); 
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in CalculateAndDisplayBndBox()");
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_BndBoxDlg.h b/src/MeasureGUI/MeasureGUI_BndBoxDlg.h
new file mode 100644 (file)
index 0000000..ee17c70
--- /dev/null
@@ -0,0 +1,64 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_BndBoxDlg.h
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_BNDBOX_H
+#define DIALOGBOX_BNDBOX_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel6LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : DialogBox_PROPERTIES
+// purpose  :
+//=================================================================================
+class MeasureGUI_BndBoxDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_BndBoxDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_BndBoxDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void CalculateAndDisplayBndBox(const TopoDS_Shape& S);
+
+    MeasureGUI_1Sel6LineEdit_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_BNDBOX_H
diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx b/src/MeasureGUI/MeasureGUI_CenterMassDlg.cxx
new file mode 100644 (file)
index 0000000..691fd86
--- /dev/null
@@ -0,0 +1,297 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_CenterMassDlg.cxx
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_CenterMassDlg.h"
+
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <BRepGProp.hxx>
+#include <GProp_GProps.hxx>
+#include <GProp_PrincipalProps.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_CenterMassDlg::MeasureGUI_CenterMassDlg(QWidget* parent, const char* name, MeasureGUI* theMeasureGUI, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :GEOMBase_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CENTERMASS")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_CMASS_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_CMASS"));
+  RadioButton1->setPixmap(image0);
+  RadioButton2->close(TRUE);
+  RadioButton3->close(TRUE);
+
+  GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_CENTER"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextLabel2->setText(tr("GEOM_X"));
+  GroupC1->TextLabel3->setText(tr("GEOM_Y"));
+  GroupC1->TextLabel4->setText(tr("GEOM_Z"));
+  GroupC1->LineEdit2->setReadOnly(TRUE);
+  GroupC1->LineEdit3->setReadOnly(TRUE);
+  GroupC1->LineEdit4->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  myMeasureGUI = theMeasureGUI;
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_CenterMassDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_CenterMassDlg::~MeasureGUI_CenterMassDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+  myOkCenterMass = false;
+
+   /* signals and slots connections */
+  connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
+  connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
+
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnOk()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::ClickOnOk()
+{
+  this->ClickOnApply();
+  ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnApply()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::ClickOnApply()
+{
+  QAD_Application::getDesktop()->putInfo(tr(""));
+  if (mySimulationTopoDs.IsNull())
+    return;
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+
+  if(myOkCenterMass)
+    myMeasureGUI->MakeCDGAndDisplay(myGeomShape);
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_CenterMassDlg::SelectionIntoArgument()
+{
+  myGeomBase->EraseSimulationShape();
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  myOkCenterMass = false;
+  GroupC1->LineEdit2->setText("");
+  GroupC1->LineEdit3->setText("");
+  GroupC1->LineEdit4->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+  if(!myGeomBase->GetTopoFromSelection(mySelection, this->myShape))
+    return;  
+
+  Standard_Boolean testResult;
+  myGeomShape = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+  if(!testResult)
+    return;
+
+  myEditCurrentArgument->setText(aString);
+
+  if(this->CalculateAndDisplayCenterMass())
+    myOkCenterMass = true;
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  GEOMBase_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::ActivateThisDialog()
+{
+  GEOMBase_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  if(!mySimulationTopoDs.IsNull())
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CenterMassDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateAndDisplayCenterMass()
+// purpose  :
+//=================================================================================
+bool MeasureGUI_CenterMassDlg::CalculateAndDisplayCenterMass()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+
+  try {
+    QString resString;     
+    GProp_GProps System;
+
+    if(myShape.ShapeType() == TopAbs_VERTEX)
+      myGeomBase->VertexToPoint(myShape, myCenterMass);
+    else if(myShape.ShapeType() == TopAbs_EDGE || myShape.ShapeType() == TopAbs_WIRE) {
+      BRepGProp::LinearProperties(myShape, System);
+      myCenterMass = System.CentreOfMass();
+    }
+    else if(myShape.ShapeType() == TopAbs_FACE || myShape.ShapeType() == TopAbs_SHELL) {
+      BRepGProp::SurfaceProperties(myShape, System);
+      myCenterMass = System.CentreOfMass();
+    }
+    else {
+      BRepGProp::VolumeProperties(myShape, System);
+      myCenterMass = System.CentreOfMass();
+    }
+    
+    BRepBuilderAPI_MakeVertex V(myCenterMass);
+    mySimulationTopoDs = V.Shape();
+    
+    resString = tr("%1").arg(myCenterMass.X(), 12, 'f', 6);    
+    GroupC1->LineEdit2->setText(resString);
+    
+    resString = tr("%1").arg(myCenterMass.Y(), 12, 'f', 6);    
+    GroupC1->LineEdit3->setText(resString);
+    
+    resString = tr("%1").arg(myCenterMass.Z(), 12, 'f', 6);    
+    GroupC1->LineEdit4->setText(resString);
+    
+    
+    if(!mySimulationTopoDs.IsNull()) {
+      myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+      return true;
+    }
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in CalculateAndDisplayCenterMass()");
+  }
+  return false;
+}
+
+
diff --git a/src/MeasureGUI/MeasureGUI_CenterMassDlg.h b/src/MeasureGUI/MeasureGUI_CenterMassDlg.h
new file mode 100644 (file)
index 0000000..e67a67c
--- /dev/null
@@ -0,0 +1,74 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_CenterMassDlg.h
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+
+#ifndef DIALOGBOX_CMASS_H
+#define DIALOGBOX_CMASS_H
+
+#include "GEOMBase_Skeleton.h"
+#include "MeasureGUI_1Sel3LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+#include <gp_Pnt.hxx>
+
+//=================================================================================
+// class    : MeasureGUI_CenterMassDlg
+// purpose  :
+//=================================================================================
+class MeasureGUI_CenterMassDlg : public GEOMBase_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_CenterMassDlg(QWidget* parent = 0, const char* name = 0, MeasureGUI* theMeasureGUI = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_CenterMassDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    bool CalculateAndDisplayCenterMass();
+
+    MeasureGUI* myMeasureGUI;
+
+    GEOM::GEOM_Shape_var myGeomShape;   /* is myBase */
+    TopoDS_Shape myShape;  /* Shape argument */
+    gp_Pnt myCenterMass;
+    bool myOkCenterMass;   /* true after center of mass simulation calculation */
+
+    MeasureGUI_1Sel3LineEdit_QTD* GroupC1;
+
+private slots:
+    void ClickOnOk();
+    void ClickOnApply();
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_CMASS_H
diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.cxx
new file mode 100644 (file)
index 0000000..fa6d776
--- /dev/null
@@ -0,0 +1,211 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_CheckShapeDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_CheckShapeDlg.h"
+
+#include <BRepCheck_Analyzer.hxx>
+
+#include <qtextedit.h>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_CheckShapeDlg::MeasureGUI_CheckShapeDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_CHECKSHAPE")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_CHECK_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_CHECK_SHAPE"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_CHECK_INFOS"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextEdit1->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_CheckShapeDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_CheckShapeDlg::~MeasureGUI_CheckShapeDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::SelectionIntoArgument()
+{
+  myEditCurrentArgument->setText("");
+  SelectedName = ""; /* future the name of selection */
+  GroupC1->TextEdit1->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+    return;
+
+  if(S.IsNull())
+    return;
+  myEditCurrentArgument->setText(SelectedName);
+  this->Check(S);
+
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : Check()
+// purpose  :
+//=================================================================================
+void MeasureGUI_CheckShapeDlg::Check(const TopoDS_Shape S)
+{
+  if(S.IsNull()) 
+    return;
+    
+  try {
+    BRepCheck_Analyzer ana(S,false);
+    if(ana.IsValid()) 
+      GroupC1->TextEdit1->setText("This Shape seems to be valid.");
+    else 
+      GroupC1->TextEdit1->setText("This Shape is not valid.");
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in Check()");
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h b/src/MeasureGUI/MeasureGUI_CheckShapeDlg.h
new file mode 100644 (file)
index 0000000..1c80efd
--- /dev/null
@@ -0,0 +1,65 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_CheckShapeDlg.h
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_CHECKSHAPEDLG_H
+#define DIALOGBOX_CHECKSHAPEDLG_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel1TextView_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : MeasureGUI_CheckShapeDlg
+// purpose  :
+//=================================================================================
+class MeasureGUI_CheckShapeDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_CheckShapeDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_CheckShapeDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void Check(const TopoDS_Shape S);
+
+    QString SelectedName;
+    MeasureGUI_1Sel1TextView_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_CHECKSHAPEDLG_H
diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx b/src/MeasureGUI/MeasureGUI_DistanceDlg.cxx
new file mode 100644 (file)
index 0000000..d527eee
--- /dev/null
@@ -0,0 +1,368 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_DistanceDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_DistanceDlg.h"
+
+#include "QAD_RightFrame.h"
+#include "OCCViewer_Viewer3d.h"
+
+#include <Geom_Plane.hxx>
+#include <TopoDS_Edge.hxx>
+#include <BRepExtrema_DistShapeShape.hxx>
+#include <AIS_LengthDimension.hxx>
+#include <BRepBuilderAPI_MakeEdge.hxx>
+#include <BRepBuilderAPI_MakeVertex.hxx>
+#include <AIS_ListIteratorOfListOfInteractive.hxx>
+#include <gce_MakePln.hxx>
+#include <Precision.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_DistanceDlg::MeasureGUI_DistanceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_MINDIST")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_MINDIST_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_DISTANCE"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_2Sel1LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_MINDIST_OBJ"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1"));
+  GroupC1->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2"));
+  GroupC1->TextLabel3->setText(tr("GEOM_LENGTH"));
+  GroupC1->LineEdit3->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+  GroupC1->PushButton2->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_DistanceDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_DistanceDlg::~MeasureGUI_DistanceDlg()
+{  
+  /* no need to delete child widgets, Qt does it all for us */
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+  myOkShape1 = myOkShape2 = false;
+
+   /* signals and slots connections */
+  connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+  connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+  connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+  connect(GroupC1->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::ClickOnCancel()
+{
+  this->EraseDistance();
+  MeasureGUI_Skeleton::ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection has changed
+//=================================================================================
+void MeasureGUI_DistanceDlg::SelectionIntoArgument()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+  this->EraseDistance();
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  GroupC1->LineEdit3->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1) {
+    if(myEditCurrentArgument == GroupC1->LineEdit1)
+      myOkShape1 = false;
+    else if(myEditCurrentArgument == GroupC1->LineEdit2)
+      myOkShape2 = false;
+    return;
+  }
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+    return;
+
+  Standard_Boolean testResult;
+  Handle(SALOME_InteractiveObject) IO = mySelection->firstIObject();
+  
+  if(myEditCurrentArgument == GroupC1->LineEdit1) {
+    myGeomShape1 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+    if(!testResult)
+      return;
+    myShape1 = S;
+    myEditCurrentArgument->setText(aString);
+    myOkShape1 = true;
+  }    
+  else if(myEditCurrentArgument == GroupC1->LineEdit2) {
+    myGeomShape2 = myGeomBase->ConvertIOinGEOMShape(IO, testResult);
+    if(!testResult)
+      return;
+    myShape2 = S;
+    myEditCurrentArgument->setText(aString);
+    myOkShape2 = true;
+  }
+
+  if(myOkShape1 && myOkShape2)
+    this->MakeDistanceSimulationAndDisplay(myShape1 ,myShape2);
+  return; 
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+  else if(send == GroupC1->PushButton2) {
+    GroupC1->LineEdit2->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit2;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else if(send == GroupC1->LineEdit2)
+    myEditCurrentArgument = GroupC1->LineEdit2;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  if(!mySimulationTopoDs.IsNull())
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  : when mouse enter onto the QWidget
+//=================================================================================
+void MeasureGUI_DistanceDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : closeEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::closeEvent(QCloseEvent* e)
+{
+  /* same than click on cancel button */
+  this->ClickOnCancel();
+  return;
+}
+
+
+//=================================================================================
+// function : MakeDistanceSimulationAndDisplay()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2) 
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+  GroupC1->LineEdit3->setText("");
+  
+  BRepExtrema_DistShapeShape dst(S1, S2);
+
+  try {
+    if(dst.IsDone()) {
+      gp_Pnt P1, P2;
+      Standard_Real Dist = 1.e9;
+      for(int i = 1; i <= dst.NbSolution(); i++) {
+       P1 = (dst.PointOnShape1(i));
+       P2 = (dst.PointOnShape2(i));
+
+       Standard_Real MinDist = P1.Distance(P2);
+       if(Dist > MinDist)
+         Dist = MinDist;
+      }
+
+      if(Dist <= 1.e-9) {
+       BRepBuilderAPI_MakeVertex MakeVertex(P1);
+       mySimulationTopoDs = MakeVertex.Vertex();
+       myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+
+       GroupC1->LineEdit3->setText("0.0");
+      } 
+      else {
+       BRepBuilderAPI_MakeEdge MakeEdge(P1, P2);
+       mySimulationTopoDs = MakeEdge.Edge();
+
+       TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(P1);
+       TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(P2);
+
+       QString S;
+       S.sprintf("%.1f", Dist);
+
+       gp_Pnt P3;
+       P3.SetX((P1.X() + P2.X()) / 2);
+       P3.SetY((P1.Y() + P2.Y()) / 2);
+       P3.SetZ(((P1.Z() + P2.Z()) / 2) + 100);
+       gp_Vec va(P3, P1);
+       gp_Vec vb(P3, P2);
+       if(va.IsParallel(vb, Precision::Angular())) {
+         P3.SetY(((P1.Y() + P2.Y()) / 2) + 100);
+         P3.SetZ(((P1.Z() + P2.Z()) / 2));
+       }
+       gce_MakePln gce_MP(P1, P2, P3);
+       gp_Pln gp_P = gce_MP.Value();
+       Handle(Geom_Plane) P = new Geom_Plane(gp_P);
+
+       Handle(AIS_LengthDimension) Distance = new AIS_LengthDimension(V1, V2, P, Dist, TCollection_ExtendedString(strdup(S)));
+
+       GroupC1->LineEdit3->setText(S);
+
+       if(QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getTypeView() == VIEW_OCC) {
+         OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getActiveStudyFrame()->getRightFrame()->getViewFrame())->getViewer();
+         Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
+         ic->Display(Distance);
+         ic->UpdateCurrentViewer();
+       }
+      }
+    }
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in MakeDistanceSimulationAndDisplay()");
+  }
+  return;
+}
+
+
+//=================================================================================
+// function : EraseDistance()
+// purpose  :
+//=================================================================================
+void MeasureGUI_DistanceDlg::EraseDistance()
+{
+  int count = QAD_Application::getDesktop()->getActiveStudy()->getStudyFramesCount();
+  for(int i = 0; i < count; i++) {
+    if (QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getTypeView() == VIEW_OCC ) {
+      OCCViewer_Viewer3d* v3d = ((OCCViewer_ViewFrame*)QAD_Application::getDesktop()->getActiveStudy()->getStudyFrame(i)->getRightFrame()->getViewFrame())->getViewer();
+      Handle (AIS_InteractiveContext) ic = v3d->getAISContext();
+
+      AIS_ListOfInteractive L;
+      ic->DisplayedObjects(AIS_KOI_Relation, -1, L);
+      AIS_ListIteratorOfListOfInteractive ite(L);
+      while (ite.More()) {
+       ic->Remove(ite.Value());
+       ic->UpdateCurrentViewer();
+       ite.Next();
+      }
+    }
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_DistanceDlg.h b/src/MeasureGUI/MeasureGUI_DistanceDlg.h
new file mode 100644 (file)
index 0000000..50718dd
--- /dev/null
@@ -0,0 +1,74 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_DistanceDlg.h
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_DISTANCE_H
+#define DIALOGBOX_DISTANCE_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_2Sel1LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : MeasureGUI_DistanceDlg
+// purpose  :
+//=================================================================================
+class MeasureGUI_DistanceDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_DistanceDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_DistanceDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void closeEvent(QCloseEvent* e);
+    void MakeDistanceSimulationAndDisplay(const TopoDS_Shape& S1, const TopoDS_Shape& S2);
+    void EraseDistance();
+
+    TopoDS_Shape myShape1;              
+    TopoDS_Shape myShape2;              
+    GEOM::GEOM_Shape_var myGeomShape1;          
+    GEOM::GEOM_Shape_var myGeomShape2;          
+    bool myOkShape1;
+    bool myOkShape2;   /* to check when arguments are defined */
+
+    MeasureGUI_2Sel1LineEdit_QTD* GroupC1;
+
+private slots:
+    void ClickOnCancel();
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_DISTANCE_H
diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx b/src/MeasureGUI/MeasureGUI_InertiaDlg.cxx
new file mode 100644 (file)
index 0000000..e8c796a
--- /dev/null
@@ -0,0 +1,286 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_InertiaDlg.cxx
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+
+using namespace std;
+#include "MeasureGUI_InertiaDlg.h"
+
+#include <BRepGProp.hxx>
+#include <GProp_GProps.hxx>
+#include <GProp_PrincipalProps.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_InertiaDlg::MeasureGUI_InertiaDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_INERTIA")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+    
+  setCaption(tr("GEOM_INERTIA_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_INERTIA_CONSTR"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel12LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_MATRIX"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextLabel2->setText(tr("GEOM_INERTIA_I").arg("1"));
+  GroupC1->TextLabel3->setText(tr("GEOM_INERTIA_I").arg("2"));
+  GroupC1->TextLabel4->setText(tr("GEOM_INERTIA_I").arg("3"));
+  GroupC1->TextLabel5->setText(tr("GEOM_INERTIA_IXYZ"));
+  GroupC1->LineEdit11->setReadOnly(TRUE);
+  GroupC1->LineEdit12->setReadOnly(TRUE);
+  GroupC1->LineEdit13->setReadOnly(TRUE);
+  GroupC1->LineEdit21->setReadOnly(TRUE);
+  GroupC1->LineEdit22->setReadOnly(TRUE);
+  GroupC1->LineEdit23->setReadOnly(TRUE);
+  GroupC1->LineEdit31->setReadOnly(TRUE);
+  GroupC1->LineEdit32->setReadOnly(TRUE);
+  GroupC1->LineEdit33->setReadOnly(TRUE);
+  GroupC1->LineEdit41->setReadOnly(TRUE);
+  GroupC1->LineEdit42->setReadOnly(TRUE);
+  GroupC1->LineEdit43->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_InertiaDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_InertiaDlg::~MeasureGUI_InertiaDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_InertiaDlg::SelectionIntoArgument()
+{
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit13->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit23->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+  GroupC1->LineEdit33->setText("");
+  GroupC1->LineEdit41->setText("");
+  GroupC1->LineEdit42->setText("");
+  GroupC1->LineEdit43->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
+    return;
+
+  GroupC1->LineEdit1->setText(aString);
+
+  this->CalculateAndDisplayInertia(S);
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateAndDisplayInertia()
+// purpose  :
+//=================================================================================
+void MeasureGUI_InertiaDlg::CalculateAndDisplayInertia(const TopoDS_Shape& S)
+{
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit13->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit23->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+  GroupC1->LineEdit33->setText("");
+  GroupC1->LineEdit41->setText("");
+  GroupC1->LineEdit42->setText("");
+  GroupC1->LineEdit43->setText("");
+
+  if(S.IsNull()) 
+    return;
+
+  QString resString;
+  GProp_GProps System;
+
+  try {
+    if(S.ShapeType() == TopAbs_VERTEX || S.ShapeType() == TopAbs_EDGE || S.ShapeType() == TopAbs_WIRE)
+      BRepGProp::LinearProperties(S, System);
+    else if(S.ShapeType() == TopAbs_FACE || S.ShapeType() == TopAbs_SHELL)
+      BRepGProp::SurfaceProperties(S, System);
+    else
+      BRepGProp::VolumeProperties(S, System);
+
+    gp_Mat I = System.MatrixOfInertia() ;
+    GProp_PrincipalProps Pr = System.PrincipalProperties();
+    Standard_Real Ix,Iy,Iz;
+    Pr.Moments(Ix,Iy,Iz);
+    
+    /* matrix 3x3 */
+    resString = tr("%1").arg(I(1,1), 12, 'f', 6);
+    GroupC1->LineEdit11->setText(resString);
+    resString = tr("%1").arg(I(1,2), 12, 'f', 6);
+    GroupC1->LineEdit12->setText(resString);
+    resString = tr("%1").arg(I(1,3), 12, 'f', 6);
+    GroupC1->LineEdit13->setText(resString);
+
+    resString = tr("%1").arg(I(2,1), 12, 'f', 6);
+    GroupC1->LineEdit21->setText(resString);
+    resString = tr("%1").arg(I(2,2), 12, 'f', 6);
+    GroupC1->LineEdit22->setText(resString);
+    resString = tr("%1").arg(I(2,3), 12, 'f', 6);
+    GroupC1->LineEdit23->setText(resString);
+
+    resString = tr("%1").arg(I(3,1), 12, 'f', 6);
+    GroupC1->LineEdit31->setText(resString);
+    resString = tr("%1").arg(I(3,2), 12, 'f', 6);
+    GroupC1->LineEdit32->setText(resString);
+    resString = tr("%1").arg(I(3,3), 12, 'f', 6);
+    GroupC1->LineEdit33->setText(resString);
+
+    /* moments */
+    resString = tr("%1").arg(Ix, 12, 'f', 6);
+    GroupC1->LineEdit41->setText(resString);
+    resString = tr("%1").arg(Ix, 12, 'f', 6);
+    GroupC1->LineEdit42->setText(resString);
+    resString = tr("%1").arg(Iz, 12, 'f', 6);
+    GroupC1->LineEdit43->setText(resString);
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in CalculateAndDisplayInertia()");
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_InertiaDlg.h b/src/MeasureGUI/MeasureGUI_InertiaDlg.h
new file mode 100644 (file)
index 0000000..4e6bc2f
--- /dev/null
@@ -0,0 +1,64 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_InertiaDlg.h
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_INERTIA_H
+#define DIALOGBOX_INERTIA_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel12LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : MeasureGUI_InertiaDlg
+// purpose  :
+//=================================================================================
+class MeasureGUI_InertiaDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_InertiaDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_InertiaDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void CalculateAndDisplayInertia(const TopoDS_Shape& S);
+
+    MeasureGUI_1Sel12LineEdit_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_INERTIA_H
diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.cxx
new file mode 100644 (file)
index 0000000..93f2da2
--- /dev/null
@@ -0,0 +1,284 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_MaxToleranceDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_MaxToleranceDlg.h"
+
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopExp_Explorer.hxx>
+#include <BRep_Tool.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_MaxToleranceDlg::MeasureGUI_MaxToleranceDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_TOLERANCE")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_TOLERANCE_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_TOLERANCE"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel6LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_TOLERANCE_CONSTR"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextLabel2->setText(tr("GEOM_MIN"));
+  GroupC1->TextLabel3->setText(tr("GEOM_MAX"));
+  GroupC1->TextLabel4->setText(tr("GEOM_TOLERANCE_FACE"));
+  GroupC1->TextLabel5->setText(tr("GEOM_TOLERANCE_EDGE"));
+  GroupC1->TextLabel6->setText(tr("GEOM_TOLERANCE_VERTEX"));
+  GroupC1->LineEdit11->setReadOnly(TRUE);
+  GroupC1->LineEdit12->setReadOnly(TRUE);
+  GroupC1->LineEdit21->setReadOnly(TRUE);
+  GroupC1->LineEdit22->setReadOnly(TRUE);
+  GroupC1->LineEdit31->setReadOnly(TRUE);
+  GroupC1->LineEdit32->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_MaxToleranceDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_MaxToleranceDlg::~MeasureGUI_MaxToleranceDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::SelectionIntoArgument()
+{
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S) || S.IsNull())
+    return;
+
+  if(S.IsNull())
+    return;
+
+  GroupC1->LineEdit1->setText(aString);
+
+  this->CalculateMaxTolerance(S);
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateMaxTolerance()
+// purpose  :
+//=================================================================================
+void MeasureGUI_MaxToleranceDlg::CalculateMaxTolerance(const TopoDS_Shape& S)
+{
+  GroupC1->LineEdit11->setText("");
+  GroupC1->LineEdit12->setText("");
+  GroupC1->LineEdit21->setText("");
+  GroupC1->LineEdit22->setText("");
+  GroupC1->LineEdit31->setText("");
+  GroupC1->LineEdit32->setText("");
+
+  if(S.IsNull()) 
+    return;
+
+  Standard_Real T, TMF, TME, TMV, TmF, TmE, TmV;
+  Standard_Integer nbF, nbE, nbV;
+  bool m_isFace, m_isEdge, m_isVertex;
+
+  TMF = TME = TMV = -RealLast();
+  TmF = TmE = TmV = RealLast();
+  nbF = nbE = nbV = 0;
+  m_isFace = m_isEdge = m_isVertex = false;
+
+  try {
+    for(TopExp_Explorer ExF(S,TopAbs_FACE); ExF.More(); ExF.Next()) { 
+      m_isFace = true;
+      TopoDS_Face Face=TopoDS::Face(ExF.Current());
+      T=BRep_Tool::Tolerance(Face);
+      if(T>TMF)
+       TMF=T;
+      if(T<TmF)
+       TmF=T;
+      nbF++;
+    }
+    for(TopExp_Explorer ExE(S,TopAbs_EDGE); ExE.More(); ExE.Next()) { 
+      m_isEdge = true;
+      TopoDS_Edge Edge=TopoDS::Edge(ExE.Current());
+      T=BRep_Tool::Tolerance(Edge);
+      if(T>TME)
+       TME=T;
+      if(T<TmE)
+       TmE=T;
+      nbE++;
+    }
+    for(TopExp_Explorer ExV(S,TopAbs_VERTEX); ExV.More(); ExV.Next()) { 
+      m_isVertex = true;
+      TopoDS_Vertex Vertex=TopoDS::Vertex(ExV.Current());
+      T=BRep_Tool::Tolerance(Vertex);
+      if(T>TMV)
+       TMV=T;
+      if(T<TmV)
+       TmV=T;
+      nbV++;
+    }
+
+    if(m_isFace) {
+      GroupC1->LineEdit11->setText(tr("%1").arg(TmF, 5, 'e', 8));
+      GroupC1->LineEdit12->setText(tr("%1").arg(TMF, 5, 'e', 8));
+    }
+    if(m_isEdge) {
+      GroupC1->LineEdit21->setText(tr("%1").arg(TmE, 5, 'e', 8));
+      GroupC1->LineEdit22->setText(tr("%1").arg(TME, 5, 'e', 8));
+      }
+    if(m_isVertex) {
+      GroupC1->LineEdit31->setText(tr("%1").arg(TmV, 5, 'e', 8));
+      GroupC1->LineEdit32->setText(tr("%1").arg(TMV, 5, 'e', 8));
+    }
+  }
+  catch(Standard_Failure) 
+    {
+      MESSAGE("Catch intercepted in CalculateMaxTolerance()");
+    }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h b/src/MeasureGUI/MeasureGUI_MaxToleranceDlg.h
new file mode 100644 (file)
index 0000000..5513582
--- /dev/null
@@ -0,0 +1,64 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_MaxToleranceDlg.h
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_MAXTOLERANCE_H
+#define DIALOGBOX_MAXTOLERANCE_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel6LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : DialogBox_PROPERTIES
+// purpose  :
+//=================================================================================
+class MeasureGUI_MaxToleranceDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_MaxToleranceDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_MaxToleranceDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void CalculateMaxTolerance(const TopoDS_Shape& S);
+
+    MeasureGUI_1Sel6LineEdit_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_MAXTOLERANCE_H
diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx b/src/MeasureGUI/MeasureGUI_PropertiesDlg.cxx
new file mode 100644 (file)
index 0000000..934551b
--- /dev/null
@@ -0,0 +1,258 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_PropertiesDlg.cxx
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_PropertiesDlg.h"
+
+#include <TopExp_Explorer.hxx>
+#include <BRepGProp.hxx>
+#include <GProp_GProps.hxx>
+#include <GProp_PrincipalProps.hxx>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_PropertiesDlg::MeasureGUI_PropertiesDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_BASICPROPERTIES")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_PROPERTIES_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_PROPERTIES"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel3LineEdit_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_PROPERTIES_CONSTR"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextLabel2->setText(tr("GEOM_LENGTH"));
+  GroupC1->TextLabel3->setText(tr("GEOM_PROPERTIES_SURFACE"));
+  GroupC1->TextLabel4->setText(tr("GEOM_PROPERTIES_VOLUME"));
+  GroupC1->LineEdit2->setReadOnly(TRUE);
+  GroupC1->LineEdit3->setReadOnly(TRUE);
+  GroupC1->LineEdit4->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_PropertiesDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_PropertiesDlg::~MeasureGUI_PropertiesDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_PropertiesDlg::SelectionIntoArgument()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+  myEditCurrentArgument->setText("");
+  QString aString = "";
+
+  GroupC1->LineEdit2->setText("");
+  GroupC1->LineEdit3->setText("");
+  GroupC1->LineEdit4->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, aString);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+    return;
+
+  
+  if(S.IsNull() || S.ShapeType() == TopAbs_VERTEX)
+    return;
+  GroupC1->LineEdit1->setText(aString);
+
+  /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */
+  if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs))
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+
+  this->CalculateAndDisplayProperties(S);
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  if(!mySimulationTopoDs.IsNull())
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateAndDisplayProperties()
+// purpose  :
+//=================================================================================
+void MeasureGUI_PropertiesDlg::CalculateAndDisplayProperties(const TopoDS_Shape& S)
+{
+  GroupC1->LineEdit2->setText("");
+  GroupC1->LineEdit3->setText("");
+  GroupC1->LineEdit4->setText("");
+
+  if(S.IsNull()) 
+    return;
+
+  Standard_Real result;
+  GProp_GProps LProps, SProps;
+  QString resString;
+
+  try {
+    BRepGProp::LinearProperties(S,LProps);
+    result = LProps.Mass();
+    if(!IsEqual(result, 0.0)) {        
+      resString = tr("%1").arg(result, 12, 'f', 6);
+      GroupC1->LineEdit2->setText(resString);
+    }
+
+    BRepGProp::SurfaceProperties(S, SProps);
+    result = SProps.Mass();
+    if(!IsEqual(result, 0.0)) {        
+      resString = tr("%1").arg(result, 12, 'f', 6);
+      GroupC1->LineEdit3->setText(resString);
+    }
+       
+    result = 0.0;
+    if(S.ShapeType() < TopAbs_SHELL) {
+      for(TopExp_Explorer Exp(S,TopAbs_SOLID); Exp.More(); Exp.Next()) { 
+       GProp_GProps VProps;
+       BRepGProp::VolumeProperties(Exp.Current(), VProps);
+       result += VProps.Mass();
+      }
+    }
+    if (!IsEqual(result, 0.0)) {       
+      resString = tr("%1").arg(result, 12, 'f', 6);
+      GroupC1->LineEdit4->setText(resString);
+    }
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in CalculateAndDisplayProperties()");
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_PropertiesDlg.h b/src/MeasureGUI/MeasureGUI_PropertiesDlg.h
new file mode 100644 (file)
index 0000000..d240239
--- /dev/null
@@ -0,0 +1,63 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_PropertiesDlg.h
+//  Author : Lucien PIGNOLONI
+//  Module : GEOM
+
+#ifndef DIALOGBOX_PROPERTIES_H
+#define DIALOGBOX_PROPERTIES_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel3LineEdit_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : MeasureGUI_PropertiesDlg
+// purpose  :
+//=================================================================================
+class MeasureGUI_PropertiesDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_PropertiesDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_PropertiesDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void CalculateAndDisplayProperties(const TopoDS_Shape& S);
+
+    MeasureGUI_1Sel3LineEdit_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_PROPERTIES_H
diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.cxx b/src/MeasureGUI/MeasureGUI_Skeleton.cxx
new file mode 100644 (file)
index 0000000..39498d5
--- /dev/null
@@ -0,0 +1,169 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_Skeleton.cxx
+//  Author : Damien COQUERET
+//  Module : GEOM
+//  $Header: 
+
+using namespace std;
+#include "MeasureGUI_Skeleton.h"
+
+//=================================================================================
+// class    : MeasureGUI_Skeleton()
+// purpose  : Constructs a MeasureGUI_Skeleton 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_Skeleton::MeasureGUI_Skeleton(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton_QTD(parent, name, modal, fl)
+{
+  if (!name)
+    setName("MeasureGUI_Skeleton");
+
+  buttonClose->setText(tr("GEOM_BUT_CLOSE"));
+
+  GroupMedium->close(TRUE);
+  resize(350, 0);
+
+  Init(Sel);
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_Skeleton()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_Skeleton::~MeasureGUI_Skeleton()
+{
+  // no need to delete child widgets, Qt does it all for us
+  this->destroy(TRUE, TRUE);
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::Init(SALOME_Selection* Sel)
+{
+  /* init variables */
+  mySelection = Sel;
+  mySimulationTopoDs.Nullify();
+
+  myGeomBase = new GEOMBase();
+  myGeomGUI = GEOMContext::GetGeomGUI();
+  myGeomGUI->SetActiveDialogBox((QDialog*)this);
+  myGeom = myGeomGUI->myComponentGeom;
+
+  /* signals and slots connections */
+  connect(buttonClose, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+  connect(myGeomGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
+  connect(myGeomGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+
+  /* Move widget on the botton right corner of main widget */
+//   int x, y;
+//   myGeomBase->DefineDlgPosition( this, x, y );
+
+  /* displays Dialog */
+  RadioButton1->setChecked(TRUE);
+
+  return;
+}
+
+
+//=================================================================================
+// function : ClickOnCancel()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::ClickOnCancel()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+
+  disconnect(mySelection, 0, this, 0);
+  //myGeomGUI->ResetState();
+  reject();
+
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::LineEditReturnPressed()
+{
+  /* User name of object input management                          */
+  /* If successfull the selection is changed and signal emitted... */
+  /* so SelectionIntoArgument() is automatically called.           */
+  const QString objectUserName = myEditCurrentArgument->text();
+  QWidget* thisWidget = (QWidget*)this;
+  if(myGeomBase->SelectionByNameInDialogs(thisWidget, objectUserName, mySelection))
+    myEditCurrentArgument->setText(objectUserName);
+
+  return;
+}
+
+
+//=================================================================================
+// function : DeactivateActiveDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::DeactivateActiveDialog()
+{
+  this->setEnabled(false);
+  //myGeomGUI->ResetState();
+  disconnect(mySelection, 0, this, 0);
+  myGeomBase->EraseSimulationShape();
+  myGeomGUI->SetActiveDialogBox(0);
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::ActivateThisDialog()
+{
+  /* Emit a signal to deactivate the active dialog */
+  myGeomGUI->EmitSignalDeactivateDialog();
+  this->setEnabled(true);
+  myGeomGUI->SetActiveDialogBox((QDialog*)this);
+  return;
+}
+
+
+//=================================================================================
+// function : closeEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_Skeleton::closeEvent(QCloseEvent* e)
+{
+  /* same than click on cancel button */
+  this->ClickOnCancel();
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_Skeleton.h b/src/MeasureGUI/MeasureGUI_Skeleton.h
new file mode 100644 (file)
index 0000000..0159518
--- /dev/null
@@ -0,0 +1,72 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_Skeleton.h
+//  Author : Damine COQUERET
+//  Module : GEOM
+//  $Header: 
+
+#ifndef MEASUREGUI_SKELETON_H
+#define MEASUREGUI_SKELETON_H
+
+#include "MeasureGUI_Skeleton_QTD.h"
+
+#include "GEOMBase.h"
+
+#include <qwidget.h>
+#include <qgroupbox.h>
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qradiobutton.h>
+#include <qbuttongroup.h>
+
+class MeasureGUI_Skeleton : public MeasureGUI_Skeleton_QTD
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_Skeleton(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_Skeleton();
+
+private :
+    void Init(SALOME_Selection* Sel);
+
+protected:
+    void closeEvent(QCloseEvent* e);
+
+    TopoDS_Shape mySimulationTopoDs;    /* Shape used for simulation display */
+    QLineEdit* myEditCurrentArgument;   /* Current LineEdit */
+    SALOME_Selection* mySelection;      /* User shape selection */
+    GEOM::GEOM_Gen_var myGeom;          /* Current GeomI object */
+    GEOMBase* myGeomBase;
+    GEOMContext* myGeomGUI;  /* Current GeomGUI object */
+
+protected slots:
+    void ClickOnCancel();
+    void LineEditReturnPressed();
+    void DeactivateActiveDialog();
+    void ActivateThisDialog();
+
+};
+
+#endif // MEASUREGUI_SKELETON_H
diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.cxx
new file mode 100644 (file)
index 0000000..5022ad5
--- /dev/null
@@ -0,0 +1,99 @@
+/****************************************************************************
+** Form implementation generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui'
+**
+** Created: lun oct 27 11:23:09 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#include "MeasureGUI_Skeleton_QTD.h"
+
+#include <qvariant.h>
+#include <qbuttongroup.h>
+#include <qgroupbox.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+/* 
+ *  Constructs a MeasureGUI_Skeleton_QTD 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_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" );
+    resize( 228, 266 ); 
+    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
+    setCaption( trUtf8( "MeasureGUI_Skeleton_QTD" ) );
+    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->setTitle( trUtf8( "" ) );
+    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"); 
+    QSpacerItem* spacer = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout3->addItem( spacer, 0, 2 );
+    QSpacerItem* spacer_2 = new QSpacerItem( 120, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
+    Layout3->addItem( spacer_2, 0, 0 );
+
+    buttonClose = new QPushButton( GroupButtons, "buttonClose" );
+    buttonClose->setText( trUtf8( "&Close" ) );
+
+    Layout3->addWidget( buttonClose, 0, 1 );
+
+    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->setTitle( trUtf8( "" ) );
+    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" );
+    RadioButton1->setText( trUtf8( "" ) );
+    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() ) );
+    GroupMedium->setTitle( trUtf8( "" ) );
+
+    Layout1->addWidget( GroupMedium, 1, 0 );
+
+    MeasureGUI_Skeleton_QTDLayout->addLayout( Layout1, 0, 0 );
+}
+
+/*  
+ *  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
+}
+
diff --git a/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h b/src/MeasureGUI/MeasureGUI_Skeleton_QTD.h
new file mode 100644 (file)
index 0000000..39564b0
--- /dev/null
@@ -0,0 +1,46 @@
+/****************************************************************************
+** Form interface generated from reading ui file 'MeasureGUI_Skeleton_QTD.ui'
+**
+** Created: lun oct 27 11:23:09 2003
+**      by:  The User Interface Compiler (uic)
+**
+** WARNING! All changes made in this file will be lost!
+****************************************************************************/
+#ifndef MEASUREGUI_SKELETON_QTD_H
+#define MEASUREGUI_SKELETON_QTD_H
+
+#include <qvariant.h>
+#include <qdialog.h>
+class QVBoxLayout; 
+class QHBoxLayout; 
+class QGridLayout; 
+class QButtonGroup;
+class QGroupBox;
+class QPushButton;
+class QRadioButton;
+
+class 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;
+    QButtonGroup* GroupConstructors;
+    QRadioButton* RadioButton1;
+    QGroupBox* GroupMedium;
+
+
+protected:
+    QGridLayout* MeasureGUI_Skeleton_QTDLayout;
+    QGridLayout* Layout1;
+    QGridLayout* GroupButtonsLayout;
+    QGridLayout* Layout3;
+    QGridLayout* GroupConstructorsLayout;
+    QHBoxLayout* Layout2;
+};
+
+#endif // MEASUREGUI_SKELETON_QTD_H
diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx b/src/MeasureGUI/MeasureGUI_WhatisDlg.cxx
new file mode 100644 (file)
index 0000000..23c2895
--- /dev/null
@@ -0,0 +1,255 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_WhatisDlg.cxx
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+using namespace std;
+#include "MeasureGUI_WhatisDlg.h"
+
+#include <TopTools_MapOfShape.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+#include <TopoDS_Iterator.hxx>
+
+#include <qtextedit.h>
+
+//=================================================================================
+// 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.
+//=================================================================================
+MeasureGUI_WhatisDlg::MeasureGUI_WhatisDlg(QWidget* parent, const char* name, SALOME_Selection* Sel, bool modal, WFlags fl)
+  :MeasureGUI_Skeleton(parent, name, Sel, modal, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+{
+  QPixmap image0(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_DLG_WHATIS")));
+  QPixmap image1(QAD_Desktop::getResourceManager()->loadPixmap("GEOM",tr("ICON_SELECT")));
+
+  setCaption(tr("GEOM_WHATIS_TITLE"));
+
+  /***************************************************************/
+  GroupConstructors->setTitle(tr("GEOM_WHATIS"));
+  RadioButton1->setPixmap(image0);
+
+  GroupC1 = new MeasureGUI_1Sel1TextView_QTD(this, "GroupC1");
+  GroupC1->GroupBox1->setTitle(tr("GEOM_WHATIS_OBJECT"));
+  GroupC1->TextLabel1->setText(tr("GEOM_OBJECT"));
+  GroupC1->TextEdit1->setReadOnly(TRUE);
+  GroupC1->PushButton1->setPixmap(image1);
+
+  Layout1->addWidget(GroupC1, 1, 0);
+  /***************************************************************/
+
+  /* Initialisation */
+  Init();
+}
+
+
+//=================================================================================
+// function : ~MeasureGUI_WhatisDlg()
+// purpose  : Destroys the object and frees any allocated resources
+//=================================================================================
+MeasureGUI_WhatisDlg::~MeasureGUI_WhatisDlg()
+{
+  // no need to delete child widgets, Qt does it all for us
+}
+
+
+//=================================================================================
+// function : Init()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::Init()
+{
+  /* init variables */
+  myEditCurrentArgument = GroupC1->LineEdit1;
+
+   /* signals and slots connections */
+  connect(GroupC1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
+  connect(GroupC1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
+
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+
+  /* displays Dialog */
+  GroupC1->show();
+  this->show();
+
+  return;
+}
+
+
+//=================================================================================
+// function : SelectionIntoArgument()
+// purpose  : Called when selection as changed or other case
+//=================================================================================
+void MeasureGUI_WhatisDlg::SelectionIntoArgument()
+{
+  myGeomBase->EraseSimulationShape();
+  mySimulationTopoDs.Nullify();
+
+  myEditCurrentArgument->setText("");
+  SelectedName = ""; /* future the name of selection */
+  GroupC1->TextEdit1->setText("");
+
+  int nbSel = myGeomBase->GetNameOfSelectedIObjects(mySelection, SelectedName);
+  if(nbSel != 1)
+    return;
+
+  /*  nbSel == 1  */
+  TopoDS_Shape S;
+  if(!myGeomBase->GetTopoFromSelection(mySelection, S))
+    return;
+
+  if(S.IsNull())
+    return;
+
+   /* Try to display of a cone simulation shape to show direction of a linear edge only in OCC viewer */
+  if(myGeomBase->CreateArrowForLinearEdge(S, mySimulationTopoDs))
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+
+  GroupC1->LineEdit1->setText(SelectedName);
+  this->CalculateWhatis(S);
+
+  return;
+}
+
+
+//=================================================================================
+// function : SetEditCurrentArgument()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::SetEditCurrentArgument()
+{
+  QPushButton* send = (QPushButton*)sender();
+
+  if(send == GroupC1->PushButton1) {
+    GroupC1->LineEdit1->setFocus();
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  }
+
+  this->SelectionIntoArgument();
+  return;
+}
+
+
+//=================================================================================
+// function : LineEditReturnPressed()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::LineEditReturnPressed()
+{
+  QLineEdit* send = (QLineEdit*)sender();
+  if(send == GroupC1->LineEdit1)
+    myEditCurrentArgument = GroupC1->LineEdit1;
+  else
+    return;
+
+  MeasureGUI_Skeleton::LineEditReturnPressed();
+  return;
+}
+
+
+//=================================================================================
+// function : ActivateThisDialog()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::ActivateThisDialog()
+{
+  MeasureGUI_Skeleton::ActivateThisDialog();
+  connect(mySelection, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
+  if(!mySimulationTopoDs.IsNull())
+    myGeomBase->DisplaySimulationShape(mySimulationTopoDs);
+  return;
+}
+
+
+//=================================================================================
+// function : enterEvent()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::enterEvent(QEvent* e)
+{
+  if(GroupConstructors->isEnabled())
+    return;
+  this->ActivateThisDialog();
+  return;
+}
+
+
+//=================================================================================
+// function : CalculateWhatis()
+// purpose  :
+//=================================================================================
+void MeasureGUI_WhatisDlg::CalculateWhatis(const TopoDS_Shape& S)
+{
+  if(S.IsNull()) 
+    return;
+
+  TCollection_AsciiString Astr; 
+  Astr = Astr + " Number of shapes in " + strdup(SelectedName.latin1()) + " : \n";
+
+  try {
+    int iType, nbTypes [TopAbs_SHAPE];
+    for(iType = 0; iType < TopAbs_SHAPE; ++iType)
+      nbTypes[iType] = 0;
+    nbTypes[S.ShapeType()]++;
+
+    TopTools_MapOfShape aMapOfShape;
+    aMapOfShape.Add(S);
+    TopTools_ListOfShape aListOfShape;
+    aListOfShape.Append(S);
+
+    TopTools_ListIteratorOfListOfShape itL(aListOfShape);
+    for(; itL.More(); itL.Next()) {
+      TopoDS_Iterator it(itL.Value());
+      for(; it.More(); it.Next()) {
+        TopoDS_Shape s = it.Value();
+        if(aMapOfShape.Add(s)) {
+          aListOfShape.Append(s);
+          nbTypes[s.ShapeType()]++;
+        }
+      }
+    }
+
+    Astr = Astr + " VERTEX : " + TCollection_AsciiString(nbTypes[TopAbs_VERTEX]) + "\n";
+    Astr = Astr + " EDGE : " + TCollection_AsciiString(nbTypes[TopAbs_EDGE]) + "\n";
+    Astr = Astr + " WIRE : " + TCollection_AsciiString(nbTypes[TopAbs_WIRE]) + "\n";
+    Astr = Astr + " FACE : " + TCollection_AsciiString(nbTypes[TopAbs_FACE]) + "\n";
+    Astr = Astr + " SHELL : " + TCollection_AsciiString(nbTypes[TopAbs_SHELL]) + "\n";
+    Astr = Astr + " SOLID : " + TCollection_AsciiString(nbTypes[TopAbs_SOLID]) + "\n";
+    Astr = Astr + " COMPSOLID : " + TCollection_AsciiString(nbTypes[TopAbs_COMPSOLID]) + "\n";
+    Astr = Astr + " COMPOUND : " + TCollection_AsciiString(nbTypes[TopAbs_COMPOUND]) + "\n";
+    Astr = Astr + " SHAPE : " + TCollection_AsciiString(aMapOfShape.Extent());
+
+    GroupC1->TextEdit1->setText(Astr.ToCString());
+  }
+  catch(Standard_Failure) {
+    MESSAGE("Catch intercepted in CalculateWhatis()");
+  }
+  return;
+}
diff --git a/src/MeasureGUI/MeasureGUI_WhatisDlg.h b/src/MeasureGUI/MeasureGUI_WhatisDlg.h
new file mode 100644 (file)
index 0000000..2714f0b
--- /dev/null
@@ -0,0 +1,65 @@
+//  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : MeasureGUI_WhatisDlg.h
+//  Author : Nicolas REJNERI
+//  Module : GEOM
+//  $Header$
+
+#ifndef DIALOGBOX_WHATIS_H
+#define DIALOGBOX_WHATIS_H
+
+#include "MeasureGUI_Skeleton.h"
+#include "MeasureGUI_1Sel1TextView_QTD.h"
+
+#include "MeasureGUI.h"
+
+//=================================================================================
+// class    : DialogBox_PROPERTIES
+// purpose  :
+//=================================================================================
+class MeasureGUI_WhatisDlg : public MeasureGUI_Skeleton
+{ 
+    Q_OBJECT
+
+public:
+    MeasureGUI_WhatisDlg(QWidget* parent = 0, const char* name = 0, SALOME_Selection* Sel = 0, bool modal = FALSE, WFlags fl = 0);
+    ~MeasureGUI_WhatisDlg();
+
+private:
+    void Init();
+    void enterEvent(QEvent* e);
+    void CalculateWhatis(const TopoDS_Shape& S);
+
+    QString SelectedName;
+    MeasureGUI_1Sel1TextView_QTD* GroupC1;
+
+private slots:
+    void SetEditCurrentArgument();
+    void SelectionIntoArgument();
+    void LineEditReturnPressed();
+    void ActivateThisDialog();
+
+};
+
+#endif // DIALOGBOX_WHATIS_H
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel12LineEdit_QTD.ui
new file mode 100644 (file)
index 0000000..505b87b
--- /dev/null
@@ -0,0 +1,268 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_1Sel12LineEdit_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_1Sel12LineEdit_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>131</width>
+            <height>171</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_1Sel12LineEdit_QTD</string>
+    </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>
+            <property name="title">
+                <string></string>
+            </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="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
+                            <property name="name">
+                                <cstring>Layout2</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="QLineEdit" row="0" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit12</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="0" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit11</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="3" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit42</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="3" 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>
+                                    <property name="text">
+                                        <string>TL5</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="2" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit31</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="3" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit41</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="1" column="3">
+                                    <property name="name">
+                                        <cstring>LineEdit23</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="2" column="3">
+                                    <property name="name">
+                                        <cstring>LineEdit33</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="3" column="3">
+                                    <property name="name">
+                                        <cstring>LineEdit43</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="1" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit22</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="0" 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>
+                                    <property name="text">
+                                        <string>TL2</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="2" 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>
+                                    <property name="text">
+                                        <string>TL4</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="0" column="3">
+                                    <property name="name">
+                                        <cstring>LineEdit13</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="2" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit32</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="1" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit21</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="1" 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>
+                                    <property name="text">
+                                        <string>TL3</string>
+                                    </property>
+                                </widget>
+                            </grid>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
+                            </property>
+                        </widget>
+                        <spacer row="2" 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>40</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                        <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>
+                            <property name="text">
+                                <string>TL1</string>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel1TextView_QTD.ui
new file mode 100644 (file)
index 0000000..d8e2458
--- /dev/null
@@ -0,0 +1,116 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_1Sel1TextView_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_1Sel1TextView_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>130</width>
+            <height>160</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_1Sel1TextView_QTD</string>
+    </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>
+            <property name="title">
+                <string></string>
+            </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>
+                            <property name="text">
+                                <string>TL1</string>
+                            </property>
+                        </widget>
+                        <widget class="QTextEdit" row="1" column="0" rowspan="1" colspan="3">
+                            <property name="name">
+                                <cstring>TextEdit1</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
+                            </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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel3LineEdit_QTD.ui
new file mode 100644 (file)
index 0000000..07db7bf
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_1Sel3LineEdit_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_1Sel3LineEdit_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>129</width>
+            <height>141</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_1Sel3LineEdit_QTD</string>
+    </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>
+            <property name="title">
+                <string></string>
+            </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>Layout2</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>
+                            <property name="text">
+                                <string>TL1</string>
+                            </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="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>
+                            <property name="text">
+                                <string>TL3</string>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit2</cstring>
+                            </property>
+                        </widget>
+                        <spacer row="4" 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>80</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+                            <property name="name">
+                                <cstring>LineEdit3</cstring>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</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>
+                            <property name="text">
+                                <string>TL4</string>
+                            </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>
+                            <property name="text">
+                                <string>TL2</string>
+                            </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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_1Sel6LineEdit_QTD.ui
new file mode 100644 (file)
index 0000000..b439a76
--- /dev/null
@@ -0,0 +1,254 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_1Sel6LineEdit_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_1Sel6LineEdit_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>129</width>
+            <height>163</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_1Sel6LineEdit_QTD</string>
+    </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>
+            <property name="title">
+                <string></string>
+            </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>
+                        <spacer row="2" 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>50</height>
+                                </size>
+                            </property>
+                        </spacer>
+                        <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>
+                            <property name="text">
+                                <string>TL1</string>
+                            </property>
+                        </widget>
+                        <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
+                            <property name="name">
+                                <cstring>Layout2</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="QLineEdit" row="2" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit22</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="3" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit32</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="1" 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>
+                                    <property name="text">
+                                        <string>TL4</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="3" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit31</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="2" 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>
+                                    <property name="text">
+                                        <string>TL5</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="1" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit11</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="3" 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>
+                                    <property name="text">
+                                        <string>TL6</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="1" column="2">
+                                    <property name="name">
+                                        <cstring>LineEdit12</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="0" column="1">
+                                    <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>
+                                    <property name="text">
+                                        <string>TL2</string>
+                                    </property>
+                                </widget>
+                                <widget class="QLineEdit" row="2" column="1">
+                                    <property name="name">
+                                        <cstring>LineEdit21</cstring>
+                                    </property>
+                                </widget>
+                                <widget class="QLabel" row="0" column="2">
+                                    <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>
+                                    <property name="text">
+                                        <string>TL3</string>
+                                    </property>
+                                </widget>
+                            </grid>
+                        </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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_2Sel1LineEdit_QTD.ui
new file mode 100644 (file)
index 0000000..e68cca9
--- /dev/null
@@ -0,0 +1,186 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_2Sel1LineEdit_QTD</class>
+<widget class="QWidget">
+    <property name="name">
+        <cstring>MeasureGUI_2Sel1LineEdit_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>129</width>
+            <height>115</height>
+        </rect>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_2Sel1LineEdit_QTD</string>
+    </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>
+            <property name="title">
+                <string></string>
+            </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>
+                        <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">
+                            <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>
+                            <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">
+                            <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>
+                            <property name="text">
+                                <string>TL2</string>
+                            </property>
+                        </widget>
+                        <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>
+                            <property name="text">
+                                <string>TL1</string>
+                            </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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                        <widget class="QLineEdit" row="0" column="2">
+                            <property name="name">
+                                <cstring>LineEdit1</cstring>
+                            </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>
+                            <property name="text">
+                                <string></string>
+                            </property>
+                        </widget>
+                    </grid>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui b/src/MeasureGUI/UIFiles/MeasureGUI_Skeleton_QTD.ui
new file mode 100644 (file)
index 0000000..d759fb4
--- /dev/null
@@ -0,0 +1,210 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>MeasureGUI_Skeleton_QTD</class>
+<widget class="QDialog">
+    <property name="name">
+        <cstring>MeasureGUI_Skeleton_QTD</cstring>
+    </property>
+    <property name="geometry">
+        <rect>
+            <x>0</x>
+            <y>0</y>
+            <width>228</width>
+            <height>266</height>
+        </rect>
+    </property>
+    <property name="sizePolicy">
+        <sizepolicy>
+            <hsizetype>5</hsizetype>
+            <vsizetype>7</vsizetype>
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+        </sizepolicy>
+    </property>
+    <property name="caption">
+        <string>MeasureGUI_Skeleton_QTD</string>
+    </property>
+    <property name="sizeGripEnabled">
+        <bool>true</bool>
+    </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="QGroupBox" row="2" column="0">
+                    <property name="name">
+                        <cstring>GroupButtons</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>7</hsizetype>
+                            <vsizetype>0</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="title">
+                        <string></string>
+                    </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>Layout3</cstring>
+                            </property>
+                            <grid>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <property name="margin">
+                                    <number>0</number>
+                                </property>
+                                <property name="spacing">
+                                    <number>6</number>
+                                </property>
+                                <spacer row="0" column="2">
+                                    <property name="name">
+                                        <cstring>Spacer2</cstring>
+                                    </property>
+                                    <property name="orientation">
+                                        <enum>Horizontal</enum>
+                                    </property>
+                                    <property name="sizeType">
+                                        <enum>Expanding</enum>
+                                    </property>
+                                    <property name="sizeHint">
+                                        <size>
+                                            <width>120</width>
+                                            <height>0</height>
+                                        </size>
+                                    </property>
+                                </spacer>
+                                <spacer row="0" column="0">
+                                    <property name="name">
+                                        <cstring>Spacer1</cstring>
+                                    </property>
+                                    <property name="orientation">
+                                        <enum>Horizontal</enum>
+                                    </property>
+                                    <property name="sizeType">
+                                        <enum>Expanding</enum>
+                                    </property>
+                                    <property name="sizeHint">
+                                        <size>
+                                            <width>120</width>
+                                            <height>0</height>
+                                        </size>
+                                    </property>
+                                </spacer>
+                                <widget class="QPushButton" row="0" column="1">
+                                    <property name="name">
+                                        <cstring>buttonClose</cstring>
+                                    </property>
+                                    <property name="text">
+                                        <string>&amp;Close</string>
+                                    </property>
+                                </widget>
+                            </grid>
+                        </widget>
+                    </grid>
+                </widget>
+                <widget class="QButtonGroup" row="0" column="0">
+                    <property name="name">
+                        <cstring>GroupConstructors</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>5</hsizetype>
+                            <vsizetype>0</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="title">
+                        <string></string>
+                    </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>Layout2</cstring>
+                            </property>
+                            <hbox>
+                                <property name="name">
+                                    <cstring>unnamed</cstring>
+                                </property>
+                                <property name="margin">
+                                    <number>0</number>
+                                </property>
+                                <property name="spacing">
+                                    <number>6</number>
+                                </property>
+                                <widget class="QRadioButton">
+                                    <property name="name">
+                                        <cstring>RadioButton1</cstring>
+                                    </property>
+                                    <property name="text">
+                                        <string></string>
+                                    </property>
+                                </widget>
+                            </hbox>
+                        </widget>
+                    </grid>
+                </widget>
+                <widget class="QGroupBox" row="1" column="0">
+                    <property name="name">
+                        <cstring>GroupMedium</cstring>
+                    </property>
+                    <property name="sizePolicy">
+                        <sizepolicy>
+                            <hsizetype>7</hsizetype>
+                            <vsizetype>7</vsizetype>
+                            <horstretch>0</horstretch>
+                            <verstretch>0</verstretch>
+                        </sizepolicy>
+                    </property>
+                    <property name="title">
+                        <string></string>
+                    </property>
+                </widget>
+            </grid>
+        </widget>
+    </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/src/MeasureGUI/UIFiles/ui_to_cxx b/src/MeasureGUI/UIFiles/ui_to_cxx
new file mode 100755 (executable)
index 0000000..a0a3503
--- /dev/null
@@ -0,0 +1,19 @@
+#!/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