Difference between revisions of "Development/Languages/Ruby"

Jump to: navigation, search
(First part of migration from developer.kde.org)
Line 3: Line 3:
 
[http://rubyforge.org/projects/korundum/ Korundum/QtRuby - Ruby-KDE/Qt bindings]
 
[http://rubyforge.org/projects/korundum/ Korundum/QtRuby - Ruby-KDE/Qt bindings]
  
 +
NEW - The book [http://www.pragmaticprogrammer.com/titles/ctrubyqt/ Rapid GUI Development with QtRuby] is now available.
  
 +
Being [http://developer.kde.org/language-bindings/smoke/index.html Smoke-based] bindings means that they offer full access to most KDE 3.x and Qt 3.x classes.
 +
 +
 +
== QtRuby ==
 +
Hello world example:
 +
 +
<code>
 +
#!/usr/bin/ruby -w
 +
require 'Qt'
 +
a = Qt::Application.new(ARGV)
 +
hello = Qt::PushButton.new("Hello World!", nil)
 +
hello.resize(100, 30)
 +
a.mainWidget = hello
 +
hello.show()
 +
a.exec()
 +
</code>
 +
 +
 +
== Current api coverage overview ==
 +
 +
=== Available calls ===
 +
You can call all Qt public and protected methods, and all friend methods such as bitBlt() etc
 +
=== Virtual methods ===
 +
 +
All virtual methods can be overridden, not just event handlers
 +
=== Properties ===
 +
'foobar = 5' is a synonym for 'setFooBar(5)'
 +
 +
t.b.c. (http://developer.kde.org/language-bindings/ruby/index.html)
  
 
A series of articles on ruby QT (inspired by the work done for the [http://dradis.nomejortu.com dradis] project):
 
A series of articles on ruby QT (inspired by the work done for the [http://dradis.nomejortu.com dradis] project):

Revision as of 20:48, 7 May 2008

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.

Korundum/QtRuby - Ruby-KDE/Qt bindings

NEW - The book Rapid GUI Development with QtRuby is now available.

Being Smoke-based bindings means that they offer full access to most KDE 3.x and Qt 3.x classes.


Contents

QtRuby

Hello world example:

  1. !/usr/bin/ruby -w

require 'Qt' a = Qt::Application.new(ARGV) hello = Qt::PushButton.new("Hello World!", nil) hello.resize(100, 30) a.mainWidget = hello hello.show() a.exec()


Current api coverage overview

Available calls

You can call all Qt public and protected methods, and all friend methods such as bitBlt() etc

Virtual methods

All virtual methods can be overridden, not just event handlers

Properties

'foobar = 5' is a synonym for 'setFooBar(5)'

t.b.c. (http://developer.kde.org/language-bindings/ruby/index.html)

A series of articles on ruby QT (inspired by the work done for the dradis project):


KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal