<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;feed=atom&amp;action=history</id>
		<title>Development/Tutorials/Plasma/Ruby/Using widgets - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;action=history"/>
		<updated>2013-05-20T01:36:05Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=60656&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;/code&gt;&quot; to &quot;&lt;/syntaxhighlight&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=60656&amp;oldid=prev"/>
				<updated>2011-06-29T20:54:25Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;/code&amp;gt;&amp;quot; to &amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:54, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 38:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;end&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's take a deeper look at it. As in the main tutorial, we create our class by deriving from the &amp;lt;tt&amp;gt;PlasmaScripting::Applet&amp;lt;/tt&amp;gt; class. In &amp;lt;tt&amp;gt;initialize&amp;lt;/tt&amp;gt;, we quickly initialize the class. We use the &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt; method instead to do all the dirty work of creating the applet and adding the widget needed to display the text.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's take a deeper look at it. As in the main tutorial, we create our class by deriving from the &amp;lt;tt&amp;gt;PlasmaScripting::Applet&amp;lt;/tt&amp;gt; class. In &amp;lt;tt&amp;gt;initialize&amp;lt;/tt&amp;gt;, we quickly initialize the class. We use the &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt; method instead to do all the dirty work of creating the applet and adding the widget needed to display the text.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=60113&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;code ruby&gt;&quot; to &quot;&lt;syntaxhighlight lang=&quot;ruby&quot;&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=60113&amp;oldid=prev"/>
				<updated>2011-06-29T20:42:45Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;code ruby&amp;gt;&amp;quot; to &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:42, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 13:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.rb file will look like:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.rb file will look like:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code &lt;/del&gt;ruby&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;&lt;/ins&gt;ruby&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;require 'plasma_applet'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;require 'plasma_applet'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=41361&amp;oldid=prev</id>
		<title>Tampakrap: /* Abstract */</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=41361&amp;oldid=prev"/>
				<updated>2009-04-29T14:07:02Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Abstract&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:07, 29 April 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Abstract ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Abstract ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Using the &amp;lt;tt&amp;gt;paintInterface&amp;lt;/tt&amp;gt; method to display applets is a powerful, and sometimes even necessary way of working&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. For example&lt;/del&gt;, when you want to display a SVG graphic. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;But it &lt;/del&gt;is not the only method available to create a Plasmoid&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;, however&lt;/del&gt;. Plasma comes with a number of widgets &amp;quot;tailored&amp;quot; for use in Plasmoids. In this tutorial we will create a very simple &amp;quot;Hello, world!&amp;quot; Plasmoid using Plasma widgets.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Using the &amp;lt;tt&amp;gt;paintInterface&amp;lt;/tt&amp;gt; method to display applets is a powerful, and sometimes even necessary way of working, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;like &lt;/ins&gt;when you want to display a SVG graphic. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;It &lt;/ins&gt;is not&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, however, &lt;/ins&gt;the only method available to create a Plasmoid. Plasma comes with a number of widgets &amp;quot;tailored&amp;quot; for use in Plasmoids. In this tutorial we will create a very simple &amp;quot;Hello, world!&amp;quot; Plasmoid using Plasma widgets.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tampakrap</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37865&amp;oldid=prev</id>
		<title>Nielsslot: Small fix in example code.</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37865&amp;oldid=prev"/>
				<updated>2009-01-25T21:14:46Z</updated>
		
		<summary type="html">&lt;p&gt;Small fix in example code.&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:14, 25 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; label = Plasma::Label.new self&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; label = Plasma::Label.new self&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; label.text = &amp;quot;Hello world!&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; label.text = &amp;quot;Hello world!&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;self.&lt;/del&gt;layout.add_item label&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; layout.add_item label&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; self.layout = layout&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; self.layout = layout&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37862&amp;oldid=prev</id>
		<title>Nielsslot: Change module, and tell the reader to do this in de metadata.desktop file.</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37862&amp;oldid=prev"/>
				<updated>2009-01-25T21:09:21Z</updated>
		
		<summary type="html">&lt;p&gt;Change module, and tell the reader to do this in de metadata.desktop file.&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:09, 25 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Set up your applet directory and create a &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file as described in the [[../GettingStarted | Getting Started tutorial]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Set up your applet directory and create a &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file as described in the [[../GettingStarted | Getting Started tutorial]]. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Don't forget to change the &amp;lt;tt&amp;gt;X-KDE-PluginInfo-Name&amp;lt;/tt&amp;gt; line to match the module used in the tutorial (&amp;lt;tt&amp;gt;RubyWidget&amp;lt;/tt&amp;gt;), otherwise the example will not work!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.rb' file ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.rb' file ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;require 'plasma_applet'&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;require 'plasma_applet'&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;module &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;RubyStart&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;module &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;RubyWidget&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; class Main &amp;lt; PlasmaScripting::Applet&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; class Main &amp;lt; PlasmaScripting::Applet&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; def initialize parent&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; def initialize parent&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37860&amp;oldid=prev</id>
		<title>Nielsslot: Forgot to change one '.py' to '.rb'</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37860&amp;oldid=prev"/>
				<updated>2009-01-25T21:07:52Z</updated>
		
		<summary type="html">&lt;p&gt;Forgot to change one &amp;#039;.py&amp;#039; to &amp;#039;.rb&amp;#039;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:07, 25 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.rb' file ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.rb' file ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;py &lt;/del&gt;file will look like:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;rb &lt;/ins&gt;file will look like:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code ruby&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code ruby&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37859&amp;oldid=prev</id>
		<title>Nielsslot: Translation of the Python 'Using widgets' tutorial. I removed the lines about the SVG theme because it didn't seem to do anything, feel free to correct me.</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Ruby/Using_widgets&amp;diff=37859&amp;oldid=prev"/>
				<updated>2009-01-25T21:07:15Z</updated>
		
		<summary type="html">&lt;p&gt;Translation of the Python &amp;#039;Using widgets&amp;#039; tutorial. I removed the lines about the SVG theme because it didn&amp;#039;t seem to do anything, feel free to correct me.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a 'translation' of the Using widgets article on Python and Plasma. For the Python Tutorial see [http://techbase.kde.org/Development/Tutorials/Plasma/Python/Using_widgets here].&lt;br /&gt;
&lt;br /&gt;
== Abstract ==&lt;br /&gt;
&lt;br /&gt;
Using the &amp;lt;tt&amp;gt;paintInterface&amp;lt;/tt&amp;gt; method to display applets is a powerful, and sometimes even necessary way of working. For example, when you want to display a SVG graphic. But it is not the only method available to create a Plasmoid, however. Plasma comes with a number of widgets &amp;quot;tailored&amp;quot; for use in Plasmoids. In this tutorial we will create a very simple &amp;quot;Hello, world!&amp;quot; Plasmoid using Plasma widgets.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
Set up your applet directory and create a &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file as described in the [[../GettingStarted | Getting Started tutorial]].&lt;br /&gt;
&lt;br /&gt;
== The 'main.rb' file ==&lt;br /&gt;
&lt;br /&gt;
Here is how our main.py file will look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
# Copyright stuff&lt;br /&gt;
require 'plasma_applet'&lt;br /&gt;
&lt;br /&gt;
module RubyStart&lt;br /&gt;
  class Main &amp;lt; PlasmaScripting::Applet&lt;br /&gt;
    def initialize parent&lt;br /&gt;
      super parent&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def init&lt;br /&gt;
      self.has_configuration_interface = false&lt;br /&gt;
      self.aspect_ratio_mode = Plasma::Square&lt;br /&gt;
      self.background_hints = Plasma::Applet.DefaultBackground&lt;br /&gt;
&lt;br /&gt;
      layout = Qt::GraphicsLinearLayout.new Qt::Horizontal, self&lt;br /&gt;
      label = Plasma::Label.new self&lt;br /&gt;
      label.text = &amp;quot;Hello world!&amp;quot;&lt;br /&gt;
      self.layout.add_item label&lt;br /&gt;
      self.layout = layout&lt;br /&gt;
&lt;br /&gt;
      resize 125, 125&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let's take a deeper look at it. As in the main tutorial, we create our class by deriving from the &amp;lt;tt&amp;gt;PlasmaScripting::Applet&amp;lt;/tt&amp;gt; class. In &amp;lt;tt&amp;gt;initialize&amp;lt;/tt&amp;gt;, we quickly initialize the class. We use the &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt; method instead to do all the dirty work of creating the applet and adding the widget needed to display the text.&lt;br /&gt;
&lt;br /&gt;
First of all we tell Plasma that this applet does not have a configuration dialog (&amp;lt;tt&amp;gt;has_configuration_interface=&amp;lt;/tt&amp;gt;). We then set the aspect ratio mode to a square (&amp;lt;tt&amp;gt;Plasma::Square&amp;lt;/tt&amp;gt;). This is taken into account when someone resizes the applet. Next the &amp;lt;tt&amp;gt;background_hints=&amp;lt;/tt&amp;gt; method sets the Plasmoid's background to the default Plasma background (&amp;lt;tt&amp;gt;Plasma::Applet.DefaultBackground&amp;lt;/tt&amp;gt;) saving us from having to manually draw the background ourselves.&lt;br /&gt;
&lt;br /&gt;
The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;Qt::LinearLayout&amp;lt;/tt&amp;gt; seen in Qt, because it is done inside a &amp;lt;tt&amp;gt;Qt::GraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;Qt::GraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt::Horizontal&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Next we create a &amp;lt;tt&amp;gt;Plasma::Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;text=&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;Qt::Label.text=&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.layout=&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &lt;br /&gt;
&lt;br /&gt;
Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Helloworld.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
This brief tutorial shows how to use Plasma widgets with your applet. Beside &amp;lt;tt&amp;gt;Plasma::Label&amp;lt;/tt&amp;gt; there are many more widgets that you can use.&lt;br /&gt;
&lt;br /&gt;
Notice that at the moment you can only add widgets and create layouts directly in code. This means you can't use an application like Qt Designer to design the appearance of your applet.&lt;/div&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	</feed>