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

Abstraction for the interface between the client (possibly a GUI) and the model (plot engine) that is performing the work. More...

#include <Client.h>

Inheritance diagram for casa::Client:
casa::ClientScript casa::PlotMSPlotter

Public Member Functions

virtual bool isActionEnabled (PlotMSAction::Type type) const =0
 Returns whether or not the user can invoke a particular action. More...
 
virtual std::vector< PlotMSPlot * > getCurrentPlots () const =0
 Return the current client plot. More...
 
virtual std::vector
< std::vector< PMS::Axis > > 
getSelectedLoadAxes () const =0
 Retrieve the plot load axes the user has specified. More...
 
virtual std::vector
< std::vector< PMS::Axis > > 
getSelectedReleaseAxes () const =0
 Retrieve the release axes the user has specified. More...
 
virtual PlotMSFlagging getFlagging () const =0
 Retrieve flagging information specified by the client. More...
 
virtual void setCommonAxes (bool commonX, bool commonY)
 In the case of a grid of plots whether to use common x- or y- axes. More...
 
virtual bool isCommonAxisX () const
 
virtual bool isCommonAxisY () const
 
virtual void setAxisLocation (PlotAxis locationX, PlotAxis locationY)
 
virtual PlotAxis getAxisLocationX () const
 
virtual PlotAxis getAxisLocationY () const
 
virtual std::vector
< casacore::String
getFiles () const =0
 Return a list of files loaded in the client. More...
 
virtual void setFlagging (PlotMSFlagging flag)=0
 Flagging. More...
 
virtual bool isInteractive () const =0
 Return whether the client is interactive (a GUI) or noninteractive (a script) More...
 
virtual bool exportToFormat (const PlotExportFormat &format)
 
virtual bool exportPlot (const PlotExportFormat &format, const bool async)=0
 Save the current plot to a file. More...
 
virtual void showError (const casacore::String &message, const casacore::String &title, bool isWarning)=0
 Display an error in a client dependent way. More...
 
virtual void showMessage (const casacore::String &message, const casacore::String &title, bool warning=false)=0
 Display a message. More...
 
virtual void clearMessage ()=0
 
virtual void setCanvasCachedAxesStackImageSize (int width, int height)
 
virtual PlotterPtr getPlotter ()
 Get the abstraction that holds the plots. More...
 
virtual void setAnnotationModeActive (PlotMSAction::Type, bool)
 Use to enable annotations in the GUI client. More...
 
virtual PlotSymbolPtr createSymbol (const PlotSymbolPtr &copy)
 Ask the client to make a deep copy of the given plot symbol. More...
 
virtual PlotSymbolPtr createSymbol (const casacore::String &descriptor, casacore::Int size, const casacore::String &color, const casacore::String &fillPattern, bool outline)
 Ask the client to make a symbol with the given specifications for insertion into the plot. More...
 
virtual PlotLoggerPtr getLogger ()
 Logging is client (implementation) specific so that client needs to be asked for the logger. More...
 
virtual void canvasAdded (PlotCanvasPtr &canvas)=0
 Add a plot to those displayed. More...
 
virtual bool isVisible (PlotCanvasPtr &canvas)
 Is the plot visible? More...
 
virtual void doThreadedOperation (ThreadController *controller)=0
 The client is responsible for doing threaded operations. More...
 
virtual ThreadControllergetThreadController (PlotMSAction::Type type, PMSPTMethod postThreadMethod=NULL, PlotMSPlot *postThreadObject=NULL, int index=0)=0
 FactoryMethod for producing a thread controller to manage a specific type of threaded operation. More...
 
virtual std::vector
< PlotCanvasPtr
currentCanvases ()
 
virtual void holdDrawing ()
 Keeps resizes from flooding event loop (dragging). More...
 
virtual void releaseDrawing ()
 
virtual bool allDrawingHeld () const
 
virtual void setOperationCompleted (bool completed)
 
virtual bool plot ()=0
 
virtual void showGUI (bool show=true)=0
 
virtual int showAndExec (bool show=true)
 
virtual int execLoop ()=0
 
virtual bool guiShown () const =0
 
virtual bool close ()=0
 
virtual bool isDrawing () const =0
 
virtual bool isClosed () const =0
 
virtual PlotFactoryPtr getPlotFactory ()
 
virtual void gridSizeChanged (int, int)=0
 

Protected Member Functions

 Client ()
 
virtual ~Client ()
 

Protected Attributes

PlotterPtr itsPlotter_
 Plotter. More...
 
PlotFactoryPtr itsFactory_
 Plot factory. More...
 

Detailed Description

Abstraction for the interface between the client (possibly a GUI) and the model (plot engine) that is performing the work.

Definition at line 45 of file Client.h.

Constructor & Destructor Documentation

casa::Client::Client ( )
inlineprotected

Definition at line 174 of file Client.h.

virtual casa::Client::~Client ( )
inlineprotectedvirtual

Definition at line 175 of file Client.h.

Member Function Documentation

virtual bool casa::Client::allDrawingHeld ( ) const
virtual
virtual void casa::Client::canvasAdded ( PlotCanvasPtr canvas)
pure virtual

Add a plot to those displayed.

Implemented in casa::ClientScript, and casa::PlotMSPlotter.

virtual void casa::Client::clearMessage ( )
pure virtual

Implemented in casa::ClientScript.

virtual bool casa::Client::close ( )
pure virtual

Implemented in casa::ClientScript.

virtual PlotSymbolPtr casa::Client::createSymbol ( const PlotSymbolPtr copy)
virtual

Ask the client to make a deep copy of the given plot symbol.

The client (and only the client) should have access to the PlotFactory that makes the plot components.

