void SaxsviewImage::setAspectRatioFixed(bool yes) { p->rescaler->setEnabled(yes); if (yes) p->rescaler->rescale(); else setZoomBase(p->frame->boundingRect()); }
void QwtPlotZoomer::setAxis( int xAxis, int yAxis ) { if ( xAxis != QwtPlotPicker::xAxis() || yAxis != QwtPlotPicker::yAxis() ) { QwtPlotPicker::setAxis( xAxis, yAxis ); setZoomBase( scaleRect() ); } }
//! Init the zoomer, used by the constructors void QwtPlotZoomer::init(int selectionFlags, DisplayMode trackerMode) { d_data = new PrivateData; d_data->maxStackDepth = -1; setSelectionFlags(selectionFlags); setTrackerMode(trackerMode); setRubberBand(RectRubberBand); setZoomBase(scaleRect()); }
//! Init the zoomer, used by the constructors void QwtPlotZoomer::init( bool doReplot ) { d_data = new PrivateData; d_data->maxStackDepth = -1; setTrackerMode( ActiveOnly ); setRubberBand( RectRubberBand ); setStateMachine( new QwtPickerDragRectMachine() ); if ( doReplot && plot() ) plot()->replot(); setZoomBase( scaleRect() ); }
void SaxsviewImage::setFrame(SaxsviewFrame *frame) { if (p->frame) p->frame->detach(); p->frame = frame; frame->attach(this); if (frame->data()) { const QwtInterval range = p->frame->data()->interval(Qt::ZAxis); axisWidget(QwtPlot::yRight)->setColorBarInterval(range); setAxisScale(QwtPlot::yRight, range.minValue(), range.maxValue()); } setZoomBase(p->frame->boundingRect()); replot(); }
void PlotZoomer::zoomToFit(bool replot) { if (zoomRectIndex() <= 0) { // Force zoom signal for synchronisation. zoom(0); emit zoomed(zoomRect()); } else { zoom(0); } if (QwtPlot *plotter = plot()) { plotter->setAxisAutoScale(AxisX); plotter->setAxisAutoScale(AxisY); plotter->updateAxes(); } setZoomBase(replot); }
Graph::Graph(): m_needSquareCorrection(false) { setTitle(""); setAxisTitle(QtAPI::Plot::xBottom,""); setAxisTitle(QtAPI::Plot::yLeft,""); enableAxis(QtAPI::Plot::xTop); enableAxis(QtAPI::Plot::yRight); setZoomBase(); setRescaler(new QtAPI::ConstSizeRescaler(this)); setXAxisScale(-10,10,false); setYAxisScale(-10,10,false); correctToSquare(); auto circle = new GraphCircle; circle->attach(this); }
void Plot::setZoomStack() { const QRectF rect(QPointF(xBase.x(), yBase.x()), QPointF(xBase.y(), yBase.y())); setZoomBase(); canvas->setZoomStack(rect); }