casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::Plot Class Referenceabstract

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

Public Member Functions

 Plot ()
 
virtual ~Plot ()
 
virtual PlotDataPtr data () const =0
 ABSTRACT METHODS //. More...
 
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. More...
 
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. More...
 
virtual void setLinesShown (bool linesShown=true)=0
 Sets whether or not lines are shown. More...
 
virtual PlotLinePtr line () const =0
 Returns a copy of the line used for this plot. More...
 
virtual void setLine (const PlotLine &line)=0
 Sets the plot lines to the given line. More...
 
virtual void setLine (const PlotLinePtr line)
 IMPLEMENTED METHODS //. More...
 
virtual void setLine (const casacore::String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
 
virtual void setLineColor (const casacore::String &color)
 
virtual void setLineStyle (PlotLine::Style style)
 
virtual void setLineWidth (double width)
 
- Public Member Functions inherited from casa::PlotItem
 PlotItem ()
 Constructor. More...
 
virtual ~PlotItem ()
 Destructor. More...
 
virtual PlotCanvascanvas () const =0
 Returns the canvas this item is currently attached to, or NULL for none. More...
 
virtual casacore::String title () const =0
 Returns a human-readable title for identification. More...
 
virtual void setTitle (const casacore::String &newTitle)=0
 Sets this items's title to the given. More...
 
virtual bool isValid () const =0
 Returns true if this item is valid, false otherwise. More...
 
virtual bool isQWidget () const =0
 Returns whether this item can be directly casted to a QWidget or not. More...
 
virtual PlotAxis xAxis () const =0
 Returns the item's axes. More...
 
virtual PlotAxis yAxis () const =0
 
virtual void setXAxis (PlotAxis x)=0
 Sets the item's axes. More...
 
virtual void setYAxis (PlotAxis y)=0
 
virtual void setAxes (PlotAxis x, PlotAxis y)
 Sets both the item's axes at once. More...
 
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. More...
 
virtual unsigned int drawSegments (unsigned int segmentThreshold) const
 Returns the number of draw segments for this item, using the given segment threshold. More...
 

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 40 of file Plot.h.

Constructor & Destructor Documentation

casa::Plot::Plot ( )
inline

Definition at line 42 of file Plot.h.

virtual casa::Plot::~Plot ( )
inlinevirtual

Definition at line 44 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)
inlinevirtual

IMPLEMENTED METHODS //.

Convenience methods for setting line.

Definition at line 81 of file Plot.h.

References casacore::CountedPtr< T >::null(), setLine(), and setLinesShown().

virtual void casa::Plot::setLine ( const casacore::String color,
PlotLine::Style  style = PlotLine::SOLID,
double  width = 1.0 
)
inlinevirtual

Definition at line 85 of file Plot.h.

References line(), and setLine().

virtual void casa::Plot::setLineColor ( const casacore::String color)
inlinevirtual

Definition at line 94 of file Plot.h.

References line(), 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)
inlinevirtual

Definition at line 99 of file Plot.h.

References line(), and setLine().

virtual void casa::Plot::setLineWidth ( double  width)
inlinevirtual

Definition at line 104 of file Plot.h.

References line(), and setLine().


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