| 1 | // Copyright (C) 2025 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 3 | |
| 4 | #ifndef LIGHTMAPFILE_H |
| 5 | #define LIGHTMAPFILE_H |
| 6 | |
| 7 | #include <QObject> |
| 8 | #include <QList> |
| 9 | #include <QUrl> |
| 10 | |
| 11 | class LightmapFile : public QObject |
| 12 | { |
| 13 | Q_OBJECT |
| 14 | Q_PROPERTY(QStringList dataList READ dataList NOTIFY dataListChanged) |
| 15 | Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged FINAL) |
| 16 | |
| 17 | public: |
| 18 | explicit LightmapFile(QObject *parent = nullptr); |
| 19 | |
| 20 | QStringList dataList() const; |
| 21 | |
| 22 | Q_INVOKABLE void loadData(); |
| 23 | |
| 24 | QUrl source() const; |
| 25 | void setSource(const QUrl &newSource); |
| 26 | |
| 27 | signals: |
| 28 | void dataListChanged(); |
| 29 | |
| 30 | void sourceChanged(); |
| 31 | |
| 32 | private: |
| 33 | QStringList m_dataList; |
| 34 | QUrl m_source; |
| 35 | }; |
| 36 | |
| 37 | #endif // LIGHTMAPFILE_H |
| 38 | |