]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
PostPro 2005, T1.5: 2D fields displayed in 3D
authorapo <apo@opencascade.com>
Wed, 27 Apr 2005 06:34:12 +0000 (06:34 +0000)
committerapo <apo@opencascade.com>
Wed, 27 Apr 2005 06:34:12 +0000 (06:34 +0000)
resources/VISU_en.xml
resources/VISU_fr.xml
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.cxx
src/VISUGUI/VisuGUI_Plot3DDlg.h

index 5be5fdf03a701c4f120d8a8fd95d3a68163ecd96..b10a3084a55da5e9584b8f65b54209c6cbc8369c 100644 (file)
@@ -31,7 +31,7 @@
   <popup-item item-id="4015" pos-id="" label-id="Cut Planes" icon-id="Visu_cutplane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   <popup-item item-id="4018" pos-id="" label-id="Cut Lines" icon-id="Visu_cutlines.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   <popup-item item-id="4016" pos-id="" label-id="Stream Lines" icon-id="Visu_streamlines.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-  <!--popup-item item-id="4017" pos-id="" label-id="Same As..." icon-id="Visu_sameas.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/-->
+  <popup-item item-id="4017" pos-id="" label-id="Plot 3D" icon-id="Visu_plot3d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </menu-item>
                        
 <!-- ************************* Selection (menubar) ************************************** -->
@@ -88,7 +88,7 @@
   <toolbutton-item item-id="4015" pos-id="" label-id="Cut Planes" icon-id="Visu_cutplane.png" tooltip-id="Cut Planes" accel-id="" toggle-id="" execute-action=""/>
   <toolbutton-item item-id="4018" pos-id="" label-id="Cut Lines" icon-id="Visu_cutlines.png" tooltip-id="Cut Lines" accel-id="" toggle-id="" execute-action=""/>
   <toolbutton-item item-id="4016" pos-id="" label-id="Stream Lines" icon-id="Visu_streamlines.png" tooltip-id="Stream Lines" accel-id="" toggle-id="" execute-action=""/>
-  <!--toolbutton-item item-id="4017" pos-id="" label-id="Same As..." icon-id="Visu_sameas.png" tooltip-id="Same As" accel-id="" toggle-id="" execute-action=""/-->
+  <toolbutton-item item-id="4017" pos-id="" label-id="Plot 3D" icon-id="Visu_plot3d.png" tooltip-id="Plot 3D" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
 </desktop>      <!--   DESKTOP END    -->  
index 0aa698957103a0c879355b62fa9b4281a5e3a117..b10a3084a55da5e9584b8f65b54209c6cbc8369c 100644 (file)
   <popup-item item-id="4015" pos-id="" label-id="Cut Planes" icon-id="Visu_cutplane.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   <popup-item item-id="4018" pos-id="" label-id="Cut Lines" icon-id="Visu_cutlines.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
   <popup-item item-id="4016" pos-id="" label-id="Stream Lines" icon-id="Visu_streamlines.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-  <!--popup-item item-id="4017" pos-id="" label-id="Same As..." icon-id="Visu_sameas.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/-->
+  <popup-item item-id="4017" pos-id="" label-id="Plot 3D" icon-id="Visu_plot3d.png" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </menu-item>
                        
 <!-- ************************* Selection (menubar) ************************************** -->
 <menu-item label-id="Selection" item-id="41" pos-id="4">
-  <submenu label-id="Cell" item-id="411" pos-id="">
-    <popup-item item-id="4111" pos-id="" label-id="Select by number" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    <popup-item item-id="4112" pos-id="" label-id="Return attributes" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-  </submenu>
-  <endsubmenu /> 
-  <submenu label-id="Point" item-id="412" pos-id="">
-    <popup-item item-id="4121" pos-id="" label-id="Select by number" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-    <popup-item item-id="4122" pos-id="" label-id="Return attributes" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
-  </submenu>
-  <endsubmenu /> 
-  <popup-item item-id="413" pos-id="" label-id="Shape" icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
+    <popup-item item-id="4111" pos-id="" label-id="Selection info..." icon-id="" tooltip-id="" accel-id="" toggle-id="" execute-action=""/>
 </menu-item>
 
 <!-- ************************* Representation (menubar) ************************************** -->
   <toolbutton-item item-id="4015" pos-id="" label-id="Cut Planes" icon-id="Visu_cutplane.png" tooltip-id="Cut Planes" accel-id="" toggle-id="" execute-action=""/>
   <toolbutton-item item-id="4018" pos-id="" label-id="Cut Lines" icon-id="Visu_cutlines.png" tooltip-id="Cut Lines" accel-id="" toggle-id="" execute-action=""/>
   <toolbutton-item item-id="4016" pos-id="" label-id="Stream Lines" icon-id="Visu_streamlines.png" tooltip-id="Stream Lines" accel-id="" toggle-id="" execute-action=""/>
