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

List:       kde-commits
Subject:    branches/KDE/3.5/kdetoys/kweather
From:       Martin Koller <m.koller () surfeu ! at>
Date:       2006-12-25 15:14:34
Message-ID: 1167059674.557270.13847.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 616459 by mkoller:

Also show country name in report/tooltip
(Yes, there is a La Paz in Mexico ...)


 M  +5 -1      dockwidget.cpp  
 M  +2 -1      reportview.cpp  


--- branches/KDE/3.5/kdetoys/kweather/dockwidget.cpp #616458:616459
@@ -113,7 +113,11 @@
     QPixmap icon = m_weatherService->icon( m_locationCode );
 
     if ( ! m_locationCode.isEmpty() )
-        tip = m_weatherService->stationName( m_locationCode ) + "\n" + tip;
+    {
+        tip = m_weatherService->stationName( m_locationCode ) + "\n" +
+              m_weatherService->stationCountry( m_locationCode ) + "\n" +
+              tip;
+    }
 
     QToolTip::remove(m_button);
     QToolTip::add(m_button, tip);
--- branches/KDE/3.5/kdetoys/kweather/reportview.cpp #616458:616459
@@ -78,6 +78,7 @@
     QString hlTextColor = cg.highlightedText().name();
 
     QString locationName = m_weatherService->stationName(m_locationCode);
+    QString countryName = m_weatherService->stationCountry(m_locationCode);
     QString temp = m_weatherService->temperature(m_locationCode);
     QString dewPoint = m_weatherService->dewPoint( m_locationCode);
     QString relHumidity = m_weatherService->relativeHumidity(m_locationCode );
@@ -124,7 +125,7 @@
     "border-left: solid %4 1px; border-right: solid %5 1px; margin-bottom: 1em; \
                padding: 2px; }\n")
     .arg(bgColor).arg(textColor).arg(textColor).arg(textColor).arg(textColor) +    
     QString("</style><title></title></head><body dir=\"%1\">").arg( \
                QApplication::reverseLayout()?"rtl":"ltr") + 
-    "<div class=\"headerTitle\"><b>" + i18n( "Weather Report - %1" ).arg( \
locationName ) +         +    "<div class=\"headerTitle\"><b>" + i18n( "Weather \
Report - %1 - %2" ).arg( locationName ).arg( countryName ) +          "</b></div>\n" \
                +    
     QString("<div class=\"headerMsg\"><b>" + i18n( "Last updated on %1" ) + \
                "</b></div>\n"
     "<table><tr><td width=\"60\" style=\"text-align: center; border: dotted %2 \
1px;\">"


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

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