QTfrontend/ui/mouseoverfilter.cpp
branchwebgl
changeset 8833 c13ebed437cb
parent 8801 c38ce9cf4c3a
child 9577 9577634bd284
--- a/QTfrontend/ui/mouseoverfilter.cpp	Wed Feb 20 02:21:58 2013 +0100
+++ b/QTfrontend/ui/mouseoverfilter.cpp	Tue Apr 02 21:00:57 2013 +0200
@@ -5,6 +5,7 @@
 #include <QLabel>
 #include <QLineEdit>
 #include <QCheckBox>
+#include <QListView>
 
 #include "mouseoverfilter.h"
 #include "ui/page/AbstractPage.h"
@@ -31,6 +32,10 @@
             abstractpage->setButtonDescription(widget->whatsThis());
         else if (widget->toolTip() != NULL)
             abstractpage->setButtonDescription(widget->toolTip());
+    }
+    else if (event->type() == QEvent::FocusIn)
+    {
+        abstractpage = qobject_cast<AbstractPage*>(ui->Pages->currentWidget());
 
         // play a sound when mouse hovers certain ui elements
         QPushButton * button = dynamic_cast<QPushButton*>(dist);
@@ -39,7 +44,8 @@
         QComboBox * droplist = dynamic_cast<QComboBox*>(dist);
         QSlider * slider = dynamic_cast<QSlider*>(dist);
         QTabWidget * tab = dynamic_cast<QTabWidget*>(dist);
-        if (button || textfield || checkbox || droplist || slider || tab)
+        QListView * listview = dynamic_cast<QListView*>(dist);
+        if (button || textfield || checkbox || droplist || slider || tab || listview)
         {
             SDLInteraction::instance().playSoundFile("/Sounds/steps.ogg");
         }
@@ -50,9 +56,9 @@
     {
         abstractpage = qobject_cast<AbstractPage*>(ui->Pages->currentWidget());
 
-        if (abstractpage->getDefautDescription() != NULL)
+        if (abstractpage->getDefaultDescription() != NULL)
         {
-            abstractpage->setButtonDescription( * abstractpage->getDefautDescription());
+            abstractpage->setButtonDescription( * abstractpage->getDefaultDescription());
         }
         else
             abstractpage->setButtonDescription("");