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

base class for 2D plotter classes (used by the plotter widget JKQTPlotter) More...

#include <jkqtpbaseplotter.h>

Inheritance diagram for JKQTBasePlotter:
Collaboration diagram for JKQTBasePlotter:

Classes

class  JKQTPPen
 represents a pen, when plotting in JKQTPlotter/JKQTBasePlotter More...
 
struct  textSizeData
 internal tool class for text sizes More...
 
struct  textSizeKey
 internal tool class for text-sizess in a plot key More...
 

Public Types

typedef QMap< QString, QList< QPointer< QAction > > > AdditionalActionsMap
 
typedef QMapIterator< QString, QList< QPointer< QAction > > > AdditionalActionsMapIterator
 
enum  SynchronizationDirection {
  sdXAxis,
  sdYAxis,
  sdXYAxes
}
 denotes, which axes to synchronize in synchronizeToMaster() More...
 

Public Slots

void copyData ()
 copy the data used for the current plot to the clipboard More...
 
void copyDataMatlab ()
 copy the data used for the current plot to the clipboard in Matlab format More...
 
void copyPixelImage ()
 copy the current plot as a pixel image to the clipboard More...
 
void enableDebugShowRegionBoxes (bool enabled=true)
 if set true (default: false ) the JKQTBasePlotter draws colored rectangles to indicate the different regions in the plot (border, axes, ...) More...
 
QString getUserSettigsFilename () const
 return the filename, used by loadUserSettings() and saveUserSettings() More...
 
QString getUserSettigsPrefix () const
 return the prefix, used by loadUserSettings() and saveUserSettings() More...
 
void loadUserSettings ()
 loads the plot user properties from the file sepcified by setUserSettigsFilename() and the prefix specified by setUserSettigsPrefix() More...
 
void print (QPrinter *printer=nullptr, bool displayPreview=true)
 print the current plot, if printer is nullptr a printer selection dialog is displayed More...
 
void saveAsCSV (const QString &filename=QString(""))
 save the current plot data as a Comma Separated Values (CSV) file More...
 
void saveAsDIF (const QString &filename=QString(""))
 save the current plot data as a DIF file More...
 
void saveAsGerExcelCSV (const QString &filename=QString(""))
 save the current plot data as a Semicolon Separated Values (CSV) file for german Excel, i.e. with comma as decimal separator More...
 
void saveAsMatlab (const QString &filename=QString(""))
 save the current plot data as a Matlab Script More...
 
void 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 file selection dialog is displayed
More...
 
void saveAsPixelImage (const QString &filename=QString(""), bool displayPreview=true, const QByteArray &outputFormat=QByteArray())
 save the current plot as a pixel image image (PNG ...), if filename is empty a file selection dialog is displayed More...
 
void saveAsPS (const QString &filename=QString(""), bool displayPreview=true)
 save the current plot as a PS file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed More...
 
void saveAsSemicolonSV (const QString &filename=QString(""))
 save the current plot data as a Semicolon Separated Values (SSV) file More...
 
void 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 file selection dialog is displayed
More...
 
void saveAsSYLK (const QString &filename=QString(""))
 save the current plot data as a SYLK spreadsheet file More...
 
void saveAsTabSV (const QString &filename=QString(""))
 save the current plot data as a Tabulator Separated Values (CSV) file More...
 
void saveData (const QString &filename=QString(""), const QString &jkqtp_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 saveUserSettings () const
 saves the plot user properties to the file sepcified by setUserSettigsFilename() and the prefix specified by setUserSettigsPrefix() 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 setAspectRatio (double __value)
 sets the data aspect ratio, enforced with setMaintainApsectRatio(true) More...
 
void setAxisAspectRatio (double __value)
 sets the axis aspect ratio, enforced with setMaintainAxisApsectRatio(true) More...
 
void setBackgroundBrush (const QBrush &__value)
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
void setBackgroundColor (const QColor &__value)
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
void setBackgroundGradient (const QGradient &__value)
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
void setBackgroundTexture (const QImage &__value)
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
void setBackgroundTexture (const QPixmap &__value)
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
void setCSVcommentInitializer (const QString &__value)
 set the string used to introduce comments in text output when exporting data More...
 
void setCSVdecimalSeparator (const QString &__value)
 set the decimal separator used when exporting data to text files More...
 
void setCurrentFileFormat (const QString &__value)
 set the file format to use in SaveAs ... dialogs More...
 
void setCurrentSaveDirectory (const QString &__value)
 sets the current directory in which to open SaveAs ... dialogs More...
 
void setDefaultTextColor (QColor __value)
 default text color in the plot More...
 
void setDefaultTextFontName (const QString &__value)
 default font name in the plot More...
 
void setDefaultTextSize (double __value)
 default font size in the plot [pt] More...
 
void setExportBackgroundBrush (const QBrush &__value)
 color of the background of the plot (widget area) when exporting More...
 
void setExportBackgroundColor (const QColor &__value)
 color of the background of the plot (widget area) when exporting More...
 
void setExportBackgroundGradient (const QGradient &__value)
 color of the background of the plot (widget area) when exporting More...
 
void setExportBackgroundTexture (const QImage &__value)
 color of the background of the plot (widget area) when exporting More...
 
void setExportBackgroundTexture (const QPixmap &__value)
 color of the background of the plot (widget area) when exporting More...
 
void setGraphWidth (double __value)
 width (in pt) of lines used for newly added graphs 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 setKeyAutosize (bool __value)
 determine width of the key automatically More...
 
void setKeyBackgroundBrush (const QBrush &__value)
 color of the key background More...
 
void setKeyBackgroundColor (const QColor &__value, Qt::BrushStyle __style)
 color of the key background More...
 
void setKeyBackgroundGradient (const QGradient &__value)
 color of the key background More...
 
void setKeyBackgroundTexture (const QImage &__value)
 color of the key background More...
 
void setKeyBackgroundTexture (const QPixmap &__value)
 color of the key background More...
 
void setKeyFontSize (double __value)
 font size for key labels [in points] More...
 
void setKeyFrameColor (const QColor &__value)
 color of the key frame line More...
 
void setKeyFrameRounding (double __value)
 rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt] More...
 
void setKeyFrameWidth (double __value)
 width of the key frame line [pt] More...
 
void setKeyItemHeight (double __value)
 height of a key item in pt [in units of height of font, fontSize] More...
 
void setKeyItemWidth (double __value)
 width of a key item in pt [in units of width of 'X' set in font, fontSize] More...
 
void setKeyLayout (const JKQTPKeyLayout &__value)
 the key layout More...
 
void setKeyLineLength (double __value)
 length of the line samples in the key in pt [in units of width of 'X' set in font, fontSize] More...
 
void setKeyPosition (const JKQTPKeyPosition &__value)
 key position More...
 
void setKeyTextColor (const QColor &__value)
 color of the key entries' text More...
 
void setKeyXMargin (double __value)
 x-distance between key frame and key content [in units of width of 'X' set in font, fontSize] More...
 
void setKeyXOffset (double __value)
 y-offset of the key from the border of the plot [in units of width of 'x' set in font, fontSize] More...
 
void setKeyXSeparation (double __value)
 distance between key line example and key text [in units of width of 'X' set in font, fontSize] More...
 
void setKeyYMargin (double __value)
 y-distance between key frame and key content [in units of width of 'x' set in font, fontSize] More...
 
void setKeyYOffset (double __value)
 x-offset of the key from the border of the plot [in units of width of 'X' set in font, fontSize] More...
 
void setKeyYSeparation (double __value)
 distance between two key entries [in units of height of font, fontSize] More...
 
void setMaintainAspectRatio (bool value)
 en-/disables the maintaining of the data aspect ratio More...
 
void setMaintainAxisAspectRatio (bool value)
 en-/disables the maintaining of the axis aspect ratio 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 setOnlyGraphVisible (int i)
 set all graphs invisible, except i More...
 
void setOnlyNthGraphsVisible (int start, int n)
 set all graphs invisible, except graph start, start+n, start+2*n, ... More...
 
void setPlotBackgroundBrush (const QBrush &__value)
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
void setPlotBackgroundColor (const QColor &__value)
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
void setPlotBackgroundGradient (const QGradient &__value)
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
void setPlotBackgroundTexture (const QImage &__value)
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
void setPlotBackgroundTexture (const QPixmap &__value)
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
void setPlotBorder (int left, int right, int top, int bottom)
 sets the borders of the plot More...
 
void setPlotBorderBottom (int bottom)
 sets the bottom border of the plot More...
 
void setPlotBorderLeft (int left)
 sets the left border of the plot More...
 
void setPlotBorderRight (int right)
 sets the right border of the plot More...
 
void setPlotBorderTop (int top)
 sets the top border of the plot More...
 
void setPlotFrameColor (QColor col)
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this color More...
 
void setPlotFrameRounding (double __value)
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot, rounding the corners with this redius (<=0 -> no rounded rectangle) [pt] More...
 
void setPlotFrameVisible (bool enabled)
 if true, JKQTBasePlotter will draw a rectangle/frame around the plot More...
 
void setPlotFrameWidth (double __value)
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this width [pt] More...
 
void setPlotLabel (const QString &__value)
 set the plot label text More...
 
void setplotLabelFontName (const QString &__value)
 the plot label font name More...
 
void setPlotLabelFontSize (double __value)
 the plot label font size [pt] More...
 
void setShowKey (bool __value)
 indicates whether to plot a key More...
 
void setShowKeyFrame (bool __value)
 indicates whether to plot a frame around the key 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 setUseAntiAliasingForGraphs (bool __value)
 specifies whether to use antialiasing for plotting the graphs More...
 
void setUseAntiAliasingForSystem (bool __value)
 specifies whether to use antialiasing for plotting the coordinate system More...
 
void setUseAntiAliasingForText (bool __value)
 specifies whether to use antialiasing when drawing any text More...
 
void setUserSettigsFilename (const QString &filename)
 set filename, used by loadUserSettings() and saveUserSettings() More...
 
void setUserSettigsFilename (const QString &filename, const QString &prefix)
 set filename and prefix, used by loadUserSettings() and saveUserSettings() More...
 
void setUserSettigsPrefix (const QString &prefix)
 set prefix, used by loadUserSettings() and saveUserSettings() More...
 
void setWidgetHeight (int heigh)
 sets the width of the plot widget More...
 
void setWidgetSize (int width, int height)
 resize the plot More...
 
void setWidgetWidth (int wid)
 sets the width of the plot widget 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 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...
 

Signals

void beforePlotScalingRecalculate ()
 emitted before the plot scaling has been recalculated More...
 
void overlaysUpdated ()
 emitted when the overlay elements have to be updated More...
 
void plotScalingRecalculated ()
 emitted when the plot scaling had to be recalculated More...
 
void plotUpdated ()
 emitted when the plot has to be updated More...
 
void zoomChangedLocally (double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter *sender)
 signal: emitted whenever the user selects a new x-y zoom range (by mouse) More...
 

Public Member Functions

 JKQTBasePlotter ()=delete
 
 JKQTBasePlotter (bool datastore_internal, QObject *parent=nullptr, JKQTPDatastore *datast=nullptr)
 class constructor More...
 
virtual ~JKQTBasePlotter ()
 class destructor More...
 
size_t addGraph (JKQTPPlotElement *gr)
 add a new graph, returns it's position in the graphs list, if the graph is already in the plot, this returns the index in the 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, JKQTBasePlotter *plotter)
 add a new plotter for grid printing mode More...
 
size_t addOverlayElement (JKQTPOverlayElement *gr)
 add a new overlay element, returns it's position in the overlay elements list, if the overlay element is already in the plot, this returns the index in the list More...
 
void addOverlayElements (const QList< JKQTPOverlayElement * > &gr)
 add a new overlay elements from a QList More...
 
void clearGraphs (bool deleteGraphs=true)
 remove all plots More...
 
void clearGridPrintingPlotters ()
 clear all additional plotters for grid printing mode More...
 
void clearOverlayElement (bool deleteGraphs=true)
 remove all overlay elements More...
 
bool containsGraph (JKQTPPlotElement *gr) const
 returns true, if the given graph is in this plot More...
 
bool containsOverlayElement (JKQTPOverlayElement *gr) const
 returns true, if the given overlay element is in this plot 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 deleteOverlayElement (JKQTPOverlayElement *gr, bool deletegraph=true)
 remove the given overlay element, if it is contained More...
 
void deleteOverlayElement (size_t i, bool deletegraph=true)
 remove the i-th overlay element More...
 
void deregisterAdditionalAction (QAction *act)
 this function deregisters an additional action, previously added with registerAdditionalAction() More...
 
double didot2px (double pt, double dpi) const
 returns the given size in Didot points (0.376 mm) to pixels (with given dots per inch) More...
 
double didot2px (double pt, JKQTPEnhancedPainter &painter) const
 returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter) More...
 
double didot2px (JKQTPEnhancedPainter &painter, double pt) const
 returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter) More...
 
bool doesMaintainAspectRatio () const
 returns whether the maintaining of the data aspect ratio is enabled or disabled More...
 
bool doesMaintainAxisAspectRatio () const
 returns whether the maintaining of the axis aspect ratio is enabled or disabled More...
 
void draw (JKQTPEnhancedPainter &painter, const QPoint &pos=QPoint(0, 0), bool showOverlays=true)
 draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter More...
 
void draw (JKQTPEnhancedPainter &painter, const QRect &rect, bool showOverlays=true)
 draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter More...
 
void drawNonGrid (JKQTPEnhancedPainter &painter, const QPoint &pos=QPoint(0, 0), bool showOverlays=true)
 draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter More...
 
void drawNonGrid (JKQTPEnhancedPainter &painter, const QRect &rect, bool showOverlays=true)
 draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter More...
 
void drawNonGridOverlays (JKQTPEnhancedPainter &painter, const QPoint &pos=QPoint(0, 0))
 draw the contained graph overlays (including grid prints) into the given JKQTPEnhancedPainter More...
 
void drawOverlays (JKQTPEnhancedPainter &painter, const QRect &rect)
 draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter 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 * getActionCopyData () const
 QAction which triggers copying of the data to the clipboard. More...
 
QAction * getActionCopyMatlab () const
 QAction which triggers copying of the data to the clipboard in Matlab format. More...
 
QAction * getActionCopyPixelImage () const
 QAction which triggers copying of the image to the clipboard. More...
 
QAction * getActionPrint () const
 QAction which triggers the printing. More...
 
QAction * getActionSaveCSV () const
 QAction which triggers the saving as CSV (data only) More...
 
QAction * getActionSaveData () const
 QAction which triggers saving of the data used for the plot. More...
 
QAction * getActionSavePDF () const
 QAction which triggers the saving as PDF. More...
 
QAction * getActionSavePix () const
 QAction which triggers the saving as pixel image. More...
 
QAction * getActionSavePlot () const
 QAction which triggers saving of the plot as an image. More...
 
QAction * getActionSaveSVG () const
 QAction which triggers the saving as Scalable Vector Graphics (SVG) More...
 
QAction * getActionShowPlotData () const
 QAction to show a table with all the plot data in the datastore. More...
 
QAction * getActionZoomAll () const
 QAction which triggers zoom all. More...
 
QAction * getActionZoomIn () const
 QAction which triggers zoom in. More...
 
QAction * getActionZoomOut () const
 QAction which triggers zoom out. More...
 
double getAspectRatio () const
 returns the data aspect ratio, enforced with setMaintainApsectRatio(true) More...
 
double getAxisAspectRatio () const
 returns the axis aspect ratio, enforced with setMaintainAxisApsectRatio(true) More...
 
QBrush getBackgroundBrush () const
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
QColor getBackgroundColor () const
 color of the background of the plot (widget area) when drawing (to the screen) More...
 
QString getCSVcommentInitializer () const
 set the string used to introduce comments in text output when exporting data More...
 
QString getCSVdecimalSeparator () const
 returns the decimal separator used when exporting data to text files More...
 
QString getCurrentFileFormat () const
 return the last file format to use in SaveAs ... dialogs More...
 
const JKQTBasePlotterStylegetCurrentPlotterStyle () const
 current style properties for this JKQTBasePlotter More...
 
QString getCurrentSaveDirectory () const
 returns the current directory in which to open SaveAs ... dialogs More...
 
JKQTPDatastoregetDatastore ()
 returns a pointer to the datastore used by this object More...
 
const JKQTPDatastoregetDatastore () const
 returns a pointer to the datastore used by this object More...
 
QColor getDefaultTextColor () const
 default text color in the plot More...
 
QString getDefaultTextFontName () const
 default font name in the plot More...
 
double getDefaultTextSize () const
 default font size in the plot [pt] More...
 
QBrush getExportBackgroundBrush () const
 color of the background of the plot (widget area) when exporting More...
 
QColor getExportBackgroundColor () const
 color of the background of the plot (widget area) when exporting More...
 
double getFontSizeMultiplier () const
 multiplier for the font size More...
 
double getFontSizePrintMultiplier () const
 multiplier which is used for font sizes when the plot is exported/printed More...
 
JKQTPPlotElementgetGraph (size_t i)
 returns description of i'th graph More...
 
size_t getGraphCount ()
 returns the number of graphs More...
 
void getGraphsXMinMax (double &minx, double &maxx, double &smallestGreaterZero)
 get the maximum and minimum x-value over all graphs in the plot More...
 
void getGraphsYMinMax (double &miny, double &maxy, double &smallestGreaterZero)
 get the maximum and minimum y-value over all graphs in the plot More...
 
double getGraphWidth () const
 width (in pt) of lines used for newly added graphs More...
 
bool getGridPrinting () const
 indicates whether the grid printing is activated More...
 
size_t getGridPrintingCurrentX () const
 x position of the current graph in grid printing More...
 
size_t getGridPrintingCurrentY () const
 y position of the current graph in grid printing More...
 
int getHeight ()
 gets the width of the plot widget More...
 
double getInternalPlotBorderBottom () const
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double getInternalPlotBorderLeft () const
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double getInternalPlotBorderRight () const
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double getInternalPlotBorderTop () const
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
bool getKeyAutosize () const
 determine width of the key automatically More...
 
QBrush getKeyBackgroundBrush () const
 color of the key background More...
 
QColor getKeyBackgroundColor () const
 color of the key background More...
 
double getKeyFontSize () const
 font size for key labels [in points] More...
 
QColor getKeyFrameColor () const
 color of the key frame line More...
 
double getKeyFrameRounding () const
 rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt] More...
 
double getKeyFrameWidth () const
 width of the key frame line [pt] More...
 
double getKeyItemHeight () const
 height of a key item in pt [in units of height of font, fontSize] More...
 
double getKeyItemWidth () const
 width of a key item in pt [in units of width of 'X' set in font, fontSize] More...
 
JKQTPKeyLayout getKeyLayout () const
 the key layout More...
 
double getKeyLineLength () const
 length of the line samples in the key in pt [in units of width of 'X' set in font, fontSize] More...
 
JKQTPKeyPosition getKeyPosition () const
 key position More...
 
QColor getKeyTextColor () const
 color of the key entries' text More...
 
double getKeyXMargin () const
 x-distance between key frame and key content [in units of width of 'X' set in font, fontSize] More...
 
double getKeyXOffset () const
 x-offset of the key from the border of the plot [in units of width of 'X' set in font, fontSize] More...
 
double getKeyXSeparation () const
 distance between key line example and key text [in units of width of 'X' set in font, fontSize] More...
 
double getKeyYMargin () const
 y-distance between key frame and key content [in units of width of 'x' set in font, fontSize] More...
 
double getKeyYOffset () const
 y-offset of the key from the border of the plot [in units of width of 'x' set in font, fontSize] More...
 
double getKeyYSeparation () const
 distance between two key entries [in units of height of font, fontSize] More...
 
double getLineWidthMultiplier () const
 multiplier or the line widths More...
 
double getLineWidthPrintMultiplier () const
 multiplier which is used for linewidths when the plot is exported/printed More...
 
AdditionalActionsMap getLstAdditionalPlotterActions () const
 this list contains additional actions, that can be registered by registerAdditionalAction(). They are shown in the context menu only and are e.g. used to display "save image data" actions. Each action may be in a category (key of map), which is displayed as a submenu of the context-menu! More...
 
bool getMasterSynchronizeHeight () const
 synchronize plot height with masterPlotterY More...
 
bool getMasterSynchronizeWidth () const
 synchronize plot width with masterPlotterX More...
 
JKQTMathTextgetMathText ()
 returns the internal JKQTMathText, used to render text with LaTeX markup More...
 
const JKQTMathTextgetMathText () const
 returns the internal JKQTMathText, used to render text with LaTeX markup More...
 
int getNextStyle ()
 gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles More...
 
JKQTPOverlayElementgetOverlayElement (size_t i)
 returns description of i'th overlay element More...
 
size_t getOverlayElementCount ()
 returns the number of overlay elements More...
 
QBrush getPlotBackgroundBrush () const
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
QColor getPlotBackgroundColor () const
 color of the plot's background (i.e. of the area within the coordinate axes rectangle) More...
 
int getPlotBorderBottom () const
 free space between widget bottom border and plot bottom border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderBottom More...
 
int getPlotBorderLeft () const
 free space between widget left border and plot left border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderLeft More...
 
int getPlotBorderRight () const
 free space between widget right border and plot right border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderRight More...
 
int getPlotBorderTop () const
 free space between widget top border and plot top border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderTop More...
 
QColor getPlotFrameColor () const
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this color More...
 
double getPlotFrameRounding () const
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot, rounding the corners with this redius (<=0 -> no rounded rectangle) [pt] More...
 
double getPlotFrameWidth () const
 if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this width [pt] More...
 
int getPlotHeight () const
 calculated value: plot height in pixel inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight) More...
 
QString getPlotLabel () const
 the plot label text More...
 
QString getplotLabelFontName () const
 the plot label font name More...
 
double getPlotLabelFontSize () const
 the plot label font size [pt] More...
 
JKQTPGraphsModelgetPlotsModel ()
 returns model representing all Plots in this plotter and showing their visible/invisible state More...
 
const JKQTPGraphsModelgetPlotsModel () const
 returns model representing all Plots in this plotter and showing their visible/invisible state More...
 
JKQTPPen getPlotStyle (int i) const
 returns a QPen object for the i-th plot style More...
 
int getPlotWidth () const
 calculated value: plot width in pixel inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth) More...
 
bool getShowKey () const
 indicates whether to plot a key More...
 
bool getShowKeyFrame () const
 indicates whether to plot a frame around the key More...
 
textSizeData getTextSizeDetail (const QFont &fm, const QString &text, QPainter &painter)
 calculates a textSizeData for the given string text if it would be drawn on painter with font fm More...
 
void getTextSizeDetail (const QFont &fm, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos)
 calculates a text-size details for the given string text if it would be drawn on painter with font fm More...
 
textSizeData getTextSizeDetail (const QString &fontName, double fontSize, const QString &text, QPainter &painter)
 calculates a textSizeData for the given string text if it would be drawn on painter with font fontName More...
 
void getTextSizeDetail (const QString &fontName, double fontSize, const QString &text, QPainter &painter, double &width, double &ascent, double &descent, double &strikeoutPos)
 calculates a text-size details for the given string text if it would be drawn on painter with font fontName and font size fontSize More...
 
QSizeF getTextSizeSize (const QFont &fm, const QString &text, QPainter &painter)
 calculates a size of the given string text if it would be drawn on painter with font fm More...
 
QSizeF getTextSizeSize (const QString &fontName, double fontSize, const QString &text, QPainter &painter)
 calculates a size of the given string text if it would be drawn on painter with font fontName and font size fontSize More...
 
int getWidth ()
 gets the width of the plot widget More...
 
JKQTPHorizontalAxisgetXAxis ()
 returns the x-axis objet of the plot More...
 
const JKQTPHorizontalAxisgetXAxis () const
 returns the x-axis objet of the plot More...
 
double getXMax () const
 returns the current x-axis max More...
 
double getXMin () const
 returns the current x-axis min More...
 
JKQTPVerticalAxisgetYAxis ()
 returns the y-axis objet of the plot More...
 
const JKQTPVerticalAxisgetYAxis () const
 returns the y-axis objet of the plot More...
 
double getYMax () const
 returns the current y-axis max More...
 
double getYMin () const
 returns the current y-axis min More...
 
bool isDebugShowRegionBoxesEnabled () const
 if set true (default: false ) the JKQTBasePlotter draws colored rectangles to indicate the different regions in the plot (border, axes, ...) More...
 
bool isEmittingPlotSignalsEnabled () const
 returns, whether the signals plotUpdated() and overlaysUpdated() are emitted More...
 
bool isEmittingSignalsEnabled () const
 returns whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() More...
 
bool isPlotFrameVisible () const
 if true, JKQTBasePlotter will draw a rectangle/frame around the plot More...
 
bool isUsingAntiAliasingForGraphs () const
 specifies whether to use antialiasing for plotting the graphs More...
 
bool isUsingAntiAliasingForSystem () const
 specifies whether to use antialiasing for plotting the coordinate system More...
 
bool isUsingAntiAliasingForText () const
 specifies whether to use antialiasing when drawing any text More...
 
void loadCurrentPlotterStyle (const QSettings &settings, const QString &group="plot/")
 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 all the plot properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object More...
 
void loadUserSettings (const QSettings &settings, const QString &group=QString("plots_user/"))
 loads the plot user properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object More...
 
double mm2px (double mm, double dpi) const
 returns the given size in millimeters to pixels (with given dots per inch) More...
 
double mm2px (double mm, JKQTPEnhancedPainter &painter) const
 returns the given size in millimeters to pixels (with given dots per inch) More...
 
double mm2px (JKQTPEnhancedPainter &painter, double mm) const
 returns the given size in millimeters to pixels (with given dots per inch) 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...
 
size_t moveOverlayElementTop (JKQTPOverlayElement *gr)
 move the given overlay element to the top, or add it, if it is not yet contained More...
 
double p2x (double x) const
 return time coordinate coordinate from x-pixel More...
 
double p2y (double y) const
 return y coordinate coordinate from y-pixel More...
 
double pt2px (double pt, double dpi) const
 returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) More...
 
double pt2px (double pt, JKQTPEnhancedPainter &painter) const
 returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) More...
 
double pt2px (JKQTPEnhancedPainter &painter, double pt) const
 returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) More...
 
void redrawPlot ()
 emit plotUpdated() More...
 
void registerAdditionalAction (const QString &key, QAction *act)
 this function registers additional actions to lstAdditionalPlotterActions, which are displayed in the context-menu More...
 
void resetMasterSynchronization (SynchronizationDirection synchronizeDirection=sdXYAxes)
 switches any synchronization off, that has been created by synchronizeToMaster() More...
 
void saveAsCSV (const QString &filename, const QString &decimalSeparator, const QString &commentInitializer)
 save the current plot data as a Comma Separated Values (CSV) file More...
 
void saveAsSemicolonSV (const QString &filename, const QString &decimalSeparator, const QString &commentInitializer)
 save the current plot data as a Semicolon Separated Values (SSV) file More...
 
void saveAsTabSV (const QString &filename, const QString &decimalSeparator, const QString &commentInitializer)
 save the current plot data as a Tabulator Separated Values (CSV) file More...
 
void saveCurrentPlotterStyle (QSettings &settings, const QString &group="plot/") 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 saveUserSettings (QSettings &settings, const QString &group=QString("plots_user/")) const
 saves the plot user properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object. More...
 
void setAllGraphsInvisible ()
 set all graphs in the plotter invisible More...
 
void setAllGraphsVisible ()
 set all graphs in the plotter visible More...
 
void setCurrentPlotterStyle (const JKQTBasePlotterStyle &style)
 replace the current style properties for this JKQTBasePlotter More...
 
void setEmittingPlotSignalsEnabled (bool __value)
 controls, whether the signals plotUpdated() and overlaysUpdated() are emitted More...
 
void setEmittingSignalsEnabled (bool enabled)
 specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() More...
 
void setFontSizePrintMultiplier (double __value)
 multiplier which is used for font sizes when the plot is exported/printed More...
 
void setGraphVisible (int i, bool visible=true)
 switch visibility of the i -th graph to visible More...
 
void setGridPrinting (bool __value)
 indicates whether the grid printing is activated 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 __value)
 x position of the current graph in grid printing More...
 
void setGridPrintingCurrentY (size_t __value)
 y position of the current graph in grid printing More...
 
void setLineWidthPrintMultiplier (double __value)
 multiplier which is used for linewidths when the plot is exported/printed More...
 
