code handles curves dinamically
This commit is contained in:
14
renderarea.h
14
renderarea.h
@ -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
|
||||
|
Reference in New Issue
Block a user