aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h')
-rw-r--r--src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h b/src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h
new file mode 100644
index 0000000000..e76d7f50e4
--- /dev/null
+++ b/src/plugins/qmldesigner/components/collectioneditor/datastoremodelnode.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#pragma once
+
+#include <modelnode.h>
+
+namespace QmlDesigner {
+
+class Model;
+
+class DataStoreModelNode
+{
+public:
+ DataStoreModelNode();
+
+ void reloadModel();
+ QStringList collectionNames() const;
+
+ Model *model() const;
+ ModelNode modelNode() const;
+
+ void setCollectionNames(const QStringList &newCollectionNames);
+
+private:
+ QString getModelQmlText();
+
+ void reset();
+ void updateDataStoreProperties();
+ void updateSingletonFile();
+
+ ModelPointer m_model;
+ QStringList m_collectionNames;
+ QString m_dataRelativePath;
+};
+
+} // namespace QmlDesigner