]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robomon/Robot.h
Fix a QT warning
[eurobot/public.git] / src / robomon / Robot.h
1 /*
2  * Robot.h                      07/10/31
3  *
4  * Draw and move a robot on the playground.
5  *
6  * Copyright: (c) 2007 CTU Dragons
7  *            CTU FEE - Department of Control Engineering
8  * Authors: Martin Zidek, Michal Sojka, Tran Duy Khanh
9  * License: GNU GPL v.2
10  */
11
12 #ifndef ROBOT_H
13 #define ROBOT_H
14
15 #include <QGraphicsItem>
16 #include <QGraphicsLineItem>
17 #include <QPainter>
18 #include <QObject>
19
20 class Robot : public QObject, public QGraphicsItem
21 {
22         Q_OBJECT
23         Q_INTERFACES(QGraphicsItem);
24 public:
25         Robot(const QString &aText, const QPen &pen = QPen(), const QBrush &brush = QBrush());
26         ~Robot();
27         QRectF boundingRect() const;
28         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
29         void moveRobot(double x, double y, double angle);
30 public slots:
31         void mySetVisible(bool show);
32         void setVidle(int value);
33 private:
34         int vidle;
35         QString text;
36         QPen pen;
37         QBrush brush;
38 };
39
40 #endif