mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-29 04:20:32 +05:00
PAL19566, PAL19567, PAL19571, PAL19572
This commit is contained in:
parent
e9fc10eaaa
commit
b3a56b6ba9
@ -225,8 +225,8 @@ QWidget* SMESHGUI_FilterLibraryDlg::createMainFrame (QWidget* theParent)
|
|||||||
connect(myFileName, SIGNAL(returnPressed()), this, SLOT(onReturnPressed()));
|
connect(myFileName, SIGNAL(returnPressed()), this, SLOT(onReturnPressed()));
|
||||||
connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
|
connect(myOpenBtn, SIGNAL(clicked()), this, SLOT(onBrowse()));
|
||||||
|
|
||||||
connect(myListBox, SIGNAL(currentTextChanged(const QString&)),
|
connect(myListBox, SIGNAL( currentItemChanged( QListWidgetItem*, QListWidgetItem* ) ),
|
||||||
this, SLOT(onFilterChanged(const QString&)));
|
this, SLOT( onFilterChanged( QListWidgetItem*, QListWidgetItem* ) ) );
|
||||||
|
|
||||||
connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
|
connect(myAddBtn, SIGNAL(clicked()), this, SLOT(onAddBtnPressed()));
|
||||||
connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
|
connect(myDeleteBtn, SIGNAL(clicked()), this, SLOT(onDeleteBtnPressed()));
|
||||||
@ -647,7 +647,8 @@ void SMESHGUI_FilterLibraryDlg::onBrowse()
|
|||||||
|
|
||||||
setFileName(fName);
|
setFileName(fName);
|
||||||
|
|
||||||
QString aName = myListBox->item(myListBox->count() - 1)->text();
|
QListWidgetItem* item = myListBox->item( myListBox->count()-1 );
|
||||||
|
QString aName = item ? item->text() : QString::null;
|
||||||
processNewLibrary();
|
processNewLibrary();
|
||||||
|
|
||||||
if (myMode == ADD_TO)
|
if (myMode == ADD_TO)
|
||||||
@ -812,8 +813,9 @@ bool SMESHGUI_FilterLibraryDlg::isValid(const bool theMess) const
|
|||||||
// name : SMESHGUI_FilterLibraryDlg::onFilterChanged
|
// name : SMESHGUI_FilterLibraryDlg::onFilterChanged
|
||||||
// Purpose : SLOT. Called when selected filter of library changed
|
// Purpose : SLOT. Called when selected filter of library changed
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_FilterLibraryDlg::onFilterChanged(const QString& theName)
|
void SMESHGUI_FilterLibraryDlg::onFilterChanged( QListWidgetItem* item, QListWidgetItem* )
|
||||||
{
|
{
|
||||||
|
QString theName = item->text();
|
||||||
if (myLibrary->_is_nil())
|
if (myLibrary->_is_nil())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -847,7 +849,7 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged(const QString& theName)
|
|||||||
|
|
||||||
myTable->Clear(myTable->GetType());
|
myTable->Clear(myTable->GetType());
|
||||||
|
|
||||||
if (!aFilter->GetCriteria(aCriteria))
|
if (CORBA::is_nil( aFilter ) || !aFilter->GetCriteria(aCriteria))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (int i = 0, n = aCriteria->length(); i < n; i++)
|
for (int i = 0, n = aCriteria->length(); i < n; i++)
|
||||||
@ -863,7 +865,8 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged(const QString& theName)
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void SMESHGUI_FilterLibraryDlg::onReturnPressed()
|
void SMESHGUI_FilterLibraryDlg::onReturnPressed()
|
||||||
{
|
{
|
||||||
QString aName = myListBox->item(myListBox->count() - 1)->text();
|
QListWidgetItem* item = myListBox->item( myListBox->count()-1 );
|
||||||
|
QString aName = item ? item->text() : QString::null;
|
||||||
|
|
||||||
processNewLibrary();
|
processNewLibrary();
|
||||||
|
|
||||||
@ -933,10 +936,11 @@ void SMESHGUI_FilterLibraryDlg::onAddBtnPressed()
|
|||||||
{
|
{
|
||||||
if (!isValid(true))
|
if (!isValid(true))
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
{
|
||||||
SMESH::Filter_var aFilter = createFilter();
|
SMESH::Filter_var aFilter = createFilter();
|
||||||
myLibrary->Replace(myCurrFilterName.toLatin1().data(),
|
myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
|
||||||
myName->text().toLatin1().data(),
|
myName->text().toLatin1().constData(),
|
||||||
aFilter);
|
aFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include CORBA_SERVER_HEADER(SMESH_Filter)
|
#include CORBA_SERVER_HEADER(SMESH_Filter)
|
||||||
|
|
||||||
class QListWidget;
|
class QListWidget;
|
||||||
|
class QListWidgetItem;
|
||||||
class QLineEdit;
|
class QLineEdit;
|
||||||
class QPushButton;
|
class QPushButton;
|
||||||
class SMESHGUI;
|
class SMESHGUI;
|
||||||
@ -89,7 +90,7 @@ private slots:
|
|||||||
|
|
||||||
void onBrowse();
|
void onBrowse();
|
||||||
void onReturnPressed();
|
void onReturnPressed();
|
||||||
void onFilterChanged( const QString& );
|
void onFilterChanged( QListWidgetItem*, QListWidgetItem* );
|
||||||
void onAddBtnPressed();
|
void onAddBtnPressed();
|
||||||
void onDeleteBtnPressed();
|
void onDeleteBtnPressed();
|
||||||
void onFilterNameChanged( const QString& );
|
void onFilterNameChanged( const QString& );
|
||||||
|
Loading…
Reference in New Issue
Block a user