Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
PlotWidget Class Reference

#include <plotwidget.h>

Inheritance diagram for PlotWidget:
Inheritance graph
[legend]

Classes

struct  DragInfo
 

Public Slots

void activateGrid (bool activate)
 
void activateLegend (bool activate)
 
void configureTracker (CurveTracker::Parameter val)
 
void enableTracker (bool enable)
 
bool isTrackerEnabled () const
 
void on_changeCurveColor (const QString &curve_name, QColor new_color)
 
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 onBackgroundColorRequest (QString name)
 
void onDataSourceRemoved (const std::string &src_name)
 
void onFlipAxis ()
 
void onShowDataStatistics ()
 
void removeAllCurves () override
 
void setTrackerPosition (double abs_time)
 
void updateCurves (bool reset_older_data)
 
void zoomOut (bool emit_signal)
 
- Public Slots inherited from PJ::PlotWidgetBase
virtual void removeAllCurves ()
 
void replot ()
 

Signals

void curveListChanged ()
 
void curvesDropped ()
 
void rectChanged (PlotWidget *self, QRectF rect)
 
void splitHorizontal ()
 
void splitVertical ()
 
void swapWidgetsRequested (PlotWidget *source, PlotWidget *destination)
 
void trackerMoved (QPointF pos)
 
void undoableChange ()
 
- Signals inherited from PJ::PlotWidgetBase
void curveListChanged ()
 
void dragEnterSignal (QDragEnterEvent *event)
 
void dragLeaveSignal (QDragLeaveEvent *event)
 
void dropSignal (QDropEvent *event)
 
void legendSizeChanged (int new_size)
 
void viewResized (const QRectF &)
 
void widgetResized ()
 

Public Member Functions

CurveInfoaddCurve (const std::string &name, QColor color=Qt::transparent)
 
CurveInfoaddCurveXY (std::string name_x, std::string name_y, QString curve_name="")
 
Range customAxisLimit () const
 
PlotDataMapRefdatamap ()
 
Range getVisualizationRangeY (Range range_X) const override
 
bool isZoomLinkEnabled () const
 
 PlotWidget (PlotDataMapRef &datamap, QWidget *parent)
 
void reloadPlotData ()
 
void removeCurve (const QString &title) override
 
void setContextMenuEnabled (bool enabled)
 
void setCustomAxisLimits (Range range)
 
void setStatisticsTitle (QString title)
 
void setZoomRectangle (QRectF rect, bool emit_signal)
 
double timeOffset () const
 
void updateStatistics (bool forceUpdate=false)
 
bool xmlLoadState (QDomElement &element, bool autozoom=true)
 
QDomElement xmlSaveState (QDomDocument &doc) const
 
virtual ~PlotWidget () override
 
- Public Member Functions inherited from PJ::PlotWidgetBase
virtual CurveInfoaddCurve (const std::string &name, PlotDataXY &src_data, QColor color=Qt::transparent)
 
void changeCurvesStyle (CurveStyle style)
 
QRectF currentBoundingRect () const
 
CurveInfocurveFromTitle (const QString &title)
 
std::list< CurveInfo > & curveList ()
 
const std::list< CurveInfo > & curveList () const
 
CurveStyle curveStyle () const
 
QColor getColorHint (PlotDataXY *data)
 
std::map< QString, QColor > getCurveColors () const
 
virtual PJ::Range getVisualizationRangeX () const
 
bool isEmpty () const
 
bool isXYPlot () const
 
bool isZoomEnabled () const
 
bool keepRatioXY () const
 
QRectF maxZoomRect () const
 
 PlotWidgetBase (QWidget *parent)
 
virtual void resetZoom ()
 
void setAcceptDrops (bool accept)
 
void setKeepRatioXY (bool active)
 
void setLegendAlignment (Qt::Alignment alignment)
 
void setLegendSize (int size)
 
virtual void setModeXY (bool enable)
 
void setZoomEnabled (bool enabled)
 
virtual ~PlotWidgetBase ()
 

Protected Member Functions

bool canvasEventFilter (QEvent *event)
 
bool eventFilter (QObject *obj, QEvent *event) override
 
