diff options
Diffstat (limited to 'options/base-value.hpp')
-rw-r--r-- | options/base-value.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/options/base-value.hpp b/options/base-value.hpp index 7b65d524..5317191b 100644 --- a/options/base-value.hpp +++ b/options/base-value.hpp @@ -9,7 +9,6 @@ #include "value-traits.hpp" #include <utility> -#include <type_traits> #include <QObject> #include <QString> @@ -26,15 +25,21 @@ class OTR_OPTIONS_EXPORT value_ : public QObject { Q_OBJECT -protected: - template<typename t> using signal_sig_ = void(value_::*)(detail::cv_qualified<detail::maybe_enum_type_t<t>>) const; - template<typename t> using slot_sig_ = void(value_::*)(detail::cv_qualified<detail::maybe_enum_type_t<t>>); + template<typename t> using cv_qualified = detail::cv_qualified<t>; + template<typename t> + using signal_sig = void(value_::*)(cv_qualified<t>) const; public: QString name() const { return self_name; } value_(bundle const& b, const QString& name) noexcept; ~value_() override; + template<typename t> + static constexpr auto value_changed() + { + return static_cast<signal_sig<t>>(&value_::valueChanged); + } + static const bool TRACE_NOTIFY; signals: |