Don't allow editing read only params
This commit is contained in:
parent
8a256d9bbb
commit
681dd19475
@ -54,7 +54,7 @@ public:
|
|||||||
ReadOnlyRole
|
ReadOnlyRole
|
||||||
};
|
};
|
||||||
|
|
||||||
explicit ParamTypes(QObject *parent = 0);
|
explicit ParamTypes(QObject *parent = nullptr);
|
||||||
|
|
||||||
QList<ParamType *> paramTypes();
|
QList<ParamType *> paramTypes();
|
||||||
|
|
||||||
|
|||||||
@ -181,7 +181,6 @@ Page {
|
|||||||
Component {
|
Component {
|
||||||
id: discoveryParamsPage
|
id: discoveryParamsPage
|
||||||
Page {
|
Page {
|
||||||
|
|
||||||
id: discoveryParamsView
|
id: discoveryParamsView
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@ -385,6 +384,7 @@ Page {
|
|||||||
delegate: ParamDelegate {
|
delegate: ParamDelegate {
|
||||||
// Layout.preferredHeight: 60
|
// Layout.preferredHeight: 60
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
enabled: !model.readOnly
|
||||||
paramType: root.deviceClass.paramTypes.get(index)
|
paramType: root.deviceClass.paramTypes.get(index)
|
||||||
value: d.deviceDescriptor && d.deviceDescriptor.params.getParam(paramType.id) ?
|
value: d.deviceDescriptor && d.deviceDescriptor.params.getParam(paramType.id) ?
|
||||||
d.deviceDescriptor.params.getParam(paramType.id).value :
|
d.deviceDescriptor.params.getParam(paramType.id).value :
|
||||||
|
|||||||
Reference in New Issue
Block a user