Registered Member
|
Hi!
I don't know, if this is the right place to ask about smoke, so if it's not or if you know a better place, please tell me. I toyed around with smoke to get information about the Qt-library (inheritance structure, method descriptions, etc.). I am doing this from Haskell (http://haskell.org). The ultimate goal would be, to generate bindings to be able to use Qt-libs from Haskell. I imagine, one would use smoke to gather information about Qt and from that, generate C- and Haskell-files that would make up a Haskell-Qt-library. So, is this doable with smoke? Is there a better way? I tried to look up documentation about smoke on the net, but there isn't much. There is no project homepage, no API-docs, just one (helpful) example on techbase. So i have some questions regarding the API: 1. How can i gather information about enumeration types in Qt (for example: QApplication::Type)? 2. It says, the field Smoke::Type.classId is set to (- 1) if the type is not a class. I wasn't able to find the value (- 1) for classId in any of the types. I had the impression, that not (- 1) but 0 was used to identify non-class types (as is the case in the types for "int" and "bool"). However the following types, that represent classes, expose 0 in their classId-field: "QString", "QThread*", "const QList<QObject*>&", "QList<QByteArray>", "QList<QPair<int,int> >", "EventFilter". What also bothers me here: a classId == 0 would, afaik, refer to qt_Smoke->classes[0]. But that doesn't seem to be a class (I get a segfault for qt_Smoke->classes[0].className), which makes perfectly sense, if classId == 0 is used to indicate non-classes. But isn't there a better way to handle this? What if i want to iterate over all classes? 3. It seems that the void type is indicated by Type.name being the null pointer, but that's just guessing. Is that true? btw: I am using version 4.3.4. Is there anything happening in smoke in the svn-repo? I think, smoke is a great piece of software and it's a pity that it isn't better documented (and missing some convenience functions) and i would like to help. So who can i talk to about that? Greetings, Sönke |
Registered Member
|
Hi,
You should send this to the kde-bindings maillist where the Smoke developers are: kde-bindings@kde.org Yes, that is the way to work with Smoke to make a Qt binding. In SVN there is a new Smoke generator written in C++ that will be released with the KDE compilation 4.4. It includes Qt 4.6 support and it is more modular.
connect(post, SIGNAL(readSignature()), qapp, SLOT(quit()));
|
Registered Member
|
Ok, thanks. Will check out the svn version and ask the list, if needed.
|
Registered Member
|
I should say this is new what you are talking about it. I would check this version too. Thanks for sharing it!!!
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]