- setCurvePen( myDistr, QPen( dc, 1 ) );
- setCurveSymbol( myDistr, QwtSymbol( QwtSymbol::XCross, QBrush( dc ), QPen( dc ), QSize( 5, 5 ) ) );
- setAutoLegend( true );
- enableLegend( true );
- setLegendPos( Qwt::Bottom );
- setCurveTitle( myDensity, tr( "SMESH_DENSITY_FUNC" ) );
- setCurveTitle( myDistr, tr( "SMESH_DISTR" ) );
+ myDistr->setPen( QPen( dc, 1 ) );
+ myDistr->setSymbol( QwtSymbol( QwtSymbol::XCross, QBrush( dc ), QPen( dc ), QSize( 5, 5 ) ) );
+
+ QwtLegend* l = legend();
+ if ( !l ) {
+ l = new QwtLegend( this );
+ l->setFrameStyle( QFrame::Box | QFrame::Sunken );
+ }
+ insertLegend( l, QwtPlot::BottomLegend );
+
+ enableAxis(QwtPlot::yLeft, false);
+ enableAxis(QwtPlot::yRight, true);
+
+ QFont axisFont;
+ axisFont.setPointSize( 8 );
+ setAxisFont(QwtPlot::yRight, axisFont);
+ setAxisFont(QwtPlot::xBottom, axisFont);
+
+ myDensity->setYAxis(QwtPlot::yRight);
+ myDistr->setYAxis(QwtPlot::yRight);
+ myMsg->setYAxis(QwtPlot::yRight);
+ 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 );