
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
A weather-aware wallpaper for KDE's Plasma desktop shell. Once configured, it is aware of the weather at your location, and will change the desktop's wallpaper as the weather changes. It uses the weather dataengine to retrieve the weather.
Bugs:
-Setting a second location will not work unless after you set it, you switch to another wallpaper plugin, hit apply, and switch back again.
-Also, since the NOAA ion doesn't return icon names, this wallpaper plugin will not work with the NOAA weather source. :(
TODO:
- Add an element of time in determining the wallpaper, so that night pics can come at night, etc. (The weather icon we receive can't provide this for most weathers, just for cloudy and clear nights)
- Show basic weather info/location name on top left of screen. For now just use the weather widget of your choice. ;-)
+ Autodetect metric/imperial measurement systems based on locale, or at least let the user choose between the two
- Allow the user to set a custom wallpaper for weather conditions.
This wallpaper is compatible with both KDE 4.2 and KDE 4.3, though users of KDE 4.3 users will want to get the latest version from kdeartwork/weatherwallpapers
Until then, feel free to enjoy the wallpaper plugin. :)
Installation notes:
This plugin does need the wallpapers from kdebase-workspace and kdeartwork.
To build this plugin, you will need the development headers for kdelibs and kdebase-workspace. (kdelibs5-dev and kdebase-workspace-dev on Kubuntu, dunno about other distros)
11 years ago
0.2.1:
------
- Fix a bug where the weather update time configuration wasn't saved
- Update translations for plasma-wallpaper-weather.desktop from trunk. (Added sv translation)
- Use the Air wallpaper if the weather cannot be retrieved (No internet, etc)
0.2:
------
- Initial release.
11 years ago
0.2.1:
------
- Fix a bug where the weather update time configuration wasn't saved
- Update translations for plasma-wallpaper-weather.desktop from trunk. (Added sv translation)
- Use the Air wallpaper if the weather cannot be retrieved (No internet, etc)
0.2:
------
- Initial release.
MageJohn
11 years ago
I'm using ubuntu, if that's any help!
Report
janet
11 years ago
Report
jfiedler
11 years ago
i really like this plugin, but one thing that would make it even better is if the wallpapers are configurable:
choose a directory with images named like the states "rainy.png" "sunny..."
and add support for time-of-day-specific themes, so at night and state sunny it shows a moon and stars and in the evening a sunset or things...
this would really be great...
Report
adamruss
11 years ago
thanks
Report
jmdennis7
11 years ago
I'm a bit of a beginner with Kubuntu Jaunty and I would LOVE to have this wallpaper for my laptop. Unfortunately I cannot seem to get my town to appear in any of the weather services and I don't know enough about any of these systems to make heads or tails of what you all have been sharing with one another.
Could someone, please explain, from the blank desktop, how I can get one or more of these patches into the right files, especially the ones that don't give me any permissions to make changes.
Many thanks
Report
alessiol
11 years ago
Report
BrownieBoy
11 years ago
I got around this by using the force-overwrite option in dpkg, like so:
sudo dpkg -i --force-overwrite plasma-wallpaper-weather_0.2.1-0ubuntu1~kdelook1_i386.deb
It's normally not a good idea to use force options when installing packages, but it worked for me this time. YMMV.
Report
dglent
11 years ago
* the rpm for mandriva 2009.1 32bit
http://www.mediafire.com/file/rzmmdhtnmm3/plasma-wallpaper-weather-0.2-1mdv2009.1.i586.rpm
Report
jmthomas
11 years ago
Report
dglent
11 years ago
thanks
Report
awtposts
11 years ago
Report
YAFU
11 years ago
No data are available for my country Argentina.
For example:
www.weather.com
http://espanol.weather.com
Like the plaismoid:
www.kde-look.org/content/show.php/Customizable+Weather+Plasmoid+(CWP)?content=98925
Thank you.
Report
rub3nmv
11 years ago
Report
Israphel
11 years ago
I used the Fedora 10 rpm.
http://omploader.org/vMWthZw/wea.jpeg
Report
Israphel
11 years ago
http://omploader.org/vMWtnbg/wea1.jpeg
Report
Phobeus
11 years ago
I did the fedora package and can confirm that it doesn't seems to work anymore. However, it did ... even yesterday.
My best guess is currently that there are troubles with the qt 4.5.1 update from yesterday. It introduced plenty of nasty problem and lots plasmoids are not working the way they should. Can you please check, if you already did update the package on your system also?
Report
Israphel
11 years ago
I lefet the "completely blue wallpaper" for a while, and then a Sunny wallpaper started to shine.
It's not exactly my city, but I selected the nearest city in the DataEngine and use the Customizable Weather Plasmoid to show the info from weather.com
Report
hakka
11 years ago
Report
jmthomas
11 years ago
Report
alessiol
11 years ago
Can you implement http://weather.yahoo.com/ ??
thks!!!
Report
Cobi
11 years ago
$ diff -p plasma-wallpaper-weather-0.2/weather.cpp plasma-wallpaper-weather-0.2-Cobi/weather.cpp
*** plasma-wallpaper-weather-0.2/weather.cpp Sat Apr 4 17:26:34 2009
--- plasma-wallpaper-weather-0.2-Cobi/weather.cpp Sat Apr 11 05:55:48 2009
***************
*** 35,40 ****
--- 35,42 ----
#include <Plasma/Animator>
#include <Plasma/DataEngineManager>
+ #include <time.h>
+
WeatherWallpaper::WeatherWallpaper(QObject * parent, const QVariantList & args )
: Plasma::Wallpaper(parent, args),
*************** void WeatherWallpaper::placeEditChanged(
*** 445,455 ****
void WeatherWallpaper::weatherContent(const Plasma::DataEngine::Data &data)
{
// TODO - Find a better way to retrieve weather than by looking at the icon name...
! kDebug() << "Current weather is:" << data["Condition Icon"].toString();
! if (data["Condition Icon"].toString() == "N/A") {
! m_wallpaper = QString(m_dir + "Air");
! kDebug() << "Weather not available";
}
if (data["Condition Icon"].toString() == "weather-clear") {
--- 447,769 ----
void WeatherWallpaper::weatherContent(const Plasma::DataEngine::Data &data)
{
+ time_t epoch;
+ struct tm* friendly;
+
+ epoch = time(NULL);
+ friendly = localtime(&epoch);
// TODO - Find a better way to retrieve weather than by looking at the icon name...
! kDebug() << "Current weather is:" << data["Condition Icon"].toString() << data["Current Conditions"].toString();
! if (data["Condition Icon"].toString() == "N/A"
! || data["Condition Icon"].toString() == "weather-none-available"
! ) {
! /* Utter Ludicrosity */
! if (data["Current Conditions"].toString() == "Fair"
! || data["Current Conditions"].toString() == "Clear"
! || data["Current Conditions"].toString() == "Fair with Haze"
! || data["Current Conditions"].toString() == "Clear with Haze"
! || data["Current Conditions"].toString() == "Fair and Breezy"
! || data["Current Conditions"].toString() == "Clear and Breezy"
! || data["Current Conditions"].toString() == "Windy"
! || data["Current Conditions"].toString() == "Breezy"
! || data["Current Conditions"].toString() == "Fair and Windy")
! if ((friendly->tm_hour >= 0 && friendly->tm_hour < 6)
! || (friendly->tm_hour >= 18))
! m_wallpaper = QString(m_dir + "At_Night");
! else
! m_wallpaper = QString(m_dir + "Fields_of_Peace");
!
! else if (data["Current Conditions"].toString() == "A Few Clouds"
! || data["Current Conditions"].toString() == "A Few Clouds with Haze"
! || data["Current Conditions"].toString() == "A Few Clouds and Breezy"
! || data["Current Conditions"].toString() == "A Few Clouds and Windy"
! || data["Current Conditions"].toString() == "Partly Cloudy"
! || data["Current Conditions"].toString() == "Partly Cloudy with Haze"
! || data["Current Conditions"].toString() == "Partly Cloudy and Breezy"
! || data["Current Conditions"].toString() == "Partly Cloudy and Windy")
! if ((friendly->tm_hour >= 0 && friendly->tm_hour < 6)
! || (friendly->tm_hour >= 18))
! m_wallpaper = QString(m_dir + "JK_Bridge_at_Night");
! else
! m_wallpaper = QString(m_dir + "Colorado_Farm");
!
! else if (data["Current Conditions"].toString() == "Mostly Cloudy"
! || data["Current Conditions"].toString() == "Mostly Cloudy with Haze"
! || data["Current Conditions"].toString() == "Mostly Cloudy and Breezy"
! || data["Current Conditions"].toString() == "Mostly Cloudy and Windy"
! || data["Current Conditions"].toString() == "Overcast"
! || data["Current Conditions"].toString() == "Overcast with Haze"
! || data["Current Conditions"].toString() == "Overcast and Breezy"
! || data["Current Conditions"].toString() == "Overcast and Windy")
! m_wallpaper = QString(m_dir + "Blue_Sun");
!
! else if (data["Current Conditions"].toString() == "Rain Showers"
! || data["Current Conditions"].toString() == "Light Rain Showers"
! || data["Current Conditions"].toString() == "Light Rain and Breezy"
! || data["Current Conditions"].toString() == "Heavy Rain Showers"
! || data["Current Conditions"].toString() == "Rain Showers in Vacinity"
! || data["Current Conditions"].toString() == "Light Showers Rain"
! || data["Current Conditions"].toString() == "Heavy Showers Rain"
! || data["Current Conditions"].toString() == "Showers Rain"
! || data["Current Conditions"].toString() == "Showers Rain in Vicinity"
! || data["Current Conditions"].toString() == "Rain Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Light Rain Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Rain Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Rain Showers in Vicinity Fog/Mist"
! || data["Current Conditions"].toString() == "Light Showers Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Showers Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Showers Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Showers Rain in Vicinity Fog/Mist"
! || data["Current Conditions"].toString() == "Showers in Vicinity"
! || data["Current Conditions"].toString() == "Showers in Vicinity Fog/Mist"
! || data["Current Conditions"].toString() == "Showers in Vicinity Fog"
! || data["Current Conditions"].toString() == "Showers in Vicinity Haze"
! || data["Current Conditions"].toString() == "Light Rain"
! || data["Current Conditions"].toString() == "Drizzle"
! || data["Current Conditions"].toString() == "Light Drizzle"
! || data["Current Conditions"].toString() == "Heavy Drizzle"
! || data["Current Conditions"].toString() == "Light Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Drizzle Fog/Mist"
! || data["Current Conditions"].toString() == "Light Drizzle Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Drizzle Fog/Mist"
! || data["Current Conditions"].toString() == "Light Rain Fog"
! || data["Current Conditions"].toString() == "Drizzle Fog"
! || data["Current Conditions"].toString() == "Light Drizzle Fog"
! || data["Current Conditions"].toString() == "Heavy Drizzle Fog"
! || data["Current Conditions"].toString() == "Rain"
! || data["Current Conditions"].toString() == "Heavy Rain"
! || data["Current Conditions"].toString() == "Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Rain Fog"
! || data["Current Conditions"].toString() == "Heavy Rain Fog")
! m_wallpaper = QString(m_dir + "There_is_Rain_on_the_Table");
!
! else if (data["Current Conditions"].toString() == "Fog/Mist"
! || data["Current Conditions"].toString() == "Fog"
! || data["Current Conditions"].toString() == "Freezing Fog"
! || data["Current Conditions"].toString() == "Shallow Fog"
! || data["Current Conditions"].toString() == "Partial Fog"
! || data["Current Conditions"].toString() == "Patches of Fog"
! || data["Current Conditions"].toString() == "Fog in Vicinity"
! || data["Current Conditions"].toString() == "Freezing Fog in Vacinity"
! || data["Current Conditions"].toString() == "Shallow Fog in Vacinity"
! || data["Current Conditions"].toString() == "Partial Fog in Vacinity"
! || data["Current Conditions"].toString() == "Patches of Fog in Vacinity"
! || data["Current Conditions"].toString() == "Showers in Vacinity Fog"
! || data["Current Conditions"].toString() == "Light Freezing Fog"
! || data["Current Conditions"].toString() == "Heavy Freezing Fog"
! || data["Current Conditions"].toString() == "Haze"
! || data["Current Conditions"].toString() == "Dust"
! || data["Current Conditions"].toString() == "Low Drifting Dust"
! || data["Current Conditions"].toString() == "Blowing Dust"
! || data["Current Conditions"].toString() == "Sand"
! || data["Current Conditions"].toString() == "Blowing Sand"
! || data["Current Conditions"].toString() == "Low Drifting Sand"
! || data["Current Conditions"].toString() == "Dust/Sand Whirls"
! || data["Current Conditions"].toString() == "Dust/Sand Whirls in Vicinity"
! || data["Current Conditions"].toString() == "Dust Storm"
! || data["Current Conditions"].toString() == "Heavy Dust Storm"
! || data["Current Conditions"].toString() == "Dust Storm in Vicinity"
! || data["Current Conditions"].toString() == "Sand Storm"
! || data["Current Conditions"].toString() == "Heavy Sand Storm"
! || data["Current Conditions"].toString() == "Sand Storm in Vicinity"
! || data["Current Conditions"].toString() == "Smoke")
! m_wallpaper = QString(m_dir + "Fresh_Morning");
!
! else if (data["Current Conditions"].toString() == "Thunderstorm"
! || data["Current Conditions"].toString() == "Thunderstorm Rain"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain"
! || data["Current Conditions"].toString() == "Thunderstorm Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Fog and Windy"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Showers in Vicinity"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Haze"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Fog"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Fog"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain"
! || data["Current Conditions"].toString() == "Thunderstorm Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Showers in Vicinity"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Haze in Vicinity"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Hail"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Hail"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Hail"
! || data["Current Conditions"].toString() == "Thunderstorm Rain Hail Fog/Mist"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Hail Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Hail Fog/Hail"
! || data["Current Conditions"].toString() == "Thunderstorm Showers in Vicinity Hail"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Hail Haze"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Hail Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Hail Fog"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Hail Fog"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Hail Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Hail"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Hail"
! || data["Current Conditions"].toString() == "Thunderstorm Rain Hail Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Hail Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Hail Fog/Mist"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Hail"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Hail Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Haze in Vicinity Hail"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Hail Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Hail Haze"
! || data["Current Conditions"].toString() == "Thunderstorm Hail Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Light Rain Hail Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Heavy Rain Hail Fog"
! || data["Current Conditions"].toString() == "Thunderstorm Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Thunderstorm Rain Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Light Thunderstorm Rain Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Rain Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Fog"
! || data["Current Conditions"].toString() == "Thunderstorm in Vicinity Haze")
! m_wallpaper = QString(m_dir + "Lightning");
!
! else if (data["Current Conditions"].toString() == "Ice Pellets"
! || data["Current Conditions"].toString() == "Light Ice Pellets"
! || data["Current Conditions"].toString() == "Heavy Ice Pellets"
! || data["Current Conditions"].toString() == "Ice Pellets in Vicinity"
! || data["Current Conditions"].toString() == "Showers Ice Pellets"
! || data["Current Conditions"].toString() == "Thunderstorm Ice Pellets"
! || data["Current Conditions"].toString() == "Ice Crystals"
! || data["Current Conditions"].toString() == "Hail"
! || data["Current Conditions"].toString() == "Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Light Small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Heavy small Hail/Snow Pellets"
! || data["Current Conditions"].toString() == "Showers Hail"
! || data["Current Conditions"].toString() == "Hail Showers")
! m_wallpaper = QString(m_dir + "Hail");
!
! else if (data["Current Conditions"].toString() == "Snow"
! || data["Current Conditions"].toString() == "Light Snow"
! || data["Current Conditions"].toString() == "Heavy Snow"
! || data["Current Conditions"].toString() == "Snow Showers"
! || data["Current Conditions"].toString() == "Light Snow Showers"
! || data["Current Conditions"].toString() == "Heavy Snow Showers"
! || data["Current Conditions"].toString() == "Showers Snow"
! || data["Current Conditions"].toString() == "Light Showers Snow"
! || data["Current Conditions"].toString() == "Heavy Showers Snow"
! || data["Current Conditions"].toString() == "Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Light Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Snow Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Light Snow Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Snow Showers Fog/Mist"
! || data["Current Conditions"].toString() == "Showers Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Light Showers Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Showers Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Snow Fog"
! || data["Current Conditions"].toString() == "Light Snow Fog"
! || data["Current Conditions"].toString() == "Heavy Snow Fog"
! || data["Current Conditions"].toString() == "Snow Showers Fog"
! || data["Current Conditions"].toString() == "Light Snow Showers Fog"
! || data["Current Conditions"].toString() == "Heavy Snow Showers Fog"
! || data["Current Conditions"].toString() == "Showers Snow Fog"
! || data["Current Conditions"].toString() == "Light Showers Snow Fog"
! || data["Current Conditions"].toString() == "Heavy Showers Snow Fog"
! || data["Current Conditions"].toString() == "Showers in Vicinity Snow"
! || data["Current Conditions"].toString() == "Snow Showers in Vicinity"
! || data["Current Conditions"].toString() == "Snow Showers in Vicinity Fog/Mist"
! || data["Current Conditions"].toString() == "Snow Showers in Vicinity Fog"
! || data["Current Conditions"].toString() == "Low Drifting Snow"
! || data["Current Conditions"].toString() == "Blowing Snow"
! || data["Current Conditions"].toString() == "Snow Low Drifting Snow"
! || data["Current Conditions"].toString() == "Snow Blowing Snow"
! || data["Current Conditions"].toString() == "Light Snow Low Drifting Snow"
! || data["Current Conditions"].toString() == "Light Snow Blowing Snow"
! || data["Current Conditions"].toString() == "Light Snow Blowing Snow Fog/Mist"
! || data["Current Conditions"].toString() == "Heavy Snow Low Drifting Snow"
! || data["Current Conditions"].toString() == "Heavy Snow Blowing Snow"
! || data["Current Conditions"].toString() == "Thunderstorm Snow"
! || data["Current Conditions"].toString() == "Light Thunderstorm Snow"
! || data["Current Conditions"].toString() == "Heavy Thunderstorm Snow"
! || data["Current Conditions"].toString() == "Snow Grains"
! || data["Current Conditions"].toString() == "Light Snow Grains"
! || data["Current Conditions"].toString() == "Heavy Snow Grains"
! || data["Current Conditions"].toString() == "Heavy Blowing Snow"
! || data["Current Conditions"].toString() == "Blowing Snow in Vicinity")
! m_wallpaper = QString(m_dir + "Winter_Track");
!
! else if (data["Current Conditions"].toString() == "Rain Snow"
! || data["Current Conditions"].toString() == "Light Rain Snow"
! || data["Current Conditions"].toString() == "Heavy Rain Snow"
! || data["Current Conditions"].toString() == "Snow Rain"
! || data["Current Conditions"].toString() == "Light Snow Rain"
! || data["Current Conditions"].toString() == "Heavy Snow Rain"
! || data["Current Conditions"].toString() == "Drizzle Snow"
! || data["Current Conditions"].toString() == "Light Drizzle Snow"
! || data["Current Conditions"].toString() == "Heavy Drizzle Snow"
! || data["Current Conditions"].toString() == "Snow Drizzle"
! || data["Current Conditions"].toString() == "Light Snow Drizzle"
! || data["Current Conditions"].toString() == "Heavy Drizzle Snow"
! || data["Current Conditions"].toString() == "Freezing Rain"
! || data["Current Conditions"].toString() == "Freezing Drizzle"
! || data["Current Conditions"].toString() == "Light Freezing Rain"
! || data["Current Conditions"].toString() == "Light Freezing Drizzle"
! || data["Current Conditions"].toString() == "Heavy Freezing Rain"
! || data["Current Conditions"].toString() == "Heavy Freezing Drizzle"
! || data["Current Conditions"].toString() == "Freezing Rain in Vicinity"
! || data["Current Conditions"].toString() == "Freezing Drizzle in Vicinity"
! || data["Current Conditions"].toString() == "Rain Ice Pellets"
! || data["Current Conditions"].toString() == "Light Rain Ice Pellets"
! || data["Current Conditions"].toString() == "Heavy Rain Ice Pellets"
! || data["Current Conditions"].toString() == "Drizzle Ice Pellets"
! || data["Current Conditions"].toString() == "Light Drizzle Ice Pellets"
! || data["Current Conditions"].toString() == "Heavy Drizzle Ice Pellets"
! || data["Current Conditions"].toString() == "Ice Pellets Rain"
! || data["Current Conditions"].toString() == "Light Ice Pellets Rain"
! || data["Current Conditions"].toString() == "Heavy Ice Pellets Rain"
! || data["Current Conditions"].toString() == "Ice Pellets Drizzle"
! || data["Current Conditions"].toString() == "Light Ice Pellets Drizzle"
! || data["Current Conditions"].toString() == "Heavy Ice Pellets Drizzle"
! || data["Current Conditions"].toString() == "Freezing Rain Snow"
! || data["Current Conditions"].toString() == "Light Freezing Rain Snow"
! || data["Current Conditions"].toString() == "Heavy Freezing Rain Snow"
! || data["Current Conditions"].toString() == "Freezing Drizzle Snow"
! || data["Current Conditions"].toString() == "Light Freezing Drizzle Snow"
! || data["Current Conditions"].toString() == "Heavy Freezing Drizzle Snow"
! || data["Current Conditions"].toString() == "Snow Freezing Rain"
! || data["Current Conditions"].toString() == "Light Snow Freezing Rain"
! || data["Current Conditions"].toString() == "Heavy Snow Freezing Rain"
! || data["Current Conditions"].toString() == "Snow Freezing Drizzle"
! || data["Current Conditions"].toString() == "Light Snow Freezing Drizzle"
! || data["Current Conditions"].toString() == "Heavy Snow Freezing Drizzle"
! || data["Current Conditions"].toString() == "Freezing Rain Rain"
! || data["Current Conditions"].toString() == "Light Freezing Rain Rain"
! || data["Current Conditions"].toString() == "Heavy Freezing Rain Rain"
! || data["Current Conditions"].toString() == "Rain Freezing Rain"
! || data["Current Conditions"].toString() == "Light Rain Freezing Rain"
! || data["Current Conditions"].toString() == "Heavy Rain Freezing Rain"
! || data["Current Conditions"].toString() == "Freezing Drizzle Rain"
! || data["Current Conditions"].toString() == "Light Freezing Drizzle Rain"
! || data["Current Conditions"].toString() == "Heavy Freezing Drizzle Rain"
! || data["Current Conditions"].toString() == "Rain Freezing Drizzle"
! || data["Current Conditions"].toString() == "Light Rain Freezing Drizzle"
! || data["Current Conditions"].toString() == "Heavy Rain Freezing Drizzle")
! m_wallpaper = QString(m_dir + "Icy_Tree");
!
! else if (data["Current Conditions"].toString() == "Funnel Cloud"
! || data["Current Conditions"].toString() == "Funnel Cloud in Vicinity"
! || data["Current Conditions"].toString() == "Tornado/Water Spout")
! m_wallpaper = QString(m_dir + "Hill_City_Tornado_Enhanced");
!
! else {
! m_wallpaper = QString(m_dir + "Air");
! kDebug() << "Weather not available";
! }
}
if (data["Condition Icon"].toString() == "weather-clear") {
Report
NForce
11 years ago
--- weather.cpp 2009-04-07 17:51:13.000000000 +0300
+++ weather.cpp 2009-04-08 23:47:04.000000000 +0300
@@ -52,6 +52,7 @@
void WeatherWallpaper::init(const KConfigGroup & config)
{
+ m_config = config;
m_weatherUpdateTime = config.readEntry("updateWeather", 30);
// Connect to weather engine.
@@ -61,6 +62,7 @@
// Set custom options
m_ionPlugins = m_weatherEngine->query("ions");
+ m_wallpaper = config.readEntry("wallpaper");
m_activePlace = config.readEntry("place");
m_activeIon = config.readEntry("ion");
m_extraData[m_activePlace] = config.readEntry("data");
@@ -503,6 +505,7 @@
m_wallpaper = QString(m_dir + "Icy_Tree");
}
+ m_config.writeEntry("wallpaper",m_wallpaper);
loadImage();
emit update(boundingRect());
}
(this is for weather.cpp)
--- weather.h 2009-04-07 17:36:23.000000000 +0300
+++ weather.h 2009-04-08 23:47:26.000000000 +0300
@@ -76,6 +76,7 @@
private:
QWidget* m_configWidget;
KDialog *m_addDialog;
+ KConfigGroup m_config;
Ui::weatherLocations locationsUi;
Ui::weatherAddPlace addUi;
QStandardItemModel *m_amodel;
(and this one is for weather.h) It would be nice if you use them :)
Report
NForce
11 years ago
pkgname=plasma-weather-wallpaper-plugin
_pkgname=plasma-wallpaper-weather
pkgver=0.2.1
pkgrel=1
pkgdesc="Plugin for Plasma dekstop which sets wallpaper as the weather changes"
arch=('i686' 'x86_64')
url=""
license=('GPL')
depends=('kdebase-workspace')
makedepends=('cmake' 'automoc4')
source=("https://edge.launchpad.net/%7Eechidnaman/+archive/ppa/+files/plasma-wallpaper-weather_$pkgver.orig.tar.gz")
md5sums=('94177bfca63db13bbbb0d837bd36a606')
build() {
cd ${srcdir}/${_pkgname}-${pkgver}/
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. || return 1
make || return 1
make DESTDIR=$startdir/pkg install || return 1
}
Report
scsi
11 years ago
Report
thomas12777
11 years ago
Report