summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/graphics/rbscreen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/graphics/rbscreen.cpp')
-rw-r--r--utils/themeeditor/graphics/rbscreen.cpp15
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 @@
*
****************************************************************************/
+#include "rbscene.h"
#include "rbscreen.h"
#include "rbviewport.h"
#include "devicestate.h"
#include <QPainter>
#include <QFile>
+#include <QGraphicsSceneHoverEvent>
+#include <QGraphicsSceneMouseEvent>
RBScreen::RBScreen(const RBRenderInfo& info, bool remote,
QGraphicsItem *parent)
@@ -32,6 +35,8 @@ RBScreen::RBScreen(const RBRenderInfo& info, bool remote,
albumArt(0), customUI(0)
{
+ setAcceptHoverEvents(true);
+
if(remote)
{
fullWidth = info.device()->data("remotewidth").toInt();
@@ -265,3 +270,13 @@ QColor RBScreen::stringToColor(QString str, QColor fallback)
return retval;
}
+
+void RBScreen::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+{
+ RBScene* s = dynamic_cast<RBScene*>(scene());
+ QPoint p = event->scenePos().toPoint();
+ s->moveMouse("(" + QString::number(p.x()) + ", "
+ + QString::number(p.y()) + ")");
+
+ QGraphicsItem::hoverMoveEvent(event);
+}