<?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/api.php?action=feedcontributions&amp;user=Robert+Riemann&amp;feedformat=atom</id>
		<title>KDE TechBase - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/api.php?action=feedcontributions&amp;user=Robert+Riemann&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Special:Contributions/Robert_Riemann"/>
		<updated>2013-05-19T22:09:10Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby</id>
		<title>Development/Languages/Ruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby"/>
				<updated>2010-08-18T18:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: repair quiloader script&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby}}&lt;br /&gt;
[[Image:ruby.png]]&lt;br /&gt;
&lt;br /&gt;
Very complete bindings to both the KDE API and the Qt APIs. The Korundum package includes both a QtRuby Qt-only binding along with the full combined Qt/KDE one. The QtRuby package contains just Qt bindings with no dependencies on KDE.&lt;br /&gt;
&lt;br /&gt;
[http://rubyforge.org/projects/korundum/ Korundum/QtRuby - Ruby-KDE/Qt bindings]&lt;br /&gt;
&lt;br /&gt;
The book [http://www.pragmaticprogrammer.com/titles/ctrubyqt/ Rapid GUI Development with QtRuby] (for Qt version 3.x) is available.&lt;br /&gt;
&lt;br /&gt;
Being [http://developer.kde.org/language-bindings/smoke/index.html Smoke-based] bindings means that they offer full access to most KDE 4.x and Qt 4.x classes.&lt;br /&gt;
&lt;br /&gt;
= QtRuby =&lt;br /&gt;
Hello world example:&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby -w&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new(ARGV)&lt;br /&gt;
hello = Qt::PushButton.new(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
hello.resize(100, 30)&lt;br /&gt;
hello.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hello Qt example in a more 'Rubyish' way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
Qt::Application.new(ARGV) do&lt;br /&gt;
    Qt::Widget.new do&lt;br /&gt;
&lt;br /&gt;
        self.window_title = 'Hello QtRuby v1.0'&lt;br /&gt;
        resize(200, 100)&lt;br /&gt;
    &lt;br /&gt;
        button = Qt::PushButton.new('Quit') do&lt;br /&gt;
            connect(SIGNAL :clicked) { Qt::Application.instance.quit }&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        label = Qt::Label.new('&amp;lt;big&amp;gt;Hello Qt in the Ruby way!&amp;lt;/big&amp;gt;')&lt;br /&gt;
        &lt;br /&gt;
        self.layout = Qt::VBoxLayout.new do&lt;br /&gt;
            add_widget(label, 0, Qt::AlignCenter)&lt;br /&gt;
            add_widget(button, 0, Qt::AlignRight)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        show&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Current api coverage overview =&lt;br /&gt;
&lt;br /&gt;
== Available calls ==&lt;br /&gt;
You can call all Qt public and protected methods, and all friend methods such as bitBlt() etc&lt;br /&gt;
== Virtual methods ==&lt;br /&gt;
&lt;br /&gt;
All virtual methods can be overridden, not just event handlers&lt;br /&gt;
== Properties ==&lt;br /&gt;
'foobar = 5' is a synonym for 'setFooBar(5)'&lt;br /&gt;
&lt;br /&gt;
==Use either CamelCase or lowercase with underscore naming==&lt;br /&gt;
&lt;br /&gt;
Any underscores in method names are removed, and the following character is capitalised. For example, you can use either of these two forms to call the same method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
create_standard_status_bar_action()&lt;br /&gt;
createStandardStatusBarAction()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operator overloading==&lt;br /&gt;
The full range of Qt operator methods is available, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
p1 = Qt::Point.new(5,5)   =&amp;gt; (5, 5)&lt;br /&gt;
p2 = Qt::Point.new(20,20) =&amp;gt; (20, 20)&lt;br /&gt;
p1 + p2                   =&amp;gt; (25, 25)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declare signals and slots==&lt;br /&gt;
Signals and slots are declared as list of strings like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
slots 'setColor(QColor)', 'slotLoad(const QString&amp;amp;)'..&lt;br /&gt;
signals 'clicked()'..&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For slots and signals without arguments you can use Ruby symbols:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
slots :slotLoad&lt;br /&gt;
signals :clicked&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently C++ type signatures must be used, a future version of QtRuby will allow ruby type signatures instead. (see the section on emitting Ruby Classes)&lt;br /&gt;
&lt;br /&gt;
Connect slots and signals like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Object.connect( @colormenu, SIGNAL( &amp;quot;activated(int)&amp;quot; ),&lt;br /&gt;
                  self, SLOT( &amp;quot;slotColorMenu(int)&amp;quot; ) )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also two another possibilities:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
connect(:mysig, mytarget, :mymethod))&lt;br /&gt;
connect(SIGNAL('mysignal(int)'), mytarget, :mymethod))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can connect signal to a block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
quit_button.connect(SIGNAL :clicked) { $qApp.quit }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And emit signals like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
emit colorChanged( black )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Emitting Ruby Classes==&lt;br /&gt;
Ruby classes can be emitted by embedding them inside a QVariant, and emitting the QVariant.&lt;br /&gt;
&lt;br /&gt;
The following code provides a method called to_variant that can be used to easily convert objects to Variants&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
class Qt::RubyVariant &amp;lt; Qt::Variant&lt;br /&gt;
    def initialize(value)&lt;br /&gt;
        super()&lt;br /&gt;
        @value = value&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    attr_accessor :value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class Object&lt;br /&gt;
    def to_variant&lt;br /&gt;
        Qt::RubyVariant.new self&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: as of KDE 4.5 you can simply use&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
variant = Qt::Variant.fromValue(my_ruby_object)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
to create a QVariant that contains your ruby object. To get it back, you just call Qt::Variant#value as usual.&lt;br /&gt;
&lt;br /&gt;
This can be used as follows&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
class MyObject &amp;lt; Qt::Object&lt;br /&gt;
    signals &amp;quot;mySignal(QVariant)&amp;quot;&lt;br /&gt;
    def doEmit&lt;br /&gt;
        # since KDE 4.5:&lt;br /&gt;
        # emit mySignal(Qt::Variant.fromValue(ruby_object))&lt;br /&gt;
        emit mySignal(ruby_object.to_variant)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    slots &amp;quot;mySlot(QVariant)&amp;quot;&lt;br /&gt;
    def mySlot(variant)&lt;br /&gt;
        ruby_object = variant.value&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alternate way to emit Ruby Classes ===&lt;br /&gt;
You can also try to emit a ruby class by emitting it's object_id (either as an Integer or a QVariant), and use ObjectSpace._id2ref to get the object back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
class Object&lt;br /&gt;
    def to_variant&lt;br /&gt;
        Qt::Variant.new object_id&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class Qt::Variant&lt;br /&gt;
    def to_object&lt;br /&gt;
        ObjectSpace._id2ref to_int&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constructors==&lt;br /&gt;
You can call constructors in the conventional style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
quit = Qt::PushButton.new(&amp;quot;Quit&amp;quot;, self, &amp;quot;quit&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can pass a block if you prefer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new { setCaption(&amp;quot;foobar&amp;quot;) }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The block will be called in the context of the newly created instance.&lt;br /&gt;
&lt;br /&gt;
Ordinary arguments can be provided as well as a block at the end:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new(nil) { setCaption(&amp;quot;foobar&amp;quot;) }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are run in the context of the new instance.&lt;br /&gt;
&lt;br /&gt;
And there's more! You can also pass an arg to the block, and it will be run in the context of the arg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new { |theWidget| theWidget.setCaption &amp;quot;foobar&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Garbage Collection==&lt;br /&gt;
When a ruby instance is garbage collected, the underlying C++ instance will only be deleted if it isn't 'owned' by a parent object. Normally this will 'just work', but there are occasions when you need to delete the C++ ahead of garbage collection, and whether or not it has a parent. Use the dispose(), isDisposed() and disposed? methods like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
item2.dispose&lt;br /&gt;
if item2.disposed?&lt;br /&gt;
puts &amp;quot;item2 is disposed&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==C++ 'int*' and 'int&amp;amp;' argument types==&lt;br /&gt;
Ruby passes numeric values by value, and so they can't be changed when passed to a method. The Qt::Integer class provides a mutable numeric type which does get updated when passed as an argument. For example, this C++ method 'findByFileContent()':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
# static Ptr findByFileContent( const QString &amp;amp;fileName, &lt;br /&gt;
#                               int *accuracy=0 );&lt;br /&gt;
 &lt;br /&gt;
acc = Qt::Integer.new(0)&lt;br /&gt;
fc = KDE::MimeType.findByFileContent(&amp;quot;mimetype.rb&amp;quot;, acc)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It supports the arithmetic operators, and so expressions such as 'acc + 3' will work.&lt;br /&gt;
&lt;br /&gt;
==C++ 'bool*' and 'bool&amp;amp;' argument types==&lt;br /&gt;
There is a similar problem for bool arg types, and the mutable Qt::Boolean class can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
# QFont getFont(bool * ok, const QFont&amp;amp;initial, &lt;br /&gt;
#               QWidget* parent = 0, const char *name = 0);		&lt;br /&gt;
 		&lt;br /&gt;
ok = Qt::Boolean.new&lt;br /&gt;
font = Qt::FontDialog.getFont(ok, &lt;br /&gt;
                    Qt::Font.new(&amp;quot;Helvetica [Cronyx]&amp;quot;, 10), &lt;br /&gt;
                    self)&lt;br /&gt;
if !ok.nil? &lt;br /&gt;
# font is set to the font the user selected&lt;br /&gt;
else &lt;br /&gt;
# the user canceled the dialog&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use 'nil?' to test the value returned in the Boolean&lt;br /&gt;
&lt;br /&gt;
==C++ (const )(unsigned )char* argument types==&lt;br /&gt;
In some cases Qt/KDE object &amp;quot;takes ownership&amp;quot; over Ruby String passed as char* argument type. Programmer needs to make sure that Ruby String is not being garbage collected or changed for the time it's being used by Qt/KDE object. It is also quite possible that Qt/KDE object will change and eventually free it(memory used internally by Ruby String to store its data). Be very careful when you call this kind of methods and make sure that there is no overloaded version witch accepts QString or QByteArray first!&lt;br /&gt;
&lt;br /&gt;
==C++ unsigned char* functions==&lt;br /&gt;
&lt;br /&gt;
Very few functions (as QImage::bits()) return a uchar* to directly manipulate data. These functions are not supported in Ruby and will throw an ArgumentError. More information on the [http://lists.kde.org/?l=kde-bindings&amp;amp;m=122899325331866&amp;amp;w=2 mail list].&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
If a method call can't be matched in the Smoke library giving a 'method_missing' error, first check that you are passing correct class instance that is properly initialized (with super method called in constructors of custom Qt classes descendants). You can also turn on debugging to trace the matching process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
a = Qt::Application.new(ARGV)&lt;br /&gt;
Qt.debug_level = Qt::DebugLevel::High&lt;br /&gt;
a.loadLibrary(&amp;quot;foo&amp;quot;)  # Non existent method&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the following output:&lt;br /&gt;
&lt;br /&gt;
       classname    == QApplication&lt;br /&gt;
       :: method == loadLibrary$&lt;br /&gt;
       -&amp;gt; methodIds == []&lt;br /&gt;
       candidate list:&lt;br /&gt;
       Possible prototypes:&lt;br /&gt;
           static QWidget* QApplication::widgetAt(int, int, bool)&lt;br /&gt;
 			...&lt;br /&gt;
&lt;br /&gt;
Here, the list of candidate methods 'methodIds' is empty&lt;br /&gt;
&lt;br /&gt;
Another debugging mechanism allows various trace 'channels' to be switched on.&lt;br /&gt;
&lt;br /&gt;
You can trace virtual method callbacks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Internal::setDebug(Qt::QtDebugChannel::QTDB_VIRTUAL)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or trace QtRuby garbage collection:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Internal::setDebug(Qt::QtDebugChannel::QTDB_GC)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==String i18n==&lt;br /&gt;
&lt;br /&gt;
QtRuby supports $KCODE values of 'u', 'e' and 's' or the corresponding '-K' options from the command line. Qt Designer .ui files have UTF-8 strings so if you use any 8 bit UTF-8 characters, you will need to set $KCODE='u' or use the -Ku command line option.&lt;br /&gt;
&lt;br /&gt;
=Other capabilities and offerings=&lt;br /&gt;
&lt;br /&gt;
==Qt Designer==&lt;br /&gt;
A 'rbuic4' tool is included in qtruby/tools/rbuic to compile .ui files into ruby code. As described above, Qt Designer uses UTF-8. In addition to the options in the original uic C++ utility an '-x' flag has been added. This will generate a top level stub in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbuic mainform.ui -x -o mainform.rb&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will add this to the end of the generated code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
if $0 == __FILE__&lt;br /&gt;
    a = Qt::Application.new(ARGV)&lt;br /&gt;
    w = MainForm.new&lt;br /&gt;
    w.show&lt;br /&gt;
    a.exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can test the example code straight away:&lt;br /&gt;
&lt;br /&gt;
       $ ruby mainform.rb&lt;br /&gt;
&lt;br /&gt;
Use the '-kde' option to require the 'korundum4' extension rather than the 'Qt4' one. If the '-x' option is used in conjunction, it generates a KDE top level. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbuic4 -x -kde knotifywidgetbase.ui -o knotifywidgetbase.rb&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate this top level code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
if $0 == __FILE__&lt;br /&gt;
    about = KDE::AboutData.new(&amp;quot;knotifywidgetbase&amp;quot;, &lt;br /&gt;
 		                       &amp;quot;KNotifyWidgetBase&amp;quot;, &amp;quot;0.1&amp;quot;)&lt;br /&gt;
    KDE::CmdLineArgs.init(ARGV, about)&lt;br /&gt;
    a = KDE::Application.new()&lt;br /&gt;
    w = KNotifyWidgetBase.new&lt;br /&gt;
    w.show&lt;br /&gt;
    a.exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Loading .ui files at runtime with Qt::UILoader==&lt;br /&gt;
{{improve|Remove example that does not work}}&lt;br /&gt;
&lt;br /&gt;
You can load a Qt Designer .ui file at runtime with the 'quiloader' extension, for example:&lt;br /&gt;
&lt;br /&gt;
       require 'Qt4'&lt;br /&gt;
       require 'quiloader'&lt;br /&gt;
 &lt;br /&gt;
       a = Qt::Application.new(ARGV)&lt;br /&gt;
       if ARGV.length == 0&lt;br /&gt;
         exit&lt;br /&gt;
       end&lt;br /&gt;
 &lt;br /&gt;
       if ARGV.length == 2&lt;br /&gt;
         QUI::WidgetFactory.loadImages ARGV[0]&lt;br /&gt;
         w = QUI::WidgetFactory.create ARGV[1]&lt;br /&gt;
         if w.nil?&lt;br /&gt;
           exit&lt;br /&gt;
         end&lt;br /&gt;
         w.show()&lt;br /&gt;
         a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))&lt;br /&gt;
         a.exec()&lt;br /&gt;
       end&lt;br /&gt;
&lt;br /&gt;
With new version API changed a little.&lt;br /&gt;
&lt;br /&gt;
       require 'Qt4'&lt;br /&gt;
       require 'qtuitools'&lt;br /&gt;
 &lt;br /&gt;
       a = Qt::Application.new(ARGV)&lt;br /&gt;
       if ARGV.length == 0&lt;br /&gt;
         exit&lt;br /&gt;
       end&lt;br /&gt;
 &lt;br /&gt;
       if ARGV.length == 1&lt;br /&gt;
         file = Qt::File.new(ARGV[0])&lt;br /&gt;
         file.open(Qt::File::ReadOnly)&lt;br /&gt;
 &lt;br /&gt;
         loader = Qt::UiLoader.new&lt;br /&gt;
         window = loader.load(file, nil)&lt;br /&gt;
         file.close&lt;br /&gt;
&lt;br /&gt;
         if (window.nil?)&lt;br /&gt;
           print &amp;quot;Error. Window is nil.\n&amp;quot;&lt;br /&gt;
           exit&lt;br /&gt;
         end&lt;br /&gt;
         window.show&lt;br /&gt;
         a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))&lt;br /&gt;
         a.exec&lt;br /&gt;
       end&lt;br /&gt;
