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::PlotMSApp Class Reference

Controller class for plotms. More...

#include <PlotMS.h>

Inheritance diagram for casa::PlotMSApp:
casa::PlotMSParametersWatcher casa::PlotEngine

Public Member Functions

 PlotMSApp (bool connectToDBus=false, bool userGui=true)
 Default constructor that uses default options. More...
 
 PlotMSApp (const PlotMSParameters &params, bool connectToDBus=false, bool userGui=true)
 Constructor which takes the given parameters. More...
 
 ~PlotMSApp ()
 Destructor. More...
 
virtual void showGUI (bool show=true)
 Plotter Methods //. More...
 
virtual bool guiShown () const
 See PlotMSPlotter::guiShown(). More...
 
int execLoop ()
 See PlotMSPlotter::execLoop(). More...
 
int showAndExec (bool show=true)
 See PlotMSPlotter::showAndExec(). More...
 
void close ()
 See PlotMSPlotter::close(). More...
 
virtual void clearPlots ()
 Remove existing plots. More...
 
void showError (const casacore::String &message, const casacore::String &title="PlotMS Error", bool isWarning=false)
 See PlotMSPlotter::showError(). More...
 
void showWarning (const casacore::String &message, const casacore::String &title="PlotMS Warning")
 
void clearMessage ()
 
void showMessage (const casacore::String &message, const casacore::String &title="PlotMS Message")
 See PlotMSPlotter::showMessage(). More...
 
void setAnnotationModeActive (PlotMSAction::Type type, bool active)
 Enable/disable annotations in the client. More...
 
void resetTools ()
 Enables/disables tool settings on the canvases based on GUI settings. More...
 
virtual PlotMSParametersgetParameters ()
 Parameter Methods //. More...
 
void setParameters (const PlotMSParameters &params)
 
virtual PlotMSExportParamgetExportParameters ()
 Gets/Sets the export parameters for this PlotMS. More...
 
void setExportParameters (const PlotMSExportParam &params)
 
PlotExportFormat getExportFormat ()
 
void setExportFormat (const PlotExportFormat format)
 
void parametersHaveChanged (const PlotMSWatchedParameters &params, int updateFlag)
 Implements PlotMSParametersWatcher::parametersHaveChanged(). More...
 
virtual PlotSymbolPtr createSymbol (const casacore::String &descriptor, casacore::Int size, const casacore::String &color, const casacore::String &fillPattern, bool outline)
 Symbols. More...
 
PlotSymbolPtr createSymbol (const PlotSymbolPtr &copy)
 
virtual PlotLoggerPtr getLogger ()
 Logger Methods //. More...
 
virtual PlotMSPlotManagergetPlotManager ()
 Plot Management Methods //. More...
 
PlotMSPlotaddOverPlot (const PlotMSPlotParameters *p=NULL)
 See PlotMSPlotManager::addOverPlot();. More...
 
virtual bool isDrawing () const
 
bool isClosed () const
 
void setOperationCompleted (bool completed)
 Set whether the latest plot update was successful completed. More...
 
bool save (const PlotExportFormat &format)
 save plot to file using specified format. More...
 
virtual PlotFactoryPtr getPlotFactory ()
 PlotEngine methods. More...
 
virtual void quitApplication ()
 
virtual PlotMSFlagging getFlagging () const
 
virtual void setFlagging (PlotMSFlagging flag)
 
void canvasAdded (PlotCanvasPtr canvas)
 
bool isVisible (PlotCanvasPtr &canvas)
 
bool exportToFormat (const PlotExportFormat &format)
 
virtual casacore::Record locateInfo (casacore::Bool &success, casacore::String &errorMessage)
 
bool isOperationCompleted () const
 Returns whether or not the latest plot update completed successfully. More...
 
PlotterPtr getPlotter ()
 
virtual void allowPopups (bool allow=true)
 To allow normal error/warning/info popups, which block execution, or, if not, prevent blocking by writing to the Logger and posting text to a status bar (or other visible gui element TBD) More...
 
bool popupsAllowed ()
 
bool updateCachePlot (PlotMSPlot *plot, void(*f)(void *, bool), bool setupPlot)
 
void setCommonAxes (bool commonX, bool commonY)
 
bool isCommonAxisX () const
 
bool isCommonAxisY () const
 
void setAxisLocation (PlotAxis locationX, PlotAxis locationY)
 
PlotAxis getAxisLocationX () const
 
PlotAxis getAxisLocationY () const
 
std::vector< casacore::StringgetFiles () const
 
- Public Member Functions inherited from casa::PlotMSParametersWatcher
 PlotMSParametersWatcher ()
 Constructor. More...
 
virtual ~PlotMSParametersWatcher ()
 Destructor. More...
 

Private Member Functions

void initialize (bool connectToDBus, bool userGui)
 Initializes a new PlotMS object, to be called from constructor. More...
 
 PlotMSApp (const PlotMSApp &copy)
 Disable copy constructor and operator for now. More...
 
PlotMSAppoperator= (const PlotMSApp &copy)
 

Private Attributes

ClientitsPlotter_
 Plotter, Script or GUI. More...
 
ClientitsLastPlotter_
 
bool isGUI_
 
bool allow_popups
 
PlotMSParameters itsParameters_
 Current parameters. More...
 
PlotMSExportParam itsExportParameters_
 
PlotExportFormat itsExportFormat
 
PlotLoggerPtr itsLogger_
 Logger. More...
 
PlotMSPlotManager itsPlotManager_
 Plot manager. More...
 
PlotMSDBusAppitsDBus_
 DBus application, or NULL if one is not needed. More...
 
bool operationCompleted
 Whether the most recent plot updated was successfully completed. More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::PlotEngine
 PlotEngine ()
 
virtual ~PlotEngine ()
 

Detailed Description

Controller class for plotms.

Handles interactions between the UI and plots.

Definition at line 55 of file PlotMS.h.

Constructor & Destructor Documentation

casa::PlotMSApp::PlotMSApp ( bool  connectToDBus = false,
bool  userGui = true 
)

Default constructor that uses default options.

If connectToDBus is true, then the application registers itself with CASA's DBus server using the PlotMSDBusApp::dbusName() with the current process ID.

casa::PlotMSApp::PlotMSApp ( const PlotMSParameters params,
bool  connectToDBus = false,
bool  userGui = true 
)

Constructor which takes the given parameters.

If connectToDBus is true, then the application registers itself with CASA's DBus server using the PlotMSDBusApp::dbusName() with the current process ID.

casa::PlotMSApp::~PlotMSApp ( )

Destructor.

casa::PlotMSApp::PlotMSApp ( const PlotMSApp copy)
private

Disable copy constructor and operator for now.

Member Function Documentation

PlotMSPlot* casa::PlotMSApp::addOverPlot ( const PlotMSPlotParameters p = NULL)
virtual
virtual void casa::PlotMSApp::allowPopups ( bool  allow = true)
inlinevirtual

To allow normal error/warning/info popups, which block execution, or, if not, prevent blocking by writing to the Logger and posting text to a status bar (or other visible gui element TBD)

Implements casa::PlotEngine.

Definition at line 186 of file PlotMS.h.

References allow_popups.

void casa::PlotMSApp::canvasAdded ( PlotCanvasPtr  canvas)
void casa::PlotMSApp::clearMessage ( )
virtual void casa::PlotMSApp::clearPlots ( )
virtual

Remove existing plots.

Implements casa::PlotEngine.

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

Symbols.

Implements casa::PlotEngine.

PlotSymbolPtr casa::PlotMSApp::createSymbol ( const PlotSymbolPtr copy)
int casa::PlotMSApp::execLoop ( )
bool casa::PlotMSApp::exportToFormat ( const PlotExportFormat format)
PlotAxis casa::PlotMSApp::getAxisLocationX ( ) const
PlotAxis casa::PlotMSApp::getAxisLocationY ( ) const
PlotExportFormat casa::PlotMSApp::getExportFormat ( )
virtual PlotMSExportParam& casa::PlotMSApp::getExportParameters ( )
virtual

Gets/Sets the export parameters for this PlotMS.

Implements casa::PlotEngine.

std::vector<casacore::String> casa::PlotMSApp::getFiles ( ) const
virtual PlotMSFlagging casa::PlotMSApp::getFlagging ( ) const
virtual

Implements casa::PlotEngine.

virtual PlotLoggerPtr casa::PlotMSApp::getLogger ( )
virtual

Logger Methods //.

Gets the logger associated with this PlotMS.

Implements casa::PlotEngine.

virtual PlotMSParameters& casa::PlotMSApp::getParameters ( )
virtual

Parameter Methods //.

Gets/Sets the parameters for this PlotMS.

Implements casa::PlotEngine.

virtual PlotFactoryPtr casa::PlotMSApp::getPlotFactory ( )
virtual

PlotEngine methods.

Implements casa::PlotEngine.

virtual PlotMSPlotManager& casa::PlotMSApp::getPlotManager ( )
virtual

Plot Management Methods //.

Returns the PlotMSPlotManager associated with this PlotMS.

Implements casa::PlotEngine.

PlotterPtr casa::PlotMSApp::getPlotter ( )
virtual bool casa::PlotMSApp::guiShown ( ) const
virtual
void casa::PlotMSApp::initialize ( bool  connectToDBus,
bool  userGui 
)
private

Initializes a new PlotMS object, to be called from constructor.

bool casa::PlotMSApp::isClosed ( ) const
virtual