void onDragEnterEvent (QDragEnterEvent *event)
 
void onDragLeaveEvent (QDragLeaveEvent *event)
 
void onDropEvent (QDropEvent *event)
 
- Protected Member Functions inherited from PJ::PlotWidgetBase
bool eventFilter (QObject *obj, QEvent *event)
 
PlotLegendlegend ()
 
PlotMagnifiermagnifier ()
 
QwtPlotqwtPlot ()
 
const QwtPlotqwtPlot () const
 
void updateMaximumZoomArea ()
 
PlotZoomerzoomer ()
 

Protected Attributes

PlotDataMapRef_mapped_data
 
- Protected Attributes inherited from PJ::PlotWidgetBase
QwtPlotPimpl * p = nullptr
 

Private Slots

void canvasContextMenuTriggered (const QPoint &pos)
 
void on_copyAction_triggered ()
 
void on_copyToClipboard ()
 
void on_externallyResized (const QRectF &new_rect)
 
void on_pasteAction_triggered ()
 
void on_savePlotToFile ()
 
void setModeXY (bool enable) override
 

Private Member Functions

void buildActions ()
 
QwtSeriesWrappercreateCurveXY (const PlotData *data_x, const PlotData *data_y)
 
QwtSeriesWrappercreateTimeSeries (const PlotData *data, const QString &transform_ID={}) override
 
void overrideCursonMove ()
 
void rescaleEqualAxisScaling ()
 
void setAxisScale (QwtAxisId axisId, double min, double max)
 
void setDefaultRangeX ()
 
void updateAvailableTransformers ()
 

Private Attributes

QAction * _action_copy
 
QAction * _action_data_statistics
 
QAction * _action_edit
 
QAction * _action_formula
 
QAction * _action_image_to_clipboard
 
QAction * _action_paste
 
QAction * _action_removeAllCurves
 
QAction * _action_saveToFile
 
QAction * _action_split_horizontal
 
QAction * _action_split_vertical
 
QAction * _action_zoomOutHorizontally
 
QAction * _action_zoomOutMaximum
 
QAction * _action_zoomOutVertically
 
std::unique_ptr< BackgroundColorItem_background_item
 
bool _context_menu_enabled
 
Range _custom_Y_limits
 
DragInfo _dragging
 
QAction * _flip_x
 
QAction * _flip_y
 
QwtPlotGrid_grid
 
SnippetsMap _snippets
 
StatisticsDialog_statistics_dialog = nullptr
 
QString _statistics_window_title = ""
 
double _time_offset
 
CurveTracker_tracker
 
TransformSelector_transform_select_dialog
 
bool _use_date_time_scale
 

Additional Inherited Members

- Public Types inherited from PJ::PlotWidgetBase
enum  CurveStyle {
  LINES, DOTS, LINES_AND_DOTS, STICKS,
  STEPS, STEPSINV
}
 
- Static Protected Member Functions inherited from PJ::PlotWidgetBase
static void setStyle (QwtPlotCurve *curve, CurveStyle style)
 

Detailed Description

Definition at line 38 of file plotwidget.h.

Constructor & Destructor Documentation

◆ PlotWidget()

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

Definition at line 74 of file plotwidget.cpp.

◆ ~PlotWidget()

PlotWidget::~PlotWidget ( )
overridevirtual

Definition at line 124 of file plotwidget.cpp.

Member Function Documentation

◆ activateGrid

void PlotWidget::activateGrid ( bool  activate)
slot

Definition at line 1027 of file plotwidget.cpp.

◆ activateLegend

void PlotWidget::activateLegend ( bool  activate)
slot

Definition at line 1022 of file plotwidget.cpp.

◆ addCurve()

PlotWidgetBase::CurveInfo * PlotWidget::addCurve ( const std::string &  name,
QColor  color = Qt::transparent 
)

Definition at line 393 of file plotwidget.cpp.

◆ addCurveXY()

PlotWidget::CurveInfo * PlotWidget::addCurveXY ( std::string  name_x,
std::string  name_y,
QString  curve_name = "" 
)

Definition at line 296 of file plotwidget.cpp.

◆ buildActions()

void PlotWidget::buildActions ( )
private

