28 lines
556 B
C++
28 lines
556 B
C++
#pragma once
|
|
|
|
#include <QImage>
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class OBoy : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(QString name READ name CONSTANT)
|
|
Q_PROPERTY(QString version READ version CONSTANT)
|
|
Q_PROPERTY(bool loaded READ loaded NOTIFY loadedChanged)
|
|
public:
|
|
explicit OBoy(QObject* parent = nullptr);
|
|
|
|
QString name() const;
|
|
QString version() const;
|
|
bool loaded() const;
|
|
Q_INVOKABLE bool load(const QUrl& path);
|
|
QImage backgroundMap(int index) const;
|
|
|
|
signals:
|
|
void loadedChanged(bool loaded);
|
|
|
|
private:
|
|
bool _loaded = false;
|
|
};
|