Implements casa::PlotEngine.

bool casa::PlotMSApp::isCommonAxisX ( ) const
bool casa::PlotMSApp::isCommonAxisY ( ) const
virtual bool casa::PlotMSApp::isDrawing ( ) const
virtual

Implements casa::PlotEngine.

bool casa::PlotMSApp::isOperationCompleted ( ) const
virtual

Returns whether or not the latest plot update completed successfully.

For example, if an invalid selection was made, the return value may be false.

Implements casa::PlotEngine.

bool casa::PlotMSApp::isVisible ( PlotCanvasPtr canvas)
virtual casacore::Record casa::PlotMSApp::locateInfo ( casacore::Bool success,
casacore::String errorMessage 
)
virtual

Implements casa::PlotEngine.

PlotMSApp& casa::PlotMSApp::operator= ( const PlotMSApp copy)
private
void casa::PlotMSApp::parametersHaveChanged ( const PlotMSWatchedParameters params,
int  updateFlag 
)
virtual
bool casa::PlotMSApp::popupsAllowed ( )
inlinevirtual

Implements casa::PlotEngine.

Definition at line 188 of file PlotMS.h.

References allow_popups.

virtual void casa::PlotMSApp::quitApplication ( )
virtual

Implements casa::PlotEngine.

void casa::PlotMSApp::resetTools ( )

Enables/disables tool settings on the canvases based on GUI settings.

bool casa::PlotMSApp::save ( const PlotExportFormat format)
virtual

save plot to file using specified format.

Implements casa::PlotEngine.

void casa::PlotMSApp::setAnnotationModeActive ( PlotMSAction::Type  type,
bool  active 
)

Enable/disable annotations in the client.

void casa::PlotMSApp::setAxisLocation ( PlotAxis  locationX,
PlotAxis  locationY 
)
void casa::PlotMSApp::setCommonAxes ( bool  commonX,
bool  commonY 
)
void casa::PlotMSApp::setExportFormat ( const PlotExportFormat  format)
void casa::PlotMSApp::setExportParameters ( const PlotMSExportParam params)
virtual void casa::PlotMSApp::setFlagging ( PlotMSFlagging  flag)
virtual

Implements casa::PlotEngine.

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

Set whether the latest plot update was successful completed.

This may not be the case if an invalid selection was made.

Implements casa::PlotEngine.

void casa::PlotMSApp::setParameters ( const PlotMSParameters params)
int casa::PlotMSApp::showAndExec ( bool  show = true)
void casa::PlotMSApp::showError ( const casacore::String message,
const casacore::String title = "PlotMS Error",
bool  isWarning = false 
)
virtual void casa::PlotMSApp::showGUI ( bool  show = true)
virtual

Plotter Methods //.

See PlotMSPlotter::showGUI().

Implements casa::PlotEngine.

void casa::PlotMSApp::showMessage ( const casacore::String message,
const casacore::String title = "PlotMS Message" 
)
void casa::PlotMSApp::showWarning ( const casacore::String message,
const casacore::String title = "PlotMS Warning" 
)
bool casa::PlotMSApp::updateCachePlot ( PlotMSPlot plot,
void(*)(void *, bool)  f,
bool  setupPlot 
)

Member Data Documentation

bool casa::PlotMSApp::allow_popups
private

Definition at line 204 of file PlotMS.h.

Referenced by allowPopups(), and popupsAllowed().

bool casa::PlotMSApp::isGUI_
private

Definition at line 203 of file PlotMS.h.

PlotMSDBusApp* casa::PlotMSApp::itsDBus_
private

DBus application, or NULL if one is not needed.

Definition at line 218 of file PlotMS.h.

PlotExportFormat casa::PlotMSApp::itsExportFormat
private

Definition at line 209 of file PlotMS.h.

PlotMSExportParam casa::PlotMSApp::itsExportParameters_
private

Definition at line 208 of file PlotMS.h.

Client* casa::PlotMSApp::itsLastPlotter_
private

Definition at line 202 of file PlotMS.h.

PlotLoggerPtr casa::PlotMSApp::itsLogger_
private

Logger.

Definition at line 212 of file PlotMS.h.

PlotMSParameters casa::PlotMSApp::itsParameters_
private

Current parameters.

Definition at line 207 of file PlotMS.h.

PlotMSPlotManager casa::PlotMSApp::itsPlotManager_
private

Plot manager.

Definition at line 215 of file PlotMS.h.

Client* casa::PlotMSApp::itsPlotter_
private

Plotter, Script or GUI.

Definition at line 201 of file PlotMS.h.

bool casa::PlotMSApp::operationCompleted
private

Whether the most recent plot updated was successfully completed.

A null selection, for example, could result in an unsuccessful update.

Definition at line 226 of file PlotMS.h.


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