-
Notifications
You must be signed in to change notification settings - Fork 0
/
HardwareFan.qml
61 lines (48 loc) · 1.39 KB
/
HardwareFan.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import QtQuick 2.13
import QtQuick.Controls 2.13
import QtQuick.Layouts 1.13
Item {
property string title
property var fan
property int fieldMinWidth: 115
property int lblTopMargin: 8
Layout.fillWidth: true
height: 89
Label {
id: titleText
text: title
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
anchors.topMargin: lblTopMargin
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.bold: true
}
GridLayout {
anchors.top: titleText.bottom
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.topMargin: 2
columns: 2
TextFieldExt {
id: fieldPinPWM
minWidth: fieldMinWidth
label: qsTr("PWM Pin")
tooltip: qsTr("Teensy pin number (must support PWM). Set to 0 if not connected.")
text: fan.pinPWM
target: fan
property: "pinPWM"
}
TextFieldExt {
id: fieldPinRPM
minWidth: fieldMinWidth
label: qsTr("RPM Pin")
tooltip: qsTr("Teensy pin number (must support interrupts). Set to 0 if not connected.")
text: fan.pinRPM
target: fan
property: "pinRPM"
}
}
}