]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
IPAL21035 It's impossible to hide scalar bar for gauss points
authordmv <dmv@opencascade.com>
Thu, 16 Apr 2009 08:07:52 +0000 (08:07 +0000)
committerdmv <dmv@opencascade.com>
Thu, 16 Apr 2009 08:07:52 +0000 (08:07 +0000)
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VisuGUI_GaussPointsDlg.cxx
src/VISUGUI/VisuGUI_GaussPointsDlg.h

index 487898024f8aa492aab56188ace44bb74c0d9e3f..fb62750ef2932276bd0de1f561c2f44215628aab 100644 (file)
@@ -2048,6 +2048,10 @@ Please, provide non-empty resulting presentation.</translation>
             <source>DIMENSIONS_GRP</source>
             <translation>Dimensions</translation>
         </message>
+       <message>
+            <source>HIDE_SCALAR_BAR</source>
+            <translation>Hide Scalar Bar</translation>
+        </message>
         <message>
             <source>DISPLAYED</source>
             <translation>Displayed</translation>
index fd3bf17039a144bbefb638f8a2371bf4c5542049..6492ca1f042d6b1e2bb5ca60e4e590b19a7b50ee 100644 (file)
@@ -327,6 +327,14 @@ VisuGUI_GaussScalarBarPane::VisuGUI_GaussScalarBarPane (QWidget * parent):
   myBarDlg = new VisuGUI_BarPrefDlg(this);
   aMainLayout->addWidget( myBarDlg );
 
+  QGroupBox* CheckGroup = new QGroupBox("", this );
+  aMainLayout->addWidget( CheckGroup );
+  QGridLayout* CheckGroupLayout = new QGridLayout( CheckGroup );
+
+  myHideBar = new QCheckBox(tr("HIDE_SCALAR_BAR"), CheckGroup);
+  myHideBar->setChecked(false);
+  CheckGroupLayout->addWidget(myHideBar, 0, 0);
+
   // signals and slots connections ===========================================
   connect( RBFieldRange,  SIGNAL( clicked() ), this, SLOT( fieldRangeClicked() ) );
   connect( RBImposedRange,SIGNAL( clicked() ), this, SLOT( imposedRangeClicked() ) );
@@ -568,6 +576,8 @@ void VisuGUI_GaussScalarBarPane::initFromPrsObject(VISU::GaussPoints_i* thePrs,
                                   thePrs->IsBoldLabel(),
                                   thePrs->IsItalicLabel(),
                                   thePrs->IsShadowLabel());
+
+  myHideBar->setChecked(!thePrs->IsBarVisible());
 }
 
 /**
@@ -603,6 +613,8 @@ int VisuGUI_GaussScalarBarPane::storeToPrsObject(VISU::GaussPoints_i* thePrs) {
   thePrs->SetLabelsFormat( f.c_str() );
   thePrs->SetUnitsVisible(myBarDlg->isUnitsVisible());
 
+  thePrs->SetBarVisible(!myHideBar->isChecked());
+
   if (myIsStoreTextProp) {
     // "Title"
     thePrs->SetTitle(myTextDlg->getTitleText().toLatin1().data());
@@ -996,7 +1008,7 @@ int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::ColoredPrs3d_i* thePrs )
   //Issue 0019874(EDF 746 VISU: Picking alphanumeric Gauss)
   if(thePrs){
     SALOME_ListIO aListIO;
-    LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
+    //    LightApp_SelectionMgr* aSelectionMgr = VISU::GetSelectionMgr(myModule);
     Handle(SALOME_InteractiveObject) anIO = thePrs->GetIO();
     if(anIO && anIO->hasEntry()) {
       aListIO.Append(anIO);
index 6b0121d6305dbefa0120ee0aa2e33d909e0c7073..f7742c7e7df4dfff1020766c5786786a79dffc2a 100644 (file)
@@ -96,6 +96,7 @@ class VisuGUI_GaussScalarBarPane : public QWidget//QVBox
   QRadioButton*   myRBLocal;
   QRadioButton*   myRBGlobal;
   QCheckBox*      myCBDisplayed;
+  QCheckBox*      myHideBar;
 
   double          Imin,   Imax;
   double          myHorX, myHorY, myHorW, myHorH;