KPlotting 5.109.0
|
Encapsulates a point in the plot. More...
#include <kplotpoint.h>
Public Member Functions | |
KPlotPoint () | |
Default constructor. | |
KPlotPoint (const QPointF &p, const QString &label=QString(), double width=0.0) | |
Constructor. | |
KPlotPoint (double x, double y, const QString &label=QString(), double width=0.0) | |
Constructor. | |
~KPlotPoint () | |
Destructor. | |
double | barWidth () const |
QString | label () const |
QPointF | position () const |
void | setBarWidth (double w) |
Set the bar-width for the point. | |
void | setLabel (const QString &label) |
Set the label for the point. | |
void | setPosition (const QPointF &pos) |
Set the position of the point, in data units. | |
void | setX (double x) |
Set the X-position of the point, in Data units. | |
void | setY (double y) |
Set the Y-position of the point, in Data units. | |
double | x () const |
double | y () const |
Encapsulates a point in the plot.
A KPlotPoint consists of X and Y coordinates (in Data units), an optional label string, and an optional bar-width, The bar-width is only used for plots of type KPlotObject::Bars, and it allows the width of each bar to be set manually. If bar-widths are omitted, then the widths will be set automatically, based on the halfway-mark between adjacent points.
|
explicit |
Default constructor.
KPlotPoint::KPlotPoint | ( | double | x, |
double | y, | ||
const QString & | label = QString() , |
||
double | width = 0.0 |
||
) |
Constructor.
Sets the KPlotPoint according to the given arguments
x | the X-position for the point, in Data units |
y | the Y-position for the point, in Data units |
label | the label string for the point. If the string is defined, the point will be labeled in the plot. |
width | the bar width to use for this point (only used for plots of type KPlotObject::Bars) |
|
explicit |
Constructor.
Sets the KPlotPoint according to the given arguments
p | the position for the point, in Data units |
label | the label string for the point. If the string is defined, the point will be labeled in the plot. |
width | the bar width to use for this point (only used for plots of type KPlotObject::Bars) |
KPlotPoint::~KPlotPoint | ( | ) |
Destructor.
double KPlotPoint::barWidth | ( | ) | const |
QString KPlotPoint::label | ( | ) | const |
QPointF KPlotPoint::position | ( | ) | const |
void KPlotPoint::setBarWidth | ( | double | w | ) |
Set the bar-width for the point.
void KPlotPoint::setLabel | ( | const QString & | label | ) |
Set the label for the point.
void KPlotPoint::setPosition | ( | const QPointF & | pos | ) |
Set the position of the point, in data units.
pos | the new position for the point. |
void KPlotPoint::setX | ( | double | x | ) |
Set the X-position of the point, in Data units.
void KPlotPoint::setY | ( | double | y | ) |
Set the Y-position of the point, in Data units.
double KPlotPoint::x | ( | ) | const |
double KPlotPoint::y | ( | ) | const |