No Description

tools.cpp 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #include "grid.h"
  2. #include <QtGlobal>
  3. #include <iostream>
  4. using namespace std;
  5. // Receives the x,y coordinates of the grid where the user clicked and paints
  6. // that cell with the color of the tool.
  7. void GridWidget::Dot(int x, int y, QColor toolColor){
  8. // Switch/paints on the cell in position x, y
  9. switchOn(x, y, toolColor);
  10. }
  11. // Receives the x,y grid coordinates and the color of cell where the user
  12. // clicked. Paints the row (from that point left and right) of color toolColor until
  13. // it hits a cell of a different color than that one clicked.
  14. void GridWidget::RowMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
  15. }
  16. // Receives the grid x,y coordinates and the color of cell where the user
  17. // clicked. Paints the column (from that point up and down) of color toolColor until
  18. // it hits a cell of a different color than that one clicked.
  19. void GridWidget::ColMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
  20. }
  21. // Receives the grid x,y coordinates and the color of cell where the user
  22. // clicked. Paints a left-diagonal of color toolColor until it hits a cell
  23. // of a different color than that one clicked.
  24. void GridWidget::DiagonalLeft(int x, int y, QColor colorClicked, QColor toolColor){
  25. }
  26. // Receives the grid x,y coordinates and the color of the cell where the user
  27. // clicked. Paints a right-diagonal of color toolColor until it hits a cell
  28. // of a different color than that one clicked.
  29. void GridWidget::DiagonalRight(int x, int y, QColor colorClicked, QColor toolColor){
  30. }
  31. // Paints at x,y a square of the specified size and toolcolor.
  32. void GridWidget::square(int x, int y, QColor toolColor, int toolSize){
  33. }
  34. // Paints at x,y a triangle of the specified size and toolcolor.
  35. void GridWidget::triangle(int x, int y, QColor toolColor, int toolSize){
  36. }
  37. // Paints at x,y a circle of the specified size and toolcolor.
  38. void GridWidget::circle(int x, int y, QColor toolColor, int toolSize){
  39. }
  40. // Floods the grid with the toolcolor starting at cell x,y (whose color is ColorClicked)
  41. void GridWidget::flood_fill(int x, int y, QColor toolColor, QColor ColorClicked){
  42. }