Commit Graph

42 Commits

Author SHA1 Message Date
Matthias Koefferlein 7f2e740dd4 WIP: some refactoring of pya to reduce dependency on GSI for bridge applications. 2018-06-09 10:32:26 +02:00
Matthias Koefferlein d938bb999b WIP: modifications for Python 3 2018-06-09 09:42:13 +02:00
Matthias Koefferlein 2737e14b13 WIP: some refactoring of the GSI Python binding (less static objects, new conversion operators, preparations for external use) 2018-06-09 01:50:16 +02:00
Matthias Koefferlein eca8697398 WIP: some refactoring of pya binding and data keeping. Added more conversion functions for use in external code. Needs testing. 2018-06-07 01:05:36 +02:00
Matthias Koefferlein 98256ebc66 WIP: pymod tests work for Qt4 now too. 2018-06-04 00:32:02 +02:00
Matthias Koefferlein 655e59d11a WIP: Fixed build dependencies and code dependencies for Python modules (Qt5) 2018-06-03 19:54:18 +02:00
Matthias Koefferlein bfbd8732f3 WIP: basic availability of LayoutView as separate component
- The deferred method scheduler is now automatically created
  when required and when there is a QApplication
- QApplication and related have argv constructors
2018-06-03 00:54:58 +02:00
Matthias Koefferlein ea31e5bcde WIP: removed old Qt5 binding code, fixed a segfault (static argc), enabled pya without interpreter 2018-06-02 02:03:14 +02:00
Matthias Koefferlein 403840b109 WIP: some bug and performance fixes. 2018-06-01 23:36:01 +02:00
Matthias Koefferlein 3882f6a3b1 WIP: further generation of Python module (kind of slow currently + dependent modules need to be loaded manually) 2018-05-31 23:22:35 +02:00
Matthias Koefferlein 07d9363ea7 WIP: more python modules, made gsi initialization safe against duplicate init. 2018-05-31 20:51:09 +02:00
Matthias Koefferlein ecc0520ffb WIP: Qt5 compatibility 2018-05-31 17:54:29 +02:00
Matthias Koefferlein 0b0393ce56 First version of Python module. 2018-05-26 21:31:39 +02:00
Matthias Koefferlein 65cfb2d4e4 WIP: consistent naming of some predicates in Ruby with ?, unit tests for reader option bindings. 2018-04-17 01:56:59 +02:00
klayoutmatthias 3d5fe871e2 Fixed #84 (Python modules: breakpoints not working on Windows) 2018-03-03 00:18:18 +01:00
Matthias Koefferlein 2f46f0d1c6 Fixed some issues found with Coverity. 2018-02-21 00:21:19 +01:00
Matthias Koefferlein 8003d1bb47 Merge branch 'master' into macos-build-on-master 2018-01-02 23:37:45 +01:00
Matthias Koefferlein ffb56335fb Updated copyright note to 2018. 2018-01-01 21:08:06 +01:00
klayoutmatthias 7e0f1522ac Windows build compatibility
The issue is with "dllexport": previously, dllexport was present on
exposed templates tool (= visibility(default) for gcc/clang). This
ensured MacOS compatibility since then the typeinfo is corretly
shared and dynamic_cast/typeid works.

For Windows, the "dllexport" equivalent requires the template
instantiations to be declared "external" which is a coding nightmare.

The solution is to provide separate macros for real (non-specialized,
not explicitly instantiated) templates (.._PUBLIC_TEMPLATE) which
is defined as empty for Windows and "visiblity(default)" for gcc/clang.
2018-01-01 18:55:11 +01:00
matthias 063811edc4 Solved the clang/MacOS startup failure and menu issue
1.) Startup issue:

This is solved by making sure templates with virtual functions
are made visible in the DSO. This way, dynamic_cast is possible
across DSO's.

Scary: clang/MacOS wants the forward declarations be declared visible as well.

2.) Menu issue:

