1 // GEOM GEOMGUI : GUI for Geometry component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : OperationGUI_FilletDlg.cxx
23 // Author : Damien COQUERET, Open CASCADE S.A.S.
26 #include "OperationGUI_FilletDlg.h"
29 #include <GeometryGUI.h>
32 #include <SUIT_Desktop.h>
33 #include <SUIT_Session.h>
34 #include <SUIT_ResourceMgr.h>
35 #include <SUIT_ViewWindow.h>
36 #include <SUIT_ViewManager.h>
37 #include <SalomeApp_Application.h>
38 #include <LightApp_SelectionMgr.h>
39 #include <OCCViewer_ViewModel.h>
42 #include <TColStd_MapOfInteger.hxx>
43 #include <TColStd_IndexedMapOfInteger.hxx>
45 #include <GEOMImpl_Types.hxx>
47 //=================================================================================
48 // class : OperationGUI_FilletDlg()
49 // purpose : Constructs a OperationGUI_FilletDlg which is a child of 'parent', with the
50 // name 'name' and widget flags set to 'f'.
51 // The dialog will by default be modeless, unless you set 'modal' to
52 // TRUE to construct a modal dialog.
53 //=================================================================================
54 OperationGUI_FilletDlg::OperationGUI_FilletDlg (GeometryGUI* theGeometryGUI, QWidget* parent)
55 : GEOMBase_Skeleton(theGeometryGUI, parent, false),
58 SUIT_ResourceMgr* aResMgr = myGeomGUI->getApp()->resourceMgr();
59 QPixmap image0 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_ALL")));
60 QPixmap image1 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_EDGE")));
61 QPixmap image2 (aResMgr->loadPixmap("GEOM", tr("ICON_DLG_FILLET_FACE")));
63 QPixmap iconSelect (aResMgr->loadPixmap("GEOM", tr("ICON_SELECT")));
65 setWindowTitle(tr("GEOM_FILLET_TITLE"));
67 /***************************************************************/
68 mainFrame()->GroupConstructors->setTitle(tr("GEOM_FILLET"));
69 mainFrame()->RadioButton1->setIcon(image0);
70 mainFrame()->RadioButton2->setIcon(image1);
71 mainFrame()->RadioButton3->setIcon(image2);
73 Group1 = new DlgRef_1Sel1Spin(centralWidget());
74 Group1->GroupBox1->setTitle(tr("GEOM_FILLET_ALL"));
75 Group1->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
76 Group1->TextLabel2->setText(tr("GEOM_RADIUS"));
77 Group1->PushButton1->setIcon(iconSelect);
78 Group1->LineEdit1->setReadOnly(true);
80 Group2 = new DlgRef_2Sel3Spin2Rb(centralWidget());
81 Group2->GroupBox1->setTitle(tr("GEOM_FILLET_EDGES"));
82 Group2->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
83 Group2->TextLabel2->setText(tr("SELECTED_EDGES"));
84 Group2->TextLabel3->setText(tr("GEOM_RADIUS"));
85 Group2->TextLabel4->setText(tr("GEOM_R1"));
86 Group2->TextLabel5->setText(tr("GEOM_R2"));
87 Group2->PushButton1->setIcon(iconSelect);
88 Group2->PushButton2->setIcon(iconSelect);
89 Group2->LineEdit1->setReadOnly(true);
90 Group2->LineEdit2->setReadOnly(true);
92 Group3 = new DlgRef_2Sel3Spin2Rb(centralWidget());
93 Group3->GroupBox1->setTitle(tr("GEOM_FILLET_FACES"));
94 Group3->TextLabel1->setText(tr("GEOM_MAIN_OBJECT"));
95 Group3->TextLabel2->setText(tr("SELECTED_FACES"));
96 Group3->TextLabel3->setText(tr("GEOM_RADIUS"));
97 Group3->TextLabel4->setText(tr("GEOM_R1"));
98 Group3->TextLabel5->setText(tr("GEOM_R2"));
99 Group3->PushButton1->setIcon(iconSelect);
100 Group3->PushButton2->setIcon(iconSelect);
101 Group3->LineEdit1->setReadOnly(true);
102 Group3->LineEdit2->setReadOnly(true);
104 QVBoxLayout* layout = new QVBoxLayout(centralWidget());
105 layout->setMargin(0); layout->setSpacing(6);
106 layout->addWidget(Group1);
107 layout->addWidget(Group2);
108 layout->addWidget(Group3);
109 /***************************************************************/
111 // Set range of spinboxes
112 double SpecificStep = 10.0;
113 initSpinBox(Group1->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
114 initSpinBox(Group2->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
115 initSpinBox(Group2->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
116 initSpinBox(Group2->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
117 initSpinBox(Group3->SpinBox_DX, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
118 initSpinBox(Group3->SpinBox_DY, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
119 initSpinBox(Group3->SpinBox_DZ, 0.001, COORD_MAX, SpecificStep, 3); // VSR: TODO: DBL_DIGITS_DISPLAY
121 setHelpFileName("fillet_operation_page.html");
127 //=================================================================================
128 // function : ~OperationGUI_FilletDlg()
129 // purpose : Destroys the object and frees any allocated resources
130 //=================================================================================
131 OperationGUI_FilletDlg::~OperationGUI_FilletDlg()
135 //=================================================================================
138 //=================================================================================
139 void OperationGUI_FilletDlg::Init()
141 // Set Initial values of spinboxes
142 Group1->SpinBox_DX->setValue(5);
143 Group2->SpinBox_DX->setValue(5);
144 Group2->SpinBox_DY->setValue(5);
145 Group2->SpinBox_DZ->setValue(5);
146 Group3->SpinBox_DX->setValue(5);
147 Group3->SpinBox_DY->setValue(5);
148 Group3->SpinBox_DZ->setValue(5);
151 Group1->LineEdit1->setText("");
152 Group2->LineEdit1->setText("");
153 Group2->LineEdit2->setText("");
154 Group3->LineEdit1->setText("");
155 Group3->LineEdit2->setText("");
157 myShape = GEOM::GEOM_Object::_nil();
162 // signals and slots connections
165 connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk() ));
166 connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply()));
169 connect(this, SIGNAL(constructorsClicked(int)), this, SLOT(ConstructorsClicked(int)));
172 connect(Group1->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
173 connect(Group2->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
174 connect(Group3->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
175 connect(Group2->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
176 connect(Group3->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument()));
179 connect(Group1->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
180 connect(Group2->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
181 connect(Group3->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed()));
184 connect(Group1->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
185 connect(Group2->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
186 connect(Group2->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
187 connect(Group2->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
188 connect(Group3->SpinBox_DX, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
189 connect(Group3->SpinBox_DY, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
190 connect(Group3->SpinBox_DZ, SIGNAL(valueChanged(double)), this, SLOT(ValueChangedInSpinBox(double)));
193 connect(Group2->RadioButton1, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
194 connect(Group2->RadioButton2, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
195 connect(Group3->RadioButton1, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
196 connect(Group3->RadioButton2, SIGNAL(clicked()), this, SLOT(RadioButtonClicked()));
198 initName(tr("GEOM_FILLET"));
200 myConstructorId = -1;
201 ConstructorsClicked(0);
204 //=================================================================================
205 // function : ConstructorsClicked()
206 // purpose : Radio button management
207 //=================================================================================
208 void OperationGUI_FilletDlg::ConstructorsClicked (int constructorId)
210 if (myGeomGUI->getApp()->desktop()->activeWindow()->getViewManager()->getType()
211 != OCCViewer_Viewer::Type()) {
212 mainFrame()->RadioButton1->setChecked(true);
216 if (myConstructorId == constructorId)
219 // Get radius from previous widget
220 double R = 5, R1 = 5, R2 = 5;
221 if (myConstructorId == 0) {
222 R = Group1->SpinBox_DX->value();
224 else if (myConstructorId == 1) {
225 R = Group2->SpinBox_DX->value();
226 R1 = Group2->SpinBox_DY->value();
227 R2 = Group2->SpinBox_DZ->value();
230 R = Group3->SpinBox_DX->value();
231 R1 = Group3->SpinBox_DY->value();
232 R2 = Group3->SpinBox_DZ->value();
235 myConstructorId = constructorId;
237 switch (constructorId) {
242 Group1->SpinBox_DX->setValue(R);
248 Group2->SpinBox_DX->setValue(R);
249 Group2->SpinBox_DY->setValue(R1);
250 Group2->SpinBox_DZ->setValue(R2);
256 Group3->SpinBox_DX->setValue(R);
257 Group3->SpinBox_DY->setValue(R1);
258 Group3->SpinBox_DZ->setValue(R2);
264 if (constructorId == 0) Group1->PushButton1->click();
265 else if (constructorId == 1) Group2->PushButton1->click();
266 else Group3->PushButton1->click();
272 SelectionIntoArgument();
275 if (!myShape->_is_nil()) {
276 myEditCurrentArgument->setText(GEOMBase::GetName(myShape));
277 GEOMBase_Skeleton::LineEditReturnPressed();
278 switch (getConstructorId()) {
280 if (myEdges.Extent() == 0)
281 Group2->PushButton2->click();
284 if (myFaces.Extent() == 0)
285 Group3->PushButton2->click();
292 myEditCurrentArgument->setText("");
297 qApp->processEvents();
299 resize(minimumSize());
302 //=================================================================================
303 // function : ClickOnOk()
305 //=================================================================================
306 void OperationGUI_FilletDlg::ClickOnOk()
312 //=================================================================================
313 // function : ClickOnApply()
315 //=================================================================================
316 bool OperationGUI_FilletDlg::ClickOnApply()
322 // activate selection and connect selection manager
323 ConstructorsClicked(getConstructorId());
327 //=================================================================================
328 // function : SelectionIntoArgument()
329 // purpose : Called when selection is changed or on dialog initialization or activation
330 //=================================================================================
331 void OperationGUI_FilletDlg::SelectionIntoArgument()
334 myEditCurrentArgument->setText("");
336 LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr();
337 SALOME_ListIO aSelList;
338 aSelMgr->selectedObjects(aSelList);
340 // If selection of main object is activated
341 if (myEditCurrentArgument == Group1->LineEdit1 ||
342 myEditCurrentArgument == Group2->LineEdit1 ||
343 myEditCurrentArgument == Group3->LineEdit1)
345 myShape = GEOM::GEOM_Object::_nil();
346 if (aSelList.Extent() == 1) {
347 Standard_Boolean aResult = Standard_False;
348 GEOM::GEOM_Object_var anObj =
349 GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
351 if (aResult && !anObj->_is_nil()) {
353 myEditCurrentArgument->setText(GEOMBase::GetName(anObj));
360 // If face or edge selection is activated
361 else if (myEditCurrentArgument == Group2->LineEdit2 ||
362 myEditCurrentArgument == Group3->LineEdit2)
364 if (myEditCurrentArgument == Group2->LineEdit2) myEdges.Clear();
365 else myFaces.Clear();
366 if (aSelList.Extent() == 1) {
367 Standard_Boolean aResult = Standard_False;
368 GEOM::GEOM_Object_var anObj =
369 GEOMBase::ConvertIOinGEOMObject(aSelList.First(), aResult);
371 if (aResult && !anObj->_is_nil()) {
372 TColStd_IndexedMapOfInteger anIndexes;
373 aSelMgr->GetIndexes(aSelList.First(), anIndexes);
375 if (anIndexes.Extent() > 0) {
377 if (anIndexes.Extent() == 1) {
378 int anIndex = anIndexes(1);
380 aName = QString(GEOMBase::GetName(anObj)) + QString(":%1").arg(anIndex);
383 aName = tr("GEOM_MEN_POPUP_NAME").arg(anIndexes.Extent());
386 myEditCurrentArgument->setText(aName);
388 if (myConstructorId == 1)
400 if (!(myEditCurrentArgument == Group2->LineEdit2 ||
401 myEditCurrentArgument == Group3->LineEdit2)) {
402 disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
403 myGeomGUI->getApp()->selectionMgr()->clearSelected();
404 connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
405 this, SLOT(SelectionIntoArgument()));
408 switch (getConstructorId()) {
410 if (myEditCurrentArgument == Group2->LineEdit1) {
411 if (!myShape->_is_nil() && myEdges.Extent() == 0)
412 Group2->PushButton2->click();
416 if (myEditCurrentArgument == Group3->LineEdit1) {
417 if (!myShape->_is_nil() && myFaces.Extent() == 0)
418 Group3->PushButton2->click();
426 //=================================================================================
427 // function : SetEditCurrentArgument()
429 //=================================================================================
430 void OperationGUI_FilletDlg::SetEditCurrentArgument()
432 QPushButton* send = (QPushButton*)sender();
434 if (send == Group1->PushButton1) {
435 myEditCurrentArgument = Group1->LineEdit1;
437 else if (send == Group2->PushButton1) {
438 myEditCurrentArgument = Group2->LineEdit1;
439 Group2->PushButton2->setDown(false);
440 Group2->LineEdit2->setEnabled(false);
442 else if (send == Group2->PushButton2) {
443 myEditCurrentArgument = Group2->LineEdit2;
444 Group2->PushButton1->setDown(false);
445 Group2->LineEdit1->setEnabled(false);
447 else if (send == Group3->PushButton1) {
448 myEditCurrentArgument = Group3->LineEdit1;
449 Group3->PushButton2->setDown(false);
450 Group3->LineEdit2->setEnabled(false);
452 else if (send == Group3->PushButton2) {
453 myEditCurrentArgument = Group3->LineEdit2;
454 Group3->PushButton1->setDown(false);
455 Group3->LineEdit1->setEnabled(false);
459 myEditCurrentArgument->setEnabled(true);
460 myEditCurrentArgument->setFocus();
461 // after setFocus(), because it will be setDown(false) when loses focus
466 // seems we need it only to avoid preview disappearing, caused by selection mode change
470 //=================================================================================
471 // function : LineEditReturnPressed()
473 //=================================================================================
474 void OperationGUI_FilletDlg::LineEditReturnPressed()
476 QLineEdit* send = (QLineEdit*)sender();
478 if (send == Group1->LineEdit1)
479 myEditCurrentArgument = Group1->LineEdit1;
480 else if (send == Group2->LineEdit1)
481 myEditCurrentArgument = Group2->LineEdit1;
482 else if (send == Group3->LineEdit1)
483 myEditCurrentArgument = Group3->LineEdit1;
487 GEOMBase_Skeleton::LineEditReturnPressed();
490 //=================================================================================
491 // function : ActivateThisDialog()
493 //=================================================================================
494 void OperationGUI_FilletDlg::ActivateThisDialog()
496 GEOMBase_Skeleton::ActivateThisDialog();
498 // reinit, because some selected objects could be removed
502 //=================================================================================
503 // function : enterEvent()
505 //=================================================================================
506 void OperationGUI_FilletDlg::enterEvent (QEvent*)
508 if (!mainFrame()->GroupConstructors->isEnabled())
509 this->ActivateThisDialog();
512 //=================================================================================
513 // function : ValueChangedInSpinBox()
515 //=================================================================================
516 void OperationGUI_FilletDlg::ValueChangedInSpinBox (double)
521 //=================================================================================
522 // function : activateSelection
523 // purpose : Activate selection in accordance with myEditCurrentArgument
524 //=================================================================================
525 void OperationGUI_FilletDlg::activateSelection()
527 disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0);
529 if (!myShape->_is_nil() && myEditCurrentArgument == Group2->LineEdit2)
530 localSelection(myShape, TopAbs_EDGE);
531 else if (!myShape->_is_nil() && myEditCurrentArgument == Group3->LineEdit2)
532 localSelection(myShape, TopAbs_FACE);
534 TColStd_MapOfInteger aMap;
535 aMap.Add(GEOM_SHELL);
536 aMap.Add(GEOM_SOLID);
537 aMap.Add(GEOM_COMPOUND);
538 globalSelection(aMap);
541 connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()),
542 this, SLOT(SelectionIntoArgument()));
545 //=================================================================================
546 // function : enableWidgets
547 // purpose : Enable widgets of faces in accordance with value of main object
548 //=================================================================================
549 void OperationGUI_FilletDlg::enableWidgets()
551 int anId = getConstructorId();
553 bool toEnable = !myShape->_is_nil();
556 //Group2->LineEdit2->setEnabled(toEnable);
557 Group2->PushButton2->setEnabled(toEnable);
560 Group2->LineEdit2->setText("");
564 else if (anId == 2) {
565 //Group3->LineEdit2->setEnabled(toEnable);
566 Group3->PushButton2->setEnabled(toEnable);
569 Group3->LineEdit2->setText("");
575 //=================================================================================
576 // function : createOperation
578 //=================================================================================
579 GEOM::GEOM_IOperations_ptr OperationGUI_FilletDlg::createOperation()
581 return getGeomEngine()->GetILocalOperations(getStudyId());
584 //=================================================================================
585 // function : isValid()
586 // purpose : Verify validity of input data
587 //=================================================================================
588 bool OperationGUI_FilletDlg::isValid (QString&)
590 switch (getConstructorId())
592 case 0: return !myShape->_is_nil();
593 case 1: return !myShape->_is_nil() && myEdges.Extent() > 0;
594 case 2: return !myShape->_is_nil() && myFaces.Extent() > 0;
595 default: return false;
599 //=================================================================================
600 // function : execute
602 //=================================================================================
603 bool OperationGUI_FilletDlg::execute (ObjectList& objects)
605 GEOM::GEOM_Object_var anObj;
607 int anId = getConstructorId();
609 anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
610 MakeFilletAll(myShape, getRadius());
611 else if (anId == 1) {
612 GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
613 aList->length(myEdges.Extent());
615 for (int i = 1, n = myEdges.Extent(); i <= n; i++)
616 aList[ i - 1 ] = myEdges(i);
618 if (Group2->RadioButton1->isChecked())
619 anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
620 MakeFilletEdges(myShape, getRadius(), aList);
622 anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
623 MakeFilletEdgesR1R2(myShape,
624 Group2->SpinBox_DY->value(),
625 Group2->SpinBox_DZ->value(),
628 else if (anId == 2) {
629 GEOM::ListOfLong_var aList = new GEOM::ListOfLong;
630 aList->length(myFaces.Extent());
632 for (int i = 1, n = myFaces.Extent(); i <= n; i++)
633 aList[ i - 1 ] = myFaces(i);
635 if (Group3->RadioButton1->isChecked()) {
636 anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
637 MakeFilletFaces(myShape, getRadius(), aList);
640 anObj = GEOM::GEOM_ILocalOperations::_narrow(getOperation())->
641 MakeFilletFacesR1R2(myShape,
642 Group3->SpinBox_DY->value(),
643 Group3->SpinBox_DZ->value(), aList);
647 if (!anObj->_is_nil())
648 objects.push_back(anObj._retn());
653 //=================================================================================
654 // function : getRadius
655 // purpose : Get radius
656 //=================================================================================
657 double OperationGUI_FilletDlg::getRadius() const
659 int anId = getConstructorId();
660 if (anId == 0) return Group1->SpinBox_DX->value();
661 else if (anId == 1) return Group2->SpinBox_DX->value();
662 else return Group3->SpinBox_DX->value();
665 //=================================================================================
666 // function : RadiobuttonClicked
668 //=================================================================================
669 void OperationGUI_FilletDlg::RadioButtonClicked()
671 const QObject* s = sender();
673 bool flag = s == Group2->RadioButton1 || s == Group3->RadioButton1;
675 Group2->RadioButton1->blockSignals(true);
676 Group2->RadioButton2->blockSignals(true);
677 Group3->RadioButton1->blockSignals(true);
678 Group3->RadioButton2->blockSignals(true);
680 Group2->SpinBox_DX->setEnabled(flag);
681 Group2->SpinBox_DY->setEnabled(!flag);
682 Group2->SpinBox_DZ->setEnabled(!flag);
683 Group2->RadioButton1->setChecked(flag);
684 Group2->RadioButton2->setChecked(!flag);
685 Group3->SpinBox_DX->setEnabled(flag);
686 Group3->SpinBox_DY->setEnabled(!flag);
687 Group3->SpinBox_DZ->setEnabled(!flag);
688 Group3->RadioButton1->setChecked(flag);
689 Group3->RadioButton2->setChecked(!flag);
691 Group2->RadioButton1->blockSignals(false);
692 Group2->RadioButton2->blockSignals(false);
693 Group3->RadioButton1->blockSignals(false);
694 Group3->RadioButton2->blockSignals(false);