Debian Codegraph @

qml/generic/UI/TextCoupleSelect.qml

raw
1 import QtQuick 2.2
2 import QtQuick.Controls 1.1
3 import QtQuick.Layouts 1.1
4
5 Item {
6 id: comboBox
7 property string type
8 property string initialText
9 property alias text: comboButton.currentText
10 property alias subtext: subtextValue.text
11 property alias listModel: comboButton.model
12 property alias selectedItem: comboButton.currentIndex
13
14 // Evil: hardcoded width/height
15 height: (16.5) * 1.5
16 width: (16.5) * 15
17 ColumnLayout {
18 RowLayout {
19 id: topRow
20 Layout.fillWidth: true
21 Label {
22 id: typeText
23 text: type
24 font.bold: true
25 }
26 ComboBox {
27 id: comboButton
28 currentIndex: selectedItem
29 anchors { left: parent.left; leftMargin: comboBox.width / 2 - 10}
30 }
31 }
32 Label {
33 id: subtextValue
34 anchors {left: parent.left; leftMargin: 10; top: parent.top; topMargin: topRow.implicitHeight - 2}
35 text: ""
36 }
37 }
38 }