1 
2 #ifndef __ENABLEPLAYWIDGET__
3 #define __ENABLEPLAYWIDGET__
4 
5 /*
6  This class was created for keyboard accessibility purposes.
7  It should be used by widgets that want to allow score playback if they have focus, but not their children.
8  Additionally, if one of its children widgets has focus and Escape is pressed the target widget will gain focus.
9  The shortcut for this target widget's play action will always be the same as the global one ( getAction("play") )
10 
11  NOTE: The client is responsible for setting the appropriate Focus Policies for its controllers and forwards the
12  calls of showEvent and eventFilter to their reference of EnablePlayForWidget object.
13 
14 */
15 namespace Ms {
16 
17 class EnablePlayForWidget {
18       QAction* _localPlayAction;
19       QWidget* _target;
20 
21 public:
22       void showEvent(QShowEvent *);
23       bool eventFilter(QObject* obj, QEvent* e);
24       EnablePlayForWidget(QWidget* target);
25       void connectLocalPlayToDifferentSlot(QObject* obj, const char* id);
26 };
27 
28 }
29 
30 #endif
31