-  <!--toolbutton-item item-id="4017" pos-id="" label-id="Same As..." icon-id="Visu_sameas.png" tooltip-id="Same As" accel-id="" toggle-id="" execute-action=""/-->
+  <toolbutton-item item-id="4017" pos-id="" label-id="Plot 3D" icon-id="Visu_plot3d.png" tooltip-id="Plot 3D" accel-id="" toggle-id="" execute-action=""/>
 </toolbar>
 
-<toolbar label-id="Selection Toolbar">
-  <toolbutton-item item-id="101" pos-id="" label-id="Point" icon-id="Visu_selectionpoint.png" tooltip-id="Point selection" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="102" pos-id="" label-id="Edge" icon-id="Visu_selectionedge.png" tooltip-id="Edge selection" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="103" pos-id="" label-id="Cell" icon-id="Visu_selectioncell.png" tooltip-id="Cell selection" accel-id="" toggle-id="" execute-action=""/>
-  <toolbutton-item item-id="104" pos-id="" label-id="Actor" icon-id="Visu_selectionactor.png" tooltip-id="Actor selection" accel-id="" toggle-id="" execute-action=""/>
-</toolbar>
-  
 </desktop>      <!--   DESKTOP END    -->  
 </application>  <!-- APPLICATION END  -->
index 22eb785fa343d0878bb626f84ffe01f170dcf939..8cdbb8d37b7a80b6f9de1c8938dac4bf7a0deedb 100644 (file)
@@ -470,6 +470,7 @@ bool VisuGUI::OnGUIEvent(int theCommandID,  QAD_Desktop* parent)
       /* 4014 : Iso-Surfaces                                                        */
       /* 4015 : Cut Planes                                                          */
       /* 4016 : Stream Lines                                                        */
+      /* 4017 : Plot 3D                                                        */
       /* ========================================================================== */
 
     case 4011 :
@@ -493,6 +494,9 @@ bool VisuGUI::OnGUIEvent(int theCommandID,  QAD_Desktop* parent)
     case 4016 :
       visuGUI->CreateStreamLines();
       break;
+    case 4017 :
+      visuGUI->CreatePlot3D();
+      break;
 
     case 4111 :
       visuGUI->SelectionInfo();
@@ -3197,6 +3201,8 @@ bool VisuGUI::CustomPopup (QAD_Desktop* parent, QPopupMenu* thePopup, const QStr
                               "Cut Planes...", visuGUI, SLOT(CreateCutPlanes()));
          thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_CUT_LINES") ),
                               "Cut Lines...", visuGUI, SLOT(CreateCutLines()));
