simple weather forecast

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

5
6.1
Description:

Updated Dec 2009

Background defaults to the kde4 desktop theme settings. See screenshot.

Renamed the plasmoid from weatherforecast to simpleweatherforecast as there is a default (beautiful) weather plasmoid in 4.2
http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/weather/


Old description:
One more weather plasmoid
(I have a used lot of code from weatherplasmoid)

DEPENDENCIES:
If you have any error first install all the "Depends packages" (Red dot) shown at:
http://packages.ubuntu.com/intrepid/kdeplasma-addons

If you have *ubuntu then issue:
sudo apt-get build-dep kdeplasma-addons

If you have other distributions please look for packages with similar names.

TESTE
I have tested it in Intrepid and Hardy

INSTALL:
See install file
tar jxvf plasma-simpleweatherforecast-???.tar.bz2
cd plasma-weatherforecast-0.???
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` --debug-output ..
make
sudo make install


UNINSTALL:
The plasmoid installs 3 files only; just delete them.
/usr/lib/kde4/plasma_applet_simpleweatherforecast.so
/usr/share/kde4/services/plasma-applet-simpleweatherforecast.desktop
/usr/share/kde4/apps/desktoptheme/default/widgets/plasma-simpleweatherforecast.svg

(my prefix is
$> kde4-config --prefix or kde-config --prefix
/usr
). Look for your prefix and then delete these files

UPDATE:
If you update the plasmoid please log out of KDE and then login. Otherwise you will get the _old_ version only.

or
kquitapp plasma
kbuildsycoca4
nohup plasma &

Debian packages:
http://unixcod.org/debian/binary from
http://kde-look.org/usermanager/search.php?username=kilah

PROBLEMS:
Please put your city CODE if there are any problems so that I try here.


Please start using the plasmoid:http://websvn.kde.org/trunk/KDE/kdeplasma-addons/applets/weather/
Last changelog:

11 years ago

v1.3
Background defaults to the kde4 desktop theme settings. See screenshot.


v1.2
Minor fixes in install file and added attribution

v1.1
Show "Network not reachable".
The font colour is theme dependent. So, text will automatically update.

v 1.0
Font dialog: thanks to Joe Istead
Renamed to prevent problems.

v0.9
none

v0.8
Removed proxy support. Too many problems due to that.

v0.7
Changed the file names and added KDE 4.2 support.Thanks linleno

V0.6
Fixed proxy support (by Yannig).
- connect a signal from the job downloader to a slot of the plasmoid
- parse directly binary content

v0.5
added proxy support. But unfortunately it does not refresh properly. So, please look into the code and help me (To Yannig).

Improved alignment. Thanks to patkoscsaba.
Substitute "+" from patkoscsaba by a " " (blank space).

v0.4
fixed the filename. sorry for the inconvenience.

v0.3
Rename weather.svg to plasma-weatherforecast.svg
See: http://revu.ubuntuwire.com/details.py?package=plasmoid-weatherforecast


v0.2
Fix README
Removed country/region name
changed yweather:wind to yweather:condition for accurate temperature

v0.1
-Initial Release
-It is completely inspired by Weather Plasmoid

Yannig

12 years ago

Hi,

I forget to set a duration bigger than a day for the previous pastebin. So here is a new pastebin of both files and a diff :

cpp file :
http://pastebin.com/m67942f1

header :
http://pastebin.com/m2d1e77c1

diff :
http://pastebin.com/m1583b68c

Report

C

biophysics

12 years ago

The problem happens if you no web connection when you login.

1. remove internet connection

2. logout and login. wait for desktop to load completely.

3. reconnect to internet.

4. try to change the city name/ temp. type to initiate a reload.

5. Only current temp. does update. the nextday does _no_ update.

Report

Yannig

12 years ago

I just try to reproduce your issue :
- logout without internet connection
- login again
- reconnect
- refresh my weather

But I was not able to reproduce this issue. All elements are refreshed fine and I can use this widget all day long without problem.

Report

Yannig

12 years ago

It's quite strange because I don't get any problem with my version.
I have tried to use the default location (I'm living in France and I'm using FRXX0076 to get my weather) with UKXX0106 but everything seems ok.

Can you confirm ?

Report

fwells

12 years ago

This might be hepful...

Running plasma-weatherforecast-0.7-kde-4.1 on Fedora10.

Report

fwells

12 years ago

Also...

plasma-weatherforecast-0.7-kde-4.2 on Fedora10 w/KDE4.2RC1 works fine.

Report

kilah

12 years ago

http://debian.unixcod.org/binary/plasmoid_weatherforecast-0.7~kde4.2rc1_amd64.deb

Report

keggy

12 years ago

Quote:
CMake Error at /usr/share/kde4/apps/cmake/modules/FindPlasma.cmake:13 (message):
FindPlasma.cmake is deprecated. Now with KDE 4.2 Plasma is part of kdelibs
and automatically found using find_package(KDE4) instead.

Replace the variables previously coming from FindPlasma.cmake as follows:

PLASMA_OPENGL_FOUND -> KDE4_PLASMA_OPENGL_FOUND

PLASMA_LIBS -> KDE4_PLASMA_LIBS

PLASMA_INCLUDE_DIR -> KDE4_INCLUDE_DIR or KDE4_INCLUDES, should be already
set anyway

PLASMA_FOUND -> nothing, it's always there if KDE4, version 4.2 or newer
has been found.

If you see this error message in a module within KDE/, update it from svn,
it has been fixed already.

Call Stack (most recent call first):
CMakeLists.txt:9 (find_package)


-- Configuring incomplete, errors occurred!



The error above is what show my PC after run the Cmake...

Can you help me in any ways?

Bye

Francesco

Report

C

biophysics

12 years ago

Can you try the new version and install dependencies with:

sudo apt-get build-dep kdeplasma-addons

(Sorry I do not have 4.2 - I use only kubuntu/intrepid)

Report

Musikolo

12 years ago

Hi,

I have KDE 4.2.0 and I'm suffering the same issue. What can I do to sort it out?

Best regards! :-)

Report

Musikolo

12 years ago

Ohh sorry,

I have sorted it out on my own. I have just released that you had a KDE-4.2-specific tar.bz2 archive.

Thus, no worries, now everything is workin like a charm.

Thanks a lot for time and effort! :-)

Report

linleno

12 years ago

Hi~

First of all, I would like to remind you that you might packed the wrong files in your v0.6 release... LOL
And I guess the files called plasma-weatherforcast.h and plasma-weatherforcast.cpp are the new version of weatherfor"e"cast.h and weatherfor"e"cast.cpp correspondently.

Furthermore, in KDE4.2 you should not use find_package(PLASMA) in your CMakeLists.txt anymore, because PLASMA has already been a part of KDE4 in KDE4 and $PLASMA_LIBS in CMakeLists.txt should also been changed to $KDE4_PLASMA_LIBS.
After slightly modified your CMakeLists.txt, I got it work on my KDE4.2 RC1. (I also overwrite the old version weatherforecast.* by "weatherforcast.*" of course... LOL )

This is my patch to your CMakeLists.txt v.0.6. Wish it help.

http://rafb.net/p/wrO7ff29.html

--- plasma-weatherforecast-0.6-orig/CMakeLists.txt 2008-12-28 23:24:51.000000000 +0800
+++ plasma-weatherforecast-0.6-patched/CMakeLists.txt 2009-01-14 15:25:57.000000000 +0800
@@ -6,7 +6,6 @@
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
-find_package(Plasma REQUIRED)

add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
@@ -25,12 +24,12 @@
kde4_add_ui_files(weather_SRCS config.ui)
kde4_add_plugin(plasma_applet_weatherforecast ${weather_SRCS})
target_link_libraries(plasma_applet_weatherforecast
- ${QT_QTXML_LIBRARY} ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+ ${QT_QTXML_LIBRARY} ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})

# Build the tests
#kde4_add_unit_test( test_plasma_wifi test_plasma-wifi-signal.cpp )
#target_link_libraries( test_plasma_wifi plasma_applet_wifi_signal
-# ${PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} )
+# ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTTEST_LIBRARY} )

install(TARGETS plasma_applet_weatherforecast
DESTINATION ${PLUGIN_INSTALL_DIR})

Report

nagatus

12 years ago

Thanks,

Confirmed, works with the changes mentioned.

Had almost done all the changes myself, didn't catch the filenames though, so read forward on this thread and found your post.

Report

jwistead

12 years ago

Applying this patch to version 0.5 of the code allows the user to select the font using a dialog (by clicking a button in the config menu).

http://jwistead.pastebin.com/m330d9956

The pastebin expires Feb 6, 2009. However, the changes might be included in v0.6 of the code. Feel free to email me for the patch/code after that time, if all else fails.

Report

C

biophysics

12 years ago

hi jwistead,

Can you put a screenshot of the config dialog and the plasmoid itself.

Sorry for the delay, also, can you post the actual files .h and .cpp in paste bin for the newer plasmoid (for 4.1 and 4.2).

I have some exams so I will update it hopefully by the weekend.

Many thanks for your support

Report

Yannig

12 years ago

Hi biophysics,

I have made a new version with a correct KIO support. You can fetch it here :
plasma-weatherforcast.cpp : http://pastebin.com/f3f50eebc
plasma-weatherforcast.h : http://pastebin.com/f1a4fa3ed

I have also uploaded a diff : http://pastebin.com/f4ba21c85

Basically, the change consist of two things :
- connect a signal from the job downloader to a slot of the plasmoid
- parse directly binary content

Here is how to create the job downloader :
KIO::TransferJob * job = KIO::get(proxy_xml_file);

And how to connect this job to a parser :
connect(job, SIGNAL(data(KIO::Job *, const QByteArray & )), this, SLOT(parseData(KIO::Job *,const QByteArray &)));

I have change the method prototype of parseData to convert into a public slot and to receive data directly so we do not need a temp file anymore.

Have a good day and a happy new year!

Yannig

Report

C

biophysics

12 years ago

Hi Yanning

I am seeing with the proxy support the two images below do not refresh (until I do it manually).

Also, "HideProgressInfo" does not work. I am seeing every 55 minutes in my desktop a small progress bar. (kde 4.1). Can you look into the code again.

Thanks

Report

C

biophysics

12 years ago

OK, it was my bug. just forgot to put a "~"

Sorry.

Report

C

biophysics

12 years ago

OK, I am totally out of ideas why the proxy support causes so much problems. Can you please fix it.

for some reason the binary data does not go into the QByteArray ?

Report

C

biophysics

12 years ago

Thanks Yannig. I will fix sometime soon.

Report

Blanken

12 years ago

david@Trigger:~/Desktop/plasma-weatherforecast-0.5/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` --debug-output ..
Running with debug output on.
-- The CXX compiler identification is unknown
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeDetermineCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND -- broken
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error at /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake:25 (MESSAGE):
The C++ compiler "CMAKE_CXX_COMPILER-NOTFOUND" is not able to compile a
simple test program.

