Module qtjambi
Package io.qt.core

Class QObject.QComputedShortProperty

java.lang.Object
io.qt.QtObject
io.qt.core.QUntypedPropertyData
io.qt.core.QObject.QComputedShortProperty
All Implemented Interfaces:
QtObjectInterface
Enclosing class:
QObject

public final class QObject.QComputedShortProperty extends QUntypedPropertyData
QComputedShortProperty is primitive-typed version of QComputedProperty<Short>.
See Also:
  • Constructor Details

    • QComputedShortProperty

      public QComputedShortProperty(QtUtilities.ShortSupplier getter)
      Constructs a short-typed computed-value property according to the given value supplier.
      Parameters:
      getter - supplying the computed value
  • Method Details

    • value

      @QtUninvokable public final short value()
      Returns the value of the property computed by the given getter.
      Returns:
      value
    • valueMetaType

      @QtUninvokable public final QMetaType valueMetaType()
    • hasBinding

      @QtUninvokable public final boolean hasBinding()
    • onValueChanged

      @QtUninvokable public final QPropertyChangeHandler onValueChanged(Runnable f)

      Registers the given functor f as a callback that shall be called whenever the value of the property changes.

      The returned property change handler object keeps track of the registration. As long as the change handler is alive i.e. as long as a reference to the QPropertyChangeHandler instance exists, the callback remains installed. When the garbage collection deletes the instance, the callback is de-registered.

      Parameters:
      f -
      Returns:
      property change handler
      See Also:
    • subscribe

      @QtUninvokable public final QPropertyChangeHandler subscribe(Runnable f)
      Subscribes the given functor f as a callback that is called immediately and whenever the value of the property changes in the future.
      Parameters:
      f -
      Returns:
      property change handler
      See Also:
    • addNotifier

      @QtUninvokable public final QPropertyNotifier addNotifier(Runnable f)

      Registers the given functor f as a callback that shall be called whenever the value of the bindable changes.

      The returned property notifier object keeps track of the registration. As long as the notifier is alive i.e. as long as a reference to the QPropertyNotifier instance exists, the callback remains installed. When the garbage collection deletes the instance, the callback is de-registered.

      Parameters:
      f -
      Returns:
      property notifier
      See Also:
    • notifyProperty

      @QtUninvokable public final void notifyProperty()
      Programmatically signals a change of the property. Any binding which depend on it will be notified, and if the property has a signal, it will be emitted.