34 lines
525 B
C++
34 lines
525 B
C++
#ifndef POLTWIDGET_H
|
|
#define POLTWIDGET_H
|
|
|
|
|
|
#include <QMainWindow>
|
|
#include <QTimer>
|
|
#include "qcustomplot.h"
|
|
|
|
namespace Ui {
|
|
class PlotWidget;
|
|
}
|
|
|
|
class PlotWidget : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PlotWidget(QWidget *parent = 0);
|
|
~PlotWidget();
|
|
void setupItemDemo(QCustomPlot *customPlot);
|
|
|
|
public slots:
|
|
void appentDataDisplaySlot(double yValue=0);
|
|
void setPlotDataCount(int value);
|
|
|
|
private:
|
|
Ui::PlotWidget *ui;
|
|
int n{500};
|
|
int xNum{n};
|
|
QVector<double> x, y;
|
|
};
|
|
|
|
#endif // POLTWIDGET_H
|