Base class for value proxies. Value proxy allows to decouple the displayed value from the values accessed within the program. For example, one may want to display Fahrenheit while still working with Celsius.
More...
#include <valueProxy.h>
|
typedef QObject | Superclass |
|
|
void | setValue (double newValue) |
|
void | setProxyValue (double newProxyValue) |
|
|
void | valueChanged (double) |
|
void | proxyValueChanged (double) |
|
void | proxyAboutToBeModified () |
|
void | proxyModified () |
|
|
| ValueProxy (QObject *parent=0) |
|
virtual double | proxyValueFromValue (double value) const =0 |
|
virtual double | valueFromProxyValue (double proxyValue) const =0 |
|
double | value () const |
|
virtual double | proxyValue () const |
|
Base class for value proxies. Value proxy allows to decouple the displayed value from the values accessed within the program. For example, one may want to display Fahrenheit while still working with Celsius.
A ValueProxy can be used by connecting signal/slots to the value and proxyValue properties or by using directly the valueFromProxyValue and proxyValueFromValue functions.
Subclasses should reimplement the function proxyValueFromValue() and valueFromProxyValue().
- See also
- LinearValueProxy
◆ updateProxyValue()
void ValueProxy::updateProxyValue |
( |
| ) |
|
|
protected |
Utilities function for subclasses. Can be called to update the value/proxyValue from the proxyValue/value.
◆ proxyValue
double ValueProxy::proxyValue |
|
readwrite |
The proxy value holds the value transformed. If the value proxy is considered as a function, then the proxy value is the result of this function applied to value. The proxy value is updated if the value is changed.
◆ value
The value holds the current value. If the value proxy is considered as a function, then this function applied to the value is the proxy value. The value is updated if the proxy value is changed.
The documentation for this class was generated from the following files:
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/itomWidgets/valueProxy.h
- C:/Workspace/itom_development_VS2019_Qt5.15.2_x64/itomProject/itom/itomWidgets/valueProxy.cpp