mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-06 23:00:34 +05:00
0021557: EDF 2161 SMESH: Duplicate elements and nodes
- QCheckBox* myCheckBoxNewGroup; + QCheckBox* myCheckBoxNewElemGroup; + QCheckBox* myCheckBoxNewNodeGroup;
This commit is contained in:
parent
6e0065e286
commit
de9006cf44
@ -155,7 +155,8 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
|
|||||||
myLineEdit3 = new QLineEdit(myGroupArguments);
|
myLineEdit3 = new QLineEdit(myGroupArguments);
|
||||||
myLineEdit3->setReadOnly(true);
|
myLineEdit3->setReadOnly(true);
|
||||||
|
|
||||||
myCheckBoxNewGroup = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_NODES"), myGroupArguments);
|
myCheckBoxNewElemGroup = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_ELEMENTS"), myGroupArguments);
|
||||||
|
myCheckBoxNewNodeGroup = new QCheckBox(tr("CONSTRUCT_NEW_GROUP_NODES"), myGroupArguments);
|
||||||
|
|
||||||
aGroupArgumentsLayout->addWidget(myTextLabel1, 0, 0);
|
aGroupArgumentsLayout->addWidget(myTextLabel1, 0, 0);
|
||||||
aGroupArgumentsLayout->addWidget(mySelectButton1, 0, 1);
|
aGroupArgumentsLayout->addWidget(mySelectButton1, 0, 1);
|
||||||
@ -166,8 +167,9 @@ SMESHGUI_DuplicateNodesDlg::SMESHGUI_DuplicateNodesDlg( SMESHGUI* theModule )
|
|||||||
aGroupArgumentsLayout->addWidget(myTextLabel3, 2, 0);
|
aGroupArgumentsLayout->addWidget(myTextLabel3, 2, 0);
|
||||||
aGroupArgumentsLayout->addWidget(mySelectButton3, 2, 1);
|
aGroupArgumentsLayout->addWidget(mySelectButton3, 2, 1);
|
||||||
aGroupArgumentsLayout->addWidget(myLineEdit3, 2, 2);
|
aGroupArgumentsLayout->addWidget(myLineEdit3, 2, 2);
|
||||||
aGroupArgumentsLayout->addWidget(myCheckBoxNewGroup, 3, 0);
|
aGroupArgumentsLayout->addWidget(myCheckBoxNewElemGroup, 3, 0);
|
||||||
aGroupArgumentsLayout->setRowStretch(4, 1);
|
aGroupArgumentsLayout->addWidget(myCheckBoxNewNodeGroup, 4, 0);
|
||||||
|
aGroupArgumentsLayout->setRowStretch(5, 1);
|
||||||
|
|
||||||
// Buttons
|
// Buttons
|
||||||
QGroupBox* aGroupButtons = new QGroupBox(this);
|
QGroupBox* aGroupButtons = new QGroupBox(this);
|
||||||
@ -235,7 +237,8 @@ SMESHGUI_DuplicateNodesDlg::~SMESHGUI_DuplicateNodesDlg()
|
|||||||
void SMESHGUI_DuplicateNodesDlg::Init()
|
void SMESHGUI_DuplicateNodesDlg::Init()
|
||||||
{
|
{
|
||||||
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
|
||||||
myCheckBoxNewGroup->setChecked(true);
|
myCheckBoxNewElemGroup->setChecked(true);
|
||||||
|
myCheckBoxNewNodeGroup->setChecked(true);
|
||||||
|
|
||||||
// Set initial parameters
|
// Set initial parameters
|
||||||
myBusy = false;
|
myBusy = false;
|
||||||
@ -287,8 +290,8 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
|
|||||||
myTextLabel1->setText(tr("GROUP_NODES_TO_DUPLICATE"));
|
myTextLabel1->setText(tr("GROUP_NODES_TO_DUPLICATE"));
|
||||||
myTextLabel2->setText(tr("GROUP_NODES_TO_REPLACE"));
|
myTextLabel2->setText(tr("GROUP_NODES_TO_REPLACE"));
|
||||||
|
|
||||||
// Set checkbox title
|
myCheckBoxNewElemGroup->hide();
|
||||||
myCheckBoxNewGroup->setText(tr("CONSTRUCT_NEW_GROUP_NODES"));
|
myCheckBoxNewNodeGroup->show();
|
||||||
|
|
||||||
// Hide the third field
|
// Hide the third field
|
||||||
myTextLabel3->hide();
|
myTextLabel3->hide();
|
||||||
@ -305,8 +308,8 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId)
|
|||||||
myTextLabel2->setText(tr("GROUP_NODES_NOT_DUPLICATE"));
|
myTextLabel2->setText(tr("GROUP_NODES_NOT_DUPLICATE"));
|
||||||
myTextLabel3->setText(tr("GROUP_ELEMS_TO_REPLACE"));
|
myTextLabel3->setText(tr("GROUP_ELEMS_TO_REPLACE"));
|
||||||
|
|
||||||
// Set checkbox title
|
myCheckBoxNewElemGroup->show();
|
||||||
myCheckBoxNewGroup->setText(tr("CONSTRUCT_NEW_GROUP_ELEMENTS"));
|
myCheckBoxNewNodeGroup->show();
|
||||||
|
|
||||||
// Show the third field
|
// Show the third field
|
||||||
myTextLabel3->show();
|
myTextLabel3->show();
|
||||||
@ -331,7 +334,8 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
|||||||
|
|
||||||
BusyLocker lock( myBusy );
|
BusyLocker lock( myBusy );
|
||||||
|
|
||||||
bool toCreateGroup = myCheckBoxNewGroup->isChecked();
|
bool toCreateElemGroup = myCheckBoxNewElemGroup->isChecked();
|
||||||
|
bool toCreateNodeGroup = myCheckBoxNewNodeGroup->isChecked();
|
||||||
int operationMode = myGroupConstructors->checkedId();
|
int operationMode = myGroupConstructors->checkedId();
|
||||||
|
|
||||||
// Apply changes
|
// Apply changes
|
||||||
@ -352,7 +356,7 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
|||||||
for ( int i = 0; i < myGroups2.count(); i++ )
|
for ( int i = 0; i < myGroups2.count(); i++ )
|
||||||
g2[i] = myGroups2[i];
|
g2[i] = myGroups2[i];
|
||||||
|
|
||||||
if ( toCreateGroup ) {
|
if ( toCreateNodeGroup ) {
|
||||||
SMESH::SMESH_GroupBase_var aNewGroup =
|
SMESH::SMESH_GroupBase_var aNewGroup =
|
||||||
aMeshEditor->DoubleNodeGroupsNew( g1.in(), g2.in() );
|
aMeshEditor->DoubleNodeGroupsNew( g1.in(), g2.in() );
|
||||||
result = !CORBA::is_nil( aNewGroup );
|
result = !CORBA::is_nil( aNewGroup );
|
||||||
@ -375,10 +379,11 @@ bool SMESHGUI_DuplicateNodesDlg::onApply()
|
|||||||
|
|
||||||
for ( int i = 0; i < myGroups3.count(); i++ )
|
for ( int i = 0; i < myGroups3.count(); i++ )
|
||||||
g3[i] = myGroups3[i];
|
g3[i] = myGroups3[i];
|
||||||
if ( toCreateGroup ) {
|
if ( toCreateElemGroup || toCreateNodeGroup ) {
|
||||||
SMESH::SMESH_GroupBase_ptr aNewGroup =
|
SMESH::ListOfGroups_var aNewGroups =
|
||||||
aMeshEditor->DoubleNodeElemGroupsNew( g1.in(), g2.in(), g3.in() );
|
aMeshEditor->DoubleNodeElemGroups2New( g1.in(), g2.in(), g3.in(),
|
||||||
result = !CORBA::is_nil( aNewGroup );
|
toCreateElemGroup, toCreateNodeGroup );
|
||||||
|
result = ( aNewGroups[ !toCreateElemGroup ].in() );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
result = aMeshEditor->DoubleNodeElemGroups( g1.in(), g2.in(), g3.in() );
|
result = aMeshEditor->DoubleNodeElemGroups( g1.in(), g2.in(), g3.in() );
|
||||||
|
@ -97,7 +97,8 @@ private:
|
|||||||
QLineEdit* myLineEdit1;
|
QLineEdit* myLineEdit1;
|
||||||
QLineEdit* myLineEdit2;
|
QLineEdit* myLineEdit2;
|
||||||
QLineEdit* myLineEdit3;
|
QLineEdit* myLineEdit3;
|
||||||
QCheckBox* myCheckBoxNewGroup;
|
QCheckBox* myCheckBoxNewElemGroup;
|
||||||
|
QCheckBox* myCheckBoxNewNodeGroup;
|
||||||
|
|
||||||
QPushButton* myButtonOk;
|
QPushButton* myButtonOk;
|
||||||
QPushButton* myButtonApply;
|
QPushButton* myButtonApply;
|
||||||
|
Loading…
Reference in New Issue
Block a user