tools/templates/pixlabel.h
author nemo
Sat, 20 Dec 2014 16:20:37 -0500
changeset 10696 173069dd7b17
parent 8442 535a00ca0d35
permissions -rw-r--r--
Make amGirder invisible in construction mode since it allows placing anywhere in fortress. Print "insufficient power" if placement was blocked due to that, to avoid confusing noobs.

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