EffectMaker: Hide properties that use custom value

These properties would require custom editor, so hide them for now.
Typically there is no need to change these values from defaults.

Fixes: QDS-11419
Change-Id: Ia91d48f5df86885420dccef47ed024af4cc8f430
Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2023-12-01 15:20:34 +02:00
parent 277463bb90
commit 6e566bac27
4 changed files with 5 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ Item {
height: layout.implicitHeight
visible: !uniformUseCustomValue
Component.onCompleted: {
if (uniformType === "int")
valueLoader.source = "ValueInt.qml"

View File

@@ -26,6 +26,7 @@ QHash<int, QByteArray> EffectMakerUniformsModel::roleNames() const
roles[MinValueRole] = "uniformMinValue";
roles[MaxValueRole] = "uniformMaxValue";
roles[TypeRole] = "uniformType";
roles[UseCustomValueRole] = "uniformUseCustomValue";
return roles;
}

View File

@@ -37,6 +37,7 @@ private:
MaxValueRole,
MinValueRole,
TypeRole,
UseCustomValueRole
};
QList<Uniform *> m_uniforms;

View File

@@ -26,6 +26,7 @@ class Uniform : public QObject
Q_PROPERTY(QVariant uniformMinValue MEMBER m_minValue CONSTANT)
Q_PROPERTY(QVariant uniformMaxValue MEMBER m_maxValue CONSTANT)
Q_PROPERTY(QVariant uniformDefaultValue MEMBER m_defaultValue CONSTANT)
Q_PROPERTY(QVariant uniformUseCustomValue MEMBER m_useCustomValue CONSTANT)
public:
enum class Type