<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText><span lang=EN-US>On Thursday, May 17, 2012 03:21:32 PM Cees Zeelenberg wrote:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> Hi everyone,<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> This may be of interest to some on this forum.  I have just uploaded a new<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> Gem package (qt_connect) with the aim to provide  a uniform Qt API for both<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> Ruby and JRuby platforms. The Gem provides JRuby bindings to the Qt Jambi<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> library with an (optional) extension to provide backward compatibility with<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> existing Qt Ruby programs.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> The same Gem package provides for Qt Ruby programs a QtJambi inspired<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> interface to the Signals/Slots system without the need to use C++<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> signatures.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> download from RubyGems.org: gem install qt_connect<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>> project on github: </span><a href="https://github.com/CeesZ/qt_connect"><span lang=EN-US>https://github.com/CeesZ/qt_connect</span></a><span lang=EN-US><o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>On Thursday, May 17, 2012 17:18:03 Richard Dale wrote:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>Interesting project - thanks for providing backwards compatibility with <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>QtRuby. I have been a bit poor at moving the QtRuby 3.0 development forward <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>recently, but I haven't given up and I think I will manage to get started <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>again soon. I am quite excited about the Raspberry Pi, Qt 5 and Ruby 2.0 and I <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>think there are a lot of reasons for wanting to carry on getting a really good <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>CRuby binding working.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>I think it would be a good idea if I could add some compatibilty with the <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>Ruby/QtJambi based bindings in QtRuby 3.0, particularly the slots and signals <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>yntax, and I'll study your examples and api at some point and try and do <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>>that.<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US>><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US>>-- Richard<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I certainly share your enthusiasm for the Raspberry Pi, Qt 5 and Ruby 2.0. Particularly Nokia’s funding<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>for 400 Raspberry Pi boards for Qt5 applications seems one of the better investments they have made<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> lately. I don’t know how the project  has worked out so far, but it should be an attractive challenge<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> to many kids and bring a bit of pioneering spirit to Qt  computing.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>A CRuby Qt binding which would work for all flavors of Ruby would definitely be my choice solution, but I<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>find it hard to estimate the amount of work involved – seems a lot to me -. Maybe it is possible to write<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> (or better generate) an ffi based interface to the Qt libraries with a pure Ruby wrapper for added<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> functionality. I really haven’t studied Smoke or other binding technologies in detail, so I am not<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>in a position to compare the different methods)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>As far as QtRuby 3.0 is concerned, QtJambi may be interesting for more than the Signals/Slot interface.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> Java and Ruby have quite a few things in common which distinguish them from C++. For instance single<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> inheritance and the use of  interfaces/modules. It is interesting how these are used in QtJambi (e.g.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> for Enum’s and Signal emitting classes)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Also QtJambi has (virtually) eliminated the QVariant class. This makes simpler and more readable code.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> I think the same could be done for QtRuby. Also a bit of ‘behind the scenes’ duck typing would make<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> application code easier and more readable. For instance in many method calls it is necessary to add<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US> .value or .to_int to one or more of the arguments which is not very intuitive.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Also compatibility with the current version should be a major concern, at least for those who have<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>invested in QtRuby programming.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Sofar a few of my thoughts on a new version of QtRuby, if I can be of further help let me know.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>For the moment one practical question you may be able to answer: I would like to cycle through<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>all Qt classes in order to compare them with their QtJambi counterparts. I have used the MetaObject<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>class but I have not found an enumerator which will pass me all classes. Do you know of a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>way to do this in QtRuby? In QtJambi this is straightforward because you can just cycle through<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>the contents of the different jars.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>==Cees<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>