Search found 9 matches

by YourRuler
Thu Aug 10, 2017 10:04 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

Re: C++ plugin, events

hey andrew, turned out the reason I wasn't seeing the value on my real-world code was because I was attempting to pass back a std::list.
Once I converted to more primitive types all started working well. Thank you!
by YourRuler
Wed Aug 09, 2017 9:09 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

Re: C++ plugin, events

One more thing I Guess, if you have a moment to spare - The signal works; the function I specify in the JS runs when I emit it from the C++. however, I don't have the variable I actually emitted. Is it possible to have the variables passed to the function, or will I need to expose the variables by m...
by YourRuler
Wed Aug 09, 2017 2:50 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

Re: C++ plugin, events

Awesome, I got it working this morning. I just hadn't put the signal in the right class definition :roll:
Thanks for your help mate.
by YourRuler
Tue Aug 08, 2017 3:48 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

Re: C++ plugin, events

Thanks for replying andrew; I haven't quite gotten it working yet. When you say that signals can be exposed like regular functions, this is what that meant to me: //plugin.h class MyPlugin : public QObject, public RPluginInterface { Q_OBJECT Q_INTERFACES(RPluginInterface) #if QT_VERSION >= 0x050000 ...
by YourRuler
Tue Aug 08, 2017 2:01 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

Re: C++ plugin, events

I have a class with exposed functions that I am calling - I'm looking for a slightly more specific thing. Some of the more intense processes that I have to run (For example, calibrating the device I've made to account for manufacturing size & angle inconsistencies) won't necessarily end if specific ...
by YourRuler
Thu Aug 03, 2017 8:26 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: C++ plugin, events
Replies: 10
Views: 11039

C++ plugin, events

Greetings; I've been working on a C++ plugin for a while now works with a mechanical arm to plot a slice of an object on a 2d plane. For all of my testing to this point everything has been done synchronously - is there a way for me to implement events that the scripts can attach to, or a way to call...
by YourRuler
Fri Mar 24, 2017 4:03 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Calling c++ functions from emca script
Replies: 5
Views: 7840

Re: Calling c++ functions from emca script

After you specifically mentioned RExamplePlugin::initScriptExtensions I had a careful look at what was happening and followed the code trail backwards. I managed to recreate the MyClassToString function as MyClassGetInt, and was able to work through the process from there. I apologize for asking a q...
by YourRuler
Fri Mar 24, 2017 3:10 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Calling c++ functions from emca script
Replies: 5
Views: 7840

Re: Calling c++ functions from emca script

I'm sure it's simple e_confused No, this is not trivial as you will have to make your C++ function scriptable (i.e. provide script bindings for your class / function). RExamplePlugin has some example code on how to do this (see RExamplePlugin::initScriptExtensions and all the static functions it re...
by YourRuler
Fri Mar 24, 2017 2:37 pm
Forum: QCAD Programming, Script Programming and Contributing
Topic: Calling c++ functions from emca script
Replies: 5
Views: 7840

Calling c++ functions from emca script

Good morning! I'm doing some research into how viable the QCad system is for our purposes. I have the example plugin (support/examples/exampleplugin on the repo) compiling, and I can see the menu item that it adds to the miscMenu. My understanding that the Proper way to proceed is to have an emca Sc...

Go to advanced search