PlotMS.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 #ifndef PLOTMS_H_
00028 #define PLOTMS_H_
00029
00030 #include <plotms/PlotMS/PlotMSParameters.h>
00031 #include <plotms/PlotMS/PlotMSExportParam.h>
00032 #include <plotms/Plots/PlotMSPlotManager.h>
00033 #include <plotms/PlotMS/PlotMSFlagging.h>
00034 #include <plotms/PlotMS/PlotEngine.h>
00035 #include <plotms/Actions/PlotMSAction.h>
00036
00037 namespace casa {
00038
00039
00040
00041 #define PLOTMS_VERSION 0x002250;
00042 #define PLOTMS_VERSION_STR "2.25";
00043
00044
00045
00046
00047 class PlotMSDBusApp;
00048 class Client;
00049
00050
00051
00052 class PlotMSApp : public PlotMSParametersWatcher, public PlotEngine {
00053 public:
00054
00055
00056
00057 PlotMSApp(bool connectToDBus = false, bool userGui = true);
00058
00059
00060
00061
00062 PlotMSApp(const PlotMSParameters& params, bool connectToDBus = false, bool userGui = true);
00063
00064
00065 ~PlotMSApp();
00066
00067
00068
00069
00070
00071 virtual void showGUI(bool show = true);
00072
00073
00074 virtual bool guiShown() const;
00075
00076
00077 int execLoop();
00078
00079
00080 int showAndExec(bool show= true);
00081
00082
00083 void close();
00084
00085
00086 virtual void clearPlots();
00087
00088
00089
00090 void showError(const String& message, const String& title = "PlotMS Error",
00091 bool isWarning = false);
00092 void showWarning(const String& message,
00093 const String& title = "PlotMS Warning");
00094 void clearMessage();
00095
00096
00097
00098 void showMessage(const String& message,
00099 const String& title = "PlotMS Message");
00100
00101
00102 void setAnnotationModeActive( PlotMSAction::Type type, bool active );
00103
00104
00105
00106 void resetTools();
00107
00108
00109
00110
00111
00112 virtual PlotMSParameters& getParameters();
00113 void setParameters(const PlotMSParameters& params);
00114
00115
00116
00117
00118 virtual PlotMSExportParam& getExportParameters();
00119 void setExportParameters(const PlotMSExportParam& params);
00120 PlotExportFormat getExportFormat();
00121 void setExportFormat( const PlotExportFormat format );
00122
00123
00124
00125 void parametersHaveChanged(const PlotMSWatchedParameters& params,
00126 int updateFlag);
00127 virtual PlotSymbolPtr createSymbol (const String& descriptor,
00128 Int size, const String& color,
00129 const String& fillPattern, bool outline );
00130 PlotSymbolPtr createSymbol( const PlotSymbolPtr& copy );
00131
00132
00133
00134 virtual PlotLoggerPtr getLogger();
00135
00136
00137
00138
00139
00140 virtual PlotMSPlotManager& getPlotManager();
00141
00142
00143
00144 PlotMSPlot* addOverPlot(const PlotMSPlotParameters* p = NULL);
00145
00146 virtual bool isDrawing() const;
00147 bool isClosed() const;
00148
00149
00150 void setOperationCompleted( bool completed );
00151
00152
00153
00154 bool save(const PlotExportFormat& format);
00155
00159 virtual PlotFactoryPtr getPlotFactory();
00160 virtual void quitApplication();
00161 virtual PlotMSFlagging getFlagging() const;
00162 virtual void setFlagging(PlotMSFlagging flag);
00163 void canvasAdded( PlotCanvasPtr canvas );
00164 bool isVisible(PlotCanvasPtr& canvas );
00165 bool exportToFormat(const PlotExportFormat& format);
00166 virtual Record locateInfo( Bool& success, String& errorMessage );
00167
00168
00169 bool isOperationCompleted() const;
00170 PlotterPtr getPlotter();
00171 public:
00172
00173
00174
00175
00176 bool its_want_avoid_popups;
00177 bool updateCachePlot( PlotMSPlot* plot, void (*f)(void*, bool), bool setupPlot);
00178 void setCommonAxes(bool commonX, bool commonY );
00179 bool isCommonAxisX() const;
00180 bool isCommonAxisY() const;
00181 void setAxisLocation( PlotAxis locationX, PlotAxis locationY );
00182 PlotAxis getAxisLocationX() const;
00183 PlotAxis getAxisLocationY() const;
00184 vector<String> getFiles() const;
00185
00186
00187 private:
00188
00189 Client* itsPlotter_;
00190 Client* itsLastPlotter_;
00191 bool isGUI_;
00192
00193
00194 PlotMSParameters itsParameters_;
00195 PlotMSExportParam itsExportParameters_;
00196 PlotExportFormat itsExportFormat;
00197
00198
00199 PlotLoggerPtr itsLogger_;
00200
00201
00202 PlotMSPlotManager itsPlotManager_;
00203
00204
00205 PlotMSDBusApp* itsDBus_;
00206
00207
00208
00209
00210 bool operationCompleted;
00211
00212
00213 void initialize(bool connectToDBus, bool userGui );
00214
00215
00216
00217 PlotMSApp(const PlotMSApp& copy);
00218 PlotMSApp& operator=(const PlotMSApp& copy);
00219
00220
00221 };
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248 }
00249
00250 #endif