tools/templates/pixlabel.h
author unc0rr
Fri, 29 Nov 2013 15:53:46 +0400
changeset 9722 22dba2d8de93
parent 8442 535a00ca0d35
permissions -rw-r--r--
Quick and simple dynamite AI without precalculated retreat and without accurate dynamite physics model (no bounce). Still does pretty well, using it mostly off cliffs.

#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);
};