summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Application/DataInputSelectView.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-12 14:36:18 +0300
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2018-06-12 12:08:42 +0000
commitc39d3e96e6e8725207eda830b9b5660bd2783a3e (patch)
tree0fea7da8d9fa1a43834eae0874f9935c3a390d24 /src/Authoring/Studio/Application/DataInputSelectView.h
parent29e1fcfba128b1af20a67a02148a34e163b2d5b9 (diff)
Fix datainput type issuesv2.0.0-rc2v2.0.0
- When adding a new data input the type is set correctly even if you don't touch the type combo. - When adding a new data input from popup menu for property, timeline, or slide panel, the corresponding data input is not changed if the new data input is of unsuitable type. - Correct default type is shown for each property when setting data input from inspector panel. Task-number: QT3DS-1913 Change-Id: I704cb704fb1ec9aca916ed7f7542ace404bba77c Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Application/DataInputSelectView.h')
-rw-r--r--src/Authoring/Studio/Application/DataInputSelectView.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Authoring/Studio/Application/DataInputSelectView.h b/src/Authoring/Studio/Application/DataInputSelectView.h
index 92456972..6db29c13 100644
--- a/src/Authoring/Studio/Application/DataInputSelectView.h
+++ b/src/Authoring/Studio/Application/DataInputSelectView.h
@@ -40,11 +40,12 @@ class DataInputSelectView : public QQuickWidget
Q_OBJECT
Q_PROPERTY(int selected MEMBER m_selection NOTIFY selectedChanged)
public:
- explicit DataInputSelectView(QWidget *parent = nullptr,
- EDataType defaultType = EDataType::DataTypeFloat);
+ explicit DataInputSelectView(const QVector<EDataType> &acceptedTypes,
+ QWidget *parent = nullptr);
void setData(const QVector<QPair<QString, int>> &dataInputList,
const QString &currentController,
int handle = 0, int instance = 0);
+ void setAcceptedTypes(const QVector<EDataType> &acceptedTypes);
QString getAddNewDataInputString() { return tr("[Add New Datainput]"); }
QString getNoneString() { return tr("[None]"); }
@@ -69,6 +70,7 @@ private:
QString m_currController;
QString m_mostRecentlyAdded;
EDataType m_defaultType;
+ QVector<EDataType> m_acceptedTypes;
};
#endif // DATAINPUTSELECTDLG_H