 |
LeechCraft
0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
|
Go to the documentation of this file.
25 using QObject::QObject;
27 virtual ~SlotClosureBase () =
default;
31 virtual void run () = 0;
78 template<
typename FireDestrPolicy>
80 ,
public FireDestrPolicy
83 using FunType_t = std::function<typename FireDestrPolicy::Signature_t>;
145 const std::initializer_list<const char*>& signalsList,
150 for (
const auto signal : signalsList)
161 FireDestrPolicy::Invoke (Func_,
this);
162 FireDestrPolicy::Fired (
this);
166 class BasicDeletePolicy
186 base->deleteLater ();
192 class NoDeletePolicy :
public BasicDeletePolicy
206 class ChoiceDeletePolicy
229 base->deleteLater ();
@ Yes
Delete SlotClosure after this invocation.
static void Fired(SlotClosureBase *)
virtual ~BasicDeletePolicy()=default
Delete
Whether the SlotClosure shall be deleted.
static void Invoke(const std::function< Signature_t > &f, SlotClosureBase *base)
Base class for SlotClosure.
static void Fired(SlotClosureBase *base)
std::function< typename FireDestrPolicy::Signature_t > FunType_t
Deletes a SlotClosure object after its signal has fired.
Executes a given functor upon a signal (or a list of signals).
void Invoke(const std::function< Signature_t > &f, SlotClosureBase *)
SlotClosure(const FunType_t &func, QObject *parent)
Constructs a SlotClosure running a given func with the given parent as a QObject.
@ No
Do not delete SlotClosure after this invocation.
static void Fired(SlotClosureBase *)
constexpr detail::ExprTree< detail::ExprType::LeafStaticPlaceholder, detail::MemberPtrs< Ptr > > f
virtual ~ChoiceDeletePolicy()
void run() override
Triggers the function and invokes the destroy policy.