MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / replot

Method replot

3rdparty/qwt/src/qwt_plot.cpp:545–571  ·  view source on GitHub ↗

! \brief Redraw the plot If the autoReplot option is not set (which is the default) or if any curves are attached to raw data, the plot has to be refreshed explicitly in order to make changes visible. \sa updateAxes(), setAutoReplot() */

Source from the content-addressed store, hash-verified

543 \sa updateAxes(), setAutoReplot()
544 */
545void QwtPlot::replot()
546{
547 bool doAutoReplot = autoReplot();
548 setAutoReplot( false );
549
550 updateAxes();
551
552 /*
553 Maybe the layout needs to be updated, because of changed
554 axes labels. We need to process them here before painting
555 to avoid that scales and canvas get out of sync.
556 */
557 QApplication::sendPostedEvents( this, QEvent::LayoutRequest );
558
559 if ( m_data->canvas )
560 {
561 const bool ok = QMetaObject::invokeMethod(
562 m_data->canvas, "replot", Qt::DirectConnection );
563 if ( !ok )
564 {
565 // fallback, when canvas has no a replot method
566 m_data->canvas->update( m_data->canvas->contentsRect() );
567 }
568 }
569
570 setAutoReplot( doAutoReplot );
571}
572
573/*!
574 \brief Adjust plot content to its current size.

Callers 9

rescaleMethod · 0.45
updateScalesMethod · 0.45
initMethod · 0.45
setZoomBaseMethod · 0.45
rescaleMethod · 0.45
rescaleMethod · 0.45
unzoomMethod · 0.45
movePlotMethod · 0.45
moveCanvasMethod · 0.45

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected