[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/utils/filelight/src/part/radialMap
From:       Martin Tobias Holmedahl Sandsmark <sandsmark () samfundet ! no>
Date:       2010-05-26 20:17:49
Message-ID: 20100526201749.671CBAC8C3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1130941 by sandsmark:

Don't hide tooltip on keypresses, and make sure the tooltip is shown again when the \
window is shown again (for example after alt-tabbing away).

BUG: 145416



 M  +3 -3      segmentTip.cpp  
 M  +1 -0      widget.h  
 M  +9 -0      widgetEvents.cpp  


--- trunk/playground/utils/filelight/src/part/radialMap/segmentTip.cpp \
#1130940:1130941 @@ -128,12 +128,12 @@
     switch (e->type())
     {
     case QEvent::Leave:
-    case QEvent::KeyPress:
-    case QEvent::KeyRelease:
-    case QEvent::FocusIn:
     case QEvent::FocusOut:
     case QEvent::Wheel:
         hide(); //FALL THROUGH
+    case QEvent::FocusIn:
+    case QEvent::KeyPress:
+    case QEvent::KeyRelease:
     default:
         return false; //allow this event to passed to target
     }
--- trunk/playground/utils/filelight/src/part/radialMap/widget.h #1130940:1130941
@@ -98,6 +98,7 @@
     virtual void mousePressEvent(QMouseEvent*);
     virtual void paintEvent(QPaintEvent*);
     virtual void resizeEvent(QResizeEvent*);
+    virtual void enterEvent(QEvent*);
 
 protected:
     const Segment *segmentAt(QPoint&) const; //FIXME const reference for a library \
                others can use
--- trunk/playground/utils/filelight/src/part/radialMap/widgetEvents.cpp \
#1130940:1130941 @@ -164,6 +164,15 @@
     }
 }
 
+void RadialMap::Widget::enterEvent(QEvent *e)
+{
+    if (!m_focus) return;
+
+    setCursor(Qt::PointingHandCursor);
+    emit mouseHover(m_focus->file()->fullPath());
+    update();
+}
+
 void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
 {
     //m_tip is hidden already by event filter


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic