diff --git a/lib/jkqtfastplotter/jkqtfastplotter.cpp b/lib/jkqtfastplotter/jkqtfastplotter.cpp index 32616a1f65..ff8257ebeb 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.cpp +++ b/lib/jkqtfastplotter/jkqtfastplotter.cpp @@ -29,12 +29,34 @@ #include #include + +/** + * \brief saves the given property (for which also a def_property exists) into the given settings object + * \ingroup jkqtfastplotter + * \internal + */ +#define JKQTFPPROPERTYsave(settings, group, var, varname) \ + if (var!=def_##var) settings.setValue(group+varname, var); +/** + * \brief loads the given property from the given settings object + * \ingroup jkqtfastplotter + * \internal + */ +#define JKQTFPPROPERTYload(settings, group, var, varname, varconvert) \ + var=settings.value(group+varname, var).varconvert; + + JKQTFPPlot::JKQTFPPlot(JKQTFastPlotter* parent): QObject(parent) { this->parent=parent; this->visible=true; +} + +JKQTFPPlot::~JKQTFPPlot() +{ + }; void JKQTFPPlot::replot() { @@ -61,8 +83,8 @@ JKQTFastPlotter::JKQTFastPlotter(QWidget *parent) : plotBorderTop=def_plotBorderTop=5; plotBorderBottom=def_plotBorderBottom=30; - synchronizeX=NULL; - synchronizeY=NULL; + synchronizeX=nullptr; + synchronizeY=nullptr; backgroundColor=def_backgroundColor=palette().color(QPalette::Window); plotBackgroundColor=def_plotBackgroundColor=QColor("white"); @@ -701,7 +723,7 @@ void JKQTFastPlotter::calcPlotScaling() { //////////////////////////////////////////////////////////////////// // PLOTTER SYNCHRONIZATION //////////////////////////////////////////////////////////////////// - if (synchronizeX!=NULL) { + if (synchronizeX!=nullptr) { internalPlotBorderLeft=synchronizeX->get_internalPlotBorderLeft(); internalPlotBorderRight=synchronizeX->get_internalPlotBorderRight(); xMin=synchronizeX->get_xMin(); @@ -709,7 +731,7 @@ void JKQTFastPlotter::calcPlotScaling() { xAxisLog=synchronizeX->get_xAxisLog(); xAxisLabel=synchronizeX->get_xAxisLabel(); } - if (synchronizeY!=NULL) { + if (synchronizeY!=nullptr) { internalPlotBorderTop=synchronizeY->get_internalPlotBorderTop(); internalPlotBorderBottom=synchronizeY->get_internalPlotBorderBottom(); yMin=synchronizeY->get_yMin(); @@ -820,10 +842,10 @@ JKQTFPLinePlot::JKQTFPLinePlot(JKQTFastPlotter* parent, unsigned int N, double* this->N=N; this->x=x; this->y=y; - this->yerr=NULL; - this->xv=NULL; - this->yv=NULL; - this->yerrv=NULL; + this->yerr=nullptr; + this->xv=nullptr; + this->yv=nullptr; + this->yerrv=nullptr; this->color=color; this->errorColor=color.lighter(); this->errorStyle=this->style=style; @@ -836,12 +858,12 @@ JKQTFPLinePlot::JKQTFPLinePlot(JKQTFastPlotter* parent, QVector* x, QVec JKQTFPPlot(parent) { this->N=x->size(); - this->x=NULL; - this->y=NULL; - this->yerr=NULL; + this->x=nullptr; + this->y=nullptr; + this->yerr=nullptr; this->xv=x; this->yv=y; - this->yerrv=NULL; + this->yerrv=nullptr; this->color=color; this->errorColor=color.lighter(); this->errorStyle=this->style=style; @@ -874,7 +896,7 @@ void JKQTFPLinePlot::drawGraph(QPainter& painter) { path.lineTo(parent->x2p(x[i]), parent->y2p(y[i])); //std::cout<<"-> ("<x2p(x[i])<<", "<y2p(y[i])<<")\n"; } - if (yerr!=NULL) { + if (yerr!=nullptr) { if (N>0){ epath.moveTo(parent->x2p(x[0]), parent->y2p(y[0]+yerr[0])); } @@ -897,7 +919,7 @@ void JKQTFPLinePlot::drawGraph(QPainter& painter) { //std::cout<<"-> ("<x2p(x[i])<<", "<y2p(y[i])<<")\n"; } } - if (yerrv!=NULL) { + if (yerrv!=nullptr) { if (yerrv->size()>1 && (xv->size()>=yerrv->size()) && (yv->size()>=yerrv->size())){ epath.moveTo(parent->x2p((*xv)[0]), parent->y2p((*yv)[0]+(*yerrv)[0])); //std::cout<<"plotting graph, starting @ ("<x2p(x[0])<<", "<y2p(y[0])<<")\n"; @@ -959,7 +981,7 @@ void JKQTFPVCrossPlot::drawGraph(QPainter& painter) { path.lineTo(QPointF(parent->x2p(x[i]), parent->y2p(y[i])+crossWidth/2.0)); //std::cout<<"-> ("<x2p(x[i])<<", "<y2p(y[i])<<")\n"; } - if (yerr!=NULL) { + if (yerr!=nullptr) { if (N>0){ epath.moveTo(parent->x2p(x[0]), parent->y2p(y[0]+yerr[0])); } @@ -983,7 +1005,7 @@ void JKQTFPVCrossPlot::drawGraph(QPainter& painter) { //std::cout<<"-> ("<x2p(x[i])<<", "<y2p(y[i])<<")\n"; } } - if (yerrv!=NULL) { + if (yerrv!=nullptr) { if (yerrv->size()>0 && (xv->size()>=yerrv->size()) && (yv->size()>=yerrv->size())){ epath.moveTo(parent->x2p((*xv)[0]), parent->y2p((*yv)[0]+(*yerrv)[0])); //std::cout<<"plotting graph, starting @ ("<x2p(x[0])<<", "<y2p(y[0])<<")\n"; @@ -1541,11 +1563,11 @@ JKQTFPRGBImageOverlayPlot::JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent, vo this->imageFormatRed=imageFormat; colorMinGreen=0; colorMaxGreen=0; - this->imageGreen=NULL; + this->imageGreen=nullptr; this->imageFormatGreen=JKQTFP_uint16; colorMinBlue=0; colorMaxBlue=0; - this->imageBlue=NULL; + this->imageBlue=nullptr; this->imageFormatBlue=JKQTFP_uint16; this->rotation=0; } @@ -1565,11 +1587,11 @@ JKQTFPRGBImageOverlayPlot::JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent, vo this->imageFormatRed=imageFormat; colorMinGreen=0; colorMaxGreen=0; - this->imageGreen=NULL; + this->imageGreen=nullptr; this->imageFormatGreen=JKQTFP_uint16; colorMinBlue=0; colorMaxBlue=0; - this->imageBlue=NULL; + this->imageBlue=nullptr; this->imageFormatBlue=JKQTFP_uint16; this->rotation=0; } @@ -1585,15 +1607,15 @@ JKQTFPRGBImageOverlayPlot::JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent): this->ymax=height-1; colorMinRed=0; colorMaxRed=0; - this->imageRed=NULL; + this->imageRed=nullptr; this->imageFormatRed=JKQTFP_uint16; colorMinGreen=0; colorMaxGreen=0; - this->imageGreen=NULL; + this->imageGreen=nullptr; this->imageFormatGreen=JKQTFP_uint16; colorMinBlue=0; colorMaxBlue=0; - this->imageBlue=NULL; + this->imageBlue=nullptr; this->imageFormatBlue=JKQTFP_uint16; this->rotation=0; } @@ -1650,8 +1672,8 @@ void JKQTFPRGBImageOverlayPlot::drawGraph(QPainter &painter) { void JKQTFPRGBImageOverlayPlot::set_image(void* imageRed, JKQTFPImageFormat imageFormatRed, unsigned int width, unsigned int height){ this->imageRed=imageRed; this->imageFormatRed=imageFormatRed; - this->imageGreen=NULL; - this->imageBlue=NULL; + this->imageGreen=nullptr; + this->imageBlue=nullptr; this->width=width; this->height=height; this->xmin=0; @@ -1666,7 +1688,7 @@ void JKQTFPRGBImageOverlayPlot::set_image(void* imageRed, JKQTFPImageFormat imag this->imageFormatRed=imageFormatRed; this->imageGreen=imageGreen; this->imageFormatGreen=imageFormatGreen; - this->imageBlue=NULL; + this->imageBlue=nullptr; this->width=width; this->height=height; this->xmin=0; @@ -1697,8 +1719,8 @@ void JKQTFPRGBImageOverlayPlot::set_image(void* imageRed, JKQTFPImageFormat imag void JKQTFPRGBImageOverlayPlot::set_image(void* imageRed, JKQTFPImageFormat imageFormatRed, unsigned int width, unsigned int height, double xmin, double xmax, double ymin, double ymax){ this->imageRed=imageRed; this->imageFormatRed=imageFormatRed; - this->imageRed=NULL; - this->imageBlue=NULL; + this->imageRed=nullptr; + this->imageBlue=nullptr; this->width=width; this->height=height; this->xmin=xmin; @@ -1713,7 +1735,7 @@ void JKQTFPRGBImageOverlayPlot::set_image(void* imageRed, JKQTFPImageFormat imag this->imageFormatRed=imageFormatRed; this->imageGreen=imageGreen; this->imageFormatGreen=imageFormatGreen; - this->imageBlue=NULL; + this->imageBlue=nullptr; this->width=width; this->height=height; this->xmin=xmin; diff --git a/lib/jkqtfastplotter/jkqtfastplotter.h b/lib/jkqtfastplotter/jkqtfastplotter.h index 2e6fa1678a..edfd6e62c7 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.h +++ b/lib/jkqtfastplotter/jkqtfastplotter.h @@ -65,28 +65,6 @@ class JKQTFPPlot; # define JKQTFASTPLOTTER_BASEWIDGET_CONSTRUCTOR(parent) QWidget(parent) #endif -/** - * \brief create a property variable and a default variable for it. Also creates a doxygen comment for the default variable - * \ingroup jkqtfastplotter - */ -#define JKQTFPPROPERTY(type,varname) \ - type varname; \ - /** \brief default value for property property varname. \see varname for more information */ \ - type def_##varname; - -/** - * \brief saves the given property (for which also a def_property exists) into the given settings object - * \ingroup jkqtfastplotter - */ -#define JKQTFPPROPERTYsave(settings, group, var, varname) \ - if (var!=def_##var) settings.setValue(group+varname, var); -/** - * \brief loads the given property from the given settings object - * \ingroup jkqtfastplotter - */ -#define JKQTFPPROPERTYload(settings, group, var, varname, varconvert) \ - var=settings.value(group+varname, var).varconvert; - @@ -151,13 +129,25 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { /** \brief free space between widget left border and plot left border */ - JKQTFPPROPERTY(int, plotBorderLeft); + int plotBorderLeft; + /*! \brief default value for property plotBorderLeft. + \see plotBorderLeft for more information */ + int def_plotBorderLeft; /** \brief free space between widget bottom border and plot bottom border */ - JKQTFPPROPERTY(int, plotBorderBottom); + int plotBorderBottom; + /*! \brief default value for property plotBorderBottom. + \see plotBorderBottom for more information */ + int def_plotBorderBottom; /** \brief free space between widget right border and plot left border */ - JKQTFPPROPERTY(int, plotBorderRight); + int plotBorderRight; + /*! \brief default value for property plotBorderRight. + \see plotBorderRight for more information */ + int def_plotBorderRight; /** \brief free space between widget top border and plot bottom border */ - JKQTFPPROPERTY(int, plotBorderTop); + int plotBorderTop; + /*! \brief default value for property plotBorderTop. + \see plotBorderTop for more information */ + int def_plotBorderTop; /** \brief internally calculated: free space between widget left border and plot left border * @@ -190,40 +180,85 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { int plotHeight; /** \brief color of the coordinate system */ - JKQTFPPROPERTY(QColor, systemColor); + QColor systemColor; + /*! \brief default value for property systemColor. + \see systemColor for more information */ + QColor def_systemColor; /** \brief width of the coordinate (in pixel) */ - JKQTFPPROPERTY(double, systemWidth); + double systemWidth; + /*! \brief default value for property systemWidth. + \see systemWidth for more information */ + double def_systemWidth; /** \brief color of the background*/ - JKQTFPPROPERTY(QColor, backgroundColor); + QColor backgroundColor; + /*! \brief default value for property backgroundColor. + \see backgroundColor for more information */ + QColor def_backgroundColor; /** \brief color of the plot's background * * \note the background is not drawn if this color is set to \c QColor(Qt::transparent) ! */ - JKQTFPPROPERTY(QColor, plotBackgroundColor); + QColor plotBackgroundColor; + /*! \brief default value for property plotBackgroundColor. + \see plotBackgroundColor for more information */ + QColor def_plotBackgroundColor; /** \brief indicates whether to draw a system box */ - JKQTFPPROPERTY(bool, drawSystemBox); + bool drawSystemBox; + /*! \brief default value for property drawSystemBox. + \see drawSystemBox for more information */ + bool def_drawSystemBox; /** \brief indicates whether to draw axes at x=0/y=0 */ - JKQTFPPROPERTY(bool, drawZeroAxes); + bool drawZeroAxes; + /*! \brief default value for property drawZeroAxes. + \see drawZeroAxes for more information */ + bool def_drawZeroAxes; /** \brief indicates whether to draw a grid */ - JKQTFPPROPERTY(bool, drawGrid); + bool drawGrid; + /*! \brief default value for property drawGrid. + \see drawGrid for more information */ + bool def_drawGrid; /** \brief color of the coordinate grid */ - JKQTFPPROPERTY(QColor, gridColor); + QColor gridColor; + /*! \brief default value for property gridColor. + \see gridColor for more information */ + QColor def_gridColor; /** \brief style of the coordinate grid */ - JKQTFPPROPERTY(Qt::PenStyle, gridStyle); + Qt::PenStyle gridStyle; + /*! \brief default value for property gridStyle. + \see gridStyle for more information */ + Qt::PenStyle def_gridStyle; /** \brief width of the coordinate grid (in pixel) */ - JKQTFPPROPERTY(double, gridWidth); + double gridWidth; + /*! \brief default value for property gridWidth. + \see gridWidth for more information */ + double def_gridWidth; /** \brief font size (in points) of the axis labels */ - JKQTFPPROPERTY(double, labelFontSize); + double labelFontSize; + /*! \brief default value for property labelFontSize. + \see labelFontSize for more information */ + double def_labelFontSize; /** \brief font name of the axis labels */ - JKQTFPPROPERTY(QString, labelFontName); + QString labelFontName; + /*! \brief default value for property labelFontName. + \see labelFontName for more information */ + QString def_labelFontName; /** \brief font size (in points) of the tick labels */ - JKQTFPPROPERTY(double, tickFontSize); + double tickFontSize; + /*! \brief default value for property tickFontSize. + \see tickFontSize for more information */ + double def_tickFontSize; /** \brief font name of the tick labels */ - JKQTFPPROPERTY(QString, tickFontName); + QString tickFontName; + /*! \brief default value for property tickFontName. + \see tickFontName for more information */ + QString def_tickFontName; /** \brief length of an axis tick (pixels) */ - JKQTFPPROPERTY(double, tickLength); + double tickLength; + /*! \brief default value for property tickLength. + \see tickLength for more information */ + double def_tickLength; /** \brief minimum value of x axis */ @@ -297,23 +332,23 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { QAction* actCopyImage; /** \brief this simply paints the stored image to the widget's surface */ - virtual void paintEvent(QPaintEvent *event); + virtual void paintEvent(QPaintEvent *event) override; /** \brief resizes the internal representation (image) of the graphs */ - virtual void resizeEvent(QResizeEvent *event); + virtual void resizeEvent(QResizeEvent *event) override; /** \brief event handler for a double click */ - virtual void mouseDoubleClickEvent ( QMouseEvent * event ); + virtual void mouseDoubleClickEvent ( QMouseEvent * event ) override; /** \brief event handler for a mouse move */ - virtual void mouseMoveEvent ( QMouseEvent * event ); + virtual void mouseMoveEvent ( QMouseEvent * event ) override; /** \brief event handler for a mouse button press */ - virtual void mousePressEvent ( QMouseEvent * event ); + virtual void mousePressEvent ( QMouseEvent * event ) override; /** \brief event handler for a mouse button is released */ - virtual void mouseReleaseEvent(QMouseEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event) override; /** \brief paint the coordinate system */ void plotSystem(QPainter& painter); @@ -337,7 +372,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { public: /** \brief class constructor */ - JKQTFastPlotter(QWidget *parent = 0); + JKQTFastPlotter(QWidget *parent = nullptr); /** \brief set the properties of the x axis */ void setXRange(double min, double max, bool logarithmic=false); @@ -379,7 +414,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { } else { return xOffset+x*xScale; } - }; + } /** \brief return x coordinate coordinate from x-pixel */ inline double p2x(long x) { @@ -388,7 +423,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { } else { return ((double)x-xOffset)/(xScale); } - }; + } /** \brief return y-pixel coordinate from y coordinate */ inline double y2p(double y) { @@ -398,7 +433,7 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { } else { return yOffset-y*yScale; } - }; + } /** \brief return y coordinate coordinate from y-pixel */ inline double p2y(long y) { @@ -407,59 +442,660 @@ class LIB_EXPORT JKQTFastPlotter : public JKQTFASTPLOTTER_BASEWIDGET { } else { return ((double)y-yOffset)/(-1.0*yScale); } - }; + } - JKQTPGET_SET_MACRO_I(QPen, dragShapePen, update()) - JKQTPGET_SET_MACRO_I(bool, dragLine, update()) + /*! \brief sets the property dragShapePen to the specified \a __value. + \details Description of the parameter dragShapePen is:
\copybrief dragShapePen.
+ \see dragShapePen for more information */ + inline virtual void set_dragShapePen(const QPen & __value) + { + if (this->dragShapePen != __value) { + this->dragShapePen = __value; + update(); + } + } + /*! \brief returns the property dragShapePen. + \details Description of the parameter dragShapePen is:
\copybrief dragShapePen.
+ \see dragShapePen for more information */ + inline virtual QPen get_dragShapePen() const + { + return this->dragShapePen; + } + /*! \brief sets the property dragLine to the specified \a __value. + \details Description of the parameter dragLine is:
\copybrief dragLine.
+ \see dragLine for more information */ + inline virtual void set_dragLine(bool __value) + { + if (this->dragLine != __value) { + this->dragLine = __value; + update(); + } + } + /*! \brief returns the property dragLine. + \details Description of the parameter dragLine is:
\copybrief dragLine.
+ \see dragLine for more information */ + inline virtual bool get_dragLine() const + { + return this->dragLine; + } - JKQTPGET_SET_MACRO_I(int, plotBorderLeft, update_plot()) - JKQTPGET_SET_MACRO_I(int, plotBorderBottom, update_plot()) - JKQTPGET_SET_MACRO_I(int, plotBorderRight, update_plot()) - JKQTPGET_SET_MACRO_I(int, plotBorderTop, update_plot()) - JKQTPGET_MACRO(int, plotWidth) - JKQTPGET_MACRO(int, plotHeight) - JKQTPGET_SET_MACRO(bool, doDrawing) - JKQTPGET_MACRO(int, internalPlotBorderLeft) - JKQTPGET_MACRO(int, internalPlotBorderBottom) - JKQTPGET_MACRO(int, internalPlotBorderRight) - JKQTPGET_MACRO(int, internalPlotBorderTop) - JKQTPGET_MACRO(double, xMin) - JKQTPGET_MACRO(double, xMax) - JKQTPGET_MACRO(double, yMin) - JKQTPGET_MACRO(double, yMax) - JKQTPGET_MACRO(bool, xAxisLog) - JKQTPGET_MACRO(bool, yAxisLog) + /*! \brief sets the property plotBorderLeft to the specified \a __value. + \details Description of the parameter plotBorderLeft is:
\copybrief plotBorderLeft.
+ \see plotBorderLeft for more information */ + inline virtual void set_plotBorderLeft(int __value) + { + if (this->plotBorderLeft != __value) { + this->plotBorderLeft = __value; + update_plot(); + } + } + /*! \brief returns the property plotBorderLeft. + \details Description of the parameter plotBorderLeft is:
\copybrief plotBorderLeft.
+ \see plotBorderLeft for more information */ + inline virtual int get_plotBorderLeft() const + { + return this->plotBorderLeft; + } + /*! \brief sets the property plotBorderBottom to the specified \a __value. + \details Description of the parameter plotBorderBottom is:
\copybrief plotBorderBottom.
+ \see plotBorderBottom for more information */ + inline virtual void set_plotBorderBottom(int __value) + { + if (this->plotBorderBottom != __value) { + this->plotBorderBottom = __value; + update_plot(); + } + } + /*! \brief returns the property plotBorderBottom. + \details Description of the parameter plotBorderBottom is:
\copybrief plotBorderBottom.
+ \see plotBorderBottom for more information */ + inline virtual int get_plotBorderBottom() const + { + return this->plotBorderBottom; + } + /*! \brief sets the property plotBorderRight to the specified \a __value. + \details Description of the parameter plotBorderRight is:
\copybrief plotBorderRight.
+ \see plotBorderRight for more information */ + inline virtual void set_plotBorderRight(int __value) + { + if (this->plotBorderRight != __value) { + this->plotBorderRight = __value; + update_plot(); + } + } + /*! \brief returns the property plotBorderRight. + \details Description of the parameter plotBorderRight is:
\copybrief plotBorderRight.
+ \see plotBorderRight for more information */ + inline virtual int get_plotBorderRight() const + { + return this->plotBorderRight; + } + /*! \brief sets the property plotBorderTop to the specified \a __value. + \details Description of the parameter plotBorderTop is:
\copybrief plotBorderTop.
+ \see plotBorderTop for more information */ + inline virtual void set_plotBorderTop(int __value) + { + if (this->plotBorderTop != __value) { + this->plotBorderTop = __value; + update_plot(); + } + } + /*! \brief returns the property plotBorderTop. + \details Description of the parameter plotBorderTop is:
\copybrief plotBorderTop.
+ \see plotBorderTop for more information */ + inline virtual int get_plotBorderTop() const + { + return this->plotBorderTop; + } + /*! \brief returns the property plotWidth. + \details Description of the parameter plotWidth is:
\copybrief plotWidth.
. + \see plotWidth for more information */ + inline int get_plotWidth() const { + return this->plotWidth; + } + /*! \brief returns the property plotHeight. + \details Description of the parameter plotHeight is:
\copybrief plotHeight.
. + \see plotHeight for more information */ + inline int get_plotHeight() const { + return this->plotHeight; + } + /*! \brief sets the property doDrawing to the specified \a __value. + \details Description of the parameter doDrawing is:
\copybrief doDrawing.
+ \see doDrawing for more information */ + inline virtual void set_doDrawing(bool __value) + { + this->doDrawing = __value; + } + /*! \brief returns the property doDrawing. + \details Description of the parameter doDrawing is:
\copybrief doDrawing.
+ \see doDrawing for more information */ + inline virtual bool get_doDrawing() const + { + return this->doDrawing; + } + /*! \brief returns the property internalPlotBorderLeft. + \details Description of the parameter internalPlotBorderLeft is:
\copybrief internalPlotBorderLeft.
. + \see internalPlotBorderLeft for more information */ + inline int get_internalPlotBorderLeft() const { + return this->internalPlotBorderLeft; + } + /*! \brief returns the property internalPlotBorderBottom. + \details Description of the parameter internalPlotBorderBottom is:
\copybrief internalPlotBorderBottom.
. + \see internalPlotBorderBottom for more information */ + inline int get_internalPlotBorderBottom() const { + return this->internalPlotBorderBottom; + } + /*! \brief returns the property internalPlotBorderRight. + \details Description of the parameter internalPlotBorderRight is:
\copybrief internalPlotBorderRight.
. + \see internalPlotBorderRight for more information */ + inline int get_internalPlotBorderRight() const { + return this->internalPlotBorderRight; + } + /*! \brief returns the property internalPlotBorderTop. + \details Description of the parameter internalPlotBorderTop is:
\copybrief internalPlotBorderTop.
. + \see internalPlotBorderTop for more information */ + inline int get_internalPlotBorderTop() const { + return this->internalPlotBorderTop; + } + /*! \brief returns the property xMin. + \details Description of the parameter xMin is:
\copybrief xMin.
. + \see xMin for more information */ + inline double get_xMin() const { + return this->xMin; + } + /*! \brief returns the property xMax. + \details Description of the parameter xMax is:
\copybrief xMax.
. + \see xMax for more information */ + inline double get_xMax() const { + return this->xMax; + } + /*! \brief returns the property yMin. + \details Description of the parameter yMin is:
\copybrief yMin.
. + \see yMin for more information */ + inline double get_yMin() const { + return this->yMin; + } + /*! \brief returns the property yMax. + \details Description of the parameter yMax is:
\copybrief yMax.
. + \see yMax for more information */ + inline double get_yMax() const { + return this->yMax; + } + /*! \brief returns the property xAxisLog. + \details Description of the parameter xAxisLog is:
\copybrief xAxisLog.
. + \see xAxisLog for more information */ + inline bool get_xAxisLog() const { + return this->xAxisLog; + } + /*! \brief returns the property yAxisLog. + \details Description of the parameter yAxisLog is:
\copybrief yAxisLog.
. + \see yAxisLog for more information */ + inline bool get_yAxisLog() const { + return this->yAxisLog; + } - JKQTPGET_SET_MACRO_I(QColor, backgroundColor, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, plotBackgroundColor, update_plot()) - JKQTPGET_SET_MACRO_I(bool, drawGrid, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, gridColor, update_plot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, gridStyle, update_plot()) - JKQTPGET_SET_MACRO_I(double, gridWidth, update_plot()) - JKQTPGET_SET_MACRO_I(double, labelFontSize, update_plot()) - JKQTPGET_SET_MACRO_I(QString, labelFontName, update_plot()) - JKQTPGET_SET_MACRO_I(double, tickFontSize, update_plot()) - JKQTPGET_SET_MACRO_I(QString, tickFontName, update_plot()) - JKQTPGET_SET_MACRO_I(double, tickLength, update_plot()) - JKQTPGET_SET_MACRO_I(bool, drawSystemBox, update_plot()) - JKQTPGET_SET_MACRO_I(bool, drawZeroAxes, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, systemColor, update_plot()) - JKQTPGET_SET_MACRO_I(double, systemWidth, update_plot()) - JKQTPGET_SET_MACRO_I(double, xZeroTick, update_plot()) - JKQTPGET_SET_MACRO_I(double, yZeroTick, update_plot()) - JKQTPGET_SET_MACRO_I(double, xTickDistance, update_plot()) - JKQTPGET_SET_MACRO_I(double, yTickDistance, update_plot()) - JKQTPGET_SET_MACRO_I(QString, xAxisLabel, update_plot()) - JKQTPGET_SET_MACRO_I(QString, yAxisLabel, update_plot()) - JKQTPGET_SET_MACRO_I(double, aspectRatio, update_plot()) - JKQTPGET_SET_MACRO_I(bool, maintainAspectRatio, update_plot()) - JKQTPGET_SET_MACRO_I(bool, xAxisLabelVisible, update_plot()) - JKQTPGET_SET_MACRO_I(bool, yAxisLabelVisible, update_plot()) - JKQTPGET_SET_MACRO_I(JKQTFastPlotter*, synchronizeX, update_plot()) - JKQTPGET_SET_MACRO_I(JKQTFastPlotter*, synchronizeY, update_plot()) + /*! \brief sets the property backgroundColor to the specified \a __value. + \details Description of the parameter backgroundColor is:
\copybrief backgroundColor.
+ \see backgroundColor for more information */ + inline virtual void set_backgroundColor(const QColor & __value) + { + if (this->backgroundColor != __value) { + this->backgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property backgroundColor. + \details Description of the parameter backgroundColor is:
\copybrief backgroundColor.
+ \see backgroundColor for more information */ + inline virtual QColor get_backgroundColor() const + { + return this->backgroundColor; + } + /*! \brief sets the property plotBackgroundColor to the specified \a __value. + \details Description of the parameter plotBackgroundColor is:
\copybrief plotBackgroundColor.
+ \see plotBackgroundColor for more information */ + inline virtual void set_plotBackgroundColor(const QColor & __value) + { + if (this->plotBackgroundColor != __value) { + this->plotBackgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property plotBackgroundColor. + \details Description of the parameter plotBackgroundColor is:
\copybrief plotBackgroundColor.
+ \see plotBackgroundColor for more information */ + inline virtual QColor get_plotBackgroundColor() const + { + return this->plotBackgroundColor; + } + /*! \brief sets the property drawGrid to the specified \a __value. + \details Description of the parameter drawGrid is:
\copybrief drawGrid.
+ \see drawGrid for more information */ + inline virtual void set_drawGrid(bool __value) + { + if (this->drawGrid != __value) { + this->drawGrid = __value; + update_plot(); + } + } + /*! \brief returns the property drawGrid. + \details Description of the parameter drawGrid is:
\copybrief drawGrid.
+ \see drawGrid for more information */ + inline virtual bool get_drawGrid() const + { + return this->drawGrid; + } + /*! \brief sets the property gridColor to the specified \a __value. + \details Description of the parameter gridColor is:
\copybrief gridColor.
+ \see gridColor for more information */ + inline virtual void set_gridColor(const QColor & __value) + { + if (this->gridColor != __value) { + this->gridColor = __value; + update_plot(); + } + } + /*! \brief returns the property gridColor. + \details Description of the parameter gridColor is:
\copybrief gridColor.
+ \see gridColor for more information */ + inline virtual QColor get_gridColor() const + { + return this->gridColor; + } + /*! \brief sets the property gridStyle to the specified \a __value. + \details Description of the parameter gridStyle is:
\copybrief gridStyle.
+ \see gridStyle for more information */ + inline virtual void set_gridStyle(const Qt::PenStyle & __value) + { + if (this->gridStyle != __value) { + this->gridStyle = __value; + update_plot(); + } + } + /*! \brief returns the property gridStyle. + \details Description of the parameter gridStyle is:
\copybrief gridStyle.
+ \see gridStyle for more information */ + inline virtual Qt::PenStyle get_gridStyle() const + { + return this->gridStyle; + } + /*! \brief sets the property gridWidth to the specified \a __value. + \details Description of the parameter gridWidth is:
\copybrief gridWidth.
+ \see gridWidth for more information */ + inline virtual void set_gridWidth(double __value) + { + if (this->gridWidth != __value) { + this->gridWidth = __value; + update_plot(); + } + } + /*! \brief returns the property gridWidth. + \details Description of the parameter gridWidth is:
\copybrief gridWidth.
+ \see gridWidth for more information */ + inline virtual double get_gridWidth() const + { + return this->gridWidth; + } + /*! \brief sets the property labelFontSize to the specified \a __value. + \details Description of the parameter labelFontSize is:
\copybrief labelFontSize.
+ \see labelFontSize for more information */ + inline virtual void set_labelFontSize(double __value) + { + if (this->labelFontSize != __value) { + this->labelFontSize = __value; + update_plot(); + } + } + /*! \brief returns the property labelFontSize. + \details Description of the parameter labelFontSize is:
\copybrief labelFontSize.
+ \see labelFontSize for more information */ + inline virtual double get_labelFontSize() const + { + return this->labelFontSize; + } + /*! \brief sets the property labelFontName to the specified \a __value. + \details Description of the parameter labelFontName is:
\copybrief labelFontName.
+ \see labelFontName for more information */ + inline virtual void set_labelFontName(const QString & __value) + { + if (this->labelFontName != __value) { + this->labelFontName = __value; + update_plot(); + } + } + /*! \brief returns the property labelFontName. + \details Description of the parameter labelFontName is:
\copybrief labelFontName.
+ \see labelFontName for more information */ + inline virtual QString get_labelFontName() const + { + return this->labelFontName; + } + /*! \brief sets the property tickFontSize to the specified \a __value. + \details Description of the parameter tickFontSize is:
\copybrief tickFontSize.
+ \see tickFontSize for more information */ + inline virtual void set_tickFontSize(double __value) + { + if (this->tickFontSize != __value) { + this->tickFontSize = __value; + update_plot(); + } + } + /*! \brief returns the property tickFontSize. + \details Description of the parameter tickFontSize is:
\copybrief tickFontSize.
+ \see tickFontSize for more information */ + inline virtual double get_tickFontSize() const + { + return this->tickFontSize; + } + /*! \brief sets the property tickFontName to the specified \a __value. + \details Description of the parameter tickFontName is:
\copybrief tickFontName.
+ \see tickFontName for more information */ + inline virtual void set_tickFontName(const QString & __value) + { + if (this->tickFontName != __value) { + this->tickFontName = __value; + update_plot(); + } + } + /*! \brief returns the property tickFontName. + \details Description of the parameter tickFontName is:
\copybrief tickFontName.
+ \see tickFontName for more information */ + inline virtual QString get_tickFontName() const + { + return this->tickFontName; + } + /*! \brief sets the property tickLength to the specified \a __value. + \details Description of the parameter tickLength is:
\copybrief tickLength.
+ \see tickLength for more information */ + inline virtual void set_tickLength(double __value) + { + if (this->tickLength != __value) { + this->tickLength = __value; + update_plot(); + } + } + /*! \brief returns the property tickLength. + \details Description of the parameter tickLength is:
\copybrief tickLength.
+ \see tickLength for more information */ + inline virtual double get_tickLength() const + { + return this->tickLength; + } + /*! \brief sets the property drawSystemBox to the specified \a __value. + \details Description of the parameter drawSystemBox is:
\copybrief drawSystemBox.
+ \see drawSystemBox for more information */ + inline virtual void set_drawSystemBox(bool __value) + { + if (this->drawSystemBox != __value) { + this->drawSystemBox = __value; + update_plot(); + } + } + /*! \brief returns the property drawSystemBox. + \details Description of the parameter drawSystemBox is:
\copybrief drawSystemBox.
+ \see drawSystemBox for more information */ + inline virtual bool get_drawSystemBox() const + { + return this->drawSystemBox; + } + /*! \brief sets the property drawZeroAxes to the specified \a __value. + \details Description of the parameter drawZeroAxes is:
\copybrief drawZeroAxes.
+ \see drawZeroAxes for more information */ + inline virtual void set_drawZeroAxes(bool __value) + { + if (this->drawZeroAxes != __value) { + this->drawZeroAxes = __value; + update_plot(); + } + } + /*! \brief returns the property drawZeroAxes. + \details Description of the parameter drawZeroAxes is:
\copybrief drawZeroAxes.
+ \see drawZeroAxes for more information */ + inline virtual bool get_drawZeroAxes() const + { + return this->drawZeroAxes; + } + /*! \brief sets the property systemColor to the specified \a __value. + \details Description of the parameter systemColor is:
\copybrief systemColor.
+ \see systemColor for more information */ + inline virtual void set_systemColor(const QColor & __value) + { + if (this->systemColor != __value) { + this->systemColor = __value; + update_plot(); + } + } + /*! \brief returns the property systemColor. + \details Description of the parameter systemColor is:
\copybrief systemColor.
+ \see systemColor for more information */ + inline virtual QColor get_systemColor() const + { + return this->systemColor; + } + /*! \brief sets the property systemWidth to the specified \a __value. + \details Description of the parameter systemWidth is:
\copybrief systemWidth.
+ \see systemWidth for more information */ + inline virtual void set_systemWidth(double __value) + { + if (this->systemWidth != __value) { + this->systemWidth = __value; + update_plot(); + } + } + /*! \brief returns the property systemWidth. + \details Description of the parameter systemWidth is:
\copybrief systemWidth.
+ \see systemWidth for more information */ + inline virtual double get_systemWidth() const + { + return this->systemWidth; + } + /*! \brief sets the property xZeroTick to the specified \a __value. + \details Description of the parameter xZeroTick is:
\copybrief xZeroTick.
+ \see xZeroTick for more information */ + inline virtual void set_xZeroTick(double __value) + { + if (this->xZeroTick != __value) { + this->xZeroTick = __value; + update_plot(); + } + } + /*! \brief returns the property xZeroTick. + \details Description of the parameter xZeroTick is:
\copybrief xZeroTick.
+ \see xZeroTick for more information */ + inline virtual double get_xZeroTick() const + { + return this->xZeroTick; + } + /*! \brief sets the property yZeroTick to the specified \a __value. + \details Description of the parameter yZeroTick is:
\copybrief yZeroTick.
+ \see yZeroTick for more information */ + inline virtual void set_yZeroTick(double __value) + { + if (this->yZeroTick != __value) { + this->yZeroTick = __value; + update_plot(); + } + } + /*! \brief returns the property yZeroTick. + \details Description of the parameter yZeroTick is:
\copybrief yZeroTick.
+ \see yZeroTick for more information */ + inline virtual double get_yZeroTick() const + { + return this->yZeroTick; + } + /*! \brief sets the property xTickDistance to the specified \a __value. + \details Description of the parameter xTickDistance is:
\copybrief xTickDistance.
+ \see xTickDistance for more information */ + inline virtual void set_xTickDistance(double __value) + { + if (this->xTickDistance != __value) { + this->xTickDistance = __value; + update_plot(); + } + } + /*! \brief returns the property xTickDistance. + \details Description of the parameter xTickDistance is:
\copybrief xTickDistance.
+ \see xTickDistance for more information */ + inline virtual double get_xTickDistance() const + { + return this->xTickDistance; + } + /*! \brief sets the property yTickDistance to the specified \a __value. + \details Description of the parameter yTickDistance is:
\copybrief yTickDistance.
+ \see yTickDistance for more information */ + inline virtual void set_yTickDistance(double __value) + { + if (this->yTickDistance != __value) { + this->yTickDistance = __value; + update_plot(); + } + } + /*! \brief returns the property yTickDistance. + \details Description of the parameter yTickDistance is:
\copybrief yTickDistance.
+ \see yTickDistance for more information */ + inline virtual double get_yTickDistance() const + { + return this->yTickDistance; + } + /*! \brief sets the property xAxisLabel to the specified \a __value. + \details Description of the parameter xAxisLabel is:
\copybrief xAxisLabel.
+ \see xAxisLabel for more information */ + inline virtual void set_xAxisLabel(const QString & __value) + { + if (this->xAxisLabel != __value) { + this->xAxisLabel = __value; + update_plot(); + } + } + /*! \brief returns the property xAxisLabel. + \details Description of the parameter xAxisLabel is:
\copybrief xAxisLabel.
+ \see xAxisLabel for more information */ + inline virtual QString get_xAxisLabel() const + { + return this->xAxisLabel; + } + /*! \brief sets the property yAxisLabel to the specified \a __value. + \details Description of the parameter yAxisLabel is:
\copybrief yAxisLabel.
+ \see yAxisLabel for more information */ + inline virtual void set_yAxisLabel(const QString & __value) + { + if (this->yAxisLabel != __value) { + this->yAxisLabel = __value; + update_plot(); + } + } + /*! \brief returns the property yAxisLabel. + \details Description of the parameter yAxisLabel is:
\copybrief yAxisLabel.
+ \see yAxisLabel for more information */ + inline virtual QString get_yAxisLabel() const + { + return this->yAxisLabel; + } + /*! \brief sets the property aspectRatio to the specified \a __value. + \details Description of the parameter aspectRatio is:
\copybrief aspectRatio.
+ \see aspectRatio for more information */ + inline virtual void set_aspectRatio(double __value) + { + if (this->aspectRatio != __value) { + this->aspectRatio = __value; + update_plot(); + } + } + /*! \brief returns the property aspectRatio. + \details Description of the parameter aspectRatio is:
\copybrief aspectRatio.
+ \see aspectRatio for more information */ + inline virtual double get_aspectRatio() const + { + return this->aspectRatio; + } + /*! \brief sets the property maintainAspectRatio to the specified \a __value. + \details Description of the parameter maintainAspectRatio is:
\copybrief maintainAspectRatio.
+ \see maintainAspectRatio for more information */ + inline virtual void set_maintainAspectRatio(bool __value) + { + if (this->maintainAspectRatio != __value) { + this->maintainAspectRatio = __value; + update_plot(); + } + } + /*! \brief returns the property maintainAspectRatio. + \details Description of the parameter maintainAspectRatio is:
\copybrief maintainAspectRatio.
+ \see maintainAspectRatio for more information */ + inline virtual bool get_maintainAspectRatio() const + { + return this->maintainAspectRatio; + } + /*! \brief sets the property xAxisLabelVisible to the specified \a __value. + \details Description of the parameter xAxisLabelVisible is:
\copybrief xAxisLabelVisible.
+ \see xAxisLabelVisible for more information */ + inline virtual void set_xAxisLabelVisible(bool __value) + { + if (this->xAxisLabelVisible != __value) { + this->xAxisLabelVisible = __value; + update_plot(); + } + } + /*! \brief returns the property xAxisLabelVisible. + \details Description of the parameter xAxisLabelVisible is:
\copybrief xAxisLabelVisible.
+ \see xAxisLabelVisible for more information */ + inline virtual bool get_xAxisLabelVisible() const + { + return this->xAxisLabelVisible; + } + /*! \brief sets the property yAxisLabelVisible to the specified \a __value. + \details Description of the parameter yAxisLabelVisible is:
\copybrief yAxisLabelVisible.
+ \see yAxisLabelVisible for more information */ + inline virtual void set_yAxisLabelVisible(bool __value) + { + if (this->yAxisLabelVisible != __value) { + this->yAxisLabelVisible = __value; + update_plot(); + } + } + /*! \brief returns the property yAxisLabelVisible. + \details Description of the parameter yAxisLabelVisible is:
\copybrief yAxisLabelVisible.
+ \see yAxisLabelVisible for more information */ + inline virtual bool get_yAxisLabelVisible() const + { + return this->yAxisLabelVisible; + } + /*! \brief sets the property synchronizeX to the specified \a __value. + \details Description of the parameter synchronizeX is:
\copybrief synchronizeX.
+ \see synchronizeX for more information */ + inline virtual void set_synchronizeX(JKQTFastPlotter* & __value) + { + if (this->synchronizeX != __value) { + this->synchronizeX = __value; + update_plot(); + } + } + /*! \brief returns the property synchronizeX. + \details Description of the parameter synchronizeX is:
\copybrief synchronizeX.
+ \see synchronizeX for more information */ + inline virtual JKQTFastPlotter* get_synchronizeX() const + { + return this->synchronizeX; + } + /*! \brief sets the property synchronizeY to the specified \a __value. + \details Description of the parameter synchronizeY is:
\copybrief synchronizeY.
+ \see synchronizeY for more information */ + inline virtual void set_synchronizeY(JKQTFastPlotter* & __value) + { + if (this->synchronizeY != __value) { + this->synchronizeY = __value; + update_plot(); + } + } + /*! \brief returns the property synchronizeY. + \details Description of the parameter synchronizeY is:
\copybrief synchronizeY.
+ \see synchronizeY for more information */ + inline virtual JKQTFastPlotter* get_synchronizeY() const + { + return this->synchronizeY; + } /** \brief draw the contents onto any QPainter, starting at (0,0), returns the size of the whole plot in \a size, if supplied with the default background color */ - void draw(QPainter* painter, QSize* size=NULL); + void draw(QPainter* painter, QSize* size=nullptr); /** \brief draw the contents onto any QPainter, starting at (0,0), returns the size of the whole plot in \a size, if supplied with the supplied\a background color */ void draw(QPainter* painter, QColor background, QSize* size); @@ -547,10 +1183,10 @@ class LIB_EXPORT JKQTFPPlot: public QObject { JKQTFPPlot(JKQTFastPlotter* parent); /** \brief virtual class destructor */ - virtual ~JKQTFPPlot() {}; + virtual ~JKQTFPPlot(); /** \brief set the parent of the plot */ - void setParent(JKQTFastPlotter* parent) { this->parent=parent; QObject::setParent(parent); }; + void setParent(JKQTFastPlotter* parent) { this->parent=parent; QObject::setParent(parent); } bool isVisible() const { return this->visible; } @@ -635,12 +1271,12 @@ class LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { JKQTFPLinePlot(JKQTFastPlotter* parent, QVector* x, QVector* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; inline void set_data(double* x, double* y, unsigned int N) { this->x=x; this->y=y; - this->yerr=NULL; + this->yerr=nullptr; this->N=N; datatype=JKQTFPLPPointer; replot(); @@ -656,21 +1292,21 @@ class LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { }; inline void set_data(QVector* x, QVector* y) { - this->x=NULL; - this->y=NULL; - this->yerr=NULL; + this->x=nullptr; + this->y=nullptr; + this->yerr=nullptr; this->xv=x; this->yv=y; - this->yerrv=NULL; + this->yerrv=nullptr; this->N=x->size(); datatype=JKQTFPLPVector; replot(); }; inline void set_data(QVector* x, QVector* y, QVector* yerr) { - this->x=NULL; - this->y=NULL; - this->yerr=NULL; + this->x=nullptr; + this->y=nullptr; + this->yerr=nullptr; this->xv=x; this->yv=y; this->yerrv=yerr; @@ -687,19 +1323,150 @@ class LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { return N; } - JKQTPGET_MACRO(double*, x) - JKQTPGET_MACRO(double*, y) - JKQTPGET_MACRO(double*, yerr) - JKQTPGET_MACRO(QVector*, xv) - JKQTPGET_MACRO(QVector*, yv) - JKQTPGET_MACRO(QVector*, yerrv) - JKQTPGET_MACRO(DataType, datatype) - JKQTPGET_SET_MACRO_I(QColor, color, replot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, style, replot()) - JKQTPGET_SET_MACRO_I(double, width, replot()) - JKQTPGET_SET_MACRO_I(QColor, errorColor, replot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, errorStyle, replot()) - JKQTPGET_SET_MACRO_I(double, errorWidth, replot()) + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
. + \see x for more information */ + inline double* get_x() const { + return this->x; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
. + \see y for more information */ + inline double* get_y() const { + return this->y; + } + /*! \brief returns the property yerr. + \details Description of the parameter yerr is:
\copybrief yerr.
. + \see yerr for more information */ + inline double* get_yerr() const { + return this->yerr; + } + /*! \brief returns the property xv. + \details Description of the parameter xv is:
\copybrief xv.
. + \see xv for more information */ + inline QVector* get_xv() const { + return this->xv; + } + /*! \brief returns the property yv. + \details Description of the parameter yv is:
\copybrief yv.
. + \see yv for more information */ + inline QVector* get_yv() const { + return this->yv; + } + /*! \brief returns the property yerrv. + \details Description of the parameter yerrv is:
\copybrief yerrv.
. + \see yerrv for more information */ + inline QVector* get_yerrv() const { + return this->yerrv; + } + /*! \brief returns the property datatype. + \details Description of the parameter datatype is:
\copybrief datatype.
. + \see datatype for more information */ + inline DataType get_datatype() const { + return this->datatype; + } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + if (this->color != __value) { + this->color = __value; + replot(); + } + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + if (this->style != __value) { + this->style = __value; + replot(); + } + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property errorColor to the specified \a __value. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual void set_errorColor(const QColor & __value) + { + if (this->errorColor != __value) { + this->errorColor = __value; + replot(); + } + } + /*! \brief returns the property errorColor. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual QColor get_errorColor() const + { + return this->errorColor; + } + /*! \brief sets the property errorStyle to the specified \a __value. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual void set_errorStyle(const Qt::PenStyle & __value) + { + if (this->errorStyle != __value) { + this->errorStyle = __value; + replot(); + } + } + /*! \brief returns the property errorStyle. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual Qt::PenStyle get_errorStyle() const + { + return this->errorStyle; + } + /*! \brief sets the property errorWidth to the specified \a __value. + \details Description of the parameter errorWidth is:
\copybrief errorWidth.
+ \see errorWidth for more information */ + inline virtual void set_errorWidth(double __value) + { + if (this->errorWidth != __value) { + this->errorWidth = __value; + replot(); + } + } + /*! \brief returns the property errorWidth. + \details Description of the parameter errorWidth is:
\copybrief errorWidth.
+ \see errorWidth for more information */ + inline virtual double get_errorWidth() const + { + return this->errorWidth; + } }; @@ -737,9 +1504,25 @@ class LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot { JKQTFPVCrossPlot(JKQTFastPlotter* parent, QVector* x, QVector* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(double, crossWidth, replot()) + /*! \brief sets the property crossWidth to the specified \a __value. + \details Description of the parameter crossWidth is:
\copybrief crossWidth.
+ \see crossWidth for more information */ + inline virtual void set_crossWidth(double __value) + { + if (this->crossWidth != __value) { + this->crossWidth = __value; + replot(); + } + } + /*! \brief returns the property crossWidth. + \details Description of the parameter crossWidth is:
\copybrief crossWidth.
+ \see crossWidth for more information */ + inline virtual double get_crossWidth() const + { + return this->crossWidth; + } protected: /** \brief width of the crosses */ double crossWidth; @@ -780,7 +1563,7 @@ class LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot { JKQTFPVBarPlot(JKQTFastPlotter* parent, QVector* x, QVector* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; }; @@ -821,17 +1604,128 @@ class LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { JKQTFPXRangePlot(JKQTFastPlotter* parent, double xmin, double xmax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(QColor, color, replot()) - JKQTPGET_SET_MACRO_I(QColor, fillColor, replot()) - JKQTPGET_SET_MACRO_I(Qt::BrushStyle, fillStyle, replot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, style, replot()) - JKQTPGET_SET_MACRO_I(double, width, replot()) - JKQTPGET_MACRO(double, xmin) - JKQTPGET_MACRO(double, xmax) - JKQTPGET_MACRO(double, centerline) - JKQTPGET_SET_MACRO_I(bool, showCenterline, replot()) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + if (this->color != __value) { + this->color = __value; + replot(); + } + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + if (this->fillColor != __value) { + this->fillColor = __value; + replot(); + } + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + if (this->fillStyle != __value) { + this->fillStyle = __value; + replot(); + } + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + if (this->style != __value) { + this->style = __value; + replot(); + } + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief returns the property xmin. + \details Description of the parameter xmin is:
\copybrief xmin.
. + \see xmin for more information */ + inline double get_xmin() const { + return this->xmin; + } + /*! \brief returns the property xmax. + \details Description of the parameter xmax is:
\copybrief xmax.
. + \see xmax for more information */ + inline double get_xmax() const { + return this->xmax; + } + /*! \brief returns the property centerline. + \details Description of the parameter centerline is:
\copybrief centerline.
. + \see centerline for more information */ + inline double get_centerline() const { + return this->centerline; + } + /*! \brief sets the property showCenterline to the specified \a __value. + \details Description of the parameter showCenterline is:
\copybrief showCenterline.
+ \see showCenterline for more information */ + inline virtual void set_showCenterline(bool __value) + { + if (this->showCenterline != __value) { + this->showCenterline = __value; + replot(); + } + } + /*! \brief returns the property showCenterline. + \details Description of the parameter showCenterline is:
\copybrief showCenterline.
+ \see showCenterline for more information */ + inline virtual bool get_showCenterline() const + { + return this->showCenterline; + } public slots: void set_centerline(int centerline) { if (this->centerline!=centerline) { @@ -904,17 +1798,128 @@ class LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { JKQTFPYRangePlot(JKQTFastPlotter* parent, double ymin, double ymax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(QColor, color, replot()) - JKQTPGET_SET_MACRO_I(QColor, fillColor, replot()) - JKQTPGET_SET_MACRO_I(Qt::BrushStyle, fillStyle, replot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, style, replot()) - JKQTPGET_SET_MACRO_I(double, width, replot()) - JKQTPGET_MACRO(double, ymin) - JKQTPGET_MACRO(double, ymax) - JKQTPGET_MACRO(double, centerline) - JKQTPGET_SET_MACRO_I(bool, showCenterline, replot()) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + if (this->color != __value) { + this->color = __value; + replot(); + } + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + if (this->fillColor != __value) { + this->fillColor = __value; + replot(); + } + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + if (this->fillStyle != __value) { + this->fillStyle = __value; + replot(); + } + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + if (this->style != __value) { + this->style = __value; + replot(); + } + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief returns the property ymin. + \details Description of the parameter ymin is:
\copybrief ymin.
. + \see ymin for more information */ + inline double get_ymin() const { + return this->ymin; + } + /*! \brief returns the property ymax. + \details Description of the parameter ymax is:
\copybrief ymax.
. + \see ymax for more information */ + inline double get_ymax() const { + return this->ymax; + } + /*! \brief returns the property centerline. + \details Description of the parameter centerline is:
\copybrief centerline.
. + \see centerline for more information */ + inline double get_centerline() const { + return this->centerline; + } + /*! \brief sets the property showCenterline to the specified \a __value. + \details Description of the parameter showCenterline is:
\copybrief showCenterline.
+ \see showCenterline for more information */ + inline virtual void set_showCenterline(bool __value) + { + if (this->showCenterline != __value) { + this->showCenterline = __value; + replot(); + } + } + /*! \brief returns the property showCenterline. + \details Description of the parameter showCenterline is:
\copybrief showCenterline.
+ \see showCenterline for more information */ + inline virtual bool get_showCenterline() const + { + return this->showCenterline; + } public slots: void set_centerline(int centerline) { if (this->centerline!=centerline) { @@ -975,13 +1980,93 @@ class LIB_EXPORT JKQTFPQImagePlot: public JKQTFPPlot { JKQTFPQImagePlot(JKQTFastPlotter* parent, QImage* image); /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(QImage*, image, replot()) - JKQTPGET_SET_MACRO_I(double, xmin, replot()) - JKQTPGET_SET_MACRO_I(double, xmax, replot()) - JKQTPGET_SET_MACRO_I(double, ymin, replot()) - JKQTPGET_SET_MACRO_I(double, ymax, replot()) + /*! \brief sets the property image to the specified \a __value. + \details Description of the parameter image is:
\copybrief image.
+ \see image for more information */ + inline virtual void set_image(QImage* __value) + { + if (this->image != __value) { + this->image = __value; + replot(); + } + } + /*! \brief returns the property image. + \details Description of the parameter image is:
\copybrief image.
+ \see image for more information */ + inline virtual QImage* get_image() const + { + return this->image; + } + /*! \brief sets the property xmin to the specified \a __value. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual void set_xmin(double __value) + { + if (this->xmin != __value) { + this->xmin = __value; + replot(); + } + } + /*! \brief returns the property xmin. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual double get_xmin() const + { + return this->xmin; + } + /*! \brief sets the property xmax to the specified \a __value. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual void set_xmax(double __value) + { + if (this->xmax != __value) { + this->xmax = __value; + replot(); + } + } + /*! \brief returns the property xmax. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual double get_xmax() const + { + return this->xmax; + } + /*! \brief sets the property ymin to the specified \a __value. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual void set_ymin(double __value) + { + if (this->ymin != __value) { + this->ymin = __value; + replot(); + } + } + /*! \brief returns the property ymin. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual double get_ymin() const + { + return this->ymin; + } + /*! \brief sets the property ymax to the specified \a __value. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual void set_ymax(double __value) + { + if (this->ymax != __value) { + this->ymax = __value; + replot(); + } + } + /*! \brief returns the property ymax. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual double get_ymax() const + { + return this->ymax; + } }; @@ -1080,26 +2165,26 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i double delta=max-min; - unsigned int* lut_used=NULL; - static unsigned int* lut_red=NULL; - static unsigned int* lut_green=NULL; - static unsigned int* lut_blue=NULL; - static unsigned int* lut_gray=NULL; - static unsigned int* lut_invred=NULL; - static unsigned int* lut_invgreen=NULL; - static unsigned int* lut_invblue=NULL; - static unsigned int* lut_invgray=NULL; - static unsigned int* lut_matlab=NULL; - static unsigned int* lut_rygb=NULL; - static unsigned int* lut_hsv=NULL; - static unsigned int* lut_invhsv=NULL; - static unsigned int* lut_rainbow=NULL; - static unsigned int* lut_hot=NULL; - static unsigned int* lut_ocean=NULL; - static unsigned int* lut_trafficlight=NULL; - static unsigned int* lut_bluemagentayellow=NULL; - static unsigned int* lut_blueyellow=NULL; - static unsigned int* lut_cyan=NULL; + unsigned int* lut_used=nullptr; + static unsigned int* lut_red=nullptr; + static unsigned int* lut_green=nullptr; + static unsigned int* lut_blue=nullptr; + static unsigned int* lut_gray=nullptr; + static unsigned int* lut_invred=nullptr; + static unsigned int* lut_invgreen=nullptr; + static unsigned int* lut_invblue=nullptr; + static unsigned int* lut_invgray=nullptr; + static unsigned int* lut_matlab=nullptr; + static unsigned int* lut_rygb=nullptr; + static unsigned int* lut_hsv=nullptr; + static unsigned int* lut_invhsv=nullptr; + static unsigned int* lut_rainbow=nullptr; + static unsigned int* lut_hot=nullptr; + static unsigned int* lut_ocean=nullptr; + static unsigned int* lut_trafficlight=nullptr; + static unsigned int* lut_bluemagentayellow=nullptr; + static unsigned int* lut_blueyellow=nullptr; + static unsigned int* lut_cyan=nullptr; img = QImage(width, height, QImage::Format_ARGB32_Premultiplied); @@ -1110,11 +2195,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i if (palette == JKQTFP_RED) { unsigned int** plut=&lut_red; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(static_cast(255.0*v), 0, 0); } } @@ -1125,11 +2210,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_GREEN) { unsigned int** plut=&lut_green; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(0, static_cast(255.0*v), 0); } } @@ -1140,11 +2225,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_BLUE) { unsigned int** plut=&lut_blue; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(0, 0, static_cast(255.0*v)); } } @@ -1157,11 +2242,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_GRAY) { unsigned int** plut=&lut_gray; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(static_cast(255.0*v), static_cast(255.0*v), static_cast(255.0*v)); @@ -1174,11 +2259,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_INVERTEDRED) { unsigned int** plut=&lut_invred; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(static_cast(255.0*(1.0-v)), 0, 0); } } @@ -1189,11 +2274,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_INVERTEDGREEN) { unsigned int** plut=&lut_invgreen; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(0, static_cast(255.0*(1.0-v)), 0); } } @@ -1203,11 +2288,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_INVERTEDBLUE) { unsigned int** plut=&lut_invblue; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); (*plut)[l]=qRgb(0, 0, static_cast(255.0*(1.0-v))); } } @@ -1217,11 +2302,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_INVERTEDGRAY) { unsigned int** plut=&lut_invgray; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=1.0-(l/(double)(JKQTFPimagePlot_LUTSIZE)); + double v=1.0-(l/static_cast(JKQTFPimagePlot_LUTSIZE)); (*plut)[l]=qRgb(static_cast(255.0*v), static_cast(255.0*v), static_cast(255.0*v)); @@ -1234,11 +2319,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_MATLAB) { unsigned int** plut=&lut_matlab; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = 382.5 - 1020.0 * std::abs(v - 0.75); if (r > 255.0) r = 255.0; @@ -1267,11 +2352,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_RYGB) //gnuplot: 30,-13,-23 { unsigned int** plut=&lut_rygb; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = 796.875*v - 199.21875; if (r > 255.0) r = 255.0; @@ -1293,11 +2378,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_HSV) { unsigned int** plut=&lut_hsv; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); int h = static_cast(floor(6*v)); double f = 6*v-double(h); @@ -1319,11 +2404,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_INVERTED_HSV) { unsigned int** plut=&lut_invhsv; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); int h = static_cast(floor(6.0-6.0*v)); double f = 6.0-6.0*v-double(h); @@ -1345,12 +2430,12 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i } else if (palette == JKQTFP_RAINBOW) //gnuplot: 33,13,10 { - if (lut_rainbow==NULL) { + if (lut_rainbow==nullptr) { lut_rainbow=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(int)); //std::cout<<"!!! creating rainbow lut\n"; - if (lut_rainbow!=NULL) { + if (lut_rainbow!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = 255.0*std::abs(2.0*v-0.5); if (r > 255.0) r = 255.0; @@ -1368,11 +2453,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_HOT) //gnuplot: 21,22,23 { unsigned int** plut=&lut_hot; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = 765.0*v; if (r > 255.0) r = 255.0; @@ -1395,11 +2480,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_OCEAN) //gnuplot: 23,28,3 { unsigned int** plut=&lut_ocean; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = 765.0*v-510.0; if (r < 0.0) r = 0.0; @@ -1416,11 +2501,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_BLUEMAGENTAYELLOW) //gnuplot: 30,31,32 { unsigned int** plut=&lut_bluemagentayellow; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = (v/0.32-0.78125); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -1445,11 +2530,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_BLUEYELLOW) //gnuplot: 8,9,10 { unsigned int** plut=&lut_blueyellow; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = sqrt(sqrt(v)); if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -1472,11 +2557,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_CYAN) { unsigned int** plut=&lut_cyan; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = v*0.5; if (r < 0.0) r = 0.0; if (r > 1.0) r = 1.0; @@ -1498,11 +2583,11 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i else if (palette == JKQTFP_TRAFFICLIGHT) { unsigned int** plut=&lut_trafficlight; - if ((*plut)==NULL) { + if ((*plut)==nullptr) { (*plut)=(unsigned int*)malloc((JKQTFPimagePlot_LUTSIZE+2)*sizeof(unsigned int)); - if ((*plut)!=NULL) { + if ((*plut)!=nullptr) { for (int l=0; l<=JKQTFPimagePlot_LUTSIZE; l++) { - double v=l/(double)(JKQTFPimagePlot_LUTSIZE); + double v=l/static_cast(JKQTFPimagePlot_LUTSIZE); double r = (v < 0.5) ? 128.0*sin(M_PI*(2.0*v-0.5))+128.0 : 255.0; if (r > 255.0) r = 255.0; @@ -1524,7 +2609,7 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i std::cout<<" calculated/found LUT: "<\copybrief image. + \see image for more information */ + inline virtual void set_image(void* __value) + { + if (this->image != __value) { + this->image = __value; + replot(); + } + } + /*! \brief returns the property image. + \details Description of the parameter image is:
\copybrief image.
+ \see image for more information */ + inline virtual void* get_image() const + { + return this->image; + } + /*! \brief sets the property imageFormat to the specified \a __value. + \details Description of the parameter imageFormat is:
\copybrief imageFormat.
+ \see imageFormat for more information */ + inline virtual void set_imageFormat(const JKQTFPImageFormat & __value) + { + if (this->imageFormat != __value) { + this->imageFormat = __value; + replot(); + } + } + /*! \brief returns the property imageFormat. + \details Description of the parameter imageFormat is:
\copybrief imageFormat.
+ \see imageFormat for more information */ + inline virtual JKQTFPImageFormat get_imageFormat() const + { + return this->imageFormat; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(const unsigned int & __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual unsigned int get_width() const + { + return this->width; + } + /*! \brief sets the property height to the specified \a __value. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual void set_height(const unsigned int & __value) + { + if (this->height != __value) { + this->height = __value; + replot(); + } + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual unsigned int get_height() const + { + return this->height; + } + /*! \brief sets the property xmin to the specified \a __value. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual void set_xmin(double __value) + { + if (this->xmin != __value) { + this->xmin = __value; + replot(); + } + } + /*! \brief returns the property xmin. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual double get_xmin() const + { + return this->xmin; + } + /*! \brief sets the property xmax to the specified \a __value. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual void set_xmax(double __value) + { + if (this->xmax != __value) { + this->xmax = __value; + replot(); + } + } + /*! \brief returns the property xmax. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual double get_xmax() const + { + return this->xmax; + } + /*! \brief sets the property ymin to the specified \a __value. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual void set_ymin(double __value) + { + if (this->ymin != __value) { + this->ymin = __value; + replot(); + } + } + /*! \brief returns the property ymin. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual double get_ymin() const + { + return this->ymin; + } + /*! \brief sets the property ymax to the specified \a __value. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual void set_ymax(double __value) + { + if (this->ymax != __value) { + this->ymax = __value; + replot(); + } + } + /*! \brief returns the property ymax. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual double get_ymax() const + { + return this->ymax; + } + /*! \brief sets the property drawColorBar to the specified \a __value. + \details Description of the parameter drawColorBar is:
\copybrief drawColorBar.
+ \see drawColorBar for more information */ + inline virtual void set_drawColorBar(bool __value) + { + if (this->drawColorBar != __value) { + this->drawColorBar = __value; + replot(); + } + } + /*! \brief returns the property drawColorBar. + \details Description of the parameter drawColorBar is:
\copybrief drawColorBar.
+ \see drawColorBar for more information */ + inline virtual bool get_drawColorBar() const + { + return this->drawColorBar; + } + /*! \brief sets the property colorBarWidth to the specified \a __value. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual void set_colorBarWidth(int __value) + { + if (this->colorBarWidth != __value) { + this->colorBarWidth = __value; + replot(); + } + } + /*! \brief returns the property colorBarWidth. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual int get_colorBarWidth() const + { + return this->colorBarWidth; + } + /*! \brief returns the property rotation. + \details Description of the parameter rotation is:
\copybrief rotation.
. + \see rotation for more information */ + inline int get_rotation() const { + return this->rotation; + } + /*! \brief returns the property palette. + \details Description of the parameter palette is:
\copybrief palette.
. + \see palette for more information */ + inline JKQTFPColorPalette get_palette() const { + return this->palette; + } + /*! \brief returns the property colorMin. + \details Description of the parameter colorMin is:
\copybrief colorMin.
. + \see colorMin for more information */ + inline double get_colorMin() const { + return this->colorMin; + } + /*! \brief returns the property colorMax. + \details Description of the parameter colorMax is:
\copybrief colorMax.
. + \see colorMax for more information */ + inline double get_colorMax() const { + return this->colorMax; + } void set_image(void* image, JKQTFPImageFormat imageFormat, unsigned int width, unsigned int height) { this->image=image; this->imageFormat=imageFormat; @@ -1863,26 +3128,232 @@ class LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot { JKQTFPRGBImageOverlayPlot(JKQTFastPlotter* parent); /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_TWO_I(imageRed, void*, imageRed, JKQTFPImageFormat, imageFormatRed, replot()) - JKQTPGET_SET_MACRO_TWO_I(imageGreen, void*, imageGreen, JKQTFPImageFormat, imageFormatGreen, replot()) - JKQTPGET_SET_MACRO_TWO_I(imageBlue, void*, imageBlue, JKQTFPImageFormat, imageFormatBlue, replot()) - JKQTPGET_SET_MACRO_I(unsigned int, width, replot()) - JKQTPGET_SET_MACRO_I(unsigned int, height, replot()) - JKQTPGET_SET_MACRO_I(double, xmin, replot()) - JKQTPGET_SET_MACRO_I(double, xmax, replot()) - JKQTPGET_SET_MACRO_I(double, ymin, replot()) - JKQTPGET_SET_MACRO_I(double, ymax, replot()) - JKQTPGET_MACRO(int, rotation) - JKQTPGET_MACRO(double, colorMinRed) - JKQTPGET_MACRO(double, colorMaxRed) - JKQTPGET_MACRO(double, colorMinGreen) - JKQTPGET_MACRO(double, colorMaxGreen) - JKQTPGET_MACRO(double, colorMinBlue) - JKQTPGET_MACRO(double, colorMaxBlue) + /*! \brief sets the properties imageRed and imageFormatRed to the specified \a __value and \a __value2. + \details Description of the parameter imageRed is:
\copybrief imageRed.
\details Description of the parameter imageFormatRed is:
\copybrief imageFormatRed.
+ \see imageRed and imageFormatRed for more information */ + inline virtual void set_imageRed (void* __value, JKQTFPImageFormat __value2) + { + bool set=false; + if (this->imageRed != __value) { + this->imageRed = __value; + set=true; + } + if (this->imageFormatRed != __value2) { + this->imageFormatRed = __value2; + set=true; + } + if (set) { + replot(); + } + } + /*! \brief returns the property imageRed. + \details Description of the parameter imageRed is:
\copybrief imageRed.
\details Description of the parameter imageFormatRed is:
\copybrief imageFormatRed.
+ \see imageRed for more information */ + inline virtual void* get_imageRed () const { return this->imageRed; } + /*! \brief returns the property imageFormatRed. + \details Description of the parameter imageRed is:
\copybrief imageRed.
\details Description of the parameter imageFormatRed is:
\copybrief imageFormatRed.
+ \see imageFormatRed for more information */ + inline virtual JKQTFPImageFormat get_imageFormatRed () const { return this->imageFormatRed; } + /*! \brief sets the properties imageGreen and imageFormatGreen to the specified \a __value and \a __value2. + \details Description of the parameter imageGreen is:
\copybrief imageGreen.
\details Description of the parameter imageFormatGreen is:
\copybrief imageFormatGreen.
+ \see imageGreen and imageFormatGreen for more information */ + inline virtual void set_imageGreen (void* __value, JKQTFPImageFormat __value2) + { + bool set=false; + if (this->imageGreen != __value) { + this->imageGreen = __value; + set=true; + } + if (this->imageFormatGreen != __value2) { + this->imageFormatGreen = __value2; + set=true; + } + if (set) { + replot(); + } + } + /*! \brief returns the property imageGreen. + \details Description of the parameter imageGreen is:
\copybrief imageGreen.
\details Description of the parameter imageFormatGreen is:
\copybrief imageFormatGreen.
+ \see imageGreen for more information */ + inline virtual void* get_imageGreen () const { return this->imageGreen; } + /*! \brief returns the property imageFormatGreen. + \details Description of the parameter imageGreen is:
\copybrief imageGreen.
\details Description of the parameter imageFormatGreen is:
\copybrief imageFormatGreen.
+ \see imageFormatGreen for more information */ + inline virtual JKQTFPImageFormat get_imageFormatGreen () const { return this->imageFormatGreen; } + /*! \brief sets the properties imageBlue and imageFormatBlue to the specified \a __value and \a __value2. + \details Description of the parameter imageBlue is:
\copybrief imageBlue.
\details Description of the parameter imageFormatBlue is:
\copybrief imageFormatBlue.
+ \see imageBlue and imageFormatBlue for more information */ + inline virtual void set_imageBlue (void* __value, JKQTFPImageFormat __value2) + { + bool set=false; + if (this->imageBlue != __value) { + this->imageBlue = __value; + set=true; + } + if (this->imageFormatBlue != __value2) { + this->imageFormatBlue = __value2; + set=true; + } + if (set) { + replot(); + } + } + /*! \brief returns the property imageBlue. + \details Description of the parameter imageBlue is:
\copybrief imageBlue.
\details Description of the parameter imageFormatBlue is:
\copybrief imageFormatBlue.
+ \see imageBlue for more information */ + inline virtual void* get_imageBlue () const { return this->imageBlue; } + /*! \brief returns the property imageFormatBlue. + \details Description of the parameter imageBlue is:
\copybrief imageBlue.
\details Description of the parameter imageFormatBlue is:
\copybrief imageFormatBlue.
+ \see imageFormatBlue for more information */ + inline virtual JKQTFPImageFormat get_imageFormatBlue () const { return this->imageFormatBlue; } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(const unsigned int & __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual unsigned int get_width() const + { + return this->width; + } + /*! \brief sets the property height to the specified \a __value. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual void set_height(const unsigned int & __value) + { + if (this->height != __value) { + this->height = __value; + replot(); + } + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual unsigned int get_height() const + { + return this->height; + } + /*! \brief sets the property xmin to the specified \a __value. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual void set_xmin(double __value) + { + if (this->xmin != __value) { + this->xmin = __value; + replot(); + } + } + /*! \brief returns the property xmin. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual double get_xmin() const + { + return this->xmin; + } + /*! \brief sets the property xmax to the specified \a __value. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual void set_xmax(double __value) + { + if (this->xmax != __value) { + this->xmax = __value; + replot(); + } + } + /*! \brief returns the property xmax. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual double get_xmax() const + { + return this->xmax; + } + /*! \brief sets the property ymin to the specified \a __value. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual void set_ymin(double __value) + { + if (this->ymin != __value) { + this->ymin = __value; + replot(); + } + } + /*! \brief returns the property ymin. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual double get_ymin() const + { + return this->ymin; + } + /*! \brief sets the property ymax to the specified \a __value. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual void set_ymax(double __value) + { + if (this->ymax != __value) { + this->ymax = __value; + replot(); + } + } + /*! \brief returns the property ymax. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual double get_ymax() const + { + return this->ymax; + } + /*! \brief returns the property rotation. + \details Description of the parameter rotation is:
\copybrief rotation.
. + \see rotation for more information */ + inline int get_rotation() const { + return this->rotation; + } + /*! \brief returns the property colorMinRed. + \details Description of the parameter colorMinRed is:
\copybrief colorMinRed.
. + \see colorMinRed for more information */ + inline double get_colorMinRed() const { + return this->colorMinRed; + } + /*! \brief returns the property colorMaxRed. + \details Description of the parameter colorMaxRed is:
\copybrief colorMaxRed.
. + \see colorMaxRed for more information */ + inline double get_colorMaxRed() const { + return this->colorMaxRed; + } + /*! \brief returns the property colorMinGreen. + \details Description of the parameter colorMinGreen is:
\copybrief colorMinGreen.
. + \see colorMinGreen for more information */ + inline double get_colorMinGreen() const { + return this->colorMinGreen; + } + /*! \brief returns the property colorMaxGreen. + \details Description of the parameter colorMaxGreen is:
\copybrief colorMaxGreen.
. + \see colorMaxGreen for more information */ + inline double get_colorMaxGreen() const { + return this->colorMaxGreen; + } + /*! \brief returns the property colorMinBlue. + \details Description of the parameter colorMinBlue is:
\copybrief colorMinBlue.
. + \see colorMinBlue for more information */ + inline double get_colorMinBlue() const { + return this->colorMinBlue; + } + /*! \brief returns the property colorMaxBlue. + \details Description of the parameter colorMaxBlue is:
\copybrief colorMaxBlue.
. + \see colorMaxBlue for more information */ + inline double get_colorMaxBlue() const { + return this->colorMaxBlue; + } void set_image(void* imageRed, JKQTFPImageFormat imageFormatRed, unsigned int width, unsigned int height); void set_image(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, unsigned int width, unsigned int height); void set_image(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, void* imageBlue, JKQTFPImageFormat imageFormatBlue, unsigned int width, unsigned int height); @@ -2056,7 +3527,7 @@ class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { JKQTFPimageOverlayPlot(JKQTFastPlotter* parent, bool* image, unsigned int width, unsigned int height, QColor color=QColor("red")); /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; void set_data(bool* image, unsigned int width, unsigned int height) { this->image=image; @@ -2065,16 +3536,121 @@ class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { replot(); } - JKQTPGET_MACRO(bool*, image) - JKQTPGET_MACRO(int, rotation) - JKQTPGET_MACRO(unsigned int, width) - JKQTPGET_MACRO(unsigned int, height) - JKQTPGET_SET_MACRO_I(double, xmin, replot()) - JKQTPGET_SET_MACRO_I(double, xmax, replot()) - JKQTPGET_SET_MACRO_I(double, ymin, replot()) - JKQTPGET_SET_MACRO_I(double, ymax, replot()) - JKQTPGET_SET_MACRO_I(bool, showAsSymbols, replot()) - JKQTPGET_MACRO(QColor, color) + /*! \brief returns the property image. + \details Description of the parameter image is:
\copybrief image.
. + \see image for more information */ + inline bool* get_image() const { + return this->image; + } + /*! \brief returns the property rotation. + \details Description of the parameter rotation is:
\copybrief rotation.
. + \see rotation for more information */ + inline int get_rotation() const { + return this->rotation; + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
. + \see width for more information */ + inline unsigned int get_width() const { + return this->width; + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
. + \see height for more information */ + inline unsigned int get_height() const { + return this->height; + } + /*! \brief sets the property xmin to the specified \a __value. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual void set_xmin(double __value) + { + if (this->xmin != __value) { + this->xmin = __value; + replot(); + } + } + /*! \brief returns the property xmin. + \details Description of the parameter xmin is:
\copybrief xmin.
+ \see xmin for more information */ + inline virtual double get_xmin() const + { + return this->xmin; + } + /*! \brief sets the property xmax to the specified \a __value. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual void set_xmax(double __value) + { + if (this->xmax != __value) { + this->xmax = __value; + replot(); + } + } + /*! \brief returns the property xmax. + \details Description of the parameter xmax is:
\copybrief xmax.
+ \see xmax for more information */ + inline virtual double get_xmax() const + { + return this->xmax; + } + /*! \brief sets the property ymin to the specified \a __value. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual void set_ymin(double __value) + { + if (this->ymin != __value) { + this->ymin = __value; + replot(); + } + } + /*! \brief returns the property ymin. + \details Description of the parameter ymin is:
\copybrief ymin.
+ \see ymin for more information */ + inline virtual double get_ymin() const + { + return this->ymin; + } + /*! \brief sets the property ymax to the specified \a __value. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual void set_ymax(double __value) + { + if (this->ymax != __value) { + this->ymax = __value; + replot(); + } + } + /*! \brief returns the property ymax. + \details Description of the parameter ymax is:
\copybrief ymax.
+ \see ymax for more information */ + inline virtual double get_ymax() const + { + return this->ymax; + } + /*! \brief sets the property showAsSymbols to the specified \a __value. + \details Description of the parameter showAsSymbols is:
\copybrief showAsSymbols.
+ \see showAsSymbols for more information */ + inline virtual void set_showAsSymbols(bool __value) + { + if (this->showAsSymbols != __value) { + this->showAsSymbols = __value; + replot(); + } + } + /*! \brief returns the property showAsSymbols. + \details Description of the parameter showAsSymbols is:
\copybrief showAsSymbols.
+ \see showAsSymbols for more information */ + inline virtual bool get_showAsSymbols() const + { + return this->showAsSymbols; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
. + \see color for more information */ + inline QColor get_color() const { + return this->color; + } public slots: inline void set_rotation(int rotation) { if (this->rotation!=rotation) { @@ -2127,14 +3703,110 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { JKQTFPQScaleBarXPlot(JKQTFastPlotter* parent, double width=1, const QString& label=QString("%1"), QColor color=QColor("grey"), double lineWidth=2) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(double, width, replot()) - JKQTPGET_SET_MACRO_I(double, lineWidth, replot()) - JKQTPGET_SET_MACRO_I(QColor, color, replot()) - JKQTPGET_SET_MACRO_I(QString, label, replot()) - JKQTPGET_SET_MACRO_I(QFont, font, replot()) - JKQTPGET_SET_MACRO_I(Position, position, replot()) + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + if (this->lineWidth != __value) { + this->lineWidth = __value; + replot(); + } + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + if (this->color != __value) { + this->color = __value; + replot(); + } + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property label to the specified \a __value. + \details Description of the parameter label is:
\copybrief label.
+ \see label for more information */ + inline virtual void set_label(const QString & __value) + { + if (this->label != __value) { + this->label = __value; + replot(); + } + } + /*! \brief returns the property label. + \details Description of the parameter label is:
\copybrief label.
+ \see label for more information */ + inline virtual QString get_label() const + { + return this->label; + } + /*! \brief sets the property font to the specified \a __value. + \details Description of the parameter font is:
\copybrief font.
+ \see font for more information */ + inline virtual void set_font(const QFont & __value) + { + if (this->font != __value) { + this->font = __value; + replot(); + } + } + /*! \brief returns the property font. + \details Description of the parameter font is:
\copybrief font.
+ \see font for more information */ + inline virtual QFont get_font() const + { + return this->font; + } + /*! \brief sets the property position to the specified \a __value. + \details Description of the parameter position is:
\copybrief position.
+ \see position for more information */ + inline virtual void set_position(const Position & __value) + { + if (this->position != __value) { + this->position = __value; + replot(); + } + } + /*! \brief returns the property position. + \details Description of the parameter position is:
\copybrief position.
+ \see position for more information */ + inline virtual Position get_position() const + { + return this->position; + } public slots: void set_position(int pos) { set_position((Position)pos); @@ -2168,12 +3840,76 @@ class LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot { JKQTFPQOverlayLinearGridPlot(JKQTFastPlotter* parent, double width=1, QColor color=QColor("grey"), double lineWidth=1, Qt::PenStyle style=Qt::DashLine) ; /** \brief draw the graph */ - virtual void drawGraph(QPainter& painter); + virtual void drawGraph(QPainter& painter) override; - JKQTPGET_SET_MACRO_I(double, width, replot()) - JKQTPGET_SET_MACRO_I(double, lineWidth, replot()) - JKQTPGET_SET_MACRO_I(QColor, color, replot()) - JKQTPGET_SET_MACRO_I(Qt::PenStyle, style, replot()) + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + if (this->width != __value) { + this->width = __value; + replot(); + } + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + if (this->lineWidth != __value) { + this->lineWidth = __value; + replot(); + } + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + if (this->color != __value) { + this->color = __value; + replot(); + } + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + if (this->style != __value) { + this->style = __value; + replot(); + } + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } }; #endif // JKQTFASTPLOTTER_H diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index bd5f5c5ece..632ee6de2a 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -27,6 +27,21 @@ #include //#define JKQTP_QColor2String(color) QString(jkqtp_rgbtostring((color).red(), (color).green(), (color).blue(), (color).alpha()).c_str()) +/** + * \brief saves the given property (for which also a def_property exists) into the given settings object + * \ingroup jkqtmathtext + * \internal + */ +#define JKQTMTPROPERTYsave(settings, group, var, varname) \ + if (var!=def_##var) settings.setValue(group+varname, var); +/** + * \brief loads the given property from the given settings object + * \ingroup jkqtmathtext + * \internal + */ +#define JKQTMTPROPERTYload(settings, group, var, varname, varconvert) \ + var=settings.value(group+varname, var).varconvert; + QPainterPath makeHBracePath(double x, double ybrace, double width, double bw, double cubicshrink=0.5, double cubiccontrolfac=0.3) { double xl1=x-(width)*cubicshrink+bw*cubicshrink; @@ -179,6 +194,11 @@ JKQTmathText::MTnode::MTnode(JKQTmathText* parent) { drawBoxes=false; } +JKQTmathText::MTnode::~MTnode() +{ + +} + void JKQTmathText::MTnode::getSize(QPainter &painter, JKQTmathText::MTenvironment currentEv, double &width, double &baselineHeight, double &overallHeight, double &strikeoutPos) { double w=width, b=baselineHeight, o=overallHeight, s=strikeoutPos; diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 7ab0ace12b..e00b589775 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -51,29 +51,11 @@ #define JKQTMATHTEXT_ABS_MIN_LINEWIDTH 0.02 -/** - * \brief create a property variable and a default variable for it. Also creates a doxygen comment for the default variable - * \ingroup jkqtmathtext - */ -#define JKQTMTPROPERTY(type,varname) \ - type varname; \ - /** \brief default value for property property varname. \see varname for more information */ \ - type def_##varname; -/** - * \brief saves the given property (for which also a def_property exists) into the given settings object - * \ingroup jkqtmathtext - */ -#define JKQTMTPROPERTYsave(settings, group, var, varname) \ - if (var!=def_##var) settings.setValue(group+varname, var); -/** - * \brief loads the given property from the given settings object - * \ingroup jkqtmathtext - */ -#define JKQTMTPROPERTYload(settings, group, var, varname, varconvert) \ - var=settings.value(group+varname, var).varconvert; -/** \brief initialized Qt-ressources necessary for JKQtMathText */ +/** \brief initialized Qt-ressources necessary for JKQtMathText + * \ingroup jkqtmathtext + */ LIB_EXPORT void initJKQtMathTextResources(); /*! \brief this class manages an enhanced text message (containing a subset of LaTeX markups) and allows to draw a representation @@ -187,7 +169,6 @@ class LIB_EXPORT JKQTmathText : public QObject { /*! \brief used to specify the font encoding used for drawing - - \c MTFEwinSymbol: This assumes that symbols shal be taken from a MS Windows style Symbol font - \c MTFElatex: This assumes that symbols shal be taken from the CM (computer modern) fonts, used by LaTeX - \c MTFEunicode: This assumes that symbols shall be taken from a Unicode font @@ -200,42 +181,486 @@ class LIB_EXPORT JKQTmathText : public QObject { MTFElatex }; - JKQTPGET_SET_MACRO(QColor, fontColor) - JKQTPGET_SET_MACRO(double, fontSize) - JKQTPGET_SET_MACRO(QString, fontRoman) - JKQTPGET_SET_MACRO(QString, fontSans) - JKQTPGET_SET_MACRO(QString, fontTypewriter) - JKQTPGET_SET_MACRO(QString, fontScript) - JKQTPGET_SET_MACRO(QString, fontGreek) - JKQTPGET_SET_MACRO(QString, fontSymbol) - JKQTPGET_SET_MACRO(QString, fontBraces) - JKQTPGET_SET_MACRO(QString, fontIntegrals) - JKQTPGET_SET_MACRO(QString, fontCaligraphic) - JKQTPGET_SET_MACRO(QString, fontBlackboard) - JKQTPGET_SET_MACRO(QString, fontMathRoman) - JKQTPGET_SET_MACRO(QString, fontMathSans) - JKQTPGET_SET_MACRO(QString, fontLatexPrefix) - JKQTPGET_SET_MACRO(QString, fontLatexPostfix) - JKQTPGET_SET_MACRO(MTfontEncoding, fontEncoding) - JKQTPGET_MACRO(bool, useSTIXfonts) - JKQTPGET_MACRO(bool, useXITSfonts) - JKQTPGET_SET_MACRO(double, brace_factor) - JKQTPGET_SET_MACRO(double, subsuper_size_factor) - JKQTPGET_SET_MACRO(double, italic_correction_factor) - JKQTPGET_SET_MACRO(double, operatorsubsuper_size_factor) - JKQTPGET_SET_MACRO(double, mathoperator_width_factor) - JKQTPGET_SET_MACRO(double, super_shift_factor) - JKQTPGET_SET_MACRO(double, sub_shift_factor) - JKQTPGET_SET_MACRO(double, brace_shrink_factor) - JKQTPGET_SET_MACRO(double, underbrace_factor) - JKQTPGET_SET_MACRO(double, underset_factor) - JKQTPGET_SET_MACRO(double, frac_factor) - JKQTPGET_SET_MACRO(double, frac_shift_factor) - JKQTPGET_SET_MACRO(double, brace_y_shift_factor) - JKQTPGET_SET_MACRO(double, decoration_height_factor) - JKQTPGET_SET_MACRO(bool, expensiveRendering) - JKQTPGET_SET_MACRO(bool, useUnparsed) - JKQTPGET_MACRO(QStringList, error_list) + /*! \brief sets the property fontColor to the specified \a __value. + \details Description of the parameter fontColor is:
\copybrief fontColor.
+ \see fontColor for more information */ + inline virtual void set_fontColor(const QColor & __value) + { + this->fontColor = __value; + } + /*! \brief returns the property fontColor. + \details Description of the parameter fontColor is:
\copybrief fontColor.
+ \see fontColor for more information */ + inline virtual QColor get_fontColor() const + { + return this->fontColor; + } + /*! \brief sets the property fontSize to the specified \a __value. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual void set_fontSize(double __value) + { + this->fontSize = __value; + } + /*! \brief returns the property fontSize. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual double get_fontSize() const + { + return this->fontSize; + } + /*! \brief sets the property fontRoman to the specified \a __value. + \details Description of the parameter fontRoman is:
\copybrief fontRoman.
+ \see fontRoman for more information */ + inline virtual void set_fontRoman(const QString & __value) + { + this->fontRoman = __value; + } + /*! \brief returns the property fontRoman. + \details Description of the parameter fontRoman is:
\copybrief fontRoman.
+ \see fontRoman for more information */ + inline virtual QString get_fontRoman() const + { + return this->fontRoman; + } + /*! \brief sets the property fontSans to the specified \a __value. + \details Description of the parameter fontSans is:
\copybrief fontSans.
+ \see fontSans for more information */ + inline virtual void set_fontSans(const QString & __value) + { + this->fontSans = __value; + } + /*! \brief returns the property fontSans. + \details Description of the parameter fontSans is:
\copybrief fontSans.
+ \see fontSans for more information */ + inline virtual QString get_fontSans() const + { + return this->fontSans; + } + /*! \brief sets the property fontTypewriter to the specified \a __value. + \details Description of the parameter fontTypewriter is:
\copybrief fontTypewriter.
+ \see fontTypewriter for more information */ + inline virtual void set_fontTypewriter(const QString & __value) + { + this->fontTypewriter = __value; + } + /*! \brief returns the property fontTypewriter. + \details Description of the parameter fontTypewriter is:
\copybrief fontTypewriter.
+ \see fontTypewriter for more information */ + inline virtual QString get_fontTypewriter() const + { + return this->fontTypewriter; + } + /*! \brief sets the property fontScript to the specified \a __value. + \details Description of the parameter fontScript is:
\copybrief fontScript.
+ \see fontScript for more information */ + inline virtual void set_fontScript(const QString & __value) + { + this->fontScript = __value; + } + /*! \brief returns the property fontScript. + \details Description of the parameter fontScript is:
\copybrief fontScript.
+ \see fontScript for more information */ + inline virtual QString get_fontScript() const + { + return this->fontScript; + } + /*! \brief sets the property fontGreek to the specified \a __value. + \details Description of the parameter fontGreek is:
\copybrief fontGreek.
+ \see fontGreek for more information */ + inline virtual void set_fontGreek(const QString & __value) + { + this->fontGreek = __value; + } + /*! \brief returns the property fontGreek. + \details Description of the parameter fontGreek is:
\copybrief fontGreek.
+ \see fontGreek for more information */ + inline virtual QString get_fontGreek() const + { + return this->fontGreek; + } + /*! \brief sets the property fontSymbol to the specified \a __value. + \details Description of the parameter fontSymbol is:
\copybrief fontSymbol.
+ \see fontSymbol for more information */ + inline virtual void set_fontSymbol(const QString & __value) + { + this->fontSymbol = __value; + } + /*! \brief returns the property fontSymbol. + \details Description of the parameter fontSymbol is:
\copybrief fontSymbol.
+ \see fontSymbol for more information */ + inline virtual QString get_fontSymbol() const + { + return this->fontSymbol; + } + /*! \brief sets the property fontBraces to the specified \a __value. + \details Description of the parameter fontBraces is:
\copybrief fontBraces.
+ \see fontBraces for more information */ + inline virtual void set_fontBraces(const QString & __value) + { + this->fontBraces = __value; + } + /*! \brief returns the property fontBraces. + \details Description of the parameter fontBraces is:
\copybrief fontBraces.
+ \see fontBraces for more information */ + inline virtual QString get_fontBraces() const + { + return this->fontBraces; + } + /*! \brief sets the property fontIntegrals to the specified \a __value. + \details Description of the parameter fontIntegrals is:
\copybrief fontIntegrals.
+ \see fontIntegrals for more information */ + inline virtual void set_fontIntegrals(const QString & __value) + { + this->fontIntegrals = __value; + } + /*! \brief returns the property fontIntegrals. + \details Description of the parameter fontIntegrals is:
\copybrief fontIntegrals.
+ \see fontIntegrals for more information */ + inline virtual QString get_fontIntegrals() const + { + return this->fontIntegrals; + } + /*! \brief sets the property fontCaligraphic to the specified \a __value. + \details Description of the parameter fontCaligraphic is:
\copybrief fontCaligraphic.
+ \see fontCaligraphic for more information */ + inline virtual void set_fontCaligraphic(const QString & __value) + { + this->fontCaligraphic = __value; + } + /*! \brief returns the property fontCaligraphic. + \details Description of the parameter fontCaligraphic is:
\copybrief fontCaligraphic.
+ \see fontCaligraphic for more information */ + inline virtual QString get_fontCaligraphic() const + { + return this->fontCaligraphic; + } + /*! \brief sets the property fontBlackboard to the specified \a __value. + \details Description of the parameter fontBlackboard is:
\copybrief fontBlackboard.
+ \see fontBlackboard for more information */ + inline virtual void set_fontBlackboard(const QString & __value) + { + this->fontBlackboard = __value; + } + /*! \brief returns the property fontBlackboard. + \details Description of the parameter fontBlackboard is:
\copybrief fontBlackboard.
+ \see fontBlackboard for more information */ + inline virtual QString get_fontBlackboard() const + { + return this->fontBlackboard; + } + /*! \brief sets the property fontMathRoman to the specified \a __value. + \details Description of the parameter fontMathRoman is:
\copybrief fontMathRoman.
+ \see fontMathRoman for more information */ + inline virtual void set_fontMathRoman(const QString & __value) + { + this->fontMathRoman = __value; + } + /*! \brief returns the property fontMathRoman. + \details Description of the parameter fontMathRoman is:
\copybrief fontMathRoman.
+ \see fontMathRoman for more information */ + inline virtual QString get_fontMathRoman() const + { + return this->fontMathRoman; + } + /*! \brief sets the property fontMathSans to the specified \a __value. + \details Description of the parameter fontMathSans is:
\copybrief fontMathSans.
+ \see fontMathSans for more information */ + inline virtual void set_fontMathSans(const QString & __value) + { + this->fontMathSans = __value; + } + /*! \brief returns the property fontMathSans. + \details Description of the parameter fontMathSans is:
\copybrief fontMathSans.
+ \see fontMathSans for more information */ + inline virtual QString get_fontMathSans() const + { + return this->fontMathSans; + } + /*! \brief sets the property fontLatexPrefix to the specified \a __value. + \details Description of the parameter fontLatexPrefix is:
\copybrief fontLatexPrefix.
+ \see fontLatexPrefix for more information */ + inline virtual void set_fontLatexPrefix(const QString & __value) + { + this->fontLatexPrefix = __value; + } + /*! \brief returns the property fontLatexPrefix. + \details Description of the parameter fontLatexPrefix is:
\copybrief fontLatexPrefix.
+ \see fontLatexPrefix for more information */ + inline virtual QString get_fontLatexPrefix() const + { + return this->fontLatexPrefix; + } + /*! \brief sets the property fontLatexPostfix to the specified \a __value. + \details Description of the parameter fontLatexPostfix is:
\copybrief fontLatexPostfix.
+ \see fontLatexPostfix for more information */ + inline virtual void set_fontLatexPostfix(const QString & __value) + { + this->fontLatexPostfix = __value; + } + /*! \brief returns the property fontLatexPostfix. + \details Description of the parameter fontLatexPostfix is:
\copybrief fontLatexPostfix.
+ \see fontLatexPostfix for more information */ + inline virtual QString get_fontLatexPostfix() const + { + return this->fontLatexPostfix; + } + /*! \brief sets the property fontEncoding to the specified \a __value. + \details Description of the parameter fontEncoding is:
\copybrief fontEncoding.
+ \see fontEncoding for more information */ + inline virtual void set_fontEncoding(const MTfontEncoding & __value) + { + this->fontEncoding = __value; + } + /*! \brief returns the property fontEncoding. + \details Description of the parameter fontEncoding is:
\copybrief fontEncoding.
+ \see fontEncoding for more information */ + inline virtual MTfontEncoding get_fontEncoding() const + { + return this->fontEncoding; + } + /*! \brief returns the property useSTIXfonts. + \details Description of the parameter useSTIXfonts is:
\copybrief useSTIXfonts.
. + \see useSTIXfonts for more information */ + inline bool get_useSTIXfonts() const { + return this->useSTIXfonts; + } + /*! \brief returns the property useXITSfonts. + \details Description of the parameter useXITSfonts is:
\copybrief useXITSfonts.
. + \see useXITSfonts for more information */ + inline bool get_useXITSfonts() const { + return this->useXITSfonts; + } + /*! \brief sets the property brace_factor to the specified \a __value. + \details Description of the parameter brace_factor is:
\copybrief brace_factor.
+ \see brace_factor for more information */ + inline virtual void set_brace_factor(double __value) + { + this->brace_factor = __value; + } + /*! \brief returns the property brace_factor. + \details Description of the parameter brace_factor is:
\copybrief brace_factor.
+ \see brace_factor for more information */ + inline virtual double get_brace_factor() const + { + return this->brace_factor; + } + /*! \brief sets the property subsuper_size_factor to the specified \a __value. + \details Description of the parameter subsuper_size_factor is:
\copybrief subsuper_size_factor.
+ \see subsuper_size_factor for more information */ + inline virtual void set_subsuper_size_factor(double __value) + { + this->subsuper_size_factor = __value; + } + /*! \brief returns the property subsuper_size_factor. + \details Description of the parameter subsuper_size_factor is:
\copybrief subsuper_size_factor.
+ \see subsuper_size_factor for more information */ + inline virtual double get_subsuper_size_factor() const + { + return this->subsuper_size_factor; + } + /*! \brief sets the property italic_correction_factor to the specified \a __value. + \details Description of the parameter italic_correction_factor is:
\copybrief italic_correction_factor.
+ \see italic_correction_factor for more information */ + inline virtual void set_italic_correction_factor(double __value) + { + this->italic_correction_factor = __value; + } + /*! \brief returns the property italic_correction_factor. + \details Description of the parameter italic_correction_factor is:
\copybrief italic_correction_factor.
+ \see italic_correction_factor for more information */ + inline virtual double get_italic_correction_factor() const + { + return this->italic_correction_factor; + } + /*! \brief sets the property operatorsubsuper_size_factor to the specified \a __value. + \details Description of the parameter operatorsubsuper_size_factor is:
\copybrief operatorsubsuper_size_factor.
+ \see operatorsubsuper_size_factor for more information */ + inline virtual void set_operatorsubsuper_size_factor(double __value) + { + this->operatorsubsuper_size_factor = __value; + } + /*! \brief returns the property operatorsubsuper_size_factor. + \details Description of the parameter operatorsubsuper_size_factor is:
\copybrief operatorsubsuper_size_factor.
+ \see operatorsubsuper_size_factor for more information */ + inline virtual double get_operatorsubsuper_size_factor() const + { + return this->operatorsubsuper_size_factor; + } + /*! \brief sets the property mathoperator_width_factor to the specified \a __value. + \details Description of the parameter mathoperator_width_factor is:
\copybrief mathoperator_width_factor.
+ \see mathoperator_width_factor for more information */ + inline virtual void set_mathoperator_width_factor(double __value) + { + this->mathoperator_width_factor = __value; + } + /*! \brief returns the property mathoperator_width_factor. + \details Description of the parameter mathoperator_width_factor is:
\copybrief mathoperator_width_factor.
+ \see mathoperator_width_factor for more information */ + inline virtual double get_mathoperator_width_factor() const + { + return this->mathoperator_width_factor; + } + /*! \brief sets the property super_shift_factor to the specified \a __value. + \details Description of the parameter super_shift_factor is:
\copybrief super_shift_factor.
+ \see super_shift_factor for more information */ + inline virtual void set_super_shift_factor(double __value) + { + this->super_shift_factor = __value; + } + /*! \brief returns the property super_shift_factor. + \details Description of the parameter super_shift_factor is:
\copybrief super_shift_factor.
+ \see super_shift_factor for more information */ + inline virtual double get_super_shift_factor() const + { + return this->super_shift_factor; + } + /*! \brief sets the property sub_shift_factor to the specified \a __value. + \details Description of the parameter sub_shift_factor is:
\copybrief sub_shift_factor.
+ \see sub_shift_factor for more information */ + inline virtual void set_sub_shift_factor(double __value) + { + this->sub_shift_factor = __value; + } + /*! \brief returns the property sub_shift_factor. + \details Description of the parameter sub_shift_factor is:
\copybrief sub_shift_factor.
+ \see sub_shift_factor for more information */ + inline virtual double get_sub_shift_factor() const + { + return this->sub_shift_factor; + } + /*! \brief sets the property brace_shrink_factor to the specified \a __value. + \details Description of the parameter brace_shrink_factor is:
\copybrief brace_shrink_factor.
+ \see brace_shrink_factor for more information */ + inline virtual void set_brace_shrink_factor(double __value) + { + this->brace_shrink_factor = __value; + } + /*! \brief returns the property brace_shrink_factor. + \details Description of the parameter brace_shrink_factor is:
\copybrief brace_shrink_factor.
+ \see brace_shrink_factor for more information */ + inline virtual double get_brace_shrink_factor() const + { + return this->brace_shrink_factor; + } + /*! \brief sets the property underbrace_factor to the specified \a __value. + \details Description of the parameter underbrace_factor is:
\copybrief underbrace_factor.
+ \see underbrace_factor for more information */ + inline virtual void set_underbrace_factor(double __value) + { + this->underbrace_factor = __value; + } + /*! \brief returns the property underbrace_factor. + \details Description of the parameter underbrace_factor is:
\copybrief underbrace_factor.
+ \see underbrace_factor for more information */ + inline virtual double get_underbrace_factor() const + { + return this->underbrace_factor; + } + /*! \brief sets the property underset_factor to the specified \a __value. + \details Description of the parameter underset_factor is:
\copybrief underset_factor.
+ \see underset_factor for more information */ + inline virtual void set_underset_factor(double __value) + { + this->underset_factor = __value; + } + /*! \brief returns the property underset_factor. + \details Description of the parameter underset_factor is:
\copybrief underset_factor.
+ \see underset_factor for more information */ + inline virtual double get_underset_factor() const + { + return this->underset_factor; + } + /*! \brief sets the property frac_factor to the specified \a __value. + \details Description of the parameter frac_factor is:
\copybrief frac_factor.
+ \see frac_factor for more information */ + inline virtual void set_frac_factor(double __value) + { + this->frac_factor = __value; + } + /*! \brief returns the property frac_factor. + \details Description of the parameter frac_factor is:
\copybrief frac_factor.
+ \see frac_factor for more information */ + inline virtual double get_frac_factor() const + { + return this->frac_factor; + } + /*! \brief sets the property frac_shift_factor to the specified \a __value. + \details Description of the parameter frac_shift_factor is:
\copybrief frac_shift_factor.
+ \see frac_shift_factor for more information */ + inline virtual void set_frac_shift_factor(double __value) + { + this->frac_shift_factor = __value; + } + /*! \brief returns the property frac_shift_factor. + \details Description of the parameter frac_shift_factor is:
\copybrief frac_shift_factor.
+ \see frac_shift_factor for more information */ + inline virtual double get_frac_shift_factor() const + { + return this->frac_shift_factor; + } + /*! \brief sets the property brace_y_shift_factor to the specified \a __value. + \details Description of the parameter brace_y_shift_factor is:
\copybrief brace_y_shift_factor.
+ \see brace_y_shift_factor for more information */ + inline virtual void set_brace_y_shift_factor(double __value) + { + this->brace_y_shift_factor = __value; + } + /*! \brief returns the property brace_y_shift_factor. + \details Description of the parameter brace_y_shift_factor is:
\copybrief brace_y_shift_factor.
+ \see brace_y_shift_factor for more information */ + inline virtual double get_brace_y_shift_factor() const + { + return this->brace_y_shift_factor; + } + /*! \brief sets the property decoration_height_factor to the specified \a __value. + \details Description of the parameter decoration_height_factor is:
\copybrief decoration_height_factor.
+ \see decoration_height_factor for more information */ + inline virtual void set_decoration_height_factor(double __value) + { + this->decoration_height_factor = __value; + } + /*! \brief returns the property decoration_height_factor. + \details Description of the parameter decoration_height_factor is:
\copybrief decoration_height_factor.
+ \see decoration_height_factor for more information */ + inline virtual double get_decoration_height_factor() const + { + return this->decoration_height_factor; + } + /*! \brief sets the property expensiveRendering to the specified \a __value. + \details Description of the parameter expensiveRendering is:
\copybrief expensiveRendering.
+ \see expensiveRendering for more information */ + inline virtual void set_expensiveRendering(bool __value) + { + this->expensiveRendering = __value; + } + /*! \brief returns the property expensiveRendering. + \details Description of the parameter expensiveRendering is:
\copybrief expensiveRendering.
+ \see expensiveRendering for more information */ + inline virtual bool get_expensiveRendering() const + { + return this->expensiveRendering; + } + /*! \brief sets the property useUnparsed to the specified \a __value. + \details Description of the parameter useUnparsed is:
\copybrief useUnparsed.
+ \see useUnparsed for more information */ + inline virtual void set_useUnparsed(bool __value) + { + this->useUnparsed = __value; + } + /*! \brief returns the property useUnparsed. + \details Description of the parameter useUnparsed is:
\copybrief useUnparsed.
+ \see useUnparsed for more information */ + inline virtual bool get_useUnparsed() const + { + return this->useUnparsed; + } + /*! \brief returns the property error_list. + \details Description of the parameter error_list is:
\copybrief error_list.
. + \see error_list for more information */ + inline QStringList get_error_list() const { + return this->error_list; + } protected: @@ -268,7 +693,7 @@ class LIB_EXPORT JKQTmathText : public QObject { class MTnode { public: MTnode(JKQTmathText* parent); - virtual ~MTnode() { }; + virtual ~MTnode(); virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos)=0; void getSize(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); /** \brief draw the contents at the designated position. returns the x position which to use for the next part of the text */ @@ -278,7 +703,12 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief convert node to HTML and returns \c true on success */ virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); - JKQTPGET_MACRO(bool, drawBoxes) + /*! \brief returns the property drawBoxes. + \details Description of the parameter drawBoxes is:
\copybrief drawBoxes.
. + \see drawBoxes for more information */ + inline bool get_drawBoxes() const { + return this->drawBoxes; + } virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const; protected: @@ -295,8 +725,13 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); - JKQTPGET_MACRO(QString, text) - virtual QString getTypeName() const ; + /*! \brief returns the property text. + \details Description of the parameter text is:
\copybrief text.
. + \see text for more information */ + inline QString get_text() const { + return this->text; + } + virtual QString getTypeName() const override ; protected: QString text; virtual QString textTransform(const QString& text, JKQTmathText::MTenvironment currentEv, bool forSize=false); @@ -329,7 +764,12 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); - JKQTPGET_MACRO(QString, symbolName) + /*! \brief returns the property symbolName. + \details Description of the parameter symbolName is:
\copybrief symbolName.
. + \see symbolName for more information */ + inline QString get_symbolName() const { + return this->symbolName; + } protected: /** \brief this string will be sent to the drawText method with properly set fonts */ QString symbol; @@ -367,7 +807,12 @@ class LIB_EXPORT JKQTmathText : public QObject { void addNode(MTnode* n) { nodes.append(n); } virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); - JKQTPGET_MACRO(QList, nodes) + /*! \brief returns the property nodes. + \details Description of the parameter nodes is:
\copybrief nodes.
. + \see nodes for more information */ + inline QList get_nodes() const { + return this->nodes; + } protected: QList nodes; QSet subsupOperations; @@ -384,9 +829,24 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief convert node to HTML and returns \c true on success */ virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); - JKQTPGET_MACRO(MTnode*, child) - JKQTPGET_MACRO(QString, name) - JKQTPGET_MACRO(QStringList, parameters) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } + /*! \brief returns the property name. + \details Description of the parameter name is:
\copybrief name.
. + \see name for more information */ + inline QString get_name() const { + return this->name; + } + /*! \brief returns the property parameters. + \details Description of the parameter parameters is:
\copybrief parameters.
. + \see parameters for more information */ + inline QStringList get_parameters() const { + return this->parameters; + } protected: bool setupMTenvironment(JKQTmathText::MTenvironment &ev); @@ -407,7 +867,12 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief returns true if node is subscript or superscript node */ virtual bool isSubOrSuper() ; virtual QString getTypeName() const; - JKQTPGET_MACRO(MTnode*, child) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); protected: @@ -423,7 +888,12 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); /** \brief returns true if node is subscript or superscript node */ virtual bool isSubOrSuper(); - JKQTPGET_MACRO(MTnode*, child) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } virtual QString getTypeName() const; virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); @@ -441,10 +911,30 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const; - JKQTPGET_MACRO(MTnode*, child) - JKQTPGET_MACRO(QString, openbrace) - JKQTPGET_MACRO(QString, closebrace) - JKQTPGET_MACRO(bool, showRightBrace) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } + /*! \brief returns the property openbrace. + \details Description of the parameter openbrace is:
\copybrief openbrace.
. + \see openbrace for more information */ + inline QString get_openbrace() const { + return this->openbrace; + } + /*! \brief returns the property closebrace. + \details Description of the parameter closebrace is:
\copybrief closebrace.
. + \see closebrace for more information */ + inline QString get_closebrace() const { + return this->closebrace; + } + /*! \brief returns the property showRightBrace. + \details Description of the parameter showRightBrace is:
\copybrief showRightBrace.
. + \see showRightBrace for more information */ + inline bool get_showRightBrace() const { + return this->showRightBrace; + } protected: MTnode* child; QString openbrace; @@ -465,8 +955,18 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const ; - JKQTPGET_MACRO(MTnode*, child) - JKQTPGET_MACRO(int, degree) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } + /*! \brief returns the property degree. + \details Description of the parameter degree is:
\copybrief degree.
. + \see degree for more information */ + inline int get_degree() const { + return this->degree; + } protected: MTnode* child; int degree; @@ -495,9 +995,24 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); - JKQTPGET_MACRO(MTnode*, child1) - JKQTPGET_MACRO(MTnode*, child2) - JKQTPGET_MACRO(MTfracMode, mode) + /*! \brief returns the property child1. + \details Description of the parameter child1 is:
\copybrief child1.
. + \see child1 for more information */ + inline MTnode* get_child1() const { + return this->child1; + } + /*! \brief returns the property child2. + \details Description of the parameter child2 is:
\copybrief child2.
. + \see child2 for more information */ + inline MTnode* get_child2() const { + return this->child2; + } + /*! \brief returns the property mode. + \details Description of the parameter mode is:
\copybrief mode.
. + \see mode for more information */ + inline MTfracMode get_mode() const { + return this->mode; + } protected: MTnode* child1; MTnode* child2; @@ -513,9 +1028,24 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual void getSizeInternal(QPainter& painter, MTenvironment currentEv, double& width, double& baselineHeight, double& overallHeight, double& strikeoutPos); virtual double draw(QPainter& painter, double x, double y, MTenvironment currentEv); virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); - JKQTPGET_MACRO(QVector >, children) - JKQTPGET_MACRO(int, columns) - JKQTPGET_MACRO(int, lines) + /*! \brief returns the property children. + \details Description of the parameter children is:
\copybrief children.
. + \see children for more information */ + inline QVector > get_children() const { + return this->children; + } + /*! \brief returns the property columns. + \details Description of the parameter columns is:
\copybrief columns.
. + \see columns for more information */ + inline int get_columns() const { + return this->columns; + } + /*! \brief returns the property lines. + \details Description of the parameter lines is:
\copybrief lines.
. + \see lines for more information */ + inline int get_lines() const { + return this->lines; + } protected: virtual void set_drawBoxes(bool draw); QVector > children; @@ -549,8 +1079,18 @@ class LIB_EXPORT JKQTmathText : public QObject { virtual bool toHtml(QString& html, JKQTmathText::MTenvironment currentEv, JKQTmathText::MTenvironment defaultEv); virtual void set_drawBoxes(bool draw); virtual QString getTypeName() const ; - JKQTPGET_MACRO(MTnode*, child) - JKQTPGET_MACRO(MTdecoration, decoration) + /*! \brief returns the property child. + \details Description of the parameter child is:
\copybrief child.
. + \see child for more information */ + inline MTnode* get_child() const { + return this->child; + } + /*! \brief returns the property decoration. + \details Description of the parameter decoration is:
\copybrief decoration.
. + \see decoration for more information */ + inline MTdecoration get_decoration() const { + return this->decoration; + } protected: MTnode* child; MTdecoration decoration; @@ -560,77 +1100,182 @@ class LIB_EXPORT JKQTmathText : public QObject { /** \brief font color */ - JKQTMTPROPERTY(QColor, fontColor) + QColor fontColor; + /*! \brief default value for property fontColor. + \see fontColor for more information */ + QColor def_fontColor; /** \brief base font size in points */ - JKQTMTPROPERTY(double, fontSize) + double fontSize; + /*! \brief default value for property fontSize. + \see fontSize for more information */ + double def_fontSize; /** \brief roman font */ - JKQTMTPROPERTY(QString, fontRoman) + QString fontRoman; + /*! \brief default value for property fontRoman. + \see fontRoman for more information */ + QString def_fontRoman; /** \brief sans-serif font */ - JKQTMTPROPERTY(QString, fontSans) + QString fontSans; + /*! \brief default value for property fontSans. + \see fontSans for more information */ + QString def_fontSans; /** \brief typewriter font */ - JKQTMTPROPERTY(QString, fontTypewriter) + QString fontTypewriter; + /*! \brief default value for property fontTypewriter. + \see fontTypewriter for more information */ + QString def_fontTypewriter; /** \brief script font */ - JKQTMTPROPERTY(QString, fontScript) + QString fontScript; + /*! \brief default value for property fontScript. + \see fontScript for more information */ + QString def_fontScript; /** \brief greek font */ - JKQTMTPROPERTY(QString, fontGreek) + QString fontGreek; + /*! \brief default value for property fontGreek. + \see fontGreek for more information */ + QString def_fontGreek; /** \brief symbol font, used for math symbols. */ - JKQTMTPROPERTY(QString, fontSymbol) + QString fontSymbol; + /*! \brief default value for property fontSymbol. + \see fontSymbol for more information */ + QString def_fontSymbol; /** \brief symbol font, used for braces in math mode. */ - JKQTMTPROPERTY(QString, fontBraces) + QString fontBraces; + /*! \brief default value for property fontBraces. + \see fontBraces for more information */ + QString def_fontBraces; /** \brief symbol font, used for integrals in math mode. */ - JKQTMTPROPERTY(QString, fontIntegrals) + QString fontIntegrals; + /*! \brief default value for property fontIntegrals. + \see fontIntegrals for more information */ + QString def_fontIntegrals; /** \brief font used for caligraphic symbols (escepcially in math environments) */ - JKQTMTPROPERTY(QString, fontCaligraphic) + QString fontCaligraphic; + /*! \brief default value for property fontCaligraphic. + \see fontCaligraphic for more information */ + QString def_fontCaligraphic; /** \brief font used for blackboard (double-stroke) symbols (escepcially in math environments) */ - JKQTMTPROPERTY(QString, fontBlackboard) + QString fontBlackboard; + /*! \brief default value for property fontBlackboard. + \see fontBlackboard for more information */ + QString def_fontBlackboard; /** \brief roman font for math environment */ - JKQTMTPROPERTY(QString, fontMathRoman) + QString fontMathRoman; + /*! \brief default value for property fontMathRoman. + \see fontMathRoman for more information */ + QString def_fontMathRoman; /** \brief sans font for math environment */ - JKQTMTPROPERTY(QString, fontMathSans) + QString fontMathSans; + /*! \brief default value for property fontMathSans. + \see fontMathSans for more information */ + QString def_fontMathSans; /** \brief prefix for LaTeX fonts */ - JKQTMTPROPERTY(QString, fontLatexPrefix) + QString fontLatexPrefix; + /*! \brief default value for property fontLatexPrefix. + \see fontLatexPrefix for more information */ + QString def_fontLatexPrefix; /** \brief postfix for LaTeX fonts */ - JKQTMTPROPERTY(QString, fontLatexPostfix) + QString fontLatexPostfix; + /*! \brief default value for property fontLatexPostfix. + \see fontLatexPostfix for more information */ + QString def_fontLatexPostfix; /** \brief specifies the encoding of special character fonts (default is \c MTFEwinSymbol ) */ - JKQTMTPROPERTY(MTfontEncoding, fontEncoding) + MTfontEncoding fontEncoding; + /*! \brief default value for property fontEncoding. + \see fontEncoding for more information */ + MTfontEncoding def_fontEncoding; /** \brief resizing factor for braces in math mode */ - JKQTMTPROPERTY(double, brace_factor) + double brace_factor; + /*! \brief default value for property brace_factor. + \see brace_factor for more information */ + double def_brace_factor; /** \brief shrinking the width of braces in math mode 0: reduce to 0 pixel width, 1: leave unchanged*/ - JKQTMTPROPERTY(double, brace_shrink_factor) + double brace_shrink_factor; + /*! \brief default value for property brace_shrink_factor. + \see brace_shrink_factor for more information */ + double def_brace_shrink_factor; /** \brief resizing factor for font size in sub-/superscript */ - JKQTMTPROPERTY(double, subsuper_size_factor) + double subsuper_size_factor; + /*! \brief default value for property subsuper_size_factor. + \see subsuper_size_factor for more information */ + double def_subsuper_size_factor; /** \brief fraction of a whitespace by which to shift a sub-/superscript left/right when the previous text is italic */ - JKQTMTPROPERTY(double, italic_correction_factor) + double italic_correction_factor; + /*! \brief default value for property italic_correction_factor. + \see italic_correction_factor for more information */ + double def_italic_correction_factor; /** \brief like subsuper_size_factor, but for operators (\\sum, \\int) where the text is placed above/below the symbol */ - JKQTMTPROPERTY(double, operatorsubsuper_size_factor) + double operatorsubsuper_size_factor; + /*! \brief default value for property operatorsubsuper_size_factor. + \see operatorsubsuper_size_factor for more information */ + double def_operatorsubsuper_size_factor; /** \brief factor, used to extend the size of an operator in math mode */ - JKQTMTPROPERTY(double, mathoperator_width_factor) + double mathoperator_width_factor; + /*! \brief default value for property mathoperator_width_factor. + \see mathoperator_width_factor for more information */ + double def_mathoperator_width_factor; /** \brief relative shift of text in superscript to normal text: * 0= baseline kept, 1: baseline shifted to top of normal text */ - JKQTMTPROPERTY(double, super_shift_factor) + double super_shift_factor; + /*! \brief default value for property super_shift_factor. + \see super_shift_factor for more information */ + double def_super_shift_factor; /** \brief relative shift of text in subscript to normal text: * 0= baseline kept, 1: baseline shifted to bottom of normal text */ - JKQTMTPROPERTY(double, sub_shift_factor) + double sub_shift_factor; + /*! \brief default value for property sub_shift_factor. + \see sub_shift_factor for more information */ + double def_sub_shift_factor; /** \brief indicates whether to use STIX fonts or not */ - JKQTMTPROPERTY(bool, useSTIXfonts) + bool useSTIXfonts; + /*! \brief default value for property useSTIXfonts. + \see useSTIXfonts for more information */ + bool def_useSTIXfonts; /** \brief indicates whether to use XITS fonts or not */ - JKQTMTPROPERTY(bool, useXITSfonts) + bool useXITSfonts; + /*! \brief default value for property useXITSfonts. + \see useXITSfonts for more information */ + bool def_useXITSfonts; /** \brief indicates whether to use XITS fonts or not */ - JKQTMTPROPERTY(bool, useASANAfonts) + bool useASANAfonts; + /*! \brief default value for property useASANAfonts. + \see useASANAfonts for more information */ + bool def_useASANAfonts; /** \brief scaling factor for font of nominator and denominator of a fraction */ - JKQTMTPROPERTY(double, frac_factor) + double frac_factor; + /*! \brief default value for property frac_factor. + \see frac_factor for more information */ + double def_frac_factor; /** \brief shift of denominator/nummerator away from central line of a frac */ - JKQTMTPROPERTY(double, frac_shift_factor) + double frac_shift_factor; + /*! \brief default value for property frac_shift_factor. + \see frac_shift_factor for more information */ + double def_frac_shift_factor; /** \brief scaling factor for font of underbrace/overbrace text */ - JKQTMTPROPERTY(double, underbrace_factor) + double underbrace_factor; + /*! \brief default value for property underbrace_factor. + \see underbrace_factor for more information */ + double def_underbrace_factor; /** \brief scaling factor for font of underset/overset text */ - JKQTMTPROPERTY(double, underset_factor) + double underset_factor; + /*! \brief default value for property underset_factor. + \see underset_factor for more information */ + double def_underset_factor; /** \brief fraction of the brace ascent that the brace is shifted downwards, when scaled */ - JKQTMTPROPERTY(double, brace_y_shift_factor) + double brace_y_shift_factor; + /*! \brief default value for property brace_y_shift_factor. + \see brace_y_shift_factor for more information */ + double def_brace_y_shift_factor; /** \brief size of the decorations (dot, tilde, ...), as fractio of the baselineheight */ - JKQTMTPROPERTY(double, decoration_height_factor) + double decoration_height_factor; + /*! \brief default value for property decoration_height_factor. + \see decoration_height_factor for more information */ + double def_decoration_height_factor; /** \brief switches on some options that will grant better rendering at the expense of higher time consumption */ - JKQTMTPROPERTY(bool, expensiveRendering) + bool expensiveRendering; + /*! \brief default value for property expensiveRendering. + \see expensiveRendering for more information */ + bool def_expensiveRendering; /** \brief a list that will be filled with error messages while parsing, if any error occur */ QStringList error_list; /** \brief used by the parser. This is used to implement brace pairs with \\right. */ @@ -682,7 +1327,12 @@ class LIB_EXPORT JKQTmathText : public QObject { public: - JKQTPGET_MACRO(MTnode*, parsedNode) + /*! \brief returns the property parsedNode. + \details Description of the parameter parsedNode is:
\copybrief parsedNode.
. + \see parsedNode for more information */ + inline MTnode* get_parsedNode() const { + return this->parsedNode; + } struct tbrData { explicit tbrData(const QFont& f, const QString& text, QPaintDevice *pd); diff --git a/lib/jkqtplotter/jkqtpbaseelements.h b/lib/jkqtplotter/jkqtpbaseelements.h index 0c43c235bb..0b50ff0152 100644 --- a/lib/jkqtplotter/jkqtpbaseelements.h +++ b/lib/jkqtplotter/jkqtpbaseelements.h @@ -227,101 +227,127 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { virtual void drawGrids(JKQTPEnhancedPainter& painter)=0; - /** \brief returns the property tickSpacing. \details Description of the parameter tickSpacing is:
\copybrief tickSpacing.
. \see tickSpacing for more information */ + /*! \brief returns the property tickSpacing. \details Description of the parameter tickSpacing is:
\copybrief tickSpacing.
. \see tickSpacing for more information */ inline double get_tickSpacing() const { return this->tickSpacing; } - /** \brief returns the property labelDigits. \details Description of the parameter labelDigits is:
\copybrief labelDigits.
. \see labelDigits for more information */ + /*! \brief returns the property labelDigits. \details Description of the parameter labelDigits is:
\copybrief labelDigits.
. \see labelDigits for more information */ inline int get_labelDigits() const { return this->labelDigits; } - /** \brief returns the property autoAxisSpacing. \details Description of the parameter autoAxisSpacing is:
\copybrief autoAxisSpacing.
. \see autoAxisSpacing for more information */ + /*! \brief returns the property autoAxisSpacing. \details Description of the parameter autoAxisSpacing is:
\copybrief autoAxisSpacing.
. \see autoAxisSpacing for more information */ inline bool get_autoAxisSpacing() const { return this->autoAxisSpacing; } - /** \brief returns the property minorTickLabelsEnabled. \details Description of the parameter minorTickLabelsEnabled is:
\copybrief minorTickLabelsEnabled.
. \see minorTickLabelsEnabled for more information */ + /*! \brief returns the property minorTickLabelsEnabled. \details Description of the parameter minorTickLabelsEnabled is:
\copybrief minorTickLabelsEnabled.
. \see minorTickLabelsEnabled for more information */ inline bool get_minorTickLabelsEnabled() const { return this->minorTickLabelsEnabled; } - /** \brief returns the property logAxis. \details Description of the parameter logAxis is:
\copybrief logAxis.
. \see logAxis for more information */ + /*! \brief returns the property logAxis. \details Description of the parameter logAxis is:
\copybrief logAxis.
. \see logAxis for more information */ inline bool get_logAxis() const { return this->logAxis; } - /** \brief returns the property inverted. \details Description of the parameter inverted is:
\copybrief inverted.
. \see inverted for more information */ + /*! \brief returns the property inverted. \details Description of the parameter inverted is:
\copybrief inverted.
. \see inverted for more information */ inline bool get_inverted() const { return this->inverted; } - /** \brief returns the property logAxisBase. \details Description of the parameter logAxisBase is:
\copybrief logAxisBase.
. \see logAxisBase for more information */ + /*! \brief returns the property logAxisBase. \details Description of the parameter logAxisBase is:
\copybrief logAxisBase.
. \see logAxisBase for more information */ inline double get_logAxisBase() const { return this->logAxisBase; } - /** \brief returns the property userTickSpacing. \details Description of the parameter userTickSpacing is:
\copybrief userTickSpacing.
. \see userTickSpacing for more information */ + /*! \brief returns the property userTickSpacing. \details Description of the parameter userTickSpacing is:
\copybrief userTickSpacing.
. \see userTickSpacing for more information */ inline double get_userTickSpacing() const { return this->userTickSpacing; } - /** \brief returns the property userLogTickSpacing. \details Description of the parameter userLogTickSpacing is:
\copybrief userLogTickSpacing.
. \see userLogTickSpacing for more information */ + /*! \brief returns the property userLogTickSpacing. \details Description of the parameter userLogTickSpacing is:
\copybrief userLogTickSpacing.
. \see userLogTickSpacing for more information */ inline double get_userLogTickSpacing() const { return this->userLogTickSpacing; } - /** \brief returns the property labelType. \details Description of the parameter labelType is:
\copybrief labelType.
. \see labelType for more information */ + /*! \brief returns the property labelType. \details Description of the parameter labelType is:
\copybrief labelType.
. \see labelType for more information */ inline JKQTPCAlabelType get_labelType() const { return this->labelType; } - /** \brief returns the property axisLabel. \details Description of the parameter axisLabel is:
\copybrief axisLabel.
. \see axisLabel for more information */ + /*! \brief returns the property axisLabel. \details Description of the parameter axisLabel is:
\copybrief axisLabel.
. \see axisLabel for more information */ inline QString get_axisLabel() const { return this->axisLabel; } - /** \brief returns the property labelPosition. \details Description of the parameter labelPosition is:
\copybrief labelPosition.
. \see labelPosition for more information */ + /*! \brief returns the property labelPosition. \details Description of the parameter labelPosition is:
\copybrief labelPosition.
. \see labelPosition for more information */ inline JKQTPlabelPosition get_labelPosition() const { return this->labelPosition; } - /** \brief returns the property labelFont. \details Description of the parameter labelFont is:
\copybrief labelFont.
. \see labelFont for more information */ + /*! \brief returns the property labelFont. \details Description of the parameter labelFont is:
\copybrief labelFont.
. \see labelFont for more information */ inline QString get_labelFont() const { return this->labelFont; } - /** \brief returns the property labelFontSize. \details Description of the parameter labelFontSize is:
\copybrief labelFontSize.
. \see labelFontSize for more information */ + /*! \brief returns the property labelFontSize. \details Description of the parameter labelFontSize is:
\copybrief labelFontSize.
. \see labelFontSize for more information */ inline double get_labelFontSize() const { return this->labelFontSize; } - /** \brief returns the property tickLabelFont. \details Description of the parameter tickLabelFont is:
\copybrief tickLabelFont.
. \see tickLabelFont for more information */ + /*! \brief returns the property tickLabelFont. \details Description of the parameter tickLabelFont is:
\copybrief tickLabelFont.
. \see tickLabelFont for more information */ inline QString get_tickLabelFont() const { return this->tickLabelFont; } - /** \brief returns the property tickLabelFontSize. \details Description of the parameter tickLabelFontSize is:
\copybrief tickLabelFontSize.
. \see tickLabelFontSize for more information */ + /*! \brief returns the property tickLabelFontSize. \details Description of the parameter tickLabelFontSize is:
\copybrief tickLabelFontSize.
. \see tickLabelFontSize for more information */ inline double get_tickLabelFontSize() const { return this->tickLabelFontSize; } - /** \brief returns the property minorTickLabelFontSize. \details Description of the parameter minorTickLabelFontSize is:
\copybrief minorTickLabelFontSize.
. \see minorTickLabelFontSize for more information */ + /*! \brief returns the property minorTickLabelFontSize. \details Description of the parameter minorTickLabelFontSize is:
\copybrief minorTickLabelFontSize.
. \see minorTickLabelFontSize for more information */ inline double get_minorTickLabelFontSize() const { return this->minorTickLabelFontSize; } - /** \brief returns the property minorTickLabelFullNumber. \details Description of the parameter minorTickLabelFullNumber is:
\copybrief minorTickLabelFullNumber.
. \see minorTickLabelFullNumber for more information */ + /*! \brief returns the property minorTickLabelFullNumber. \details Description of the parameter minorTickLabelFullNumber is:
\copybrief minorTickLabelFullNumber.
. \see minorTickLabelFullNumber for more information */ inline bool get_minorTickLabelFullNumber() const { return this->minorTickLabelFullNumber; } - /** \brief returns the property tickLabelAngle. \details Description of the parameter tickLabelAngle is:
\copybrief tickLabelAngle.
. \see tickLabelAngle for more information */ + /*! \brief returns the property tickLabelAngle. \details Description of the parameter tickLabelAngle is:
\copybrief tickLabelAngle.
. \see tickLabelAngle for more information */ inline double get_tickLabelAngle() const { return this->tickLabelAngle; } - /** \brief returns the property minTicks. \details Description of the parameter minTicks is:
\copybrief minTicks.
. \see minTicks for more information */ + /*! \brief returns the property minTicks. \details Description of the parameter minTicks is:
\copybrief minTicks.
. \see minTicks for more information */ inline unsigned int get_minTicks() const { return this->minTicks; } - /** \brief returns the property minorTicks. \details Description of the parameter minorTicks is:
\copybrief minorTicks.
. \see minorTicks for more information */ + /*! \brief returns the property minorTicks. \details Description of the parameter minorTicks is:
\copybrief minorTicks.
. \see minorTicks for more information */ inline unsigned int get_minorTicks() const { return this->minorTicks; } - /** \brief returns the property tickOutsideLength. \details Description of the parameter tickOutsideLength is:
\copybrief tickOutsideLength.
. \see tickOutsideLength for more information */ + /*! \brief returns the property tickOutsideLength. \details Description of the parameter tickOutsideLength is:
\copybrief tickOutsideLength.
. \see tickOutsideLength for more information */ inline double get_tickOutsideLength() const { return this->tickOutsideLength; } - /** \brief returns the property minorTickOutsideLength. \details Description of the parameter minorTickOutsideLength is:
\copybrief minorTickOutsideLength.
. \see minorTickOutsideLength for more information */ + /*! \brief returns the property minorTickOutsideLength. \details Description of the parameter minorTickOutsideLength is:
\copybrief minorTickOutsideLength.
. \see minorTickOutsideLength for more information */ inline double get_minorTickOutsideLength() const { return this->minorTickOutsideLength; } - /** \brief returns the property axisColor. \details Description of the parameter axisColor is:
\copybrief axisColor.
. \see axisColor for more information */ + /*! \brief returns the property axisColor. \details Description of the parameter axisColor is:
\copybrief axisColor.
. \see axisColor for more information */ inline QColor get_axisColor() const { return this->axisColor; } - /** \brief returns the property showZeroAxis. \details Description of the parameter showZeroAxis is:
\copybrief showZeroAxis.
. \see showZeroAxis for more information */ + /*! \brief returns the property showZeroAxis. \details Description of the parameter showZeroAxis is:
\copybrief showZeroAxis.
. \see showZeroAxis for more information */ inline bool get_showZeroAxis() const { return this->showZeroAxis; } - /** \brief returns the property gridColor. \details Description of the parameter gridColor is:
\copybrief gridColor.
. \see gridColor for more information */ + /*! \brief returns the property gridColor. \details Description of the parameter gridColor is:
\copybrief gridColor.
. \see gridColor for more information */ inline QColor get_gridColor() const { return this->gridColor; } - /** \brief returns the property minorGridColor. \details Description of the parameter minorGridColor is:
\copybrief minorGridColor.
. \see minorGridColor for more information */ + /*! \brief returns the property minorGridColor. \details Description of the parameter minorGridColor is:
\copybrief minorGridColor.
. \see minorGridColor for more information */ inline QColor get_minorGridColor() const { return this->minorGridColor; } - /** \brief returns the property gridWidth. \details Description of the parameter gridWidth is:
\copybrief gridWidth.
. \see gridWidth for more information */ + /*! \brief returns the property gridWidth. \details Description of the parameter gridWidth is:
\copybrief gridWidth.
. \see gridWidth for more information */ inline double get_gridWidth() const { return this->gridWidth; } - /** \brief returns the property gridStyle. \details Description of the parameter gridStyle is:
\copybrief gridStyle.
. \see gridStyle for more information */ + /*! \brief returns the property gridStyle. \details Description of the parameter gridStyle is:
\copybrief gridStyle.
. \see gridStyle for more information */ inline Qt::PenStyle get_gridStyle() const { return this->gridStyle; } - /** \brief returns the property minorGridWidth. \details Description of the parameter minorGridWidth is:
\copybrief minorGridWidth.
. \see minorGridWidth for more information */ + /*! \brief returns the property minorGridWidth. \details Description of the parameter minorGridWidth is:
\copybrief minorGridWidth.
. \see minorGridWidth for more information */ inline double get_minorGridWidth() const { return this->minorGridWidth; } - /** \brief returns the property minorGridStyle. \details Description of the parameter minorGridStyle is:
\copybrief minorGridStyle.
. \see minorGridStyle for more information */ + /*! \brief returns the property minorGridStyle. \details Description of the parameter minorGridStyle is:
\copybrief minorGridStyle.
. \see minorGridStyle for more information */ inline Qt::PenStyle get_minorGridStyle() const { return this->minorGridStyle; } - /** \brief returns the property tickTimeFormat. \details Description of the parameter tickTimeFormat is:
\copybrief tickTimeFormat.
. \see tickTimeFormat for more information */ + /*! \brief returns the property tickTimeFormat. \details Description of the parameter tickTimeFormat is:
\copybrief tickTimeFormat.
. \see tickTimeFormat for more information */ inline QString get_tickTimeFormat() const { return this->tickTimeFormat; } - /** \brief returns the property tickDateFormat. \details Description of the parameter tickDateFormat is:
\copybrief tickDateFormat.
. \see tickDateFormat for more information */ + /*! \brief returns the property tickDateFormat. \details Description of the parameter tickDateFormat is:
\copybrief tickDateFormat.
. \see tickDateFormat for more information */ inline QString get_tickDateFormat() const { return this->tickDateFormat; } - /** \brief returns the property tickDateTimeFormat. \details Description of the parameter tickDateTimeFormat is:
\copybrief tickDateTimeFormat.
. \see tickDateTimeFormat for more information */ + /*! \brief returns the property tickDateTimeFormat. \details Description of the parameter tickDateTimeFormat is:
\copybrief tickDateTimeFormat.
. \see tickDateTimeFormat for more information */ inline QString get_tickDateTimeFormat() const { return this->tickDateTimeFormat; } - /** \brief returns the property tickMode. \details Description of the parameter tickMode is:
\copybrief tickMode.
. \see tickMode for more information */ + /*! \brief returns the property tickMode. \details Description of the parameter tickMode is:
\copybrief tickMode.
. \see tickMode for more information */ inline JKQTPLabelTickMode get_tickMode() const { return this->tickMode; } - /** \brief returns the property drawMode1. \details Description of the parameter drawMode1 is:
\copybrief drawMode1.
. \see drawMode1 for more information */ + /*! \brief returns the property drawMode1. \details Description of the parameter drawMode1 is:
\copybrief drawMode1.
. \see drawMode1 for more information */ inline JKQTPCAdrawMode get_drawMode1() const { return this->drawMode1; } - /** \brief returns the property drawMode2. \details Description of the parameter drawMode2 is:
\copybrief drawMode2.
. \see drawMode2 for more information */ + /*! \brief returns the property drawMode2. \details Description of the parameter drawMode2 is:
\copybrief drawMode2.
. \see drawMode2 for more information */ inline JKQTPCAdrawMode get_drawMode2() const { return this->drawMode2; } - /** \brief returns the property minorTickWidth. \details Description of the parameter minorTickWidth is:
\copybrief minorTickWidth.
. \see minorTickWidth for more information */ + /*! \brief returns the property minorTickWidth. \details Description of the parameter minorTickWidth is:
\copybrief minorTickWidth.
. \see minorTickWidth for more information */ inline double get_minorTickWidth() const { return this->minorTickWidth; } - /** \brief returns the property tickWidth. \details Description of the parameter tickWidth is:
\copybrief tickWidth.
. \see tickWidth for more information */ + /*! \brief returns the property tickWidth. \details Description of the parameter tickWidth is:
\copybrief tickWidth.
. \see tickWidth for more information */ inline double get_tickWidth() const { return this->tickWidth; } - /** \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copybrief lineWidth.
. \see lineWidth for more information */ + /*! \brief returns the property lineWidth. \details Description of the parameter lineWidth is:
\copybrief lineWidth.
. \see lineWidth for more information */ inline double get_lineWidth() const { return this->lineWidth; } - /** \brief returns the property lineWidthZeroAxis. \details Description of the parameter lineWidthZeroAxis is:
\copybrief lineWidthZeroAxis.
. \see lineWidthZeroAxis for more information */ + /*! \brief returns the property lineWidthZeroAxis. \details Description of the parameter lineWidthZeroAxis is:
\copybrief lineWidthZeroAxis.
. \see lineWidthZeroAxis for more information */ inline double get_lineWidthZeroAxis() const { return this->lineWidthZeroAxis; } - /** \brief returns the property tickLabelDistance. \details Description of the parameter tickLabelDistance is:
\copybrief tickLabelDistance.
. \see tickLabelDistance for more information */ + /*! \brief returns the property tickLabelDistance. \details Description of the parameter tickLabelDistance is:
\copybrief tickLabelDistance.
. \see tickLabelDistance for more information */ inline double get_tickLabelDistance() const { return this->tickLabelDistance; } - /** \brief returns the property labelDistance. \details Description of the parameter labelDistance is:
\copybrief labelDistance.
. \see labelDistance for more information */ + /*! \brief returns the property labelDistance. \details Description of the parameter labelDistance is:
\copybrief labelDistance.
. \see labelDistance for more information */ inline double get_labelDistance() const { return this->labelDistance; } - /** \brief returns the property drawGrid. \details Description of the parameter drawGrid is:
\copybrief drawGrid.
. \see drawGrid for more information */ + /*! \brief returns the property drawGrid. \details Description of the parameter drawGrid is:
\copybrief drawGrid.
. \see drawGrid for more information */ inline bool get_drawGrid() const { return this->drawGrid; } - /** \brief returns the property drawMinorGrid. \details Description of the parameter drawMinorGrid is:
\copybrief drawMinorGrid.
. \see drawMinorGrid for more information */ + /*! \brief returns the property drawMinorGrid. \details Description of the parameter drawMinorGrid is:
\copybrief drawMinorGrid.
. \see drawMinorGrid for more information */ inline bool get_drawMinorGrid() const { return this->drawMinorGrid; } - JKQTPGET_SET_MACRO(bool, autoLabelDigits) - /** \brief returns the property parent. \details Description of the parameter parent is:
\copybrief parent.
. \see parent for more information */ + /*! \brief sets the property autoLabelDigits to the specified \a __value. + \details Description of the parameter autoLabelDigits is:
\copybrief autoLabelDigits.
+ \see autoLabelDigits for more information */ + inline virtual void set_autoLabelDigits(bool __value) + { + this->autoLabelDigits = __value; + } + /*! \brief returns the property autoLabelDigits. + \details Description of the parameter autoLabelDigits is:
\copybrief autoLabelDigits.
+ \see autoLabelDigits for more information */ + inline virtual bool get_autoLabelDigits() const + { + return this->autoLabelDigits; + } + /*! \brief returns the property parent. \details Description of the parameter parent is:
\copybrief parent.
. \see parent for more information */ inline JKQtBasePlotter* get_parent() const { return this->parent; } - JKQTPGET_SET_MACRO(bool, doUpdateScaling) + /*! \brief sets the property doUpdateScaling to the specified \a __value. + \details Description of the parameter doUpdateScaling is:
\copybrief doUpdateScaling.
+ \see doUpdateScaling for more information */ + inline virtual void set_doUpdateScaling(bool __value) + { + this->doUpdateScaling = __value; + } + /*! \brief returns the property doUpdateScaling. + \details Description of the parameter doUpdateScaling is:
\copybrief doUpdateScaling.
+ \see doUpdateScaling for more information */ + inline virtual bool get_doUpdateScaling() const + { + return this->doUpdateScaling; + } /** \brief returns the current min */ @@ -640,41 +666,41 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { bool autoLabelDigits; /** \brief indicates whether the object should use automatic tick spacing for the x axis (calculated by calcPlotScaling() ) */ bool autoAxisSpacing; - /** \brief default value for property property varname. \see autoAxisSpacing for more information */ + /*! \brief default value for property property varname. \see autoAxisSpacing for more information */ bool def_autoAxisSpacing; /** \brief if \c true, the plotter displays minor axis labels as number between 1 and 10 in some cases */ bool minorTickLabelsEnabled; - /** \brief default value for property property varname. \see minorTickLabelsEnabled for more information */ + /*! \brief default value for property property varname. \see minorTickLabelsEnabled for more information */ bool def_minorTickLabelsEnabled; /** \brief indicates whether the y axis has a logarithmic scale */ bool logAxis; - /** \brief default value for property property varname. \see logAxis for more information */ + /*! \brief default value for property property varname. \see logAxis for more information */ bool def_logAxis; /** \brief the base for a logarithmic x axis */ double logAxisBase; - /** \brief default value for property property varname. \see logAxisBase for more information */ + /*! \brief default value for property property varname. \see logAxisBase for more information */ double def_logAxisBase; /** \brief if autoXAxisSpacing is \c false then this value is used for xTickSpacing. So this is the property which * is editable by use of public access methods. */ double userTickSpacing; - /** \brief default value for property property varname. \see userTickSpacing for more information */ + /*! \brief default value for property property varname. \see userTickSpacing for more information */ double def_userTickSpacing; /** \brief if autoXAxisSpacing is \c false then this value is used for xTickSpacing. So this is the property which * is editable by use of public access methods. */ double userLogTickSpacing; - /** \brief default value for property property varname. \see userLogTickSpacing for more information */ + /*! \brief default value for property property varname. \see userLogTickSpacing for more information */ double def_userLogTickSpacing; /** \brief indicates how to draw the labels */ JKQTPCAlabelType labelType; - /** \brief default value for property property varname. \see labelType for more information */ + /*! \brief default value for property property varname. \see labelType for more information */ JKQTPCAlabelType def_labelType; /** \brief mode of the major ticks */ JKQTPLabelTickMode tickMode; - /** \brief default value for property property varname. \see tickMode for more information */ + /*! \brief default value for property property varname. \see tickMode for more information */ JKQTPLabelTickMode def_tickMode; /** \brief axis label of the axis */ @@ -682,75 +708,75 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief position of the axis label */ JKQTPlabelPosition labelPosition; - /** \brief default value for property property varname. \see labelPosition for more information */ + /*! \brief default value for property property varname. \see labelPosition for more information */ JKQTPlabelPosition def_labelPosition; /** \brief font of the axis labels */ QString labelFont; - /** \brief default value for property property varname. \see labelFont for more information */ + /*! \brief default value for property property varname. \see labelFont for more information */ QString def_labelFont; /** \brief fontsize of the axis labels */ double labelFontSize; - /** \brief default value for property property varname. \see labelFontSize for more information */ + /*! \brief default value for property property varname. \see labelFontSize for more information */ double def_labelFontSize; /** \brief font of the axis tick labels */ QString tickLabelFont; - /** \brief default value for property property varname. \see tickLabelFont for more information */ + /*! \brief default value for property property varname. \see tickLabelFont for more information */ QString def_tickLabelFont; /** \brief fontsize of the axis tick labels */ double tickLabelFontSize; - /** \brief default value for property property varname. \see tickLabelFontSize for more information */ + /*! \brief default value for property property varname. \see tickLabelFontSize for more information */ double def_tickLabelFontSize; /** \brief fontsize of the minor axis tick labels */ double minorTickLabelFontSize; - /** \brief default value for property property varname. \see minorTickLabelFontSize for more information */ + /*! \brief default value for property property varname. \see minorTickLabelFontSize for more information */ double def_minorTickLabelFontSize; /** \brief indicates whether to draw a thick axis line at x=0 (zero axis) */ bool showZeroAxis; - /** \brief default value for property property varname. \see showZeroAxis for more information */ + /*! \brief default value for property property varname. \see showZeroAxis for more information */ bool def_showZeroAxis; /** \brief indicates whether the minor tick labels should be full numbers, or just a number between 0..10 */ bool minorTickLabelFullNumber; - /** \brief default value for property property varname. \see minorTickLabelFullNumber for more information */ + /*! \brief default value for property property varname. \see minorTickLabelFullNumber for more information */ bool def_minorTickLabelFullNumber; /** \brief draw mode of the main (left/bottom) axis */ JKQTPCAdrawMode drawMode1; - /** \brief default value for property property varname. \see drawMode1 for more information */ + /*! \brief default value for property property varname. \see drawMode1 for more information */ JKQTPCAdrawMode def_drawMode1; /** \brief draw mode of the secondary (right/top) axis */ JKQTPCAdrawMode drawMode2; - /** \brief default value for property property varname. \see drawMode2 for more information */ + /*! \brief default value for property property varname. \see drawMode2 for more information */ JKQTPCAdrawMode def_drawMode2; /** \brief line width of minor ticks in pixels */ double minorTickWidth; - /** \brief default value for property property varname. \see minorTickWidth for more information */ + /*! \brief default value for property property varname. \see minorTickWidth for more information */ double def_minorTickWidth; /** \brief line width of ticks in pixels */ double tickWidth; - /** \brief default value for property property varname. \see tickWidth for more information */ + /*! \brief default value for property property varname. \see tickWidth for more information */ double def_tickWidth; /** \brief line width of axis in pixels */ double lineWidth; - /** \brief default value for property property varname. \see lineWidth for more information */ + /*! \brief default value for property property varname. \see lineWidth for more information */ double def_lineWidth; /** \brief line width of 0-line in pixels */ double lineWidthZeroAxis; - /** \brief default value for property property varname. \see lineWidthZeroAxis for more information */ + /*! \brief default value for property property varname. \see lineWidthZeroAxis for more information */ double def_lineWidthZeroAxis; /** \brief format string for time tick labels, see see QDateTime::toString() documentation for details on format strings */ QString tickTimeFormat; - /** \brief default value for property property varname. \see tickTimeFormat for more information */ + /*! \brief default value for property property varname. \see tickTimeFormat for more information */ QString def_tickTimeFormat; /** \brief format string for date tick labels, see see QDateTime::toString() documentation for details on format strings */ QString tickDateFormat; - /** \brief default value for property property varname. \see tickDateFormat for more information */ + /*! \brief default value for property property varname. \see tickDateFormat for more information */ QString def_tickDateFormat; /** \brief format string for datetime tick labels, see see QDateTime::toString() documentation for details on format strings */ QString tickDateTimeFormat; - /** \brief default value for property property varname. \see tickDateTimeFormat for more information */ + /*! \brief default value for property property varname. \see tickDateTimeFormat for more information */ QString def_tickDateTimeFormat; /** \brief calculates the tick spacing for a linear axis that spans \a awidth and that should @@ -788,76 +814,76 @@ class LIB_EXPORT JKQTPcoordinateAxis: public QObject { /** \brief minimum number of axis ticks */ unsigned int minTicks; - /** \brief default value for property property varname. \see minTicks for more information */ + /*! \brief default value for property property varname. \see minTicks for more information */ unsigned int def_minTicks; /** \brief number of minor grid lines per axis tick interval */ unsigned int minorTicks; - /** \brief default value for property property varname. \see minorTicks for more information */ + /*! \brief default value for property property varname. \see minorTicks for more information */ unsigned int def_minorTicks; /** \brief length of an axis tick outside the plot border in pt */ double tickOutsideLength; - /** \brief default value for property property varname. \see tickOutsideLength for more information */ + /*! \brief default value for property property varname. \see tickOutsideLength for more information */ double def_tickOutsideLength; /** \brief length of a minor axis tick outside the plot border in pt */ double minorTickOutsideLength; - /** \brief default value for property property varname. \see minorTickOutsideLength for more information */ + /*! \brief default value for property property varname. \see minorTickOutsideLength for more information */ double def_minorTickOutsideLength; /** \brief length of an axis tick inside the plot border in pt */ double tickInsideLength; - /** \brief default value for property property varname. \see tickInsideLength for more information */ + /*! \brief default value for property property varname. \see tickInsideLength for more information */ double def_tickInsideLength; /** \brief length of a minor axis tick inside the plot border in pt */ double minorTickInsideLength; - /** \brief default value for property property varname. \see minorTickInsideLength for more information */ + /*! \brief default value for property property varname. \see minorTickInsideLength for more information */ double def_minorTickInsideLength; /** \brief color of the axis (labels, ticks, axis itself ...) */ QColor axisColor; - /** \brief default value for property property varname. \see axisColor for more information */ + /*! \brief default value for property property varname. \see axisColor for more information */ QColor def_axisColor; /** \brief distance between tick end and label start in pt */ double tickLabelDistance; - /** \brief default value for property property varname. \see tickLabelDistance for more information */ + /*! \brief default value for property property varname. \see tickLabelDistance for more information */ double def_tickLabelDistance; /** \brief distance between tick label and axis label in pt */ double labelDistance; - /** \brief default value for property property varname. \see labelDistance for more information */ + /*! \brief default value for property property varname. \see labelDistance for more information */ double def_labelDistance; /** \brief rotation angle of tick labels [-180..180], i.e. given in degrees, default is 0 (horizontal) */ double tickLabelAngle; - /** \brief default value for property property varname. \see tickLabelAngle for more information */ + /*! \brief default value for property property varname. \see tickLabelAngle for more information */ double def_tickLabelAngle; /** \brief indicates whether to draw the major grid lines */ bool drawGrid; - /** \brief default value for property property varname. \see drawGrid for more information */ + /*! \brief default value for property property varname. \see drawGrid for more information */ bool def_drawGrid; /** \brief indicates whether to draw the minor grid lines */ bool drawMinorGrid; - /** \brief default value for property property varname. \see drawMinorGrid for more information */ + /*! \brief default value for property property varname. \see drawMinorGrid for more information */ bool def_drawMinorGrid; /** \brief color of the grid*/ QColor gridColor; - /** \brief default value for property property varname. \see gridColor for more information */ + /*! \brief default value for property property varname. \see gridColor for more information */ QColor def_gridColor; /** \brief color of the minor grid lines */ QColor minorGridColor; - /** \brief default value for property property varname. \see minorGridColor for more information */ + /*! \brief default value for property property varname. \see minorGridColor for more information */ QColor def_minorGridColor; /** \brief width of the grid lines (in pixel) */ double gridWidth; - /** \brief default value for property property varname. \see gridWidth for more information */ + /*! \brief default value for property property varname. \see gridWidth for more information */ double def_gridWidth; /** \brief line stye of the grid lines */ Qt::PenStyle gridStyle; - /** \brief default value for property property varname. \see gridStyle for more information */ + /*! \brief default value for property property varname. \see gridStyle for more information */ Qt::PenStyle def_gridStyle; /** \brief width of the minor grid lines (in pixel) */ double minorGridWidth; - /** \brief default value for property property varname. \see minorGridWidth for more information */ + /*! \brief default value for property property varname. \see minorGridWidth for more information */ double def_minorGridWidth; /** \brief line stye of the minor grid lines */ Qt::PenStyle minorGridStyle; - /** \brief default value for property property varname. \see minorGridStyle for more information */ + /*! \brief default value for property property varname. \see minorGridStyle for more information */ Qt::PenStyle def_minorGridStyle; /** \brief axis prefix for storage of parameters */ diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 0255cc1006..ab5b3819d3 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -244,11 +244,11 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief the decimal separator used when exporting data to text files */ QString CSVdecimalSeparator; - /** \brief default value for property property varname. \see CSVdecimalSeparator for more information */ + /*! \brief default value for property property varname. \see CSVdecimalSeparator for more information */ QString def_CSVdecimalSeparator; /** \brief this string is used to introduce comments in text output when exporting data */ QString CSVcommentInitializer; - /** \brief default value for property property varname. \see CSVcommentInitializer for more information */ + /*! \brief default value for property property varname. \see CSVcommentInitializer for more information */ QString def_CSVcommentInitializer; /** \brief an object which manages all data columns for this plotter class */ @@ -267,7 +267,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \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 */ int plotBorderTop; - /** \brief default value for property property varname. \see plotBorderTop for more information */ + /*! \brief default value for property property varname. \see plotBorderTop for more information */ int def_plotBorderTop; /** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */ int iplotBorderTop; @@ -277,7 +277,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \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 */ int plotBorderLeft; - /** \brief default value for property property varname. \see plotBorderLeft for more information */ + /*! \brief default value for property property varname. \see plotBorderLeft for more information */ int def_plotBorderLeft; /** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */ int iplotBorderLeft; @@ -285,7 +285,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \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 */ int plotBorderBottom; - /** \brief default value for property property varname. \see plotBorderBottom for more information */ + /*! \brief default value for property property varname. \see plotBorderBottom for more information */ int def_plotBorderBottom; /** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */ int iplotBorderBottom; @@ -293,7 +293,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \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 */ int plotBorderRight; - /** \brief default value for property property varname. \see plotBorderRight for more information */ + /*! \brief default value for property property varname. \see plotBorderRight for more information */ int def_plotBorderRight; /** \brief free space between widget top border and plot top border, as used to plot the graph (mnay be altered from user input ) */ int iplotBorderRight; @@ -312,20 +312,20 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief indicates whether the widget should maintain an aspect ratio of plotwidth and plotheight */ bool maintainAspectRatio; - /** \brief default value for property property varname. \see maintainAspectRatio for more information */ + /*! \brief default value for property property varname. \see maintainAspectRatio for more information */ bool def_maintainAspectRatio; /** \brief the aspect ratio of plotwidth and plotheight to maintain, if \c maintainAspectRatio==true */ double aspectRatio; - /** \brief default value for property property varname. \see aspectRatio for more information */ + /*! \brief default value for property property varname. \see aspectRatio for more information */ double def_aspectRatio; /** \brief indicates whether the axes should maintain an aspect ratio */ bool maintainAxisAspectRatio; - /** \brief default value for property property varname. \see maintainAxisAspectRatio for more information */ + /*! \brief default value for property property varname. \see maintainAxisAspectRatio for more information */ bool def_maintainAxisAspectRatio; /** \brief the aspect ratio of axis widths to maintain, if \c maintainAxisAspectRatio==true */ double axisAspectRatio; - /** \brief default value for property property varname. \see axisAspectRatio for more information */ + /*! \brief default value for property property varname. \see axisAspectRatio for more information */ double def_axisAspectRatio; /** \brief plot width in pixels inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth) */ @@ -337,7 +337,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief color of the plotted graph */ QColor graphColor; - /** \brief default value for property property varname. \see graphColor for more information */ + /*! \brief default value for property property varname. \see graphColor for more information */ QColor def_graphColor; /** \brief colors used in modes where more than one graph is beeing plottet */ QColor manyGraphsColor[50]; @@ -346,11 +346,11 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { int manyGraphsColorCount; /** \brief pen styles used in modes where more than one graph is beeing plottet */ Qt::PenStyle manyGraphsStyle[5]; - /** \brief default value for property property varname. \see manyGraphsStyle[5] for more information */ + /*! \brief default value for property property varname. \see manyGraphsStyle[5] for more information */ Qt::PenStyle def_manyGraphsStyle[5]; /** \brief width of the plotted graph (in pixel) */ double graphWidth; - /** \brief default value for property property varname. \see graphWidth for more information */ + /*! \brief default value for property property varname. \see graphWidth for more information */ double def_graphWidth; @@ -362,101 +362,101 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief color of the coordinate system */ QColor systemColor; - /** \brief default value for property property varname. \see systemColor for more information */ + /*! \brief default value for property property varname. \see systemColor for more information */ QColor def_systemColor; /** \brief width of the coordinate (in pixel) */ double systemWidth; - /** \brief default value for property property varname. \see systemWidth for more information */ + /*! \brief default value for property property varname. \see systemWidth for more information */ double def_systemWidth; /** \brief color of the background*/ QColor backgroundColor; - /** \brief default value for property property varname. \see backgroundColor for more information */ + /*! \brief default value for property property varname. \see backgroundColor for more information */ QColor def_backgroundColor; /** \brief color of the background when exporting*/ QColor exportBackgroundColor; - /** \brief default value for property property varname. \see exportBackgroundColor for more information */ + /*! \brief default value for property property varname. \see exportBackgroundColor for more information */ QColor def_exportBackgroundColor; /** \brief color of the plot's background*/ QColor plotBackgroundColor; - /** \brief default value for property property varname. \see plotBackgroundColor for more information */ + /*! \brief default value for property property varname. \see plotBackgroundColor for more information */ QColor def_plotBackgroundColor; /** \brief indicates whether to plot a frame around the key */ bool showKeyFrame; - /** \brief default value for property property varname. \see showKeyFrame for more information */ + /*! \brief default value for property property varname. \see showKeyFrame for more information */ bool def_showKeyFrame; /** \brief color of the key frame line */ QColor keyFrameColor; - /** \brief default value for property property varname. \see keyFrameColor for more information */ + /*! \brief default value for property property varname. \see keyFrameColor for more information */ QColor def_keyFrameColor; /** \brief width of the key frame line */ double keyFrameWidth; - /** \brief default value for property property varname. \see keyFrameWidth for more information */ + /*! \brief default value for property property varname. \see keyFrameWidth for more information */ double def_keyFrameWidth; /** \brief color of the key background */ QColor keyBackgroundColor; - /** \brief default value for property property varname. \see keyBackgroundColor for more information */ + /*! \brief default value for property property varname. \see keyBackgroundColor for more information */ QColor def_keyBackgroundColor; /** \brief indicates whether to plot a key */ bool showKey; - /** \brief default value for property property varname. \see showKey for more information */ + /*! \brief default value for property property varname. \see showKey for more information */ bool def_showKey; /** \brief font face for key labels */ QString keyFont; - /** \brief default value for property property varname. \see keyFont for more information */ + /*! \brief default value for property property varname. \see keyFont for more information */ QString def_keyFont; /** \brief font size for key labels [in points] */ double keyFontSize; - /** \brief default value for property property varname. \see keyFontSize for more information */ + /*! \brief default value for property property varname. \see keyFontSize for more information */ double def_keyFontSize; /** \brief width of a key item in pixels [in units of width of 'X' set in keyFont, keyFontSize] */ double key_item_width; - /** \brief default value for property property varname. \see key_item_width for more information */ + /*! \brief default value for property property varname. \see key_item_width for more information */ double def_key_item_width; /** \brief height of a key item in pixels [in units of height keyFont, keyFontSize] */ double key_item_height; - /** \brief default value for property property varname. \see key_item_height for more information */ + /*! \brief default value for property property varname. \see key_item_height for more information */ double def_key_item_height; /** \brief length of the line samples in the key in pixels [in units of width of 'X' set in keyFont, keyFontSize] */ double key_line_length; - /** \brief default value for property property varname. \see key_line_length for more information */ + /*! \brief default value for property property varname. \see key_line_length for more information */ double def_key_line_length; /** \brief x-distance between key frame and key content [in units of width of 'X' set in keyFont, keyFontSize] */ double keyXMargin; - /** \brief default value for property property varname. \see keyXMargin for more information */ + /*! \brief default value for property property varname. \see keyXMargin for more information */ double def_keyXMargin; /** \brief y-distance between key frame and key content [in units of width of 'x' set in keyFont, keyFontSize] */ double keyYMargin; - /** \brief default value for property property varname. \see keyYMargin for more information */ + /*! \brief default value for property property varname. \see keyYMargin for more information */ double def_keyYMargin; /** \brief x-offset of the key from the border of the plot [in units of width of 'X' set in keyFont, keyFontSize] */ double keyXOffset; - /** \brief default value for property property varname. \see keyXOffset for more information */ + /*! \brief default value for property property varname. \see keyXOffset for more information */ double def_keyXOffset; /** \brief y-offset of the key from the border of the plot [in units of width of 'x' set in keyFont, keyFontSize] */ double keyYOffset; - /** \brief default value for property property varname. \see keyYOffset for more information */ + /*! \brief default value for property property varname. \see keyYOffset for more information */ double def_keyYOffset; /** \brief distance between key line example and key text [in units of width of 'X' set in keyFont, keyFontSize] */ double keyXSeparation; - /** \brief default value for property property varname. \see keyXSeparation for more information */ + /*! \brief default value for property property varname. \see keyXSeparation for more information */ double def_keyXSeparation; /** \brief distance between two key entries [in units of height of keyFont, keyFontSize] */ double keyYSeparation; - /** \brief default value for property property varname. \see keyYSeparation for more information */ + /*! \brief default value for property property varname. \see keyYSeparation for more information */ double def_keyYSeparation; /** \brief key position */ JKQTPkeyPosition keyPosition; - /** \brief default value for property property varname. \see keyPosition for more information */ + /*! \brief default value for property property varname. \see keyPosition for more information */ JKQTPkeyPosition def_keyPosition; /** \brief the key layout */ JKQTPkeyLayout keyLayout; - /** \brief default value for property property varname. \see keyLayout for more information */ + /*! \brief default value for property property varname. \see keyLayout for more information */ JKQTPkeyLayout def_keyLayout; /** \brief determine width of the key automatically */ bool keyAutosize; - /** \brief default value for property property varname. \see keyAutosize for more information */ + /*! \brief default value for property property varname. \see keyAutosize for more information */ bool def_keyAutosize; /** \brief the plot label text */ @@ -464,12 +464,12 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief the plot label font name */ QString plotLabelFontname; - /** \brief default value for property property varname. \see plotLabelFontname for more information */ + /*! \brief default value for property property varname. \see plotLabelFontname for more information */ QString def_plotLabelFontname; /** \brief the plot label font size */ double plotLabelFontSize; - /** \brief default value for property property varname. \see plotLabelFontSize for more information */ + /*! \brief default value for property property varname. \see plotLabelFontSize for more information */ double def_plotLabelFontSize; /** \brief calculate the scaling and offset values from axis min/max values */ @@ -483,7 +483,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief specifies whether to use antialiasing for plotting the coordinate system */ bool useAntiAliasingForSystem; - /** \brief default value for property property varname. \see useAntiAliasingForSystem for more information */ + /*! \brief default value for property property varname. \see useAntiAliasingForSystem for more information */ bool def_useAntiAliasingForSystem; /** \brief specifies whether to use antialiasing for plotting the graphs @@ -492,7 +492,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * roughly three-fold speed improvement! */ bool useAntiAliasingForGraphs; - /** \brief default value for property property varname. \see useAntiAliasingForGraphs for more information */ + /*! \brief default value for property property varname. \see useAntiAliasingForGraphs for more information */ bool def_useAntiAliasingForGraphs; /** \brief specifies whether to use antialiasing when drawing any text @@ -500,7 +500,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * roughly three-fold speed improvement! */ bool useAntiAliasingForText; - /** \brief default value for property property varname. \see useAntiAliasingForText for more information */ + /*! \brief default value for property property varname. \see useAntiAliasingForText for more information */ bool def_useAntiAliasingForText; /** \brief multiplier which is used for font sizes when the plot is exported/printed */ @@ -646,10 +646,48 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { 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); - JKQTPSET_MACRO(double, fontSizeMultiplier) - JKQTPSET_MACRO(double, lineWidthMultiplier) - JKQTPGET_SET_MACRO(double, printMagnification) - JKQTPGET_SET_MACRO(double, paintMagnification) + /*! \brief sets the property fontSizeMultiplier to the specified \a __value. + \details Description of the parameter fontSizeMultiplier is:
\copybrief fontSizeMultiplier.
+ \see fontSizeMultiplier for more information */ + inline virtual void set_fontSizeMultiplier(double __value) + { + this->fontSizeMultiplier = __value; + } + /*! \brief sets the property lineWidthMultiplier to the specified \a __value. + \details Description of the parameter lineWidthMultiplier is:
\copybrief lineWidthMultiplier.
+ \see lineWidthMultiplier for more information */ + inline virtual void set_lineWidthMultiplier(double __value) + { + this->lineWidthMultiplier = __value; + } + /*! \brief sets the property printMagnification to the specified \a __value. + \details Description of the parameter printMagnification is:
\copybrief printMagnification.
+ \see printMagnification for more information */ + inline virtual void set_printMagnification(double __value) + { + this->printMagnification = __value; + } + /*! \brief returns the property printMagnification. + \details Description of the parameter printMagnification is:
\copybrief printMagnification.
+ \see printMagnification for more information */ + inline virtual double get_printMagnification() const + { + return this->printMagnification; + } + /*! \brief sets the property paintMagnification to the specified \a __value. + \details Description of the parameter paintMagnification is:
\copybrief paintMagnification.
+ \see paintMagnification for more information */ + inline virtual void set_paintMagnification(double __value) + { + this->paintMagnification = __value; + } + /*! \brief returns the property paintMagnification. + \details Description of the parameter paintMagnification is:
\copybrief paintMagnification.
+ \see paintMagnification for more information */ + inline virtual double get_paintMagnification() const + { + return this->paintMagnification; + } QListWidget* dataColumnsListWidget; QComboBox* dataColumnsCombobox; @@ -883,7 +921,7 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { * the lather case */ void forceInternalDatastore(); - /** \brief returns the property emitSignals. \details Description of the parameter emitSignals is:
\copybrief emitSignals.
. \see emitSignals for more information */ + /*! \brief returns the property emitSignals. \details Description of the parameter emitSignals is:
\copybrief emitSignals.
. \see emitSignals for more information */ inline bool get_emitSignals()const { return this->emitSignals; } void set_emitSignals(bool enabled); @@ -1104,80 +1142,696 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { /** \brief emit plotUpdated() */ void update_plot() { if (emitPlotSignals) emit plotUpdated(); } - JKQTPGET_SET_MACRO(bool, emitPlotSignals) + /*! \brief sets the property emitPlotSignals to the specified \a __value. + \details Description of the parameter emitPlotSignals is:
\copybrief emitPlotSignals.
+ \see emitPlotSignals for more information */ + inline virtual void set_emitPlotSignals(bool __value) + { + this->emitPlotSignals = __value; + } + /*! \brief returns the property emitPlotSignals. + \details Description of the parameter emitPlotSignals is:
\copybrief emitPlotSignals.
+ \see emitPlotSignals for more information */ + inline virtual bool get_emitPlotSignals() const + { + return this->emitPlotSignals; + } - /** \brief returns the property plotBorderTop. \details Description of the parameter plotBorderTop is:
\copybrief plotBorderTop.
. \see plotBorderTop for more information */ + /*! \brief returns the property plotBorderTop. \details Description of the parameter plotBorderTop is:
\copybrief plotBorderTop.
. \see plotBorderTop for more information */ inline int get_plotBorderTop() const { return this->plotBorderTop; } - /** \brief returns the property plotBorderLeft. \details Description of the parameter plotBorderLeft is:
\copybrief plotBorderLeft.
. \see plotBorderLeft for more information */ + /*! \brief returns the property plotBorderLeft. \details Description of the parameter plotBorderLeft is:
\copybrief plotBorderLeft.
. \see plotBorderLeft for more information */ inline int get_plotBorderLeft() const { return this->plotBorderLeft; } - /** \brief returns the property plotBorderBottom. \details Description of the parameter plotBorderBottom is:
\copybrief plotBorderBottom.
. \see plotBorderBottom for more information */ + /*! \brief returns the property plotBorderBottom. \details Description of the parameter plotBorderBottom is:
\copybrief plotBorderBottom.
. \see plotBorderBottom for more information */ inline int get_plotBorderBottom() const { return this->plotBorderBottom; } - /** \brief returns the property plotBorderRight. \details Description of the parameter plotBorderRight is:
\copybrief plotBorderRight.
. \see plotBorderRight for more information */ + /*! \brief returns the property plotBorderRight. \details Description of the parameter plotBorderRight is:
\copybrief plotBorderRight.
. \see plotBorderRight for more information */ inline int get_plotBorderRight() const { return this->plotBorderRight; } - /** \brief returns the property maintainAspectRatio. \details Description of the parameter maintainAspectRatio is:
\copybrief maintainAspectRatio.
. \see maintainAspectRatio for more information */ + /*! \brief returns the property maintainAspectRatio. \details Description of the parameter maintainAspectRatio is:
\copybrief maintainAspectRatio.
. \see maintainAspectRatio for more information */ inline bool get_maintainAspectRatio() const { return this->maintainAspectRatio; } - JKQTPGET_SET_MACRO_I(double, aspectRatio, update_plot()) + /*! \brief sets the property aspectRatio to the specified \a __value. + \details Description of the parameter aspectRatio is:
\copybrief aspectRatio.
+ \see aspectRatio for more information */ + inline virtual void set_aspectRatio(double __value) + { + if (this->aspectRatio != __value) { + this->aspectRatio = __value; + update_plot(); + } + } + /*! \brief returns the property aspectRatio. + \details Description of the parameter aspectRatio is:
\copybrief aspectRatio.
+ \see aspectRatio for more information */ + inline virtual double get_aspectRatio() const + { + return this->aspectRatio; + } - /** \brief returns the property maintainAxisAspectRatio. \details Description of the parameter maintainAxisAspectRatio is:
\copybrief maintainAxisAspectRatio.
. \see maintainAxisAspectRatio for more information */ + /*! \brief returns the property maintainAxisAspectRatio. \details Description of the parameter maintainAxisAspectRatio is:
\copybrief maintainAxisAspectRatio.
. \see maintainAxisAspectRatio for more information */ inline bool get_maintainAxisAspectRatio() const { return this->maintainAxisAspectRatio; } - JKQTPGET_SET_MACRO_I(double, axisAspectRatio, update_plot()) + /*! \brief sets the property axisAspectRatio to the specified \a __value. + \details Description of the parameter axisAspectRatio is:
\copybrief axisAspectRatio.
+ \see axisAspectRatio for more information */ + inline virtual void set_axisAspectRatio(double __value) + { + if (this->axisAspectRatio != __value) { + this->axisAspectRatio = __value; + update_plot(); + } + } + /*! \brief returns the property axisAspectRatio. + \details Description of the parameter axisAspectRatio is:
\copybrief axisAspectRatio.
+ \see axisAspectRatio for more information */ + inline virtual double get_axisAspectRatio() const + { + return this->axisAspectRatio; + } - JKQTPGET_SET_MACRO_I(bool, useAntiAliasingForSystem, update_plot()) - JKQTPGET_SET_MACRO_I(bool, useAntiAliasingForGraphs, update_plot()) - JKQTPGET_SET_MACRO_I(bool, useAntiAliasingForText, update_plot()) + /*! \brief sets the property useAntiAliasingForSystem to the specified \a __value. + \details Description of the parameter useAntiAliasingForSystem is:
\copybrief useAntiAliasingForSystem.
+ \see useAntiAliasingForSystem for more information */ + inline virtual void set_useAntiAliasingForSystem(bool __value) + { + if (this->useAntiAliasingForSystem != __value) { + this->useAntiAliasingForSystem = __value; + update_plot(); + } + } + /*! \brief returns the property useAntiAliasingForSystem. + \details Description of the parameter useAntiAliasingForSystem is:
\copybrief useAntiAliasingForSystem.
+ \see useAntiAliasingForSystem for more information */ + inline virtual bool get_useAntiAliasingForSystem() const + { + return this->useAntiAliasingForSystem; + } + /*! \brief sets the property useAntiAliasingForGraphs to the specified \a __value. + \details Description of the parameter useAntiAliasingForGraphs is:
\copybrief useAntiAliasingForGraphs.
+ \see useAntiAliasingForGraphs for more information */ + inline virtual void set_useAntiAliasingForGraphs(bool __value) + { + if (this->useAntiAliasingForGraphs != __value) { + this->useAntiAliasingForGraphs = __value; + update_plot(); + } + } + /*! \brief returns the property useAntiAliasingForGraphs. + \details Description of the parameter useAntiAliasingForGraphs is:
\copybrief useAntiAliasingForGraphs.
+ \see useAntiAliasingForGraphs for more information */ + inline virtual bool get_useAntiAliasingForGraphs() const + { + return this->useAntiAliasingForGraphs; + } + /*! \brief sets the property useAntiAliasingForText to the specified \a __value. + \details Description of the parameter useAntiAliasingForText is:
\copybrief useAntiAliasingForText.
+ \see useAntiAliasingForText for more information */ + inline virtual void set_useAntiAliasingForText(bool __value) + { + if (this->useAntiAliasingForText != __value) { + this->useAntiAliasingForText = __value; + update_plot(); + } + } + /*! \brief returns the property useAntiAliasingForText. + \details Description of the parameter useAntiAliasingForText is:
\copybrief useAntiAliasingForText.
+ \see useAntiAliasingForText for more information */ + inline virtual bool get_useAntiAliasingForText() const + { + return this->useAntiAliasingForText; + } - JKQTPGET_SET_MACRO_I(QColor, graphColor, update_plot()) - JKQTPGET_SET_MACRO_I(double, graphWidth, update_plot()) + /*! \brief sets the property graphColor to the specified \a __value. + \details Description of the parameter graphColor is:
\copybrief graphColor.
+ \see graphColor for more information */ + inline virtual void set_graphColor(const QColor & __value) + { + if (this->graphColor != __value) { + this->graphColor = __value; + update_plot(); + } + } + /*! \brief returns the property graphColor. + \details Description of the parameter graphColor is:
\copybrief graphColor.
+ \see graphColor for more information */ + inline virtual QColor get_graphColor() const + { + return this->graphColor; + } + /*! \brief sets the property graphWidth to the specified \a __value. + \details Description of the parameter graphWidth is:
\copybrief graphWidth.
+ \see graphWidth for more information */ + inline virtual void set_graphWidth(double __value) + { + if (this->graphWidth != __value) { + this->graphWidth = __value; + update_plot(); + } + } + /*! \brief returns the property graphWidth. + \details Description of the parameter graphWidth is:
\copybrief graphWidth.
+ \see graphWidth for more information */ + inline virtual double get_graphWidth() const + { + return this->graphWidth; + } - JKQTPGET_SET_MACRO_I(QColor, backgroundColor, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, exportBackgroundColor, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, plotBackgroundColor, update_plot()) + /*! \brief sets the property backgroundColor to the specified \a __value. + \details Description of the parameter backgroundColor is:
\copybrief backgroundColor.
+ \see backgroundColor for more information */ + inline virtual void set_backgroundColor(const QColor & __value) + { + if (this->backgroundColor != __value) { + this->backgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property backgroundColor. + \details Description of the parameter backgroundColor is:
\copybrief backgroundColor.
+ \see backgroundColor for more information */ + inline virtual QColor get_backgroundColor() const + { + return this->backgroundColor; + } + /*! \brief sets the property exportBackgroundColor to the specified \a __value. + \details Description of the parameter exportBackgroundColor is:
\copybrief exportBackgroundColor.
+ \see exportBackgroundColor for more information */ + inline virtual void set_exportBackgroundColor(const QColor & __value) + { + if (this->exportBackgroundColor != __value) { + this->exportBackgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property exportBackgroundColor. + \details Description of the parameter exportBackgroundColor is:
\copybrief exportBackgroundColor.
+ \see exportBackgroundColor for more information */ + inline virtual QColor get_exportBackgroundColor() const + { + return this->exportBackgroundColor; + } + /*! \brief sets the property plotBackgroundColor to the specified \a __value. + \details Description of the parameter plotBackgroundColor is:
\copybrief plotBackgroundColor.
+ \see plotBackgroundColor for more information */ + inline virtual void set_plotBackgroundColor(const QColor & __value) + { + if (this->plotBackgroundColor != __value) { + this->plotBackgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property plotBackgroundColor. + \details Description of the parameter plotBackgroundColor is:
\copybrief plotBackgroundColor.
+ \see plotBackgroundColor for more information */ + inline virtual QColor get_plotBackgroundColor() const + { + return this->plotBackgroundColor; + } - JKQTPGET_SET_MACRO_I(QString, keyFont, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyFontSize, update_plot()) - JKQTPGET_SET_MACRO_I(double, key_item_width, update_plot()) - JKQTPGET_SET_MACRO_I(double, key_item_height, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyYSeparation, update_plot()) - JKQTPGET_SET_MACRO_I(double, key_line_length, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyXMargin, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyYMargin, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyXSeparation, update_plot()) + /*! \brief sets the property keyFont to the specified \a __value. + \details Description of the parameter keyFont is:
\copybrief keyFont.
+ \see keyFont for more information */ + inline virtual void set_keyFont(const QString & __value) + { + if (this->keyFont != __value) { + this->keyFont = __value; + update_plot(); + } + } + /*! \brief returns the property keyFont. + \details Description of the parameter keyFont is:
\copybrief keyFont.
+ \see keyFont for more information */ + inline virtual QString get_keyFont() const + { + return this->keyFont; + } + /*! \brief sets the property keyFontSize to the specified \a __value. + \details Description of the parameter keyFontSize is:
\copybrief keyFontSize.
+ \see keyFontSize for more information */ + inline virtual void set_keyFontSize(double __value) + { + if (this->keyFontSize != __value) { + this->keyFontSize = __value; + update_plot(); + } + } + /*! \brief returns the property keyFontSize. + \details Description of the parameter keyFontSize is:
\copybrief keyFontSize.
+ \see keyFontSize for more information */ + inline virtual double get_keyFontSize() const + { + return this->keyFontSize; + } + /*! \brief sets the property key_item_width to the specified \a __value. + \details Description of the parameter key_item_width is:
\copybrief key_item_width.
+ \see key_item_width for more information */ + inline virtual void set_key_item_width(double __value) + { + if (this->key_item_width != __value) { + this->key_item_width = __value; + update_plot(); + } + } + /*! \brief returns the property key_item_width. + \details Description of the parameter key_item_width is:
\copybrief key_item_width.
+ \see key_item_width for more information */ + inline virtual double get_key_item_width() const + { + return this->key_item_width; + } + /*! \brief sets the property key_item_height to the specified \a __value. + \details Description of the parameter key_item_height is:
\copybrief key_item_height.
+ \see key_item_height for more information */ + inline virtual void set_key_item_height(double __value) + { + if (this->key_item_height != __value) { + this->key_item_height = __value; + update_plot(); + } + } + /*! \brief returns the property key_item_height. + \details Description of the parameter key_item_height is:
\copybrief key_item_height.
+ \see key_item_height for more information */ + inline virtual double get_key_item_height() const + { + return this->key_item_height; + } + /*! \brief sets the property keyYSeparation to the specified \a __value. + \details Description of the parameter keyYSeparation is:
\copybrief keyYSeparation.
+ \see keyYSeparation for more information */ + inline virtual void set_keyYSeparation(double __value) + { + if (this->keyYSeparation != __value) { + this->keyYSeparation = __value; + update_plot(); + } + } + /*! \brief returns the property keyYSeparation. + \details Description of the parameter keyYSeparation is:
\copybrief keyYSeparation.
+ \see keyYSeparation for more information */ + inline virtual double get_keyYSeparation() const + { + return this->keyYSeparation; + } + /*! \brief sets the property key_line_length to the specified \a __value. + \details Description of the parameter key_line_length is:
\copybrief key_line_length.
+ \see key_line_length for more information */ + inline virtual void set_key_line_length(double __value) + { + if (this->key_line_length != __value) { + this->key_line_length = __value; + update_plot(); + } + } + /*! \brief returns the property key_line_length. + \details Description of the parameter key_line_length is:
\copybrief key_line_length.
+ \see key_line_length for more information */ + inline virtual double get_key_line_length() const + { + return this->key_line_length; + } + /*! \brief sets the property keyXMargin to the specified \a __value. + \details Description of the parameter keyXMargin is:
\copybrief keyXMargin.
+ \see keyXMargin for more information */ + inline virtual void set_keyXMargin(double __value) + { + if (this->keyXMargin != __value) { + this->keyXMargin = __value; + update_plot(); + } + } + /*! \brief returns the property keyXMargin. + \details Description of the parameter keyXMargin is:
\copybrief keyXMargin.
+ \see keyXMargin for more information */ + inline virtual double get_keyXMargin() const + { + return this->keyXMargin; + } + /*! \brief sets the property keyYMargin to the specified \a __value. + \details Description of the parameter keyYMargin is:
\copybrief keyYMargin.
+ \see keyYMargin for more information */ + inline virtual void set_keyYMargin(double __value) + { + if (this->keyYMargin != __value) { + this->keyYMargin = __value; + update_plot(); + } + } + /*! \brief returns the property keyYMargin. + \details Description of the parameter keyYMargin is:
\copybrief keyYMargin.
+ \see keyYMargin for more information */ + inline virtual double get_keyYMargin() const + { + return this->keyYMargin; + } + /*! \brief sets the property keyXSeparation to the specified \a __value. + \details Description of the parameter keyXSeparation is:
\copybrief keyXSeparation.
+ \see keyXSeparation for more information */ + inline virtual void set_keyXSeparation(double __value) + { + if (this->keyXSeparation != __value) { + this->keyXSeparation = __value; + update_plot(); + } + } + /*! \brief returns the property keyXSeparation. + \details Description of the parameter keyXSeparation is:
\copybrief keyXSeparation.
+ \see keyXSeparation for more information */ + inline virtual double get_keyXSeparation() const + { + return this->keyXSeparation; + } - JKQTPGET_SET_MACRO_I(double, keyXOffset, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyYOffset, update_plot()) - JKQTPGET_SET_MACRO_I(bool, showKey, update_plot()) - JKQTPGET_SET_MACRO_I(bool, showKeyFrame, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, keyFrameColor, update_plot()) - JKQTPGET_SET_MACRO_I(QColor, keyBackgroundColor, update_plot()) - JKQTPGET_SET_MACRO_I(double, keyFrameWidth, update_plot()) - JKQTPGET_SET_MACRO_I(bool, keyAutosize, update_plot()) - JKQTPGET_SET_MACRO_I(JKQTPkeyPosition, keyPosition, update_plot()) - JKQTPGET_SET_MACRO_I(JKQTPkeyLayout, keyLayout, update_plot()) + /*! \brief sets the property keyXOffset to the specified \a __value. + \details Description of the parameter keyXOffset is:
\copybrief keyXOffset.
+ \see keyXOffset for more information */ + inline virtual void set_keyXOffset(double __value) + { + if (this->keyXOffset != __value) { + this->keyXOffset = __value; + update_plot(); + } + } + /*! \brief returns the property keyXOffset. + \details Description of the parameter keyXOffset is:
\copybrief keyXOffset.
+ \see keyXOffset for more information */ + inline virtual double get_keyXOffset() const + { + return this->keyXOffset; + } + /*! \brief sets the property keyYOffset to the specified \a __value. + \details Description of the parameter keyYOffset is:
\copybrief keyYOffset.
+ \see keyYOffset for more information */ + inline virtual void set_keyYOffset(double __value) + { + if (this->keyYOffset != __value) { + this->keyYOffset = __value; + update_plot(); + } + } + /*! \brief returns the property keyYOffset. + \details Description of the parameter keyYOffset is:
\copybrief keyYOffset.
+ \see keyYOffset for more information */ + inline virtual double get_keyYOffset() const + { + return this->keyYOffset; + } + /*! \brief sets the property showKey to the specified \a __value. + \details Description of the parameter showKey is:
\copybrief showKey.
+ \see showKey for more information */ + inline virtual void set_showKey(bool __value) + { + if (this->showKey != __value) { + this->showKey = __value; + update_plot(); + } + } + /*! \brief returns the property showKey. + \details Description of the parameter showKey is:
\copybrief showKey.
+ \see showKey for more information */ + inline virtual bool get_showKey() const + { + return this->showKey; + } + /*! \brief sets the property showKeyFrame to the specified \a __value. + \details Description of the parameter showKeyFrame is:
\copybrief showKeyFrame.
+ \see showKeyFrame for more information */ + inline virtual void set_showKeyFrame(bool __value) + { + if (this->showKeyFrame != __value) { + this->showKeyFrame = __value; + update_plot(); + } + } + /*! \brief returns the property showKeyFrame. + \details Description of the parameter showKeyFrame is:
\copybrief showKeyFrame.
+ \see showKeyFrame for more information */ + inline virtual bool get_showKeyFrame() const + { + return this->showKeyFrame; + } + /*! \brief sets the property keyFrameColor to the specified \a __value. + \details Description of the parameter keyFrameColor is:
\copybrief keyFrameColor.
+ \see keyFrameColor for more information */ + inline virtual void set_keyFrameColor(const QColor & __value) + { + if (this->keyFrameColor != __value) { + this->keyFrameColor = __value; + update_plot(); + } + } + /*! \brief returns the property keyFrameColor. + \details Description of the parameter keyFrameColor is:
\copybrief keyFrameColor.
+ \see keyFrameColor for more information */ + inline virtual QColor get_keyFrameColor() const + { + return this->keyFrameColor; + } + /*! \brief sets the property keyBackgroundColor to the specified \a __value. + \details Description of the parameter keyBackgroundColor is:
\copybrief keyBackgroundColor.
+ \see keyBackgroundColor for more information */ + inline virtual void set_keyBackgroundColor(const QColor & __value) + { + if (this->keyBackgroundColor != __value) { + this->keyBackgroundColor = __value; + update_plot(); + } + } + /*! \brief returns the property keyBackgroundColor. + \details Description of the parameter keyBackgroundColor is:
\copybrief keyBackgroundColor.
+ \see keyBackgroundColor for more information */ + inline virtual QColor get_keyBackgroundColor() const + { + return this->keyBackgroundColor; + } + /*! \brief sets the property keyFrameWidth to the specified \a __value. + \details Description of the parameter keyFrameWidth is:
\copybrief keyFrameWidth.
+ \see keyFrameWidth for more information */ + inline virtual void set_keyFrameWidth(double __value) + { + if (this->keyFrameWidth != __value) { + this->keyFrameWidth = __value; + update_plot(); + } + } + /*! \brief returns the property keyFrameWidth. + \details Description of the parameter keyFrameWidth is:
\copybrief keyFrameWidth.
+ \see keyFrameWidth for more information */ + inline virtual double get_keyFrameWidth() const + { + return this->keyFrameWidth; + } + /*! \brief sets the property keyAutosize to the specified \a __value. + \details Description of the parameter keyAutosize is:
\copybrief keyAutosize.
+ \see keyAutosize for more information */ + inline virtual void set_keyAutosize(bool __value) + { + if (this->keyAutosize != __value) { + this->keyAutosize = __value; + update_plot(); + } + } + /*! \brief returns the property keyAutosize. + \details Description of the parameter keyAutosize is:
\copybrief keyAutosize.
+ \see keyAutosize for more information */ + inline virtual bool get_keyAutosize() const + { + return this->keyAutosize; + } + /*! \brief sets the property keyPosition to the specified \a __value. + \details Description of the parameter keyPosition is:
\copybrief keyPosition.
+ \see keyPosition for more information */ + inline virtual void set_keyPosition(const JKQTPkeyPosition & __value) + { + if (this->keyPosition != __value) { + this->keyPosition = __value; + update_plot(); + } + } + /*! \brief returns the property keyPosition. + \details Description of the parameter keyPosition is:
\copybrief keyPosition.
+ \see keyPosition for more information */ + inline virtual JKQTPkeyPosition get_keyPosition() const + { + return this->keyPosition; + } + /*! \brief sets the property keyLayout to the specified \a __value. + \details Description of the parameter keyLayout is:
\copybrief keyLayout.
+ \see keyLayout for more information */ + inline virtual void set_keyLayout(const JKQTPkeyLayout & __value) + { + if (this->keyLayout != __value) { + this->keyLayout = __value; + update_plot(); + } + } + /*! \brief returns the property keyLayout. + \details Description of the parameter keyLayout is:
\copybrief keyLayout.
+ \see keyLayout for more information */ + inline virtual JKQTPkeyLayout get_keyLayout() const + { + return this->keyLayout; + } - JKQTPGET_SET_MACRO_I(double, plotLabelFontSize, update_plot()) - JKQTPGET_SET_MACRO_I(QString, plotLabelFontname, update_plot()) - JKQTPGET_SET_MACRO_I(QString, plotLabel, update_plot()) + /*! \brief sets the property plotLabelFontSize to the specified \a __value. + \details Description of the parameter plotLabelFontSize is:
\copybrief plotLabelFontSize.
+ \see plotLabelFontSize for more information */ + inline virtual void set_plotLabelFontSize(double __value) + { + if (this->plotLabelFontSize != __value) { + this->plotLabelFontSize = __value; + update_plot(); + } + } + /*! \brief returns the property plotLabelFontSize. + \details Description of the parameter plotLabelFontSize is:
\copybrief plotLabelFontSize.
+ \see plotLabelFontSize for more information */ + inline virtual double get_plotLabelFontSize() const + { + return this->plotLabelFontSize; + } + /*! \brief sets the property plotLabelFontname to the specified \a __value. + \details Description of the parameter plotLabelFontname is:
\copybrief plotLabelFontname.
+ \see plotLabelFontname for more information */ + inline virtual void set_plotLabelFontname(const QString & __value) + { + if (this->plotLabelFontname != __value) { + this->plotLabelFontname = __value; + update_plot(); + } + } + /*! \brief returns the property plotLabelFontname. + \details Description of the parameter plotLabelFontname is:
\copybrief plotLabelFontname.
+ \see plotLabelFontname for more information */ + inline virtual QString get_plotLabelFontname() const + { + return this->plotLabelFontname; + } + /*! \brief sets the property plotLabel to the specified \a __value. + \details Description of the parameter plotLabel is:
\copybrief plotLabel.
+ \see plotLabel for more information */ + inline virtual void set_plotLabel(const QString & __value) + { + if (this->plotLabel != __value) { + this->plotLabel = __value; + update_plot(); + } + } + /*! \brief returns the property plotLabel. + \details Description of the parameter plotLabel is:
\copybrief plotLabel.
+ \see plotLabel for more information */ + inline virtual QString get_plotLabel() const + { + return this->plotLabel; + } - JKQTPGET_SET_MACRO(bool, gridPrinting) - JKQTPGET_SET_MACRO(size_t, gridPrintingCurrentX) - JKQTPGET_SET_MACRO(size_t, gridPrintingCurrentY) - JKQTPGET_SET_MACRO(QString, currentSaveDirectory) - JKQTPGET_SET_MACRO(QString, currentFileFormat) - JKQTPGET_SET_MACRO(QString, CSVdecimalSeparator) - JKQTPGET_SET_MACRO(QString, CSVcommentInitializer) + /*! \brief sets the property gridPrinting to the specified \a __value. + \details Description of the parameter gridPrinting is:
\copybrief gridPrinting.
+ \see gridPrinting for more information */ + inline virtual void set_gridPrinting(bool __value) + { + this->gridPrinting = __value; + } + /*! \brief returns the property gridPrinting. + \details Description of the parameter gridPrinting is:
\copybrief gridPrinting.
+ \see gridPrinting for more information */ + inline virtual bool get_gridPrinting() const + { + return this->gridPrinting; + } + /*! \brief sets the property gridPrintingCurrentX to the specified \a __value. + \details Description of the parameter gridPrintingCurrentX is:
\copybrief gridPrintingCurrentX.
+ \see gridPrintingCurrentX for more information */ + inline virtual void set_gridPrintingCurrentX(size_t __value) + { + this->gridPrintingCurrentX = __value; + } + /*! \brief returns the property gridPrintingCurrentX. + \details Description of the parameter gridPrintingCurrentX is:
\copybrief gridPrintingCurrentX.
+ \see gridPrintingCurrentX for more information */ + inline virtual size_t get_gridPrintingCurrentX() const + { + return this->gridPrintingCurrentX; + } + /*! \brief sets the property gridPrintingCurrentY to the specified \a __value. + \details Description of the parameter gridPrintingCurrentY is:
\copybrief gridPrintingCurrentY.
+ \see gridPrintingCurrentY for more information */ + inline virtual void set_gridPrintingCurrentY(size_t __value) + { + this->gridPrintingCurrentY = __value; + } + /*! \brief returns the property gridPrintingCurrentY. + \details Description of the parameter gridPrintingCurrentY is:
\copybrief gridPrintingCurrentY.
+ \see gridPrintingCurrentY for more information */ + inline virtual size_t get_gridPrintingCurrentY() const + { + return this->gridPrintingCurrentY; + } + /*! \brief sets the property currentSaveDirectory to the specified \a __value. + \details Description of the parameter currentSaveDirectory is:
\copybrief currentSaveDirectory.
+ \see currentSaveDirectory for more information */ + inline virtual void set_currentSaveDirectory(const QString & __value) + { + this->currentSaveDirectory = __value; + } + /*! \brief returns the property currentSaveDirectory. + \details Description of the parameter currentSaveDirectory is:
\copybrief currentSaveDirectory.
+ \see currentSaveDirectory for more information */ + inline virtual QString get_currentSaveDirectory() const + { + return this->currentSaveDirectory; + } + /*! \brief sets the property currentFileFormat to the specified \a __value. + \details Description of the parameter currentFileFormat is:
\copybrief currentFileFormat.
+ \see currentFileFormat for more information */ + inline virtual void set_currentFileFormat(const QString & __value) + { + this->currentFileFormat = __value; + } + /*! \brief returns the property currentFileFormat. + \details Description of the parameter currentFileFormat is:
\copybrief currentFileFormat.
+ \see currentFileFormat for more information */ + inline virtual QString get_currentFileFormat() const + { + return this->currentFileFormat; + } + /*! \brief sets the property CSVdecimalSeparator to the specified \a __value. + \details Description of the parameter CSVdecimalSeparator is:
\copybrief CSVdecimalSeparator.
+ \see CSVdecimalSeparator for more information */ + inline virtual void set_CSVdecimalSeparator(const QString & __value) + { + this->CSVdecimalSeparator = __value; + } + /*! \brief returns the property CSVdecimalSeparator. + \details Description of the parameter CSVdecimalSeparator is:
\copybrief CSVdecimalSeparator.
+ \see CSVdecimalSeparator for more information */ + inline virtual QString get_CSVdecimalSeparator() const + { + return this->CSVdecimalSeparator; + } + /*! \brief sets the property CSVcommentInitializer to the specified \a __value. + \details Description of the parameter CSVcommentInitializer is:
\copybrief CSVcommentInitializer.
+ \see CSVcommentInitializer for more information */ + inline virtual void set_CSVcommentInitializer(const QString & __value) + { + this->CSVcommentInitializer = __value; + } + /*! \brief returns the property CSVcommentInitializer. + \details Description of the parameter CSVcommentInitializer is:
\copybrief CSVcommentInitializer.
+ \see CSVcommentInitializer for more information */ + inline virtual QString get_CSVcommentInitializer() const + { + return this->CSVcommentInitializer; + } - /** \brief returns the property iplotBorderTop. \details Description of the parameter iplotBorderTop is:
\copybrief iplotBorderTop.
. \see iplotBorderTop for more information */ + /*! \brief returns the property iplotBorderTop. \details Description of the parameter iplotBorderTop is:
\copybrief iplotBorderTop.
. \see iplotBorderTop for more information */ inline int get_iplotBorderTop() const { return this->iplotBorderTop; } - /** \brief returns the property iplotBorderLeft. \details Description of the parameter iplotBorderLeft is:
\copybrief iplotBorderLeft.
. \see iplotBorderLeft for more information */ + /*! \brief returns the property iplotBorderLeft. \details Description of the parameter iplotBorderLeft is:
\copybrief iplotBorderLeft.
. \see iplotBorderLeft for more information */ inline int get_iplotBorderLeft() const { return this->iplotBorderLeft; } - /** \brief returns the property iplotBorderBottom. \details Description of the parameter iplotBorderBottom is:
\copybrief iplotBorderBottom.
. \see iplotBorderBottom for more information */ + /*! \brief returns the property iplotBorderBottom. \details Description of the parameter iplotBorderBottom is:
\copybrief iplotBorderBottom.
. \see iplotBorderBottom for more information */ inline int get_iplotBorderBottom() const { return this->iplotBorderBottom; } - /** \brief returns the property iplotBorderRight. \details Description of the parameter iplotBorderRight is:
\copybrief iplotBorderRight.
. \see iplotBorderRight for more information */ + /*! \brief returns the property iplotBorderRight. \details Description of the parameter iplotBorderRight is:
\copybrief iplotBorderRight.
. \see iplotBorderRight for more information */ inline int get_iplotBorderRight() const { return this->iplotBorderRight; } - /** \brief returns the property plotWidth. \details Description of the parameter plotWidth is:
\copybrief plotWidth.
. \see plotWidth for more information */ + /*! \brief returns the property plotWidth. \details Description of the parameter plotWidth is:
\copybrief plotWidth.
. \see plotWidth for more information */ inline int get_plotWidth() const { return this->plotWidth; } - /** \brief returns the property plotHeight. \details Description of the parameter plotHeight is:
\copybrief plotHeight.
. \see plotHeight for more information */ + /*! \brief returns the property plotHeight. \details Description of the parameter plotHeight is:
\copybrief plotHeight.
. \see plotHeight for more information */ inline int get_plotHeight() const { return this->plotHeight; } inline JKQTmathText* get_mathText() { return &mathText; } inline const JKQTmathText* get_mathText() const { return &mathText; } @@ -1187,57 +1841,95 @@ class LIB_EXPORT JKQtBasePlotter: public QObject { inline const JKQTPverticalAxis* get_yAxis() const { return yAxis; } - /** \brief returns the property actSavePlot. \details Description of the parameter actSavePlot is:
\copybrief actSavePlot.
. \see actSavePlot for more information */ + /*! \brief returns the property actSavePlot. \details Description of the parameter actSavePlot is:
\copybrief actSavePlot.
. \see actSavePlot for more information */ inline QAction* get_actSavePlot() const { return this->actSavePlot; } - /** \brief returns the property actSaveData. \details Description of the parameter actSaveData is:
\copybrief actSaveData.
. \see actSaveData for more information */ + /*! \brief returns the property actSaveData. \details Description of the parameter actSaveData is:
\copybrief actSaveData.
. \see actSaveData for more information */ inline QAction* get_actSaveData() const { return this->actSaveData; } - /** \brief returns the property actCopyData. \details Description of the parameter actCopyData is:
\copybrief actCopyData.
. \see actCopyData for more information */ + /*! \brief returns the property actCopyData. \details Description of the parameter actCopyData is:
\copybrief actCopyData.
. \see actCopyData for more information */ inline QAction* get_actCopyData() const { return this->actCopyData; } - /** \brief returns the property actCopyPixelImage. \details Description of the parameter actCopyPixelImage is:
\copybrief actCopyPixelImage.
. \see actCopyPixelImage for more information */ + /*! \brief returns the property actCopyPixelImage. \details Description of the parameter actCopyPixelImage is:
\copybrief actCopyPixelImage.
. \see actCopyPixelImage for more information */ inline QAction* get_actCopyPixelImage() const { return this->actCopyPixelImage; } - /** \brief returns the property actCopyMatlab. \details Description of the parameter actCopyMatlab is:
\copybrief actCopyMatlab.
. \see actCopyMatlab for more information */ + /*! \brief returns the property actCopyMatlab. \details Description of the parameter actCopyMatlab is:
\copybrief actCopyMatlab.
. \see actCopyMatlab for more information */ inline QAction* get_actCopyMatlab() const { return this->actCopyMatlab; } - /** \brief returns the property actSavePDF. \details Description of the parameter actSavePDF is:
\copybrief actSavePDF.
. \see actSavePDF for more information */ + /*! \brief returns the property actSavePDF. \details Description of the parameter actSavePDF is:
\copybrief actSavePDF.
. \see actSavePDF for more information */ inline QAction* get_actSavePDF() const { return this->actSavePDF; } #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) - /** \brief returns the property actSavePS. \details Description of the parameter actSavePS is:
\copybrief actSavePS.
. \see actSavePS for more information */ + /*! \brief returns the property actSavePS. \details Description of the parameter actSavePS is:
\copybrief actSavePS.
. \see actSavePS for more information */ inline QAction* get_actSavePS() const { return this->actSavePS; } #endif - /** \brief returns the property actSavePix. \details Description of the parameter actSavePix is:
\copybrief actSavePix.
. \see actSavePix for more information */ + /*! \brief returns the property actSavePix. \details Description of the parameter actSavePix is:
\copybrief actSavePix.
. \see actSavePix for more information */ inline QAction* get_actSavePix() const { return this->actSavePix; } - /** \brief returns the property actSaveSVG. \details Description of the parameter actSaveSVG is:
\copybrief actSaveSVG.
. \see actSaveSVG for more information */ + /*! \brief returns the property actSaveSVG. \details Description of the parameter actSaveSVG is:
\copybrief actSaveSVG.
. \see actSaveSVG for more information */ inline QAction* get_actSaveSVG() const { return this->actSaveSVG; } - /** \brief returns the property actPrint. \details Description of the parameter actPrint is:
\copybrief actPrint.
. \see actPrint for more information */ + /*! \brief returns the property actPrint. \details Description of the parameter actPrint is:
\copybrief actPrint.
. \see actPrint for more information */ inline QAction* get_actPrint() const { return this->actPrint; } - /** \brief returns the property actSaveCSV. \details Description of the parameter actSaveCSV is:
\copybrief actSaveCSV.
. \see actSaveCSV for more information */ + /*! \brief returns the property actSaveCSV. \details Description of the parameter actSaveCSV is:
\copybrief actSaveCSV.
. \see actSaveCSV for more information */ inline QAction* get_actSaveCSV() const { return this->actSaveCSV; } - /** \brief returns the property actZoomAll. \details Description of the parameter actZoomAll is:
\copybrief actZoomAll.
. \see actZoomAll for more information */ + /*! \brief returns the property actZoomAll. \details Description of the parameter actZoomAll is:
\copybrief actZoomAll.
. \see actZoomAll for more information */ inline QAction* get_actZoomAll() const { return this->actZoomAll; } - /** \brief returns the property actZoomIn. \details Description of the parameter actZoomIn is:
\copybrief actZoomIn.
. \see actZoomIn for more information */ + /*! \brief returns the property actZoomIn. \details Description of the parameter actZoomIn is:
\copybrief actZoomIn.
. \see actZoomIn for more information */ inline QAction* get_actZoomIn() const { return this->actZoomIn; } - /** \brief returns the property actZoomOut. \details Description of the parameter actZoomOut is:
\copybrief actZoomOut.
. \see actZoomOut for more information */ + /*! \brief returns the property actZoomOut. \details Description of the parameter actZoomOut is:
\copybrief actZoomOut.
. \see actZoomOut for more information */ inline QAction* get_actZoomOut() const { return this->actZoomOut; } - /** \brief returns the property actShowPlotData. \details Description of the parameter actShowPlotData is:
\copybrief actShowPlotData.
. \see actShowPlotData for more information */ + /*! \brief returns the property actShowPlotData. \details Description of the parameter actShowPlotData is:
\copybrief actShowPlotData.
. \see actShowPlotData for more information */ inline QAction* get_actShowPlotData() const { return this->actShowPlotData; } - /** \brief returns the property lstAdditionalPlotterActions. \details Description of the parameter lstAdditionalPlotterActions is:
\copybrief lstAdditionalPlotterActions.
. \see lstAdditionalPlotterActions for more information */ + /*! \brief returns the property lstAdditionalPlotterActions. \details Description of the parameter lstAdditionalPlotterActions is:
\copybrief lstAdditionalPlotterActions.
. \see lstAdditionalPlotterActions for more information */ inline AdditionalActionsMap get_lstAdditionalPlotterActions() const { return this->lstAdditionalPlotterActions; } /** \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); - /** \brief returns the property masterSynchronizeWidth. \details Description of the parameter masterSynchronizeWidth is:
\copybrief masterSynchronizeWidth.
. \see masterSynchronizeWidth for more information */ + /*! \brief returns the property masterSynchronizeWidth. \details Description of the parameter masterSynchronizeWidth is:
\copybrief masterSynchronizeWidth.
. \see masterSynchronizeWidth for more information */ inline bool get_masterSynchronizeWidth() const { return this->masterSynchronizeWidth; } - /** \brief returns the property masterSynchronizeHeight. \details Description of the parameter masterSynchronizeHeight is:
\copybrief masterSynchronizeHeight.
. \see masterSynchronizeHeight for more information */ + /*! \brief returns the property masterSynchronizeHeight. \details Description of the parameter masterSynchronizeHeight is:
\copybrief masterSynchronizeHeight.
. \see masterSynchronizeHeight for more information */ inline bool get_masterSynchronizeHeight() const { return this->masterSynchronizeHeight; } - JKQTPSET_MACRO(QColor, def_backgroundColor) - JKQTPSET_MACRO(QColor, def_plotBackgroundColor) + /*! \brief sets the property def_backgroundColor to the specified \a __value. + \details Description of the parameter def_backgroundColor is:
\copybrief def_backgroundColor.
+ \see def_backgroundColor for more information */ + inline virtual void set_def_backgroundColor(const QColor & __value) + { + this->def_backgroundColor = __value; + } + /*! \brief sets the property def_plotBackgroundColor to the specified \a __value. + \details Description of the parameter def_plotBackgroundColor is:
\copybrief def_plotBackgroundColor.
+ \see def_plotBackgroundColor for more information */ + inline virtual void set_def_plotBackgroundColor(const QColor & __value) + { + this->def_plotBackgroundColor = __value; + } - JKQTPGET_SET_MACRO(double, fontSizePrintMultiplier) - JKQTPGET_SET_MACRO(double, lineWidthPrintMultiplier) - /** \brief returns the property fontSizeMultiplier. \details Description of the parameter fontSizeMultiplier is:
\copybrief fontSizeMultiplier.
. \see fontSizeMultiplier for more information */ + /*! \brief sets the property fontSizePrintMultiplier to the specified \a __value. + \details Description of the parameter fontSizePrintMultiplier is:
\copybrief fontSizePrintMultiplier.
+ \see fontSizePrintMultiplier for more information */ + inline virtual void set_fontSizePrintMultiplier(double __value) + { + this->fontSizePrintMultiplier = __value; + } + /*! \brief returns the property fontSizePrintMultiplier. + \details Description of the parameter fontSizePrintMultiplier is:
\copybrief fontSizePrintMultiplier.
+ \see fontSizePrintMultiplier for more information */ + inline virtual double get_fontSizePrintMultiplier() const + { + return this->fontSizePrintMultiplier; + } + /*! \brief sets the property lineWidthPrintMultiplier to the specified \a __value. + \details Description of the parameter lineWidthPrintMultiplier is:
\copybrief lineWidthPrintMultiplier.
+ \see lineWidthPrintMultiplier for more information */ + inline virtual void set_lineWidthPrintMultiplier(double __value) + { + this->lineWidthPrintMultiplier = __value; + } + /*! \brief returns the property lineWidthPrintMultiplier. + \details Description of the parameter lineWidthPrintMultiplier is:
\copybrief lineWidthPrintMultiplier.
+ \see lineWidthPrintMultiplier for more information */ + inline virtual double get_lineWidthPrintMultiplier() const + { + return this->lineWidthPrintMultiplier; + } + /*! \brief returns the property fontSizeMultiplier. \details Description of the parameter fontSizeMultiplier is:
\copybrief fontSizeMultiplier.
. \see fontSizeMultiplier for more information */ inline double get_fontSizeMultiplier() const { return this->fontSizeMultiplier; } - /** \brief returns the property lineWidthMultiplier. \details Description of the parameter lineWidthMultiplier is:
\copybrief lineWidthMultiplier.
. \see lineWidthMultiplier for more information */ + /*! \brief returns the property lineWidthMultiplier. \details Description of the parameter lineWidthMultiplier is:
\copybrief lineWidthMultiplier.
. \see lineWidthMultiplier for more information */ inline double get_lineWidthMultiplier() const { return this->lineWidthMultiplier; } diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h index c6151eadac..2fdc50752f 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.h +++ b/lib/jkqtplotter/jkqtpdatastorage.h @@ -637,12 +637,12 @@ class LIB_EXPORT JKQTPcolumn { /** \brief class destructor */ ~JKQTPcolumn() ; - /** \brief sets the property name to the specified \a __value. \details Description of the parameter name is:
\copybrief name.
\see name for more information */ + /*! \brief sets the property name to the specified \a __value. \details Description of the parameter name is:
\copybrief name.
\see name for more information */ inline void set_name (const QString& __value) { this->name = __value; } - /** \brief returns the property name. \see name for more information */ + /*! \brief returns the property name. \see name for more information */ inline QString get_name () const { return this->name; @@ -724,10 +724,10 @@ class LIB_EXPORT JKQTPcolumn { void setAll(double value); - /** \brief returns the property datastoreItem. \details Description of the parameter datastoreItem is:
\copybrief datastoreItem.
. \see datastoreItem for more information */ \ + /*! \brief returns the property datastoreItem. \details Description of the parameter datastoreItem is:
\copybrief datastoreItem.
. \see datastoreItem for more information */ \ inline size_t get_datastoreItem() const \ { return this->datastoreItem; } - /** \brief returns the property datastoreOffset. \details Description of the parameter datastoreOffset is:
\copybrief datastoreOffset.
. \see datastoreOffset for more information */ \ + /*! \brief returns the property datastoreOffset. \details Description of the parameter datastoreOffset is:
\copybrief datastoreOffset.
. \see datastoreOffset for more information */ \ inline size_t get_datastoreOffset() const \ { return this->datastoreOffset; } }; @@ -784,10 +784,10 @@ class LIB_EXPORT JKQTPdatastoreItem { /** \brief change the size of all columns to the givne number of rows. The data will be lost */ void resizeColumns(size_t rows); - /** \brief returns the property rows. \details Description of the parameter rows is:
\copybrief rows.
. \see rows for more information */ \ + /*! \brief returns the property rows. \details Description of the parameter rows is:
\copybrief rows.
. \see rows for more information */ \ inline size_t get_rows() const { return rows; } - /** \brief returns the property columns. \details Description of the parameter columns is:
\copybrief columns.
. \see columns for more information */ \ + /*! \brief returns the property columns. \details Description of the parameter columns is:
\copybrief columns.
. \see columns for more information */ \ inline size_t get_columns() const { return columns; } diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.h b/lib/jkqtplotter/jkqtpelementsoverlay.h index 8f9cafab3d..2655cd61ad 100644 --- a/lib/jkqtplotter/jkqtpelementsoverlay.h +++ b/lib/jkqtplotter/jkqtpelementsoverlay.h @@ -61,15 +61,132 @@ class LIB_EXPORT JKQTPoverlayElement : public QObject { /** \brief sets the parent painter class */ virtual void setParent(JKQtBasePlotter* parent); - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, lineStyle) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(QString, text) - JKQTPGET_SET_MACRO(QString, fontName) - JKQTPGET_SET_MACRO(double, fontSize) - JKQTPGET_SET_MACRO(bool, visible) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property lineStyle to the specified \a __value. + \details Description of the parameter lineStyle is:
\copybrief lineStyle.
+ \see lineStyle for more information */ + inline virtual void set_lineStyle(const Qt::PenStyle & __value) + { + this->lineStyle = __value; + } + /*! \brief returns the property lineStyle. + \details Description of the parameter lineStyle is:
\copybrief lineStyle.
+ \see lineStyle for more information */ + inline virtual Qt::PenStyle get_lineStyle() const + { + return this->lineStyle; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property text to the specified \a __value. + \details Description of the parameter text is:
\copybrief text.
+ \see text for more information */ + inline virtual void set_text(const QString & __value) + { + this->text = __value; + } + /*! \brief returns the property text. + \details Description of the parameter text is:
\copybrief text.
+ \see text for more information */ + inline virtual QString get_text() const + { + return this->text; + } + /*! \brief sets the property fontName to the specified \a __value. + \details Description of the parameter fontName is:
\copybrief fontName.
+ \see fontName for more information */ + inline virtual void set_fontName(const QString & __value) + { + this->fontName = __value; + } + /*! \brief returns the property fontName. + \details Description of the parameter fontName is:
\copybrief fontName.
+ \see fontName for more information */ + inline virtual QString get_fontName() const + { + return this->fontName; + } + /*! \brief sets the property fontSize to the specified \a __value. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual void set_fontSize(double __value) + { + this->fontSize = __value; + } + /*! \brief returns the property fontSize. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual double get_fontSize() const + { + return this->fontSize; + } + /*! \brief sets the property visible to the specified \a __value. + \details Description of the parameter visible is:
\copybrief visible.
+ \see visible for more information */ + inline virtual void set_visible(bool __value) + { + this->visible = __value; + } + /*! \brief returns the property visible. + \details Description of the parameter visible is:
\copybrief visible.
+ \see visible for more information */ + inline virtual bool get_visible() const + { + return this->visible; + } protected: /** \brief the plotter object this object belongs to */ @@ -132,10 +249,62 @@ class LIB_EXPORT JKQTPoverlayTwoPositionOverlay : public JKQTPoverlayElement { public: explicit JKQTPoverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQtBasePlotter *parent = 0); - JKQTPGET_SET_MACRO(double, x1) - JKQTPGET_SET_MACRO(double, x2) - JKQTPGET_SET_MACRO(double, y1) - JKQTPGET_SET_MACRO(double, y2) + /*! \brief sets the property x1 to the specified \a __value. + \details Description of the parameter x1 is:
\copybrief x1.
+ \see x1 for more information */ + inline virtual void set_x1(double __value) + { + this->x1 = __value; + } + /*! \brief returns the property x1. + \details Description of the parameter x1 is:
\copybrief x1.
+ \see x1 for more information */ + inline virtual double get_x1() const + { + return this->x1; + } + /*! \brief sets the property x2 to the specified \a __value. + \details Description of the parameter x2 is:
\copybrief x2.
+ \see x2 for more information */ + inline virtual void set_x2(double __value) + { + this->x2 = __value; + } + /*! \brief returns the property x2. + \details Description of the parameter x2 is:
\copybrief x2.
+ \see x2 for more information */ + inline virtual double get_x2() const + { + return this->x2; + } + /*! \brief sets the property y1 to the specified \a __value. + \details Description of the parameter y1 is:
\copybrief y1.
+ \see y1 for more information */ + inline virtual void set_y1(double __value) + { + this->y1 = __value; + } + /*! \brief returns the property y1. + \details Description of the parameter y1 is:
\copybrief y1.
+ \see y1 for more information */ + inline virtual double get_y1() const + { + return this->y1; + } + /*! \brief sets the property y2 to the specified \a __value. + \details Description of the parameter y2 is:
\copybrief y2.
+ \see y2 for more information */ + inline virtual void set_y2(double __value) + { + this->y2 = __value; + } + /*! \brief returns the property y2. + \details Description of the parameter y2 is:
\copybrief y2.
+ \see y2 for more information */ + inline virtual double get_y2() const + { + return this->y2; + } protected: double x1; double y1; @@ -153,7 +322,20 @@ class LIB_EXPORT JKQTPoverlayOneCoordOverlay : public JKQTPoverlayElement { public: explicit JKQTPoverlayOneCoordOverlay(double pos, JKQtBasePlotter *parent = 0); - JKQTPGET_SET_MACRO(double, position) + /*! \brief sets the property position to the specified \a __value. + \details Description of the parameter position is:
\copybrief position.
+ \see position for more information */ + inline virtual void set_position(double __value) + { + this->position = __value; + } + /*! \brief returns the property position. + \details Description of the parameter position is:
\copybrief position.
+ \see position for more information */ + inline virtual double get_position() const + { + return this->position; + } protected: double position; }; @@ -168,7 +350,20 @@ class LIB_EXPORT JKQTPoverlayTwoCoordOverlay : public JKQTPoverlayOneCoordOverla public: explicit JKQTPoverlayTwoCoordOverlay(double pos, double pos2, JKQtBasePlotter *parent = 0); - JKQTPGET_SET_MACRO(double, position2) + /*! \brief sets the property position2 to the specified \a __value. + \details Description of the parameter position2 is:
\copybrief position2.
+ \see position2 for more information */ + inline virtual void set_position2(double __value) + { + this->position2 = __value; + } + /*! \brief returns the property position2. + \details Description of the parameter position2 is:
\copybrief position2.
+ \see position2 for more information */ + inline virtual double get_position2() const + { + return this->position2; + } protected: double position2; }; @@ -207,7 +402,20 @@ class LIB_EXPORT JKQTPoverlayVerticalRange : public JKQTPoverlayTwoCoordOverlay /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); - JKQTPGET_SET_MACRO(bool, inverted) + /*! \brief sets the property inverted to the specified \a __value. + \details Description of the parameter inverted is:
\copybrief inverted.
+ \see inverted for more information */ + inline virtual void set_inverted(bool __value) + { + this->inverted = __value; + } + /*! \brief returns the property inverted. + \details Description of the parameter inverted is:
\copybrief inverted.
+ \see inverted for more information */ + inline virtual bool get_inverted() const + { + return this->inverted; + } protected: /** \brief if set \c false, the range is filled, otherwise everything outside the range is filled */ bool inverted; @@ -225,7 +433,20 @@ class LIB_EXPORT JKQTPoverlayLine : public JKQTPoverlayTwoPositionOverlay { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter); - JKQTPGET_SET_MACRO(bool, infinite) + /*! \brief sets the property infinite to the specified \a __value. + \details Description of the parameter infinite is:
\copybrief infinite.
+ \see infinite for more information */ + inline virtual void set_infinite(bool __value) + { + this->infinite = __value; + } + /*! \brief returns the property infinite. + \details Description of the parameter infinite is:
\copybrief infinite.
+ \see infinite for more information */ + inline virtual bool get_infinite() const + { + return this->infinite; + } protected: /** \brief the line goes on infinitely */ bool infinite; diff --git a/lib/jkqtplotter/jkqtpgraphs.h b/lib/jkqtplotter/jkqtpgraphs.h index de26e18d91..57386c40d9 100644 --- a/lib/jkqtplotter/jkqtpgraphs.h +++ b/lib/jkqtplotter/jkqtpgraphs.h @@ -74,16 +74,146 @@ class LIB_EXPORT JKQTPxyLineGraph: public JKQTPxyGraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(JKQTPgraphSymbols, symbol) - JKQTPGET_SET_MACRO(double, symbolWidth) - JKQTPGET_SET_MACRO(double, symbolSize) - JKQTPGET_SET_MACRO(bool, drawLine) - JKQTPGET_SET_MACRO(bool, drawSelectionLine) - JKQTPGET_SET_MACRO(QColor, selectionLineColor) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property symbol to the specified \a __value. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual void set_symbol(const JKQTPgraphSymbols & __value) + { + this->symbol = __value; + } + /*! \brief returns the property symbol. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual JKQTPgraphSymbols get_symbol() const + { + return this->symbol; + } + /*! \brief sets the property symbolWidth to the specified \a __value. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual void set_symbolWidth(double __value) + { + this->symbolWidth = __value; + } + /*! \brief returns the property symbolWidth. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual double get_symbolWidth() const + { + return this->symbolWidth; + } + /*! \brief sets the property symbolSize to the specified \a __value. + \details Description of the parameter symbolSize is:
\copybrief symbolSize.
+ \see symbolSize for more information */ + inline virtual void set_symbolSize(double __value) + { + this->symbolSize = __value; + } + /*! \brief returns the property symbolSize. + \details Description of the parameter symbolSize is:
\copybrief symbolSize.
+ \see symbolSize for more information */ + inline virtual double get_symbolSize() const + { + return this->symbolSize; + } + /*! \brief sets the property drawLine to the specified \a __value. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual void set_drawLine(bool __value) + { + this->drawLine = __value; + } + /*! \brief returns the property drawLine. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual bool get_drawLine() const + { + return this->drawLine; + } + /*! \brief sets the property drawSelectionLine to the specified \a __value. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual void set_drawSelectionLine(bool __value) + { + this->drawSelectionLine = __value; + } + /*! \brief returns the property drawSelectionLine. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual bool get_drawSelectionLine() const + { + return this->drawSelectionLine; + } + /*! \brief sets the property selectionLineColor to the specified \a __value. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual void set_selectionLineColor(const QColor & __value) + { + this->selectionLineColor = __value; + } + /*! \brief returns the property selectionLineColor. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual QColor get_selectionLineColor() const + { + return this->selectionLineColor; + } protected: @@ -148,19 +278,148 @@ class LIB_EXPORT JKQTPxyParametrizedScatterGraph: public JKQTPxyLineGraph, publi /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(int, sizeColumn) - JKQTPSET_CAST_MACRO(size_t, int, sizeColumn) - JKQTPGET_SET_MACRO(int, colorColumn) - JKQTPSET_CAST_MACRO(size_t, int, colorColumn) - JKQTPGET_SET_MACRO(int, symbolColumn) - JKQTPSET_CAST_MACRO(size_t, int, symbolColumn) - JKQTPGET_SET_MACRO(int, linewidthColumn) - JKQTPSET_CAST_MACRO(size_t, int, linewidthColumn) - JKQTPGET_SET_MACRO(bool, colorColumnContainsRGB) - JKQTPGET_SET_MACRO(bool, gridModeForSymbolSize) - JKQTPGET_SET_MACRO(double, gridDeltaX) - JKQTPGET_SET_MACRO(double, gridDeltaY) - JKQTPGET_SET_MACRO(double, gridSymbolFractionSize) + /*! \brief sets the property sizeColumn to the specified \a __value. + \details Description of the parameter sizeColumn is:
\copybrief sizeColumn.
+ \see sizeColumn for more information */ + inline virtual void set_sizeColumn(int __value) + { + this->sizeColumn = __value; + } + /*! \brief returns the property sizeColumn. + \details Description of the parameter sizeColumn is:
\copybrief sizeColumn.
+ \see sizeColumn for more information */ + inline virtual int get_sizeColumn() const + { + return this->sizeColumn; + } + /*! \brief sets the property sizeColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter sizeColumn is:
\copybrief sizeColumn.
+ \see sizeColumn for more information */ + inline virtual void set_sizeColumn (size_t __value) { this->sizeColumn = static_cast(__value); } + /*! \brief sets the property colorColumn to the specified \a __value. + \details Description of the parameter colorColumn is:
\copybrief colorColumn.
+ \see colorColumn for more information */ + inline virtual void set_colorColumn(int __value) + { + this->colorColumn = __value; + } + /*! \brief returns the property colorColumn. + \details Description of the parameter colorColumn is:
\copybrief colorColumn.
+ \see colorColumn for more information */ + inline virtual int get_colorColumn() const + { + return this->colorColumn; + } + /*! \brief sets the property colorColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter colorColumn is:
\copybrief colorColumn.
+ \see colorColumn for more information */ + inline virtual void set_colorColumn (size_t __value) { this->colorColumn = static_cast(__value); } + /*! \brief sets the property symbolColumn to the specified \a __value. + \details Description of the parameter symbolColumn is:
\copybrief symbolColumn.
+ \see symbolColumn for more information */ + inline virtual void set_symbolColumn(int __value) + { + this->symbolColumn = __value; + } + /*! \brief returns the property symbolColumn. + \details Description of the parameter symbolColumn is:
\copybrief symbolColumn.
+ \see symbolColumn for more information */ + inline virtual int get_symbolColumn() const + { + return this->symbolColumn; + } + /*! \brief sets the property symbolColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter symbolColumn is:
\copybrief symbolColumn.
+ \see symbolColumn for more information */ + inline virtual void set_symbolColumn (size_t __value) { this->symbolColumn = static_cast(__value); } + /*! \brief sets the property linewidthColumn to the specified \a __value. + \details Description of the parameter linewidthColumn is:
\copybrief linewidthColumn.
+ \see linewidthColumn for more information */ + inline virtual void set_linewidthColumn(int __value) + { + this->linewidthColumn = __value; + } + /*! \brief returns the property linewidthColumn. + \details Description of the parameter linewidthColumn is:
\copybrief linewidthColumn.
+ \see linewidthColumn for more information */ + inline virtual int get_linewidthColumn() const + { + return this->linewidthColumn; + } + /*! \brief sets the property linewidthColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter linewidthColumn is:
\copybrief linewidthColumn.
+ \see linewidthColumn for more information */ + inline virtual void set_linewidthColumn( size_t __value) { this->linewidthColumn = static_cast(__value); } + /*! \brief sets the property colorColumnContainsRGB to the specified \a __value. + \details Description of the parameter colorColumnContainsRGB is:
\copybrief colorColumnContainsRGB.
+ \see colorColumnContainsRGB for more information */ + inline virtual void set_colorColumnContainsRGB(bool __value) + { + this->colorColumnContainsRGB = __value; + } + /*! \brief returns the property colorColumnContainsRGB. + \details Description of the parameter colorColumnContainsRGB is:
\copybrief colorColumnContainsRGB.
+ \see colorColumnContainsRGB for more information */ + inline virtual bool get_colorColumnContainsRGB() const + { + return this->colorColumnContainsRGB; + } + /*! \brief sets the property gridModeForSymbolSize to the specified \a __value. + \details Description of the parameter gridModeForSymbolSize is:
\copybrief gridModeForSymbolSize.
+ \see gridModeForSymbolSize for more information */ + inline virtual void set_gridModeForSymbolSize(bool __value) + { + this->gridModeForSymbolSize = __value; + } + /*! \brief returns the property gridModeForSymbolSize. + \details Description of the parameter gridModeForSymbolSize is:
\copybrief gridModeForSymbolSize.
+ \see gridModeForSymbolSize for more information */ + inline virtual bool get_gridModeForSymbolSize() const + { + return this->gridModeForSymbolSize; + } + /*! \brief sets the property gridDeltaX to the specified \a __value. + \details Description of the parameter gridDeltaX is:
\copybrief gridDeltaX.
+ \see gridDeltaX for more information */ + inline virtual void set_gridDeltaX(double __value) + { + this->gridDeltaX = __value; + } + /*! \brief returns the property gridDeltaX. + \details Description of the parameter gridDeltaX is:
\copybrief gridDeltaX.
+ \see gridDeltaX for more information */ + inline virtual double get_gridDeltaX() const + { + return this->gridDeltaX; + } + /*! \brief sets the property gridDeltaY to the specified \a __value. + \details Description of the parameter gridDeltaY is:
\copybrief gridDeltaY.
+ \see gridDeltaY for more information */ + inline virtual void set_gridDeltaY(double __value) + { + this->gridDeltaY = __value; + } + /*! \brief returns the property gridDeltaY. + \details Description of the parameter gridDeltaY is:
\copybrief gridDeltaY.
+ \see gridDeltaY for more information */ + inline virtual double get_gridDeltaY() const + { + return this->gridDeltaY; + } + /*! \brief sets the property gridSymbolFractionSize to the specified \a __value. + \details Description of the parameter gridSymbolFractionSize is:
\copybrief gridSymbolFractionSize.
+ \see gridSymbolFractionSize for more information */ + inline virtual void set_gridSymbolFractionSize(double __value) + { + this->gridSymbolFractionSize = __value; + } + /*! \brief returns the property gridSymbolFractionSize. + \details Description of the parameter gridSymbolFractionSize is:
\copybrief gridSymbolFractionSize.
+ \see gridSymbolFractionSize for more information */ + inline virtual double get_gridSymbolFractionSize() const + { + return this->gridSymbolFractionSize; + } virtual void setParent(JKQtBasePlotter* parent) override; @@ -333,14 +592,118 @@ class LIB_EXPORT JKQTPstepHorizontalGraph: public JKQTPxyGraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(bool, drawLine) - JKQTPGET_SET_MACRO(bool, fillCurve) - JKQTPGET_SET_MACRO(JKQTPstepType, stepType) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property drawLine to the specified \a __value. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual void set_drawLine(bool __value) + { + this->drawLine = __value; + } + /*! \brief returns the property drawLine. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual bool get_drawLine() const + { + return this->drawLine; + } + /*! \brief sets the property fillCurve to the specified \a __value. + \details Description of the parameter fillCurve is:
\copybrief fillCurve.
+ \see fillCurve for more information */ + inline virtual void set_fillCurve(bool __value) + { + this->fillCurve = __value; + } + /*! \brief returns the property fillCurve. + \details Description of the parameter fillCurve is:
\copybrief fillCurve.
+ \see fillCurve for more information */ + inline virtual bool get_fillCurve() const + { + return this->fillCurve; + } + /*! \brief sets the property stepType to the specified \a __value. + \details Description of the parameter stepType is:
\copybrief stepType.
+ \see stepType for more information */ + inline virtual void set_stepType(const JKQTPstepType & __value) + { + this->stepType = __value; + } + /*! \brief returns the property stepType. + \details Description of the parameter stepType is:
\copybrief stepType.
+ \see stepType for more information */ + inline virtual JKQTPstepType get_stepType() const + { + return this->stepType; + } protected: /** \brief color of the graph */ QColor color; @@ -440,27 +803,287 @@ class LIB_EXPORT JKQTPhorizontalRange: public JKQTPgraph { void setDrawCenterLineOnly(); - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(QColor, centerColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, centerStyle) - JKQTPGET_SET_MACRO(double, centerLineWidth) - JKQTPGET_SET_MACRO(double, rangeMin) - JKQTPGET_SET_MACRO(double, rangeMax) - JKQTPGET_SET_MACRO(double, sizeMin) - JKQTPGET_SET_MACRO(double, sizeMax) - JKQTPGET_SET_MACRO(bool, unlimitedSizeMin) - JKQTPGET_SET_MACRO(bool, unlimitedSizeMax) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property centerColor to the specified \a __value. + \details Description of the parameter centerColor is:
\copybrief centerColor.
+ \see centerColor for more information */ + inline virtual void set_centerColor(const QColor & __value) + { + this->centerColor = __value; + } + /*! \brief returns the property centerColor. + \details Description of the parameter centerColor is:
\copybrief centerColor.
+ \see centerColor for more information */ + inline virtual QColor get_centerColor() const + { + return this->centerColor; + } + /*! \brief sets the property centerStyle to the specified \a __value. + \details Description of the parameter centerStyle is:
\copybrief centerStyle.
+ \see centerStyle for more information */ + inline virtual void set_centerStyle(const Qt::PenStyle & __value) + { + this->centerStyle = __value; + } + /*! \brief returns the property centerStyle. + \details Description of the parameter centerStyle is:
\copybrief centerStyle.
+ \see centerStyle for more information */ + inline virtual Qt::PenStyle get_centerStyle() const + { + return this->centerStyle; + } + /*! \brief sets the property centerLineWidth to the specified \a __value. + \details Description of the parameter centerLineWidth is:
\copybrief centerLineWidth.
+ \see centerLineWidth for more information */ + inline virtual void set_centerLineWidth(double __value) + { + this->centerLineWidth = __value; + } + /*! \brief returns the property centerLineWidth. + \details Description of the parameter centerLineWidth is:
\copybrief centerLineWidth.
+ \see centerLineWidth for more information */ + inline virtual double get_centerLineWidth() const + { + return this->centerLineWidth; + } + /*! \brief sets the property rangeMin to the specified \a __value. + \details Description of the parameter rangeMin is:
\copybrief rangeMin.
+ \see rangeMin for more information */ + inline virtual void set_rangeMin(double __value) + { + this->rangeMin = __value; + } + /*! \brief returns the property rangeMin. + \details Description of the parameter rangeMin is:
\copybrief rangeMin.
+ \see rangeMin for more information */ + inline virtual double get_rangeMin() const + { + return this->rangeMin; + } + /*! \brief sets the property rangeMax to the specified \a __value. + \details Description of the parameter rangeMax is:
\copybrief rangeMax.
+ \see rangeMax for more information */ + inline virtual void set_rangeMax(double __value) + { + this->rangeMax = __value; + } + /*! \brief returns the property rangeMax. + \details Description of the parameter rangeMax is:
\copybrief rangeMax.
+ \see rangeMax for more information */ + inline virtual double get_rangeMax() const + { + return this->rangeMax; + } + /*! \brief sets the property sizeMin to the specified \a __value. + \details Description of the parameter sizeMin is:
\copybrief sizeMin.
+ \see sizeMin for more information */ + inline virtual void set_sizeMin(double __value) + { + this->sizeMin = __value; + } + /*! \brief returns the property sizeMin. + \details Description of the parameter sizeMin is:
\copybrief sizeMin.
+ \see sizeMin for more information */ + inline virtual double get_sizeMin() const + { + return this->sizeMin; + } + /*! \brief sets the property sizeMax to the specified \a __value. + \details Description of the parameter sizeMax is:
\copybrief sizeMax.
+ \see sizeMax for more information */ + inline virtual void set_sizeMax(double __value) + { + this->sizeMax = __value; + } + /*! \brief returns the property sizeMax. + \details Description of the parameter sizeMax is:
\copybrief sizeMax.
+ \see sizeMax for more information */ + inline virtual double get_sizeMax() const + { + return this->sizeMax; + } + /*! \brief sets the property unlimitedSizeMin to the specified \a __value. + \details Description of the parameter unlimitedSizeMin is:
\copybrief unlimitedSizeMin.
+ \see unlimitedSizeMin for more information */ + inline virtual void set_unlimitedSizeMin(bool __value) + { + this->unlimitedSizeMin = __value; + } + /*! \brief returns the property unlimitedSizeMin. + \details Description of the parameter unlimitedSizeMin is:
\copybrief unlimitedSizeMin.
+ \see unlimitedSizeMin for more information */ + inline virtual bool get_unlimitedSizeMin() const + { + return this->unlimitedSizeMin; + } + /*! \brief sets the property unlimitedSizeMax to the specified \a __value. + \details Description of the parameter unlimitedSizeMax is:
\copybrief unlimitedSizeMax.
+ \see unlimitedSizeMax for more information */ + inline virtual void set_unlimitedSizeMax(bool __value) + { + this->unlimitedSizeMax = __value; + } + /*! \brief returns the property unlimitedSizeMax. + \details Description of the parameter unlimitedSizeMax is:
\copybrief unlimitedSizeMax.
+ \see unlimitedSizeMax for more information */ + inline virtual bool get_unlimitedSizeMax() const + { + return this->unlimitedSizeMax; + } - JKQTPGET_SET_MACRO(double, rangeCenter) - JKQTPGET_SET_MACRO(bool, plotCenterLine) - JKQTPGET_SET_MACRO(bool, invertedRange) - JKQTPGET_SET_MACRO(bool, plotRange) - JKQTPGET_SET_MACRO(bool, fillRange) - JKQTPGET_SET_MACRO(bool, plotRangeLines) + /*! \brief sets the property rangeCenter to the specified \a __value. + \details Description of the parameter rangeCenter is:
\copybrief rangeCenter.
+ \see rangeCenter for more information */ + inline virtual void set_rangeCenter(double __value) + { + this->rangeCenter = __value; + } + /*! \brief returns the property rangeCenter. + \details Description of the parameter rangeCenter is:
\copybrief rangeCenter.
+ \see rangeCenter for more information */ + inline virtual double get_rangeCenter() const + { + return this->rangeCenter; + } + /*! \brief sets the property plotCenterLine to the specified \a __value. + \details Description of the parameter plotCenterLine is:
\copybrief plotCenterLine.
+ \see plotCenterLine for more information */ + inline virtual void set_plotCenterLine(bool __value) + { + this->plotCenterLine = __value; + } + /*! \brief returns the property plotCenterLine. + \details Description of the parameter plotCenterLine is:
\copybrief plotCenterLine.
+ \see plotCenterLine for more information */ + inline virtual bool get_plotCenterLine() const + { + return this->plotCenterLine; + } + /*! \brief sets the property invertedRange to the specified \a __value. + \details Description of the parameter invertedRange is:
\copybrief invertedRange.
+ \see invertedRange for more information */ + inline virtual void set_invertedRange(bool __value) + { + this->invertedRange = __value; + } + /*! \brief returns the property invertedRange. + \details Description of the parameter invertedRange is:
\copybrief invertedRange.
+ \see invertedRange for more information */ + inline virtual bool get_invertedRange() const + { + return this->invertedRange; + } + /*! \brief sets the property plotRange to the specified \a __value. + \details Description of the parameter plotRange is:
\copybrief plotRange.
+ \see plotRange for more information */ + inline virtual void set_plotRange(bool __value) + { + this->plotRange = __value; + } + /*! \brief returns the property plotRange. + \details Description of the parameter plotRange is:
\copybrief plotRange.
+ \see plotRange for more information */ + inline virtual bool get_plotRange() const + { + return this->plotRange; + } + /*! \brief sets the property fillRange to the specified \a __value. + \details Description of the parameter fillRange is:
\copybrief fillRange.
+ \see fillRange for more information */ + inline virtual void set_fillRange(bool __value) + { + this->fillRange = __value; + } + /*! \brief returns the property fillRange. + \details Description of the parameter fillRange is:
\copybrief fillRange.
+ \see fillRange for more information */ + inline virtual bool get_fillRange() const + { + return this->fillRange; + } + /*! \brief sets the property plotRangeLines to the specified \a __value. + \details Description of the parameter plotRangeLines is:
\copybrief plotRangeLines.
+ \see plotRangeLines for more information */ + inline virtual void set_plotRangeLines(bool __value) + { + this->plotRangeLines = __value; + } + /*! \brief returns the property plotRangeLines. + \details Description of the parameter plotRangeLines is:
\copybrief plotRangeLines.
+ \see plotRangeLines for more information */ + inline virtual bool get_plotRangeLines() const + { + return this->plotRangeLines; + } protected: /** \brief min-value of range */ double rangeMin; diff --git a/lib/jkqtplotter/jkqtpgraphsbarchart.h b/lib/jkqtplotter/jkqtpgraphsbarchart.h index afac24cd46..54c190b9b6 100644 --- a/lib/jkqtplotter/jkqtpgraphsbarchart.h +++ b/lib/jkqtplotter/jkqtpgraphsbarchart.h @@ -106,14 +106,118 @@ class LIB_EXPORT JKQTPbarVerticalGraph: public JKQTPxyGraph { virtual bool isHorizontal() const; - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(double, shift) - JKQTPGET_SET_MACRO(double, width) - JKQTPGET_SET_MACRO(double, baseline) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property shift to the specified \a __value. + \details Description of the parameter shift is:
\copybrief shift.
+ \see shift for more information */ + inline virtual void set_shift(double __value) + { + this->shift = __value; + } + /*! \brief returns the property shift. + \details Description of the parameter shift is:
\copybrief shift.
+ \see shift for more information */ + inline virtual double get_shift() const + { + return this->shift; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + this->width = __value; + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property baseline to the specified \a __value. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual void set_baseline(double __value) + { + this->baseline = __value; + } + /*! \brief returns the property baseline. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual double get_baseline() const + { + return this->baseline; + } /** \brief sets the fill color and the color together, where fillColor is set to \a fill and the line-color is set to \c fill.darker(colorDarker) */ void set_fillColor_and_darkenedColor(QColor fill, int colorDarker=200); protected: diff --git a/lib/jkqtplotter/jkqtpgraphsbase.h b/lib/jkqtplotter/jkqtpgraphsbase.h index 325d553c2f..8b81fec585 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.h +++ b/lib/jkqtplotter/jkqtpgraphsbase.h @@ -99,8 +99,34 @@ class LIB_EXPORT JKQTPplotElement: public QObject { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor()=0; - JKQTPGET_SET_VMACRO(QString, title) - JKQTPGET_SET_MACRO(bool, visible) + /*! \brief sets the property title to the specified \a __value. + \details Description of the parameter title is:
\copybrief title.
+ \see title for more information */ + inline virtual void set_title(const QString & __value) + { + this->title = __value; + } + /*! \brief returns the property title. + \details Description of the parameter title is:
\copybrief title.
+ \see title for more information */ + inline virtual QString get_title() const + { + return this->title; + } + /*! \brief sets the property visible to the specified \a __value. + \details Description of the parameter visible is:
\copybrief visible.
+ \see visible for more information */ + inline virtual void set_visible(bool __value) + { + this->visible = __value; + } + /*! \brief returns the property visible. + \details Description of the parameter visible is:
\copybrief visible.
+ \see visible for more information */ + inline virtual bool get_visible() const + { + return this->visible; + } /** \brief returns the parent painter class */ inline JKQtBasePlotter* getParent() { return parent; } @@ -207,8 +233,34 @@ class LIB_EXPORT JKQTPgraph: public JKQTPplotElement { virtual ~JKQTPgraph() ; - JKQTPGET_SET_MACRO(int, datarange_start) - JKQTPGET_SET_MACRO(int, datarange_end) + /*! \brief sets the property datarange_start to the specified \a __value. + \details Description of the parameter datarange_start is:
\copybrief datarange_start.
+ \see datarange_start for more information */ + inline virtual void set_datarange_start(int __value) + { + this->datarange_start = __value; + } + /*! \brief returns the property datarange_start. + \details Description of the parameter datarange_start is:
\copybrief datarange_start.
+ \see datarange_start for more information */ + inline virtual int get_datarange_start() const + { + return this->datarange_start; + } + /*! \brief sets the property datarange_end to the specified \a __value. + \details Description of the parameter datarange_end is:
\copybrief datarange_end.
+ \see datarange_end for more information */ + inline virtual void set_datarange_end(int __value) + { + this->datarange_end = __value; + } + /*! \brief returns the property datarange_end. + \details Description of the parameter datarange_end is:
\copybrief datarange_end.
+ \see datarange_end for more information */ + inline virtual int get_datarange_end() const + { + return this->datarange_end; + } /** \brief returns \c true if the given column is used by the graph */ virtual bool usesColumn(int column) const; @@ -312,12 +364,57 @@ class LIB_EXPORT JKQTPxyGraph: public JKQTPgraph { /** \copydoc JKQTPgraph::usesColumn() */ virtual bool usesColumn(int column) const override; - JKQTPGET_SET_MACRO(int, xColumn) - JKQTPSET_CAST_MACRO(size_t, int, xColumn) - JKQTPGET_SET_MACRO(int, yColumn) - JKQTPSET_CAST_MACRO(size_t, int, yColumn) - JKQTPGET_SET_MACRO(DataSortOrder, sortData) - /** \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ + /*! \brief sets the property xColumn to the specified \a __value. + \details Description of the parameter xColumn is:
\copybrief xColumn.
+ \see xColumn for more information */ + inline virtual void set_xColumn(int __value) + { + this->xColumn = __value; + } + /*! \brief returns the property xColumn. + \details Description of the parameter xColumn is:
\copybrief xColumn.
+ \see xColumn for more information */ + inline virtual int get_xColumn() const + { + return this->xColumn; + } + /*! \brief sets the property xColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter xColumn is:
\copybrief xColumn.
+ \see xColumn for more information */ + inline virtual void set_xColumn (size_t __value) { this->xColumn = static_cast(__value); } + /*! \brief sets the property yColumn to the specified \a __value. + \details Description of the parameter yColumn is:
\copybrief yColumn.
+ \see yColumn for more information */ + inline virtual void set_yColumn(int __value) + { + this->yColumn = __value; + } + /*! \brief returns the property yColumn. + \details Description of the parameter yColumn is:
\copybrief yColumn.
+ \see yColumn for more information */ + inline virtual int get_yColumn() const + { + return this->yColumn; + } + /*! \brief sets the property yColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter yColumn is:
\copybrief yColumn.
+ \see yColumn for more information */ + inline virtual void set_yColumn (size_t __value) { this->yColumn = static_cast(__value); } + /*! \brief sets the property sortData to the specified \a __value. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual void set_sortData(const DataSortOrder & __value) + { + this->sortData = __value; + } + /*! \brief returns the property sortData. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual DataSortOrder get_sortData() const + { + return this->sortData; + } + /*! \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ void set_sortData(int __value); protected: @@ -369,13 +466,81 @@ class LIB_EXPORT JKQTPsingleColumnGraph: public JKQTPgraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor(); - JKQTPGET_SET_MACRO(int, dataColumn) - JKQTPSET_CAST_MACRO(size_t, int, dataColumn) - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(DataSortOrder, sortData) - /** \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ + /*! \brief sets the property dataColumn to the specified \a __value. + \details Description of the parameter dataColumn is:
\copybrief dataColumn.
+ \see dataColumn for more information */ + inline virtual void set_dataColumn(int __value) + { + this->dataColumn = __value; + } + /*! \brief returns the property dataColumn. + \details Description of the parameter dataColumn is:
\copybrief dataColumn.
+ \see dataColumn for more information */ + inline virtual int get_dataColumn() const + { + return this->dataColumn; + } + /*! \brief sets the property dataColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter dataColumn is:
\copybrief dataColumn.
+ \see dataColumn for more information */ + inline virtual void set_dataColumn (size_t __value) { this->dataColumn = static_cast(__value); } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property sortData to the specified \a __value. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual void set_sortData(const DataSortOrder & __value) + { + this->sortData = __value; + } + /*! \brief returns the property sortData. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual DataSortOrder get_sortData() const + { + return this->sortData; + } + /*! \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ void set_sortData(int __value); /** \copydoc JKQTPgraph::usesColumn() */ @@ -436,12 +601,90 @@ class LIB_EXPORT JKQTPgraphErrors { JKQTPgraphErrors(QColor graphColor=QColor("black")); virtual ~JKQTPgraphErrors(); - JKQTPGET_SET_MACRO(QColor, errorColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, errorStyle) - JKQTPGET_SET_MACRO(double, errorWidth) - JKQTPGET_SET_MACRO(QColor, errorFillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, errorFillStyle) - JKQTPGET_SET_MACRO(double, errorbarSize) + /*! \brief sets the property errorColor to the specified \a __value. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual void set_errorColor(const QColor & __value) + { + this->errorColor = __value; + } + /*! \brief returns the property errorColor. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual QColor get_errorColor() const + { + return this->errorColor; + } + /*! \brief sets the property errorStyle to the specified \a __value. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual void set_errorStyle(const Qt::PenStyle & __value) + { + this->errorStyle = __value; + } + /*! \brief returns the property errorStyle. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual Qt::PenStyle get_errorStyle() const + { + return this->errorStyle; + } + /*! \brief sets the property errorWidth to the specified \a __value. + \details Description of the parameter errorWidth is:
\copybrief errorWidth.
+ \see errorWidth for more information */ + inline virtual void set_errorWidth(double __value) + { + this->errorWidth = __value; + } + /*! \brief returns the property errorWidth. + \details Description of the parameter errorWidth is:
\copybrief errorWidth.
+ \see errorWidth for more information */ + inline virtual double get_errorWidth() const + { + return this->errorWidth; + } + /*! \brief sets the property errorFillColor to the specified \a __value. + \details Description of the parameter errorFillColor is:
\copybrief errorFillColor.
+ \see errorFillColor for more information */ + inline virtual void set_errorFillColor(const QColor & __value) + { + this->errorFillColor = __value; + } + /*! \brief returns the property errorFillColor. + \details Description of the parameter errorFillColor is:
\copybrief errorFillColor.
+ \see errorFillColor for more information */ + inline virtual QColor get_errorFillColor() const + { + return this->errorFillColor; + } + /*! \brief sets the property errorFillStyle to the specified \a __value. + \details Description of the parameter errorFillStyle is:
\copybrief errorFillStyle.
+ \see errorFillStyle for more information */ + inline virtual void set_errorFillStyle(const Qt::BrushStyle & __value) + { + this->errorFillStyle = __value; + } + /*! \brief returns the property errorFillStyle. + \details Description of the parameter errorFillStyle is:
\copybrief errorFillStyle.
+ \see errorFillStyle for more information */ + inline virtual Qt::BrushStyle get_errorFillStyle() const + { + return this->errorFillStyle; + } + /*! \brief sets the property errorbarSize to the specified \a __value. + \details Description of the parameter errorbarSize is:
\copybrief errorbarSize.
+ \see errorbarSize for more information */ + inline virtual void set_errorbarSize(double __value) + { + this->errorbarSize = __value; + } + /*! \brief returns the property errorbarSize. + \details Description of the parameter errorbarSize is:
\copybrief errorbarSize.
+ \see errorbarSize for more information */ + inline virtual double get_errorbarSize() const + { + return this->errorbarSize; + } /** \brief returns true, if the error plots use the given column */ virtual bool errorUsesColumn(int c) const; @@ -495,12 +738,38 @@ class LIB_EXPORT JKQTPxGraphErrors: public JKQTPgraphErrors { /** \brief class contructor */ JKQTPxGraphErrors(QColor graphColor=QColor("black")); - JKQTPGET_SET_MACRO(bool, xErrorSymmetric) - /** \brief returns the property xErrorColumnLower. \details Description of the parameter xErrorColumnLower is:
\copybrief xErrorColumnLower.
. \see xErrorColumnLower for more information */ + /*! \brief sets the property xErrorSymmetric to the specified \a __value. + \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric.
+ \see xErrorSymmetric for more information */ + inline virtual void set_xErrorSymmetric(bool __value) + { + this->xErrorSymmetric = __value; + } + /*! \brief returns the property xErrorSymmetric. + \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric.
+ \see xErrorSymmetric for more information */ + inline virtual bool get_xErrorSymmetric() const + { + return this->xErrorSymmetric; + } + /*! \brief returns the property xErrorColumnLower. \details Description of the parameter xErrorColumnLower is:
\copybrief xErrorColumnLower.
. \see xErrorColumnLower for more information */ inline int get_xErrorColumnLower() const { return this->xErrorColumnLower; } - /** \brief returns the property xErrorColumn. \details Description of the parameter xErrorColumn is:
\copybrief xErrorColumn.
. \see xErrorColumn for more information */ + /*! \brief returns the property xErrorColumn. \details Description of the parameter xErrorColumn is:
\copybrief xErrorColumn.
. \see xErrorColumn for more information */ inline int get_xErrorColumn() const { return this->xErrorColumn; } - JKQTPGET_SET_MACRO(JKQTPerrorPlotstyle, xErrorStyle) + /*! \brief sets the property xErrorStyle to the specified \a __value. + \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle.
+ \see xErrorStyle for more information */ + inline virtual void set_xErrorStyle(const JKQTPerrorPlotstyle & __value) + { + this->xErrorStyle = __value; + } + /*! \brief returns the property xErrorStyle. + \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle.
+ \see xErrorStyle for more information */ + inline virtual JKQTPerrorPlotstyle get_xErrorStyle() const + { + return this->xErrorStyle; + } /** \brief set the column from which to read the error values for x-error indicators */ void set_xErrorColumn(int __value); /** \brief set the column from which to read the error values for lower x-error indicators (if not set [=-1], the xErrorColumn-values will be used for upper and lower error indicators) */ @@ -539,12 +808,38 @@ class LIB_EXPORT JKQTPyGraphErrors: public JKQTPgraphErrors { /** \brief class contructor */ JKQTPyGraphErrors(QColor graphColor=QColor("black")); - JKQTPGET_SET_MACRO(bool, yErrorSymmetric) - /** \brief returns the property yErrorColumnLower. \details Description of the parameter yErrorColumnLower is:
\copybrief yErrorColumnLower.
. \see yErrorColumnLower for more information */ + /*! \brief sets the property yErrorSymmetric to the specified \a __value. + \details Description of the parameter yErrorSymmetric is:
\copybrief yErrorSymmetric.
+ \see yErrorSymmetric for more information */ + inline virtual void set_yErrorSymmetric(bool __value) + { + this->yErrorSymmetric = __value; + } + /*! \brief returns the property yErrorSymmetric. + \details Description of the parameter yErrorSymmetric is:
\copybrief yErrorSymmetric.
+ \see yErrorSymmetric for more information */ + inline virtual bool get_yErrorSymmetric() const + { + return this->yErrorSymmetric; + } + /*! \brief returns the property yErrorColumnLower. \details Description of the parameter yErrorColumnLower is:
\copybrief yErrorColumnLower.
. \see yErrorColumnLower for more information */ inline int get_yErrorColumnLower() const { return this->yErrorColumnLower; } - /** \brief returns the property yErrorColumn. \details Description of the parameter yErrorColumn is:
\copybrief yErrorColumn.
. \see yErrorColumn for more information */ + /*! \brief returns the property yErrorColumn. \details Description of the parameter yErrorColumn is:
\copybrief yErrorColumn.
. \see yErrorColumn for more information */ inline int get_yErrorColumn() const { return this->yErrorColumn; } - JKQTPGET_SET_MACRO(JKQTPerrorPlotstyle, yErrorStyle) + /*! \brief sets the property yErrorStyle to the specified \a __value. + \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle.
+ \see yErrorStyle for more information */ + inline virtual void set_yErrorStyle(const JKQTPerrorPlotstyle & __value) + { + this->yErrorStyle = __value; + } + /*! \brief returns the property yErrorStyle. + \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle.
+ \see yErrorStyle for more information */ + inline virtual JKQTPerrorPlotstyle get_yErrorStyle() const + { + return this->yErrorStyle; + } /** \copydoc JKQTPgraphErrors::errorUsesColumn() */ virtual bool errorUsesColumn(int c) const override; @@ -580,18 +875,70 @@ class LIB_EXPORT JKQTPxyGraphErrors: public JKQTPgraphErrors { public: /** \brief class contructor */ JKQTPxyGraphErrors(QColor graphColor=QColor("black")); - JKQTPGET_SET_MACRO(bool, xErrorSymmetric) - JKQTPGET_SET_MACRO(bool, yErrorSymmetric) - /** \brief returns the property xErrorColumnLower. \details Description of the parameter xErrorColumnLower is:
\copybrief xErrorColumnLower.
. \see xErrorColumnLower for more information */ + /*! \brief sets the property xErrorSymmetric to the specified \a __value. + \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric.
+ \see xErrorSymmetric for more information */ + inline virtual void set_xErrorSymmetric(bool __value) + { + this->xErrorSymmetric = __value; + } + /*! \brief returns the property xErrorSymmetric. + \details Description of the parameter xErrorSymmetric is:
\copybrief xErrorSymmetric.
+ \see xErrorSymmetric for more information */ + inline virtual bool get_xErrorSymmetric() const + { + return this->xErrorSymmetric; + } + /*! \brief sets the property yErrorSymmetric to the specified \a __value. + \details Description of the parameter yErrorSymmetric is:
\copybrief yErrorSymmetric.
+ \see yErrorSymmetric for more information */ + inline virtual void set_yErrorSymmetric(bool __value) + { + this->yErrorSymmetric = __value; + } + /*! \brief returns the property yErrorSymmetric. + \details Description of the parameter yErrorSymmetric is:
\copybrief yErrorSymmetric.
+ \see yErrorSymmetric for more information */ + inline virtual bool get_yErrorSymmetric() const + { + return this->yErrorSymmetric; + } + /*! \brief returns the property xErrorColumnLower. \details Description of the parameter xErrorColumnLower is:
\copybrief xErrorColumnLower.
. \see xErrorColumnLower for more information */ inline int get_xErrorColumnLower() const { return this->xErrorColumnLower; } - /** \brief returns the property xErrorColumn. \details Description of the parameter xErrorColumn is:
\copybrief xErrorColumn.
. \see xErrorColumn for more information */ + /*! \brief returns the property xErrorColumn. \details Description of the parameter xErrorColumn is:
\copybrief xErrorColumn.
. \see xErrorColumn for more information */ inline int get_xErrorColumn() const { return this->xErrorColumn; } - /** \brief returns the property yErrorColumnLower. \details Description of the parameter yErrorColumnLower is:
\copybrief yErrorColumnLower.
. \see yErrorColumnLower for more information */ + /*! \brief returns the property yErrorColumnLower. \details Description of the parameter yErrorColumnLower is:
\copybrief yErrorColumnLower.
. \see yErrorColumnLower for more information */ inline int get_yErrorColumnLower() const { return this->yErrorColumnLower; } - /** \brief returns the property yErrorColumn. \details Description of the parameter yErrorColumn is:
\copybrief yErrorColumn.
. \see yErrorColumn for more information */ + /*! \brief returns the property yErrorColumn. \details Description of the parameter yErrorColumn is:
\copybrief yErrorColumn.
. \see yErrorColumn for more information */ inline int get_yErrorColumn() const { return this->yErrorColumn; } - JKQTPGET_SET_MACRO(JKQTPerrorPlotstyle, yErrorStyle) - JKQTPGET_SET_MACRO(JKQTPerrorPlotstyle, xErrorStyle) + /*! \brief sets the property yErrorStyle to the specified \a __value. + \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle.
+ \see yErrorStyle for more information */ + inline virtual void set_yErrorStyle(const JKQTPerrorPlotstyle & __value) + { + this->yErrorStyle = __value; + } + /*! \brief returns the property yErrorStyle. + \details Description of the parameter yErrorStyle is:
\copybrief yErrorStyle.
+ \see yErrorStyle for more information */ + inline virtual JKQTPerrorPlotstyle get_yErrorStyle() const + { + return this->yErrorStyle; + } + /*! \brief sets the property xErrorStyle to the specified \a __value. + \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle.
+ \see xErrorStyle for more information */ + inline virtual void set_xErrorStyle(const JKQTPerrorPlotstyle & __value) + { + this->xErrorStyle = __value; + } + /*! \brief returns the property xErrorStyle. + \details Description of the parameter xErrorStyle is:
\copybrief xErrorStyle.
+ \see xErrorStyle for more information */ + inline virtual JKQTPerrorPlotstyle get_xErrorStyle() const + { + return this->xErrorStyle; + } /** \copydoc JKQTPgraphErrors::errorUsesColumn() */ virtual bool errorUsesColumn(int c) const override; diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.h b/lib/jkqtplotter/jkqtpgraphsboxplot.h index da07fe107f..9e883859f3 100644 --- a/lib/jkqtplotter/jkqtpgraphsboxplot.h +++ b/lib/jkqtplotter/jkqtpgraphsboxplot.h @@ -90,33 +90,275 @@ class LIB_EXPORT JKQTPboxplotVerticalGraph: public JKQTPgraph { /** \copydoc JKQTPgraph::usesColumn() */ virtual bool usesColumn(int c) const override; - JKQTPGET_SET_MACRO(DataSortOrder, sortData) - /** \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ + /*! \brief sets the property sortData to the specified \a __value. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual void set_sortData(const DataSortOrder & __value) + { + this->sortData = __value; + } + /*! \brief returns the property sortData. + \details Description of the parameter sortData is:
\copybrief sortData.
+ \see sortData for more information */ + inline virtual DataSortOrder get_sortData() const + { + return this->sortData; + } + /*! \brief sets the property sortData to the specified \a __value. \details Description of the parameter sortData is:
\copybrief sortData.
\see sortData for more information */ void set_sortData(int __value); - JKQTPGET_SET_MACRO(int, posColumn) - JKQTPSET_CAST_MACRO(size_t, int, posColumn) - JKQTPGET_SET_MACRO(int, medianColumn) - JKQTPSET_CAST_MACRO(size_t, int, medianColumn) - JKQTPGET_SET_MACRO(int, meanColumn) - JKQTPSET_CAST_MACRO(size_t, int, meanColumn) - JKQTPGET_SET_MACRO(int, minColumn) - JKQTPSET_CAST_MACRO(size_t, int, minColumn) - JKQTPGET_SET_MACRO(int, maxColumn) - JKQTPSET_CAST_MACRO(size_t, int, maxColumn) - JKQTPGET_SET_MACRO(int, percentile25Column) - JKQTPSET_CAST_MACRO(size_t, int, percentile25Column) - JKQTPGET_SET_MACRO(int, percentile75Column) - JKQTPSET_CAST_MACRO(size_t, int, percentile75Column) - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, whiskerStyle) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(double, boxWidth) + /*! \brief sets the property posColumn to the specified \a __value. + \details Description of the parameter posColumn is:
\copybrief posColumn.
+ \see posColumn for more information */ + inline virtual void set_posColumn(int __value) + { + this->posColumn = __value; + } + /*! \brief returns the property posColumn. + \details Description of the parameter posColumn is:
\copybrief posColumn.
+ \see posColumn for more information */ + inline virtual int get_posColumn() const + { + return this->posColumn; + } + /*! \brief sets the property posColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter posColumn is:
\copybrief posColumn.
+ \see posColumn for more information */ + inline virtual void set_posColumn (size_t __value) { this->posColumn = static_cast(__value); } + /*! \brief sets the property medianColumn to the specified \a __value. + \details Description of the parameter medianColumn is:
\copybrief medianColumn.
+ \see medianColumn for more information */ + inline virtual void set_medianColumn(int __value) + { + this->medianColumn = __value; + } + /*! \brief returns the property medianColumn. + \details Description of the parameter medianColumn is:
\copybrief medianColumn.
+ \see medianColumn for more information */ + inline virtual int get_medianColumn() const + { + return this->medianColumn; + } + /*! \brief sets the property medianColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter medianColumn is:
\copybrief medianColumn.
+ \see medianColumn for more information */ + inline virtual void set_medianColumn (size_t __value) { this->medianColumn = static_cast(__value); } + /*! \brief sets the property meanColumn to the specified \a __value. + \details Description of the parameter meanColumn is:
\copybrief meanColumn.
+ \see meanColumn for more information */ + inline virtual void set_meanColumn(int __value) + { + this->meanColumn = __value; + } + /*! \brief returns the property meanColumn. + \details Description of the parameter meanColumn is:
\copybrief meanColumn.
+ \see meanColumn for more information */ + inline virtual int get_meanColumn() const + { + return this->meanColumn; + } + /*! \brief sets the property meanColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter meanColumn is:
\copybrief meanColumn.
+ \see meanColumn for more information */ + inline virtual void set_meanColumn (size_t __value) { this->meanColumn = static_cast(__value); } + /*! \brief sets the property minColumn to the specified \a __value. + \details Description of the parameter minColumn is:
\copybrief minColumn.
+ \see minColumn for more information */ + inline virtual void set_minColumn(int __value) + { + this->minColumn = __value; + } + /*! \brief returns the property minColumn. + \details Description of the parameter minColumn is:
\copybrief minColumn.
+ \see minColumn for more information */ + inline virtual int get_minColumn() const + { + return this->minColumn; + } + /*! \brief sets the property minColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter minColumn is:
\copybrief minColumn.
+ \see minColumn for more information */ + inline virtual void set_minColumn( size_t __value) { this->minColumn = static_cast(__value); } + /*! \brief sets the property maxColumn to the specified \a __value. + \details Description of the parameter maxColumn is:
\copybrief maxColumn.
+ \see maxColumn for more information */ + inline virtual void set_maxColumn(int __value) + { + this->maxColumn = __value; + } + /*! \brief returns the property maxColumn. + \details Description of the parameter maxColumn is:
\copybrief maxColumn.
+ \see maxColumn for more information */ + inline virtual int get_maxColumn() const + { + return this->maxColumn; + } + /*! \brief sets the property maxColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter maxColumn is:
\copybrief maxColumn.
+ \see maxColumn for more information */ + inline virtual void set_maxColumn (size_t __value) { this->maxColumn = static_cast(__value); } + /*! \brief sets the property percentile25Column to the specified \a __value. + \details Description of the parameter percentile25Column is:
\copybrief percentile25Column.
+ \see percentile25Column for more information */ + inline virtual void set_percentile25Column(int __value) + { + this->percentile25Column = __value; + } + /*! \brief returns the property percentile25Column. + \details Description of the parameter percentile25Column is:
\copybrief percentile25Column.
+ \see percentile25Column for more information */ + inline virtual int get_percentile25Column() const + { + return this->percentile25Column; + } + /*! \brief sets the property percentile25Column to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter percentile25Column is:
\copybrief percentile25Column.
+ \see percentile25Column for more information */ + inline virtual void set_percentile25Column (size_t __value) { this->percentile25Column = static_cast(__value); } + /*! \brief sets the property percentile75Column to the specified \a __value. + \details Description of the parameter percentile75Column is:
\copybrief percentile75Column.
+ \see percentile75Column for more information */ + inline virtual void set_percentile75Column(int __value) + { + this->percentile75Column = __value; + } + /*! \brief returns the property percentile75Column. + \details Description of the parameter percentile75Column is:
\copybrief percentile75Column.
+ \see percentile75Column for more information */ + inline virtual int get_percentile75Column() const + { + return this->percentile75Column; + } + /*! \brief sets the property percentile75Column to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter percentile75Column is:
\copybrief percentile75Column.
+ \see percentile75Column for more information */ + inline virtual void set_percentile75Column (size_t __value) { this->percentile75Column = static_cast(__value); } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property whiskerStyle to the specified \a __value. + \details Description of the parameter whiskerStyle is:
\copybrief whiskerStyle.
+ \see whiskerStyle for more information */ + inline virtual void set_whiskerStyle(const Qt::PenStyle & __value) + { + this->whiskerStyle = __value; + } + /*! \brief returns the property whiskerStyle. + \details Description of the parameter whiskerStyle is:
\copybrief whiskerStyle.
+ \see whiskerStyle for more information */ + inline virtual Qt::PenStyle get_whiskerStyle() const + { + return this->whiskerStyle; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property boxWidth to the specified \a __value. + \details Description of the parameter boxWidth is:
\copybrief boxWidth.
+ \see boxWidth for more information */ + inline virtual void set_boxWidth(double __value) + { + this->boxWidth = __value; + } + /*! \brief returns the property boxWidth. + \details Description of the parameter boxWidth is:
\copybrief boxWidth.
+ \see boxWidth for more information */ + inline virtual double get_boxWidth() const + { + return this->boxWidth; + } - JKQTPGET_SET_MACRO(JKQTPgraphSymbols, meanSymbol) - JKQTPGET_SET_MACRO(double, meanSymbolWidth) - JKQTPGET_SET_MACRO(double, meanSymbolSize) + /*! \brief sets the property meanSymbol to the specified \a __value. + \details Description of the parameter meanSymbol is:
\copybrief meanSymbol.
+ \see meanSymbol for more information */ + inline virtual void set_meanSymbol(const JKQTPgraphSymbols & __value) + { + this->meanSymbol = __value; + } + /*! \brief returns the property meanSymbol. + \details Description of the parameter meanSymbol is:
\copybrief meanSymbol.
+ \see meanSymbol for more information */ + inline virtual JKQTPgraphSymbols get_meanSymbol() const + { + return this->meanSymbol; + } + /*! \brief sets the property meanSymbolWidth to the specified \a __value. + \details Description of the parameter meanSymbolWidth is:
\copybrief meanSymbolWidth.
+ \see meanSymbolWidth for more information */ + inline virtual void set_meanSymbolWidth(double __value) + { + this->meanSymbolWidth = __value; + } + /*! \brief returns the property meanSymbolWidth. + \details Description of the parameter meanSymbolWidth is:
\copybrief meanSymbolWidth.
+ \see meanSymbolWidth for more information */ + inline virtual double get_meanSymbolWidth() const + { + return this->meanSymbolWidth; + } + /*! \brief sets the property meanSymbolSize to the specified \a __value. + \details Description of the parameter meanSymbolSize is:
\copybrief meanSymbolSize.
+ \see meanSymbolSize for more information */ + inline virtual void set_meanSymbolSize(double __value) + { + this->meanSymbolSize = __value; + } + /*! \brief returns the property meanSymbolSize. + \details Description of the parameter meanSymbolSize is:
\copybrief meanSymbolSize.
+ \see meanSymbolSize for more information */ + inline virtual double get_meanSymbolSize() const + { + return this->meanSymbolSize; + } protected: /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ @@ -248,25 +490,271 @@ class LIB_EXPORT JKQTPboxplotVerticalElement: public JKQTPgraph { virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - JKQTPGET_SET_MACRO(double, pos) - JKQTPGET_SET_MACRO_I(double, median, drawMedian=true) - JKQTPGET_SET_MACRO_I(double, mean, drawMean=true) - JKQTPGET_SET_MACRO_I(double, min, drawMinMax=true) - JKQTPGET_SET_MACRO_I(double, max, drawMinMax=true) - JKQTPGET_SET_MACRO(double, percentile25) - JKQTPGET_SET_MACRO(double, percentile75) - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, whiskerStyle) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(double, boxWidth) + /*! \brief sets the property pos to the specified \a __value. + \details Description of the parameter pos is:
\copybrief pos.
+ \see pos for more information */ + inline virtual void set_pos(double __value) + { + this->pos = __value; + } + /*! \brief returns the property pos. + \details Description of the parameter pos is:
\copybrief pos.
+ \see pos for more information */ + inline virtual double get_pos() const + { + return this->pos; + } + /*! \brief sets the property median to the specified \a __value. + \details Description of the parameter median is:
\copybrief median.
+ \see median for more information */ + inline virtual void set_median(double __value) + { + if (this->median != __value) { + this->median = __value; + drawMedian=true; + } + } + /*! \brief returns the property median. + \details Description of the parameter median is:
\copybrief median.
+ \see median for more information */ + inline virtual double get_median() const + { + return this->median; + } + /*! \brief sets the property mean to the specified \a __value. + \details Description of the parameter mean is:
\copybrief mean.
+ \see mean for more information */ + inline virtual void set_mean(double __value) + { + if (this->mean != __value) { + this->mean = __value; + drawMean=true; + } + } + /*! \brief returns the property mean. + \details Description of the parameter mean is:
\copybrief mean.
+ \see mean for more information */ + inline virtual double get_mean() const + { + return this->mean; + } + /*! \brief sets the property min to the specified \a __value. + \details Description of the parameter min is:
\copybrief min.
+ \see min for more information */ + inline virtual void set_min(double __value) + { + if (this->min != __value) { + this->min = __value; + drawMinMax=true; + } + } + /*! \brief returns the property min. + \details Description of the parameter min is:
\copybrief min.
+ \see min for more information */ + inline virtual double get_min() const + { + return this->min; + } + /*! \brief sets the property max to the specified \a __value. + \details Description of the parameter max is:
\copybrief max.
+ \see max for more information */ + inline virtual void set_max(double __value) + { + if (this->max != __value) { + this->max = __value; + drawMinMax=true; + } + } + /*! \brief returns the property max. + \details Description of the parameter max is:
\copybrief max.
+ \see max for more information */ + inline virtual double get_max() const + { + return this->max; + } + /*! \brief sets the property percentile25 to the specified \a __value. + \details Description of the parameter percentile25 is:
\copybrief percentile25.
+ \see percentile25 for more information */ + inline virtual void set_percentile25(double __value) + { + this->percentile25 = __value; + } + /*! \brief returns the property percentile25. + \details Description of the parameter percentile25 is:
\copybrief percentile25.
+ \see percentile25 for more information */ + inline virtual double get_percentile25() const + { + return this->percentile25; + } + /*! \brief sets the property percentile75 to the specified \a __value. + \details Description of the parameter percentile75 is:
\copybrief percentile75.
+ \see percentile75 for more information */ + inline virtual void set_percentile75(double __value) + { + this->percentile75 = __value; + } + /*! \brief returns the property percentile75. + \details Description of the parameter percentile75 is:
\copybrief percentile75.
+ \see percentile75 for more information */ + inline virtual double get_percentile75() const + { + return this->percentile75; + } + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property whiskerStyle to the specified \a __value. + \details Description of the parameter whiskerStyle is:
\copybrief whiskerStyle.
+ \see whiskerStyle for more information */ + inline virtual void set_whiskerStyle(const Qt::PenStyle & __value) + { + this->whiskerStyle = __value; + } + /*! \brief returns the property whiskerStyle. + \details Description of the parameter whiskerStyle is:
\copybrief whiskerStyle.
+ \see whiskerStyle for more information */ + inline virtual Qt::PenStyle get_whiskerStyle() const + { + return this->whiskerStyle; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property boxWidth to the specified \a __value. + \details Description of the parameter boxWidth is:
\copybrief boxWidth.
+ \see boxWidth for more information */ + inline virtual void set_boxWidth(double __value) + { + this->boxWidth = __value; + } + /*! \brief returns the property boxWidth. + \details Description of the parameter boxWidth is:
\copybrief boxWidth.
+ \see boxWidth for more information */ + inline virtual double get_boxWidth() const + { + return this->boxWidth; + } - JKQTPGET_SET_MACRO(JKQTPgraphSymbols, meanSymbol) - JKQTPGET_SET_MACRO(double, meanSymbolWidth) - JKQTPGET_SET_MACRO(double, meanSymbolSize) - JKQTPGET_SET_MACRO(bool, drawMean) - JKQTPGET_SET_MACRO(bool, drawMedian) - JKQTPGET_SET_MACRO(bool, drawMinMax) + /*! \brief sets the property meanSymbol to the specified \a __value. + \details Description of the parameter meanSymbol is:
\copybrief meanSymbol.
+ \see meanSymbol for more information */ + inline virtual void set_meanSymbol(const JKQTPgraphSymbols & __value) + { + this->meanSymbol = __value; + } + /*! \brief returns the property meanSymbol. + \details Description of the parameter meanSymbol is:
\copybrief meanSymbol.
+ \see meanSymbol for more information */ + inline virtual JKQTPgraphSymbols get_meanSymbol() const + { + return this->meanSymbol; + } + /*! \brief sets the property meanSymbolWidth to the specified \a __value. + \details Description of the parameter meanSymbolWidth is:
\copybrief meanSymbolWidth.
+ \see meanSymbolWidth for more information */ + inline virtual void set_meanSymbolWidth(double __value) + { + this->meanSymbolWidth = __value; + } + /*! \brief returns the property meanSymbolWidth. + \details Description of the parameter meanSymbolWidth is:
\copybrief meanSymbolWidth.
+ \see meanSymbolWidth for more information */ + inline virtual double get_meanSymbolWidth() const + { + return this->meanSymbolWidth; + } + /*! \brief sets the property meanSymbolSize to the specified \a __value. + \details Description of the parameter meanSymbolSize is:
\copybrief meanSymbolSize.
+ \see meanSymbolSize for more information */ + inline virtual void set_meanSymbolSize(double __value) + { + this->meanSymbolSize = __value; + } + /*! \brief returns the property meanSymbolSize. + \details Description of the parameter meanSymbolSize is:
\copybrief meanSymbolSize.
+ \see meanSymbolSize for more information */ + inline virtual double get_meanSymbolSize() const + { + return this->meanSymbolSize; + } + /*! \brief sets the property drawMean to the specified \a __value. + \details Description of the parameter drawMean is:
\copybrief drawMean.
+ \see drawMean for more information */ + inline virtual void set_drawMean(bool __value) + { + this->drawMean = __value; + } + /*! \brief returns the property drawMean. + \details Description of the parameter drawMean is:
\copybrief drawMean.
+ \see drawMean for more information */ + inline virtual bool get_drawMean() const + { + return this->drawMean; + } + /*! \brief sets the property drawMedian to the specified \a __value. + \details Description of the parameter drawMedian is:
\copybrief drawMedian.
+ \see drawMedian for more information */ + inline virtual void set_drawMedian(bool __value) + { + this->drawMedian = __value; + } + /*! \brief returns the property drawMedian. + \details Description of the parameter drawMedian is:
\copybrief drawMedian.
+ \see drawMedian for more information */ + inline virtual bool get_drawMedian() const + { + return this->drawMedian; + } + /*! \brief sets the property drawMinMax to the specified \a __value. + \details Description of the parameter drawMinMax is:
\copybrief drawMinMax.
+ \see drawMinMax for more information */ + inline virtual void set_drawMinMax(bool __value) + { + this->drawMinMax = __value; + } + /*! \brief returns the property drawMinMax. + \details Description of the parameter drawMinMax is:
\copybrief drawMinMax.
+ \see drawMinMax for more information */ + inline virtual bool get_drawMinMax() const + { + return this->drawMinMax; + } protected: /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp index 2fa993035a..d73b1c2d8a 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.cpp @@ -252,7 +252,7 @@ void JKQTPxFunctionLineGraph::createPlotData(bool collectParams) { /*if (parent && parent->get_xAxis()->isLogAxis()) { for (double x=log(xmin)+logdelta0; xnext = new doublePair; - d->next->x=exp(x+((double)rand()/(double)RAND_MAX-0.5)*delta0/2.0); + d->next->x=exp(x+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta0/2.0); d->next->f=func(d->next->x,); d->next->next=nullptr; doublePair* dd=d; @@ -266,7 +266,7 @@ void JKQTPxFunctionLineGraph::createPlotData(bool collectParams) { } else { for (double x=pxmin+delta0; xnext = new doublePair; - d->next->x=parent->p2x(x+((double)rand()/(double)RAND_MAX-0.5)*delta0/2.0); + d->next->x=parent->p2x(x+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta0/2.0); d->next->f=func(d->next->x); d->next->next=nullptr; doublePair* dd=d; @@ -341,10 +341,10 @@ void JKQTPxFunctionLineGraph::refine(doublePair* a, doublePair* b, unsigned int double xmid=ax+(delta)/2.0; /*if (parent && parent->get_xAxis()->isLogAxis()) { xmid=log(a->x)+(logdelta)/2.0; - xmid=xmid+((double)rand()/(double)RAND_MAX-0.5)*delta/5.0; + xmid=xmid+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta/5.0; xmid=exp(xmid); } else {*/ - xmid=xmid+((double)rand()/(double)RAND_MAX-0.5)*delta/5.0; // shake by 10% + xmid=xmid+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta/5.0; // shake by 10% //} double realxmid=parent->p2x(xmid); double realfmid; @@ -738,7 +738,7 @@ void JKQTPyFunctionLineGraph::createPlotData(bool collectParams) { data=d; for (double y=ymin+delta0; ynext = new doublePair; - d->next->x=y+((double)rand()/(double)RAND_MAX-0.5)*delta0/2.0; + d->next->x=y+(static_cast(rand())/static_cast(RAND_MAX)-0.5)*delta0/2.0; d->next->f=func(d->next->x); d->next->next=nullptr; doublePair* dd=d; diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h index 6efb717ffa..2aa16ffec1 100644 --- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h @@ -1,346 +1,654 @@ -/* - Copyright (c) 2008-2018 Jan W. Krieger () - - - - 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 . -*/ - - - -/** - * \defgroup jkqtplotter_elements Plot Elements - * \ingroup jkqtplotter - * \defgroup jkqtplotter_plots Graphs - * \ingroup jkqtplotter_elements - */ - -/** \file jkqtpgraphs.h - * \ingroup jkqtplotter - */ - -#include -#include -#include -#include "jkqtplotter/jkqtpgraphs.h" -#include "jkqtplottertools/jkqtp_imexport.h" -#include - -#ifndef jkqtpgraphsevaluatedfunction_H -#define jkqtpgraphsevaluatedfunction_H - - - - -/*! \brief type of functions that may be plottet - \ingroup jkqtplotter_plots - - This is the type of functions \f$ y=f(x, \vec{p}) \f$ that may be plottet by JKQTPxFunctionLineGraph - and JKQTPyFunctionLineGraph. It is possible to supply parameters \f$ \vec{p} \f$ to the function that - influence its result. Parameters are given as a pointer to some memory location. The function has to - know on its own how to interpret these. -*/ -typedef std::function jkqtpPlotFunctionType; - -/*! \brief simplified type of functions (without parameters) that may be plottet - \ingroup jkqtplotter_plots - - This is the type of functions \f$ y=f(x) \f$ that may be plottet by JKQTPxFunctionLineGraph - and JKQTPyFunctionLineGraph. -*/ -typedef std::function jkqtpSimplePlotFunctionType; - - -/*! \brief This implements line plots where the data is taken from a user supplied function \f$ y=f(x) \f$ - \ingroup jkqtplotter_plots - - This class implements an intelligent plotting algorithm for functions. It starts by sampling - the function at minSamples positions. Then each function interval is bisected recursively if - necessary. To do so the function is evaluated at the mid point and the slopes \f$ \alpha_{\mbox{left}} \f$ - and \f$ \alpha_{\mbox{right}} \f$ of the two linear segments are compared. the midpoint is added - to the graph if \f[ \left|\alpha_{\mbox{right}}-\alpha_{\mbox{left}}\right|>\mbox{slopeTolerance} \f] - In addition all sampling points except minimum and maximum are beeing shifted by a random fraction their - distance to the other points. This helps to prevent beats when sampling periodic functions. - - the following image - \image html plot_functionplots.png - */ -class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { - Q_OBJECT - public: - - enum SpecialFunction { - Polynomial, /*!< \brief a polynomial \f$ f(x)=p_0+p_1x+p_2x^2+p_3x^3+... \f$ The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ - Line=Polynomial, /*!< \brief a polynomial \f$ f(x)=p_0+p_1x \f$ The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ - Exponential, /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot\exp(x/p_2) \f$ or \f$ f(x)=p_0\cdot\exp(x/p_1) \f$ (depending on the number of parameters). The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ - PowerLaw, /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot x^{p_3} \f$ or \f$ f(x)=p_0\cdot x^{p_1} \f$ or \f$ f(x)= x^{p_0} \f$ (depending on the number of parameters) The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ - - UserFunction, /*!< \brief no special function but the function is provided by the user */ - }; - - /** \brief class constructor */ - JKQTPxFunctionLineGraph(JKQtBasePlotter* parent=nullptr); - - /** \brief class constructor */ - JKQTPxFunctionLineGraph(JKQtPlotter* parent); - - /** \brief class destructor */ - virtual ~JKQTPxFunctionLineGraph(); - - /** \brief plots the graph to the plotter object specified as parent */ - virtual void draw(JKQTPEnhancedPainter& painter) override; - /** \brief plots a key marker inside the specified rectangle \a rect */ - virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; - /** \brief returns the color to be used for the key label */ - virtual QColor getKeyLabelColor() override; - - /** \brief get the maximum and minimum x-value of the graph - * - * This functions returns 0 for both parameters, so that the plotter uses the predefined - * min and max values. - */ - virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \brief get the maximum and minimum y-value of the graph - */ - virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - - /** \brief clear the data sampled from the function. */ - void clearData(); - - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(bool, drawLine) - - /** \brief sets the property plotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief plotFunction.
- * \see plotFunction for more information */ - virtual void set_plotFunction (jkqtpPlotFunctionType && __value); - /** \brief sets the property plotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief plotFunction.
- * \see plotFunction for more information */ - virtual void set_plotFunction (const jkqtpPlotFunctionType & __value); - /** \brief sets the property plotFunction to the specified \a __value. - * - * \details Description of the parameter plotFunction is:
\copybrief plotFunction.
- * \see plotFunction for more information */ - virtual void set_plotFunction (jkqtpSimplePlotFunctionType && __value); - /** \brief sets the property plotFunction to the specified \a __value. - * - * \details Description of the parameter plotFunction is:
\copybrief plotFunction.
- * \see plotFunction for more information */ - virtual void set_plotFunction (const jkqtpSimplePlotFunctionType & __value); - /** \brief returns the property plotFunction. \see plotFunction for more information */ \ - virtual jkqtpPlotFunctionType get_plotFunction () const; - /** \brief returns the property simplePlotFunction. \see simplePlotFunction for more information */ \ - virtual jkqtpSimplePlotFunctionType get_simplePlotFunction () const; - - JKQTPGET_SET_MACRO_I(void*, params, clearData()) - /** \brief sets the params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */ - void set_params(const QVector& params); - /** \brief sets the params from a copy of the given array of length \a N */ - void set_copiedParams(const double* params, int N); - /** \brief set an internal parameter vector as function parameters, initialized with {p1} */ - void set_paramsV(double p1); - /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2} */ - void set_paramsV(double p1, double p2); - /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3} */ - void set_paramsV(double p1, double p2, double p3); - /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3,p4} */ - void set_paramsV(double p1, double p2, double p3, double p4); - /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3,p4,p5} */ - void set_paramsV(double p1, double p2, double p3, double p4, double p5); - - /** \brief returns the currently set internal parameter vector */ - QVector get_internalParams() const; - /** \brief returns the currently set internal parameter vector */ - QVector get_internalErrorParams() const; - JKQTPGET_SET_MACRO(unsigned int, minSamples) - JKQTPGET_SET_MACRO(unsigned int, maxRefinementDegree) - JKQTPGET_SET_MACRO(double, slopeTolerance) - JKQTPGET_SET_MACRO(double, minPixelPerSample) - JKQTPGET_SET_MACRO(bool, plotRefinement) - JKQTPGET_SET_MACRO(bool, displaySamplePoints) - JKQTPGET_SET_MACRO(bool, drawErrorPolygons) - JKQTPGET_SET_MACRO(bool, drawErrorLines) - /** \brief sets the property errorPlotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
- * \see errorPlotFunction for more information */ - virtual void set_errorPlotFunction (jkqtpPlotFunctionType && __value); - /** \brief sets the property errorPlotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
- * \see errorPlotFunction for more information */ - virtual void set_errorPlotFunction (const jkqtpPlotFunctionType & __value); - /** \brief returns the property varname. \see varname for more information */ \ - virtual jkqtpPlotFunctionType get_errorPlotFunction () const; - /** \brief sets the property errorPlotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
- * \see errorPlotFunction for more information */ - virtual void set_errorPlotFunction (jkqtpSimplePlotFunctionType && __value); - /** \brief sets the property errorPlotFunction to the specified \a __value. - * - * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
- * \see errorPlotFunction for more information */ - virtual void set_errorPlotFunction (const jkqtpSimplePlotFunctionType & __value); - /** \brief returns the property varname. \see varname for more information */ \ - virtual jkqtpSimplePlotFunctionType get_errorSimplePlotFunction () const; - JKQTPGET_SET_MACRO(void*, errorParams) - /** \brief sets the error params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */ - void set_errorParams(const QVector& errorParams); - - JKQTPGET_SET_MACRO(int, parameterColumn) - JKQTPSET_CAST_MACRO(size_t, int, parameterColumn) - JKQTPGET_SET_MACRO(int, errorParameterColumn) - JKQTPSET_CAST_MACRO(size_t, int, errorParameterColumn) - - JKQTPGET_SET_MACRO(QColor, errorColor) - JKQTPGET_SET_MACRO(QColor, errorFillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, errorFillStyle) - JKQTPGET_SET_MACRO(Qt::PenStyle, errorStyle) - JKQTPGET_SET_MACRO(double, errorLineWidth) - - /** \copydoc JKQTPgraph::usesColumn() */ - virtual bool usesColumn(int c) const override; - - - /** \brief sets function to the given special function */ - void setSpecialFunction(SpecialFunction function); - /** \brief returns, which special function is set (or if any is set) */ - SpecialFunction getFunctionType() const; - protected: - /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ - int parentPlotStyle; - - struct doublePair { - double x; - double f; - doublePair* next; - }; - /** \brief a linked list holding the datapoints \f$ \left(x, y=f(x, \vec{p})\right) \f$ to be plotted */ - doublePair* data; - - /** \brief fill the data array with data from the function plotFunction */ - virtual void createPlotData( bool collectParams=true); - - virtual void collectParameters(); - /** \brief refine datapoints on the function graph between two evaluations \a a and \a b */ - void refine(doublePair* a, doublePair* b, unsigned int degree=0); - - /** \brief if set, the values from this datatsore column are used for the parameters \c p1 , \c p2 , \c p3 , ... of the plot function */ - int parameterColumn; - /** \brief if set, the values from this datatsore column are used for the parameters \c p1 , \c p2 , \c p3 , ... of the error plot function */ - int errorParameterColumn; - - /** \brief color of the graph */ - QColor color; - /** \brief color of the graph fill */ - QColor fillColor; - /** \brief linestyle of the graph lines */ - Qt::PenStyle style; - /** \brief width (pixels) of the graph */ - double lineWidth; - /** \brief fill style, if the curve should be filled */ - Qt::BrushStyle fillStyle; - /** \brief indicates whether to draw a line or not */ - bool drawLine; - /** \brief indicates whether to fill the space between the curve and the x-axis */ - bool fillCurve; - /** \brief the function to be plotted */ - jkqtpPlotFunctionType plotFunction; - /** \brief a simple function to be plotted, simplified form without parameters */ - jkqtpSimplePlotFunctionType simplePlotFunction; - /** \brief indicates whether a special function is set (and if so, which one), or a user-supplied function */ - SpecialFunction functionType; - /** \brief pointer to the parameters supplied to the plotting funtion */ - void* params; - /** \brief the minimum number of points to evaluate the function at */ - unsigned int minSamples; - /** \brief the maximum number of recursive refinement steps - * - * each step bisects the interval \f$ [a, b] \f$ into two halfes. So the maximum number - * of points plotted at all are thus: - * \f[ \mbox{minSamples} \cdot 2^{\mbox{maxRefinementDegree}} \f] - */ - unsigned int maxRefinementDegree; - /** \brief the tolerance for the difference of two subsequent slopes */ - double slopeTolerance; - /** \brief create one sample at least every \a minPixelPerSample pixels */ - double minPixelPerSample; - /** \brief switch on or off [default: on] the plot refinement algorithm */ - bool plotRefinement; - /** \brief if true [default: off] display the points where the function has been sampled */ - bool displaySamplePoints; - /** \brief indicates whether an error polygon should be drawn */ - bool drawErrorPolygons; - /** \brief indicates whether error lines should be drawn */ - bool drawErrorLines; - /** \brief this function calculates the error at a given position */ - jkqtpPlotFunctionType errorPlotFunction; - /** \brief this function calculates the error at a given position, simplified form without parameters */ - jkqtpSimplePlotFunctionType errorSimplePlotFunction; - /** \brief parameters for errorFunction */ - void* errorParams; - /** \brief color of the error graph */ - QColor errorColor; - /** \brief color of the error graph fill */ - QColor errorFillColor; - /** \brief linestyle of the error graph lines */ - Qt::PenStyle errorStyle; - /** \brief width (pixels) of the error graph */ - double errorLineWidth; - /** \brief fill style, if the error curve should be filled */ - Qt::BrushStyle errorFillStyle; - - - QBrush getBrush(JKQTPEnhancedPainter& painter) const; - QPen getLinePen(JKQTPEnhancedPainter& painter) const; - - QBrush getErrorBrush(JKQTPEnhancedPainter& painter) const; - QPen getErrorLinePen(JKQTPEnhancedPainter &painter) const; - - QVector iparams, ierrorparams; -}; - -/*! \brief This implements line plots where the data is taken from a user supplied function \f$ x=f(y) \f$ - \ingroup jkqtplotter_plots - - */ -class LIB_EXPORT JKQTPyFunctionLineGraph: public JKQTPxFunctionLineGraph { - Q_OBJECT - public: - /** \brief class constructor */ - JKQTPyFunctionLineGraph(JKQtBasePlotter* parent=nullptr); - /** \brief class constructor */ - JKQTPyFunctionLineGraph(JKQtPlotter* parent); - - /** \brief plots the graph to the plotter object specified as parent */ - virtual void draw(JKQTPEnhancedPainter& painter) override; - protected: - - /** \brief fill the data array with data from the function plotFunction */ - virtual void createPlotData( bool collectParams=true) override; - -}; - - - - -#endif // jkqtpgraphsevaluatedfunction_H +/* + Copyright (c) 2008-2018 Jan W. Krieger () + + + + 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 . +*/ + + + +/** + * \defgroup jkqtplotter_elements Plot Elements + * \ingroup jkqtplotter + * \defgroup jkqtplotter_plots Graphs + * \ingroup jkqtplotter_elements + */ + +/** \file jkqtpgraphs.h + * \ingroup jkqtplotter + */ + +#include +#include +#include +#include "jkqtplotter/jkqtpgraphs.h" +#include "jkqtplottertools/jkqtp_imexport.h" +#include + +#ifndef jkqtpgraphsevaluatedfunction_H +#define jkqtpgraphsevaluatedfunction_H + + + + +/*! \brief type of functions that may be plottet + \ingroup jkqtplotter_plots + + This is the type of functions \f$ y=f(x, \vec{p}) \f$ that may be plottet by JKQTPxFunctionLineGraph + and JKQTPyFunctionLineGraph. It is possible to supply parameters \f$ \vec{p} \f$ to the function that + influence its result. Parameters are given as a pointer to some memory location. The function has to + know on its own how to interpret these. +*/ +typedef std::function jkqtpPlotFunctionType; + +/*! \brief simplified type of functions (without parameters) that may be plottet + \ingroup jkqtplotter_plots + + This is the type of functions \f$ y=f(x) \f$ that may be plottet by JKQTPxFunctionLineGraph + and JKQTPyFunctionLineGraph. +*/ +typedef std::function jkqtpSimplePlotFunctionType; + + +/*! \brief This implements line plots where the data is taken from a user supplied function \f$ y=f(x) \f$ + \ingroup jkqtplotter_plots + + This class implements an intelligent plotting algorithm for functions. It starts by sampling + the function at minSamples positions. Then each function interval is bisected recursively if + necessary. To do so the function is evaluated at the mid point and the slopes \f$ \alpha_{\mbox{left}} \f$ + and \f$ \alpha_{\mbox{right}} \f$ of the two linear segments are compared. the midpoint is added + to the graph if \f[ \left|\alpha_{\mbox{right}}-\alpha_{\mbox{left}}\right|>\mbox{slopeTolerance} \f] + In addition all sampling points except minimum and maximum are beeing shifted by a random fraction their + distance to the other points. This helps to prevent beats when sampling periodic functions. + + the following image + \image html plot_functionplots.png + */ +class LIB_EXPORT JKQTPxFunctionLineGraph: public JKQTPgraph { + Q_OBJECT + public: + + enum SpecialFunction { + Polynomial, /*!< \brief a polynomial \f$ f(x)=p_0+p_1x+p_2x^2+p_3x^3+... \f$ The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ + Line=Polynomial, /*!< \brief a polynomial \f$ f(x)=p_0+p_1x \f$ The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ + Exponential, /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot\exp(x/p_2) \f$ or \f$ f(x)=p_0\cdot\exp(x/p_1) \f$ (depending on the number of parameters). The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ + PowerLaw, /*!< \brief an exponential function \f$ f(x)=p_0+p_1\cdot x^{p_3} \f$ or \f$ f(x)=p_0\cdot x^{p_1} \f$ or \f$ f(x)= x^{p_0} \f$ (depending on the number of parameters) The parameters \a params have to be point to a QVector and contain the parameters \f$ p_0, p_1, ... \f$ */ + + UserFunction, /*!< \brief no special function but the function is provided by the user */ + }; + + /** \brief class constructor */ + JKQTPxFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + + /** \brief class constructor */ + JKQTPxFunctionLineGraph(JKQtPlotter* parent); + + /** \brief class destructor */ + virtual ~JKQTPxFunctionLineGraph(); + + /** \brief plots the graph to the plotter object specified as parent */ + virtual void draw(JKQTPEnhancedPainter& painter) override; + /** \brief plots a key marker inside the specified rectangle \a rect */ + virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; + /** \brief returns the color to be used for the key label */ + virtual QColor getKeyLabelColor() override; + + /** \brief get the maximum and minimum x-value of the graph + * + * This functions returns 0 for both parameters, so that the plotter uses the predefined + * min and max values. + */ + virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; + /** \brief get the maximum and minimum y-value of the graph + */ + virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; + + /** \brief clear the data sampled from the function. */ + void clearData(); + + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property drawLine to the specified \a __value. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual void set_drawLine(bool __value) + { + this->drawLine = __value; + } + /*! \brief returns the property drawLine. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual bool get_drawLine() const + { + return this->drawLine; + } + + /** \brief sets the property plotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief plotFunction.
+ * \see plotFunction for more information */ + virtual void set_plotFunction (jkqtpPlotFunctionType && __value); + /** \brief sets the property plotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief plotFunction.
+ * \see plotFunction for more information */ + virtual void set_plotFunction (const jkqtpPlotFunctionType & __value); + /** \brief sets the property plotFunction to the specified \a __value. + * + * \details Description of the parameter plotFunction is:
\copybrief plotFunction.
+ * \see plotFunction for more information */ + virtual void set_plotFunction (jkqtpSimplePlotFunctionType && __value); + /** \brief sets the property plotFunction to the specified \a __value. + * + * \details Description of the parameter plotFunction is:
\copybrief plotFunction.
+ * \see plotFunction for more information */ + virtual void set_plotFunction (const jkqtpSimplePlotFunctionType & __value); + /*! \brief returns the property plotFunction. \see plotFunction for more information */ \ + virtual jkqtpPlotFunctionType get_plotFunction () const; + /*! \brief returns the property simplePlotFunction. \see simplePlotFunction for more information */ \ + virtual jkqtpSimplePlotFunctionType get_simplePlotFunction () const; + + /*! \brief sets the property params to the specified \a __value. + \details Description of the parameter params is:
\copybrief params.
+ \see params for more information */ + inline virtual void set_params(void* __value) + { + if (this->params != __value) { + this->params = __value; + clearData(); + } + } + /*! \brief returns the property params. + \details Description of the parameter params is:
\copybrief params.
+ \see params for more information */ + inline virtual void* get_params() const + { + return this->params; + } + /** \brief sets the params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */ + void set_params(const QVector& params); + /** \brief sets the params from a copy of the given array of length \a N */ + void set_copiedParams(const double* params, int N); + /** \brief set an internal parameter vector as function parameters, initialized with {p1} */ + void set_paramsV(double p1); + /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2} */ + void set_paramsV(double p1, double p2); + /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3} */ + void set_paramsV(double p1, double p2, double p3); + /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3,p4} */ + void set_paramsV(double p1, double p2, double p3, double p4); + /** \brief set an internal parameter vector as function parameters, initialized with {p1,p2,p3,p4,p5} */ + void set_paramsV(double p1, double p2, double p3, double p4, double p5); + + /** \brief returns the currently set internal parameter vector */ + QVector get_internalParams() const; + /** \brief returns the currently set internal parameter vector */ + QVector get_internalErrorParams() const; + /*! \brief sets the property minSamples to the specified \a __value. + \details Description of the parameter minSamples is:
\copybrief minSamples.
+ \see minSamples for more information */ + inline virtual void set_minSamples(const unsigned int & __value) + { + this->minSamples = __value; + } + /*! \brief returns the property minSamples. + \details Description of the parameter minSamples is:
\copybrief minSamples.
+ \see minSamples for more information */ + inline virtual unsigned int get_minSamples() const + { + return this->minSamples; + } + /*! \brief sets the property maxRefinementDegree to the specified \a __value. + \details Description of the parameter maxRefinementDegree is:
\copybrief maxRefinementDegree.
+ \see maxRefinementDegree for more information */ + inline virtual void set_maxRefinementDegree(const unsigned int & __value) + { + this->maxRefinementDegree = __value; + } + /*! \brief returns the property maxRefinementDegree. + \details Description of the parameter maxRefinementDegree is:
\copybrief maxRefinementDegree.
+ \see maxRefinementDegree for more information */ + inline virtual unsigned int get_maxRefinementDegree() const + { + return this->maxRefinementDegree; + } + /*! \brief sets the property slopeTolerance to the specified \a __value. + \details Description of the parameter slopeTolerance is:
\copybrief slopeTolerance.
+ \see slopeTolerance for more information */ + inline virtual void set_slopeTolerance(double __value) + { + this->slopeTolerance = __value; + } + /*! \brief returns the property slopeTolerance. + \details Description of the parameter slopeTolerance is:
\copybrief slopeTolerance.
+ \see slopeTolerance for more information */ + inline virtual double get_slopeTolerance() const + { + return this->slopeTolerance; + } + /*! \brief sets the property minPixelPerSample to the specified \a __value. + \details Description of the parameter minPixelPerSample is:
\copybrief minPixelPerSample.
+ \see minPixelPerSample for more information */ + inline virtual void set_minPixelPerSample(double __value) + { + this->minPixelPerSample = __value; + } + /*! \brief returns the property minPixelPerSample. + \details Description of the parameter minPixelPerSample is:
\copybrief minPixelPerSample.
+ \see minPixelPerSample for more information */ + inline virtual double get_minPixelPerSample() const + { + return this->minPixelPerSample; + } + /*! \brief sets the property plotRefinement to the specified \a __value. + \details Description of the parameter plotRefinement is:
\copybrief plotRefinement.
+ \see plotRefinement for more information */ + inline virtual void set_plotRefinement(bool __value) + { + this->plotRefinement = __value; + } + /*! \brief returns the property plotRefinement. + \details Description of the parameter plotRefinement is:
\copybrief plotRefinement.
+ \see plotRefinement for more information */ + inline virtual bool get_plotRefinement() const + { + return this->plotRefinement; + } + /*! \brief sets the property displaySamplePoints to the specified \a __value. + \details Description of the parameter displaySamplePoints is:
\copybrief displaySamplePoints.
+ \see displaySamplePoints for more information */ + inline virtual void set_displaySamplePoints(bool __value) + { + this->displaySamplePoints = __value; + } + /*! \brief returns the property displaySamplePoints. + \details Description of the parameter displaySamplePoints is:
\copybrief displaySamplePoints.
+ \see displaySamplePoints for more information */ + inline virtual bool get_displaySamplePoints() const + { + return this->displaySamplePoints; + } + /*! \brief sets the property drawErrorPolygons to the specified \a __value. + \details Description of the parameter drawErrorPolygons is:
\copybrief drawErrorPolygons.
+ \see drawErrorPolygons for more information */ + inline virtual void set_drawErrorPolygons(bool __value) + { + this->drawErrorPolygons = __value; + } + /*! \brief returns the property drawErrorPolygons. + \details Description of the parameter drawErrorPolygons is:
\copybrief drawErrorPolygons.
+ \see drawErrorPolygons for more information */ + inline virtual bool get_drawErrorPolygons() const + { + return this->drawErrorPolygons; + } + /*! \brief sets the property drawErrorLines to the specified \a __value. + \details Description of the parameter drawErrorLines is:
\copybrief drawErrorLines.
+ \see drawErrorLines for more information */ + inline virtual void set_drawErrorLines(bool __value) + { + this->drawErrorLines = __value; + } + /*! \brief returns the property drawErrorLines. + \details Description of the parameter drawErrorLines is:
\copybrief drawErrorLines.
+ \see drawErrorLines for more information */ + inline virtual bool get_drawErrorLines() const + { + return this->drawErrorLines; + } + /** \brief sets the property errorPlotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
+ * \see errorPlotFunction for more information */ + virtual void set_errorPlotFunction (jkqtpPlotFunctionType && __value); + /** \brief sets the property errorPlotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
+ * \see errorPlotFunction for more information */ + virtual void set_errorPlotFunction (const jkqtpPlotFunctionType & __value); + /*! \brief returns the property varname. \see varname for more information */ \ + virtual jkqtpPlotFunctionType get_errorPlotFunction () const; + /** \brief sets the property errorPlotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
+ * \see errorPlotFunction for more information */ + virtual void set_errorPlotFunction (jkqtpSimplePlotFunctionType && __value); + /** \brief sets the property errorPlotFunction to the specified \a __value. + * + * \details Description of the parameter varname is:
\copybrief errorPlotFunction.
+ * \see errorPlotFunction for more information */ + virtual void set_errorPlotFunction (const jkqtpSimplePlotFunctionType & __value); + /*! \brief returns the property varname. \see varname for more information */ \ + virtual jkqtpSimplePlotFunctionType get_errorSimplePlotFunction () const; + /*! \brief sets the property errorParams to the specified \a __value. + \details Description of the parameter errorParams is:
\copybrief errorParams.
+ \see errorParams for more information */ + inline virtual void set_errorParams(void* __value) + { + this->errorParams = __value; + } + /*! \brief returns the property errorParams. + \details Description of the parameter errorParams is:
\copybrief errorParams.
+ \see errorParams for more information */ + inline virtual void* get_errorParams() const + { + return this->errorParams; + } + /** \brief sets the error params as a pointer to an internal COPY of the given vector (not the data of the vector, as then the size would be unknown!!!) */ + void set_errorParams(const QVector& errorParams); + + /*! \brief sets the property parameterColumn to the specified \a __value. + \details Description of the parameter parameterColumn is:
\copybrief parameterColumn.
+ \see parameterColumn for more information */ + inline virtual void set_parameterColumn(int __value) + { + this->parameterColumn = __value; + } + /*! \brief returns the property parameterColumn. + \details Description of the parameter parameterColumn is:
\copybrief parameterColumn.
+ \see parameterColumn for more information */ + inline virtual int get_parameterColumn() const + { + return this->parameterColumn; + } + /*! \brief sets the property parameterColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter parameterColumn is:
\copybrief parameterColumn.
+ \see parameterColumn for more information */ + inline virtual void set_parameterColumn (size_t __value) { this->parameterColumn = static_cast(__value); } + /*! \brief sets the property errorParameterColumn to the specified \a __value. + \details Description of the parameter errorParameterColumn is:
\copybrief errorParameterColumn.
+ \see errorParameterColumn for more information */ + inline virtual void set_errorParameterColumn(int __value) + { + this->errorParameterColumn = __value; + } + /*! \brief returns the property errorParameterColumn. + \details Description of the parameter errorParameterColumn is:
\copybrief errorParameterColumn.
+ \see errorParameterColumn for more information */ + inline virtual int get_errorParameterColumn() const + { + return this->errorParameterColumn; + } + /*! \brief sets the property errorParameterColumn to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter errorParameterColumn is:
\copybrief errorParameterColumn.
+ \see errorParameterColumn for more information */ + inline virtual void set_errorParameterColumn (size_t __value) { this->errorParameterColumn = static_cast(__value); } + + /*! \brief sets the property errorColor to the specified \a __value. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual void set_errorColor(const QColor & __value) + { + this->errorColor = __value; + } + /*! \brief returns the property errorColor. + \details Description of the parameter errorColor is:
\copybrief errorColor.
+ \see errorColor for more information */ + inline virtual QColor get_errorColor() const + { + return this->errorColor; + } + /*! \brief sets the property errorFillColor to the specified \a __value. + \details Description of the parameter errorFillColor is:
\copybrief errorFillColor.
+ \see errorFillColor for more information */ + inline virtual void set_errorFillColor(const QColor & __value) + { + this->errorFillColor = __value; + } + /*! \brief returns the property errorFillColor. + \details Description of the parameter errorFillColor is:
\copybrief errorFillColor.
+ \see errorFillColor for more information */ + inline virtual QColor get_errorFillColor() const + { + return this->errorFillColor; + } + /*! \brief sets the property errorFillStyle to the specified \a __value. + \details Description of the parameter errorFillStyle is:
\copybrief errorFillStyle.
+ \see errorFillStyle for more information */ + inline virtual void set_errorFillStyle(const Qt::BrushStyle & __value) + { + this->errorFillStyle = __value; + } + /*! \brief returns the property errorFillStyle. + \details Description of the parameter errorFillStyle is:
\copybrief errorFillStyle.
+ \see errorFillStyle for more information */ + inline virtual Qt::BrushStyle get_errorFillStyle() const + { + return this->errorFillStyle; + } + /*! \brief sets the property errorStyle to the specified \a __value. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual void set_errorStyle(const Qt::PenStyle & __value) + { + this->errorStyle = __value; + } + /*! \brief returns the property errorStyle. + \details Description of the parameter errorStyle is:
\copybrief errorStyle.
+ \see errorStyle for more information */ + inline virtual Qt::PenStyle get_errorStyle() const + { + return this->errorStyle; + } + /*! \brief sets the property errorLineWidth to the specified \a __value. + \details Description of the parameter errorLineWidth is:
\copybrief errorLineWidth.
+ \see errorLineWidth for more information */ + inline virtual void set_errorLineWidth(double __value) + { + this->errorLineWidth = __value; + } + /*! \brief returns the property errorLineWidth. + \details Description of the parameter errorLineWidth is:
\copybrief errorLineWidth.
+ \see errorLineWidth for more information */ + inline virtual double get_errorLineWidth() const + { + return this->errorLineWidth; + } + + /** \copydoc JKQTPgraph::usesColumn() */ + virtual bool usesColumn(int c) const override; + + + /** \brief sets function to the given special function */ + void setSpecialFunction(SpecialFunction function); + /** \brief returns, which special function is set (or if any is set) */ + SpecialFunction getFunctionType() const; + protected: + /** \brief which plot style to use from the parent plotter (via JKQtPlotterBase::getPlotStyle() and JKQtPlotterBase::getNextStyle() ) */ + int parentPlotStyle; + + struct doublePair { + double x; + double f; + doublePair* next; + }; + /** \brief a linked list holding the datapoints \f$ \left(x, y=f(x, \vec{p})\right) \f$ to be plotted */ + doublePair* data; + + /** \brief fill the data array with data from the function plotFunction */ + virtual void createPlotData( bool collectParams=true); + + virtual void collectParameters(); + /** \brief refine datapoints on the function graph between two evaluations \a a and \a b */ + void refine(doublePair* a, doublePair* b, unsigned int degree=0); + + /** \brief if set, the values from this datatsore column are used for the parameters \c p1 , \c p2 , \c p3 , ... of the plot function */ + int parameterColumn; + /** \brief if set, the values from this datatsore column are used for the parameters \c p1 , \c p2 , \c p3 , ... of the error plot function */ + int errorParameterColumn; + + /** \brief color of the graph */ + QColor color; + /** \brief color of the graph fill */ + QColor fillColor; + /** \brief linestyle of the graph lines */ + Qt::PenStyle style; + /** \brief width (pixels) of the graph */ + double lineWidth; + /** \brief fill style, if the curve should be filled */ + Qt::BrushStyle fillStyle; + /** \brief indicates whether to draw a line or not */ + bool drawLine; + /** \brief indicates whether to fill the space between the curve and the x-axis */ + bool fillCurve; + /** \brief the function to be plotted */ + jkqtpPlotFunctionType plotFunction; + /** \brief a simple function to be plotted, simplified form without parameters */ + jkqtpSimplePlotFunctionType simplePlotFunction; + /** \brief indicates whether a special function is set (and if so, which one), or a user-supplied function */ + SpecialFunction functionType; + /** \brief pointer to the parameters supplied to the plotting funtion */ + void* params; + /** \brief the minimum number of points to evaluate the function at */ + unsigned int minSamples; + /** \brief the maximum number of recursive refinement steps + * + * each step bisects the interval \f$ [a, b] \f$ into two halfes. So the maximum number + * of points plotted at all are thus: + * \f[ \mbox{minSamples} \cdot 2^{\mbox{maxRefinementDegree}} \f] + */ + unsigned int maxRefinementDegree; + /** \brief the tolerance for the difference of two subsequent slopes */ + double slopeTolerance; + /** \brief create one sample at least every \a minPixelPerSample pixels */ + double minPixelPerSample; + /** \brief switch on or off [default: on] the plot refinement algorithm */ + bool plotRefinement; + /** \brief if true [default: off] display the points where the function has been sampled */ + bool displaySamplePoints; + /** \brief indicates whether an error polygon should be drawn */ + bool drawErrorPolygons; + /** \brief indicates whether error lines should be drawn */ + bool drawErrorLines; + /** \brief this function calculates the error at a given position */ + jkqtpPlotFunctionType errorPlotFunction; + /** \brief this function calculates the error at a given position, simplified form without parameters */ + jkqtpSimplePlotFunctionType errorSimplePlotFunction; + /** \brief parameters for errorFunction */ + void* errorParams; + /** \brief color of the error graph */ + QColor errorColor; + /** \brief color of the error graph fill */ + QColor errorFillColor; + /** \brief linestyle of the error graph lines */ + Qt::PenStyle errorStyle; + /** \brief width (pixels) of the error graph */ + double errorLineWidth; + /** \brief fill style, if the error curve should be filled */ + Qt::BrushStyle errorFillStyle; + + + QBrush getBrush(JKQTPEnhancedPainter& painter) const; + QPen getLinePen(JKQTPEnhancedPainter& painter) const; + + QBrush getErrorBrush(JKQTPEnhancedPainter& painter) const; + QPen getErrorLinePen(JKQTPEnhancedPainter &painter) const; + + QVector iparams, ierrorparams; +}; + +/*! \brief This implements line plots where the data is taken from a user supplied function \f$ x=f(y) \f$ + \ingroup jkqtplotter_plots + + */ +class LIB_EXPORT JKQTPyFunctionLineGraph: public JKQTPxFunctionLineGraph { + Q_OBJECT + public: + /** \brief class constructor */ + JKQTPyFunctionLineGraph(JKQtBasePlotter* parent=nullptr); + /** \brief class constructor */ + JKQTPyFunctionLineGraph(JKQtPlotter* parent); + + /** \brief plots the graph to the plotter object specified as parent */ + virtual void draw(JKQTPEnhancedPainter& painter) override; + protected: + + /** \brief fill the data array with data from the function plotFunction */ + virtual void createPlotData( bool collectParams=true) override; + +}; + + + + +#endif // jkqtpgraphsevaluatedfunction_H diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h index b98afad34f..a471f8f31b 100644 --- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.h +++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.h @@ -48,16 +48,133 @@ class LIB_EXPORT JKQTPfilledCurveXGraph: public JKQTPxyGraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(double, baseline) - JKQTPGET_SET_MACRO(bool, drawLine) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property baseline to the specified \a __value. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual void set_baseline(double __value) + { + this->baseline = __value; + } + /*! \brief returns the property baseline. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual double get_baseline() const + { + return this->baseline; + } + /*! \brief sets the property drawLine to the specified \a __value. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual void set_drawLine(bool __value) + { + this->drawLine = __value; + } + /*! \brief returns the property drawLine. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual bool get_drawLine() const + { + return this->drawLine; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } - JKQTPGET_SET_MACRO(bool, drawSelectionLine) - JKQTPGET_SET_MACRO(QColor, selectionLineColor) + /*! \brief sets the property drawSelectionLine to the specified \a __value. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual void set_drawSelectionLine(bool __value) + { + this->drawSelectionLine = __value; + } + /*! \brief returns the property drawSelectionLine. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual bool get_drawSelectionLine() const + { + return this->drawSelectionLine; + } + /*! \brief sets the property selectionLineColor to the specified \a __value. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual void set_selectionLineColor(const QColor & __value) + { + this->selectionLineColor = __value; + } + /*! \brief returns the property selectionLineColor. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual QColor get_selectionLineColor() const + { + return this->selectionLineColor; + } protected: @@ -193,17 +310,124 @@ class LIB_EXPORT JKQTPfilledVerticalRangeGraph: public JKQTPxyGraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(int, yColumn2) - JKQTPSET_CAST_MACRO(size_t, int, yColumn2) + /*! \brief sets the property yColumn2 to the specified \a __value. + \details Description of the parameter yColumn2 is:
\copybrief yColumn2.
+ \see yColumn2 for more information */ + inline virtual void set_yColumn2(int __value) + { + this->yColumn2 = __value; + } + /*! \brief returns the property yColumn2. + \details Description of the parameter yColumn2 is:
\copybrief yColumn2.
+ \see yColumn2 for more information */ + inline virtual int get_yColumn2() const + { + return this->yColumn2; + } + /*! \brief sets the property yColumn2 to the specified \a __value, where __value is static_cast'ed from size_t to int. + \details Description of the parameter yColumn2 is:
\copybrief yColumn2.
+ \see yColumn2 for more information */ + inline virtual void set_yColumn2 (size_t __value) { this->yColumn2 = static_cast(__value); } - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(bool, drawLine) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property drawLine to the specified \a __value. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual void set_drawLine(bool __value) + { + this->drawLine = __value; + } + /*! \brief returns the property drawLine. + \details Description of the parameter drawLine is:
\copybrief drawLine.
+ \see drawLine for more information */ + inline virtual bool get_drawLine() const + { + return this->drawLine; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } - JKQTPGET_SET_MACRO(bool, drawSelectionLine) - JKQTPGET_SET_MACRO(QColor, selectionLineColor) + /*! \brief sets the property drawSelectionLine to the specified \a __value. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual void set_drawSelectionLine(bool __value) + { + this->drawSelectionLine = __value; + } + /*! \brief returns the property drawSelectionLine. + \details Description of the parameter drawSelectionLine is:
\copybrief drawSelectionLine.
+ \see drawSelectionLine for more information */ + inline virtual bool get_drawSelectionLine() const + { + return this->drawSelectionLine; + } + /*! \brief sets the property selectionLineColor to the specified \a __value. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual void set_selectionLineColor(const QColor & __value) + { + this->selectionLineColor = __value; + } + /*! \brief returns the property selectionLineColor. + \details Description of the parameter selectionLineColor is:
\copybrief selectionLineColor.
+ \see selectionLineColor for more information */ + inline virtual QColor get_selectionLineColor() const + { + return this->selectionLineColor; + } protected: diff --git a/lib/jkqtplotter/jkqtpgraphsgeometric.h b/lib/jkqtplotter/jkqtpgraphsgeometric.h index e11ce50ece..b7faca15cc 100644 --- a/lib/jkqtplotter/jkqtpgraphsgeometric.h +++ b/lib/jkqtplotter/jkqtpgraphsgeometric.h @@ -66,9 +66,48 @@ class LIB_EXPORT JKQTPgeoBaseLine: public JKQTPplotObject { explicit JKQTPgeoBaseLine(QColor color, double lineWidth, Qt::PenStyle style, JKQtPlotter* parent); - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } /** \brief sets the alpha-channel of the \a color (i.e. its transparency) */ virtual void setAlpha(float alpha); @@ -139,8 +178,34 @@ class LIB_EXPORT JKQTPgeoBaseFilled: public JKQTPgeoBaseLine { */ JKQTPgeoBaseFilled(QColor color, QColor fillColor, JKQtPlotter* parent); - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(Qt::BrushStyle, fillStyle) + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property fillStyle to the specified \a __value. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual void set_fillStyle(const Qt::BrushStyle & __value) + { + this->fillStyle = __value; + } + /*! \brief returns the property fillStyle. + \details Description of the parameter fillStyle is:
\copybrief fillStyle.
+ \see fillStyle for more information */ + inline virtual Qt::BrushStyle get_fillStyle() const + { + return this->fillStyle; + } /** \brief sets the alpha-channel of the \a color and \a fillColor (i.e. its transparency) to the same value */ virtual void setAlpha(float alpha) override; @@ -192,13 +257,104 @@ class LIB_EXPORT JKQTPgeoSymbol: public JKQTPplotObject { */ JKQTPgeoSymbol(JKQtPlotter* parent, double x, double y, JKQTPgraphSymbols symbol=JKQTPcross, double symbolSize=10, QColor color=QColor("black"), QColor fillColor=QColor("grey")); - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QColor, fillColor) - JKQTPGET_SET_MACRO(JKQTPgraphSymbols, symbol) - JKQTPGET_SET_MACRO(double, symbolSize) - JKQTPGET_SET_MACRO(double, symbolWidth) - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property fillColor to the specified \a __value. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual void set_fillColor(const QColor & __value) + { + this->fillColor = __value; + } + /*! \brief returns the property fillColor. + \details Description of the parameter fillColor is:
\copybrief fillColor.
+ \see fillColor for more information */ + inline virtual QColor get_fillColor() const + { + return this->fillColor; + } + /*! \brief sets the property symbol to the specified \a __value. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual void set_symbol(const JKQTPgraphSymbols & __value) + { + this->symbol = __value; + } + /*! \brief returns the property symbol. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual JKQTPgraphSymbols get_symbol() const + { + return this->symbol; + } + /*! \brief sets the property symbolSize to the specified \a __value. + \details Description of the parameter symbolSize is:
\copybrief symbolSize.
+ \see symbolSize for more information */ + inline virtual void set_symbolSize(double __value) + { + this->symbolSize = __value; + } + /*! \brief returns the property symbolSize. + \details Description of the parameter symbolSize is:
\copybrief symbolSize.
+ \see symbolSize for more information */ + inline virtual double get_symbolSize() const + { + return this->symbolSize; + } + /*! \brief sets the property symbolWidth to the specified \a __value. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual void set_symbolWidth(double __value) + { + this->symbolWidth = __value; + } + /*! \brief returns the property symbolWidth. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual double get_symbolWidth() const + { + return this->symbolWidth; + } + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } /** \copydoc JKQTPgraph::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero); @@ -259,11 +415,76 @@ class LIB_EXPORT JKQTPgeoText: public JKQTPplotObject { */ JKQTPgeoText(JKQtPlotter* parent, double x, double y, QString text, double fontSize=10, QColor color=QColor("black")); - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(QString, text) - JKQTPGET_SET_MACRO(double, fontSize) - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property text to the specified \a __value. + \details Description of the parameter text is:
\copybrief text.
+ \see text for more information */ + inline virtual void set_text(const QString & __value) + { + this->text = __value; + } + /*! \brief returns the property text. + \details Description of the parameter text is:
\copybrief text.
+ \see text for more information */ + inline virtual QString get_text() const + { + return this->text; + } + /*! \brief sets the property fontSize to the specified \a __value. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual void set_fontSize(double __value) + { + this->fontSize = __value; + } + /*! \brief returns the property fontSize. + \details Description of the parameter fontSize is:
\copybrief fontSize.
+ \see fontSize for more information */ + inline virtual double get_fontSize() const + { + return this->fontSize; + } + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } /** \copydoc JKQTPplotObject::getXMinMax() */ virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; @@ -335,10 +556,62 @@ class LIB_EXPORT JKQTPgeoLine: public JKQTPgeoBaseLine { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(double, x1) - JKQTPGET_SET_MACRO(double, y1) - JKQTPGET_SET_MACRO(double, x2) - JKQTPGET_SET_MACRO(double, y2) + /*! \brief sets the property x1 to the specified \a __value. + \details Description of the parameter x1 is:
\copybrief x1.
+ \see x1 for more information */ + inline virtual void set_x1(double __value) + { + this->x1 = __value; + } + /*! \brief returns the property x1. + \details Description of the parameter x1 is:
\copybrief x1.
+ \see x1 for more information */ + inline virtual double get_x1() const + { + return this->x1; + } + /*! \brief sets the property y1 to the specified \a __value. + \details Description of the parameter y1 is:
\copybrief y1.
+ \see y1 for more information */ + inline virtual void set_y1(double __value) + { + this->y1 = __value; + } + /*! \brief returns the property y1. + \details Description of the parameter y1 is:
\copybrief y1.
+ \see y1 for more information */ + inline virtual double get_y1() const + { + return this->y1; + } + /*! \brief sets the property x2 to the specified \a __value. + \details Description of the parameter x2 is:
\copybrief x2.
+ \see x2 for more information */ + inline virtual void set_x2(double __value) + { + this->x2 = __value; + } + /*! \brief returns the property x2. + \details Description of the parameter x2 is:
\copybrief x2.
+ \see x2 for more information */ + inline virtual double get_x2() const + { + return this->x2; + } + /*! \brief sets the property y2 to the specified \a __value. + \details Description of the parameter y2 is:
\copybrief y2.
+ \see y2 for more information */ + inline virtual void set_y2(double __value) + { + this->y2 = __value; + } + /*! \brief returns the property y2. + \details Description of the parameter y2 is:
\copybrief y2.
+ \see y2 for more information */ + inline virtual double get_y2() const + { + return this->y2; + } protected: double x1, y1, x2, y2; }; @@ -391,11 +664,76 @@ class LIB_EXPORT JKQTPgeoInfiniteLine: public JKQTPgeoBaseLine { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) - JKQTPGET_SET_MACRO(double, dx) - JKQTPGET_SET_MACRO(double, dy) - JKQTPGET_SET_MACRO(bool, two_sided) + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } + /*! \brief sets the property dx to the specified \a __value. + \details Description of the parameter dx is:
\copybrief dx.
+ \see dx for more information */ + inline virtual void set_dx(double __value) + { + this->dx = __value; + } + /*! \brief returns the property dx. + \details Description of the parameter dx is:
\copybrief dx.
+ \see dx for more information */ + inline virtual double get_dx() const + { + return this->dx; + } + /*! \brief sets the property dy to the specified \a __value. + \details Description of the parameter dy is:
\copybrief dy.
+ \see dy for more information */ + inline virtual void set_dy(double __value) + { + this->dy = __value; + } + /*! \brief returns the property dy. + \details Description of the parameter dy is:
\copybrief dy.
+ \see dy for more information */ + inline virtual double get_dy() const + { + return this->dy; + } + /*! \brief sets the property two_sided to the specified \a __value. + \details Description of the parameter two_sided is:
\copybrief two_sided.
+ \see two_sided for more information */ + inline virtual void set_two_sided(bool __value) + { + this->two_sided = __value; + } + /*! \brief returns the property two_sided. + \details Description of the parameter two_sided is:
\copybrief two_sided.
+ \see two_sided for more information */ + inline virtual bool get_two_sided() const + { + return this->two_sided; + } protected: double x, y, dx, dy; /** \brief indicates whether the line ends at the given point \f$ (x,y) \f$ (false, default), @@ -459,7 +797,20 @@ class LIB_EXPORT JKQTPgeoPolyLines: public JKQTPgeoBaseLine { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(QVector, points) + /*! \brief sets the property points to the specified \a __value. + \details Description of the parameter points is:
\copybrief points.
+ \see points for more information */ + inline virtual void set_points(const QVector & __value) + { + this->points = __value; + } + /*! \brief returns the property points. + \details Description of the parameter points is:
\copybrief points.
+ \see points for more information */ + inline virtual QVector get_points() const + { + return this->points; + } /** \brief append a point to the polygon */ inline void appendPoint(const QPointF& p) { @@ -575,11 +926,76 @@ class LIB_EXPORT JKQTPgeoRectangle: public JKQTPgeoBaseFilled { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) - JKQTPGET_SET_MACRO(double, width) - JKQTPGET_SET_MACRO(double, height) - JKQTPGET_SET_MACRO(double, angle) + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + this->width = __value; + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property height to the specified \a __value. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual void set_height(double __value) + { + this->height = __value; + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual double get_height() const + { + return this->height; + } + /*! \brief sets the property angle to the specified \a __value. + \details Description of the parameter angle is:
\copybrief angle.
+ \see angle for more information */ + inline virtual void set_angle(double __value) + { + this->angle = __value; + } + /*! \brief returns the property angle. + \details Description of the parameter angle is:
\copybrief angle.
+ \see angle for more information */ + inline virtual double get_angle() const + { + return this->angle; + } void set_bottomleftrectangle(double x, double y, double width, double height); protected: @@ -657,7 +1073,20 @@ class LIB_EXPORT JKQTPgeoPolygon: public JKQTPgeoBaseFilled { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(QVector, points) + /*! \brief sets the property points to the specified \a __value. + \details Description of the parameter points is:
\copybrief points.
+ \see points for more information */ + inline virtual void set_points(const QVector & __value) + { + this->points = __value; + } + /*! \brief returns the property points. + \details Description of the parameter points is:
\copybrief points.
+ \see points for more information */ + inline virtual QVector get_points() const + { + return this->points; + } /** \brief append a point to the polygon */ inline void appendPoint(const QPointF& p) { @@ -772,7 +1201,20 @@ class LIB_EXPORT JKQTPgeoEllipse: public JKQTPgeoRectangle { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(unsigned int, controlPoints) + /*! \brief sets the property controlPoints to the specified \a __value. + \details Description of the parameter controlPoints is:
\copybrief controlPoints.
+ \see controlPoints for more information */ + inline virtual void set_controlPoints(const unsigned int & __value) + { + this->controlPoints = __value; + } + /*! \brief returns the property controlPoints. + \details Description of the parameter controlPoints is:
\copybrief controlPoints.
+ \see controlPoints for more information */ + inline virtual unsigned int get_controlPoints() const + { + return this->controlPoints; + } protected: /** \brief number of steps/control points to draw the ellipse */ unsigned int controlPoints; @@ -823,14 +1265,118 @@ class LIB_EXPORT JKQTPgeoArc: public JKQTPgeoBaseLine { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(unsigned int, controlPoints) - JKQTPGET_SET_MACRO(double, angleStart) - JKQTPGET_SET_MACRO(double, angleStop) - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) - JKQTPGET_SET_MACRO(double, width) - JKQTPGET_SET_MACRO(double, height) - JKQTPGET_SET_MACRO(double, angle) + /*! \brief sets the property controlPoints to the specified \a __value. + \details Description of the parameter controlPoints is:
\copybrief controlPoints.
+ \see controlPoints for more information */ + inline virtual void set_controlPoints(const unsigned int & __value) + { + this->controlPoints = __value; + } + /*! \brief returns the property controlPoints. + \details Description of the parameter controlPoints is:
\copybrief controlPoints.
+ \see controlPoints for more information */ + inline virtual unsigned int get_controlPoints() const + { + return this->controlPoints; + } + /*! \brief sets the property angleStart to the specified \a __value. + \details Description of the parameter angleStart is:
\copybrief angleStart.
+ \see angleStart for more information */ + inline virtual void set_angleStart(double __value) + { + this->angleStart = __value; + } + /*! \brief returns the property angleStart. + \details Description of the parameter angleStart is:
\copybrief angleStart.
+ \see angleStart for more information */ + inline virtual double get_angleStart() const + { + return this->angleStart; + } + /*! \brief sets the property angleStop to the specified \a __value. + \details Description of the parameter angleStop is:
\copybrief angleStop.
+ \see angleStop for more information */ + inline virtual void set_angleStop(double __value) + { + this->angleStop = __value; + } + /*! \brief returns the property angleStop. + \details Description of the parameter angleStop is:
\copybrief angleStop.
+ \see angleStop for more information */ + inline virtual double get_angleStop() const + { + return this->angleStop; + } + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + this->width = __value; + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property height to the specified \a __value. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual void set_height(double __value) + { + this->height = __value; + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual double get_height() const + { + return this->height; + } + /*! \brief sets the property angle to the specified \a __value. + \details Description of the parameter angle is:
\copybrief angle.
+ \see angle for more information */ + inline virtual void set_angle(double __value) + { + this->angle = __value; + } + /*! \brief returns the property angle. + \details Description of the parameter angle is:
\copybrief angle.
+ \see angle for more information */ + inline virtual double get_angle() const + { + return this->angle; + } protected: double x,y,width,height; /** \brief rotation angle of rectangle */ @@ -902,8 +1448,34 @@ class LIB_EXPORT JKQTPgeoPie: public JKQTPgeoEllipse { /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; - JKQTPGET_SET_MACRO(double, angleStart) - JKQTPGET_SET_MACRO(double, angleStop) + /*! \brief sets the property angleStart to the specified \a __value. + \details Description of the parameter angleStart is:
\copybrief angleStart.
+ \see angleStart for more information */ + inline virtual void set_angleStart(double __value) + { + this->angleStart = __value; + } + /*! \brief returns the property angleStart. + \details Description of the parameter angleStart is:
\copybrief angleStart.
+ \see angleStart for more information */ + inline virtual double get_angleStart() const + { + return this->angleStart; + } + /*! \brief sets the property angleStop to the specified \a __value. + \details Description of the parameter angleStop is:
\copybrief angleStop.
+ \see angleStop for more information */ + inline virtual void set_angleStop(double __value) + { + this->angleStop = __value; + } + /*! \brief returns the property angleStop. + \details Description of the parameter angleStop is:
\copybrief angleStop.
+ \see angleStop for more information */ + inline virtual double get_angleStop() const + { + return this->angleStop; + } protected: /** \brief if we only draw an arc, this is the starting angle */ double angleStart; diff --git a/lib/jkqtplotter/jkqtpgraphsimage.cpp b/lib/jkqtplotter/jkqtpgraphsimage.cpp index 7bf894a64a..8d82b44d79 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.cpp +++ b/lib/jkqtplotter/jkqtpgraphsimage.cpp @@ -258,7 +258,7 @@ void JKQTPImage::setParent(JKQtBasePlotter *parent) actCopyImage->setEnabled(parent); } -void JKQTPImage::set_title(const typedef_set_title &title) +void JKQTPImage::set_title(const QString &title) { JKQTPImageBase::set_title(title); QString t=title; @@ -768,7 +768,7 @@ void JKQTPMathImage::setParent(JKQtBasePlotter* parent) { actCopyPalette->setEnabled(parent); } -void JKQTPMathImage::set_title(const JKQTPgraph::typedef_set_title &title) +void JKQTPMathImage::set_title(const QString &title) { JKQTPMathImageBase::set_title(title); QString t=title; @@ -2107,7 +2107,7 @@ void JKQTPRGBMathImage::drawKeyMarker(JKQTPEnhancedPainter &painter, QRectF &rec painter.drawImage(rect, QPixmap(":/JKQTPlotter/jkqtp_plot_rgbimage.png").toImage()); } -void JKQTPRGBMathImage::set_title(const JKQTPgraph::typedef_set_title &title) +void JKQTPRGBMathImage::set_title(const QString &title) { JKQTPImageBase::set_title(title); QString t=title; @@ -2590,7 +2590,7 @@ QVector JKQTPOverlayImage::getDataAsDoubleVector() const } -void JKQTPOverlayImage::set_title(const JKQTPgraph::typedef_set_title &title) +void JKQTPOverlayImage::set_title(const QString &title) { JKQTPImageBase::set_title(title); QString t=title; @@ -2807,7 +2807,7 @@ double JKQTPContour::value(int xIdx, int yIdx) } } -bool JKQTPContour::intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,const double &level) +bool JKQTPContour::intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,double level) { bool found = true; @@ -2969,7 +2969,7 @@ JKQTPContour::JKQTPContour(double x, double y, double width, double height, void colorFromPalette=true; relativeLevels=false; } -int JKQTPContour::compare2level(const QVector3D &vertex, const double &level) +int JKQTPContour::compare2level(const QVector3D &vertex, double level) { if (vertex.z() > level) return 1; @@ -3105,7 +3105,7 @@ void JKQTPContour::calcContourLines(QList > &ContourLines) } } -QPointF JKQTPContour::interpolatePoint(const QVector3D &point1, const QVector3D &point2,const double &level) +QPointF JKQTPContour::interpolatePoint(const QVector3D &point1, const QVector3D &point2,double level) { const double h1 = point1.z() - level; // height above contour level const double h2 = point2.z() - level; diff --git a/lib/jkqtplotter/jkqtpgraphsimage.h b/lib/jkqtplotter/jkqtpgraphsimage.h index 43a3ec94e3..0a722abeed 100644 --- a/lib/jkqtplotter/jkqtpgraphsimage.h +++ b/lib/jkqtplotter/jkqtpgraphsimage.h @@ -77,10 +77,62 @@ class LIB_EXPORT JKQTPImageBase: public JKQTPgraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(double, x) - JKQTPGET_SET_MACRO(double, y) - JKQTPGET_SET_MACRO(double, width) - JKQTPGET_SET_MACRO(double, height) + /*! \brief sets the property x to the specified \a __value. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual void set_x(double __value) + { + this->x = __value; + } + /*! \brief returns the property x. + \details Description of the parameter x is:
\copybrief x.
+ \see x for more information */ + inline virtual double get_x() const + { + return this->x; + } + /*! \brief sets the property y to the specified \a __value. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual void set_y(double __value) + { + this->y = __value; + } + /*! \brief returns the property y. + \details Description of the parameter y is:
\copybrief y.
+ \see y for more information */ + inline virtual double get_y() const + { + return this->y; + } + /*! \brief sets the property width to the specified \a __value. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual void set_width(double __value) + { + this->width = __value; + } + /*! \brief returns the property width. + \details Description of the parameter width is:
\copybrief width.
+ \see width for more information */ + inline virtual double get_width() const + { + return this->width; + } + /*! \brief sets the property height to the specified \a __value. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual void set_height(double __value) + { + this->height = __value; + } + /*! \brief returns the property height. + \details Description of the parameter height is:
\copybrief height.
+ \see height for more information */ + inline virtual double get_height() const + { + return this->height; + } protected: @@ -164,13 +216,104 @@ class LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; - JKQTPGET_SET_MACRO(uint32_t, Nx) - JKQTPGET_SET_MACRO(uint32_t, Ny) - JKQTPGET_SET_MACRO(void*, data) - JKQTPGET_SET_MACRO(DataType, datatype) - JKQTPGET_SET_MACRO(void*, dataModifier) - JKQTPGET_SET_MACRO(DataType, datatypeModifier) - JKQTPGET_SET_MACRO(ModifierMode, modifierMode) + /*! \brief sets the property Nx to the specified \a __value. + \details Description of the parameter Nx is:
\copybrief Nx.
+ \see Nx for more information */ + inline virtual void set_Nx(uint32_t __value) + { + this->Nx = __value; + } + /*! \brief returns the property Nx. + \details Description of the parameter Nx is:
\copybrief Nx.
+ \see Nx for more information */ + inline virtual uint32_t get_Nx() const + { + return this->Nx; + } + /*! \brief sets the property Ny to the specified \a __value. + \details Description of the parameter Ny is:
\copybrief Ny.
+ \see Ny for more information */ + inline virtual void set_Ny(uint32_t __value) + { + this->Ny = __value; + } + /*! \brief returns the property Ny. + \details Description of the parameter Ny is:
\copybrief Ny.
+ \see Ny for more information */ + inline virtual uint32_t get_Ny() const + { + return this->Ny; + } + /*! \brief sets the property data to the specified \a __value. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual void set_data(void* __value) + { + this->data = __value; + } + /*! \brief returns the property data. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual void* get_data() const + { + return this->data; + } + /*! \brief sets the property datatype to the specified \a __value. + \details Description of the parameter datatype is:
\copybrief datatype.
+ \see datatype for more information */ + inline virtual void set_datatype(const DataType & __value) + { + this->datatype = __value; + } + /*! \brief returns the property datatype. + \details Description of the parameter datatype is:
\copybrief datatype.
+ \see datatype for more information */ + inline virtual DataType get_datatype() const + { + return this->datatype; + } + /*! \brief sets the property dataModifier to the specified \a __value. + \details Description of the parameter dataModifier is:
\copybrief dataModifier.
+ \see dataModifier for more information */ + inline virtual void set_dataModifier(void* __value) + { + this->dataModifier = __value; + } + /*! \brief returns the property dataModifier. + \details Description of the parameter dataModifier is:
\copybrief dataModifier.
+ \see dataModifier for more information */ + inline virtual void* get_dataModifier() const + { + return this->dataModifier; + } + /*! \brief sets the property datatypeModifier to the specified \a __value. + \details Description of the parameter datatypeModifier is:
\copybrief datatypeModifier.
+ \see datatypeModifier for more information */ + inline virtual void set_datatypeModifier(const DataType & __value) + { + this->datatypeModifier = __value; + } + /*! \brief returns the property datatypeModifier. + \details Description of the parameter datatypeModifier is:
\copybrief datatypeModifier.
+ \see datatypeModifier for more information */ + inline virtual DataType get_datatypeModifier() const + { + return this->datatypeModifier; + } + /*! \brief sets the property modifierMode to the specified \a __value. + \details Description of the parameter modifierMode is:
\copybrief modifierMode.
+ \see modifierMode for more information */ + inline virtual void set_modifierMode(const ModifierMode & __value) + { + this->modifierMode = __value; + } + /*! \brief returns the property modifierMode. + \details Description of the parameter modifierMode is:
\copybrief modifierMode.
+ \see modifierMode for more information */ + inline virtual ModifierMode get_modifierMode() const + { + return this->modifierMode; + } virtual void set_dataModifier(void* data, DataType datatype); virtual void set_data(void* data, uint32_t Nx, uint32_t Ny, DataType datatype); @@ -252,7 +395,7 @@ class LIB_EXPORT JKQTPImage: public JKQTPImageBase { /** \brief deletes the internal image */ void clear_image(); - /** \brief returns the property image. \details Description of the parameter image is:
\copybrief image.
. \see image for more information */ + /*! \brief returns the property image. \details Description of the parameter image is:
\copybrief image.
. \see image for more information */ inline QImage* get_image() const { return this->image; } protected: /** \brief the image to be plotted. This is freed by the destructor, iff \a image_owned is set to \c true (.e.g by QImage-copy-constructors) */ @@ -267,7 +410,7 @@ class LIB_EXPORT JKQTPImage: public JKQTPImageBase { QAction* actCopyImage; public: virtual void setParent(JKQtBasePlotter* parent) override; - virtual void set_title(const typedef_set_title& title) override; + virtual void set_title(const QString& title) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void copyImagePlotAsImage(); @@ -319,37 +462,336 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { static QImage getPaletteKeyImage(JKQTPMathImageColorPalette palette, int width, int height) ; - JKQTPGET_SET_MACRO(JKQTPMathImageColorPalette, palette) - JKQTPGET_SET_MACRO(JKQTPMathImageColorRangeFailAction, rangeMinFailAction) - JKQTPGET_SET_MACRO(JKQTPMathImageColorRangeFailAction, rangeMaxFailAction) - JKQTPGET_SET_MACRO(QColor, rangeMinFailColor) - JKQTPGET_SET_MACRO(QColor, rangeMaxFailColor) - JKQTPGET_SET_MACRO(QColor, nanColor) - JKQTPGET_SET_MACRO(QColor, infColor) - JKQTPGET_SET_MACRO(bool, showColorBar) - JKQTPGET_SET_MACRO(int, colorBarWidth) - JKQTPGET_SET_MACRO(int, colorBarModifiedWidth) - JKQTPGET_SET_MACRO(int, colorBarOffset) - JKQTPGET_SET_MACRO(double, colorBarRelativeHeight) - JKQTPGET_SET_MACRO(double, imageMin) - JKQTPGET_SET_MACRO(double, imageMax) - JKQTPGET_SET_MACRO(bool, autoImageRange) - JKQTPGET_SET_MACRO(QString, imageName) - JKQTPGET_SET_MACRO(QString, imageNameFontName) - JKQTPGET_SET_MACRO(double, imageNameFontSize) - /** \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis.
. \see colorBarRightAxis for more information */ + /*! \brief sets the property palette to the specified \a __value. + \details Description of the parameter palette is:
\copybrief palette.
+ \see palette for more information */ + inline virtual void set_palette(const JKQTPMathImageColorPalette & __value) + { + this->palette = __value; + } + /*! \brief returns the property palette. + \details Description of the parameter palette is:
\copybrief palette.
+ \see palette for more information */ + inline virtual JKQTPMathImageColorPalette get_palette() const + { + return this->palette; + } + /*! \brief sets the property rangeMinFailAction to the specified \a __value. + \details Description of the parameter rangeMinFailAction is:
\copybrief rangeMinFailAction.
+ \see rangeMinFailAction for more information */ + inline virtual void set_rangeMinFailAction(const JKQTPMathImageColorRangeFailAction & __value) + { + this->rangeMinFailAction = __value; + } + /*! \brief returns the property rangeMinFailAction. + \details Description of the parameter rangeMinFailAction is:
\copybrief rangeMinFailAction.
+ \see rangeMinFailAction for more information */ + inline virtual JKQTPMathImageColorRangeFailAction get_rangeMinFailAction() const + { + return this->rangeMinFailAction; + } + /*! \brief sets the property rangeMaxFailAction to the specified \a __value. + \details Description of the parameter rangeMaxFailAction is:
\copybrief rangeMaxFailAction.
+ \see rangeMaxFailAction for more information */ + inline virtual void set_rangeMaxFailAction(const JKQTPMathImageColorRangeFailAction & __value) + { + this->rangeMaxFailAction = __value; + } + /*! \brief returns the property rangeMaxFailAction. + \details Description of the parameter rangeMaxFailAction is:
\copybrief rangeMaxFailAction.
+ \see rangeMaxFailAction for more information */ + inline virtual JKQTPMathImageColorRangeFailAction get_rangeMaxFailAction() const + { + return this->rangeMaxFailAction; + } + /*! \brief sets the property rangeMinFailColor to the specified \a __value. + \details Description of the parameter rangeMinFailColor is:
\copybrief rangeMinFailColor.
+ \see rangeMinFailColor for more information */ + inline virtual void set_rangeMinFailColor(const QColor & __value) + { + this->rangeMinFailColor = __value; + } + /*! \brief returns the property rangeMinFailColor. + \details Description of the parameter rangeMinFailColor is:
\copybrief rangeMinFailColor.
+ \see rangeMinFailColor for more information */ + inline virtual QColor get_rangeMinFailColor() const + { + return this->rangeMinFailColor; + } + /*! \brief sets the property rangeMaxFailColor to the specified \a __value. + \details Description of the parameter rangeMaxFailColor is:
\copybrief rangeMaxFailColor.
+ \see rangeMaxFailColor for more information */ + inline virtual void set_rangeMaxFailColor(const QColor & __value) + { + this->rangeMaxFailColor = __value; + } + /*! \brief returns the property rangeMaxFailColor. + \details Description of the parameter rangeMaxFailColor is:
\copybrief rangeMaxFailColor.
+ \see rangeMaxFailColor for more information */ + inline virtual QColor get_rangeMaxFailColor() const + { + return this->rangeMaxFailColor; + } + /*! \brief sets the property nanColor to the specified \a __value. + \details Description of the parameter nanColor is:
\copybrief nanColor.
+ \see nanColor for more information */ + inline virtual void set_nanColor(const QColor & __value) + { + this->nanColor = __value; + } + /*! \brief returns the property nanColor. + \details Description of the parameter nanColor is:
\copybrief nanColor.
+ \see nanColor for more information */ + inline virtual QColor get_nanColor() const + { + return this->nanColor; + } + /*! \brief sets the property infColor to the specified \a __value. + \details Description of the parameter infColor is:
\copybrief infColor.
+ \see infColor for more information */ + inline virtual void set_infColor(const QColor & __value) + { + this->infColor = __value; + } + /*! \brief returns the property infColor. + \details Description of the parameter infColor is:
\copybrief infColor.
+ \see infColor for more information */ + inline virtual QColor get_infColor() const + { + return this->infColor; + } + /*! \brief sets the property showColorBar to the specified \a __value. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual void set_showColorBar(bool __value) + { + this->showColorBar = __value; + } + /*! \brief returns the property showColorBar. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual bool get_showColorBar() const + { + return this->showColorBar; + } + /*! \brief sets the property colorBarWidth to the specified \a __value. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual void set_colorBarWidth(int __value) + { + this->colorBarWidth = __value; + } + /*! \brief returns the property colorBarWidth. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual int get_colorBarWidth() const + { + return this->colorBarWidth; + } + /*! \brief sets the property colorBarModifiedWidth to the specified \a __value. + \details Description of the parameter colorBarModifiedWidth is:
\copybrief colorBarModifiedWidth.
+ \see colorBarModifiedWidth for more information */ + inline virtual void set_colorBarModifiedWidth(int __value) + { + this->colorBarModifiedWidth = __value; + } + /*! \brief returns the property colorBarModifiedWidth. + \details Description of the parameter colorBarModifiedWidth is:
\copybrief colorBarModifiedWidth.
+ \see colorBarModifiedWidth for more information */ + inline virtual int get_colorBarModifiedWidth() const + { + return this->colorBarModifiedWidth; + } + /*! \brief sets the property colorBarOffset to the specified \a __value. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual void set_colorBarOffset(int __value) + { + this->colorBarOffset = __value; + } + /*! \brief returns the property colorBarOffset. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual int get_colorBarOffset() const + { + return this->colorBarOffset; + } + /*! \brief sets the property colorBarRelativeHeight to the specified \a __value. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual void set_colorBarRelativeHeight(double __value) + { + this->colorBarRelativeHeight = __value; + } + /*! \brief returns the property colorBarRelativeHeight. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual double get_colorBarRelativeHeight() const + { + return this->colorBarRelativeHeight; + } + /*! \brief sets the property imageMin to the specified \a __value. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual void set_imageMin(double __value) + { + this->imageMin = __value; + } + /*! \brief returns the property imageMin. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual double get_imageMin() const + { + return this->imageMin; + } + /*! \brief sets the property imageMax to the specified \a __value. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual void set_imageMax(double __value) + { + this->imageMax = __value; + } + /*! \brief returns the property imageMax. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual double get_imageMax() const + { + return this->imageMax; + } + /*! \brief sets the property autoImageRange to the specified \a __value. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual void set_autoImageRange(bool __value) + { + this->autoImageRange = __value; + } + /*! \brief returns the property autoImageRange. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual bool get_autoImageRange() const + { + return this->autoImageRange; + } + /*! \brief sets the property imageName to the specified \a __value. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual void set_imageName(const QString & __value) + { + this->imageName = __value; + } + /*! \brief returns the property imageName. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual QString get_imageName() const + { + return this->imageName; + } + /*! \brief sets the property imageNameFontName to the specified \a __value. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual void set_imageNameFontName(const QString & __value) + { + this->imageNameFontName = __value; + } + /*! \brief returns the property imageNameFontName. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual QString get_imageNameFontName() const + { + return this->imageNameFontName; + } + /*! \brief sets the property imageNameFontSize to the specified \a __value. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual void set_imageNameFontSize(double __value) + { + this->imageNameFontSize = __value; + } + /*! \brief returns the property imageNameFontSize. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual double get_imageNameFontSize() const + { + return this->imageNameFontSize; + } + /*! \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis.
. \see colorBarRightAxis for more information */ inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } - /** \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis.
. \see colorBarTopAxis for more information */ + /*! \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis.
. \see colorBarTopAxis for more information */ inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } - /** \brief returns the property modifierColorBarTopAxis. \details Description of the parameter modifierColorBarTopAxis is:
\copybrief modifierColorBarTopAxis.
. \see modifierColorBarTopAxis for more information */ + /*! \brief returns the property modifierColorBarTopAxis. \details Description of the parameter modifierColorBarTopAxis is:
\copybrief modifierColorBarTopAxis.
. \see modifierColorBarTopAxis for more information */ inline JKQTPverticalIndependentAxis* get_modifierColorBarTopAxis() const { return this->modifierColorBarTopAxis; } - /** \brief returns the property modifierColorBarRightAxis . \details Description of the parameter modifierColorBarRightAxis is:
\copybrief modifierColorBarRightAxis .
. \see modifierColorBarRightAxis for more information */ + /*! \brief returns the property modifierColorBarRightAxis . \details Description of the parameter modifierColorBarRightAxis is:
\copybrief modifierColorBarRightAxis .
. \see modifierColorBarRightAxis for more information */ inline JKQTPhorizontalIndependentAxis* get_modifierColorBarRightAxis() const { return this->modifierColorBarRightAxis ; } - JKQTPGET_SET_MACRO(bool, colorBarTopVisible) - JKQTPGET_SET_MACRO(bool, colorBarRightVisible) - JKQTPGET_SET_MACRO(bool, autoModifierRange) - JKQTPGET_SET_MACRO(double, modifierMin) - JKQTPGET_SET_MACRO(double, modifierMax) + /*! \brief sets the property colorBarTopVisible to the specified \a __value. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual void set_colorBarTopVisible(bool __value) + { + this->colorBarTopVisible = __value; + } + /*! \brief returns the property colorBarTopVisible. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual bool get_colorBarTopVisible() const + { + return this->colorBarTopVisible; + } + /*! \brief sets the property colorBarRightVisible to the specified \a __value. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual void set_colorBarRightVisible(bool __value) + { + this->colorBarRightVisible = __value; + } + /*! \brief returns the property colorBarRightVisible. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual bool get_colorBarRightVisible() const + { + return this->colorBarRightVisible; + } + /*! \brief sets the property autoModifierRange to the specified \a __value. + \details Description of the parameter autoModifierRange is:
\copybrief autoModifierRange.
+ \see autoModifierRange for more information */ + inline virtual void set_autoModifierRange(bool __value) + { + this->autoModifierRange = __value; + } + /*! \brief returns the property autoModifierRange. + \details Description of the parameter autoModifierRange is:
\copybrief autoModifierRange.
+ \see autoModifierRange for more information */ + inline virtual bool get_autoModifierRange() const + { + return this->autoModifierRange; + } + /*! \brief sets the property modifierMin to the specified \a __value. + \details Description of the parameter modifierMin is:
\copybrief modifierMin.
+ \see modifierMin for more information */ + inline virtual void set_modifierMin(double __value) + { + this->modifierMin = __value; + } + /*! \brief returns the property modifierMin. + \details Description of the parameter modifierMin is:
\copybrief modifierMin.
+ \see modifierMin for more information */ + inline virtual double get_modifierMin() const + { + return this->modifierMin; + } + /*! \brief sets the property modifierMax to the specified \a __value. + \details Description of the parameter modifierMax is:
\copybrief modifierMax.
+ \see modifierMax for more information */ + inline virtual void set_modifierMax(double __value) + { + this->modifierMax = __value; + } + /*! \brief returns the property modifierMax. + \details Description of the parameter modifierMax is:
\copybrief modifierMax.
+ \see modifierMax for more information */ + inline virtual double get_modifierMax() const + { + return this->modifierMax; + } void set_palette(int pal); @@ -450,7 +892,7 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { QAction* actSavePalette; QAction* actCopyPalette; public: - virtual void set_title(const typedef_set_title& title) override; + virtual void set_title(const QString& title) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void copyImagePlotAsImage(); @@ -505,51 +947,363 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { virtual void getDataMinMax(double& imin, double& imax) override; - JKQTPGET_SET_MACRO(void*, dataG) - JKQTPGET_SET_MACRO(DataType, datatypeG) - JKQTPGET_SET_MACRO(void*, dataB) - JKQTPGET_SET_MACRO(DataType, datatypeB) - JKQTPGET_SET_MACRO(bool, showColorBar) - JKQTPGET_SET_MACRO(int, colorBarWidth) - JKQTPGET_SET_MACRO(int, colorBarOffset) - JKQTPGET_SET_MACRO(double, colorBarRelativeHeight) - JKQTPGET_SET_MACRO(double, imageMin) + /*! \brief sets the property dataG to the specified \a __value. + \details Description of the parameter dataG is:
\copybrief dataG.
+ \see dataG for more information */ + inline virtual void set_dataG(void* __value) + { + this->dataG = __value; + } + /*! \brief returns the property dataG. + \details Description of the parameter dataG is:
\copybrief dataG.
+ \see dataG for more information */ + inline virtual void* get_dataG() const + { + return this->dataG; + } + /*! \brief sets the property datatypeG to the specified \a __value. + \details Description of the parameter datatypeG is:
\copybrief datatypeG.
+ \see datatypeG for more information */ + inline virtual void set_datatypeG(const DataType & __value) + { + this->datatypeG = __value; + } + /*! \brief returns the property datatypeG. + \details Description of the parameter datatypeG is:
\copybrief datatypeG.
+ \see datatypeG for more information */ + inline virtual DataType get_datatypeG() const + { + return this->datatypeG; + } + /*! \brief sets the property dataB to the specified \a __value. + \details Description of the parameter dataB is:
\copybrief dataB.
+ \see dataB for more information */ + inline virtual void set_dataB(void* __value) + { + this->dataB = __value; + } + /*! \brief returns the property dataB. + \details Description of the parameter dataB is:
\copybrief dataB.
+ \see dataB for more information */ + inline virtual void* get_dataB() const + { + return this->dataB; + } + /*! \brief sets the property datatypeB to the specified \a __value. + \details Description of the parameter datatypeB is:
\copybrief datatypeB.
+ \see datatypeB for more information */ + inline virtual void set_datatypeB(const DataType & __value) + { + this->datatypeB = __value; + } + /*! \brief returns the property datatypeB. + \details Description of the parameter datatypeB is:
\copybrief datatypeB.
+ \see datatypeB for more information */ + inline virtual DataType get_datatypeB() const + { + return this->datatypeB; + } + /*! \brief sets the property showColorBar to the specified \a __value. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual void set_showColorBar(bool __value) + { + this->showColorBar = __value; + } + /*! \brief returns the property showColorBar. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual bool get_showColorBar() const + { + return this->showColorBar; + } + /*! \brief sets the property colorBarWidth to the specified \a __value. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual void set_colorBarWidth(int __value) + { + this->colorBarWidth = __value; + } + /*! \brief returns the property colorBarWidth. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual int get_colorBarWidth() const + { + return this->colorBarWidth; + } + /*! \brief sets the property colorBarOffset to the specified \a __value. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual void set_colorBarOffset(int __value) + { + this->colorBarOffset = __value; + } + /*! \brief returns the property colorBarOffset. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual int get_colorBarOffset() const + { + return this->colorBarOffset; + } + /*! \brief sets the property colorBarRelativeHeight to the specified \a __value. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual void set_colorBarRelativeHeight(double __value) + { + this->colorBarRelativeHeight = __value; + } + /*! \brief returns the property colorBarRelativeHeight. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual double get_colorBarRelativeHeight() const + { + return this->colorBarRelativeHeight; + } + /*! \brief sets the property imageMin to the specified \a __value. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual void set_imageMin(double __value) + { + this->imageMin = __value; + } + /*! \brief returns the property imageMin. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual double get_imageMin() const + { + return this->imageMin; + } inline void set_imageMinR(double m) { set_imageMin(m); } - JKQTPGET_SET_MACRO(double, imageMax) + /*! \brief sets the property imageMax to the specified \a __value. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual void set_imageMax(double __value) + { + this->imageMax = __value; + } + /*! \brief returns the property imageMax. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual double get_imageMax() const + { + return this->imageMax; + } inline void set_imageMaxR(double m) { set_imageMax(m); } - JKQTPGET_SET_MACRO(double, imageMinG) - JKQTPGET_SET_MACRO(double, imageMaxG) - JKQTPGET_SET_MACRO(double, imageMinB) - JKQTPGET_SET_MACRO(double, imageMaxB) - JKQTPGET_SET_MACRO(bool, autoImageRange) - JKQTPGET_SET_MACRO(QString, imageName) + /*! \brief sets the property imageMinG to the specified \a __value. + \details Description of the parameter imageMinG is:
\copybrief imageMinG.
+ \see imageMinG for more information */ + inline virtual void set_imageMinG(double __value) + { + this->imageMinG = __value; + } + /*! \brief returns the property imageMinG. + \details Description of the parameter imageMinG is:
\copybrief imageMinG.
+ \see imageMinG for more information */ + inline virtual double get_imageMinG() const + { + return this->imageMinG; + } + /*! \brief sets the property imageMaxG to the specified \a __value. + \details Description of the parameter imageMaxG is:
\copybrief imageMaxG.
+ \see imageMaxG for more information */ + inline virtual void set_imageMaxG(double __value) + { + this->imageMaxG = __value; + } + /*! \brief returns the property imageMaxG. + \details Description of the parameter imageMaxG is:
\copybrief imageMaxG.
+ \see imageMaxG for more information */ + inline virtual double get_imageMaxG() const + { + return this->imageMaxG; + } + /*! \brief sets the property imageMinB to the specified \a __value. + \details Description of the parameter imageMinB is:
\copybrief imageMinB.
+ \see imageMinB for more information */ + inline virtual void set_imageMinB(double __value) + { + this->imageMinB = __value; + } + /*! \brief returns the property imageMinB. + \details Description of the parameter imageMinB is:
\copybrief imageMinB.
+ \see imageMinB for more information */ + inline virtual double get_imageMinB() const + { + return this->imageMinB; + } + /*! \brief sets the property imageMaxB to the specified \a __value. + \details Description of the parameter imageMaxB is:
\copybrief imageMaxB.
+ \see imageMaxB for more information */ + inline virtual void set_imageMaxB(double __value) + { + this->imageMaxB = __value; + } + /*! \brief returns the property imageMaxB. + \details Description of the parameter imageMaxB is:
\copybrief imageMaxB.
+ \see imageMaxB for more information */ + inline virtual double get_imageMaxB() const + { + return this->imageMaxB; + } + /*! \brief sets the property autoImageRange to the specified \a __value. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual void set_autoImageRange(bool __value) + { + this->autoImageRange = __value; + } + /*! \brief returns the property autoImageRange. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual bool get_autoImageRange() const + { + return this->autoImageRange; + } + /*! \brief sets the property imageName to the specified \a __value. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual void set_imageName(const QString & __value) + { + this->imageName = __value; + } + /*! \brief returns the property imageName. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual QString get_imageName() const + { + return this->imageName; + } inline void set_imageNameR(const QString& m) { set_imageName(m); } - JKQTPGET_SET_MACRO(QString, imageNameG) - JKQTPGET_SET_MACRO(QString, imageNameB) - JKQTPGET_SET_MACRO(QString, imageNameFontName) - JKQTPGET_SET_MACRO(double, imageNameFontSize) - /** \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis.
. \see colorBarRightAxis for more information */ + /*! \brief sets the property imageNameG to the specified \a __value. + \details Description of the parameter imageNameG is:
\copybrief imageNameG.
+ \see imageNameG for more information */ + inline virtual void set_imageNameG(const QString & __value) + { + this->imageNameG = __value; + } + /*! \brief returns the property imageNameG. + \details Description of the parameter imageNameG is:
\copybrief imageNameG.
+ \see imageNameG for more information */ + inline virtual QString get_imageNameG() const + { + return this->imageNameG; + } + /*! \brief sets the property imageNameB to the specified \a __value. + \details Description of the parameter imageNameB is:
\copybrief imageNameB.
+ \see imageNameB for more information */ + inline virtual void set_imageNameB(const QString & __value) + { + this->imageNameB = __value; + } + /*! \brief returns the property imageNameB. + \details Description of the parameter imageNameB is:
\copybrief imageNameB.
+ \see imageNameB for more information */ + inline virtual QString get_imageNameB() const + { + return this->imageNameB; + } + /*! \brief sets the property imageNameFontName to the specified \a __value. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual void set_imageNameFontName(const QString & __value) + { + this->imageNameFontName = __value; + } + /*! \brief returns the property imageNameFontName. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual QString get_imageNameFontName() const + { + return this->imageNameFontName; + } + /*! \brief sets the property imageNameFontSize to the specified \a __value. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual void set_imageNameFontSize(double __value) + { + this->imageNameFontSize = __value; + } + /*! \brief returns the property imageNameFontSize. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual double get_imageNameFontSize() const + { + return this->imageNameFontSize; + } + /*! \brief returns the property colorBarRightAxis. \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis.
. \see colorBarRightAxis for more information */ inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { return this->colorBarRightAxis; } - /** \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis.
. \see colorBarTopAxis for more information */ + /*! \brief returns the property colorBarTopAxis. \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis.
. \see colorBarTopAxis for more information */ inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { return this->colorBarTopAxis; } - /** \brief returns the property colorBarRightAxisG. \details Description of the parameter colorBarRightAxisG is:
\copybrief colorBarRightAxisG.
. \see colorBarRightAxisG for more information */ + /*! \brief returns the property colorBarRightAxisG. \details Description of the parameter colorBarRightAxisG is:
\copybrief colorBarRightAxisG.
. \see colorBarRightAxisG for more information */ inline JKQTPverticalIndependentAxis* get_colorBarRightAxisG() const { return this->colorBarRightAxisG; } - /** \brief returns the property colorBarTopAxisG. \details Description of the parameter colorBarTopAxisG is:
\copybrief colorBarTopAxisG.
. \see colorBarTopAxisG for more information */ + /*! \brief returns the property colorBarTopAxisG. \details Description of the parameter colorBarTopAxisG is:
\copybrief colorBarTopAxisG.
. \see colorBarTopAxisG for more information */ inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxisG() const { return this->colorBarTopAxisG; } - /** \brief returns the property colorBarRightAxisB. \details Description of the parameter colorBarRightAxisB is:
\copybrief colorBarRightAxisB.
. \see colorBarRightAxisB for more information */ + /*! \brief returns the property colorBarRightAxisB. \details Description of the parameter colorBarRightAxisB is:
\copybrief colorBarRightAxisB.
. \see colorBarRightAxisB for more information */ inline JKQTPverticalIndependentAxis* get_colorBarRightAxisB() const { return this->colorBarRightAxisB; } - /** \brief returns the property colorBarTopAxisB. \details Description of the parameter colorBarTopAxisB is:
\copybrief colorBarTopAxisB.
. \see colorBarTopAxisB for more information */ + /*! \brief returns the property colorBarTopAxisB. \details Description of the parameter colorBarTopAxisB is:
\copybrief colorBarTopAxisB.
. \see colorBarTopAxisB for more information */ inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxisB() const { return this->colorBarTopAxisB; } - JKQTPGET_SET_MACRO(bool, colorBarTopVisible) - JKQTPGET_SET_MACRO(bool, colorBarRightVisible) - JKQTPGET_SET_MACRO(bool, colorbarsSideBySide) - JKQTPGET_SET_MACRO(JKQTPRGBMathImageRGBMode, rgbMode) + /*! \brief sets the property colorBarTopVisible to the specified \a __value. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual void set_colorBarTopVisible(bool __value) + { + this->colorBarTopVisible = __value; + } + /*! \brief returns the property colorBarTopVisible. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual bool get_colorBarTopVisible() const + { + return this->colorBarTopVisible; + } + /*! \brief sets the property colorBarRightVisible to the specified \a __value. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual void set_colorBarRightVisible(bool __value) + { + this->colorBarRightVisible = __value; + } + /*! \brief returns the property colorBarRightVisible. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual bool get_colorBarRightVisible() const + { + return this->colorBarRightVisible; + } + /*! \brief sets the property colorbarsSideBySide to the specified \a __value. + \details Description of the parameter colorbarsSideBySide is:
\copybrief colorbarsSideBySide.
+ \see colorbarsSideBySide for more information */ + inline virtual void set_colorbarsSideBySide(bool __value) + { + this->colorbarsSideBySide = __value; + } + /*! \brief returns the property colorbarsSideBySide. + \details Description of the parameter colorbarsSideBySide is:
\copybrief colorbarsSideBySide.
+ \see colorbarsSideBySide for more information */ + inline virtual bool get_colorbarsSideBySide() const + { + return this->colorbarsSideBySide; + } + /*! \brief sets the property rgbMode to the specified \a __value. + \details Description of the parameter rgbMode is:
\copybrief rgbMode.
+ \see rgbMode for more information */ + inline virtual void set_rgbMode(const JKQTPRGBMathImageRGBMode & __value) + { + this->rgbMode = __value; + } + /*! \brief returns the property rgbMode. + \details Description of the parameter rgbMode is:
\copybrief rgbMode.
+ \see rgbMode for more information */ + inline virtual JKQTPRGBMathImageRGBMode get_rgbMode() const + { + return this->rgbMode; + } QVector getDataGAsDoubleVector() const; QVector getDataBAsDoubleVector() const; @@ -658,7 +1412,7 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { QAction* actSaveImage; QAction* actCopyImage; public: - virtual void set_title(const typedef_set_title& title) override; + virtual void set_title(const QString& title) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); void copyImagePlotAsImage(); @@ -685,8 +1439,34 @@ class LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQTPMathImageColorPalette palette, JKQtPlotter* parent); JKQTPColumnMathImage(double x, double y, double width, double height, int imageColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPGET_SET_MACRO(int, imageColumn) - JKQTPGET_SET_MACRO(int, modifierColumn) + /*! \brief sets the property imageColumn to the specified \a __value. + \details Description of the parameter imageColumn is:
\copybrief imageColumn.
+ \see imageColumn for more information */ + inline virtual void set_imageColumn(int __value) + { + this->imageColumn = __value; + } + /*! \brief returns the property imageColumn. + \details Description of the parameter imageColumn is:
\copybrief imageColumn.
+ \see imageColumn for more information */ + inline virtual int get_imageColumn() const + { + return this->imageColumn; + } + /*! \brief sets the property modifierColumn to the specified \a __value. + \details Description of the parameter modifierColumn is:
\copybrief modifierColumn.
+ \see modifierColumn for more information */ + inline virtual void set_modifierColumn(int __value) + { + this->modifierColumn = __value; + } + /*! \brief returns the property modifierColumn. + \details Description of the parameter modifierColumn is:
\copybrief modifierColumn.
+ \see modifierColumn for more information */ + inline virtual int get_modifierColumn() const + { + return this->modifierColumn; + } /** \copydoc JKQTPgraph::usesColumn() */ virtual bool usesColumn(int c) const override; @@ -724,10 +1504,62 @@ class LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage { JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); JKQTPColumnRGBMathImage(double x, double y, double width, double height, int imageRColumn, int imageGColumn, int imageBColumn, uint32_t Nx, uint32_t Ny, JKQtPlotter* parent); - JKQTPGET_SET_MACRO(int, imageRColumn) - JKQTPGET_SET_MACRO(int, imageGColumn) - JKQTPGET_SET_MACRO(int, imageBColumn) - JKQTPGET_SET_MACRO(int, modifierColumn) + /*! \brief sets the property imageRColumn to the specified \a __value. + \details Description of the parameter imageRColumn is:
\copybrief imageRColumn.
+ \see imageRColumn for more information */ + inline virtual void set_imageRColumn(int __value) + { + this->imageRColumn = __value; + } + /*! \brief returns the property imageRColumn. + \details Description of the parameter imageRColumn is:
\copybrief imageRColumn.
+ \see imageRColumn for more information */ + inline virtual int get_imageRColumn() const + { + return this->imageRColumn; + } + /*! \brief sets the property imageGColumn to the specified \a __value. + \details Description of the parameter imageGColumn is:
\copybrief imageGColumn.
+ \see imageGColumn for more information */ + inline virtual void set_imageGColumn(int __value) + { + this->imageGColumn = __value; + } + /*! \brief returns the property imageGColumn. + \details Description of the parameter imageGColumn is:
\copybrief imageGColumn.
+ \see imageGColumn for more information */ + inline virtual int get_imageGColumn() const + { + return this->imageGColumn; + } + /*! \brief sets the property imageBColumn to the specified \a __value. + \details Description of the parameter imageBColumn is:
\copybrief imageBColumn.
+ \see imageBColumn for more information */ + inline virtual void set_imageBColumn(int __value) + { + this->imageBColumn = __value; + } + /*! \brief returns the property imageBColumn. + \details Description of the parameter imageBColumn is:
\copybrief imageBColumn.
+ \see imageBColumn for more information */ + inline virtual int get_imageBColumn() const + { + return this->imageBColumn; + } + /*! \brief sets the property modifierColumn to the specified \a __value. + \details Description of the parameter modifierColumn is:
\copybrief modifierColumn.
+ \see modifierColumn for more information */ + inline virtual void set_modifierColumn(int __value) + { + this->modifierColumn = __value; + } + /*! \brief returns the property modifierColumn. + \details Description of the parameter modifierColumn is:
\copybrief modifierColumn.
+ \see modifierColumn for more information */ + inline virtual int get_modifierColumn() const + { + return this->modifierColumn; + } /** \copydoc JKQTPgraph::usesColumn() */ virtual bool usesColumn(int c) const override; @@ -772,11 +1604,76 @@ class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(QColor, trueColor) - JKQTPGET_SET_MACRO(QColor, falseColor) - JKQTPGET_SET_MACRO(uint32_t, Nx) - JKQTPGET_SET_MACRO(uint32_t, Ny) - JKQTPGET_SET_MACRO(bool*, data) + /*! \brief sets the property trueColor to the specified \a __value. + \details Description of the parameter trueColor is:
\copybrief trueColor.
+ \see trueColor for more information */ + inline virtual void set_trueColor(const QColor & __value) + { + this->trueColor = __value; + } + /*! \brief returns the property trueColor. + \details Description of the parameter trueColor is:
\copybrief trueColor.
+ \see trueColor for more information */ + inline virtual QColor get_trueColor() const + { + return this->trueColor; + } + /*! \brief sets the property falseColor to the specified \a __value. + \details Description of the parameter falseColor is:
\copybrief falseColor.
+ \see falseColor for more information */ + inline virtual void set_falseColor(const QColor & __value) + { + this->falseColor = __value; + } + /*! \brief returns the property falseColor. + \details Description of the parameter falseColor is:
\copybrief falseColor.
+ \see falseColor for more information */ + inline virtual QColor get_falseColor() const + { + return this->falseColor; + } + /*! \brief sets the property Nx to the specified \a __value. + \details Description of the parameter Nx is:
\copybrief Nx.
+ \see Nx for more information */ + inline virtual void set_Nx(uint32_t __value) + { + this->Nx = __value; + } + /*! \brief returns the property Nx. + \details Description of the parameter Nx is:
\copybrief Nx.
+ \see Nx for more information */ + inline virtual uint32_t get_Nx() const + { + return this->Nx; + } + /*! \brief sets the property Ny to the specified \a __value. + \details Description of the parameter Ny is:
\copybrief Ny.
+ \see Ny for more information */ + inline virtual void set_Ny(uint32_t __value) + { + this->Ny = __value; + } + /*! \brief returns the property Ny. + \details Description of the parameter Ny is:
\copybrief Ny.
+ \see Ny for more information */ + inline virtual uint32_t get_Ny() const + { + return this->Ny; + } + /*! \brief sets the property data to the specified \a __value. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual void set_data(bool* __value) + { + this->data = __value; + } + /*! \brief returns the property data. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual bool* get_data() const + { + return this->data; + } void set_data(bool* data, uint32_t Nx, uint32_t Ny); @@ -799,7 +1696,7 @@ class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase { QAction* actSaveImage; QAction* actCopyImage; public: - virtual void set_title(const typedef_set_title& title) override; + virtual void set_title(const QString& title) override; virtual void setParent(JKQtBasePlotter* parent) override; public slots: void saveImagePlotAsImage(const QString &filename=QString(""), const QByteArray &outputFormat=QByteArray()); @@ -831,11 +1728,76 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage { /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; - JKQTPGET_SET_MACRO(JKQTPgraphSymbols, symbol) - JKQTPGET_SET_MACRO(double, symbolWidth) - JKQTPGET_SET_MACRO(bool, drawAsRectangles) - JKQTPGET_SET_MACRO(bool, rectanglesAsImageOverlay) - JKQTPGET_SET_MACRO(double, symbolSizeFactor) + /*! \brief sets the property symbol to the specified \a __value. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual void set_symbol(const JKQTPgraphSymbols & __value) + { + this->symbol = __value; + } + /*! \brief returns the property symbol. + \details Description of the parameter symbol is:
\copybrief symbol.
+ \see symbol for more information */ + inline virtual JKQTPgraphSymbols get_symbol() const + { + return this->symbol; + } + /*! \brief sets the property symbolWidth to the specified \a __value. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual void set_symbolWidth(double __value) + { + this->symbolWidth = __value; + } + /*! \brief returns the property symbolWidth. + \details Description of the parameter symbolWidth is:
\copybrief symbolWidth.
+ \see symbolWidth for more information */ + inline virtual double get_symbolWidth() const + { + return this->symbolWidth; + } + /*! \brief sets the property drawAsRectangles to the specified \a __value. + \details Description of the parameter drawAsRectangles is:
\copybrief drawAsRectangles.
+ \see drawAsRectangles for more information */ + inline virtual void set_drawAsRectangles(bool __value) + { + this->drawAsRectangles = __value; + } + /*! \brief returns the property drawAsRectangles. + \details Description of the parameter drawAsRectangles is:
\copybrief drawAsRectangles.
+ \see drawAsRectangles for more information */ + inline virtual bool get_drawAsRectangles() const + { + return this->drawAsRectangles; + } + /*! \brief sets the property rectanglesAsImageOverlay to the specified \a __value. + \details Description of the parameter rectanglesAsImageOverlay is:
\copybrief rectanglesAsImageOverlay.
+ \see rectanglesAsImageOverlay for more information */ + inline virtual void set_rectanglesAsImageOverlay(bool __value) + { + this->rectanglesAsImageOverlay = __value; + } + /*! \brief returns the property rectanglesAsImageOverlay. + \details Description of the parameter rectanglesAsImageOverlay is:
\copybrief rectanglesAsImageOverlay.
+ \see rectanglesAsImageOverlay for more information */ + inline virtual bool get_rectanglesAsImageOverlay() const + { + return this->rectanglesAsImageOverlay; + } + /*! \brief sets the property symbolSizeFactor to the specified \a __value. + \details Description of the parameter symbolSizeFactor is:
\copybrief symbolSizeFactor.
+ \see symbolSizeFactor for more information */ + inline virtual void set_symbolSizeFactor(double __value) + { + this->symbolSizeFactor = __value; + } + /*! \brief returns the property symbolSizeFactor. + \details Description of the parameter symbolSizeFactor is:
\copybrief symbolSizeFactor.
+ \see symbolSizeFactor for more information */ + inline virtual double get_symbolSizeFactor() const + { + return this->symbolSizeFactor; + } protected: /** \brief which symbol to use for the datapoints */ @@ -870,7 +1832,20 @@ class LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanc JKQTPColumnOverlayImageEnhanced(JKQtBasePlotter* parent=nullptr); JKQTPColumnOverlayImageEnhanced(JKQtPlotter* parent); - JKQTPGET_SET_MACRO(int, imageColumn) + /*! \brief sets the property imageColumn to the specified \a __value. + \details Description of the parameter imageColumn is:
\copybrief imageColumn.
+ \see imageColumn for more information */ + inline virtual void set_imageColumn(int __value) + { + this->imageColumn = __value; + } + /*! \brief returns the property imageColumn. + \details Description of the parameter imageColumn is:
\copybrief imageColumn.
+ \see imageColumn for more information */ + inline virtual int get_imageColumn() const + { + return this->imageColumn; + } /** \brief plots the graph to the plotter object specified as parent */ virtual void draw(JKQTPEnhancedPainter& painter) override; @@ -920,14 +1895,118 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { /** \brief creates at least nLevels contour levels with logarithmic spacing. FIXME: Has not been tested yet */ void createContourLevelsLog(int nLevels=3,int m=2); - JKQTPGET_SET_MACRO(QColor, lineColor) - JKQTPGET_SET_MACRO(Qt::PenStyle, style) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(bool, ignoreOnPlane) - JKQTPGET_SET_MACRO(int, numberOfLevels) - JKQTPGET_SET_MACRO(bool, colorFromPalette) - JKQTPGET_SET_MACRO(QList, contourLevels) - JKQTPGET_SET_MACRO(bool, relativeLevels) + /*! \brief sets the property lineColor to the specified \a __value. + \details Description of the parameter lineColor is:
\copybrief lineColor.
+ \see lineColor for more information */ + inline virtual void set_lineColor(const QColor & __value) + { + this->lineColor = __value; + } + /*! \brief returns the property lineColor. + \details Description of the parameter lineColor is:
\copybrief lineColor.
+ \see lineColor for more information */ + inline virtual QColor get_lineColor() const + { + return this->lineColor; + } + /*! \brief sets the property style to the specified \a __value. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual void set_style(const Qt::PenStyle & __value) + { + this->style = __value; + } + /*! \brief returns the property style. + \details Description of the parameter style is:
\copybrief style.
+ \see style for more information */ + inline virtual Qt::PenStyle get_style() const + { + return this->style; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property ignoreOnPlane to the specified \a __value. + \details Description of the parameter ignoreOnPlane is:
\copybrief ignoreOnPlane.
+ \see ignoreOnPlane for more information */ + inline virtual void set_ignoreOnPlane(bool __value) + { + this->ignoreOnPlane = __value; + } + /*! \brief returns the property ignoreOnPlane. + \details Description of the parameter ignoreOnPlane is:
\copybrief ignoreOnPlane.
+ \see ignoreOnPlane for more information */ + inline virtual bool get_ignoreOnPlane() const + { + return this->ignoreOnPlane; + } + /*! \brief sets the property numberOfLevels to the specified \a __value. + \details Description of the parameter numberOfLevels is:
\copybrief numberOfLevels.
+ \see numberOfLevels for more information */ + inline virtual void set_numberOfLevels(int __value) + { + this->numberOfLevels = __value; + } + /*! \brief returns the property numberOfLevels. + \details Description of the parameter numberOfLevels is:
\copybrief numberOfLevels.
+ \see numberOfLevels for more information */ + inline virtual int get_numberOfLevels() const + { + return this->numberOfLevels; + } + /*! \brief sets the property colorFromPalette to the specified \a __value. + \details Description of the parameter colorFromPalette is:
\copybrief colorFromPalette.
+ \see colorFromPalette for more information */ + inline virtual void set_colorFromPalette(bool __value) + { + this->colorFromPalette = __value; + } + /*! \brief returns the property colorFromPalette. + \details Description of the parameter colorFromPalette is:
\copybrief colorFromPalette.
+ \see colorFromPalette for more information */ + inline virtual bool get_colorFromPalette() const + { + return this->colorFromPalette; + } + /*! \brief sets the property contourLevels to the specified \a __value. + \details Description of the parameter contourLevels is:
\copybrief contourLevels.
+ \see contourLevels for more information */ + inline virtual void set_contourLevels(const QList & __value) + { + this->contourLevels = __value; + } + /*! \brief returns the property contourLevels. + \details Description of the parameter contourLevels is:
\copybrief contourLevels.
+ \see contourLevels for more information */ + inline virtual QList get_contourLevels() const + { + return this->contourLevels; + } + /*! \brief sets the property relativeLevels to the specified \a __value. + \details Description of the parameter relativeLevels is:
\copybrief relativeLevels.
+ \see relativeLevels for more information */ + inline virtual void set_relativeLevels(bool __value) + { + this->relativeLevels = __value; + } + /*! \brief returns the property relativeLevels. + \details Description of the parameter relativeLevels is:
\copybrief relativeLevels.
+ \see relativeLevels for more information */ + inline virtual bool get_relativeLevels() const + { + return this->relativeLevels; + } /** convenience function to work with JKQTPdatastore */ void set_imageColumn(size_t columnID); @@ -958,7 +2037,7 @@ class LIB_EXPORT JKQTPContour: public JKQTPMathImage { private: double value(int xIdx, int yIdx); /// gives the intersection line of a plane defined by three vertices with a contour level in the x-y plane of heigth level - bool intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,const double &level); + bool intersect(QLineF &line, const QVector3D &vertex1,const QVector3D &vertex2,const QVector3D &vertex3,double level); /** * @brief interpolatePoint linear interpolation of a line to the x-y plane using the z-value relative to level * @param point1 start point of the line @@ -966,14 +2045,14 @@ private: * @param level the heigth for the interpolation (this z-value is projected onto the xy-plane) * @return the interpolated point in the x-y plane */ - QPointF interpolatePoint(const QVector3D &point1, const QVector3D &point2,const double &level); + QPointF interpolatePoint(const QVector3D &point1, const QVector3D &point2,double level); /** * @brief compare2level checks if the vertex lies above, under or on the contour plane level * @param vertex * @param level contour plane * @return above (1), on the plane (0), below (-1); */ - int compare2level(const QVector3D &vertex, const double &level); + int compare2level(const QVector3D &vertex, double level); /** * @brief calcContourLines calculates the contour lines using the CONREC algorithm */ diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.h b/lib/jkqtplotter/jkqtpgraphsimpulses.h index 1ffff7b3dc..2e3b392e55 100644 --- a/lib/jkqtplotter/jkqtpgraphsimpulses.h +++ b/lib/jkqtplotter/jkqtpgraphsimpulses.h @@ -46,9 +46,48 @@ class LIB_EXPORT JKQTPimpulsesHorizontalGraph: public JKQTPxyGraph { /** \brief returns the color to be used for the key label */ virtual QColor getKeyLabelColor() override; - JKQTPGET_SET_MACRO(QColor, color) - JKQTPGET_SET_MACRO(double, lineWidth) - JKQTPGET_SET_MACRO(double, baseline) + /*! \brief sets the property color to the specified \a __value. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual void set_color(const QColor & __value) + { + this->color = __value; + } + /*! \brief returns the property color. + \details Description of the parameter color is:
\copybrief color.
+ \see color for more information */ + inline virtual QColor get_color() const + { + return this->color; + } + /*! \brief sets the property lineWidth to the specified \a __value. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual void set_lineWidth(double __value) + { + this->lineWidth = __value; + } + /*! \brief returns the property lineWidth. + \details Description of the parameter lineWidth is:
\copybrief lineWidth.
+ \see lineWidth for more information */ + inline virtual double get_lineWidth() const + { + return this->lineWidth; + } + /*! \brief sets the property baseline to the specified \a __value. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual void set_baseline(double __value) + { + this->baseline = __value; + } + /*! \brief returns the property baseline. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual double get_baseline() const + { + return this->baseline; + } /** \brief color of the graph */ QColor color; diff --git a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h index 3acf62c087..fdf22ceb0f 100644 --- a/lib/jkqtplotter/jkqtpgraphsparsedfunction.h +++ b/lib/jkqtplotter/jkqtpgraphsparsedfunction.h @@ -57,9 +57,35 @@ class LIB_EXPORT JKQTPxParsedFunctionLineGraph: public JKQTPxFunctionLineGraph { /** \brief class destructor */ virtual ~JKQTPxParsedFunctionLineGraph() override; - JKQTPGET_SET_MACRO(QString, function) + /*! \brief sets the property function to the specified \a __value. + \details Description of the parameter function is:
\copybrief function.
+ \see function for more information */ + inline virtual void set_function(const QString & __value) + { + this->function = __value; + } + /*! \brief returns the property function. + \details Description of the parameter function is:
\copybrief function.
+ \see function for more information */ + inline virtual QString get_function() const + { + return this->function; + } - JKQTPGET_SET_MACRO(QString, errorFunction) + /*! \brief sets the property errorFunction to the specified \a __value. + \details Description of the parameter errorFunction is:
\copybrief errorFunction.
+ \see errorFunction for more information */ + inline virtual void set_errorFunction(const QString & __value) + { + this->errorFunction = __value; + } + /*! \brief returns the property errorFunction. + \details Description of the parameter errorFunction is:
\copybrief errorFunction.
+ \see errorFunction for more information */ + inline virtual QString get_errorFunction() const + { + return this->errorFunction; + } /** \brief INTERNAL data structure * \internal @@ -117,9 +143,35 @@ class LIB_EXPORT JKQTPyParsedFunctionLineGraph: public JKQTPyFunctionLineGraph { /** \brief class destructor */ virtual ~JKQTPyParsedFunctionLineGraph() override; - JKQTPGET_SET_MACRO(QString, function) + /*! \brief sets the property function to the specified \a __value. + \details Description of the parameter function is:
\copybrief function.
+ \see function for more information */ + inline virtual void set_function(const QString & __value) + { + this->function = __value; + } + /*! \brief returns the property function. + \details Description of the parameter function is:
\copybrief function.
+ \see function for more information */ + inline virtual QString get_function() const + { + return this->function; + } - JKQTPGET_SET_MACRO(QString, errorFunction) + /*! \brief sets the property errorFunction to the specified \a __value. + \details Description of the parameter errorFunction is:
\copybrief errorFunction.
+ \see errorFunction for more information */ + inline virtual void set_errorFunction(const QString & __value) + { + this->errorFunction = __value; + } + /*! \brief returns the property errorFunction. + \details Description of the parameter errorFunction is:
\copybrief errorFunction.
+ \see errorFunction for more information */ + inline virtual QString get_errorFunction() const + { + return this->errorFunction; + } /** \brief INTERNAL data structure * \internal diff --git a/lib/jkqtplotter/jkqtpgraphspeakstream.h b/lib/jkqtplotter/jkqtpgraphspeakstream.h index af4b7da481..1e4ad02374 100644 --- a/lib/jkqtplotter/jkqtpgraphspeakstream.h +++ b/lib/jkqtplotter/jkqtpgraphspeakstream.h @@ -81,10 +81,62 @@ class LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPsingleColumnGraph { /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; - JKQTPGET_SET_MACRO(double, baseline) - JKQTPGET_SET_MACRO(double, peakHeight) - JKQTPGET_SET_MACRO(bool, yPeaks) - JKQTPGET_SET_MACRO(bool, drawBaseline) + /*! \brief sets the property baseline to the specified \a __value. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual void set_baseline(double __value) + { + this->baseline = __value; + } + /*! \brief returns the property baseline. + \details Description of the parameter baseline is:
\copybrief baseline.
+ \see baseline for more information */ + inline virtual double get_baseline() const + { + return this->baseline; + } + /*! \brief sets the property peakHeight to the specified \a __value. + \details Description of the parameter peakHeight is:
\copybrief peakHeight.
+ \see peakHeight for more information */ + inline virtual void set_peakHeight(double __value) + { + this->peakHeight = __value; + } + /*! \brief returns the property peakHeight. + \details Description of the parameter peakHeight is:
\copybrief peakHeight.
+ \see peakHeight for more information */ + inline virtual double get_peakHeight() const + { + return this->peakHeight; + } + /*! \brief sets the property yPeaks to the specified \a __value. + \details Description of the parameter yPeaks is:
\copybrief yPeaks.
+ \see yPeaks for more information */ + inline virtual void set_yPeaks(bool __value) + { + this->yPeaks = __value; + } + /*! \brief returns the property yPeaks. + \details Description of the parameter yPeaks is:
\copybrief yPeaks.
+ \see yPeaks for more information */ + inline virtual bool get_yPeaks() const + { + return this->yPeaks; + } + /*! \brief sets the property drawBaseline to the specified \a __value. + \details Description of the parameter drawBaseline is:
\copybrief drawBaseline.
+ \see drawBaseline for more information */ + inline virtual void set_drawBaseline(bool __value) + { + this->drawBaseline = __value; + } + /*! \brief returns the property drawBaseline. + \details Description of the parameter drawBaseline is:
\copybrief drawBaseline.
+ \see drawBaseline for more information */ + inline virtual bool get_drawBaseline() const + { + return this->drawBaseline; + } protected: diff --git a/lib/jkqtplotter/jkqtplotter.h b/lib/jkqtplotter/jkqtplotter.h index 0a5124ba44..0e20b5eff8 100644 --- a/lib/jkqtplotter/jkqtplotter.h +++ b/lib/jkqtplotter/jkqtplotter.h @@ -130,13 +130,119 @@ class LIB_EXPORT JKQtPlotter: public QWidget { /** \brief returns the class internally used for plotting */ const JKQtBasePlotter* get_constplotter() const { return const_cast(plotter); } - JKQTPGET_SET_MACRO_I(bool, displayToolbar, updateToolbar()) - JKQTPGET_SET_MACRO_I(bool, toolbarAlwaysOn, updateToolbar()) - JKQTPGET_SET_MACRO(bool, displayMousePosition) - JKQTPGET_SET_MACRO(bool, displayCustomMousePosition) - JKQTPGET_SET_MACRO_I(QColor, userActionColor, update()) - JKQTPGET_SET_MACRO_I(QPainter::CompositionMode, userActionCompositionMode, update()) - JKQTPGET_SET_MACRO_I(MouseActionModes, mouseActionMode, updateCursor()) + /*! \brief sets the property displayToolbar to the specified \a __value. + \details Description of the parameter displayToolbar is:
\copybrief displayToolbar.
+ \see displayToolbar for more information */ + inline virtual void set_displayToolbar(bool __value) + { + if (this->displayToolbar != __value) { + this->displayToolbar = __value; + updateToolbar(); + } + } + /*! \brief returns the property displayToolbar. + \details Description of the parameter displayToolbar is:
\copybrief displayToolbar.
+ \see displayToolbar for more information */ + inline virtual bool get_displayToolbar() const + { + return this->displayToolbar; + } + /*! \brief sets the property toolbarAlwaysOn to the specified \a __value. + \details Description of the parameter toolbarAlwaysOn is:
\copybrief toolbarAlwaysOn.
+ \see toolbarAlwaysOn for more information */ + inline virtual void set_toolbarAlwaysOn(bool __value) + { + if (this->toolbarAlwaysOn != __value) { + this->toolbarAlwaysOn = __value; + updateToolbar(); + } + } + /*! \brief returns the property toolbarAlwaysOn. + \details Description of the parameter toolbarAlwaysOn is:
\copybrief toolbarAlwaysOn.
+ \see toolbarAlwaysOn for more information */ + inline virtual bool get_toolbarAlwaysOn() const + { + return this->toolbarAlwaysOn; + } + /*! \brief sets the property displayMousePosition to the specified \a __value. + \details Description of the parameter displayMousePosition is:
\copybrief displayMousePosition.
+ \see displayMousePosition for more information */ + inline virtual void set_displayMousePosition(bool __value) + { + this->displayMousePosition = __value; + } + /*! \brief returns the property displayMousePosition. + \details Description of the parameter displayMousePosition is:
\copybrief displayMousePosition.
+ \see displayMousePosition for more information */ + inline virtual bool get_displayMousePosition() const + { + return this->displayMousePosition; + } + /*! \brief sets the property displayCustomMousePosition to the specified \a __value. + \details Description of the parameter displayCustomMousePosition is:
\copybrief displayCustomMousePosition.
+ \see displayCustomMousePosition for more information */ + inline virtual void set_displayCustomMousePosition(bool __value) + { + this->displayCustomMousePosition = __value; + } + /*! \brief returns the property displayCustomMousePosition. + \details Description of the parameter displayCustomMousePosition is:
\copybrief displayCustomMousePosition.
+ \see displayCustomMousePosition for more information */ + inline virtual bool get_displayCustomMousePosition() const + { + return this->displayCustomMousePosition; + } + /*! \brief sets the property userActionColor to the specified \a __value. + \details Description of the parameter userActionColor is:
\copybrief userActionColor.
+ \see userActionColor for more information */ + inline virtual void set_userActionColor(const QColor & __value) + { + if (this->userActionColor != __value) { + this->userActionColor = __value; + update(); + } + } + /*! \brief returns the property userActionColor. + \details Description of the parameter userActionColor is:
\copybrief userActionColor.
+ \see userActionColor for more information */ + inline virtual QColor get_userActionColor() const + { + return this->userActionColor; + } + /*! \brief sets the property userActionCompositionMode to the specified \a __value. + \details Description of the parameter userActionCompositionMode is:
\copybrief userActionCompositionMode.
+ \see userActionCompositionMode for more information */ + inline virtual void set_userActionCompositionMode(const QPainter::CompositionMode & __value) + { + if (this->userActionCompositionMode != __value) { + this->userActionCompositionMode = __value; + update(); + } + } + /*! \brief returns the property userActionCompositionMode. + \details Description of the parameter userActionCompositionMode is:
\copybrief userActionCompositionMode.
+ \see userActionCompositionMode for more information */ + inline virtual QPainter::CompositionMode get_userActionCompositionMode() const + { + return this->userActionCompositionMode; + } + /*! \brief sets the property mouseActionMode to the specified \a __value. + \details Description of the parameter mouseActionMode is:
\copybrief mouseActionMode.
+ \see mouseActionMode for more information */ + inline virtual void set_mouseActionMode(const MouseActionModes & __value) + { + if (this->mouseActionMode != __value) { + this->mouseActionMode = __value; + updateCursor(); + } + } + /*! \brief returns the property mouseActionMode. + \details Description of the parameter mouseActionMode is:
\copybrief mouseActionMode.
+ \see mouseActionMode for more information */ + inline virtual MouseActionModes get_mouseActionMode() const + { + return this->mouseActionMode; + } /** \brief loads the plot properties from a QSettings object */ virtual void loadSettings(QSettings& settings, QString group=QString("plots")); @@ -199,28 +305,89 @@ class LIB_EXPORT JKQtPlotter: public QWidget { * the lather case */ inline void forceInternalDatastore() { plotter->forceInternalDatastore(); } + /** \brief switch emitting of signals, such as zoomChangedLocally() ..., on (sig=true) or off (sig=false) */ inline void set_emitSignals(bool sig) { plotter->set_emitSignals(sig); } + /** \brief determine, whether emitting of signals, such as zoomChangedLocally() ..., is switched on or off */ inline bool get_emitSignals() { return plotter->get_emitSignals(); } - JKQTPGetMacro(bool, doDrawing) + inline bool get_doDrawing() const { return doDrawing; } void set_doDrawing(bool enable); bool get_zoomByMouseRectangle() const; void set_zoomByMouseRectangle(bool zomByrectangle); //GET_SET_MACRO(bool, zoomByDoubleAndRightMouseClick); - JKQTPGET_SET_MACRO(RightMouseButtonAction, rightMouseButtonAction) - JKQTPGET_SET_MACRO(LeftDoubleClickAction, leftDoubleClickAction) - /** \brief returns the property menuSpecialContextMenu. \details Description of the parameter menuSpecialContextMenu is:
\copybrief menuSpecialContextMenu.
. \see menuSpecialContextMenu for more information */ + /*! \brief sets the property rightMouseButtonAction to the specified \a __value. + \details Description of the parameter rightMouseButtonAction is:
\copybrief rightMouseButtonAction.
+ \see rightMouseButtonAction for more information */ + inline virtual void set_rightMouseButtonAction(const RightMouseButtonAction & __value) + { + this->rightMouseButtonAction = __value; + } + /*! \brief returns the property rightMouseButtonAction. + \details Description of the parameter rightMouseButtonAction is:
\copybrief rightMouseButtonAction.
+ \see rightMouseButtonAction for more information */ + inline virtual RightMouseButtonAction get_rightMouseButtonAction() const + { + return this->rightMouseButtonAction; + } + /*! \brief sets the property leftDoubleClickAction to the specified \a __value. + \details Description of the parameter leftDoubleClickAction is:
\copybrief leftDoubleClickAction.
+ \see leftDoubleClickAction for more information */ + inline virtual void set_leftDoubleClickAction(const LeftDoubleClickAction & __value) + { + this->leftDoubleClickAction = __value; + } + /*! \brief returns the property leftDoubleClickAction. + \details Description of the parameter leftDoubleClickAction is:
\copybrief leftDoubleClickAction.
+ \see leftDoubleClickAction for more information */ + inline virtual LeftDoubleClickAction get_leftDoubleClickAction() const + { + return this->leftDoubleClickAction; + } + /*! \brief returns the property menuSpecialContextMenu. \details Description of the parameter menuSpecialContextMenu is:
\copybrief menuSpecialContextMenu.
. \see menuSpecialContextMenu for more information */ inline QMenu* get_menuSpecialContextMenu() const { return this->menuSpecialContextMenu; } void set_menuSpecialContextMenu(QMenu* menu); - JKQTPGET_SET_MACRO(bool, zoomByMouseWheel) + /*! \brief sets the property zoomByMouseWheel to the specified \a __value. + \details Description of the parameter zoomByMouseWheel is:
\copybrief zoomByMouseWheel.
+ \see zoomByMouseWheel for more information */ + inline virtual void set_zoomByMouseWheel(bool __value) + { + this->zoomByMouseWheel = __value; + } + /*! \brief returns the property zoomByMouseWheel. + \details Description of the parameter zoomByMouseWheel is:
\copybrief zoomByMouseWheel.
+ \see zoomByMouseWheel for more information */ + inline virtual bool get_zoomByMouseWheel() const + { + return this->zoomByMouseWheel; + } - JKQTPGetMacro(double, mouseContextX) - JKQTPGetMacro(double, mouseContextY) - JKQTPGetMacro(int, mouseLastClickX) - JKQTPGetMacro(int, mouseLastClickY) + /** \brief returns the property mouseContextX. + \details Description of the parameter mouseContextX is:
\copybrief mouseContextX.
. + \see mouseContextX for more information */ + inline double get_mouseContextX() const { + return this->mouseContextX; + } + /** \brief returns the property mouseContextY. + \details Description of the parameter mouseContextY is:
\copybrief mouseContextY.
. + \see mouseContextY for more information */ + inline double get_mouseContextY() const { + return this->mouseContextY; + } + /** \brief returns the property mouseLastClickX. + \details Description of the parameter mouseLastClickX is:
\copybrief mouseLastClickX.
. + \see mouseLastClickX for more information */ + inline int get_mouseLastClickX() const { + return this->mouseLastClickX; + } + /** \brief returns the property mouseLastClickY. + \details Description of the parameter mouseLastClickY is:
\copybrief mouseLastClickY.
. + \see mouseLastClickY for more information */ + inline int get_mouseLastClickY() const { + return this->mouseLastClickY; + } inline JKQTPhorizontalAxis* get_xAxis() { return plotter->get_xAxis(); } inline JKQTPverticalAxis* get_yAxis() { return plotter->get_yAxis(); } @@ -476,17 +643,17 @@ class LIB_EXPORT JKQtPlotter: public QWidget { /** \brief fill color of the zoom rectangle */ QColor userActionColor; - /** \brief default value for property property varname. \see userActionColor for more information */ + /*! \brief default value for property property varname. \see userActionColor for more information */ QColor def_userActionColor; /** \brief fill color of the zoom rectangle */ QPainter::CompositionMode userActionCompositionMode; - /** \brief default value for property property varname. \see userActionCompositionMode for more information */ + /*! \brief default value for property property varname. \see userActionCompositionMode for more information */ QPainter::CompositionMode def_userActionCompositionMode; /** \brief width/height of the icons in the plotter toolbar in pixels */ int toolbarIconSize; - /** \brief default value for property property varname. \see toolbarIconSize for more information */ + /*! \brief default value for property property varname. \see toolbarIconSize for more information */ int def_toolbarIconSize; /** \brief this is set \c true if we are drawing a zoom rectangle */ @@ -609,7 +776,7 @@ class LIB_EXPORT JKQtPlotter: public QWidget { bool displayMousePosition; /** \brief this string is used to generate the position output above the graph */ QString mousePositionTemplate; - /** \brief default value for property property varname. \see mousePositionTemplate for more information */ + /*! \brief default value for property property varname. \see mousePositionTemplate for more information */ QString def_mousePositionTemplate; /** \brief if set \c true and displayMousePosition is \c true, the mouse position is not automatically determined, but the text given to setMousePositionLabel() is used */ bool displayCustomMousePosition; diff --git a/lib/jkqtplottergui/jkvanishqtoolbar.h b/lib/jkqtplottergui/jkvanishqtoolbar.h index 72291b0aa2..47e22b2d6b 100644 --- a/lib/jkqtplottergui/jkvanishqtoolbar.h +++ b/lib/jkqtplottergui/jkvanishqtoolbar.h @@ -39,7 +39,20 @@ class LIB_EXPORT JKVanishQToolBar: public QToolBar { JKVanishQToolBar(const QString& title, QWidget* parent=nullptr); /** \brief class constructor */ JKVanishQToolBar(QWidget* parent=nullptr); - JKQTPGET_SET_MACRO(bool, toolbarVanishes) + /*! \brief sets the property toolbarVanishes to the specified \a __value. + \details Description of the parameter toolbarVanishes is:
\copybrief toolbarVanishes.
+ \see toolbarVanishes for more information */ + inline virtual void set_toolbarVanishes(bool __value) + { + this->toolbarVanishes = __value; + } + /*! \brief returns the property toolbarVanishes. + \details Description of the parameter toolbarVanishes is:
\copybrief toolbarVanishes.
+ \see toolbarVanishes for more information */ + inline virtual bool get_toolbarVanishes() const + { + return this->toolbarVanishes; + } protected: bool toolbarVanishes; /** \brief this event triggers the vanishing of the toolbar */ diff --git a/lib/jkqtplottertools/jkqtphighrestimer.h b/lib/jkqtplottertools/jkqtphighrestimer.h index d567ff27af..210e0ad71f 100644 --- a/lib/jkqtplottertools/jkqtphighrestimer.h +++ b/lib/jkqtplottertools/jkqtphighrestimer.h @@ -175,7 +175,7 @@ for (unsigned long i=0; i\copybrief palette. + \see palette for more information */ + inline virtual void set_palette(const JKQTPMathImageColorPalette & __value) + { + this->palette = __value; + } + /*! \brief returns the property palette. + \details Description of the parameter palette is:
\copybrief palette.
+ \see palette for more information */ + inline virtual JKQTPMathImageColorPalette get_palette() const + { + return this->palette; + } + /*! \brief sets the property rangeMinFailAction to the specified \a __value. + \details Description of the parameter rangeMinFailAction is:
\copybrief rangeMinFailAction.
+ \see rangeMinFailAction for more information */ + inline virtual void set_rangeMinFailAction(const JKQTPMathImageColorRangeFailAction & __value) + { + this->rangeMinFailAction = __value; + } + /*! \brief returns the property rangeMinFailAction. + \details Description of the parameter rangeMinFailAction is:
\copybrief rangeMinFailAction.
+ \see rangeMinFailAction for more information */ + inline virtual JKQTPMathImageColorRangeFailAction get_rangeMinFailAction() const + { + return this->rangeMinFailAction; + } + /*! \brief sets the property rangeMaxFailAction to the specified \a __value. + \details Description of the parameter rangeMaxFailAction is:
\copybrief rangeMaxFailAction.
+ \see rangeMaxFailAction for more information */ + inline virtual void set_rangeMaxFailAction(const JKQTPMathImageColorRangeFailAction & __value) + { + this->rangeMaxFailAction = __value; + } + /*! \brief returns the property rangeMaxFailAction. + \details Description of the parameter rangeMaxFailAction is:
\copybrief rangeMaxFailAction.
+ \see rangeMaxFailAction for more information */ + inline virtual JKQTPMathImageColorRangeFailAction get_rangeMaxFailAction() const + { + return this->rangeMaxFailAction; + } + /*! \brief sets the property rangeMinFailColor to the specified \a __value. + \details Description of the parameter rangeMinFailColor is:
\copybrief rangeMinFailColor.
+ \see rangeMinFailColor for more information */ + inline virtual void set_rangeMinFailColor(const QColor & __value) + { + this->rangeMinFailColor = __value; + } + /*! \brief returns the property rangeMinFailColor. + \details Description of the parameter rangeMinFailColor is:
\copybrief rangeMinFailColor.
+ \see rangeMinFailColor for more information */ + inline virtual QColor get_rangeMinFailColor() const + { + return this->rangeMinFailColor; + } + /*! \brief sets the property rangeMaxFailColor to the specified \a __value. + \details Description of the parameter rangeMaxFailColor is:
\copybrief rangeMaxFailColor.
+ \see rangeMaxFailColor for more information */ + inline virtual void set_rangeMaxFailColor(const QColor & __value) + { + this->rangeMaxFailColor = __value; + } + /*! \brief returns the property rangeMaxFailColor. + \details Description of the parameter rangeMaxFailColor is:
\copybrief rangeMaxFailColor.
+ \see rangeMaxFailColor for more information */ + inline virtual QColor get_rangeMaxFailColor() const + { + return this->rangeMaxFailColor; + } + /*! \brief sets the property nanColor to the specified \a __value. + \details Description of the parameter nanColor is:
\copybrief nanColor.
+ \see nanColor for more information */ + inline virtual void set_nanColor(const QColor & __value) + { + this->nanColor = __value; + } + /*! \brief returns the property nanColor. + \details Description of the parameter nanColor is:
\copybrief nanColor.
+ \see nanColor for more information */ + inline virtual QColor get_nanColor() const + { + return this->nanColor; + } + /*! \brief sets the property infColor to the specified \a __value. + \details Description of the parameter infColor is:
\copybrief infColor.
+ \see infColor for more information */ + inline virtual void set_infColor(const QColor & __value) + { + this->infColor = __value; + } + /*! \brief returns the property infColor. + \details Description of the parameter infColor is:
\copybrief infColor.
+ \see infColor for more information */ + inline virtual QColor get_infColor() const + { + return this->infColor; + } + /*! \brief sets the property showColorBar to the specified \a __value. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual void set_showColorBar(bool __value) + { + this->showColorBar = __value; + } + /*! \brief returns the property showColorBar. + \details Description of the parameter showColorBar is:
\copybrief showColorBar.
+ \see showColorBar for more information */ + inline virtual bool get_showColorBar() const + { + return this->showColorBar; + } + /*! \brief sets the property colorBarWidth to the specified \a __value. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual void set_colorBarWidth(int __value) + { + this->colorBarWidth = __value; + } + /*! \brief returns the property colorBarWidth. + \details Description of the parameter colorBarWidth is:
\copybrief colorBarWidth.
+ \see colorBarWidth for more information */ + inline virtual int get_colorBarWidth() const + { + return this->colorBarWidth; + } + /*! \brief sets the property colorBarOffset to the specified \a __value. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual void set_colorBarOffset(int __value) + { + this->colorBarOffset = __value; + } + /*! \brief returns the property colorBarOffset. + \details Description of the parameter colorBarOffset is:
\copybrief colorBarOffset.
+ \see colorBarOffset for more information */ + inline virtual int get_colorBarOffset() const + { + return this->colorBarOffset; + } + /*! \brief sets the property colorBarRelativeHeight to the specified \a __value. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual void set_colorBarRelativeHeight(double __value) + { + this->colorBarRelativeHeight = __value; + } + /*! \brief returns the property colorBarRelativeHeight. + \details Description of the parameter colorBarRelativeHeight is:
\copybrief colorBarRelativeHeight.
+ \see colorBarRelativeHeight for more information */ + inline virtual double get_colorBarRelativeHeight() const + { + return this->colorBarRelativeHeight; + } + /*! \brief sets the property imageMin to the specified \a __value. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual void set_imageMin(double __value) + { + this->imageMin = __value; + } + /*! \brief returns the property imageMin. + \details Description of the parameter imageMin is:
\copybrief imageMin.
+ \see imageMin for more information */ + inline virtual double get_imageMin() const + { + return this->imageMin; + } + /*! \brief sets the property imageMax to the specified \a __value. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual void set_imageMax(double __value) + { + this->imageMax = __value; + } + /*! \brief returns the property imageMax. + \details Description of the parameter imageMax is:
\copybrief imageMax.
+ \see imageMax for more information */ + inline virtual double get_imageMax() const + { + return this->imageMax; + } + /*! \brief sets the property autoImageRange to the specified \a __value. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual void set_autoImageRange(bool __value) + { + this->autoImageRange = __value; + } + /*! \brief returns the property autoImageRange. + \details Description of the parameter autoImageRange is:
\copybrief autoImageRange.
+ \see autoImageRange for more information */ + inline virtual bool get_autoImageRange() const + { + return this->autoImageRange; + } + /*! \brief sets the property imageName to the specified \a __value. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual void set_imageName(const QString & __value) + { + this->imageName = __value; + } + /*! \brief returns the property imageName. + \details Description of the parameter imageName is:
\copybrief imageName.
+ \see imageName for more information */ + inline virtual QString get_imageName() const + { + return this->imageName; + } + /*! \brief sets the property imageNameFontName to the specified \a __value. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual void set_imageNameFontName(const QString & __value) + { + this->imageNameFontName = __value; + } + /*! \brief returns the property imageNameFontName. + \details Description of the parameter imageNameFontName is:
\copybrief imageNameFontName.
+ \see imageNameFontName for more information */ + inline virtual QString get_imageNameFontName() const + { + return this->imageNameFontName; + } + /*! \brief sets the property imageNameFontSize to the specified \a __value. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual void set_imageNameFontSize(double __value) + { + this->imageNameFontSize = __value; + } + /*! \brief returns the property imageNameFontSize. + \details Description of the parameter imageNameFontSize is:
\copybrief imageNameFontSize.
+ \see imageNameFontSize for more information */ + inline virtual double get_imageNameFontSize() const + { + return this->imageNameFontSize; + } + /*! \brief returns the property colorBarRightAxis. + \details Description of the parameter colorBarRightAxis is:
\copybrief colorBarRightAxis.
. + \see colorBarRightAxis for more information */ + inline JKQTPverticalIndependentAxis* get_colorBarRightAxis() const { + return this->colorBarRightAxis; + } + /*! \brief returns the property colorBarTopAxis. + \details Description of the parameter colorBarTopAxis is:
\copybrief colorBarTopAxis.
. + \see colorBarTopAxis for more information */ + inline JKQTPhorizontalIndependentAxis* get_colorBarTopAxis() const { + return this->colorBarTopAxis; + } + /*! \brief sets the property colorBarTopVisible to the specified \a __value. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual void set_colorBarTopVisible(bool __value) + { + this->colorBarTopVisible = __value; + } + /*! \brief returns the property colorBarTopVisible. + \details Description of the parameter colorBarTopVisible is:
\copybrief colorBarTopVisible.
+ \see colorBarTopVisible for more information */ + inline virtual bool get_colorBarTopVisible() const + { + return this->colorBarTopVisible; + } + /*! \brief sets the property colorBarRightVisible to the specified \a __value. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual void set_colorBarRightVisible(bool __value) + { + this->colorBarRightVisible = __value; + } + /*! \brief returns the property colorBarRightVisible. + \details Description of the parameter colorBarRightVisible is:
\copybrief colorBarRightVisible.
+ \see colorBarRightVisible for more information */ + inline virtual bool get_colorBarRightVisible() const + { + return this->colorBarRightVisible; + } }; #endif diff --git a/lib/jkqtplottertools/jkqtpmathparser.h b/lib/jkqtplottertools/jkqtpmathparser.h index 206a9567ec..a9bc6a34cf 100644 --- a/lib/jkqtplottertools/jkqtpmathparser.h +++ b/lib/jkqtplottertools/jkqtpmathparser.h @@ -578,7 +578,7 @@ class JKQTPMathParser jkmpConstantNode(jkmpResult d, JKQTPMathParser* p, jkmpNode* par); /** \brief evaluate this node */ - virtual jkmpResult evaluate() override;; + virtual jkmpResult evaluate() override; }; /** @@ -814,7 +814,20 @@ class JKQTPMathParser /**\brief class destructor */ virtual ~JKQTPMathParser(); - JKQTPGET_SET_MACRO(void*, data) + /*! \brief sets the property data to the specified \a __value. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual void set_data(void* __value) + { + this->data = __value; + } + /*! \brief returns the property data. + \details Description of the parameter data is:
\copybrief data.
+ \see data for more information */ + inline virtual void* get_data() const + { + return this->data; + } /**\brief register a new function * \param name name of the new function diff --git a/lib/jkqtplottertools/jkqtptools.cpp b/lib/jkqtplottertools/jkqtptools.cpp index 7192db3587..060344448a 100644 --- a/lib/jkqtplottertools/jkqtptools.cpp +++ b/lib/jkqtplottertools/jkqtptools.cpp @@ -96,13 +96,7 @@ std::string jkqtp_tolower(const std::string& s){ return ret; }; - long jkqtp_get_filesize(char *FileName) { - struct stat file; - if(!stat(FileName,&file)) { - return file.st_size; - } - return 0; -} + std::string jkqtp_bytestostr(double bytes){ double data=bytes; std::string form="%.0lf"; diff --git a/lib/jkqtplottertools/jkqtptools.h b/lib/jkqtplottertools/jkqtptools.h index 2386a5ee12..9abab27a0b 100644 --- a/lib/jkqtplottertools/jkqtptools.h +++ b/lib/jkqtplottertools/jkqtptools.h @@ -104,316 +104,6 @@ -/** - * \defgroup tools_getset get_var and set_var macros - * \ingroup tools - * - * The macros in this group have the purpose to make writing \c get_() and \c set_() - * methods for classes easier. They can be used by giving the type and the name of a private variable for which - * \c get_ and \c set_ methods should be created: - * \code - * class a { - * private: - * int var1; - * std::strign var2; - * public: - * GetSetMacro(int, var1); - * JKQTPGetMacro(std::string, var2); - * } - * \endcode - * This code will create a \c set_var1, a \c set_var2 and a \c get_var1 method with the apropriate types. - * All functions will be declared \c virtual and can thus be easily overloaded in inheriting classes. They are also - * declared \c inline so the compiler may optimize them by really inlining them. - * - * The GetSetMacro creates get and set methods while the GetMacro and the SetMacro only create one of the - * both. - */ -/*@{*/ - -/** - * \brief create get_varname() and set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes -*/ -#define JKQTPGET_SET_MACRO(type,varname) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - { \ - this->varname = __value; \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } -#define JKQTPGET_SET_VMACRO(type,varname) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - { \ - this->varname = __value; \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } -#define JKQTPGetSetMacro(type,varname) JKQTPGET_SET_MACRO(type,varname) - -/** - * \brief create get_varname() and set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes. In addition this will set the property paramsChanged to true, which - * you will have to declare in your class. -*/ -#define JKQTPGET_SET_MACRO_P(type,varname) \ - typedef type typedef_set_##varname ;\ - inline virtual void set_##varname (const typedef_set_##varname & __value) /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - { \ - this->varname = __value; \ - this-> paramsChanged=true; \ - } \ - inline virtual type get_##varname () const /** \brief returns the property varname. \see varname for more information */ \ - {\ - return this->varname; \ - } -#define JKQTPGetSetMacroP(type,varname) JKQTPGET_SET_MACRO_P(type,varname) - -/** - * \brief like GetSetMacroP(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set. -*/ -#define JKQTPGET_SET_MACRO_IP(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - { \ - if (this->varname != __value) { \ - this->varname = __value; \ - this-> paramsChanged=true; \ - inst; \ - } \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - { \ - return this->varname; \ - } -#define JKQTPGetSetMacroIP(type,varname,inst) JKQTPGET_SET_MACRO_IP(type,varname,inst) - -/** - * \brief like GetSetMacro(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set. -*/ -#define JKQTPGET_SET_MACRO_I(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - {\ - if (this->varname != __value) { \ - this->varname = __value; \ - inst; \ - } \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } -#define JKQTPGetSetMacroI(type,varname,inst) JKQTPGET_SET_MACRO_I(type,varname,inst) - -/** - * \brief sets two given properties at the same time, i.e. with one setter function with the name set_(type __value, type2 __value2). The getter methods are still separate. This may be used - * to update a component after a value has been set. -*/ -#define JKQTPGET_SET_MACRO_TWO(name,type,varname,type2,varname2) \ - /** \brief sets the properties varname and varname2 to the specified \a __value and \a __value2. \details Description of the parameter varname is:
\copybrief varname.
\details Description of the parameter varname2 is:
\copybrief varname2.
\see varname and varname2 for more information */ \ - inline virtual void set_##name (type __value, type2 __value2) \ - {\ - bool set=false; \ - if (this->varname != __value) { \ - this->varname = __value; \ - } \ - if (this->varname2 != __value2) { \ - this->varname2 = __value2; \ - } \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } \ - /** \brief returns the property varname2. \see varname2 for more information */\ - inline virtual type2 get_##varname2 () const \ - {\ - return this->varname2; \ - } -#define JKQTPGetSetMacroTwo(name,type,varname,type2,varname2) JKQTPGET_SET_MACRO_TWO(name,type,varname,type2,varname2) - -/** - * \brief like GetSetMacroTwo(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set. -*/ -#define JKQTPGET_SET_MACRO_TWO_I(name,type,varname,type2,varname2,inst) \ - /** \brief sets the properties varname and varname2 to the specified \a __value and \a __value2. \details Description of the parameter varname is:
\copybrief varname.
\details Description of the parameter varname2 is:
\copybrief varname2.
\see varname and varname2 for more information */ \ - inline virtual void set_##name (type __value, type2 __value2) \ - {\ - bool set=false; \ - if (this->varname != __value) { \ - this->varname = __value; \ - set=true; \ - } \ - if (this->varname2 != __value2) { \ - this->varname2 = __value2; \ - set=true; \ - } \ - if (set) { \ - inst; \ - } \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } \ - /** \brief returns the property varname2. \see varname2 for more information */ \ - inline virtual type2 get_##varname2 () const \ - {\ - return this->varname2; \ - } -#define JKQTPGetSetMacroTwoI(name,type,varname,type2,varname2,inst) JKQTPGET_SET_MACRO_TWO_I(name,type,varname,type2,varname2,inst) - - -/** - * \brief like GetSetMacro(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set. Alwys updates (no comparison of current - * and former value -*/ -#define JKQTPGET_SET_MACRO_INC(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (typedef_set_##varnam __value) \ - {\ - this->varname = __value; \ - inst; \ - } \ - /** \brief returns the property varname. \see varname for more information */ \ - inline virtual type get_##varname () const \ - {\ - return this->varname; \ - } -#define JKQTPGetSetMacroINC(type,varname,inst) JKQTPGET_SET_MACRO_INC(type,varname,inst) - -/** \brief create get_varname() and set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes -*/ -#define JKQTPGET_MACRO(type,varname) \ - /** \brief returns the property varname. \details Description of the parameter varname is:
\copybrief varname.
. \see varname for more information */ \ - inline virtual type get_##varname() const \ - { return this->varname; } - -#define JKQTPGetMacro(type,varname) JKQTPGET_MACRO(type,varname) - -/** - * \brief create set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes -*/ -#define JKQTPSET_MACRO(type,varname) \ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const type & __value) \ - { \ - this->varname = __value; \ - } -#define JKQTPSetMacro(type,varname) JKQTPSET_MACRO(type,varname) - -/** - * \brief create set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes -*/ -#define JKQTPSET_CAST_MACRO(typefunction,typeinternal,varname) \ - /** \brief sets the property varname to the specified \a __value, where __value is static_cast'ed from typefunction to typeinternal. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typefunction & __value) \ - { \ - this->varname = static_cast(__value); \ - } - -/** - * \brief create set_varname(type __value) methods/functions - * inside a class, where \c type is the type of \c varname and \c varname is a - * previously declared private variable that should be accessed by these - * methodes. In addition this will set the property paramsChanged to true, which - * you will have to declare in your class. -*/ -#define JKQTPSET_MACRO_P(type,varname) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - { \ - if (this->varname != __value) { \ - this->varname = __value; \ - this->paramsChanged=true; \ - } \ - } -#define JKQTPSetMacroP(type,varname) JKQTPSET_MACRO_P(type,varname) - -/** - * \brief like SetMacro(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set - */ -#define JKQTPSET_MACRO_I(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname(const typedef_set_##varname & __value) \ - { \ - if (this->varname != __value) { \ - this->varname = __value; \ - inst; \ - } \ - } -#define JKQTPSetMacroI(type,varname,inst) JKQTPSET_MACRO_I(type,varname,inst) - -/** - * \brief like SetMacro(), but adds the instruction \a inst at the start of the set method. This may be used - * e.g. to lock a mutex in the set operation, e.g. using QMutexLocker locker(mutex); from Qt - */ -#define JKQTPSET_MACRO_I_BEFORE(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname(const typedef_set_##varname & __value) \ - { \ - inst; \ - if (this->varname != __value) { \ - this->varname = __value; \ - } \ - } -#define JKQTPSetMacroIBefore(type,varname,inst) JKQTPSET_MACRO_I_BEFORE(type,varname,inst) -/** - * \brief like SetMacroP(), but adds the instruction \a inst to the set method. This may be used - * to update a component after a value has been set - */ -#define JKQTPSET_MACRO_IP(type,varname,inst) \ - typedef type typedef_set_##varname ;\ - /** \brief sets the property varname to the specified \a __value. \details Description of the parameter varname is:
\copybrief varname.
\see varname for more information */ \ - inline virtual void set_##varname (const typedef_set_##varname & __value) \ - { \ - if (this->varname != __value) { \ - this->varname = __value; \ - this->paramsChanged=true; \ - inst; \ - } \ - } -#define JKQTPSetMacroIP(type,varname,inst) JKQTPSET_MACRO_IP(type,varname,inst) -/*@}*/ - /** \defgroup tools_files filesystem and file I/O * \ingroup tools */ @@ -430,15 +120,12 @@ class JKQTPEnhancedPainter; // forward /** \brief check whether the dlotaing point number is OK (i.e. non-inf, non-NAN) * \ingroup jkqtptools */ -#define JKQTPIsOKFloat(v) (std::isfinite(v)&&(!std::isinf(v))&&(!std::isnan(v))) +template +inline T JKQTPIsOKFloat(T v) { + return std::isfinite(v)&&(!std::isinf(v))&&(!std::isnan(v)); +} -/** \brief converts a QColor into a string using the jkqtp_rgbtostring() method. - * \ingroup jkqtptools - * - * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. - */ -#define JKQTP_QColor2String(color) QString(jkqtp_rgbtostring(static_cast((color).red()), static_cast((color).green()), static_cast((color).blue()), static_cast((color).alpha())).c_str()) /** \brief converts a QT::PenStyle into a string * \ingroup jkqtptools @@ -615,7 +302,7 @@ typedef struct { */ #define JKQTPPROPERTY(type,varname) \ type varname; \ - /** \brief default value for property property varname. \see varname for more information */ \ + /*! \brief default value for property property varname. \see varname for more information */ \ type def_##varname; /** @@ -723,14 +410,18 @@ LIB_EXPORT QString JKQTPgraphSymbols2NameString(JKQTPgraphSymbols pos); LIB_EXPORT JKQTPgraphSymbols String2JKQTPgraphSymbols(QString pos); - +/** \brief convert a double to a string, using the loacle "C" + * \ingroup jkqtptools + */ inline QString JKQTPCDoubleToQString(double value) { QLocale loc=QLocale::c(); loc.setNumberOptions(QLocale::OmitGroupSeparator); return loc.toString(value, 'g', 18); } - +/** \brief convert a double to a string + * \ingroup jkqtptools + */ inline QString JKQTPDoubleToQString(double value, int prec = 10, char f = 'g', QChar decimalSeparator='.') { QLocale loc=QLocale::c(); loc.setNumberOptions(QLocale::OmitGroupSeparator); @@ -743,7 +434,9 @@ inline QString JKQTPDoubleToQString(double value, int prec = 10, char f = 'g', Q - +/** \brief rotate a rectangle by given angle (rotates all points around the center of the rectangle and returns it as a QPolygonF) + * \ingroup jkqtptools + */ LIB_EXPORT QPolygonF jkqtpRotateRect(QRectF r, double angle); @@ -846,6 +539,9 @@ inline void jkqtpSort(T* input, T2* input2, int N, T* output=nullptr, T2* output jkqtpQuicksort(data, data2, 0, N-1); } +/** \brief RAII construct that times its lifetime, outputting properly indented qDebug()-message + * \ingroup jkqtptools + */ class LIB_EXPORT JKQTPAutoOutputTimer : public QElapsedTimer { public: @@ -859,32 +555,94 @@ class LIB_EXPORT JKQTPAutoOutputTimer : public QElapsedTimer }; +/** \brief convert a string to lower-case characters + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_tolower(const std::string& s); +/** \brief convert a string to a boolean + * \ingroup jkqtptools + */ LIB_EXPORT bool jkqtp_strtobool(std::string data); +/** \brief convert a string to upper-case + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_toupper(const std::string& s); +/** \brief std::string wrapper around sprintf() + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_format(const std::string& templ, ...); -LIB_EXPORT long jkqtp_get_filesize(char *FileName); +/** \brief convert a number of bytes to a string, formatting e.g. 1024 as 1kB, ... + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_bytestostr(double bytes); +/** \brief convert an integer to a string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_inttostr(long data); +/** \brief convert an integer to a hex string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_inttohex(long data); +/** \brief convert an unsigned int to a string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_uinttostr(unsigned long data); +/** \brief convert a double to a string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_floattostr(double data, int past_comma=-1, bool remove_trail0=false, double belowIsZero=1e-16); +/** \brief convert a double to a string, encoding powers of ten as characters, e.g. \c jkqtp_floattounitstr(1000,"g") will result in "1kg" + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_floattounitstr(double dataa, std::string unitname); +/** \brief convert a boolean to a string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_booltostr(bool data); +/** \brief converts a RGBA color into a string + * \ingroup jkqtptools + * + * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. + */ LIB_EXPORT std::string jkqtp_rgbtostring(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255); + +/** \brief converts a QColor into a string using the jkqtp_rgbtostring() method. + * \ingroup jkqtptools + * + * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. + */ +inline QString JKQTP_QColor2String(QColor color) { + return QString(jkqtp_rgbtostring(static_cast((color).red()), static_cast((color).green()), static_cast((color).blue()), static_cast((color).alpha())).c_str()); +} + +/** \brief clean a string to be usable as a variable name, e.g. in an expression parser, or a C++-expression + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_to_valid_variable_name(std::string input); +/** \brief convert a double to a string, encoding powers of ten as characters, e.g. \c jkqtp_floattounitstr(1000) will result in "1k" + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_floattounitstr(double data, int past_comma=5, bool remove_trail0=false); +/** \brief convert a double to a string, encoding powers of ten as exponent in LaTeX notation (e.g. \c -1.23\cdot10^{-5}) + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_floattolatexstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); +/** \brief convert a double to a string, encoding powers of ten as exponent with HTML tags + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_floattohtmlstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); +/** \brief convert a character to a string + * \ingroup jkqtptools + */ LIB_EXPORT std::string jkqtp_chartostr(char data); /** \brief wandelt einen Datentyp in einen double um, wird von JKQTPDatastore zur Wandlung benutzt