11#include <kplotting_export.h>
58 Q_DECLARE_FLAGS(PlotTypes, PlotType)
218 void addPoint(
const QPointF &p,
const QString &label = QString(),
double barWidth = 0.0);
237 void addPoint(
double x,
double y,
const QString &label = QString(),
double barWidth = 0.0);
264Q_DECLARE_OPERATORS_FOR_FLAGS(KPlotObject::PlotTypes)
Encapsulates a data set to be plotted in a KPlotWidget.
Definition kplotobject.h:41
void draw(QPainter *p, KPlotWidget *pw)
Draw this KPlotObject on the given QPainter.
const QPen & barPen() const
~KPlotObject()
Destructor.
PointStyle pointStyle() const
PlotTypes plotTypes() const
void setSize(double s)
Set the size for plotted points in this object, in pixels.
void addPoint(const QPointF &p, const QString &label=QString(), double barWidth=0.0)
Add a point to the object's list of points, using input data to construct a KPlotPoint.
PointStyle
The available shape styles for plotted points.
Definition kplotobject.h:63
void setBarPen(const QPen &p)
Set the pen to use for drawing bars for this object The pen to use.
void removePoint(int index)
Remove the QPointF at position index from the list of points.
const QPen & linePen() const
void setLinePen(const QPen &p)
Set the pen to use for drawing lines for this object The pen to use.
void setPointStyle(PointStyle p)
Set a new style for drawing the points in this object.
void setPen(const QPen &p)
Set the default pen for this object The pen to use.
void setShowBars(bool b)
Set whether bars will be drawn for this object.
const QPen & labelPen() const
void addPoint(KPlotPoint *p)
Add a given KPlotPoint to the object's list of points.
void setBrush(const QBrush &b)
Set the default brush to use for this object The brush to use.
QList< KPlotPoint * > points() const
void clearPoints()
Remove and destroy the points of this object.
void addPoint(double x, double y, const QString &label=QString(), double barWidth=0.0)
Add a point to the object's list of points, using input data to construct a KPlotPoint.
const QBrush barBrush() const
void setBarBrush(const QBrush &b)
Set the brush to use for drawing bars for this object The brush to use.
void setLabelPen(const QPen &p)
Set the pen to use for labels for this object The pen to use.
PlotType
The type classification of the KPlotObject.
Definition kplotobject.h:52
const QBrush brush() const
void setShowLines(bool b)
Set whether lines will be drawn for this object.
void setShowPoints(bool b)
Set whether points will be drawn for this object.
KPlotObject(const QColor &color=Qt::white, PlotType otype=Points, double size=2.0, PointStyle ps=Circle)
Constructor.
Encapsulates a point in the plot.
Definition kplotpoint.h:28