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