]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robomon/Map.h
Add layers for OE
[eurobot/public.git] / src / robomon / Map.h
1 /*
2  * Map.h        11/01/31
3  *
4  * Draw a map on the playground.
5  *
6  * Copyright: (c) 2007 CTU Dragons
7  *            CTU FEE - Department of Control Engineering
8  * Authors: Michal Vokac, Michal Sojka
9  * License: GNU GPL v.2
10  */
11
12 #ifndef MAP_H
13 #define MAP_H
14
15 #include <QGraphicsItem>
16 #include <QPainter>
17 #include <QObject>
18
19 class Map : public QObject, public QGraphicsItem
20 {
21         Q_OBJECT
22         Q_INTERFACES(QGraphicsItem);
23 public:
24         Map();
25         ~Map();
26         QRectF boundingRect() const;
27         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
28         void setPixelColor(int x, int y, QColor color);
29 public slots:
30 private:
31         QImage mapImage;
32         QPen pen;
33         QBrush brush;
34 };
35
36 #endif