Remove unused variable int64_t nEnd
[bitcoinplatinum.git] / src / qt / callback.h
bloba8b593a6525582184b34f2845b575bb99a59e08a
1 #ifndef BITCOIN_QT_CALLBACK_H
2 #define BITCOIN_QT_CALLBACK_H
4 #include <QObject>
6 class Callback : public QObject
8 Q_OBJECT
9 public Q_SLOTS:
10 virtual void call() = 0;
13 template <typename F>
14 class FunctionCallback : public Callback
16 F f;
18 public:
19 FunctionCallback(F f_) : f(std::move(f_)) {}
20 ~FunctionCallback() override {}
21 void call() override { f(this); }
24 template <typename F>
25 FunctionCallback<F>* makeCallback(F f)
27 return new FunctionCallback<F>(std::move(f));
30 #endif // BITCOIN_QT_CALLBACK_H