i0mmonplot.h 1.26 KB
Newer Older
Giacomo Strangolino's avatar
Giacomo Strangolino committed
1
2
3
4
5
6
#ifndef I0MMONPLOT_H
#define I0MMONPLOT_H

#include <cucontrolsfactorypool.h>
#include <quplot_base.h>
#include <cudata.h>
Giacomo Strangolino's avatar
Giacomo Strangolino committed
7
#include <qwt_symbol.h>
Giacomo Strangolino's avatar
Giacomo Strangolino committed
8
9
10
11
12
13
14
15
16
17
#include <QString>

class CumbiaPool;
class QuMultiReaderPluginInterface;

class I0MMonPlot : public QuPlotBase
{
    Q_OBJECT
public:
    explicit I0MMonPlot(QWidget *parent, CumbiaPool *cup, const CuControlsFactoryPool & fpoo);
18
    ~I0MMonPlot();
Giacomo Strangolino's avatar
Giacomo Strangolino committed
19
20
21

    bool pluginLoaded() const;

Giacomo Strangolino's avatar
Giacomo Strangolino committed
22
23
    bool yAutoScale() const;

Giacomo Strangolino's avatar
Giacomo Strangolino committed
24
25
26
27
signals:

public slots:
    void onDataReady(const QList<CuData> & dl);
Giacomo Strangolino's avatar
Giacomo Strangolino committed
28
    void setSources(const QString& x, const QString& y, const QMap<int, double> lambdamap, int nsamples);
Giacomo Strangolino's avatar
Giacomo Strangolino committed
29
30
    void setYBounds(double ymi, double yma);
    void setYBoundsAuto(bool a);
31
    void setYLogScale(bool a);
Giacomo Strangolino's avatar
Giacomo Strangolino committed
32
33

private:
34

Giacomo Strangolino's avatar
Giacomo Strangolino committed
35
    void m_set_bounds(const QVector<double> &xv, const QVector<double> &yv);
36
    void m_reset_scales();
Giacomo Strangolino's avatar
Giacomo Strangolino committed
37
    void m_curves_style();
38

Giacomo Strangolino's avatar
Giacomo Strangolino committed
39
40
41
42
    CumbiaPool *m_cu_poo;
    CuControlsFactoryPool m_ctrl_fpool;
    QuMultiReaderPluginInterface *m_multiread_plu_i;

43
    int m_numsamples;
Giacomo Strangolino's avatar
Giacomo Strangolino committed
44
45
46
47
48
    QMap<int, double> m_lambdas;
    QMap<QString, QwtSymbol::Style> m_curvesymap;

    const QList<QwtSymbol::Style> m_symstyles;

49
    bool m_time_mode, m_empty, m_log_scale;
Giacomo Strangolino's avatar
Giacomo Strangolino committed
50
51

    double m_ymin, m_ymax;
52
    QList<QColor> m_colormap;
Giacomo Strangolino's avatar
Giacomo Strangolino committed
53
54
55
};

#endif // I0MMONPLOT_H