From 1b9fa36e06569820106dcd2c70643b2688185e14 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Fri, 30 Mar 2018 14:46:29 +0200 Subject: [PATCH] add mouseMove signal to SignalLabel Make use of the mouseMove signal in SplitHeader for the stream uptime tooltip --- src/widgets/helper/signallabel.cpp | 1 + src/widgets/helper/signallabel.hpp | 1 + src/widgets/helper/splitheader.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/widgets/helper/signallabel.cpp b/src/widgets/helper/signallabel.cpp index c7bb87940..bc1eb6aaf 100644 --- a/src/widgets/helper/signallabel.cpp +++ b/src/widgets/helper/signallabel.cpp @@ -30,5 +30,6 @@ void SignalLabel::mouseReleaseEvent(QMouseEvent *event) void SignalLabel::mouseMoveEvent(QMouseEvent *event) { + emit this->mouseMove(event); event->ignore(); } diff --git a/src/widgets/helper/signallabel.hpp b/src/widgets/helper/signallabel.hpp index 513fdbabc..658e3ccf2 100644 --- a/src/widgets/helper/signallabel.hpp +++ b/src/widgets/helper/signallabel.hpp @@ -18,6 +18,7 @@ signals: void mouseDown(); void mouseUp(); + void mouseMove(QMouseEvent *event); protected: void mouseDoubleClickEvent(QMouseEvent *ev) override; diff --git a/src/widgets/helper/splitheader.cpp b/src/widgets/helper/splitheader.cpp index 45b7f70ee..ca43da27f 100644 --- a/src/widgets/helper/splitheader.cpp +++ b/src/widgets/helper/splitheader.cpp @@ -57,6 +57,7 @@ SplitHeader::SplitHeader(Split *_split) title->setMouseTracking(true); QObject::connect(this->titleLabel, &SignalLabel::mouseDoubleClick, this, &SplitHeader::mouseDoubleClickEvent); + QObject::connect(this->titleLabel, &SignalLabel::mouseMove, this, &SplitHeader::mouseMoveEvent); layout->addStretch(1);