KDEUI
KPlotPoint Class Reference
#include <kplotpoint.h>
Detailed Description
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.
Definition at line 40 of file kplotpoint.h.
Public Member Functions | |
double | barWidth () const |
KPlotPoint (const QPointF &p, const QString &label=QString(), double width=0.0) | |
KPlotPoint (double x, double y, const QString &label=QString(), double width=0.0) | |
KPlotPoint () | |
QString | label () const |
QPointF | position () const |
void | setBarWidth (double w) |
void | setLabel (const QString &label) |
void | setPosition (const QPointF &pos) |
void | setX (double x) |
void | setY (double y) |
double | x () const |
double | y () const |
~KPlotPoint () |
Constructor & Destructor Documentation
KPlotPoint::KPlotPoint | ( | ) | [explicit] |
KPlotPoint::KPlotPoint | ( | double | x, | |
double | y, | |||
const QString & | label = QString() , |
|||
double | width = 0.0 | |||
) |
Constructor.
Sets the KPlotPoint according to the given arguments
- Parameters:
-
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)
Definition at line 48 of file kplotpoint.cpp.
KPlotPoint::KPlotPoint | ( | const QPointF & | p, | |
const QString & | label = QString() , |
|||
double | width = 0.0 | |||
) | [explicit] |
Constructor.
Sets the KPlotPoint according to the given arguments
- Parameters:
-
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)
Definition at line 53 of file kplotpoint.cpp.
KPlotPoint::~KPlotPoint | ( | ) |
Member Function Documentation
double KPlotPoint::barWidth | ( | ) | const |
QString KPlotPoint::label | ( | ) | const |
QPointF KPlotPoint::position | ( | ) | const |
void KPlotPoint::setBarWidth | ( | double | w | ) |
void KPlotPoint::setLabel | ( | const QString & | label | ) |
void KPlotPoint::setPosition | ( | const QPointF & | pos | ) |
Set the position of the point, in data units.
- Parameters:
-
pos the new position for the point.
Definition at line 68 of file kplotpoint.cpp.
void KPlotPoint::setX | ( | double | x | ) |
void KPlotPoint::setY | ( | double | y | ) |
double KPlotPoint::x | ( | ) | const |
double KPlotPoint::y | ( | ) | const |
The documentation for this class was generated from the following files: