From 93cf929f29dea490ed60e5300cacdd99886c988e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 9 Sep 2023 20:09:50 -0400 Subject: Add the standalone portion of mapman. --- mapman/src/painter.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 mapman/src/painter.hpp (limited to 'mapman/src/painter.hpp') diff --git a/mapman/src/painter.hpp b/mapman/src/painter.hpp new file mode 100644 index 0000000..489a87b --- /dev/null +++ b/mapman/src/painter.hpp @@ -0,0 +1,34 @@ +#ifndef MAPPAINTER_HPP +#define MAPPAINTER_HPP + +#include +#include + +class QGraphicsScene; +class QGraphicsView; +class QGraphicsItem; +class map_library; + +class map_painter : public QObject +{ + Q_OBJECT +public: + map_painter(); + ~map_painter(); + void set_dimension(int h, int v); + void set_map_library(map_library *lib); + void set_map_id(int pos, bool populated, int id, bool user_input = false); + + QGraphicsView* view() { return v; } +signals: + void map_id_changed(int pos, bool populated, int id); +private: + QGraphicsView *v; + QGraphicsScene *s; + map_library *l; + int hc; + int vc; + std::vector slices; +}; + +#endif -- cgit v1.2.3