Weather Plasmoid

Plasma 4 Extensions

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

2
5.0
Description:

This release implements a couple of feature requests and fixes a few bugs. See the changelog.

OpenSUSE packages added. Thanks buschmann23!!

Special thanks goes out to painkiller101 for some helpful suggestions as well as a killer icon set. Thanks so much for all of your help!! :-)

TODO

-Add forecasting when widget is of a certain size

Short installation instruction:
# tar -xvzf plasma-weather-0.2.tar.gz
# cd weather
# mkdir build
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
# make
# make install


ATTENTION INTERNATIONAL USERS:

If you want to make this widget work and don't have a zip code, use the following
steps:

1. Go to http://weather.yahoo.com/
2. Type in your city, country and click Go
3. Copy the 8 character location ID from the URL on the next page (ie for Hong Kong, China it is CHXX0049)
4. Paste the location ID into the widgets zip code field
Last changelog:

12 years ago

v0.1
-Initial Release

v0.2

-Added widget configuration dialog
-Users can now configure zip code and temperature format via dialog
-Fixed SVG scaling issue (I think??)
-New icon set by painkiller101 (THANKS!! :-))

v0.3

-made the ~/weather.xml file hidden
-added support for icon themes
-added new icon theme used with permission from Wojciech Grzanka

v0.4

-added refresh configuration options
-fixed missing icon bug (i hope!!)
-fixed version of Wojciech Grzanka's icons are available for download
-modified icon display code

Fintan

12 years ago

How about a Kubuntu / debian package??

Report

Diestelhenne

12 years ago

I made an Archlinux package availaible via AUR:http://aur.archlinux.org/packages.php?ID=18819

Enjoy!

Report

kappa011

12 years ago

After much effort I was able to get all the commands on the home page to work without returning errors. I guess that means I've correctly build the widget.

How do I then go about installing the plasmoid?

I tried using the Add Widget tool, add widget from file, but it isn't obivous what file to point to.

NOTE TO DEVELOPERS: You've got to make installing new plasmoids MUCH easier. Please state what software needs to be installed (gcc and g++)? What environmental variables need to be set?

Report

diesel1

12 years ago

I followed the instructions but when I issue the make command it says there are no targets.

Any ideas?

Diesel1.

Report

johnnyjoflin

12 years ago

minor problems...




