1// Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QT3DEXTRAS_QSPRITEGRID_H
5#define QT3DEXTRAS_QSPRITEGRID_H
6
7#include <Qt3DExtras/qabstractspritesheet.h>
8#include <Qt3DCore/qcomponent.h>
9#include <QtGui/QVector2D>
10#include <QtGui/QMatrix3x3>
11
12QT_BEGIN_NAMESPACE
13
14namespace Qt3DExtras {
15
16class QSpriteGridPrivate;
17
18class Q_3DEXTRASSHARED_EXPORT QSpriteGrid : public QAbstractSpriteSheet
19{
20 Q_OBJECT
21 Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged)
22 Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
23public:
24 explicit QSpriteGrid(Qt3DCore::QNode *parent = nullptr);
25 ~QSpriteGrid();
26
27 int rows() const;
28 int columns() const;
29
30public Q_SLOTS:
31 void setRows(int rows);
32 void setColumns(int columns);
33
34Q_SIGNALS:
35 void rowsChanged(int rows);
36 void columnsChanged(int columns);
37
38private:
39 Q_DECLARE_PRIVATE(QSpriteGrid)
40};
41
42} // Qt3DExtras
43
44QT_END_NAMESPACE
45
46#endif // QT3DEXTRAS_QSPRITEGRID_H
47

source code of qt3d/src/extras/defaults/qspritegrid.h