Browse Source

Arreglos gramaticales, igual para los codigos fuentes

SaraB 6 years ago
parent
commit
30fb8dc8fc
7 changed files with 47 additions and 75 deletions
  1. 5
    19
      README-en.md
  2. 4
    18
      README-es.md
  3. 3
    3
      dialog.cpp
  4. 3
    3
      dialog.h
  5. 13
    13
      grid.cpp
  6. 15
    15
      grid.h
  7. 4
    4
      tools.cpp

+ 5
- 19
README-en.md View File

@@ -4,7 +4,6 @@
4 4
 ![main2.png](images/main2.png)
5 5
 ![main3.png](images/main3-small.png)
6 6
 
7
-[Verano 2016- Tatiana - Ive - Tatiana]
8 7
 
9 8
 Recursion is a technique that is commonly used in programming. With this technique, problems are done by solving similar problems but for smaller cases. We can construct sets of objects or tasks using *recursive rules* and *initial values*. *Recursive functions* are functions that are self-invoking, using smaller sets or elements each time, until reaching a point where an initial value is used instead of self-invoking. In this laboratory experience, you will implement some tools to draw and practice the use of recursive functions to fill with color some figures.
10 9
 
@@ -57,7 +56,7 @@ The drawing will be on a grid. The tools will be used by clicking any cell in th
57 56
 	**Figure 1.**  The image shows the direction in which the coordinates are ordered in `Qt` images.
58 57
 
59 58
 
60
-* When we want to insert two-dimensional data (like the entries of a grid that has coordinates in $$x$$ and $$y$$) in an one-dimensional array we use a formula to convert every coordinate $$(x,y)$$ to an index $$i$$ of the array. For every point with coordinates $$(x,y)$$ in the grid, we evaluate $$i=(number-of-columns)*y+x$$, where `number-of-columns` represents the width of the two-dimensional array, and the result $$i$$ will be the index of the one-dimensional array that corresponds to the point with coordinates $$(x,y)$$ in the grid. For example, the index $$i$$ that corresponds to the point $$(1,2)$$ in the grid of width $$5$$ is $$i=(5)*2+1=11$$.
59
+* When we want to insert two-dimensional data (like the entries of a grid that has coordinates in $$x$$ and $$y$$) in a one-dimensional array we use a formula to convert every coordinate $$(x,y)$$ to an index $$i$$ of the array. For every point with coordinates $$(x,y)$$ in the grid, we evaluate $$i=(number-of-columns)*y+x$$, where `number-of-columns` represents the width of the two-dimensional array, and the result $$i$$ will be the index of the one-dimensional array that corresponds to the point with coordinates $$(x,y)$$ in the grid. For example, the index $$i$$ that corresponds to the point $$(1,2)$$ in the grid of width $$5$$ is $$i=(5)*2+1=11$$.
61 60
 
62 61
 
63 62
 ---
@@ -71,7 +70,7 @@ In this project, you will need to use the following `QtGlobal` functions for the
71 70
 
72 71
 * `int qFloor(qreal v)` // Returns the “floor” value $$v$$.
73 72
 * `qreal qSqrt(qreal v)` // Returns the square root of the value $$v$$.
74
-* `qreal qPow(qreal x, qreal y)` // Returns the value of $x$ to the power of $$y$$.
73
+* `qreal qPow(qreal x, qreal y)` // Returns the value of $$x$$ to the power of $$y$$.
75 74
 
76 75
 In addition, you will need to use the function that paints the grid:
77 76
 
@@ -135,7 +134,7 @@ This function should work similarly as the function `RowMajorFill` but for colum
135 134
 |---|----|----|
136 135
 | ![](images/colMajor01-small.png) | ![](images/colMajor02-small.png) | ![](images/colMajor03-small.png)|  
137 136
 
