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