MuseScore
3.4
Music composition and notation
mscore
enableplayforwidget.h
Go to the documentation of this file.
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
Ms::EnablePlayForWidget::EnablePlayForWidget
EnablePlayForWidget(QWidget *target)
Definition:
enableplayforwidget.cpp:7
Ms::EnablePlayForWidget::showEvent
void showEvent(QShowEvent *)
Definition:
enableplayforwidget.cpp:22
Ms::EnablePlayForWidget::eventFilter
bool eventFilter(QObject *obj, QEvent *e)
Definition:
enableplayforwidget.cpp:34
Ms::EnablePlayForWidget::_target
QWidget * _target
Definition:
enableplayforwidget.h:19
Ms::EnablePlayForWidget::connectLocalPlayToDifferentSlot
void connectLocalPlayToDifferentSlot(QObject *obj, const char *id)
Definition:
enableplayforwidget.cpp:61
Ms::EnablePlayForWidget
Definition:
enableplayforwidget.h:17
Ms::EnablePlayForWidget::_localPlayAction
QAction * _localPlayAction
Definition:
enableplayforwidget.h:18
Ms
Definition:
aeolus.cpp:26
Generated by
1.8.13