2018-06-26 14:09:39 +02:00
|
|
|
#include "widgets/helper/SignalLabel.hpp"
|
2018-03-30 14:39:33 +02:00
|
|
|
|
2018-06-26 16:37:59 +02:00
|
|
|
namespace chatterino {
|
|
|
|
|
2018-03-30 14:39:33 +02:00
|
|
|
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)
|
|
|
|
{
|
2018-03-30 14:46:29 +02:00
|
|
|
emit this->mouseMove(event);
|
2018-03-30 14:39:33 +02:00
|
|
|
event->ignore();
|
|
|
|
}
|
2018-06-26 16:37:59 +02:00
|
|
|
|
2018-06-26 17:20:03 +02:00
|
|
|
} // namespace chatterino
|