From: ouv Date: Fri, 21 Nov 2008 14:55:58 +0000 (+0000) Subject: Dump Python extension X-Git-Tag: TG_DumpPython_Extension_3~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7cfb5a7c3bb3855c7322a0850b8830e87ab70b7c;p=modules%2Fgeom.git Dump Python extension --- diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx index 4953c18db..ed5eb9973 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.cxx @@ -110,11 +110,11 @@ BlocksGUI_TrsfDlg::~BlocksGUI_TrsfDlg() void BlocksGUI_TrsfDlg::Init() { // Set range of spinboxes - double SpecificStep = 1.0; - QMap::iterator anIter; + int SpecificStep = 1; + QMap::iterator anIter; for (anIter = mySpinBox.begin(); anIter != mySpinBox.end(); ++anIter) { //anIter.data()->RangeStepAndValidator(1.0, 999.999, SpecificStep, 3); - initSpinBox(anIter.value(), 1.0, MAX_NUMBER, SpecificStep, 3); + initSpinBox(anIter.value(), 1, MAX_NUMBER, SpecificStep); } // signals and slots connections @@ -127,9 +127,9 @@ void BlocksGUI_TrsfDlg::Init() for (anIterBtn = mySelBtn.begin(); anIterBtn != mySelBtn.end(); ++anIterBtn) connect(anIterBtn.value(), SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - QMap::iterator anIterSpin; + QMap::iterator anIterSpin; for (anIterSpin = mySpinBox.begin(); anIterSpin != mySpinBox.end(); ++anIterSpin) - connect(anIterSpin.value(), SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double))); + connect(anIterSpin.value(), SIGNAL(valueChanged(int)), this, SLOT(ValueChangedInSpinBox(int))); // init controls and fields initName(tr("GEOM_BLOCK_MULTITRSF")); @@ -164,14 +164,14 @@ void BlocksGUI_TrsfDlg::ConstructorsClicked (int constructorId) case 0: myGrp2->hide(); myGrp1->show(); - mySpinBox[SpinBox1]->setValue(2.0); + mySpinBox[SpinBox1]->setValue(2); mySelBtn[MainObj1]->click(); break; case 1: myGrp1->hide(); myGrp2->show(); - mySpinBox[SpinBox2U]->setValue(2.0); - mySpinBox[SpinBox2V]->setValue(2.0); + mySpinBox[SpinBox2U]->setValue(2); + mySpinBox[SpinBox2V]->setValue(2); mySelBtn[MainObj2]->click(); break; default: @@ -406,7 +406,7 @@ void BlocksGUI_TrsfDlg::enterEvent (QEvent*) // function : ValueChangedInSpinBox() // purpose : //================================================================================= -void BlocksGUI_TrsfDlg::ValueChangedInSpinBox(double) +void BlocksGUI_TrsfDlg::ValueChangedInSpinBox(int) { displayPreview(); } @@ -449,7 +449,7 @@ void BlocksGUI_TrsfDlg::createSpinWg (const QString& theLbl, const int theId) { QLabel* lab = new QLabel(theLbl, theParent); - mySpinBox[theId] = new SalomeApp_DoubleSpinBox(theParent); + mySpinBox[theId] = new SalomeApp_IntSpinBox(theParent); QGridLayout* l = 0; if (!theParent->layout()) { l = new QGridLayout(theParent); @@ -580,7 +580,7 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())-> MakeMultiTransformation1D(myShape, myFaces[Face1], myFaces[Face2], - (int)mySpinBox[SpinBox1]->value()); + mySpinBox[SpinBox1]->value()); if (!anObj->_is_nil()) { QStringList aParameters; @@ -594,9 +594,9 @@ bool BlocksGUI_TrsfDlg::execute (ObjectList& objects) anObj = GEOM::GEOM_IBlocksOperations::_narrow(getOperation())-> MakeMultiTransformation2D (myShape, myFaces[Face1U], myFaces[Face2U], - (int)mySpinBox[SpinBox2U]->value(), + mySpinBox[SpinBox2U]->value(), myFaces[Face1V], myFaces[Face2V], - (int)mySpinBox[SpinBox2V]->value()); + mySpinBox[SpinBox2V]->value()); if (!anObj->_is_nil()) { QStringList aParameters; diff --git a/src/BlocksGUI/BlocksGUI_TrsfDlg.h b/src/BlocksGUI/BlocksGUI_TrsfDlg.h index 453bf1d2c..a4844e1f9 100644 --- a/src/BlocksGUI/BlocksGUI_TrsfDlg.h +++ b/src/BlocksGUI/BlocksGUI_TrsfDlg.h @@ -29,7 +29,7 @@ #include -class SalomeApp_DoubleSpinBox; +class SalomeApp_IntSpinBox; class QGroupBox; class QPushButton; class QLineEdit; @@ -78,7 +78,7 @@ private: QMap mySelBtn; QMap mySelName; - QMap mySpinBox; + QMap mySpinBox; private slots: void ClickOnOk(); @@ -89,7 +89,7 @@ private slots: void SelectionIntoArgument(); void SetEditCurrentArgument(); - void ValueChangedInSpinBox (double); + void ValueChangedInSpinBox (int); }; #endif // BLOCKSGUI_TRSFDLG_H