QmlTest.qml 26 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1 2 3 4 5 6 7 8 9
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2

import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0

Rectangle {

10
    property var palette: QGCPalette { colorGroupEnabled: true }
11
    color: "white"
Don Gagne's avatar
Don Gagne committed
12

Don Gagne's avatar
Don Gagne committed
13
    Column {
Don Gagne's avatar
Don Gagne committed
14

dogmaphobic's avatar
dogmaphobic committed
15 16 17 18 19
        Rectangle {
            width:  parent.width
            height: themeChoice.height * 2
            color:  palette.window
            QGCLabel {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
20
                text: qsTr("Window Color")
dogmaphobic's avatar
dogmaphobic committed
21 22 23
                anchors.left:           parent.left
                anchors.leftMargin:     20
                anchors.verticalCenter: parent.horizontalCenter
Don Gagne's avatar
Don Gagne committed
24
            }
dogmaphobic's avatar
dogmaphobic committed
25 26 27 28 29 30 31
            Row {
                id: themeChoice
                anchors.centerIn: parent
                anchors.margins: 20
                spacing:         20
                ExclusiveGroup { id: themeGroup }
                QGCRadioButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
32
                    text: qsTr("Light")
dogmaphobic's avatar
dogmaphobic committed
33 34 35 36 37
                    checked: palette.globalTheme === QGCPalette.Light
                    exclusiveGroup: themeGroup
                    onClicked: { palette.globalTheme = QGCPalette.Light }
                }
                QGCRadioButton {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
38
                    text: qsTr("Dark")
dogmaphobic's avatar
dogmaphobic committed
39 40 41 42
                    checked: palette.globalTheme === QGCPalette.Dark
                    exclusiveGroup: themeGroup
                    onClicked: { palette.globalTheme = QGCPalette.Dark }
                }
Don Gagne's avatar
Don Gagne committed
43
            }
Don Gagne's avatar
Don Gagne committed
44 45 46 47 48 49
        }

        Row {
            spacing: 30

            Grid {
50
                columns: 5
Don Gagne's avatar
Don Gagne committed
51 52 53 54 55 56 57 58 59 60
                spacing: 5

                Component {
                    id: rowHeader

                    Text {
                        width: 180
                        height: 20
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignVCenter
61
                        color: "black"
Don Gagne's avatar
Don Gagne committed
62 63 64
                        text: parent.text
                    }
                }
Don Gagne's avatar
Don Gagne committed
65

Don Gagne's avatar
Don Gagne committed
66 67 68 69 70
                // Header row
                Loader {
                    sourceComponent: rowHeader
                    property var text: ""
                }
Don Gagne's avatar
Don Gagne committed
71
                Text {
Don Gagne's avatar
Don Gagne committed
72
                    width: 80
Don Gagne's avatar
Don Gagne committed
73
                    height: 20
74
                    color: "black"
Don Gagne's avatar
Don Gagne committed
75
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
76
                    text: qsTr("Disabled")
Don Gagne's avatar
Don Gagne committed
77 78 79 80
                }
                Text {
                    width: 80
                    height: 20
81
                    color: "black"
Don Gagne's avatar
Don Gagne committed
82
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
83
                    text: qsTr("Enabled")
Don Gagne's avatar
Don Gagne committed
84
                }
85 86 87 88 89
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
90
                    text: qsTr("Value")
91 92 93 94 95 96
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
97
                    text: qsTr("Value")
98
                }
Don Gagne's avatar
Don Gagne committed
99

Don Gagne's avatar
Don Gagne committed
100 101 102 103 104
                // window
                Loader {
                    sourceComponent: rowHeader
                    property var text: "window"
                }
105
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
106
                    property var palette: QGCPalette { colorGroupEnabled: false }
107 108
                    color: palette.window
                    onColorSelected: palette.window = color
Don Gagne's avatar
Don Gagne committed
109
                }
110
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
111
                    property var palette: QGCPalette { colorGroupEnabled: true }
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
                    color: palette.window
                    onColorSelected: palette.window = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.window
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    text: palette.window
Don Gagne's avatar
Don Gagne committed
130
                }