Definition at line 144 of file plotwidget.cpp.

◆ canvasContextMenuTriggered

void PlotWidget::canvasContextMenuTriggered ( const QPoint &  pos)
privateslot

Definition at line 230 of file plotwidget.cpp.

◆ canvasEventFilter()

bool PlotWidget::canvasEventFilter ( QEvent *  event)
protected

Definition at line 1608 of file plotwidget.cpp.

◆ configureTracker

void PlotWidget::configureTracker ( CurveTracker::Parameter  val)
slot

Definition at line 1036 of file plotwidget.cpp.

◆ createCurveXY()

QwtSeriesWrapper * PlotWidget::createCurveXY ( const PlotData data_x,
const PlotData data_y 
)
private

Definition at line 1717 of file plotwidget.cpp.

◆ createTimeSeries()

QwtSeriesWrapper * PlotWidget::createTimeSeries ( const PlotData data,
const QString &  transform_ID = {} 
)
overrideprivatevirtual

Reimplemented from PJ::PlotWidgetBase.

Definition at line 1745 of file plotwidget.cpp.

◆ curveListChanged

void PlotWidget::curveListChanged ( )
signal

◆ curvesDropped

void PlotWidget::curvesDropped ( )
signal

◆ customAxisLimit()

Range PlotWidget::customAxisLimit ( ) const

Definition at line 1480 of file plotwidget.cpp.

◆ datamap()

PlotDataMapRef& PlotWidget::datamap ( )
inline

Definition at line 64 of file plotwidget.h.

◆ enableTracker

void PlotWidget::enableTracker ( bool  enable)
slot

Definition at line 1041 of file plotwidget.cpp.

◆ eventFilter()

bool PlotWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

Definition at line 1548 of file plotwidget.cpp.

◆ getVisualizationRangeY()

Range PlotWidget::getVisualizationRangeY ( Range  range_X) const
overridevirtual

Reimplemented from PJ::PlotWidgetBase.

Definition at line 1122 of file plotwidget.cpp.

◆ isTrackerEnabled

bool PlotWidget::isTrackerEnabled ( ) const
slot

Definition at line 1046 of file plotwidget.cpp.

◆ isZoomLinkEnabled()

bool PlotWidget::isZoomLinkEnabled ( ) const

Definition at line 1595 of file plotwidget.cpp.

◆ on_changeCurveColor

void PlotWidget::on_changeCurveColor ( const QString &  curve_name,
QColor  new_color 
)
slot

Definition at line 1174 of file plotwidget.cpp.

◆ on_changeDateTimeScale

void PlotWidget::on_changeDateTimeScale ( bool  enable)
slot

Definition at line 1099 of file plotwidget.cpp.

◆ on_changeTimeOffset

void PlotWidget::on_changeTimeOffset ( double  offset)
slot

Definition at line 1074 of file plotwidget.cpp.

◆ on_copyAction_triggered

void PlotWidget::on_copyAction_triggered ( )
privateslot

Definition at line 1512 of file plotwidget.cpp.

◆ on_copyToClipboard

void PlotWidget::on_copyToClipboard ( )
privateslot

Definition at line 1485 of file plotwidget.cpp.

◆ on_externallyResized

void PlotWidget::on_externallyResized ( const QRectF &  new_rect)
privateslot

Definition at line 1305 of file plotwidget.cpp.

◆ on_panned

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

Definition at line 632 of file plotwidget.cpp.

◆ on_pasteAction_triggered

void PlotWidget::on_pasteAction_triggered ( )
privateslot

Definition at line 1524 of file plotwidget.cpp.

◆ on_savePlotToFile

void PlotWidget::on_savePlotToFile ( )
privateslot

Definition at line 1394 of file plotwidget.cpp.

◆ on_zoomOutHorizontal_triggered

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

Definition at line 1333 of file plotwidget.cpp.

◆ on_zoomOutVertical_triggered

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

Definition at line 1344 of file plotwidget.cpp.

◆ onBackgroundColorRequest

void PlotWidget::onBackgroundColorRequest ( QString  name)
slot

Definition at line 1216 of file plotwidget.cpp.

◆ onDataSourceRemoved

