1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICK3DRENDERSTATSTEXTURESMODEL_H
5#define QQUICK3DRENDERSTATSTEXTURESMODEL_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/QAbstractTableModel>
19#include <QtCore/QObject>
20#include <QtQml/qqml.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuick3DRenderStatsTexturesModel : public QAbstractTableModel
25{
26 Q_OBJECT
27 Q_PROPERTY(QString textureData READ textureData WRITE setTextureData NOTIFY textureDataChanged)
28 QML_NAMED_ELEMENT(RenderStatsTexturesModel)
29
30public:
31 QHash<int, QByteArray> roleNames() const override;
32 int rowCount(const QModelIndex &parent) const override;
33 int columnCount(const QModelIndex &parent) const override;
34 QVariant data(const QModelIndex &index, int role) const override;
35 QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
36
37 const QString &textureData() const;
38
39public Q_SLOTS:
40 void setTextureData(const QString &newTextureData);
41
42Q_SIGNALS:
43 void textureDataChanged();
44
45private:
46 struct Data {
47 QString name;
48 QString size;
49 QString format;
50 quint32 mipLevels;
51 QString flags;
52 };
53 QVector<Data> m_data;
54 QString m_textureData;
55};
56
57QT_END_NAMESPACE
58
59#endif // QQUICK3DRENDERSTATSTEXTURESMODEL_H
60

source code of qtquick3d/src/helpers/impl/qquick3drenderstatstexturesmodel_p.h