diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-06 18:34:03 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-10 10:31:58 +0200 |
commit | 61884594ceff59279abe5530c8c1af1870dc8fbb (patch) | |
tree | c896d862a5dee2ea1647ab9f68961381339fc669 /options/base-value.hpp | |
parent | 4ad996e116e78dd5f03c1ec47df2d380f6e23a68 (diff) |
Revert "options/value: add `QObject::connect` wrapper"
This reverts commit a67e8630caf20e7f48151024e9e68dd9271d75c7.
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: |