ClientScript.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef CLIENTSCRIPT_H_
00030 #define CLIENTSCRIPT_H_
00031
00032 #include <plotms/Client/Client.h>
00033 #include <plotms/Plots/PlotMSPlotParameters.h>
00034 namespace casa {
00035
00036 class PlotMSPlot;
00037 class PlotMSApp;
00038
00043 class ClientScript : public Client {
00044 public:
00045 ClientScript( PlotMSApp* app,Plotter::Implementation impl = Plotter::DEFAULT);
00046 virtual ~ClientScript();
00047
00048
00049 virtual bool isActionEnabled( PlotMSAction::Type type ) const;
00050
00051
00052 virtual vector<PlotMSPlot*> getCurrentPlots() const;
00053
00054
00055 virtual vector<vector<PMS::Axis> > getSelectedLoadAxes() const;
00056
00057
00058 virtual vector<vector<PMS::Axis> > getSelectedReleaseAxes() const;
00059
00060
00061 virtual PlotMSFlagging getFlagging() const;
00062 virtual void setFlagging(PlotMSFlagging flag);
00063
00064
00065
00066
00067
00068 virtual bool isInteractive() const;
00069
00070
00071
00072
00073
00074 virtual bool exportPlot(const PlotExportFormat& format, const bool async);
00075
00076
00077
00078
00079
00080 virtual void showError(const String& message, const String& title, bool warning );
00081
00082
00083
00084
00085 virtual void showMessage(const String& message, const String& title, bool warning = false);
00086
00087
00088 virtual void clearMessage() {};
00089
00090
00091
00092 virtual void canvasAdded( PlotCanvasPtr& ){
00093
00094 }
00095
00096 virtual void setOperationCompleted( bool completed );
00097
00098
00099
00100
00101
00102 virtual void doThreadedOperation( ThreadController* ){
00103
00104 }
00105
00106
00107
00108
00109 virtual ThreadController* getThreadController( PlotMSAction::Type type,
00110 PMSPTMethod postThreadMethod = NULL,
00111 PlotMSPlot* postThreadObject = NULL,
00112 int index = 0);
00113
00114 virtual bool plot();
00115 virtual void showGUI( bool show = true);
00116
00117 virtual int execLoop() {
00118 return itsFactory_->execLoop();
00119 }
00120 virtual bool guiShown() const {
00121 return false;
00122 }
00123 virtual bool close() {
00124 return true;
00125 }
00126 virtual bool isDrawing() const{
00127 return false;
00128 }
00129 virtual bool isClosed() const {
00130 return false;
00131 }
00132 virtual void gridSizeChanged( int , int );
00133
00134 virtual vector<String> getFiles() const;
00135
00136 private:
00137 void initializeCurrentPlot();
00138 void initialize( Plotter::Implementation impl );
00139 PlotMSApp* plotController;
00140 PlotMSFlagging flagging;
00141 vector<PlotMSPlot*> currentPlots;
00142
00143 const String SCRIPT_CLIENT;
00144 };
00145
00146 }
00147 #endif