CopperSpice API  1.9.1
QAccessibleActionInterface Class Referenceabstract

Implements support for invocable actions in the interface. More...

Inheritance diagram for QAccessibleActionInterface:
QAccessibleWidget

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 QStringdecreaseAction ()
 
static const QStringincreaseAction ()
 
static QString nextPageAction ()
 
static const QStringpressAction ()
 
static QString previousPageAction ()
 
static QString scrollDownAction ()
 
static QString scrollLeftAction ()
 
static QString scrollRightAction ()
 
static QString scrollUpAction ()
 
static const QStringsetFocusAction ()
 
static const QStringshowMenuAction ()
 
static const QStringtoggleAction ()
 

Detailed Description

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.

Actions

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

Constructor & Destructor Documentation

QAccessibleActionInterface::~QAccessibleActionInterface ( )
virtual

Destroys the QAccessibleActionInterface.

Method Documentation

QStringList QAccessibleActionInterface::actionNames ( ) const
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().

See also
doAction(), localizedActionName(), localizedActionDescription()

Implemented in QAccessibleWidget::actionNames()

const QString & QAccessibleActionInterface::decreaseAction ( )
static

Returns the name of the decrease default action.

See also
actionNames(), localizedActionName()
void QAccessibleActionInterface::doAction ( const QString actionName)
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.

See also
actionNames()

Implemented in QAccessibleWidget::doAction()

const QString & QAccessibleActionInterface::increaseAction ( )
static

Returns the name of the increase default action.

See also
actionNames(), localizedActionName()
QStringList QAccessibleActionInterface::keyBindingsForAction ( const QString actionName) const
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.

See also
actionNames()

Implemented in QAccessibleWidget::keyBindingsForAction()

QString QAccessibleActionInterface::localizedActionDescription ( const QString name) const
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.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::localizedActionName ( const QString name) const
virtual

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.

See also
actionNames(), localizedActionDescription()
QString QAccessibleActionInterface::nextPageAction ( )
static

Returns the name of the next page default action.

See also
actionNames(), localizedActionName()
const QString & QAccessibleActionInterface::pressAction ( )
static

Returns the name of the press default action.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::previousPageAction ( )
static

Returns the name of the previous page default action.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::scrollDownAction ( )
static

Returns the name of the scroll down default action.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::scrollLeftAction ( )
static

Returns the name of the scroll left default action.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::scrollRightAction ( )
static

Returns the name of the scroll right default action.

See also
actionNames(), localizedActionName()
QString QAccessibleActionInterface::scrollUpAction ( )
static

Returns the name of the scroll up default action.

See also
actionNames(), localizedActionName()
const QString & QAccessibleActionInterface::setFocusAction ( )
static

Returns the name of the set focus default action.

See also
actionNames(), localizedActionName()
const QString & QAccessibleActionInterface::showMenuAction ( )
static

Returns the name of the show menu default action.

See also
actionNames(), localizedActionName()
const QString & QAccessibleActionInterface::toggleAction ( )
static

Returns the name of the toggle default action.

See also
actionNames(), localizedActionName()