blob: 051176c8f63458d7df4abe6cfd22ee65b762ad92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef ENEMY_H
#define ENEMY_H
#include <QtQml/qqml.h>
#include <QtCore/qproperty.h>
class Enemy : public QObject
{
Q_OBJECT
QML_NAMED_ELEMENT(Enemy)
Q_PROPERTY(QString name MEMBER name BINDABLE bindableName)
public:
Enemy(QObject *parent = nullptr);
QProperty<QString> name;
QBindable<QString> bindableName() { return QBindable<QString>(&name); }
};
#endif // ENEMY_H
|