[Kde-games-devel] ktuberling, play sound when moving object at the playground

Hans Schou hans.schou at gmail.com
Mon Apr 6 11:06:13 CEST 2009


Hi

Currently a sound is only played when a new object is added to the
playground. It seems however possible to easily add that the sound is
played when an already placed object is moved.

I know I should install the full dev system - but could I ask someone
to try this snippet?

--- playground.cpp      (revision 949921)
+++ playground.cpp      (working copy)
@@ -170,6 +170,8 @@
         QPolygon poly = mapFromScene(rect);
         QSize size = poly.boundingRect().size(); // the polygon
should be a rect...
         QString elem = m_dragItem->elementId();
+
+        m_topLevel->playSound(m_objectsNameSound.value(elem));
         setCursor(QCursor(toPixmap(elem, size.width(), size.height(),
&m_SvgRenderer)));

         m_scene->removeItem(m_dragItem);

Q: If it works, can it then be added to the trunk?


rgds/hans


More information about the kde-games-devel mailing list