-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// 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.
+// 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.
+// 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
+// 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
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_RenumberingDlg.cxx
// Author : Michael ZORIN, Open CASCADE S.A.S.
setModal(false);
setAttribute(Qt::WA_DeleteOnClose, true);
setWindowTitle(unit == 0 ?
- tr("SMESH_RENUMBERING_NODES_TITLE") :
- tr("SMESH_RENUMBERING_ELEMENTS_TITLE"));
+ tr("SMESH_RENUMBERING_NODES_TITLE") :
+ tr("SMESH_RENUMBERING_ELEMENTS_TITLE"));
setSizeGripEnabled(true);
SUIT_ResourceMgr* resMgr = SMESH::GetResourceMgr( mySMESHGUI );
QPixmap image0(resMgr->loadPixmap("SMESH", unit == 0 ?
- tr("ICON_DLG_RENUMBERING_NODES") :
- tr("ICON_DLG_RENUMBERING_ELEMENTS")));
+ tr("ICON_DLG_RENUMBERING_NODES") :
+ tr("ICON_DLG_RENUMBERING_ELEMENTS")));
QPixmap image1(resMgr->loadPixmap("SMESH",tr("ICON_SELECT")));
QVBoxLayout* SMESHGUI_RenumberingDlgLayout = new QVBoxLayout(this);
/***************************************************************/
GroupConstructors = new QGroupBox(unit == 0 ?
- tr("SMESH_NODES") :
- tr("SMESH_ELEMENTS"),
- this);
+ tr("SMESH_NODES") :
+ tr("SMESH_ELEMENTS"),
+ this);
myHelpFileName = unit == 0 ?
"renumbering_nodes_and_elements_page.html#renumbering_nodes_anchor" :
"renumbering_nodes_and_elements_page.html#renumbering_elements_anchor";
myMesh = SMESH::SMESH_Mesh::_nil();
- myMeshFilter = new SMESH_TypeFilter (MESH);
+ myMeshFilter = new SMESH_TypeFilter (SMESH::MESH);
/* signals and slots connections */
connect(buttonOk, SIGNAL(clicked()), this, SLOT(ClickOnOk()));
- connect(buttonCancel, SIGNAL(clicked()), this, SLOT(ClickOnCancel()));
+ connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonApply, SIGNAL(clicked()), this, SLOT(ClickOnApply()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(ClickOnHelp()));
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
- connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
+ connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(reject()));
myEditCurrentArgument = LineEditMesh;
LineEditMesh->setFocus();
bool isUnitsLabeled = false;
if (myUnit == 0 && anActor) {
- isUnitsLabeled = anActor->GetPointsLabeled();
- if (isUnitsLabeled) anActor->SetPointsLabeled(false);
+ isUnitsLabeled = anActor->GetPointsLabeled();
+ if (isUnitsLabeled) anActor->SetPointsLabeled(false);
}
else if (myUnit == 1 && anActor) {
- isUnitsLabeled = anActor->GetCellsLabeled();
- if (isUnitsLabeled) anActor->SetCellsLabeled(false);
+ isUnitsLabeled = anActor->GetCellsLabeled();
+ if (isUnitsLabeled) anActor->SetCellsLabeled(false);
}
SUIT_OverrideCursor aWaitCursor;
if (myUnit == 0) {
- aMeshEditor->RenumberNodes();
- if (isUnitsLabeled && anActor) anActor->SetPointsLabeled(true);
+ aMeshEditor->RenumberNodes();
+ if (isUnitsLabeled && anActor) anActor->SetPointsLabeled(true);
}
else if (myUnit == 1) {
- aMeshEditor->RenumberElements();
- if (isUnitsLabeled && anActor) anActor->SetCellsLabeled(true);
+ aMeshEditor->RenumberElements();
+ if (isUnitsLabeled && anActor) anActor->SetCellsLabeled(true);
}
}
catch(...) {
//mySelectionMgr->clearSelected();
SMESH::UpdateView();
+ SMESHGUI::Modified();
}
}
void SMESHGUI_RenumberingDlg::ClickOnOk()
{
ClickOnApply();
- ClickOnCancel();
+ reject();
}
//=================================================================================
-// function : ClickOnCancel()
+// function : reject()
// purpose :
//=================================================================================
-void SMESHGUI_RenumberingDlg::ClickOnCancel()
+void SMESHGUI_RenumberingDlg::reject()
{
//mySelectionMgr->clearSelected();
mySelectionMgr->clearFilters();
disconnect(mySelectionMgr, 0, this, 0);
mySMESHGUI->ResetState();
- reject();
+ QDialog::reject();
}
//=================================================================================
platform = "application";
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
- tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
- arg(app->resourceMgr()->stringValue("ExternalBrowser",
- platform)).
- arg(myHelpFileName));
+ tr("EXTERNAL_BROWSER_CANNOT_SHOW_PAGE").
+ arg(app->resourceMgr()->stringValue("ExternalBrowser",
+ platform)).
+ arg(myHelpFileName));
}
}
Handle(SALOME_InteractiveObject) IO = aList.First();
myMesh = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(IO);
if (myMesh->_is_nil())
- aString = "";
+ aString = "";
}
}
{
case 0: /* default constructor */
{
- if(send == SelectButton) {
- LineEditMesh->setFocus();
- myEditCurrentArgument = LineEditMesh;
- }
- SelectionIntoArgument();
- break;
+ if(send == SelectButton) {
+ LineEditMesh->setFocus();
+ myEditCurrentArgument = LineEditMesh;
+ }
+ SelectionIntoArgument();
+ break;
}
}
}
ActivateThisDialog();
}
-//=================================================================================
-// function : closeEvent()
-// purpose :
-//=================================================================================
-void SMESHGUI_RenumberingDlg::closeEvent(QCloseEvent* e)
-{
- /* same than click on cancel button */
- ClickOnCancel();
-}
-
-//=======================================================================
-//function : hideEvent
-//purpose : caused by ESC key
-//=======================================================================
-void SMESHGUI_RenumberingDlg::hideEvent (QHideEvent * e)
-{
- if (!isMinimized())
- ClickOnCancel();
-}
-
//=================================================================================
// function : keyPressEvent()
// purpose :