Sin descripción

main.cpp 629B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include <QApplication>
  2. #include <iostream>
  3. #include <QLineEdit>
  4. #include <QObject>
  5. #include <QAction>
  6. #include <QPushButton>
  7. #include <cmath>
  8. #include <QDebug>
  9. #include "drawingWindow.h"
  10. #include "tessellation.h"
  11. // YOUR CODE HERE
  12. void foo(DrawingWindow& w) {
  13. int rot = 0;
  14. for (int i = 0; i < 4; i++) {
  15. Tessellation t;
  16. t.setRotation(rot);
  17. t.move(i * 50, i * 50);
  18. w.addTessellation(t);
  19. rot += 90;
  20. }
  21. }
  22. int main(int argc, char *argv[]) {
  23. QApplication a(argc, argv);
  24. DrawingWindow w;
  25. w.resize(400, 400);
  26. w.show();
  27. foo(w);
  28. return a.exec();
  29. }