X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FBooleanGUI%2FBooleanGUI_Dialog.cxx;h=3ee6ba47c2aa31eba07019d3cc8eeced8484c011;hb=3cd92817cb4c5ee5911d6f40fe977b5e57b980e1;hp=a50f0881cc3fe3346e3899fa46cdacb93744186d;hpb=fa5a40f774cd408cbb2fb4af0e5b93ee5d2be3e9;p=modules%2Fgeom.git diff --git a/src/BooleanGUI/BooleanGUI_Dialog.cxx b/src/BooleanGUI/BooleanGUI_Dialog.cxx old mode 100644 new mode 100755 index a50f0881c..3ee6ba47c --- a/src/BooleanGUI/BooleanGUI_Dialog.cxx +++ b/src/BooleanGUI/BooleanGUI_Dialog.cxx @@ -1,42 +1,45 @@ -// GEOM GEOMGUI : GUI for Geometry component +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE // -// 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 +// Copyright (C) 2003-2007 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, or (at your option) any later version. // +// 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 : BooleanGUI_Dialog.cxx -// Author : Lucien PIGNOLONI -// Module : GEOM -// $Header$ -#include "BooleanGUI_Dialog.h" +// GEOM GEOMGUI : GUI for Geometry component +// File : BooleanGUI_Dialog.cxx +// Author : Lucien PIGNOLONI, Open CASCADE S.A.S. +// #include "BooleanGUI.h" -#include "DlgRef_2Sel_QTD.h" +#include "BooleanGUI_Dialog.h" -#include "SUIT_Session.h" -#include "SalomeApp_Application.h" -#include "SalomeApp_SelectionMgr.h" +#include +#include +#include -#include +#include +#include +#include +#include +#include -using namespace std; +// VSR 22/08/2012: issue 0021787: remove "Preview" button from BOP and Partition operations +// Comment next line to enable preview in BOP dialog box +#define NO_PREVIEW //================================================================================= // class : BooleanGUI_Dialog() @@ -45,71 +48,104 @@ using namespace std; // The dialog will by default be modeless, unless you set 'modal' to // TRUE to construct a modal dialog. //================================================================================= -BooleanGUI_Dialog::BooleanGUI_Dialog( const int theOperation, QWidget* parent, const char* name, bool modal, WFlags fl) - :GEOMBase_Skeleton(parent, name, modal, fl), - myOperation( theOperation ) +BooleanGUI_Dialog::BooleanGUI_Dialog (const int theOperation, GeometryGUI* theGeometryGUI, + QWidget* parent, bool modal, Qt::WindowFlags fl) + : GEOMBase_Skeleton(theGeometryGUI, parent, modal, fl), + myOperation(theOperation) { QPixmap image0; QString aTitle, aCaption; - switch ( myOperation ) - { - case BooleanGUI::COMMON: - image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_COMMON"))); - aTitle = tr("GEOM_COMMON"); - aCaption = tr("GEOM_COMMON_TITLE"); - break; - case BooleanGUI::CUT: - image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_CUT"))); - aTitle = tr("GEOM_CUT"); - aCaption = tr("GEOM_CUT_TITLE"); - break; - case BooleanGUI::FUSE: - image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_FUSE"))); - aTitle = tr("GEOM_FUSE"); - aCaption = tr("GEOM_FUSE_TITLE"); - break; - case BooleanGUI::SECTION: - image0 = QPixmap( SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_DLG_SECTION"))); - aTitle = tr("GEOM_SECTION"); - aCaption = tr("GEOM_SECTION_TITLE"); - break; - } - QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM",tr("ICON_SELECT"))); - - setCaption( aCaption ); + switch (myOperation) { + case BooleanGUI::COMMON: + image0 = QPixmap(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_COMMON"))); + aTitle = tr("GEOM_COMMON"); + aCaption = tr("GEOM_COMMON_TITLE"); + setHelpFileName("common_operation_page.html"); + break; + case BooleanGUI::CUT: + image0 = QPixmap(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_CUT"))); + aTitle = tr("GEOM_CUT"); + aCaption = tr("GEOM_CUT_TITLE"); + setHelpFileName("cut_operation_page.html"); + break; + case BooleanGUI::FUSE: + image0 = QPixmap(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_FUSE"))); + aTitle = tr("GEOM_FUSE"); + aCaption = tr("GEOM_FUSE_TITLE"); + setHelpFileName("fuse_operation_page.html"); + break; + case BooleanGUI::SECTION: + image0 = QPixmap(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_DLG_SECTION"))); + aTitle = tr("GEOM_SECTION"); + aCaption = tr("GEOM_SECTION_TITLE"); + setHelpFileName("section_opeartion_page.html"); + break; + } + QPixmap image1(SUIT_Session::session()->resourceMgr()->loadPixmap("GEOM", tr("ICON_SELECT"))); + + setWindowTitle(aCaption); /***************************************************************/ - GroupConstructors->setTitle( aTitle ); - RadioButton1->setPixmap( image0 ); - RadioButton2->close(TRUE); - RadioButton3->close(TRUE); + mainFrame()->GroupConstructors->setTitle(aTitle); + mainFrame()->RadioButton1->setIcon(image0); + mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton2->close(); + mainFrame()->RadioButton3->setAttribute(Qt::WA_DeleteOnClose); + mainFrame()->RadioButton3->close(); + + myGroup = new DlgRef_2Sel2Spin3Check(centralWidget()); - myGroup = new DlgRef_2Sel_QTD(this, "GroupCommon"); myGroup->GroupBox1->setTitle(tr("GEOM_ARGUMENTS")); - if ( myOperation != BooleanGUI::CUT ) - { - myGroup->TextLabel1->setText(tr("GEOM_OBJECT_I").arg("1")); - myGroup->TextLabel2->setText(tr("GEOM_OBJECT_I").arg("2")); + if (myOperation == BooleanGUI::CUT) { + myGroup->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); + myGroup->TextLabel2->setText(tr("GEOM_TOOL_OBJECTS")); } - else - { - myGroup->TextLabel1->setText(tr("GEOM_MAIN_OBJECT")); - myGroup->TextLabel2->setText(tr("GEOM_TOOL_OBJECT")); + else if (myOperation == BooleanGUI::SECTION) { + myGroup->TextLabel1->setText(tr("GEOM_OBJECT_I").arg(1)); + myGroup->TextLabel2->setText(tr("GEOM_OBJECT_I").arg(2)); + } else { // Fuse or Common + myGroup->TextLabel1->setText(tr( "GEOM_SELECTED_OBJECTS" )); + myGroup->TextLabel2->hide(); + myGroup->PushButton2->hide(); + myGroup->LineEdit2->hide(); + + if (myOperation == BooleanGUI::FUSE) { + myGroup->CheckBox2->setText(tr("GEOM_BOOL_REMOVE_EXTRA_EDGES")); + } + } + + myGroup->PushButton1->setIcon(image1); + myGroup->LineEdit1->setReadOnly(true); + + if (myOperation != BooleanGUI::FUSE) { + myGroup->CheckBox2->hide(); + + if (myOperation != BooleanGUI::COMMON) { + myGroup->PushButton2->setIcon(image1); + myGroup->LineEdit2->setReadOnly(true); + } } - - myGroup->PushButton1->setPixmap(image1); - myGroup->PushButton2->setPixmap(image1); - myGroup->LineEdit1->setReadOnly( true ); - myGroup->LineEdit2->setReadOnly( true ); - Layout1->addWidget(myGroup, 2, 0); + myGroup->TextLabel3->hide(); + myGroup->TextLabel4->hide(); + myGroup->SpinBox_DX->hide(); + myGroup->SpinBox_DY->hide(); + myGroup->CheckBox3->hide(); + myGroup->CheckBox1->setText(tr("GEOM_CHECK_SELF_INTERSECTIONS")); + + QVBoxLayout* layout = new QVBoxLayout(centralWidget()); + layout->setMargin(0); layout->setSpacing(6); + layout->addWidget(myGroup); /***************************************************************/ - /* Initialisation */ +#ifdef NO_PREVIEW + mainFrame()->CheckBoxPreview->setChecked( false ); + mainFrame()->CheckBoxPreview->hide(); +#endif + // Initialisation Init(); } - //================================================================================= // function : ~BooleanGUI_Dialog() // purpose : Destroys the object and frees any allocated resources @@ -118,35 +154,55 @@ BooleanGUI_Dialog::~BooleanGUI_Dialog() { } - - //================================================================================= // function : Init() // purpose : //================================================================================= void BooleanGUI_Dialog::Init() { - /* init variables */ + mainFrame()->GroupBoxPublish->show(); + + // init variables myEditCurrentArgument = myGroup->LineEdit1; - /* signals and slots connections */ - connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk())); - connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply())); + myGroup->LineEdit1->setText(""); + myGroup->LineEdit2->setText(""); + myGroup->CheckBox1->setChecked(true); - connect(myGroup->LineEdit1, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); - connect(myGroup->LineEdit2, SIGNAL(returnPressed()), this, SLOT(LineEditReturnPressed())); + if (myOperation == BooleanGUI::FUSE) { + myGroup->CheckBox2->setChecked(true); + } + + myObject1.nullify(); + reset(); + + // signals and slots connections + connect(buttonOk(), SIGNAL(clicked()), this, SLOT(ClickOnOk())); + connect(buttonApply(), SIGNAL(clicked()), this, SLOT(ClickOnApply())); connect(myGroup->PushButton1, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(myGroup->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; + if (!myGroup->PushButton2->isHidden()) { + connect(myGroup->PushButton2, SIGNAL(clicked()), this, SLOT(SetEditCurrentArgument())); + } - initName( GroupConstructors->title() ); + connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), + SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); - globalSelection( GEOM_ALLSHAPES ); -} + initName(mainFrame()->GroupConstructors->title()); + + setTabOrder(mainFrame()->GroupConstructors, mainFrame()->GroupBoxName); + setTabOrder(mainFrame()->GroupBoxName, mainFrame()->GroupMedium); + setTabOrder(mainFrame()->GroupMedium, mainFrame()->GroupButtons); + + mainFrame()->RadioButton1->setFocus(); + + globalSelection(GEOM_ALLSHAPES); + myGroup->PushButton1->click(); + SelectionIntoArgument(); + resize(100,100); +} //================================================================================= // function : ClickOnOk() @@ -154,51 +210,121 @@ void BooleanGUI_Dialog::Init() //================================================================================= void BooleanGUI_Dialog::ClickOnOk() { - if ( ClickOnApply() ) + setIsApplyAndClose( true ); + if (ClickOnApply()) ClickOnCancel(); } - //================================================================================= // function : ClickOnApply() // purpose : //================================================================================= bool BooleanGUI_Dialog::ClickOnApply() { - if ( !onAccept() ) - return false; + if (!onAccept()) + return false; initName(); + // activate selection and connect selection manager + myGroup->PushButton1->click(); return true; } +//================================================================================= +// function : reset() +// purpose : +//================================================================================= +void BooleanGUI_Dialog::reset() +{ + myObjects = new GEOM::ListOfGO; + myObjects->length( 0 ); +} //================================================================================= -// function : SelectionIntoArgument() -// purpose : Called when selection has changed +// function : singleSelection +// purpose : Performs single selection. Called from SelectionIntoArgument() //================================================================================= -void BooleanGUI_Dialog::SelectionIntoArgument() +void BooleanGUI_Dialog::singleSelection() { - myEditCurrentArgument->setText( "" ); + myEditCurrentArgument->setText(""); + + GEOM::GeomObjPtr aSelectedObject = getSelected( TopAbs_SHAPE ); + TopoDS_Shape aShape; + if ( aSelectedObject && GEOMBase::GetShape( aSelectedObject.get(), aShape ) && !aShape.IsNull() ) { + QString aName = GEOMBase::GetName( aSelectedObject.get() ); + myEditCurrentArgument->setText( aName ); + + // clear selection + disconnect(myGeomGUI->getApp()->selectionMgr(), 0, this, 0); + myGeomGUI->getApp()->selectionMgr()->clearSelected(); + connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), + this, SLOT(SelectionIntoArgument())); + + if (myEditCurrentArgument == myGroup->LineEdit1) { + myObject1 = aSelectedObject; + if (!myGroup->PushButton2->isHidden() && !myObjects->length()) + myGroup->PushButton2->click(); + } + else if (myEditCurrentArgument == myGroup->LineEdit2) { + myObjects->length(1); + myObjects[0] = aSelectedObject.get(); + if (!myObject1) + myGroup->PushButton1->click(); + } + } + else { + if (myEditCurrentArgument == myGroup->LineEdit1) myObject1.nullify(); + else if (myEditCurrentArgument == myGroup->LineEdit2) reset(); + } +} - if ( IObjectCount() != 1 ) - { - if ( myEditCurrentArgument == myGroup->LineEdit1 ) myObject1 = GEOM::GEOM_Object::_nil(); - else if ( myEditCurrentArgument == myGroup->LineEdit2 ) myObject2 = GEOM::GEOM_Object::_nil(); - return; +//================================================================================= +// function : multipleSelection +// purpose : Performs multiple selection. Called from SelectionIntoArgument() +//================================================================================= +void BooleanGUI_Dialog::multipleSelection() +{ + myEditCurrentArgument->setText( "" ); + reset(); + + LightApp_SelectionMgr* aSelMgr = myGeomGUI->getApp()->selectionMgr(); + SALOME_ListIO aSelList; + aSelMgr->selectedObjects(aSelList); + myObjects->length(aSelList.Extent()); + + int i = 0; + for (SALOME_ListIteratorOfListIO anIt (aSelList); anIt.More(); anIt.Next()) { + GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( anIt.Value() ); + + if ( !CORBA::is_nil( aSelectedObject ) ) { + myObjects[i++] = aSelectedObject; + } } - // nbSel == 1 - Standard_Boolean aRes = Standard_False; - GEOM::GEOM_Object_var aSelectedObject = GEOMBase::ConvertIOinGEOMObject( firstIObject(), aRes ); - if ( !CORBA::is_nil( aSelectedObject ) && aRes && GEOMBase::IsShape( aSelectedObject ) ) - { - myEditCurrentArgument->setText( GEOMBase::GetName( aSelectedObject ) ); - if ( myEditCurrentArgument == myGroup->LineEdit1 ) myObject1 = aSelectedObject; - else if ( myEditCurrentArgument == myGroup->LineEdit2 ) myObject2 = aSelectedObject; + myObjects->length( i ); + if ( i == 1 ) { + myEditCurrentArgument->setText( GEOMBase::GetName( myObjects[0] ) ); + } else if ( i > 0 ) { + myEditCurrentArgument->setText( QString::number( i ) + "_" + tr( "GEOM_OBJECTS" ) ); } } +//================================================================================= +// function : SelectionIntoArgument() +// purpose : Called when selection is changed or on dialog initialization or activation +//================================================================================= +void BooleanGUI_Dialog::SelectionIntoArgument() +{ + if ( myOperation == BooleanGUI::SECTION || + (myOperation == BooleanGUI::CUT && + myEditCurrentArgument == myGroup->LineEdit1)) { + singleSelection(); + } else { + multipleSelection(); + } + + processPreview(); +} //================================================================================= // function : SetEditCurrentArgument() @@ -208,29 +334,27 @@ void BooleanGUI_Dialog::SetEditCurrentArgument() { QPushButton* send = (QPushButton*)sender(); - if ( send == myGroup->PushButton1 ) myEditCurrentArgument = myGroup->LineEdit1; - else if ( send == myGroup->PushButton2 ) myEditCurrentArgument = myGroup->LineEdit2; - - myEditCurrentArgument->setFocus(); - SelectionIntoArgument(); -} - + if (send == myGroup->PushButton1) { + myEditCurrentArgument = myGroup->LineEdit1; + if (!myGroup->PushButton2->isHidden()) { + myGroup->PushButton2->setDown(false); + myGroup->LineEdit2->setEnabled(false); + } + } + else if (send == myGroup->PushButton2) { + myEditCurrentArgument = myGroup->LineEdit2; -//================================================================================= -// function : LineEditReturnPressed() -// purpose : -//================================================================================= -void BooleanGUI_Dialog::LineEditReturnPressed() -{ - QLineEdit* send = (QLineEdit*)sender(); - if ( send == myGroup->LineEdit1 || send == myGroup->LineEdit2 ) - { - myEditCurrentArgument = send; - GEOMBase_Skeleton::LineEditReturnPressed(); + myGroup->PushButton1->setDown(false); + myGroup->LineEdit1->setEnabled(false); } -} + // enable line edit + myEditCurrentArgument->setEnabled(true); + myEditCurrentArgument->setFocus(); + // after setFocus(), because it will be setDown(false) when loses focus + send->setDown(true); +} //================================================================================= // function : ActivateThisDialog() @@ -239,19 +363,19 @@ void BooleanGUI_Dialog::LineEditReturnPressed() void BooleanGUI_Dialog::ActivateThisDialog() { GEOMBase_Skeleton::ActivateThisDialog(); - globalSelection( GEOM_ALLSHAPES ); - connect(((SalomeApp_Application*)(SUIT_Session::session()->activeApplication()))->selectionMgr(), - SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())) ; -} + connect( myGeomGUI->getApp()->selectionMgr(), SIGNAL( currentSelectionChanged() ), + this, SLOT( SelectionIntoArgument() ) ); + processPreview(); +} //================================================================================= // function : enterEvent() // purpose : when mouse enter onto the QWidget //================================================================================= -void BooleanGUI_Dialog::enterEvent(QEvent * e) +void BooleanGUI_Dialog::enterEvent (QEvent*) { - if ( !GroupConstructors->isEnabled() ) + if (!mainFrame()->GroupConstructors->isEnabled()) ActivateThisDialog(); } @@ -261,29 +385,88 @@ void BooleanGUI_Dialog::enterEvent(QEvent * e) //================================================================================= GEOM::GEOM_IOperations_ptr BooleanGUI_Dialog::createOperation() { - return getGeomEngine()->GetIBooleanOperations( getStudyId() ); + return getGeomEngine()->GetIBooleanOperations(getStudyId()); } //================================================================================= // function : isValid // purpose : //================================================================================= -bool BooleanGUI_Dialog::isValid( QString& msg ) +bool BooleanGUI_Dialog::isValid (QString&) { - return !CORBA::is_nil( myObject1 ) && !CORBA::is_nil( myObject2 ); + bool isOK = false; + + switch (myOperation) { + case BooleanGUI::FUSE: + case BooleanGUI::COMMON: + isOK = myObjects->length() > 1; + break; + case BooleanGUI::CUT: + isOK = myObject1 && myObjects->length(); + break; + case BooleanGUI::SECTION: + isOK = myObject1 && (myObjects->length() == 1); + break; + default: + break; + } + + return isOK; } //================================================================================= // function : execute // purpose : //================================================================================= -bool BooleanGUI_Dialog::execute( ObjectList& objects ) +bool BooleanGUI_Dialog::execute (ObjectList& objects) { GEOM::GEOM_Object_var anObj; - - anObj = GEOM::GEOM_IBooleanOperations::_narrow( getOperation() )->MakeBoolean( myObject1, myObject2, myOperation ); - if ( !anObj->_is_nil() ) - objects.push_back( anObj._retn() ); + + GEOM::GEOM_IBooleanOperations_var anOper = GEOM::GEOM_IBooleanOperations::_narrow(getOperation()); + const bool isCheckSelfInte = myGroup->CheckBox1->isChecked(); + + switch (myOperation) { + case BooleanGUI::FUSE: + { + const bool isRmExtraEdges = myGroup->CheckBox2->isChecked(); + + anObj = anOper->MakeFuseList + (myObjects, isCheckSelfInte, isRmExtraEdges); + } + break; + case BooleanGUI::COMMON: + anObj = anOper->MakeCommonList(myObjects, isCheckSelfInte); + break; + case BooleanGUI::CUT: + anObj = + anOper->MakeCutList(myObject1.get(), myObjects, isCheckSelfInte); + break; + case BooleanGUI::SECTION: + anObj = anOper->MakeBoolean + (myObject1.get(), myObjects[0], myOperation, isCheckSelfInte); + break; + default: + break; + } + + if (!anObj->_is_nil()) + objects.push_back(anObj._retn()); return true; } + +//================================================================================= +// function : restoreSubShapes +// purpose : +//================================================================================= +void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::Study_ptr theStudy, + SALOMEDS::SObject_ptr theSObject) +{ + if (mainFrame()->CheckBoxRestoreSS->isChecked()) { + // empty list of arguments means that all arguments should be restored + getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(), + /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame + /*theInheritFirstArg=*/myOperation == BooleanGUI::CUT, + mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false + } +}