void synchronizeToMaster (JKQTBasePlotter *master, 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 (JKQTBasePlotter *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 (JKQTBasePlotter *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 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...
 
double x2p (double x) const
 return x-pixel coordinate from time coordinate More...
 
double y2p (double y) const
 return y-pixel coordinate from y coordinate More...
 

Static Public Member Functions

static void deregisterPaintDeviceAdapter (JKQTPPaintDeviceAdapter *adapter)
 de-register a JKQTPPaintDeviceAdapter from JKQTBasePlotter/JKQTPlotter More...
 
static bool deregisterSaveDataAdapter (JKQTPSaveDataAdapter *adapter)
 de-register a JKQTPSaveDataAdapter from JKQTPlotter/JKQTBasePlotter More...
 
static void registerPaintDeviceAdapter (JKQTPPaintDeviceAdapter *adapter)
 register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQTBasePlotter/JKQTPlotter, which will use it to export graphics More...
 
static bool registerSaveDataAdapter (JKQTPSaveDataAdapter *adapter)
 register a JKQTPSaveDataAdapter with JKQTPlotter/JKQTBasePlotter that can be used to export data from the internal datastore into a file More...
 
static void setDefaultJKQTBasePrinterUserSettings (QString userSettigsFilename, const QString &userSettigsPrefix)
 set a global preset/default value for the userSettigsFilename and userSettigsPrefix properties of JKQTBasePlotter More...
 

Protected Slots

void exportpreviewPaintRequested (JKQTPEnhancedPainter &painter, QSize size)
 internal function for export preview More...
 
void getDataColumnsByUserCheckAll ()
 internal function for getDataColumnsByUser() More...
 
void getDataColumnsByUserCheckNone ()
 internal function for getDataColumnsByUser() More...
 
void getDataColumnsByUserComboBoxSelected (const QString &name)
 internal function for getDataColumnsByUser() More...
 
void getDataColumnsByUserItemChanged (QListWidgetItem *widgetitem)
 internal function for getDataColumnsByUser() More...
 
void getDataColumnsByUserSave ()
 internal function for getDataColumnsByUser() More...
 
void printpreviewPaintRequested (QPrinter *printer)
 internal function for print preview More...
 
void printpreviewPaintRequestedNew (QPaintDevice *paintDevice)
 internal function for print preview More...
 
void printpreviewPaintRequestedNew (QPrinter *printer)
 internal function for print preview More...
 
void printpreviewSetAspectRatio (bool checked)
 internal function for print preview More...
 
void printpreviewSetFontSizeMultiplier (double value)
 internal function for print preview More...
 
void printpreviewSetKeepAbsFontsize (bool checked)
 internal function for print preview More...
 
void printpreviewSetLineWidthMultiplier (double value)
 internal function for print preview More...
 
void printpreviewSetMagnification (double value)
 internal function for print preview More...
 
void printpreviewSetMagnificationNew (double value)
 internal function for print preview More...
 
void printpreviewSetSizeX (double value)
 internal function for print preview More...
 
void printpreviewSetSizeXNew (double value)
 internal function for print preview More...
 
void printpreviewSetSizeY (double value)
 internal function for print preview More...
 
void printpreviewSetSizeYNew (double value)
 internal function for print preview More...
 
void printpreviewSetZoom (double value)
 internal function for print preview More...
 
void printpreviewToggleMagnification (bool checked)
 internal function for print preview More...
 
void printpreviewUpdate ()
 internal function for print preview More...
 
void showPlotData ()
 internal function for getDataColumnsByUser() More...
 
void synchronizeXAxis (double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter *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, JKQTBasePlotter *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, JKQTBasePlotter *sender)
 may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis More...
 
void updatePreviewLabel ()
 internal function for print/export preview More...
 

Protected Member Functions

void calcPlotScaling (JKQTPEnhancedPainter &painter)
 calculate the scaling and offset values from axis min/max values More...
 
void drawGraphs (JKQTPEnhancedPainter &painter)
 plot the graphs More...
 
void drawKey (JKQTPEnhancedPainter &painter)
 plot a key More...
 
void drawKeyContents (JKQTPEnhancedPainter &painter, double x, double y, double width, double height)
 plot the key contents More...
 
void drawOverlaysWithHints (JKQTPEnhancedPainter &painter)
 plot all overlay elements, also sets the render hints in painter More...
 
void drawPlot (JKQTPEnhancedPainter &painter, bool showOverlays=true)
 paints the plot onto the given JKQTPEnhancedPainter object More...
 
void drawSystemGrid (JKQTPEnhancedPainter &painter)
 plot the grid More...
 
void drawSystemXAxis (JKQTPEnhancedPainter &painter)
 plot the x coordinate axis (incl. labels) More...
 
void drawSystemYAxis (JKQTPEnhancedPainter &painter)
 plot the x coordinate axis (incl. labels) More...
 
bool exportpreview (QSizeF pageSize, bool unitIsMM=false)
 show the export preview window for a given page size pageSize, either in pixels (unitIsMM ==false ) or in millimeters (unitIsMM ==true ) More...
 
QSet< int > getDataColumnsByUser ()
 
void getKeyExtent (JKQTPEnhancedPainter &painter, double *width, double *height, double *text_width=nullptr, double *text_height=nullptr, int *columns_count=nullptr, int *lines_count=nullptr)
 returns the size of the key (as call-by-reference parameters More...
 
double getPaintMagnification () const
 this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting! More...
 
double getPrintMagnification () const
 
void gridPaint (JKQTPEnhancedPainter &painter, QSizeF pageRect, bool showOverlays=true, bool scaleIfTooLarge=true, bool scaleIfTooSmall=true)
 simply calls paintPlot() if grid printing mode is deactivated and prints the graph grid otherwise pageRect is used to determine the size of the page to draw on. If this does not coincide with the widget extents this function calculates a scaling factor so the graphs fit onto the page. This is especially usefull when printing! More...
 
void gridPaintOverlays (JKQTPEnhancedPainter &painter, QSizeF pageRect)
 
void gridPrintingCalc ()
 This method goes through all registered plotters and calculates the width of every column and height of every row as the max over the row/column. The reults are stored in the private datamembers gridPrintingRows and gridPrintingColumns. gridPrintingSize will contain the size of all graphs together afterwards. More...
 
void initSettings ()
 set the standard settings (colors, line widths ...) More...
 
bool printpreviewNew (QPaintDevice *paintDevice, bool setAbsolutePaperSize=false, double printsizeX_inMM=-1.0, double printsizeY_inMM=-1.0, bool displayPreview=true)
 show the print preview window for a given print p More...
 
void propagateStyle ()
 copy sub-properties of plotterStyle to sub-objects that require it (axes, axes in graphs ...) and emit a plot update More...
 
void setFontSizeMultiplier (double __value)
 multiplier for the font size More...
 
void setLineWidthMultiplier (double __value)
 multiplier or the line widths More...
 
void setPaintMagnification (double __value)
 this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting! More...
 
void setPrintMagnification (double __value)
 

Protected Attributes

QAction * actCopyData
 QAction which triggers copying of the data to the clipboard. More...
 
QAction * actCopyMatlab
 QAction which triggers copying of the data to the clipboard in Matlab format. More...
 
QAction * actCopyPixelImage
 QAction which triggers copying of the image to the clipboard. More...
 
QAction * actPrint
 QAction which triggers the printing. More...
 
QAction * actSaveCSV
 QAction which triggers the saving as CSV (data only) More...
 
QAction * actSaveData
 QAction which triggers saving of the data used for the plot. More...
 
QAction * actSavePDF
 QAction which triggers the saving as PDF. More...
 
QAction * actSavePix
 QAction which triggers the saving as pixel image. More...
 
QAction * actSavePlot
 QAction which triggers saving of the plot as an image. More...
 
QAction * actSaveSVG
 QAction which triggers the saving as Scalable Vector Graphics (SVG) More...
 
QAction * actShowPlotData
 QAction to show a table with all the plot data in the datastore. More...
 
QAction * actZoomAll
 QAction which triggers zoom all. More...
 
QAction * actZoomIn
 QAction which triggers zoom in. More...
 
QAction * actZoomOut
 QAction which triggers zoom out. More...
 
double aspectRatio
 the aspect ratio of plotwidth and plotheight to maintain, if maintainAspectRatio==true More...
 
double axisAspectRatio
 the aspect ratio of axis widths to maintain, if maintainAxisAspectRatio==true More...
 
QString currentDataFileFormat
 the current file format to use in SaveDataAs ... dialogs More...
 
QString currentFileFormat
 the current file format to use in SaveAs ... dialogs More...
 
QString currentPrinter
 the currently selected printer More...
 
QString currentSaveDirectory
 the current directory in which to open SaveAs ... dialogs More...
 
QComboBox * dataColumnsCombobox
 
QListWidget * dataColumnsListWidget
 
JKQTPDatastoredatastore
 an object which manages all data columns for this plotter class More...
 
bool datastoreInternal
 indicates whether the datastore is managed (allocated/freed) internally or externally More...
 
bool emitPlotSignals
 controls, whether the signals plotUpdated() and overlaysUpdated() are emitted More...
 
bool emitSignals
 specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() More...
 
double fontSizeMultiplier
 multiplier for the font size More...
 
double fontSizePrintMultiplier
 multiplier which is used for font sizes when the plot is exported/printed More...
 
QMap< QString, QStringList > getDataColumnsByUserSaved
 
QList< JKQTPPlotElement * > graphs
 a vector that contains all graphs to be plottet in the system More...
 
bool gridPrinting
 indicates whether the grid printing is activated More...
 
QList< size_t > gridPrintingColumns
 this list contains all the columns of the current grid printing and stores its widths More...
 
size_t gridPrintingCurrentX
 x position of the current graph in grid printing More...
 
size_t gridPrintingCurrentY
 y position of the current graph in grid printing More...
 
QList< JKQTPGridPrintingItemgridPrintingList
 list that manages all the additional graphs for grid printing mode More...
 
QList< size_t > gridPrintingRows
 this list contains all the rows of the current grid printing and stores its heights More...
 
QSizeF gridPrintingSize
 size of all plots in grid printing mode, filled by gridPrintingCalc() More...
 
double internalPlotBorderBottom
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double internalPlotBorderBottom_notIncludingOutsidePlotSections
 calculated value: free space between widget right border and (plot+drawOutside) right border (including coordinate axes) More...
 
double internalPlotBorderLeft
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double internalPlotBorderLeft_notIncludingOutsidePlotSections
 calculated value: free space between widget left border and (plot+drawOutside) left border (including coordinate axes) More...
 
double internalPlotBorderRight
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double internalPlotBorderRight_notIncludingOutsidePlotSections
 calculated value: free space between widget bottom border and (plot+drawOutside) bottom border (including coordinate axes) More...
 
double internalPlotBorderTop
 calculated value: free space between widget top border and plot top border, as used to plot the graph More...
 
double internalPlotBorderTop_notIncludingOutsidePlotSections
 calculated value: free space between widget top border and (plot+drawOutside) top border (including coordinate axes) More...
 
int internalPlotHeight
 calculated value: plot height in pixel inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight) More...
 
double internalPlotKeyBorderBottom
 calculated value: free space between widget bottom border and bottom border of the key/legend More...
 
double internalPlotKeyBorderLeft
 calculated value: free space between widget left border and left border of the key/legend More...
 
double internalPlotKeyBorderRight
 calculated value: free space between widget right border and right border of the key/legend More...
 
double internalPlotKeyBorderTop
 calculated value: free space between widget top border and top border of the key/legend More...
 
int internalPlotWidth
 calculated value: plot width in pixel inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth) More...
 
double internalTitleHeight
 calculated value: height of the plot title (or 0 if no title) More...
 
double lineWidthMultiplier
 multiplier or the line widths More...
 
double lineWidthPrintMultiplier
 multiplier which is used for linewidths when the plot is exported/printed More...
 
AdditionalActionsMap lstAdditionalPlotterActions
 this list contains additional actions, that can be registered by registerAdditionalAction(). They are shown in the context menu only and are e.g. used to display "save image data" actions. Each action may be in a category (key of map), which is displayed as a submenu of the context-menu! More...
 
JKQTPGraphsModelm_plotsModel
 model representing all Plots in this plotter and showing their visible/invisible state More...
 
bool maintainAspectRatio
 indicates whether the widget should maintain an aspect ratio of plotwidth and plotheight More...
 
bool maintainAxisAspectRatio
 indicates whether the axes should maintain an aspect ratio More...
 
JKQTBasePlottermasterPlotterX
 the master plotter for x-dimension, this plotter is connected to. More...
 
JKQTBasePlottermasterPlotterY
 the master plotter for y-dimension, this plotter is connected to. More...
 
bool masterSynchronizeHeight
 synchronize plot height with masterPlotterY More...
 
bool masterSynchronizeWidth
 synchronize plot width with masterPlotterX More...
 
JKQTMathText mathText
 used to plot LaTeX markup More...
 
QList< JKQTPOverlayElement * > overlays
 
double paintMagnification
 this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting! More...
 
QString plotLabel
 the plot label text More...
 
JKQTBasePlotterStyle plotterStyle
 current style properties for this JKQTBasePlotter instance More...
 
bool useClipping
 indicates whether to use clipping (hack for printing, see print() ) More...
 
QList< int > usedStyles
 internal: used to store a list of all currently used plot styles More...
 
QString userSettigsFilename
 filename for the ini file in which to save the user settings More...
 
QString userSettigsPrefix
 prefix for the ini file in which to save the user settings More...
 
int widgetHeight
 height of the plot widget More...
 
int widgetWidth
 width of the plot widget More...
 
JKQTPHorizontalAxisxAxis
 object used for the x-axis More...
 
JKQTPVerticalAxisyAxis
 object used for the y-axis More...
 

Static Protected Attributes

static QHash< JKQTBasePlotter::textSizeKey, JKQTBasePlotter::textSizeDatas_TextSizeDataCache
 this is a cache for JKQTBasePlotter::textSizeData calculated with JKQTBasePlotter::getTextSizeDetail() More...
 

Private Attributes

QPointer< QLabel > exportPreviewLabel
 
bool exportUnitInMM
 
double printAspect
 
bool printDoUpdate
 
bool printKeepAbsoluteFontSizes
 
bool printKeepAspect
 
double printMagnification
 
QSizeF printPageSizeMM
 
QPointer< QPrintPreviewWidget > printPreview
 
bool printScaleToPagesize
 
bool printSetAbsolutePageSize
 
bool printSetAbsolutePlotSize
 
double printSizeX_Millimeter
 
double printSizeY_Millimeter
 
double printZoomFactor
 
QPointer< JKQTPEnhancedDoubleSpinBoxspinMagnification
 
QPointer< JKQTPEnhancedDoubleSpinBoxspinSizeX
 
QPointer< JKQTPEnhancedDoubleSpinBoxspinSizeY
 

Detailed Description

base class for 2D plotter classes (used by the plotter widget JKQTPlotter)

This class implements basic functionalities for the plotter classes. Those are:

  1. data storage using a JKQTPDatastore object
  2. coordinate transforms
  3. a set of properties for the graphs (colors, widthes ...) and also a system (see getNextStyle() to automatically choose a drawing style for different graphs.
  4. plot a set of overlay elements (may be used for fast plotting of indicators onto a complex plot)
  5. drawing the coordinate axes, grids ... (logarithmic and linear)
  6. saveing and printing the resulting plots

This class is NOT a widget, if you need a plotting widget, use JKQTPlotter. This class may be used to plot using a JKQTPEnhancedPainter.

See also
JKQTPlotter a QWidget class that displays a JKQTBasePlotter plot on a Qt Window.

Data Storage

As already mentioned this class does not provide means to draw graphs, but it contains a basic mechanism to associate data with it. This is imeplemented, using a JKQTPDatastore object together with some convenience access methods. No further data access is implemented and child classes are NOT forced to use this datastore. Hide it if you want. JKQTPlotter shows how to use it. This class implement a graph management, where graphs simply point to a set of columns inside the datastore that contain the actual plot data!

If you call the ructor with no arguments, it will create an internal datastore object and you can start adding data by using getDatastore(). If you have an external JKQTPDatastore object you can give it as parameter to the constructor or use one of the other methods:

  • useExternalDatastore(): tells the plotter object to use the given external datastore.
  • useAsInternalDatastore(): 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.
  • 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.
  • 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

Coordinate Systems and Transformations

These topics are discussed in the help for JKQTPCoordinateAxis. There is a set of coordinate transform methods (x2p(), y2p(), p2x(), p2y() which only call the respective methods in xAxis and yAxis objects.

Axis Ticks and Grids

  • The plotting of coordinate axes and grids, as well as coordinate transforms is done by JKQTPCoordinateAxis descendents (see documentation there)

If you want to set the axis properties, use getXAxis() or getYAxis() to get a pointer to the axis objects which then may be used to set the axis properties.

Appearance & Styling of the Graph

Plot Sizes & Borders

JKQTBasePlotter itself is no QWidget. It is merely tool to represent, manage and draw a graph onto any durface. JKQTPlotter then uses an internal JKQTBasePlotter instance to provide a QWidget.

Still the JKQTBasePlotter needs a way to represent the location of the graph, the graph axes etc. inside a drawing rectangle (of size widgetWidth * widgetHeight ). The plot borders are then offsets to the plot indise that rectangele. This image illustrated the principle:

When the plot is actually drawn, it may happen, that additional elements need to be positioned between the actual coordinate rectangle and the widget worder (e.g. axis labels, ticks, color bars etc.). Therefore this objects manages a set of internally calculated variables that also incorporate those dynamic elements. These are e.g. internalPlotBorderLeft, internalPlotBorderTop, internalPlotBorderRight, ... Their names all start with internal... .

Aspect Ratios

First note that this functionality is only available and activated if both axes are linear!

You can set two different aspect ratios:

So to achieve different effects, use these combinations:

Graph Keys (Legends)

This class provides means to plot a key together with the functions. The plotting is only partially implemented in this base class, and has to be implemented by child classes, as no graph management, that could provide a title for a specific graph, is implemented here. Key Plotting is performed in the plotKey() method. This method basically draws a frame and background and then calls plotKeyContent() to draw the actual contents. The size of the key is determined by a call to getKeyExtent(), while it's position and plotting style is determined by the key_... parameters. If getKeyExtent() returns 0 for height or width, no key is plotted. The key_... parameters are designed to be rather common for any usual kind of key, so any implementation of key should be able to use them to parametrize the output. Note however that additional parameters might be defined in child classes.

As it may be convenient to position the key completely outside the graph this class may change the plotBorders to make the key fit outside SO if you use a keyPosition outside the graph you should NOT keep any space for the key in the margins, as the program will change them to accomodate the size of the key. If you select an inside key position the key will be plotted OVER the graph, i.e. the margins won't be changed Note that the margin change is internal and not visible in the class interface!

There is also a possibility to determine the size of the key automatically, so all text fits in. This is activted by the property keyAutosize ( determine width of the key automatically ). If this is true the function getKeyExtent() has to check the width of every key item and take it into account when calculating the width and height of the key content. By default this feature is switched ON.

Printing, Saving & Exporting

Saving and Printing Graphs

This class implement a set of function to save and print the graphs:

  • print() prints the graph on a QPrinter object
  • saveAsPixelImage() saves the plot into a pixel image file (PNG, TIFF, ... formats, as supported by Qt)
  • saveAsPDF() saves the graph as a PDF file (using the Qt printing engine)
  • saveAsPS() saves the graph as a PDF file (using the Qt printing engine)
  • saveAsSVG() saves the graph as a SVG file (using the Qt SVG library)
  • saveImage() saves the graph

You can also copy the contents of the plot into the clipboard:

Exporting Graph Data

This class implement a set of function to save the data of the graphs:

  • saveData() saves the data of the plot
  • saveAsCSV() saves the data of the plot as comma separated values
  • saveAsSYLK() saves the data of the plot as SYLK spreadsheet
  • saveAsDIF() saves the data of the plot as data interchange format file
  • saveAsMatlab() saves the data of the plot as a CSV file suitable for Matlab
  • saveAsSemicolonSV() saves the data of the plot as a Semicolon Separated Values (SSV)
  • saveAsTabSV() saves the data of the plot as a Tabulator Separated Values (CSV) file
  • saveAsGerExcelCSV() saves the data of the plot as a Text file (SSV) suitable for german excel, i.e. with comma as decimal separator

You can also copy the graphs' data into the clipboard:

Synchronizing Several Plots

Often a single plot is not sufficient, but several plots need to be aligned with respect to each other:

This can be achieved by putting several JKQTPlotter instances into a Qt Layout. Then you can fill each plot differently and set the x-/y-range of each plot by hand. This method works for simple cases, but has several drawbacks:

  • Due to the independent and automatic layouting of each plot, the axes do not need to be aligned properly
  • When you print the plot, the printing does not know about the layout and the other plots in it. Therefor it will only print the plot itself.
    Printing with grid-printing-mode deactivated

    Printing with grid-printing-mode activated
  • when you zoom/pan in one of the plots (e.g. using the mouse), the other plots will not adapt their axes to match the new area, but especially in cases as in the image above it would be beneficial, that tha x-axis of the plot at the bottom follows the x-axis of the plot above etc.

To overcome these limitations, JKQTPlotter (and JKQTBasePlotter) offer an API with which you can declare relations between different plots (one of them is made the master) and you can synchronize the axes of two plots, when zooming (also when calling e.g. zoomToFit() or setXY() ). This API is:

Synchronizing Axis Range & Plot Width

You can synchronize the plot width and axis range between two JKQTPlotter instaces using:

See also
See Example (JKQTPlotter): Laying out Several Plots for an extensive example of the functionality.

Grid Printing/Desclaring Relations between Plots

Usually each JKQTPlotter/JKQTBasePlotter prints or exports only itself. But in many cases you might want to add several plots that form a grid layout and also want to export them as one image/print them on one page. To do this, JKQTPlotter/JKQTBasePlotter offers the "grid printing" mode. In this mode, you can declare relations between different JKQTPlotters/JKQTBasePlotters by putting them in a rectangular grid (like in a QGridLayout). then any export/print action will draw all (explicitly) decalred graphs.

The grid printing API is composed of these functions:

See also
See Example (JKQTPlotter): Laying out Several Plots for an extensive example of the functionality.

User Properties

There is a subset of options that describe how the user interacted with the plotter (export/print scaling factors etc, save directories, other export settings, ...). These are not stored/loaded using saveSettings() and loadSettings(), but using saveUserSettings() and loadUserSettings(). These methods MAY (strictly optional and turned off by default) be called by saveSettings() and loadSettings(), if the property userSettigsFilename ( filename for the ini file in which to save the user settings )is set (not-empty). In this case the suer settings are stored/loaded also everytime they are changed by the user or programmatically.

Member Typedef Documentation

◆ AdditionalActionsMap

typedef QMap<QString, QList<QPointer<QAction> > > JKQTBasePlotter::AdditionalActionsMap

◆ AdditionalActionsMapIterator

typedef QMapIterator<QString, QList<QPointer<QAction> > > JKQTBasePlotter::AdditionalActionsMapIterator

Member Enumeration Documentation

◆ SynchronizationDirection

denotes, which axes to synchronize in synchronizeToMaster()

Enumerator
sdXAxis 

x-axis only

sdYAxis 

y-axis only

sdXYAxes 

x- and y-axis

Constructor & Destructor Documentation

◆ JKQTBasePlotter() [1/2]

JKQTBasePlotter::JKQTBasePlotter ( bool  datastore_internal,
QObject *  parent = nullptr,
JKQTPDatastore datast = nullptr 
)
explicit

class constructor

if datastore_internal is true then the constructor will create an internal datastore object. The datastore will be managed (freed) by this class. If datastore_internal is false the class will use tha datastore provided in datast as an external datastore. You can modify this later by using useInternalDatastore() and useExternalDatastore().

◆ JKQTBasePlotter() [2/2]

JKQTBasePlotter::JKQTBasePlotter ( )
delete

◆ ~JKQTBasePlotter()

virtual JKQTBasePlotter::~JKQTBasePlotter ( )
virtual

class destructor

Member Function Documentation

◆ addGraph()

size_t JKQTBasePlotter::addGraph ( JKQTPPlotElement gr)

add a new graph, returns it's position in the graphs list, if the graph is already in the plot, this returns the index in the list

◆ addGraphs()

template<class TJKQTPGraphContainer >
void JKQTBasePlotter::addGraphs ( const TJKQTPGraphContainer &  gr,
QVector< size_t > *  graphIDsOut = nullptr 
)
inline

add a new graphs from a QVector<JKQTPPlotElement*>, QList<JKQTPPlotElement*>, std::vector<JKQTPPlotElement*> ... or any standard-iterateable container with JKQTPPlotElement*-items

Template Parameters
TJKQTPGraphContainera container type with default C++-sytle iterator interface (i.e. methods begin() and end() and an iterator, which may be moved to the next element with the operator ++ .
Parameters
grContainer of type TJKQTPGraphContainer, which contains the graphs Note: The JKQTPlotter takes ownership of graphs in gr .
[out]graphIDsOutoptional output parameter, the vector will contain the IDs of each graph added to theis plot

◆ addGridPrintingPlotter()

void JKQTBasePlotter::addGridPrintingPlotter ( size_t  x,
size_t  y,
JKQTBasePlotter plotter 
)

add a new plotter for grid printing mode

◆ addOverlayElement()

size_t JKQTBasePlotter::addOverlayElement ( JKQTPOverlayElement gr)

add a new overlay element, returns it's position in the overlay elements list, if the overlay element is already in the plot, this returns the index in the list

◆ addOverlayElements()

void JKQTBasePlotter::addOverlayElements ( const QList< JKQTPOverlayElement * > &  gr)

add a new overlay elements from a QList

◆ beforePlotScalingRecalculate

void JKQTBasePlotter::beforePlotScalingRecalculate ( )
signal

emitted before the plot scaling has been recalculated

◆ calcPlotScaling()

void JKQTBasePlotter::calcPlotScaling ( JKQTPEnhancedPainter painter)
protected

calculate the scaling and offset values from axis min/max values

◆ clearGraphs()

void JKQTBasePlotter::clearGraphs ( bool  deleteGraphs = true)

remove all plots

Parameters
deleteGraphsif set true (default) the graph objects will also be deleted

◆ clearGridPrintingPlotters()

void JKQTBasePlotter::clearGridPrintingPlotters ( )

clear all additional plotters for grid printing mode

◆ clearOverlayElement()

void JKQTBasePlotter::clearOverlayElement ( bool  deleteGraphs = true)

remove all overlay elements

Parameters
deleteGraphsif set true (default) the overlay element objects will also be deleted

◆ containsGraph()

bool JKQTBasePlotter::containsGraph ( JKQTPPlotElement gr) const

returns true, if the given graph is in this plot

◆ containsOverlayElement()

bool JKQTBasePlotter::containsOverlayElement ( JKQTPOverlayElement gr) const

returns true, if the given overlay element is in this plot

◆ copyData

void JKQTBasePlotter::copyData ( )
slot

copy the data used for the current plot to the clipboard

copies data as tab separated data with the system-decimal point.

◆ copyDataMatlab

void JKQTBasePlotter::copyDataMatlab ( )
slot

copy the data used for the current plot to the clipboard in Matlab format

◆ copyPixelImage

void JKQTBasePlotter::copyPixelImage ( )
slot

copy the current plot as a pixel image to the clipboard

◆ deleteGraph() [1/2]

void JKQTBasePlotter::deleteGraph ( JKQTPPlotElement gr,
bool  deletegraph = true 
)

remove the given graph, if it is contained

◆ deleteGraph() [2/2]

void JKQTBasePlotter::deleteGraph ( size_t  i,
bool  deletegraph = true 
)

remove the i-th graph

◆ deleteOverlayElement() [1/2]

void JKQTBasePlotter::deleteOverlayElement ( JKQTPOverlayElement gr,
bool  deletegraph = true 
)

remove the given overlay element, if it is contained

◆ deleteOverlayElement() [2/2]

void JKQTBasePlotter::deleteOverlayElement ( size_t  i,
bool  deletegraph = true 
)

remove the i-th overlay element

◆ deregisterAdditionalAction()

void JKQTBasePlotter::deregisterAdditionalAction ( QAction *  act)

this function deregisters an additional action, previously added with registerAdditionalAction()

See also
registerAdditionalAction()

◆ deregisterPaintDeviceAdapter()

static void JKQTBasePlotter::deregisterPaintDeviceAdapter ( JKQTPPaintDeviceAdapter adapter)
static

de-register a JKQTPPaintDeviceAdapter from JKQTBasePlotter/JKQTPlotter

◆ deregisterSaveDataAdapter()

static bool JKQTBasePlotter::deregisterSaveDataAdapter ( JKQTPSaveDataAdapter adapter)
static

de-register a JKQTPSaveDataAdapter from JKQTPlotter/JKQTBasePlotter

◆ didot2px() [1/3]

double JKQTBasePlotter::didot2px ( double  pt,
double  dpi 
) const
inline

returns the given size in Didot points (0.376 mm) to pixels (with given dots per inch)

◆ didot2px() [2/3]

double JKQTBasePlotter::didot2px ( double  pt,
JKQTPEnhancedPainter painter 
) const
inline

returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter)

◆ didot2px() [3/3]

double JKQTBasePlotter::didot2px ( JKQTPEnhancedPainter painter,
double  pt 
) const
inline

returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter)

◆ doesMaintainAspectRatio()

bool JKQTBasePlotter::doesMaintainAspectRatio ( ) const

returns whether the maintaining of the data aspect ratio is enabled or disabled

◆ doesMaintainAxisAspectRatio()

bool JKQTBasePlotter::doesMaintainAxisAspectRatio ( ) const

returns whether the maintaining of the axis aspect ratio is enabled or disabled

◆ draw() [1/2]

void JKQTBasePlotter::draw ( JKQTPEnhancedPainter painter,
const QPoint &  pos = QPoint(0, 0),
bool  showOverlays = true 
)

draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
poswhere to plot the painter (left-top corner)
showOverlaysdecides whether to draw overlays

◆ draw() [2/2]

void JKQTBasePlotter::draw ( JKQTPEnhancedPainter painter,
const QRect &  rect,
bool  showOverlays = true 
)

draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
rectrectangle to plot into
showOverlaysdecides whether to draw overlays

◆ drawGraphs()

void JKQTBasePlotter::drawGraphs ( JKQTPEnhancedPainter painter)
protected

plot the graphs

◆ drawKey()

void JKQTBasePlotter::drawKey ( JKQTPEnhancedPainter painter)
protected

plot a key

◆ drawKeyContents()

void JKQTBasePlotter::drawKeyContents ( JKQTPEnhancedPainter painter,
double  x,
double  y,
double  width,
double  height 
)
protected

plot the key contents

This function does not do anything and has to be overwritten in child classes if they want to plot a key. The implementation should draw the contents of the key, not its frame as this is done in plotKey().

Parameters
painterdraw the key on this painter
xleft-most coordinate of the key [pixels]
ytop-most coordinate of the key [pixels]
widthwidth of the key [pixels]
heightheight of the key [pixels]

So any implementation should only draw inside the rectangle [x..x+width, y..y+hieght]

◆ drawNonGrid() [1/2]

void JKQTBasePlotter::drawNonGrid ( JKQTPEnhancedPainter painter,
const QPoint &  pos = QPoint(0, 0),
bool  showOverlays = true 
)

draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
poswhere to plot the painter (left-top corner)
showOverlaysdecides whether to draw overlays

◆ drawNonGrid() [2/2]

void JKQTBasePlotter::drawNonGrid ( JKQTPEnhancedPainter painter,
const QRect &  rect,
bool  showOverlays = true 
)

draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
rectrectangle to plot into
showOverlaysdecides whether to draw overlays

◆ drawNonGridOverlays()

void JKQTBasePlotter::drawNonGridOverlays ( JKQTPEnhancedPainter painter,
const QPoint &  pos = QPoint(0, 0) 
)

draw the contained graph overlays (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
poswhere to plot the painter (left-top corner)

◆ drawOverlays()

void JKQTBasePlotter::drawOverlays ( JKQTPEnhancedPainter painter,
const QRect &  rect 
)

draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter

Parameters
painterJKQTPEnhancedPainter to which the plot should be drawn
rectrectangle to plot into

◆ drawOverlaysWithHints()

void JKQTBasePlotter::drawOverlaysWithHints ( JKQTPEnhancedPainter painter)
protected

plot all overlay elements, also sets the render hints in painter

◆ drawPlot()

void JKQTBasePlotter::drawPlot ( JKQTPEnhancedPainter painter,
bool  showOverlays = true 
)
protected

paints the plot onto the given JKQTPEnhancedPainter object

Parameters
painterJKQTPEnhancedPainter to draw on
showOverlaysdecides whether to draw overlays

◆ drawSystemGrid()

void JKQTBasePlotter::drawSystemGrid ( JKQTPEnhancedPainter painter)
protected

plot the grid

◆ drawSystemXAxis()

void JKQTBasePlotter::drawSystemXAxis ( JKQTPEnhancedPainter painter)
protected

plot the x coordinate axis (incl. labels)

◆ drawSystemYAxis()

void JKQTBasePlotter::drawSystemYAxis ( JKQTPEnhancedPainter painter)
protected

plot the x coordinate axis (incl. labels)

◆ enableDebugShowRegionBoxes

void JKQTBasePlotter::enableDebugShowRegionBoxes ( bool  enabled = true)
slot

if set true (default: false ) the JKQTBasePlotter draws colored rectangles to indicate the different regions in the plot (border, axes, ...)

See also
JKQTBasePlotterStyle::debugShowRegionBoxes, isDebugShowRegionBoxesEnabled()

◆ exportpreview()

bool JKQTBasePlotter::exportpreview ( QSizeF  pageSize,
bool  unitIsMM = false 
)
protected

show the export preview window for a given page size pageSize, either in pixels (unitIsMM ==false ) or in millimeters (unitIsMM ==true )

◆ exportpreviewPaintRequested

void JKQTBasePlotter::exportpreviewPaintRequested ( JKQTPEnhancedPainter painter,
QSize  size 
)
protectedslot

internal function for export preview

◆ forceInternalDatastore()

void JKQTBasePlotter::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

◆ getAbsoluteXMax()

double JKQTBasePlotter::getAbsoluteXMax ( ) const

returns the absolute x-axis max

◆ getAbsoluteXMin()

double JKQTBasePlotter::getAbsoluteXMin ( ) const

returns the absolute x-axis min

◆ getAbsoluteYMax()

double JKQTBasePlotter::getAbsoluteYMax ( ) const

returns the absolute y-axis max

◆ getAbsoluteYMin()

double JKQTBasePlotter::getAbsoluteYMin ( ) const

returns the absolute y-axis min

◆ getActionCopyData()

QAction* JKQTBasePlotter::getActionCopyData ( ) const

QAction which triggers copying of the data to the clipboard.

◆ getActionCopyMatlab()

QAction* JKQTBasePlotter::getActionCopyMatlab ( ) const

QAction which triggers copying of the data to the clipboard in Matlab format.

◆ getActionCopyPixelImage()

QAction* JKQTBasePlotter::getActionCopyPixelImage ( ) const

QAction which triggers copying of the image to the clipboard.

◆ getActionPrint()

QAction* JKQTBasePlotter::getActionPrint ( ) const

QAction which triggers the printing.

◆ getActionSaveCSV()

QAction* JKQTBasePlotter::getActionSaveCSV ( ) const

QAction which triggers the saving as CSV (data only)

◆ getActionSaveData()

QAction* JKQTBasePlotter::getActionSaveData ( ) const

QAction which triggers saving of the data used for the plot.

◆ getActionSavePDF()

QAction* JKQTBasePlotter::getActionSavePDF ( ) const

QAction which triggers the saving as PDF.

◆ getActionSavePix()

QAction* JKQTBasePlotter::getActionSavePix ( ) const

QAction which triggers the saving as pixel image.

◆ getActionSavePlot()

QAction* JKQTBasePlotter::getActionSavePlot ( ) const

QAction which triggers saving of the plot as an image.

◆ getActionSaveSVG()

QAction* JKQTBasePlotter::getActionSaveSVG ( ) const

QAction which triggers the saving as Scalable Vector Graphics (SVG)

◆ getActionShowPlotData()

QAction* JKQTBasePlotter::getActionShowPlotData ( ) const

QAction to show a table with all the plot data in the datastore.

◆ getActionZoomAll()

QAction* JKQTBasePlotter::getActionZoomAll ( ) const

QAction which triggers zoom all.

◆ getActionZoomIn()

QAction* JKQTBasePlotter::getActionZoomIn ( ) const

QAction which triggers zoom in.

◆ getActionZoomOut()

QAction* JKQTBasePlotter::getActionZoomOut ( ) const

QAction which triggers zoom out.

◆ getAspectRatio()

double JKQTBasePlotter::getAspectRatio ( ) const

returns the data aspect ratio, enforced with setMaintainApsectRatio(true)

◆ getAxisAspectRatio()

double JKQTBasePlotter::getAxisAspectRatio ( ) const

returns the axis aspect ratio, enforced with setMaintainAxisApsectRatio(true)

◆ getBackgroundBrush()

QBrush JKQTBasePlotter::getBackgroundBrush ( ) const

color of the background of the plot (widget area) when drawing (to the screen)


◆ getBackgroundColor()

QColor JKQTBasePlotter::getBackgroundColor ( ) const

color of the background of the plot (widget area) when drawing (to the screen)


◆ getCSVcommentInitializer()

QString JKQTBasePlotter::getCSVcommentInitializer ( ) const

set the string used to introduce comments in text output when exporting data

◆ getCSVdecimalSeparator()

QString JKQTBasePlotter::getCSVdecimalSeparator ( ) const

returns the decimal separator used when exporting data to text files

◆ getCurrentFileFormat()

QString JKQTBasePlotter::getCurrentFileFormat ( ) const

return the last file format to use in SaveAs ... dialogs

◆ getCurrentPlotterStyle()

const JKQTBasePlotterStyle& JKQTBasePlotter::getCurrentPlotterStyle ( ) const

◆ getCurrentSaveDirectory()

QString JKQTBasePlotter::getCurrentSaveDirectory ( ) const

returns the current directory in which to open SaveAs ... dialogs

◆ getDataColumnsByUser()

QSet<int> JKQTBasePlotter::getDataColumnsByUser ( )
protected

◆ getDataColumnsByUserCheckAll

void JKQTBasePlotter::getDataColumnsByUserCheckAll ( )
protectedslot

internal function for getDataColumnsByUser()

◆ getDataColumnsByUserCheckNone

void JKQTBasePlotter::getDataColumnsByUserCheckNone ( )
protectedslot

internal function for getDataColumnsByUser()

◆ getDataColumnsByUserComboBoxSelected

void JKQTBasePlotter::getDataColumnsByUserComboBoxSelected ( const QString &  name)
protectedslot

internal function for getDataColumnsByUser()

◆ getDataColumnsByUserItemChanged

void JKQTBasePlotter::getDataColumnsByUserItemChanged ( QListWidgetItem *  widgetitem)
protectedslot

internal function for getDataColumnsByUser()

◆ getDataColumnsByUserSave

void JKQTBasePlotter::getDataColumnsByUserSave ( )
protectedslot

internal function for getDataColumnsByUser()

◆ getDatastore() [1/2]

JKQTPDatastore* JKQTBasePlotter::getDatastore ( )
inline

returns a pointer to the datastore used by this object

◆ getDatastore() [2/2]

const JKQTPDatastore* JKQTBasePlotter::getDatastore ( ) const
inline

returns a pointer to the datastore used by this object

◆ getDefaultTextColor()

QColor JKQTBasePlotter::getDefaultTextColor ( ) const

default text color in the plot

◆ getDefaultTextFontName()

QString JKQTBasePlotter::getDefaultTextFontName ( ) const

default font name in the plot

◆ getDefaultTextSize()

double JKQTBasePlotter::getDefaultTextSize ( ) const

default font size in the plot [pt]

◆ getExportBackgroundBrush()

QBrush JKQTBasePlotter::getExportBackgroundBrush ( ) const

color of the background of the plot (widget area) when exporting


◆ getExportBackgroundColor()

QColor JKQTBasePlotter::getExportBackgroundColor ( ) const

color of the background of the plot (widget area) when exporting


◆ getFontSizeMultiplier()

double JKQTBasePlotter::getFontSizeMultiplier ( ) const

multiplier for the font size

◆ getFontSizePrintMultiplier()

double JKQTBasePlotter::getFontSizePrintMultiplier ( ) const

multiplier which is used for font sizes when the plot is exported/printed

◆ getGraph()

JKQTPPlotElement* JKQTBasePlotter::getGraph ( size_t  i)

returns description of i'th graph

◆ getGraphCount()

size_t JKQTBasePlotter::getGraphCount ( )

returns the number of graphs

◆ getGraphsXMinMax()

void JKQTBasePlotter::getGraphsXMinMax ( double &  minx,
double &  maxx,
double &  smallestGreaterZero 
)

get the maximum and minimum x-value over all graphs in the plot

Parameters
[out]minxsmallest x value
[out]maxxlargest x value
[out]smallestGreaterZerosmallest data point which is >0 (needed for scaling of logarithmic axes)

The result is given in the two parameters which are call-by-reference parameters!

◆ getGraphsYMinMax()

void JKQTBasePlotter::getGraphsYMinMax ( double &  miny,
double &  maxy,
double &  smallestGreaterZero 
)

get the maximum and minimum y-value over all graphs in the plot

Parameters
[out]minysmallest y value
[out]maxylargest y value
[out]smallestGreaterZerosmallest data point which is >0 (needed for scaling of logarithmic axes)

The result is given in the two parameters which are call-by-reference parameters!

◆ getGraphWidth()

double JKQTBasePlotter::getGraphWidth ( ) const

width (in pt) of lines used for newly added graphs


◆ getGridPrinting()

bool JKQTBasePlotter::getGridPrinting ( ) const

indicates whether the grid printing is activated

See also
Grid Printing/Desclaring Relations between Plots

◆ getGridPrintingCurrentX()

size_t JKQTBasePlotter::getGridPrintingCurrentX ( ) const

x position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ getGridPrintingCurrentY()

size_t JKQTBasePlotter::getGridPrintingCurrentY ( ) const

y position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ getHeight()

int JKQTBasePlotter::getHeight ( )

gets the width of the plot widget

◆ getInternalPlotBorderBottom()

double JKQTBasePlotter::getInternalPlotBorderBottom ( ) const
inline

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ getInternalPlotBorderLeft()

double JKQTBasePlotter::getInternalPlotBorderLeft ( ) const
inline

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ getInternalPlotBorderRight()

double JKQTBasePlotter::getInternalPlotBorderRight ( ) const
inline

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ getInternalPlotBorderTop()

double JKQTBasePlotter::getInternalPlotBorderTop ( ) const
inline

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ getKeyAutosize()

bool JKQTBasePlotter::getKeyAutosize ( ) const

determine width of the key automatically

◆ getKeyBackgroundBrush()

QBrush JKQTBasePlotter::getKeyBackgroundBrush ( ) const

color of the key background

◆ getKeyBackgroundColor()

QColor JKQTBasePlotter::getKeyBackgroundColor ( ) const

color of the key background

◆ getKeyExtent()

void JKQTBasePlotter::getKeyExtent ( JKQTPEnhancedPainter painter,
double *  width,
double *  height,
double *  text_width = nullptr,
double *  text_height = nullptr,
int *  columns_count = nullptr,
int *  lines_count = nullptr 
)
protected

returns the size of the key (as call-by-reference parameters

Any implementation of key plotting has to overwrite this function and use it to return the size of the key that would be plotted by plotKeyContents(). This class will use the return values to plot the frame of the key and also supply them to plotKeyContents(). If height or width are returned 0, no key is plotted

The implementation in here returns zero size!

◆ getKeyFontSize()

double JKQTBasePlotter::getKeyFontSize ( ) const

font size for key labels [in points]

◆ getKeyFrameColor()

QColor JKQTBasePlotter::getKeyFrameColor ( ) const

color of the key frame line

◆ getKeyFrameRounding()

double JKQTBasePlotter::getKeyFrameRounding ( ) const

rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt]

◆ getKeyFrameWidth()

double JKQTBasePlotter::getKeyFrameWidth ( ) const

width of the key frame line [pt]

◆ getKeyItemHeight()

double JKQTBasePlotter::getKeyItemHeight ( ) const

height of a key item in pt [in units of height of font, fontSize]

◆ getKeyItemWidth()

double JKQTBasePlotter::getKeyItemWidth ( ) const

width of a key item in pt [in units of width of 'X' set in font, fontSize]

◆ getKeyLayout()

JKQTPKeyLayout JKQTBasePlotter::getKeyLayout ( ) const

the key layout

◆ getKeyLineLength()

double JKQTBasePlotter::getKeyLineLength ( ) const

length of the line samples in the key in pt [in units of width of 'X' set in font, fontSize]

◆ getKeyPosition()

JKQTPKeyPosition JKQTBasePlotter::getKeyPosition ( ) const

key position

◆ getKeyTextColor()

QColor JKQTBasePlotter::getKeyTextColor ( ) const

color of the key entries' text

◆ getKeyXMargin()

double JKQTBasePlotter::getKeyXMargin ( ) const

x-distance between key frame and key content [in units of width of 'X' set in font, fontSize]

◆ getKeyXOffset()

double JKQTBasePlotter::getKeyXOffset ( ) const

x-offset of the key from the border of the plot [in units of width of 'X' set in font, fontSize]

◆ getKeyXSeparation()

double JKQTBasePlotter::getKeyXSeparation ( ) const

distance between key line example and key text [in units of width of 'X' set in font, fontSize]

◆ getKeyYMargin()

double JKQTBasePlotter::getKeyYMargin ( ) const

y-distance between key frame and key content [in units of width of 'x' set in font, fontSize]

◆ getKeyYOffset()

double JKQTBasePlotter::getKeyYOffset ( ) const

y-offset of the key from the border of the plot [in units of width of 'x' set in font, fontSize]

◆ getKeyYSeparation()

double JKQTBasePlotter::getKeyYSeparation ( ) const

distance between two key entries [in units of height of font, fontSize]

◆ getLineWidthMultiplier()

double JKQTBasePlotter::getLineWidthMultiplier ( ) const

multiplier or the line widths

◆ getLineWidthPrintMultiplier()

double JKQTBasePlotter::getLineWidthPrintMultiplier ( ) const

multiplier which is used for linewidths when the plot is exported/printed

◆ getLstAdditionalPlotterActions()

AdditionalActionsMap JKQTBasePlotter::getLstAdditionalPlotterActions ( ) const

this list contains additional actions, that can be registered by registerAdditionalAction(). They are shown in the context menu only and are e.g. used to display "save image data" actions. Each action may be in a category (key of map), which is displayed as a submenu of the context-menu!

◆ getMasterSynchronizeHeight()

bool JKQTBasePlotter::getMasterSynchronizeHeight ( ) const

synchronize plot height with masterPlotterY

◆ getMasterSynchronizeWidth()

bool JKQTBasePlotter::getMasterSynchronizeWidth ( ) const

synchronize plot width with masterPlotterX

◆ getMathText() [1/2]

JKQTMathText* JKQTBasePlotter::getMathText ( )

returns the internal JKQTMathText, used to render text with LaTeX markup

◆ getMathText() [2/2]

const JKQTMathText* JKQTBasePlotter::getMathText ( ) const

returns the internal JKQTMathText, used to render text with LaTeX markup

◆ getNextStyle()

int JKQTBasePlotter::getNextStyle ( )

gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles

◆ getOverlayElement()

JKQTPOverlayElement* JKQTBasePlotter::getOverlayElement ( size_t  i)

returns description of i'th overlay element

◆ getOverlayElementCount()

size_t JKQTBasePlotter::getOverlayElementCount ( )

returns the number of overlay elements

◆ getPaintMagnification()

double JKQTBasePlotter::getPaintMagnification ( ) const
protected

this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting!

◆ getPlotBackgroundBrush()

QBrush JKQTBasePlotter::getPlotBackgroundBrush ( ) const

color of the plot's background (i.e. of the area within the coordinate axes rectangle)


◆ getPlotBackgroundColor()

QColor JKQTBasePlotter::getPlotBackgroundColor ( ) const

color of the plot's background (i.e. of the area within the coordinate axes rectangle)


◆ getPlotBorderBottom()

int JKQTBasePlotter::getPlotBorderBottom ( ) const

free space between widget bottom border and plot bottom border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderBottom

See also
JKQTBasePlotter::setBorder(), Plot Sizes & Borders

◆ getPlotBorderLeft()

int JKQTBasePlotter::getPlotBorderLeft ( ) const

free space between widget left border and plot left border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderLeft

See also
JKQTBasePlotter::setBorder(), Plot Sizes & Borders

◆ getPlotBorderRight()

int JKQTBasePlotter::getPlotBorderRight ( ) const

free space between widget right border and plot right border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderRight

See also
JKQTBasePlotter::setBorder(), Plot Sizes & Borders

◆ getPlotBorderTop()

int JKQTBasePlotter::getPlotBorderTop ( ) const

free space between widget top border and plot top border, this property may be set by the user and is possibly altered by the key positioning algorithm. The altered value is written to internalPlotBorderTop

See also
JKQTBasePlotter::setBorder(), Plot Sizes & Borders

◆ getPlotFrameColor()

QColor JKQTBasePlotter::getPlotFrameColor ( ) const

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this color

◆ getPlotFrameRounding()

double JKQTBasePlotter::getPlotFrameRounding ( ) const

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot, rounding the corners with this redius (<=0 -> no rounded rectangle) [pt]

◆ getPlotFrameWidth()

double JKQTBasePlotter::getPlotFrameWidth ( ) const

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this width [pt]

◆ getPlotHeight()

int JKQTBasePlotter::getPlotHeight ( ) const
inline

calculated value: plot height in pixel inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight)

See also
Plot Sizes & Borders

◆ getPlotLabel()

QString JKQTBasePlotter::getPlotLabel ( ) const

the plot label text

◆ getplotLabelFontName()

QString JKQTBasePlotter::getplotLabelFontName ( ) const

the plot label font name

◆ getPlotLabelFontSize()

double JKQTBasePlotter::getPlotLabelFontSize ( ) const

the plot label font size [pt]

◆ getPlotsModel() [1/2]

JKQTPGraphsModel* JKQTBasePlotter::getPlotsModel ( )
inline

returns model representing all Plots in this plotter and showing their visible/invisible state

◆ getPlotsModel() [2/2]

const JKQTPGraphsModel* JKQTBasePlotter::getPlotsModel ( ) const
inline

returns model representing all Plots in this plotter and showing their visible/invisible state

◆ getPlotStyle()

JKQTPPen JKQTBasePlotter::getPlotStyle ( int  i) const

returns a QPen object for the i-th plot style

◆ getPlotWidth()

int JKQTBasePlotter::getPlotWidth ( ) const
inline

calculated value: plot width in pixel inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth)

See also
Plot Sizes & Borders

◆ getPrintMagnification()

double JKQTBasePlotter::getPrintMagnification ( ) const
protected

◆ getShowKey()

bool JKQTBasePlotter::getShowKey ( ) const

indicates whether to plot a key

◆ getShowKeyFrame()

bool JKQTBasePlotter::getShowKeyFrame ( ) const

indicates whether to plot a frame around the key

◆ getTextSizeDetail() [1/4]

textSizeData JKQTBasePlotter::getTextSizeDetail ( const QFont &  fm,
const QString &  text,
QPainter &  painter 
)

calculates a textSizeData for the given string text if it would be drawn on painter with font fm

◆ getTextSizeDetail() [2/4]

void JKQTBasePlotter::getTextSizeDetail ( const QFont &  fm,
const QString &  text,
QPainter &  painter,
double &  width,
double &  ascent,
double &  descent,
double &  strikeoutPos 
)

calculates a text-size details for the given string text if it would be drawn on painter with font fm

◆ getTextSizeDetail() [3/4]

textSizeData JKQTBasePlotter::getTextSizeDetail ( const QString &  fontName,
double  fontSize,
const QString &  text,
QPainter &  painter 
)

calculates a textSizeData for the given string text if it would be drawn on painter with font fontName

◆ getTextSizeDetail() [4/4]

void JKQTBasePlotter::getTextSizeDetail ( const QString &  fontName,
double  fontSize,
const QString &  text,
QPainter &  painter,
double &  width,
double &  ascent,
double &  descent,
double &  strikeoutPos 
)

calculates a text-size details for the given string text if it would be drawn on painter with font fontName and font size fontSize

◆ getTextSizeSize() [1/2]

QSizeF JKQTBasePlotter::getTextSizeSize ( const QFont &  fm,
const QString &  text,
QPainter &  painter 
)

calculates a size of the given string text if it would be drawn on painter with font fm

◆ getTextSizeSize() [2/2]

QSizeF JKQTBasePlotter::getTextSizeSize ( const QString &  fontName,
double  fontSize,
const QString &  text,
QPainter &  painter 
)

calculates a size of the given string text if it would be drawn on painter with font fontName and font size fontSize

◆ getUserSettigsFilename

QString JKQTBasePlotter::getUserSettigsFilename ( ) const
slot

◆ getUserSettigsPrefix

QString JKQTBasePlotter::getUserSettigsPrefix ( ) const
slot

◆ getWidth()

int JKQTBasePlotter::getWidth ( )

gets the width of the plot widget

◆ getXAxis() [1/2]

JKQTPHorizontalAxis* JKQTBasePlotter::getXAxis ( )

returns the x-axis objet of the plot

◆ getXAxis() [2/2]

const JKQTPHorizontalAxis* JKQTBasePlotter::getXAxis ( ) const

returns the x-axis objet of the plot

◆ getXMax()

double JKQTBasePlotter::getXMax ( ) const

returns the current x-axis max

◆ getXMin()

double JKQTBasePlotter::getXMin ( ) const

returns the current x-axis min

◆ getYAxis() [1/2]

JKQTPVerticalAxis* JKQTBasePlotter::getYAxis ( )

returns the y-axis objet of the plot

◆ getYAxis() [2/2]

const JKQTPVerticalAxis* JKQTBasePlotter::getYAxis ( ) const

returns the y-axis objet of the plot

◆ getYMax()

double JKQTBasePlotter::getYMax ( ) const

returns the current y-axis max

◆ getYMin()

double JKQTBasePlotter::getYMin ( ) const

returns the current y-axis min

◆ gridPaint()

void JKQTBasePlotter::gridPaint ( JKQTPEnhancedPainter painter,
QSizeF  pageRect,
bool  showOverlays = true,
bool  scaleIfTooLarge = true,
bool  scaleIfTooSmall = true 
)
protected

simply calls paintPlot() if grid printing mode is deactivated and prints the graph grid otherwise pageRect is used to determine the size of the page to draw on. If this does not coincide with the widget extents this function calculates a scaling factor so the graphs fit onto the page. This is especially usefull when printing!

Parameters
painterJKQTPEnhancedPainter to draw on
pageRectsize of the page
showOverlaysdecides whether to draw overlays
scaleIfTooLargescale image if it is too large for pageRect
scaleIfTooSmallscale image if it is smaller than pageRect

◆ gridPaintOverlays()

void JKQTBasePlotter::gridPaintOverlays ( JKQTPEnhancedPainter painter,
QSizeF  pageRect 
)
protected

◆ gridPrintingCalc()

void JKQTBasePlotter::gridPrintingCalc ( )
protected

This method goes through all registered plotters and calculates the width of every column and height of every row as the max over the row/column. The reults are stored in the private datamembers gridPrintingRows and gridPrintingColumns. gridPrintingSize will contain the size of all graphs together afterwards.

◆ initSettings()

void JKQTBasePlotter::initSettings ( )
protected

set the standard settings (colors, line widths ...)

◆ isDebugShowRegionBoxesEnabled()

bool JKQTBasePlotter::isDebugShowRegionBoxesEnabled ( ) const

if set true (default: false ) the JKQTBasePlotter draws colored rectangles to indicate the different regions in the plot (border, axes, ...)

See also
JKQTBasePlotterStyle::debugShowRegionBoxes, enableDebugShowRegionBoxes()

◆ isEmittingPlotSignalsEnabled()

bool JKQTBasePlotter::isEmittingPlotSignalsEnabled ( ) const

returns, whether the signals plotUpdated() and overlaysUpdated() are emitted

◆ isEmittingSignalsEnabled()

bool JKQTBasePlotter::isEmittingSignalsEnabled ( ) const

returns whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate()

◆ isPlotFrameVisible()

bool JKQTBasePlotter::isPlotFrameVisible ( ) const

if true, JKQTBasePlotter will draw a rectangle/frame around the plot

◆ isUsingAntiAliasingForGraphs()

bool JKQTBasePlotter::isUsingAntiAliasingForGraphs ( ) const

specifies whether to use antialiasing for plotting the graphs

Note
You can set this property false to increase plotting speed of complex plots (with many graphs inside). You can reach a roughly three-fold speed improvement!

◆ isUsingAntiAliasingForSystem()

bool JKQTBasePlotter::isUsingAntiAliasingForSystem ( ) const

specifies whether to use antialiasing for plotting the coordinate system


◆ isUsingAntiAliasingForText()

bool JKQTBasePlotter::isUsingAntiAliasingForText ( ) const

specifies whether to use antialiasing when drawing any text

Note
You can set this property false to increase plotting speed of complex plots (with many graphs inside). You can reach a roughly three-fold speed improvement!

◆ loadCurrentPlotterStyle()

void JKQTBasePlotter::loadCurrentPlotterStyle ( const QSettings &  settings,
const QString &  group = "plot/" 
)

replace the current style properties for this JKQTBasePlotter with properties loaded from settings

Parameters
settingsthe QSettings object to read from
groupgroup in settings to read from
See also
JKQTPSetSystemDefaultBaseStyle(), JKQTPSetSystemDefaultBaseStyle(), getCurrentPlotterStyle(), JKQTPlotter Styling System

◆ loadSettings()

void JKQTBasePlotter::loadSettings ( const QSettings &  settings,
const QString &  group = QString("plots/") 
)

loads all the plot properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object

◆ loadUserSettings [1/2]

void JKQTBasePlotter::loadUserSettings ( )
slot

loads the plot user properties from the file sepcified by setUserSettigsFilename() and the prefix specified by setUserSettigsPrefix()

See also
saveUserSettings(), setUserSettigsPrefix(), getUserSettigsFilename(), getUserSettigsPrefix()

◆ loadUserSettings() [2/2]

void JKQTBasePlotter::loadUserSettings ( const QSettings &  settings,
const QString &  group = QString("plots_user/") 
)

loads the plot user properties from a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object

◆ mm2px() [1/3]

double JKQTBasePlotter::mm2px ( double  mm,
double  dpi 
) const
inline

returns the given size in millimeters to pixels (with given dots per inch)

◆ mm2px() [2/3]

double JKQTBasePlotter::mm2px ( double  mm,
JKQTPEnhancedPainter painter 
) const
inline

returns the given size in millimeters to pixels (with given dots per inch)

◆ mm2px() [3/3]

double JKQTBasePlotter::mm2px ( JKQTPEnhancedPainter painter,
double  mm 
) const
inline

returns the given size in millimeters to pixels (with given dots per inch)

◆ moveGraphBottom()

size_t JKQTBasePlotter::moveGraphBottom ( JKQTPPlotElement gr)

move the given graph to the top, or add it, if it is not yet contained

◆ moveGraphTop()

size_t JKQTBasePlotter::moveGraphTop ( JKQTPPlotElement gr)

move the given graph to the top, or add it, if it is not yet contained

◆ moveOverlayElementTop()

size_t JKQTBasePlotter::moveOverlayElementTop ( JKQTPOverlayElement gr)

move the given overlay element to the top, or add it, if it is not yet contained

◆ overlaysUpdated

void JKQTBasePlotter::overlaysUpdated ( )
signal

emitted when the overlay elements have to be updated

◆ p2x()

double JKQTBasePlotter::p2x ( double  x) const
inline

return time coordinate coordinate from x-pixel

◆ p2y()

double JKQTBasePlotter::p2y ( double  y) const
inline

return y coordinate coordinate from y-pixel

◆ plotScalingRecalculated

void JKQTBasePlotter::plotScalingRecalculated ( )
signal

emitted when the plot scaling had to be recalculated

◆ plotUpdated

void JKQTBasePlotter::plotUpdated ( )
signal

emitted when the plot has to be updated

◆ print

void JKQTBasePlotter::print ( QPrinter *  printer = nullptr,
bool  displayPreview = true 
)
slot

print the current plot, if printer is nullptr a printer selection dialog is displayed

◆ printpreviewNew()

bool JKQTBasePlotter::printpreviewNew ( QPaintDevice *  paintDevice,
bool  setAbsolutePaperSize = false,
double  printsizeX_inMM = -1.0,
double  printsizeY_inMM = -1.0,
bool  displayPreview = true 
)
protected

show the print preview window for a given print p

◆ printpreviewPaintRequested

void JKQTBasePlotter::printpreviewPaintRequested ( QPrinter *  printer)
protectedslot

internal function for print preview

◆ printpreviewPaintRequestedNew [1/2]

void JKQTBasePlotter::printpreviewPaintRequestedNew ( QPaintDevice *  paintDevice)
protectedslot

internal function for print preview

◆ printpreviewPaintRequestedNew [2/2]

void JKQTBasePlotter::printpreviewPaintRequestedNew ( QPrinter *  printer)
protectedslot

internal function for print preview

◆ printpreviewSetAspectRatio

void JKQTBasePlotter::printpreviewSetAspectRatio ( bool  checked)
protectedslot

internal function for print preview

◆ printpreviewSetFontSizeMultiplier

void JKQTBasePlotter::printpreviewSetFontSizeMultiplier ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetKeepAbsFontsize

void JKQTBasePlotter::printpreviewSetKeepAbsFontsize ( bool  checked)
protectedslot

internal function for print preview

◆ printpreviewSetLineWidthMultiplier

void JKQTBasePlotter::printpreviewSetLineWidthMultiplier ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetMagnification

void JKQTBasePlotter::printpreviewSetMagnification ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetMagnificationNew

void JKQTBasePlotter::printpreviewSetMagnificationNew ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetSizeX

void JKQTBasePlotter::printpreviewSetSizeX ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetSizeXNew

void JKQTBasePlotter::printpreviewSetSizeXNew ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetSizeY

void JKQTBasePlotter::printpreviewSetSizeY ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetSizeYNew

void JKQTBasePlotter::printpreviewSetSizeYNew ( double  value)
protectedslot

internal function for print preview

◆ printpreviewSetZoom

void JKQTBasePlotter::printpreviewSetZoom ( double  value)
protectedslot

internal function for print preview

◆ printpreviewToggleMagnification

void JKQTBasePlotter::printpreviewToggleMagnification ( bool  checked)
protectedslot

internal function for print preview

◆ printpreviewUpdate

void JKQTBasePlotter::printpreviewUpdate ( )
protectedslot

internal function for print preview

◆ propagateStyle()

void JKQTBasePlotter::propagateStyle ( )
protected

copy sub-properties of plotterStyle to sub-objects that require it (axes, axes in graphs ...) and emit a plot update

◆ pt2px() [1/3]

double JKQTBasePlotter::pt2px ( double  pt,
double  dpi 
) const
inline

returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch)

◆ pt2px() [2/3]

double JKQTBasePlotter::pt2px ( double  pt,
JKQTPEnhancedPainter painter 
) const
inline

returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch)