Don Gagne's avatar
Don Gagne committed
131

Don Gagne's avatar
Don Gagne committed
132 133 134 135 136
                // windowShade
                Loader {
                    sourceComponent: rowHeader
                    property var text: "windowShade"
                }
137
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
138
                    property var palette: QGCPalette { colorGroupEnabled: false }
139 140
                    color: palette.windowShade
                    onColorSelected: palette.windowShade = color
Don Gagne's avatar
Don Gagne committed
141
                }
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.windowShade
                    onColorSelected: palette.windowShade = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.windowShade
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
160
                    property var palette: QGCPalette { colorGroupEnabled: true }
161
                    text: palette.windowShade
Don Gagne's avatar
Don Gagne committed
162
                }
Don Gagne's avatar
Don Gagne committed
163

Don Gagne's avatar
Don Gagne committed
164 165 166 167 168
                // windowShadeDark
                Loader {
                    sourceComponent: rowHeader
                    property var text: "windowShadeDark"
                }
169
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
170
                    property var palette: QGCPalette { colorGroupEnabled: false }
171 172
                    color: palette.windowShadeDark
                    onColorSelected: palette.windowShadeDark = color
Don Gagne's avatar
Don Gagne committed
173
                }
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.windowShadeDark
                    onColorSelected: palette.windowShadeDark = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.windowShadeDark
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
192
                    property var palette: QGCPalette { colorGroupEnabled: true }
193
                    text: palette.windowShadeDark
Don Gagne's avatar
Don Gagne committed
194
                }
Don Gagne's avatar
Don Gagne committed
195

Don Gagne's avatar
Don Gagne committed
196 197 198 199 200
                // text
                Loader {
                    sourceComponent: rowHeader
                    property var text: "text"
                }
201
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
202
                    property var palette: QGCPalette { colorGroupEnabled: false }
203 204
                    color: palette.text
                    onColorSelected: palette.text = color
Don Gagne's avatar
Don Gagne committed
205
                }
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.text
                    onColorSelected: palette.text = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.text
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
224
                    property var palette: QGCPalette { colorGroupEnabled: true }
225
                    text: palette.text
Don Gagne's avatar
Don Gagne committed
226
                }
Don Gagne's avatar
Don Gagne committed
227

Don Gagne's avatar
Don Gagne committed
228 229 230 231 232
                // button
                Loader {
                    sourceComponent: rowHeader
                    property var text: "button"
                }
233
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
234
                    property var palette: QGCPalette { colorGroupEnabled: false }
235 236
                    color: palette.button
                    onColorSelected: palette.button = color
Don Gagne's avatar
Don Gagne committed
237
                }
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.button
                    onColorSelected: palette.button = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.button
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
256
                    property var palette: QGCPalette { colorGroupEnabled: true }
257
                    text: palette.button
Don Gagne's avatar
Don Gagne committed
258
                }
Don Gagne's avatar
Don Gagne committed
259

Don Gagne's avatar
Don Gagne committed
260 261 262 263 264
                // buttonText
                Loader {
                    sourceComponent: rowHeader
                    property var text: "buttonText"
                }
265
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
266
                    property var palette: QGCPalette { colorGroupEnabled: false }
267 268
                    color: palette.buttonText
                    onColorSelected: palette.buttonText = color
Don Gagne's avatar
Don Gagne committed
269
                }
270
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
271
                    property var palette: QGCPalette { colorGroupEnabled: true }
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
                    color: palette.buttonText
                    onColorSelected: palette.buttonText = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.buttonText
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    text: palette.buttonText
Don Gagne's avatar
Don Gagne committed
290
                }
291

Don Gagne's avatar
Don Gagne committed
292 293 294 295 296
                // buttonHighlight
                Loader {
                    sourceComponent: rowHeader
                    property var text: "buttonHighlight"
                }
