qt_demoe/control/smoothcurve/frmsmoothcurve.h

33 lines
624 B
C
Raw Permalink Normal View History

2021-03-08 01:26:04 +00:00
#ifndef FRMSMOOTHCURVE_H
#define FRMSMOOTHCURVE_H
#include <QWidget>
#include <QList>
#include <QPointF>
#include <QPainterPath>
namespace Ui {
class frmSmoothCurve;
}
class frmSmoothCurve : public QWidget
{
Q_OBJECT
public:
explicit frmSmoothCurve(QWidget *parent = 0);
~frmSmoothCurve();
protected:
void paintEvent(QPaintEvent *event);
private:
Ui::frmSmoothCurve *ui;
QVector<QPointF> datas; //曲线上的点
2021-03-09 01:56:41 +00:00
QPainterPath pathNormal; //正常曲线
QPainterPath pathSmooth1; //平滑曲线1
QPainterPath pathSmooth2; //平滑曲线2
2021-03-08 01:26:04 +00:00
};
#endif // FRMSMOOTHCURVE_H