+         thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_PLOT3D") ),
+                              "Plot3D...", visuGUI, SLOT(CreatePlot3D()));
          if(aNunComponent > 1){
            thePopup->insertItem(rmgr->loadPixmap( "VISU", tr("ICON_DEFORMED_SHAPE") ),
                                 "Deformed Shape...", visuGUI, SLOT(CreateDeformedShape()));
index c872148b7af28fce407421ddf602c985bc77db5b..28b3be3fedd857caa6bf69b0a9342eaa5bbc4b77 100644 (file)
@@ -45,97 +45,23 @@ using namespace std;
 VisuGUI_Plot3DPane::VisuGUI_Plot3DPane(QWidget* parent) 
   : QVBox(parent)
 {
-  QFrame* TopGroup = new QFrame( this, "TopGroup" );
-  TopGroup->setFrameStyle(QFrame::Box | QFrame::Sunken);
-  TopGroup->setLineWidth(1);
-
-  QGridLayout* TopGroupLayout = new QGridLayout(TopGroup);
-  TopGroupLayout->setAlignment( Qt::AlignTop );
-  TopGroupLayout->setSpacing( 6 );
-  TopGroupLayout->setMargin( 11 );
-
-  QLabel* LabelNbr = new QLabel( tr( "Number of surfaces:" ), TopGroup, "LabelNbr" );
-  TopGroupLayout->addWidget( LabelNbr, 0, 0 );
-  NbrIso = new QSpinBox( 1, 100, 1, TopGroup, "NbrIso" );
-  NbrIso->setValue( 1 );
-  TopGroupLayout->addWidget( NbrIso, 0, 1 );
-
-  QLabel* LabelMin = new QLabel( tr( "Minimum value:" ), TopGroup, "LabelMin" );
-  TopGroupLayout->addWidget( LabelMin, 1, 0 );
-  //MinIso = new QAD_SpinBoxDbl( TopGroup, -DBL_MAX, DBL_MAX, 0.1 );
-  MinIso = new QLineEdit( TopGroup );
-  MinIso->setValidator( new QDoubleValidator(TopGroup) );  
-  MinIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  MinIso->setMinimumSize( 70, 0 );
-  LabelMin->setBuddy(MinIso);
-  TopGroupLayout->addWidget( MinIso, 1, 1 );
-
-  QLabel* LabelMax = new QLabel( tr( "Maximum value:" ), TopGroup, "LabelMax" );
-  TopGroupLayout->addWidget( LabelMax, 2, 0 );
-  //MaxIso = new QAD_SpinBoxDbl( TopGroup, -DBL_MAX, DBL_MAX, 0.1);
-  MaxIso = new QLineEdit( TopGroup );
-  MaxIso->setValidator( new QDoubleValidator(TopGroup) );
-  MaxIso->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
-  MaxIso->setMinimumSize( 70, 0 );
-  LabelMax->setBuddy(MaxIso);
-  TopGroupLayout->addWidget( MaxIso, 2, 1 );
-  
-  
-//   CBUpdate = new QCheckBox ( tr( "Update scalar bar with these values" ), TopGroup);
-//   CBUpdate->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed) );
-//   TopGroupLayout->addMultiCellWidget( CBUpdate, 4, 4, 0, 1);
-//   CBUpdate->setChecked(false);
-  QPushButton* aUpdateBtn = new QPushButton( "Update scalar bar range with these values", TopGroup);
-  TopGroupLayout->addMultiCellWidget( aUpdateBtn, 3, 3, 0, 1);
-  connect( aUpdateBtn, SIGNAL( clicked() ), this, SLOT(onCBUpdate() ) );   
-  
-//   CBLog = new QCheckBox ( tr( "Logarithmic scaling" ), TopGroup);
-//   CBLog->setSizePolicy( QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed) );
-//   TopGroupLayout->addMultiCellWidget( CBLog, 3, 3, 0, 1);
-  
 }
 
-
-
-void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs) {
+void VisuGUI_Plot3DPane::initFromPrsObject(VISU::Plot3D_i* thePrs) 
+{
 }
 
-int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs) {
+int VisuGUI_Plot3DPane::storeToPrsObject(VISU::Plot3D_i* thePrs) 
+{
   return 1;
 }
 
-void VisuGUI_Plot3DPane::onCBUpdate()
+bool VisuGUI_Plot3DPane::check() 
 {
-  //  if (CBUpdate->isChecked()) {
-  myScalarPane->setRange(MinIso->text().toDouble(), MaxIso->text().toDouble(), true);
-    //  }
-//     CBLog->setDisabled(false);
-//   else CBLog->setDisabled(true);
-}
-
-
-bool VisuGUI_Plot3DPane::check() {
-  if (MinIso->text().toDouble() >= MaxIso->text().toDouble()) {
-    MESSAGE(tr("MSG_MINMAX_VALUES"));
-    QAD_MessageBox::warn1( this,tr("VISU_WARNING"),
-                          tr("MSG_MINMAX_VALUES"),
-                          tr("VISU_BUT_OK"));
-    return false;
-  } // else if (/* CBUpdate->isChecked() && CBLog->isChecked() && */
-//           (MinIso->text().toDouble() <=0 || MaxIso->text().toDouble() <=0) ) {
-//     QAD_MessageBox::warn1( this,
-//                        tr("VISU_WARNING"),
-//                        tr("WRN_LOGARITHMIC_RANGE_ISOSURF"),
-//                        tr("VISU_BUT_OK"));
-//     return false;
-//   }
   return true;
 }
 
 
-
-
-
 /*!
   Constructor
 */
index 19eff93930271a592c64d30d6d074722fd8fcb9f..1aef0f9fc2e690fa57830339ddd770a78a5f8459 100644 (file)
@@ -58,14 +58,9 @@ public:
 
     bool check();
 
-protected slots:
-  void onCBUpdate();
-   
 private:
-  QLineEdit* MinIso;
-  QLineEdit* MaxIso;
-  QSpinBox*  NbrIso;
-  VisuGUI_ScalarBarPane* myScalarPane;  
+  VisuGUI_ScalarBarPane* myScalarPane;
+
 };