Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
PlotWidget Class Reference

#include <plotwidget.h>

Inheritance diagram for PlotWidget:
Inheritance graph
[legend]

List of all members.

Classes

struct  DragInfo

Public Slots

void activateGrid (bool activate)
void activateLegend (bool activate)
void configureTracker (CurveTracker::Parameter val)
void detachAllCurves ()
void enableTracker (bool enable)
void on_changeDateTimeScale (bool enable)
void on_changeTimeOffset (double offset)
void on_panned (int dx, int dy)
void on_zoomOutHorizontal_triggered (bool emit_signal=true)
void on_zoomOutVertical_triggered (bool emit_signal=true)
void removeCurve (const std::string &name)
void replot () override
 Redraw the plot.
void setTrackerPosition (double abs_time)
void updateCurves ()
void zoomOut (bool emit_signal)

Signals

void curveListChanged ()
void curvesDropped ()
void legendSizeChanged (int new_size)
void rectChanged (PlotWidget *self, QRectF rect)
void swapWidgetsRequested (PlotWidget *source, PlotWidget *destination)
void trackerMoved (QPointF pos)
void undoableChange ()

Public Member Functions

QRectF canvasBoundingRect () const
void changeAxisX (QString curve_name)
void changeBackgroundColor (QColor color)
const std::map< std::string,
QwtPlotCurve * > & 
curveList () const
PlotData::RangeTime getMaximumRangeX () const
PlotData::RangeValue getMaximumRangeY (PlotData::RangeTime range_X) const
bool isEmpty () const
bool isLegendVisible () const
bool isXYPlot () const
bool isZoomEnabled () const
const PlotLegendlegend () const
 PlotWidget (PlotDataMapRef &datamap, QWidget *parent=nullptr)
void reloadPlotData ()
virtual void resizeEvent (QResizeEvent *ev) override
void setConstantRatioXY (bool active)
void setLegendAlignment (Qt::Alignment alignment)
void setLegendSize (int size)
void setZoomEnabled (bool enabled)
void setZoomRectangle (QRectF rect, bool emit_signal)
virtual void updateLayout () override
 Adjust plot content to its current size.
bool xmlLoadState (QDomElement &element)
QDomElement xmlSaveState (QDomDocument &doc) const
virtual ~PlotWidget () override

Protected Member Functions

bool canvasEventFilter (QEvent *event)
void dragEnterEvent (QDragEnterEvent *event) override
void dragLeaveEvent (QDragLeaveEvent *event) override
void dropEvent (QDropEvent *event) override
bool eventFilter (QObject *obj, QEvent *event) override
 Event filter.

Private Slots

void canvasContextMenuTriggered (const QPoint &pos)
void launchRemoveCurveDialog ()
void on_changeColor (QString curve_name, QColor new_color)
void on_changeColorsDialog_triggered ()
void on_changeToBuiltinTransforms (QString new_transform)
void on_convertToXY_triggered (bool checked)
void on_customTransformsDialog ()
void on_editAxisLimits_triggered ()
void on_externallyResized (const QRectF &new_rect)
void on_savePlotToFile ()
void on_showPoints_triggered ()

Private Member Functions

bool addCurve (const std::string &name)
void buildActions ()
void buildLegend ()
DataSeriesBasecreateSeriesData (const QString &ID, const PlotData *data)
void rescaleEqualAxisScaling ()
void setDefaultRangeX ()
void transformCustomCurves ()
void updateAvailableTransformers ()
void updateMaximumZoomArea ()

Private Attributes

