2015-07-11 18:56:02 +08:00
/*
2019-01-12 23:01:55 +08:00
Copyright ( c ) 2008 - 2019 Jan W . Krieger ( < jan @ jkrieger . de > )
2015-07-11 18:56:02 +08:00
2015-07-12 22:34:27 +08:00
2015-07-11 18:56:02 +08:00
This software is free software : you can redistribute it and / or modify
it under the terms of the GNU Lesser General Public License ( LGPL ) as published by
the Free Software Foundation , either version 2 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU Lesser General Public License ( LGPL ) for more details .
You should have received a copy of the GNU Lesser General Public License ( LGPL )
along with this program . If not , see < http : //www.gnu.org/licenses/>.
*/
2018-11-26 03:25:44 +08:00
# include "jkqtplottertools/jkqtptools.h"
# include "jkqtplotter/jkqtpdatastorage.h"
# include "jkqtmathtext/jkqtmathtext.h"
# include "jkqtplotter/jkqtpbaseelements.h"
2018-12-19 00:13:18 +08:00
# include "jkqtplotter/jkqtpelementsoverlay.h"
# include "jkqtplottertools/jkqtpenhancedpainter.h"
# include "jkqtplottergui/jkqtpenhancedspinboxes.h"
2015-07-11 18:56:02 +08:00
# include <QObject>
# include <QAction>
# include <QActionGroup>
# include <QVector>
# include <QSettings>
# include <QColor>
# include <QMap>
# include <QVector>
# include <QPair>
# include <QPrintPreviewWidget>
# include <QDoubleSpinBox>
# include <QLabel>
# include <QPointer>
# include <QListWidget>
# include <QComboBox>
# include <vector>
# include <cmath>
# include <iostream>
2018-11-26 03:25:44 +08:00
# include "jkqtplottertools/jkqtp_imexport.h"
2015-07-11 18:56:02 +08:00
# ifndef JKQTPBASEPLOTTER_H
# define JKQTPBASEPLOTTER_H
2019-01-20 17:49:29 +08:00
class JKQTPGraphsModel ; // forward
class JKQTPGraph ; // forward
class JKQTPPlotElement ; // forward
2015-07-11 18:56:02 +08:00
2019-01-26 03:16:04 +08:00
/** \brief initialized Qt-ressources necessary for JKQTBasePlotter
2019-02-03 22:54:41 +08:00
* \ ingroup jkqtpplotterclasses_tools */
2019-02-03 21:04:48 +08:00
JKQTP_LIB_EXPORT void initJKQTBasePlotterResources ( ) ;
2018-12-03 01:30:12 +08:00
2019-01-26 03:16:04 +08:00
/** \brief virtual base-class for exporter classes that can be used to save data inot a file
2019-02-03 22:54:41 +08:00
* \ ingroup jkqtpplotterclasses_tools */
2019-02-03 21:04:48 +08:00
class JKQTP_LIB_EXPORT JKQTPSaveDataAdapter {
2019-01-26 03:16:04 +08:00
public :
virtual ~ JKQTPSaveDataAdapter ( ) ;
virtual QString getFilter ( ) const = 0 ;
virtual void saveJKQTPData ( const QString & filename , const QList < QVector < double > > & data , const QStringList & columnNames ) const = 0 ;
} ;
/** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQTBasePlotter/JKQTPlotter
* and then be used to export graphics , use registerPaintDeviceAdapter ( ) to register such a plass
2019-02-03 22:54:41 +08:00
* \ ingroup jkqtpplotterclasses_tools */
2019-02-03 21:04:48 +08:00
class JKQTP_LIB_EXPORT JKQTPPaintDeviceAdapter {
2019-01-26 03:16:04 +08:00
public :
virtual ~ JKQTPPaintDeviceAdapter ( ) { }
virtual QString getFilter ( ) const = 0 ;
virtual QString getFormatName ( ) const = 0 ;
virtual QString getFormatID ( ) const = 0 ;
virtual QStringList getFileExtension ( ) const = 0 ;
virtual bool getSetAbsolutePaperSize ( ) const = 0 ;
virtual double getPrintSizeXInMM ( ) const = 0 ;
virtual double getPrintSizeYInMM ( ) const = 0 ;
virtual bool isPrinter ( ) const = 0 ;
virtual bool useLatexParser ( ) const ;
/** \brief create a paint device with a given size in pt */
virtual QPaintDevice * createPaintdevice ( const QString & filename , int widthPix , int heightPix ) const = 0 ;
/** \brief create a paint device with a given size in millimeters ... the default implementation call createPaintdevice(), assuming the standard logical resolution of the desktop!!!) */
virtual QPaintDevice * createPaintdeviceMM ( const QString & filename , double widthMM , double heightMM ) const ;
} ;
2015-07-11 18:56:02 +08:00
2019-01-27 03:12:54 +08:00
/** \brief base class for 2D plotter classes (used by the plotter widget JKQTPlotter)
2019-01-19 16:40:52 +08:00
* \ ingroup jkqtpplotterclasses
2015-07-11 18:56:02 +08:00
*
* This class implements basic functionalities for the plotter classes . Those are :
2019-01-20 17:49:29 +08:00
* - # data storage using a JKQTPDatastore object
2015-07-11 18:56:02 +08:00
* - # coordinate transforms
* - # a set of properties for the graphs ( colors , widthes . . . ) and also a system ( see getNextStyle ( ) to automatically
* choose a drawing style for different graphs .
* - # plot a set of overlay elements ( may be used for fast plotting of indicators onto a complex plot )
* - # drawing the coordinate axes , grids . . . ( logarithmic and linear )
* - # saveing and printing the resulting plots
* .
*
2019-01-20 23:15:10 +08:00
* This class is NOT a widget , if you need a plotting widget , use JKQTPlotter . This class may be used to
2019-01-27 03:12:54 +08:00
* plot using a JKQTPEnhancedPainter .
2015-07-11 18:56:02 +08:00
*
2019-02-03 21:04:48 +08:00
* \ see JKQTPlotter a QWidget class that displays a JKQTBasePlotter plot on a Qt Window .
*
*
* \ tableofcontents
*
2015-07-11 18:56:02 +08:00
*
* \ section jkqtplotter_base_datastore Data Storage
* As already mentioned this class does not provide means to draw graphs , but it contains a basic mechanism to associate
2019-01-20 17:49:29 +08:00
* data with it . This is imeplemented , using a JKQTPDatastore object together with some convenience access methods . No further
2019-01-20 23:15:10 +08:00
* data access is implemented and child classes are NOT forced to use this datastore . Hide it if you want . JKQTPlotter shows
2015-07-11 18:56:02 +08:00
* 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 !
*
2019-01-26 03:16:04 +08:00
* If you call the \ link JKQTBasePlotter : : JKQTBasePlotter ( ) constructor \ endlink with no arguments , it will create an internal
2019-01-26 20:00:40 +08:00
* datastore object and you can start adding data by using getDatastore ( ) . If you have an external JKQTPDatastore object you can
2015-07-11 18:56:02 +08:00
* give it as parameter to the constructor or use one of the other methods :
2019-01-26 03:16:04 +08:00
* - useExternalDatastore ( ) : \ copybrief JKQTBasePlotter : : useExternalDatastore ( )
* - useAsInternalDatastore ( ) : \ copybrief JKQTBasePlotter : : useAsInternalDatastore ( )
* - useInternalDatastore ( ) : \ copybrief JKQTBasePlotter : : useInternalDatastore ( )
* - forceInternalDatastore ( ) : \ copybrief JKQTBasePlotter : : forceInternalDatastore ( )
2015-07-11 18:56:02 +08:00
* .
*
*
*
2019-01-12 23:01:55 +08:00
* \ section jkqtplotter_base_systems_baseplotter Coordinate Systems and Transformations
2019-01-20 17:49:29 +08:00
* These topics are discussed in the help for JKQTPCoordinateAxis . There is a set of coordinate transform
2015-07-11 18:56:02 +08:00
* methods ( x2p ( ) , y2p ( ) , p2x ( ) , p2y ( ) which only call the respective methods in xAxis and yAxis objects .
*
*
2019-01-13 01:53:16 +08:00
* \ section jkqtplotter_base_grids_baseplotter Axis Ticks and Grids
2015-07-11 18:56:02 +08:00
* - The plotting of coordinate axes and grids , as well as coordinate transforms is done by
2019-01-20 17:49:29 +08:00
* JKQTPCoordinateAxis descendents ( see documentation there )
2015-07-11 18:56:02 +08:00
* .
2019-01-26 03:16:04 +08:00
* If you want to set the axis properties , use getXAxis ( ) or getYAxis ( ) to get a pointer to the axis objects which then
2015-07-11 18:56:02 +08:00
* may be used to set the axis properties .
*
*
2019-01-29 05:14:27 +08:00
* \ section jkqtbaseplotter_appearance_and_style Appearance & Styling of the Graph
* \ subsection jkqtplotter_base_key Graph Keys
2015-07-11 18:56:02 +08:00
* 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 \ c key_ . . . parameters .
* If getKeyExtent ( ) returns 0 for height or width , no key is plotted . The \ c 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 .
*
* \ image html plot_key . png
*
* 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 \ b 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 \ b 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 !
*
2019-01-26 20:00:40 +08:00
* 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 ( \ copybrief keyAutosize ) . If this
2015-07-11 18:56:02 +08:00
* is \ c 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 .
*
*
2019-01-29 05:14:27 +08:00
* \ subsection jkqtplotter_base_aspectratios Aspect Ratios
* First note that this functionality is only available and activated if both axes are linear !
*
* You can set two different aspect ratios :
* - The ratio of plotWidth / plotHeight ( setAspectRatio ( ) , setMaintainAspectRatio ( ) ) will keep the plots pixel - width and height at a certain value .
* - The ratio of ( xmax - xmin ) / ( ymax - ymin ) ( setAxisAspectRatio ( ) , setMaintainAxisAspectRatio ( ) ) will keep the displayed axis ranges in a certain ratio .
* .
* So to achieve different effects , use these combinations :
* - you have a 200 x100 range where each 1 x1 - pixel should have an aspect ratio of 4 :
* \ code
* setAspectRatio ( 200.0 / 100.0 ) ;
* setAxisAspectRatio ( 4.0 * getAspectRatio ( ) ) ;
* \ endcode
* .
*
*
* \ section jkqtbaseplotter_dataexport_print Printing , Saving & Exporting
*
* \ subsection jkqtplotter_base_saveprint Saving and Printing Graphs
2015-07-11 18:56:02 +08:00
* 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 )
2019-01-29 05:14:27 +08:00
* - saveImage ( ) saves the graph
* .
* You can also copy the contents of the plot into the clipboard :
* - copyPixelImage ( )
* .
*
* \ subsection jkqtplotter_base_dataexport Exporting Graph Data
* This class implement a set of function to save the data of the graphs :
* - saveData ( ) saves the data of the plot
2015-07-11 18:56:02 +08:00
* - 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
2019-01-29 05:14:27 +08:00
* - 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 :
* - copyData ( )
* - copyDataMatlab ( )
2015-07-11 18:56:02 +08:00
* .
*
2019-01-29 05:14:27 +08:00
*
2019-02-03 21:04:48 +08:00
* \ section JKQTBASEPLOTTER_SYNCMULTIPLOT Synchronizing Several Plots
*
* Often a single plot is not sufficient , but several plots need to be aligned with respect to each other :
*
* \ image html test_multiplot . png
*
* This can be achieved by putting several JKQTPlotter instances into a
* < a href = " http://doc.qt.io/qt-5/layout.html " > Qt Layout < / a > . 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 < br >
* \ image html jkqtbaseplotter_synchronization_unequalaxes . png
* - 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 . < br >
* \ image html jkqtbaseplotter_synchronization_nogridprint . png " Printing with grid-printing-mode deactivated " < br >
* \ image html jkqtbaseplotter_synchronization_withgridprint . png " 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 . < br >
* \ image html jkqtbaseplotter_synchronization_nonsyncedxrange . png
* .
*
*
* 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 :
* - \ ref JKQTBASEPLOTTER_SYNCMULTIPLOT_SYNC
* - \ ref JKQTBASEPLOTTER_SYNCMULTIPLOT_GRIDPRINT
* .
*
* \ subsection JKQTBASEPLOTTER_SYNCMULTIPLOT_SYNC Synchronizing Axis Range & Plot Width
*
* You can synchronize the plot width and axis range between two JKQTPlotter instaces using :
* - synchronizeToMaster ( ) / JKQTBasePlotter : : synchronizeToMaster ( ) synchronizes the parent JKQTPlotter with another JKQTPlotter . With two boolean - parameters
* you can specify the axes to be synchronized . E . g . in the case above , you would call :
* \ code
* // synchronize width/x-axis of plotResid to width/x-axis of plotMain
* plotResid - > synchronizeToMaster ( plotMain , JKQTBasePlotter : : sdXAxis , true , true , true ) ;
*
* // synchronize y-axis of width/plotResidHist to y-axis of width/plotResid
* plotResidHist - > synchronizeToMaster ( plotResid , JKQTBasePlotter : : sdYAxis , true , true , true ) ;
* \ endcode
* This will synchronize the x - axes of the top ( \ c plotMain ) and bottom - left plot ( \ c plotResid ) ,
* as well as the y - axes of the bottom - left ( \ c plotResid ) and bottom - right plot ( \ c plotResidHist ) .
* After this call they will have the same size in screen pixels and always span the same range
* in plot coordinates .
* - synchronizeXToMaster ( ) / JKQTBasePlotter : : synchronizeXToMaster ( ) like synchronizeToMaster ( ) / JKQTBasePlotter : : synchronizeToMaster ( ) ,
* but synchronizes only the x - axes
* - synchronizeYToMaster ( ) / JKQTBasePlotter : : synchronizeYToMaster ( ) like synchronizeToMaster ( ) / JKQTBasePlotter : : synchronizeToMaster ( ) ,
* but synchronizes only the y - axes
* - resetMasterSynchronization ( ) / JKQTBasePlotter : : resetMasterSynchronization ( ) deletes all synchronizations
* from the JKQTPlotter
* .
*
* \ see See \ ref JKQTPlotterMultiPlotLayout for an extensive example of the functionality .
*
*
* \ subsection JKQTBASEPLOTTER_SYNCMULTIPLOT_GRIDPRINT 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 < b > " grid printing " mode < / b > . In this mode , you can declare
* relations between different JKQTPlotters / JKQTBasePlotters by putting them in a rectangular grid ( like in a
* < a reh = " http://doc.qt.io/qt-5/qgridlayout.html " > QGridLayout < / a > ) . then any export / print action will draw all ( explicitly )
* decalred graphs .
*
* \ image html jkqtplotter_gridprint . png
*
* The grid printing API is composed of these functions :
* - setGridPrinting ( ) enables grid printing for this JKQTPlotter . If set to \ c true , and you print afterwards ,
* the printout ( or export ) will not only contain the plot itself , but also additional plots that were
* declared using addGridPrintingPlotter ( ) ( see below ) .
* - addGridPrintingPlotter ( ) add a new plotter \ a plotterOther for grid printing mode , at location \ a x / \ a y
* E . g . in the example shown above , you could call :
* \ code
* plotMain - > setGridPrinting ( true ) ;
* plotMain - > addGridPrintingPlotter ( 0 , 1 , plotResid ) ;
* plotMain - > addGridPrintingPlotter ( 1 , 1 , plotResidHist ) ;
* \ endcode
* - setGridPrintingCurrentX ( ) / setGridPrintingCurrentY ( ) / setGridPrintingCurrentPos ( )
* sets the location of the calling plot inside the grid . < i > By default each plot assumes to be at ( 0 , 0 ) . < / i >
* - clearGridPrintingPlotters ( ) clear all additional plotters for grid printing mode
* .
*
* \ see See \ ref JKQTPlotterMultiPlotLayout for an extensive example of the functionality .
2015-07-11 18:56:02 +08:00
*
2019-01-29 05:14:27 +08:00
*
2015-07-11 18:56:02 +08:00
*
* \ section jkqtplotter_base_defaultvalues Default Properties
* The plot is configured by a huge set of properties . For each property there is also a second protected variable which
* contains its default value . This way it is possible to store only those parameters in an INI file which have changed with
2019-01-29 05:14:27 +08:00
* respect to the default values . If the property is called \ c property then the according default value is stored in
2019-01-26 20:00:40 +08:00
* \ c default_property . To reduce the code to be entered you can use the JKQTPPROPERTY ( ) macro .
2015-07-11 18:56:02 +08:00
*
* Default values are available only for properties that control the appearance of the graphs ( line widths , border widths ,
* color , fonts . . . ) , not the type of the graph ( xmin , xmax , logXAxis , . . . )
*
* \ section jkqtplotter_base_userprops 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 ( ) .
2019-01-26 20:00:40 +08:00
* These methods MAY ( strictly optional and turned off by default ) be called by saveSettings ( ) and loadSettings ( ) , if the property userSettigsFilename ( \ copybrief userSettigsFilename ) is
2015-07-11 18:56:02 +08:00
* set ( not - empty ) . In this case the suer settings are stored / loaded also everytime they are changed by the user or programmatically .
*/
2019-02-03 21:04:48 +08:00
class JKQTP_LIB_EXPORT JKQTBasePlotter : public QObject {
2015-07-11 18:56:02 +08:00
Q_OBJECT
public :
typedef QMap < QString , QList < QPointer < QAction > > > AdditionalActionsMap ;
typedef QMapIterator < QString , QList < QPointer < QAction > > > AdditionalActionsMapIterator ;
protected :
/** \brief used to plot LaTeX markup */
2019-01-20 17:49:29 +08:00
JKQTMathText mathText ;
2015-07-11 18:56:02 +08:00
2018-11-18 18:59:30 +08:00
/** \brief model representing all Plots in this plotter and showing their visible/invisible state */
2019-01-20 17:49:29 +08:00
JKQTPGraphsModel * m_plotsModel ;
2018-11-18 18:59:30 +08:00
2015-07-11 18:56:02 +08:00
/** \brief object used for the x-axis */
2019-01-20 17:49:29 +08:00
JKQTPHorizontalAxis * xAxis ;
2015-07-11 18:56:02 +08:00
/** \brief object used for the y-axis */
2019-01-20 17:49:29 +08:00
JKQTPVerticalAxis * yAxis ;
2015-07-11 18:56:02 +08:00
/** \brief filename for the ini file in which to save the user settings
* \ see jkqtplotter_base_userprops
*/
QString userSettigsFilename ;
/** \brief prefix for the ini file in which to save the user settings
* \ see jkqtplotter_base_userprops
*/
QString userSettigsPrefix ;
/** \brief indicates whether the \ref jkqtplotter_base_saveprint is activated .*/
bool gridPrinting ;
/** \brief x position of the current graph in \ref jkqtplotter_base_saveprint */
size_t gridPrintingCurrentX ;
/** \brief y position of the current graph in \ref jkqtplotter_base_saveprint */
size_t gridPrintingCurrentY ;
/** \brief list that manages all the additional graphs for grid printing mode */
2019-01-20 17:49:29 +08:00
QList < JKQTPGridPrintingItem > gridPrintingList ;
2015-07-11 18:56:02 +08:00
/** \brief this list contains all the rows of the current printing grid and stores its heights */
QList < int > gridPrintingRows ;
/** \brief this list contains all the columns of the current printing grid and stores its widths */
QList < int > gridPrintingColumns ;
/** \brief size of all plots in grid printing mode, filled by gridPrintingCalc() */
QSizeF gridPrintingSize ;
/** \brief 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 ! */
double paintMagnification ;
/** \brief the decimal separator used when exporting data to text files */
2019-01-09 04:00:25 +08:00
QString CSVdecimalSeparator ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property CSVdecimalSeparator. \see CSVdecimalSeparator for more information */
QString default_CSVdecimalSeparator ;
2015-07-11 18:56:02 +08:00
/** \brief this string is used to introduce comments in text output when exporting data */
2019-01-09 04:00:25 +08:00
QString CSVcommentInitializer ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property CSVcommentInitializer. \see CSVcommentInitializer for more information */
QString default_CSVcommentInitializer ;
2015-07-11 18:56:02 +08:00
/** \brief an object which manages all data columns for this plotter class */
2019-01-20 17:49:29 +08:00
JKQTPDatastore * datastore ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether the datastore is managed (allocated/freed) internally or externally */
bool datastoreInternal ;
/** \brief width of the plot widget */
int widgetWidth ;
/** \brief height of the plot widget */
int widgetHeight ;
/** \brief 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 iplotBorderTop */
2019-01-09 04:00:25 +08:00
int plotBorderTop ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotBorderTop. \see plotBorderTop for more information */
int default_plotBorderTop ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */
2019-01-26 19:28:44 +08:00
double iplotBorderTop ;
double iplotKeyBorderTop ;
2015-07-11 18:56:02 +08:00
/** \brief height of the plot title (or 0 if no title) */
2019-01-26 19:28:44 +08:00
double iTitleHeight ;
2015-07-11 18:56:02 +08:00
/** \brief 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 iplotBorderLeft */
2019-01-09 04:00:25 +08:00
int plotBorderLeft ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotBorderLeft. \see plotBorderLeft for more information */
int default_plotBorderLeft ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */
2019-01-26 19:28:44 +08:00
double iplotBorderLeft ;
double iplotKeyBorderLeft ;
2015-07-11 18:56:02 +08:00
/** \brief 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 iplotBorderBottom */
2019-01-09 04:00:25 +08:00
int plotBorderBottom ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotBorderBottom. \see plotBorderBottom for more information */
int default_plotBorderBottom ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */
2019-01-26 19:28:44 +08:00
double iplotBorderBottom ;
double iplotKeyBorderBottom ;
2015-07-11 18:56:02 +08:00
/** \brief 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 iplotBorderRight */
2019-01-09 04:00:25 +08:00
int plotBorderRight ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotBorderRight. \see plotBorderRight for more information */
int default_plotBorderRight ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */
2019-01-26 19:28:44 +08:00
double iplotBorderRight ;
double iplotKeyBorderRight ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget top border and plot top border (including coordinate axes) */
2019-01-26 19:28:44 +08:00
double iplotBorderTop_nographs ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget left border and plot left border (including coordinate axes) */
2019-01-26 19:28:44 +08:00
double iplotBorderLeft_nographs ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget right border and plot right border (including coordinate axes) */
2019-01-26 19:28:44 +08:00
double iplotBorderBottom_nographs ;
2015-07-11 18:56:02 +08:00
/** \brief free space between widget bottom border and plot bottom border (including coordinate axes) */
2019-01-26 19:28:44 +08:00
double iplotBorderRight_nographs ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether the widget should maintain an aspect ratio of plotwidth and plotheight */
2019-01-09 04:00:25 +08:00
bool maintainAspectRatio ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property maintainAspectRatio. \see maintainAspectRatio for more information */
bool default_maintainAspectRatio ;
2015-07-11 18:56:02 +08:00
/** \brief the aspect ratio of plotwidth and plotheight to maintain, if \c maintainAspectRatio==true */
2019-01-09 04:00:25 +08:00
double aspectRatio ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property aspectRatio. \see aspectRatio for more information */
double default_aspectRatio ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether the axes should maintain an aspect ratio */
2019-01-09 04:00:25 +08:00
bool maintainAxisAspectRatio ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property maintainAxisAspectRatio. \see maintainAxisAspectRatio for more information */
bool default_maintainAxisAspectRatio ;
2015-07-11 18:56:02 +08:00
/** \brief the aspect ratio of axis widths to maintain, if \c maintainAxisAspectRatio==true */
2019-01-09 04:00:25 +08:00
double axisAspectRatio ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property axisAspectRatio. \see axisAspectRatio for more information */
double default_axisAspectRatio ;
2015-07-11 18:56:02 +08:00
2019-01-20 23:15:10 +08:00
/** \brief plot width in pt inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth) */
2015-07-11 18:56:02 +08:00
int plotWidth ;
2019-01-20 23:15:10 +08:00
/** \brief plot height in pt inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight) */
2015-07-11 18:56:02 +08:00
int plotHeight ;
/** \brief color of the plotted graph */
2019-01-09 04:00:25 +08:00
QColor graphColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property graphColor. \see graphColor for more information */
QColor default_graphColor ;
2015-07-11 18:56:02 +08:00
/** \brief colors used in modes where more than one graph is beeing plottet */
QColor manyGraphsColor [ 50 ] ;
2019-01-26 20:00:40 +08:00
QColor default_manyGraphsColor [ 50 ] ;
2015-07-11 18:56:02 +08:00
/** \brief number of actually defined items in manyGraphsColor */
int manyGraphsColorCount ;
/** \brief pen styles used in modes where more than one graph is beeing plottet */
2019-01-09 04:00:25 +08:00
Qt : : PenStyle manyGraphsStyle [ 5 ] ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property manyGraphsStyle. \see manyGraphsStyle[5] for more information */
Qt : : PenStyle default_manyGraphsStyle [ 5 ] ;
2015-07-11 18:56:02 +08:00
/** \brief width of the plotted graph (in pixel) */
2019-01-09 04:00:25 +08:00
double graphWidth ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property graphWidth. \see graphWidth for more information */
double default_graphWidth ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether to use clipping (hack for printing, see print() ) */
bool useClipping ;
/** \brief color of the coordinate system */
2019-01-09 04:00:25 +08:00
QColor systemColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property systemColor. \see systemColor for more information */
QColor default_systemColor ;
2015-07-11 18:56:02 +08:00
/** \brief width of the coordinate (in pixel) */
2019-01-09 04:00:25 +08:00
double systemWidth ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property systemWidth. \see systemWidth for more information */
double default_systemWidth ;
2015-07-11 18:56:02 +08:00
/** \brief color of the background*/
2019-01-09 04:00:25 +08:00
QColor backgroundColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property backgroundColor. \see backgroundColor for more information */
QColor default_backgroundColor ;
2015-07-11 18:56:02 +08:00
/** \brief color of the background when exporting*/
2019-01-09 04:00:25 +08:00
QColor exportBackgroundColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property exportBackgroundColor. \see exportBackgroundColor for more information */
QColor default_exportBackgroundColor ;
2015-07-11 18:56:02 +08:00
/** \brief color of the plot's background*/
2019-01-09 04:00:25 +08:00
QColor plotBackgroundColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotBackgroundColor. \see plotBackgroundColor for more information */
QColor default_plotBackgroundColor ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether to plot a frame around the key */
2019-01-09 04:00:25 +08:00
bool showKeyFrame ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property showKeyFrame. \see showKeyFrame for more information */
bool default_showKeyFrame ;
2015-07-11 18:56:02 +08:00
/** \brief color of the key frame line */
2019-01-09 04:00:25 +08:00
QColor keyFrameColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyFrameColor. \see keyFrameColor for more information */
QColor default_keyFrameColor ;
2015-07-11 18:56:02 +08:00
/** \brief width of the key frame line */
2019-01-09 04:00:25 +08:00
double keyFrameWidth ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyFrameWidth. \see keyFrameWidth for more information */
double default_keyFrameWidth ;
2015-07-11 18:56:02 +08:00
/** \brief color of the key background */
2019-01-09 04:00:25 +08:00
QColor keyBackgroundColor ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyBackgroundColor. \see keyBackgroundColor for more information */
QColor default_keyBackgroundColor ;
2015-07-11 18:56:02 +08:00
/** \brief indicates whether to plot a key */
2019-01-09 04:00:25 +08:00
bool showKey ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property showKey. \see showKey for more information */
bool default_showKey ;
2015-07-11 18:56:02 +08:00
/** \brief font face for key labels */
2019-01-09 04:00:25 +08:00
QString keyFont ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyFont. \see keyFont for more information */
QString default_keyFont ;
2015-07-11 18:56:02 +08:00
/** \brief font size for key labels [in points] */
2019-01-09 04:00:25 +08:00
double keyFontSize ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyFontSize. \see keyFontSize for more information */
double default_keyFontSize ;
2019-01-20 23:15:10 +08:00
/** \brief width of a key item in pt [in units of width of 'X' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double key_item_width ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property key_item_width. \see key_item_width for more information */
double default_key_item_width ;
2019-01-20 23:15:10 +08:00
/** \brief height of a key item in pt [in units of height keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double key_item_height ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property key_item_height. \see key_item_height for more information */
double default_key_item_height ;
2019-01-20 23:15:10 +08:00
/** \brief length of the line samples in the key in pt [in units of width of 'X' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double key_line_length ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property key_line_length. \see key_line_length for more information */
double default_key_line_length ;
2015-07-11 18:56:02 +08:00
/** \brief x-distance between key frame and key content [in units of width of 'X' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyXMargin ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyXMargin. \see keyXMargin for more information */
double default_keyXMargin ;
2015-07-11 18:56:02 +08:00
/** \brief y-distance between key frame and key content [in units of width of 'x' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyYMargin ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyYMargin. \see keyYMargin for more information */
double default_keyYMargin ;
2015-07-11 18:56:02 +08:00
/** \brief x-offset of the key from the border of the plot [in units of width of 'X' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyXOffset ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyXOffset. \see keyXOffset for more information */
double default_keyXOffset ;
2015-07-11 18:56:02 +08:00
/** \brief y-offset of the key from the border of the plot [in units of width of 'x' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyYOffset ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyYOffset. \see keyYOffset for more information */
double default_keyYOffset ;
2015-07-11 18:56:02 +08:00
/** \brief distance between key line example and key text [in units of width of 'X' set in keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyXSeparation ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyXSeparation. \see keyXSeparation for more information */
double default_keyXSeparation ;
2015-07-11 18:56:02 +08:00
/** \brief distance between two key entries [in units of height of keyFont, keyFontSize] */
2019-01-09 04:00:25 +08:00
double keyYSeparation ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyYSeparation. \see keyYSeparation for more information */
double default_keyYSeparation ;
2015-07-11 18:56:02 +08:00
/** \brief key position */
2019-01-20 17:49:29 +08:00
JKQTPKeyPosition keyPosition ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyPosition. \see keyPosition for more information */
JKQTPKeyPosition default_keyPosition ;
2015-07-11 18:56:02 +08:00
/** \brief the key layout */
2019-01-20 17:49:29 +08:00
JKQTPKeyLayout keyLayout ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyLayout. \see keyLayout for more information */
JKQTPKeyLayout default_keyLayout ;
2015-07-11 18:56:02 +08:00
/** \brief determine width of the key automatically */
2019-01-09 04:00:25 +08:00
bool keyAutosize ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property keyAutosize. \see keyAutosize for more information */
bool default_keyAutosize ;
2015-07-11 18:56:02 +08:00
/** \brief the plot label text */
QString plotLabel ;
/** \brief the plot label font name */
2019-01-09 04:00:25 +08:00
QString plotLabelFontname ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotLabelFontname. \see plotLabelFontname for more information */
QString default_plotLabelFontname ;
2015-07-11 18:56:02 +08:00
/** \brief the plot label font size */
2019-01-09 04:00:25 +08:00
double plotLabelFontSize ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property plotLabelFontSize. \see plotLabelFontSize for more information */
double default_plotLabelFontSize ;
2015-07-11 18:56:02 +08:00
/** \brief calculate the scaling and offset values from axis min/max values */
void calcPlotScaling ( JKQTPEnhancedPainter & painter ) ;
/** \brief set the standard settings (colors, line widths ...) */
void initSettings ( ) ;
2019-01-26 19:28:44 +08:00
/** \brief specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() */
2015-07-11 18:56:02 +08:00
bool emitSignals ;
/** \brief specifies whether to use antialiasing for plotting the coordinate system */
2019-01-09 04:00:25 +08:00
bool useAntiAliasingForSystem ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property useAntiAliasingForSystem. \see useAntiAliasingForSystem for more information */
bool default_useAntiAliasingForSystem ;
2015-07-11 18:56:02 +08:00
/** \brief specifies whether to use antialiasing for plotting the graphs
*
* \ note You can set this property \ c false to increase plotting speed of complex plots ( with many graphs inside ) . You can reach a
* roughly three - fold speed improvement !
2019-01-09 04:00:25 +08:00
*/
bool useAntiAliasingForGraphs ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property useAntiAliasingForGraphs. \see useAntiAliasingForGraphs for more information */
bool default_useAntiAliasingForGraphs ;
2015-07-11 18:56:02 +08:00
2015-08-02 21:04:37 +08:00
/** \brief specifies whether to use antialiasing when drawing any text
* \ note You can set this property \ c false to increase plotting speed of complex plots ( with many graphs inside ) . You can reach a
* roughly three - fold speed improvement !
2019-01-09 04:00:25 +08:00
*/
bool useAntiAliasingForText ;
2019-01-26 20:00:40 +08:00
/*! \brief default value for property property useAntiAliasingForText. \see useAntiAliasingForText for more information */
bool default_useAntiAliasingForText ;
2015-07-11 18:56:02 +08:00
/** \brief multiplier which is used for font sizes when the plot is exported/printed */
double fontSizePrintMultiplier ;
/** \brief multiplier which is used for linewidths when the plot is exported/printed */
double lineWidthPrintMultiplier ;
/** \brief multiplier for the font size */
double fontSizeMultiplier ;
/** \brief multiplier or the line widths */
double lineWidthMultiplier ;
/** \brief internal: used to store a list of all currently used plot styles */
QList < int > usedStyles ;
/** \brief a vector that contains all graphs to be plottet in the system */
2019-01-20 17:49:29 +08:00
QList < JKQTPPlotElement * > graphs ;
2015-07-11 18:56:02 +08:00
2019-01-20 17:49:29 +08:00
QList < JKQTPOverlayElement * > overlays ;
2015-07-11 18:56:02 +08:00
/** \brief used as maximum/minimum pixel value for plotting */
double plot_minmaxcoorinate ;
/** \brief hidden default constructor */
2019-01-20 17:49:29 +08:00
JKQTBasePlotter ( ) ;
2015-07-11 18:56:02 +08:00
/** \brief paints the plot onto the given JKQTPEnhancedPainter object */
void paintPlot ( JKQTPEnhancedPainter & painter , bool drawOverlays = true ) ;
void paintOverlays ( JKQTPEnhancedPainter & painter ) ;
/** \brief simply calls paintPlot() if grid printing mode is deactivated and prints the graph grid otherwise
* \ a 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 !
*/
void gridPaint ( JKQTPEnhancedPainter & painter , QSizeF pageRect , bool drawOverlays = true , bool scaleIfTooLarge = true , bool scaleIfTooSmall = true ) ;
void gridPaintOverlays ( JKQTPEnhancedPainter & painter , QSizeF pageRect ) ;
/** \brief 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 . */
void gridPrintingCalc ( ) ;
/** \brief plot the grid */
2019-01-26 19:28:44 +08:00
void plotSystemGrid ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief plot the x coordinate axis (incl. labels) */
2019-01-26 19:28:44 +08:00
void plotSystemXAxis ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief plot the x coordinate axis (incl. labels) */
2019-01-26 19:28:44 +08:00
void plotSystemYAxis ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief plot the graphs */
2019-01-26 19:28:44 +08:00
void plotGraphs ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief plot a key */
2019-01-26 19:28:44 +08:00
void plotKey ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief plot all overlay elements */
2019-01-26 19:28:44 +08:00
void plotOverlays ( JKQTPEnhancedPainter & painter ) ;
2015-07-11 18:56:02 +08:00
/** \brief 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 ( ) .
*
* \ param painter draw the key on this painter
* \ param x left - most coordinate of the key [ pixels ]
* \ param y top - most coordinate of the key [ pixels ]
* \ param width width of the key [ pixels ]
* \ param height height of the key [ pixels ]
*
* So any implementation should only draw inside the rectangle < code > [ x . . x + width , y . . y + hieght ] < / code >
*/
2019-01-26 19:28:44 +08:00
void plotKeyContents ( JKQTPEnhancedPainter & painter , double x , double y , double width , double height ) ;
2015-07-11 18:56:02 +08:00
/** \brief 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 !
*/
2019-01-26 19:28:44 +08:00
void getKeyExtent ( JKQTPEnhancedPainter & painter , double * width , double * height , double * text_width = nullptr , double * text_height = nullptr , int * columns_count = nullptr , int * lines_count = nullptr ) ;
2015-07-11 18:56:02 +08:00
/** \brief QAction which triggers saving of the plot as an image */
QAction * actSavePlot ;
/** \brief QAction which triggers saving of the data used for the plot */
QAction * actSaveData ;
/** \brief QAction which triggers copying of the data to the clipboard */
QAction * actCopyData ;
/** \brief QAction which triggers copying of the image to the clipboard */
QAction * actCopyPixelImage ;
/** \brief QAction which triggers copying of the data to the clipboard in Matlab format */
QAction * actCopyMatlab ;
/** \brief QAction which triggers the saving as PDF */
QAction * actSavePDF ;
# if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
/** \brief QAction which triggers the saving as PostScript */
QAction * actSavePS ;
# endif
/** \brief QAction which triggers the saving as pixel image */
QAction * actSavePix ;
/** \brief QAction which triggers the saving as Scalable Vector Graphics (SVG) */
QAction * actSaveSVG ;
/** \brief QAction which triggers the printing */
QAction * actPrint ;
/** \brief QAction which triggers the saving as CSV (data only) */
QAction * actSaveCSV ;
/** \brief QAction which triggers zoom all */
QAction * actZoomAll ;
/** \brief QAction which triggers zoom in */
QAction * actZoomIn ;
/** \brief QAction which triggers zoom out */
QAction * actZoomOut ;
/** \brief QAction to show a table with all the plot data in the datastore */
QAction * actShowPlotData ;
/** \brief 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! */
AdditionalActionsMap lstAdditionalPlotterActions ;
/** \brief the directory in which to open SaveAs ... dialogs */
QString currentSaveDirectory ;
QString currentFileFormat ;
QString currentDataFileFormat ;
QString currentPrinter ;
2019-02-03 21:04:48 +08:00
/** \brief the master plotter for x-dimension, this plotter is connected to. */
JKQTBasePlotter * masterPlotterX ;
/** \brief the master plotter for y-dimension, this plotter is connected to. */
JKQTBasePlotter * masterPlotterY ;
/** \brief synchronize plot width with masterPlotterX */
2015-07-11 18:56:02 +08:00
bool masterSynchronizeWidth ;
2019-02-03 21:04:48 +08:00
/** \brief synchronize plot height with masterPlotterY */
2015-07-11 18:56:02 +08:00
bool masterSynchronizeHeight ;
2019-01-26 19:28:44 +08:00
/** \brief controls, whether the signals plotUpdated() and overlaysUpdated() are emitted */
2015-07-11 18:56:02 +08:00
bool emitPlotSignals ;
void printpreview ( QPrinter * p , bool setabsolutesize = false ) ;
bool printpreviewNew ( QPaintDevice * paintDevice , bool setAbsolutePaperSize = false , double printsizeX_inMM = - 1.0 , double printsizeY_inMM = - 1.0 , bool displayPreview = true ) ;
bool exportpreview ( QSizeF pageSize , bool unitIsMM = false ) ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property fontSizeMultiplier ( \copybrief fontSizeMultiplier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter fontSizeMultiplier is : < BLOCKQUOTE > \ copydoc fontSizeMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see fontSizeMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline void setFontSizeMultiplier ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > fontSizeMultiplier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property lineWidthMultiplier ( \copybrief lineWidthMultiplier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineWidthMultiplier is : < BLOCKQUOTE > \ copydoc lineWidthMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineWidthMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline void setLineWidthMultiplier ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > lineWidthMultiplier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property printMagnification ( \copybrief printMagnification ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter printMagnification is : < BLOCKQUOTE > \ copydoc printMagnification < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see printMagnification for more information */
2019-01-26 20:00:40 +08:00
inline void setPrintMagnification ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > printMagnification = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property printMagnification ( \copybrief printMagnification ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter printMagnification is : < BLOCKQUOTE > \ copydoc printMagnification < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see printMagnification for more information */
2019-01-26 20:00:40 +08:00
inline double getPrintMagnification ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > printMagnification ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property paintMagnification ( \copybrief paintMagnification ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter paintMagnification is : < BLOCKQUOTE > \ copydoc paintMagnification < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see paintMagnification for more information */
2019-01-26 20:00:40 +08:00
inline void setPaintMagnification ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > paintMagnification = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property paintMagnification ( \copybrief paintMagnification ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter paintMagnification is : < BLOCKQUOTE > \ copydoc paintMagnification < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see paintMagnification for more information */
2019-01-26 20:00:40 +08:00
inline double getPaintMagnification ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > paintMagnification ;
}
2015-07-11 18:56:02 +08:00
QListWidget * dataColumnsListWidget ;
QComboBox * dataColumnsCombobox ;
QSet < int > getDataColumnsByUser ( ) ;
QMap < QString , QStringList > getDataColumnsByUserSaved ;
private :
double printZoomFactor ;
double printSizeX_Millimeter ;
double printSizeY_Millimeter ;
double printMagnification ;
QPointer < QPrintPreviewWidget > printPreview ;
QPointer < JKQTPEnhancedDoubleSpinBox > spinSizeX ;
QPointer < JKQTPEnhancedDoubleSpinBox > spinSizeY ;
QPointer < QLabel > exportPreviewLabel ;
QPointer < JKQTPEnhancedDoubleSpinBox > spinMagnification ;
bool printSetAbsolutePageSize ;
bool printSetAbsolutePlotSize ;
bool printKeepAbsoluteFontSizes ;
bool printScaleToPagesize ;
double printAspect ;
bool printKeepAspect ;
bool exportUnitInMM ;
QSizeF printPageSizeMM ;
bool printDoUpdate ;
protected slots :
void updatePreviewLabel ( ) ;
void printpreviewPaintRequested ( QPrinter * printer ) ;
void printpreviewPaintRequestedNew ( QPrinter * printer ) ;
void printpreviewPaintRequestedNew ( QPaintDevice * paintDevice ) ;
void exportpreviewPaintRequested ( JKQTPEnhancedPainter & painter , QSize size ) ;
void printpreviewSetZoom ( double value ) ;
void printpreviewSetSizeX ( double value ) ;
void printpreviewSetSizeY ( double value ) ;
void printpreviewSetSizeXNew ( double value ) ;
void printpreviewSetSizeYNew ( double value ) ;
void printpreviewSetMagnification ( double value ) ;
void printpreviewSetMagnificationNew ( double value ) ;
void printpreviewSetAspectRatio ( bool checked ) ;
void printpreviewSetKeepAbsFontsize ( bool checked ) ;
void printpreviewToggleMagnification ( bool checked ) ;
void printpreviewSetLineWidthMultiplier ( double value ) ;
void printpreviewSetFontSizeMultiplier ( double value ) ;
void printpreviewUpdate ( ) ;
void getDataColumnsByUserCheckAll ( ) ;
void getDataColumnsByUserCheckNone ( ) ;
void getDataColumnsByUserSave ( ) ;
void getDataColumnsByUserComboBoxSelected ( const QString & name ) ;
void getDataColumnsByUserItemChanged ( QListWidgetItem * widgetitem ) ;
void showPlotData ( ) ;
2018-12-14 05:29:30 +08:00
/** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x-axis to the other x-axis */
2019-01-20 17:49:29 +08:00
void synchronizeXAxis ( double newxmin , double newxmax , double newymin , double newymax , JKQTBasePlotter * sender ) ;
2018-12-14 05:29:30 +08:00
/** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local y-axis to the other y-axis */
2019-01-20 17:49:29 +08:00
void synchronizeYAxis ( double newxmin , double newxmax , double newymin , double newymax , JKQTBasePlotter * sender ) ;
2018-12-14 05:29:30 +08:00
/** \brief may be connected to zoomChangedLocally() of a different plot and synchronizes the local x- and y-axis to the other x- and y-axis */
2019-01-20 17:49:29 +08:00
void synchronizeXYAxis ( double newxmin , double newxmax , double newymin , double newymax , JKQTBasePlotter * sender ) ;
2015-07-11 18:56:02 +08:00
public slots :
/** \brief sets x/ymin and x/ymax to the supplied values and replots the graph (zoom operation!) */
void zoom ( double nxmin , double nxmax , double nymin , double nymax ) ;
/** \brief sets whether to plot grid lines or not */
void setGrid ( bool val ) ;
/** \brief save the current plot as a pixel image image (PNG ...), if filename is empty a file selection dialog is displayed */
2019-01-26 19:28:44 +08:00
void saveAsPixelImage ( const QString & filename = QString ( " " ) , bool displayPreview = true , const QByteArray & outputFormat = QByteArray ( ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief copy the current plot as a pixel image to the clipboard */
void copyPixelImage ( ) ;
/** \brief save the current plot as a SVG file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed */
2019-01-26 19:28:44 +08:00
void saveAsSVG ( const QString & filename = QString ( " " ) , bool displayPreview = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot as a PDF file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed */
2019-01-26 19:28:44 +08:00
void saveAsPDF ( const QString & filename = QString ( " " ) , bool displayPreview = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot as a PS file, with the current widget aspect ratio, if filename is empty a file selection dialog is displayed */
2019-01-26 19:28:44 +08:00
void saveAsPS ( const QString & filename = QString ( " " ) , bool displayPreview = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief 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 , . . . ) */
2019-01-26 19:28:44 +08:00
void saveImage ( const QString & filename = QString ( " " ) , bool displayPreview = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the data used for the current plot. The file format is extracted from the file extension (csv, ...)
*
* The parameter \ a format specifies the export format . if it is empty the format will be choosen according to the file extension , or
* if \ a filename is also empty the format will be choosen according to what is selected in the file selection dialog .
*
* If \ a format is \ c " slk " the output will be in SYLK format , if \ a format is \ c " csv " or \ a " dat " the output will be comma separated values
* and if \ a format is \ c " txt " the output will be tab separated values .
*/
2019-01-26 19:28:44 +08:00
void saveData ( const QString & filename = QString ( " " ) , const QString & jkqtp_format = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief copy the data used for the current plot to the clipboard
*
* copies data as tab separated data with the system - decimal point .
*/
void copyData ( ) ;
/** \brief copy the data used for the current plot to the clipboard in Matlab format
*/
void copyDataMatlab ( ) ;
/** \brief save the current plot data as a Comma Separated Values (CSV) file*/
2019-01-26 19:28:44 +08:00
void saveAsCSV ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a DIF file*/
2019-01-26 19:28:44 +08:00
void saveAsDIF ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a SYLK spreadsheet file*/
2019-01-26 19:28:44 +08:00
void saveAsSYLK ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a Matlab Script*/
2019-01-26 19:28:44 +08:00
void saveAsMatlab ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a Semicolon Separated Values (SSV) file*/
2019-01-26 19:28:44 +08:00
void saveAsSemicolonSV ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a Tabulator Separated Values (CSV) file*/
2019-01-26 19:28:44 +08:00
void saveAsTabSV ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief save the current plot data as a Semicolon Separated Values (CSV) file for german Excel, i.e. with comma as decimal separator*/
2019-01-26 19:28:44 +08:00
void saveAsGerExcelCSV ( const QString & filename = QString ( " " ) ) ;
2015-07-11 18:56:02 +08:00
2018-11-18 18:59:30 +08:00
/** \brief print the current plot, if printer is \c nullptr a printer selection dialog is displayed */
void print ( QPrinter * printer = nullptr , bool displayPreview = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief this method zooms the graph so that all plotted datapoints are visible.
*
* \ param zoomX if set \ c true ( default ) zooms the x axis
* \ param zoomY if set \ c true ( default ) zooms the y axis
* \ param includeX0 if this is \ c true zoomToFit ( ) will ensure that \ f $ x = 0 \ f $ is visible in the plot ( only for non - logx plots , default : false )
* \ param includeY0 if this is \ c true zoomToFit ( ) will ensure that \ f $ y = 0 \ f $ is visible in the plot ( only for non - logy plots , default : false )
* \ param scaleX the plot will have a width of \ f $ \ mbox { Xscale } \ cdot \ Delta x \ f $ where \ f $ \ Delta x \ f $ is the actual x - axis data range
* For logx plots we actually use this on the logarithmized data ! ( default : 1.05 )
* \ param scaleY the plot will have a height of \ f $ \ mbox { Yscale } \ cdot \ Delta < \ f $ where \ f $ \ Delta < \ f $ is the actual < - axis data range
* For log < plots we actually use this on the logarithmized data ! ( default : 1.05 )
*
*/
2019-01-26 19:28:44 +08:00
void zoomToFit ( bool zoomX = true , bool zoomY = true , bool includeX0 = false , bool includeY0 = false , double scaleX = 1.05 , double scaleY = 1.05 ) ;
2015-07-11 18:56:02 +08:00
/** \brief zooms into the graph (the same as turning the mouse wheel) by the given factor */
void zoomIn ( double factor = 2.0 ) ;
/** \brief zooms out of the graph (the same as turning the mouse wheel) by the given factor */
void zoomOut ( double factor = 2.0 ) {
zoomIn ( 1.0 / factor ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
2019-01-13 01:53:16 +08:00
/** \brief en-/disables the maintaining of the data aspect ratio */
2019-01-26 03:16:04 +08:00
void setMaintainAspectRatio ( bool value ) {
2015-07-11 18:56:02 +08:00
maintainAspectRatio = value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2015-07-11 18:56:02 +08:00
}
2019-01-13 01:53:16 +08:00
/** \brief en-/disables the maintaining of the axis aspect ratio */
2019-01-26 03:16:04 +08:00
void setMaintainAxisAspectRatio ( bool value ) {
2015-07-11 18:56:02 +08:00
maintainAxisAspectRatio = value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2015-07-11 18:56:02 +08:00
}
2019-01-26 03:16:04 +08:00
void setUserSettigsFilename ( const QString & filename , const QString & prefix ) ;
void setUserSettigsFilename ( const QString & filename ) ;
void setUserSettigsPrefix ( const QString & prefix ) ;
QString getUserSettigsFilename ( ) const ;
QString getUserSettigsPrefix ( ) const ;
2015-07-11 18:56:02 +08:00
/** \brief set all graphs invisible, except i */
void setOnlyGraphVisible ( int i ) ;
/** \brief set all graphs invisible, except graph start, start+n, start+2*n, ... */
void setOnlyNthGraphsVisible ( int start , int n ) ;
/** \brief saves the plot user properties if userSettingsFilename is set, does nothing otherwise */
void loadUserSettings ( ) ;
/** \brief saves the plot user properties if userSettingsFilename is set, does nothing otherwise */
2019-01-26 19:28:44 +08:00
void saveUserSettings ( ) const ;
2015-07-11 18:56:02 +08:00
public :
/** \brief class constructor
*
* if \ a datastore_internal is \ c true then the constructor will create an internal datastore object . The datastore
* will be managed ( freed ) by this class . If \ a datastore_internal is \ c false the class will use tha datastore provided
* in \ a datast as an external datastore . You can modify this later by using useInternalDatastore ( ) and useExternalDatastore ( ) .
*/
2019-01-20 17:49:29 +08:00
JKQTBasePlotter ( bool datastore_internal , QObject * parent = nullptr , JKQTPDatastore * datast = nullptr ) ;
2015-07-11 18:56:02 +08:00
/** \brief class destructor */
2019-01-20 17:49:29 +08:00
virtual ~ JKQTBasePlotter ( ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns a pointer to the datastore used by this object */
2019-01-20 17:49:29 +08:00
inline JKQTPDatastore * getDatastore ( ) { return datastore ; }
2018-08-19 23:03:46 +08:00
/** \brief returns model representing all Plots in this plotter and showing their visible/invisible state */
2019-01-20 17:49:29 +08:00
inline JKQTPGraphsModel * getPlotsModel ( ) { return m_plotsModel ; }
2015-07-11 18:56:02 +08:00
2018-12-28 05:52:00 +08:00
/** \brief returns a pointer to the datastore used by this object */
2019-01-20 17:49:29 +08:00
inline const JKQTPDatastore * getDatastore ( ) const { return datastore ; }
2018-12-28 05:52:00 +08:00
/** \brief returns model representing all Plots in this plotter and showing their visible/invisible state */
2019-01-20 17:49:29 +08:00
inline const JKQTPGraphsModel * getPlotsModel ( ) const { return m_plotsModel ; }
2018-12-28 05:52:00 +08:00
2015-07-11 18:56:02 +08:00
/** \brief 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 .
*/
2019-01-20 17:49:29 +08:00
void useExternalDatastore ( JKQTPDatastore * newStore ) ;
2015-07-11 18:56:02 +08:00
/** \brief 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 .
*/
2019-01-20 17:49:29 +08:00
void useAsInternalDatastore ( JKQTPDatastore * newStore ) ;
2015-07-11 18:56:02 +08:00
/** \brief tells the plotter object to use an internal datastore. A new internal datastore object is generated only if
* the current datastore is not internal .
*/
void useInternalDatastore ( ) ;
/** \brief 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 */
void forceInternalDatastore ( ) ;
2019-01-26 19:28:44 +08:00
/** \brief returns whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() */
bool isEmittingSignalsEnabled ( ) const ;
/** \brief specifies whether this class emits signals, like zoomChangedLocally() or beforePlotScalingRecaluclate() */
2019-01-26 03:16:04 +08:00
void setEmittingSignalsEnabled ( bool enabled ) ;
2015-07-11 18:56:02 +08:00
/** \brief loads the plot properties from a QSettings object */
2019-01-26 19:28:44 +08:00
void loadSettings ( const QSettings & settings , const QString & group = QString ( " plots " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief saves the plot properties into a QSettings object.
*
* This method only saves those properties that differ from their default value .
*/
2019-01-26 19:28:44 +08:00
void saveSettings ( QSettings & settings , const QString & group = QString ( " plots " ) ) const ;
2015-07-11 18:56:02 +08:00
/** \brief loads the plot user properties from a QSettings object */
2019-01-26 19:28:44 +08:00
void loadUserSettings ( const QSettings & settings , const QString & group = QString ( " plots_user " ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief saves the plot user properties into a QSettings object. */
2019-01-26 19:28:44 +08:00
void saveUserSettings ( QSettings & settings , const QString & group = QString ( " plots_user " ) ) const ;
2015-07-11 18:56:02 +08:00
/** \brief sets the width of the plot widget */
void setWidth ( int wid ) ;
/** \brief resize the plot */
void resize ( int width , int height ) ;
/** \brief gets the width of the plot widget */
2018-08-19 23:03:46 +08:00
inline int getWidth ( ) { return widgetWidth ; }
2015-07-11 18:56:02 +08:00
/** \brief gets the width of the plot widget */
2018-08-19 23:03:46 +08:00
inline int getHeight ( ) { return widgetHeight ; }
2015-07-11 18:56:02 +08:00
/** \brief sets the width of the plot widget */
void setHeight ( int heigh ) ;
2019-01-26 03:16:04 +08:00
/** \brief sets the borders of the plot, see also getPlotBorderTop(), plotBorderBottom(), plotBorderLeft(), plotBorderRight() */
2015-07-11 18:56:02 +08:00
void setBorder ( int left , int right , int top , int bottom ) ;
/** \brief sets minimum and maximum x-value to plot */
void setX ( double xminn , double xmaxx ) ;
/** \brief sets minimum and maximum y-value to plot */
void setY ( double yminn , double ymaxx ) ;
/** \brief sets minimum and maximum x- and y-values to plot */
void setXY ( double xminn , double xmaxx , double yminn , double ymaxx ) ;
/** \brief returns the current x-axis min */
2018-08-19 23:03:46 +08:00
inline double getXMin ( ) const { return xAxis - > getMin ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the current x-axis max */
2018-08-19 23:03:46 +08:00
inline double getXMax ( ) const { return xAxis - > getMax ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the current y-axis min */
2018-08-19 23:03:46 +08:00
inline double getYMin ( ) const { return yAxis - > getMin ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the current y-axis max */
2018-08-19 23:03:46 +08:00
inline double getYMax ( ) const { return yAxis - > getMax ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the given size in Didot points (0.376 mm) to pixels (with given dots per inch) */
inline double didot2px ( double pt , double dpi ) const {
return dpi / 25.4 * 0.376 * pt ;
}
/** \brief returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter) */
inline double didot2px ( double pt , JKQTPEnhancedPainter & painter ) const {
return didot2px ( pt , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief returns the given size in Didot points (0.376 mm) to pixels (with dpi from painter) */
inline double didot2px ( JKQTPEnhancedPainter & painter , double pt ) const {
return didot2px ( pt , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) */
inline double pt2px ( double pt , double dpi ) const {
return dpi * pt / 72.0 ;
}
/** \brief returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) */
inline double pt2px ( double pt , JKQTPEnhancedPainter & painter ) const {
return pt2px ( pt , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief returns the given size in DTP points points (1/72inch = 0.353mm) to pixels (with given dots per inch) */
inline double pt2px ( JKQTPEnhancedPainter & painter , double pt ) const {
return pt2px ( pt , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief returns the given size in millimeters to pixels (with given dots per inch) */
inline double mm2px ( double mm , double dpi ) const {
return dpi * mm / 25.4 ;
}
/** \brief returns the given size in millimeters to pixels (with given dots per inch) */
inline double mm2px ( double mm , JKQTPEnhancedPainter & painter ) const {
return mm2px ( mm , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief returns the given size in millimeters to pixels (with given dots per inch) */
inline double mm2px ( JKQTPEnhancedPainter & painter , double mm ) const {
return mm2px ( mm , painter . device ( ) - > logicalDpiX ( ) ) ;
}
/** \brief sets absolute minimum and maximum x-value to plot
* \ note if the aspect ration of this does not fit into the widget , it is possible that you don ' t see the complete contents !
*/
void setAbsoluteX ( double xminn , double xmaxx ) ;
/** \brief sets absolute minimum and maximum y-value to plot
* \ note if the aspect ration of this does not fit into the widget , it is possible that you don ' t see the complete contents !
*/
void setAbsoluteY ( double yminn , double ymaxx ) ;
/** \brief sets absolute minimum and maximum x- and y-values to plot
* \ note if the aspect ration of this does not fit into the widget , it is possible that you don ' t see the complete contents !
*/
void setAbsoluteXY ( double xminn , double xmaxx , double yminn , double ymaxx ) ;
/** \brief returns the absolute x-axis min */
2018-11-18 18:59:30 +08:00
inline double getAbsoluteXMin ( ) const { return xAxis - > getAbsoluteMin ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the absolute x-axis max */
2018-11-18 18:59:30 +08:00
inline double getAbsoluteXMax ( ) const { return xAxis - > getAbsoluteMax ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the absolute y-axis min */
2018-11-18 18:59:30 +08:00
inline double getAbsoluteYMin ( ) const { return yAxis - > getAbsoluteMin ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief returns the absolute y-axis max */
2018-11-18 18:59:30 +08:00
inline double getAbsoluteYMax ( ) const { return yAxis - > getAbsoluteMax ( ) ; }
2015-07-11 18:56:02 +08:00
/** \brief add a new plotter for grid printing mode */
2019-01-20 17:49:29 +08:00
inline void addGridPrintingPlotter ( size_t x , size_t y , JKQTBasePlotter * plotter ) {
JKQTPGridPrintingItem i ;
2015-07-11 18:56:02 +08:00
i . x = x ;
i . y = y ;
i . plotter = plotter ;
gridPrintingList . push_back ( i ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief clear all additional plotters for grid printing mode */
inline void clearGridPrintingPlotters ( ) {
gridPrintingList . clear ( ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief return x-pixel coordinate from time coordinate */
inline double x2p ( double x ) const {
return xAxis - > x2p ( x ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief return y-pixel coordinate from y coordinate */
inline double y2p ( double y ) const {
return yAxis - > x2p ( y ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief return time coordinate coordinate from x-pixel */
2019-01-27 05:22:46 +08:00
inline double p2x ( double x ) const {
2015-07-11 18:56:02 +08:00
return xAxis - > p2x ( x ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief return y coordinate coordinate from y-pixel */
2019-01-27 05:22:46 +08:00
inline double p2y ( double y ) const {
2015-07-11 18:56:02 +08:00
return yAxis - > p2x ( y ) ;
2018-11-18 18:59:30 +08:00
}
2015-07-11 18:56:02 +08:00
/** \brief gets the next unused style id, i.e. the smalles number >=0 which is not contained in usedStyles */
int getNextStyle ( ) ;
2019-02-03 22:54:41 +08:00
/** \brief represents a pen, when plotting in JKQTPlotter/JKQTBasePlotter
* \ ingroup jkqtpplotterclasses_tools
*/
2015-07-11 18:56:02 +08:00
struct JKQTPPen {
QColor m_color ;
double m_width ;
Qt : : PenStyle m_style ;
void setWidthF ( double w ) { m_width = w ; }
void setWidth ( double w ) { m_width = w ; }
double width ( ) const { return m_width ; }
double widthF ( ) const { return m_width ; }
QColor color ( ) const { return m_color ; }
2015-08-02 19:36:54 +08:00
void setColor ( const QColor & col ) { m_color = col ; }
2015-07-11 18:56:02 +08:00
Qt : : PenStyle style ( ) const { return m_style ; }
void setStyle ( Qt : : PenStyle s ) { m_style = s ; }
} ;
/** \brief returns a QPen object for the i-th plot style */
2015-08-02 19:36:54 +08:00
JKQTPPen getPlotStyle ( int i ) const ;
2015-07-11 18:56:02 +08:00
/*! \brief draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter
\ param painter JKQTPEnhancedPainter to which the plot should be drawn
\ param rect rectangle to plot into
*/
2019-01-26 19:28:44 +08:00
void draw ( JKQTPEnhancedPainter & painter , const QRect & rect , bool drawOverlays = true ) ;
2015-07-11 18:56:02 +08:00
/*! \brief draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter
\ param painter JKQTPEnhancedPainter to which the plot should be drawn
\ param rect rectangle to plot into
*/
2019-01-26 19:28:44 +08:00
void drawOverlays ( JKQTPEnhancedPainter & painter , const QRect & rect ) ;
2015-07-11 18:56:02 +08:00
/*! \brief draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter
\ param painter JKQTPEnhancedPainter to which the plot should be drawn
\ param pos where to plot the painter ( left - top corner )
*/
2019-01-26 19:28:44 +08:00
void draw ( JKQTPEnhancedPainter & painter , const QPoint & pos = QPoint ( 0 , 0 ) , bool drawOverlays = true ) ;
2015-07-11 18:56:02 +08:00
/*! \brief draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter
\ param painter JKQTPEnhancedPainter to which the plot should be drawn
\ param rect rectangle to plot into
*/
2019-01-26 19:28:44 +08:00
void drawNonGrid ( JKQTPEnhancedPainter & painter , const QRect & rect , bool drawOverlays = true ) ;
2015-07-11 18:56:02 +08:00
/*! \brief draw the contained graph (including grid prints) into the given JKQTPEnhancedPainter
\ param painter JKQTPEnhancedPainter to which the plot should be drawn
\ param pos where to plot the painter ( left - top corner )
*/
2019-01-26 19:28:44 +08:00
void drawNonGrid ( JKQTPEnhancedPainter & painter , const QPoint & pos = QPoint ( 0 , 0 ) , bool drawOverlays = true ) ;
void drawNonGridOverlays ( JKQTPEnhancedPainter & painter , const QPoint & pos = QPoint ( 0 , 0 ) ) ;
2015-07-11 18:56:02 +08:00
/** \brief emit plotUpdated() */
2019-01-26 19:28:44 +08:00
void redrawPlot ( ) { if ( emitPlotSignals ) emit plotUpdated ( ) ; }
2015-07-11 18:56:02 +08:00
2019-01-26 19:28:44 +08:00
/** \brief controls, whether the signals plotUpdated() and overlaysUpdated() are emitted */
void setEmittingPlotSignalsEnabled ( bool __value ) ;
/** \brief returns, whether the signals plotUpdated() and overlaysUpdated() are emitted */
bool isEmittingPlotSignalsEnabled ( ) const ;
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotBorderTop ( \copybrief plotBorderTop ). \details Description of the parameter plotBorderTop is: <BLOCKQUOTE>\copydoc plotBorderTop </BLOCKQUOTE>. \see plotBorderTop for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotBorderTop ( ) const { return this - > plotBorderTop ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotBorderLeft ( \copybrief plotBorderLeft ). \details Description of the parameter plotBorderLeft is: <BLOCKQUOTE>\copydoc plotBorderLeft </BLOCKQUOTE>. \see plotBorderLeft for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotBorderLeft ( ) const { return this - > plotBorderLeft ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotBorderBottom ( \copybrief plotBorderBottom ). \details Description of the parameter plotBorderBottom is: <BLOCKQUOTE>\copydoc plotBorderBottom </BLOCKQUOTE>. \see plotBorderBottom for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotBorderBottom ( ) const { return this - > plotBorderBottom ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotBorderRight ( \copybrief plotBorderRight ). \details Description of the parameter plotBorderRight is: <BLOCKQUOTE>\copydoc plotBorderRight </BLOCKQUOTE>. \see plotBorderRight for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotBorderRight ( ) const { return this - > plotBorderRight ; }
2019-01-09 04:00:25 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief returns the property maintainAspectRatio ( \copybrief maintainAspectRatio ). \details Description of the parameter maintainAspectRatio is: <BLOCKQUOTE>\copydoc maintainAspectRatio </BLOCKQUOTE>. \see maintainAspectRatio for more information */
2019-01-26 03:16:04 +08:00
inline bool doesMaintainAspectRatio ( ) const { return this - > maintainAspectRatio ; }
2019-01-26 20:00:40 +08:00
/*! \brief sets the property aspectRatio ( \copybrief aspectRatio ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter aspectRatio is : < BLOCKQUOTE > \ copydoc aspectRatio < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see aspectRatio for more information */
2019-01-26 19:28:44 +08:00
inline void setAspectRatio ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > aspectRatio ! = __value ) {
this - > aspectRatio = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property aspectRatio ( \copybrief aspectRatio ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter aspectRatio is : < BLOCKQUOTE > \ copydoc aspectRatio < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see aspectRatio for more information */
2019-01-26 19:28:44 +08:00
inline double getAspectRatio ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > aspectRatio ;
}
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief returns the property maintainAxisAspectRatio ( \copybrief maintainAxisAspectRatio ). \details Description of the parameter maintainAxisAspectRatio is: <BLOCKQUOTE>\copydoc maintainAxisAspectRatio </BLOCKQUOTE>. \see maintainAxisAspectRatio for more information */
2019-01-26 03:16:04 +08:00
inline bool doesMaintainAxisAspectRatio ( ) const { return this - > maintainAxisAspectRatio ; }
2019-01-26 20:00:40 +08:00
/*! \brief sets the property axisAspectRatio ( \copybrief axisAspectRatio ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter axisAspectRatio is : < BLOCKQUOTE > \ copydoc axisAspectRatio < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see axisAspectRatio for more information */
2019-01-26 19:28:44 +08:00
inline void setAxisAspectRatio ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > axisAspectRatio ! = __value ) {
this - > axisAspectRatio = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property axisAspectRatio ( \copybrief axisAspectRatio ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter axisAspectRatio is : < BLOCKQUOTE > \ copydoc axisAspectRatio < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see axisAspectRatio for more information */
2019-01-26 19:28:44 +08:00
inline double getAxisAspectRatio ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > axisAspectRatio ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property useAntiAliasingForSystem ( \copybrief useAntiAliasingForSystem ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForSystem is : < BLOCKQUOTE > \ copydoc useAntiAliasingForSystem < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForSystem for more information */
2019-01-26 19:28:44 +08:00
inline void setUseAntiAliasingForSystem ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > useAntiAliasingForSystem ! = __value ) {
this - > useAntiAliasingForSystem = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property useAntiAliasingForSystem ( \copybrief useAntiAliasingForSystem ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForSystem is : < BLOCKQUOTE > \ copydoc useAntiAliasingForSystem < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForSystem for more information */
2019-01-26 19:28:44 +08:00
inline bool isUsingAntiAliasingForSystem ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > useAntiAliasingForSystem ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property useAntiAliasingForGraphs ( \copybrief useAntiAliasingForGraphs ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForGraphs is : < BLOCKQUOTE > \ copydoc useAntiAliasingForGraphs < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForGraphs for more information */
2019-01-26 19:28:44 +08:00
inline void setUseAntiAliasingForGraphs ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > useAntiAliasingForGraphs ! = __value ) {
this - > useAntiAliasingForGraphs = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property useAntiAliasingForGraphs ( \copybrief useAntiAliasingForGraphs ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForGraphs is : < BLOCKQUOTE > \ copydoc useAntiAliasingForGraphs < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForGraphs for more information */
2019-01-26 19:28:44 +08:00
inline bool isUsingAntiAliasingForGraphs ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > useAntiAliasingForGraphs ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property useAntiAliasingForText ( \copybrief useAntiAliasingForText ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForText is : < BLOCKQUOTE > \ copydoc useAntiAliasingForText < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForText for more information */
2019-01-26 19:28:44 +08:00
inline void setUseAntiAliasingForText ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > useAntiAliasingForText ! = __value ) {
this - > useAntiAliasingForText = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property useAntiAliasingForText ( \copybrief useAntiAliasingForText ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter useAntiAliasingForText is : < BLOCKQUOTE > \ copydoc useAntiAliasingForText < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see useAntiAliasingForText for more information */
2019-01-26 19:28:44 +08:00
inline bool isUsingAntiAliasingForText ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > useAntiAliasingForText ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property graphColor ( \copybrief graphColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter graphColor is : < BLOCKQUOTE > \ copydoc graphColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see graphColor for more information */
2019-01-26 19:28:44 +08:00
inline void setGraphColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > graphColor ! = __value ) {
this - > graphColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property graphColor ( \copybrief graphColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter graphColor is : < BLOCKQUOTE > \ copydoc graphColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see graphColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getGraphColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > graphColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property graphWidth ( \copybrief graphWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter graphWidth is : < BLOCKQUOTE > \ copydoc graphWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see graphWidth for more information */
2019-01-26 19:28:44 +08:00
inline void setGraphWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > graphWidth ! = __value ) {
this - > graphWidth = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property graphWidth ( \copybrief graphWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter graphWidth is : < BLOCKQUOTE > \ copydoc graphWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see graphWidth for more information */
2019-01-26 19:28:44 +08:00
inline double getGraphWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > graphWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property backgroundColor ( \copybrief backgroundColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter backgroundColor is : < BLOCKQUOTE > \ copydoc backgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see backgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > backgroundColor ! = __value ) {
this - > backgroundColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property backgroundColor ( \copybrief backgroundColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter backgroundColor is : < BLOCKQUOTE > \ copydoc backgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see backgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getBackgroundColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > backgroundColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property exportBackgroundColor ( \copybrief exportBackgroundColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter exportBackgroundColor is : < BLOCKQUOTE > \ copydoc exportBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see exportBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setExportBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > exportBackgroundColor ! = __value ) {
this - > exportBackgroundColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property exportBackgroundColor ( \copybrief exportBackgroundColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter exportBackgroundColor is : < BLOCKQUOTE > \ copydoc exportBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see exportBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getExportBackgroundColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > exportBackgroundColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property plotBackgroundColor ( \copybrief plotBackgroundColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotBackgroundColor is : < BLOCKQUOTE > \ copydoc plotBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setPlotBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > plotBackgroundColor ! = __value ) {
this - > plotBackgroundColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotBackgroundColor ( \copybrief plotBackgroundColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotBackgroundColor is : < BLOCKQUOTE > \ copydoc plotBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getPlotBackgroundColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > plotBackgroundColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyFont ( \copybrief keyFont ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFont is : < BLOCKQUOTE > \ copydoc keyFont < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFont for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyFont ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyFont ! = __value ) {
this - > keyFont = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyFont ( \copybrief keyFont ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFont is : < BLOCKQUOTE > \ copydoc keyFont < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFont for more information */
2019-01-26 19:28:44 +08:00
inline QString getKeyFont ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyFont ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyFontSize ( \copybrief keyFontSize ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFontSize is : < BLOCKQUOTE > \ copydoc keyFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFontSize for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyFontSize ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyFontSize ! = __value ) {
this - > keyFontSize = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyFontSize ( \copybrief keyFontSize ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFontSize is : < BLOCKQUOTE > \ copydoc keyFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFontSize for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyFontSize ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyFontSize ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property key_item_width ( \copybrief key_item_width ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_item_width is : < BLOCKQUOTE > \ copydoc key_item_width < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_item_width for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyItemWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > key_item_width ! = __value ) {
this - > key_item_width = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property key_item_width ( \copybrief key_item_width ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_item_width is : < BLOCKQUOTE > \ copydoc key_item_width < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_item_width for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyItemWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > key_item_width ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property key_item_height ( \copybrief key_item_height ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_item_height is : < BLOCKQUOTE > \ copydoc key_item_height < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_item_height for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyItemHeight ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > key_item_height ! = __value ) {
this - > key_item_height = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property key_item_height ( \copybrief key_item_height ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_item_height is : < BLOCKQUOTE > \ copydoc key_item_height < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_item_height for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyItemHeight ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > key_item_height ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyYSeparation ( \copybrief keyYSeparation ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYSeparation is : < BLOCKQUOTE > \ copydoc keyYSeparation < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYSeparation for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyYSeparation ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyYSeparation ! = __value ) {
this - > keyYSeparation = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyYSeparation ( \copybrief keyYSeparation ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYSeparation is : < BLOCKQUOTE > \ copydoc keyYSeparation < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYSeparation for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyYSeparation ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyYSeparation ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property key_line_length ( \copybrief key_line_length ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_line_length is : < BLOCKQUOTE > \ copydoc key_line_length < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_line_length for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyLineLength ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > key_line_length ! = __value ) {
this - > key_line_length = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property key_line_length ( \copybrief key_line_length ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter key_line_length is : < BLOCKQUOTE > \ copydoc key_line_length < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see key_line_length for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyLineLength ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > key_line_length ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyXMargin ( \copybrief keyXMargin ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXMargin is : < BLOCKQUOTE > \ copydoc keyXMargin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXMargin for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyXMargin ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyXMargin ! = __value ) {
this - > keyXMargin = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyXMargin ( \copybrief keyXMargin ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXMargin is : < BLOCKQUOTE > \ copydoc keyXMargin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXMargin for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyXMargin ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyXMargin ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyYMargin ( \copybrief keyYMargin ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYMargin is : < BLOCKQUOTE > \ copydoc keyYMargin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYMargin for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyYMargin ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyYMargin ! = __value ) {
this - > keyYMargin = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyYMargin ( \copybrief keyYMargin ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYMargin is : < BLOCKQUOTE > \ copydoc keyYMargin < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYMargin for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyYMargin ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyYMargin ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyXSeparation ( \copybrief keyXSeparation ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXSeparation is : < BLOCKQUOTE > \ copydoc keyXSeparation < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXSeparation for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyXSeparation ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyXSeparation ! = __value ) {
this - > keyXSeparation = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyXSeparation ( \copybrief keyXSeparation ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXSeparation is : < BLOCKQUOTE > \ copydoc keyXSeparation < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXSeparation for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyXSeparation ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyXSeparation ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyXOffset ( \copybrief keyXOffset ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXOffset is : < BLOCKQUOTE > \ copydoc keyXOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXOffset for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyXOffset ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyXOffset ! = __value ) {
this - > keyXOffset = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyXOffset ( \copybrief keyXOffset ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyXOffset is : < BLOCKQUOTE > \ copydoc keyXOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyXOffset for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyXOffset ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyXOffset ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyYOffset ( \copybrief keyYOffset ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYOffset is : < BLOCKQUOTE > \ copydoc keyYOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYOffset for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyYOffset ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyYOffset ! = __value ) {
this - > keyYOffset = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyYOffset ( \copybrief keyYOffset ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyYOffset is : < BLOCKQUOTE > \ copydoc keyYOffset < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyYOffset for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyYOffset ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyYOffset ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property showKey ( \copybrief showKey ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showKey is : < BLOCKQUOTE > \ copydoc showKey < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showKey for more information */
2019-01-26 19:28:44 +08:00
inline void setShowKey ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > showKey ! = __value ) {
this - > showKey = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property showKey ( \copybrief showKey ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showKey is : < BLOCKQUOTE > \ copydoc showKey < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showKey for more information */
2019-01-26 19:28:44 +08:00
inline bool getShowKey ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > showKey ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property showKeyFrame ( \copybrief showKeyFrame ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showKeyFrame is : < BLOCKQUOTE > \ copydoc showKeyFrame < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showKeyFrame for more information */
2019-01-26 19:28:44 +08:00
inline void setShowKeyFrame ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > showKeyFrame ! = __value ) {
this - > showKeyFrame = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property showKeyFrame ( \copybrief showKeyFrame ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter showKeyFrame is : < BLOCKQUOTE > \ copydoc showKeyFrame < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see showKeyFrame for more information */
2019-01-26 19:28:44 +08:00
inline bool getShowKeyFrame ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > showKeyFrame ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyFrameColor ( \copybrief keyFrameColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFrameColor is : < BLOCKQUOTE > \ copydoc keyFrameColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFrameColor for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyFrameColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyFrameColor ! = __value ) {
this - > keyFrameColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyFrameColor ( \copybrief keyFrameColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFrameColor is : < BLOCKQUOTE > \ copydoc keyFrameColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFrameColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getKeyFrameColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyFrameColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyBackgroundColor ( \copybrief keyBackgroundColor ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyBackgroundColor is : < BLOCKQUOTE > \ copydoc keyBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyBackgroundColor ! = __value ) {
this - > keyBackgroundColor = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyBackgroundColor ( \copybrief keyBackgroundColor ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyBackgroundColor is : < BLOCKQUOTE > \ copydoc keyBackgroundColor < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline QColor getKeyBackgroundColor ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyBackgroundColor ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyFrameWidth ( \copybrief keyFrameWidth ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFrameWidth is : < BLOCKQUOTE > \ copydoc keyFrameWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFrameWidth for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyFrameWidth ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyFrameWidth ! = __value ) {
this - > keyFrameWidth = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyFrameWidth ( \copybrief keyFrameWidth ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyFrameWidth is : < BLOCKQUOTE > \ copydoc keyFrameWidth < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyFrameWidth for more information */
2019-01-26 19:28:44 +08:00
inline double getKeyFrameWidth ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyFrameWidth ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyAutosize ( \copybrief keyAutosize ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyAutosize is : < BLOCKQUOTE > \ copydoc keyAutosize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyAutosize for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyAutosize ( bool __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyAutosize ! = __value ) {
this - > keyAutosize = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyAutosize ( \copybrief keyAutosize ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyAutosize is : < BLOCKQUOTE > \ copydoc keyAutosize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyAutosize for more information */
2019-01-26 19:28:44 +08:00
inline bool getKeyAutosize ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyAutosize ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyPosition ( \copybrief keyPosition ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyPosition is : < BLOCKQUOTE > \ copydoc keyPosition < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyPosition for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyPosition ( const JKQTPKeyPosition & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyPosition ! = __value ) {
this - > keyPosition = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyPosition ( \copybrief keyPosition ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyPosition is : < BLOCKQUOTE > \ copydoc keyPosition < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyPosition for more information */
2019-01-26 19:28:44 +08:00
inline JKQTPKeyPosition getKeyPosition ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyPosition ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property keyLayout ( \copybrief keyLayout ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyLayout is : < BLOCKQUOTE > \ copydoc keyLayout < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyLayout for more information */
2019-01-26 19:28:44 +08:00
inline void setKeyLayout ( const JKQTPKeyLayout & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > keyLayout ! = __value ) {
this - > keyLayout = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property keyLayout ( \copybrief keyLayout ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter keyLayout is : < BLOCKQUOTE > \ copydoc keyLayout < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see keyLayout for more information */
2019-01-26 19:28:44 +08:00
inline JKQTPKeyLayout getKeyLayout ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > keyLayout ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property plotLabelFontSize ( \copybrief plotLabelFontSize ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabelFontSize is : < BLOCKQUOTE > \ copydoc plotLabelFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabelFontSize for more information */
2019-01-26 19:28:44 +08:00
inline void setPlotLabelFontSize ( double __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > plotLabelFontSize ! = __value ) {
this - > plotLabelFontSize = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotLabelFontSize ( \copybrief plotLabelFontSize ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabelFontSize is : < BLOCKQUOTE > \ copydoc plotLabelFontSize < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabelFontSize for more information */
2019-01-26 19:28:44 +08:00
inline double getPlotLabelFontSize ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > plotLabelFontSize ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property plotLabelFontname ( \copybrief plotLabelFontname ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabelFontname is : < BLOCKQUOTE > \ copydoc plotLabelFontname < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabelFontname for more information */
2019-01-26 19:28:44 +08:00
inline void setPlotLabelFontname ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > plotLabelFontname ! = __value ) {
this - > plotLabelFontname = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotLabelFontname ( \copybrief plotLabelFontname ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabelFontname is : < BLOCKQUOTE > \ copydoc plotLabelFontname < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabelFontname for more information */
2019-01-26 19:28:44 +08:00
inline QString getPlotLabelFontname ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > plotLabelFontname ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property plotLabel ( \copybrief plotLabel ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabel is : < BLOCKQUOTE > \ copydoc plotLabel < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabel for more information */
2019-01-26 19:28:44 +08:00
inline void setPlotLabel ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
if ( this - > plotLabel ! = __value ) {
this - > plotLabel = __value ;
2019-01-26 19:28:44 +08:00
redrawPlot ( ) ;
2019-01-10 04:23:24 +08:00
}
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotLabel ( \copybrief plotLabel ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter plotLabel is : < BLOCKQUOTE > \ copydoc plotLabel < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see plotLabel for more information */
2019-01-26 19:28:44 +08:00
inline QString getPlotLabel ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > plotLabel ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property gridPrinting ( \copybrief gridPrinting ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrinting is : < BLOCKQUOTE > \ copydoc gridPrinting < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrinting for more information */
2019-01-29 05:14:27 +08:00
void setGridPrinting ( bool __value ) ;
2019-01-26 20:00:40 +08:00
/*! \brief returns the property gridPrinting ( \copybrief gridPrinting ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrinting is : < BLOCKQUOTE > \ copydoc gridPrinting < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrinting for more information */
2019-01-29 05:14:27 +08:00
bool getGridPrinting ( ) const ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property gridPrintingCurrentX ( \copybrief gridPrintingCurrentX ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrintingCurrentX is : < BLOCKQUOTE > \ copydoc gridPrintingCurrentX < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrintingCurrentX for more information */
2019-01-29 05:14:27 +08:00
void setGridPrintingCurrentX ( size_t __value ) ;
2019-01-26 20:00:40 +08:00
/*! \brief returns the property gridPrintingCurrentX ( \copybrief gridPrintingCurrentX ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrintingCurrentX is : < BLOCKQUOTE > \ copydoc gridPrintingCurrentX < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrintingCurrentX for more information */
2019-01-29 05:14:27 +08:00
size_t getGridPrintingCurrentX ( ) const ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property gridPrintingCurrentY ( \copybrief gridPrintingCurrentY ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrintingCurrentY is : < BLOCKQUOTE > \ copydoc gridPrintingCurrentY < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrintingCurrentY for more information */
2019-01-29 05:14:27 +08:00
void setGridPrintingCurrentY ( size_t __value ) ;
2019-01-26 20:00:40 +08:00
/*! \brief returns the property gridPrintingCurrentY ( \copybrief gridPrintingCurrentY ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter gridPrintingCurrentY is : < BLOCKQUOTE > \ copydoc gridPrintingCurrentY < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see gridPrintingCurrentY for more information */
2019-01-29 05:14:27 +08:00
size_t getGridPrintingCurrentY ( ) const ;
/** \brief set the x- and y-positions of this JKQTPlotter in the grid-printing grid
*
* \ see setGridPrinting ( ) , addGridPrintingPlotter ( ) , clearGridPrintingPlotters ( ) , setGridPrintingCurrentX ( ) , setGridPrintingCurrentY ( ) \ ref JKQTPBASELOTTER_SYNCMULTIPLOT
*/
void setGridPrintingCurrentPos ( size_t x , size_t y ) ;
2019-01-26 20:00:40 +08:00
/*! \brief sets the property currentSaveDirectory ( \copybrief currentSaveDirectory ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter currentSaveDirectory is : < BLOCKQUOTE > \ copydoc currentSaveDirectory < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see currentSaveDirectory for more information */
2019-01-26 19:28:44 +08:00
inline void setCurrentSaveDirectory ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > currentSaveDirectory = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property currentSaveDirectory ( \copybrief currentSaveDirectory ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter currentSaveDirectory is : < BLOCKQUOTE > \ copydoc currentSaveDirectory < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see currentSaveDirectory for more information */
2019-01-26 19:28:44 +08:00
inline QString getCurrentSaveDirectory ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > currentSaveDirectory ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property currentFileFormat ( \copybrief currentFileFormat ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter currentFileFormat is : < BLOCKQUOTE > \ copydoc currentFileFormat < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see currentFileFormat for more information */
2019-01-26 19:28:44 +08:00
inline void setCurrentFileFormat ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > currentFileFormat = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property currentFileFormat ( \copybrief currentFileFormat ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter currentFileFormat is : < BLOCKQUOTE > \ copydoc currentFileFormat < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see currentFileFormat for more information */
2019-01-26 19:28:44 +08:00
inline QString getCurrentFileFormat ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > currentFileFormat ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property CSVdecimalSeparator ( \copybrief CSVdecimalSeparator ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter CSVdecimalSeparator is : < BLOCKQUOTE > \ copydoc CSVdecimalSeparator < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see CSVdecimalSeparator for more information */
2019-01-26 19:28:44 +08:00
inline void setCSVdecimalSeparator ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > CSVdecimalSeparator = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property CSVdecimalSeparator ( \copybrief CSVdecimalSeparator ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter CSVdecimalSeparator is : < BLOCKQUOTE > \ copydoc CSVdecimalSeparator < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see CSVdecimalSeparator for more information */
2019-01-26 19:28:44 +08:00
inline QString getCSVdecimalSeparator ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > CSVdecimalSeparator ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property CSVcommentInitializer ( \copybrief CSVcommentInitializer ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter CSVcommentInitializer is : < BLOCKQUOTE > \ copydoc CSVcommentInitializer < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see CSVcommentInitializer for more information */
2019-01-26 19:28:44 +08:00
inline void setCSVcommentInitializer ( const QString & __value )
2019-01-10 04:23:24 +08:00
{
this - > CSVcommentInitializer = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property CSVcommentInitializer ( \copybrief CSVcommentInitializer ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter CSVcommentInitializer is : < BLOCKQUOTE > \ copydoc CSVcommentInitializer < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see CSVcommentInitializer for more information */
2019-01-26 19:28:44 +08:00
inline QString getCSVcommentInitializer ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > CSVcommentInitializer ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property iplotBorderTop ( \copybrief iplotBorderTop ). \details Description of the parameter iplotBorderTop is: <BLOCKQUOTE>\copydoc iplotBorderTop </BLOCKQUOTE>. \see iplotBorderTop for more information */
2019-01-26 19:28:44 +08:00
inline double getInternalPlotBorderTop ( ) const { return this - > iplotBorderTop ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property iplotBorderLeft ( \copybrief iplotBorderLeft ). \details Description of the parameter iplotBorderLeft is: <BLOCKQUOTE>\copydoc iplotBorderLeft </BLOCKQUOTE>. \see iplotBorderLeft for more information */
2019-01-26 19:28:44 +08:00
inline double getInternalPlotBorderLeft ( ) const { return this - > iplotBorderLeft ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property iplotBorderBottom ( \copybrief iplotBorderBottom ). \details Description of the parameter iplotBorderBottom is: <BLOCKQUOTE>\copydoc iplotBorderBottom </BLOCKQUOTE>. \see iplotBorderBottom for more information */
2019-01-26 19:28:44 +08:00
inline double getInternalPlotBorderBottom ( ) const { return this - > iplotBorderBottom ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property iplotBorderRight ( \copybrief iplotBorderRight ). \details Description of the parameter iplotBorderRight is: <BLOCKQUOTE>\copydoc iplotBorderRight </BLOCKQUOTE>. \see iplotBorderRight for more information */
2019-01-26 19:28:44 +08:00
inline double getInternalPlotBorderRight ( ) const { return this - > iplotBorderRight ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotWidth ( \copybrief plotWidth ). \details Description of the parameter plotWidth is: <BLOCKQUOTE>\copydoc plotWidth </BLOCKQUOTE>. \see plotWidth for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotWidth ( ) const { return this - > plotWidth ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property plotHeight ( \copybrief plotHeight ). \details Description of the parameter plotHeight is: <BLOCKQUOTE>\copydoc plotHeight </BLOCKQUOTE>. \see plotHeight for more information */
2019-01-26 03:16:04 +08:00
inline int getPlotHeight ( ) const { return this - > plotHeight ; }
2019-01-20 17:49:29 +08:00
/** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */
2019-01-26 03:16:04 +08:00
inline JKQTMathText * getMathText ( ) { return & mathText ; }
2019-01-20 17:49:29 +08:00
/** \brief returns the internal JKQTMathText, used to render text with LaTeX markup */
2019-01-26 03:16:04 +08:00
inline const JKQTMathText * getMathText ( ) const { return & mathText ; }
2019-01-13 01:53:16 +08:00
/** \brief returns the x-axis objet of the plot */
2019-01-26 03:16:04 +08:00
inline JKQTPHorizontalAxis * getXAxis ( ) { return xAxis ; }
2019-01-13 01:53:16 +08:00
/** \brief returns the y-axis objet of the plot */
2019-01-26 03:16:04 +08:00
inline JKQTPVerticalAxis * getYAxis ( ) { return yAxis ; }
2019-01-13 01:53:16 +08:00
/** \brief returns the x-axis objet of the plot */
2019-01-26 03:16:04 +08:00
inline const JKQTPHorizontalAxis * getXAxis ( ) const { return xAxis ; }
2019-01-13 01:53:16 +08:00
/** \brief returns the y-axis objet of the plot */
2019-01-26 03:16:04 +08:00
inline const JKQTPVerticalAxis * getYAxis ( ) const { return yAxis ; }
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSavePlot ( \copybrief actSavePlot ). \details Description of the parameter actSavePlot is: <BLOCKQUOTE>\copydoc actSavePlot </BLOCKQUOTE>. \see actSavePlot for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSavePlot ( ) const { return this - > actSavePlot ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSaveData ( \copybrief actSaveData ). \details Description of the parameter actSaveData is: <BLOCKQUOTE>\copydoc actSaveData </BLOCKQUOTE>. \see actSaveData for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSaveData ( ) const { return this - > actSaveData ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actCopyData ( \copybrief actCopyData ). \details Description of the parameter actCopyData is: <BLOCKQUOTE>\copydoc actCopyData </BLOCKQUOTE>. \see actCopyData for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionCopyData ( ) const { return this - > actCopyData ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actCopyPixelImage ( \copybrief actCopyPixelImage ). \details Description of the parameter actCopyPixelImage is: <BLOCKQUOTE>\copydoc actCopyPixelImage </BLOCKQUOTE>. \see actCopyPixelImage for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionCopyPixelImage ( ) const { return this - > actCopyPixelImage ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actCopyMatlab ( \copybrief actCopyMatlab ). \details Description of the parameter actCopyMatlab is: <BLOCKQUOTE>\copydoc actCopyMatlab </BLOCKQUOTE>. \see actCopyMatlab for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionCopyMatlab ( ) const { return this - > actCopyMatlab ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSavePDF ( \copybrief actSavePDF ). \details Description of the parameter actSavePDF is: <BLOCKQUOTE>\copydoc actSavePDF </BLOCKQUOTE>. \see actSavePDF for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSavePDF ( ) const { return this - > actSavePDF ; }
2015-07-11 18:56:02 +08:00
# if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSavePS ( \copybrief actSavePS ). \details Description of the parameter actSavePS is: <BLOCKQUOTE>\copydoc actSavePS </BLOCKQUOTE>. \see actSavePS for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSavePS ( ) const { return this - > actSavePS ; }
2015-07-11 18:56:02 +08:00
# endif
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSavePix ( \copybrief actSavePix ). \details Description of the parameter actSavePix is: <BLOCKQUOTE>\copydoc actSavePix </BLOCKQUOTE>. \see actSavePix for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSavePix ( ) const { return this - > actSavePix ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSaveSVG ( \copybrief actSaveSVG ). \details Description of the parameter actSaveSVG is: <BLOCKQUOTE>\copydoc actSaveSVG </BLOCKQUOTE>. \see actSaveSVG for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSaveSVG ( ) const { return this - > actSaveSVG ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actPrint ( \copybrief actPrint ). \details Description of the parameter actPrint is: <BLOCKQUOTE>\copydoc actPrint </BLOCKQUOTE>. \see actPrint for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionPrint ( ) const { return this - > actPrint ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actSaveCSV ( \copybrief actSaveCSV ). \details Description of the parameter actSaveCSV is: <BLOCKQUOTE>\copydoc actSaveCSV </BLOCKQUOTE>. \see actSaveCSV for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionSaveCSV ( ) const { return this - > actSaveCSV ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actZoomAll ( \copybrief actZoomAll ). \details Description of the parameter actZoomAll is: <BLOCKQUOTE>\copydoc actZoomAll </BLOCKQUOTE>. \see actZoomAll for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionZoomAll ( ) const { return this - > actZoomAll ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actZoomIn ( \copybrief actZoomIn ). \details Description of the parameter actZoomIn is: <BLOCKQUOTE>\copydoc actZoomIn </BLOCKQUOTE>. \see actZoomIn for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionZoomIn ( ) const { return this - > actZoomIn ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actZoomOut ( \copybrief actZoomOut ). \details Description of the parameter actZoomOut is: <BLOCKQUOTE>\copydoc actZoomOut </BLOCKQUOTE>. \see actZoomOut for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionZoomOut ( ) const { return this - > actZoomOut ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property actShowPlotData ( \copybrief actShowPlotData ). \details Description of the parameter actShowPlotData is: <BLOCKQUOTE>\copydoc actShowPlotData </BLOCKQUOTE>. \see actShowPlotData for more information */
2019-01-26 03:16:04 +08:00
inline QAction * getActionShowPlotData ( ) const { return this - > actShowPlotData ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property lstAdditionalPlotterActions ( \copybrief lstAdditionalPlotterActions ). \details Description of the parameter lstAdditionalPlotterActions is: <BLOCKQUOTE>\copydoc lstAdditionalPlotterActions </BLOCKQUOTE>. \see lstAdditionalPlotterActions for more information */
2019-01-26 03:16:04 +08:00
inline AdditionalActionsMap getLstAdditionalPlotterActions ( ) const { return this - > lstAdditionalPlotterActions ; }
2015-07-11 18:56:02 +08:00
/** \brief this function registers additional actions to lstAdditionalPlotterActions, which are displayed in the context-menu */
void registerAdditionalAction ( const QString & key , QAction * act ) ;
void deregisterAdditionalAction ( QAction * act ) ;
2019-01-26 20:00:40 +08:00
/*! \brief returns the property masterSynchronizeWidth ( \copybrief masterSynchronizeWidth ). \details Description of the parameter masterSynchronizeWidth is: <BLOCKQUOTE>\copydoc masterSynchronizeWidth </BLOCKQUOTE>. \see masterSynchronizeWidth for more information */
2019-01-26 03:16:04 +08:00
inline bool getMasterSynchronizeWidth ( ) const { return this - > masterSynchronizeWidth ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property masterSynchronizeHeight ( \copybrief masterSynchronizeHeight ). \details Description of the parameter masterSynchronizeHeight is: <BLOCKQUOTE>\copydoc masterSynchronizeHeight </BLOCKQUOTE>. \see masterSynchronizeHeight for more information */
2019-01-26 03:16:04 +08:00
inline bool getMasterSynchronizeHeight ( ) const { return this - > masterSynchronizeHeight ; }
2019-01-26 20:00:40 +08:00
/*! \brief sets the property default_backgroundColor ( \copybrief default_backgroundColor ) to the specified \a __value.
\ details Description of the parameter default_backgroundColor is : < BLOCKQUOTE > \ copydoc default_backgroundColor < / BLOCKQUOTE >
\ see default_backgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setDefaultBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
2019-01-26 20:00:40 +08:00
this - > default_backgroundColor = __value ;
2019-01-10 04:23:24 +08:00
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property default_plotBackgroundColor ( \copybrief default_plotBackgroundColor ) to the specified \a __value.
\ details Description of the parameter default_plotBackgroundColor is : < BLOCKQUOTE > \ copydoc default_plotBackgroundColor < / BLOCKQUOTE >
\ see default_plotBackgroundColor for more information */
2019-01-26 19:28:44 +08:00
inline void setDefaultPlotBackgroundColor ( const QColor & __value )
2019-01-10 04:23:24 +08:00
{
2019-01-26 20:00:40 +08:00
this - > default_plotBackgroundColor = __value ;
2019-01-10 04:23:24 +08:00
}
2015-07-11 18:56:02 +08:00
2019-01-26 20:00:40 +08:00
/*! \brief sets the property fontSizePrintMultiplier ( \copybrief fontSizePrintMultiplier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter fontSizePrintMultiplier is : < BLOCKQUOTE > \ copydoc fontSizePrintMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see fontSizePrintMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline void setFontSizePrintMultiplier ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > fontSizePrintMultiplier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property fontSizePrintMultiplier ( \copybrief fontSizePrintMultiplier ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter fontSizePrintMultiplier is : < BLOCKQUOTE > \ copydoc fontSizePrintMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see fontSizePrintMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline double getFontSizePrintMultiplier ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > fontSizePrintMultiplier ;
}
2019-01-26 20:00:40 +08:00
/*! \brief sets the property lineWidthPrintMultiplier ( \copybrief lineWidthPrintMultiplier ) to the specified \a __value.
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineWidthPrintMultiplier is : < BLOCKQUOTE > \ copydoc lineWidthPrintMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineWidthPrintMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline void setLineWidthPrintMultiplier ( double __value )
2019-01-10 04:23:24 +08:00
{
this - > lineWidthPrintMultiplier = __value ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property lineWidthPrintMultiplier ( \copybrief lineWidthPrintMultiplier ).
2019-01-25 05:49:10 +08:00
\ details Description of the parameter lineWidthPrintMultiplier is : < BLOCKQUOTE > \ copydoc lineWidthPrintMultiplier < / BLOCKQUOTE >
2019-01-10 04:23:24 +08:00
\ see lineWidthPrintMultiplier for more information */
2019-01-26 19:28:44 +08:00
inline double getLineWidthPrintMultiplier ( ) const
2019-01-10 04:23:24 +08:00
{
return this - > lineWidthPrintMultiplier ;
}
2019-01-26 20:00:40 +08:00
/*! \brief returns the property fontSizeMultiplier ( \copybrief fontSizeMultiplier ). \details Description of the parameter fontSizeMultiplier is: <BLOCKQUOTE>\copydoc fontSizeMultiplier </BLOCKQUOTE>. \see fontSizeMultiplier for more information */
2019-01-26 03:16:04 +08:00
inline double getFontSizeMultiplier ( ) const { return this - > fontSizeMultiplier ; }
2019-01-26 20:00:40 +08:00
/*! \brief returns the property lineWidthMultiplier ( \copybrief lineWidthMultiplier ). \details Description of the parameter lineWidthMultiplier is: <BLOCKQUOTE>\copydoc lineWidthMultiplier </BLOCKQUOTE>. \see lineWidthMultiplier for more information */
2019-01-26 03:16:04 +08:00
inline double getLineWidthMultiplier ( ) const { return this - > lineWidthMultiplier ; }
2015-07-11 18:56:02 +08:00
/** \brief returns description of i'th graph */
2019-01-20 17:49:29 +08:00
JKQTPPlotElement * getGraph ( size_t i ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns the number of graphs */
size_t getGraphCount ( ) ;
/** \brief remove the i-th graph */
void deleteGraph ( size_t i , bool deletegraph = true ) ;
/** \brief remove the given graph, if it is contained */
2019-01-20 17:49:29 +08:00
void deleteGraph ( JKQTPPlotElement * gr , bool deletegraph = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief remove all plots
*
* \ param deleteGraphs if set \ c true ( default ) the graph objects will also be deleted
*/
void clearGraphs ( bool deleteGraphs = true ) ;
void setAllGraphsInvisible ( ) ;
void setAllGraphsVisible ( ) ;
2018-08-19 23:03:46 +08:00
void setGraphVisible ( int i , bool visible = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief 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 */
2019-01-20 17:49:29 +08:00
size_t addGraph ( JKQTPPlotElement * gr ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns \c true, if the given graph is in this plot */
2019-01-20 17:49:29 +08:00
bool containsGraph ( JKQTPPlotElement * gr ) const ;
2015-07-11 18:56:02 +08:00
/** \brief move the given graph to the top, or add it, if it is not yet contained */
2019-01-20 17:49:29 +08:00
size_t moveGraphTop ( JKQTPPlotElement * gr ) ;
2015-07-11 18:56:02 +08:00
/** \brief move the given graph to the top, or add it, if it is not yet contained */
2019-01-20 17:49:29 +08:00
size_t moveGraphBottom ( JKQTPPlotElement * gr ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new graphs from a QVector */
2019-01-20 17:49:29 +08:00
template < class TJKQTPGraphContainer >
inline void addGraphs ( const TJKQTPGraphContainer & gr ) {
2018-11-25 21:53:26 +08:00
for ( auto it = gr . begin ( ) ; it ! = gr . end ( ) ; + + it ) {
addGraph ( * it ) ;
}
}
2015-07-11 18:56:02 +08:00
/** \brief add a new graph, returns it's position in the graphs list.
*
* \ param xColumn the column which contains the x - values of the datapoints
* \ param yColumn the column which contains the y - values of the datapoints
* \ param title a title for this specific graph which can be displayed in the key
* \ param graphStyle the way how to plot the graph
*
2019-01-26 03:16:04 +08:00
* Both point to columns in the datastore explained in the JKQTBasePlotter class . The plotWidth , color , pen style . . .
* will be extracted from the automatic plot style creation mechanism implemented in JKQTBasePlotter : : getNextStyle ( ) .
2015-07-11 18:56:02 +08:00
* If you want to change them either use another overloaded version of addGraph ( ) , or use getGraph ( ) and setGraph ( ) :
* \ code
* size_t i = addGraph ( 0 , 1 , " graph1 " ) ;
2019-01-20 17:49:29 +08:00
* JKQTPPlotElement gr = getGraph ( i ) ;
2015-07-11 18:56:02 +08:00
* gr . color = QColor ( " red " ) ;
* setGraph ( i , gr ) ;
* \ endcode
*/
2019-01-26 19:28:44 +08:00
size_t addGraph ( size_t xColumn , size_t yColumn , const QString & title , JKQTPGraphPlotstyle graphStyle = JKQTPLines ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new graph, returns it's position in the graphs list.
*
* \ param xColumn the column which contains the x - values of the datapoints
* \ param yColumn the column which contains the y - values of the datapoints
* \ param title a title for this specific graph which can be displayed in the key
* \ param graphStyle the way how to plot the graph
* \ param symbol a symbol to use for the datapoints in some plot styles
* \ param color the color of the graph
* \ param width width ( in pixel ) of the graph
* \ param penstyle the drawing style ( solid , dashed . . . ) of the graph lines .
*
2019-01-26 03:16:04 +08:00
* Both point to columns in the datastore explained in the JKQTBasePlotter class .
2015-07-11 18:56:02 +08:00
* The symbolSize is set to 10 and no error information is expected .
*/
2019-01-26 19:28:44 +08:00
size_t addGraph ( size_t xColumn , size_t yColumn , const QString & title , JKQTPGraphPlotstyle graphStyle , QColor color , JKQTPGraphSymbols symbol = JKQTPCross , Qt : : PenStyle penstyle = Qt : : SolidLine , double width = 2 ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new graph with x-error information, returns it's position in the graphs list.
*
*
* \ param xColumn the column which contains the x - values of the datapoints
* \ param yColumn the column which contains the y - values of the datapoints
* \ param xErrorColumn the column which contains the x - value errors of the datapoints
* \ param title a title for this specific graph which can be displayed in the key
* \ param graphStyle the way how to plot the graph
* \ param errorStyle the drawing style ( bars , lines . . . ) of the errors .
*
2019-01-26 03:16:04 +08:00
* Both point to columns in the datastore explained in the JKQTBasePlotter class .
2015-07-11 18:56:02 +08:00
* The symbolSize is set to 10 and no error information is expected .
*/
2019-01-26 19:28:44 +08:00
size_t addGraphWithXError ( size_t xColumn , size_t yColumn , size_t xErrorColumn , const QString & title , JKQTPGraphPlotstyle graphStyle = JKQTPPoints , JKQTPErrorPlotstyle errorStyle = JKQTPErrorBars ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new graph with x-error information, returns it's position in the graphs list.
*
*
* \ param xColumn the column which contains the x - values of the datapoints
* \ param yColumn the column which contains the y - values of the datapoints
* \ param yErrorColumn the column which contains the y - value errors of the datapoints
* \ param title a title for this specific graph which can be displayed in the key
* \ param graphStyle the way how to plot the graph
* \ param errorStyle the drawing style ( bars , lines . . . ) of the errors .
*
2019-01-26 03:16:04 +08:00
* Both point to columns in the datastore explained in the JKQTBasePlotter class .
2015-07-11 18:56:02 +08:00
* The symbolSize is set to 10 and no error information is expected .
*/
2019-01-26 19:28:44 +08:00
size_t addGraphWithYError ( size_t xColumn , size_t yColumn , size_t yErrorColumn , const QString & title , JKQTPGraphPlotstyle graphStyle = JKQTPPoints , JKQTPErrorPlotstyle errorStyle = JKQTPErrorBars ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new graph with x-error information, returns it's position in the graphs list.
*
*
* \ param xColumn the column which contains the x - values of the datapoints
* \ param yColumn the column which contains the y - values of the datapoints
* \ param xErrorColumn the column which contains the x - value errors of the datapoints
* \ param yErrorColumn the column which contains the y - value errors of the datapoints
* \ param title a title for this specific graph which can be displayed in the key
* \ param graphStyle the way how to plot the graph
*
2019-01-26 03:16:04 +08:00
* Both point to columns in the datastore explained in the JKQTBasePlotter class .
2019-01-20 17:49:29 +08:00
* The symbolSize is set to 10 and no error information is expected . The errorStyle is set to JKQTPErrorBars
2015-07-11 18:56:02 +08:00
* for both directions .
*/
2019-01-26 19:28:44 +08:00
size_t addGraphWithXYError ( size_t xColumn , size_t yColumn , size_t xErrorColumn , size_t yErrorColumn , const QString & title , JKQTPGraphPlotstyle graphStyle = JKQTPPoints ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a boxplot graph to the plot
*
* \ param title title of the plot
* \ param posColumn column containing the positions
* \ param medianColumn column containing the median values
* \ param minColumn column containing the minimum values
* \ param maxColumn column containing the maximum values
* \ param percentile25Column column containing the 25 % percentiles
* \ param percentile75Column column containing the 75 % percentiles
* \ param meanColumn column containing the mean value ( this column is optional . If you don ' t want a mean symbol , set this to - 1
*/
size_t addHorizontalBoxplot ( QString title , int posColumn , int medianColumn , int minColumn , int maxColumn , int percentile25Column , int percentile75Column , int meanColumn = - 1 ) ;
/** \brief add a boxplot graph to the plot
*
* \ param title title of the plot
* \ param posColumn column containing the positions
* \ param medianColumn column containing the median values
* \ param minColumn column containing the minimum values
* \ param maxColumn column containing the maximum values
* \ param percentile25Column column containing the 25 % percentiles
* \ param percentile75Column column containing the 75 % percentiles
* \ param meanColumn column containing the mean value ( this column is optional . If you don ' t want a mean symbol , set this to - 1
*/
size_t addVerticalBoxplot ( QString title , int posColumn , int medianColumn , int minColumn , int maxColumn , int percentile25Column , int percentile75Column , int meanColumn = - 1 ) ;
/** \brief add one bargraph for each of the given set of \f$ f(x) \f$ -values which all use one column of x-values
*
* \ param xColumn column with the x - values , which are common to all bargraphs
* \ param yColumns columns for the y - values
* \ param titles titles of the plot
*
* Here is an example output :
* \ image html plot_bargraphhorplot . png
*/
void addHorizontalBargraph ( size_t xColumn , QVector < size_t > yColumns , QStringList titles ) ;
/** \brief add a bargraph for the given set of \f$ f(x) \f$ -values for one column of x-values
*
* \ param xColumns columns with the x - values
* \ param yColumn column for the y - values , which are common to all bargraphs
* \ param titles titles of the plot
*
* Here is an example output :
* \ image html plot_bargraphhorplot . png
*/
void addVerticalBargraph ( QVector < size_t > xColumns , size_t yColumn , QStringList titles ) ;
/** \brief get the maximum and minimum x-value over all graphs in the plot
* \ param [ out ] minx smallest x value
* \ param [ out ] maxx largest x value
* \ param [ out ] smallestGreaterZero smallest 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 !
*/
void getGraphsXMinMax ( double & minx , double & maxx , double & smallestGreaterZero ) ;
/** \brief get the maximum and minimum y-value over all graphs in the plot
* \ param [ out ] miny smallest y value
* \ param [ out ] maxy largest y value
* \ param [ out ] smallestGreaterZero smallest 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 !
*/
void getGraphsYMinMax ( double & miny , double & maxy , double & smallestGreaterZero ) ;
2019-02-03 21:04:48 +08:00
enum SynchronizationDirection {
sdXAxis ,
sdYAxis ,
sdXYAxes
} ;
2015-07-11 18:56:02 +08:00
2019-02-03 21:04:48 +08:00
/*! \brief synchronize the plot borders (and zooming) with a given plotter (master --> slave/this)
2015-07-11 18:56:02 +08:00
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
2019-02-03 21:04:48 +08:00
\ code plotter2 - > synchronizeToMaster ( plotter1 , sdXAxis , true ) \ endcode of the lower plotter \ c plotter2 .
2015-07-11 18:56:02 +08:00
Now whenever the size of plotter1 changes , also plotter2 is redrawn with the changed
borders .
\ param master the plotter widget to synchronize to
2019-02-03 21:04:48 +08:00
\ param synchronizeDirection direction in which to synchronize
\ param synchronizeAxisLength do you want the axis length to be synchronized ?
\ param synchronizeZoomingMasterToSlave if set , also zooming in the master leads to a modification of the linked axes in the slave
\ param synchronizeZoomingSlaveToMaster if set , also zooming in the slave leads to a modification of the linked axes in the master
\ see synchronizeXToMaster ( ) , synchronizeYToMaster ( ) , \ ref JKQTBASEPLOTTER_SYNCMULTIPLOT
*/
void synchronizeToMaster ( JKQTBasePlotter * master , SynchronizationDirection synchronizeDirection , bool synchronizeAxisLength = true , bool synchronizeZoomingMasterToSlave = true , bool synchronizeZoomingSlaveToMaster = true ) ;
/*! \brief synchronize the plot x-axis width (and x-zooming) with a given master plotter (master --> slave/this)
\ param master the plotter widget to synchronize to
\ param synchronizeAxisLength do you want the axis length to be synchronized ?
2018-12-14 05:29:30 +08:00
\ param synchronizeZoomingMasterToSlave if set , also zooming in the master leads to a modification of the linked axes in the slave
\ param synchronizeZoomingSlaveToMaster if set , also zooming in the slave leads to a modification of the linked axes in the master
2019-02-03 21:04:48 +08:00
\ note This is a short - cut to synchronizeToMaster ( ) with \ c synchronizeDirection = csXAxis
\ see synchronizeToMaster ( ) , synchronizeYToMaster ( ) , \ ref JKQTBASEPLOTTER_SYNCMULTIPLOT
*/
void synchronizeXToMaster ( JKQTBasePlotter * master , bool synchronizeAxisLength = true , bool synchronizeZoomingMasterToSlave = true , bool synchronizeZoomingSlaveToMaster = true ) ;
/*! \brief synchronize the plot y-axis height (and y-zooming) with a given master plotter (master --> slave/this)
\ param master the plotter widget to synchronize to
\ param synchronizeAxisLength do you want the axis length to be synchronized ?
\ param synchronizeZoomingMasterToSlave if set , also zooming in the master leads to a modification of the linked axes in the slave
\ param synchronizeZoomingSlaveToMaster if 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 \ c synchronizeDirection = csXAxis
\ see synchronizeToMaster ( ) , synchronizeXToMaster ( ) , \ ref JKQTBASEPLOTTER_SYNCMULTIPLOT
2015-07-11 18:56:02 +08:00
*/
2019-02-03 21:04:48 +08:00
void synchronizeYToMaster ( JKQTBasePlotter * master , bool synchronizeAxisLength = true , bool synchronizeZoomingMasterToSlave = true , bool synchronizeZoomingSlaveToMaster = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief switches any synchronization off, that has been created by synchronizeToMaster() */
2019-02-03 21:04:48 +08:00
void resetMasterSynchronization ( SynchronizationDirection synchronizeDirection = sdXYAxes ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns description of i'th overlay element */
2019-01-20 17:49:29 +08:00
JKQTPOverlayElement * getOverlayElement ( size_t i ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns the number of overlay elements */
size_t getOverlayElementCount ( ) ;
/** \brief remove the i-th overlay element */
void deleteOverlayElement ( size_t i , bool deletegraph = true ) ;
/** \brief remove the given overlay element, if it is contained */
2019-01-20 17:49:29 +08:00
void deleteOverlayElement ( JKQTPOverlayElement * gr , bool deletegraph = true ) ;
2015-07-11 18:56:02 +08:00
/** \brief remove all overlay elements
*
* \ param deleteGraphs if set \ c true ( default ) the overlay element objects will also be deleted
*/
void clearOverlayElement ( bool deleteGraphs = true ) ;
/** \brief 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 */
2019-01-20 17:49:29 +08:00
size_t addOverlayElement ( JKQTPOverlayElement * gr ) ;
2015-07-11 18:56:02 +08:00
/** \brief returns \c true, if the given overlay element is in this plot */
2019-01-20 17:49:29 +08:00
bool containsOverlayElement ( JKQTPOverlayElement * gr ) const ;
2015-07-11 18:56:02 +08:00
/** \brief move the given overlay element to the top, or add it, if it is not yet contained */
2019-01-20 17:49:29 +08:00
size_t moveOverlayElementTop ( JKQTPOverlayElement * gr ) ;
2015-07-11 18:56:02 +08:00
/** \brief add a new overlay elements from a QList */
2019-01-20 17:49:29 +08:00
void addOverlayElements ( const QList < JKQTPOverlayElement * > & gr ) ;
2015-07-11 18:56:02 +08:00
2018-11-18 18:59:30 +08:00
QVector < QLineF > getBoundingLinesX1Y1 ( QRectF * rect = nullptr ) const ;
2015-07-11 18:56:02 +08:00
signals :
/** \brief signal: emitted whenever the user selects a new x-y zoom range (by mouse) */
2019-01-20 17:49:29 +08:00
void zoomChangedLocally ( double newxmin , double newxmax , double newymin , double newymax , JKQTBasePlotter * sender ) ;
2015-07-11 18:56:02 +08:00
/** \brief emitted when the plot has to be updated */
void plotUpdated ( ) ;
/** \brief emitted when the overlay elements have to be updated */
void overlaysUpdated ( ) ;
/** \brief emitted when the plot scaling had to be recalculated */
void plotScalingRecalculated ( ) ;
/** \brief emitted before the plot scaling has been recalculated */
void beforePlotScalingRecalculate ( ) ;
public :
2019-01-20 17:49:29 +08:00
/** \brief set a global preset/default value for the userSettigsFilename and userSettigsPrefix properties of JKQTBasePlotter
2015-07-11 18:56:02 +08:00
*
2019-01-20 17:49:29 +08:00
* 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
2015-07-11 18:56:02 +08:00
* newly created plotters AFTER the function call !
*/
2019-01-26 19:28:44 +08:00
static void setDefaultJKQTBasePrinterUserSettings ( QString userSettigsFilename , const QString & userSettigsPrefix ) ;
2015-07-11 18:56:02 +08:00
2019-01-20 23:15:10 +08:00
/** \brief register a user-defined QPaintDevice (with factory JKQTPPaintDeviceAdapter) as a plugin to JKQTBasePlotter/JKQTPlotter,
2019-01-13 01:53:16 +08:00
* which will use it to export graphics */
2015-07-11 18:56:02 +08:00
static void registerPaintDeviceAdapter ( JKQTPPaintDeviceAdapter * adapter ) ;
2019-01-20 23:15:10 +08:00
/** \brief de-register a JKQTPPaintDeviceAdapter from JKQTBasePlotter/JKQTPlotter */
2015-07-11 18:56:02 +08:00
static void deregisterPaintDeviceAdapter ( JKQTPPaintDeviceAdapter * adapter ) ;
2019-01-26 03:16:04 +08:00
2015-07-11 18:56:02 +08:00
2019-01-20 23:15:10 +08:00
/** \brief register a JKQTPSaveDataAdapter with JKQTPlotter/JKQTBasePlotter that can be used to export data from the internal datastore into a file */
2015-07-11 18:56:02 +08:00
static bool registerSaveDataAdapter ( JKQTPSaveDataAdapter * adapter ) ;
2019-01-20 23:15:10 +08:00
/** \brief de-register a JKQTPSaveDataAdapter from JKQTPlotter/JKQTBasePlotter */
2015-07-11 18:56:02 +08:00
static bool deregisterSaveDataAdapter ( JKQTPSaveDataAdapter * adapter ) ;
2019-01-13 01:53:16 +08:00
/** \brief internal tool class for text sizes
2019-02-03 22:54:41 +08:00
* \ ingroup jkqtpplotterclasses_tools
2019-01-13 01:53:16 +08:00
* \ internal */
2019-02-03 21:04:48 +08:00
struct JKQTP_LIB_EXPORT textSizeData {
2015-07-11 18:56:02 +08:00
explicit textSizeData ( ) ;
double ascent , descent , width , strikeoutPos ;
} ;
2019-01-13 01:53:16 +08:00
/** \brief internal tool class for text-sizess in a plot key
2019-02-03 22:54:41 +08:00
* \ ingroup jkqtpplotterclasses_tools
2019-01-13 01:53:16 +08:00
* \ internal */
2019-02-03 21:04:48 +08:00
struct JKQTP_LIB_EXPORT textSizeKey {
2015-07-11 18:56:02 +08:00
explicit textSizeKey ( const QFont & f , const QString & text , QPaintDevice * pd ) ;
explicit textSizeKey ( const QString & fontName , double fontSize , const QString & text , QPaintDevice * pd ) ;
QString text ;
QFont f ;
int ldpiX , ldpiY , pdpiX , pdpiY ;
bool operator = = ( const textSizeKey & other ) const ;
} ;
textSizeData getTextSizeDetail ( const QFont & fm , const QString & text , QPainter & painter ) ;
textSizeData getTextSizeDetail ( const QString & fontName , double fontSize , const QString & text , QPainter & painter ) ;
void getTextSizeDetail ( const QString & fontName , double fontSize , const QString & text , QPainter & painter , double & width , double & ascent , double & descent , double & strikeoutPos ) ;
void getTextSizeDetail ( const QFont & fm , const QString & text , QPainter & painter , double & width , double & ascent , double & descent , double & strikeoutPos ) ;
QSizeF getTextSizeSize ( const QFont & fm , const QString & text , QPainter & painter ) ;
QSizeF getTextSizeSize ( const QString & fontName , double fontSize , const QString & text , QPainter & painter ) ;
protected :
2019-01-20 17:49:29 +08:00
static QHash < JKQTBasePlotter : : textSizeKey , JKQTBasePlotter : : textSizeData > tbrh ;
2015-07-11 18:56:02 +08:00
} ;
2019-02-03 22:54:41 +08:00
/** \brief qHash()-specialization
* \ ingroup jkqtpplotterclasses_tools
*/
2019-01-20 17:49:29 +08:00
inline uint qHash ( const JKQTBasePlotter : : textSizeKey & data ) {
2015-07-11 18:56:02 +08:00
return qHash ( data . f . family ( ) ) + qHash ( data . text ) ;
}
# endif // JKQTPBASEPLOTTER_H