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

Implementation of Client built for user scripting (non-GUI) user interface. More...

#include <ClientScript.h>

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

Public Member Functions

 ClientScript (PlotMSApp *app, Plotter::Implementation impl=Plotter::DEFAULT)
 
virtual ~ClientScript ()
 
virtual bool isActionEnabled (PlotMSAction::Type type) const
 Returns whether or not the user can invoke a particular action. More...
 
virtual std::vector< PlotMSPlot * > getCurrentPlots () const
 Return the current client plot. More...
 
virtual std::vector
< std::vector< PMS::Axis > > 
getSelectedLoadAxes () const
 Retrieve the plot load axes the user has specified. More...
 
virtual std::vector
< std::vector< PMS::Axis > > 
getSelectedReleaseAxes () const
 Retrieve the release axes the user has specified. More...
 
virtual PlotMSFlagging getFlagging () const
 Retrieve flagging information specified by the client. More...
 
virtual void setFlagging (PlotMSFlagging flag)
 Flagging. More...
 
virtual bool isInteractive () const
 Return whether the client is interactive (a GUI) or noninteractive (a script) More...
 
virtual bool exportPlot (const PlotExportFormat &format, const bool async)
 Save the current plot to a file. More...
 
virtual void showError (const casacore::String &message, const casacore::String &title, bool warning)
 Display an error in a client dependent way. More...
 
virtual void showMessage (const casacore::String &message, const casacore::String &title, bool warning=false)
 Display a message. More...
 
virtual void clearMessage ()
 only for GUI client More...
 
virtual void canvasAdded (PlotCanvasPtr &)
 Add a plot to those displayed. More...
 
virtual void setOperationCompleted (bool completed)
 
virtual void doThreadedOperation (ThreadController *)
 The client is responsible for doing threaded operations. More...
 
virtual ThreadControllergetThreadController (PlotMSAction::Type type, PMSPTMethod postThreadMethod=NULL, PlotMSPlot *postThreadObject=NULL, int index=0)
 FactoryMethod for producing a thread controller to manage a specific type of threaded operation. More...
 
virtual bool plot ()
 
virtual void showGUI (bool show=true)
 
virtual int execLoop ()
 
virtual bool guiShown () const
 
virtual bool close ()
 
virtual bool isDrawing () const
 
virtual bool isClosed () const
 
virtual void gridSizeChanged (int, int)
 
virtual std::vector
< casacore::String
getFiles () const
 Return a list of files loaded in the client. More...
 
- Public Member Functions inherited from casa::Client
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 bool exportToFormat (const PlotExportFormat &format)
 
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 bool isVisible (PlotCanvasPtr &canvas)
 Is the plot visible? 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 int showAndExec (bool show=true)
 
virtual PlotFactoryPtr getPlotFactory ()
 

Private Member Functions

void initializeCurrentPlot ()
 
void initialize (Plotter::Implementation impl)
 
void updatePlotterPageHeader ()
 

Private Attributes

PlotMSAppplotController
 
PlotMSFlagging flagging
 
std::vector< PlotMSPlot * > currentPlots
 
const casacore::String SCRIPT_CLIENT
 

Additional Inherited Members

- Protected Member Functions inherited from casa::Client
 Client ()
 
virtual ~Client ()
 
- Protected Attributes inherited from casa::Client
PlotterPtr itsPlotter_
 Plotter. More...
 
PlotFactoryPtr itsFactory_
 Plot factory. More...
 

Detailed Description

Implementation of Client built for user scripting (non-GUI) user interface.

Definition at line 43 of file ClientScript.h.

Constructor & Destructor Documentation

casa::ClientScript::ClientScript ( PlotMSApp app,
Plotter::Implementation  impl = Plotter::DEFAULT 
)
virtual casa::ClientScript::~ClientScript ( )
virtual

Member Function Documentation

virtual void casa::ClientScript::canvasAdded ( PlotCanvasPtr )
inlinevirtual

Add a plot to those displayed.

Implements casa::Client.

Definition at line 92 of file ClientScript.h.

virtual void casa::ClientScript::clearMessage ( )
inlinevirtual

only for GUI client

Implements casa::Client.

Definition at line 88 of file ClientScript.h.

virtual bool casa::ClientScript::close ( )
inlinevirtual

Implements casa::Client.

Definition at line 123 of file ClientScript.h.

virtual void casa::ClientScript::doThreadedOperation ( ThreadController )
inlinevirtual

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.

Implements casa::Client.

Definition at line 102 of file ClientScript.h.

virtual int casa::ClientScript::execLoop ( )
inlinevirtual

Implements casa::Client.

Definition at line 117 of file ClientScript.h.

References casa::Client::itsFactory_.

virtual bool casa::ClientScript::exportPlot ( const PlotExportFormat format,
const bool  async 
)
virtual

Save the current plot to a file.

Implements casa::Client.

virtual std::vector<PlotMSPlot*> casa::ClientScript::getCurrentPlots ( ) const
virtual

Return the current client plot.

Implements casa::Client.

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

Return a list of files loaded in the client.

Implements casa::Client.

virtual PlotMSFlagging casa::ClientScript::getFlagging ( ) const
virtual

Retrieve flagging information specified by the client.

Implements casa::Client.

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

Retrieve the plot load axes the user has specified.

Implements casa::Client.

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

Retrieve the release axes the user has specified.

Implements casa::Client.

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

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

Examples include caching, exporting a plot, and drawing.

Implements casa::Client.

virtual void casa::ClientScript::gridSizeChanged ( int  ,
int   
)
virtual

Implements casa::Client.

virtual bool casa::ClientScript::guiShown ( ) const
inlinevirtual

Implements casa::Client.

Definition at line 120 of file ClientScript.h.

void casa::ClientScript::initialize ( Plotter::Implementation  impl)
private
void casa::ClientScript::initializeCurrentPlot ( )
private
virtual bool casa::ClientScript::isActionEnabled ( PlotMSAction::Type  type) const
virtual

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

Implements casa::Client.

virtual bool casa::ClientScript::isClosed ( ) const
inlinevirtual

Implements casa::Client.

Definition at line 129 of file ClientScript.h.

virtual bool casa::ClientScript::isDrawing ( ) const
inlinevirtual

Implements casa::Client.

Definition at line 126 of file ClientScript.h.

virtual bool casa::ClientScript::isInteractive ( ) const
virtual

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

Implements casa::Client.

virtual bool casa::ClientScript::plot ( )
virtual

Implements casa::Client.

virtual void casa::ClientScript::setFlagging ( PlotMSFlagging  flag)
virtual

Flagging.

Implements casa::Client.

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

Reimplemented from casa::Client.

virtual void casa::ClientScript::showError ( const casacore::String message,
const casacore::String title,
bool  warning 
)
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.

Implements casa::Client.

virtual void casa::ClientScript::showGUI ( bool  show = true)
virtual

Implements casa::Client.

virtual void casa::ClientScript::showMessage ( const casacore::String message,
const casacore::String title,
bool  warning = false 
)
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.

Implements casa::Client.

void casa::ClientScript::updatePlotterPageHeader ( )
private

Member Data Documentation

std::vector<PlotMSPlot*> casa::ClientScript::currentPlots
private

Definition at line 142 of file ClientScript.h.

PlotMSFlagging casa::ClientScript::flagging
private

Definition at line 141 of file ClientScript.h.

PlotMSApp* casa::ClientScript::plotController
private

Definition at line 140 of file ClientScript.h.

const casacore::String casa::ClientScript::SCRIPT_CLIENT
private

Definition at line 144 of file ClientScript.h.


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