tools/templates/pixlabel.h
author unc0rr
Tue, 18 Mar 2014 00:01:52 +0400
changeset 10201 9bee9541edf1
parent 8442 535a00ca0d35
permissions -rw-r--r--
Fix detection of intersections, still need to check if passing any point in move, but result is already okayish

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