2019-07-23 22:18:36 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QFlags>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QMouseEvent>
|
|
|
|
#include <QWidget>
|
|
|
|
|
2019-10-07 15:46:08 +02:00
|
|
|
namespace chatterino {
|
2019-07-23 22:18:36 +02:00
|
|
|
|
|
|
|
class SignalLabel : public QLabel
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit SignalLabel(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
|
|
|
virtual ~SignalLabel() override = default;
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void mouseDoubleClick(QMouseEvent *ev);
|
|
|
|
|
|
|
|
void mouseDown();
|
|
|
|
void mouseUp();
|
|
|
|
void mouseMove(QMouseEvent *event);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void mouseDoubleClickEvent(QMouseEvent *ev) override;
|
|
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
|
|
|
void mouseMoveEvent(QMouseEvent *event) override;
|
|
|
|
};
|
|
|
|
|
2019-10-07 15:46:08 +02:00
|
|
|
} // namespace chatterino
|