00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef OdinView_H
00019 #define OdinView_H
00020
00021 #include <odinqt/jdxwidget.h>
00022 #include <odinqt/jdxblockwidget.h>
00023
00024 #include <odinpara/jdxarrays.h>
00025
00026
00027 #include "odinconf.h"
00028 #include "odindebugger.h"
00029 #include "odinmethod.h"
00030 #include "odinplot.h"
00031
00032
00033 #define ODIN_MINWIDTH 600
00034 #define MESSAGES_HEIGHT 200
00035
00036 #define IMAGEVIEWER "miview"
00037
00038
00039
00040 class ProgressDisplayDialog;
00041
00042 class NewMethDialog;
00043
00044 class IdeaOpts;
00045
00046
00047 class OdinView : public QWidget, public OdinMethodCallback {
00048
00049 Q_OBJECT
00050 public:
00051 OdinView(QWidget *parent);
00052 ~OdinView();
00053
00054 void initOdinView(GuiToolBar* action_toolbar, bool has_debug_cmdline);
00055
00056 static void usage();
00057
00058
00059 public slots:
00060 void new_method();
00061 void open_method();
00062 void close_method();
00063 void exit_odin();
00064
00065 void edit();
00066 void recompile();
00067 bool plot() {return create_seqplot();}
00068 void kspace();
00069 void sim();
00070 void geo();
00071
00072 void seqprops();
00073 void seqtree();
00074 void recoinfo();
00075 void pulsars();
00076
00077 void pulsprog();
00078 void gradprog();
00079 void parx();
00080 void pv_pilot();
00081 void pv_scan();
00082 void pv_rgscan();
00083 void pv_howto();
00084
00085 void ideaevents();
00086 void compile_idea();
00087 void export_dlls();
00088 void ideahowto();
00089
00090 void epiccode();
00091
00092 void edit_prefs();
00093 void edit_system();
00094 void load_system();
00095 void edit_study();
00096 void debug_opts();
00097
00098
00099 void show_manual();
00100 void show_apidoc();
00101 void show_seqdoc();
00102
00103 void switch_to_platform_noask(odinPlatform pF);
00104
00105 void recalc_method();
00106
00107 void new_geo_pars();
00108
00109 int load_prefs(bool ignore_debugLevels);
00110 int react_on_changed_prefs();
00111 int save_prefs();
00112
00113 int save_protocol();
00114 int load_protocol();
00115
00116 void newmeth_rels();
00117
00118
00119
00120
00121 signals:
00122 void newCaption(const char* text);
00123 void newStatus(bool, const char* text);
00124
00125 private:
00126
00127
00128 void bruker_scan(bool autorg);
00129
00130 bool chsrcdir();
00131
00132 bool prepare_method();
00133 bool prepare_acquisition();
00134
00135 bool do_odinreco(const STD_string& outprefix);
00136
00137 void update_methodsel();
00138
00139 bool switch_to_platform(odinPlatform pF, bool ask=true);
00140
00141 STD_string get_samplefile();
00142
00143 bool create_seqplot(bool for_simulation=false);
00144
00145
00146
00147 void report(bool status, const STD_string& trans_label, const STD_string& message);
00148 void create_widgets();
00149 void delete_widgets();
00150
00151 static void odintracefunction(const LogMessage& msg);
00152 static GuiTextView* messages_ptr;
00153
00154 OdinConf settings;
00155 IdeaOpts* ideaopts;
00156
00157 OdinMethod method;
00158
00159 SeqPlatformProxy platform;
00160
00161 GuiGridLayout *grid;
00162
00163 GuiComboBox* methodsel;
00164
00165 GuiTextView* messages;
00166
00167 JDXwidget* seqpars;
00168 JDXwidget* commpars;
00169
00170
00171 ProgressDisplayDialog* progress;
00172
00173 PlotWindow* seqplot;
00174
00175 double* signal_x;
00176 double* signal_y;
00177
00178
00179 JDXfileName templatemeth;
00180 JDXstring newmethlabel;
00181 NewMethDialog* mewmethwizzard;
00182 bool newmethlabel_modified;
00183
00184 STD_list<Process> subprocs;
00185
00186 OdinDebugger debugger;
00187 void change_debugger();
00188 };
00189
00190 #endif