Merge from BR_WIN_INDUS_514 branch 21/03/2011 (Windows industrialization)

This commit is contained in:
vsr 2011-03-21 15:23:28 +00:00
parent a593ecab98
commit 14c60ac03b
7 changed files with 20 additions and 30 deletions

View File

@ -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();

View File

@ -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()));
@ -3197,8 +3191,9 @@ void SMESHGUI_FilterDlg::updateSelection()
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 ||

View File

@ -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<int>& );

View File

@ -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();
}
}

View File

@ -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;

View File

@ -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();
}

View File

@ -2113,7 +2113,7 @@ Check algorithm documentation for supported geometry</translation>
</message>
<message>
<source>SMESH_TRANSPARENCY_OPAQUE</source>
<translation>---&gt; Opaque</translation>
<translation>Opaque</translation>
</message>
<message>
<source>SMESH_TRANSPARENCY_TITLE</source>
@ -2121,7 +2121,7 @@ Check algorithm documentation for supported geometry</translation>
</message>
<message>
<source>SMESH_TRANSPARENCY_TRANSPARENT</source>
<translation>Transparent &lt;---</translation>
<translation>Transparent</translation>
</message>
<message>
<source>SMESH_TRIANGLE</source>