◆ pt2px() [3/3]

double JKQTBasePlotter::pt2px ( JKQTPEnhancedPainter painter,
double  pt 
) const
inline

returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch)

◆ redrawPlot()

void JKQTBasePlotter::redrawPlot ( )
inline

◆ registerAdditionalAction()

void JKQTBasePlotter::registerAdditionalAction ( const QString &  key,
QAction *  act 
)

this function registers additional actions to lstAdditionalPlotterActions, which are displayed in the context-menu

◆ registerPaintDeviceAdapter()

static void JKQTBasePlotter::registerPaintDeviceAdapter ( JKQTPPaintDeviceAdapter adapter)
static

register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQTBasePlotter/JKQTPlotter, which will use it to export graphics

◆ registerSaveDataAdapter()

static bool JKQTBasePlotter::registerSaveDataAdapter ( JKQTPSaveDataAdapter adapter)
static

register a JKQTPSaveDataAdapter with JKQTPlotter/JKQTBasePlotter that can be used to export data from the internal datastore into a file

◆ resetMasterSynchronization()

void JKQTBasePlotter::resetMasterSynchronization ( SynchronizationDirection  synchronizeDirection = sdXYAxes)

switches any synchronization off, that has been created by synchronizeToMaster()

◆ saveAsCSV() [1/2]