297
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
298
                    property var palette: QGCPalette { colorGroupEnabled: false }
299 300
                    color: palette.buttonHighlight
                    onColorSelected: palette.buttonHighlight = color
Don Gagne's avatar
Don Gagne committed
301
                }
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.buttonHighlight
                    onColorSelected: palette.buttonHighlight = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.buttonHighlight
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
320
                    property var palette: QGCPalette { colorGroupEnabled: true }
321
                    text: palette.buttonHighlight
Don Gagne's avatar
Don Gagne committed
322
                }
Don Gagne's avatar
Don Gagne committed
323

Don Gagne's avatar
Don Gagne committed
324 325 326 327 328
                // buttonHighlightText
                Loader {
                    sourceComponent: rowHeader
                    property var text: "buttonHighlightText"
                }
329
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
330
                    property var palette: QGCPalette { colorGroupEnabled: false }
331 332
                    color: palette.buttonHighlightText
                    onColorSelected: palette.buttonHighlightText = color
Don Gagne's avatar
Don Gagne committed
333
                }
334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.buttonHighlightText
                    onColorSelected: palette.buttonHighlightText = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.buttonHighlightText
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
352
                    property var palette: QGCPalette { colorGroupEnabled: true }
353
                    text: palette.buttonHighlightText
Don Gagne's avatar
Don Gagne committed
354
                }
Don Gagne's avatar
Don Gagne committed
355

Don Gagne's avatar
Don Gagne committed
356 357 358 359 360
                // primaryButton
                Loader {
                    sourceComponent: rowHeader
                    property var text: "primaryButton"
                }
361
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
362
                    property var palette: QGCPalette { colorGroupEnabled: false }
363 364
                    color: palette.primaryButton
                    onColorSelected: palette.primaryButton = color
Don Gagne's avatar
Don Gagne committed
365
                }
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.primaryButton
                    onColorSelected: palette.primaryButton = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.primaryButton
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
384
                    property var palette: QGCPalette { colorGroupEnabled: true }
385
                    text: palette.primaryButton
Don Gagne's avatar
Don Gagne committed
386
                }
Don Gagne's avatar
Don Gagne committed
387

Don Gagne's avatar
Don Gagne committed
388 389 390 391 392
                // primaryButtonText
                Loader {
                    sourceComponent: rowHeader
                    property var text: "primaryButtonText"
                }
393
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
394
                    property var palette: QGCPalette { colorGroupEnabled: false }
395 396
                    color: palette.primaryButtonText
                    onColorSelected: palette.primaryButtonText = color
Don Gagne's avatar
Don Gagne committed
397
                }
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.primaryButtonText
                    onColorSelected: palette.primaryButtonText = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.primaryButtonText
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
416
                    property var palette: QGCPalette { colorGroupEnabled: true }
417
                    text: palette.primaryButtonText
Don Gagne's avatar
Don Gagne committed
418
                }
Don Gagne's avatar
Don Gagne committed
419

Don Gagne's avatar
Don Gagne committed
420 421 422 423 424
                // textField
                Loader {
                    sourceComponent: rowHeader
                    property var text: "textField"
                }
425
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
426
                    property var palette: QGCPalette { colorGroupEnabled: false }
427 428
                    color: palette.textField
                    onColorSelected: palette.textField = color
Don Gagne's avatar
Don Gagne committed
429
                }
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.textField
                    onColorSelected: palette.textField = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.textField
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
Don Gagne's avatar
Don Gagne committed
448
                    property var palette: QGCPalette { colorGroupEnabled: true }
449
                    text: palette.textField
Don Gagne's avatar
Don Gagne committed
450
                }
451

Don Gagne's avatar
Don Gagne committed
452 453 454 455 456
                // textFieldText
                Loader {
                    sourceComponent: rowHeader
                    property var text: "textFieldText"
                }
