<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>108427</bug_id>
          
          <creation_ts>2005-07-02 10:45:22 +0000</creation_ts>
          <short_desc>tooltip contains no usefull information at all</short_desc>
          <delta_ts>2006-12-25 23:26:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kweather-kde3</product>
          <component>general</component>
          <version>2.1</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matthias Kempka">lists</reporter>
          <assigned_to>geiseri</assigned_to>
          <cc>Stefan.Borggraefe</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>354845</commentid>
    <comment_count>0</comment_count>
    <who name="Matthias Kempka">lists</who>
    <bug_when>2005-07-02 10:45:23 +0000</bug_when>
    <thetext>Version:           2.1 (using KDE KDE 3.4.0)
Installed from:    Unlisted Binary Package
OS:                Linux

This report might look similar to bug 62055, but imo the point is different. The null-information of the tooltip is a usability bug.

The applet displays some information. When I move my mouse over an applet I want some more information. The information I get from the kweather tooltip is &quot;click here to see the detailed weather report..&quot;. That&apos;s no information at all. Every user knows that applets may be clicked -- if not nothing will happen when they try, and try they will anyway.
I think the tooltip is a place where the informations from the detailed report should be shown without making me to click. This does not make the detailed window useless as this is a nicer and more permanent way to present the information. But as a power user I don&apos;t want to open a new window for every little bit of information that could be retrieved a much faster way.

btw, I love the applet :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>378500</commentid>
    <comment_count>1</comment_count>
    <who name="">richlv</who>
    <bug_when>2005-10-03 15:05:29 +0000</bug_when>
    <thetext>hmm. in 3.4.2 kweather shows in tooltip temperature, wind and air pressure</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>408108</commentid>
    <comment_count>2</comment_count>
    <who name="Stefan Borggraefe">Stefan.Borggraefe</who>
    <bug_when>2006-01-22 17:27:10 +0000</bug_when>
    <thetext>In KDE 3.5.0 the kweather applet doesn&apos;t have any tooltip. At least with my Debian Sid installation.

I also like the idea proposed in comment 0.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>495993</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Koller">martin</who>
    <bug_when>2006-12-25 23:26:56 +0000</bug_when>
    <thetext>SVN commit 616506 by mkoller:

BUG: 97107
BUG: 134426
BUG: 108427

Display weather data even if station needs maintenance
Patch included from Sok Ann Yap sokann@gmail.com

Make the tooltip more informative by showing station name
and more data



 M  +56 -31    dockwidget.cpp  
 M  +3 -6      metar_parser.cpp  
 M  +6 -10     reportview.cpp  
 M  +1 -4      weatherlib.cpp  


--- branches/KDE/3.5/kdetoys/kweather/dockwidget.cpp #616505:616506
@@ -41,7 +41,8 @@
     setBackgroundOrigin( AncestorOrigin );
 }
 
