Recent

Author Topic: where qt4pas sources are?  (Read 25782 times)

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: where qt4pas sources are?
« Reply #15 on: January 07, 2016, 11:36:44 pm »
3.Any change must be Qt-4.5 compatibile as we guarantee that...

There is not much left running with Qt4 (similar for Gtk2). I would implement any changes for Qt5.

No problem with me. Create C bindings for Qt5 (possibly splitted as QtCore, QtGUI, QtNetwork, QtOpenGL  etc) as Den created + binaries for major platforms and that's it :)

mica

  • Full Member
  • ***
  • Posts: 196
Re: where qt4pas sources are?
« Reply #16 on: January 08, 2016, 01:16:29 am »

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #17 on: January 11, 2016, 05:38:34 pm »
No problem with me. Create C bindings for Qt5 (possibly splitted as QtCore, QtGUI, QtNetwork, QtOpenGL  etc) as Den created + binaries for major platforms and that's it :)

I've stated to make Free Pascal module for SWIG. The thing that should replace "scripts" used to generate binding code of qt4pas.

Idea is to have really open tool to create Pascal wrappers for C++, and use it to generate qt5 wrappers for FPC.
SWIG has modules for many languages (Perl, Python, TCL, Java, C# etc etc ...) but not for Pascal. :(

working on SWIG I'll concentrate on only features that are required for qt5 generation....

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: where qt4pas sources are?
« Reply #18 on: January 11, 2016, 06:35:25 pm »
No problem with me. Create C bindings for Qt5 (possibly splitted as QtCore, QtGUI, QtNetwork, QtOpenGL  etc) as Den created + binaries for major platforms and that's it :)

I've stated to make Free Pascal module for SWIG. The thing that should replace "scripts" used to generate binding code of qt4pas.

Idea is to have really open tool to create Pascal wrappers for C++, and use it to generate qt5 wrappers for FPC.
SWIG has modules for many languages (Perl, Python, TCL, Java, C# etc etc ...) but not for Pascal. :(

working on SWIG I'll concentrate on only features that are required for qt5 generation....
I have been mildly interested on the subject and been spending some time lately on how to automate the process of binding creation and I came to the conclusion that swig is not the easier thing to work with. Keep in mind that my C/C++ skills are less than 0 so I probably miss something vital on my evaluation but as of now I would stay away from swig. There are a number of roads to walk with most promising
  • smoke It is already QT centric which means that you will have more help to write the definition or even none work at all depending on the requirements.
  • a Custom solution using existing tools like GCCXML and use the generated xml file to feed it to a custom generator (written in pascal?) and you are almost set. I do not know if we could avoid flattening the C++ object to C calls as well with this.
  • cableswig it uses the GCCXML internally too so it might be easier to write definition for it.
Any way if you decide the go the gccxml way instead of swig I wouldn't mind getting lightly involved.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #19 on: January 11, 2016, 07:34:29 pm »
I have been mildly interested on the subject and been spending some time lately on how to automate the process of binding creation and I came to the conclusion that swig is not the easier thing to work with. Keep in mind that my C/C++ skills are less than 0 so I probably miss something vital on my evaluation but as of now I would stay away from swig. There are a number of roads to walk with most promising
  • smoke It is already QT centric which means that you will have more help to write the definition or even none work at all depending on the requirements.
  • a Custom solution using existing tools like GCCXML and use the generated xml file to feed it to a custom generator (written in pascal?) and you are almost set. I do not know if we could avoid flattening the C++ object to C calls as well with this.
  • cableswig it uses the GCCXML internally too so it might be easier to write definition for it.
Any way if you decide the go the gccxml way instead of swig I wouldn't mind getting lightly involved.

Thanks taazz!
1. I'll check what is smoke.
2 and 3. creators of CABLE currently developing "Insight Toolkit" and they use GCCXML to generate input file for SWIG and then call SWIG for actual generations of wrappers. We can try this approach later if it produces better results.


add.. quickly look into SMOKE.
Well, if I understood correctly. config xml files have to be created manually and populated by classes etc, what to include, what to exclude... It generates CPP library and header. Pascal wrapping layer has to be created outside SMOKE.
From SWIG I expect, it should generate both. May be I am too optimistic. :)
« Last Edit: January 11, 2016, 07:55:56 pm by mm7 »

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: where qt4pas sources are?
« Reply #20 on: January 11, 2016, 08:41:44 pm »
@mm7, maye you should try with doxygen and some pascal written utility. smoke is totally undocumented.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: where qt4pas sources are?
« Reply #21 on: January 12, 2016, 12:04:52 am »
I have been mildly interested on the subject and been spending some time lately on how to automate the process of binding creation and I came to the conclusion that swig is not the easier thing to work with. Keep in mind that my C/C++ skills are less than 0 so I probably miss something vital on my evaluation but as of now I would stay away from swig. There are a number of roads to walk with most promising
  • smoke It is already QT centric which means that you will have more help to write the definition or even none work at all depending on the requirements.
  • a Custom solution using existing tools like GCCXML and use the generated xml file to feed it to a custom generator (written in pascal?) and you are almost set. I do not know if we could avoid flattening the C++ object to C calls as well with this.
  • cableswig it uses the GCCXML internally too so it might be easier to write definition for it.
Any way if you decide the go the gccxml way instead of swig I wouldn't mind getting lightly involved.

Thanks taazz!
1. I'll check what is smoke.
2 and 3. creators of CABLE currently developing "Insight Toolkit" and they use GCCXML to generate input file for SWIG and then call SWIG for actual generations of wrappers. We can try this approach later if it produces better results.


add.. quickly look into SMOKE.
Well, if I understood correctly. config xml files have to be created manually and populated by classes etc, what to include, what to exclude... It generates CPP library and header. Pascal wrapping layer has to be created outside SMOKE.
From SWIG I expect, it should generate both. May be I am too optimistic. :)
OK you know better I'm nooo C developer so most of those look to me fogy at best in any case here 2 links
that might help in your endeavors
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #22 on: January 12, 2016, 02:58:10 am »
OK you know better I'm nooo C developer so most of those look to me fogy at best in any case here 2 links
that might help in your endeavors