&lt;br /&gt;
==API reference==&lt;br /&gt;
&lt;br /&gt;
Use the bin/rbqtapi tool to discover which methods are available in the QtRuby api. This command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbqtapi Qt::TextEdit&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will list all the methods in the Qt::TextEdit class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbqtapi -rsetCaption &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lists all methods whose names contain the string 'setCaption'&lt;br /&gt;
&lt;br /&gt;
==Example programs==&lt;br /&gt;
&lt;br /&gt;
The best way to start programming QtRuby is to look at some existing code and start messing with it.. The are various samples under qtrubyexamples and korundum/examples.&lt;br /&gt;
&lt;br /&gt;
==Writing Unit Tests==&lt;br /&gt;
Using Ruby allows you the power to leverage testing frameworks such as RSpec in order to unit and integration test your classes.&lt;br /&gt;
&lt;br /&gt;
Most classes such as Models can be easily tested via the APIs they expose. Below is a small extract with some interesting tests from the mingle_mover project (http://github.com/gja/mingle_mover). The class being tested is a TableModel&lt;br /&gt;
&lt;br /&gt;
Note how we create a stub to pass to QAbstractTableModel::data, which accepts a QModelIndex as an argument.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
describe CardModel do&lt;br /&gt;
    it &amp;quot;Should Implement QAbstractTableModel&amp;quot; do&lt;br /&gt;
        CardModel.ancestors.should include Qt::AbstractTableModel&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;Should Not Be Editable&amp;quot; do&lt;br /&gt;
        @model.data(mock_index(1,2), Qt::EditRole).should_not be_valid&lt;br /&gt;
        @model.headerData(nil, nil, Qt::EditRole).should_not be_valid&lt;br /&gt;
        &lt;br /&gt;
        flags = @model.flags(nil)&lt;br /&gt;
        flags.should have_flag Qt::ItemIsEnabled&lt;br /&gt;
        flags.should have_flag Qt::ItemIsSelectable&lt;br /&gt;
        flags.should_not have_flag Qt::ItemIsEditable&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;Should not return any vertical headers&amp;quot; do&lt;br /&gt;
        @model.headerData(1, Qt::Vertical).should_not be_valid&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;Should color a row according to the status&amp;quot; do&lt;br /&gt;
        @model.data(mock_index(1,2), Qt::ForegroundRole).value.color.should == Qt::Color.new(Qt::red)&lt;br /&gt;
        @model.data(mock_index(0,2), Qt::ForegroundRole).value.color.should == Qt::Color.new(Qt::green)&lt;br /&gt;
        @model.data(mock_index(0,0), Qt::ForegroundRole).should_not be_valid&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def mock_index(row, col)&lt;br /&gt;
        stub(:row =&amp;gt; row, :column =&amp;gt; col)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def have_flag(flag)&lt;br /&gt;
        return simple_matcher(&amp;quot;A flag that matches &amp;quot; + flag.to_s) { |given| (given &amp;amp; flag) != 0 }&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing Out Signals and Slots ===&lt;br /&gt;
Below is a simple class which can be used to test out a class via the signals it emits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
class RubySignalSpy &amp;lt; Qt::Object&lt;br /&gt;
    def self.create(*args, &amp;amp;block)&lt;br /&gt;
        Class.new(self).new(*args, &amp;amp;block)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def count(name)&lt;br /&gt;
        @calls[name].size&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def params(name, invocation = 0)&lt;br /&gt;
        @calls[name][invocation]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def method_missing(name, *args, &amp;amp;block)&lt;br /&gt;
        @calls[name.to_sym] &amp;lt;&amp;lt; args&lt;br /&gt;
        exec_action_for(name, args)&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def responds_to?(name)&lt;br /&gt;
        true&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
  private&lt;br /&gt;
    def initialize&lt;br /&gt;
        @calls = {}&lt;br /&gt;
        def @calls.[](index)&lt;br /&gt;
            super || self[index] = []&lt;br /&gt;
        end&lt;br /&gt;
        @actions = {}&lt;br /&gt;
        super&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def mocked_slots(*names, &amp;amp;block)&lt;br /&gt;
        slots *names&lt;br /&gt;
        names.each { |name| @actions[name] = block }&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def exec_action_for(name, args)&lt;br /&gt;
        @actions[name].call(self, args) if @actions[name]&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    def slots(*args)&lt;br /&gt;
        self.class.slots(*args)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
      it &amp;quot;Should be able to emit a signal when called&amp;quot; do&lt;br /&gt;
        reciever = RubySignalSpy.create do&lt;br /&gt;
            slots &amp;quot;recieved(int, int)&amp;quot;                      # Explicitly name slots with parameters&lt;br /&gt;
            mocked_slot :some_other_slot do |spy, params|   # Pass a block to be executed when called&lt;br /&gt;
            end                                             # You must call mocked_slot with a symbol&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        class ClassWeAreTesting &amp;lt; Qt::Object&lt;br /&gt;
            signals &amp;quot;sending(int, int)&amp;quot;&lt;br /&gt;
            def broadcast&lt;br /&gt;
                emit sending(4, 2)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        sender = ClassWeAreTesting.new&lt;br /&gt;
&lt;br /&gt;
        Qt::Object.connect(sender, SIGNAL(&amp;quot;sending(int, int)&amp;quot;), reciever, SLOT(&amp;quot;recieved(int, int)&amp;quot;))&lt;br /&gt;
        sender.broadcast&lt;br /&gt;
        reciever.count(:recieved).should == 1               # Get count of calls&lt;br /&gt;
        reciever.params(:recieved, 0).should == [4, 2]      # Get the parameters of nth invocation&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Testing UI Classes ===&lt;br /&gt;
It is much more difficult to test UI classes. In most cases, you will need to instantiate a QApplication so that you can create your widgets. &lt;br /&gt;
&lt;br /&gt;
Some rudimentary tests can be written by simulating clicks are various locations. Watch this space as more tests get written&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
describe SomeTableView do&lt;br /&gt;
    before(:all) do&lt;br /&gt;
        @app = Qt::Application.new(ARGV)&lt;br /&gt;
        @view = SomeTableView.new&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    it &amp;quot;Should accept a mouse click on second row&amp;quot;        &lt;br /&gt;
        @row2 = @view.rowViewportPosition 1&lt;br /&gt;
        @view.mousePressEvent(Qt::MouseEvent.new(Qt::Event::MouseButtonPress, Qt::Point.new(0,@row2), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier))&lt;br /&gt;
        # Assert something here, such as that a signal has been emitted&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    after(:all) do&lt;br /&gt;
        @app.dispose!&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=KDE Specific Infomation=&lt;br /&gt;
Instead of &amp;lt;code ruby&amp;gt;require 'Qt4'&amp;lt;/code&amp;gt;, use&amp;lt;code ruby&amp;gt;require 'korundum4'&amp;lt;/code&amp;gt; for KDE programs.&lt;br /&gt;
&lt;br /&gt;
The KDE K* classes such as KApplication are renamed as KDE::Application. The other KDE classes are in the KParts::, KIO:: or DOM:: namespaces, with the same names as their C++ counterparts.&lt;br /&gt;
&lt;br /&gt;
Use the 'rbkdeapi' script to introspect the Korundum api from the command line. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbkdeapi KDE::Action&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will list all the methods in the KDE::Action class. There are currently (as at KDE 3.3 beta 2) 977 classes/30841 methods in the Smoke library runtime, so the coverage of the Qt/KDE api is pretty complete.&lt;br /&gt;
&lt;br /&gt;
=Build dependencies=&lt;br /&gt;
&lt;br /&gt;
* ruby 1.8 or greater (svn trunk works with 1.9.1)&lt;br /&gt;
* cmake 2.6 or greater&lt;br /&gt;
* Qt 4.0 or greater&lt;br /&gt;
* KDE 4.1 or greater (for korundum)&lt;br /&gt;
&lt;br /&gt;
=Tutorials=&lt;br /&gt;
There is a ruby translation of [http://developer.kde.org/language-bindings/ruby/tutorial/tutorial.html Qt Tutorial #1], and the corresponding ruby code is in qtruby/rubylib/tutorial/t1 to t14.&lt;br /&gt;
&lt;br /&gt;
And a Qt4 version of the same tutorial translated to Ruby by Darshan Ishaya [[Development/Tutorials/Qt4_Ruby_Tutorial|Qt4 Ruby Tutorial]] &lt;br /&gt;
&lt;br /&gt;
[http://developer.kde.org/language-bindings/ruby/tutorial2/tutorial2.html Qt Tutorial #2], a Charting Application with ruby code in qtruby/rubylib/examples/qt-examples/chart.&lt;br /&gt;
&lt;br /&gt;
The Qt Designer [http://developer.kde.org/language-bindings/ruby/colortooltutorial/designer-manual-3.html Color Tool Tutorial], with ruby code in qtruby/rubylib/designer/examples/colortool.&lt;br /&gt;
&lt;br /&gt;
Paul Lutus has written a tutorial on how to get started with [http://www.arachnoid.com/ruby/RubyGUIProject/index.html Ruby GUI programming with Qt]&lt;br /&gt;
&lt;br /&gt;
For KDE, there is a ruby translation of this [http://developer.kde.org/language-bindings/ruby/kde3tutorial/index.html KDE 3.0 tutorial] originally written for C++ by Antonio Larrosa Jiménez. The sources are in korundum/rubylib/tutorials/p1 to p9.&lt;br /&gt;
&lt;br /&gt;
The book [http://www.pragmaticprogrammer.com/titles/ctrubyqt/ Rapid GUI Development with QtRuby] is now available.&lt;br /&gt;
&lt;br /&gt;
There is also an approach to create an [[/Ruby-Qt/KDE Book|Ruby-Qt/KDE Book]] under a free license. The content will be created in this wiki. The book made with latex will be derived from the content in the wiki. Any Questions? Contact [[User:SaLOUt|me]]!&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
You can obtain recent SVN snapshots on the Rubyforge [http://rubyforge.org/projects/korundum/ QtRuby/Korundum site].&lt;br /&gt;
&lt;br /&gt;
=More help=&lt;br /&gt;
There are two IRC channels (&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;#qtruby&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;#kde-ruby&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;) in [http://www.freenode.net FreeNode]. If you prefer e-mail, you can use the [http://mail.kde.org/mailman/listinfo/kde-bindings kde-bindings mailing-list] (low traffic) or ask in the [http://www.ruby-lang.org/en/20020104.html ruby-talk] mailing list (you may use the [http://www.ruby-forum.com/ Ruby Forum] gateway to post in ruby-talk from web).&lt;br /&gt;
&lt;br /&gt;
=More information=&lt;br /&gt;
A series of articles on ruby QT (inspired by the work done for the [http://dradis.nomejortu.com dradis] project):&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-workshop-the-way-of-the-qt-samurai ruby workshop: the way of the Qt samurai]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-model-view-controller ruby Qt: model / view / controller]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-menu-bar-status-bar-and-resources ruby Qt: menu bar, status bar and resources]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-custom-widget-example ruby Qt custom widget example]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qttreewidget-example ruby Qt::TreeWidget example]&lt;br /&gt;
* [http://www.ruby-forum.com/topic/189346#new Very usefull link how to create your first Qt window dialog]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma/Ruby/Writing_DataEngines</id>
		<title>Development/Tutorials/Plasma/Ruby/Writing DataEngines</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma/Ruby/Writing_DataEngines"/>
				<updated>2010-07-10T18:01:34Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: inital post: 2 important links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is work in progress. For the inpatient two usefull links:&lt;br /&gt;
&lt;br /&gt;
* http://www.kdedevelopers.org/node/3779 (might be outdated)&lt;br /&gt;
* examples in svn: &amp;lt;br /&amp;gt; http://websvn.kde.org/trunk/KDE/kdeexamples/plasma/ruby/dataengines/&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials/Plasma</id>
		<title>Development/Tutorials/Plasma</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials/Plasma"/>
				<updated>2010-07-10T17:56:24Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add link How to write your own Plasma DataEngine using Ruby&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials/Plasma}}&lt;br /&gt;
&lt;br /&gt;
== Plasma Programming with C++ ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/GettingStarted|Getting Started With Plasmoids]]&lt;br /&gt;
:''Creating your first plasmoid in C++ with SVG background, icon and text''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/DataEngines|Writing a DataEngine]]&lt;br /&gt;
:''DataEngines provide a standardized interface to various data sources for visualizations to use. Learn what a DataEngine is and how to write one of your own.''&lt;br /&gt;
&lt;br /&gt;
;[http://www.kdedevelopers.org/node/3247 Video tutorial]&lt;br /&gt;
:''Video and slides from a presentation on libplasma (link to Slides below)''&lt;br /&gt;
&lt;br /&gt;
;[http://mirror.linux.org.au/pub/linux.conf.au/2008/slides/296-coolplasma.odp Link To Slides For The Above Video]&lt;br /&gt;
:''Slides For The Presentation Creating User Interfaces With Plasma by Aaron Seigo''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/UsingExtenders|How to use extenders in your Plasmoid]]&lt;br /&gt;
:''A simple example that shows how to use extenders in a Plasmoid.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/AbstractRunner|Creating Runners]]&lt;br /&gt;
:''Runners are plugins that provide action-based search functionality in the Plasma workspace &amp;quot;run command&amp;quot; dialog. These plugins can be used by any application that links again libplasma.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/WallpaperHelloWorld|Wallpaper Tutorial 1]]&lt;br /&gt;
:''This tutorial shows you how to make a simple Hello World plasma wallpaper plugin.''&lt;br /&gt;
&lt;br /&gt;
;[http://www.linux-magazine.com/w3/issue/114/036-040_plasma.pdf Creating Plasmoids]&lt;br /&gt;
:''May 2010 article from Linux Magazine''&lt;br /&gt;
&lt;br /&gt;
;[http://www.ibm.com/developerworks/linux/library/l-kde-plasmoids/index.html Create Plasmoids using KDevelop]&lt;br /&gt;
:''Article explaining the structure of Plasma and how to create a Plasmoid''&lt;br /&gt;
&lt;br /&gt;
== Plasma Programming with JavaScript ==&lt;br /&gt;
&lt;br /&gt;
Plasma has built-in JavaScript (also known as ECMAScript, and often referred to as QtScript in the context of Qt) scripting support without requiring any external dependencies.&lt;br /&gt;
&lt;br /&gt;
=== Plasmoids ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in JavaScript''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/DataEngine|Getting Data]]&lt;br /&gt;
:''How to retreive data from a data engine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/NowPlaying|Now Playing]]&lt;br /&gt;
:''Slightly more advanced data engine usage: displaying what's currently playing''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/SystemMonitor|System Monitor]]&lt;br /&gt;
:''How to access systemmonitor data engine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/CheatSheet|Cheat Sheet]]&lt;br /&gt;
:''A cheat sheet, rather than a tutorial, of things to remember and watch out for when developing JavaScript plasmoids''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/API|API Reference]]&lt;br /&gt;
:''The Simplified JavaScript Plasmoid API. Useful for referencing what is available in the runtime and as a study aid for the tutorials above.''&lt;br /&gt;
&lt;br /&gt;
=== Other Applications Of Javascript ===&lt;br /&gt;
;[[KDE_System_Administration/PlasmaDestkopScripting|Scripting Plasma Shells]]&lt;br /&gt;
:The KDE Plasma Desktop and Netbook provide means to manage the desktop shell (desktop, panels, widget) via scripts written in JavaScript. This article describes how to take advantage of this feature set as well as documents the full API. This is primarily a system administration tool, but may also be of interest to power users.&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/JavaScript/Animations]]&lt;br /&gt;
:''How to write Animations using Javascript for use in Plasma applications''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/ComicPlugin|Creating Comic Plugins]]&lt;br /&gt;
:''This guide shows you how to create a comic plugin for the comic plasmoid.''&lt;br /&gt;
&lt;br /&gt;
== Plasma Programming with Python ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in Python''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Using widgets|Using widgets]]&lt;br /&gt;
:''Introduction to using Plasma widgets''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Using DataEngines|Using DataEngines]]&lt;br /&gt;
:''How to use DataEngines from a plasmoid''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Python/Writing DataEngines|Writing DataEngines]]&lt;br /&gt;
:''How to write your own Plasma DataEngine''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/PythonPlasmoid|Writing a Plasmoid in Python]]&lt;br /&gt;
:''Writing a simple battery graph in python''&lt;br /&gt;
&lt;br /&gt;
== Plasma Programming with Ruby ==&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in Ruby''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Using widgets|Using widgets]]&lt;br /&gt;
:''Introduction to using Plasma widgets''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/SimplePasteApplet|Writing a simple paste applet]]&lt;br /&gt;
:''A tutorial explaining how to set up a plasmoid, create a simple paste applet using widgets and add Plasma features seen elsewhere. Complete with tips for those who have never programmed before.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Writing DataEngines|Writing DataEngines]]&lt;br /&gt;
:''How to write your own Plasma DataEngine using Ruby''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Ruby/Blinker|Use SVG artwork in the simplest way possible]]&lt;br /&gt;
:''Follow a fellow student as he asks around about SVG usage and explains why the code examples work. This is a wiki so feel free to add your own insights until this tutorial can be considered complete.''&lt;br /&gt;
&lt;br /&gt;
== Plasma Programming with Web Technologies (HTML/JS/CSS etc) ==&lt;br /&gt;
;[[Development/Tutorials/Plasma/Web/GettingStarted|Getting Started]]&lt;br /&gt;
:''Creating and running your first plasmoid in HTML''&lt;br /&gt;
&lt;br /&gt;
== Theme development ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/Theme|Creating a Plasma Theme]]&lt;br /&gt;
:''Guide to creating your first Plasma theme''&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
* [[Projects/Plasma|Projects: Plasma]]&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/index.html Plasma api documentation]&lt;br /&gt;
* [http://techbase.kde.org/Projects/Plasma/Eclipse_Integration Plasma Eclipse Integration]&lt;br /&gt;
* The [https://mail.kde.org/mailman/listinfo/plasma-devel plasma-devel mailing list] and #plasma on IRC (irc.freenode.org).&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby</id>
		<title>Development/Languages/Ruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby"/>
				<updated>2010-02-19T15:48:24Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add new forms for connect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby}}&lt;br /&gt;
