You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
819 B
C

6 years ago
#ifndef RENDERAREA_H
#define RENDERAREA_H
#include <QWidget>
class RenderArea : public QWidget
{
Q_OBJECT
public:
explicit RenderArea(QWidget *parent = nullptr);
QSize minimumSizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const Q_DECL_OVERRIDE;
enum ShapesType{
Astroid,
Cycloid,
HuygensCycloid,
HypoCycloid
};
void setBackgroundColor(QColor color) { mBackgroundColour = color; }
QColor backgroundColor() const { return mBackgroundColour; }
void setShape(ShapesType shape) { mShape = shape; }
ShapesType shape() const { return mShape; }
6 years ago
signals:
protected:
void paintEvent(QPaintEvent* event) Q_DECL_OVERRIDE;
public slots:
private:
QPointF ComputeAstroid(float t);
6 years ago
QColor mBackgroundColour;
QColor mShapeColour;
ShapesType mShape;
6 years ago
};
#endif // RENDERAREA_H