Wow! cool! I've started to make Free Pascal from Modula3 module. But this Delphi one should be much closer to what we would need.
I'll take a look into that Delphi module and may be with some minor changes Free Pascal module can be created from it.

airpas

  • Full Member
  • ***
  • Posts: 179
Re: where qt4pas sources are?
« Reply #23 on: January 12, 2016, 08:56:49 am »
CodeTyphon has qt4 & qt5 pas binding with cpp source : CodeTyphonIns\installbin\allzips\src\qt4pas.7z

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #24 on: January 13, 2016, 04:24:34 pm »
CodeTyphon has qt4 & qt5 pas binding with cpp source : CodeTyphonIns\installbin\allzips\src\qt4pas.7z
Thanks airpas!
Does CodeTyphon includes scripts, SWIG or whatever tools to generate that qt5pas?


Update. I've installed SWIG 2.0 with Delphi module. I'll try to re-work it into SWIG 3 into freepascal module.
Hopefully minor changes will be required.

Where better to get SVN/Git repo of qt5 from?

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: where qt4pas sources are?
« Reply #25 on: January 13, 2016, 04:44:27 pm »
Thanks airpas!
Does CodeTyphon includes scripts, SWIG or whatever tools to generate that qt5pas?

Where better to get SVN/Git repo of qt5 from?

1.I think they used alpha sources from our bindings page for Qt5, there's no scripts
to build C bindings sources.

2.Open your svn somewhere

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #26 on: January 13, 2016, 08:02:23 pm »
2.Open your svn somewhere
Where is "trunk" of qt5?

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: where qt4pas sources are?
« Reply #27 on: January 15, 2016, 03:01:01 pm »
1.qt-project.org
2.Do not use Qt5 trunk for bindings creation, but use eg. Qt-5.5 stable as start supported Qt version.

mm7

  • Full Member
  • ***
  • Posts: 193
  • PDP-11 RSX Pascal, Turbo Pascal, Delphi, Lazarus
Re: where qt4pas sources are?
« Reply #28 on: January 15, 2016, 04:33:05 pm »
1.qt-project.org
2.Do not use Qt5 trunk for bindings creation, but use eg. Qt-5.5 stable as start supported Qt version.

thanks.

Update.
Currently I am moving SWIG 2 Delphi to SWIG 3 Free Pascal.
SWIG 2 Delphi was made from Modula 3. The latter one was made from Java and it still is at beginning stage of development.
I am fixing it here and there to make it generate descent code ....
Will keep you posted.

Question regarding naming convention - If there is a class in Qt, let say QtDialog, in Pascal wrapping should we keep same name, or should it be named in Pascal standard TQtDialog ?

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: where qt4pas sources are?
« Reply #29 on: January 16, 2016, 11:28:56 am »
Question regarding naming convention - If there is a class in Qt, let say QtDialog, in Pascal wrapping should we keep same name, or should it be named in Pascal standard TQtDialog ?

Let's keep naming convention from Qt4 bindings.
Qt              Qt4Pas       
QObject -> QObjectH
QWidget -> QWidgetH
QFrame -> QFrameH
etc

In lclqt we have TQtWidget which is pure object pascal implementation and which contains property Widget:QWidgetH.



 

TinyPortal © 2005-2018