The best solution is to have only one QMenuBar. The navigator
now gets a synthetic menu bar composed of QToolButtons.
2017-12-30 15:22:16 -08:00
Matthias Koefferlein 395643b427 Fixed #44 (Transformation constructor with x,y not working) 2017-12-23 19:42:39 +01:00
Matthias Koefferlein 4855231342 Fixed #40 (Crash in Python binding)
Plus the same effect was observed for Ruby and fixed there as well.
2017-12-21 00:55:40 +01:00
Matthias Koefferlein 21e42788e6 Fixed #39 (Action cannot be reassigned) 2017-12-17 22:38:48 +01:00
Matthias Koefferlein ad741d0eb7 Fixed #36: harding against destruction of object inside event handler
Plus: declare the form builder to return a new
widget object (the way it is).
2017-12-16 01:45:35 +01:00
Matthias Koefferlein 1cea7dfd23 Fixed #33 (Plugin factory not working when using with Python)
The fix consisted of introducing "factory" type virtual
methods which ensure that a reference is held to the
returned object. This is important for implementing
factory methods in Python. Without this, the object
get destroyed before we have a chance to increment the
reference count.
2017-12-11 23:51:00 +01:00
Matthias Koefferlein 80226e8c1c Provide proper input for linker for rba/pya unit tests. 2017-09-03 18:44:22 +02:00
Matthias Koefferlein 196d3a60e7 Fixed the build with less dependencies. 2017-09-03 10:29:14 +02:00
Matthias Koefferlein cfe8375be0 Unit test refactoring
Move ut framework to tl, so there are less complex
dependencies.
2017-09-03 01:54:11 +02:00
Matthias Koefferlein c8f4272ebb Moved rba and pya unit tests to module. 2017-08-27 00:47:40 +02:00
Matthias Koefferlein 000917d2c9 Refactoring: moved unit tests to libraries for some libs (ut modularization) 2017-08-26 22:44:31 +02:00
Matthias Koefferlein 55e797ffaf Provide proper INSTALL targets for .pro files
Plus: reduce compiler warnings
2017-08-21 02:33:45 +02:00
Matthias Koefferlein 8d6547291b Fixed Linux build. 2017-08-06 18:30:21 +02:00
klayoutmatthias f8b3c92191 Windows and Ruby/Python for deploymenu
This commit deals with the deployment issue on Windows
where there is no global Ruby/Python installation and
the installer needs to package all required files.

The solution is to read the Ruby/Python path from a
file that is evaluated upon startup. The installer will
install these files together with the executable for
Windows. This feature is only enabled on Windows.

A specific issue occured: since the location of the
file needs to be determined, the path of the executable
needs to be known. The Ruby initialization requires the
path to be set very early, before QCoreApplication is
instantiated. But Qt complains in QCoreApplication::applicationDirPath
so that this approach cannot be used for this purpose.
2017-08-06 18:18:34 +02:00
Matthias Koefferlein b13c2e69c3 Fixed a potential infinite recursion for Qt bindings
The problem is caused by an implementation detail:
To monitor the lifetime of Qt objects, a monitoring
object is attached to them. This used to happen through
child objects but attaching such issues QChildEvents
which - if routed over script objects - will itself
required objects to be attached a monitoring object.

The solution is to attach monitoring objects through
QObject dynamic properties.
2017-07-26 23:27:24 +02:00
Matthias Koefferlein c891d06ac3 Some performance enhancement (~30%) of RBA/PYA
This was achieved by separating the methods into
constructors and callbacks, hence there are less iterations
required when lookup up the latter.
2017-06-12 00:31:00 +02:00
Matthias Koefferlein edf7caa2fb Enhanced Salt package capabilities
* Salt packages can host native Ruby and Python
  libraries now. The "ruby_lib" and "python_lib"
  templates provide such native libraries.
  This way we can basically wrap every native
  extension in such a package.
* Ability to supply binary plugins through
  Salt packages as well.
2017-05-27 22:32:55 +02:00
Matthias Koefferlein 47aa38421a Unique library named to avoid name conflicts
The libraries generated are called libklayout_x now
(instead of libx). This avoid name conflicts with
"libdb.so" on some systems for example.
2017-03-31 00:23:12 +02:00
Matthias Koefferlein 1f60e7729e Qt signals can be bound to functions with less args in Python
With this change it is possible to bind signals to functions
accepting less arguments. For example:

    def triggered():
      ...

    b = pya.QPushButton()
    b.clicked(triggered)
    b.emit_clicked(True)

wasn't working before since triggered() gets one parameter
(checked) and the call fails. Now, additional parameters are
ignored.
2017-02-24 23:48:47 +01:00
Matthias Koefferlein 92fd33744d WIP: first solution for lost references issue
* The solution consists of attaching a bridge object
  to QObjects. If the host object is destroyed, the
  bridge object will notify the script client
* The bridge object attachment is optimized so it
  only happens if required (but still too often ...)
* The child object of QChildEvent gets a special
  handling since this object is almost dead in case
  of remove. This special handling consists of
  a special, stripped class which is used to
  only represent QObject in that particular case.
2017-02-21 23:47:48 +01:00
Matthias Koefferlein eea5da4ba6 Attempt to fix "GSI does not monitor lifetime of Qt objects" 2017-02-20 22:21:29 +01:00
Matthias Koefferlein a1e8aaf6b8 Updated copyright note to 2017. 2017-02-12 15:28:14 +01:00
Matthias Koefferlein 1b98f9b0f9 Initialized repository with current sources. 2017-02-12 13:21:08 +01:00