diff options
| author | Sebastien Braun | 2010-10-07 22:54:10 +0200 |
|---|---|---|
| committer | Sebastien Braun | 2010-10-07 22:54:10 +0200 |
| commit | e61097b8881bc7e72a5499816cb1199ea274a3ca (patch) | |
| tree | bcfa9f3fe3f43af02845bc21367de395b248600c /src/input/sayHelloHandler.h | |
| parent | Make behaviour on lookup failures configurable (diff) | |
| download | pvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.tar.gz pvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.tar.xz pvs-e61097b8881bc7e72a5499816cb1199ea274a3ca.zip | |
Rework template meta-magic
- No more implicit dependency on Boost.MPL
- Better documentation for template magic
- Move input handler policies to handler definitions where they belong
- Separate out event descriptions from handlers
Diffstat (limited to 'src/input/sayHelloHandler.h')
| -rw-r--r-- | src/input/sayHelloHandler.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/input/sayHelloHandler.h b/src/input/sayHelloHandler.h index b0d4c7e..00463ca 100644 --- a/src/input/sayHelloHandler.h +++ b/src/input/sayHelloHandler.h @@ -20,15 +20,12 @@ #include <QCoreApplication> #include "inputEventHandler.h" -class SayHelloHandler : public DefaultInputEventHandler<InputEvent::ET_SPECIAL, InputEvent::EC_SAY_HELLO> +class SayHelloHandler : public InputEventHandler< + input_policy::Match<InputEvent::ET_SPECIAL, InputEvent::EC_SAY_HELLO>, + input_policy::Security<input_policy::AllowEverybody> > { public: - void handle(InputEvent const&, InputEventContext const*); - - static void describeInto(QList<SpecialInputEventDescription>& list) - { - list << SpecialInputEventDescription(tr(QT_TRANSLATE_NOOP("InputEventHandler", "Say Hello")), InputEvent::ET_SPECIAL, InputEvent::EC_SAY_HELLO); - } + void doHandle(InputEvent const&, InputEventContext const*); }; #endif /* SAYHELLOHANDLER_CPP_ */ |