[[Image:ruby.png]]&lt;br /&gt;
&lt;br /&gt;
Very complete bindings to both the KDE API and the Qt APIs. The Korundum package includes both a QtRuby Qt-only binding along with the full combined Qt/KDE one. The QtRuby package contains just Qt bindings with no dependencies on KDE.&lt;br /&gt;
&lt;br /&gt;
[http://rubyforge.org/projects/korundum/ Korundum/QtRuby - Ruby-KDE/Qt bindings]&lt;br /&gt;
&lt;br /&gt;
The book [http://www.pragmaticprogrammer.com/titles/ctrubyqt/ Rapid GUI Development with QtRuby] (for Qt version 3.x) is available.&lt;br /&gt;
&lt;br /&gt;
Being [http://developer.kde.org/language-bindings/smoke/index.html Smoke-based] bindings means that they offer full access to most KDE 4.x and Qt 4.x classes.&lt;br /&gt;
&lt;br /&gt;
= QtRuby =&lt;br /&gt;
Hello world example:&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby -w&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new(ARGV)&lt;br /&gt;
hello = Qt::PushButton.new(&amp;quot;Hello World!&amp;quot;)&lt;br /&gt;
hello.resize(100, 30)&lt;br /&gt;
hello.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hello Qt example in a more 'Rubyish' way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
Qt::Application.new(ARGV) do&lt;br /&gt;
    Qt::Widget.new do&lt;br /&gt;
&lt;br /&gt;
        self.window_title = 'Hello QtRuby v1.0'&lt;br /&gt;
        resize(200, 100)&lt;br /&gt;
    &lt;br /&gt;
        button = Qt::PushButton.new('Quit') do&lt;br /&gt;
            connect(SIGNAL :clicked) { Qt::Application.instance.quit }&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        label = Qt::Label.new('&amp;lt;big&amp;gt;Hello Qt in the Ruby way!&amp;lt;/big&amp;gt;')&lt;br /&gt;
        &lt;br /&gt;
        self.layout = Qt::VBoxLayout.new do&lt;br /&gt;
            add_widget(label, 0, Qt::AlignCenter)&lt;br /&gt;
            add_widget(button, 0, Qt::AlignRight)&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        show&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Current api coverage overview =&lt;br /&gt;
&lt;br /&gt;
== Available calls ==&lt;br /&gt;
You can call all Qt public and protected methods, and all friend methods such as bitBlt() etc&lt;br /&gt;
== Virtual methods ==&lt;br /&gt;
&lt;br /&gt;
All virtual methods can be overridden, not just event handlers&lt;br /&gt;
== Properties ==&lt;br /&gt;
'foobar = 5' is a synonym for 'setFooBar(5)'&lt;br /&gt;
&lt;br /&gt;
==Use either CamelCase or lowercase with underscore naming==&lt;br /&gt;
&lt;br /&gt;
Any underscores in method names are removed, and the following character is capitalised. For example, you can use either of these two forms to call the same method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
create_standard_status_bar_action()&lt;br /&gt;
createStandardStatusBarAction()&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Operator overloading==&lt;br /&gt;
The full range of Qt operator methods is available, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
p1 = Qt::Point.new(5,5)   =&amp;gt; (5, 5)&lt;br /&gt;
p2 = Qt::Point.new(20,20) =&amp;gt; (20, 20)&lt;br /&gt;
p1 + p2                   =&amp;gt; (25, 25)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Declare signals and slots==&lt;br /&gt;
Signals and slots are declared as list of strings like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
slots 'setColor(QColor)', 'slotLoad(const QString&amp;amp;)'..&lt;br /&gt;
signals 'clicked()'..&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For slots and signals without arguments you can use Ruby symbols:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
slots :slotLoad&lt;br /&gt;
signals :clicked&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently C++ type signatures must be used, a future version of QtRuby will allow ruby type signatures instead.&lt;br /&gt;
&lt;br /&gt;
Connect slots and signals like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Object.connect( @colormenu, SIGNAL( &amp;quot;activated(int)&amp;quot; ),&lt;br /&gt;
                  self, SLOT( &amp;quot;slotColorMenu(int)&amp;quot; ) )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also two another possibilities:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
connect(:mysig, mytarget, :mymethod))&lt;br /&gt;
connect(SIGNAL('mysignal(int)'), mytarget, :mymethod))&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can connect signal to a block:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
quit_button.connect(SIGNAL :clicked) { $qApp.quit }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And emit signals like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
emit colorChanged( black )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Constructors==&lt;br /&gt;
You can call constructors in the conventional style:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
quit = Qt::PushButton.new(&amp;quot;Quit&amp;quot;, self, &amp;quot;quit&amp;quot;)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can pass a block if you prefer:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new { setCaption(&amp;quot;foobar&amp;quot;) }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The block will be called in the context of the newly created instance.&lt;br /&gt;
&lt;br /&gt;
Ordinary arguments can be provided as well as a block at the end:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new(nil) { setCaption(&amp;quot;foobar&amp;quot;) }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
They are run in the context of the new instance.&lt;br /&gt;
&lt;br /&gt;
And there's more! You can also pass an arg to the block, and it will be run in the context of the arg:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = MyWidget.new { |theWidget| theWidget.setCaption &amp;quot;foobar&amp;quot; }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Garbage Collection==&lt;br /&gt;
When a ruby instance is garbage collected, the underlying C++ instance will only be deleted if it isn't 'owned' by a parent object. Normally this will 'just work', but there are occasions when you need to delete the C++ ahead of garbage collection, and whether or not it has a parent. Use the dispose(), isDisposed() and disposed? methods like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
item2.dispose&lt;br /&gt;
if item2.disposed?&lt;br /&gt;
puts &amp;quot;item2 is disposed&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==C++ 'int*' and 'int&amp;amp;' argument types==&lt;br /&gt;
Ruby passes numeric values by value, and so they can't be changed when passed to a method. The Qt::Integer class provides a mutable numeric type which does get updated when passed as an argument. For example, this C++ method 'findByFileContent()':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
# static Ptr findByFileContent( const QString &amp;amp;fileName, &lt;br /&gt;
#                               int *accuracy=0 );&lt;br /&gt;
 &lt;br /&gt;
acc = Qt::Integer.new(0)&lt;br /&gt;
fc = KDE::MimeType.findByFileContent(&amp;quot;mimetype.rb&amp;quot;, acc)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It supports the arithmetic operators, and so expressions such as 'acc + 3' will work.&lt;br /&gt;
&lt;br /&gt;
==C++ 'bool*' and 'bool&amp;amp;' argument types==&lt;br /&gt;
There is a similar problem for bool arg types, and the mutable Qt::Boolean class can be used like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
# QFont getFont(bool * ok, const QFont&amp;amp;initial, &lt;br /&gt;
#               QWidget* parent = 0, const char *name = 0);		&lt;br /&gt;
 		&lt;br /&gt;
ok = Qt::Boolean.new&lt;br /&gt;
font = Qt::FontDialog.getFont(ok, &lt;br /&gt;
                    Qt::Font.new(&amp;quot;Helvetica [Cronyx]&amp;quot;, 10), &lt;br /&gt;
                    self)&lt;br /&gt;
if !ok.nil? &lt;br /&gt;
# font is set to the font the user selected&lt;br /&gt;
else &lt;br /&gt;
# the user canceled the dialog&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use 'nil?' to test the value returned in the Boolean&lt;br /&gt;
&lt;br /&gt;
==C++ (const )(unsigned )char* argument types==&lt;br /&gt;
In some cases Qt/KDE object &amp;quot;takes ownership&amp;quot; over Ruby String passed as char* argument type. Programmer needs to make sure that Ruby String is not being garbage collected or changed for the time it's being used by Qt/KDE object. It is also quite possible that Qt/KDE object will change and eventually free it(memory used internally by Ruby String to store its data). Be very careful when you call this kind of methods and make sure that there is no overloaded version witch accepts QString or QByteArray first!&lt;br /&gt;
&lt;br /&gt;
==C++ unsigned char* functions==&lt;br /&gt;
&lt;br /&gt;
Very few functions (as QImage::bits()) return a uchar* to directly manipulate data. These functions are not supported in Ruby and will throw an ArgumentError. More information on the [http://lists.kde.org/?l=kde-bindings&amp;amp;m=122899325331866&amp;amp;w=2 mail list].&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
If a method call can't be matched in the Smoke library giving a 'method_missing' error, first check that you are passing correct class instance that is properly initialized (with super method called in constructors of custom Qt classes descendants). You can also turn on debugging to trace the matching process:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
a = Qt::Application.new(ARGV)&lt;br /&gt;
Qt.debug_level = Qt::DebugLevel::High&lt;br /&gt;
a.loadLibrary(&amp;quot;foo&amp;quot;)  # Non existent method&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will give the following output:&lt;br /&gt;
&lt;br /&gt;
       classname    == QApplication&lt;br /&gt;
       :: method == loadLibrary$&lt;br /&gt;
       -&amp;gt; methodIds == []&lt;br /&gt;
       candidate list:&lt;br /&gt;
       Possible prototypes:&lt;br /&gt;
           static QWidget* QApplication::widgetAt(int, int, bool)&lt;br /&gt;
 			...&lt;br /&gt;
&lt;br /&gt;
Here, the list of candidate methods 'methodIds' is empty&lt;br /&gt;
&lt;br /&gt;
Another debugging mechanism allows various trace 'channels' to be switched on.&lt;br /&gt;
&lt;br /&gt;
You can trace virtual method callbacks:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Internal::setDebug(Qt::QtDebugChannel::QTDB_VIRTUAL)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or trace QtRuby garbage collection:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
Qt::Internal::setDebug(Qt::QtDebugChannel::QTDB_GC)&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==String i18n==&lt;br /&gt;
&lt;br /&gt;
QtRuby supports $KCODE values of 'u', 'e' and 's' or the corresponding '-K' options from the command line. Qt Designer .ui files have UTF-8 strings so if you use any 8 bit UTF-8 characters, you will need to set $KCODE='u' or use the -Ku command line option.&lt;br /&gt;
&lt;br /&gt;
=Other capabilities and offerings=&lt;br /&gt;
&lt;br /&gt;
==Qt Designer==&lt;br /&gt;
A 'rbuic4' tool is included in qtruby/tools/rbuic to compile .ui files into ruby code. As described above, Qt Designer uses UTF-8. In addition to the options in the original uic C++ utility an '-x' flag has been added. This will generate a top level stub in the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbuic mainform.ui -x -o mainform.rb&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will add this to the end of the generated code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
if $0 == __FILE__&lt;br /&gt;
    a = Qt::Application.new(ARGV)&lt;br /&gt;
    w = MainForm.new&lt;br /&gt;
    w.show&lt;br /&gt;
    a.exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then you can test the example code straight away:&lt;br /&gt;
&lt;br /&gt;
       $ ruby mainform.rb&lt;br /&gt;
&lt;br /&gt;
Use the '-kde' option to require the 'korundum4' extension rather than the 'Qt4' one. If the '-x' option is used in conjunction, it generates a KDE top level. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbuic4 -x -kde knotifywidgetbase.ui -o knotifywidgetbase.rb&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will generate this top level code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
if $0 == __FILE__&lt;br /&gt;
    about = KDE::AboutData.new(&amp;quot;knotifywidgetbase&amp;quot;, &lt;br /&gt;
 		                       &amp;quot;KNotifyWidgetBase&amp;quot;, &amp;quot;0.1&amp;quot;)&lt;br /&gt;
    KDE::CmdLineArgs.init(ARGV, about)&lt;br /&gt;
    a = KDE::Application.new()&lt;br /&gt;
    w = KNotifyWidgetBase.new&lt;br /&gt;
    w.show&lt;br /&gt;
    a.exec&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Loading .ui files at runtime with Qt::UILoader==&lt;br /&gt;
{{improve|Remove example that does not work}}&lt;br /&gt;
&lt;br /&gt;
You can load a Qt Designer .ui file at runtime with the 'quiloader' extension, for example:&lt;br /&gt;
&lt;br /&gt;
       require 'Qt4'&lt;br /&gt;
       require 'quiloader'&lt;br /&gt;
 &lt;br /&gt;
       a = Qt::Application.new(ARGV)&lt;br /&gt;
       if ARGV.length == 0&lt;br /&gt;
         exit&lt;br /&gt;
       end&lt;br /&gt;
 &lt;br /&gt;
       if ARGV.length == 2&lt;br /&gt;
         QUI::WidgetFactory.loadImages ARGV[0]&lt;br /&gt;
         w = QUI::WidgetFactory.create ARGV[1]&lt;br /&gt;
         if w.nil?&lt;br /&gt;
           exit&lt;br /&gt;
         end&lt;br /&gt;
         w.show()&lt;br /&gt;
         a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))&lt;br /&gt;
         a.exec()&lt;br /&gt;
       end&lt;br /&gt;
&lt;br /&gt;
With new version API changed a little.&lt;br /&gt;
&lt;br /&gt;
       require 'Qt4'&lt;br /&gt;
       require 'qtuitools'&lt;br /&gt;
 &lt;br /&gt;
       a = Qt::Application.new(ARGV)&lt;br /&gt;
       if ARGV.length == 0&lt;br /&gt;
         exit&lt;br /&gt;
       end&lt;br /&gt;
 &lt;br /&gt;
       if ARGV.length == 1&lt;br /&gt;
         file = Qt::File.new(ARGV[1])&lt;br /&gt;
         file.open(Qt::File::ReadOnly)&lt;br /&gt;
 &lt;br /&gt;
         loader = Qt::UiLoader.new&lt;br /&gt;
         window = loader.load(file, nil)&lt;br /&gt;
         file.close&lt;br /&gt;
