tools/templates/pixlabel.h
author nemo
Thu, 28 Feb 2013 22:10:49 -0500
changeset 8616 c4536e98c712
parent 8442 535a00ca0d35
permissions -rw-r--r--
Safety check. The main place this can be a problem is on a mild bowl w/ multiple hogs. Could possibly add a hog collision check in here.

#include <QLabel>
#include <QRect>
#include <QList>
#include <QMouseEvent>

class PixLabel : public QLabel
{
    Q_OBJECT

public:

    PixLabel();
    QList<QRect> rects;

public slots:
    void AddRect();

private:
    void paintEvent(QPaintEvent * event);
    void mousePressEvent(QMouseEvent * e);
};