aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksei German <aleksei.german@qt.io>2020-09-03 17:52:49 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2020-09-03 16:17:52 +0000
commitf849319d118d9d7cfd206e30d9a198a427bc24bb (patch)
tree8a30d68e2b3db0c4d851a49250985f3e33f51455
parentc086c298727f159691b37204876823c36f2ba42e (diff)
QmlDesigner: Disable more properties for QUL
Turned off Controls properties and Animations. Task-number: QDS-943 Change-Id: I4b9868734c74f5319fd7d3e66b57d59007300340 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml2
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp25
2 files changed, 26 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml
index abf69756fa..b117eeb7f9 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/AnimationSection.qml
@@ -51,11 +51,13 @@ Section {
Label {
text: qsTr("Paused")
tooltip: qsTr("Sets whether the animation is currently paused.")
+ disabledState: !backendValues.paused.isAvailable
}
CheckBox {
text: backendValues.paused.valueToString
backendValue: backendValues.paused
+ enabled: backendValue.isAvailable
}
Label {
text: qsTr("Loops")
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
index d2c0c71f7d..2ecb0fa3b2 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorvalue.cpp
@@ -275,6 +275,7 @@ static QList<QByteArray> prepareNonMcuProperties()
{
QList<QByteArray> result;
+ //Builtins:
const QList<QByteArray> itemProperties = {"layer", "opacity", "gradient", "smooth", "antialiasing",
"border", "baselineOffset", "focus", "activeFocusOnTab"};
const QList<QByteArray> mouseAreaProperties = {"propagateComposedEvents", "preventStealing", "cursorShape",
@@ -295,6 +296,19 @@ static QList<QByteArray> prepareNonMcuProperties()
"highlightResizeDuration", "preferredHighlightBegin", "layoutDirection",
"preferredHighlightEnd", "highlightFollowsCurrentItem", "keyNavigationWraps",
"snapMode", "highlightMoveVelocity", "highlightResizeVelocity"};
+ //Animations:
+ const QList<QByteArray> animationProperties = {"paused"};
+
+ //QtQuick.Controls:
+ const QList<QByteArray> controlProperties = {"focusPolicy", "hoverEnabled", "wheelEnabled"};
+ const QList<QByteArray> abstractButtonProperties = {"display", "autoExclusive"};
+ const QList<QByteArray> buttonProperties = {"flat", "highlighted"};
+ const QList<QByteArray> dialProperties = {}; //nothing in propeditor
+ const QList<QByteArray> progressBarProperties = {"indeterminate"};
+ const QList<QByteArray> radioButton = {}; //nothing in propeditor
+ const QList<QByteArray> sliderProperties = {"live", "snapMode", "touchDragThreshold"};
+ const QList<QByteArray> swipeViewProperties = {}; //nothing in propeditor
+ const QList<QByteArray> switchProperties = {}; //nothing in propeditor
result.append(itemProperties);
result.append(mouseAreaProperties);
@@ -304,7 +318,16 @@ static QList<QByteArray> prepareNonMcuProperties()
result.append(paddingProperties);
result.append(columnRowProperties);
result.append(listViewProperties);
-
+ result.append(animationProperties);
+ result.append(controlProperties);
+ result.append(abstractButtonProperties);
+ result.append(buttonProperties);
+ result.append(dialProperties);
+ result.append(progressBarProperties);
+ result.append(radioButton);
+ result.append(sliderProperties);
+ result.append(swipeViewProperties);
+ result.append(switchProperties);
return result;
}