KDDockWidgets API Documentation 2.1
|
The main namespace of the KDBindings library. More...
Namespaces | |
namespace | Private |
A namespace containing parts of KDBindings that are not part of the public API. | |
Classes | |
class | Binding |
A combination of a root Node with an evaluator. More... | |
class | Binding< T, ImmediateBindingEvaluator > |
Provides a convenience for old-school, immediate mode Bindings. More... | |
class | BindingEvaluator |
A BindingEvaluator provides a mechanism to control the exact time when a KDBindings::Binding is reevaluated. More... | |
class | ConnectionBlocker |
A ConnectionBlocker is a convenient RAII-style mechanism for temporarily blocking a connection. More... | |
class | ConnectionHandle |
A ConnectionHandle represents the connection of a Signal to a slot (i.e. a function that is called when the Signal is emitted). More... | |
struct | equal_to |
An instance of the KDBindings::equal_to struct is used to decide whether two values of type T are equal in the context of data binding. More... | |
class | ImmediateBindingEvaluator |
struct | node_abs |
An example struct that is used with a call to KDBINDINGS_DECLARE_FUNCTION to declare all overloads of std::abs as usable in data binding. More... | |
class | Property |
A property represents a value that can be part of or the result of data binding. More... | |
class | PropertyDestroyedError |
A PropertyDestroyedError is thrown whenever a binding is evaluated that references a property that no longer exists. More... | |
class | PropertyUpdater |
A PropertyUpdater defines the interface used to update a Property, e.g. from a binding expression. More... | |
struct | ReadOnlyProperty |
class | ScopedConnection |
A ScopedConnection is a RAII-style way to make sure a Connection is disconnected. More... | |
class | Signal |
A Signal provides a mechanism for communication between objects. More... | |
Functions | |
template<typename EvaluatorT , typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>> | |
std::unique_ptr< Binding< ResultType, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Func &&func, Args &&...args) |
Helper function to create a Binding from a function and its arguments. | |
template<typename T , typename EvaluatorT > | |
std::unique_ptr< Binding< T, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Private::Node< T > &&rootNode) |
Helper function to create a Binding from a root Node. | |
template<typename T , typename EvaluatorT > | |
std::unique_ptr< Binding< T, EvaluatorT > > | makeBinding (EvaluatorT &evaluator, Property< T > &property) |
Helper function to create a Binding from a Property. | |
template<typename Func , typename... Args, typename = std::enable_if_t<sizeof...(Args) != 0>, typename ResultType = Private::operator_node_result_t<Func, Args...>> | |
std::unique_ptr< Binding< ResultType, ImmediateBindingEvaluator > > | makeBinding (Func &&func, Args &&...args) |
Helper function to create an immediate mode Binding from a function and its arguments. | |
template<typename T > | |
std::unique_ptr< Binding< T, ImmediateBindingEvaluator > > | makeBinding (Private::Node< T > &&rootNode) |
Helper function to create an immediate mode Binding from a root Node. | |
template<typename T > | |
std::unique_ptr< Binding< T, ImmediateBindingEvaluator > > | makeBinding (Property< T > &property) |
Helper function to create an immediate mode Binding from a Property. | |
template<typename... T> | |
auto | makeBoundProperty (T &&...args) |
Helper function to create a Property with a Binding. | |
template<typename T > | |
std::ostream & | operator<< (std::ostream &stream, Property< T > const &property) |
template<typename T > | |
std::istream & | operator>> (std::istream &stream, Property< T > &prop) |
The main namespace of the KDBindings library.
All public parts of KDBindings are members of this namespace.
|
inline |
Helper function to create a Binding from a function and its arguments.
EvaluatorT | The type of the evaluator that is used to evaluate the Binding. |
evaluator | The evaluator that is used to evaluate the Binding. |
Func | The type of the function - may be any type that implements operator(). |
func | The function object. |
Args | The function argument types |
args | The function arguments - Possible values include: Properties, Constants and Nodes They will be automatically unwrapped, i.e. a Property<T> will pass a value of type T to func. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 163 of file binding.h.
References KDBindings::Private::makeNode().
|
inline |
Helper function to create a Binding from a root Node.
T | The type of the value that the Binding expression evaluates to. |
EvaluatorT | The type of the evaluator that is used to evaluate the Binding. |
evaluator | The evaluator that is used to evaluate the Binding. |
rootNode | Represents the expression that will be evaluated by the Binding. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
|
inline |
Helper function to create a Binding from a Property.
T | The type of the value that the Binding expression evaluates to. |
EvaluatorT | The type of the evaluator that is used to evaluate the Binding. |
evaluator | The evaluator that is used to evaluate the Binding. |
property | The Property to create a Binding from. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 123 of file binding.h.
References KDBindings::Private::makeNode().
Referenced by makeBoundProperty().
|
inline |
Helper function to create an immediate mode Binding from a function and its arguments.
Func | The type of the function - may be any type that implements operator(). |
func | The function object. |
Args | The function argument types |
args | The function arguments - Possible values include: Properties, Constants and Nodes They will be automatically unwrapped, i.e. a Property<T> will pass a value of type T to func. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 262 of file binding.h.
References KDBindings::Private::makeNode().
|
inline |
Helper function to create an immediate mode Binding from a root Node.
T | The type of the value that the Binding expression evaluates to. |
rootNode | Represents the expression that will be evaluated by the Binding. Typically constructed from a unary/binary operator on a Property. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
|
inline |
Helper function to create an immediate mode Binding from a Property.
T | The type of the value that the Binding expression evaluates to. |
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 225 of file binding.h.
References KDBindings::Private::makeNode().
|
inline |
Helper function to create a Property with a Binding.
This function can take:
Alternatively a BindingEvaluator can be passed as the first argument to this function to control when evaluation takes place.
See the documentation for the various overloads of the free makeBinding function for a detailed description of which arguments can be used in which order.
Examples:
Note: For the difference between makeBinding and makeBoundProperty, see the "Reassigning a Binding" section in the Getting Started guide.
Definition at line 292 of file binding.h.
References makeBinding().
std::ostream & KDBindings::operator<< | ( | std::ostream & | stream, |
Property< T > const & | property | ||
) |
Outputs the value of the Property onto an output stream.
Definition at line 394 of file property.h.
std::istream & KDBindings::operator>> | ( | std::istream & | stream, |
Property< T > & | prop | ||
) |
Reads a value of type T from the input stream and assigns it to the Property using set().
Definition at line 405 of file property.h.
References KDBindings::Property< T >::set().