&lt;br /&gt;
         if (window.nil?)&lt;br /&gt;
           print &amp;quot;Error. Window is nil.\n&amp;quot;&lt;br /&gt;
           exit&lt;br /&gt;
         end&lt;br /&gt;
         window.show&lt;br /&gt;
         a.connect(a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()'))&lt;br /&gt;
         a.exec&lt;br /&gt;
       end&lt;br /&gt;
&lt;br /&gt;
==API reference==&lt;br /&gt;
&lt;br /&gt;
Use the bin/rbqtapi tool to discover which methods are available in the QtRuby api. This command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbqtapi Qt::TextEdit&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will list all the methods in the Qt::TextEdit class&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbqtapi -rsetCaption &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lists all methods whose names contain the string 'setCaption'&lt;br /&gt;
&lt;br /&gt;
==Example programs==&lt;br /&gt;
&lt;br /&gt;
The best way to start programming QtRuby is to look at some existing code and start messing with it.. The are various samples under qtrubyexamples and korundum/examples.&lt;br /&gt;
&lt;br /&gt;
=KDE Specific Infomation=&lt;br /&gt;
Instead of &amp;lt;code ruby&amp;gt;require 'Qt4'&amp;lt;/code&amp;gt;, use&amp;lt;code ruby&amp;gt;require 'korundum4'&amp;lt;/code&amp;gt; for KDE programs.&lt;br /&gt;
&lt;br /&gt;
The KDE K* classes such as KApplication are renamed as KDE::Application. The other KDE classes are in the KParts::, KIO:: or DOM:: namespaces, with the same names as their C++ counterparts.&lt;br /&gt;
&lt;br /&gt;
Use the 'rbkdeapi' script to introspect the Korundum api from the command line. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
$ rbkdeapi KDE::Action&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Will list all the methods in the KDE::Action class. There are currently (as at KDE 3.3 beta 2) 977 classes/30841 methods in the Smoke library runtime, so the coverage of the Qt/KDE api is pretty complete.&lt;br /&gt;
&lt;br /&gt;
=Build dependencies=&lt;br /&gt;
&lt;br /&gt;
* ruby 1.8 or greater (svn trunk works with 1.9.1)&lt;br /&gt;
* cmake 2.6 or greater&lt;br /&gt;
* Qt 4.0 or greater&lt;br /&gt;
* KDE 4.1 or greater (for korundum)&lt;br /&gt;
&lt;br /&gt;
=Tutorials=&lt;br /&gt;
There is a ruby translation of [http://developer.kde.org/language-bindings/ruby/tutorial/tutorial.html Qt Tutorial #1], and the corresponding ruby code is in qtruby/rubylib/tutorial/t1 to t14.&lt;br /&gt;
&lt;br /&gt;
And a Qt4 version of the same tutorial translated to Ruby by Darshan Ishaya [[Development/Tutorials/Qt4_Ruby_Tutorial|Qt4 Ruby Tutorial]] &lt;br /&gt;
&lt;br /&gt;
[http://developer.kde.org/language-bindings/ruby/tutorial2/tutorial2.html Qt Tutorial #2], a Charting Application with ruby code in qtruby/rubylib/examples/qt-examples/chart.&lt;br /&gt;
&lt;br /&gt;
The Qt Designer [http://developer.kde.org/language-bindings/ruby/colortooltutorial/designer-manual-3.html Color Tool Tutorial], with ruby code in qtruby/rubylib/designer/examples/colortool.&lt;br /&gt;
&lt;br /&gt;
Paul Lutus has written a tutorial on how to get started with [http://www.arachnoid.com/ruby/RubyGUIProject/index.html Ruby GUI programming with Qt]&lt;br /&gt;
&lt;br /&gt;
For KDE, there is a ruby translation of this [http://developer.kde.org/language-bindings/ruby/kde3tutorial/index.html KDE 3.0 tutorial] originally written for C++ by Antonio Larrosa Jiménez. The sources are in korundum/rubylib/tutorials/p1 to p9.&lt;br /&gt;
&lt;br /&gt;
The book [http://www.pragmaticprogrammer.com/titles/ctrubyqt/ Rapid GUI Development with QtRuby] is now available.&lt;br /&gt;
&lt;br /&gt;
There is also an approach to create an [[/Ruby-Qt/KDE Book|Ruby-Qt/KDE Book]] under a free license. The content will be created in this wiki. The book made with latex will be derived from the content in the wiki. Any Questions? Contact [[User:SaLOUt|me]]!&lt;br /&gt;
&lt;br /&gt;
=Download=&lt;br /&gt;
You can obtain recent SVN snapshots on the Rubyforge [http://rubyforge.org/projects/korundum/ QtRuby/Korundum site].&lt;br /&gt;
&lt;br /&gt;
=More help=&lt;br /&gt;
There are two IRC channels (&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;#qtruby&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;#kde-ruby&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;) in [http://www.freenode.net FreeNode]. If you prefer e-mail, you can use the [http://mail.kde.org/mailman/listinfo/kde-bindings kde-bindings mailing-list] (low traffic) or ask in the [http://www.ruby-lang.org/en/20020104.html ruby-talk] mailing list (you may use the [http://www.ruby-forum.com/ Ruby Forum] gateway to post in ruby-talk from web).&lt;br /&gt;
&lt;br /&gt;
=More information=&lt;br /&gt;
A series of articles on ruby QT (inspired by the work done for the [http://dradis.nomejortu.com dradis] project):&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-workshop-the-way-of-the-qt-samurai ruby workshop: the way of the Qt samurai]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-model-view-controller ruby Qt: model / view / controller]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-menu-bar-status-bar-and-resources ruby Qt: menu bar, status bar and resources]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qt-custom-widget-example ruby Qt custom widget example]&lt;br /&gt;
* [http://weblog.nomejortu.com/x-windows/ruby-qttreewidget-example ruby Qt::TreeWidget example]&lt;br /&gt;
* [http://www.ruby-forum.com/topic/189346#new Very usefull link how to create your first Qt window dialog]&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-21T17:17:34Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: changed code snippets&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]|&lt;br /&gt;
reading=[http://en.wikipedia.org/wiki/Signals_and_slots Signals and Slots-Concept]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|80}}&lt;br /&gt;
TODO:&lt;br /&gt;
* improve writing style and remove spelling mistakes|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic Qt 4 application to get a first impression. We don't start with KDE, because it would require some extra lines, that are not necessary when using Qt.&lt;br /&gt;
&lt;br /&gt;
= Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Interactive Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
Open a shell and type in &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; to start the interactive ruby shell.&lt;br /&gt;
Now copy the short code example into the irb session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new &amp;quot;Hello Ruby&amp;quot;&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :quit ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before you starting you start programming your Graphical User Interface (GUI), you have to &amp;lt;&amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt; the libraries, in this case &amp;lt;tt&amp;gt;Qt4&amp;lt;/tt&amp;gt;, but &amp;lt;tt&amp;gt;korundum4&amp;lt;/tt&amp;gt; would also do the job, because the KDE libs automatically also requires the Qt libs for you.&lt;br /&gt;
&lt;br /&gt;
In the second line we create a new Qt Object a of &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is the Ruby module (namespace) and &amp;lt;tt&amp;gt;Application&amp;lt;/tt&amp;gt; the name of the class in the module. In C++, the native language of Qt, you would write &amp;lt;tt&amp;gt;QApplication&amp;lt;/tt&amp;gt;. Remember this as you will need it, if you want to take a look in the Qt documentation.&lt;br /&gt;
&lt;br /&gt;
Another object w of &amp;lt;tt&amp;gt;Qt::PushButton&amp;lt;/tt&amp;gt; is created in the third line. &amp;lt;tt&amp;gt;&amp;quot;Hello Ruby&amp;quot;&amp;lt;/tt&amp;gt; is the first (and only) argument of the Constructor. If you check the Qt documentation, you would find out, that this is the caption of the button. Ruby would also allow you to write it with brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The small &amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt; means widget. All graphical elements in Qt are called widgets.&lt;br /&gt;
&lt;br /&gt;
The fourth line is probably the most complicated one. The ruby class method &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; of the object &amp;lt;tt&amp;gt;Object&amp;lt;/tt&amp;gt; of the module &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is used to bind the user action button-clicked with the action application-close. The signals and slots is a special concept of Qt. You can get a [http://en.wikipedia.org/wiki/Signals_and_slots short overview] and other ressources on Wikipedia.&lt;br /&gt;
&lt;br /&gt;
The C++ equivalent you will find in the Qt documentation to &amp;lt;tt&amp;gt;:clicked&amp;lt;/tt&amp;gt; would be &amp;lt;tt&amp;gt;&amp;quot;clicked()&amp;quot;&amp;lt;/tt&amp;gt;, a signal without an argument. In the case of no arguments you can always use a ruby symbol.&lt;br /&gt;
&lt;br /&gt;
The fifth line let the created widget show. Don't forget this line. Maybe you want to think of a starting point of your application.&lt;br /&gt;
&lt;br /&gt;
At last the application gets started by &amp;lt;tt&amp;gt;a.exec&amp;lt;/tt&amp;gt;. Now the GUI takes over and manages the control flow. Any other command after this line will be applied after the GUI was closed.&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby ==&lt;br /&gt;
&lt;br /&gt;
In the next example we want our GUI to do something interactively. Because it is more complex you may want to save it in a file &amp;quot;sayHello.rb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are on a linux-based system, you can add on the top of the file a so called [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 Shebang] line. After giving the file execution rights with &amp;lt;tt&amp;gt;chmod +x sayHello.rb&amp;lt;/tt&amp;gt; by using the shell, you can execute your program with a click on the icon in the file browser or in the command line with &amp;lt;tt&amp;gt;./sayRuby.rb&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby&lt;br /&gt;
#file: sayHello.rb&lt;br /&gt;
&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class CustomApplication &amp;lt; Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :sayHello&lt;br /&gt;
&lt;br /&gt;
  def sayHello&lt;br /&gt;
    msgBox = Qt::MessageBox.new&lt;br /&gt;
    msgBox.text = &amp;quot;Hello World&amp;quot;&lt;br /&gt;
    msgBox.icon = Qt::MessageBox::Information&lt;br /&gt;
    val = msgBox.exec()&lt;br /&gt;
    &lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = CustomApplication.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Say Hello, Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :sayHello ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last example we connected the button with the existing slot &amp;lt;tt&amp;gt;:close&amp;lt;/tt&amp;gt;. Now we want to create our own slot. We create a new class &amp;lt;tt&amp;gt;CustomApplication&amp;lt;/tt&amp;gt; by inheriting from &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt; and add a slot &amp;lt;tt&amp;gt;:sayHello&amp;lt;/tt&amp;gt;. It doesn't have any arguments. So we can use the shortcut instead of &amp;lt;tt&amp;gt;&amp;quot;sayHello()&amp;quot;&amp;lt;/tt&amp;gt;. After that we define a method with the same name and number of arguments. In the method a message box is prepared which get shown to the user with &amp;lt;tt&amp;gt;exec()&amp;lt;/tt&amp;gt;. To define the properties of the message box, the binding specific syntax is used, which allows you to replace &amp;lt;tt&amp;gt;setText( &amp;quot;Hello World&amp;quot; )&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;text = &amp;quot;Hello World&amp;quot;&amp;lt;/tt&amp;gt;. Remember this as you need it to find the class method in the C++ documentation of Qt.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;tt&amp;gt;Qt::Application.instance.quit&amp;lt;/tt&amp;gt; the program gets closed.&lt;br /&gt;
&lt;br /&gt;
The last lines are nearly the same as in the last example. We have to replace &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt; with our own class &amp;lt;tt&amp;gt;CustomApplication&amp;lt;/tt&amp;gt; and change the in the slot to &amp;lt;tt&amp;gt;:sayHello&amp;lt;/tt&amp;gt; in the connection command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby - the short version ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby&lt;br /&gt;
#file: sayHello.rb&lt;br /&gt;
&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Say Hello, Ruby&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL( :clicked ) ) do&lt;br /&gt;
  msgBox = Qt::MessageBox.new&lt;br /&gt;
  msgBox.text = &amp;quot;Hello World&amp;quot;&lt;br /&gt;
  msgBox.icon = Qt::MessageBox::Information&lt;br /&gt;
  val = msgBox.exec()&lt;br /&gt;
  &lt;br /&gt;
  Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The bindings offer you a special features, which allows you to define the actions for a given signal without having to create a slot. Just use the &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; method of the Qt object which owns the signal you want to use. The &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; expects you to give only one argument,the signal, followd by a code block (&amp;lt;tt&amp;gt;do ... end&amp;lt;/tt&amp;gt;), which gets processed in the case the signal is triggered. This way of programming allows a very compact style. In this case you don't need to create a &amp;lt;tt&amp;gt;CustomApplication&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby - an even shorter version ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  self.connect( SIGNAL :clicked ) do &lt;br /&gt;
    msgBox = Qt::MessageBox.new&lt;br /&gt;
    msgBox.text = &amp;quot;Hello World&amp;quot;&lt;br /&gt;
    msgBox.icon = Qt::MessageBox::Information&lt;br /&gt;
    val = msgBox.exec()&lt;br /&gt;
    &lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you create a new object, you can add a code block with some statements, that gets executed in the namespace of the new object. You can expand the usage on the &amp;lt;tt&amp;gt;msgBox&amp;lt;/tt&amp;gt;, too.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  self.connect( SIGNAL :clicked ) do &lt;br /&gt;
    msgBox = Qt::MessageBox.new do&lt;br /&gt;
      self.text = &amp;quot;Hello World&amp;quot;&lt;br /&gt;
      self.icon = Qt::MessageBox::Information&lt;br /&gt;
    end&lt;br /&gt;
    val = msgBox.exec()    &lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-21T16:21:35Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: explain second code example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]|&lt;br /&gt;
reading=[http://en.wikipedia.org/wiki/Signals_and_slots Signals and Slots-Concept]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|0}}|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic Qt 4 application to get a first impression. We don't start with KDE, because it would require some extra lines, that are not necessary when using Qt.&lt;br /&gt;
&lt;br /&gt;
= Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Interactive Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
Open a shell and type in &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; to start the interactive ruby shell.&lt;br /&gt;
Now copy the short code example into the irb session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new &amp;quot;Hello Ruby&amp;quot;&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :quit ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before you starting you start programming your Graphical User Interface (GUI), you have to &amp;lt;&amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt; the libraries, in this case &amp;lt;tt&amp;gt;Qt4&amp;lt;/tt&amp;gt;, but &amp;lt;tt&amp;gt;korundum4&amp;lt;/tt&amp;gt; would also do the job, because the KDE libs automatically also requires the Qt libs for you.&lt;br /&gt;
&lt;br /&gt;
In the second line we create a new Qt Object a of &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is the Ruby module (namespace) and &amp;lt;tt&amp;gt;Application&amp;lt;/tt&amp;gt; the name of the class in the module. In C++, the native language of Qt, you would write &amp;lt;tt&amp;gt;QApplication&amp;lt;/tt&amp;gt;. Remember this as you will need it, if you want to take a look in the Qt documentation.&lt;br /&gt;
&lt;br /&gt;
Another object w of &amp;lt;tt&amp;gt;Qt::PushButton&amp;lt;/tt&amp;gt; is created in the third line. &amp;lt;tt&amp;gt;&amp;quot;Hello Ruby&amp;quot;&amp;lt;/tt&amp;gt; is the first (and only) argument of the Constructor. If you check the Qt documentation, you would find out, that this is the caption of the button. Ruby would also allow you to write it with brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The small &amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt; means widget. All graphical elements in Qt are called widgets.&lt;br /&gt;
&lt;br /&gt;
The fourth line is probably the most complicated one. The ruby class method &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; of the object &amp;lt;tt&amp;gt;Object&amp;lt;/tt&amp;gt; of the module &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is used to bind the user action button-clicked with the action application-close. The signals and slots is a special concept of Qt. You can get a [http://en.wikipedia.org/wiki/Signals_and_slots short overview] and other ressources on Wikipedia.&lt;br /&gt;
&lt;br /&gt;
The C++ equivalent you will find in the Qt documentation to &amp;lt;tt&amp;gt;:clicked&amp;lt;/tt&amp;gt; would be &amp;lt;tt&amp;gt;&amp;quot;clicked()&amp;quot;&amp;lt;/tt&amp;gt;, a signal without an argument. In the case of no arguments you can always use a ruby symbol.&lt;br /&gt;
&lt;br /&gt;
The fifth line let the created widget show. Don't forget this line. Maybe you want to think of a starting point of your application.&lt;br /&gt;
&lt;br /&gt;
At last the application gets started by &amp;lt;tt&amp;gt;a.exec&amp;lt;/tt&amp;gt;. Now the GUI takes over and manages the control flow. Any other command after this line will be applied after the GUI was closed.&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby ==&lt;br /&gt;
&lt;br /&gt;
In the next example we want our GUI to do something interactively. Because it is more complex you may want to save it in a file &amp;quot;sayHello.rb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are on a linux-based system, you can add on the top of the file a so called [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 Shebang] line. After giving the file execution rights with &amp;lt;tt&amp;gt;chmod +x sayHello.rb&amp;lt;/tt&amp;gt; by using the shell, you can execute your program with a click on the icon in the file browser or in the command line with &amp;lt;tt&amp;gt;./sayRuby.rb&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby&lt;br /&gt;
#file: sayHello.rb&lt;br /&gt;
&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class CustomApplication &amp;lt; Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :sayHello&lt;br /&gt;
&lt;br /&gt;
  def sayHello&lt;br /&gt;
    msgBox = Qt::MessageBox.new&lt;br /&gt;
    msgBox.text = &amp;quot;Hello World&amp;quot;&lt;br /&gt;
    msgBox.icon = Qt::MessageBox::Information&lt;br /&gt;
    msgBox.standardButtons = Qt::MessageBox::Ok&lt;br /&gt;
    val = msgBox.exec()&lt;br /&gt;
    &lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = CustomApplication.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Say Hello, Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :sayHello ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the last example we connected the button with the existing slot &amp;lt;tt&amp;gt;:close&amp;lt;/tt&amp;gt;. Now we want to create our own slot. We create a new class &amp;lt;tt&amp;gt;CustomApplication&amp;lt;/tt&amp;gt; by inheriting from &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt; and add a slot &amp;lt;tt&amp;gt;:sayHello&amp;lt;/tt&amp;gt;. It doesn't have any arguments. So we can use the shortcut instead of &amp;lt;tt&amp;gt;&amp;quot;sayHello()&amp;quot;&amp;lt;/tt&amp;gt;. After that we define a method with the same name and number of arguments. In the method a message box is prepared which get shown to the user with &amp;lt;tt&amp;gt;exec()&amp;lt;/tt&amp;gt;. To define the properties of the message box, the binding specific syntax is used, which allows you to replace &amp;lt;tt&amp;gt;setText( &amp;quot;Hello World&amp;quot; )&amp;lt;/tt&amp;gt; with &amp;lt;tt&amp;gt;text = &amp;quot;Hello World&amp;quot;&amp;lt;/tt&amp;gt;. Remember this as you need it to find the class method in the C++ documentation of Qt.&lt;br /&gt;
&lt;br /&gt;
With &amp;lt;tt&amp;gt;Qt::Application.instance.quit&amp;lt;/tt&amp;gt; the program gets closed.&lt;br /&gt;
&lt;br /&gt;
The last lines are nearly the same as in the last example. We have to replace &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt; with our own class &amp;lt;tt&amp;gt;CustomApplication&amp;lt;/tt&amp;gt; and change the slot to &amp;lt;tt&amp;gt;:sayHello&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-21T15:13:10Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add link ruby editors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|2}}|100%}}&lt;br /&gt;
&lt;br /&gt;
= About Ruby Bindings =&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Future Plans =&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation Of Ruby ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation of Ruby|Installation of Ruby]]&lt;br /&gt;
:''setup ruby itself for end-user and developers''&lt;br /&gt;
&lt;br /&gt;
== Installation Of Bindings ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
= The Ruby Language =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before starting into Ruby-KDE hacking you may want to refresh your Ruby.&lt;br /&gt;
Or do you meet Ruby for the first time? Take a look on these sites:&lt;br /&gt;
&lt;br /&gt;
;http://ruby-lang.org&lt;br /&gt;
:''Official Ruby Homepage with a lot of information''&lt;br /&gt;
&lt;br /&gt;
;[http://mislav.uniqpath.com/poignant-guide/ Why's (Poignant) Guide to Ruby]&lt;br /&gt;
:''Very famous ruby guide in comic style''&lt;br /&gt;
&lt;br /&gt;
;http://tryruby.org/&lt;br /&gt;
:'' Test Ruby right in your browser''&lt;br /&gt;
&lt;br /&gt;
;http://ruby-doc.org&lt;br /&gt;
:''a lot of ruby documentation with usefull links''&lt;br /&gt;
&lt;br /&gt;
;http://en.wikibooks.org/wiki/Ruby_Programming&lt;br /&gt;
:''Ruby Programming from Wikibooks''&lt;br /&gt;
&lt;br /&gt;
== Usefull Tools ==&lt;br /&gt;
&lt;br /&gt;
;http://pastie.org&lt;br /&gt;
:''Share Ruby code with friends (i.e. in IRC)''&lt;br /&gt;
&lt;br /&gt;
;http://refactormycode.com&lt;br /&gt;
:''Share usefull code snippets in different languages and learn from other people''&lt;br /&gt;
&lt;br /&gt;
;http://vim-ruby.rubyforge.org&lt;br /&gt;
:''Improve the [http://www.vim.org Vim] editor with intelligent Ruby code completion features''&lt;br /&gt;
&lt;br /&gt;
;[http://en.wikibooks.org/wiki/Ruby_Programming/Ruby_editors Ruby Editors]&lt;br /&gt;
:''List from the Ruby Programming Wikibook''&lt;br /&gt;
&lt;br /&gt;
= First Steps =&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World|Hello World]]&lt;br /&gt;
:''Start with some simple ruby programs using Qt''&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-21T12:21:55Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|2}}|100%}}&lt;br /&gt;
&lt;br /&gt;
= About Ruby Bindings =&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Future Plans =&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation Of Ruby ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation of Ruby|Installation of Ruby]]&lt;br /&gt;
:''setup ruby itself for end-user and developers''&lt;br /&gt;
&lt;br /&gt;
== Installation Of Bindings ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
= The Ruby Language =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Before starting into Ruby-KDE hacking you may want to refresh your Ruby.&lt;br /&gt;
Or do you meet Ruby for the first time? Take a look on these sites:&lt;br /&gt;
&lt;br /&gt;
;http://ruby-lang.org&lt;br /&gt;
:''Official Ruby Homepage with a lot of information''&lt;br /&gt;
&lt;br /&gt;
;[http://mislav.uniqpath.com/poignant-guide/ Why's (Poignant) Guide to Ruby]&lt;br /&gt;
:''Very famous ruby guide in comic style''&lt;br /&gt;
&lt;br /&gt;
;http://tryruby.org/&lt;br /&gt;
:'' Test Ruby right in your browser''&lt;br /&gt;
&lt;br /&gt;
;http://ruby-doc.org&lt;br /&gt;
:''a lot of ruby documentation with usefull links''&lt;br /&gt;
&lt;br /&gt;
;http://en.wikibooks.org/wiki/Ruby_Programming&lt;br /&gt;
:''Ruby Programming from Wikibooks''&lt;br /&gt;
&lt;br /&gt;
== Usefull Tools ==&lt;br /&gt;
&lt;br /&gt;
;http://pastie.org&lt;br /&gt;
:''Share Ruby code with friends (i.e. in IRC)''&lt;br /&gt;
&lt;br /&gt;
;http://refactormycode.com&lt;br /&gt;
:''Share usefull code snippets in different languages and learn from other people''&lt;br /&gt;
&lt;br /&gt;
;http://vim-ruby.rubyforge.org&lt;br /&gt;
:''Improve the [http://www.vim.org Vim] editor with intelligent Ruby code completion features''&lt;br /&gt;
&lt;br /&gt;
= First Steps =&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World|Hello World]]&lt;br /&gt;
:''Start with some simple ruby programs using Qt''&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-20T20:03:43Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add explanations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]|&lt;br /&gt;
reading=[http://en.wikipedia.org/wiki/Signals_and_slots Signals and Slots-Concept]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|0}}|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic Qt 4 application to get a first impression. We don't start with KDE, because it would require some extra lines, that are not necessary when using Qt.&lt;br /&gt;
&lt;br /&gt;
= Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Interactive Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
Open a shell and type in &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; to start the interactive ruby shell.&lt;br /&gt;
Now copy the short code example into the irb session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new &amp;quot;Hello Ruby&amp;quot;&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :quit ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before you starting you start programming your Graphical User Interface (GUI), you have to &amp;lt;&amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt; the libraries, in this case &amp;lt;tt&amp;gt;Qt4&amp;lt;/tt&amp;gt;, but &amp;lt;tt&amp;gt;korundum4&amp;lt;/tt&amp;gt; would also do the job, because the KDE libs automatically also requires the Qt libs for you.&lt;br /&gt;
&lt;br /&gt;
In the second line we create a new Qt Object a of &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is the Ruby module (namespace) and &amp;lt;tt&amp;gt;Application&amp;lt;/tt&amp;gt; the name of the class in the module. In C++, the native language of Qt, you would write &amp;lt;tt&amp;gt;QApplication&amp;lt;/tt&amp;gt;. Remember this as you will need it, if you want to take a look in the Qt documentation.&lt;br /&gt;
&lt;br /&gt;
Another object w of &amp;lt;tt&amp;gt;Qt::PushButton&amp;lt;/tt&amp;gt; is created in the third line. &amp;lt;tt&amp;gt;&amp;quot;Hello Ruby&amp;quot;&amp;lt;/tt&amp;gt; is the first (and only) argument of the Constructor. If you check the Qt documentation, you would find out, that this is the caption of the button. Ruby would also allow you to write it with brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The small &amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt; means widget. All graphical elements in Qt are called widgets.&lt;br /&gt;
&lt;br /&gt;
The fourth line is probably the most complicated one. The ruby class method &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; of the object &amp;lt;tt&amp;gt;Object&amp;lt;/tt&amp;gt; of the module &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is used to bind the user action button-clicked with the action application-close. The signals and slots is a special concept of Qt. You can get a [http://en.wikipedia.org/wiki/Signals_and_slots short overview] and other ressources on Wikipedia.&lt;br /&gt;
&lt;br /&gt;
The C++ equivalent you will find in the Qt documentation to &amp;lt;tt&amp;gt;:clicked&amp;lt;/tt&amp;gt; would be &amp;lt;tt&amp;gt;&amp;quot;clicked()&amp;quot;&amp;lt;/tt&amp;gt;, a signal without an argument. In the case of no arguments you can always use a ruby symbol.&lt;br /&gt;
&lt;br /&gt;
The fifth line let the created widget show. Don't forget this line. Maybe you want to think of a starting point of your application.&lt;br /&gt;
&lt;br /&gt;
At last the application gets started by &amp;lt;tt&amp;gt;a.exec&amp;lt;/tt&amp;gt;. Now the GUI takes over and manages the control flow. Any other command after this line will be applied after the GUI was closed.&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby ==&lt;br /&gt;
&lt;br /&gt;
In the next example we want our GUI to do something interactively. Because it is more complex you may want to save it in a file &amp;quot;sayHello.rb&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are on a linux-based system, you can add on the top of the file a so called [http://en.wikipedia.org/wiki/Shebang_%28Unix%29 Shebang] line. After giving the file execution rights with &amp;lt;tt&amp;gt;chmod +x sayHello.rb&amp;lt;/tt&amp;gt; by using the shell, you can execute your program with a click on the icon in the file browser or in the command line with &amp;lt;tt&amp;gt;./sayRuby.rb&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby&lt;br /&gt;
# file: sayHello.rb&lt;br /&gt;
&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class CustomApplication &amp;lt; Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :sayHello&lt;br /&gt;
&lt;br /&gt;
  def sayHello&lt;br /&gt;
    puts &amp;quot;Hello World&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = CustomApplication.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Say Hello, Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :sayHello ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-20T19:54:50Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: explain hello ruby program&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]|&lt;br /&gt;
reading=[http://en.wikipedia.org/wiki/Signals_and_slots Signals and Slots-Concept]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|0}}|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic Qt 4 application to get a first impression. We don't start with KDE, because it would require some extra lines, that are not necessary when using Qt.&lt;br /&gt;
&lt;br /&gt;
= Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Interactive Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
Open a shell and type in &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; to start the interactive ruby shell.&lt;br /&gt;
Now copy the short code example into the irb session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new &amp;quot;Hello Ruby&amp;quot;&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :quit ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Before you starting you start programming your Graphical User Interface (GUI), you have to &amp;lt;&amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt; the libraries, in this case &amp;lt;tt&amp;gt;Qt4&amp;lt;/tt&amp;gt;, but &amp;lt;tt&amp;gt;korundum4&amp;lt;/tt&amp;gt; would also do the job, because the KDE libs automatically also requires the Qt libs for you.&lt;br /&gt;
&lt;br /&gt;
In the second line we create a new Qt Object a of &amp;lt;tt&amp;gt;Qt::Application&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is the Ruby module (namespace) and &amp;lt;tt&amp;gt;Application&amp;lt;/tt&amp;gt; the name of the class in the module. In C++, the native language of Qt, you would write &amp;lt;tt&amp;gt;QApplication&amp;lt;/tt&amp;gt;. Remember this as you will need it, if you want to take a look in the Qt documentation.&lt;br /&gt;
&lt;br /&gt;
Another object w of &amp;lt;tt&amp;gt;Qt::PushButton&amp;lt;/tt&amp;gt; is created in the third line. &amp;lt;tt&amp;gt;&amp;quot;Hello Ruby&amp;quot;&amp;lt;/tt&amp;gt; is the first (and only) argument of the Constructor. If you check the Qt documentation, you would find out, that this is the caption of the button. Ruby would also allow you to write it with brackets.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The small &amp;lt;tt&amp;gt;w&amp;lt;/tt&amp;gt; means widget. All graphical elements in Qt are called widgets.&lt;br /&gt;
&lt;br /&gt;
The fourth line is probably the most complicated one. The ruby class method &amp;lt;tt&amp;gt;connect&amp;lt;/tt&amp;gt; of the object &amp;lt;tt&amp;gt;Object&amp;lt;/tt&amp;gt; of the module &amp;lt;tt&amp;gt;Qt&amp;lt;/tt&amp;gt; is used to bind the user action button-clicked with the action application-close. The signals and slots is a special concept of Qt. You can get a [http://en.wikipedia.org/wiki/Signals_and_slots short overview] and other ressources on Wikipedia.&lt;br /&gt;
&lt;br /&gt;
The C++ equivalent you will find in the Qt documentation to &amp;lt;tt&amp;gt;:clicked&amp;lt;/tt&amp;gt; would be &amp;lt;tt&amp;gt;&amp;quot;clicked()&amp;quot;&amp;lt;/tt&amp;gt;, a signal without an argument. In the case of no arguments you can always use a ruby symbol.&lt;br /&gt;
&lt;br /&gt;
The fifth line let the created widget show. Don't forget this line. Maybe you want to think of a starting point of your application.&lt;br /&gt;
&lt;br /&gt;
At last the application gets started by &amp;lt;tt&amp;gt;a.exec&amp;lt;/tt&amp;gt;. Now the GUI takes over and manages the control flow. Any other command after this line will be applied after the GUI was closed.&lt;br /&gt;
&lt;br /&gt;
== Say Hello, Ruby ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
#!/usr/bin/ruby&lt;br /&gt;
&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class CustomApplication &amp;lt; Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :doSomething&lt;br /&gt;
&lt;br /&gt;
  def doSomething&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = CustomApplication.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :doSomething ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-20T19:16:30Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add wikibook link ruby programming&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|2}}|100%}}&lt;br /&gt;
&lt;br /&gt;
= About Ruby Bindings =&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Future Plans =&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation Of Ruby ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation of Ruby|Installation of Ruby]]&lt;br /&gt;
:''setup ruby itself for end-user and developers''&lt;br /&gt;
&lt;br /&gt;
== Installation Of Bindings ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
= Introduction To Ruby Language =&lt;br /&gt;
&lt;br /&gt;
Before starting into Ruby-KDE hacking you may want to refresh your Ruby.&lt;br /&gt;
Or do you meet Ruby for the first time? Take a look on these sites:&lt;br /&gt;
&lt;br /&gt;
;http://ruby-lang.org&lt;br /&gt;
:''Official Ruby Homepage with a lot of information''&lt;br /&gt;
&lt;br /&gt;
;[http://mislav.uniqpath.com/poignant-guide/ Why's (Poignant) Guide to Ruby]&lt;br /&gt;
:''Very famous ruby guide in comic style''&lt;br /&gt;
&lt;br /&gt;
;http://tryruby.org/&lt;br /&gt;
:'' Test Ruby right in your browser''&lt;br /&gt;
&lt;br /&gt;
;http://ruby-doc.org/&lt;br /&gt;
:''a lot of ruby documentation with usefull links''&lt;br /&gt;
&lt;br /&gt;
;http://en.wikibooks.org/wiki/Ruby_Programming&lt;br /&gt;
:''Ruby Programming from Wikibooks''&lt;br /&gt;
&lt;br /&gt;
= First Steps =&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World|Hello World]]&lt;br /&gt;
:''Start with some simple ruby programs using Qt''&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-20T00:07:00Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add some ruby learning links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|2}}|100%}}&lt;br /&gt;
&lt;br /&gt;
= About Ruby Bindings =&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Future Plans =&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation Of Ruby ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation of Ruby|Installation of Ruby]]&lt;br /&gt;
:''setup ruby itself for end-user and developers''&lt;br /&gt;
&lt;br /&gt;
== Installation Of Bindings ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
= Introduction To Ruby Language =&lt;br /&gt;
&lt;br /&gt;
Before starting into Ruby-KDE hacking you may want to refresh your Ruby.&lt;br /&gt;
Or do you meet Ruby for the first time? Take a look on these sites:&lt;br /&gt;
&lt;br /&gt;
;http://ruby-lang.org&lt;br /&gt;
:''Official Ruby Homepage with a lot of information''&lt;br /&gt;
&lt;br /&gt;
;[http://mislav.uniqpath.com/poignant-guide/ Why's (Poignant) Guide to Ruby]&lt;br /&gt;
:''Very famous ruby guide in comic style''&lt;br /&gt;
&lt;br /&gt;
;http://tryruby.org/&lt;br /&gt;
:'' Test Ruby right in your browser''&lt;br /&gt;
&lt;br /&gt;
;http://ruby-doc.org/&lt;br /&gt;
:''a lot of ruby documentation with usefull links''&lt;br /&gt;
&lt;br /&gt;
= First Steps =&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World|Hello World]]&lt;br /&gt;
:''Start with some simple ruby programs using Qt''&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-19T23:02:18Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: insert code examples, code works&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|0}}|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic KDE 4 application to get a first impression.&lt;br /&gt;
&lt;br /&gt;
= Interactive Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :quit ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class CustomApplication &amp;lt; Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :doSomething&lt;br /&gt;
&lt;br /&gt;
  def doSomething&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = CustomApplication.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
