[Kde-bindings] Working Example ruby plasmoids with svg (was Re: Ruby Book on techbase)

Robert Riemann robert.riemann at physik.hu-berlin.de
Sat Feb 6 19:02:04 UTC 2010


Hi dennis,

here is your code example:

        iconwidget = Plasma::IconWidget.new self
        layout.add_item iconwidget
        iconwidget.svg = "/tmp/ruby-test-applet/lcd_panel.svgz"

I just don't know how to use relatative paths. Relative to what?
So you will have to change the path to fit your folder.

People who just want to run to example extract in somewhere move to the folder 
ruby-test-applet and start the plasmoid in a special viewer with 
"plasmoidviewer". At least it works for me with kde 4.4 rc3 on opensuse


I think if you want to learn how to use svg graphics you should start with the 
weather applet (it uses svg for wind arrows), as it is less complex.


Greets Robert


Am Samstag, 6. Februar 2010 15:25:28 schrieb Excite User:
> Robert Riemann [robert.riemann at physik.hu-berlin.de] wrote:
> > Maybe you can continue helping us with the wiki while learning how to
> > use the software. At the moment there is a big lack of documentation.
> > 
> > :(
> 
> Yes, in fact that is what I am doing. I completed the unfinished
> tutorial of the simple paste applet as I worked my way through it. I am
> however stuck at the moment as I don't have a clue about working with
> SVG. So I wrote a new tutorial:
> 
> http://techbase.kde.org/Development/Tutorials/Plasma/Ruby/Blinker
> 
> It would be very helpful if you can check some C++ plasmoids (which I
> cannot grasp at all) on how to use SVG in a Ruby Plasmoid. I wrote the
> initial setup, perhaps you can paste in the Ruby SVG enhanced code, even
> if it is just the first example. Or you can try stuff out based on my
> tutorial and just send me your working plasmoids as zips over email once
> you have figured out how it should work.
> 
> Once I know how to do SVG I can make Qt stuff that people actually want
> to discover because it looks cool. I already asked Richard Dale and he
> loved the tutorial but he did not have the time to help out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruby-test-applet.tar.gz
Type: application/x-compressed-tar
Size: 20480 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20100206/f1ec04b3/attachment.tar.gz>


More information about the Kde-bindings mailing list