138
-**Figure 3.** (a) A drawing with a white background and red dots (b) When the user clicks on the vertical line button (`ColMajorFill`) and clicks the cell shown, (c) a vertical line that expands to the left and to the right of the cell clicked is drawn, until it finds a cell with a different color from the color of the background. 
137
+**Figure 3.** (a) A drawing with a white background and red dots (b) When the user clicks on the vertical line button (`ColMajorFill`) and clicks the cell shown, (c) a vertical line that expands to the top and to the bottom of the cell clicked is drawn, until it finds a cell with a different color from the color of the background. 
139 138
  
140 139
 
141 140
 ##### `DiagonalLeft`
@@ -167,7 +166,7 @@ This function should work similarly as the `DiagonalLeft` function but produces
167 166
 
168 167
 ### Exercise 2 - Implement the Functions that Operate the Buttons for Drawing Squares, Triangles and Circles. 
169 168
 
170
-Now, you will implement the functionality to draw squares, circles and triangles. The **size** of the figure drawn will depend on the size selected on sliding bar in the interface.
169
+Now, you will implement the functionality to draw squares, circles and triangles. The **size** of the figure drawn will depend on the size selected on by using the sliding bar in the interface.
171 170
 
172 171
 
173 172
 #### 2a: Squares 
@@ -229,7 +228,7 @@ In this case, only the points that are shown below satisfy the expression  $$x^2
229 228
 
230 229
 ### Exercise 3 - Implement the Function that Fills the Figures using Recursion. 
231 230
 
232
-In this exercise you will implement the functionality to fill the color of the figures.One of the more convinient ways to express the algorithm to fill the figures is using recursion. A basic recursive algorithm (but it’s pretty weak) is found in Wikipedia:
231
+In this exercise you will implement the functionality to fill the color of the figures. One of the most convinient ways to express the algorithm to fill the figures is using recursion. A basic recursive algorithm (but it’s pretty weak) is found in Wikipedia:
233 232
 
234 233
 
