44 lines
771 B
C++
44 lines
771 B
C++
#ifndef MYCUSTOMPLOT_H
|
|
#define MYCUSTOMPLOT_H
|
|
|
|
#include "qcustomplot.h"
|
|
|
|
#pragma execution_character_set("utf-8")
|
|
|
|
class MyCustomPlot : public QCustomPlot
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
MyCustomPlot(QWidget *parent = nullptr, int indexID=0);
|
|
|
|
virtual ~MyCustomPlot()
|
|
{
|
|
}
|
|
|
|
public:
|
|
int m_indexID;
|
|
int m_indexLine;
|
|
|
|
int m_iX1, m_iX2;
|
|
int m_iY1, m_iY2;
|
|
|
|
public:
|
|
void init(QString strName, QVector<double> x, QVector<double> y);
|
|
|
|
public slots:
|
|
void s_LineClicked(int index);
|
|
void onResetZoom();
|
|
void removeSelectedGraph();
|
|
void removeSelectedGraphByTitle();
|
|
|
|
public:
|
|
//
|
|
virtual void mousePressEvent(QMouseEvent *event);
|
|
virtual void contextMenuEvent(QContextMenuEvent *event);
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
#endif // MYCUSTOMPLOT_H
|