Git Product home page Git Product logo

qpy's People

Contributors

candycode avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kevinxusz

qpy's Issues

Add filters for selecting members to add to Python as done in QLua

When an object or type is added to the Python context do allow client code to select which methods and properties are actually added through a filter object or RegExp.

Pass an additional MemeberFilter object to the context which is used to filter members.

E.g.

struct MemberFilter {
    bool MethodAvailable(QObject* obj, const QMetaMethod& mm) const = 0;
    bool PropertyAvailable(QObject* obj, const QMetaProperty& mp) const = 0;
};

Optimze connect for qobject to qobject connection

Currently a QObject to QObject connection is handled through Python, which means that data are unnecessarily marshaled in/out of qt/python.

Modify connect function to handle the case of qobject-qobject connection.

Add __version__ attribute

Add a version attribute for the QObject wrapper and qpy module. Use git hash or regular number, but in case of a regular number do create a map between git hash and version number.

Crash in PyType_Ready

Test segfaults some times when calling the PyType_Ready function in PyContext::AddType

Make IsQObjectPtr pure virtual

Make method pure virtual to force derived implementations to explicitly implement it. This will make errors like registering new QObject derived types without explicitly returning true less likely.

The current design does not allow to disconnect signals from individual objects

Since all signals are forwarded to the same dispatcher method it is not possible to disconnect a signal from individual objects.

It's probably cleaner to derive PyCBackMethod from QObject and have signals routed to instances of this class. This will also fix the issue of not being able to deleted CBackMethods to maintain the mapping between method id and position in the method array consistent.

Create separate unit tests

Create test cases and expected results for:

  • connect
  • disconnect
  • method invocation
  • data types: invocable methods returning the value passed to the method itself

Add test script

Add bash script to iterate over test scripts and compare results with their *-expected results

Remove IsQObjectPtr method

It's redundant, since it is always possible to return the type and check if it's a QMetaType::QObjectStar

Split into .h and .cpp

Currently everything is implemented in includes: do split into declaration and implementation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.