]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Qt4 porting: add axis grids to plot 2d preview. V5_0_0a1 V5_0_0a2
authormkr <mkr@opencascade.com>
Fri, 28 Mar 2008 15:57:02 +0000 (15:57 +0000)
committermkr <mkr@opencascade.com>
Fri, 28 Mar 2008 15:57:02 +0000 (15:57 +0000)
src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx

index 66e167a4f2744d3c4570d8f95611596d465c7a4e..fc3787b9e5ced9b857475817e641d1e99d7d3348 100644 (file)
@@ -27,6 +27,7 @@
 // Qwt includes
 #include <qwt_plot_curve.h>
 #include <qwt_plot_marker.h>
+#include <qwt_plot_grid.h>
 #include <qwt_symbol.h>
 #include <qwt_legend.h>
 
@@ -84,6 +85,16 @@ StdMeshersGUI_DistrPreview::StdMeshersGUI_DistrPreview( QWidget* p, StdMeshers::
 
   myDensity->setTitle( tr( "SMESH_DENSITY_FUNC" ) );
   myDistr->setTitle( tr( "SMESH_DISTR" ) );
+  
+  QwtPlotGrid* aGrid = new QwtPlotGrid();
+  QPen aMajPen = aGrid->majPen();
+  aMajPen.setStyle( Qt::DashLine );
+  aGrid->setPen( aMajPen );
+
+  aGrid->enableX( true );
+  aGrid->enableY( true );
+
+  aGrid->attach( this );
 }
 
 StdMeshersGUI_DistrPreview::~StdMeshersGUI_DistrPreview()