QAction * _action_1stDerivativeTransform
QAction * _action_2ndDerivativeTransform
QAction * _action_changeColorsDialog
QAction * _action_custom_transform
QAction * _action_editLimits
QAction * _action_noTransform
QAction * _action_phaseXY
QAction * _action_removeAllCurves
QAction * _action_removeCurve
QAction * _action_saveToFile
QAction * _action_showPoints
QAction * _action_zoomOutHorizontally
QAction * _action_zoomOutMaximum
QAction * _action_zoomOutVertically
AxisLimitsDialog_axis_limits_dialog
const PlotData_axisX = nullptr
std::map< std::string,
QwtPlotCurve * > 
_curve_list
QwtPlotCurve::CurveStyle _curve_style
std::map< std::string, QString > _curves_transform
PlotData::RangeValue _custom_Y_limits
QString _default_transform
DragInfo _dragging
QwtPlotGrid_grid
bool _keep_aspect_ratio
PlotLegend_legend
PlotMagnifier_magnifier
PlotDataMapRef_mapped_data
QRectF _max_zoom_rect
QwtPlotPanner_panner1
QwtPlotPanner_panner2
std::map< std::string,
QwtPlotMarker * > 
_point_marker
SnippetsMap _snippets
double _time_offset
CurveTracker_tracker
TransformSelector_transform_select_dialog
bool _use_date_time_scale
bool _zoom_enabled
PlotZoomer_zoomer

Detailed Description

Definition at line 28 of file plotwidget.h.


Constructor & Destructor Documentation

PlotWidget::PlotWidget ( PlotDataMapRef datamap,
QWidget *  parent = nullptr 
)

Definition at line 64 of file plotwidget.cpp.

PlotWidget::~PlotWidget ( ) [override, virtual]

Definition at line 361 of file plotwidget.cpp.


Member Function Documentation

void PlotWidget::activateGrid ( bool  activate) [slot]

Definition at line 1018 of file plotwidget.cpp.

void PlotWidget::activateLegend ( bool  activate) [slot]

Definition at line 1013 of file plotwidget.cpp.

bool PlotWidget::addCurve ( const std::string &  name) [private]

Definition at line 366 of file plotwidget.cpp.

void PlotWidget::buildActions ( ) [private]

Definition at line 164 of file plotwidget.cpp.

void PlotWidget::buildLegend ( ) [private]

Definition at line 330 of file plotwidget.cpp.

Definition at line 821 of file plotwidget.cpp.

void PlotWidget::canvasContextMenuTriggered ( const QPoint &  pos) [private, slot]

Definition at line 286 of file plotwidget.cpp.

bool PlotWidget::canvasEventFilter ( QEvent *  event) [protected]

Definition at line 1622 of file plotwidget.cpp.

void PlotWidget::changeAxisX ( QString  curve_name)

Definition at line 1528 of file plotwidget.cpp.

void PlotWidget::changeBackgroundColor ( QColor  color)

Definition at line 1861 of file plotwidget.cpp.

Definition at line 1027 of file plotwidget.cpp.

DataSeriesBase * PlotWidget::createSeriesData ( const QString &  ID,
const PlotData data 
) [private]

Definition at line 1804 of file plotwidget.cpp.

const std::map< std::string, QwtPlotCurve * > & PlotWidget::curveList ( ) const

Definition at line 478 of file plotwidget.cpp.

void PlotWidget::curveListChanged ( ) [signal]
void PlotWidget::curvesDropped ( ) [signal]
void PlotWidget::detachAllCurves ( ) [slot]

Definition at line 593 of file plotwidget.cpp.

void PlotWidget::dragEnterEvent ( QDragEnterEvent *  event) [override, protected]

Definition at line 483 of file plotwidget.cpp.

void PlotWidget::dragLeaveEvent ( QDragLeaveEvent *  event) [override, protected]

Definition at line 528 of file plotwidget.cpp.

void PlotWidget::dropEvent ( QDropEvent *  event) [override, protected]

Definition at line 543 of file plotwidget.cpp.

void PlotWidget::enableTracker ( bool  enable) [slot]

Definition at line 1032 of file plotwidget.cpp.

bool PlotWidget::eventFilter ( QObject *  object,
QEvent *  event 
) [override, protected, virtual]

Event filter.

The plot handles the following events for the canvas:

  • QEvent::Resize The canvas margins might depend on its size
  • QEvent::ContentsRectChange The layout needs to be recalculated
Parameters:
objectObject to be filtered
eventEvent
Returns:
See QFrame::eventFilter()
See also:
updateCanvasMargins(), updateLayout()

Reimplemented from QwtPlot.

Definition at line 1590 of file plotwidget.cpp.

PlotData::RangeTime PlotWidget::getMaximumRangeX ( ) const

