Client.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 #ifndef CLIENT_H_
00029 #define CLIENT_H_
00030
00031 #include <plotms/Actions/PlotMSAction.h>
00032 #include <plotms/PlotMS/PlotMSFlagging.h>
00033 #include <graphics/GenericPlotter/PlotOptions.h>
00034 #include <plotms/PlotMS/PlotMSLabelFormat.h>
00035
00036 namespace casa {
00037
00038 class PlotMSPlot;
00039
00045 class Client {
00046 public:
00047
00048 virtual bool isActionEnabled( PlotMSAction::Type type ) const = 0;
00049
00050
00051 virtual vector<PlotMSPlot*> getCurrentPlots() const = 0;
00052
00053
00054 virtual vector<vector<PMS::Axis> > getSelectedLoadAxes() const = 0;
00055
00056
00057 virtual vector<vector<PMS::Axis> > getSelectedReleaseAxes() const = 0;
00058
00059
00060
00061
00062 virtual PlotMSFlagging getFlagging() const = 0;
00063
00064
00065 virtual void setCommonAxes( bool commonX, bool commonY );
00066 virtual bool isCommonAxisX() const;
00067 virtual bool isCommonAxisY() const;
00068
00069 virtual void setAxisLocation( PlotAxis locationX, PlotAxis locationY );
00070 virtual PlotAxis getAxisLocationX() const;
00071 virtual PlotAxis getAxisLocationY() const;
00072
00073
00074 virtual vector<String> getFiles() const = 0;
00075
00076
00077
00078 virtual void setFlagging(PlotMSFlagging flag) = 0;
00079
00080
00081
00082 virtual bool isInteractive() const = 0;
00083
00084 virtual bool exportToFormat(const PlotExportFormat& format);
00085
00086
00087 virtual bool exportPlot(const PlotExportFormat& format,
00088 const bool async) = 0;
00089
00090
00091
00092
00093 virtual void showError(const String& message,
00094 const String& title, bool isWarning) = 0;
00095
00096
00097
00098
00099 virtual void showMessage(const String& message, const String& title, bool warning = false) = 0;
00100
00101 virtual void clearMessage() = 0;
00102
00103 virtual void setCanvasCachedAxesStackImageSize(int width, int height );
00104
00105
00106 virtual PlotterPtr getPlotter();
00107
00108
00109 virtual void setAnnotationModeActive( PlotMSAction::Type , bool ){
00110
00111 }
00112
00113
00114
00115
00116 virtual PlotSymbolPtr createSymbol( const PlotSymbolPtr& copy );
00117
00118
00119 virtual PlotSymbolPtr createSymbol(const String& descriptor, Int size,
00120 const String& color, const String& fillPattern, bool outline);
00121
00122
00123
00124 virtual PlotLoggerPtr getLogger();
00125
00126
00127 virtual void canvasAdded( PlotCanvasPtr& canvas ) = 0;
00128
00129
00130 virtual bool isVisible(PlotCanvasPtr& canvas );
00131
00132
00133
00134
00135
00136 virtual void doThreadedOperation( ThreadController* controller ) = 0;
00137
00138
00139
00140
00141 virtual ThreadController* getThreadController( PlotMSAction::Type type,
00142 PMSPTMethod postThreadMethod = NULL,
00143 PlotMSPlot* postThreadObject = NULL,
00144 int index = 0) = 0;
00145
00146
00147
00148 virtual vector<PlotCanvasPtr> currentCanvases();
00149
00150
00151 virtual void holdDrawing();
00152 virtual void releaseDrawing();
00153 virtual bool allDrawingHeld() const;
00154
00155 virtual void setOperationCompleted( bool completed );
00156 virtual bool plot() = 0;
00157 virtual void showGUI( bool show = true) = 0;
00158 virtual int showAndExec(bool show = true);
00159 virtual int execLoop() = 0;
00160 virtual bool guiShown() const = 0;
00161 virtual bool close() = 0;
00162 virtual bool isDrawing() const = 0;
00163 virtual bool isClosed() const = 0;
00164 virtual PlotFactoryPtr getPlotFactory();
00165 virtual void gridSizeChanged( int , int )=0;
00166
00167
00168 protected:
00169
00170 PlotterPtr itsPlotter_;
00171
00172 PlotFactoryPtr itsFactory_;
00173
00174 Client(){};
00175 virtual ~Client(){};
00176 };
00177
00178 }
00179 #endif