summaryrefslogtreecommitdiffstats
path: root/src/input/rebootSystemHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/rebootSystemHandler.h')
-rw-r--r--src/input/rebootSystemHandler.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/input/rebootSystemHandler.h b/src/input/rebootSystemHandler.h
index 34fa8ae..357dcad 100644
--- a/src/input/rebootSystemHandler.h
+++ b/src/input/rebootSystemHandler.h
@@ -20,15 +20,17 @@
#include <QCoreApplication>
#include "inputEventHandler.h"
-class RebootLinuxSystemHandler : public DefaultInputEventHandler<InputEvent::ET_SPECIAL, InputEvent::EC_REBOOT>
+/**
+ * Reboot a Linux system.
+ */
+class RebootLinuxSystemHandler : public InputEventHandler<
+ input_policy::Require<input_policy::LinuxSystem> >
{
public:
- void handle(InputEvent const&, InputEventContext const*);
-
- static void describeInto(QList<SpecialInputEventDescription>& list)
- {
- list << SpecialInputEventDescription(tr(QT_TRANSLATE_NOOP("InputEventHandler", "Reboot")), InputEvent::ET_SPECIAL, InputEvent::EC_REBOOT);
- }
+ /**
+ * Send SIGINT to the process with PID 1.
+ */
+ void doHandle(InputEvent const&, InputEventContext const*);
};
#endif /* REBOOTSYSTEMHANDLER_H_ */