tools/templates/pixlabel.h
author nemo
Mon, 06 Feb 2012 20:04:32 -0500
changeset 6645 9ff40cf44827
parent 359 59fbfc65fbda
child 8442 535a00ca0d35
permissions -rw-r--r--
Fixes slot sprite and ammo sprites overlapping left side border. There is still the issue that boxes should be 32px between borders, but right now they are 33px on all but the first row (since the outside border overlaps it by 1px) causing the slot sprite to have 2px of border on the left and 1px of border on the right.

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