porymap/include/ui/bordermetatilespixmapitem.h

27 lines
711 B
C
Raw Normal View History

2018-09-27 00:30:05 +01:00
#ifndef BORDERMETATILESPIXMAPITEM_H
#define BORDERMETATILESPIXMAPITEM_H
#include "map.h"
#include "metatileselector.h"
#include <QGraphicsPixmapItem>
class BorderMetatilesPixmapItem : public QObject, public QGraphicsPixmapItem {
Q_OBJECT
public:
BorderMetatilesPixmapItem(Map *map_, MetatileSelector *metatileSelector) {
this->map = map_;
2020-07-29 20:51:04 +01:00
this->map->setBorderItem(this);
2018-09-27 00:30:05 +01:00
this->metatileSelector = metatileSelector;
setAcceptHoverEvents(true);
}
MetatileSelector *metatileSelector;
2020-07-29 20:51:04 +01:00
Map *map;
2018-09-27 00:30:05 +01:00
void draw();
signals:
void borderMetatilesChanged();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent*);
};
#endif // BORDERMETATILESPIXMAPITEM_H