comp.lang.ada
 help / color / mirror / Atom feed
From: Yves Bailly <kafka.fr@laposte.net>
Subject: Qt4Ada: Qt for Ada
Date: Sat, 29 Jul 2006 12:34:04 +0200
Date: 2006-07-29T12:34:09+02:00	[thread overview]
Message-ID: <44cb39a1$0$32184$636a55ce@news.free.fr> (raw)

Hello all,

After reading the thread about an Ada2005 binding for the Qt library, it
seems obvious that many would be interested in such a work.

So, let me announce I have started such a binding some times ago, a binding
to Qt version 4.1.4.

It's only the beginning, however it's already usable: the 6th Qt tutorial
(http://doc.trolltech.com/4.1/tutorial-t6.html) has been successfully
reimplemented in pure Ada.

The binding is done through a intermediate C interface, using GNAT 2006
as compiler. However I'm trying to write things as portable as possible,
not relying on compiler-specific features. The actual binding is a
rather thick one, the thin binding being limited to the C interface.

I pay particular attention to reflect in Ada the type structure from C++.
At the top there is one package, named "Qt". Below there are child
packages, corresponding to Qt's modules, for now only "Qt.Core" and
"Qt.Gui". Then each class has its own package, for example 
"Qt.Core.QStrings" for QString class, "Qt.Gui.QWidgets" for QWidget class.
The hierarchy of types is also preserved: the type Qt.Gui.QWidgets.QWidget
is derived from the type Qt.Core.QObjects.QObject, and so on.

Please note I'm not an Ada expert - but I'm willing to learn and get 
better. So even a quick review by someone more skilled would be very
appreciated ;-)

Now some numbers.

There are more than 5000 functions or methods in Qt4. With the current
structure, when not asleep, it needs roughly 1min30sec to bind a C++
method to an Ada function or procedure, in the simplest cases. So it would
need at least 125 hours to bind everything, more than 5 days if working
24 hours a day, or about 16 days if working 8 hours a day. Applying the
usual correction factor for projects planning, we get about 50 days of
full-time work. Which is not that much, after all.

But I'm not working full-time on this project. It's a "free" project, done
on my spare time. Most of my time is used by a company to develop some crap
of software in C++ (using Qt), quickly-badly written, full of bugs, and
probably reaching soon an unmaintainable state. It's disgusting, but at 
least I earn money for this work, so I can eat as well as my family. I
also write articles in a Linux french magazine, about two each month,
one on Qt4 and the other on Ada. It's very pleasing, and thanks to this
second work we and my family can do better than just survive.

So, by myself I can only work on Qt4Ada something like 1 (one) hour a day
(it's a weekly mean, some days I work more, some days not at all). At this
pace, the binding would be achieved in more than one year, assuming
everything goes well. No, I'm not using some automatic translator: as
someone already told, for such complex things as Gtk or Qt such translators
would in fine do more harm than good.

I would much prefer work on Qt4Ada full-time, but as stated I just can't
afford it (unless someone accepts to fund me for it, but it's unlikely).
So any help is greatly welcome!

On the "administrative" side, I have some wonder about licensing. Has it's
only a personal project, I think GPLv2 would be fine. What's your opinion?
I also have plans to release it on SourceForge, necessary step if more than
one person will work on it. Again, any suggestion is appreciated.

Thanks for reading me, that was a quite long post (and english is not my
mother language). Tell me what you think about all this. I'd be glad to
provide more details about the actual code, but I won't spread it before
the license is defined.

Best regards,

-- 
(o< | Yves Bailly  : http://kafka-fr.net   | -o)
//\ | Linux Dijon  : http://www.coagul.org | //\
\_/ |                                      | \_/`



             reply	other threads:[~2006-07-29 10:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-29 10:34 Yves Bailly [this message]
2006-07-29 12:35 ` Qt4Ada: Qt for Ada Michael Bode
2006-07-29 17:03   ` Preben Randhol
2006-07-29 17:44     ` Jeffrey Creem
2006-07-29 21:50     ` Michael Bode
2006-07-29 18:17   ` Björn Persson
2006-07-29 19:11     ` Samuel Tardieu
2006-07-29 14:24 ` Marius Amado-Alves
2006-07-31 20:57 ` Yves Bailly
2006-08-01  2:08   ` Jeffrey Creem
2006-08-03  7:51     ` Rob Norris
2006-08-01 11:35   ` Philippe Bertin
2006-08-01 21:55     ` Yves Bailly
2006-08-05 19:47       ` Steve Whalen
2006-08-05 21:25         ` Michael Bode
2006-08-06  9:24         ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox