Salome HOME
*** empty log message *** snapshot_171207 snapshot_291007
authorvsr <vsr@opencascade.com>
Wed, 24 Oct 2007 08:55:26 +0000 (08:55 +0000)
committervsr <vsr@opencascade.com>
Wed, 24 Oct 2007 08:55:26 +0000 (08:55 +0000)
src/GEOMBase/GEOMBase.cxx
src/GEOMBase/GEOMBase.h
src/GEOMBase/GEOMBase_aParameterDlg.cxx [deleted file]
src/GEOMBase/GEOMBase_aParameterDlg.h [deleted file]
src/GEOMBase/GEOM_Operation.cxx
src/GEOMBase/GEOM_Operation.h
src/GEOMBase/Makefile.am
src/GEOMGUI/GeometryGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI.h
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx

index 133d4e566ce95652cfabc802f904e1b38825fb45..315f8f08268268790feef475b6102de9b89f56dd 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "GEOMBase.h"
 
-#include "GEOMBase_aParameterDlg.h"
-
 #include <GeometryGUI.h>
 #include <GEOM_Client.hxx>
 
@@ -741,34 +739,6 @@ bool GEOMBase::LinearEdgeExtremities(const TopoDS_Shape& S,  gp_Pnt& P1, gp_Pnt&
 }
 
 
-//=======================================================================
-// function : Parameter()
-// purpose  : return a parameter (float) from a dialog box
-//
-//  avalue1    : is a float or integer used as a default value displayed
-//  aTitle1    : is the title for aValue1
-//  aTitle     : is the main title
-//  bottom     : maximum value to be entered
-//  top               : minimum value to be entered
-//  decimals   : number of decimals
-//=======================================================================
-double GEOMBase::Parameter(Standard_Boolean& res, const char* aValue1, const char* aTitle1, const char* aTitle, const double bottom, const double top, const int decimals)
-{
-  GEOMBase_aParameterDlg * Dialog = new GEOMBase_aParameterDlg(aValue1, aTitle1, SUIT_Session::session()->activeApplication()->desktop(),
-                                                              aTitle, TRUE, 0, bottom, top, decimals);
-  int r = Dialog->exec();
-  float X = 0.0;
-  if(r == QDialog::Accepted) {
-    res = Standard_True;
-    X = Dialog->getValue();
-  }
-  else
-    res = Standard_False;
-  delete Dialog;
-  return X;
-}
-
-
 //=======================================================================
 // function : SelectionByNameInDialogs()
 // purpose  : Called when user has entered a name of object in a LineEdit.
index 2dc0b7f5a5a62a944ac5434565c98bcfa08e26c4..7850f10954b4be5107fbbf90683a48d1d5a08748 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 // File   : GEOMBase.h
-// Author : Damien COQUERET
+// Author : Damien COQUERET, Open CASCADE S.A.S.
 //
 
 #ifndef GEOMBASE_H
@@ -98,12 +98,6 @@ public :
   static bool LinearEdgeExtremities(const TopoDS_Shape& S, gp_Pnt& P1, gp_Pnt& P2);
   static void GetBipointDxDyDz(gp_Pnt P1, gp_Pnt P2, double& dx, double& dy, double& dz);
 
-  /* User dialog 1 parameter returned */
-  static double Parameter(Standard_Boolean& res,
-                         const char* aValue1 = 0, const char* aTitle1 = 0,
-                         const char* aTitle = 0, const double bottom = -1E6,
-                         const double top = +1E6, const int decimals = 6);
-
   /* Simulation management */
   static bool CreateArrowForLinearEdge(const TopoDS_Shape& tds, TopoDS_Shape& ArrowCone);
 
