qt/Black_okospace_levelcreator/customlabel.h

31 lines
637 B
C
Raw Normal View History

2013-11-04 18:06:35 +00:00
#ifndef CUSTOMLABEL_H
#define CUSTOMLABEL_H
#include <QLabel>
#include <QMouseEvent>
class CustomLabel : public QLabel
{
Q_OBJECT
public:
explicit CustomLabel(QWidget *parent = 0);
signals:
void buttonPressed(int x, int y);
void leftButtonReleased(int x, int y);
void rightButtonReleased(int x, int y);
void mouseMoveWithRightButtonPressed(int x, int y);
public slots:
protected:
virtual void mousePressEvent(QMouseEvent *ev);
virtual void mouseReleaseEvent(QMouseEvent * ev);
virtual void mouseMoveEvent(QMouseEvent *ev);
};
#endif // CUSTOMLABEL_H