Hello,
I created an EWObut it is so complicated to setup with property features. So decided to create an editor panel. But actually I am not sure how the EWO can store configurations which paremetered on the editor panel if I dont use Q_Property feature. Do I need to use File operations or DP structure to store parameters. Or is thee any other solution ?
EWO Permanent Values For non Property Values
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: EWO Permanent Values For non Property Values
You must use Q_PROPERTY (otherwise the outside world (scripting) does not know what can be changed in your EWO)
but you can still use a parametrization panel. All values you change via this panel will be written into the panel file by the UI manager.
You don't need to do anything special.
but you can still use a parametrization panel. All values you change via this panel will be written into the panel file by the UI manager.
You don't need to do anything special.
- schu
- Posts:10
- Joined: Tue Dec 06, 2016 10:43 am
Re: EWO Permanent Values For non Property Values
Thank you for your reply.
What I am trying to achieve is something similar to Tab/Table Widgets of WinCC OA.
I'm building a Pie Chart, there are multiple slices in it(Pie Chart is a class, and slices are list of slices as a member in the piechart class). Every slice is going to have some editable attributes such as label, color, value etc. I am able to set these attributes via methods. Even if I call the methods from the parameterization panel, they revert back when I reopen the panel or go runtime.
It looks like I need to use Q_PROPERTYs to be able to store those values in the panel file. Is it possible to use custom classes as Q_PROPERTY parameters? How is it possible to achieve a similar design as it is in Tab Widget, like the methods registerName, registerHeader?
What I am trying to achieve is something similar to Tab/Table Widgets of WinCC OA.
I'm building a Pie Chart, there are multiple slices in it(Pie Chart is a class, and slices are list of slices as a member in the piechart class). Every slice is going to have some editable attributes such as label, color, value etc. I am able to set these attributes via methods. Even if I call the methods from the parameterization panel, they revert back when I reopen the panel or go runtime.
It looks like I need to use Q_PROPERTYs to be able to store those values in the panel file. Is it possible to use custom classes as Q_PROPERTY parameters? How is it possible to achieve a similar design as it is in Tab Widget, like the methods registerName, registerHeader?
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: EWO Permanent Values For non Property Values
No, you can not use custom classes, since the panel format can only read/write a known format.
You can only store QFont, enum, QBrush, QPoint, QColor, QPen, bool, int, uint, float, string ... the same types you can use with user defined panel properties (since 3.15)
You can only store QFont, enum, QBrush, QPoint, QColor, QPen, bool, int, uint, float, string ... the same types you can use with user defined panel properties (since 3.15)
- schu
- Posts:10
- Joined: Tue Dec 06, 2016 10:43 am
Re: EWO Permanent Values For non Property Values
Is it also not possible to store dyn_string or dyn_int ? If possible which data type I need to use for dyn_string. Because I tried to use "qstringlist" for dyn_string. And it looks ok but I think it is not properly working.
- mkoller
- Posts:741
- Joined: Fri Sep 17, 2010 9:03 am
Re: EWO Permanent Values For non Property Values
Please see my last reply. Only those datatypes mentioned are possible.