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_QSPRITESHEETITEM_H
5#define QT3DEXTRAS_QSPRITESHEETITEM_H
6
7#include <Qt3DExtras/qabstractspritesheet.h>
8
9QT_BEGIN_NAMESPACE
10
11namespace Qt3DExtras {
12
13class QSpriteSheetItemPrivate;
14
15class Q_3DEXTRASSHARED_EXPORT QSpriteSheetItem : public Qt3DCore::QNode
16{
17 Q_OBJECT
18 Q_PROPERTY(int x READ x WRITE setX NOTIFY xChanged)
19 Q_PROPERTY(int y READ y WRITE setY NOTIFY yChanged)
20 Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged)
21 Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged)
22public:
23 explicit QSpriteSheetItem(Qt3DCore::QNode *parent = nullptr);
24
25 int x() const;
26 int y() const;
27 int width() const;
28 int height() const;
29
30public Q_SLOTS:
31 void setX(int x);
32 void setY(int y);
33 void setWidth(int width);
34 void setHeight(int height);
35
36Q_SIGNALS:
37 void xChanged(int x);
38 void yChanged(int y);
39 void widthChanged(int width);
40 void heightChanged(int height);
41
42private:
43 Q_DECLARE_PRIVATE(QSpriteSheetItem)
44};
45
46} // Qt3DExtras
47
48QT_END_NAMESPACE
49
50#endif // QT3DEXTRAS_QSPRITESHEETITEM_H
51

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