You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

import QtQuick 2.0
import QtQuick.Layouts 1.13
import QtQuick.Controls 2.12
import de.skycoder42.QtMvvm.Core 1.0
import de.skycoder42.QtMvvm.Quick 1.0
import com.example.consoleemulator 1.0
import "qrc:/emulator/elements"
import "qrc:/emulator/components"
import "qrc:/const"
import "qrc:/qtmvvm/views"
Item {
id: root
implicitWidth: width
implicitHeight: 25
property var isDisable: false
property var viewModelProperty
property var isProbeEnableProperty
property alias model: idComobBox.model
ComboBox {
id: idComobBox
visible: isDisable
model: probeList
width: parent.width
implicitWidth: width
implicitHeight: parent.height
MvvmBinding {
viewModel: mainView.viewModel
viewProperty: "currentIndex"
viewModelProperty: root.viewModelProperty
}
}
Text {
visible: !isDisable
text: idComobBox.currentText
anchors.fill: parent
horizontalAlignment: Text.AlignHCenter
}
MvvmBinding {
viewModel: mainView.viewModel
viewProperty: "isDisable"
viewModelProperty: isProbeEnableProperty
}
}