Definition at line 1094 of file plotwidget.cpp.

PlotData::RangeValue PlotWidget::getMaximumRangeY ( PlotData::RangeTime  range_X) const

Definition at line 1126 of file plotwidget.cpp.

Definition at line 473 of file plotwidget.cpp.

Definition at line 1878 of file plotwidget.cpp.

Definition at line 1368 of file plotwidget.cpp.

Definition at line 1897 of file plotwidget.cpp.

void PlotWidget::launchRemoveCurveDialog ( ) [private, slot]

Definition at line 1203 of file plotwidget.cpp.

const PlotLegend* PlotWidget::legend ( ) const [inline]
Returns:
the plot's legend
See also:
insertLegend()

Reimplemented from QwtPlot.

Definition at line 60 of file plotwidget.h.

void PlotWidget::legendSizeChanged ( int  new_size) [signal]
void PlotWidget::on_changeColor ( QString  curve_name,
QColor  new_color 
) [private, slot]

Definition at line 1246 of file plotwidget.cpp.

Definition at line 1222 of file plotwidget.cpp.

void PlotWidget::on_changeDateTimeScale ( bool  enable) [slot]

Definition at line 1078 of file plotwidget.cpp.

void PlotWidget::on_changeTimeOffset ( double  offset) [slot]

Definition at line 1056 of file plotwidget.cpp.

void PlotWidget::on_changeToBuiltinTransforms ( QString  new_transform) [private, slot]

Definition at line 1336 of file plotwidget.cpp.

void PlotWidget::on_convertToXY_triggered ( bool  checked) [private, slot]

Definition at line 1374 of file plotwidget.cpp.

void PlotWidget::on_customTransformsDialog ( ) [private, slot]

Definition at line 1489 of file plotwidget.cpp.

void PlotWidget::on_editAxisLimits_triggered ( ) [private, slot]

Definition at line 1569 of file plotwidget.cpp.

void PlotWidget::on_externallyResized ( const QRectF &  new_rect) [private, slot]

Definition at line 1284 of file plotwidget.cpp.

void PlotWidget::on_panned ( int  dx,
int  dy 
) [slot]

Definition at line 614 of file plotwidget.cpp.

void PlotWidget::on_savePlotToFile ( ) [private, slot]

Definition at line 1541 of file plotwidget.cpp.

void PlotWidget::on_showPoints_triggered ( ) [private, slot]

Definition at line 1260 of file plotwidget.cpp.

void PlotWidget::on_zoomOutHorizontal_triggered ( bool  emit_signal = true) [slot]

Definition at line 1314 of file plotwidget.cpp.

void PlotWidget::on_zoomOutVertical_triggered ( bool  emit_signal = true) [slot]

Definition at line 1325 of file plotwidget.cpp.

void PlotWidget::rectChanged ( PlotWidget self,
QRectF  rect 
) [signal]

Definition at line 980 of file plotwidget.cpp.

void PlotWidget::removeCurve ( const std::string &  name) [slot]

Definition at line 426 of file plotwidget.cpp.

void PlotWidget::replot ( ) [override, virtual, slot]

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.

See also:
updateAxes(), setAutoReplot()

Reimplemented from QwtPlot.

Definition at line 1904 of file plotwidget.cpp.

Definition at line 874 of file plotwidget.cpp.

void PlotWidget::resizeEvent ( QResizeEvent *  e) [override, virtual]

Resize and update internal layout

Parameters:
eResize event

Reimplemented from QwtPlot.

Definition at line 919 of file plotwidget.cpp.

Definition at line 936 of file plotwidget.cpp.

void PlotWidget::setDefaultRangeX ( ) [private]

Definition at line 1784 of file plotwidget.cpp.

void PlotWidget::setLegendAlignment ( Qt::Alignment  alignment)

Definition at line 1883 of file plotwidget.cpp.

void PlotWidget::setLegendSize ( int  size)

Definition at line 1870 of file plotwidget.cpp.

void PlotWidget::setTrackerPosition ( double  abs_time) [slot]

Definition at line 1037 of file plotwidget.cpp.

void PlotWidget::setZoomEnabled ( bool  enabled)

