2018-12-02 21:08:43 +08:00
|
|
|
/*
|
2019-01-12 23:01:55 +08:00
|
|
|
Copyright (c) 2008-2019 Jan W. Krieger (<jan@jkrieger.de>)
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This software is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License (LGPL) as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Lesser General Public License (LGPL) for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License (LGPL)
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "jkqtplottertools/jkqtp_imexport.h"
|
2018-12-19 00:13:18 +08:00
|
|
|
#include "jkqtplotter/jkqtpgraphsbase.h"
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2018-12-19 00:13:18 +08:00
|
|
|
#ifndef jkqtpgraphsfilledcurve_H
|
|
|
|
#define jkqtpgraphsfilledcurve_H
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief This implements filled curve plots where the area is filled between the plot line and the x-Axis.
|
2019-01-13 01:53:16 +08:00
|
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-16 04:28:07 +08:00
|
|
|
\image html plot_filledcurvexerrorplots.png
|
2018-12-02 21:08:43 +08:00
|
|
|
*/
|
2019-01-20 17:49:29 +08:00
|
|
|
class LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPXYGraph {
|
2018-12-02 21:08:43 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/** \brief class constructor */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTPFilledCurveXGraph(JKQTBasePlotter* parent=nullptr);
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief class constructor */
|
2019-01-20 23:15:10 +08:00
|
|
|
JKQTPFilledCurveXGraph(JKQTPlotter* parent);
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief plots a key marker inside the specified rectangle \a rect */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief returns the color to be used for the key label */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual QColor getKeyLabelColor() override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property color ( \copybrief color ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter color is: <BLOCKQUOTE>\copydoc color </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see color for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->color = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property color ( \copybrief color ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter color is: <BLOCKQUOTE>\copydoc color </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see color for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->color;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property fillColor ( \copybrief fillColor ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillColor is: <BLOCKQUOTE>\copydoc fillColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setFillColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fillColor = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property fillColor ( \copybrief fillColor ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillColor is: <BLOCKQUOTE>\copydoc fillColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getFillColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fillColor;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property style ( \copybrief style ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter style is: <BLOCKQUOTE>\copydoc style </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see style for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setStyle(const Qt::PenStyle & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->style = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property style ( \copybrief style ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter style is: <BLOCKQUOTE>\copydoc style </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see style for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual Qt::PenStyle getStyle() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->style;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property lineWidth ( \copybrief lineWidth ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter lineWidth is: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see lineWidth for more information */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual void setLineWidth(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->lineWidth = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property lineWidth ( \copybrief lineWidth ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter lineWidth is: <BLOCKQUOTE>\copydoc lineWidth </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see lineWidth for more information */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual double getLineWidth() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->lineWidth;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property baseline ( \copybrief baseline ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter baseline is: <BLOCKQUOTE>\copydoc baseline </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see baseline for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setBaseline(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->baseline = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property baseline ( \copybrief baseline ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter baseline is: <BLOCKQUOTE>\copydoc baseline </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see baseline for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getBaseline() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->baseline;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property drawLine ( \copybrief drawLine ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawLine is: <BLOCKQUOTE>\copydoc drawLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setDrawLine(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->drawLine = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property drawLine ( \copybrief drawLine ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawLine is: <BLOCKQUOTE>\copydoc drawLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getDrawLine() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->drawLine;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property fillStyle ( \copybrief fillStyle ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillStyle is: <BLOCKQUOTE>\copydoc fillStyle </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillStyle for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setFillStyle(const Qt::BrushStyle & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fillStyle = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property fillStyle ( \copybrief fillStyle ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillStyle is: <BLOCKQUOTE>\copydoc fillStyle </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillStyle for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual Qt::BrushStyle getFillStyle() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fillStyle;
|
|
|
|
}
|
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property drawSelectionLine ( \copybrief drawSelectionLine ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawSelectionLine is: <BLOCKQUOTE>\copydoc drawSelectionLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawSelectionLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setDrawSelectionLine(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->drawSelectionLine = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property drawSelectionLine ( \copybrief drawSelectionLine ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawSelectionLine is: <BLOCKQUOTE>\copydoc drawSelectionLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawSelectionLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getDrawSelectionLine() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->drawSelectionLine;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property selectionLineColor ( \copybrief selectionLineColor ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter selectionLineColor is: <BLOCKQUOTE>\copydoc selectionLineColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see selectionLineColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setSelectionLineColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->selectionLineColor = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property selectionLineColor ( \copybrief selectionLineColor ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter selectionLineColor is: <BLOCKQUOTE>\copydoc selectionLineColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see selectionLineColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getSelectionLineColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->selectionLineColor;
|
|
|
|
}
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/** \brief if \c true, draws a thick shadow around the line*/
|
|
|
|
bool drawSelectionLine;
|
|
|
|
/** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */
|
|
|
|
QColor selectionLineColor;
|
|
|
|
|
2019-01-26 03:16:04 +08:00
|
|
|
/** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */
|
2018-12-02 21:08:43 +08:00
|
|
|
int parentPlotStyle;
|
|
|
|
|
|
|
|
/** \brief color of the graph */
|
|
|
|
QColor color;
|
|
|
|
/** \brief color of the graph fill */
|
|
|
|
QColor fillColor;
|
|
|
|
/** \brief fill styl for the curve */
|
|
|
|
Qt::BrushStyle fillStyle;
|
|
|
|
/** \brief linestyle of the graph lines */
|
|
|
|
Qt::PenStyle style;
|
|
|
|
/** \brief width (pixels) of the graph */
|
|
|
|
double lineWidth;
|
|
|
|
/** \brief indicates whether to draw a line or not */
|
|
|
|
bool drawLine;
|
|
|
|
/** \brief baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!)
|
|
|
|
*/
|
|
|
|
double baseline;
|
|
|
|
QBrush getBrush(JKQTPEnhancedPainter& painter) const;
|
|
|
|
QPen getLinePen(JKQTPEnhancedPainter& painter) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief This implements filled curve plots with y errors where the area is filled between the plot line and the x-Axis.
|
2019-01-13 01:53:16 +08:00
|
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
\image html plot_filledcurvexerrorplots.png
|
|
|
|
*/
|
2019-01-20 17:49:29 +08:00
|
|
|
class LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurveXGraph, public JKQTPYGraphErrors {
|
2018-12-02 21:08:43 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/** \brief class constructor */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTPFilledCurveXErrorGraph(JKQTBasePlotter* parent=nullptr);
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief class constructor */
|
2019-01-20 23:15:10 +08:00
|
|
|
JKQTPFilledCurveXErrorGraph(JKQTPlotter* parent);
|
2019-01-20 17:49:29 +08:00
|
|
|
/** \copydoc JKQTPGraph::usesColumn() */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual bool usesColumn(int c) const override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/** \brief this function is used to plot error inidcators before plotting the graphs. */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void drawErrorsAfter(JKQTPEnhancedPainter& painter) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief This implements filled curve plots where the area is filled between the plot line and y-Axis
|
2019-01-13 01:53:16 +08:00
|
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-16 04:28:07 +08:00
|
|
|
\image html plot_filledcurvexplots.png
|
2018-12-02 21:08:43 +08:00
|
|
|
*/
|
2019-01-20 17:49:29 +08:00
|
|
|
class LIB_EXPORT JKQTPFilledCurveYGraph: public JKQTPFilledCurveXGraph {
|
2018-12-02 21:08:43 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/** \brief class constructor */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTPFilledCurveYGraph(JKQTBasePlotter* parent=nullptr);
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief class constructor */
|
2019-01-20 23:15:10 +08:00
|
|
|
JKQTPFilledCurveYGraph(JKQTPlotter* parent);
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief This implements filled curve plots with y errors where the area is filled between the plot line and the x-Axis.
|
2019-01-13 01:53:16 +08:00
|
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
\image html plot_filledcurveyerrorplots.png
|
|
|
|
*/
|
2019-01-20 17:49:29 +08:00
|
|
|
class LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurveYGraph, public JKQTPXGraphErrors {
|
2018-12-02 21:08:43 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/** \brief class constructor */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTPFilledCurveYErrorGraph(JKQTBasePlotter* parent=nullptr);
|
2019-01-20 23:15:10 +08:00
|
|
|
JKQTPFilledCurveYErrorGraph(JKQTPlotter* parent);
|
2019-01-20 17:49:29 +08:00
|
|
|
/** \copydoc JKQTPGraph::usesColumn() */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual bool usesColumn(int c) const override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/** \brief this function is used to plot error inidcators before plotting the graphs. */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void drawErrorsAfter(JKQTPEnhancedPainter& painter) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief This implements filled curve plots where the area is filled between two data columns for each x-value
|
2019-01-13 01:53:16 +08:00
|
|
|
\ingroup jkqtplotter_linesymbolgraphs
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
With setDrawlines(false):
|
2019-01-20 17:49:29 +08:00
|
|
|
\image html JKQTPFilledVerticalRangeGraph.png
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
With setDrawlines(true):
|
2019-01-20 17:49:29 +08:00
|
|
|
\image html JKQTPFilledVerticalRangeGraph_WithLines.png
|
2018-12-02 21:08:43 +08:00
|
|
|
*/
|
2019-01-20 17:49:29 +08:00
|
|
|
class LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph {
|
2018-12-02 21:08:43 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
/** \brief class constructor */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTPFilledVerticalRangeGraph(JKQTBasePlotter* parent=nullptr);
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief class constructor */
|
2019-01-20 23:15:10 +08:00
|
|
|
JKQTPFilledVerticalRangeGraph(JKQTPlotter* parent);
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief get the maximum and minimum y-value of the graph
|
|
|
|
*
|
|
|
|
* The result is given in the two parameters which are call-by-reference parameters!
|
|
|
|
*/
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-20 17:49:29 +08:00
|
|
|
/** \copydoc JKQTPGraph::usesColumn() */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual bool usesColumn(int column) const override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief plots a key marker inside the specified rectangle \a rect */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override;
|
2018-12-02 21:08:43 +08:00
|
|
|
/** \brief returns the color to be used for the key label */
|
2018-12-28 05:52:00 +08:00
|
|
|
virtual QColor getKeyLabelColor() override;
|
2018-12-02 21:08:43 +08:00
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property yColumn2 ( \copybrief yColumn2 ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter yColumn2 is: <BLOCKQUOTE>\copydoc yColumn2 </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see yColumn2 for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setYColumn2(int __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->yColumn2 = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property yColumn2 ( \copybrief yColumn2 ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter yColumn2 is: <BLOCKQUOTE>\copydoc yColumn2 </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see yColumn2 for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual int getYColumn2() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->yColumn2;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property yColumn2 ( \copybrief yColumn2 ) to the specified \a __value, where __value is static_cast'ed from size_t to int.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter yColumn2 is: <BLOCKQUOTE>\copydoc yColumn2 </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see yColumn2 for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setYColumn2 (size_t __value) { this->yColumn2 = static_cast<int>(__value); }
|
2019-01-10 04:23:24 +08:00
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property color ( \copybrief color ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter color is: <BLOCKQUOTE>\copydoc color </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see color for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->color = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property color ( \copybrief color ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter color is: <BLOCKQUOTE>\copydoc color </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see color for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->color;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property fillColor ( \copybrief fillColor ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillColor is: <BLOCKQUOTE>\copydoc fillColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setFillColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fillColor = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property fillColor ( \copybrief fillColor ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillColor is: <BLOCKQUOTE>\copydoc fillColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getFillColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fillColor;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property style ( \copybrief style ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter style is: <BLOCKQUOTE>\copydoc style </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see style for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setStyle(const Qt::PenStyle & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->style = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property style ( \copybrief style ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter style is: <BLOCKQUOTE>\copydoc style </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see style for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual Qt::PenStyle getStyle() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->style;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property drawLine ( \copybrief drawLine ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawLine is: <BLOCKQUOTE>\copydoc drawLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setDrawLine(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->drawLine = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property drawLine ( \copybrief drawLine ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawLine is: <BLOCKQUOTE>\copydoc drawLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getDrawLine() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->drawLine;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property fillStyle ( \copybrief fillStyle ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillStyle is: <BLOCKQUOTE>\copydoc fillStyle </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillStyle for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setFillStyle(const Qt::BrushStyle & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fillStyle = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property fillStyle ( \copybrief fillStyle ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter fillStyle is: <BLOCKQUOTE>\copydoc fillStyle </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see fillStyle for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual Qt::BrushStyle getFillStyle() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fillStyle;
|
|
|
|
}
|
|
|
|
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property drawSelectionLine ( \copybrief drawSelectionLine ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawSelectionLine is: <BLOCKQUOTE>\copydoc drawSelectionLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawSelectionLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setDrawSelectionLine(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->drawSelectionLine = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property drawSelectionLine ( \copybrief drawSelectionLine ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter drawSelectionLine is: <BLOCKQUOTE>\copydoc drawSelectionLine </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see drawSelectionLine for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getDrawSelectionLine() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->drawSelectionLine;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief sets the property selectionLineColor ( \copybrief selectionLineColor ) to the specified \a __value.
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter selectionLineColor is: <BLOCKQUOTE>\copydoc selectionLineColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see selectionLineColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setSelectionLineColor(const QColor & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->selectionLineColor = __value;
|
|
|
|
}
|
2019-01-26 20:00:40 +08:00
|
|
|
/*! \brief returns the property selectionLineColor ( \copybrief selectionLineColor ).
|
2019-01-25 05:49:10 +08:00
|
|
|
\details Description of the parameter selectionLineColor is: <BLOCKQUOTE>\copydoc selectionLineColor </BLOCKQUOTE>
|
2019-01-10 04:23:24 +08:00
|
|
|
\see selectionLineColor for more information */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QColor getSelectionLineColor() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->selectionLineColor;
|
|
|
|
}
|
2018-12-02 21:08:43 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
/** \brief the column that contains the second y-component of the range */
|
|
|
|
int yColumn2;
|
|
|
|
/** \brief if \c true, draws a thick shadow around the line*/
|
|
|
|
bool drawSelectionLine;
|
|
|
|
/** \brief color for the shadow, or a lighter version of the line color, if transparent (default) */
|
|
|
|
QColor selectionLineColor;
|
|
|
|
|
2019-01-26 03:16:04 +08:00
|
|
|
/** \brief which plot style to use from the parent plotter (via JKQTBasePlotter::getPlotStyle() and JKQTBasePlotter::getNextStyle() ) */
|
2018-12-02 21:08:43 +08:00
|
|
|
int parentPlotStyle;
|
|
|
|
|
|
|
|
/** \brief color of the graph */
|
|
|
|
QColor color;
|
|
|
|
/** \brief color of the graph fill */
|
|
|
|
QColor fillColor;
|
|
|
|
/** \brief fill styl for the curve */
|
|
|
|
Qt::BrushStyle fillStyle;
|
|
|
|
/** \brief linestyle of the graph lines */
|
|
|
|
Qt::PenStyle style;
|
|
|
|
/** \brief width (pixels) of the graph */
|
|
|
|
double lineWidth;
|
|
|
|
/** \brief indicates whether to draw a line or not */
|
|
|
|
bool drawLine;
|
|
|
|
|
|
|
|
QBrush getBrush(JKQTPEnhancedPainter& painter) const;
|
|
|
|
QPen getLinePen(JKQTPEnhancedPainter& painter) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-19 00:13:18 +08:00
|
|
|
#endif // jkqtpgraphsfilledcurve_H
|