mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-22 00:26:37 -05:00
Begin refactoring Blockdata to simply inherit QVector<Block>
This commit is contained in:
@@ -4,31 +4,13 @@
|
||||
|
||||
#include "block.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QByteArray>
|
||||
#include <QVector>
|
||||
|
||||
class Blockdata : public QObject
|
||||
class Blockdata : public QVector<Block>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Blockdata(QObject *parent = nullptr);
|
||||
~Blockdata() {
|
||||
if (blocks) delete blocks;
|
||||
}
|
||||
|
||||
public:
|
||||
QVector<Block> *blocks = nullptr;
|
||||
void addBlock(uint16_t);
|
||||
void addBlock(Block);
|
||||
QByteArray serialize();
|
||||
void copyFrom(Blockdata*);
|
||||
Blockdata* copy();
|
||||
bool equals(Blockdata *);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // BLOCKDATA_H
|
||||
|
||||
Reference in New Issue
Block a user