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::PlotAnnotation Class Referenceabstract

PlotAnnotation is an abstraction of text written directly on the canvas. More...

#include <PlotAnnotation.h>

Inheritance diagram for casa::PlotAnnotation:
casa::PlotItem

Public Member Functions

 PlotAnnotation ()
 Constructor. More...
 
virtual ~PlotAnnotation ()
 Destructor. More...
 
virtual unsigned int drawCount () const
 Implements PlotItem::drawCount(). More...
 
virtual casacore::String text () const =0
 ABSTRACT METHODS //. More...
 
virtual void setText (const casacore::String &newText)=0
 Sets the text of the annotation. More...
 
virtual PlotFontPtr font () const =0
 Returns a copy of the font used in the annotation. More...
 
virtual void setFont (const PlotFont &font)=0
 Sets the annotation font to the given. More...
 
virtual int orientation () const =0
 Returns orientation in counterclockwise degrees (between 0 and 360). More...
 
virtual void setOrientation (int orientation)=0
 Sets the orientation in counterclockwise degrees (between 0 and 360). More...
 
virtual PlotCoordinate coordinate () const =0
 Returns the coordinate where the annotation is located on the canvas it is attached to. More...
 
virtual void setCoordinate (const PlotCoordinate &coord)=0
 Sets the location of the annotation to the given. More...
 
virtual bool outlineShown () const =0
 Returns true if an outline is shown around the annotation, false otherwise. More...
 
virtual void setOutlineShown (bool show=true)=0
 Sets whether an outline is shown around the annotation. More...
 
virtual PlotLinePtr outline () const =0
 Returns a copy of the line used to draw the outline for this annotation. More...
 
virtual void setOutline (const PlotLine &line)=0
 Sets the outline to the given line. More...
 
virtual PlotAreaFillPtr background () const =0
 Returns a copy of the area fill used for the annotation's background. More...
 
virtual void setBackground (const PlotAreaFill &area)=0
 Sets the annotation's background to the given. More...
 
virtual void setFont (const PlotFontPtr font)
 IMPLEMENTED METHODS //. More...
 
virtual void setFontColor (const casacore::String &color)
 
virtual void setOutline (const PlotLinePtr line)
 Convenience methods for setting the outline. More...
 
virtual void setOutline (const casacore::String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
 
virtual void setBackground (const PlotAreaFillPtr area)
 Convenience methods for setting the background. More...
 
virtual void setBackground (const casacore::String &color, PlotAreaFill::Pattern pattern=PlotAreaFill::FILL)
 
- 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 drawSegments (unsigned int segmentThreshold) const
 Returns the number of draw segments for this item, using the given segment threshold. More...
 

Detailed Description

PlotAnnotation is an abstraction of text written directly on the canvas.

An annotation has text, font, orientation, outline, and background properties.

Definition at line 38 of file PlotAnnotation.h.

Constructor & Destructor Documentation

casa::PlotAnnotation::PlotAnnotation ( )
inline

Constructor.

Definition at line 41 of file PlotAnnotation.h.

virtual casa::PlotAnnotation::~PlotAnnotation ( )
inlinevirtual

Destructor.

Definition at line 44 of file PlotAnnotation.h.

Member Function Documentation

virtual PlotAreaFillPtr casa::PlotAnnotation::background ( ) const
pure virtual

Returns a copy of the area fill used for the annotation's background.

Referenced by setBackground().

virtual PlotCoordinate casa::PlotAnnotation::coordinate ( ) const
pure virtual

Returns the coordinate where the annotation is located on the canvas it is attached to.

virtual unsigned int casa::PlotAnnotation::drawCount ( ) const
inlinevirtual

Implements PlotItem::drawCount().

Provides default implementation that returns 1.

Implements casa::PlotItem.

Definition at line 49 of file PlotAnnotation.h.

virtual PlotFontPtr casa::PlotAnnotation::font ( ) const
pure virtual

Returns a copy of the font used in the annotation.

Referenced by setFontColor().

virtual int casa::PlotAnnotation::orientation ( ) const
pure virtual

Returns orientation in counterclockwise degrees (between 0 and 360).

virtual PlotLinePtr casa::PlotAnnotation::outline ( ) const
pure virtual

Returns a copy of the line used to draw the outline for this annotation.

Referenced by setOutline().

virtual bool casa::PlotAnnotation::outlineShown ( ) const
pure virtual

Returns true if an outline is shown around the annotation, false otherwise.

virtual void casa::PlotAnnotation::setBackground ( const PlotAreaFill area)
pure virtual

Sets the annotation's background to the given.

Referenced by setBackground().

virtual void casa::PlotAnnotation::setBackground ( const PlotAreaFillPtr  area)
inlinevirtual

Convenience methods for setting the background.

Definition at line 129 of file PlotAnnotation.h.

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

virtual void casa::PlotAnnotation::setBackground ( const casacore::String color,
PlotAreaFill::Pattern  pattern = PlotAreaFill::FILL 
)
inlinevirtual

Definition at line 131 of file PlotAnnotation.h.

References background(), casacore::pattern(), and setBackground().

virtual void casa::PlotAnnotation::setCoordinate ( const PlotCoordinate &  coord)
pure virtual

Sets the location of the annotation to the given.

virtual void casa::PlotAnnotation::setFont ( const PlotFont font)
pure virtual

Sets the annotation font to the given.

Referenced by setFont(), and setFontColor().

virtual void casa::PlotAnnotation::setFont ( const PlotFontPtr  font)
inlinevirtual

IMPLEMENTED METHODS //.

Convenience methods for setting font.

Definition at line 102 of file PlotAnnotation.h.

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

virtual void casa::PlotAnnotation::setFontColor ( const casacore::String color)
inlinevirtual

Definition at line 104 of file PlotAnnotation.h.

References font(), and setFont().

virtual void casa::PlotAnnotation::setOrientation ( int  orientation)
pure virtual

Sets the orientation in counterclockwise degrees (between 0 and 360).

virtual void casa::PlotAnnotation::setOutline ( const PlotLine line)
pure virtual

Sets the outline to the given line.

Referenced by setOutline().

virtual void casa::PlotAnnotation::setOutline ( const PlotLinePtr  line)
inlinevirtual

Convenience methods for setting the outline.

Definition at line 113 of file PlotAnnotation.h.

References casacore::CountedPtr< T >::null(), setOutline(), and setOutlineShown().

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

Definition at line 117 of file PlotAnnotation.h.

References outline(), and setOutline().

virtual void casa::PlotAnnotation::setOutlineShown ( bool  show = true)
pure virtual

Sets whether an outline is shown around the annotation.

Referenced by setOutline().

virtual void casa::PlotAnnotation::setText ( const casacore::String newText)
pure virtual

Sets the text of the annotation.

virtual casacore::String casa::PlotAnnotation::text ( ) const
pure virtual

ABSTRACT METHODS //.

Returns the text of the annotation.


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