class KPlotObject |
|
|
KPlotObject Encapsulates a data set to be plotted in a KPlotWidget. Think of a KPlotObject as a set of data displayed as a group in the plot. Each KPlotObject consists of a list of KPlotPoints, a "type" controlling how the data points are displayed (some combination of Points, Lines, or Bars), a color, and a size. There is also a parameter which controls the shape of the points used to display the KPlotObject. KPlotObject will take care of the points added to it, so when clearing the points list (eg with clearPoints()) any previous reference to a KPlotPoint already added to a KPlotObject will be invalid. Author Jason Harris Version: 1.1 |
|
Constructor. color - The color for plotting this object. By default this sets the color for Points, Lines and Bars, but there are functions to override any of these. otype - the PlotType for this object (Points, Lines or Bars) size - the size to use for plotted points, in pixels ps - The PointStyle describing the shape for plotted points |
|
|
Add a point to the object's list of points, using input data to construct a KPlotPoint. p - the QPointF to add. label - the optional text label for this point barWidth - the width of the bar, if this object is to be drawn with bars if barWidth - is left at its default value of 0.0, then the width will be automatically set to the distance between this point and the one to its right. |
|
Add a given KPlotPoint to the object's list of points. p - pointer to the KPlotPoint to add. |
|
Add a point to the object's list of points, using input data to construct a KPlotPoint. x - the X-coordinate of the point to add. y - the Y-coordinate of the point to add. label - the optional text label barWidth - the width of the bar, if this object is to be drawn with bars if barWidth - is left at its default value of 0.0, then the width will be automatically set to the distance between this point and the one to its right. |
|
Returns the brush to use for filling bars for this Object. |
|
Returns the pen to use for drawing bars for this Object. |
|
Returns the default Brush to use for this Object. |
|
Remove and destroy the points of this object |
|
Draw this KPlotObject on the given QPainter p - The QPainter to draw on pw - the KPlotWidget to draw on (this is needed for the KPlotWidget.mapToWidget() function) |
|
Returns the pen to use for drawing labels for this Object. |
|
Returns the pen to use for drawing lines for this Object. |
|
Returns the default pen for this Object. If no other pens are set, this pen will be used for points, lines, bars and labels (this pen is always used for points). |
|
Returns the plot flags of the object |
|
Returns the style used for drawing the points in this object |
|
Returns the list of KPlotPoints that make up this object |
|
Remove the QPointF at position index from the list of points index - the index of the point to be removed. |
|
Set the brush to use for drawing bars for this object The brush to use |
|
Set the pen to use for drawing bars for this object The pen to use |
|
Set the default brush to use for this object The brush to use |
|
Set the pen to use for labels for this object The pen to use |
|
Set the pen to use for drawing lines for this object The pen to use |
|
Set the default pen for this object The pen to use |
|
Set a new style for drawing the points in this object p - the new style |
|
Set whether bars will be drawn for this object b - if true, bars will be drawn |
|
Set whether lines will be drawn for this object b - if true, lines will be drawn |
|
Set whether points will be drawn for this object b - if true, points will be drawn |
|
Set the size for plotted points in this object, in pixels s - the new size |
|
Returns the size of the plotted points in this object, in pixels |
UnknownType | - | ||
Points | - | each KPlotPoint is represented with a drawn point | |
Lines | - | each KPlotPoint is connected with a line | |
Bars | - | each KPlotPoint is shown as a vertical bar |
NoPoints | - | ||
Circle | - | ||
Letter | - | ||
Triangle | - | ||
Square | - | ||
Pentagon | - | ||
Hexagon | - | ||
Asterisk | - | ||
Star | - | ||
UnknwonPoint | - |