void PlotWidget::onDataSourceRemoved ( const std::string &  src_name)
slot

Definition at line 425 of file plotwidget.cpp.

◆ onDragEnterEvent()

void PlotWidget::onDragEnterEvent ( QDragEnterEvent *  event)
protected

Definition at line 470 of file plotwidget.cpp.

◆ onDragLeaveEvent()

void PlotWidget::onDragLeaveEvent ( QDragLeaveEvent *  event)
protected

Definition at line 526 of file plotwidget.cpp.

◆ onDropEvent()

void PlotWidget::onDropEvent ( QDropEvent *  event)
protected

Definition at line 532 of file plotwidget.cpp.

◆ onFlipAxis

void PlotWidget::onFlipAxis ( )
slot

Definition at line 1191 of file plotwidget.cpp.

◆ onShowDataStatistics

void PlotWidget::onShowDataStatistics ( )
slot

Definition at line 1275 of file plotwidget.cpp.

◆ overrideCursonMove()

void PlotWidget::overrideCursonMove ( )
private

Definition at line 1567 of file plotwidget.cpp.

◆ rectChanged

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

◆ reloadPlotData()

void PlotWidget::reloadPlotData ( )

Definition at line 991 of file plotwidget.cpp.

◆ removeAllCurves

void PlotWidget::removeAllCurves ( )
overrideslot

Definition at line 461 of file plotwidget.cpp.

◆ removeCurve()

void PlotWidget::removeCurve ( const QString &  title)
overridevirtual

Reimplemented from PJ::PlotWidgetBase.

Definition at line 419 of file plotwidget.cpp.

◆ rescaleEqualAxisScaling()

void PlotWidget::rescaleEqualAxisScaling ( )
private

Definition at line 935 of file plotwidget.cpp.

◆ setAxisScale()

void PlotWidget::setAxisScale ( QwtAxisId  axisId,
double  min,
double  max 
)
private

Definition at line 1575 of file plotwidget.cpp.

◆ setContextMenuEnabled()

void PlotWidget::setContextMenuEnabled ( bool  enabled)

Definition at line 139 of file plotwidget.cpp.

◆ setCustomAxisLimits()

void PlotWidget::setCustomAxisLimits ( Range  range)

Definition at line 1473 of file plotwidget.cpp.

◆ setDefaultRangeX()

void PlotWidget::setDefaultRangeX ( )
private

Definition at line 1692 of file plotwidget.cpp.

◆ setModeXY

void PlotWidget::setModeXY ( bool  enable)
overrideprivateslot

Definition at line 1355 of file plotwidget.cpp.

◆ setStatisticsTitle()

void PlotWidget::setStatisticsTitle ( QString  title)

Definition at line 1265 of file plotwidget.cpp.

◆ setTrackerPosition

void PlotWidget::setTrackerPosition ( double  abs_time)
slot

Definition at line 1051 of file plotwidget.cpp.

◆ setZoomRectangle()

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

Definition at line 964 of file plotwidget.cpp.

◆ splitHorizontal

void PlotWidget::splitHorizontal ( )
signal

◆ splitVertical

void PlotWidget::splitVertical ( )
signal

◆ swapWidgetsRequested

void PlotWidget::swapWidgetsRequested ( PlotWidget source,
PlotWidget destination 
)
signal

◆ timeOffset()

double PlotWidget::timeOffset ( ) const
inline

Definition at line 59 of file plotwidget.h.

◆ trackerMoved

void PlotWidget::trackerMoved ( QPointF  pos)
signal

◆ undoableChange

void PlotWidget::undoableChange ( )
signal

◆ updateAvailableTransformers()

void PlotWidget::updateAvailableTransformers ( )
private

Definition at line 1383 of file plotwidget.cpp.

◆ updateCurves

void PlotWidget::updateCurves ( bool  reset_older_data)
slot

Definition at line 1150 of file plotwidget.cpp.

◆ updateStatistics()

void PlotWidget::updateStatistics ( bool  forceUpdate = false)

Definition at line 1162 of file plotwidget.cpp.

◆ xmlLoadState()

bool PlotWidget::xmlLoadState ( QDomElement &  element,
bool  autozoom = true 
)

