Geen omschrijving

frog.h 813B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef FROG_H
  2. #define FROG_H
  3. #include <QWidget>
  4. #include <QPainter>
  5. #include <QtGui>
  6. #include <QtCore>
  7. #include <QTimer>
  8. #include <QLabel>
  9. class frog : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit frog(QWidget *parent = 0);
  14. float Ysapo, Xsapo, initialX;
  15. bool flag, xFlag, backFlag, moved, showText;
  16. // coefficients from the quadratic formula
  17. int A, B, C;
  18. int temp,temp2,xnenu,xnenu2,xnenu3;
  19. double QuadraticPlus(int a, int b, int c);
  20. double QuadraticMinus(int a, int b, int c);
  21. void computeNenuPositions();
  22. ~frog();
  23. private:
  24. QLabel *inter1Label;
  25. QLabel *inter2Label;
  26. signals:
  27. public slots:
  28. void animate();
  29. void run(int, int, int);
  30. void reset();
  31. protected:
  32. void paintEvent(QPaintEvent *event);
  33. QTimer *myTimer;
  34. };
  35. #endif // FROG_H