Qt::Object.connect( w, SIGNAL( :clicked ), a, SLOT( :doSomething ) )&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Hello Ruby&amp;quot; ) do&lt;br /&gt;
  connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/First_Steps/Hello_World"/>
				<updated>2010-01-19T22:36:26Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add some code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|0}}|100%}}&lt;br /&gt;
&lt;br /&gt;
After all you should have a working ruby installation with KDE 4 bindings.&lt;br /&gt;
&lt;br /&gt;
So lets try the a very minimalistic KDE 4 application to get a first impression.&lt;br /&gt;
&lt;br /&gt;
= Interactive Hello Ruby =&lt;br /&gt;
&lt;br /&gt;
== Implementation Using Qt 4 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Click me to quit&amp;quot; ) do&lt;br /&gt;
  connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Click me to quit&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked ) do&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit&lt;br /&gt;
end&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require 'Qt4'&lt;br /&gt;
&lt;br /&gt;
class Qt::Application&lt;br /&gt;
&lt;br /&gt;
  slots :doSomething&lt;br /&gt;
&lt;br /&gt;
  def doSomething&lt;br /&gt;
    puts &amp;quot;Do something else&amp;quot;&lt;br /&gt;
    Qt::Application.instance.quit    &lt;br /&gt;
  end&lt;br /&gt;
  &lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Qt::Application.new ARGV&lt;br /&gt;
