[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeplasma-addons/applets/weather
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-05-07 20:27:28
Message-ID: 20100507202728.E2AB4AC8B1 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1124119 by aseigo:
clear the weather icon when a new source is fetched
M +8 -1 weatherapplet.cpp
M +1 -0 weatherapplet.h
--- trunk/KDE/kdeplasma-addons/applets/weather/weatherapplet.cpp #1124118:1124119
@@ -66,6 +66,7 @@
void setCurrentWeather(const KIcon ¤tWeather)
{
+ kDebug() << "!!!!!!!!!!!!!!!!!!!!!!!";
m_currentWeather = currentWeather;
update();
}
@@ -76,6 +77,7 @@
return;
}
+ kDebug() << "happily painting";
QSize s(KIconLoader::SizeEnormous, KIconLoader::SizeEnormous);
s.boundedTo(size().toSize());
painter->drawPixmap(QPoint(0, 0), m_currentWeather.pixmap(s));
@@ -114,6 +116,7 @@
{
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, \
SLOT(reloadTheme())); m_graphicsWidget = new BackgroundWidget(this);
+ connect(this, SIGNAL(newWeatherSource()), this, \
SLOT(clearCurrentWeatherIcon()));
switch (formFactor()) {
case Plasma::Horizontal:
@@ -206,6 +209,11 @@
Plasma::ToolTipManager::self()->setContent(this, data);
}
+void WeatherApplet::clearCurrentWeatherIcon()
+{
+ m_graphicsWidget->setCurrentWeather(KIcon());
+}
+
void WeatherApplet::resizeView()
{
if (m_fiveDaysView) {
@@ -398,7 +406,6 @@
if (!m_fiveDaysView) {
kDebug() << "Create 5 Days Plasma::WeatherView";
m_fiveDaysView = new Plasma::WeatherView(m_tabBar);
- connect(m_fiveDaysView->nativeWidget()->header(), \
SIGNAL(sectionResized(int, int, int)), this, SLOT(fiveDaysColumnResized(int, int, \
int))); }
if (!m_fiveDaysModel) {
--- trunk/KDE/kdeplasma-addons/applets/weather/weatherapplet.h #1124118:1124119
@@ -60,6 +60,7 @@
protected Q_SLOTS:
void configAccepted();
void toolTipAboutToShow();
+ void clearCurrentWeatherIcon();
protected:
void constraintsEvent(Plasma::Constraints constraints);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic