JKQTPlotter
an extensive Qt4/Qt5 Plotter framework (including a fast variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
SpeedTestPlot Class Reference

#include <speedtestplot.h>

Inheritance diagram for SpeedTestPlot:
Collaboration diagram for SpeedTestPlot:

Public Slots

void plotNewData ()
 
- Public Slots inherited from JKQTPlotter
void copyData ()
 copy displayed data to cpliboard More...
 
void copyDataMatlab ()
 copy displayed data to cpliboard in Matlab syntax More...
 
void openContextMenu ()
 open the context menu at the mouse position of the last click More...
 
void openContextMenu (int x, int y)
 open the context menu at the mouse position x and y More...
 
void openSpecialContextMenu ()
 open the special context menu at the mouse position of the last click More...
 
void openSpecialContextMenu (int x, int y)
 open the special context menu at the mouse position x and y More...
 
void openStandardAndSpecialContextMenu ()
 open the standard context menu with the special context menu integrated at the mouse position of the last click More...
 
void openStandardAndSpecialContextMenu (int x, int y)
 open the standard context menu with the special context menu integrated at the mouse position x and y More...
 
void openStandardContextMenu ()
 open the standard context menu at the mouse position of the last click More...
 
void openStandardContextMenu (int x, int y)
 open the standard context menu at the mouse position x and y More...
 
void populateToolbar (QToolBar *toolbar) const
 popuplate the given toolbar toolbar with all actions shown in a toolbar from this class ... More...
 
void print (QPrinter *printer=nullptr)
 print the current plot, if printer is nullptr a printer selection dialog is displayed More...
 
void redrawOverlays ()
 replot overlays only (use redrawPlot() to replot the plot and the overlays) More...
 
void redrawPlot ()
 update the plot and the overlays More...
 
void saveData (const QString &filename=QString(""), const QString &format=QString(""))
 save the data used for the current plot. The file format is extracted from the file extension (csv, ...) More...
 
void saveImage (const QString &filename=QString(""), bool displayPreview=true)
 save the current plot as an image file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed. The image format is extracted from the file extension (jpeg, tiff, png, pdf, ...) More...
 
void setAbsoluteX (double xminn, double xmaxx)
 sets absolutely limiting x-range of the plot More...
 
void setAbsoluteXY (double xminn, double xmaxx, double yminn, double ymaxx)
 sets absolutely limiting x- and y-range of the plot More...
 
void setAbsoluteY (double yminn, double ymaxx)
 sets absolute minimum and maximum y-value to plot More...
 
void setContextMenuMode (JKQTPContextMenuModes mode)
 sets the mode if the standard context menu More...
 
void setGrid (bool val)
 sets whether to plot grid lines or not More...
 
void setGridColor (QColor color)
 sets the color of all Major grid lines More...
 
void setGridStyle (Qt::PenStyle __value)
 sets the style of all Major grid lines More...
 
void setGridWidth (double __value)
 sets the width of all Major grid lines More...
 
void setMagnification (double m)
 set the current plot magnification More...
 
void setMaxTooltipDistance (int v)
 maximum distance at which a tooltip for a point is still displayed, when the user action jkqtpmdaToolTipForClosestDataPoint is executed More...
 
void setMinorGridColor (QColor color)
 sets the color of all minor grid lines More...
 
void setMinorGridStyle (Qt::PenStyle __value)
 sets the style of all minor grid lines More...
 
void setMinorGridWidth (double __value)
 sets the width of all minor grid lines More...
 
void setMouseActionToolbarActionsActive (bool __value)
 allows to activate/deactivate toolbar buttons that can activate certain mouse drag actions More...
 
void setMousePositionShown (bool __value)
 specifies whether to display the current position of the mouse in the top border of the plot (this may automatically extent the top border, so the position fits in. The default widget font is used for the output. More...
 
void setShowZeroAxes (bool showX, bool showY)
 switches the visibility of the zero-axes associated with the x- and y-axis More...
 
void setShowZeroAxes (bool showXY)
 switches the visibility of the zero-axes associated with the x- and y-axis More...
 
void setToolbarAlwaysOn (bool __value)
 returns whether the toolbar is always visible or only when the mouse moves to the upper left area More...
 
void setToolbarEnabled (bool __value)
 returns whether the toolbar is enabled More...
 
void setUserActionCatchSensitivity (int v)
 sensitivity (i.e. max. distance to see as one point) for user actions More...
 
void setUserActionMarkerBrush (const QBrush &__value)
 pen for location markers of user actions on the plot More...
 
void setUserActionMarkerDiameter (int v)
 size (diameter) of markers drawn by user actions More...
 
void setUserActionMarkerPen (const QPen &__value)
 pen for location markers of user actions on the plot More...
 
void setUserActionMarkerType (JKQTPUserActionMarkerType v)
 type of the location markers of user actions on the plot More...
 
void setUserActionOpaqueBrush (const QBrush &__value)
 pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips) More...
 
void setUserActionOpaquePen (const QPen &__value)
 pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips) More...
 
