CopperSpice API
1.9.2
|
Implements support for invocable actions in the interface. More...
Public Methods | |
virtual | ~QAccessibleActionInterface () |
virtual QStringList | actionNames () const = 0 |
virtual void | doAction (const QString &actionName) = 0 |
virtual QStringList | keyBindingsForAction (const QString &actionName) const = 0 |
virtual QString | localizedActionDescription (const QString &name) const |
virtual QString | localizedActionName (const QString &name) const |
Static Public Methods | |
static const QString & | decreaseAction () |
static const QString & | increaseAction () |
static QString | nextPageAction () |
static const QString & | pressAction () |
static QString | previousPageAction () |
static QString | scrollDownAction () |
static QString | scrollLeftAction () |
static QString | scrollRightAction () |
static QString | scrollUpAction () |
static const QString & | setFocusAction () |
static const QString & | showMenuAction () |
static const QString & | toggleAction () |
The QAccessibleActionInterface class implements support for invocable actions in the interface. Accessible objects should implement the action interface if they support user interaction. Usually this interface is implemented by classes which also implement QAccessibleInterface.
The supported actions should use the predefined actions offered in this class unless they do not fit a predefined action. In that case a custom action can be added.
When subclassing QAccessibleActionInterface provide a list of action names which is the primary means to discover the available actions. Action names are never localized. In order to present actions to the user there are two methods which need to return localized versions of the name and give a description of the action. For the predefined action names use localizedActionName() and localizedActionDescription() to return their localized counterparts.
The accepted practice is to use one of the predefined action names unless describing an action which does not fit.
In order to invoke the action doAction() is called with an action name. Most widgets will simply implement pressAction(). This is what happens when the widget is activated by being clicked, having the space bar pressed or some other input.
Action Name | Description |
---|---|
toggleAction() | Toggles the item (checkbox, radio button, etc) |
decreaseAction() | Decrease the value of the accessible (spinbox) |
increaseAction() | Increase the value of the accessible (spinbox) |
pressAction() | Press or click or activate the accessible, corresponding to clicking the object with the mouse |
setFocusAction() | Set the focus to this accessible |
showMenuAction() | Show a context menu, corresponds to right-clicks |
|
virtual |
Destroys the QAccessibleActionInterface.
|
pure virtual |
Returns the list of actions supported by this accessible object. The list does only contain actions that can be invoked. It will not return disabled actions or actions associated with disabled UI controls. The list can be empty. The actions returned should be in preferred order, for example the action the user most likely wants to trigger should be returned first while the least likely action should be returned last.
This list is not localized. For a localized representation reimplement localizedActionName() and localizedActionDescription().
Implemented in QAccessibleWidget::actionNames()
|
static |
Returns the name of the decrease default action.
|
pure virtual |
Invokes the action specified by actionName which is the non-localized name as returned by actionNames(). This method is usually implemented by calling the same methods which would be triggered by a normal user interaction, such as clicking the object with the mouse.
Implemented in QAccessibleWidget::doAction()
|
static |
Returns the name of the increase default action.
|
pure virtual |
Returns a list of the keyboard shortcuts for invoking the action with the given actionName. This is important to let users learn alternative ways of using the application by emphasizing the keyboard.
Implemented in QAccessibleWidget::keyBindingsForAction()
|
virtual |
Returns a localized action description of the action name. When using one of the default names, you can call this method in QAccessibleActionInterface to get the localized string.
Returns a localized action name of name. For custom actions this method has to be reimplemented. When using one of the default names call this method in QAccessibleActionInterface to get the localized string.
|
static |
Returns the name of the next page default action.
|
static |
Returns the name of the press default action.
|
static |
Returns the name of the previous page default action.
|
static |
Returns the name of the scroll down default action.
|
static |
Returns the name of the scroll left default action.
|
static |
Returns the name of the scroll right default action.
|
static |
Returns the name of the scroll up default action.
|
static |
Returns the name of the set focus default action.
|
static |
Returns the name of the show menu default action.
|
static |
Returns the name of the toggle default action.