Salome HOME
Merge from BR_WIN_INDUS_514 branch 21/03/2011 (Windows industrialization)
authorvsr <vsr@opencascade.com>
Mon, 21 Mar 2011 15:23:28 +0000 (15:23 +0000)
committervsr <vsr@opencascade.com>
Mon, 21 Mar 2011 15:23:28 +0000 (15:23 +0000)
src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.h
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx
src/SMESHGUI/SMESHGUI_FilterLibraryDlg.h
src/SMESHGUI/SMESHGUI_TransparencyDlg.cxx
src/SMESHGUI/SMESH_msg_en.ts

index 7d65ad01d82d184dba2c98d65ebdb59e08b50cae..69f0144e6371e61928d634755eaa0a25eb8a5022 100644 (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();
index 1a495c71d1566c3a1d007795ace342bad5e787b4..c12c7ae5f55f972c16a0ba26d8d9ebca6aabe923 100755 (executable)
@@ -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 ||
index 17f0622faca4cd64a172e91a6abe6e1c97cd387e..be2bfc6c655cf35e1b5761cf720ec73285200cef 100755 (executable)
@@ -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>& );
index 579a7fe2864d5947b4e39056401c75a0288e5230..b0216a7875534e3b4d1aed36ba97bc1eca5385d3 100644 (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();
   }
 }
 
index 294a37df275210dd125158239fb76aa4f4c937c3..05dad35586b93aea6c4cb39000dfcc11e63de032 100644 (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;
   
index 68a13a4fc06977ea7203631985d5eac1a0438ea8..381e2d21176b6f82ebf6d082e4af7df5d775c8c0 100644 (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();
 }
index 3dcdc8ae9869eb937ccaaa5bf006f7b50b9009b0..c5ebf227c227e1174273e924ac05ea46ef6c737b 100644 (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>