tools/templates/pixlabel.h
author unc0rr
Fri, 28 Oct 2011 19:20:35 +0400
changeset 6223 cc3eb9b7230f
parent 359 59fbfc65fbda
child 8442 535a00ca0d35
permissions -rw-r--r--
It doesn't make much sense to make checks like 'if(game)' if you never set game to 0. Using smart pointers instead. Does it fix segfaults? Probably.

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