tools/templates/pixlabel.h
author nemo
Wed, 06 Mar 2013 11:13:18 -0500
changeset 8675 3fb25201d303
parent 8442 535a00ca0d35
permissions -rw-r--r--
This has bothered me for the longest time. Move texture so it doesn't overlap. I'd initially had a test for isPaused, but jumping texture bothered me.

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