casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
casa::DTVisible Class Reference

Class providing draw style settings for visible DisplayTools. More...

#include <DTVisible.h>

Inheritance diagram for casa::DTVisible:
casa::MultiPolylineTool casa::MultiPolyTool casa::MultiPVTool casa::MultiRectTool casa::MWCCrosshairTool casa::MWCEllipseTool casa::MWCPannerTool casa::MWCPolylineTool casa::MWCPolyTool casa::MWCPositionVelocityTool casa::MWCRectTool casa::MWCRulerlineTool casa::SliceEH casa::WCCrosshairTool casa::WCPolyTool casa::WCRectTool

Public Member Functions

 DTVisible ()
 Default constructor. More...
 
virtual ~DTVisible ()
 Destructor. More...
 
virtual casacore::String drawColor () const
 Return the color to use. More...
 
virtual casacore::Int lineWidth () const
 Return the line width to use. More...
 
virtual casacore::Double doubleClickInterval () const
 Return the double click interval (in seconds). More...
 

Protected Member Functions

 DTVisible (const DTVisible &other)
 (Required) copy constructor. More...
 
DTVisibleoperator= (const DTVisible &other)
 (Required) copy assignment. More...
 

Private Attributes

casacore::String itsDrawColor
 Store the color to use here. More...
 
casacore::Int itsLineWidth
 Store the line width here. More...
 
casacore::Double itsDoubleClickInterval
 Store the double click interval (in seconds) here. More...
 

Detailed Description

Class providing draw style settings for visible DisplayTools.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

"DTVisible" is a contraction and concatenation of "DisplayTool" and "Visible", and provides additional interface features describing drawing options for visible DisplayTools.

Synopsis

The purpose of this class is to store and provide information describing drawing settings for DisplayTools which will need to draw on a PixelCanvas or WorldCanvas. Presently it only stores the drawing color and line width, and double click interval, but it will probably grow into something more sophisticated. The settings are taken from the users .aipsrc file as follows:

display.controls.color

Either a named color (eg. red) can be given, or the individual red, green and blue components specified in hexadecimal (eg. #f0f033). The default color is orange.

display.controls.linewidth

An integer should be given specifying the line width to use when drawing DisplayTools. The default value is one.

display.controls.doubleclickinterval

A real number specifying the time interval in seconds, in which a double click will be deemed to have occurred. The default value is 0.5 seconds.

Example

Motivation

Since many PixelCanvas- and WorldCanvas-based tools (derived from PCTool and WCTool respectively) will need to draw on the canvas, it makes sense to unify their selection of drawing color and style in one place: this class.

Thrown Exceptions

.

Definition at line 95 of file DTVisible.h.

Constructor & Destructor Documentation

casa::DTVisible::DTVisible ( )

Default constructor.

virtual casa::DTVisible::~DTVisible ( )
virtual

Destructor.

casa::DTVisible::DTVisible ( const DTVisible other)
protected

(Required) copy constructor.

Member Function Documentation

virtual casacore::Double casa::DTVisible::doubleClickInterval ( ) const
inlinevirtual

Return the double click interval (in seconds).

Definition at line 116 of file DTVisible.h.

References itsDoubleClickInterval.

virtual casacore::String casa::DTVisible::drawColor ( ) const
inlinevirtual

Return the color to use.

Definition at line 106 of file DTVisible.h.

References itsDrawColor.

virtual casacore::Int casa::DTVisible::lineWidth ( ) const
inlinevirtual

Return the line width to use.

Definition at line 111 of file DTVisible.h.

References itsLineWidth.

DTVisible& casa::DTVisible::operator= ( const DTVisible other)
protected

(Required) copy assignment.

Member Data Documentation

casacore::Double casa::DTVisible::itsDoubleClickInterval
private

Store the double click interval (in seconds) here.

Definition at line 137 of file DTVisible.h.

Referenced by doubleClickInterval().

casacore::String casa::DTVisible::itsDrawColor
private

Store the color to use here.

Definition at line 131 of file DTVisible.h.

Referenced by drawColor().

casacore::Int casa::DTVisible::itsLineWidth
private

Store the line width here.

Definition at line 134 of file DTVisible.h.

Referenced by lineWidth().


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