Definition at line 731 of file plotwidget.cpp.

◆ xmlSaveState()

QDomElement PlotWidget::xmlSaveState ( QDomDocument &  doc) const

Definition at line 637 of file plotwidget.cpp.

◆ zoomOut

void PlotWidget::zoomOut ( bool  emit_signal)
slot

Definition at line 1319 of file plotwidget.cpp.

Member Data Documentation

◆ _action_copy

QAction* PlotWidget::_action_copy
private

Definition at line 177 of file plotwidget.h.

◆ _action_data_statistics

QAction* PlotWidget::_action_data_statistics
private

Definition at line 171 of file plotwidget.h.

◆ _action_edit

QAction* PlotWidget::_action_edit
private

Definition at line 167 of file plotwidget.h.

◆ _action_formula

QAction* PlotWidget::_action_formula
private

Definition at line 168 of file plotwidget.h.

◆ _action_image_to_clipboard

QAction* PlotWidget::_action_image_to_clipboard
private

Definition at line 179 of file plotwidget.h.

◆ _action_paste

QAction* PlotWidget::_action_paste
private

Definition at line 178 of file plotwidget.h.

◆ _action_removeAllCurves

QAction* PlotWidget::_action_removeAllCurves
private

Definition at line 166 of file plotwidget.h.

◆ _action_saveToFile

QAction* PlotWidget::_action_saveToFile
private

Definition at line 176 of file plotwidget.h.

◆ _action_split_horizontal

QAction* PlotWidget::_action_split_horizontal
private

Definition at line 169 of file plotwidget.h.

◆ _action_split_vertical

QAction* PlotWidget::_action_split_vertical
private

Definition at line 170 of file plotwidget.h.

◆ _action_zoomOutHorizontally

QAction* PlotWidget::_action_zoomOutHorizontally
private

Definition at line 174 of file plotwidget.h.

◆ _action_zoomOutMaximum

QAction* PlotWidget::_action_zoomOutMaximum
private

Definition at line 173 of file plotwidget.h.

◆ _action_zoomOutVertically

QAction* PlotWidget::_action_zoomOutVertically
private

Definition at line 175 of file plotwidget.h.

◆ _background_item

std::unique_ptr<BackgroundColorItem> PlotWidget::_background_item
private

Definition at line 189 of file plotwidget.h.

◆ _context_menu_enabled

bool PlotWidget::_context_menu_enabled
private

Definition at line 228 of file plotwidget.h.

◆ _custom_Y_limits

Range PlotWidget::_custom_Y_limits
private

Definition at line 222 of file plotwidget.h.

◆ _dragging

DragInfo PlotWidget::_dragging
private

Definition at line 207 of file plotwidget.h.

◆ _flip_x

QAction* PlotWidget::_flip_x
private

Definition at line 181 of file plotwidget.h.

◆ _flip_y

QAction* PlotWidget::_flip_y
private

Definition at line 182 of file plotwidget.h.

◆ _grid

QwtPlotGrid* PlotWidget::_grid
private

Definition at line 185 of file plotwidget.h.

◆ _mapped_data

PlotDataMapRef& PlotWidget::_mapped_data
protected

Definition at line 86 of file plotwidget.h.

◆ _snippets

SnippetsMap PlotWidget::_snippets
private

Definition at line 226 of file plotwidget.h.

◆ _statistics_dialog

StatisticsDialog* PlotWidget::_statistics_dialog = nullptr
private

Definition at line 193 of file plotwidget.h.

◆ _statistics_window_title

QString PlotWidget::_statistics_window_title = ""
private

Definition at line 187 of file plotwidget.h.

◆ _time_offset

double PlotWidget::_time_offset
private

Definition at line 220 of file plotwidget.h.

◆ _tracker

CurveTracker* PlotWidget::_tracker
private

Definition at line 184 of file plotwidget.h.

◆ _transform_select_dialog

TransformSelector* PlotWidget::_transform_select_dialog
private

Definition at line 224 of file plotwidget.h.

◆ _use_date_time_scale

bool PlotWidget::_use_date_time_scale
private

Definition at line 191 of file plotwidget.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:29