/**
  * town.h
  * Objekt (obycejneho) mesta v mape.
  *
  * @author Michala Capkova
  */

#ifndef TOWN_H
#define TOWN_H

#include <QGraphicsItem>

class QPainterPath;

class Town: public QGraphicsItem
{
public:
    Town(QString name, double area);
    virtual void paint(QPainter *painter,const QStyleOptionGraphicsItem *option, QWidget *widget);
    virtual QRectF boundingRect() const;
    virtual QPainterPath shape() const;

protected:
    virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
    virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);

private:
    bool mouse_hover;
    double area;

    static const int SELECT_WIDTH = 2;
    static const int HOVER_WIDTH = 2;
    static const int ELSE_WIDTH = 1;
};

#endif // TOWN_H
