diff options
Diffstat (limited to 'framework/domain/controller.h')
-rw-r--r-- | framework/domain/controller.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/domain/controller.h b/framework/domain/controller.h index 77baa606..9370fdc7 100644 --- a/framework/domain/controller.h +++ b/framework/domain/controller.h | |||
@@ -50,6 +50,13 @@ class ControllerAction : public QObject { | |||
50 | Q_PROPERTY(bool enabled MEMBER mEnabled NOTIFY enabledChanged) | 50 | Q_PROPERTY(bool enabled MEMBER mEnabled NOTIFY enabledChanged) |
51 | public: | 51 | public: |
52 | ControllerAction(); | 52 | ControllerAction(); |
53 | template <typename Func> | ||
54 | ControllerAction(const typename QtPrivate::FunctionPointer<Func>::Object *obj, Func slot) | ||
55 | : ControllerAction() | ||
56 | { | ||
57 | QObject::connect(this, &ControllerAction::triggered, obj, slot); | ||
58 | } | ||
59 | |||
53 | ~ControllerAction() = default; | 60 | ~ControllerAction() = default; |
54 | 61 | ||
55 | Q_INVOKABLE void execute(); | 62 | Q_INVOKABLE void execute(); |