overte-HifiExperiments/scripts/developer/tests/ControlsGallery.qml
Alexander Ivash 27bb8a0de7 rename stylues-uit => stylesUit & controls-uit => controlsUit
note:
the idea is to make imports like 'import controlsUit 1.0' to work
with 'styles-uit'/'controls-uit' it is not possible because of two reasons:

1. import controls-uit 1.0 is invalid syntax
2. qmldir inside controls-uit is 'module controlsUit'
2018-11-06 14:21:14 +05:30

96 lines
2.2 KiB
QML

import QtQuick 2.10
import QtQuick.Window 2.10
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
import stylesUit 1.0 as HifiStylesUit
import controlsUit 1.0 as HifiControlsUit
Item {
visible: true
width: 640
height: 480
Introspector {
id: introspector
properties: ['realFrom', 'realTo', 'realValue', 'realStepSize', 'decimals']
visible: true
y: 50
x: 130
}
HifiStylesUit.HifiConstants {
id: hifi
}
TabBar {
id: bar
width: parent.width
TabButton {
text: "Spinbox"
}
TabButton {
text: "... Other Controls"
}
}
StackLayout {
id: controlsLayout
currentIndex: bar.currentIndex
anchors.top: bar.bottom
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.margins: 20
Item {
id: spinboxTab
anchors.fill: parent
Column {
spacing: 20
HifiControlsUit.SpinBox {
realValue: 5.0
realFrom: 16.0
realTo: 20.0
decimals: 2
realStepSize: 0.01
width: 100
height: 30
colorScheme: hifi.colorSchemes.dark
onFocusChanged: {
if(focus) {
introspector.object = this
}
}
}
HifiControlsUit.SpinBox {
realValue: 5.0
realFrom: 1.0
realTo: 20.0
decimals: 2
realStepSize: 0.01
width: 100
height: 30
colorScheme: hifi.colorSchemes.light
onFocusChanged: {
if(focus) {
introspector.object = this
}
}
}
}
}
Item {
id: otherTab
}
}
}