w = Qt::PushButton.new( &amp;quot;Click me to quit&amp;quot; )&lt;br /&gt;
w.connect( SIGNAL :clicked,  a, SLOT :doSomething)&lt;br /&gt;
w.show&lt;br /&gt;
a.exec&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_on_Linux</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_on_Linux"/>
				<updated>2010-01-19T22:05:32Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add next step and a note for gnome users&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation of Ruby|Installation of Ruby]]|&lt;br /&gt;
next=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/First Steps/Hello World|Hello World]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|30}}|100%}}&lt;br /&gt;
&lt;br /&gt;
In comparison to the installation process on [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Microsoft Windows]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Apple Mac OS]] you have to deal with the fact, that there are a lot of different Linux-based operating systems. So there are also different ways to setup your environment for kdebindings.&lt;br /&gt;
&lt;br /&gt;
After [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation of Ruby|installing and testing your Ruby installation]], you you should check before starting to install something if your [http://en.wikipedia.org/wiki/Linux_distribution  Linux distribution] has the bindings preinstalled.&lt;br /&gt;
&lt;br /&gt;
= Test Bindings Installation =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe the Qt/KDE bindings are already installed. For a quick check, enter &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; in a shell to start the interactive ruby shell. Try to load the bindings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require &amp;quot;Qt4&amp;quot;&lt;br /&gt;
=&amp;gt; true&lt;br /&gt;
require &amp;quot;korundum4&amp;quot;&lt;br /&gt;
=&amp;gt; true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can load bindings for KDE 4 (korundum4) or only Qt 4 by a &amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt;. Later you won't need to load Qt 4 first when using KDE 4, because on requiring KDE 4 everything needed is loaded automatically.&lt;br /&gt;
&lt;br /&gt;
If you got it so far you seem to have a working environment.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
There is always the possibility to install the bindings from source code, but it is recommended to use the existing binary packages.&lt;br /&gt;
&lt;br /&gt;
== Installation On Linux-based Systems ==&lt;br /&gt;
&lt;br /&gt;
After [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation of Ruby|installing Ruby]] you should know how to use your package manager.&lt;br /&gt;
&lt;br /&gt;
Install the package &amp;quot;ruby-kde4&amp;quot; or something like that. Be aware, that there maybe exist a package &amp;quot;ruby-kde&amp;quot;, which probably contain the old version of the bindings with KDE 3. Consider furthermore, that you will need a lot of KDE dependencies, if you are working on a GNOME desktop environment.&lt;br /&gt;
&lt;br /&gt;
== Installation On Mac OS ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Installation On Windows ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_of_Ruby</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation of Ruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_of_Ruby"/>
				<updated>2010-01-19T21:46:36Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add installation: general, openSUSE, ubuntu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
next=[[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux|Installation on Linux]], [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Installation on Mac OS]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|10}}|100%}}&lt;br /&gt;
&lt;br /&gt;
Before you can use the Qt/KDE bindings with Ruby, you have to install Ruby itself.&lt;br /&gt;
On the most linux-based systems, ruby should be installed already. So just check before installing it, if it is installed already. On Windows and Mac OS it isn't most likely preinstalled.&lt;br /&gt;
&lt;br /&gt;
= Test Installation Of Ruby =&lt;br /&gt;
&lt;br /&gt;
Start a shell and try to get the version of your ruby installation. In the case of a working ruby installation you get something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
&amp;gt; ruby -v&lt;br /&gt;
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In any other case you can proceed to install ruby and check afterwards the installation again.&lt;br /&gt;
&lt;br /&gt;
= Installation Of Ruby =&lt;br /&gt;
&lt;br /&gt;
General information are also provided by the [http://www.ruby-lang.org/ official ruby site] on their [http://www.ruby-lang.org/en/downloads/ download page].&lt;br /&gt;
&lt;br /&gt;
== Installation On Linux-based Systems ==&lt;br /&gt;
&lt;br /&gt;
The most linux packages delivers already configured binary packages of ruby that can be installed by the package manager of your distribution. This way is recommended. The installation from source code is possible, but not preferred, because the automatic installation of the bindings requires the binary package of ruby. The installation of ruby by source code should be not complicated, but installing the bindings manually requires advanced knowledge in different development tools.&lt;br /&gt;
&lt;br /&gt;
;Generic Installation&lt;br /&gt;
:Start you favorite distribution specific package manager and add a the package &amp;quot;ruby&amp;quot;. There may be some additional packages like &amp;quot;ruby-devel&amp;quot;, &amp;quot;ruby-doc&amp;quot;, etc. Maybe you want to install them to.&lt;br /&gt;
&lt;br /&gt;
;Installation on [http://opensuse.org openSUSE]&lt;br /&gt;
:Start YaST, open the module called something like &amp;quot;add/delete Software&amp;quot;, change to Installation Patterns and activate &amp;quot;Ruby Development&amp;quot;. Install the chosen packages.&lt;br /&gt;
&lt;br /&gt;
;Installation on [http://www.ubuntu.com/ Ubuntu]&lt;br /&gt;
:Follow the [https://help.ubuntu.com/community/SoftwareManagement specific ubuntu help] to install the ruby package.&lt;br /&gt;
&lt;br /&gt;
== Installation On Mac OS ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
== Installation On Windows ==&lt;br /&gt;
&lt;br /&gt;
TODO&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-19T21:11:33Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|2}}|100%}}&lt;br /&gt;
&lt;br /&gt;
= About Ruby Bindings =&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Future Plans =&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation Of Ruby ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation of Ruby|Installation of Ruby]]&lt;br /&gt;
:''setup ruby itself for end-user and developers''&lt;br /&gt;
&lt;br /&gt;
== Installation Of Bindings ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
= Introduction To Ruby Language =&lt;br /&gt;
Welcome Text&lt;br /&gt;
;[[/Ruby|Ruby]]&lt;br /&gt;
:''description''&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_on_Linux</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Linux</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book/Installation/Installation_on_Linux"/>
				<updated>2010-01-19T21:07:30Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: Created page with '{{Box|Status Of Writing| 40px{{Progress bar|10}}|100%}}  In comparison to the installation process on [[Development/Languages/Ruby/Ruby-Qt/K...'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Box|Status Of Writing|&lt;br /&gt;