It fails with the following output:





CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Called from: [1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
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.

Called from: [1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt

Report

Blanken

12 years ago

Sorry, double post.

Report

C

biophysics

12 years ago

Seems like you do not have cmake compiler:
try this and install all these packages:
sudo apt-get build-dep kdeplasma-addons

Report

Blanken

12 years ago

Thanks! Worked like a charm.

Report

Blanken

12 years ago

david@Trigger:~/Desktop/plasma-weatherforecast-0.5/build$ cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` --debug-output ..
Running with debug output on.
-- The CXX compiler identification is unknown
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeDetermineCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: Internal CMake error, TryCompile configure of cmake failed
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
-- Check for working CXX compiler: CMAKE_CXX_COMPILER-NOTFOUND -- broken
Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error at /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake:25 (MESSAGE):
The C++ compiler "CMAKE_CXX_COMPILER-NOTFOUND" is not able to compile a
simple test program.

It fails with the following output:





CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)


Called from: [2] /usr/share/cmake-2.6/Modules/CMakeTestCXXCompiler.cmake
[1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
Called from: [1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt
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.

Called from: [1] /home/david/Desktop/plasma-weatherforecast-0.5/CMakeLists.txt

Report

11 years ago

v1.3
Background defaults to the kde4 desktop theme settings. See screenshot.


v1.2
Minor fixes in install file and added attribution

v1.1
Show "Network not reachable".
The font colour is theme dependent. So, text will automatically update.

v 1.0
Font dialog: thanks to Joe Istead
Renamed to prevent problems.

v0.9
none

v0.8
Removed proxy support. Too many problems due to that.

v0.7
Changed the file names and added KDE 4.2 support.Thanks linleno

V0.6
Fixed proxy support (by Yannig).
- connect a signal from the job downloader to a slot of the plasmoid
- parse directly binary content

v0.5
added proxy support. But unfortunately it does not refresh properly. So, please look into the code and help me (To Yannig).

Improved alignment. Thanks to patkoscsaba.
Substitute "+" from patkoscsaba by a " " (blank space).

v0.4
fixed the filename. sorry for the inconvenience.

v0.3
Rename weather.svg to plasma-weatherforecast.svg
See: http://revu.ubuntuwire.com/details.py?package=plasmoid-weatherforecast


v0.2
Fix README
Removed country/region name
changed yweather:wind to yweather:condition for accurate temperature

v0.1
-Initial Release
-It is completely inspired by Weather Plasmoid

12345678910
13
product-maker siocnarf Apr 14 2013 9 excellent
product-maker itsjustarumour2 Sep 25 2012 9 excellent
product-maker ariszlo Sep 18 2012 9 excellent
product-maker joseexposito89 Aug 30 2011 3 bad
Be the first to comment
ariszlo
Sep 18 2012
universe777
Apr 18 2009
jwistead
Jan 06 2009
kilah
Dec 29 2008
blackpaw
Dec 28 2008
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
1.3
updated Dec 26 2009
added Oct 30 2008
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2