Qt-jambi-interest Archive, September 2006
type system
Message 1 in thread
I'm pretty new to QT Jambi, and QT in general. I was able to run the generator example
fine after some trial and error. Now what I want to do is run the generator on c++ file
using qt's xml and sql abilities. I'm having trouble finding out what type systems I
should use in the type system file. Can anyone point me in the right direction with
that one? Also, do I have to port my code completely to qt 4 from 3 to use qt jambi? Or
can I somehow use the older code?
Doug
--
[ signature omitted ]
Message 2 in thread
Douglas Orttenburger wrote:
>I'm pretty new to QT Jambi, and QT in general. I was able to run the generator example
>fine after some trial and error. Now what I want to do is run the generator on c++ file
>using qt's xml and sql abilities. I'm having trouble finding out what type systems I
>should use in the type system file. Can anyone point me in the right direction with
>
>
Hi, Douglas.
QtXml is unfortunately not yet part of Qt Jambi, so any part of your API
depending on this module cannot be mapped to Qt Jambi at this stage. You
can still use it behind the scenes, but if a class extends an XML class,
then this class cannot be mapped currently. Also, if a function receives
or returns objects of types inside the QtXml module, these functions
will not be part of the generated API.
However, to use typesystems for SQL and OpenGL modules write the
following in the beginning of your typesystem-specification:
<load-typesystem name=":/trolltech/generator/typesystem_sql.txt"
generate="no" />
<load-typesystem name=":/trolltech/generator/typesystem_opengl.txt"
generate="no" />
Although they are not available in the current version, we will add more
modules later. The filenames of these will follow the same basic
pattern, so they will be e.g. 'typesystem_network.txt',
'typesystem_svg.txt', 'typesystem_xml.txt' etc. all with the same path
as in the examples above.
>that one? Also, do I have to port my code completely to qt 4 from 3 to use qt jambi? Or
>can I somehow use the older code?
>
>
You will have to port the code completely to Qt 4 in order to use Qt Jambi.
best regards,
-- Eskil
Message 3 in thread
When you say that I can still use qt's xml functionality behind the scenes, does that
mean that if the class I'm trying to generate for QTJambi has a private helper function
that utilizes the QDomDocment and QDomElement classes, that should be ok? None of my
classes actually inherits from any of the QXml Classes.
I tried running it with that still in there, however when I run the generator file on
it, it has a fatal error at the nmake stage. It says it can not open the include file
'qdomdocument': No such file or directory.
Thank You,
Doug
Message 4 in thread
Douglas Orttenburger wrote:
>When you say that I can still use qt's xml functionality behind the scenes, does that
>mean that if the class I'm trying to generate for QTJambi has a private helper function
>that utilizes the QDomDocment and QDomElement classes, that should be ok? None of my
>classes actually inherits from any of the QXml Classes.
>
>
>I tried running it with that still in there, however when I run the generator file on
>it, it has a fatal error at the nmake stage. It says it can not open the include file
>'qdomdocument': No such file or directory.
>
>
Hi, Douglas.
By "behind the scenes", I mean that the classes from the QtXml module
must not be part of the API that you want to expose in Java. The "no
such file or directory" message is really just a warning, and shouldn't
prevent the generator from processing the rest of the header files, so
that should be harmless. However, if your functions either take as
argument or return objects of QDomDocument or QDomElement, you will see
a warning message such as:
WARNING(MetaJavaBuilder) :: skipping function 'MyWidget::foo',
unmatched parameter type 'QDomElement const&'
This means that the function foo() cannot be mapped to your Java API,
since it uses a type which the Qt Jambi Generator does not know about.
You will still be able to call this function from your C++ code, but not
from your Java code.
-- Eskil