457
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
458
                    property var palette: QGCPalette { colorGroupEnabled: false }
459 460
                    color: palette.textFieldText
                    onColorSelected: palette.textFieldText = color
Don Gagne's avatar
Don Gagne committed
461
                }
462
                ClickableColor {
Don Gagne's avatar
Don Gagne committed
463
                    property var palette: QGCPalette { colorGroupEnabled: true }
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
                    color: palette.textFieldText
                    onColorSelected: palette.textFieldText = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.textFieldText
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    text: palette.textFieldText
Don Gagne's avatar
Don Gagne committed
482
                }
dogmaphobic's avatar
dogmaphobic committed
483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514

                // warningText
                Loader {
                    sourceComponent: rowHeader
                    property var text: "warningText"
                }
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    color: palette.warningText
                    onColorSelected: palette.warningText = color
                }
                ClickableColor {
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    color: palette.warningText
                    onColorSelected: palette.warningText = color
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: false }
                    text: palette.warningText
                }
                Text {
                    width: 80
                    height: 20
                    color: "black"
                    horizontalAlignment: Text.AlignHCenter
                    property var palette: QGCPalette { colorGroupEnabled: true }
                    text: palette.warningText
                }
Don Gagne's avatar
Don Gagne committed
515
            }
516

Don Gagne's avatar
Don Gagne committed
517 518 519
            Grid {
                columns: 3
                spacing: 10
Don Gagne's avatar
Don Gagne committed
520

Don Gagne's avatar
Don Gagne committed
521 522
                Component {
                    id: ctlRowHeader
Don Gagne's avatar
Don Gagne committed
523

Don Gagne's avatar
Don Gagne committed
524 525 526 527 528
                    Text {
                        width: 120
                        height: 20
                        horizontalAlignment: Text.AlignRight
                        verticalAlignment: Text.AlignVCenter
529
                        color: "black"
Don Gagne's avatar
Don Gagne committed
530 531 532
                        text: parent.text
                    }
                }
Don Gagne's avatar
Don Gagne committed
533 534


Don Gagne's avatar
Don Gagne committed
535 536 537 538 539
                // Header row
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: ""
                }
Don Gagne's avatar
Don Gagne committed
540
                Text {
Don Gagne's avatar
Don Gagne committed
541
                    width: 100
Don Gagne's avatar
Don Gagne committed
542
                    height: 20
543
                    color: "black"
Don Gagne's avatar
Don Gagne committed
544
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
545
                    text: qsTr("Enabled")
Don Gagne's avatar
Don Gagne committed
546 547 548 549
                }
                Text {
                    width: 100
                    height: 20
550
                    color: "black"
Don Gagne's avatar
Don Gagne committed
551
                    horizontalAlignment: Text.AlignHCenter
Tomaz Canabrava's avatar
Tomaz Canabrava committed
552
                    text: qsTr("Disabled")
Don Gagne's avatar
Don Gagne committed
553 554
                }

Don Gagne's avatar
Don Gagne committed
555 556 557 558 559 560 561 562
                // QGCLabel
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCLabel"
                }
                QGCLabel {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
563
                    text: qsTr("Label")
Don Gagne's avatar
Don Gagne committed
564 565 566 567
                }
                QGCLabel {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
568
                    text: qsTr("Label")
Don Gagne's avatar
Don Gagne committed
569 570
                    enabled: false
                }
Don Gagne's avatar
Don Gagne committed
571

Don Gagne's avatar
Don Gagne committed
572 573 574 575 576 577 578 579
                // QGCButton
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCButton"
                }
                QGCButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
580
                    text: qsTr("Button")
Don Gagne's avatar
Don Gagne committed
581 582 583 584
                }
                QGCButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
585
                    text: qsTr("Button")
Don Gagne's avatar
Don Gagne committed
586 587
                    enabled: false
                }
Don Gagne's avatar
Don Gagne committed
588

