Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef FRACTAL_H
- #define FRACTAL_H
- #include <QPainter>
- #include <QRect>
- #include <QDebug>
- class Fractal
- {
- public:
- virtual void render(QPainter &painter, QRect target) = 0;
- };
- #endif // FRACTAL_H
- #ifndef CANTOR_H
- #define CANTOR_H
- #include "Fractal.h"
- class Cantor : public Fractal
- {
- public:
- void render(QPainter &painter, QRect target) Q_DECL_OVERRIDE;
- };
- #endif // CANTOR_H
- #include "Cantor.h"
- void Cantor::render(QPainter &painter, QRect target)
- {
- Q_UNUSED(painter);
- Q_UNUSED(target);
- qDebug() << "Rendering Cantor's Discontinuum...";
- }
- #ifndef SIERPINSKI_H
- #define SIERPINSKI_H
- #include "Fractal.h"
- class Sierpinski : public Fractal
- {
- public:
- void render(QPainter &painter, QRect target) Q_DECL_OVERRIDE;
- };
- #endif // SIERPINSKI_H
- #include "Sierpinski.h"
- void Sierpinski::render(QPainter &painter, QRect target)
- {
- Q_UNUSED(painter);
- Q_UNUSED(target);
- qDebug() << "Rendering Sierpinski triangle...";
- }
- #ifndef SIERPINSKI_H
- #define SIERPINSKI_H
- #include "Fractal.h"
- class Sierpinski : public Fractal
- {
- public:
- void render(QPainter &painter, QRect target)
- {
- Q_UNUSED(painter);
- Q_UNUSED(target);
- qDebug() << "Rendering Sierpinski triangle...";
- }
- };
- #endif // SIERPINSKI_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement