I am trying to build a break-out game clone in Qt. I need to figure out what type of a QGraphicsItem my ball collided with. For example if I the ball collides with the wall, the ball just bounces off, if it collides with a brick it has to bounce off and destroys the brick. To find out what kind of QGraphicsItem it is, I figured the best way to do that is probably to override QGraphicsItem::type() (Please let me know if this is not the right way!). 
In the following code for brick.h I set my 'Brick' to have a Type of 3. Now, the value 3 looks really cumbersome to track. I would instead prefer to declare something with a '#define' 
#include <QGraphicsItem>
//should this #define be here?
//#define BRICK_SPRITE 3
class Brick : public QGraphicsItem
{
public:
    Brick(const QPixmap& p, QGraphicsScene *scene = 0);
    virtual QRectF boundingRect() const;
    virtual void paint( QPainter *painter,
                        const QStyleOptionGraphicsItem *option,
                        QWidget *widget );
    QPainterPath shape() const;
    enum { Type = 3 }; //enum {Type = BRICK_SPRITE}
    int type() const { return Type; }
private:
    QPixmap pixmap;
};
Where is a good location to place the statement '#define BRICK_SPRITE 3' ? I have several other files in the project. Should I place all the definitions in a separate header file?
 
     
     
     
    