diff --git a/src/GEOMBase/GEOMBase.cxx b/src/GEOMBase/GEOMBase.cxx index 133d4e566..315f8f082 100644 --- a/src/GEOMBase/GEOMBase.cxx +++ b/src/GEOMBase/GEOMBase.cxx @@ -25,8 +25,6 @@ #include "GEOMBase.h" -#include "GEOMBase_aParameterDlg.h" - #include #include @@ -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. diff --git a/src/GEOMBase/GEOMBase.h b/src/GEOMBase/GEOMBase.h index 2dc0b7f5a..7850f1095 100644 --- a/src/GEOMBase/GEOMBase.h +++ b/src/GEOMBase/GEOMBase.h @@ -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 index 6c9f27bab..000000000 --- a/src/GEOMBase/GEOMBase_aParameterDlg.cxx +++ /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 - -#include -#include -#include -#include - -#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 index 16ea0649b..000000000 --- a/src/GEOMBase/GEOMBase_aParameterDlg.h +++ /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 - -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 diff --git a/src/GEOMBase/GEOM_Operation.cxx b/src/GEOMBase/GEOM_Operation.cxx index 0e736400d..7fa72236a 100644 --- a/src/GEOMBase/GEOM_Operation.cxx +++ b/src/GEOMBase/GEOM_Operation.cxx @@ -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 ); } } diff --git a/src/GEOMBase/GEOM_Operation.h b/src/GEOMBase/GEOM_Operation.h index c843b4ce3..99c9c8be9 100644 --- a/src/GEOMBase/GEOM_Operation.h +++ b/src/GEOMBase/GEOM_Operation.h @@ -32,7 +32,6 @@ #include #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; diff --git a/src/GEOMBase/Makefile.am b/src/GEOMBase/Makefile.am index d239a4001..044ed56a8 100644 --- a/src/GEOMBase/Makefile.am +++ b/src/GEOMBase/Makefile.am @@ -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) diff --git a/src/GEOMGUI/GeometryGUI.cxx b/src/GEOMGUI/GeometryGUI.cxx index b7334d868..0130e418d 100644 --- a/src/GEOMGUI/GeometryGUI.cxx +++ b/src/GEOMGUI/GeometryGUI.cxx @@ -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 diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.cxx b/src/GEOMToolsGUI/GEOMToolsGUI.cxx index 873bc9faa..83718a679 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI.cxx @@ -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 !!!! diff --git a/src/GEOMToolsGUI/GEOMToolsGUI.h b/src/GEOMToolsGUI/GEOMToolsGUI.h index d19717ebb..e3602ab13 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI.h +++ b/src/GEOMToolsGUI/GEOMToolsGUI.h @@ -58,8 +58,6 @@ private: void OnEditDelete(); void OnSettingsColor(); - void OnSettingsIsos(); - void OnSettingsStep(); void OnRename(); void OnCheckGeometry(); diff --git a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx index b3e81b0d2..ac6fa4bd4 100644 --- a/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx +++ b/src/GEOMToolsGUI/GEOMToolsGUI_1.cxx @@ -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;