1 #ifndef BITCOIN_QT_CALLBACK_H
2 #define BITCOIN_QT_CALLBACK_H
6 class Callback
: public QObject
10 virtual void call() = 0;
14 class FunctionCallback
: public Callback
19 FunctionCallback(F f_
) : f(std::move(f_
)) {}
20 ~FunctionCallback() override
{}
21 void call() override
{ f(this); }
25 FunctionCallback
<F
>* makeCallback(F f
)
27 return new FunctionCallback
<F
>(std::move(f
));
30 #endif // BITCOIN_QT_CALLBACK_H