#include <plotwidget.h>
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 |
void | setTrackerPosition (double abs_time) |
void | updateCurves () |
void | zoomOut (bool emit_signal) |
Public Slots inherited from QwtPlot | |
void | autoRefresh () |
Replots the plot if autoReplot() is true . More... | |
virtual void | replot () |
Redraw the plot. More... | |
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 () |
Signals inherited from QwtPlot | |
void | itemAttached (QwtPlotItem *plotItem, bool on) |
void | legendDataChanged (const QVariant &itemInfo, const QList< QwtLegendData > &data) |
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 PlotLegend * | legend () 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. More... | |
bool | xmlLoadState (QDomElement &element) |
QDomElement | xmlSaveState (QDomDocument &doc) const |
virtual | ~PlotWidget () override |
Public Member Functions inherited from QwtPlot | |
void | applyProperties (const QString &) |
bool | autoReplot () const |
bool | axisAutoScale (int axisId) const |
bool | axisEnabled (int axisId) const |
QFont | axisFont (int axisId) const |
QwtInterval | axisInterval (int axisId) const |
Return the current interval of the specified axis. More... | |
int | axisMaxMajor (int axisId) const |
int | axisMaxMinor (int axisId) const |
const QwtScaleDiv & | axisScaleDiv (int axisId) const |
Return the scale division of a specified axis. More... | |
const QwtScaleDraw * | axisScaleDraw (int axisId) const |
Return the scale draw of a specified axis. More... | |
QwtScaleDraw * | axisScaleDraw (int axisId) |
Return the scale draw of a specified axis. More... | |
QwtScaleEngine * | axisScaleEngine (int axisId) |
const QwtScaleEngine * | axisScaleEngine (int axisId) const |
double | axisStepSize (int axisId) const |
Return the step size parameter that has been set in setAxisScale. More... | |
QwtText | axisTitle (int axisId) const |
const QwtScaleWidget * | axisWidget (int axisId) const |
QwtScaleWidget * | axisWidget (int axisId) |
QWidget * | canvas () |
const QWidget * | canvas () const |
QBrush | canvasBackground () const |
virtual QwtScaleMap | canvasMap (int axisId) const |
virtual void | drawCanvas (QPainter *) |
virtual void | drawItems (QPainter *, const QRectF &, const QwtScaleMap maps[axisCnt]) const |
void | enableAxis (int axisId, bool tf=true) |
Enable or disable a specified axis. More... | |
virtual bool | event (QEvent *) |
Adds handling of layout requests. More... | |
QwtText | footer () const |
QwtTextLabel * | footerLabel () |
const QwtTextLabel * | footerLabel () const |
virtual void | getCanvasMarginsHint (const QwtScaleMap maps[], const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const |
Calculate the canvas margins. More... | |
QString | grabProperties () const |
virtual QwtPlotItem * | infoToItem (const QVariant &) const |
Identify the plot item according to an item info object, that has bee generated from itemToInfo(). More... | |
void | insertLegend (QwtAbstractLegend *, LegendPosition=QwtPlot::RightLegend, double ratio=-1.0) |
Insert a legend. More... | |
double | invTransform (int axisId, int pos) const |
virtual QVariant | itemToInfo (QwtPlotItem *) const |
Build an information, that can be used to identify a plot item on the legend. More... | |
QwtAbstractLegend * | legend () |
const QwtAbstractLegend * | legend () const |
virtual QSize | minimumSizeHint () const |
Return a minimum size hint. More... | |
QwtPlotLayout * | plotLayout () |
const QwtPlotLayout * | plotLayout () const |
QwtPlot (QWidget *=NULL) | |
Constructor. More... | |
QwtPlot (const QwtText &title, QWidget *=NULL) | |
Constructor. More... | |
void | setAutoReplot (bool=true) |
Set or reset the autoReplot option. More... | |
void | setAxisAutoScale (int axisId, bool on=true) |
Enable autoscaling for a specified axis. More... | |
void | setAxisFont (int axisId, const QFont &f) |
Change the font of an axis. More... | |
void | setAxisLabelAlignment (int axisId, Qt::Alignment) |
void | setAxisLabelRotation (int axisId, double rotation) |
void | setAxisMaxMajor (int axisId, int maxMajor) |
void | setAxisMaxMinor (int axisId, int maxMinor) |
void | setAxisScale (int axisId, double min, double max, double step=0) |
Disable autoscaling and specify a fixed scale for a selected axis. More... | |
void | setAxisScaleDiv (int axisId, const QwtScaleDiv &) |
Disable autoscaling and specify a fixed scale for a selected axis. More... | |
void | setAxisScaleDraw (int axisId, QwtScaleDraw *) |
Set a scale draw. More... | |
void | setAxisScaleEngine (int axisId, QwtScaleEngine *) |
void | setAxisTitle (int axisId, const QString &) |
Change the title of a specified axis. More... | |
void | setAxisTitle (int axisId, const QwtText &) |
Change the title of a specified axis. More... | |
void | setCanvas (QWidget *) |
Set the drawing canvas of the plot widget. More... | |
void | setCanvasBackground (const QBrush &) |
Change the background of the plotting area. More... | |
void | setFooter (const QString &) |
void | setFooter (const QwtText &t) |
void | setPlotLayout (QwtPlotLayout *) |
Assign a new plot layout. More... | |
void | setTitle (const QString &) |
void | setTitle (const QwtText &t) |
virtual QSize | sizeHint () const |
QwtText | title () const |
QwtTextLabel * | titleLabel () |
const QwtTextLabel * | titleLabel () const |
double | transform (int axisId, double value) const |
Transform a value into a coordinate in the plotting region. More... | |
void | updateAxes () |
Rebuild the axes scales. More... | |
void | updateCanvasMargins () |
Update the canvas margins. More... | |
void | updateLegend () |
void | updateLegend (const QwtPlotItem *) |
virtual | ~QwtPlot () |
Destructor. More... | |
Public Member Functions inherited from QwtPlotDict | |
bool | autoDelete () const |
void | detachItems (int rtti=QwtPlotItem::Rtti_PlotItem, bool autoDelete=true) |
const QwtPlotItemList & | itemList () const |
A QwtPlotItemList of all attached plot items. More... | |
QwtPlotItemList | itemList (int rtti) const |
QwtPlotDict () | |
void | setAutoDelete (bool) |
virtual | ~QwtPlotDict () |
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. More... | |
Protected Member Functions inherited from QwtPlotDict | |
void | insertItem (QwtPlotItem *) |
void | removeItem (QwtPlotItem *) |
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 () |
DataSeriesBase * | createSeriesData (const QString &ID, const PlotData *data) |
void | rescaleEqualAxisScaling () |
void | setDefaultRangeX () |
void | transformCustomCurves () |
void | updateAvailableTransformers () |
void | updateMaximumZoomArea () |
Additional Inherited Members | |
Public Types inherited from QwtPlot | |
enum | Axis { yLeft, yRight, xBottom, xTop, axisCnt } |
Axis index. More... | |
enum | LegendPosition { LeftLegend, RightLegend, BottomLegend, TopLegend } |
Static Protected Member Functions inherited from QwtPlot | |
static bool | axisValid (int axisId) |
Properties inherited from QwtPlot | |
bool | autoReplot |
QBrush | canvasBackground |
Definition at line 28 of file plotwidget.h.
PlotWidget::PlotWidget | ( | PlotDataMapRef & | datamap, |
QWidget * | parent = nullptr |
||
) |
Definition at line 64 of file plotwidget.cpp.
|
overridevirtual |
Definition at line 361 of file plotwidget.cpp.
|
slot |
Definition at line 1018 of file plotwidget.cpp.
|
slot |
Definition at line 1013 of file plotwidget.cpp.
|
private |
Definition at line 366 of file plotwidget.cpp.
|
private |
Definition at line 164 of file plotwidget.cpp.
|
private |
Definition at line 330 of file plotwidget.cpp.
QRectF PlotWidget::canvasBoundingRect | ( | ) | const |
Definition at line 821 of file plotwidget.cpp.
|
privateslot |
Definition at line 286 of file plotwidget.cpp.
|
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.
|
slot |
Definition at line 1027 of file plotwidget.cpp.
|
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.
|
signal |
|
signal |
|
slot |
Definition at line 593 of file plotwidget.cpp.
|
overrideprotected |
Definition at line 483 of file plotwidget.cpp.
|
overrideprotected |
Definition at line 528 of file plotwidget.cpp.
|
overrideprotected |
Definition at line 543 of file plotwidget.cpp.
|
slot |
Definition at line 1032 of file plotwidget.cpp.
|
overrideprotectedvirtual |
Event filter.
The plot handles the following events for the canvas:
object | Object to be filtered |
event | Event |
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.
bool PlotWidget::isEmpty | ( | ) | const |
Definition at line 473 of file plotwidget.cpp.
bool PlotWidget::isLegendVisible | ( | ) | const |
Definition at line 1878 of file plotwidget.cpp.
bool PlotWidget::isXYPlot | ( | ) | const |
Definition at line 1368 of file plotwidget.cpp.
bool PlotWidget::isZoomEnabled | ( | ) | const |
Definition at line 1897 of file plotwidget.cpp.
|
privateslot |
Definition at line 1203 of file plotwidget.cpp.
|
inline |
Definition at line 60 of file plotwidget.h.
|
signal |
|
privateslot |
Definition at line 1246 of file plotwidget.cpp.
|
privateslot |
Definition at line 1222 of file plotwidget.cpp.
|
slot |
Definition at line 1078 of file plotwidget.cpp.
|
slot |
Definition at line 1056 of file plotwidget.cpp.
|
privateslot |
Definition at line 1336 of file plotwidget.cpp.
|
privateslot |
Definition at line 1374 of file plotwidget.cpp.
|
privateslot |
Definition at line 1489 of file plotwidget.cpp.
|
privateslot |
Definition at line 1569 of file plotwidget.cpp.
|
privateslot |
Definition at line 1284 of file plotwidget.cpp.
|
slot |
Definition at line 614 of file plotwidget.cpp.
|
privateslot |
Definition at line 1541 of file plotwidget.cpp.
|
privateslot |
Definition at line 1260 of file plotwidget.cpp.
|
slot |
Definition at line 1314 of file plotwidget.cpp.
|
slot |
Definition at line 1325 of file plotwidget.cpp.
|
signal |
void PlotWidget::reloadPlotData | ( | ) |
Definition at line 980 of file plotwidget.cpp.
|
slot |
Definition at line 426 of file plotwidget.cpp.
|
overrideslot |
Definition at line 1904 of file plotwidget.cpp.
|
private |
Definition at line 874 of file plotwidget.cpp.
|
overridevirtual |
Resize and update internal layout
e | Resize event |
Reimplemented from QwtPlot.
Definition at line 919 of file plotwidget.cpp.
void PlotWidget::setConstantRatioXY | ( | bool | active | ) |
Definition at line 936 of file plotwidget.cpp.
|
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.
|
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.
|
signal |
|
signal |
|
private |
Definition at line 1440 of file plotwidget.cpp.
|
signal |
|
private |
Definition at line 1429 of file plotwidget.cpp.
|
slot |
Definition at line 1193 of file plotwidget.cpp.
|
overridevirtual |
Adjust plot content to its current size.
Reimplemented from QwtPlot.
Definition at line 930 of file plotwidget.cpp.
|
private |
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.
|
slot |
Definition at line 1302 of file plotwidget.cpp.
|
private |
Definition at line 167 of file plotwidget.h.
|
private |
Definition at line 168 of file plotwidget.h.
|
private |
Definition at line 161 of file plotwidget.h.
|
private |
Definition at line 170 of file plotwidget.h.
|
private |
Definition at line 172 of file plotwidget.h.
|
private |
Definition at line 166 of file plotwidget.h.
|
private |
Definition at line 169 of file plotwidget.h.
|
private |
Definition at line 160 of file plotwidget.h.
|
private |
Definition at line 159 of file plotwidget.h.
|
private |
Definition at line 171 of file plotwidget.h.
|
private |
Definition at line 162 of file plotwidget.h.
|
private |
Definition at line 164 of file plotwidget.h.
|
private |
Definition at line 163 of file plotwidget.h.
|
private |
Definition at line 165 of file plotwidget.h.
|
private |
Definition at line 217 of file plotwidget.h.
|
private |
Definition at line 213 of file plotwidget.h.
|
private |
Definition at line 156 of file plotwidget.h.
|
private |
Definition at line 205 of file plotwidget.h.
|
private |
Definition at line 187 of file plotwidget.h.
|
private |
Definition at line 215 of file plotwidget.h.
|
private |
Definition at line 186 of file plotwidget.h.
|
private |
Definition at line 195 of file plotwidget.h.
|
private |
Definition at line 181 of file plotwidget.h.
|
private |
Definition at line 225 of file plotwidget.h.
|
private |
Definition at line 180 of file plotwidget.h.
|
private |
Definition at line 175 of file plotwidget.h.
|
private |
Definition at line 185 of file plotwidget.h.
|
private |
Definition at line 227 of file plotwidget.h.
|
private |
Definition at line 176 of file plotwidget.h.
|
private |
Definition at line 177 of file plotwidget.h.
|
private |
Definition at line 157 of file plotwidget.h.
|
private |
Definition at line 221 of file plotwidget.h.
|
private |
Definition at line 211 of file plotwidget.h.
|
private |
Definition at line 179 of file plotwidget.h.
|
private |
Definition at line 219 of file plotwidget.h.
|
private |
Definition at line 183 of file plotwidget.h.
|
private |
Definition at line 223 of file plotwidget.h.
|
private |
Definition at line 174 of file plotwidget.h.