mirror-chatterino2/src/widgets/helper/SignalLabel.hpp
Paweł d1a10d3c1f
Fixed deprecated method QFlags::Zero (#2508)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
2021-03-13 16:27:13 +01:00

33 lines
711 B
C++

#pragma once
#include <QFlags>
#include <QLabel>
#include <QMouseEvent>
#include <QWidget>
namespace chatterino {
class SignalLabel : public QLabel
{
Q_OBJECT
public:
explicit SignalLabel(QWidget *parent = nullptr, Qt::WindowFlags f = {});
virtual ~SignalLabel() override = default;
signals:
void mouseDoubleClick(QMouseEvent *ev);
void leftMouseDown();
void leftMouseUp();
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;
};
} // namespace chatterino