# ActionContext QML Type

Since: | Qt 1.0

- List of all members, including inherited members

## Properties

- actions : Action
- active : bool

## Methods

- addAction(action)
- removeAction(action)

## Detailed Description

ActionContext groups actions together and by providing multiple contexts the developer is able to control the visibility of the actions. The ActionManager then exposes the actions from these different contexts. See Action Contexts for more details.

## Property Documentation

[default] actions : Action

List of Actions in this ActionContext.

This is the default property of ActionContext.

active : bool

If true the context is active. If false the context is inactive.

When context has been added to the ActionManager setting this value controls whether or not the actions in a context are available to external components.

The ActionManager monitors the active property of each of the local contexts that has been added to it. There can be only one active local context at a time. When one of the local contexts sets itself active the manager will notice this, export the actions from that given context and set the previously active local context as inactive. This way setting active to true on a local context is sufficient to manage the active local context of the manager and no additional calls are necessary to manually inactivate the other contexts.

## Method Documentation

addAction(action)

Adds an action to the context.

Calling this function multiple times with the same action does not have any side effects; the action gets added only once.

removeAction(action)

Removes an action from the context.

Calling this function multiple times with the same action does not have any side effects; the action gets removed only if it was first added to the context with addAction().