mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
35 lines
626 B
C++
35 lines
626 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)
|
||
|
{
|
||
|
event->ignore();
|
||
|
}
|