initial commit
This commit is contained in:
34
Painty.h
Normal file
34
Painty.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef PAINTY_H
|
||||
#define PAINTY_H
|
||||
|
||||
#include <QQuickPaintedItem>
|
||||
#include <QVariant>
|
||||
#include <QObject>
|
||||
#include <vector>
|
||||
|
||||
class Painty : public QQuickPaintedItem {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
//Q_PROPERTY(QVariant valX WRITE setX)
|
||||
//Q_PROPERTY(QVariant valY WRITE setY)
|
||||
|
||||
|
||||
|
||||
std::vector<QPointF> points;
|
||||
double sigma = 10;
|
||||
|
||||
public:
|
||||
|
||||
Painty();
|
||||
void paint(QPainter *painter) override;
|
||||
|
||||
Q_INVOKABLE void setXY(int idx, float x, float y);
|
||||
Q_INVOKABLE void setSigma(double s);
|
||||
|
||||
// void setX(QVariant v);
|
||||
// void setY(QVariant v);
|
||||
|
||||
};
|
||||
|
||||
#endif // PAINTY_H
|
||||
Reference in New Issue
Block a user