add mouseMove signal to SignalLabel

Make use of the mouseMove signal in SplitHeader for the stream uptime
tooltip
This commit is contained in:
Rasmus Karlsson 2018-03-30 14:46:29 +02:00
parent 1c7f397f1b
commit 1b9fa36e06
3 changed files with 3 additions and 0 deletions

View file

@ -30,5 +30,6 @@ void SignalLabel::mouseReleaseEvent(QMouseEvent *event)
void SignalLabel::mouseMoveEvent(QMouseEvent *event) void SignalLabel::mouseMoveEvent(QMouseEvent *event)
{ {
emit this->mouseMove(event);
event->ignore(); event->ignore();
} }

View file

@ -18,6 +18,7 @@ signals:
void mouseDown(); void mouseDown();
void mouseUp(); void mouseUp();
void mouseMove(QMouseEvent *event);
protected: protected:
void mouseDoubleClickEvent(QMouseEvent *ev) override; void mouseDoubleClickEvent(QMouseEvent *ev) override;

View file

@ -57,6 +57,7 @@ SplitHeader::SplitHeader(Split *_split)
title->setMouseTracking(true); title->setMouseTracking(true);
QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this, QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this,
&SplitHeader::mouseDoubleClickEvent); &SplitHeader::mouseDoubleClickEvent);
QObject::connect(this->titleLabel, &SignalLabel::mouseMove, this, &SplitHeader::mouseMoveEvent);
layout->addStretch(1); layout->addStretch(1);