[[Image:Action_pen.svg|noframe|left|40px]]{{Progress bar|10}}|100%}}&lt;br /&gt;
&lt;br /&gt;
In comparison to the installation process on [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Windows|Microsoft Windows]] or [[Development/Languages/Ruby/Ruby-Qt/KDE Book/Installation/Installation on Mac OS|Apple Mac OS]] you have to deal with the fact, that there are a lot of different Linux-based operating systems. So there are also different ways to setup your environment for kdebindings.&lt;br /&gt;
&lt;br /&gt;
First you should check before starting to install something if your [http://en.wikipedia.org/wiki/Linux_distribution  Linux distribution] has ruby and/or the bindings preinstalled.&lt;br /&gt;
&lt;br /&gt;
= Test Installation =&lt;br /&gt;
&lt;br /&gt;
Start a shell on your Linux system and type and try to get the version of your ruby installation. In the case of a working ruby installation you get something like this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code bash&amp;gt;&lt;br /&gt;
&amp;gt; ruby -v&lt;br /&gt;
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Maybe the Qt/KDE bindings are installed, too. For a quick check, enter &amp;lt;tt&amp;gt;irb&amp;lt;/tt&amp;gt; in a shell to start the interactive ruby-shell. Try to load the bindings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code ruby&amp;gt;&lt;br /&gt;
require &amp;quot;Qt4&amp;quot;&lt;br /&gt;
=&amp;gt; true&lt;br /&gt;
require &amp;quot;korundum4&amp;quot;&lt;br /&gt;
=&amp;gt; true&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can load bindings for KDE4 (korundum4) or only Qt4 by a &amp;lt;tt&amp;gt;require&amp;lt;/tt&amp;gt;. Later you won't need to load Qt4 first when using KDE4, because on requiring KDE4 everything needed is loaded automatically.&lt;br /&gt;
&lt;br /&gt;
If you got it so far you seems to have a working environment.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
&lt;br /&gt;
== Installation of ruby ==&lt;br /&gt;
&lt;br /&gt;
If you haven't ruby installed, you have two different ways to get it.&lt;br /&gt;
&lt;br /&gt;
# using the distribution package manager to install ruby automatically&lt;br /&gt;
# install ruby manually from source.&lt;br /&gt;
&lt;br /&gt;
I recommend the first way.&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-19T19:07:36Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{note|This book is work in progress. Don't hesitate to contribute!}}&lt;br /&gt;
&lt;br /&gt;
== About Ruby Bindings ==&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future Plans ==&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on [http://en.wikipedia.org/wiki/Linux Linux]-based systems''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple [http://en.wikipedia.org/wiki/Mac_OS Mac OS]''&lt;br /&gt;
&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft [http://en.wikipedia.org/wiki/Windows Windows]''&lt;br /&gt;
&lt;br /&gt;
== Introduction To Ruby Language ==&lt;br /&gt;
Welcome Text&lt;br /&gt;
;[[/Ruby|Ruby]]&lt;br /&gt;
:''description''&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-19T19:05:27Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: add future plans and links to installation on ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{note|This book is work in progress. Don't hesitate to contribute!}}&lt;br /&gt;
&lt;br /&gt;
== About Ruby Bindings ==&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future Plans ==&lt;br /&gt;
After creating a minimum of content the wiki pages will be copied into a&lt;br /&gt;
book made with [http://en.wikipedia.org/wiki/LaTeX LaTeX] for people prefering&lt;br /&gt;
to work with a printed version of this set of tutorials. Afterwards the book&lt;br /&gt;
should be synchronized with the wiki maybe every half year.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Installation on [http://en.wikipedia.org/wiki/Linux Linux]&lt;br /&gt;
;[[/Installation/Installation on Linux|Installation on Linux]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on linux-based systems''&lt;br /&gt;
&lt;br /&gt;
Installation on [http://en.wikipedia.org/wiki/Mac_OS Mac OS]&lt;br /&gt;
;[[/Installation/Installation on Mac OS|Installation on Mac OS]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Apple Mac OS''&lt;br /&gt;
&lt;br /&gt;
Installation on [http://en.wikipedia.org/wiki/Windows Windows]&lt;br /&gt;
;[[/Installation/Installation on Windows|Installation on Windows]]&lt;br /&gt;
:''setup ruby bindings for end-user and developers on Microsoft Windows''&lt;br /&gt;
&lt;br /&gt;
== Introduction To Ruby Language ==&lt;br /&gt;
Welcome Text&lt;br /&gt;
;[[/Ruby|Ruby]]&lt;br /&gt;
:''description''&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-19T18:55:55Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{note|This book is work in progress. Don't hesitate to contribute!}}&lt;br /&gt;
&lt;br /&gt;
== About Ruby Bindings ==&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5]. In: his [http://www.kdedevelopers.org/blog/89 blog] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future Plans ==&lt;br /&gt;
plans&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
== Introduction To Ruby Language ==&lt;br /&gt;
Welcome Text&lt;br /&gt;
;[[/Ruby|Ruby]]&lt;br /&gt;
:''description''&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book</id>
		<title>Development/Languages/Ruby/Ruby-Qt/KDE Book</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Languages/Ruby/Ruby-Qt/KDE_Book"/>
				<updated>2010-01-19T18:45:58Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: about ruby bindings&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Languages/Ruby/Ruby-Qt/KDE_Book}}&lt;br /&gt;
&lt;br /&gt;
{{TutorialBrowser|&lt;br /&gt;
series=Ruby|&lt;br /&gt;
name=Ruby-Qt/KDE Book|&lt;br /&gt;
pre=basic level of ruby skills&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{note|This book is work in progress. Don't hesitate to contribute!}}&lt;br /&gt;
&lt;br /&gt;
== About Ruby Bindings ==&lt;br /&gt;
Through the engagement of only a few guys the project [http://rubyforge.org/projects/korundum/ Korundum] on [http://rubyforge.org Rubyforge] was raised,&lt;br /&gt;
which allowed to use the famous [http://en.wikipedia.org/wiki/Qt_(toolkit) Qt toolkit] within the [[http://ruby-lang.org ruby language]]. The bindings were were ported to allow the use of Qt4 and KDE4. After years of development this&lt;br /&gt;
bindings can be considered as stable for production usage.&lt;br /&gt;
&amp;lt;ref name=&amp;quot;kdebindings_stable01&amp;quot;&amp;gt;Richard Dale: [http://www.kdedevelopers.org/node/4146 KDE Bindings in KDE 4.5].,  In: his [[http://www.kdedevelopers.org/blog/89 blog]] (January 2010).&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Future Plans ==&lt;br /&gt;
plans&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
== Introduction To Ruby Language ==&lt;br /&gt;
Welcome Text&lt;br /&gt;
;[[/Ruby|Ruby]]&lt;br /&gt;
:''description''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:KDE4]]&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/Development/Tutorials</id>
		<title>Development/Tutorials</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/Development/Tutorials"/>
				<updated>2010-01-19T18:17:56Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: added ruby-qt/kde book to Ruby section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials}}&lt;br /&gt;
&lt;br /&gt;
Tutorials are the fastest way of finding out what KDE will do for you, and how to do it. Here is a list of currently available tutorials '''for KDE4'''. Material for KDE3 and KDE2 is available on the bottom of this page.&lt;br /&gt;
&lt;br /&gt;
== Introduction To KDE 4 Programming ==&lt;br /&gt;
Are you interested in writing applications with KDE 4? This tutorial series is aimed at those completely new to KDE programming.&lt;br /&gt;
;[[Development/Tutorials/First program|Hello World]]&lt;br /&gt;
:''A preliminary introduction to the very basics of KDE4 programming''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Using KXmlGuiWindow|Creating the Main Window]]&lt;br /&gt;
:''This tutorial shows you the magic of an application's most important thing: The main window.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Using KActions|Using KActions]]&lt;br /&gt;
:''How to add actions to the menus and toolbars.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Saving and loading|Saving and Loading]]&lt;br /&gt;
:''Introduces the KIO library while adding loading and saving support to our application.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/KCmdLineArgs|Command line arguments]]&lt;br /&gt;
:''Adds the ability to specify which file to open from the command line to our text editor.''&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
;[[Development/Tutorials/KDE4 Porting Guide|Porting Your Application]]&lt;br /&gt;
:''Help Porting Applications from Qt3/KDE3 to Qt4/KDE4''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/CMake|Introduction to CMake]]&lt;br /&gt;
:''How to use the CMake build system used by KDE4.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Common Programming Mistakes|Common Programming Mistakes]]&lt;br /&gt;
:''Various common mistakes made while developing Qt and KDE applications and how to avoid them.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Using Qt Designer|Using Qt Designer to build user interfaces]]&lt;br /&gt;
:''How to create UI files with designer, and how to integrate them into a KDE program.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Creating Libraries|Creating Libraries to share code]]&lt;br /&gt;
:''How to add the library to the buildsystem and how to prepare the source code.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Session_Management|Session Management]]&lt;br /&gt;
:''Make your application aware of X sessions''&lt;br /&gt;
&lt;br /&gt;
== Testing And Debugging ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Debugging|Debugging your application]]&lt;br /&gt;
:''Tips, tools and techniques to apply when debugging your KDE application''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Unittests|Writing Unittests for Qt4 and KDE4 with QTestLib]] ([http://developer.kde.org/documentation/tutorials/writingunittests/writingunittests.html Original link])&lt;br /&gt;
:''Tutorial by [mailto:bradh@frogmouth.net Brad Hards] that describes how to write unit tests using the QTestLib framework. It is presented as an example based tutorial, and is still under development.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Code_Checking|Semi-automatic ways to detect code errors]]&lt;br /&gt;
:''Techniques you can use to detect errors in KDE code''&lt;br /&gt;
&lt;br /&gt;
== Managing Configuration Data With KConfig ==&lt;br /&gt;
;[[Development/Tutorials/KConfig|Introduction To KConfig]]&lt;br /&gt;
:''An overview of the KConfig classes and how to use them in your application code''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Using KConfig XT|Using KConfig XT]]&lt;br /&gt;
:''Tutorial on how to efficiently use the KConfig XT framework.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Updating KConfig Files|Updating KConfig Files]]&lt;br /&gt;
:''Tutorial on how to write an update script to keep changes in your application's config file format in sync with the user's already existing config file''&lt;br /&gt;
&lt;br /&gt;
== Services: Applications and Plugins ==&lt;br /&gt;
;[[Development/Tutorials/Services/Introduction|Introduction to the Services Framework]]&lt;br /&gt;
:''An overview of the services framework in KDE and what it provides the application developer. Covers the system configuration cache (SyCoCa), the source data files and what the indexed information can be used for.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Services/Traders|Finding Services Using Trader Queries]]&lt;br /&gt;
:''How to find services, such as plugins or mimetypes, that are indexed in the SyCoCa using Trader Query Syntax''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Services/Plugins|Creating and Loading Plugins Using KService]]&lt;br /&gt;
:''Learn how to define custom plugin types, find installed plugins (including 3rd party plugins) and load them in an easy and portable fashion using KService.''&lt;br /&gt;
&lt;br /&gt;
== Localization ==&lt;br /&gt;
See also [[Localization|Localization portal]].&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Localization/Unicode|Introduction To Unicode]]&lt;br /&gt;
:''An introduction to what Unicode is as well as how to handle Unicode data in KDE applications.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n|Writing Applications With Localization In Mind]]&lt;br /&gt;
:''This tutorial covers what localization is, why it's important and how to ensure your application is ready to be localized. A must read for all application developers.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n Mistakes|Avoiding Common Localization Pitfalls]]&lt;br /&gt;
:''There are several common mistakes that prevent applications from being properly localized. Find out what they are and how to easily avoid them in this tutorial.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/Building KDE's l10n Module|Building KDE's Localization Module]]&lt;br /&gt;
:''Building and installing language support from KDE's localization (l10n) module is a good idea for those working on applications in the main KDE repository. Doing so will allow you to test your application in another language and spot problem areas. Learn how to do just that in this tutorial.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n Build Systems|Incorporating i18n Into the Build System]]&lt;br /&gt;
:''Once your application is ready to be localized, the next step is to ensure that translation files are built automatically and kept up to date. This tutorial covers the necessary CMakeFiles.txt additions as well the process of distributing the resulting message catalogs with your application.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n Challenges|Common i18n Challenges and Solutions]]&lt;br /&gt;
:''This tutorial covers challenges that you may eventually run into such as translating handbooks and other data that exists outside of the source code, merging and handling obsolete .po files, dealing with freezes, coding in languages other than English and creating independent releases of or moving applications between KDE modules.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n_Semantics|Semantic Markup of Messages]]&lt;br /&gt;
:''To ensure consistent presentation and more meaningful representations of messages in applications, semantic markup can be applied to messages marked for translation using the KUIT system. This tutorial describes how this system works.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Localization/i18n Krazy|Automated i18n Code Checking]]&lt;br /&gt;
:''The Krazy code checker scans KDE's code and reports common i18n mistakes.''&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/API_Documentation|API Documentation]]&lt;br /&gt;
:''This tutorial explains how to document your APIs properly.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Man_Pages|Man Pages]]&lt;br /&gt;
:''Writing and Generating Reference Manual Pages.''&lt;br /&gt;
&lt;br /&gt;
== Application Automation and Scripting ==&lt;br /&gt;
&lt;br /&gt;
=== D-Bus ===&lt;br /&gt;
; [[Development/Tutorials/D-Bus/Introduction|Introduction to D-Bus]]&lt;br /&gt;
:''A straight-forward introduction to the core concepts in D-Bus from an application developer's perspective, this tutorial covers what D-Bus is and how it can be used by applications.''&lt;br /&gt;
; [[Development/Tutorials/D-Bus/Accessing Interfaces|Accessing D-Bus Interfaces]]&lt;br /&gt;
:''A step-by-step guide to calling D-Bus methods and connecting to D-Bus signals using QtDBus.''&lt;br /&gt;
; [[Development/Tutorials/D-Bus/Intermediate_D-Bus|Intermediate D-Bus]]&lt;br /&gt;
:''Tips to make use of QtDBus when faced with problematic real-world interfaces.''&lt;br /&gt;
; [[Development/Tutorials/D-Bus/Creating Interfaces|Creating D-Bus Interfaces]]&lt;br /&gt;
:''Learn how to expose functionality in your application by creating and using custom D-Bus interfaces. Covers generating the XML descriptions, instantiating interfaces at run time and setting up the build system with CMake.''&lt;br /&gt;
; [[Development/Tutorials/D-Bus/Autostart Services|D-Bus Autostart Services]]&lt;br /&gt;
:''Turn your application into a D-Bus autostart service with this tutorial. This D-Bus feature, also known as &amp;quot;D-Bus service activation&amp;quot;, will ensure that even when your application isn't running that D-Bus calls made to it will work by relying on the D-Bus daemon itself to start your app if and when needed.''&lt;br /&gt;
; [[Development/Tutorials/Porting_to_D-Bus|Porting from DCOP to D-Bus]]&lt;br /&gt;
: ''Port your applications from DCOP to D-Bus with this handy guide.''&lt;br /&gt;
&lt;br /&gt;
=== Konqueror ===&lt;br /&gt;
; [[Development/Tutorials/Creating Konqueror Service Menus|Creating Konqueror Service Menus]]&lt;br /&gt;
:''This tutorial shows you how to create mimetype-specific actions in Konqueror's context menu (aka &amp;quot;servicemenus&amp;quot;).''&lt;br /&gt;
&lt;br /&gt;
=== Kross ===&lt;br /&gt;
; [[Development/Tutorials/Kross/Introduction|Introduction to Kross]]&lt;br /&gt;
:''An introduction to the Kross Scripting Framework.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Kross/Hello_World|Hello World]]&lt;br /&gt;
:''A first application with working kross code.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Kross/Call_Functions_in_Kross|Calling Functions in Kross]]&lt;br /&gt;
:''Simple demonstration of calling scripting functions''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Kross/Connecting_Signals_and_slots_in_Kross|Connecting Signals and Slots in Kross]]&lt;br /&gt;
:''Simple demonstration of connecting object signals with script slots''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Kross/Scripts-as-Plugins|Scripts as Plugins with Kross]]&lt;br /&gt;
:''This tutorial provides a step-by-step introduction how to integrate scripts as plugins into a KDE application.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Kross/Script-Actions|Placing script actions in your application menus ]]&lt;br /&gt;
:''Simple demonstration on how to extend you application menus to execute script files.''&lt;br /&gt;
&lt;br /&gt;
{{:KOffice/Plugin Tutorials}}&lt;br /&gt;
&lt;br /&gt;
=== SuperKaramba ===&lt;br /&gt;
; [[Development/Tutorials/SuperKaramba|SuperKaramba Tutorial]]&lt;br /&gt;
:''This tutorial provides an overview of SuperKaramba, theme files and scripting with Python, Ruby and JavaScript.''&lt;br /&gt;
&lt;br /&gt;
=== System Activity ===&lt;br /&gt;
&lt;br /&gt;
: [[Development/Tutorials/SystemActivity/Scripting|Writing script actions for the process's context menu]]&lt;br /&gt;
:''This tutorial shows how to add a context menu action to show custom information about a process.&lt;br /&gt;
&lt;br /&gt;
== Plugins and KParts ==&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Writing kontact plugins|Writing kontact plugins]]:''Kontact plugins are KParts. This tutorial describes how you can write one.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Using KParts|Using KParts]]:''Learn how to load a KPart into an application window.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Writing Qt Designer Plugins|Writing Qt Designer Plugins]]:''Add your widgets to Qt Designer and thus make them usable in UI files.''&lt;br /&gt;
&lt;br /&gt;
== Search and Metadata ==&lt;br /&gt;
&lt;br /&gt;
=== Strigi ===&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Writing file analyzers|Writing file analyzers]]&lt;br /&gt;
:''File analyzers extract data from files to display in the file dialogs and file managers. The data gathered this way is also used to search for files. KDE4 allows the use of multiple analyzers per file type. This tutorial describes how you can write new analyzers.''&lt;br /&gt;
&lt;br /&gt;
=== [http://nepomuk.kde.org Nepomuk] ===&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/Quickstart|Nepomuk Quickstart]]&lt;br /&gt;
:''How to use Nepomuk resources in a quick and painless way without much fuss.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/RDFIntroduction|RDF and Ontologies in Nepomuk]]&lt;br /&gt;
:''An introduction to RDF and the usage of ontologies in Nepomuk.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/DataLayout|Data Layout in Nepomuk]]&lt;br /&gt;
:''An overview of which and how data is stored in Nepomuk.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/Resources|Handling Resources with Nepomuk]]&lt;br /&gt;
:''Nepomuk is the KDE library which provides easy access to metadata in the Nepomuk system. Learn how to make your application create and read metadata using the Nepomuk system.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/ResourceGenerator|Using the Nepomuk Resource Generator]]&lt;br /&gt;
:''Nepomuk includes a resource generator which creates convenience classes for handling metadata.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/NepomukQuery|Using the Nepomuk Query API]]&lt;br /&gt;
:''Starting with KDE 4.4 Nepomuk provides a desktop query API.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/AdvancedQueries|Advanced Queries]]&lt;br /&gt;
:''The real power of Nepomuk can only be exposed when performing fancy queries on the data repository. This tutorial provides an introduction to semantic and full text queries in Nepomuk.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/NepomukServer|The Nepomuk Server and the Architecture of the Nepomuk subsystem]]&lt;br /&gt;
:''The Nepomuk Server hosts the main Nepomuk data repository and can be accessed directly via a Soprano API.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/NepomukServices|Nepomuk Services]]&lt;br /&gt;
:''The Nepomuk Server manages a set of Nepomuk services.''&lt;br /&gt;
:* [[Development/Tutorials/Metadata/Nepomuk/StorageService|Storage Service]] ''The probably most important service hosts the Nepomuk data repository using [http://soprano.sourceforge.net Soprano].''&lt;br /&gt;
:* [[Development/Tutorials/Metadata/Nepomuk/OntologyLoaderService|Ontology Loader]] ''Makes sure installed ontologies such as RDF, RDFS, NRL, or Xesam are loaded into the storage repository.''&lt;br /&gt;
:* [[Development/Tutorials/Metadata/Nepomuk/FileWatchService|File Watch Service]] ''Monitors the file system for changes and updates the file resource paths and URIs in Nepomuk.''&lt;br /&gt;
:* [[Development/Tutorials/Metadata/Nepomuk/StrigiService|Strigi Service]] ''Controls Strigi, the file indexing tool which extracts metadata from files and stores it into the storage repository.''&lt;br /&gt;
:* [[Development/Tutorials/Metadata/Nepomuk/QueryService|Query Service]] ''Provides persistant query folders.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Metadata/Nepomuk/TipsAndTricks|Nepomuk Tips and Tricks]]&lt;br /&gt;
:''A set of tips and tricks for development with Nepomuk and Soprano. This is a must-read if you intend to use Nepomuk in your application or hack on it directly.''&lt;br /&gt;
&lt;br /&gt;
== Hardware Awareness (Solid) ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Solid_Tutorials|Introduction to Solid]]&lt;br /&gt;
:''An introduction to using the Solid hardware discovery and interaction system in KDE applications.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Solid_Network_Tutorial|Accessing Network Information]]&lt;br /&gt;
:''How to use the Solid system to get information about the network''&lt;br /&gt;
&lt;br /&gt;
== Privileged Applications (PolicyKit) ==&lt;br /&gt;
; [[Development/Tutorials/PolicyKit/Introduction|Introduction to PolicyKit]]&lt;br /&gt;
:''A straight-forward introduction to what PolicyKit is, and how it can be useful for your next application requiring super-user privileges or user authentication''&lt;br /&gt;
; [[Development/Tutorials/PolicyKit/Helper_HowTo|Using the caller-helper model to perform actions as root]]&lt;br /&gt;
:''This tutorial will teach you how to get your application to perform some actions as root in a completely safe and easy manner, if the user is authorized to, by using PolicyKit and the caller-helper technique''&lt;br /&gt;
; [[Development/Tutorials/PolicyKit/KCM_HowTo|Getting root privileges in KCM Modules]]&lt;br /&gt;
:''This tutorial will teach you how to create KCModules able to save settings as root''&lt;br /&gt;
&lt;br /&gt;
== Multimedia (Phonon) ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Phonon/Introduction|Phonon]]&lt;br /&gt;
:''How to start with the multimedia API''&lt;br /&gt;
&lt;br /&gt;
:''How to compile and use Phonon and its GStreamer backend on Linux using Qt 4.3.x''&lt;br /&gt;
::''This article gives you a quick brief of how you can use checkout, compile Phonon and its GStreamer backend on GNU/Linux with just Qt 4.3.x. Towards the end, the article also describes how a developer can make use of Phonon to create simple audio and video players. You can read the article [http://www.vcreatelogic.com/oss/docs/CompilingPhononOnLinux.pdf here]. You can download the editable OpenDocumentText file from [http://www.prashanthudupa.com/phonon/CompilingPhononOnLinux.odt here].''&lt;br /&gt;
&lt;br /&gt;
== Plasma ==&lt;br /&gt;
&lt;br /&gt;
See [[Development/Tutorials/Plasma|Plasma tutorials]].&lt;br /&gt;
&lt;br /&gt;
== Communication (Decibel) ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Decibel/GettingStarted|Getting started with Decibel]]&lt;br /&gt;
:''This tutorial describes how to set up Decibel.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Decibel/Handling_TextChannels|Handling TextChannels]]&lt;br /&gt;
:''This tutorial introduces the basics of handling incoming TextChannels by guiding you through building a simple text chat application.''&lt;br /&gt;
&lt;br /&gt;
== Personal Information Management (Akonadi) ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Akonadi/Application|Using Akonadi in Applications]]&lt;br /&gt;
:''Displaying and modifying data provided by Akonadi''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Akonadi/Resources|Developing Akonadi Resources]]&lt;br /&gt;
:''Akonadi Resources are agent programs which transport PIM data between Akonadi and a backend (files, servers, etc)''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Akonadi/SerializerPlugin|Using custom data types with Akonadi]]&lt;br /&gt;
:''Akonadi can handle arbitrary data as item payloads through the use of a plugin based serialization framework''&lt;br /&gt;
&lt;br /&gt;
== Kate / Kwrite ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Kate/KTextEditor Plugins|Getting started with KTextEditor plugins]]&lt;br /&gt;
:''Creating your first KTextEditor plugin''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Kate/KTextEditor_Plugins_Advanced|Developing a plugin with configuration dialog]]&lt;br /&gt;
:''Adding a configuration dialog to the Time &amp;amp; Date example''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Kate/KTextEditor_Example|A small Editor]]&lt;br /&gt;
:''Create a small application using KTextEditor''&lt;br /&gt;
&lt;br /&gt;
== KDevelop ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/KDevelop-PG-Qt_Introduction|KDevelop-PG-Qt Introduction]]&lt;br /&gt;
:''Information on the KDevelop parser generator, useful for language plugins.''&lt;br /&gt;
&lt;br /&gt;
==Printing==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Printing Hello World|Hello World]]&lt;br /&gt;
:''Introduction to the KDE printing system''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Printing Print Dialog|Print Dialog]]&lt;br /&gt;
:''Using the KDE print dialog''&lt;br /&gt;
&lt;br /&gt;
== kioslaves ==&lt;br /&gt;
* [[Development/Tutorials/KIO Slaves/Using KIO Slaves in your Program|Using kioslaves in your Program]]&lt;br /&gt;
* [[Development/Tutorials/KIO Slaves/Hello World|Creating a Hello-World kioslave]]&lt;br /&gt;
&lt;br /&gt;
== Collaboration ==&lt;br /&gt;
&lt;br /&gt;
=== Open Collaboration Services (libattica) ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Collaboration/Attica/Introduction|Introduction to Attica]]&lt;br /&gt;
:''In this tutorial a simple widget showing information about a Person on the server is created.''&lt;br /&gt;
&lt;br /&gt;
=== Get Hot New Stuff  ===&lt;br /&gt;
;[[Development/Tutorials/Collaboration/HotNewStuff/Introduction|Get Hot New Stuff 3]] &lt;br /&gt;
:''How to use KHotNewStuff3 in your application.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/K Hot New Stuff2|Introduction to Get Hot New Stuff 2]] &lt;br /&gt;
:''A short tutorial about how to use KHotNewStuff2 in your application. Deprecated, use version 3''&lt;br /&gt;
&lt;br /&gt;
*old links for KNS1 content:&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Introduction to Get Hot New Stuff|Introduction to Get Hot New Stuff]] &lt;br /&gt;
:''An introduction to the developer-friendly network update system that allows KDE applications to fetch new application data at runtime in a user friendly manner.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/KNewStuffSecure|KNewStuff Secure]] ([http://developer.kde.org/documentation/tutorials/knewstuffsecure/index.html Original Link]) &lt;br /&gt;
:''Tutorial showing how to share resources in a secured way (KDE 3.4 and later).'' By András Mantia &amp;amp;lt;amantia@kde.org&amp;amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Goya ==&lt;br /&gt;
; [[Development/Tutorials/Introduction to Goya usage|Introduction to Goya usage]]&lt;br /&gt;
:''An introduction for the Goya subsystem usage, which allows you to easily add widgets to your itemviews and connect their signals to your code, as they were real widgets.''&lt;br /&gt;
&lt;br /&gt;
; [[Development/Tutorials/Introduction to Goya usage 2|Introduction to Goya usage (part 2)]]&lt;br /&gt;
:''The second part of the tutorial, with a slightly more complex example than the first part.''&lt;br /&gt;
&lt;br /&gt;
== Other programming languages ==&lt;br /&gt;
&lt;br /&gt;
=== Python ===&lt;br /&gt;
&lt;br /&gt;
;[http://www.learningpython.com/2008/09/20/an-introduction-to-pyqt/ An Introduction to PyQt]&lt;br /&gt;
:''Starting off''&lt;br /&gt;
&lt;br /&gt;
;[http://lateral.netmanagers.com.ar/stories/BBS47.html PyQt by Example]&lt;br /&gt;
:''Another introduction to PyQt''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Python/PyKDE_WebKit_Tutorial|PyKDE WebKit Tutorial]]&lt;br /&gt;
:''A simple web browser application in PyKDE''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Python introduction to signals and slots|101 Introduction to signals and slots]]&lt;br /&gt;
:''A simple introduction to Qt's signal and slot architecture.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Python/PyKDE_DBus_Tutorial|PyKDE DBus Tutorial]]&lt;br /&gt;
:''An introduction to DBus communication using PyKDE''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&lt;br /&gt;
;[http://developer.kde.org/language-bindings/ruby/kde3tutorial/index.html KDE Ruby Korundum tutorial]&lt;br /&gt;
:''A ruby version of Antonio Larrosa Jim&amp;amp;eacute;nez's KDE tutorial by Richard Dale. See the [http://developer.kde.org/language-bindings/ruby/index.html Ruby Developers Corner] for Qt tutorials and other info.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Qt4_Ruby_Tutorial|Qt4 Ruby Tutorial]]&lt;br /&gt;
:''Nokia's fabulous introductory tutorial to Qt, translated to Ruby.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Plasma/RubyApplet|Creating a Plasma Widget in Ruby]]&lt;br /&gt;
:''Tutorial that shows how to create your first Plasma Applet using the Ruby language.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Developing_Qt4_Applications_using_Qt_Designer_and_Ruby_on_Kubuntu|Developing Qt4 Applications using Qt Designer and Ruby on Kubuntu]]&lt;br /&gt;
:''Tutorial that shows how to design a simple User Interface in Qt Designer and then use the resulting widget in a Qt Ruby application we build from scratch.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Languages/Ruby/Ruby-Qt/KDE_Book|Ruby-Qt/KDE Book]]&lt;br /&gt;
:''There is also an approach to create an Ruby-Qt/KDE Book under a free license. The content will be created in this wiki.''&lt;br /&gt;
&lt;br /&gt;
=== Shell ===&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Shell_Scripting_with_KDE_Dialogs|Shell Scripting with KDE dialogs]] ([http://developer.kde.org/documentation/tutorials/kdialog/t1.html Original Link]) &lt;br /&gt;
:''Tutorial by [mailto:bradh@frogmouth.net Brad Hards] that describes how to use KDE dialogs in shell scripts with kdialog. It is presented as an example based tutorial.''&lt;br /&gt;
&lt;br /&gt;
== Graphics Programming ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/Graphics/Performance|QPainter Perfomance]]&lt;br /&gt;
:''Hints on avoiding common mistakes leading to poor performance when using QPainter''&lt;br /&gt;
&lt;br /&gt;
== Using the KDE Games Libraries ==&lt;br /&gt;
;[[Development/Tutorials/Games/KStandardGameAction| KStandardGameAction]]&lt;br /&gt;
:''Using libkdegames to make your game fit the kdegames standard''&lt;br /&gt;
;[[Development/Tutorials/Games/Highscores| Highscores]]&lt;br /&gt;
:''Implementing a simple highscore table into your game''&lt;br /&gt;
;[[Development/Tutorials/Games/Theme Selector| Theme Selector]]&lt;br /&gt;
:''Using the libkdegames theme selection dialog''&lt;br /&gt;
;[[Development/Tutorials/Games/Palapeli Patterns| Palapeli Slicers]]&lt;br /&gt;
:''Creating a slicer plugin for Palapeli''&lt;br /&gt;
&lt;br /&gt;
=== KGLEngine ===&lt;br /&gt;
;[[Development/Tutorials/Games/kglengine/kglengine-simpleBox| installation and your first KGLItem]]&lt;br /&gt;
:''start your first kglengine application''&lt;br /&gt;
;[[Development/Tutorials/Games/KGLEngine2d| kglpong]]&lt;br /&gt;
:''Now use our knowledge to make a pong''&lt;br /&gt;
&lt;br /&gt;
=== KALEngine ===&lt;br /&gt;
;[[Development/Tutorials/Games/KALEngine| Play hello word sound]]&lt;br /&gt;
:''Using KALEngine for games sound development using openAL''&lt;br /&gt;
;[[Development/Tutorials/Games/KALEngine-music| Play music]]&lt;br /&gt;
:''Using KALEngine to play music in a stream''&lt;br /&gt;
&lt;br /&gt;
== Using the KDE PIM Libraries ==&lt;br /&gt;
;[[Development/Tutorials/PIM/ical| iCalendar functionality]]&lt;br /&gt;
:''Using kcal to manage iCalendar files''&lt;br /&gt;
&lt;br /&gt;
== Other tutorials ==&lt;br /&gt;
&lt;br /&gt;
=== 2D Plotting (KPlotWidget) ===&lt;br /&gt;
;[[Development/Tutorials/KPlotWidget|Using the KDE data-plotting widget]]&lt;br /&gt;
:''This tutorial introduces KPlotWidget, which is used for 2-D data plotting.  It includes information on simple usage of the widget (including adding and modifying data sets, and customizing the plot axes and labels), and advanced customization (including extending the widget through sub-classing).''&lt;br /&gt;
&lt;br /&gt;
=== Spelling and Grammar Checking (Sonnet) ===&lt;br /&gt;
;[[Development/Tutorials/Sonnet/SonnetTutorial|Adding spell-checking or grammar-checking to KDE applications]]&lt;br /&gt;
:''This tutorial introduces Sonnet and how one may use it to add language correction to your KDE application. Sonnet's auxiliary features shall be described in a separate tutorial.''&lt;br /&gt;
&lt;br /&gt;
=== Pixmap cache (KPixmapCache) ===&lt;br /&gt;
;[[Development/Tutorials/KPixmapCache|Using the KDE pixmap cache]]&lt;br /&gt;
:''This tutorial shows how to use KPixmapCache to cache e.g. pixmaps generated from SVGs or some data.''&lt;br /&gt;
&lt;br /&gt;
=== Using MarbleWidget (Marble) ===&lt;br /&gt;
;[[Development/Tutorials/MarbleWidget|Using MarbleWidget]]&lt;br /&gt;
:''This short tutorial describes how to use the MarbleWidget in your project''&lt;br /&gt;
&lt;br /&gt;
=== Using local SCM for KDE development ===&lt;br /&gt;
;[[Development/Tutorials/Git|Using Git to develop for KDE]]&lt;br /&gt;
:''This tutorial shows how to use Git to develop for KDE''&lt;br /&gt;
&lt;br /&gt;
=== Kwin effect tutorial (blog) ===&lt;br /&gt;
;[http://blog.martin-graesslin.com/blog/?p=258 blog by Martin Graesslin]&lt;br /&gt;
:''This tutorial guides you through the development of a simple KWin effect''&lt;br /&gt;
&lt;br /&gt;
=== Implementing KSysGuard sensors and adding them ===&lt;br /&gt;
;[[Development/Tutorials/Sensors]]&lt;br /&gt;
:''This tutorial shows how to write and KSysGuard sensor and connect it to the systray.''&lt;br /&gt;
Runners&lt;br /&gt;
== KDE2 and KDE3 Materials ==&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/KDE3|KDE3 Tutorials]]&lt;br /&gt;
:''These tutorials cover topics related to KDE3.''&lt;br /&gt;
&lt;br /&gt;
;[[Development/Tutorials/KDE2|KDE2 Tutorials]]&lt;br /&gt;
:''These tutorials cover topics related to KDE2.''&lt;br /&gt;
&lt;br /&gt;
[[Category:KDE4]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby</id>
		<title>User:Robert Riemann/Drafts/Build qtruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby"/>
				<updated>2009-07-30T11:30:14Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|User:Robert_Riemann/Drafts/Build_qtruby}}&lt;br /&gt;
{{improve}}&lt;br /&gt;
&lt;br /&gt;
== Get Sources ==&lt;br /&gt;
&lt;br /&gt;
Before starting, the recent sources have to be downloaded.&lt;br /&gt;
The following command will download some important cmake files and, of course, the kdebindings.&lt;br /&gt;
&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/cmake/modules&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Now all files (not folders) from ./modules have to be placed in ./kdebindings/cmake/modules&lt;br /&gt;
&lt;br /&gt;
You will find in ./kdebindings a file called CMakeLists.txt.qtruby - copy that file to CMakeLists.txt. You will overwrite a file to do it, but that doesn't matters.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Now create a directory build next to kdebindings. You will find the following commands in the beginning of the CMakeLists.txt.qtruby file.&lt;br /&gt;
&lt;br /&gt;
I copied the cmake command from there, but deleted the lines DRUBY_EXECUTABLE and DRUBY_INCLUDE_PATH&lt;br /&gt;
&lt;br /&gt;
To get the qtruby build with ruby v1.9 I have had to make sure that the command which ruby finds the right file version. Maybe you need to create a symbolic link or modify your PATH variable.&lt;br /&gt;
&lt;br /&gt;
Perhaps there is also a simpler way.&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to install some devel packages additionally to meet the dependencies.&lt;br /&gt;
&lt;br /&gt;
With opensuse it can be done with:&lt;br /&gt;
&lt;br /&gt;
 su # become root&lt;br /&gt;
 zypper in libqimageblitz-devel libkde4-devel #i install packages&lt;br /&gt;