diff --git a/src/GEOMBase/GEOMBase_aParameterDlg.cxx b/src/GEOMBase/GEOMBase_aParameterDlg.cxx
deleted file mode 100644 (file)
index 6c9f27b..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-// GEOM GEOMGUI : GUI for Geometry component
-//
-// Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-// This library is free software; you can redistribute it and/or 
-// modify it under the terms of the GNU Lesser General Public 
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License. 
-// 
-// This library is distributed in the hope that it will be useful, 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-// Lesser General Public License for more details. 
-// 
-// You should have received a copy of the GNU Lesser General Public 
-// License along with this library; if not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File   : GEOMBase_aParameterDlg.cxx
-// Author : Lucien PIGNOLONI
-//
-
-#include "GEOMBase_aParameterDlg.h"
-#include <QtxDoubleSpinBox.h>
-
-#include <QGroupBox>
-#include <QLabel>
-#include <QPushButton>
-#include <QGridLayout>
-
-#ifndef WNT
-using namespace std;
-#endif
-
-
-//====================================================================================== 
-// function : GEOMBase_aParameterDlg()
-// purpose  : Constructs a GEOMBase_aParametertDlg which is a child of 'parent', with the 
-//            name 'name' and widget flags set to 'f'
-//
-//  avalue1    : is a float or integer used as default value in edit line
-//  aTitle1    : is the prompt for aValue1
-//  aTitle     : is the title for the user in dialog box
-//
-//  bottom     : the minimal value to be entered
-//  top        : the maximum value to be entered
-//  decimals   : number of decimals to be entered
-//
-//  The dialog will by default be modeless, unless you set 'modal' to
-//  TRUE to construct a modal dialog.
-// 
-//====================================================================================== 
-GEOMBase_aParameterDlg::GEOMBase_aParameterDlg(const char *aValue1, const char *aTitle1, QWidget* parent, const char* name, bool modal, Qt::WindowFlags fl, const double bottom, const double top, const int decimals)
-  :QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
-{
-  if(!name)
-    setObjectName( "MyParameterDialog" );
-  else
-    setObjectName( name );
-
-  setModal( modal );
-
-  resize(288, 81); 
-  setWindowTitle(name); /* appears on the title bar */
-  setSizeGripEnabled(TRUE);
-
-  QGridLayout* topLayout = new QGridLayout(this); 
-  topLayout->setSpacing(6);
-  topLayout->setMargin(11);
-
-  QGroupBox* mainGrp = new QGroupBox(this);
-  mainGrp->setObjectName("mainGrp");
-  QGridLayout* mainGrpLayout = new QGridLayout(mainGrp);
-  mainGrpLayout->setAlignment(Qt::AlignTop);
-  mainGrpLayout->setSpacing(6);
-  mainGrpLayout->setMargin(11);
-  topLayout->addWidget(mainGrp, 0, 0);
-
-  /* aTitle1 : text prompt on left of edit line */
-  QLabel* TextLabel1 = new QLabel(mainGrp);
-  TextLabel1->setObjectName("TextLabel1");
-  TextLabel1->setText(tr(aTitle1));  
-  mainGrpLayout->addWidget(TextLabel1, 0, 0);
-
-  mySpinBox = new QtxDoubleSpinBox(mainGrp);
-  mySpinBox->setObjectName("mySpinBox");
-  mySpinBox->setDecimals(decimals);
-  mySpinBox->setRange(bottom, top);
-  mySpinBox->setValue(QString(aValue1).toDouble());
-  mainGrpLayout->addWidget(mySpinBox, 0, 1);
-  
-  QGroupBox* btnGrp = new QGroupBox(this);
-  btnGrp->setObjectName("btnGrp");
-  QGridLayout* btnGrpLayout = new QGridLayout(btnGrp);
-  btnGrpLayout->setAlignment(Qt::AlignTop);
-  btnGrpLayout->setSpacing(6);
-  btnGrpLayout->setMargin(11);
-  topLayout->addWidget(btnGrp, 1, 0);
-
-  /* Ok button */
-  myButtonOk = new QPushButton(btnGrp);
-  myButtonOk->setObjectName("buttonOk");
-  myButtonOk->setText(tr("GEOM_BUT_OK"));
-  myButtonOk->setAutoDefault(TRUE);
-  myButtonOk->setDefault(TRUE);
-  btnGrpLayout->addWidget(myButtonOk, 0, 0);
-
-  btnGrpLayout->addItem(new QSpacerItem(5, 5, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, 1);
-
-  /* Cancel button */
-  myButtonCancel = new QPushButton(btnGrp);
-  myButtonCancel->setObjectName("buttonCancel");
-  myButtonCancel->setText(tr("GEOM_BUT_CANCEL"));
-  myButtonCancel->setAutoDefault(TRUE);
-  btnGrpLayout->addWidget(myButtonCancel, 0, 2);
-
-  /* signals and slots connections */
-  connect(myButtonOk, SIGNAL(clicked()), this, SLOT(accept()));
-  connect(myButtonCancel, SIGNAL(clicked()), this, SLOT(reject()));
-  
-  /* Move widget on the botton right corner of main widget */
-  //mzn: QAD_Tools::centerWidget(this, parent);
-}
-
-
-//====================================================================================== 
-// function : ~GEOMBase_aParameterDlg() destructor
-// purpose  : Destroys the object and frees any allocated resources
-//====================================================================================== 
-GEOMBase_aParameterDlg::~GEOMBase_aParameterDlg()
-{
-  // no need to delete child widgets, Qt does it all for us
-}
-
-
-//====================================================================================== 
-// function : GEOMBase_aParameterDlg::setValue
-// purpose  : sets value
-//====================================================================================== 
-void GEOMBase_aParameterDlg::setValue(double val)
-{
-  mySpinBox->setValue(val);
-}
-
-
-//====================================================================================== 
-// function : GEOMBase_aParameterDlg::getValue
-// purpose  : gets value
-//====================================================================================== 
-double GEOMBase_aParameterDlg::getValue()
-{
-  return mySpinBox->value();
-}
diff --git a/src/GEOMBase/GEOMBase_aParameterDlg.h b/src/GEOMBase/GEOMBase_aParameterDlg.h
deleted file mode 100644 (file)
index 16ea064..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// GEOM GEOMGUI : GUI for Geometry component
-//
-// Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
-// 
-// This library is free software; you can redistribute it and/or 
-// modify it under the terms of the GNU Lesser General Public 
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License. 
-// 
-// This library is distributed in the hope that it will be useful, 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-// Lesser General Public License for more details. 
-// 
-// You should have received a copy of the GNU Lesser General Public 
-// License along with this library; if not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
-// 
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-// File   : GEOMBase_aParameterDlg.h
-// Author : Lucien PIGNOLONI
-//
-
-#ifndef GEOMBASE_APARAMETERDLG_H
-#define GEOMBASE_APARAMETERDLG_H
-
-#include "GEOM_GEOMBase.hxx"
-
-#include <QDialog>
-
-class QPushButton;
-class QtxDoubleSpinBox;
-
-//=================================================================================
-// class    : GEOMBase_aParameterDlg
-// purpose  :
-//=================================================================================
-class GEOMBASE_EXPORT GEOMBase_aParameterDlg : public QDialog
-{ 
-    Q_OBJECT
-
-public:
-    GEOMBase_aParameterDlg(const char* aValue1 = "25", const char* aTitle1 = "Value :", QWidget* parent = 0, const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0, const double bottom = -1E6, const double top = +1E6, const int decimals = 6);
-    ~GEOMBase_aParameterDlg();
-
-    void setValue(double val);
-    double getValue();
-
-private:
-    QPushButton* myButtonOk;
-    QPushButton* myButtonCancel;
-    QtxDoubleSpinBox* mySpinBox;
-
-};
-
-#endif // GEOMBASE_APARAMETERDLG_H
index 0e736400d3b3f8e39601ac6db3404bc3d277ac84..7fa72236a27504f2d231c1de6b2918ec74428b4a 100644 (file)
@@ -59,7 +59,7 @@ void GEOM_Operation::startOperation()
     try {
       myIOperation->StartOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
+    catch ( const SALOME::SALOME_Exception& e ) {
       SalomeApp_Tools:: QtCatchCorbaException( e );
     }
   }
@@ -77,7 +77,7 @@ void GEOM_Operation::commitOperation()
     try {
       myIOperation->FinishOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
+    catch ( const SALOME::SALOME_Exception& e ) {
       SalomeApp_Tools:: QtCatchCorbaException( e );
     }
   }
@@ -113,7 +113,7 @@ void GEOM_Operation::abortOperation()
     try {
       myIOperation->AbortOperation();
     }
-    catch( const SALOME::SALOME_Exception& e ) {
+    catch ( const SALOME::SALOME_Exception& e ) {
       SalomeApp_Tools::QtCatchCorbaException( e );
     }
   }
index c843b4ce30bda50092ca7268bcec43af85dfb72e..99c9c8be9a564f5698dda7605e8339aef08a5a1a 100644 (file)
@@ -32,7 +32,6 @@
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(GEOM_Gen)
 
-
 class GEOMBASE_EXPORT GEOM_Operation : public SUIT_Operation
 {
 public:
@@ -41,11 +40,11 @@ public:
 
 protected:
   // Reimplemented from SUIT_Operation
-  virtual void    startOperation();        
-  virtual void    commitOperation();
-  virtual void    suspendOperation();
-  virtual void    resumeOperation();
-  virtual void    abortOperation();
+  virtual void               startOperation();        
+  virtual void               commitOperation();
+  virtual void               suspendOperation();
+  virtual void               resumeOperation();
+  virtual void               abortOperation();
 
 private:
   GEOM::GEOM_IOperations_var myIOperation;
index d239a400180716986f5140063ab4f6d9d5ea7c5a..044ed56a8b05094057026817d7000b9e06778a28 100644 (file)
@@ -40,13 +40,11 @@ salomeinclude_HEADERS =             \
 dist_libGEOMBase_la_SOURCES =          \
        GEOMBase.cxx                    \
        GEOMBase_Skeleton.cxx           \
-       GEOMBase_aParameterDlg.cxx      \
        GEOMBase_Helper.cxx             \
        GEOM_Operation.cxx
 
 MOC_FILES =                            \
-       GEOMBase_Skeleton_moc.cxx       \
-       GEOMBase_aParameterDlg_moc.cxx
+       GEOMBase_Skeleton_moc.cxx
 
 nodist_libGEOMBase_la_SOURCES = \
        $(MOC_FILES)
index b7334d868f48eefa06c2e4ca7404a37f3ae4d593..0130e418d8b31d8e650d027dc2533698c3a66c76 100644 (file)
@@ -351,8 +351,6 @@ void GeometryGUI::OnGUIEvent( int id )
       id == 33   ||  // MENU EDIT - DELETE
       id == 411  ||  // MENU SETTINGS - ADD IN STUDY
       id == 412  ||  // MENU SETTINGS - SHADING COLOR
-      id == 413  ||  // MENU SETTINGS - ISOS
-      id == 414  ||  // MENU SETTINGS - STEP VALUE FOR SPIN BOXES
       id == 5103 ||  // MENU TOOLS - CHECK GEOMETRY
       id == 8032 ||  // POPUP VIEWER - COLOR
       id == 8033 ||  // POPUP VIEWER - TRANSPARENCY
@@ -826,8 +824,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   createGeomAction( 5103, "CHECK_GEOMETRY" );
 
   createGeomAction( 412, "SHADING_COLOR" );
-  createGeomAction( 413, "ISOS" );
-  createGeomAction( 414, "STEP_VALUE" );
 
   createGeomAction( 211, "SHADING" );
   createGeomAction( 212, "DISPLAY_ALL" );
@@ -989,8 +985,6 @@ void GeometryGUI::initialize( CAM_Application* app )
   //createMenu( separator(), prefId, -1 );
   //int geomId = createMenu( tr( "MEN_PREFERENCES_GEOM" ), prefId, -1 );
   //createMenu( 412, geomId, -1 );
-  //createMenu( 413, geomId, -1 );
-  //createMenu( 414, geomId, -1 );
   //createMenu( separator(), prefId, -1 );
 
   int viewId = createMenu( tr( "MEN_VIEW" ), -1, -1 );
@@ -1262,7 +1256,6 @@ void GeometryGUI::onWindowActivated( SUIT_ViewWindow* win )
   action( 607 )->setEnabled( ViewOCC ); // RemoveInternalWires
   action( 608 )->setEnabled( ViewOCC ); // AddPointOnEdge
 //  action( 609 )->setEnabled( ViewOCC ); // Free boundaries
-  action( 413 )->setEnabled( ViewOCC ); // Isos Settings
 
   action( 800 )->setEnabled( ViewOCC ); // Create Group
   action( 801 )->setEnabled( ViewOCC ); // Edit Group
index 873bc9faac9c0ab1da7119c1f10742ac4c15eea9..83718a6791e75e4887ffc09cfce6a3f8c25d503e 100644 (file)
@@ -200,16 +200,6 @@ bool GEOMToolsGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
        OnSettingsColor();
        break;
       }
-    case 413: // SETTINGS - ISOS
-      {
-       OnSettingsIsos();
-       break;
-      }
-    case 414: // SETTINGS : STEP VALUE FOR SPIN BOXES
-      {
-       OnSettingsStep();
-       break;
-      }
     case 804: // ADD IN STUDY - POPUP VIEWER
       {
        // SAN -- TO BE REMOVED !!!!
index d19717ebbf4d25044d1411ffa7a365c69a202794..e3602ab136b64802dfbabb191f1fc0ee41e503b4 100644 (file)
@@ -58,8 +58,6 @@ private:
   void         OnEditDelete();
 
   void         OnSettingsColor();
-  void         OnSettingsIsos();
-  void         OnSettingsStep();
   void         OnRename();
   void         OnCheckGeometry();
 
index b3e81b0d2909323f5b0c2a4929df47e0afcea4fd..ac6fa4bd498a53bfc1f4c04261d0743faec123da 100644 (file)
@@ -90,66 +90,6 @@ void GEOMToolsGUI::OnSettingsColor()
   }
 }
 
