KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
property_updater.h
Go to the documentation of this file.
1/*
2 This file is part of KDBindings.
3
4 SPDX-FileCopyrightText: 2021-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Sean Harmer <sean.harmer@kdab.com>
6
7 SPDX-License-Identifier: MIT
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11
12#pragma once
13
14#include <functional>
15
16namespace KDBindings {
17
30template<typename T>
32{
33public:
35 PropertyUpdater() = default;
36
38 virtual ~PropertyUpdater() = default;
39
41 PropertyUpdater(PropertyUpdater const &other) = default;
43 PropertyUpdater &operator=(PropertyUpdater const &other) = default;
44
46 PropertyUpdater(PropertyUpdater &&other) = default;
49
56 virtual void setUpdateFunction(std::function<void(T &&)> const &updateFunction) = 0;
57
63 virtual T get() const = 0;
64};
65
66} // namespace KDBindings
A PropertyUpdater defines the interface used to update a Property, e.g. from a binding expression.
PropertyUpdater(PropertyUpdater &&other)=default
PropertyUpdater & operator=(PropertyUpdater const &other)=default
virtual void setUpdateFunction(std::function< void(T &&)> const &updateFunction)=0
virtual ~PropertyUpdater()=default
PropertyUpdater(PropertyUpdater const &other)=default
virtual T get() const =0
PropertyUpdater & operator=(PropertyUpdater &&other)=default
The main namespace of the KDBindings library.
Definition binding.h:21

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8