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

A Plot basically consists of data and customization information. More...

#include <Plot.h>

Inheritance diagram for casa::Plot:
casa::PlotItem casa::BarPlot casa::RasterPlot casa::ScatterPlot casa::ColoredPlot casa::ErrorPlot casa::MaskedScatterPlot

List of all members.

Public Member Functions

 Plot ()
virtual ~Plot ()
virtual PlotDataPtr data () const =0
 ABSTRACT METHODS //.
virtual void dataChanged ()=0
 Should be called whenever the underlying PlotData has changed, to let the plot and its attached canvas know that the plot needs to be redrawn.
virtual bool linesShown () const =0
 It's likely that any plot subclass (scatter, bar, function, etc.) will have lines of some sort, so it's safe to have in the base class.
virtual void setLinesShown (bool linesShown=true)=0
 Sets whether or not lines are shown.
virtual PlotLinePtr line () const =0
 Returns a copy of the line used for this plot.
virtual void setLine (const PlotLine &line)=0
 Sets the plot lines to the given line.
virtual void setLine (const PlotLinePtr line)
 IMPLEMENTED METHODS //.
virtual void setLine (const String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
virtual void setLineColor (const String &color)
virtual void setLineStyle (PlotLine::Style style)
virtual void setLineWidth (double width)

Detailed Description

A Plot basically consists of data and customization information.

The data is held by the base class whereas any customization should be handled in subclasses.

Definition at line 42 of file Plot.h.


Constructor & Destructor Documentation

casa::Plot::Plot ( ) [inline]

Definition at line 44 of file Plot.h.

virtual casa::Plot::~Plot ( ) [inline, virtual]

Definition at line 46 of file Plot.h.


Member Function Documentation

virtual PlotDataPtr casa::Plot::data ( ) const [pure virtual]

ABSTRACT METHODS //.

Returns the data associated with this plot.

Implemented in casa::RasterPlot, casa::BarPlot, and casa::ScatterPlot.

virtual void casa::Plot::dataChanged ( ) [pure virtual]

Should be called whenever the underlying PlotData has changed, to let the plot and its attached canvas know that the plot needs to be redrawn.

virtual PlotLinePtr casa::Plot::line ( ) const [pure virtual]

Returns a copy of the line used for this plot.

Note: if lines are not shown, then this behavior is undefined. The last shown line can be returned, or a line with style NOLINE, or a null pointer, or....

Referenced by casa::ErrorPlot::setErrorLine(), casa::ErrorPlot::setErrorLineColor(), casa::ErrorPlot::setErrorLineStyle(), casa::ErrorPlot::setErrorLineWidth(), setLine(), setLineColor(), setLineStyle(), and setLineWidth().

virtual bool casa::Plot::linesShown ( ) const [pure virtual]

It's likely that any plot subclass (scatter, bar, function, etc.) will have lines of some sort, so it's safe to have in the base class.

Returns true if this plot has lines shown, false otherwise.

virtual void casa::Plot::setLine ( const PlotLine line) [pure virtual]

Sets the plot lines to the given line.

Implies setLinesShown(true) unless the given line's style is set to NOLINE.

Referenced by setLine(), setLineColor(), setLineStyle(), and setLineWidth().

virtual void casa::Plot::setLine ( const PlotLinePtr  line) [inline, virtual]

IMPLEMENTED METHODS //.

Convenience methods for setting line.

Definition at line 83 of file Plot.h.

References casa::SimpleCountedConstPtr< t >::null(), setLine(), and setLinesShown().

virtual void casa::Plot::setLine ( const String color,
PlotLine::Style  style = PlotLine::SOLID,
double  width = 1.0 
) [inline, virtual]
virtual void casa::Plot::setLineColor ( const String color) [inline, virtual]

Definition at line 96 of file Plot.h.

References line(), casa::PlotLine::setColor(), and setLine().

virtual void casa::Plot::setLinesShown ( bool  linesShown = true) [pure virtual]

Sets whether or not lines are shown.

If linesShown is true, the implementation can decide whether to choose the line style shown, or just use the last set PlotLine.

Referenced by setLine().

virtual void casa::Plot::setLineStyle ( PlotLine::Style  style) [inline, virtual]

Definition at line 101 of file Plot.h.

References line(), setLine(), and casa::PlotLine::setStyle().

virtual void casa::Plot::setLineWidth ( double  width) [inline, virtual]

Definition at line 106 of file Plot.h.

References line(), setLine(), and casa::PlotLine::setWidth().


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