From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,fa17c2bd3c0ec0f7,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!news.astraweb.com!newsrouter-eu.astraweb.com!proxad.net!cleanfeed2-b.proxad.net!nnrp4-1.free.fr!not-for-mail Message-ID: <44cb39a1$0$32184$636a55ce@news.free.fr> From: Yves Bailly Subject: Qt4Ada: Qt for Ada Newsgroups: comp.lang.ada Date: Sat, 29 Jul 2006 12:34:04 +0200 User-Agent: KNode/0.10.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: Guest of ProXad - France NNTP-Posting-Date: 29 Jul 2006 12:34:09 MEST NNTP-Posting-Host: 81.56.171.53 X-Trace: 1154169249 nnrp4-1.free.fr 32184 81.56.171.53:44557 X-Complaints-To: abuse@proxad.net Xref: g2news2.google.com comp.lang.ada:6012 Date: 2006-07-29T12:34:09+02:00 List-Id: 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 | //\ \_/ | | \_/`