Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from V5_1_4_BR 07/05/2010
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_FilterLibraryDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
index 47c9e912cbe88bbf68f6cbd98438b73ae2d7c450..579a7fe2864d5947b4e39056401c75a0288e5230 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
08
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
10
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
@@
-19,6
+19,7
@@
//
// 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_FilterLibraryDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
// SMESH SMESHGUI : GUI for SMESH component
// File : SMESHGUI_FilterLibraryDlg.cxx
// Author : Sergey LITONIN, Open CASCADE S.A.S.
@@
-226,7
+227,7
@@
QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent)
connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
connect(myListBox, SIGNAL(itemSelectionChanged()),
connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
connect(myListBox, SIGNAL(itemSelectionChanged()),
- this, SLOT(onFilterChanged()));
+
this, SLOT(onFilterChanged()));
connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
@@
-423,7
+424,7
@@
bool SMESHGUI_FilterLibraryDlg::onApply()
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
- tr("LIBRARY_IS_NOT_LOADED"));
+
tr("LIBRARY_IS_NOT_LOADED"));
return false;
}
return false;
}
@@
-437,11
+438,11
@@
bool SMESHGUI_FilterLibraryDlg::onApply()
} else if (myMode == EDIT || myMode == ADD_TO) {
SMESH::Filter_var aFilter = createFilter();
if (!myListBox->selectedItems().empty() &&
} else if (myMode == EDIT || myMode == ADD_TO) {
SMESH::Filter_var aFilter = createFilter();
if (!myListBox->selectedItems().empty() &&
- !myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
- aFilter.in())) {
+
!myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
+
myName->text().toLatin1().constData(),
+
aFilter.in())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
- tr("ERROR_OF_EDITING"));
+
tr("ERROR_OF_EDITING"));
aResult = false;
}
else
aResult = false;
}
else
@@
-457,7
+458,7
@@
bool SMESHGUI_FilterLibraryDlg::onApply()
delete aFileName;
} else if (myMode != COPY_FROM) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
delete aFileName;
} else if (myMode != COPY_FROM) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
- tr("ERROR_OF_SAVING"));
+
tr("ERROR_OF_SAVING"));
} else {
}
} else {
}
@@
-507,10
+508,10
@@
void SMESHGUI_FilterLibraryDlg::onHelp()
platform = "application";
#endif
SUIT_MessageBox::warning(this, tr("WRN_WARNING"),
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));
}
}
}
}
@@
-674,7
+675,7
@@
void SMESHGUI_FilterLibraryDlg::processNewLibrary()
if (myLibrary->_is_nil()) {
if (myMode == COPY_FROM) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
if (myLibrary->_is_nil()) {
if (myMode == COPY_FROM) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
- tr("ERROR_LOAD"));
+
tr("ERROR_LOAD"));
return;
} else {
myLibrary = aFilterMgr->CreateLibrary();
return;
} else {
myLibrary = aFilterMgr->CreateLibrary();
@@
-730,7
+731,7
@@
bool SMESHGUI_FilterLibraryDlg::isNameValid(const bool theMess) const
if (aCurrName.isEmpty()) {
if (theMess)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
if (aCurrName.isEmpty()) {
if (theMess)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
- tr("EMPTY_FILTER_NAME"));
+
tr("EMPTY_FILTER_NAME"));
return false;
}
return false;
}
@@
-739,7
+740,7
@@
bool SMESHGUI_FilterLibraryDlg::isNameValid(const bool theMess) const
if (aNames[ f ] == aCurrName && aNames[ f ] != myCurrFilterName) {
if (theMess)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
if (aNames[ f ] == aCurrName && aNames[ f ] != myCurrFilterName) {
if (theMess)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"),
- tr("ERROR_FILTER_NAME"));
+
tr("ERROR_FILTER_NAME"));
return false;
}
}
return false;
}
}
@@
-787,7
+788,7
@@
bool SMESHGUI_FilterLibraryDlg::isPermissionValid(const bool theIsExistingOnly)
if (!isWritable) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
if (!isWritable) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
- tr("NO_PERMISSION"));
+
tr("NO_PERMISSION"));
return false;
}
return false;
}
@@
-831,8
+832,8
@@
void SMESHGUI_FilterLibraryDlg::onFilterChanged()
SMESH::Filter_var aFilter = createFilter();
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
SMESH::Filter_var aFilter = createFilter();
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
- aFilter);
+
myName->text().toLatin1().constData(),
+
aFilter);
}
// Fill table with filter parameters
}
// Fill table with filter parameters
@@
-938,8
+939,8
@@
void SMESHGUI_FilterLibraryDlg::onAddBtnPressed()
SMESH::Filter_var aFilter = createFilter();
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
SMESH::Filter_var aFilter = createFilter();
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
- aFilter);
+
myName->text().toLatin1().constData(),
+
aFilter);
}
myTable->Clear(myTable->GetType());
}
myTable->Clear(myTable->GetType());
@@
-955,7
+956,7
@@
void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
{
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
{
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
- tr("LIBRARY_IS_NOT_LOADED"));
+
tr("LIBRARY_IS_NOT_LOADED"));
return;
}
return;
}
@@
-979,7
+980,7
@@
void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
if (!aResult) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
if (!aResult) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
- tr("ERROR_OF_ADDING"));
+
tr("ERROR_OF_ADDING"));
}
updateList();
}
updateList();
@@
-989,7
+990,7
@@
void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName)
if (theName != aName)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WARNING"),
if (theName != aName)
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WARNING"),
- tr("ASSIGN_NEW_NAME").arg(theName).arg(aName));
+
tr("ASSIGN_NEW_NAME").arg(theName).arg(aName));
}
//=======================================================================
}
//=======================================================================
@@
-1089,7
+1090,7
@@
void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
{
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
{
if (myLibrary->_is_nil()) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_WRN_WARNING"),
- tr("LIBRARY_IS_NOT_LOADED"));
+
tr("LIBRARY_IS_NOT_LOADED"));
return;
}
return;
}
@@
-1097,7
+1098,7
@@
void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed()
if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toLatin1().constData())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toLatin1().constData())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),
- tr("ERROR_OF_DELETING"));
+
tr("ERROR_OF_DELETING"));
} else {
myCurrFilterName = "";
myCurrFilter = -1;
} else {
myCurrFilterName = "";
myCurrFilter = -1;
@@
-1188,8
+1189,8
@@
void SMESHGUI_FilterLibraryDlg::onNeedValidation()
{
SMESH::Filter_var aFilter = createFilter(myTable->GetType());
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
{
SMESH::Filter_var aFilter = createFilter(myTable->GetType());
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
- myName->text().toLatin1().constData(),
- aFilter);
+
myName->text().toLatin1().constData(),
+
aFilter);
}
}
}
}
}
}