cginternals / libzeug

deprecated: C++ sanctuary for small but powerful and frequently required, stand alone features.
MIT License
16 stars 13 forks source link

Add possibility to notify a property with getter and setter of changes #56

Closed rlux closed 10 years ago

rlux commented 10 years ago

Currently, a property is oblivious to direct changes of its data store, i.e. when the value is updated through other means besides calling the setter. In that case it might be useful to call a dataChanged method (or similar) on property telling it to update the GUI.

mjendruk commented 10 years ago

Since signalzeug::Signal<> valueChanged is a public member, you can just call property->valueChanged(). But when you put this in the setter, the signal will called twice. Is this what you want?

rlux commented 10 years ago

If all properties have a valueChanged, that's what I meant with this issue. It shouldn't be in the setter though. You would only call this when changing the value without using the setter. This still doesn't update the GUI though, does it? That should probably be a different issue then, so we can close this one.

mjendruk commented 10 years ago

Updating the GUI is issued here: #15