virtual PlotSymbolPtr casa::Client::createSymbol ( const casacore::String descriptor,
casacore::Int  size,
const casacore::String color,
const casacore::String fillPattern,
bool  outline 
)
virtual

Ask the client to make a symbol with the given specifications for insertion into the plot.

virtual std::vector<PlotCanvasPtr> casa::Client::currentCanvases ( )
virtual
virtual void casa::Client::doThreadedOperation ( ThreadController controller)
pure virtual

The client is responsible for doing threaded operations.

For a GUI client this will involve starting a background thread so that the GUI is not frozen. For a script client, this may be a no-opt as the script can just wait for the operation to complete.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual int casa::Client::execLoop ( )
pure virtual
virtual bool casa::Client::exportPlot ( const PlotExportFormat format,
const bool  async 
)
pure virtual

Save the current plot to a file.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual bool casa::Client::exportToFormat ( const PlotExportFormat format)
virtual
virtual PlotAxis casa::Client::getAxisLocationX ( ) const
virtual
virtual PlotAxis casa::Client::getAxisLocationY ( ) const
virtual
virtual std::vector<PlotMSPlot*> casa::Client::getCurrentPlots ( ) const
pure virtual

Return the current client plot.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual std::vector<casacore::String> casa::Client::getFiles ( ) const
pure virtual

Return a list of files loaded in the client.

Implemented in casa::ClientScript, and casa::PlotMSPlotter.

virtual PlotMSFlagging casa::Client::getFlagging ( ) const
pure virtual

Retrieve flagging information specified by the client.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

Referenced by casa::FlagActionUtil::flagRange(), and casa::FlagActionUtil::unflagRange().

virtual PlotLoggerPtr casa::Client::getLogger ( )
virtual

Logging is client (implementation) specific so that client needs to be asked for the logger.

virtual PlotFactoryPtr casa::Client::getPlotFactory ( )
virtual
virtual PlotterPtr casa::Client::getPlotter ( )
virtual

Get the abstraction that holds the plots.

virtual std::vector<std::vector<PMS::Axis> > casa::Client::getSelectedLoadAxes ( ) const
pure virtual

Retrieve the plot load axes the user has specified.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual std::vector<std::vector<PMS::Axis> > casa::Client::getSelectedReleaseAxes ( ) const
pure virtual

Retrieve the release axes the user has specified.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual ThreadController* casa::Client::getThreadController ( PlotMSAction::Type  type,
PMSPTMethod  postThreadMethod = NULL,
PlotMSPlot postThreadObject = NULL,
int  index = 0 
)
pure virtual

FactoryMethod for producing a thread controller to manage a specific type of threaded operation.

Examples include caching, exporting a plot, and drawing.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual void casa::Client::gridSizeChanged ( int  ,
int   
)
pure virtual
virtual bool casa::Client::guiShown ( ) const
pure virtual
virtual void casa::Client::holdDrawing ( )
virtual

Keeps resizes from flooding event loop (dragging).

virtual bool casa::Client::isActionEnabled ( PlotMSAction::Type  type) const
pure virtual

Returns whether or not the user can invoke a particular action.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual bool casa::Client::isClosed ( ) const
pure virtual
virtual bool casa::Client::isCommonAxisX ( ) const
virtual
virtual bool casa::Client::isCommonAxisY ( ) const
virtual
virtual bool casa::Client::isDrawing ( ) const
pure virtual
virtual bool casa::Client::isInteractive ( ) const
pure virtual

Return whether the client is interactive (a GUI) or noninteractive (a script)

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual bool casa::Client::isVisible ( PlotCanvasPtr canvas)
virtual

Is the plot visible?

virtual bool casa::Client::plot ( )
pure virtual
virtual void casa::Client::releaseDrawing ( )
virtual
virtual void casa::Client::setAnnotationModeActive ( PlotMSAction::Type  ,
bool   
)
inlinevirtual

Use to enable annotations in the GUI client.

Reimplemented in casa::PlotMSPlotter.

Definition at line 109 of file Client.h.

virtual void casa::Client::setAxisLocation ( PlotAxis  locationX,
PlotAxis  locationY 
)
virtual
virtual void casa::Client::setCanvasCachedAxesStackImageSize ( int  width,
int  height 
)
virtual
virtual void casa::Client::setCommonAxes ( bool  commonX,
bool  commonY 
)
virtual

In the case of a grid of plots whether to use common x- or y- axes.

virtual void casa::Client::setFlagging ( PlotMSFlagging  flag)
pure virtual

Flagging.

Implemented in casa::PlotMSPlotter, and casa::ClientScript.

virtual void casa::Client::setOperationCompleted ( bool  completed)
virtual

Reimplemented in casa::ClientScript.

virtual int casa::Client::showAndExec ( bool  show = true)
virtual
virtual void casa::Client::showError ( const casacore::String message,
const casacore::String title,
bool  isWarning 
)
pure virtual

Display an error in a client dependent way.

For a GUI, this may mean popping up a dialog; for a script, this may mean writing the error to a log file or web log.

Implemented in casa::ClientScript.

virtual void casa::Client::showGUI ( bool  show = true)
pure virtual
virtual void casa::Client::showMessage ( const casacore::String message,
const casacore::String title,
bool  warning = false 
)
pure virtual

Display a message.

For a GUI client, this may mean popping up a dialog; for a script client, this may mean writing the message to a log file or a web log.

Implemented in casa::ClientScript.

Member Data Documentation

PlotFactoryPtr casa::Client::itsFactory_
protected

Plot factory.

Definition at line 172 of file Client.h.

Referenced by casa::ClientScript::execLoop().

PlotterPtr casa::Client::itsPlotter_
protected

Plotter.

Definition at line 170 of file Client.h.


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