diff options
Diffstat (limited to 'utils/themeeditor/graphics/rbscreen.cpp')
-rw-r--r-- | utils/themeeditor/graphics/rbscreen.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/themeeditor/graphics/rbscreen.cpp b/utils/themeeditor/graphics/rbscreen.cpp index df72d5005b..1b1adc8be4 100644 --- a/utils/themeeditor/graphics/rbscreen.cpp +++ b/utils/themeeditor/graphics/rbscreen.cpp | |||
@@ -19,12 +19,15 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "rbscene.h" | ||
22 | #include "rbscreen.h" | 23 | #include "rbscreen.h" |
23 | #include "rbviewport.h" | 24 | #include "rbviewport.h" |
24 | #include "devicestate.h" | 25 | #include "devicestate.h" |
25 | 26 | ||
26 | #include <QPainter> | 27 | #include <QPainter> |
27 | #include <QFile> | 28 | #include <QFile> |
29 | #include <QGraphicsSceneHoverEvent> | ||
30 | #include <QGraphicsSceneMouseEvent> | ||
28 | 31 | ||
29 | RBScreen::RBScreen(const RBRenderInfo& info, bool remote, | 32 | RBScreen::RBScreen(const RBRenderInfo& info, bool remote, |
30 | QGraphicsItem *parent) | 33 | QGraphicsItem *parent) |
@@ -32,6 +35,8 @@ RBScreen::RBScreen(const RBRenderInfo& info, bool remote, | |||
32 | albumArt(0), customUI(0) | 35 | albumArt(0), customUI(0) |
33 | { | 36 | { |
34 | 37 | ||
38 | setAcceptHoverEvents(true); | ||
39 | |||
35 | if(remote) | 40 | if(remote) |
36 | { | 41 | { |
37 | fullWidth = info.device()->data("remotewidth").toInt(); | 42 | fullWidth = info.device()->data("remotewidth").toInt(); |
@@ -265,3 +270,13 @@ QColor RBScreen::stringToColor(QString str, QColor fallback) | |||
265 | return retval; | 270 | return retval; |
266 | 271 | ||
267 | } | 272 | } |
273 | |||
274 | void RBScreen::hoverMoveEvent(QGraphicsSceneHoverEvent *event) | ||
275 | { | ||
276 | RBScene* s = dynamic_cast<RBScene*>(scene()); | ||
277 | QPoint p = event->scenePos().toPoint(); | ||
278 | s->moveMouse("(" + QString::number(p.x()) + ", " | ||
279 | + QString::number(p.y()) + ")"); | ||
280 | |||
281 | QGraphicsItem::hoverMoveEvent(event); | ||
282 | } | ||