Hi Stefan,
I'm studying the Context2D example from QT. http://doc.qt.io/qt-5/qtscript-script-context2d-example.html
Do you think it could be simple/useful to include this object in ScriptCommunicator widgets in the same way you included the PlotWidget functionality? In this manner you could add a custom drawing layer to SC.
Kindest regards,
Pier Andrea.
Hi Stefan,
I think that SC lacks of a user-accessible layer for custom drawing.
Immagine to have to represent XY data from a DSO (i.e. lissaiou curves), the actual version of plotWidget is not adapt to do this (did you tried to add a sin() signal in X vs a cos() signal in Y?).
I think you could do similar thing by adapting the PlotWdget, but a drawing layer could be a powerful general-purpose tool because the context2D is SCRIPTABLE.
With this function (in my mind) SC will become a COMPLETE JS PROGRAMMING ENVIRONMENT with a GUI potentially "programmable" or customizable directly by a microcontroller like MakerPlot (http://www.makerplot.com) developed by my friend Martin Hebel.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
then there is no need to have a Context2D API. It would be better if SC has a possibility to draw on every given widget/window. This could be achieved by extending the ScriptWidget class (all script widgets are derived from this class) with some basic drawing functions. What do you think?
Best regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stephan,
of course this could be amazing!
You have a sofware Engineer mind! This do the difference (I'm a medical doctor).
Thank you again,
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've uploaded a new pre-release which includes a Canvas2D widget (similar to your canvas project) which can be added to a group box. You can find an example under exampleScripts\WorkerScripts\Canvas2D and the API in scriptClasses\canvas2D\context2d.h (I will add a documentation in the manual later).
Best regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've uploaded a new pre-release which includes a script-debugger (only worker scripts at the moment).
Note: A script which is debugged runs in the main-thread (and not in his own thread).
Best regards,
Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
thank you very much. I'll try the new functionalities this afternoon. The script debugger is a great improvement!.
I'll send you a feedback ASAP.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
your Canvas2DWidget is just INCREDIBLE!!! It is exacly what I had in mind in my post about Canvas2D. Do you agree that now you can do virtually everythng with ScriptCommunicator?
The event interface is almost complete (this could be important for interacting with the graphic layer in graphs). Also the debugger introduction is a big help for error catching and improvement making.
My compliments Stefan. I'm everyday more entusiastic about your software jewel.
Thank you again.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan.
in the slot routines called by the the signal: canvas2dWidgetName.sizeChangeSignal.connect(slotRoutine);
in the four canvas2D example include scripts, is it possible to substitute canvas2dWidgetName.width and canvas2dWidgetName.height with "width" and "height"?
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes you can use "width" and "height". It make no sense to use canvas2dWidgetName.width and canvas2dWidgetName.height if you have these parameter already as arguments in the slot function.
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
I've observed that not every canvas2D keypress/keyrelease returns a key value. Initially I've suspected that this was a printing problem and I've tried to change the "key" value to "key.charCodeAt()" in the slot routines. The slot is triggered at every key press/release but the charCodeAt() for some keys (i.e. arrow keys) is NaN.
This is not a big issue, just to know that.
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've uploaded a new pre-release which includes:
- changed API for a custom widget (I have changes the LED project)->Debugsupport
- I've fixed some bugs related with script debugging
- changed canvas signals (you get the scan code too)
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Stefan,
I understund your changes in order to make also the custom widgets compatible with the newly-intoduced debugger.
Canvas2D scancodes solved the "arrow keys" issue.
Thank you,
Kindest regards,
Pier Andrea.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I'm studying the Context2D example from QT.
http://doc.qt.io/qt-5/qtscript-script-context2d-example.html
Do you think it could be simple/useful to include this object in ScriptCommunicator widgets in the same way you included the PlotWidget functionality? In this manner you could add a custom drawing layer to SC.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-20
Hi Pier,
I think this could be possible (I have to take a closer look into the code). What is your intention with this new feature?
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I think that SC lacks of a user-accessible layer for custom drawing.
Immagine to have to represent XY data from a DSO (i.e. lissaiou curves), the actual version of plotWidget is not adapt to do this (did you tried to add a sin() signal in X vs a cos() signal in Y?).
I think you could do similar thing by adapting the PlotWdget, but a drawing layer could be a powerful general-purpose tool because the context2D is SCRIPTABLE.
With this function (in my mind) SC will become a COMPLETE JS PROGRAMMING ENVIRONMENT with a GUI potentially "programmable" or customizable directly by a microcontroller like MakerPlot (http://www.makerplot.com) developed by my friend Martin Hebel.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-21
Hi Pier,
then there is no need to have a Context2D API. It would be better if SC has a possibility to draw on every given widget/window. This could be achieved by extending the ScriptWidget class (all script widgets are derived from this class) with some basic drawing functions. What do you think?
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stephan,
of course this could be amazing!
You have a sofware Engineer mind! This do the difference (I'm a medical doctor).
Thank you again,
Kindest regards,
Pier Andrea.
Hi Pier,
but I don't know when I will finish this feature because I don't have much time the next weeks.
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
no problem at all! You are doing so much.
Thank you again.
Kindest regards,
Pier Andrea.
Hi Pier,
I've uploaded a new pre-release which includes a Canvas2D widget (similar to your canvas project) which can be added to a group box. You can find an example under exampleScripts\WorkerScripts\Canvas2D and the API in scriptClasses\canvas2D\context2d.h (I will add a documentation in the manual later).
Best regards,
Stefan
Hi Pier,
I've uploaded a new pre-release which includes a script-debugger (only worker scripts at the moment).
Note: A script which is debugged runs in the main-thread (and not in his own thread).
Best regards,
Stefan
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
thank you very much. I'll try the new functionalities this afternoon. The script debugger is a great improvement!.
I'll send you a feedback ASAP.
Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-24
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
your Canvas2DWidget is just INCREDIBLE!!! It is exacly what I had in mind in my post about Canvas2D. Do you agree that now you can do virtually everythng with ScriptCommunicator?
The event interface is almost complete (this could be important for interacting with the graphic layer in graphs). Also the debugger introduction is a big help for error catching and improvement making.
My compliments Stefan. I'm everyday more entusiastic about your software jewel.
Thank you again.
Kindest regards,
Pier Andrea.
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan.
in the slot routines called by the the signal:
canvas2dWidgetName.sizeChangeSignal.connect(slotRoutine);
in the four canvas2D example include scripts, is it possible to substitute
canvas2dWidgetName.width and canvas2dWidgetName.height
with "width" and "height"?Kindest regards,
Pier Andrea.
Last edit: Anonymous 2016-01-24
Hi Pier,
yes you can use "width" and "height". It make no sense to use canvas2dWidgetName.width and canvas2dWidgetName.height if you have these parameter already as arguments in the slot function.
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-25
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I've observed that not every canvas2D keypress/keyrelease returns a key value. Initially I've suspected that this was a printing problem and I've tried to change the "key" value to "key.charCodeAt()" in the slot routines. The slot is triggered at every key press/release but the charCodeAt() for some keys (i.e. arrow keys) is NaN.
This is not a big issue, just to know that.
Kindest regards,
Pier Andrea.
Hi Pier,
I've uploaded a new pre-release which includes:
- changed API for a custom widget (I have changes the LED project)->Debugsupport
- I've fixed some bugs related with script debugging
- changed canvas signals (you get the scan code too)
Best regards,
Stefan
Last edit: Stefan Zieker 2016-01-25
View and moderate all "User Contributions" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Hi Stefan,
I understund your changes in order to make also the custom widgets compatible with the newly-intoduced debugger.
Canvas2D scancodes solved the "arrow keys" issue.
Thank you,
Kindest regards,
Pier Andrea.