[email protected]:~/downloads/weather/build$ make
Linking CXX shared module lib/plasma_applet_weather.so
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `Plasma_Weather::parseData()':
/home/jo/downloads/weather/plasma-weather.cpp:106: undefined reference to `QDomDocument::QDomDocument(QString const&)'
/home/jo/downloads/weather/plasma-weather.cpp:110: undefined reference to `QDomDocument::setContent(QIODevice*, QString*, int*, int*)'
/home/jo/downloads/weather/plasma-weather.cpp:113: undefined reference to `QDomDocument::documentElement() const'
/home/jo/downloads/weather/plasma-weather.cpp:115: undefined reference to `QDomNode::firstChild() const'
/home/jo/downloads/weather/plasma-weather.cpp:117: undefined reference to `QDomNode::firstChild() const'
/home/jo/downloads/weather/plasma-weather.cpp:117: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:117: undefined reference to `QDomNode::~QDomNode()'
/home/jo/downloads/weather/plasma-weather.cpp:118: undefined reference to `QDomNode::firstChild() const'
/home/jo/downloads/weather/plasma-weather.cpp:118: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:118: undefined reference to `QDomNode::~QDomNode()'
/home/jo/downloads/weather/plasma-weather.cpp:164: undefined reference to `QDomNode::nextSibling() const'
/home/jo/downloads/weather/plasma-weather.cpp:164: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:164: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `~QDomElement':
/usr/include/qt4/QtXml/qdom.h:478: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `Plasma_Weather::parseData()':
/home/jo/downloads/weather/plasma-weather.cpp:120: undefined reference to `QDomNode::isNull() const'
/home/jo/downloads/weather/plasma-weather.cpp:122: undefined reference to `QDomNode::toElement() const'
/home/jo/downloads/weather/plasma-weather.cpp:124: undefined reference to `QDomNode::isNull() const'
/home/jo/downloads/weather/plasma-weather.cpp:126: undefined reference to `QDomElement::tagName() const'
/home/jo/downloads/weather/plasma-weather.cpp:128: undefined reference to `QDomElement::attribute(QString const&, QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:129: undefined reference to `QDomElement::attribute(QString const&, QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:130: undefined reference to `QDomElement::attribute(QString const&, QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:132: undefined reference to `QDomElement::tagName() const'
/home/jo/downloads/weather/plasma-weather.cpp:134: undefined reference to `QDomElement::attribute(QString const&, QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:165: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `~QDomElement':
/usr/include/qt4/QtXml/qdom.h:478: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `Plasma_Weather::parseData()':
/home/jo/downloads/weather/plasma-weather.cpp:165: undefined reference to `QDomDocument::~QDomDocument()'
/home/jo/downloads/weather/plasma-weather.cpp:136: undefined reference to `QDomElement::tagName() const'
/home/jo/downloads/weather/plasma-weather.cpp:140: undefined reference to `QDomElement::tagName() const'
/home/jo/downloads/weather/plasma-weather.cpp:142: undefined reference to `QDomNode::firstChild() const'
/home/jo/downloads/weather/plasma-weather.cpp:142: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:142: undefined reference to `QDomNode::~QDomNode()'
/home/jo/downloads/weather/plasma-weather.cpp:157: undefined reference to `QDomNode::nextSibling() const'
/home/jo/downloads/weather/plasma-weather.cpp:157: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:157: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `~QDomElement':
/usr/include/qt4/QtXml/qdom.h:478: undefined reference to `QDomNode::~QDomNode()'
CMakeFiles/plasma_applet_weather.dir/plasma-weather.o: In function `Plasma_Weather::parseData()':
/home/jo/downloads/weather/plasma-weather.cpp:144: undefined reference to `QDomNode::isNull() const'
/home/jo/downloads/weather/plasma-weather.cpp:146: undefined reference to `QDomNode::toElement() const'
/home/jo/downloads/weather/plasma-weather.cpp:148: undefined reference to `QDomNode::isNull() const'
/home/jo/downloads/weather/plasma-weather.cpp:150: undefined reference to `QDomElement::tagName() const'
/home/jo/downloads/weather/plasma-weather.cpp:152: undefined reference to `QDomElement::attribute(QString const&,QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:153: undefined reference to `QDomElement::attribute(QString const&,QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:138: undefined reference to `QDomElement::attribute(QString const&,QString const&) const'
/home/jo/downloads/weather/plasma-weather.cpp:160: undefined reference to `QDomNode::parentNode() const'
/home/jo/downloads/weather/plasma-weather.cpp:160: undefined reference to `QDomNode::operator=(QDomNode const&)'
/home/jo/downloads/weather/plasma-weather.cpp:160: undefined reference to `QDomNode::~QDomNode()'
collect2: ld returned 1 exit status
make[2]: *** [lib/plasma_applet_weather.so] Fehler 1
make[1]: *** [CMakeFiles/plasma_applet_weather.dir/all] Fehler 2
make: *** [all] Fehler 2
[email protected]:~/downloads/weather/build$

Report

Bogdan84

12 years ago

same here. debian Sid with experimental packages installed

Report

aTanCS

12 years ago

same problem on Gentoo amd64 KDE 4.1.66. Qt 4.4.2 Is there any solution? Thanks.

Report

idefiK

12 years ago

I had the same problem, but it seems to have been fixed by newer package updates by now.

(Debian experimental amd64)

Report

vlk

12 years ago

the same problem on debian, kde 4.1.0

Report

mechanist

12 years ago

I've got the same error. Anyone knows what's wrong?

Report

Howler

12 years ago

There are 2 icons missing from the weather.svg. When opened in inkscape, it says "Linked image not found" for object #11 and #12.

Report

cjtess

12 years ago

Hi,

This applet was really a miss in the KDE 4 desktop experience. Do you have any repository (git / svn) where we can pull the code from, in case we want to test pre-release versions and send feedback?

I ask, because I see in your to-do list the forecast is first, and I am eager to try this.


Very nice work!

Report

reggler

12 years ago

Hi,

How can I display the weather from a Canadian zip code?
Thanks

Report

reggler

12 years ago

Nevermind, got it - sorry ... reading helps :)

Report

hcooh

12 years ago

when I am doing this step
cmake -DCMAKE_INSTALL_PREFIX='kde4-config --prefix' ..
, I have this error :

CMake Error at /usr/share/cmake-2.6/Modules/FindKDE4.cmake:72 (MESSAGE):
ERROR: cmake/modules/FindKDE4Internal.cmake not found in
/home/hcooh/.kde4/share/apps;/usr/lib/kde4/share/kde4/apps
Call Stack (most recent call first):
CMakeLists.txt:7 (find_package)


CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 2.6)

