]> rtime.felk.cvut.cz Git - eurobot/public.git/blob - src/robomon/Robot.h
14198c7e1690021f5deb30a42668622835de1548
[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 public:
24         Robot(const QString &aText, const QPen &pen = QPen(), const QBrush &brush = QBrush());
25         ~Robot();
26         QRectF boundingRect() const;
27         void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
28         void moveRobot(double x, double y, double angle);
29 public slots:
30         void mySetVisible(bool show);
31         void setVidle(int value);
32 private:
33         int vidle;
34         QString text;
35         QPen pen;
36         QBrush brush;
37 };
38
39 #endif