From e3dcd9bc390bab4e650ec5bcbc1720cdcdea0247 Mon Sep 17 00:00:00 2001 From: Sebastien Braun Date: Tue, 5 Oct 2010 15:26:13 +0200 Subject: Add description to input event handlers so they can --- src/input/inputEventHandler.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'src/input') diff --git a/src/input/inputEventHandler.h b/src/input/inputEventHandler.h index a0ada2e..44713c2 100644 --- a/src/input/inputEventHandler.h +++ b/src/input/inputEventHandler.h @@ -18,6 +18,9 @@ #define INPUTEVENTHANDLER_H_ #include +#include +#include +#include #include #include #include @@ -57,6 +60,12 @@ template class DefaultInputEventHandler { +protected: + static QString tr(char const* string) + { + return QCoreApplication::translate("InputEventHandler", string); + } + public: virtual bool matches(InputEvent const& evt, InputEventContext const*) { if(Type != HANDLER_TYPE_DONT_CARE) { @@ -160,6 +169,11 @@ public: delegate.initialize(); } + static void describeInto(QList& list) + { + Delegate::describeInto(list); + } + private: Delegate delegate; SecurityPolicy securityPolicy; @@ -176,6 +190,10 @@ public: void initialize() { } + + static void describeInto(QList&) + { + } }; template > @@ -206,6 +224,18 @@ public: _handler.initialize(); _next.initialize(); } + + static void describeInto(QList& list) + { + handler_type::describeInto(list); + next_in_chain::describeInto(list); + } + + static QList describe() + { + QList list; + describeInto(list); + return list; } }; @@ -219,6 +249,16 @@ struct InputEventHandlerChainHelper void initialize() { // do nothing } + + static void describeInto(QList&) + { + // do nothing + } + + static QList describe() + { + return QList(); + } }; template -- cgit v1.2.3-55-g7522