initial commit

This commit is contained in:
k-a-z-u
2019-10-02 10:37:38 +02:00
parent 659f8b661b
commit 4cdf30bc30
6 changed files with 270 additions and 0 deletions

34
Painty.h Normal file
View 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