-
Notifications
You must be signed in to change notification settings - Fork 0
/
datatracer.h
37 lines (31 loc) · 877 Bytes
/
datatracer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef DATATRACER_H
#define DATATRACER_H
#include <QObject>
#include "qcustomplot.h"
class DataTracer : public QObject
{
Q_OBJECT
public:
explicit DataTracer(QCustomPlot *plot);
~DataTracer();
void setPen(const QPen &pen);
void setBrush(const QBrush &brush);
void setText(const QString &x_text,const QString &y_text);
void setLabelStyle(const QFont &font, const QPen &pen, const QColor&color);
void updatePosition(QCPGraph *graph, double xValue, double yValue);
bool isVisible();
void setVisible(bool visible);
void updateShow();
private:
QCustomPlot *plot;
QCPGraph *graph;
QCPItemTracer *tracer;
QCPItemText *label;
QCPItemLine *arrow;
bool visible;
double key;
double value;
QString label_key;
QString label_value;
};
#endif // DATATRACER_H