-dockwidget::~dockwidget(){
+dockwidget::~dockwidget()
+{
     delete m_weatherService;
 }
 
@@ -77,51 +78,74 @@
 
 void dockwidget::showWeather()
 {
-    QString tip;
+    QString tip = &quot;&lt;qt&gt;&quot;;
 
     QString temp     = &quot;?&quot;;
     QString wind     = &quot;?&quot;;
     QString pressure = &quot;?&quot;;
 
-    if ( !m_locationCode.isEmpty() &amp;&amp; m_weatherService-&gt;stationNeedsMaintenance( m_locationCode ) )
+    if ( !m_locationCode.isEmpty() )
     {
-        tip = i18n(&quot;Station reports that it needs maintenance\n&quot;
-                   &quot;Please try again later&quot;);
-    }
-    else
-    {
-        if ( !m_locationCode.isEmpty() )
-        {
-            temp     = m_weatherService-&gt;temperature( m_locationCode );
-            wind     = m_weatherService-&gt;wind( m_locationCode );
-            pressure = m_weatherService-&gt;pressure( m_locationCode );
-        }
+        temp     = m_weatherService-&gt;temperature( m_locationCode );
+        wind     = m_weatherService-&gt;wind( m_locationCode );
+        pressure = m_weatherService-&gt;pressure( m_locationCode );
 
-        if (m_mode != ShowAll)
-        {
-            tip = i18n(&quot;Temperature: &quot;) + temp;
-            tip += i18n(&quot;\nWind: &quot;) + wind;
-            tip += i18n(&quot;\nAir pressure: &quot;) + pressure;
-        }
+        QString dewPoint    = m_weatherService-&gt;dewPoint( m_locationCode);
+        QString relHumidity = m_weatherService-&gt;relativeHumidity( m_locationCode );
+        QString heatIndex   = m_weatherService-&gt;heatIndex( m_locationCode );
+        QString windChill   = m_weatherService-&gt;windChill( m_locationCode );
+        QString sunRiseTime = m_weatherService-&gt;sunRiseTime( m_locationCode );
+        QString sunSetTime  = m_weatherService-&gt;sunSetTime( m_locationCode );
+
+        tip += &quot;&lt;h3&gt;&lt;center&gt;&lt;nobr&gt;&quot; +
+               m_weatherService-&gt;stationName( m_locationCode ) + &quot; (&quot; +
+               m_weatherService-&gt;stationCountry( m_locationCode ) + &quot;)&lt;/nobr&gt;&lt;/center&gt;&lt;/h3&gt;&lt;br&gt;&quot;;
+
+        tip += QString(&quot;&lt;table&gt;&quot;
+                &quot;&lt;tr&gt;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Temperature:&quot;   ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;/td&gt;&quot;
+                    &quot;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Dew Point:&quot;     ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%2&lt;/nobr&gt;&lt;/td&gt;&lt;/nobr&gt;&lt;/tr&gt;&quot;
+
+                &quot;&lt;tr&gt;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Air Pressure:&quot;  ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%3&lt;/nobr&gt;&lt;/td&gt;&quot;
+                    &quot;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Rel. Humidity:&quot; ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%4&lt;/nobr&gt;&lt;/td&gt;&lt;/nobr&gt;&lt;/tr&gt;&quot;
+
+                &quot;&lt;tr&gt;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Wind Speed:&quot;    ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%5&lt;/nobr&gt;&lt;/td&gt;&quot;)
+                .arg(temp).arg(dewPoint).arg(pressure).arg(relHumidity).arg(wind);
+
+        if ( !heatIndex.isEmpty() )
+            tip += QString(&quot;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Heat Index:&quot; ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;/td&gt;&quot;).arg(heatIndex);
+        else if ( !windChill.isEmpty() )
+            tip += QString(&quot;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Wind Chill:&quot; ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;/td&gt;&quot;).arg(windChill);
         else
+            tip += &quot;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&quot;;
+        tip += &quot;&lt;/tr&gt;&quot;;
+
+        tip += QString(&quot;&lt;tr&gt;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Sunrise:&quot; ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%1&lt;/nobr&gt;&lt;/td&gt;&quot; +
+                           &quot;&lt;th&gt;&lt;nobr&gt;&quot; + i18n( &quot;Sunset:&quot;  ) + &quot;&lt;/nobr&gt;&lt;/th&gt;&lt;td&gt;&lt;nobr&gt;%2&lt;/nobr&gt;&lt;/td&gt;&quot;)
+                 .arg(sunRiseTime).arg(sunSetTime);
+
+        tip += &quot;&lt;/tr&gt;&lt;/table&gt;&quot;;
+
+        if ( m_weatherService-&gt;stationNeedsMaintenance( m_locationCode ) )
         {
-            tip = i18n(&quot;Click here to see\nthe detailed weather report...&quot;);
+            tip += &quot;&lt;br&gt;&quot; + i18n(&quot;Station reports that it needs maintenance\n&quot;
+                                 &quot;Please try again later&quot;);
         }
     }
+    else
+    {
+        tip += i18n(&quot;Temperature: &quot;) + temp + &quot;&lt;br&gt;&quot;;
+        tip += i18n(&quot;\nWind: &quot;) + wind + &quot;&lt;br&gt;&quot;;
+        tip += i18n(&quot;\nAir pressure: &quot;) + pressure + &quot;&lt;br&gt;&quot;;
+    }
 
+    tip += &quot;&lt;/qt&gt;&quot;;
+
     // On null or empty location code, or if the station needs maintenance, this will return the dunno icon.
     QPixmap icon = m_weatherService-&gt;icon( m_locationCode );
 
-    if ( ! m_locationCode.isEmpty() )
-    {
-        tip = m_weatherService-&gt;stationName( m_locationCode ) + &quot;\n&quot; +
-              m_weatherService-&gt;stationCountry( m_locationCode ) + &quot;\n&quot; +
-              tip;
-    }
+    QToolTip::remove(this);
+    QToolTip::add(this, tip);
 
-    QToolTip::remove(m_button);
-    QToolTip::add(m_button, tip);
-
     kdDebug(12004) &lt;&lt; &quot;show weather: &quot; &lt;&lt; endl;
     kdDebug(12004) &lt;&lt; &quot;location: &quot; &lt;&lt; m_locationCode &lt;&lt; endl;
     kdDebug(12004) &lt;&lt; &quot;temp,wind,pressure: &quot; &lt;&lt; temp &lt;&lt; &quot; &quot; &lt;&lt; wind &lt;&lt; &quot; &quot; &lt;&lt; pressure &lt;&lt; endl;
@@ -134,7 +158,8 @@
     m_button-&gt;setPixmap( icon );
 }
 
-void dockwidget::initDock(){
+void dockwidget::initDock()
+{
     kdDebug(12004) &lt;&lt; &quot;Init dockwidget &quot; &lt;&lt; endl;
 
     m_button= new WeatherButton(this,&quot;m_button&quot;);
--- branches/KDE/3.5/kdetoys/kweather/metar_parser.cpp #616505:616506
@@ -135,12 +135,9 @@
 		}
 	}
 
-	if (!weatherInfo.stationNeedsMaintenance)
-	{
-		calcTemperatureVariables();
-		calcWindChill();
-		calcCurrentIcon();
-	}
+	calcTemperatureVariables();
+	calcWindChill();
+	calcCurrentIcon();
 	
 	return weatherInfo;
 }
