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

Canvas for data plotting using a given plotting implementation. More...

#include <TBPlotCanvas.qo.h>

Inheritance diagram for casa::TBPlotCanvas:
casa::PlotSelectEventHandler

Public Slots

void clearAndHideAxes ()
 Clears all current plots and hides the two axes. More...
 

Signals

void regionSelected (bool selected)
 Signal that is emitted whenever the user selects a region, or the currently selected region is cleared. More...
 

Public Member Functions

 TBPlotCanvas (PlotFactoryPtr factory)
 Constructor with a factory. More...
 
 ~TBPlotCanvas ()
 
void setXAxisTitle (casacore::String title)
 Sets the X-axis title to the given String. More...
 
void setYAxisTitle (casacore::String title)
 Sets the Y-axis title to the given String. More...
 
void setShownGrids (bool xMaj, bool xMin, bool yMaj, bool yMin)
 Sets which grids are shown on the canvas. More...
 
void setXAxisDate (bool date=true, bool mjsec=true)
 Sets the x axis to display values as dates. More...
 
void setYAxisDate (bool date=true, bool mjsec=true)
 Sets the y axis to display values as dates. More...
 
casacore::String getCurrentTable ()
 Returns the name of the current table being plotted. More...
 
void setTable (casacore::String table)
 Sets the name of the current table being plotted. More...
 
int getNumPlots ()
 Returns the current number of plots currently on the canvas. More...
 
std::vector< TBPlotData * > allData ()
 Returns the data corresponding to the current plots. More...
 
void handleSelect (const PlotSelectEvent &event)
 Implements PlotSelectEventHandler::handleSelect(). More...
 
void plot (TBPlotData *data, const TBPlotFormat &format, bool overplot=false)
 Plots the given data. More...
 
Result exportToImage (casacore::String format, casacore::String location)
 Exports the PlotCanvas to an image in the given format at the given location and returns whether the operation succeeded or not. More...
 
void clearSelectedRectangle ()
 If there is a rectangle shape from a user-selected region, clear it from the canvas. More...
 
PlotRegion currentSelection ()
 If there is a current user-selected region, return it. More...
 
- Public Member Functions inherited from casa::PlotSelectEventHandler
 PlotSelectEventHandler ()
 
virtual ~PlotSelectEventHandler ()
 

Private Slots

void clearPlots ()
 Slot for clearing all the internal tracking of current plots. More...
 

Private Attributes

PlotFactoryPtr factory
 Plotter factory. More...
 
PlotterPtr plotter
 Plotter. More...
 
PlotCanvasPtr canvas
 Plot canvas. More...
 
casacore::String currentTable
 Holds the name of the current table being plotted. More...
 
PlotShapeRectanglePtr selectedRegion
 Currently selected region, or NULL if there is none. More...
 
std::vector< TBPlotData * > data
 Current data. More...
 

Detailed Description

Canvas for data plotting using a given plotting implementation.

Synopsis

TBPlotCanvas uses and controls a plotting implementation canvas. If the implementation is Qt, it is embedded in the TBPlotCanvas; otherwise it is assumed to be in a separate window.

Definition at line 108 of file TBPlotCanvas.qo.h.

Constructor & Destructor Documentation

casa::TBPlotCanvas::TBPlotCanvas ( PlotFactoryPtr  factory)

Constructor with a factory.

casa::TBPlotCanvas::~TBPlotCanvas ( )

Member Function Documentation

std::vector<TBPlotData*> casa::TBPlotCanvas::allData ( )

Returns the data corresponding to the current plots.

void casa::TBPlotCanvas::clearAndHideAxes ( )
slot

Clears all current plots and hides the two axes.

void casa::TBPlotCanvas::clearPlots ( )
privateslot

Slot for clearing all the internal tracking of current plots.

void casa::TBPlotCanvas::clearSelectedRectangle ( )

If there is a rectangle shape from a user-selected region, clear it from the canvas.

PlotRegion casa::TBPlotCanvas::currentSelection ( )

If there is a current user-selected region, return it.

Otherwise behavior is undefined.

Result casa::TBPlotCanvas::exportToImage ( casacore::String  format,
casacore::String  location 
)

Exports the PlotCanvas to an image in the given format at the given location and returns whether the operation succeeded or not.

casacore::String casa::TBPlotCanvas::getCurrentTable ( )

Returns the name of the current table being plotted.

int casa::TBPlotCanvas::getNumPlots ( )

Returns the current number of plots currently on the canvas.

void casa::TBPlotCanvas::handleSelect ( const PlotSelectEvent event)
virtual
void casa::TBPlotCanvas::plot ( TBPlotData data,
const TBPlotFormat format,
bool  overplot = false 
)

Plots the given data.

If overplot is true all old plots are kept as well, otherwise the old plots are cleared first. See PlotCanvas::plot().

void casa::TBPlotCanvas::regionSelected ( bool  selected)
signal

Signal that is emitted whenever the user selects a region, or the currently selected region is cleared.

If selected is true, then the user selected a region and a rectangle is now on the canvas. If selected is false, then there is no longer a current selected region.

void casa::TBPlotCanvas::setShownGrids ( bool  xMaj,
bool  xMin,
bool  yMaj,
bool  yMin 
)

Sets which grids are shown on the canvas.

void casa::TBPlotCanvas::setTable ( casacore::String  table)

Sets the name of the current table being plotted.

void casa::TBPlotCanvas::setXAxisDate ( bool  date = true,
bool  mjsec = true 
)

Sets the x axis to display values as dates.

void casa::TBPlotCanvas::setXAxisTitle ( casacore::String  title)

Sets the X-axis title to the given String.

void casa::TBPlotCanvas::setYAxisDate ( bool  date = true,
bool  mjsec = true 
)

Sets the y axis to display values as dates.

void casa::TBPlotCanvas::setYAxisTitle ( casacore::String  title)

Sets the Y-axis title to the given String.

Member Data Documentation

PlotCanvasPtr casa::TBPlotCanvas::canvas
private

Plot canvas.

Definition at line 187 of file TBPlotCanvas.qo.h.

casacore::String casa::TBPlotCanvas::currentTable
private

Holds the name of the current table being plotted.

Definition at line 190 of file TBPlotCanvas.qo.h.

std::vector<TBPlotData*> casa::TBPlotCanvas::data
private

Current data.

Definition at line 196 of file TBPlotCanvas.qo.h.

PlotFactoryPtr casa::TBPlotCanvas::factory
private

Plotter factory.

Definition at line 181 of file TBPlotCanvas.qo.h.

PlotterPtr casa::TBPlotCanvas::plotter
private

Plotter.

Definition at line 184 of file TBPlotCanvas.qo.h.

PlotShapeRectanglePtr casa::TBPlotCanvas::selectedRegion
private

Currently selected region, or NULL if there is none.

Definition at line 193 of file TBPlotCanvas.qo.h.


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