summaryrefslogtreecommitdiffstats
path: root/framework/domain/controller.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-02 13:57:44 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-01-02 14:01:13 +0100
commitccb647b4d0f7627bddf5df8b488ebcac2f463829 (patch)
tree8f2f0e1591d79c55b4cd59e4391f67bc21d38130 /framework/domain/controller.h
parent9958a642b2c605b397be23b4ee6b02375c5d240e (diff)
downloadkube-ccb647b4d0f7627bddf5df8b488ebcac2f463829.tar.gz
kube-ccb647b4d0f7627bddf5df8b488ebcac2f463829.zip
Less boilerplate
Diffstat (limited to 'framework/domain/controller.h')
-rw-r--r--framework/domain/controller.h7
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)
51public: 51public:
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();