&lt;br /&gt;
When cmake quits without errors you can proceed with make and make install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby</id>
		<title>User:Robert Riemann/Drafts/Build qtruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby"/>
				<updated>2009-07-28T20:39:38Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials}}&lt;br /&gt;
{{improve}}&lt;br /&gt;
&lt;br /&gt;
== Get Sources ==&lt;br /&gt;
&lt;br /&gt;
Before starting, the recent sources have to be downloaded.&lt;br /&gt;
The following command will download some important cmake files and, of course, the kdebindings.&lt;br /&gt;
&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/cmake/modules&lt;br /&gt;
&lt;br /&gt;
== Preparation ==&lt;br /&gt;
&lt;br /&gt;
Now all files (not folders) from ./modules have to be placed in ./kdebindings/cmake/modules&lt;br /&gt;
&lt;br /&gt;
You will find in ./kdebindings a file called CMakeLists.txt.qtruby - copy that file to CMakeLists.txt. You will overwrite a file to do it, but that doesn't matters.&lt;br /&gt;
&lt;br /&gt;
== Building ==&lt;br /&gt;
&lt;br /&gt;
Now create a directory build next to kdebindings. You will find the following commands in the beginning of the CMakeLists.txt.qtruby file.&lt;br /&gt;
&lt;br /&gt;
I copied the cmake command from there, but deleted the lines DRUBY_EXECUTABLE and DRUBY_INCLUDE_PATH&lt;br /&gt;
&lt;br /&gt;
To get the qtruby build with ruby v1.9 I have had to make sure that the command which ruby finds the right file version. Maybe you need to create a symbolic link or modify your PATH variable.&lt;br /&gt;
&lt;br /&gt;
Perhaps there is also a simpler way.&lt;br /&gt;
&lt;br /&gt;
Sometimes it is necessary to install some devel packages additionally to meet the dependencies.&lt;br /&gt;
&lt;br /&gt;
With opensuse it can be done with:&lt;br /&gt;
&lt;br /&gt;
 su # become root&lt;br /&gt;
 zypper in libqimageblitz-devel libkde4-devel #i install packages&lt;br /&gt;
&lt;br /&gt;
When cmake quits without errors you can proceed with make and make install.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby</id>
		<title>User:Robert Riemann/Drafts/Build qtruby</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/User:Robert_Riemann/Drafts/Build_qtruby"/>
				<updated>2009-07-27T14:55:34Z</updated>
		
		<summary type="html">&lt;p&gt;Robert Riemann: draft for a subpage to Ruby&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:I18n/Language Navigation Bar|Development/Tutorials}}&lt;br /&gt;
{{improve}}&lt;br /&gt;
&lt;br /&gt;
== Get Sources ==&lt;br /&gt;
&lt;br /&gt;
Before starting, the recent sources have to be downloaded.&lt;br /&gt;
The following command will download some important cmake files and, of course, the kdebindings.&lt;br /&gt;
&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebindings&lt;br /&gt;
 svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs/cmake/modules&lt;br /&gt;
&lt;br /&gt;
Now all files (not folders) from in ./modules have to be placed in ./kdebindings/cmake/modules&lt;br /&gt;
&lt;br /&gt;
[[Category:Ruby]]&lt;/div&gt;</summary>
		<author><name>Robert Riemann</name></author>	</entry>

	</feed>