00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef PULSARVIEW_H
00019 #define PULSARVIEW_H
00020
00021 #include <odinqt/jdxwidget.h>
00022 #include <odinqt/jdxblockwidget.h>
00023
00024 #include <odinseq/odinpulse.h>
00025 #include <odinseq/seqsim.h>
00026
00028
00029
00030 class PulsarComp {
00031 public:
00032 static const char* get_compName();
00033 };
00034
00036
00037 struct PulsarCancel {};
00038
00040
00041
00042 class PulsarView : public QWidget, public virtual JDXeditWidget {
00043 Q_OBJECT
00044
00045 public:
00046 PulsarView(QWidget *parent=0);
00047 ~PulsarView();
00048
00049 void initPulsarView();
00050
00051 static void usage();
00052
00053 signals:
00054 void done();
00055 void newCaption(const char* text);
00056
00057 public slots:
00058 void slotFileNew();
00059 void slotFileOpen();
00060 void slotFileSave();
00061 void slotFileSaveAs();
00062
00063 void writeBrukerRf();
00064 void exportRfampASCII();
00065 void exportRfphaASCII();
00066 void exportGxASCII();
00067 void exportGyASCII();
00068 void exportGzASCII();
00069 void exportMampASCII();
00070 void exportMphaASCII();
00071 void exportMzASCII();
00072 void exportPulseJDX();
00073 void exportMagJDX();
00074
00075 void edit_systemInfo();
00076
00077 private slots:
00078 void updatePulse();
00079 void updateMagnetization();
00080 void emitDone();
00081
00082
00083 private:
00084
00085
00086 void updateWidget();
00087
00088 void vriteArray(const STD_string& filename, const fvector& data);
00089
00090 void exportASCIIpulse(const fvector& data);
00091 void exportASCIImag(const fvector& data);
00092
00093 OdinPulse* pulse;
00094 Sample* sample;
00095 SeqSimMagsi* mag;
00096
00097 funcMode old_mode;
00098 STD_string fileName;
00099
00100 GuiGridLayout *grid;
00101
00102 JDXwidget* pulseWidget[n_dimModes];
00103 JDXwidget* sampleWidget[n_dimModes];
00104 JDXwidget* magnWidget[n_dimModes];
00105
00106 GuiProgressDialog* progress;
00107 int progcount;
00108 };
00109
00110 #endif