53 lines
1.3 KiB
C++
53 lines
1.3 KiB
C++
#ifndef MULTICHARTVIEW_H
|
|
#define MULTICHARTVIEW_H
|
|
|
|
#include <QWidget>
|
|
#include <QLineSeries>
|
|
#include <QtCharts>
|
|
#include <nix.hpp>
|
|
|
|
#include "dataqueue.h"
|
|
#include "databuffer.h"
|
|
#include "conversionqueue.h"
|
|
#include "chart.h"
|
|
#include "chartview.h"
|
|
#include "arrayinfo.h"
|
|
|
|
namespace Ui {
|
|
class MultiChartView;
|
|
}
|
|
|
|
class MultiChartView : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MultiChartView(DataQueue *queue, ConversionQueue *cqueue, QWidget *parent = 0);
|
|
~MultiChartView();
|
|
|
|
void addArray(const nix::DataArray &array);
|
|
void loadData(const ArrayInfo &info);
|
|
|
|
private:
|
|
DataQueue *dataQueue;
|
|
ConversionQueue *conversionQueue;
|
|
Ui::MultiChartView *ui;
|
|
double xRangeMin, xRangeMax;
|
|
std::map<std::string, nix::DataArray> arrayMap;
|
|
std::map<std::string, Chart*> chartMap;
|
|
std::map<std::string, ChartView*> viewMap;
|
|
std::map<std::string, ArrayInfo> infoMap;
|
|
std::map<std::string, DataBuffer*> data_buffer;
|
|
QFont labelFont, tickLabelFont;
|
|
|
|
Chart* createChart(const ArrayInfo &info);
|
|
ChartView* createChartView(Chart *chart, const ArrayInfo &info);
|
|
|
|
public slots:
|
|
void dataReady(QString requestId);
|
|
void dataConverted(QString entityId, double ymin, double ymax);
|
|
void newDataRequest(const std::string &entity_id, qreal min, qreal max);
|
|
};
|
|
|
|
#endif // MULTICHARTVIEW_H
|