Definition at line 1888 of file plotwidget.cpp.

void PlotWidget::setZoomRectangle ( QRectF  rect,
bool  emit_signal 
)

Definition at line 949 of file plotwidget.cpp.

void PlotWidget::swapWidgetsRequested ( PlotWidget source,
PlotWidget destination 
) [signal]
void PlotWidget::trackerMoved ( QPointF  pos) [signal]

Definition at line 1440 of file plotwidget.cpp.

void PlotWidget::undoableChange ( ) [signal]

Definition at line 1429 of file plotwidget.cpp.

void PlotWidget::updateCurves ( ) [slot]

Definition at line 1193 of file plotwidget.cpp.

void PlotWidget::updateLayout ( ) [override, virtual]

Adjust plot content to its current size.

See also:
resizeEvent()

Reimplemented from QwtPlot.

Definition at line 930 of file plotwidget.cpp.

Definition at line 831 of file plotwidget.cpp.

bool PlotWidget::xmlLoadState ( QDomElement &  element)

Definition at line 674 of file plotwidget.cpp.

QDomElement PlotWidget::xmlSaveState ( QDomDocument &  doc) const

Definition at line 619 of file plotwidget.cpp.

void PlotWidget::zoomOut ( bool  emit_signal) [slot]

Definition at line 1302 of file plotwidget.cpp.


Member Data Documentation

Definition at line 167 of file plotwidget.h.

Definition at line 168 of file plotwidget.h.

Definition at line 161 of file plotwidget.h.

Definition at line 170 of file plotwidget.h.

QAction* PlotWidget::_action_editLimits [private]

Definition at line 172 of file plotwidget.h.

QAction* PlotWidget::_action_noTransform [private]

Definition at line 166 of file plotwidget.h.

QAction* PlotWidget::_action_phaseXY [private]

Definition at line 169 of file plotwidget.h.

Definition at line 160 of file plotwidget.h.

QAction* PlotWidget::_action_removeCurve [private]

Definition at line 159 of file plotwidget.h.

QAction* PlotWidget::_action_saveToFile [private]

Definition at line 171 of file plotwidget.h.

QAction* PlotWidget::_action_showPoints [private]

Definition at line 162 of file plotwidget.h.

Definition at line 164 of file plotwidget.h.

Definition at line 163 of file plotwidget.h.

Definition at line 165 of file plotwidget.h.

Definition at line 217 of file plotwidget.h.

const PlotData* PlotWidget::_axisX = nullptr [private]

Definition at line 213 of file plotwidget.h.

std::map<std::string, QwtPlotCurve* > PlotWidget::_curve_list [private]

Definition at line 156 of file plotwidget.h.

Definition at line 205 of file plotwidget.h.

std::map<std::string, QString> PlotWidget::_curves_transform [private]

Definition at line 187 of file plotwidget.h.

Definition at line 215 of file plotwidget.h.

QString PlotWidget::_default_transform [private]

Definition at line 186 of file plotwidget.h.

Definition at line 195 of file plotwidget.h.

Definition at line 181 of file plotwidget.h.

Definition at line 225 of file plotwidget.h.

Definition at line 180 of file plotwidget.h.

Definition at line 175 of file plotwidget.h.

Definition at line 185 of file plotwidget.h.

QRectF PlotWidget::_max_zoom_rect [private]

Definition at line 227 of file plotwidget.h.

Definition at line 176 of file plotwidget.h.

Definition at line 177 of file plotwidget.h.

std::map<std::string, QwtPlotMarker*> PlotWidget::_point_marker [private]

Definition at line 157 of file plotwidget.h.

Definition at line 221 of file plotwidget.h.

double PlotWidget::_time_offset [private]

Definition at line 211 of file plotwidget.h.

Definition at line 179 of file plotwidget.h.

Definition at line 219 of file plotwidget.h.

Definition at line 183 of file plotwidget.h.

Definition at line 223 of file plotwidget.h.

Definition at line 174 of file plotwidget.h.


The documentation for this class was generated from the following files:


plotjuggler
Author(s): Davide Faconti
autogenerated on Wed Jul 3 2019 19:28:05