--- branches/KDE/3.5/kdetoys/kweather/reportview.cpp #616505:616506
@@ -100,18 +100,14 @@
     if ( m_weatherService-&gt;stationNeedsMaintenance( m_locationCode ) )
     {
         weatherText += &quot;&lt;li&gt;&quot; + i18n( &quot;Station reports that it needs maintenance&quot; ) + &quot; \n&quot;;
-        weatherText += &quot;&lt;li&gt;&quot; + i18n( &quot;Please try a different one&quot; ) + &quot; \n&quot;;
     }
-    else
-    {
-        for (QStringList::const_iterator it = cover.begin();
-                it != cover.end(); ++it)
-            weatherText += &quot;&lt;li&gt;&quot; + *it + &quot;\n&quot;;
+    for (QStringList::const_iterator it = cover.begin();
+            it != cover.end(); ++it)
+        weatherText += &quot;&lt;li&gt;&quot; + *it + &quot;\n&quot;;
 
-        for (QStringList::const_iterator it = weather.begin();
-                it != weather.end(); ++it)
-            weatherText += &quot;&lt;li&gt;&quot; + *it + &quot;\n&quot;;
-    }
+    for (QStringList::const_iterator it = weather.begin();
+            it != weather.end(); ++it)
+        weatherText += &quot;&lt;li&gt;&quot; + *it + &quot;\n&quot;;
 
     weatherText += &quot;&lt;/ul&gt;\n&quot;;
 
--- branches/KDE/3.5/kdetoys/kweather/weatherlib.cpp #616505:616506
@@ -276,10 +276,7 @@
 	if ( !stationID.isEmpty() )
 	{
 		Data *d = findData(stationID);
-		if (!d-&gt;wi.stationNeedsMaintenance)
-		{
-			result = d-&gt;wi.theWeather;
-		}
+		result = d-&gt;wi.theWeather;
 	}
 	
 	return result;
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>