EffectComposer: Allow 'define' properties to specify control type

Control type is used to determine the control presented for the property
in UI. Currently only int and bool control types are supported.

Also fixed the issue that changing define wouldn't update preview.
This was because changing define requires rebaking shaders, which is
not normally triggered on property change.

Fixes: QDS-11770
Change-Id: I953d827195565f765df1a09550c4a49da9c93c29
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2024-02-02 13:08:01 +02:00
parent 7efab2c07e
commit f985b1b091
9 changed files with 108 additions and 34 deletions

View File

@@ -12,6 +12,7 @@
#include <QMap>
#include <QRegularExpression>
#include <QTemporaryFile>
#include <QTimer>
namespace ProjectExplorer {
class Target;
@@ -172,6 +173,8 @@ private:
QString getQmlImagesString(bool localFiles);
QString getQmlComponentString(bool localFiles);
void connectCompositionNode(CompositionNode *node);
QList<CompositionNode *> m_nodes;
int m_selectedIndex = -1;
@@ -206,6 +209,7 @@ private:
bool m_loadComponentImages = true;
bool m_isEnabled = true;
QString m_currentComposition;
QTimer m_rebakeTimer;
const QRegularExpression m_spaceReg = QRegularExpression("\\s+");
};