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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
359
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     1
#include <QLabel>
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     2
#include <QRect>
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     3
#include <QList>
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     4
#include <QMouseEvent>
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     5
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     6
class PixLabel : public QLabel
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     7
{
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     8
	Q_OBJECT
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
     9
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    10
public:
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    11
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    12
	PixLabel();
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    13
	QList<QRect> rects;
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    14
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    15
public slots:
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    16
	void AddRect();
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    17
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    18
private:
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    19
	void paintEvent(QPaintEvent * event);
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    20
	void mousePressEvent(QMouseEvent * e);
59fbfc65fbda - New land templates
unc0rr
parents:
diff changeset
    21
};