void setUserActionOverlayBrush (const QBrush &__value)
 pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles) More...
 
void setUserActionOverlayPen (const QPen &__value)
 pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles) More...
 
void setX (double xminn, double xmaxx)
 sets the x-range of the plot (minimum and maximum x-value on the x-axis) More...
 
void setXY (double xminn, double xmaxx, double yminn, double ymaxx)
 sets the x- and y-range of the plot (minimum and maximum values on the x-/y-axis) More...
 
void setY (double yminn, double ymaxx)
 sets the y-range of the plot (minimum and maximum y-value on the y-axis) More...
 
void synchronizeXAxis (double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter *sender)
 may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis More...
 
void synchronizeXYAxis (double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter *sender)
 may be connected to zoomChangedLocally() of a different plot and synchronizes the local x- and y-axis to the other x- and y-axis More...
 
void synchronizeYAxis (double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter *sender)
 may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis More...
 
void zoom (double nxmin, double nxmax, double nymin, double nymax)
 sets x/ymin and x/ymax to the supplied values and replots the graph (zoom operation!) More...
 
void zoomIn (double factor=2.0)
 zooms into the graph (the same as turning the mouse wheel) by the given factor More...
 
void zoomOut (double factor=2.0)
 zooms out of the graph (the same as turning the mouse wheel) by the given factor More...
 
void zoomToFit (bool zoomX=true, bool zoomY=true, bool includeX0=false, bool includeY0=false, double scaleX=1.05, double scaleY=1.05)
 this method zooms the graph so that all plotted datapoints are visible. More...
 

Public Member Functions

 SpeedTestPlot ()
 
virtual ~SpeedTestPlot ()
 
- Public Member Functions inherited from JKQTPlotter
 JKQTPlotter (bool datastore_internal, QWidget *parent=nullptr, JKQTPDatastore *datast=nullptr)
 class constructor More...
 
 JKQTPlotter (JKQTPDatastore *datast, QWidget *parent=nullptr)
 class constructor for a JKQTPlotter using an external JKQTPDatastore dataset More...
 
 JKQTPlotter (QWidget *parent=nullptr)
 class constructor More...
 
virtual ~JKQTPlotter ()
 class destructor More...
 
size_t addGraph (JKQTPPlotElement *gr)
 add a new graph, returns it's position in the graphs list More...
 
template<class TJKQTPGraphContainer >
void addGraphs (const TJKQTPGraphContainer &gr, QVector< size_t > *graphIDsOut=nullptr)
 add a new graphs from a QVector<JKQTPPlotElement*>, QList<JKQTPPlotElement*>, std::vector<JKQTPPlotElement*> ... or any standard-iterateable container with JKQTPPlotElement*-items More...
 
void addGridPrintingPlotter (size_t x, size_t y, JKQTPlotter *plotterOther)
 add a new plotter plotterOther for grid printing mode, at location x / y More...
 
void clearAllMouseWheelActions ()
 deletes all mouse-wheel actions More...
 
void clearAllRegisteredMouseDoubleClickActions ()
 clear all registered mouse double-click actions More...
 
