casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
casa::PlotItem Class Reference

PlotItem is the superclass of any object that is meant to be placed on the canvas (plots, annotations, shapes, etc.). More...

#include <PlotItem.h>

Inheritance diagram for casa::PlotItem:
casa::Plot casa::PlotAnnotation casa::PlotPoint casa::PlotShape casa::BarPlot casa::RasterPlot casa::ScatterPlot casa::PlotShapeArc casa::PlotShapeArrow casa::PlotShapeEllipse casa::PlotShapeLine casa::PlotShapePath casa::PlotShapePolygon casa::PlotShapeRectangle

List of all members.

Public Member Functions

 PlotItem ()
 Constructor.
virtual ~PlotItem ()
 Destructor.
virtual PlotCanvascanvas () const =0
 Returns the canvas this item is currently attached to, or NULL for none.
virtual String title () const =0
 Returns a human-readable title for identification.
virtual void setTitle (const String &newTitle)=0
 Sets this items's title to the given.
virtual bool isValid () const =0
 Returns true if this item is valid, false otherwise.
virtual bool isQWidget () const =0
 Returns whether this item can be directly casted to a QWidget or not.
virtual PlotAxis xAxis () const =0
 Returns the item's axes.
virtual PlotAxis yAxis () const =0
virtual void setXAxis (PlotAxis x)=0
 Sets the item's axes.
virtual void setYAxis (PlotAxis y)=0
virtual void setAxes (PlotAxis x, PlotAxis y)
 Sets both the item's axes at once.
virtual unsigned int drawCount () const =0
 Returns the "draw count" for this item, which subjectively means how many indexed draw operations this item needs to make.
virtual unsigned int drawSegments (unsigned int segmentThreshold) const
 Returns the number of draw segments for this item, using the given segment threshold.

Detailed Description

PlotItem is the superclass of any object that is meant to be placed on the canvas (plots, annotations, shapes, etc.).

A PlotItem is assumed to have an x and y axis for drawing on the canvas.

Definition at line 40 of file PlotItem.h.


Constructor & Destructor Documentation

Constructor.

virtual casa::PlotItem::~PlotItem ( ) [virtual]

Destructor.


Member Function Documentation

virtual PlotCanvas* casa::PlotItem::canvas ( ) const [pure virtual]

Returns the canvas this item is currently attached to, or NULL for none.

virtual unsigned int casa::PlotItem::drawCount ( ) const [pure virtual]

Returns the "draw count" for this item, which subjectively means how many indexed draw operations this item needs to make.

This is used to make comparative judgments about how long each item will take to draw, and to possibly divide up the work for larger items. For example, a plot with 1000 data points might return 1000, while a square might return 1. Whatever number is returned, the item should expect to be able to draw given two indexes; for example, a plot should be able to draw from index 0 to index 100.

Implemented in casa::BarPlot, casa::PlotPoint, casa::PlotShapePath, casa::PlotShapePolygon, casa::ScatterPlot, casa::PlotAnnotation, and casa::PlotShape.

virtual unsigned int casa::PlotItem::drawSegments ( unsigned int  segmentThreshold) const [virtual]

Returns the number of draw segments for this item, using the given segment threshold.

See DrawCount(). DEFAULT IMPLEMENTATION.

virtual bool casa::PlotItem::isQWidget ( ) const [pure virtual]

Returns whether this item can be directly casted to a QWidget or not.

virtual bool casa::PlotItem::isValid ( ) const [pure virtual]

Returns true if this item is valid, false otherwise.

Although validity varies between items, canvases should NOT draw items which are invalid.

virtual void casa::PlotItem::setAxes ( PlotAxis  x,
PlotAxis  y 
) [virtual]

Sets both the item's axes at once.

DEFAULT IMPLEMENTATION.

virtual void casa::PlotItem::setTitle ( const String newTitle) [pure virtual]

Sets this items's title to the given.

virtual void casa::PlotItem::setXAxis ( PlotAxis  x) [pure virtual]

Sets the item's axes.

virtual void casa::PlotItem::setYAxis ( PlotAxis  y) [pure virtual]
virtual String casa::PlotItem::title ( ) const [pure virtual]

Returns a human-readable title for identification.

Doesn't have to be unique. Used for (for example) legends and other user-interactions. Note: PlotItems that have no titles should not be shown on the legend.

virtual PlotAxis casa::PlotItem::xAxis ( ) const [pure virtual]

Returns the item's axes.

virtual PlotAxis casa::PlotItem::yAxis ( ) const [pure virtual]

The documentation for this class was generated from the following file: