mirror-chatterino2/src/widgets/helper/signallabel.cpp
Rasmus Karlsson c457651c63 add mouseMove signal to SignalLabel
Make use of the mouseMove signal in SplitHeader for the stream uptime
tooltip
2018-04-11 22:54:34 +02:00

36 lines
659 B
C++

#include "widgets/helper/signallabel.hpp"
SignalLabel::SignalLabel(QWidget *parent, Qt::WindowFlags f)
: QLabel(parent, f)
{
}
void SignalLabel::mouseDoubleClickEvent(QMouseEvent *ev)
{
emit this->mouseDoubleClick(ev);
}
void SignalLabel::mousePressEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
emit mouseDown();
}
event->ignore();
}
void SignalLabel::mouseReleaseEvent(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton) {
emit mouseUp();
}
event->ignore();
}
void SignalLabel::mouseMoveEvent(QMouseEvent *event)
{
emit this->mouseMove(event);
event->ignore();
}