From 14c60ac03b8fa39700c8668e25a930e90a01c1bc Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 21 Mar 2011 15:23:28 +0000 Subject: [PATCH] Merge from BR_WIN_INDUS_514 branch 21/03/2011 (Windows industrialization) --- .../SMESHGUI_CreatePolyhedralVolumeDlg.cxx | 7 ++++--- src/SMESHGUI/SMESHGUI_FilterDlg.cxx | 15 +++++---------- src/SMESHGUI/SMESHGUI_FilterDlg.h | 2 +- src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx | 8 +------- src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h | 2 +- src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx | 12 ++++++------ src/SMESHGUI/SMESH_msg_en.ts | 4 ++-- 7 files changed, 20 insertions(+), 30 deletions(-) diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 7d65ad01d..69f0144e6 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -342,7 +342,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init() connect(SelectElementsButton, SIGNAL( clicked() ), SLOT( SetEditCurrentArgument() ) ); connect(LineEditElements, SIGNAL( textChanged(const QString&) ), SLOT(onTextChange(const QString&))); - connect(myFacesByNodes, SIGNAL(selectionChanged()), this, SLOT(onListSelectionChanged())); + connect(myFacesByNodes, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged())); connect(AddButton, SIGNAL(clicked()), this, SLOT(onAdd())); connect(RemoveButton, SIGNAL(clicked()), this, SLOT(onRemove())); @@ -577,6 +577,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply() SMESHGUI::Modified(); } + myFacesByNodes->clear(); } //================================================================================= @@ -1089,8 +1090,8 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onAdd() myNbOkElements = 1; myEditCurrentArgument->clear(); AddButton->setEnabled(false); - buttonOk->setEnabled( true ); - if(myFacesByNodes->count()>1) buttonApply->setEnabled( true ); + buttonApply->setEnabled( myFacesByNodes->count() > 1 ); + buttonOk->setEnabled( myFacesByNodes->count() > 1 ); } busy = false; onListSelectionChanged(); diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 1a495c71d..c12c7ae5f 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -1547,6 +1547,7 @@ void SMESHGUI_FilterTable::onCriterionChanged (const int row, const int col, con if (aCompareItem->count() > 0) aCompareItem->clear(); aTable->setEditable(false, row, 1); + aTable->item(row, 2)->setText( QString("") ); aTable->setEditable(aCriterionType == SMESH::FT_GroupColor || aCriterionType == SMESH::FT_ElemGeomType || aCriterionType == SMESH::FT_CoplanarFaces, row, 2); @@ -2332,19 +2333,15 @@ QWidget* SMESHGUI_FilterDlg::createSourceGroup (QWidget* theParent) //======================================================================= void SMESHGUI_FilterDlg::updateMainButtons() { + myButtons[ BTN_Close ]->show(); if (myTypes.count() == 1) { - myButtons[ BTN_Cancel ]->show(); myButtons[ BTN_Apply ]->hide(); - myButtons[ BTN_Close ]->hide(); } else { - myButtons[ BTN_Cancel ]->hide(); myButtons[ BTN_Apply ]->show(); - myButtons[ BTN_Close ]->show(); } - // updateGeometry(); } @@ -2361,7 +2358,6 @@ QWidget* SMESHGUI_FilterDlg::createButtonFrame (QWidget* theParent) myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp); myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp); - myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp); myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp); myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp); @@ -2370,12 +2366,10 @@ QWidget* SMESHGUI_FilterDlg::createButtonFrame (QWidget* theParent) aLay->addWidget(myButtons[ BTN_Apply ]); aLay->addSpacing(10); aLay->addStretch(); - aLay->addWidget(myButtons[ BTN_Cancel ]); aLay->addWidget(myButtons[ BTN_Close ]); aLay->addWidget(myButtons[ BTN_Help ]); connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk())); - connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply())); connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp())); @@ -3196,9 +3190,10 @@ void SMESHGUI_FilterDlg::updateSelection() mySelectionMgr->clearFilters(); int aRow, aCol; - + + bool isCurrentCell = myTable->CurrentCell(aRow, aCol); int aCriterionType = myTable->GetCriterionType(aRow); - if (myTable->CurrentCell(aRow, aCol) && + if ( isCurrentCell && (aCriterionType == SMESH::FT_BelongToGeom || aCriterionType == SMESH::FT_BelongToPlane || aCriterionType == SMESH::FT_BelongToCylinder || diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index 17f0622fa..be2bfc6c6 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -213,7 +213,7 @@ class SMESHGUI_FilterDlg : public QDialog enum { Mesh, Selection, Dialog, None }; // Buttons - enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help }; + enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help }; public: SMESHGUI_FilterDlg( SMESHGUI*, const QList& ); diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 579a7fe28..b0216a787 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -257,7 +257,6 @@ QWidget* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent) myButtons[ BTN_OK ] = new QPushButton(tr("SMESH_BUT_APPLY_AND_CLOSE"), aGrp); myButtons[ BTN_Apply ] = new QPushButton(tr("SMESH_BUT_APPLY"), aGrp); - myButtons[ BTN_Cancel ] = new QPushButton(tr("SMESH_BUT_CANCEL"), aGrp); myButtons[ BTN_Close ] = new QPushButton(tr("SMESH_BUT_CLOSE"), aGrp); myButtons[ BTN_Help ] = new QPushButton(tr("SMESH_BUT_HELP"), aGrp); @@ -266,12 +265,10 @@ QWidget* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent) aLay->addWidget(myButtons[ BTN_Apply ]); aLay->addSpacing(10); aLay->addStretch(); - aLay->addWidget(myButtons[ BTN_Cancel ]); aLay->addWidget(myButtons[ BTN_Close ]); aLay->addWidget(myButtons[ BTN_Help ]); connect(myButtons[ BTN_OK ], SIGNAL(clicked()), SLOT(onOk())); - connect(myButtons[ BTN_Cancel ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Close ], SIGNAL(clicked()), SLOT(onClose())); connect(myButtons[ BTN_Apply ], SIGNAL(clicked()), SLOT(onApply())); connect(myButtons[ BTN_Help ], SIGNAL(clicked()), SLOT(onHelp())); @@ -291,14 +288,11 @@ QWidget* SMESHGUI_FilterLibraryDlg::createButtonFrame (QWidget* theParent) //======================================================================= void SMESHGUI_FilterLibraryDlg::updateMainButtons() { + myButtons[ BTN_Close ]->show(); if (myTypes.count() == 1) { - myButtons[ BTN_Cancel ]->show(); myButtons[ BTN_Apply ]->hide(); - myButtons[ BTN_Close ]->hide(); } else { - myButtons[ BTN_Cancel ]->hide(); myButtons[ BTN_Apply ]->show(); - myButtons[ BTN_Close ]->show(); } } diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h index 294a37df2..05dad3558 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h @@ -56,7 +56,7 @@ class SMESHGUI_EXPORT SMESHGUI_FilterLibraryDlg : public QDialog Q_OBJECT // Buttons - enum { BTN_OK, BTN_Cancel, BTN_Apply, BTN_Close, BTN_Help }; + enum { BTN_OK, BTN_Apply, BTN_Close, BTN_Help }; class Dialog; diff --git a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx index 68a13a4fc..381e2d211 100644 --- a/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx @@ -87,7 +87,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) GroupC1Layout->setMargin( MARGIN ); TextLabelTransparent = new QLabel( tr( "SMESH_TRANSPARENCY_TRANSPARENT" ), GroupC1 ); - TextLabelTransparent->setAlignment( Qt::AlignLeft ); + TextLabelTransparent->setAlignment( Qt::AlignRight ); ValueLab = new QLabel( GroupC1 ); ValueLab->setAlignment( Qt::AlignCenter ); @@ -95,7 +95,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) QFont fnt = ValueLab->font(); fnt.setBold( true ); ValueLab->setFont( fnt ); TextLabelOpaque = new QLabel( tr( "SMESH_TRANSPARENCY_OPAQUE" ), GroupC1 ); - TextLabelOpaque->setAlignment( Qt::AlignRight ); + TextLabelOpaque->setAlignment( Qt::AlignLeft ); Slider1 = new QSlider( Qt::Horizontal, GroupC1 ); Slider1->setRange( 0, 100 ); @@ -107,9 +107,9 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule ) Slider1->setFocusPolicy( Qt::NoFocus ); Slider1->setMinimumWidth( 300 ); - GroupC1Layout->addWidget( TextLabelTransparent, 0, 0 ); + GroupC1Layout->addWidget( TextLabelOpaque, 0, 0 ); GroupC1Layout->addWidget( ValueLab, 0, 1 ); - GroupC1Layout->addWidget( TextLabelOpaque, 0, 2 ); + GroupC1Layout->addWidget( TextLabelTransparent, 0, 2 ); GroupC1Layout->addWidget( Slider1, 1, 0, 1, 3 ); /*************************************************************************/ @@ -198,7 +198,7 @@ void SMESHGUI_TransparencyDlg::SetTransparency() { if ( myViewWindow ) { SUIT_OverrideCursor wc; - float opacity = Slider1->value() / 100.; + float opacity = ( 100 - Slider1->value() ) / 100.; SALOME_ListIO aList; mySelectionMgr->selectedObjects( aList ); @@ -267,7 +267,7 @@ void SMESHGUI_TransparencyDlg::onSelectionChanged() } else { } - Slider1->setValue( opacity ); + Slider1->setValue( 100 - opacity ); } ValueHasChanged(); } diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 3dcdc8ae9..c5ebf227c 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -2113,7 +2113,7 @@ Check algorithm documentation for supported geometry SMESH_TRANSPARENCY_OPAQUE - ---> Opaque + Opaque SMESH_TRANSPARENCY_TITLE @@ -2121,7 +2121,7 @@ Check algorithm documentation for supported geometry SMESH_TRANSPARENCY_TRANSPARENT - Transparent <--- + Transparent SMESH_TRIANGLE -- 2.39.2