35#include <QListWidgetItem>
45#include "jkqtplotter/jkqtpbaseplotter.h"
46#include "jkqtplotter/jkqtplotterstyle.h"
47#include "jkqtplotter/jkqtpbaseplotterstyle.h"
48#include "jkqtplotter/jkqtptools.h"
49#include "jkqtplotter/jkqtpgraphsbase.h"
50#include "jkqtplotter/jkqtplotter_imexport.h"
51#include "jkqtplotter/gui/jkvanishqtoolbar.h"
414 return plotter->getMainKey();
420 return plotter->getMainKey();
489 void loadSettings(
const QSettings &settings,
const QString& group=QString(
"plots/"));
495 void saveSettings(QSettings& settings,
const QString& group=QString(
"plots/"))
const;
545 void synchronizeXToMaster(
JKQTPlotter* master,
bool synchronizeAxisLength=
true,
bool synchronizeZoomingMasterToSlave=
true,
bool synchronizeZoomingSlaveToMaster=
true);
559 void synchronizeYToMaster(
JKQTPlotter* master,
bool synchronizeAxisLength=
true,
bool synchronizeZoomingMasterToSlave=
true,
bool synchronizeZoomingSlaveToMaster=
true);
724 return plotter->cbeginGraphs();
728 return plotter->cendGraphs();
733 return plotter->beginGraphs();
737 return plotter->endGraphs();
741 return plotter->beginGraphs();
745 return plotter->endGraphs();
749 plotter->modifyGraphs(func);
753 plotter->sortGraphs(compareLess);
757 return plotter->getGraphs();
761 return plotter->getGraphs();
772 inline void deleteGraph(
size_t i,
bool deletegraph=
true) { plotter->deleteGraph(i, deletegraph); }
781 inline void clearGraphs(
bool deleteGraphs=
true) { plotter->clearGraphs(deleteGraphs); }
815 template <
class TJKQTPGraphContainer>
816 inline void addGraphs(
const TJKQTPGraphContainer& gr, QVector<size_t>* graphIDsOut=
nullptr) { plotter->addGraphs(gr, graphIDsOut); }
820 inline double getXMin()
const {
return plotter->getXMin(); }
822 inline double getXMax()
const {
return plotter->getXMax(); }
824 inline double getYMin()
const {
return plotter->getYMin(); }
826 inline double getYMax()
const {
return plotter->getYMax(); }
841 return getPlotter()->getNextStyle();
846 return getConstplotter()->getPlotStyle(i);
912 return plotter->grabPixelImage(size,showPreview);
916 plotter->copyPixelImage(showPreview);
925 inline void zoom(
double xminn,
double xmaxn,
double yminn,
double ymaxn,
bool affectsSecondaryAxes=
false) {
926 plotter->zoom(xminn, xmaxn, yminn, ymaxn, affectsSecondaryAxes);
931 plotter->setGrid(val);
936 plotter->setGridColor(color);
942 plotter->setMinorGridColor(color);
948 plotter->setGridWidth(__value);
954 plotter->setMinorGridWidth(__value);
960 plotter->setGridStyle(__value);
966 plotter->setMinorGridStyle(__value);
975 plotter->setShowZeroAxes(showX, showY);
979 plotter->setShowZeroAxes(showXY);
983 inline bool saveImage(
const QString& filename=QString(
""),
bool displayPreview=
true) {
984 return plotter->saveImage(filename, displayPreview);
988 inline bool saveAsPixelImage(
const QString& filename=QString(
""),
bool displayPreview=
true,
const QByteArray &outputFormat=QByteArray(),
const QSize& outputSizeIncrease=QSize(0,0)) {
989 return plotter->saveAsPixelImage(filename, displayPreview, outputFormat, outputSizeIncrease);
992#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
994 inline bool saveAsSVG(
const QString& filename=QString(
""),
bool displayPreview=
true) {
return plotter->saveAsSVG(filename, displayPreview); }
996 inline bool saveAsPDF(
const QString& filename=QString(
""),
bool displayPreview=
true) {
return plotter->saveAsPDF(filename, displayPreview); }
1000 inline void saveAsCSV(
const QString& filename=QString(
"")) { plotter->saveAsCSV(filename); }
1002 inline void saveAsSemicolonSV(
const QString& filename=QString(
"")) { plotter->saveAsSemicolonSV(filename); }
1004 inline void saveAsTabSV(
const QString& filename=QString(
"")) { plotter->saveAsTabSV(filename); }
1006 inline void saveAsDIF(
const QString& filename=QString(
"")) { plotter->saveAsDIF(filename); }
1008 inline void saveAsSYLK(
const QString& filename=QString(
"")) { plotter->saveAsSYLK(filename); }
1010 inline void saveAsMatlab(
const QString& filename=QString(
"")) { plotter->saveAsMatlab(filename); }
1012 inline void saveAsGerExcelCSV(
const QString& filename=QString(
"")) { plotter->saveAsGerExcelCSV(filename); }
1016 inline void saveData(
const QString& filename=QString(
""),
const QString& format=QString(
"")) {
1017 plotter->saveData(filename, format);
1020#ifndef JKQTPLOTTER_COMPILE_WITHOUT_PRINTSUPPORT
1022 inline void print(QPrinter* printer=
nullptr) {
1023 plotter->print(printer);
1029 plotter->copyData();
1034 plotter->copyDataMatlab();
1039 inline void zoomToFit(
bool zoomX=
true,
bool zoomY=
true,
bool includeX0=
false,
bool includeY0=
false,
double scaleX=1.05,
double scaleY=1.05) {
1040 plotter->zoomToFit(zoomX, zoomY, includeX0, includeY0, scaleX, scaleY);
1044 inline void zoomIn(
double factor=2.0) { plotter->zoomIn(factor); }
1046 inline void zoomOut(
double factor=2.0) { plotter->zoomOut(factor); }
1152 inline void setAbsoluteX(
double xminn,
double xmaxx) { plotter->setAbsoluteX(xminn, xmaxx); }
1155 inline void setAbsoluteY(
double yminn,
double ymaxx) { plotter->setAbsoluteY(yminn, ymaxx); }
1158 inline void setAbsoluteXY(
double xminn,
double xmaxx,
double yminn,
double ymaxx) { plotter->setAbsoluteXY(xminn, xmaxx, yminn, ymaxx); }
1161 inline void setX(
double xminn,
double xmaxx) { plotter->setX(xminn, xmaxx); }
1164 inline void setY(
double yminn,
double ymaxx) { plotter->setY(yminn, ymaxx); }
1167 inline void setXY(
double xminn,
double xmaxx,
double yminn,
double ymaxx,
bool affectsSecondaryAxes=
false) { plotter->setXY(xminn, xmaxx, yminn, ymaxx, affectsSecondaryAxes); }
1182 void plotMouseClicked(
double x,
double y, Qt::KeyboardModifiers modifiers, Qt::MouseButton button);
1208 void plotNewZoomRectangle(
double mouseDragRectXStart,
double mouseDragRectXEnd,
double mouseDragRectYStart,
double mouseDragRectYEnd, Qt::KeyboardModifiers modifiers);
1302 void userLineFinished(
double x1,
double y1,
double x2,
double y2, Qt::KeyboardModifiers modifiers);
1319 void userEllipseFinished(
double x,
double y,
double radiusX,
double radiusY, Qt::KeyboardModifiers modifiers);
1327 void tooltipDisplayed(
double x,
double y,
const QStringList& entries,
const QList<JKQTPPlotElement*>& graphs);
1336 void rulerDisplayed(
double x1,
double y1,
double x2,
double y2, Qt::KeyboardModifiers modifiers);
1446 inline MouseDragMarker(
const QPoint& pos_,
const QString& label_,
const QString& title_,
const QColor& color_,
const QImage& keymarker_=QImage(),
JKQTPPlotElement* _graph=
nullptr):
1447 pos(pos_), label(label_), title(title_), color(color_), keyMarker(keymarker_), graph(_graph)
1678 virtual bool event(QEvent *event)
override;
1720#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
1721inline size_t qHash(
const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key,
size_t ) {
1723inline uint
qHash(
const QPair<Qt::MouseButton,Qt::KeyboardModifiers> &key, uint ) {
1735#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
1736inline size_t qHash(
const Qt::MouseButton &key,
size_t ) {
1738inline uint
qHash(
const Qt::MouseButton &key, uint ) {
1740 return qHash(
static_cast<uint
>(key),0);
1747#if QT_VERSION >= QT_VERSION_CHECK(6,0,0)
1748inline size_t qHash(
const Qt::KeyboardModifiers &key,
size_t ) {
1750inline uint
qHash(
const Qt::KeyboardModifiers &key, uint ) {
1752 return qHash(
static_cast<uint
>(key),0);
represents a pen, when plotting in JKQTPlotter/JKQTBasePlotter
Definition jkqtpbaseplotter.h:764
base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
Definition jkqtpbaseplotter.h:394
QVector< JKQTPPlotElement * > GraphsList
Definition jkqtpbaseplotter.h:487
SynchronizationDirection
denotes, which axes to synchronize in synchronizeToMaster()
Definition jkqtpbaseplotter.h:1348
@ sdXYAxes
x- and y-axis
Definition jkqtpbaseplotter.h:1351
QVector< JKQTPPlotElement * >::const_iterator GraphsConstIterator
Definition jkqtpbaseplotter.h:489
QVector< JKQTPPlotElement * >::iterator GraphsIterator
Definition jkqtpbaseplotter.h:488
Support Class for JKQTBasePlotter, which summarizes all properties that define the visual styling of ...
Definition jkqtpbaseplotterstyle.h:47
base class for drawing a key (or legend)
Definition jkqtpkey.h:83
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
base class for horizontal axes, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoo...
Definition jkqtpcoordinateaxes.h:1154
this virtual base class of every element, which is part of a JKQTPlotter plot and may appear in its k...
Definition jkqtpgraphsbase.h:62
base class for vertical axes, based on JKQTPCoordinateAxis (for most of documentation: see JKQTPCoord...
Definition jkqtpcoordinateaxes.h:967
plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing)
Definition jkqtplotter.h:364
void clearAllRegisteredMouseDoubleClickActions()
clear all registered mouse double-click actions
QPointer< JKQTPlotter > masterPlotterX
the master plotter, this plotter is connected to in x-direction.
Definition jkqtplotter.h:1570
void setGridStyle(Qt::PenStyle __value)
sets the style of all Major grid lines
Definition jkqtplotter.h:959
void setUserActionCatchSensitivity(int v)
sensitivity (i.e. max. distance to see as one point) for user actions
void openStandardAndSpecialContextMenu(int x, int y)
open the standard context menu with the special context menu integrated at the mouse position x and y
void resetMasterSynchronization(JKQTBasePlotter::SynchronizationDirection synchronizeDirection=JKQTBasePlotter::sdXYAxes)
switches any synchronization off, that has been created by synchronizeToMaster()
JKQTBasePlotter::GraphsConstIterator endGraphs() const
returns an iterator behind the last graph
Definition jkqtplotter.h:736
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
JKQTBasePlotter::GraphsConstIterator cendGraphs() const
returns an iterator behind the last graph
Definition jkqtplotter.h:727
void saveAsGerExcelCSV(const QString &filename=QString(""))
save the current plot data as a Semicolon Separated Values (CSV) file for german Excel,...
Definition jkqtplotter.h:1012
void clearGridPrintingPlotters()
clear all additional plotters for grid printing mode
InternalBufferImageType createImageBuffer() const
constructs a new image for the internal double-buffering
JKQTBasePlotter::JKQTPPen getPlotStyle(int i) const
returns a QPen object for the i-th plot style
Definition jkqtplotter.h:845
void setX(double xminn, double xmaxx)
sets the x-range of the plot (minimum and maximum x-value on the x-axis)
Definition jkqtplotter.h:1161
void openSpecialContextMenu()
open the special context menu at the mouse position of the last click
void reactGraphVisible(bool visible)
called from a menu entry that encodes the graph ID
double getYMax() const
returns the current y-axis max of the primary y-axis
Definition jkqtplotter.h:826
void setUserActionMarkerBrush(const QBrush &__value)
pen for location markers of user actions on the plot
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...
int getToolbarIconSize() const
get the width/height of the icons in the toolbar in pt
int getMouseLastClickY() const
y-position of the last mouse-click (in screen pixels)
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.
Definition jkqtplotter.h:1039
MouseDragAction currentMouseDragAction
the currently executed MouseDragAction
Definition jkqtplotter.h:1359
void setY(double yminn, double ymaxx)
sets the y-range of the plot (minimum and maximum y-value on the y-axis)
Definition jkqtplotter.h:1164
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 finish...
void saveAsTabSV(const QString &filename=QString(""))
save the current plot data as a Tabulator Separated Values (CSV) file
Definition jkqtplotter.h:1004
virtual ~JKQTPlotter()
class destructor
QMenu * menuSpecialContextMenu
use this QMenu instance instead of the standard context menu of this widget
Definition jkqtplotter.h:1489
void masterPlotScalingRecalculated()
connected to plotScalingRecalculated() of the masterPlotter
void setGridWidth(double __value)
sets the width of all Major grid lines
Definition jkqtplotter.h:947
JKQTPUserActionMarkerType getUserActionMarkerType() const
type of the location markers of user actions on the plot
void leaveEvent(QEvent *event) override
called, when the mouse leaves the widget, hides the toolbar (if visible)
JKQTPMouseDragActionsHashMap registeredOverrideMouseDragActionModes
list of override mouse drag action modes, that override the settings ing plotterStyle....
Definition jkqtplotter.h:1658
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...
void openSpecialContextMenu(int x, int y)
open the special context menu at the mouse position x and y
void paintEvent(QPaintEvent *event) override
this simply paints the stored image to the widget's surface
const JKQTPDatastore * getDatastore() const
returns a pointer to the datastore used by this object
Definition jkqtplotter.h:614
void setCurrentPlotterStyle(const JKQTPlotterStyle &style)
replace the current style properties for this JKQTBasePlotter
double mousePosY
y-position of the mouse during the last mouseMoveEvent() calls (in plot coordinates)
Definition jkqtplotter.h:1580
void addGraphs(const TJKQTPGraphContainer &gr, QVector< size_t > *graphIDsOut=nullptr)
add a new graphs from a QVector<JKQTPPlotElement*>, QList<JKQTPPlotElement*>, std::vector<JKQTPPlotEl...
Definition jkqtplotter.h:816
int getNextStyle()
gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles
Definition jkqtplotter.h:840
WheelActionType
Definition jkqtplotter.h:1365
const QAction * getActMouseLeftAsZoomRect() const
action that activates the zoom rectangle tool (override!)
void setSpecialContextMenu(QMenu *menu)
sets a QMenu object to be used as special context menu
void saveAsCSV(const QString &filename=QString(""))
save the current plot data as a Comma Separated Values (CSV) file
Definition jkqtplotter.h:1000
QPen getUserActionOpaquePen() const
pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips)
int mouseDragRectYStartPixel
when zooming by moving the mouse this contains the y-coordinate the user clicked on (in pixels)
Definition jkqtplotter.h:1437
void useExternalDatastore(JKQTPDatastore *newStore)
tells the plotter object to use the given external datastore.
Definition jkqtplotter.h:617
QAction * getActMouseLeftAsPanView()
action that activates the pan view tool (override!)
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...
int getMouseLastClickX() const
x-position of the last mouse-click (in screen pixels)
int getMaxTooltipDistance() const
maximum distance at which a tooltip for a point is still displayed, when the user action jkqtpmdaTool...
void resizeEvent(QResizeEvent *event) override
resizes the internal representation (image) of the graphs
double getMouseContextX() const
x-position of the mouse (in plot coordinates) when a user mouse-action was started (e....
const JKQTPPlotElement * getGraph(size_t i) const
returns description of i'th graph
Definition jkqtplotter.h:766
double getAbsoluteXMin() const
returns the absolute x-axis min of the primary x-axis. This is the lowest allowed value the the axis ...
Definition jkqtplotter.h:828
JKQTBasePlotter * plotter
JKQTBasePlotter used to plot.
Definition jkqtplotter.h:1405
void openContextMenu(int x, int y)
open the context menu at the mouse position x and y
void openStandardContextMenu(int x, int y)
open the standard context menu at the mouse position x and y
void pzoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter *sender)
called whenever the zoom changes in plotter
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 b...
void openStandardContextMenu()
open the standard context menu at the mouse position of the last click
void copyData()
copy the data used for the current plot to the clipboard
Definition jkqtplotter.h:1028
void resetMouseLeftAction()
resets any previously set override action for the left mouse-button, un-modified
static int getGlobalResizeDelay()
returns the currently set global resize delay in milliseconds delayMS. This function is thread-safe!
void modifyGraphs(const std::function< void(JKQTPPlotElement *)> &func)
apply functor func to all graphs in the plotter. After completing the operation, the graph is updated
Definition jkqtplotter.h:748
void paintUserAction()
paint the user action (rectangle, ellipse, ...
bool isToolbarAlwaysOn() const
returns whether the toolbar is always visible or only when the mouse moves to the upper left area
void setMinorGridColor(QColor color)
sets the color of all minor grid lines
Definition jkqtplotter.h:941
void moveGraphBottom(JKQTPPlotElement *gr)
move the given graph gr to the bottom of all graphs
Definition jkqtplotter.h:794
JKQTPlotter(JKQTPDatastore *datast, QWidget *parent=nullptr)
class constructor for a JKQTPlotter using an external JKQTPDatastore dataset
bool containsGraph(JKQTPPlotElement *gr)
returns true, if the given graph is in this plot
Definition jkqtplotter.h:775
void zoom(double xminn, double xmaxn, double yminn, double ymaxn, bool affectsSecondaryAxes=false)
sets the x- and y-range of the plot (minimum and maximum values on the x-/y-axis)
Definition jkqtplotter.h:925
double mouseContextY
y-position of the mouse (in plot coordinates) when a user mouse-action was started (e....
Definition jkqtplotter.h:1598
JKQTPMouseWheelActionsHashMapIterator findMatchingMouseWheelAction(Qt::KeyboardModifiers modifiers, bool *found=nullptr) const
searches JKQTPlotterStyle::registeredMouseWheelActions for a matching action
void setMouseMoveActionAsToolTip(bool enabled)
action that (de)activates the tooltip tool, when moving the mouse without any button pressed
bool saveAsSVG(const QString &filename=QString(""), bool displayPreview=true)
save the current plot as a SVG file, with the current widget aspect ratio, if filename is empty a fil...
Definition jkqtplotter.h:994
JKQTBasePlotter::GraphsConstIterator cbeginGraphs() const
returns an iterator to the first graph
Definition jkqtplotter.h:723
void setMinorGridWidth(double __value)
sets the width of all minor grid lines
Definition jkqtplotter.h:953
JKQTPVerticalAxisBase * getYAxis(JKQTPCoordinateAxisRef axis=JKQTPPrimaryAxis)
returns the y-axis objet of the plot
Definition jkqtplotter.h:713
void resetContextMenu(bool createnew=true)
destroys the internal contextMenu and optionally creates a new one
void delayedResizeEvent()
while the window is resized, the plot is only redrawn after a restartable delay, implemented by this ...
void moveGraphUp(JKQTPPlotElement *gr)
move the given graph gr one item up (i.e. it is drawn later/higher in the z-stack)
Definition jkqtplotter.h:797
void setGridPrinting(bool enabled)
enables grid-printing for this plot
void mouseDoubleClickEvent(QMouseEvent *event) override
event handler for a double click
QMenu * contextMenu
the context menu object used by this JKQTPlotter
Definition jkqtplotter.h:1592
void setAbsoluteX(double xminn, double xmaxx)
sets absolutely limiting x-range of the plot
Definition jkqtplotter.h:1152
QTimer resizeTimer
timer used while the graph is resized to delay the redrawing with new size (in the meantime,...
Definition jkqtplotter.h:1632
QBrush getUserActionOpaqueBrush() const
brush for user actions that cover parts of the plot (typically opaque, like e.g. tooltips)
QAction * getActMouseLeftAsZoomRect()
action that activates the zoom rectangle tool (override!)
void deleteGraph(size_t i, bool deletegraph=true)
remove the i-th graph
Definition jkqtplotter.h:772
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,...
Definition jkqtplotter.h:1016
double getAbsoluteYMax() const
returns the absolute y-axis max of the primary y-axis This is the highest allowed value the the axis ...
Definition jkqtplotter.h:834
QSet< JKQTPMouseMoveActions > currentMouseMoveAction
the currently executed MouseMoveActions
Definition jkqtplotter.h:1363
const quint64 maxWheelEventSeriesTimestampDifference
max. time between two QWheelEvents that are recognized as one series
Definition jkqtplotter.h:1376
size_t addGraphAtBottom(JKQTPPlotElement *gr)
add a new graph before all other graphs (i.e. at the top of the list of graphs), if the graph is alre...
Definition jkqtplotter.h:788
void setGridPrintingCurrentY(size_t y)
set the y-position of this JKQTPlotter in the grid-printing grid
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 ins...
quint64 lastWheelActionTimestamp
storage for timestammp of the last QWheelEvent (used in wheelAction() to distinguish trackpad-pan ati...
Definition jkqtplotter.h:1374
void setMinorGridStyle(Qt::PenStyle __value)
sets the style of all minor grid lines
Definition jkqtplotter.h:965
JKQTBasePlotter * getPlotter()
returns the JKQTBasePlotter object internally used for plotting
Definition jkqtplotter.h:404
bool isPlotUpdateEnabled() const
returns, whether automatic redrawing the plot is currently activated (e.g. you can deactivate this wi...
void saveCurrentPlotterStyle(QSettings &settings, const QString &group="plots/", bool alsoSaveBaseStyle=true) const
store the current style properties for this JKQTBasePlotter with properties loaded from settings
void plotScalingRecalculated()
emitted when the plot scaling has been recalculated
double getXMin() const
returns the current x-axis min of the primary x-axis
Definition jkqtplotter.h:820
double mouseDragRectXEnd
when draging the mouse this contains the x-coordinate the mouse is currently pointing to
Definition jkqtplotter.h:1431
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)
void deregisterMouseWheelAction(Qt::KeyboardModifiers modifier)
deletes all mouse-wheel actions registered for a given modifier
JKQTPContextMenuModes getContextMenuMode() const
returns the currently set mode for the context menu
void mouseMoveEvent(QMouseEvent *event) override
event handler for a mouse move
void clearAllMouseMoveActions()
deletes all mouse-move actions
size_t addGraphOnTop(JKQTPPlotElement *gr)
add a new graph at the end of the graphs, if the graph is already in the plot, it is moved to the end...
Definition jkqtplotter.h:786
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.
size_t addGraph(JKQTPPlotElement *gr)
Definition jkqtplotter.h:784
int mouseDragRectXEndPixel
when draging the mouse this contains the x-coordinate the mouse is currently pointing to (in pixels)
Definition jkqtplotter.h:1422
void moveGraphTop(JKQTPPlotElement *gr)
move the given graph gr to the end of all graphs, so it is drawn
Definition jkqtplotter.h:791
QAction * actMouseLeftAsDefault
action that activates the default action, set in plotterStyle!
Definition jkqtplotter.h:1668
void copyDataMatlab()
copy the data used for the current plot to the clipboard as a Matlab script
Definition jkqtplotter.h:1033
void setGrid(bool val)
sets whether the major grid lines of the major axes are shown
Definition jkqtplotter.h:930
void contextMenuOpened(double x, double y, QMenu *contextMenu)
emitted whenever a context menu is opened. You can modify the menu via the parameter contextMenu!
QBrush getUserActionOverlayBrush() const
brush for user actions (typically semi-transparent, like e.g. zoom-rectangles)
void populateToolbar(QToolBar *toolbar) const
popuplate the given toolbar toolbar with all actions shown in a toolbar from this class ....
JKQTPMouseMoveActionsHashMapIterator findMatchingMouseMoveAction(Qt::KeyboardModifiers modifiers, bool *found=nullptr) const
searches JKQTPlotterStyle::registeredMouseMoveActions for a matching action
QSize getImageBufferSize(float *scale_out=nullptr) const
returns the required size of an image for the internal double-buffering
void zoomIn(double factor=2.0)
zooms into the graph (the same as turning the mouse wheel) by the given factor
Definition jkqtplotter.h:1044
void updateToolbar()
update settings of the toolbar
QActionGroup * actgrpMouseLeft
action group, that groups the actMouseLeft... actions
Definition jkqtplotter.h:1666
void setMousePositionShown(bool __value)
specifies whether to display the current position of the mouse in the top border of the plot (this ma...
void setToolbarIconSize(int value)
set the width/height of the icons in the toolbar in pt
bool isMousePositionShown() const
specifies whether to display the current position of the mouse in the top border of the plot (this ma...
void setShowZeroAxes(bool showXY)
switches the visibility of the zero-axes associated with the major x- and y-axis
Definition jkqtplotter.h:978
void setUserActionOpaqueBrush(const QBrush &__value)
pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips)
void setUserActionOverlayPen(const QPen &__value)
pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles)
void moveGraphDown(int idx)
move the given graph gr one item down (i.e. it is drawn earlier/lower in the z-stack)
Definition jkqtplotter.h:812
void clearAllMouseWheelActions()
deletes all mouse-wheel actions
void registerMouseMoveAction(Qt::KeyboardModifiers modifier, JKQTPMouseMoveActions action)
specifies the action to perform on a mouse move event when a given modifier is pressed
void tooltipDisplayed(double x, double y, const QStringList &entries, const QList< JKQTPPlotElement * > &graphs)
emitted when a tooltip for a datapoint is displayed
JKQTPMouseDragActionsHashMapIterator findMatchingMouseDragAction(Qt::MouseButton button, Qt::KeyboardModifiers modifiers, bool *found=nullptr) const
searches JKQTPlotterStyle::registeredMouseActionModes for a matching action, returns in found whether...
double getMagnification() const
returns the current magnification factor
Definition jkqtplotter.h:837
int mouseLastClickY
y-position of the last mouse-click (in screen pixels)
Definition jkqtplotter.h:1602
bool isEmittingSignalsEnabled() const
returns whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate()
Definition jkqtplotter.h:631
void setMouseLeftActionAsRuler()
action that activates the ruler tool
void setGridPrintingCurrentX(size_t x)
set the x-position of this JKQTPlotter in the grid-printing grid
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
const JKQTPHorizontalAxisBase * getXAxis(JKQTPCoordinateAxisRef axis=JKQTPPrimaryAxis) const
returns the x-axis objet of the plot
Definition jkqtplotter.h:715
void saveAsMatlab(const QString &filename=QString(""))
save the current plot data as a Matlab Script
Definition jkqtplotter.h:1010
int getUserActionMarkerDiameter() const
size (diameter) of markers drawn by user actions
void setXY(double xminn, double xmaxx, double yminn, double ymaxx, bool affectsSecondaryAxes=false)
sets the x- and y-range of the plot (minimum and maximum values on the x-/y-axis)
Definition jkqtplotter.h:1167
QAction * getActMouseMoveToolTip()
action that activates the tooltip tool (override!)
void clearAllRegisteredMouseDragActions()
clear all registeres mouse drag actions
void setToolbarAlwaysOn(bool __value)
returns whether the toolbar is always visible or only when the mouse moves to the upper left area
JKQTPlotterStyle plotterStyle
current style properties for this JKQTPlotter
Definition jkqtplotter.h:1621
int mouseDragRectXStartPixel
when draging the mouse this contains the x-coordinate the user clicked on (in pixels)
Definition jkqtplotter.h:1418
void updateCursor()
set the current mouse cursor shappe according to currentMouseDragAction
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 (=m...
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)
double getXMax() const
returns the current x-axis max of the primary x-axis
Definition jkqtplotter.h:822
bool 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 ...
Definition jkqtplotter.h:983
void setPlotUpdateEnabled(bool enable)
sets whether automatic redrawing the plot is currently activated (e.g. you can sett his to false whil...
QPointer< JKQTPlotter > masterPlotterY
the master plotter, this plotter is connected to in y-direction.
Definition jkqtplotter.h:1572
QMenu * getSpecialContextMenu() const
returns the currently set special context menu object
JKQTPlotter(bool datastore_internal, QWidget *parent=nullptr, JKQTPDatastore *datast=nullptr)
class constructor
bool isResizeTimerRunning() const
returns true, if the JKQTPlotter::resizeTimer is currently running and the widget is waiting for the ...
void setAbsoluteXY(double xminn, double xmaxx, double yminn, double ymaxx)
sets absolutely limiting x- and y-range of the plot
Definition jkqtplotter.h:1158
void setUserActionOpaquePen(const QPen &__value)
pen for user actions that cover parts of the plot (typically opaque, like e.g. tooltips)
QAction * getActMouseLeftAsRuler()
action that activates the ruler tool (override!)
InternalBufferImageType oldImage
this can be used when drawing a zoom rectangle to store an unchanged copy of the currently displayed ...
Definition jkqtplotter.h:1473
QAction * getActMouseLeftAsDefault()
action that activates the default action, set in plotterStyle!
void moveGraphBottom(int idx)
move the given graph gr to the bottom of all graphs
Definition jkqtplotter.h:806
void moveGraphTop(int idx)
move the given graph gr to the end of all graphs, so it is drawn
Definition jkqtplotter.h:803
JKQTPMouseDoubleClickActionsHashMapIterator findMatchingMouseDoubleClickAction(Qt::MouseButton button, Qt::KeyboardModifiers modifiers, bool *found=nullptr) const
searches JKQTPlotterStyle::registeredMouseDoubleClickActions for a matching action
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 fi...
QList< QMenu * > contextSubMenus
internal storage for sub-menu entries of the internal contextMenu object, based on the actions return...
Definition jkqtplotter.h:1606
void setToolbarEnabled(bool __value)
returns whether the toolbar is enabled
void forceInternalDatastore()
tells the plotter object to use an internal datastore (just like useInternalDatastore() ),...
Definition jkqtplotter.h:626
void zoomOut(double factor=2.0)
zooms out of the graph (the same as turning the mouse wheel) by the given factor
Definition jkqtplotter.h:1046
void setGridPrintingCurrentPos(size_t x, size_t y)
set the x- and y-positions of this JKQTPlotter in the grid-printing grid
JKQTPPlotElement * getGraph(size_t i)
returns description of i'th graph
Definition jkqtplotter.h:764
void resetCurrentMouseDragAction()
resets the currently activated mouse drag action, e.g. called by mouseReleaseEvent()
JKQTPBaseKey * getMainKey()
retuns the main key object
Definition jkqtplotter.h:412
JKQTBasePlotter::GraphsIterator beginGraphs()
returns an iterator to the first graph
Definition jkqtplotter.h:740
QPen getUserActionOverlayPen() const
pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles)
void setGridColor(QColor color)
sets the color of all major grid lines (of the major x- and y-axis)
Definition jkqtplotter.h:935
void setCurrentPlotterStyle(const JKQTPlotterStyle &style, const JKQTBasePlotterStyle &baseStyle)
replace the current style properties for this JKQTBasePlotter
double getMouseContextY() const
y-position of the mouse (in plot coordinates) when a user mouse-action was started (e....
double getAbsoluteXMax() const
returns the absolute x-axis max of the primary x-axis This is the highest allowed value the the axis ...
Definition jkqtplotter.h:830
JKQTBasePlotter::GraphsConstIterator beginGraphs() const
returns an iterator to the first graph
Definition jkqtplotter.h:732
const QAction * getActMouseLeftAsRuler() const
action that activates the ruler tool (override!)
void saveAsDIF(const QString &filename=QString(""))
save the current plot data as a Data Interchange Format file (see https://en.wikipedia....
Definition jkqtplotter.h:1006
const JKQTBasePlotter::GraphsList & getGraphs() const
returns a list of all graphs
Definition jkqtplotter.h:756
void deleteGraph(JKQTPPlotElement *gr, bool deletegraph=true)
remove the i-th graph
Definition jkqtplotter.h:778
void setMaxTooltipDistance(int v)
maximum distance at which a tooltip for a point is still displayed, when the user action jkqtpmdaTool...
void sortGraphs(const std::function< bool(const JKQTPPlotElement *, const JKQTPPlotElement *)> &compareLess)
sort the graphs, using functor compareLess to find whether a first graph shall be before (i....
Definition jkqtplotter.h:752
QAction * actMouseLeftAsZoomRect
action that activates the zoom rectangle tool (override!)
Definition jkqtplotter.h:1674
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
void print(QPrinter *printer=nullptr)
print the current plot, if printer is nullptr a printer selection dialog is displayed
Definition jkqtplotter.h:1022
void wheelEvent(QWheelEvent *event) override
event handler for a turn of the mouse wheel
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 fi...
void moveGraphUp(int idx)
move the given graph gr one item up (i.e. it is drawn later/higher in the z-stack)
Definition jkqtplotter.h:809
void keyReleaseEvent(QKeyEvent *event) override
react on key presses.
void setUserActionOverlayBrush(const QBrush &__value)
pen for user actions that overlay the plot (typically semi-transparent, like e.g. zoom-rectangles)
bool saveAsPixelImage(const QString &filename=QString(""), bool displayPreview=true, const QByteArray &outputFormat=QByteArray(), const QSize &outputSizeIncrease=QSize(0, 0))
save the current plot as a pixel image image (PNG ...), if filename is empty a file selection dialog ...
Definition jkqtplotter.h:988
void mouseReleaseEvent(QMouseEvent *event) override
event handler for a mouse release event
const QAction * getActMouseLeftAsPanView() const
action that activates the pan view tool (override!)
void openContextMenu()
open the context menu at the mouse position of the last click
const QAction * getActMouseMoveToolTip() const
action that activates the tooltip tool (override!)
QSize minSize
current minimal size of the JKQTPlotter widget to properly display the plot
Definition jkqtplotter.h:1584
const JKQTBasePlotter * getPlotter() const
returns the JKQTBasePlotter object internally used for plotting
Definition jkqtplotter.h:406
size_t getGraphCount()
returns the number of graphs
Definition jkqtplotter.h:769
int getUserActionCatchSensitivity() const
sensitivity (i.e. max. distance to see as one point) for user actions
bool isToolbarEnabled() const
returns whether the toolbar is enabled
void deregisterMouseMoveAction(Qt::KeyboardModifiers modifier)
deletes all mouse-move actions registered for a given modifier
void saveAsSYLK(const QString &filename=QString(""))
save the current plot data as a SYmbolik LinK (SYLK) spreadsheet file (see https://en....
Definition jkqtplotter.h:1008
const JKQTPBaseKey * getMainKey() const
retuns the main key object
Definition jkqtplotter.h:418
void useInternalDatastore()
tells the plotter object to use an internal datastore. A new internal datastore object is generated o...
Definition jkqtplotter.h:623
void intBeforePlotScalingRecalculate()
emitted before the plot scaling has been recalculated
QAction * actMouseMoveToolTip
action that activates the tooltip tool (override!)
Definition jkqtplotter.h:1672
double mouseDragRectYEnd
when zooming by moving the mouse this contains the y-coordinate the mouse is currently pointing to
Definition jkqtplotter.h:1442
void mousePressEvent(QMouseEvent *event) override
event handler for a mouse down event
void openStandardAndSpecialContextMenu()
open the standard context menu with the special context menu integrated at the mouse position of the ...
void setMagnification(double m)
set the current plot magnification
void moveGraphDown(JKQTPPlotElement *gr)
move the given graph gr one item down (i.e. it is drawn earlier/lower in the z-stack)
Definition jkqtplotter.h:800
QSize sizeHint() const override
returns the size of the widget
void setMouseLeftDragActionAsToolTip()
action that activates the tooltip tool, when dragging the mouse with the left button pressed
double mouseContextX
x-position of the mouse (in plot coordinates) when a user mouse-action was started (e....
Definition jkqtplotter.h:1596
void setUserActionMarkerPen(const QPen &__value)
pen for location markers of user actions on the plot
JKQTBasePlotter::GraphsList & getGraphs()
returns a list of all graphs
Definition jkqtplotter.h:760
void widgetResized(int new_width, int new_height, JKQTPlotter *sender)
signal: emitted whenever the widget is resized
QImage grabPixelImage(QSize size=QSize(), bool showPreview=false)
returns a rendering of the current plot as a QImage (pixel image) with the given size
Definition jkqtplotter.h:911
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 initializ...
void setEmittingSignalsEnabled(bool sig)
specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate...
Definition jkqtplotter.h:629
void resetOverrideMouseDragAction(Qt::MouseButton button, Qt::KeyboardModifiers modifiers)
removes a previously set override mouse drag action for the given button/modifiers combination
JKQTBasePlotter::GraphsIterator endGraphs()
returns an iterator behind the last graph
Definition jkqtplotter.h:744
void fixBasePlotterSettings()
modifies the settings of plotter to match those of this object
void updateToolbarActions()
void setAbsoluteY(double yminn, double ymaxx)
sets absolute minimum and maximum y-value to plot
Definition jkqtplotter.h:1155
JKQTPContextMenuModes contextMenuMode
current mode for the default context menu (i.e. the right-click context menu)
Definition jkqtplotter.h:1594
void setMouseActionToolbarActionsActive(bool __value)
allows to activate/deactivate toolbar buttons that can activate certain mouse drag actions
void initContextMenu()
fills the member contextMenu with all default and additionally registered actions,...
InternalBufferImageType image
this stores the currently displayed plot
Definition jkqtplotter.h:1468
void setMouseLeftActionAsPanView()
action that activates the pan viewport tool
void beforePlotScalingRecalculate()
emitted before the plot scaling has been recalculated
QAction * actMouseLeftAsRuler
action that activates the ruler tool (override!)
Definition jkqtplotter.h:1670
JKVanishQToolBar * toolbar
toolbar class used for user input
Definition jkqtplotter.h:1494
void rulerDisplayed(double x1, double y1, double x2, double y2, Qt::KeyboardModifiers modifiers)
emitted when a new ruler between two points is displayed
void zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter *sender)
signal: emitted whenever the user selects a new x-y zoom range (in the major axes,...
void modifyContextMenu(QMenu *menu)
you may overwrite this method to modify the given context menu before it is displayed.
WheelActionType lastWheelActionType
storage for last WheelActionType (used in wheelAction() to distinguish trackpad-pan ations in mode jk...
Definition jkqtplotter.h:1372
int getPlotYOffset() const
calculate the y-axis shift of the plot, so there is space for the potentially displayed mouse positio...
double getYMin() const
returns the current y-axis min of the primary y-axis
Definition jkqtplotter.h:824
QBrush getUserActionMarkerBrush() const
brush for location markers of user actions on the plot
bool doDrawing
indicates whether the plot is updated automatically at the moment
Definition jkqtplotter.h:1402
void useAsInternalDatastore(JKQTPDatastore *newStore)
tells the plotter object to use the given external datastore and treat it as an internal one (i....
Definition jkqtplotter.h:620
JKQTPDatastore * getDatastore()
returns a pointer to the datastore used by this object
Definition jkqtplotter.h:611
void setOverrideMouseDragAction(Qt::MouseButton button, Qt::KeyboardModifiers modifiers, JKQTPMouseDragActions action)
sets an override mouse drag action for the given button/modifiers combination
void setUserActionMarkerType(JKQTPUserActionMarkerType v)
type of the location markers of user actions on the plot
void fillInternalStructForToolTipOfClosestDataPoint(double x0, double y0, bool emitEvent=true)
fills the inertnal mouseDragMarkers structure with data to display tooltips close to (x0,...
void setUserActionMarkerDiameter(int v)
size (diameter) of markers drawn by user actions
void copyPixelImage(bool showPreview=true)
copy the current plot as a pixel+svg image to the clipboard
Definition jkqtplotter.h:915
const JKQTPVerticalAxisBase * getYAxis(JKQTPCoordinateAxisRef axis=JKQTPPrimaryAxis) const
returns the y-axis objet of the plot
Definition jkqtplotter.h:717
double mouseDragRectXStart
when draging the mouse this contains the x-coordinate the user clicked on (in plot coordinates)
Definition jkqtplotter.h:1415
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...
double mousePosX
x-position of the mouse during the last mouseMoveEvent() calls (in plot coordinates)
Definition jkqtplotter.h:1578
void setContextMenuMode(JKQTPContextMenuModes mode)
sets the mode if the standard context menu
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
void redrawPlot()
update the plot and the overlays
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...
QSize minimumSizeHint() const override
returns the minimum size of the widget
void saveAsSemicolonSV(const QString &filename=QString(""))
save the current plot data as a Semicolon Separated Values (SSV) file
Definition jkqtplotter.h:1002
QPixmap InternalBufferImageType
Definition jkqtplotter.h:1465
void loadCurrentPlotterStyle(const QSettings &settings, const QString &group="plots/", bool alsoLoadBaseStyle=true)
replace the current style properties for this JKQTBasePlotter with properties loaded from settings
void addGridPrintingPlotter(size_t x, size_t y, JKQTPlotter *plotterOther)
add a new plotter plotterOther for grid printing mode, at location x / y
double magnification
magnification factor for the display of the plot
Definition jkqtplotter.h:1582
const JKQTBasePlotter * getConstplotter() const
returns the JKQTBasePlotter object internally used for plotting
Definition jkqtplotter.h:408
JKQTPHorizontalAxisBase * getXAxis(JKQTPCoordinateAxisRef axis=JKQTPPrimaryAxis)
returns the x-axis objet of the plot
Definition jkqtplotter.h:711
JKQTPlotter(QWidget *parent=nullptr)
class constructor
const QAction * getActMouseLeftAsDefault() const
action that activates the default action, set in plotterStyle!
void correctZoomRectForPanning(QRectF &rect) const
tool function, which corrects the given rectangle (in pixels!) during a panning action....
static std::atomic< int > jkqtp_RESIZE_DELAY
delay for resizing in milliseconds. If set to 0, resize delay is disabled and resizeTimer is unused.
Definition jkqtplotter.h:1638
bool mouseDragingRectangle
this is set true if we are drawing a zoom rectangle
Definition jkqtplotter.h:1412
QList< MouseDragMarker > mouseDragMarkers
internal list of markers to be drawn by paintUserAction()
Definition jkqtplotter.h:1463
bool saveAsPDF(const QString &filename=QString(""), bool displayPreview=true)
save the current plot as a PDF file, with the current widget aspect ratio, if filename is empty a fil...
Definition jkqtplotter.h:996
int mouseLastClickX
x-position of the last mouse-click (in screen pixels)
Definition jkqtplotter.h:1600
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...
void registerMouseWheelAction(Qt::KeyboardModifiers modifier, JKQTPMouseWheelActions action)
specifies the action to perform on a mouse wheel event when a given modifier is pressed
const JKQTPlotterStyle & getCurrentPlotterStyle() const
current style properties for this JKQTPlotter
void clearGraphs(bool deleteGraphs=true)
remove all plots
Definition jkqtplotter.h:781
int mouseDragRectYEndPixel
when draging the mouse this contains the y-coordinate the mouse is currently pointing to (in pixels)
Definition jkqtplotter.h:1426
double getAbsoluteYMin() const
returns the absolute y-axis min of the primary y-axis This is the lowest allowed value the the axis m...
Definition jkqtplotter.h:832
void plotMouseMove(double x, double y)
emitted whenever the mouse moves
QAction * actMouseLeftAsPanView
action that activates the pan view tool (override!)
Definition jkqtplotter.h:1676
double mouseDragRectYStart
when draging the mouse this contains the y-coordinate the user clicked on (in plot coordinates)
Definition jkqtplotter.h:1434
void setShowZeroAxes(bool showX, bool showY)
switches the visibility of the zero-axes associated with the x- and y-axis
Definition jkqtplotter.h:974
void setMouseLeftActionAsZoomRect()
action that activates the zoom rectangle tool
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 giv...
QPen getUserActionMarkerPen() const
pen for location markers of user actions on the plot
virtual bool event(QEvent *event) override
static void setGlobalResizeDelay(int delayMS)
sets the global resize delay in milliseconds delayMS. After calling this function all plots will use ...
Support Class for JKQTPlotter, which summarizes all properties that define the visual styling of a JK...
Definition jkqtplotterstyle.h:40
JKQTPMouseMoveActionsHashMap::const_iterator JKQTPMouseMoveActionsHashMapIterator
iterator for JKQTPMouseMoveActionsHashMap
Definition jkqtptools.h:256
JKQTPMouseDoubleClickActionsHashMap::const_iterator JKQTPMouseDoubleClickActionsHashMapIterator
iterator for JKQTPMouseDoubleClickActionsHashMap
Definition jkqtptools.h:248
JKQTPCoordinateAxes
named references for different oordinate axes in the plot
Definition jkqtpcoordinateaxes.h:42
JKQTPMouseMoveActions
Availble action this JKQtPlotter can perform when mouse events occur. This allows you to e....
Definition jkqtptools.h:188
JKQTPMouseDragActionsHashMap::const_iterator JKQTPMouseDragActionsHashMapIterator
iterator for JKQTPMouseDragActionsHashMap
Definition jkqtptools.h:234
JKQTPMouseDragActions
Availble action this JKQtPlotter can perform when mouse events occur. This allows you to e....
Definition jkqtptools.h:110
JKQTPUserActionMarkerType
Styles in which to mark single positions during user actions in JKQTPlotter.
Definition jkqtptools.h:83
JKQTPMouseWheelActions
actions that can be bound to a mouse wheel event
Definition jkqtptools.h:164
#define JKQTPLOTTER_LIB_EXPORT
Definition jkqtplotter_imexport.h:89
JKQTPContextMenuModes
modes for the context menu
Definition jkqtptools.h:209
QT_BEGIN_NAMESPACE size_t qHash(const QPair< Qt::MouseButton, Qt::KeyboardModifiers > &key, size_t)
qHash-variant used by JKQTPlotter
Definition jkqtplotter.h:1721
JKQTPMouseDoubleClickActions
actions that can be bound to a double-click of the mouse
Definition jkqtptools.h:140
QHash< QPair< Qt::MouseButton, Qt::KeyboardModifiers >, JKQTPMouseDragActions > JKQTPMouseDragActionsHashMap
data structure for storage of assigned JKQTPMouseDragActions
Definition jkqtptools.h:231
JKQTPLOTTER_LIB_EXPORT void initJKQTPlotterResources()
initialized Qt-ressources necessary for JKQTPlotter
JKQTPMouseWheelActionsHashMap::const_iterator JKQTPMouseWheelActionsHashMapIterator
iterator for JKQTPMouseWheelActionsHashMap
Definition jkqtptools.h:241
@ JKQTPPrimaryAxis
Definition jkqtpcoordinateaxes.h:43
ties a MouseActionMode to a mouse-button and a keyboard-modifier
Definition jkqtplotter.h:1345
MouseDragAction(Qt::MouseButton _mouseButton, Qt::KeyboardModifiers _modifier, JKQTPMouseDragActions _mode)
Qt::KeyboardModifiers modifier
Definition jkqtplotter.h:1350
Qt::MouseButton mouseButton
Definition jkqtplotter.h:1351
bool valid
Definition jkqtplotter.h:1355
MouseDragAction()
constructs an invalid object
JKQTPMouseDragActions mode
Definition jkqtplotter.h:1349
describes a marker to be drawn by paintUserAction()
Definition jkqtplotter.h:1445
QColor color
color for the marker
Definition jkqtplotter.h:1456
QPoint pos
position of the marker in screen pixels
Definition jkqtplotter.h:1450
QImage keyMarker
key marker image
Definition jkqtplotter.h:1458
QString title
graph label
Definition jkqtplotter.h:1454
JKQTPPlotElement * graph
graph that created that marker
Definition jkqtplotter.h:1460
QString label
marker label
Definition jkqtplotter.h:1452
MouseDragMarker(const QPoint &pos_, const QString &label_, const QString &title_, const QColor &color_, const QImage &keymarker_=QImage(), JKQTPPlotElement *_graph=nullptr)
Definition jkqtplotter.h:1446