| 1 |
import QtQuick 2.0 |
| 2 |
|
| 3 |
Rectangle { |
| 4 |
id: r_0000 |
| 5 |
width: 320 |
| 6 |
height: 480 |
| 7 |
color: "white" |
| 8 |
|
| 9 |
property int standardRectWidth: 22 |
| 10 |
property int standardRectHeight: 40 |
| 11 |
property int xOffsetPlacement: 10 |
| 12 |
property int yOffsetPlacement: 18 |
| 13 |
property int borderSize: 2 |
| 14 |
property int yPlacementRow_0: 0 |
| 15 |
property int yPlacementRow_1: (standardRectHeight+yOffsetPlacement) |
| 16 |
property int yPlacementRow_2: yPlacementRow_1 + (standardRectHeight+yOffsetPlacement) |
| 17 |
property int yPlacementRow_3: yPlacementRow_2 + (standardRectHeight+yOffsetPlacement) |
| 18 |
property int yPlacementRow_4: yPlacementRow_3 + (standardRectHeight+yOffsetPlacement) |
| 19 |
property int yPlacementRow_5: yPlacementRow_4 + (standardRectHeight+yOffsetPlacement) |
| 20 |
property int yPlacementRow_6: yPlacementRow_5 + (standardRectHeight+yOffsetPlacement) |
| 21 |
property int yPlacementRow_7: yPlacementRow_6 + (standardRectHeight+yOffsetPlacement) |
| 22 |
property int yPlacementRow_8: yPlacementRow_7 + (standardRectHeight+yOffsetPlacement) |
| 23 |
property int yPlacementRow_9: yPlacementRow_8 + (standardRectHeight+yOffsetPlacement) |
| 24 |
property int xPlacementCol_0: 0 |
| 25 |
property int xPlacementCol_1: xPlacementCol_0 + (standardRectWidth+xOffsetPlacement) |
| 26 |
property int xPlacementCol_2: xPlacementCol_1 + (standardRectWidth+xOffsetPlacement) |
| 27 |
property int xPlacementCol_3: xPlacementCol_2 + (standardRectWidth+xOffsetPlacement) |
| 28 |
property int xPlacementCol_4: xPlacementCol_3 + (standardRectWidth+xOffsetPlacement) |
| 29 |
property int xPlacementCol_5: xPlacementCol_4 + (standardRectWidth+xOffsetPlacement) |
| 30 |
property int xPlacementCol_6: xPlacementCol_5 + (standardRectWidth+xOffsetPlacement) |
| 31 |
property int xPlacementCol_7: xPlacementCol_6 + (standardRectWidth+xOffsetPlacement) |
| 32 |
property int xPlacementCol_8: xPlacementCol_7 + (standardRectWidth+xOffsetPlacement) |
| 33 |
property int xPlacementCol_9: xPlacementCol_8 + (standardRectWidth+xOffsetPlacement) |
| 34 |
property bool smoothingOn: false |
| 35 |
property real scaleFactor: 1.2 |
| 36 |
|
| 37 |
|
| 38 |
//Test basic color |
| 39 |
Rectangle{ |
| 40 |
id: r_0001 |
| 41 |
smooth: smoothingOn |
| 42 |
scale: scaleFactor |
| 43 |
x: xPlacementCol_0 |
| 44 |
y: yPlacementRow_0 |
| 45 |
width: r_0000.standardRectWidth |
| 46 |
height: r_0000.standardRectHeight |
| 47 |
color: "red" |
| 48 |
} |
| 49 |
Rectangle{ |
| 50 |
id: r_0002 |
| 51 |
smooth: smoothingOn |
| 52 |
scale: scaleFactor |
| 53 |
x: xPlacementCol_1 |
| 54 |
y: yPlacementRow_0 |
| 55 |
width: standardRectWidth |
| 56 |
height: standardRectHeight |
| 57 |
color: "orange" |
| 58 |
} |
| 59 |
Rectangle{ |
| 60 |
id: r_0003 |
| 61 |
smooth: smoothingOn |
| 62 |
scale: scaleFactor |
| 63 |
x: xPlacementCol_2 |
| 64 |
y: yPlacementRow_0 |
| 65 |
width: standardRectWidth |
| 66 |
height: standardRectHeight |
| 67 |
color: "yellow" |
| 68 |
} |
| 69 |
Rectangle{ |
| 70 |
id: r_0004 |
| 71 |
smooth: smoothingOn |
| 72 |
scale: scaleFactor |
| 73 |
x: xPlacementCol_3 |
| 74 |
y: yPlacementRow_0 |
| 75 |
width: standardRectWidth |
| 76 |
height: standardRectHeight |
| 77 |
color: "green" |
| 78 |
} |
| 79 |
Rectangle { |
| 80 |
id: r_0005 |
| 81 |
smooth: smoothingOn |
| 82 |
scale: scaleFactor |
| 83 |
x: xPlacementCol_4 |
| 84 |
y: yPlacementRow_0 |
| 85 |
width: standardRectWidth |
| 86 |
height: standardRectHeight |
| 87 |
color: "blue" |
| 88 |
} |
| 89 |
Rectangle{ |
| 90 |
id: r_0006 |
| 91 |
smooth: smoothingOn |
| 92 |
scale: scaleFactor |
| 93 |
x: xPlacementCol_5 |
| 94 |
y: yPlacementRow_0 |
| 95 |
width: standardRectWidth |
| 96 |
height: standardRectHeight |
| 97 |
color: "indigo" |
| 98 |
} |
| 99 |
Rectangle{ |
| 100 |
id: r_0007 |
| 101 |
smooth: smoothingOn |
| 102 |
scale: scaleFactor |
| 103 |
x: xPlacementCol_6 |
| 104 |
y: yPlacementRow_0 |
| 105 |
width: standardRectWidth |
| 106 |
height: standardRectHeight |
| 107 |
color: "violet" |
| 108 |
} |
| 109 |
Rectangle{ |
| 110 |
id: r_0008 |
| 111 |
smooth: smoothingOn |
| 112 |
scale: scaleFactor |
| 113 |
x: xPlacementCol_7 |
| 114 |
y: yPlacementRow_0 |
| 115 |
width: standardRectWidth |
| 116 |
height: standardRectHeight |
| 117 |
color: "black" |
| 118 |
} |
| 119 |
Rectangle{ |
| 120 |
id: r_0009 |
| 121 |
smooth: smoothingOn |
| 122 |
scale: scaleFactor |
| 123 |
x: xPlacementCol_8 |
| 124 |
y: yPlacementRow_0 |
| 125 |
width: standardRectWidth |
| 126 |
height: standardRectHeight |
| 127 |
color: "dark grey" |
| 128 |
} |
| 129 |
Rectangle{ |
| 130 |
id: r_0010 |
| 131 |
smooth: smoothingOn |
| 132 |
scale: scaleFactor |
| 133 |
x: xPlacementCol_9 |
| 134 |
y: yPlacementRow_0 |
| 135 |
width: standardRectWidth |
| 136 |
height: standardRectHeight |
| 137 |
color: "light grey" |
| 138 |
} |
| 139 |
Text{ |
| 140 |
id: annotation_row0 |
| 141 |
z: 1 |
| 142 |
text: "UNSMOOTHED SCALED RECTANGLES" |
| 143 |
font.family: "Arial" |
| 144 |
font.pointSize: 15 |
| 145 |
color: "black" |
| 146 |
font.bold: true |
| 147 |
anchors.verticalCenter : r_0001.verticalCenter |
| 148 |
} |
| 149 |
|
| 150 |
//Test borders |
| 151 |
Rectangle{ |
| 152 |
id: r_0011 |
| 153 |
x: xPlacementCol_0 |
| 154 |
y: yPlacementRow_1 |
| 155 |
smooth: smoothingOn |
| 156 |
scale: scaleFactor |
| 157 |
width: standardRectWidth |
| 158 |
height: standardRectHeight |
| 159 |
color: "red" |
| 160 |
border.width: borderSize |
| 161 |
border.color: "orange" |
| 162 |
|
| 163 |
} |
| 164 |
Rectangle{ |
| 165 |
id: r_0012 |
| 166 |
x: xPlacementCol_1 |
| 167 |
y: yPlacementRow_1 |
| 168 |
smooth: smoothingOn |
| 169 |
scale: scaleFactor |
| 170 |
width: standardRectWidth |
| 171 |
height: standardRectHeight |
| 172 |
color: "orange" |
| 173 |
border.width: borderSize |
| 174 |
border.color: "yellow" |
| 175 |
|
| 176 |
} |
| 177 |
Rectangle{ |
| 178 |
id: r_0013 |
| 179 |
x: xPlacementCol_2 |
| 180 |
y: yPlacementRow_1 |
| 181 |
smooth: smoothingOn |
| 182 |
scale: scaleFactor |
| 183 |
width: standardRectWidth |
| 184 |
height: standardRectHeight |
| 185 |
color: "yellow" |
| 186 |
border.width: borderSize |
| 187 |
border.color: "green" |
| 188 |
|
| 189 |
} |
| 190 |
Rectangle{ |
| 191 |
id: r_0014 |
| 192 |
x: xPlacementCol_3 |
| 193 |
y: yPlacementRow_1 |
| 194 |
smooth: smoothingOn |
| 195 |
scale: scaleFactor |
| 196 |
width: standardRectWidth |
| 197 |
height: standardRectHeight |
| 198 |
color: "green" |
| 199 |
border.width: borderSize |
| 200 |
border.color: "blue" |
| 201 |
|
| 202 |
} |
| 203 |
Rectangle{ |
| 204 |
id: r_0015 |
| 205 |
x: xPlacementCol_4 |
| 206 |
y: yPlacementRow_1 |
| 207 |
smooth: smoothingOn |
| 208 |
scale: scaleFactor |
| 209 |
width: standardRectWidth |
| 210 |
height: standardRectHeight |
| 211 |
color: "blue" |
| 212 |
border.width: borderSize |
| 213 |
border.color: "indigo" |
| 214 |
|
| 215 |
} |
| 216 |
Rectangle{ |
| 217 |
id: r_0016 |
| 218 |
x: xPlacementCol_5 |
| 219 |
y: yPlacementRow_1 |
| 220 |
smooth: smoothingOn |
| 221 |
scale: scaleFactor |
| 222 |
width: standardRectWidth |
| 223 |
height: standardRectHeight |
| 224 |
color: "indigo" |
| 225 |
border.width: borderSize |
| 226 |
border.color: "violet" |
| 227 |
|
| 228 |
} |
| 229 |
Rectangle{ |
| 230 |
id: r_0017 |
| 231 |
x: xPlacementCol_6 |
| 232 |
y: yPlacementRow_1 |
| 233 |
smooth: smoothingOn |
| 234 |
scale: scaleFactor |
| 235 |
width: standardRectWidth |
| 236 |
height: standardRectHeight |
| 237 |
color: "violet" |
| 238 |
border.width: borderSize |
| 239 |
border.color: "black" |
| 240 |
|
| 241 |
} |
| 242 |
Rectangle{ |
| 243 |
id: r_0018 |
| 244 |
x: xPlacementCol_7 |
| 245 |
y: yPlacementRow_1 |
| 246 |
smooth: smoothingOn |
| 247 |
scale: scaleFactor |
| 248 |
width: standardRectWidth |
| 249 |
height: standardRectHeight |
| 250 |
color: "black" |
| 251 |
border.width: borderSize |
| 252 |
border.color: "dark grey" |
| 253 |
|
| 254 |
} |
| 255 |
Rectangle{ |
| 256 |
id: r_0019 |
| 257 |
x: xPlacementCol_8 |
| 258 |
y: yPlacementRow_1 |
| 259 |
smooth: smoothingOn |
| 260 |
scale: scaleFactor |
| 261 |
width: standardRectWidth |
| 262 |
height: standardRectHeight |
| 263 |
color: "dark grey" |
| 264 |
border.width: borderSize |
| 265 |
border.color: "light grey" |
| 266 |
|
| 267 |
} |
| 268 |
Rectangle{ |
| 269 |
id: r_0020 |
| 270 |
x: xPlacementCol_9 |
| 271 |
y: yPlacementRow_1 |
| 272 |
smooth: smoothingOn |
| 273 |
scale: scaleFactor |
| 274 |
width: standardRectWidth |
| 275 |
height: standardRectHeight |
| 276 |
color: "light grey" |
| 277 |
border.width: borderSize |
| 278 |
border.color: "red" |
| 279 |
|
| 280 |
} |
| 281 |
Text{ |
| 282 |
id: annotation_row1 |
| 283 |
z: 1 |
| 284 |
text: "UNSMOOTHED SCALED BORDERS" |
| 285 |
font.family: "Arial" |
| 286 |
font.pointSize: 15 |
| 287 |
color: "black" |
| 288 |
font.bold: true |
| 289 |
anchors.verticalCenter : r_0011.verticalCenter |
| 290 |
} |
| 291 |
|
| 292 |
//Test Gradients |
| 293 |
Rectangle{ |
| 294 |
id: r_0021 |
| 295 |
x: xPlacementCol_0 |
| 296 |
y: yPlacementRow_2 |
| 297 |
smooth: smoothingOn |
| 298 |
scale: scaleFactor |
| 299 |
width: standardRectWidth |
| 300 |
height: standardRectHeight |
| 301 |
color: "red" |
| 302 |
gradient: Gradient{ |
| 303 |
GradientStop{ position: 1.0; color: r_0021.color } |
| 304 |
GradientStop{ position: 0.0; color: "white" } |
| 305 |
} |
| 306 |
|
| 307 |
} |
| 308 |
Rectangle{ |
| 309 |
id: r_0022 |
| 310 |
x: xPlacementCol_1 |
| 311 |
y: yPlacementRow_2 |
| 312 |
smooth: smoothingOn |
| 313 |
scale: scaleFactor |
| 314 |
width: standardRectWidth |
| 315 |
height: standardRectHeight |
| 316 |
color: "orange" |
| 317 |
gradient: Gradient{ |
| 318 |
GradientStop{ position: 1.0; color: r_0022.color } |
| 319 |
GradientStop{ position: 0.0; color: "white" } |
| 320 |
} |
| 321 |
|
| 322 |
} |
| 323 |
Rectangle{ |
| 324 |
id: r_0023 |
| 325 |
x: xPlacementCol_2 |
| 326 |
y: yPlacementRow_2 |
| 327 |
smooth: smoothingOn |
| 328 |
scale: scaleFactor |
| 329 |
width: standardRectWidth |
| 330 |
height: standardRectHeight |
| 331 |
color: "yellow" |
| 332 |
gradient: Gradient{ |
| 333 |
GradientStop{ position: 1.0; color: r_0023.color } |
| 334 |
GradientStop{ position: 0.0; color: "white" } |
| 335 |
} |
| 336 |
|
| 337 |
} |
| 338 |
Rectangle{ |
| 339 |
id: r_0024 |
| 340 |
x: xPlacementCol_3 |
| 341 |
y: yPlacementRow_2 |
| 342 |
smooth: smoothingOn |
| 343 |
scale: scaleFactor |
| 344 |
width: standardRectWidth |
| 345 |
height: standardRectHeight |
| 346 |
color: "green" |
| 347 |
gradient: Gradient{ |
| 348 |
GradientStop{ position: 1.0; color: r_0024.color } |
| 349 |
GradientStop{ position: 0.0; color: "white" } |
| 350 |
} |
| 351 |
|
| 352 |
} |
| 353 |
Rectangle{ |
| 354 |
id: r_0025 |
| 355 |
x: xPlacementCol_4 |
| 356 |
y: yPlacementRow_2 |
| 357 |
smooth: smoothingOn |
| 358 |
scale: scaleFactor |
| 359 |
width: standardRectWidth |
| 360 |
height: standardRectHeight |
| 361 |
color: "blue" |
| 362 |
gradient: Gradient{ |
| 363 |
GradientStop{ position: 1.0; color: r_0025.color } |
| 364 |
GradientStop{ position: 0.0; color: "white" } |
| 365 |
} |
| 366 |
|
| 367 |
} |
| 368 |
Rectangle{ |
| 369 |
id: r_0026 |
| 370 |
x: xPlacementCol_5 |
| 371 |
y: yPlacementRow_2 |
| 372 |
smooth: smoothingOn |
| 373 |
scale: scaleFactor |
| 374 |
width: standardRectWidth |
| 375 |
height: standardRectHeight |
| 376 |
color: "indigo" |
| 377 |
gradient: Gradient{ |
| 378 |
GradientStop{ position: 1.0; color: r_0026.color } |
| 379 |
GradientStop{ position: 0.0; color: "white" } |
| 380 |
} |
| 381 |
|
| 382 |
} |
| 383 |
Rectangle{ |
| 384 |
id: r_0027 |
| 385 |
x: xPlacementCol_6 |
| 386 |
y: yPlacementRow_2 |
| 387 |
smooth: smoothingOn |
| 388 |
scale: scaleFactor |
| 389 |
width: standardRectWidth |
| 390 |
height: standardRectHeight |
| 391 |
color: "violet" |
| 392 |
gradient: Gradient{ |
| 393 |
GradientStop{ position: 1.0; color: r_0027.color } |
| 394 |
GradientStop{ position: 0.0; color: "white" } |
| 395 |
} |
| 396 |
|
| 397 |
} |
| 398 |
Rectangle{ |
| 399 |
id: r_0028 |
| 400 |
x: xPlacementCol_7 |
| 401 |
y: yPlacementRow_2 |
| 402 |
smooth: smoothingOn |
| 403 |
scale: scaleFactor |
| 404 |
width: standardRectWidth |
| 405 |
height: standardRectHeight |
| 406 |
color: "black" |
| 407 |
gradient: Gradient{ |
| 408 |
GradientStop{ position: 1.0; color: r_0028.color } |
| 409 |
GradientStop{ position: 0.0; color: "white" } |
| 410 |
} |
| 411 |
|
| 412 |
} |
| 413 |
Rectangle{ |
| 414 |
id: r_0029 |
| 415 |
x: xPlacementCol_8 |
| 416 |
y: yPlacementRow_2 |
| 417 |
smooth: smoothingOn |
| 418 |
scale: scaleFactor |
| 419 |
width: standardRectWidth |
| 420 |
height: standardRectHeight |
| 421 |
color: "dark grey" |
| 422 |
gradient: Gradient{ |
| 423 |
GradientStop{ position: 1.0; color: r_0029.color } |
| 424 |
GradientStop{ position: 0.0; color: "white" } |
| 425 |
} |
| 426 |
|
| 427 |
} |
| 428 |
Rectangle{ |
| 429 |
id: r_0030 |
| 430 |
x: xPlacementCol_9 |
| 431 |
y: yPlacementRow_2 |
| 432 |
smooth: smoothingOn |
| 433 |
scale: scaleFactor |
| 434 |
width: standardRectWidth |
| 435 |
height: standardRectHeight |
| 436 |
color: "light grey" |
| 437 |
gradient: Gradient{ |
| 438 |
GradientStop{ position: 1.0; color: r_0030.color } |
| 439 |
GradientStop{ position: 0.0; color: "white" } |
| 440 |
} |
| 441 |
|
| 442 |
} |
| 443 |
Text{ |
| 444 |
id: annotation_row2 |
| 445 |
z: 1 |
| 446 |
text: "UNSMOOTHED SCALED GRADIENTS" |
| 447 |
font.family: "Arial" |
| 448 |
font.pointSize: 15 |
| 449 |
color: "black" |
| 450 |
font.bold: true |
| 451 |
anchors.verticalCenter : r_0021.verticalCenter |
| 452 |
} |
| 453 |
|
| 454 |
//Test radius |
| 455 |
Rectangle{ |
| 456 |
id: r_0031 |
| 457 |
x: xPlacementCol_0 |
| 458 |
y: yPlacementRow_3 |
| 459 |
smooth: smoothingOn |
| 460 |
scale: scaleFactor |
| 461 |
width: r_0000.standardRectWidth |
| 462 |
height: r_0000.standardRectHeight |
| 463 |
color: "red" |
| 464 |
radius: 1 |
| 465 |
|
| 466 |
} |
| 467 |
Rectangle{ |
| 468 |
id: r_0032 |
| 469 |
x: xPlacementCol_1 |
| 470 |
y: yPlacementRow_3 |
| 471 |
smooth: smoothingOn |
| 472 |
scale: scaleFactor |
| 473 |
width: standardRectWidth |
| 474 |
height: standardRectHeight |
| 475 |
color: "orange" |
| 476 |
radius: 2 |
| 477 |
|
| 478 |
} |
| 479 |
Rectangle{ |
| 480 |
id: r_0033 |
| 481 |
x: xPlacementCol_2 |
| 482 |
y: yPlacementRow_3 |
| 483 |
smooth: smoothingOn |
| 484 |
scale: scaleFactor |
| 485 |
width: standardRectWidth |
| 486 |
height: standardRectHeight |
| 487 |
color: "yellow" |
| 488 |
radius: 3 |
| 489 |
|
| 490 |
} |
| 491 |
Rectangle{ |
| 492 |
id: r_0034 |
| 493 |
x: xPlacementCol_3 |
| 494 |
y: yPlacementRow_3 |
| 495 |
smooth: smoothingOn |
| 496 |
scale: scaleFactor |
| 497 |
width: standardRectWidth |
| 498 |
height: standardRectHeight |
| 499 |
color: "green" |
| 500 |
radius: 4 |
| 501 |
|
| 502 |
} |
| 503 |
Rectangle{ |
| 504 |
id: r_0035 |
| 505 |
x: xPlacementCol_4 |
| 506 |
y: yPlacementRow_3 |
| 507 |
smooth: smoothingOn |
| 508 |
scale: scaleFactor |
| 509 |
width: standardRectWidth |
| 510 |
height: standardRectHeight |
| 511 |
color: "blue" |
| 512 |
radius: 5 |
| 513 |
|
| 514 |
} |
| 515 |
Rectangle{ |
| 516 |
id: r_0036 |
| 517 |
x: xPlacementCol_5 |
| 518 |
y: yPlacementRow_3 |
| 519 |
smooth: smoothingOn |
| 520 |
scale: scaleFactor |
| 521 |
width: standardRectWidth |
| 522 |
height: standardRectHeight |
| 523 |
color: "indigo" |
| 524 |
radius: 6 |
| 525 |
|
| 526 |
} |
| 527 |
Rectangle{ |
| 528 |
x: xPlacementCol_6 |
| 529 |
y: yPlacementRow_3 |
| 530 |
id: r_0037 |
| 531 |
smooth: smoothingOn |
| 532 |
scale: scaleFactor |
| 533 |
width: standardRectWidth |
| 534 |
height: standardRectHeight |
| 535 |
color: "violet" |
| 536 |
radius: 7 |
| 537 |
|
| 538 |
} |
| 539 |
Rectangle{ |
| 540 |
x: xPlacementCol_7 |
| 541 |
y: yPlacementRow_3 |
| 542 |
id: r_0038 |
| 543 |
smooth: smoothingOn |
| 544 |
scale: scaleFactor |
| 545 |
width: standardRectWidth |
| 546 |
height: standardRectHeight |
| 547 |
color: "black" |
| 548 |
radius: 8 |
| 549 |
|
| 550 |
} |
| 551 |
Rectangle{ |
| 552 |
x: xPlacementCol_8 |
| 553 |
y: yPlacementRow_3 |
| 554 |
id: r_0039 |
| 555 |
smooth: smoothingOn |
| 556 |
scale: scaleFactor |
| 557 |
width: standardRectWidth |
| 558 |
height: standardRectHeight |
| 559 |
color: "dark grey" |
| 560 |
radius: 9 |
| 561 |
|
| 562 |
} |
| 563 |
Rectangle{ |
| 564 |
x: xPlacementCol_9 |
| 565 |
y: yPlacementRow_3 |
| 566 |
id: r_0040 |
| 567 |
smooth: smoothingOn |
| 568 |
scale: scaleFactor |
| 569 |
width: standardRectWidth |
| 570 |
height: standardRectHeight |
| 571 |
color: "light grey" |
| 572 |
radius: 10 |
| 573 |
|
| 574 |
} |
| 575 |
Text{ |
| 576 |
id: annotation_row3 |
| 577 |
z: 1 |
| 578 |
text: "UNSMOOTHED SCALED RADIUS" |
| 579 |
font.family: "Arial" |
| 580 |
font.pointSize: 15 |
| 581 |
color: "black" |
| 582 |
font.bold: true |
| 583 |
anchors.verticalCenter : r_0031.verticalCenter |
| 584 |
} |
| 585 |
} |
| 586 |
|