#include <gui_scene.hpp>
Typy publiczne | |
enum | mode { NONE, ADDOBSTACLE, ADDANIMAL, REMOVE } |
Sygnały | |
void | changed () |
Metody publiczne | |
void | addAnimal (const Vector2D &origin=Vector2D(0, 0)) |
void | addToFile (ostream &F) |
vector< GUI_Animal * > | getAnimals () const |
GUI_Animal * | getCurrAnimal () |
QWidget * | getParamBox () |
GUI_Scene (QWidget *parent=0, qreal w=500, qreal h=500) | |
void | setEditMode (mode) |
~GUI_Scene () | |
Metody chronione | |
void | clearPolygon () |
void | createPotentialMap () |
void | drawBackground (QPainter *, const QRectF &) |
bool | isSelectedAnimal (QPoint point) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
bool | selectSheep (QPoint) |
Atrybuty chronione | |
vector< GUI_Animal * > | _animals |
mode | _currMode |
qreal | _height |
vector< Obstacle > | _obstacle |
qreal | _scale |
qreal | _width |
Metody prywatne | |
void | getParamBoxAnimal (QWidget *widget) |
Atrybuty prywatne | |
GUI_Animal * | _currAnimal |
int | _currObstacle |
QWidget * | _paramBox |
bool | antiAliased |
QImage | image |
QGraphicsPolygonItem * | newObstacle |
bool | potentialMap |
Przyjaciele | |
ostream & | operator<< (ostream &Strm, const vector< GUI_Animal * > &anim) |
ostream & | operator<< (ostream &Strm, const GUI_Scene &scene) |
istream & | operator>> (istream &Strm, GUI_Scene &scene) |
enum GUI_Scene::mode |
GUI_Scene::GUI_Scene | ( | QWidget * | parent = 0 , |
|
qreal | w = 500 , |
|||
qreal | h = 500 | |||
) |
GUI_Scene::~GUI_Scene | ( | ) |
Dodaje zwierzaka na podane wspolrzene
void GUI_Scene::addToFile | ( | ostream & | F | ) |
void GUI_Scene::changed | ( | ) | [signal] |
void GUI_Scene::clearPolygon | ( | ) | [protected] |
void GUI_Scene::createPotentialMap | ( | ) | [protected] |
void GUI_Scene::drawBackground | ( | QPainter * | , | |
const QRectF & | ||||
) | [protected] |
vector< GUI_Animal * > GUI_Scene::getAnimals | ( | ) | const |
GUI_Animal * GUI_Scene::getCurrAnimal | ( | ) |
QWidget * GUI_Scene::getParamBox | ( | ) |
Zwraca okienko parametrow dla biezacego elementu
void GUI_Scene::getParamBoxAnimal | ( | QWidget * | widget | ) | [private] |
Wyswietla okienko parametrow dla biezacego zwierzaka
bool GUI_Scene::isSelectedAnimal | ( | QPoint | point | ) | [protected] |
Czy zostal wybrany zwierzak
void GUI_Scene::keyPressEvent | ( | QKeyEvent * | ) | [protected, virtual] |
void GUI_Scene::mouseDoubleClickEvent | ( | QMouseEvent * | ) | [protected, virtual] |
void GUI_Scene::mouseMoveEvent | ( | QMouseEvent * | ) | [protected, virtual] |
void GUI_Scene::mousePressEvent | ( | QMouseEvent * | ) | [protected, virtual] |
Reakcja na wcisniecie przycisku myszy
void GUI_Scene::mouseReleaseEvent | ( | QMouseEvent * | ) | [protected, virtual] |
bool GUI_Scene::selectSheep | ( | QPoint | ) | [protected] |
void GUI_Scene::setEditMode | ( | mode | ) |
ostream& operator<< | ( | ostream & | Strm, | |
const vector< GUI_Animal * > & | anim | |||
) | [friend] |
ostream& operator<< | ( | ostream & | Strm, | |
const GUI_Scene & | scene | |||
) | [friend] |
istream& operator>> | ( | istream & | Strm, | |
GUI_Scene & | scene | |||
) | [friend] |
vector<GUI_Animal*> GUI_Scene::_animals [protected] |
GUI_Animal* GUI_Scene::_currAnimal [private] |
mode GUI_Scene::_currMode [protected] |
int GUI_Scene::_currObstacle [private] |
qreal GUI_Scene::_height [protected] |
vector<Obstacle> GUI_Scene::_obstacle [protected] |
QWidget* GUI_Scene::_paramBox [private] |
qreal GUI_Scene::_scale [protected] |
qreal GUI_Scene::_width [protected] |
bool GUI_Scene::antiAliased [private] |
QImage GUI_Scene::image [private] |
QGraphicsPolygonItem* GUI_Scene::newObstacle [private] |
bool GUI_Scene::potentialMap [private] |