KPlotPoint
#include <kplotpoint.h>
Public Member Functions | |
KPlotPoint () | |
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 () | |
double | barWidth () const |
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 |
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 27 of file kplotpoint.h.
Constructor & Destructor Documentation
◆ KPlotPoint() [1/3]
|
explicit |
Default constructor.
Definition at line 31 of file kplotpoint.cpp.
◆ KPlotPoint() [2/3]
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 36 of file kplotpoint.cpp.
◆ KPlotPoint() [3/3]
|
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 41 of file kplotpoint.cpp.
◆ ~KPlotPoint()
KPlotPoint::~KPlotPoint | ( | ) |
Destructor.
Definition at line 46 of file kplotpoint.cpp.
Member Function Documentation
◆ barWidth()
double KPlotPoint::barWidth | ( | ) | const |
- Returns
- the bar-width for the point
Definition at line 91 of file kplotpoint.cpp.
◆ label()
QString KPlotPoint::label | ( | ) | const |
- Returns
- the label for the point
Definition at line 81 of file kplotpoint.cpp.
◆ position()
QPointF KPlotPoint::position | ( | ) | const |
- Returns
- the position of the point, in data units
Definition at line 51 of file kplotpoint.cpp.
◆ setBarWidth()
void KPlotPoint::setBarWidth | ( | double | w | ) |
Set the bar-width for the point.
Definition at line 96 of file kplotpoint.cpp.
◆ setLabel()
void KPlotPoint::setLabel | ( | const QString & | label | ) |
Set the label for the point.
Definition at line 86 of file kplotpoint.cpp.
◆ setPosition()
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 56 of file kplotpoint.cpp.
◆ setX()
void KPlotPoint::setX | ( | double | x | ) |
Set the X-position of the point, in Data units.
Definition at line 66 of file kplotpoint.cpp.
◆ setY()
void KPlotPoint::setY | ( | double | y | ) |
Set the Y-position of the point, in Data units.
Definition at line 76 of file kplotpoint.cpp.
◆ x()
double KPlotPoint::x | ( | ) | const |
- Returns
- the X-position of the point, in data units
Definition at line 61 of file kplotpoint.cpp.
◆ y()
double KPlotPoint::y | ( | ) | const |
- Returns
- the Y-position of the point, in data units
Definition at line 71 of file kplotpoint.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Oct 3 2023 04:10:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.