void JKQTBasePlotter::saveAsCSV ( const QString &  filename,
const QString &  decimalSeparator,
const QString &  commentInitializer 
)

save the current plot data as a Comma Separated Values (CSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
decimalSeparatordecimal separator for outpu
commentInitializerline-start for comment lines

◆ saveAsCSV [2/2]

void JKQTBasePlotter::saveAsCSV ( const QString &  filename = QString(""))
slot

save the current plot data as a Comma Separated Values (CSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
Note
this function uses CSVdecimalSeparator as decimal separator and CSVcommentInitializer to initialize content lines

◆ saveAsDIF

void JKQTBasePlotter::saveAsDIF ( const QString &  filename = QString(""))
slot

save the current plot data as a DIF file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown

◆ saveAsGerExcelCSV

void JKQTBasePlotter::saveAsGerExcelCSV ( const QString &  filename = QString(""))
slot

save the current plot data as a Semicolon Separated Values (CSV) file for german Excel, i.e. with comma as decimal separator

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown

◆ saveAsMatlab

void JKQTBasePlotter::saveAsMatlab ( const QString &  filename = QString(""))
slot

save the current plot data as a Matlab Script

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown

◆ saveAsPDF

void JKQTBasePlotter::saveAsPDF ( const QString &  filename = QString(""),
bool  displayPreview = true 
)
slot

save the current plot as a PDF file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed

◆ saveAsPixelImage

void JKQTBasePlotter::saveAsPixelImage ( const QString &  filename = QString(""),
bool  displayPreview = true,
const QByteArray &  outputFormat = QByteArray() 
)
slot

save the current plot as a pixel image image (PNG ...), if filename is empty a file selection dialog is displayed

◆ saveAsPS

void JKQTBasePlotter::saveAsPS ( const QString &  filename = QString(""),
bool  displayPreview = true 
)
slot

save the current plot as a PS file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed

◆ saveAsSemicolonSV() [1/2]

void JKQTBasePlotter::saveAsSemicolonSV ( const QString &  filename,
const QString &  decimalSeparator,
const QString &  commentInitializer 
)

save the current plot data as a Semicolon Separated Values (SSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
decimalSeparatordecimal separator for outpu
commentInitializerline-start for comment lines

◆ saveAsSemicolonSV [2/2]

void JKQTBasePlotter::saveAsSemicolonSV ( const QString &  filename = QString(""))
slot

save the current plot data as a Semicolon Separated Values (SSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
Note
this function uses CSVdecimalSeparator as decimal separator and CSVcommentInitializer to initialize content lines

◆ saveAsSVG

void JKQTBasePlotter::saveAsSVG ( const QString &  filename = QString(""),
bool  displayPreview = true 
)
slot

save the current plot as a SVG file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed

◆ saveAsSYLK

void JKQTBasePlotter::saveAsSYLK ( const QString &  filename = QString(""))
slot

save the current plot data as a SYLK spreadsheet file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown

◆ saveAsTabSV() [1/2]

void JKQTBasePlotter::saveAsTabSV ( const QString &  filename,
const QString &  decimalSeparator,
const QString &  commentInitializer 
)

save the current plot data as a Tabulator Separated Values (CSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
decimalSeparatordecimal separator for outpu
commentInitializerline-start for comment lines

◆ saveAsTabSV [2/2]

void JKQTBasePlotter::saveAsTabSV ( const QString &  filename = QString(""))
slot

save the current plot data as a Tabulator Separated Values (CSV) file

Parameters
filenamethe file to save to, if filename is empty, a file open dialog will be shown
Note
this function uses CSVdecimalSeparator as decimal separator and CSVcommentInitializer to initialize content lines

◆ saveCurrentPlotterStyle()

void JKQTBasePlotter::saveCurrentPlotterStyle ( QSettings &  settings,
const QString &  group = "plot/" 
) const

store the current style properties for this JKQTBasePlotter with properties loaded from settings

Parameters
settingsthe QSettings object to write to
groupgroup in settings to write to
See also
JKQTPSetSystemDefaultBaseStyle(), JKQTPSetSystemDefaultBaseStyle(), getCurrentPlotterStyle(), JKQTPlotter Styling System

◆ saveData

void JKQTBasePlotter::saveData ( const QString &  filename = QString(""),
const QString &  jkqtp_format = QString("") 
)
slot

save the data used for the current plot. The file format is extracted from the file extension (csv, ...)

The parameter format specifies the export format. if it is empty the format will be choosen according to the file extension, or if filename is also empty the format will be choosen according to what is selected in the file selection dialog.

If format is "slk" the output will be in SYLK format, if format is "csv" or "dat" the output will be comma separated values and if format is "txt" the output will be tab separated values.

◆ saveImage

void JKQTBasePlotter::saveImage ( const QString &  filename = QString(""),
bool  displayPreview = true 
)
slot

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, ...)

◆ saveSettings()

void JKQTBasePlotter::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.

This method only saves those properties that differ from their default value.

◆ saveUserSettings [1/2]

void JKQTBasePlotter::saveUserSettings ( ) const
slot

saves the plot user properties to the file sepcified by setUserSettigsFilename() and the prefix specified by setUserSettigsPrefix()

See also
loadUserSettings(), setUserSettigsPrefix(), getUserSettigsFilename(), getUserSettigsPrefix()

◆ saveUserSettings() [2/2]

void JKQTBasePlotter::saveUserSettings ( QSettings &  settings,
const QString &  group = QString("plots_user/") 
) const

saves the plot user properties into a <a href="http://doc.qt.io/qt-5/qsettings.html")">QSettings object.

◆ setAbsoluteX

void JKQTBasePlotter::setAbsoluteX ( double  xminn,
double  xmaxx 
)
slot

sets absolutely limiting x-range of the plot

Parameters
xminnabsolute minimum of x-axis
xmaxxabsolute maximum of x-axis
Note
if the aspect ratio of this does not fit into the widget, it is possible that you don't see the complete contents!
See also
setAbsoluteXY(), setAbsoluteY(), JKQTPlotter::setAbsoluteX()

◆ setAbsoluteXY

void JKQTBasePlotter::setAbsoluteXY ( double  xminn,
double  xmaxx,
double  yminn,
double  ymaxx 
)
slot

sets absolutely limiting x- and y-range of the plot

The user (or programmer) cannot zoom to a viewport that is larger than the range given to this function.

Parameters
xminnabsolute minimum of x-axis
xmaxxabsolute maximum of x-axis
yminnabsolute minimum of y-axis
ymaxxabsolute maximum of y-axis
Note
if the aspect ratio of this does not fit into the widget, it is possible that you don't see the complete contents!
See also
setAbsoluteX(), setAbsoluteY(), zoomToFit(), JKQTPlotter::setAbsoluteXY()

◆ setAbsoluteY

void JKQTBasePlotter::setAbsoluteY ( double  yminn,
double  ymaxx 
)
slot

sets absolute minimum and maximum y-value to plot

Parameters
yminnabsolute minimum of y-axis
ymaxxabsolute maximum of y-axis
Note
if the aspect ratio of this does not fit into the widget, it is possible that you don't see the complete contents!
See also
setAbsoluteXY(), setAbsoluteX(), JKQTPlotter::setAbsoluteY()

◆ setAllGraphsInvisible()

void JKQTBasePlotter::setAllGraphsInvisible ( )

set all graphs in the plotter invisible

See also
setAllGraphsVisible(), setGraphVisible(), JKQTPPlotElement::setVisible()

◆ setAllGraphsVisible()

void JKQTBasePlotter::setAllGraphsVisible ( )

set all graphs in the plotter visible

See also
setAllGraphsInvisible(), setGraphVisible(), JKQTPPlotElement::setVisible()

◆ setAspectRatio

void JKQTBasePlotter::setAspectRatio ( double  __value)
slot

sets the data aspect ratio, enforced with setMaintainApsectRatio(true)

◆ setAxisAspectRatio

void JKQTBasePlotter::setAxisAspectRatio ( double  __value)
slot

sets the axis aspect ratio, enforced with setMaintainAxisApsectRatio(true)

◆ setBackgroundBrush

void JKQTBasePlotter::setBackgroundBrush ( const QBrush &  __value)
slot

color of the background of the plot (widget area) when drawing (to the screen)

◆ setBackgroundColor

void JKQTBasePlotter::setBackgroundColor ( const QColor &  __value)
slot

color of the background of the plot (widget area) when drawing (to the screen)

◆ setBackgroundGradient

void JKQTBasePlotter::setBackgroundGradient ( const QGradient &  __value)
slot

color of the background of the plot (widget area) when drawing (to the screen)

◆ setBackgroundTexture [1/2]

void JKQTBasePlotter::setBackgroundTexture ( const QImage &  __value)
slot

color of the background of the plot (widget area) when drawing (to the screen)

◆ setBackgroundTexture [2/2]

void JKQTBasePlotter::setBackgroundTexture ( const QPixmap &  __value)
slot

color of the background of the plot (widget area) when drawing (to the screen)

◆ setCSVcommentInitializer

void JKQTBasePlotter::setCSVcommentInitializer ( const QString &  __value)
slot

set the string used to introduce comments in text output when exporting data

◆ setCSVdecimalSeparator

void JKQTBasePlotter::setCSVdecimalSeparator ( const QString &  __value)
slot

set the decimal separator used when exporting data to text files

◆ setCurrentFileFormat

void JKQTBasePlotter::setCurrentFileFormat ( const QString &  __value)
slot

set the file format to use in SaveAs ... dialogs

◆ setCurrentPlotterStyle()

void JKQTBasePlotter::setCurrentPlotterStyle ( const JKQTBasePlotterStyle style)

◆ setCurrentSaveDirectory

void JKQTBasePlotter::setCurrentSaveDirectory ( const QString &  __value)
slot

sets the current directory in which to open SaveAs ... dialogs

◆ setDefaultJKQTBasePrinterUserSettings()

static void JKQTBasePlotter::setDefaultJKQTBasePrinterUserSettings ( QString  userSettigsFilename,
const QString &  userSettigsPrefix 
)
static

set a global preset/default value for the userSettigsFilename and userSettigsPrefix properties of JKQTBasePlotter

These presets are application global and will be used ONLY on initialization of a JKQTBasePlotter. You can overwrite them on a local-basis for each JKQTBasePrinter separately. The changed values from this function call will only take effect for newly created plotters AFTER the function call!

◆ setDefaultTextColor

void JKQTBasePlotter::setDefaultTextColor ( QColor  __value)
slot

default text color in the plot

◆ setDefaultTextFontName

void JKQTBasePlotter::setDefaultTextFontName ( const QString &  __value)
slot

default font name in the plot

◆ setDefaultTextSize

void JKQTBasePlotter::setDefaultTextSize ( double  __value)
slot

default font size in the plot [pt]

◆ setEmittingPlotSignalsEnabled()

void JKQTBasePlotter::setEmittingPlotSignalsEnabled ( bool  __value)

controls, whether the signals plotUpdated() and overlaysUpdated() are emitted

◆ setEmittingSignalsEnabled()

void JKQTBasePlotter::setEmittingSignalsEnabled ( bool  enabled)

specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate()

◆ setExportBackgroundBrush

void JKQTBasePlotter::setExportBackgroundBrush ( const QBrush &  __value)
slot

color of the background of the plot (widget area) when exporting

◆ setExportBackgroundColor

void JKQTBasePlotter::setExportBackgroundColor ( const QColor &  __value)
slot

color of the background of the plot (widget area) when exporting

◆ setExportBackgroundGradient

void JKQTBasePlotter::setExportBackgroundGradient ( const QGradient &  __value)
slot

color of the background of the plot (widget area) when exporting

◆ setExportBackgroundTexture [1/2]

void JKQTBasePlotter::setExportBackgroundTexture ( const QImage &  __value)
slot

color of the background of the plot (widget area) when exporting

◆ setExportBackgroundTexture [2/2]

void JKQTBasePlotter::setExportBackgroundTexture ( const QPixmap &  __value)
slot

color of the background of the plot (widget area) when exporting

◆ setFontSizeMultiplier()

void JKQTBasePlotter::setFontSizeMultiplier ( double  __value)
protected

multiplier for the font size

◆ setFontSizePrintMultiplier()

void JKQTBasePlotter::setFontSizePrintMultiplier ( double  __value)

multiplier which is used for font sizes when the plot is exported/printed

◆ setGraphVisible()

void JKQTBasePlotter::setGraphVisible ( int  i,
bool  visible = true 
)

switch visibility of the i -th graph to visible

See also
setAllGraphsInvisible(), setAllGraphsVisible(), JKQTPPlotElement::setVisible()

◆ setGraphWidth

void JKQTBasePlotter::setGraphWidth ( double  __value)
slot

width (in pt) of lines used for newly added graphs

◆ setGrid

void JKQTBasePlotter::setGrid ( bool  val)
slot

sets whether to plot grid lines or not

◆ setGridColor

void JKQTBasePlotter::setGridColor ( QColor  color)
slot

sets the color of all Major grid lines

◆ setGridPrinting()

void JKQTBasePlotter::setGridPrinting ( bool  __value)

indicates whether the grid printing is activated

See also
Grid Printing/Desclaring Relations between Plots

◆ setGridPrintingCurrentPos()

void JKQTBasePlotter::setGridPrintingCurrentPos ( size_t  x,
size_t  y 
)

◆ setGridPrintingCurrentX()

void JKQTBasePlotter::setGridPrintingCurrentX ( size_t  __value)

x position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ setGridPrintingCurrentY()

void JKQTBasePlotter::setGridPrintingCurrentY ( size_t  __value)

y position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ setGridStyle

void JKQTBasePlotter::setGridStyle ( Qt::PenStyle  __value)
slot

sets the style of all Major grid lines

◆ setGridWidth

void JKQTBasePlotter::setGridWidth ( double  __value)
slot

sets the width of all Major grid lines

◆ setKeyAutosize

void JKQTBasePlotter::setKeyAutosize ( bool  __value)
slot

determine width of the key automatically

◆ setKeyBackgroundBrush

void JKQTBasePlotter::setKeyBackgroundBrush ( const QBrush &  __value)
slot

color of the key background

◆ setKeyBackgroundColor

void JKQTBasePlotter::setKeyBackgroundColor ( const QColor &  __value,
Qt::BrushStyle  __style 
)
slot

color of the key background

◆ setKeyBackgroundGradient

void JKQTBasePlotter::setKeyBackgroundGradient ( const QGradient &  __value)
slot

color of the key background

◆ setKeyBackgroundTexture [1/2]

void JKQTBasePlotter::setKeyBackgroundTexture ( const QImage &  __value)
slot

color of the key background

◆ setKeyBackgroundTexture [2/2]

void JKQTBasePlotter::setKeyBackgroundTexture ( const QPixmap &  __value)
slot

color of the key background

◆ setKeyFontSize

void JKQTBasePlotter::setKeyFontSize ( double  __value)
slot

font size for key labels [in points]

◆ setKeyFrameColor

void JKQTBasePlotter::setKeyFrameColor ( const QColor &  __value)
slot

color of the key frame line

◆ setKeyFrameRounding

void JKQTBasePlotter::setKeyFrameRounding ( double  __value)
slot

rounding radius of the key frame rectangle (<=0 -> no rounded rectangle) [pt]

◆ setKeyFrameWidth

void JKQTBasePlotter::setKeyFrameWidth ( double  __value)
slot

width of the key frame line [pt]

◆ setKeyItemHeight

void JKQTBasePlotter::setKeyItemHeight ( double  __value)
slot

height of a key item in pt [in units of height of font, fontSize]

◆ setKeyItemWidth

void JKQTBasePlotter::setKeyItemWidth ( double  __value)
slot

width of a key item in pt [in units of width of 'X' set in font, fontSize]

◆ setKeyLayout

void JKQTBasePlotter::setKeyLayout ( const JKQTPKeyLayout __value)
slot

the key layout

◆ setKeyLineLength

void JKQTBasePlotter::setKeyLineLength ( double  __value)
slot

length of the line samples in the key in pt [in units of width of 'X' set in font, fontSize]

◆ setKeyPosition

void JKQTBasePlotter::setKeyPosition ( const JKQTPKeyPosition __value)
slot

key position

◆ setKeyTextColor

void JKQTBasePlotter::setKeyTextColor ( const QColor &  __value)
slot

color of the key entries' text

◆ setKeyXMargin

void JKQTBasePlotter::setKeyXMargin ( double  __value)
slot

x-distance between key frame and key content [in units of width of 'X' set in font, fontSize]

◆ setKeyXOffset

void JKQTBasePlotter::setKeyXOffset ( double  __value)
slot

y-offset of the key from the border of the plot [in units of width of 'x' set in font, fontSize]

◆ setKeyXSeparation

void JKQTBasePlotter::setKeyXSeparation ( double  __value)
slot

distance between key line example and key text [in units of width of 'X' set in font, fontSize]

◆ setKeyYMargin

void JKQTBasePlotter::setKeyYMargin ( double  __value)
slot

y-distance between key frame and key content [in units of width of 'x' set in font, fontSize]

◆ setKeyYOffset

void JKQTBasePlotter::setKeyYOffset ( double  __value)
slot

x-offset of the key from the border of the plot [in units of width of 'X' set in font, fontSize]

◆ setKeyYSeparation

void JKQTBasePlotter::setKeyYSeparation ( double  __value)
slot

distance between two key entries [in units of height of font, fontSize]

◆ setLineWidthMultiplier()

void JKQTBasePlotter::setLineWidthMultiplier ( double  __value)
protected

multiplier or the line widths

◆ setLineWidthPrintMultiplier()

void JKQTBasePlotter::setLineWidthPrintMultiplier ( double  __value)

multiplier which is used for linewidths when the plot is exported/printed

◆ setMaintainAspectRatio

void JKQTBasePlotter::setMaintainAspectRatio ( bool  value)
slot

en-/disables the maintaining of the data aspect ratio

◆ setMaintainAxisAspectRatio

void JKQTBasePlotter::setMaintainAxisAspectRatio ( bool  value)
slot

en-/disables the maintaining of the axis aspect ratio

◆ setMinorGridColor

void JKQTBasePlotter::setMinorGridColor ( QColor  color)
slot

sets the color of all minor grid lines

◆ setMinorGridStyle

void JKQTBasePlotter::setMinorGridStyle ( Qt::PenStyle  __value)
slot

sets the style of all minor grid lines

◆ setMinorGridWidth

void JKQTBasePlotter::setMinorGridWidth ( double  __value)
slot

sets the width of all minor grid lines

◆ setOnlyGraphVisible

void JKQTBasePlotter::setOnlyGraphVisible ( int  i)
slot

set all graphs invisible, except i

◆ setOnlyNthGraphsVisible

void JKQTBasePlotter::setOnlyNthGraphsVisible ( int  start,
int  n 
)
slot

set all graphs invisible, except graph start, start+n, start+2*n, ...

◆ setPaintMagnification()

void JKQTBasePlotter::setPaintMagnification ( double  __value)
protected

this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting!

◆ setPlotBackgroundBrush

void JKQTBasePlotter::setPlotBackgroundBrush ( const QBrush &  __value)
slot

color of the plot's background (i.e. of the area within the coordinate axes rectangle)

◆ setPlotBackgroundColor

void JKQTBasePlotter::setPlotBackgroundColor ( const QColor &  __value)
slot

color of the plot's background (i.e. of the area within the coordinate axes rectangle)

◆ setPlotBackgroundGradient

void JKQTBasePlotter::setPlotBackgroundGradient ( const QGradient &  __value)
slot

color of the plot's background (i.e. of the area within the coordinate axes rectangle)

◆ setPlotBackgroundTexture [1/2]

void JKQTBasePlotter::setPlotBackgroundTexture ( const QImage &  __value)
slot

color of the plot's background (i.e. of the area within the coordinate axes rectangle)

◆ setPlotBackgroundTexture [2/2]

void JKQTBasePlotter::setPlotBackgroundTexture ( const QPixmap &  __value)
slot

color of the plot's background (i.e. of the area within the coordinate axes rectangle)

◆ setPlotBorder

void JKQTBasePlotter::setPlotBorder ( int  left,
int  right,
int  top,
int  bottom 
)
slot

sets the borders of the plot

See also
Plot Sizes & Borders

◆ setPlotBorderBottom

void JKQTBasePlotter::setPlotBorderBottom ( int  bottom)
slot

sets the bottom border of the plot

See also
Plot Sizes & Borders

◆ setPlotBorderLeft

void JKQTBasePlotter::setPlotBorderLeft ( int  left)
slot

sets the left border of the plot

See also
Plot Sizes & Borders

◆ setPlotBorderRight

void JKQTBasePlotter::setPlotBorderRight ( int  right)
slot

sets the right border of the plot

See also
Plot Sizes & Borders

◆ setPlotBorderTop

void JKQTBasePlotter::setPlotBorderTop ( int  top)
slot

sets the top border of the plot

See also
Plot Sizes & Borders

◆ setPlotFrameColor

void JKQTBasePlotter::setPlotFrameColor ( QColor  col)
slot

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this color

◆ setPlotFrameRounding

void JKQTBasePlotter::setPlotFrameRounding ( double  __value)
slot

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot, rounding the corners with this redius (<=0 -> no rounded rectangle) [pt]

◆ setPlotFrameVisible

void JKQTBasePlotter::setPlotFrameVisible ( bool  enabled)
slot

if true, JKQTBasePlotter will draw a rectangle/frame around the plot

◆ setPlotFrameWidth

void JKQTBasePlotter::setPlotFrameWidth ( double  __value)
slot

if plotFrameVisible==true, JKQTBasePlotter will draw a rectangle/frame around the plot in this width [pt]

◆ setPlotLabel

void JKQTBasePlotter::setPlotLabel ( const QString &  __value)
slot

set the plot label text

◆ setplotLabelFontName

void JKQTBasePlotter::setplotLabelFontName ( const QString &  __value)
slot

the plot label font name

◆ setPlotLabelFontSize

void JKQTBasePlotter::setPlotLabelFontSize ( double  __value)
slot

the plot label font size [pt]

◆ setPrintMagnification()

void JKQTBasePlotter::setPrintMagnification ( double  __value)
protected

◆ setShowKey

void JKQTBasePlotter::setShowKey ( bool  __value)
slot

indicates whether to plot a key

◆ setShowKeyFrame

void JKQTBasePlotter::setShowKeyFrame ( bool  __value)
slot

indicates whether to plot a frame around the key

◆ setShowZeroAxes [1/2]

void JKQTBasePlotter::setShowZeroAxes ( bool  showX,
bool  showY 
)
slot

switches the visibility of the zero-axes associated with the x- and y-axis

Parameters
showXindicates whether to show the zero-axis associated with the x-axis (i.e. x==0 or the vertical zero-axis)
showYindicates whether to show the zero-axis associated with the y-axis (i.e. y==0 or the horizontal zero-axis)

◆ setShowZeroAxes [2/2]

void JKQTBasePlotter::setShowZeroAxes ( bool  showXY)
slot

switches the visibility of the zero-axes associated with the x- and y-axis

Parameters
showXYindicates whether to show the zero-axis associated with the x- and y-axis

◆ setUseAntiAliasingForGraphs

void JKQTBasePlotter::setUseAntiAliasingForGraphs ( bool  __value)
slot

specifies whether to use antialiasing for plotting the graphs

Note
You can set this property false to increase plotting speed of complex plots (with many graphs inside). You can reach a roughly three-fold speed improvement!

◆ setUseAntiAliasingForSystem

void JKQTBasePlotter::setUseAntiAliasingForSystem ( bool  __value)
slot

specifies whether to use antialiasing for plotting the coordinate system

◆ setUseAntiAliasingForText

void JKQTBasePlotter::setUseAntiAliasingForText ( bool  __value)
slot

specifies whether to use antialiasing when drawing any text

Note
You can set this property false to increase plotting speed of complex plots (with many graphs inside). You can reach a roughly three-fold speed improvement!

◆ setUserSettigsFilename [1/2]

void JKQTBasePlotter::setUserSettigsFilename ( const QString &  filename)
slot

◆ setUserSettigsFilename [2/2]

void JKQTBasePlotter::setUserSettigsFilename ( const QString &  filename,
const QString &  prefix 
)
slot

◆ setUserSettigsPrefix

void JKQTBasePlotter::setUserSettigsPrefix ( const QString &  prefix)
slot

◆ setWidgetHeight

void JKQTBasePlotter::setWidgetHeight ( int  heigh)
slot

sets the width of the plot widget

See also
setWidgetSize(), Plot Sizes & Borders

◆ setWidgetSize

void JKQTBasePlotter::setWidgetSize ( int  width,
int  height 
)
slot

resize the plot

See also
Plot Sizes & Borders

◆ setWidgetWidth

void JKQTBasePlotter::setWidgetWidth ( int  wid)
slot

sets the width of the plot widget

See also
setWidgetSize(), Plot Sizes & Borders

◆ setX

void JKQTBasePlotter::setX ( double  xminn,
double  xmaxx 
)
slot

sets the x-range of the plot (minimum and maximum x-value on the x-axis)

Parameters
xminnabsolute minimum of x-axis
xmaxxabsolute maximum of x-axis
Note
You cannot expand the x-range outside the absolute x-range set e.g. by setAbsoluteX()! Also the range will be limited to possible values (e.g. to positive values if you use logarithmic axes).

Uppon setting, this function emits the signal zoomChangedLocally(), if emitting signals is activated at the moment (e.g. using setEmittingSignalsEnabled() ).

See also
setY(), setXY(), zoomToFit(), setAbsoluteXY(), JKQTPlotter::setY()

◆ setXY

void JKQTBasePlotter::setXY ( double  xminn,
double  xmaxx,
double  yminn,
double  ymaxx 
)
slot

sets the x- and y-range of the plot (minimum and maximum values on the x-/y-axis)

Parameters
xminnabsolute minimum of x-axis
xmaxxabsolute maximum of x-axis
yminnabsolute minimum of y-axis
ymaxxabsolute maximum of y-axis
Note
You cannot expand the ranges outside the absolute ranges set e.g. by setAbsoluteXY()! Also the range will be limited to possible values (e.g. to positive values if you use logarithmic axes).

Uppon setting, this function emits the signal zoomChangedLocally(), if emitting signals is activated at the moment (e.g. using setEmittingSignalsEnabled() ).

See also
setX(), setX(), zoomToFit(), setAbsoluteXY(), JKQTPlotter::setXY()

◆ setY

void JKQTBasePlotter::setY ( double  yminn,
double  ymaxx 
)
slot

sets the y-range of the plot (minimum and maximum y-value on the y-axis)

Parameters
yminnabsolute minimum of y-axis
ymaxxabsolute maximum of y-axis
Note
You cannot expand the y-range outside the absolute y-range set e.g. by setAbsoluteY()! Also the range will be limited to possible values (e.g. to positive values if you use logarithmic axes).

Uppon setting, this function emits the signal zoomChangedLocally(), if emitting signals is activated at the moment (e.g. using setEmittingSignalsEnabled() ).

See also
setX(), setXY(), zoomToFit(), setAbsoluteXY(), JKQTPlotter::setX()

◆ showPlotData

void JKQTBasePlotter::showPlotData ( )
protectedslot

internal function for getDataColumnsByUser()

◆ synchronizeToMaster()

void JKQTBasePlotter::synchronizeToMaster ( JKQTBasePlotter master,
SynchronizationDirection  synchronizeDirection,
bool  synchronizeAxisLength = true,
bool  synchronizeZoomingMasterToSlave = true,
bool  synchronizeZoomingSlaveToMaster = true 
)

synchronize the plot borders (and zooming) with a given plotter (master --> slave/this)

This function allows two plotters to draw a graph with exactly the same height or width as in another graph. For example if you want to have two plotters which are positioned one above the other (and have the same widget widths, which could be guaranteed by a QLayout) you may want to make sure that their plotWidth s are always the same. In this case call

plotter2->synchronizeToMaster(plotter1, sdXAxis, true)

of the lower plotter plotter2 . Now whenever the size of plotter1 changes, also plotter2 is redrawn with the changed borders.

Parameters
masterthe plotter widget to synchronize to
synchronizeDirectiondirection in which to synchronize
synchronizeAxisLengthdo you want the axis length to be synchronized?
synchronizeZoomingMasterToSlaveif set, also zooming in the master leads to a modification of the linked axes in the slave
synchronizeZoomingSlaveToMasterif set, also zooming in the slave leads to a modification of the linked axes in the master
See also
synchronizeXToMaster(), synchronizeYToMaster(), Synchronizing Several Plots

◆ synchronizeXAxis

void JKQTBasePlotter::synchronizeXAxis ( double  newxmin,
double  newxmax,
double  newymin,
double  newymax,
JKQTBasePlotter sender 
)
protectedslot

may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis

◆ synchronizeXToMaster()

void JKQTBasePlotter::synchronizeXToMaster ( JKQTBasePlotter 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)

Parameters
masterthe plotter widget to synchronize to
synchronizeAxisLengthdo you want the axis length to be synchronized?
synchronizeZoomingMasterToSlaveif set, also zooming in the master leads to a modification of the linked axes in the slave
synchronizeZoomingSlaveToMasterif set, also zooming in the slave leads to a modification of the linked axes in the master
Note
This is a short-cut to synchronizeToMaster() with synchronizeDirection=csXAxis
See also
synchronizeToMaster(), synchronizeYToMaster(), Synchronizing Several Plots

◆ synchronizeXYAxis

void JKQTBasePlotter::synchronizeXYAxis ( double  newxmin,
double  newxmax,
double  newymin,
double  newymax,
JKQTBasePlotter sender 
)
protectedslot

may be connected to zoomChangedLocally() of a different plot and synchronizes the local x- and y-axis to the other x- and y-axis

◆ synchronizeYAxis

void JKQTBasePlotter::synchronizeYAxis ( double  newxmin,
double  newxmax,
double  newymin,
double  newymax,
JKQTBasePlotter sender 
)
protectedslot

may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis

◆ synchronizeYToMaster()

void JKQTBasePlotter::synchronizeYToMaster ( JKQTBasePlotter 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)

Parameters
masterthe plotter widget to synchronize to
synchronizeAxisLengthdo you want the axis length to be synchronized?
synchronizeZoomingMasterToSlaveif set, also zooming in the master leads to a modification of the linked axes in the slave
synchronizeZoomingSlaveToMasterif set, also zooming in the slave leads to a modification of the linked axes in the master
Note
This is a short-cut to synchronizeToMaster() with synchronizeDirection=csXAxis
See also
synchronizeToMaster(), synchronizeXToMaster(), Synchronizing Several Plots

◆ updatePreviewLabel

void JKQTBasePlotter::updatePreviewLabel ( )
protectedslot

internal function for print/export preview

◆ useAsInternalDatastore()

void JKQTBasePlotter::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.

◆ useExternalDatastore()

void JKQTBasePlotter::useExternalDatastore ( JKQTPDatastore newStore)

tells the plotter object to use the given external datastore.

If the current datastore is internally managed, this method will free that object and use the supplied datastore with external management. If the current datastore is already external, this method will simply replace it by the new one.

◆ useInternalDatastore()

void JKQTBasePlotter::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.

◆ x2p()

double JKQTBasePlotter::x2p ( double  x) const
inline

return x-pixel coordinate from time coordinate

◆ y2p()

double JKQTBasePlotter::y2p ( double  y) const
inline

return y-pixel coordinate from y coordinate

◆ zoom

void JKQTBasePlotter::zoom ( double  nxmin,
double  nxmax,
double  nymin,
double  nymax 
)
slot

sets x/ymin and x/ymax to the supplied values and replots the graph (zoom operation!)

◆ zoomChangedLocally

void JKQTBasePlotter::zoomChangedLocally ( double  newxmin,
double  newxmax,
double  newymin,
double  newymax,
JKQTBasePlotter sender 
)
signal

signal: emitted whenever the user selects a new x-y zoom range (by mouse)

◆ zoomIn

void JKQTBasePlotter::zoomIn ( double  factor = 2.0)
slot

zooms into the graph (the same as turning the mouse wheel) by the given factor

◆ zoomOut

void JKQTBasePlotter::zoomOut ( double  factor = 2.0)
slot

zooms out of the graph (the same as turning the mouse wheel) by the given factor

◆ zoomToFit

void JKQTBasePlotter::zoomToFit ( bool  zoomX = true,
bool  zoomY = true,
bool  includeX0 = false,
bool  includeY0 = false,
double  scaleX = 1.05,
double  scaleY = 1.05 
)
slot

this method zooms the graph so that all plotted datapoints are visible.

Parameters
zoomXif set true (default) zooms the x axis
zoomYif set true (default) zooms the y axis
includeX0if this is true zoomToFit() will ensure that $ x=0 $ is visible in the plot (only for non-logx plots, default: false)
includeY0if this is true zoomToFit() will ensure that $ y=0 $ is visible in the plot (only for non-logy plots, default: false)
scaleXthe plot will have a width of $ \mbox{Xscale}\cdot\Delta x $ where $ \Delta x $ is the actual x-axis data range For logx plots we actually use this on the logarithmized data! (default: 1.05)
scaleYthe plot will have a height of $ \mbox{Yscale}\cdot\Delta < $ where $ \Delta < $ is the actual <-axis data range For log< plots we actually use this on the logarithmized data! (default: 1.05)

Member Data Documentation

◆ actCopyData

QAction* JKQTBasePlotter::actCopyData
protected

QAction which triggers copying of the data to the clipboard.

◆ actCopyMatlab

QAction* JKQTBasePlotter::actCopyMatlab
protected

QAction which triggers copying of the data to the clipboard in Matlab format.

◆ actCopyPixelImage

QAction* JKQTBasePlotter::actCopyPixelImage
protected

QAction which triggers copying of the image to the clipboard.

◆ actPrint

QAction* JKQTBasePlotter::actPrint
protected

QAction which triggers the printing.

◆ actSaveCSV

QAction* JKQTBasePlotter::actSaveCSV
protected

QAction which triggers the saving as CSV (data only)

◆ actSaveData

QAction* JKQTBasePlotter::actSaveData
protected

QAction which triggers saving of the data used for the plot.

◆ actSavePDF

QAction* JKQTBasePlotter::actSavePDF
protected

QAction which triggers the saving as PDF.

◆ actSavePix

QAction* JKQTBasePlotter::actSavePix
protected

QAction which triggers the saving as pixel image.

◆ actSavePlot

QAction* JKQTBasePlotter::actSavePlot
protected

QAction which triggers saving of the plot as an image.

◆ actSaveSVG

QAction* JKQTBasePlotter::actSaveSVG
protected

QAction which triggers the saving as Scalable Vector Graphics (SVG)

◆ actShowPlotData

QAction* JKQTBasePlotter::actShowPlotData
protected

QAction to show a table with all the plot data in the datastore.

◆ actZoomAll

QAction* JKQTBasePlotter::actZoomAll
protected

QAction which triggers zoom all.

◆ actZoomIn

QAction* JKQTBasePlotter::actZoomIn
protected

QAction which triggers zoom in.

◆ actZoomOut

QAction* JKQTBasePlotter::actZoomOut
protected

QAction which triggers zoom out.

◆ aspectRatio

double JKQTBasePlotter::aspectRatio
protected

the aspect ratio of plotwidth and plotheight to maintain, if maintainAspectRatio==true

◆ axisAspectRatio

double JKQTBasePlotter::axisAspectRatio
protected

the aspect ratio of axis widths to maintain, if maintainAxisAspectRatio==true

◆ currentDataFileFormat

QString JKQTBasePlotter::currentDataFileFormat
protected

the current file format to use in SaveDataAs ... dialogs

◆ currentFileFormat

QString JKQTBasePlotter::currentFileFormat
protected

the current file format to use in SaveAs ... dialogs

◆ currentPrinter

QString JKQTBasePlotter::currentPrinter
protected

the currently selected printer

◆ currentSaveDirectory

QString JKQTBasePlotter::currentSaveDirectory
protected

the current directory in which to open SaveAs ... dialogs

◆ dataColumnsCombobox

QComboBox* JKQTBasePlotter::dataColumnsCombobox
protected

◆ dataColumnsListWidget

QListWidget* JKQTBasePlotter::dataColumnsListWidget
protected

◆ datastore

JKQTPDatastore* JKQTBasePlotter::datastore
protected

an object which manages all data columns for this plotter class

◆ datastoreInternal

bool JKQTBasePlotter::datastoreInternal
protected

indicates whether the datastore is managed (allocated/freed) internally or externally

◆ emitPlotSignals

bool JKQTBasePlotter::emitPlotSignals
protected

controls, whether the signals plotUpdated() and overlaysUpdated() are emitted

◆ emitSignals

bool JKQTBasePlotter::emitSignals
protected

specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate()

◆ exportPreviewLabel

QPointer<QLabel> JKQTBasePlotter::exportPreviewLabel
private

◆ exportUnitInMM

bool JKQTBasePlotter::exportUnitInMM
private

◆ fontSizeMultiplier

double JKQTBasePlotter::fontSizeMultiplier
protected

multiplier for the font size

◆ fontSizePrintMultiplier

double JKQTBasePlotter::fontSizePrintMultiplier
protected

multiplier which is used for font sizes when the plot is exported/printed

◆ getDataColumnsByUserSaved

QMap<QString, QStringList> JKQTBasePlotter::getDataColumnsByUserSaved
protected

◆ graphs

QList<JKQTPPlotElement*> JKQTBasePlotter::graphs
protected

a vector that contains all graphs to be plottet in the system

◆ gridPrinting

bool JKQTBasePlotter::gridPrinting
protected

indicates whether the grid printing is activated

See also
Grid Printing/Desclaring Relations between Plots

◆ gridPrintingColumns

QList<size_t> JKQTBasePlotter::gridPrintingColumns
protected

this list contains all the columns of the current grid printing and stores its widths

◆ gridPrintingCurrentX

size_t JKQTBasePlotter::gridPrintingCurrentX
protected

x position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ gridPrintingCurrentY

size_t JKQTBasePlotter::gridPrintingCurrentY
protected

y position of the current graph in grid printing

See also
Grid Printing/Desclaring Relations between Plots

◆ gridPrintingList

QList<JKQTPGridPrintingItem> JKQTBasePlotter::gridPrintingList
protected

list that manages all the additional graphs for grid printing mode

◆ gridPrintingRows

QList<size_t> JKQTBasePlotter::gridPrintingRows
protected

this list contains all the rows of the current grid printing and stores its heights

◆ gridPrintingSize

QSizeF JKQTBasePlotter::gridPrintingSize
protected

size of all plots in grid printing mode, filled by gridPrintingCalc()

◆ internalPlotBorderBottom

double JKQTBasePlotter::internalPlotBorderBottom
protected

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderBottom_notIncludingOutsidePlotSections

double JKQTBasePlotter::internalPlotBorderBottom_notIncludingOutsidePlotSections
protected

calculated value: free space between widget right border and (plot+drawOutside) right border (including coordinate axes)

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderLeft

double JKQTBasePlotter::internalPlotBorderLeft
protected

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderLeft_notIncludingOutsidePlotSections

double JKQTBasePlotter::internalPlotBorderLeft_notIncludingOutsidePlotSections
protected

calculated value: free space between widget left border and (plot+drawOutside) left border (including coordinate axes)

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderRight

double JKQTBasePlotter::internalPlotBorderRight
protected

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderRight_notIncludingOutsidePlotSections

double JKQTBasePlotter::internalPlotBorderRight_notIncludingOutsidePlotSections
protected

calculated value: free space between widget bottom border and (plot+drawOutside) bottom border (including coordinate axes)

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderTop

double JKQTBasePlotter::internalPlotBorderTop
protected

calculated value: free space between widget top border and plot top border, as used to plot the graph

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotBorderTop_notIncludingOutsidePlotSections

double JKQTBasePlotter::internalPlotBorderTop_notIncludingOutsidePlotSections
protected

calculated value: free space between widget top border and (plot+drawOutside) top border (including coordinate axes)

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotHeight

int JKQTBasePlotter::internalPlotHeight
protected

calculated value: plot height in pixel inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight)

See also
Plot Sizes & Borders

◆ internalPlotKeyBorderBottom

double JKQTBasePlotter::internalPlotKeyBorderBottom
protected

calculated value: free space between widget bottom border and bottom border of the key/legend

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotKeyBorderLeft

double JKQTBasePlotter::internalPlotKeyBorderLeft
protected

calculated value: free space between widget left border and left border of the key/legend

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotKeyBorderRight

double JKQTBasePlotter::internalPlotKeyBorderRight
protected

calculated value: free space between widget right border and right border of the key/legend

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotKeyBorderTop

double JKQTBasePlotter::internalPlotKeyBorderTop
protected

calculated value: free space between widget top border and top border of the key/legend

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ internalPlotWidth

int JKQTBasePlotter::internalPlotWidth
protected

calculated value: plot width in pixel inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth)

See also
Plot Sizes & Borders

◆ internalTitleHeight

double JKQTBasePlotter::internalTitleHeight
protected

calculated value: height of the plot title (or 0 if no title)

Note
This property is an intermediate storage for calculated values. Do not change directly!

◆ lineWidthMultiplier

double JKQTBasePlotter::lineWidthMultiplier
protected

multiplier or the line widths

◆ lineWidthPrintMultiplier

double JKQTBasePlotter::lineWidthPrintMultiplier
protected

multiplier which is used for linewidths when the plot is exported/printed

◆ lstAdditionalPlotterActions

AdditionalActionsMap JKQTBasePlotter::lstAdditionalPlotterActions
protected

this list contains additional actions, that can be registered by registerAdditionalAction(). They are shown in the context menu only and are e.g. used to display "save image data" actions. Each action may be in a category (key of map), which is displayed as a submenu of the context-menu!

◆ m_plotsModel

JKQTPGraphsModel* JKQTBasePlotter::m_plotsModel
protected

model representing all Plots in this plotter and showing their visible/invisible state

◆ maintainAspectRatio

bool JKQTBasePlotter::maintainAspectRatio
protected

indicates whether the widget should maintain an aspect ratio of plotwidth and plotheight

◆ maintainAxisAspectRatio

bool JKQTBasePlotter::maintainAxisAspectRatio
protected

indicates whether the axes should maintain an aspect ratio

◆ masterPlotterX

JKQTBasePlotter* JKQTBasePlotter::masterPlotterX
protected

the master plotter for x-dimension, this plotter is connected to.

◆ masterPlotterY

JKQTBasePlotter* JKQTBasePlotter::masterPlotterY
protected

the master plotter for y-dimension, this plotter is connected to.

◆ masterSynchronizeHeight

bool JKQTBasePlotter::masterSynchronizeHeight
protected

synchronize plot height with masterPlotterY

◆ masterSynchronizeWidth

bool JKQTBasePlotter::masterSynchronizeWidth
protected

synchronize plot width with masterPlotterX

◆ mathText

JKQTMathText JKQTBasePlotter::mathText
protected

used to plot LaTeX markup

◆ overlays

QList<JKQTPOverlayElement*> JKQTBasePlotter::overlays
protected

◆ paintMagnification

double JKQTBasePlotter::paintMagnification
protected

this is an internal property that is used by the export/print system to control the "magnification". Usually this is 1.0 but if set !=1.0, it is used to scale the widgetWidth and widgetHeight before painting!

◆ plotLabel

QString JKQTBasePlotter::plotLabel
protected

the plot label text

◆ plotterStyle

JKQTBasePlotterStyle JKQTBasePlotter::plotterStyle
protected

◆ printAspect

double JKQTBasePlotter::printAspect
private

◆ printDoUpdate

bool JKQTBasePlotter::printDoUpdate
private

◆ printKeepAbsoluteFontSizes

bool JKQTBasePlotter::printKeepAbsoluteFontSizes
private

◆ printKeepAspect

bool JKQTBasePlotter::printKeepAspect
private

◆ printMagnification

double JKQTBasePlotter::printMagnification
private

◆ printPageSizeMM

QSizeF JKQTBasePlotter::printPageSizeMM
private

◆ printPreview

QPointer<QPrintPreviewWidget> JKQTBasePlotter::printPreview
private

◆ printScaleToPagesize

bool JKQTBasePlotter::printScaleToPagesize
private

◆ printSetAbsolutePageSize

bool JKQTBasePlotter::printSetAbsolutePageSize
private

◆ printSetAbsolutePlotSize

bool JKQTBasePlotter::printSetAbsolutePlotSize
private

◆ printSizeX_Millimeter

double JKQTBasePlotter::printSizeX_Millimeter
private

◆ printSizeY_Millimeter

double JKQTBasePlotter::printSizeY_Millimeter
private

◆ printZoomFactor

double JKQTBasePlotter::printZoomFactor
private

◆ s_TextSizeDataCache

QHash<JKQTBasePlotter::textSizeKey, JKQTBasePlotter::textSizeData> JKQTBasePlotter::s_TextSizeDataCache
staticprotected

◆ spinMagnification

QPointer<JKQTPEnhancedDoubleSpinBox> JKQTBasePlotter::spinMagnification
private

◆ spinSizeX

QPointer<JKQTPEnhancedDoubleSpinBox> JKQTBasePlotter::spinSizeX
private

◆ spinSizeY

QPointer<JKQTPEnhancedDoubleSpinBox> JKQTBasePlotter::spinSizeY
private

◆ useClipping

bool JKQTBasePlotter::useClipping
protected

indicates whether to use clipping (hack for printing, see print() )

◆ usedStyles

QList<int> JKQTBasePlotter::usedStyles
protected

internal: used to store a list of all currently used plot styles

◆ userSettigsFilename

QString JKQTBasePlotter::userSettigsFilename
protected

filename for the ini file in which to save the user settings

See also
jkqtplotter_base_userprops

◆ userSettigsPrefix

QString JKQTBasePlotter::userSettigsPrefix
protected

prefix for the ini file in which to save the user settings

See also
jkqtplotter_base_userprops

◆ widgetHeight

int JKQTBasePlotter::widgetHeight
protected

height of the plot widget

See also
setWidgetSize(), Plot Sizes & Borders

◆ widgetWidth

int JKQTBasePlotter::widgetWidth
protected

width of the plot widget

See also
setWidgetSize(), Plot Sizes & Borders

◆ xAxis

JKQTPHorizontalAxis* JKQTBasePlotter::xAxis
protected

object used for the x-axis

◆ yAxis

JKQTPVerticalAxis* JKQTBasePlotter::yAxis
protected

object used for the y-axis


The documentation for this class was generated from the following file:
JKQTBasePlotter::sdYAxis
y-axis only
Definition: jkqtpbaseplotter.h:972
JKQTBasePlotter::getAspectRatio
double getAspectRatio() const
returns the data aspect ratio, enforced with setMaintainApsectRatio(true)
JKQTBasePlotter::sdXAxis
x-axis only
Definition: jkqtpbaseplotter.h:971
JKQTPlotter::synchronizeToMaster
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)
JKQTBasePlotter::setAspectRatio
void setAspectRatio(double __value)
sets the data aspect ratio, enforced with setMaintainApsectRatio(true)
JKQTPlotter::addGridPrintingPlotter
void addGridPrintingPlotter(size_t x, size_t y, JKQTPlotter *plotterOther)
add a new plotter plotterOther for grid printing mode, at location x / y
JKQTBasePlotter::setAxisAspectRatio
void setAxisAspectRatio(double __value)
sets the axis aspect ratio, enforced with setMaintainAxisApsectRatio(true)
JKQTPlotter::setGridPrinting
void setGridPrinting(bool enabled)
enables grid-printing for this plot