should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring done

Can anyone help me to resolve this ? I really want to put this plasmoid on my desktop !!
Thank you

Report

hcooh

12 years ago

Thank you for your help !
Indeed I am on Kubuntu with kde 4.1 RC installed.
I installed kdebase-dev-kde4 and the error disappeared so I could have made the make and make install.

But after, what do I have to do to see the plasmoid on the desktop ??
Sorry for those basic questions...I am a beginner on kubuntu.

Report

painkiller101

12 years ago

Just "unlock widgets" and then click on "add new widget". It must be found in the plasmoid browser.
If it doesn't directly after the install a restart of your session should help.

Report

painkiller101

12 years ago

Hi,

could it be that you use KDE4.0.x?
If yes then maybe it doesn't work for you, because KDE4.0.x uses Qt4.3 and KDE4.1.x Qt4.4, which brings many more features than the older one.
If no then be sure that you have at least installed the kdebase4-devel and cmake-devel packages.

I hope this will help you.

Report

C

rowancompsciguy

12 years ago

If you are using Kubuntu make sure that you have the build-essentials, kde4-devel and libplasma-dev packages installed. Let me know whether or not this fixes your problem.

Report

hcooh

12 years ago

Actually, I just try again installing kde4-devel this time and when I am doing make install, I get this error :
[100%] Built target plasma_applet_weather
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/lib/kde4/lib/kde4/plasma_applet_weather.so
CMake Error at cmake_install.cmake:42 (FILE):
file INSTALL cannot copy file
"/home/hcooh/Applis/plasmoids/weather/build/lib/plasma_applet_weather.so"
to "/usr/lib/kde4/lib/kde4/plasma_applet_weather.so".


make: *** [install] Erreur 1

What should I do ?

Report

Anywhere

12 years ago

Part of the whole point of using Plasma instead of something like Screenlets or Superkaramba is that the same applets can be used either on the desktop/dashboard or on the panel (as if there's no difference between karambas and kicker applets). Can you make this work better in small spaces such as the panel (including if the user has scaled it down to the height of a menu)? Maybe at smaller sizes it could omit the text weather description and simply list the place name and temperature to the left of the icon?

Report

C

rowancompsciguy

12 years ago

Yes, this is on my list of things to do. Thanks!! :-)

Report

enkidu

12 years ago

It would be nice, if your plasmoid could support internationalization. It could load messages from text files different for each language. Now it seems possible only before compilation, but detecting environment language and looking for apropriate file in specific folder would be nice. Of course, if they weren't found, used would be default english messages. Can you make such an improvement?

Report

C

rowancompsciguy

12 years ago

I will investigate this. Thanks!! :-)

Report

yogeshm02

12 years ago

Very nice widget. I was looking for this kind of weather only i.e. a small widget which shows *only* the basic information along with images. As far as i'm concerned this look should be the final (apart from small changes without complicating the things; like weather++ in superkaramba, ops, that was/is also a good widget but very big for my taste).

Just keep on the work...
and, btw thanks for making the widget ;)

Report

12 years ago

v0.1
-Initial Release

v0.2

-Added widget configuration dialog
-Users can now configure zip code and temperature format via dialog
-Fixed SVG scaling issue (I think??)
-New icon set by painkiller101 (THANKS!! :-))

v0.3

-made the ~/weather.xml file hidden
-added support for icon themes
-added new icon theme used with permission from Wojciech Grzanka

v0.4

-added refresh configuration options
-fixed missing icon bug (i hope!!)
-fixed version of Wojciech Grzanka's icons are available for download
-modified icon display code

12345678910
Be the first to comment
MoonBlossom
Jan 30 2011
DaiVied
Dec 19 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.4
updated Jul 10 2008
added Jun 28 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 3