void clearAllRegisteredMouseDragActions ()
 clear all registeres mouse drag actions More...
 
void clearGraphs (bool deleteGraphs=true)
 remove all plots More...
 
void clearGridPrintingPlotters ()
 clear all additional plotters for grid printing mode More...
 
bool containsGraph (JKQTPPlotElement *gr)
 returns true, if the given graph is present More...
 
void deleteGraph (JKQTPPlotElement *gr, bool deletegraph=true)
 remove the given graph, if it is contained More...
 
void deleteGraph (size_t i, bool deletegraph=true)
 remove the i-th graph More...
 
void deregisterMouseDoubleClickAction (Qt::MouseButton button, Qt::KeyboardModifiers modifier)
 deregisteres the mouse action action to be executed when a mouse double-click occurs with the given button and modifier More...
 
void deregisterMouseDragAction (Qt::MouseButton button, Qt::KeyboardModifiers modifier)
 deregisteres the mouse drag action to be executed when a mouse drag operation is initialized with the given button and modifier More...
 
void deregisterMouseWheelAction (Qt::KeyboardModifiers modifier)
 deletes all mouse-wheel actions registered for a given modifier More...
 
void forceInternalDatastore ()
 tells the plotter object to use an internal datastore (just like useInternalDatastore() ), but forces the generation of a new datastore, even if the current one is already internal (the current one will be freed in the lather case More...
 
double getAbsoluteXMax () const
 returns the absolute x-axis max More...
 
double getAbsoluteXMin () const
 returns the absolute x-axis min More...
 
double getAbsoluteYMax () const
 returns the absolute y-axis max More...
 
double getAbsoluteYMin () const
 returns the absolute y-axis min More...
 
QAction * getActMouseLeftAsDefault () const
 action that activates the default action, set in plotterStyle! More...
 
QAction * getActMouseLeftAsPanView () const
 action that activates the pan view tool (override!)
More...
 
QAction * getActMouseLeftAsRuler () const
 action that activates the ruler tool (override!) More...
 
QAction * getActMouseLeftAsToolTip () const
 action that activates the tooltip tool (override!)
More...
 
QAction * getActMouseLeftAsZoomRect () const
 action that activates the zoom rectangle tool (override!) More...
 
const JKQTBasePlottergetConstplotter () const
 returns the class internally used for plotting More...
 
JKQTPContextMenuModes getContextMenuMode () const
 returns the currently set mode for the context menu More...
 
const JKQTPlotterStylegetCurrentPlotterStyle () const
 current style properties for this JKQTPlotter More...
 
JKQTPDatastoregetDatastore ()
 returns a pointer to the datastore used by this object More...
 
JKQTPPlotElementgetGraph (size_t i)
 returns the i -th graph (of type JKQTPPlotElement) in this plotter instance More...
 
size_t getGraphCount ()
 returns the number of graphs More...
 
double getKeyFontSize () const
 font size for key labels [in points] More...
 
double getMagnification () const
 returns the current magnification factor More...
 
int getMaxTooltipDistance () const
 maximum distance at which a tooltip for a point is still displayed, when the user action jkqtpmdaToolTipForClosestDataPoint is executed More...
 
double getMouseContextX () const
 x-position of the mouse (in plot coordinates) when a user mouse-action was started (e.g. drawing a rectangle) More...
 
double getMouseContextY () const
 y-position of the mouse (in plot coordinates) when a user mouse-action was started (e.g. drawing a rectangle) More...
 
int getMouseLastClickX () const
 x-position of the last mouse-click (in screen pixels) More...
 
int getMouseLastClickY () const
 y-position of the last mouse-click (in screen pixels) More...
 
int getNextStyle ()
 gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles More...
 
JKQTBasePlotter::JKQTPPen getPlotStyle (int i) const
 returns a QPen object for the i-th plot style More...
 
JKQTBasePlottergetPlotter () const
 returns the class internally used for plotting More...
 
QMenu * getSpecialContextMenu () const
 returns the currently set special context menu object More...
 
int getToolbarIconSize ()
 get the width/height of the icons in the toolbar in pt More...
 
int getUserActionCatchSensitivity () const
 sensitivity (i.e. max. distance to see as one point) for user actions More...
 
QBrush getUserActionMarkerBrush () const
 brush for location markers of user actions on the plot More...
 
int getUserActionMarkerDiameter () const
 size (diameter) of markers drawn by user actions More...
 
QPen getUserActionMarkerPen () const
 pen for location markers of user actions on the plot More...
 
JKQTPUserActionMarkerType getUserActionMarkerType () const
 type of the location markers of user actions on the plot More...
 
QBrush getUserActionOpaqueBrush () const
 brush for user actions that cover parts of the plot (typically opaque, like e.g. tooltips) More...
 
QPen getUserActionOpaquePen () const
 pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips) More...
 
QBrush getUserActionOverlayBrush () const
 brush for user actions (typically semi-transparent, like e.g. zoom-rectangles) More...
 
QPen getUserActionOverlayPen () const
 pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles) More...
 
JKQTPHorizontalAxisgetXAxis ()
 returns the coordinate axis object for the x-axis More...
 
const JKQTPHorizontalAxisgetXAxis () const
 returns the coordinate axis object for the x-axis as a const pointer More...
 
double getXMax () const
 returns the current x-axis max More...
 
double getXMin () const
 returns the current x-axis min More...
 
JKQTPVerticalAxisgetYAxis ()
 returns the coordinate axis object for the y-axis More...
 
const JKQTPVerticalAxisgetYAxis () const
 returns the coordinate axis object for the y-axis as a const pointer More...
 
double getYMax () const
 returns the current y-axis max More...
 
double getYMin () const
 returns the current y-axis min More...
 
bool isEmittingSignalsEnabled ()
 returns whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() More...
 
bool isMousePositionShown () const
 specifies whether to display the current position of the mouse in the top border of the plot (this may automatically extent the top border, so the position fits in. The default widget font is used for the output. More...
 
bool isPlotUpdateEnabled () const
 returns, whether automatic redrawing the plot is currently activated (e.g. you can deactivate this with setPlotUpdateEnabled() while performing major updates on the plot) More...
 
bool isToolbarAlwaysOn () const
 returns whether the toolbar is always visible or only when the mouse moves to the upper left area More...
 
bool isToolbarEnabled () const
 returns whether the toolbar is enabled More...
 
void loadCurrentPlotterStyle (const QSettings &settings, const QString &group="plot/", bool alsoLoadBaseStyle=true)
 replace the current style properties for this JKQTBasePlotter with properties loaded from settings More...
 
void loadSettings (const QSettings &settings, const QString &group=QString("plots/"))
 loads the plot properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object More...
 
QSize minimumSizeHint () const
 returns the minimum size of the widget More...
 
size_t moveGraphBottom (JKQTPPlotElement *gr)
 move the given graph to the top, or add it, if it is not yet contained More...
 
size_t moveGraphTop (JKQTPPlotElement *gr)
 move the given graph to the top, or add it, if it is not yet contained More...
 
void registerMouseDoubleClickAction (Qt::MouseButton button, Qt::KeyboardModifiers modifier, JKQTPMouseDoubleClickActions action)
 registeres a certain mouse action action to be executed when a mouse double-click occurs with the given button and modifier More...
 
void registerMouseDragAction (Qt::MouseButton button, Qt::KeyboardModifiers modifier, JKQTPMouseDragActions action)
 registeres a certain mouse drag action action to be executed when a mouse drag operation is initialized with the given button and modifier More...
 
void registerMouseWheelAction (Qt::KeyboardModifiers modifier, JKQTPMouseWheelActions action)
 specifies the action to perform on a mouse wheel event when a given modifier is pressed More...
 
void resetMasterSynchronization (JKQTBasePlotter::SynchronizationDirection synchronizeDirection=JKQTBasePlotter::sdXYAxes)
 switches any synchronization off, that has been created by synchronizeToMaster() More...
 
void saveCurrentPlotterStyle (QSettings &settings, const QString &group="plot/", bool alsoSaveBaseStyle=true) const
 store the current style properties for this JKQTBasePlotter with properties loaded from settings More...
 
void saveSettings (QSettings &settings, const QString &group=QString("plots/")) const
 saves the plot properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object. More...
 
void setCurrentPlotterStyle (const JKQTPlotterStyle &style)
 replace the current style properties for this JKQTBasePlotter More...
 
void setCurrentPlotterStyle (const JKQTPlotterStyle &style, const JKQTBasePlotterStyle &baseStyle)
 replace the current style properties for this JKQTBasePlotter More...
 
void setEmittingSignalsEnabled (bool sig)
 specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() More...
 
void setGridPrinting (bool enabled)
 enables grid-printing for this plot More...
 
void setGridPrintingCurrentPos (size_t x, size_t y)
 set the x- and y-positions of this JKQTPlotter in the grid-printing grid More...
 
void setGridPrintingCurrentX (size_t x)
 set the x-position of this JKQTPlotter in the grid-printing grid More...
 
void setGridPrintingCurrentY (size_t y)
 set the y-position of this JKQTPlotter in the grid-printing grid More...
 
void setPlotUpdateEnabled (bool enable)
 sets whether automatic redrawing the plot is currently activated (e.g. you can sett his to false while performing major updates on the plot) More...
 
void setSpecialContextMenu (QMenu *menu)
 sets a QMenu object to be used as special context menu More...
 
void setToolbarIconSize (int value)
 set the width/height of the icons in the toolbar in pt More...
 
QSize sizeHint () const
 returns the size of the widget More...
 
void synchronizeToMaster (JKQTPlotter *master, JKQTBasePlotter::SynchronizationDirection synchronizeDirection, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true)
 synchronize the plot borders (and zooming) with a given plotter (master --> slave/this) More...
 
void synchronizeXToMaster (JKQTPlotter *master, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true)
 synchronize the plot x-axis width (and x-zooming) with a given master plotter (master --> slave/this) More...
 
void synchronizeYToMaster (JKQTPlotter *master, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true)
 synchronize the plot y-axis height (and y-zooming) with a given master plotter (master --> slave/this) More...
 
void updateToolbarActions ()
 
void useAsInternalDatastore (JKQTPDatastore *newStore)
 tells the plotter object to use the given external datastore and treat it as an internal one (i.e. free it when the plotter object ist destroyed. More...
 
void useExternalDatastore (JKQTPDatastore *newStore)
 tells the plotter object to use the given external datastore. More...
 
void useInternalDatastore ()
 tells the plotter object to use an internal datastore. A new internal datastore object is generated only if the current datastore is not internal. More...
 

Protected Attributes

QAction * actAntiAliase
 
QAction * actFixedXAxis
 
QAction * actTwoGraphs
 
const double dx
 
std::chrono::system_clock::time_point t_lastplot
 
std::array< double, NDATA > X
 
double x0
 
std::array< double, NDATA > Y
 
std::array< double, NDATA > Y2
 
- Protected Attributes inherited from JKQTPlotter
QActionGroup * actgrpMouseLeft
 action group, that groups the actMouseLeft... actions More...
 
QAction * actMouseLeftAsDefault
 action that activates the default action, set in plotterStyle! More...
 
QAction * actMouseLeftAsPanView
 action that activates the pan view tool (override!)
More...
 
QAction * actMouseLeftAsRuler
 action that activates the ruler tool (override!) More...
 
QAction * actMouseLeftAsToolTip
 action that activates the tooltip tool (override!)
More...
 
QAction * actMouseLeftAsZoomRect
 action that activates the zoom rectangle tool (override!) More...
 
QMenu * contextMenu
 the context menu object used by this JKQTPlotter More...
 
JKQTPContextMenuModes contextMenuMode
 current mode for the default context menu (i.e. the right-click context menu) More...
 
QList< QMenu * > contextSubMenus
 internal storage for sub-menu entries of the internal contextMenu object, based on the actions returned by JKQTBasePlotter::getLstAdditionalPlotterActions() More...
 
MouseDragAction currentMouseDragAction
 the currently executed MouseDragAction More...
 
bool doDrawing
 indicates whether the plot is updated automatically at the moment More...
 
QImage image
 this stores the currently displayed plot More...
 
QImage imageNoOverlays
 this stores the currently displayed plot More...
 
double magnification
 magnification factor for the display of the plot More...
 
QPointer< JKQTPlottermasterPlotterX
 the master plotter, this plotter is connected to in x-direction. More...
 
QPointer< JKQTPlottermasterPlotterY
 the master plotter, this plotter is connected to in y-direction. More...
 
QMenu * menuSpecialContextMenu
 use this QMenu instance instead of the standard context menu of this widget More...
 
QSize minSize
 current minimal size of the JKQTPlotter widget to properly display the plot More...
 
double mouseContextX
 x-position of the mouse (in plot coordinates) when a user mouse-action was started (e.g. drawing a rectangle) More...
 
double mouseContextY
 y-position of the mouse (in plot coordinates) when a user mouse-action was started (e.g. drawing a rectangle) More...
 
bool mouseDragingRectangle
 this is set true if we are drawing a zoom rectangle More...
 
QList< MouseDragMarkermouseDragMarkers
 internal list of markers to be drawn by paintUserAction() More...
 
double mouseDragRectXEnd
 when draging the mouse this contains the x-coordinate the mouse is currently pointing to More...
 
int mouseDragRectXEndPixel
 when draging the mouse this contains the x-coordinate the mouse is currently pointing to (in pixels) More...
 
double mouseDragRectXStart
 when draging the mouse this contains the x-coordinate the user clicked on (in plot coordinates) More...
 
int mouseDragRectXStartPixel
 when draging the mouse this contains the x-coordinate the user clicked on (in pixels) More...
 
double mouseDragRectYEnd
 when zooming by moving the mouse this contains the y-coordinate the mouse is currently pointing to More...
 
int mouseDragRectYEndPixel
 when draging the mouse this contains the y-coordinate the mouse is currently pointing to (in pixels) More...
 
double mouseDragRectYStart
 when draging the mouse this contains the y-coordinate the user clicked on (in plot coordinates) More...
 
int mouseDragRectYStartPixel
 when zooming by moving the mouse this contains the y-coordinate the user clicked on (in pixels) More...
 
int mouseLastClickX
 x-position of the last mouse-click (in screen pixels) More...
 
int mouseLastClickY
 y-position of the last mouse-click (in screen pixels) More...
 
double mousePosX
 x-position of the mouse during the last mouseMoveEvent() calls (in plot coordinates) More...
 
double mousePosY
 y-position of the mouse during the last mouseMoveEvent() calls (in plot coordinates) More...
 
QImage oldImage
 this can be used when drawing a zoom rectangle to store an unchanged copy of the currently displayed image. More...
 
JKQTBasePlotterplotter
 JKQTBasePlotter used to plot. More...
 
JKQTPlotterStyle plotterStyle
 current style properties for this JKQTPlotter More...
 
JKQTPMouseDragActionsHashMap registeredOverrideMouseDragActionModes
 list of override mouse drag action modes, that override the settings ing plotterStyle.registeredMouseDragActionModes More...
 
QTimer resizeTimer
 timer used while the graph is resized to delay the redrawing with new size (in the meantime, an intermediate graphic is displayed) More...
 
JKVanishQToolBartoolbar
 toolbar class used for user input More...
 

Additional Inherited Members

- Signals inherited from JKQTPlotter
void beforePlotScalingRecalculate ()
 emitted before the plot scaling has been recalculated More...
 
void contextMenuOpened (double x, double y, QMenu *contextMenu)
 emitted whenever a context menu is opened. You can modify the menu via the parameter contextMenu! More...
 
void plotMouseClicked (double x, double y, Qt::KeyboardModifiers modifiers, Qt::MouseButton button)
 emitted when a single-click event from the mouse occurs inside the plot More...
 
void plotMouseDoubleClicked (double x, double y, Qt::KeyboardModifiers modifiers, Qt::MouseButton button)
 emitted when a double-click event from the mouse occurs inside the plot More...
 
void plotMouseMove (double x, double y)
 emitted whenever the mouse moves More...
 
void plotMouseWheelOperated (double x, double y, Qt::KeyboardModifiers modifiers, int deltaAngleX, int deltaAngleY)
 emitted when a single-click event from the mouse occurs inside the plot More...
 
void plotNewZoomRectangle (double mouseDragRectXStart, double mouseDragRectXEnd, double mouseDragRectYStart, double mouseDragRectYEnd, Qt::KeyboardModifiers modifiers)
 emitted when the mouse action jkqtpmdaZoomByRectangle and the drawing of the new zoom rectangle is finished (=mouse key released) More...
 
void plotScalingRecalculated ()
 emitted when the plot scaling has been recalculated More...
 
void rulerDisplayed (double x1, double y1, double x2, double y2, Qt::KeyboardModifiers modifiers)
 emitted when a new ruler between two points is displayed More...
 
void tooltipDisplayed (double x, double y, const QStringList &entries, const QList< JKQTPPlotElement * > &graphs)
 emitted when a tooltip for a datapoint is displayed More...
 
void userCircleFinished (double x, double y, double radius, Qt::KeyboardModifiers modifiers)
 emitted when the mouse action JKQTPlotter::CircleEvents and the drawing of the new circle is finished (=mouse key released) More...
 
void userEllipseFinished (double x, double y, double radiusX, double radiusY, Qt::KeyboardModifiers modifiers)
 emitted when the mouse action JKQTPlotter::EllipseEvents and the drawing of the new ellipse is finished (=mouse key released) More...
 
void userLineFinished (double x1, double y1, double x2, double y2, Qt::KeyboardModifiers modifiers)
 emitted when the mouse action JKQTPlotter::LineEvents and the drawing of the new line is finished (=mouse key released) More...
 
void userRectangleFinished (double x, double y, double width, double height, Qt::KeyboardModifiers modifiers)
 emitted when the mouse action JKQTPlotter::RectangleEvents and the drawing of the new rectangle is finished (=mouse key released) More...
 
void userScribbleClick (double x, double y, Qt::KeyboardModifiers modifiers, bool first, bool last)
 emitted when the mouse action JKQTPlotter::ScribbleEvents and a click event from the mouse occurs inside the plot, or the mouse moved while the left button is pressed down More...
 
void zoomChangedLocally (double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter *sender)
 signal: emitted whenever the user selects a new x-y zoom range (by mouse) More...
 
- Protected Slots inherited from JKQTPlotter
void delayedResizeEvent ()
 while the window is resized, the plot is only redrawn after a restartable delay, implemented by this function and resizeTimer More...
 
void intBeforePlotScalingRecalculate ()
 emitted before the plot scaling has been recalculated More...
 
void masterPlotScalingRecalculated ()
 connected to plotScalingRecalculated() of the masterPlotter More...
 
void pzoomChangedLocally (double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter *sender)
 called whenever the zoom changes in plotter More...
 
void reactGraphVisible (bool visible)
 called from a menu entry that encodes the graph ID More...
 
void resetMouseLeftAction ()
 resets any previously set override action for the left mouse-button, un-modified More...
 
void setMouseLeftActionAsPanView ()
 action that activates the pan viewport tool More...
 
void setMouseLeftActionAsRuler ()
 action that activates the ruler tool More...
 
void setMouseLeftActionAsToolTip ()
 action that activates the tooltip tool More...
 
void setMouseLeftActionAsZoomRect ()
 action that activates the zoom rectangle tool More...
 
- Protected Member Functions inherited from JKQTPlotter
void fillInternalStructForToolTipOfClosestDataPoint (double x0, double y0, bool emitEvent=true)
 fills the inertnal mouseDragMarkers structure with data to display tooltips close to (x0, y0) More...
 
JKQTPMouseDoubleClickActionsHashMapIterator findMatchingMouseDoubleClickAction (Qt::MouseButton button, Qt::KeyboardModifiers modifiers) const
 searches JKQTPlotterStyle::registeredMouseDoubleClickActions for a matching action More...
 
JKQTPMouseDragActionsHashMapIterator findMatchingMouseDragAction (Qt::MouseButton button, Qt::KeyboardModifiers modifiers, bool *found=nullptr) const
 searches JKQTPlotterStyle::registeredMouseActionModes for a matching action, returns in found whether an action was found More...
 
JKQTPMouseWheelActionsHashMapIterator findMatchingMouseWheelAction (Qt::KeyboardModifiers modifiers) const
 searches JKQTPlotterStyle::registeredMouseWheelActions for a matching action More...
 
void fixBasePlotterSettings ()
 modifies the settings of plotter to match those of this object More...
 
int getPlotYOffset ()
 calculate the y-axis shift of the plot, so there is space for the potentially displayed mouse position label More...
 
void initContextMenu ()
 fills the member contextMenu with all default and additionally registered actions, also calls modifyContextMenu() More...
 
void keyReleaseEvent (QKeyEvent *event)
 react on key presses. More...
 
void leaveEvent (QEvent *event)
 called, when the mouse leaves the widget, hides the toolbar (if visible) More...
 
void modifyContextMenu (QMenu *menu)
 you may overwrite this method to modify the given context menu before it is displayed. More...
 
void mouseDoubleClickEvent (QMouseEvent *event)
 event handler for a double click More...
 
void mouseMoveEvent (QMouseEvent *event)
 event handler for a mouse move More...
 
void mousePressEvent (QMouseEvent *event)
 event handler for a mouse down event More...
 
void mouseReleaseEvent (QMouseEvent *event)
 event handler for a mouse release event More...
 
void paintEvent (QPaintEvent *event)
 this simply paints the stored image to the widget's surface More...
 
void paintUserAction ()
 paint the user action (rectangle, ellipse, ... More...
 
void resetContextMenu (bool createnew=true)
 destroys the internal contextMenu and optionally creates a new one More...
 
void resetCurrentMouseDragAction ()
 resets the currently activated mouse drag action, e.g. called by mouseReleaseEvent() More...
 
void resetOverrideMouseDragAction (Qt::MouseButton button, Qt::KeyboardModifiers modifiers)
 removes a previously set override mouse drag action for the given button/modifiers combination More...
 
void resizeEvent (QResizeEvent *event)
 resizes the internal representation (image) of the graphs More...
 
void setOverrideMouseDragAction (Qt::MouseButton button, Qt::KeyboardModifiers modifiers, JKQTPMouseDragActions action)
 sets an override mouse drag action for the given button/modifiers combination More...
 
void updateCursor ()
 set the current mouse cursor shappe according to currentMouseDragAction More...
 
void updateToolbar ()
 update settings of the toolbar More...
 
void wheelEvent (QWheelEvent *event)
 event handler for a turn of the mouse wheel More...
 

Constructor & Destructor Documentation

◆ SpeedTestPlot()

SpeedTestPlot::SpeedTestPlot ( )

◆ ~SpeedTestPlot()

virtual SpeedTestPlot::~SpeedTestPlot ( )
virtual

Member Function Documentation

◆ plotNewData

void SpeedTestPlot::plotNewData ( )
slot

Member Data Documentation

◆ actAntiAliase

QAction* SpeedTestPlot::actAntiAliase
protected

◆ actFixedXAxis

QAction* SpeedTestPlot::actFixedXAxis
protected

◆ actTwoGraphs

QAction* SpeedTestPlot::actTwoGraphs
protected

◆ dx

const double SpeedTestPlot::dx
protected

◆ t_lastplot

std::chrono::system_clock::time_point SpeedTestPlot::t_lastplot
protected

◆ X

std::array<double, NDATA> SpeedTestPlot::X
protected

◆ x0

double SpeedTestPlot::x0
protected

◆ Y

std::array<double, NDATA> SpeedTestPlot::Y
protected

◆ Y2

std::array<double, NDATA> SpeedTestPlot::Y2
protected

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