A handle to a multidirectional binding between properties. More...
#include <binding.h>
Public Types | |
enum | BindingDirectionFlag { SingleInit = 0x01, OneWayToView = (0x02 | SingleInit), OneWayToViewModel = 0x04, TwoWay = (OneWayToView | OneWayToViewModel) } |
Flags to control how to bind the properties. More... | |
Public Member Functions | |
bool | isValid () const |
Specifies whether the binding is a valid and active binding. More... | |
operator bool () const | |
Specifies whether the binding is a valid and active binding. More... | |
Q_INVOKABLE void | unbind () |
Remove the binding by disconnecting all change signals. | |
A handle to a multidirectional binding between properties.
This class is returned by the bind() function as a handle to a binding. It can be used to check if the binding is valid and can remove a binding again.
Flags to control how to bind the properties.
QtMvvm::Binding::isValid | ( | ) | const |
Specifies whether the binding is a valid and active binding.
true
If the binding is valid and active, false
if invalid or already unboundA binding is considered valid is if has successfully been set up and has not been unbound yet. A valid binding means view and viewModel are valid can the properties could be found.
QtMvvm::Binding::operator bool | ( | ) | const |
Specifies whether the binding is a valid and active binding.
true
If the binding is valid and active, false
if invalid or already unboundA binding is considered valid is if has successfully been set up and has not been unbound yet. A valid binding means view and viewModel are valid can the properties could be found.