From 4b094beb151373abb4a24d473c6d69a11674c5ba Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 24 Feb 2016 12:37:51 +0100 Subject: Moved the ActionHandlerHelper --- framework/actions/actionhandler.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'framework/actions/actionhandler.h') diff --git a/framework/actions/actionhandler.h b/framework/actions/actionhandler.h index cfcfddd7..1820bfd4 100644 --- a/framework/actions/actionhandler.h +++ b/framework/actions/actionhandler.h @@ -20,6 +20,7 @@ #include #include +#include namespace Kube { class Context; @@ -45,4 +46,20 @@ private: QByteArray mActionId; }; +class ActionHandlerHelper : public ActionHandler +{ + Q_OBJECT +public: + typedef std::function IsReadyFunction; + typedef std::function Handler; + + ActionHandlerHelper(const QByteArray &actionId, const IsReadyFunction &, const Handler &); + + bool isActionReady(Context *context) Q_DECL_OVERRIDE; + void execute(Context *context) Q_DECL_OVERRIDE; +private: + const std::function isReadyFunction; + const std::function handlerFunction; +}; + } -- cgit v1.2.3