forked from qt-creator/qt-creator
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:
@@ -15,6 +15,8 @@ Item {
|
|||||||
|
|
||||||
height: layout.implicitHeight
|
height: layout.implicitHeight
|
||||||
|
|
||||||
|
visible: !uniformUseCustomValue
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
if (uniformType === "int")
|
if (uniformType === "int")
|
||||||
valueLoader.source = "ValueInt.qml"
|
valueLoader.source = "ValueInt.qml"
|
||||||
|
@@ -26,6 +26,7 @@ QHash<int, QByteArray> EffectMakerUniformsModel::roleNames() const
|
|||||||
roles[MinValueRole] = "uniformMinValue";
|
roles[MinValueRole] = "uniformMinValue";
|
||||||
roles[MaxValueRole] = "uniformMaxValue";
|
roles[MaxValueRole] = "uniformMaxValue";
|
||||||
roles[TypeRole] = "uniformType";
|
roles[TypeRole] = "uniformType";
|
||||||
|
roles[UseCustomValueRole] = "uniformUseCustomValue";
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -37,6 +37,7 @@ private:
|
|||||||
MaxValueRole,
|
MaxValueRole,
|
||||||
MinValueRole,
|
MinValueRole,
|
||||||
TypeRole,
|
TypeRole,
|
||||||
|
UseCustomValueRole
|
||||||
};
|
};
|
||||||
|
|
||||||
QList<Uniform *> m_uniforms;
|
QList<Uniform *> m_uniforms;
|
||||||
|
@@ -26,6 +26,7 @@ class Uniform : public QObject
|
|||||||
Q_PROPERTY(QVariant uniformMinValue MEMBER m_minValue CONSTANT)
|
Q_PROPERTY(QVariant uniformMinValue MEMBER m_minValue CONSTANT)
|
||||||
Q_PROPERTY(QVariant uniformMaxValue MEMBER m_maxValue CONSTANT)
|
Q_PROPERTY(QVariant uniformMaxValue MEMBER m_maxValue CONSTANT)
|
||||||
Q_PROPERTY(QVariant uniformDefaultValue MEMBER m_defaultValue CONSTANT)
|
Q_PROPERTY(QVariant uniformDefaultValue MEMBER m_defaultValue CONSTANT)
|
||||||
|
Q_PROPERTY(QVariant uniformUseCustomValue MEMBER m_useCustomValue CONSTANT)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class Type
|
enum class Type
|
||||||
|
Reference in New Issue
Block a user