235 234
 ```
@@ -275,17 +274,4 @@ Use "Deliverable" in Moodle to hand in the archive  `tools.cpp` with the functio
275 274
 
276 275
 [3] http://en.wikipedia.org/wiki/Flood_fill
277 276
 
278
----
279
-
280
----
281
----
282
-
283
----
284
-
285
-----
286
-
287
-
288
-
289
-
290
-
291 277
 

+ 4
- 18
README-es.md View File

@@ -6,14 +6,14 @@
6 6
 
7 7
 
8 8
 
9
-La recursión es una técnica muy utilizada en programación. Con esta técnica se resuelven problemas resolviendo un problema similar pero para casos más pequeños. Podemos construir conjuntos de objetos o procesos utilizando *reglas recursivas* y *valores iniciales*. Las *funciones recursivas* son funciones que se auto-invocan, utilizando cada vez conjuntos o elementos más pequeños,  hasta llegar a un punto en donde se utiliza la condición inicial en lugar de auto-invocarse. En esta experiencia de laboratorio implementarás algunas herramientas para dibujar y practicarás el uso de funciones recursivas para rellenar de color algunas figuras.
9
+La recursión es una técnica muy utilizada en programación. Con esta técnica se resuelven problemas resolviendo un problema similar pero para casos más pequeños. Podemos construir conjuntos de objetos o procesos utilizando *reglas recursivas* y *valores iniciales*. Las *funciones recursivas* son funciones que se auto-invocan, utilizando cada vez conjuntos o elementos más pequeños,  hasta llegar a un punto en donde se utiliza la condición inicial en lugar de auto-invocarse. En esta experiencia de laboratorio implementarás algunas herramientas para dibujar y practicarás el uso de funciones recursivas para rellenar de color algunas figuras. Esta experiencia de laboratorio es una adaptación de la asignación *GridPlotter* presentada por Alyce Brady y Pamela Cutter en [1]. La implementación de la cuadrícula y la capacidad de pintar en ella fue presentada por Sacha Schutz en [2] pero fue arreglada, modificada y adaptada para esta experiencia de laboratorio.
10
+
10 11
 
11 12
 ## Objetivos:
12 13
 
13 14
 1. Definir e implementar funciones recursivas.
14 15
 2. Practicar el uso de estructuras de repetición.
15 16
 
16
-Esta experiencia de laboratorio es una adaptación de la asignación *GridPlotter* presentada por Alyce Brady y Pamela Cutter en [1]. La implementación de la cuadrícula y la capacidad de pintar en ella fue presentada por Sacha Schutz en [2] pero fue arreglada, modificada y adaptada para esta experiencia de laboratorio.
17 17
 
18 18
 
19 19
 ## Pre-Lab:
@@ -79,7 +79,7 @@ También necesitarás utilizar la función que pinta en la cuadrilla:
79 79
 
80 80
 * `void switchOn(int x, int y, const QColor& color);` // Pinta la celda $$(x,y)$$ con el color dado. (No tienes que preocuparte por `QColor` porque se pasa a la función por parámetro.)
81 81
 
82
-Aunque no se ve en el archivo `tools.cpp`, hay una arreglo llamado `mColors` que contiene el color de todas las celdas de la cuadrilla. Esto te ayudará a saber cuál color está en una celda: `mColors[columns * y + x]`. Nota que el índice de este arreglo se calcula utilizando la conversión para cambiar coordenadas $$(x,y)$$ a índices que explicamos arriba.
82
+Aunque no se ve en el archivo `tools.cpp`, hay una arreglo llamado `mColors` que contiene el color de todas las celdas de la cuadrilla. Esto te ayudará a saber qué color está en una celda: `mColors[columns * y + x]`. Nota que el índice de este arreglo se calcula utilizando la conversión para cambiar coordenadas $$(x,y)$$ a índices que explicamos arriba.
83 83
 
84 84
 ---
85 85
 
@@ -108,7 +108,7 @@ Aunque no se ve en el archivo `tools.cpp`, hay una arreglo llamado `mColors` que
108 108
 	* Utilizando la máquina virtual: Haz doble “click” en el archivo `GridPlotter.pro` que se encuentra  en el directorio `/home/eip/labs/recursion-gridplotter` de la máquina virtual.
109 109
 	* Descargando la carpeta del proyecto de `Bitbucket`: Utiliza un terminal y escribe el commando `git clone http:/bitbucket.org/eip-uprrp/recursion-gridplotter` para descargar la carpeta `recursion-gridplotter` de `Bitbucket`. En esa carpeta, haz doble “click” en el archivo `GridPlotter.pro`.
110 110
 
111
-2. El proyecto contiene el esqueleto para una aplicación para dibujar líneas o figuras en una cuadrilla. La aplicación tiene una interfaz que le permite al usuario seleccionar el color para pintar, el color para el trasfondo de la cuadrilla, la figura que se va a dibujar (por ejemplo, círculo, cuadrado) y el tamaño de la figura. La figura seleccionada se dibuja cuando el usuario marca una celda en la cuadrilla.
111
+2. El proyecto contiene el esqueleto de una aplicación para dibujar líneas o figuras en una cuadrilla. La aplicación tiene una interfaz que le permite al usuario seleccionar el color para pintar, el color para el trasfondo de la cuadrilla, la figura que se va a dibujar (por ejemplo, círculo, cuadrado) y el tamaño de la figura. La figura seleccionada se dibuja cuando el usuario marca una celda en la cuadrilla.
112 112
 
113 113
 Estarás trabajando en el archivo `tools.cpp`. Tu primera tarea es implementar las funciones `RowMajorFill`, `ColMajorFill`, `DiagonalLeft` y `DiagonalRight` que hacen que los botones para dibujar líneas funcionen. La función `RowMajorFill` ya está implementada para que la tengas de ejemplo. Las funciones deben trabajar como se indica adelante.
114 114
 
@@ -283,18 +283,4 @@ Utiliza "Entrega" en Moodle para entregar el archivo `tools.cpp` con las funcion
283 283
 
284 284
 [3] http://en.wikipedia.org/wiki/Flood_fill
285 285
 
286
----
287
-
288
----
289
----
290
-
291
----
292
-
293
-----
294
-
295
-
296
-
297
-
298
-
299
-
300 286
 

+ 3
- 3
dialog.cpp View File

@@ -40,7 +40,7 @@ void Dialog::setUndo(bool can){
40 40
 /// \~English
41 41
 /// \brief  Enables the redo button
42 42
 /// \~Spanish
43
-/// \brief Permite utilizar el boton de (rehacer)
43
+/// \brief Permite utilizar el boton de rehacer (redo)
44 44
 void Dialog::setRedo(bool can){
45 45
     if (can == true) ui->redoButton->setDisabled(false);
46 46
     else ui->redoButton->setDisabled(true);
@@ -127,7 +127,7 @@ void Dialog::on_colmajorfillButton_clicked()
127 127
 /// \~English
128 128
 /// \brief Sets the tool to Diagonal Left fill
129 129
 /// \~Spanish
130
-/// \brief Ajusta la herrramienta a llenar en diagonal a la izquierda
130
+/// \brief Ajusta la herrramienta a llenar la diagonal hacia la izquierda
131 131
 void Dialog::on_diagonalleftButton_clicked()
132 132
 {
133 133
     ui->mainGrid->setTool("diagonal left");
@@ -137,7 +137,7 @@ void Dialog::on_diagonalleftButton_clicked()
137 137
 /// \~English
138 138
 /// \brief Sets the tool to Diagonal Right fill
139 139
 /// \~Spanish
140
-/// \brief Ajusta la herrramienta a llenar en diagonal a la derecha
140
+/// \brief Ajusta la herrramienta a llenar la diagonal hacia la derecha
141 141
 void Dialog::on_diagonalrightButton_clicked()
142 142
 {
143 143
     ui->mainGrid->setTool("diagonal right");

+ 3
- 3
dialog.h View File

@@ -83,14 +83,14 @@ private slots:
83 83
     /// \~English
84 84
     /// \brief Sets the tool to Diagonal Left fill
85 85
     /// \~Spanish
86
-    /// \brief Ajusta la herrramienta a llenar en diagonal a la izquierda
86
+    /// \brief Ajusta la herrramienta a llenar la diagonal hacia la izquierda
87 87
     void on_diagonalleftButton_clicked();
88 88
 
89 89
     /// \fn void Dialog::on_diagonalrightButton_clicked()
90 90
     /// \~English
91 91
     /// \brief Sets the tool to Diagonal Right fill
92 92
     /// \~Spanish
93
-    /// \brief Ajusta la herrramienta a llenar en diagonal a la derecha
93
+    /// \brief Ajusta la herrramienta a llenar la diagonal hacia la derecha
94 94
     void on_diagonalrightButton_clicked();
95 95
 
96 96
     /// \fn void Dialog::on_drawsquareButton_clicked()
@@ -148,7 +148,7 @@ private slots:
148 148
     /// \~English
149 149
     /// \brief  Enables the redo button
150 150
     /// \~Spanish
151
-    /// \brief Permite utilizar el boton de (rehacer)
151
+    /// \brief Permite utilizar el boton de rehacer (redo)
152 152
     void setRedo(bool cannot);
153 153
 
154 154
     void on_floodButton_clicked();

+ 13
- 13
grid.cpp View File

@@ -77,7 +77,7 @@ GridWidget::GridWidget(QWidget *parent):
77 77
 /// \param rowCount number of rows in the grid
78 78
 /// \param columnCount number of columns in the grid
79 79
 /// \param parent parent window
80
-/// \~English
80
+/// \~Spanish
81 81
 /// \brief Constructor que recibe el numero de filas y columnas en la cuadricula
82 82
 /// \param rowCount numero de filas en la cuadricula
83 83
 /// \param columnCount numero de columnas en la cuadricula
@@ -103,8 +103,8 @@ GridWidget::GridWidget(int rowCount, int columnCount, QWidget *parent):
103 103
 /// \~English
104 104
 /// \param tool choosen tool
105 105
 /// \brief Sets the tool
106
-/// \param tool herramienta escogida
107 106
 /// \~Spanish
107
+/// \param tool herramienta escogida
108 108
 /// \brief Ajusta la herramienta
109 109
 void GridWidget::setTool(QString tool){
110 110
     Tool = tool;
@@ -208,17 +208,17 @@ void GridWidget::mousePressEvent(QMouseEvent * event)
208 208
 /// the redo vector(newStates) and the last state in the undo vector(oldStates)
209 209
 /// is painted on the grid.
210 210
 /// \~Spanish
211
-/// \brief Cuando el boton es apretado el estado acutual es empujado en
212
-/// el vector(newStates) de redo y el ultimo estado en el vector(oldStates) undo es
213
-/// pintado en la cuadricula
211
+/// \brief Cuando el boton de deshacer (undo) es presionado el estado actual es empujado
212
+/// al vector(newStates) de rehacer (redo) y el ultimo estado del vector(oldStates) de 
213
+/// deshacer (undo) es pintado en la cuadricula
214 214
 void GridWidget::undo(){
215 215
 
216 216
     /* When the undo button is pressed the current state is pushed into
217 217
      * the redo vector and the last state in the undo vector is painted
218 218
      * on the grid.
219
-     * Cuando el boton undo es marcado el estado corriente es empujaro en
220
-     * el vector redo y el ultimo estado en el vector undo es pintado en la
221
-     * cuadricula
219
+     * Cuando el boton de deshacer (undo) es presionado  el estado corriente es empujado
220
+     * al vector de rehacer (redo) y el ultimo estado del vector de deshacer (undo) es
221
+     * pintado en la cuadricula
222 222
      */
223 223
 
224 224
     if (!oldStates.empty()){
@@ -238,9 +238,9 @@ void GridWidget::undo(){
238 238
 /// \brief When the redo button is pressed the current state is pushed into
239 239
 /// the undo vector(oldStates) and the last state in the redo vector(newStates)
240 240
 /// is painted on the grid.
241
-/// \~Spanish Cuando el boton redo es marcado el estado actual es empujado en
242
-/// el vector(oldStates) undo y el ultimo estado en el vector redo(newStates) es
243
-/// pintaod en el grid.
241
+/// \~Spanish Cuando el boton de rehacer (redo) es presionado el estado actual es empujado 
242
+/// al vector(oldStates) de deshacer (undo) y el último estado del vector (newStates) de 
243
+/// de rehacer (redo) es pintado en la cuadrícula.
244 244
 ///
245 245
 void GridWidget::redo(){
246 246
 
@@ -335,7 +335,7 @@ void GridWidget::switchOff(int x, int y)
335 335
 /// \~English
336 336
 /// \brief Clears the grid and sets it to its initial state
337 337
 /// \~Spanish
338
-/// \brief Limpa la cuadricula y la pone en su estado inicial.
338
+/// \brief Limpia la cuadricula y la pone en su estado inicial.
339 339
 void GridWidget::clear()
340 340
 {
341 341
     oldStates.push_back(mColors);
@@ -414,7 +414,7 @@ void GridWidget::drawGrid(QPaintDevice *device)
414 414
 /// \param x coordinate x of the cell in the grid.
415 415
 /// \param y coordinate y of the cell in the grid.
416 416
 /// \~Spanish
417
-/// \brief Esta funcion es llamada en cada evento de el mouse presionado dentro
417
+/// \brief Esta funcion es llamada en cada evento del mouse presionado dentro
418 418
 /// de la cuadricula.  Identifica la forma en que el grid va a ser pintado llamando
419 419
 /// la funcion del tool recibido en los parametros (dot, rowfill, column fill, diagonal, square,
420 420
 /// triangles and circles).

+ 15
- 15
grid.h View File

@@ -66,15 +66,15 @@ public:
66 66
     ///* Tool and ToolSize: Sets the Tool which is going to be used to draw the grid
67 67
     ///* frontColor: The color which will be used to paint to black
68 68
     ///* backColor: Current clicked square
69
-    ///* background: Sets the background color to white
69
+    ///* background: The background color to white
70 70
     /// \~English
71 71
     /// \brief Constructor por defecto. Las propiedades de el grid se ajustan como sigue:
72 72
     /// * mCellSize: Ajusta el tamano de la celda a 10px
73 73
     /// * mRowCount: Ajusta el numero de filas en la cuadricula a 39
74 74
     /// * ColumnCount: Ajusta el numero de columnas en el grid a 27
75
-    /// * Tool and ToolSize: Ajusta la herramiento que se va a utilizar para dibujar
75
+    /// * Tool and ToolSize: Ajusta la herramienta que se va a utilizar para dibujar
76 76
     /// el grid.
77
-    /// * frontColor: El color que se utilizara para pintar a negro
77
+    /// * frontColor: El color que se utilizara para pintar en negro
78 78
     /// * backColor: Cuadrado marcado actualmente
79 79
     /// * background: El color del fondo en blanco
80 80
     GridWidget(QWidget *parent);
@@ -85,7 +85,7 @@ public:
85 85
     /// \param rowCount number of rows
86 86
     /// \param columnCount number of columns
87 87
     /// \~Spanish
88
-    /// \brief Ajusta el numero de columnas y fileas de la cuadricula
88
+    /// \brief Ajusta el numero de columnas y filas de la cuadricula
89 89
     /// \param rowCount numero de filas
90 90
     /// \param columnCount numero de columnas
91 91
     void setGridSize(int rowCount, int columnCount);
@@ -126,7 +126,7 @@ public:
126 126
     /// \param x coordinate x of the cell in the grid
127 127
     /// \param y coordinate y of the cell in the grid
128 128
     /// \~Spanish
129
-    /// \brief Remueve la posicion dada del vector que representa
129
+    /// \brief Elimina la posicion dada del vector que representa
130 130
     /// las celdas pintadas en la cuadricula
131 131
     /// \param x coordenada x de la celda en el cuadricula
132 132
     /// \param y coordenada y de la celda en la cuadricula
@@ -155,7 +155,7 @@ public:
155 155
     /// \~English
156 156
     /// \brief Clears the grid and sets it to its initial state
157 157
     /// \~Spanish
158
-    /// \brief Limpa la cuadricula y la pone en su estado inicial.
158
+    /// \brief Limpia la cuadricula y la pone en su estado inicial.
159 159
     void clear();
160 160
 
161 161
     /// \fn void GridWidget::setCellSize(int size)
@@ -169,10 +169,10 @@ public:
169 169
 
170 170
     /// \fn void GridWidget::setTool(QString tool)
171 171
     /// \~English
172
-    /// \param tool choosen tool
172
+    /// \param tool chosen tool
173 173
     /// \brief Sets the tool
174
-    /// \param tool herramienta escogida
175 174
     /// \~Spanish
175
+    /// \param tool herramienta escogida
176 176
     /// \brief Ajusta la herramienta
177 177
     void setTool(QString tool);
178 178
 
@@ -209,11 +209,11 @@ public:
209 209
     /// It identifies the way the grid will be painted calling the function of the
210 210
     /// tool received in the parameters (dot, rowfill, column fill, diagonal, square,
211 211
     /// triangles and circles).
212
-    /// \param tool the tool to be called by the funtion
212
+    /// \param tool the tool to be called by the function
213 213
     /// \param x coordinate x of the cell in the grid.
214 214
     /// \param y coordinate y of the cell in the grid.
215 215
     /// \~Spanish
216
-    /// \brief Esta funcion es llamada en cada evento de el mouse presionado dentro
216
+    /// \brief Esta funcion es llamada en cada evento del mouse presionado dentro
217 217
     /// de la cuadricula.  Identifica la forma en que el grid va a ser pintado llamando
218 218
     /// la funcion del tool recibido en los parametros (dot, rowfill, column fill, diagonal, square,
219 219
     /// triangles and circles).
@@ -267,7 +267,7 @@ public:
267 267
     /// \param toolColor color of the cells painted by the tool
268 268
     /// \~Spanish
269 269
     /// \brief Recibe las coordenadas de la cuadricula donde el usuario marco
270
-    /// y pinta (desde ese punto hacia la arriba o abajo) la columna mas larga del mismo color
270
+    /// y pinta (desde ese punto hacia arriba o abajo) la columna mas larga del mismo color
271 271
     /// de la celda que fue marcada con el color de la herramienta.
272 272
     /// \param x coordenada x de la celda en la cuadricula
273 273
     /// \param y coordenada y de la celda en la cuadricula
@@ -370,9 +370,9 @@ public:
370 370
     /// the redo vector(newStates) and the last state in the undo vector(oldStates)
371 371
     /// is painted on the grid.
372 372
     /// \~Spanish
373
-    /// \brief Cuando el boton es apretado el estado acutual es empujado en
374
-    /// el vector(newStates) de redo y el ultimo estado en el vector(oldStates) undo es
375
-    /// pintado en la cuadricula
373
+    /// \brief Cuando el boton de deshacer (undo) es presionado el estado actual es empujado 
374
+    /// al vector(newStates) de rehacer (redo) y el ultimo estado del vector(oldStates) de
375
+    /// deshacer (undo) es pintado en la cuadricula
376 376
     void undo();
377 377
 
378 378
 
@@ -424,7 +424,7 @@ protected:
424 424
     /// its parent receives a repaint signal.
425 425
     /// \param event received event reference
426 426
     /// \~Spanish
427
-    /// \brief Esta funcion es invocada automaticmente cada ves que el widget o
427
+    /// \brief Esta funcion es invocada automaticmente cada vez que el widget o
428 428
     /// el padre recibe una senal de repintar.
429 429
     /// \param event referencia a un evento recibido
430 430
     virtual void paintEvent(QPaintEvent *);

+ 4
- 4
tools.cpp View File

@@ -15,7 +15,7 @@ void GridWidget::Dot(int x, int y, QColor toolColor){
15 15
 
16 16
 // Receives the x,y grid coordinates and the color of cell where the user
17 17
 // clicked. Paints the row (from that point left and right) of color toolColor until
18
-// it hits a cell of a different color than that one clicked.
18
+// it hits a cell of a different color than the one clicked.
19 19
 
20 20
 void GridWidget::RowMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
21 21
      for (int i = x; i<getGridColumns() && (getCellColor(i,y) == colorClicked) ; i++)
@@ -28,7 +28,7 @@ void GridWidget::RowMajorFill(int x, int y, QColor colorClicked, QColor toolColo
28 28
 
29 29
 // Receives the grid x,y coordinates and the color of cell where the user
30 30
 // clicked. Paints the column (from that point up and down) of color toolColor until
31
-// it hits a cell of a different color than that one clicked.
31
+// it hits a cell of a different color than the one clicked.
32 32
 
33 33
 void GridWidget::ColMajorFill(int x, int y, QColor colorClicked, QColor toolColor){
34 34
 
@@ -37,7 +37,7 @@ void GridWidget::ColMajorFill(int x, int y, QColor colorClicked, QColor toolColo
37 37
 
38 38
 // Receives the grid x,y coordinates and the color of cell where the user
39 39
 // clicked. Paints a left-diagonal of color toolColor until it hits a cell
40
-// of a different color than that one clicked.
40
+// of a different color than the one clicked.
41 41
 
42 42
 void GridWidget::DiagonalLeft(int x, int y, QColor colorClicked, QColor toolColor){
43 43
 
@@ -46,7 +46,7 @@ void GridWidget::DiagonalLeft(int x, int y, QColor colorClicked, QColor toolColo
46 46
 
47 47
 // Receives the grid x,y coordinates and the color of the cell where the user
48 48
 // clicked. Paints a right-diagonal of color toolColor until it hits a cell
49
-// of a different color than that one clicked.
49
+// of a different color than the one clicked.
50 50
 
51 51
 void GridWidget::DiagonalRight(int x, int y, QColor colorClicked, QColor toolColor){
52 52