Don Gagne's avatar
Don Gagne committed
589 590 591 592 593 594 595 596 597
                // QGCButton - primary
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCButton(primary)"
                }
                QGCButton {
                    width: 100
                    height: 20
                    primary: true
Tomaz Canabrava's avatar
Tomaz Canabrava committed
598
                    text: qsTr("Button")
Don Gagne's avatar
Don Gagne committed
599 600 601 602
                }
                QGCButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
603
                    text: qsTr("Button")
Don Gagne's avatar
Don Gagne committed
604 605 606
                    primary: true
                    enabled: false
                }
607

608 609 610 611 612 613 614 615
                // QGCButton - menu
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCButton(menu)"
                }
                Menu {
                    id: buttonMenu
                    MenuItem {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
616
                        text: qsTr("Item 1")
617 618
                    }
                    MenuItem {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
619
                        text: qsTr("Item 2")
620 621
                    }
                    MenuItem {
Tomaz Canabrava's avatar
Tomaz Canabrava committed
622
                        text: qsTr("Item 3")
623 624 625 626 627
                    }
                }
                QGCButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
628
                    text: qsTr("Button")
629 630 631 632 633
                    menu: buttonMenu
                }
                QGCButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
634
                    text: qsTr("Button")
635 636 637 638
                    enabled: false
                    menu: buttonMenu
                }

Don Gagne's avatar
Don Gagne committed
639 640 641 642 643 644 645 646
                // QGCRadioButton
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCRadioButton"
                }
                QGCRadioButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
647
                    text: qsTr("Radio")
Don Gagne's avatar
Don Gagne committed
648 649 650 651
                }
                QGCRadioButton {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
652
                    text: qsTr("Radio")
Don Gagne's avatar
Don Gagne committed
653 654
                    enabled: false
                }
Don Gagne's avatar
Don Gagne committed
655

Don Gagne's avatar
Don Gagne committed
656 657 658 659 660 661 662 663
                // QGCCheckBox
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCCheckBox"
                }
                QGCCheckBox {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
664
                    text: qsTr("Check Box")
Don Gagne's avatar
Don Gagne committed
665 666 667 668
                }
                QGCCheckBox {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
669
                    text: qsTr("Check Box")
Don Gagne's avatar
Don Gagne committed
670 671
                    enabled: false
                }
Don Gagne's avatar
Don Gagne committed
672

Don Gagne's avatar
Don Gagne committed
673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688
                // QGCTextField
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCTextField"
                }
                QGCTextField {
                    width: 100
                    height: 20
                    text: "QGCTextField"
                }
                QGCTextField {
                    width: 100
                    height: 20
                    text: "QGCTextField"
                    enabled: false
                }
689

690 691 692 693 694 695 696 697
                // QGCComboBox
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "QGCComboBox"
                }
                QGCComboBox {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
698
                    model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ]
699 700 701 702
                }
                QGCComboBox {
                    width: 100
                    height: 20
Tomaz Canabrava's avatar
Tomaz Canabrava committed
703
                    model: [ qsTr("Item 1"), qsTr("Item 2"), qsTr("Item 3") ]
704 705 706
                    enabled: false
                }

Don Gagne's avatar
Don Gagne committed
707 708 709 710 711 712 713 714
                // SubMenuButton
                Loader {
                    sourceComponent: ctlRowHeader
                    property var text: "SubMenuButton"
                }
                SubMenuButton {
                    width: 100
                    height: 100
Tomaz Canabrava's avatar
Tomaz Canabrava committed
715
                    text: qsTr("SUB MENU")
Don Gagne's avatar
Don Gagne committed
716 717 718 719
                }
                SubMenuButton {
                    width: 100
                    height: 100
Tomaz Canabrava's avatar
Tomaz Canabrava committed
720
                    text: qsTr("SUB MENU")
Don Gagne's avatar
Don Gagne committed
721 722
                    enabled: false
                }
723
            }
Don Gagne's avatar
Don Gagne committed
724 725 726
        }
    }
}