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
qquick3drenderstatspassesmodel_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 QQUICK3DRENDERSTATSPASSESMODEL_H
7#define QQUICK3DRENDERSTATSPASSESMODEL_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 QQuick3DRenderStatsPassesModel : public QAbstractTableModel
27{
28 Q_OBJECT
29 Q_PROPERTY(QString passData READ passData WRITE setPassData NOTIFY passDataChanged)
30 QML_NAMED_ELEMENT(RenderStatsPassesModel)
31public:
32 QHash<int, QByteArray> roleNames() const override;
33 int rowCount(const QModelIndex &parent) const override;
34 int columnCount(const QModelIndex &parent) const override;
35 QVariant data(const QModelIndex &index, int role) const override;
36 QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
37
38 const QString &passData() const;
39
40public Q_SLOTS:
41 void setPassData(const QString &newPassData);
42
43Q_SIGNALS:
44 void passDataChanged();
45
46private:
47 struct Data {
48 QString name;
49 QString size;
50 quint64 vertices;
51 quint32 drawCalls;
52 };
53 QVector<Data> m_data;
54 QString m_passData;
55};
56
58
59#endif // QQUICK3DRENDERSTATSPASSESMODEL_H
Combined button and popup list for selecting options.