mirror-chatterino2/src/widgets/helper/signallabel.hpp

28 lines
602 B
C++
Raw Normal View History

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