-void GEOMToolsGUI::OnSettingsIsos()
-{
-/*
-  SUIT_Session* sess = SUIT_Session::session();
-  SUIT_ResourceMgr* resMgr = sess->resourceMgr();
-  SUIT_Desktop* desk = sess->activeApplication()->desktop();
-
-  SUIT_ViewManager* vman = desk->activeWindow()->getViewManager();
-  QString type = vman->getType();
-
-  if ( type != OCCViewer_Viewer::Type() )
-    return;
-
-  OCCViewer_Viewer* vm = (OCCViewer_Viewer*)vman->getViewModel();
-  Handle (AIS_InteractiveContext) ic = vm->getAISContext();
-
-  int IsoU = resMgr->integerValue( "Geometry:SettingsIsoU", 1 );
-  int IsoV = resMgr->integerValue( "Geometry:SettingsIsoV", 1 );
-
-  ic->DefaultDrawer()->UIsoAspect()->SetNumber( IsoU );
-  ic->DefaultDrawer()->VIsoAspect()->SetNumber( IsoV );
-
-  GEOMBase_NbIsosDlg* NbIsosDlg = new GEOMBase_NbIsosDlg(desk, tr("GEOM_MEN_ISOS"), TRUE);
-
-  NbIsosDlg->SpinBoxU->setValue(IsoU);
-  NbIsosDlg->SpinBoxV->setValue(IsoV);
-
-  if(NbIsosDlg->exec()) {
-    IsoU = NbIsosDlg->SpinBoxU->text().toInt();
-    IsoV = NbIsosDlg->SpinBoxV->text().toInt();
-
-    ic->DefaultDrawer()->UIsoAspect()->SetNumber(UIso);
-    ic->DefaultDrawer()->VIsoAspect()->SetNumber(VIso);
-    resMgr->setValue("Geometry:SettingsIsoU", isoU);
-    resMgr->setValue("Geometry:SettingsIsoV", isoV);
-  }
-*/
-}
-
-void GEOMToolsGUI::OnSettingsStep()
-{
-  SUIT_Session* sess = SUIT_Session::session();
-  SUIT_ResourceMgr* resMgr = sess->resourceMgr();
-
-  double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100. );
-
-  Standard_Boolean res = false;
-  double dd = GEOMBase::Parameter( res, QString("%1").arg(step).toLatin1().constData(), 
-                                  tr("GEOM_MEN_STEP_LABEL").toLatin1().constData(), 
-                                  tr("GEOM_STEP_TITLE").toLatin1().constData(), 0.001, 10000.0, 3);
-  if(res) {
-    resMgr->setValue( "Geometry", "SettingsGeomStep", dd );
-
-    /* Emit signal to GeometryGUI_SpinBoxes */
-    getGeometryGUI()->EmitSignalDefaultStepValueChanged( dd );
-  }
-  else
-    sess->activeApplication()->putInfo(tr("GEOM_PRP_ABORT"));
-}
-
 void GEOMToolsGUI::OnRename()
 {
   SALOME_ListIO selected;