00001 #ifndef __GUI_ANIMAL_HPP__ 00002 #define __GUI_ANIMAL_HPP__ 00003 00004 #include <QWidget> 00005 #include <QDialog> 00006 #include <QToolBar> 00007 #include <QGraphicsItem> 00008 #include <QPainter> 00009 #include <QTextStream> 00010 #include "vector2D.hpp" 00011 #include "animal.hpp" 00012 00013 class GUI_Scene; 00014 00015 class GUI_Animal : public QGraphicsItem { 00016 00017 public: 00021 GUI_Animal(GUI_Scene* scene, Vector2D point); 00022 00023 Animal* getAnimal(); 00024 Animal* getAnimalConst() const; 00025 Animal getStatAnimal() const; 00029 void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); 00030 00034 QRectF boundingRect() const; 00035 00039 void newPos(Vector2D &pos); 00040 00041 00042 friend ostream& operator<< (ostream &Strm, const GUI_Animal &anim) ; 00043 friend istream& operator>> (istream &Strm, const GUI_Animal &anim) ; 00044 private: 00045 Animal *_animal; //< informacje o zwierzaku */ 00046 00047 qreal radius; //< tmp */ 00048 00049 bool selected; //< tmp */ 00050 00051 }; 00052 ostream& operator<< (ostream &Strm, const GUI_Animal &anim) ; 00053 istream& operator>>(istream &Strm, const GUI_Animal &anim) ; 00054 00055 #endif 00056