2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-01-18 14:48:42 +01:00
|
|
|
|
|
|
|
#include <QFlags>
|
|
|
|
#include <QLabel>
|
2017-01-20 06:10:28 +01:00
|
|
|
#include <QMouseEvent>
|
2017-01-18 14:48:42 +01:00
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
class SignalLabel : public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2017-01-20 06:10:28 +01:00
|
|
|
|
2017-01-18 14:48:42 +01:00
|
|
|
public:
|
2018-03-30 14:39:33 +02:00
|
|
|
explicit SignalLabel(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
|
|
|
~SignalLabel() override = default;
|
2017-01-20 06:10:28 +01:00
|
|
|
|
2017-01-18 14:48:42 +01:00
|
|
|
signals:
|
|
|
|
void mouseDoubleClick(QMouseEvent *ev);
|
2017-01-20 06:10:28 +01:00
|
|
|
|
|
|
|
void mouseDown();
|
|
|
|
void mouseUp();
|
|
|
|
|
2017-01-18 14:48:42 +01:00
|
|
|
protected:
|
2018-03-30 14:39:33 +02:00
|
|
|
void mouseDoubleClickEvent(QMouseEvent *ev) override;
|
|
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
|
|
|
void mouseMoveEvent(QMouseEvent *event) override;
|
2017-01-18 14:48:42 +01:00
|
|
|
};
|