qmca  0.0.20
mcacontroller.h
Go to the documentation of this file.
1 #ifndef MCACONTROLLER_H
2 #define MCACONTROLLER_H
3 
4 #include <QObject>
5 #include <QList>
6 
7 #include "mcagroup.h"
8 #include "amplifiergroup.h"
9 #include "a2dconvertergroup.h"
10 #include "pulseanalysergroup.h"
11 #include "powersupplygroup.h"
12 
13 class QwtPlot;
14 class QwtPlotZoomer;
15 class QwtPlotPanner;
16 class QwtPlotCurve;
17 class QwtLegend;
18 class QwtPlotGrid;
19 class MCAMainWindow;
20 class QMCAControlPanel;
21 class EpicsArray;
22 class EpicsVariable;
23 class EpicsMCA;
24 class MCAControlPanel;
29 class BM12ControlPanel;
30 class QTimer;
31 
32 class MCAController : public QObject
33 {
34  Q_OBJECT;
35  public:
36  MCAController(MCAMainWindow *w, QObject *parent=0);
38 
39  void addArgument(QString arg);
40  void replot();
41  QwtPlot *graph();
42 
43  public slots:
44  void printGraph();
45  void wantToQuit();
46  void zoomIn();
47  void zoomOut();
48  void autoscaleGraph();
49  void saveData();
50  void saveEnergyWindows();
51  void loadEnergyWindows();
52 
53  void save_a();
54  void save_b();
55  void save_c();
56 
57  void clear_a();
58  void clear_b();
59  void clear_c();
60 
61 /* void epicsIdle(); */
62 
63  private:
64  void save_curves(QList<QwtPlotCurve*> &crvs, QString suffix, Qt::PenStyle style);
65  void clear_curves(QList<QwtPlotCurve*> &crvs);
66 
67  private:
68  enum Adding {
70  };
71 
74  QList<QwtPlotCurve*> m_MCACurves;
75  QList<QwtPlotCurve*> m_MCACurvesA;
76  QList<QwtPlotCurve*> m_MCACurvesB;
77  QList<QwtPlotCurve*> m_MCACurvesC;
78  QwtPlot *m_Plot;
79  QwtPlotZoomer *m_Zoomer;
80  QwtPlotPanner *m_Panner;
81  QwtLegend *m_Legend;
82  QwtPlotGrid *m_Grid;
90  QTimer *m_Timer;
91 };
92 
93 #endif
94 
QwtPlotPanner * m_Panner
Definition: mcacontroller.h:80
void clear_curves(QList< QwtPlotCurve * > &crvs)
QwtPlotZoomer * m_Zoomer
Definition: mcacontroller.h:79
MCAController(MCAMainWindow *w, QObject *parent=0)
QList< QwtPlotCurve * > m_MCACurvesB
Definition: mcacontroller.h:76
PulseAnalyserControlPanel * m_PulseAnalyserControlPanel
Definition: mcacontroller.h:87
QList< QwtPlotCurve * > m_MCACurvesA
Definition: mcacontroller.h:75
QList< QwtPlotCurve * > m_MCACurvesC
Definition: mcacontroller.h:77
MCAControlPanel * m_MCAControlPanel
Definition: mcacontroller.h:84
PowerSupplyControlPanel * m_PowerSupplyControlPanel
Definition: mcacontroller.h:88
void loadEnergyWindows()
AmplifierControlPanel * m_AmplifierControlPanel
Definition: mcacontroller.h:85
A2DConverterControlPanel * m_A2DConverterControlPanel
Definition: mcacontroller.h:86
QList< QwtPlotCurve * > m_MCACurves
Definition: mcacontroller.h:74
BM12ControlPanel * m_BM12ControlPanel
Definition: mcacontroller.h:89
void addArgument(QString arg)
void saveEnergyWindows()
QMCAControlPanel * m_MainControlPanel
Definition: mcacontroller.h:73
QwtPlot * m_Plot
Definition: mcacontroller.h:78
void save_curves(QList< QwtPlotCurve * > &crvs, QString suffix, Qt::PenStyle style)
QwtPlot * graph()
MCAMainWindow * m_MainWindow
Definition: mcacontroller.h:72
QwtLegend * m_Legend
Definition: mcacontroller.h:81
QTimer * m_Timer
Definition: mcacontroller.h:90
QwtPlotGrid * m_Grid
Definition: mcacontroller.h:82