2015-07-11 18:56:02 +08:00
|
|
|
/*
|
2019-01-12 23:01:55 +08:00
|
|
|
Copyright (c) 2008-2019 Jan W. Krieger (<jan@jkrieger.de>)
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2015-07-12 22:34:27 +08:00
|
|
|
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
This software is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Lesser General Public License (LGPL) as published by
|
2019-02-08 00:24:46 +08:00
|
|
|
the Free Software Foundation, either version 2.1 of the License, or
|
2015-07-11 18:56:02 +08:00
|
|
|
(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 <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QPainter>
|
|
|
|
#include <QPair>
|
2018-11-26 03:25:44 +08:00
|
|
|
#include "jkqtplottertools/jkqtptools.h"
|
|
|
|
#include "jkqtplottertools/jkqtp_imexport.h"
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2018-12-19 00:13:18 +08:00
|
|
|
#ifndef jkqtpelementsoverlay_H
|
|
|
|
#define jkqtpelementsoverlay_H
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
// forward declarations
|
2019-01-20 17:49:29 +08:00
|
|
|
class JKQTBasePlotter;
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/*! \brief this virtual base class describes an interface for graph overlay elements, which are simple geometric
|
|
|
|
forms drawn ONTO the graphe, so a redraw of the overlays does NOT require a redraw of the graph.
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
|
|
|
|
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayElement : public QObject {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayElement(JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter)=0;
|
|
|
|
|
|
|
|
/** \brief returns the parent painter class */
|
2019-01-20 17:49:29 +08:00
|
|
|
inline JKQTBasePlotter* getParent() { return parent; }
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief sets the parent painter class */
|
2019-01-20 17:49:29 +08:00
|
|
|
virtual void setParent(JKQTBasePlotter* parent);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc color
|
|
|
|
\see see color for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc color
|
|
|
|
\see see color for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fillColor
|
|
|
|
\see see fillColor for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fillColor
|
|
|
|
\see see fillColor for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc lineStyle
|
|
|
|
\see see lineStyle for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual void setLineStyle(const Qt::PenStyle & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->lineStyle = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc lineStyle
|
|
|
|
\see see lineStyle for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual Qt::PenStyle getLineStyle() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->lineStyle;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fillStyle
|
|
|
|
\see see fillStyle for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fillStyle
|
|
|
|
\see see fillStyle for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc lineWidth
|
|
|
|
\see see lineWidth for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc lineWidth
|
|
|
|
\see see lineWidth for details */
|
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-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc text
|
|
|
|
\see see text for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setText(const QString & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->text = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc text
|
|
|
|
\see see text for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual QString getText() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->text;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fontName
|
|
|
|
\see see fontName for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual void setFontName(const QString & __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fontName = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fontName
|
|
|
|
\see see fontName for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual QString getFontName() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fontName;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fontSize
|
|
|
|
\see see fontSize for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual void setFontSize(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->fontSize = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc fontSize
|
|
|
|
\see see fontSize for details */
|
2019-01-26 03:16:04 +08:00
|
|
|
inline virtual double getFontSize() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->fontSize;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc visible
|
|
|
|
\see see visible for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setVisible(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->visible = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc visible
|
|
|
|
\see see visible for details */
|
2019-02-03 21:04:48 +08:00
|
|
|
inline virtual bool isVisible() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->visible;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/** \brief the plotter object this object belongs to */
|
2019-01-20 17:49:29 +08:00
|
|
|
JKQTBasePlotter* parent;
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
QColor color;
|
|
|
|
QColor fillColor;
|
|
|
|
Qt::PenStyle lineStyle;
|
|
|
|
Qt::BrushStyle fillStyle;
|
|
|
|
double lineWidth;
|
|
|
|
QString text;
|
|
|
|
QString fontName;
|
|
|
|
double fontSize;
|
|
|
|
bool visible;
|
|
|
|
QFont getFont() const;
|
|
|
|
|
|
|
|
|
|
|
|
/** \brief tool routine that transforms a QPointF according to the parent's transformation rules */
|
|
|
|
QPointF transform(const QPointF& x);
|
|
|
|
|
|
|
|
double transfromX(double x);
|
|
|
|
double transfromY(double y);
|
|
|
|
|
|
|
|
/** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules */
|
|
|
|
QPointF backTransform(const QPointF& x);
|
|
|
|
|
|
|
|
/** \brief tool routine that transforms a QPointF according to the parent's transformation rules */
|
|
|
|
inline QPointF transform(double x, double y) {
|
|
|
|
return transform(QPointF(x,y));
|
|
|
|
};
|
|
|
|
/** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules */
|
|
|
|
inline QPointF backTransform(double x, double y) {
|
|
|
|
return backTransform(QPointF(x,y));
|
|
|
|
};
|
|
|
|
/** \brief tool routine that transforms a QVector<QPointF> according to the parent's transformation rules */
|
|
|
|
QVector<QPointF> transform(const QVector<QPointF>& x);
|
|
|
|
|
|
|
|
/** \brief tool routine that transforms a QVector<QPointF> according to the parent's transformation rules
|
|
|
|
* and returns a (non-closed) path consisting of lines */
|
|
|
|
QPainterPath transformToLinePath(const QVector<QPointF>& x);
|
|
|
|
|
|
|
|
/** \brief tool routine that transforms a QVector<QPointF> according to the parent's transformation rules
|
|
|
|
* and returns a polygon */
|
|
|
|
inline QPolygonF transformToPolygon(const QVector<QPointF>& x) {
|
|
|
|
return QPolygonF(transform(x));
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual QBrush getBrush(JKQTPEnhancedPainter &painter) const;
|
|
|
|
virtual QPen getPen(JKQTPEnhancedPainter& painter) const;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief baseclass for a two-position overlay
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc x1
|
|
|
|
\see see x1 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setX1(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->x1 = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc x1
|
|
|
|
\see see x1 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getX1() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->x1;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc x2
|
|
|
|
\see see x2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setX2(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->x2 = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc x2
|
|
|
|
\see see x2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getX2() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->x2;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc y1
|
|
|
|
\see see y1 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setY1(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->y1 = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc y1
|
|
|
|
\see see y1 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getY1() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->y1;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc y2
|
|
|
|
\see see y2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setY2(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->y2 = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc y2
|
|
|
|
\see see y2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getY2() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->y2;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
protected:
|
|
|
|
double x1;
|
|
|
|
double y1;
|
|
|
|
double x2;
|
|
|
|
double y2;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief baseclass for one-coordinate indicator overlays (horizontal/vertical lines
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc position
|
|
|
|
\see see position for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setPosition(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->position = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc position
|
|
|
|
\see see position for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getPosition() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->position;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
protected:
|
|
|
|
double position;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief baseclass for two-coordinate indicator overlays (horizontal/vertical lines
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc position2
|
|
|
|
\see see position2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setPosition2(double __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->position2 = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc position2
|
|
|
|
\see see position2 for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual double getPosition2() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->position2;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
protected:
|
|
|
|
double position2;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief draws a vertical line as an overlay
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
|
|
|
|
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayVerticalLine(double pos, JKQTBasePlotter *parent = 0);
|
2019-01-26 19:28:44 +08:00
|
|
|
explicit JKQTPOverlayVerticalLine(double pos, const QString& text, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*! \brief draws a vertical range as an overlay
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
|
|
|
|
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayVerticalRange(double pos, double pos2, JKQTBasePlotter *parent = 0);
|
2019-01-26 19:28:44 +08:00
|
|
|
explicit JKQTPOverlayVerticalRange(double pos, double pos2, const QString& text, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter);
|
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc inverted
|
|
|
|
\see see inverted for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setInverted(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->inverted = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc inverted
|
|
|
|
\see see inverted for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getInverted() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->inverted;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
protected:
|
|
|
|
/** \brief if set \c false, the range is filled, otherwise everything outside the range is filled */
|
|
|
|
bool inverted;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*! \brief draws a line throught two points
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayLine(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter);
|
|
|
|
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc infinite
|
|
|
|
\see see infinite for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual void setInfinite(bool __value)
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
this->infinite = __value;
|
|
|
|
}
|
2019-02-08 00:24:46 +08:00
|
|
|
/*! \copydoc infinite
|
|
|
|
\see see infinite for details */
|
2019-01-26 20:00:40 +08:00
|
|
|
inline virtual bool getInfinite() const
|
2019-01-10 04:23:24 +08:00
|
|
|
{
|
|
|
|
return this->infinite;
|
|
|
|
}
|
2015-07-11 18:56:02 +08:00
|
|
|
protected:
|
|
|
|
/** \brief the line goes on infinitely */
|
|
|
|
bool infinite;
|
|
|
|
};
|
|
|
|
|
|
|
|
/*! \brief draws a rectangle, spanned by two points
|
|
|
|
\ingroup jkqtplotter_overlays
|
|
|
|
|
|
|
|
*/
|
2019-02-03 21:04:48 +08:00
|
|
|
class JKQTP_LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay {
|
2015-07-11 18:56:02 +08:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2019-01-20 17:49:29 +08:00
|
|
|
explicit JKQTPOverlayRectangle(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
|
2015-07-11 18:56:02 +08:00
|
|
|
|
|
|
|
/** \brief plots the graph to the plotter object specified as parent */
|
|
|
|
virtual void draw(JKQTPEnhancedPainter& painter);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|
2018-12-19 00:13:18 +08:00
|
|
|
#endif // jkqtpelementsoverlay_H
|