code handles curves dinamically

This commit is contained in:
thepra
2017-08-28 12:32:05 +02:00
parent 4f847aa671
commit 66b3828254
2 changed files with 77 additions and 32 deletions

View File

@ -21,7 +21,7 @@ class RenderArea : public QWidget
void setBackgroundColor(QColor color) { mBackgroundColour = color; }
QColor backgroundColor() const { return mBackgroundColour; }
void setShape(ShapesType shape) { mShape = shape; }
void setShape(ShapesType shape) { mShape = shape; OnShapeChanged(); }
ShapesType shape() const { return mShape; }
@ -33,9 +33,15 @@ class RenderArea : public QWidget
public slots:
private:
QPointF ComputeAstroid(float t);
QColor mBackgroundColour;
QColor mShapeColour;
void OnShapeChanged();
QPointF ComputeAstroid(double t);
QPointF ComputeCycloid(double t);
QPointF ComputeHuygens(double t);
QPointF ComputeHypo(double t);
QPointF Compute(double t);
QColor mBackgroundColour,mShapeColour;
ShapesType mShape;
double mScale,mIntervalLenght;
int mStepCount;
};
#endif // RENDERAREA_H