The QActionGroup class combines actions to a group. More...
#include <qaction.h>
Inherits QAction.
Type | Name | READ | WRITE | Options |
---|---|---|---|---|
bool | exclusive | isExclusive | setExclusive |
An action group makes it easier to deal with groups of actions. It allows to add, remove or activate its children with a single call and provides radio semantics ("one of many" choice) for toggle actions.
QActionGroup is an action by its own and thus can be treated as such. Standard action functions like addTo(), removeFrom() and setEnabled() are automatically performed on all members of the group, i.e. for example that adding a group to a toolbar creates a tool button for each child action.
Toggle action handling is controlled with the setExclusive() flag, with the default being TRUE. An exclusive group switches off all toggle actions except the one that was activated. This results in a "one of many" choice similar to a group of radio buttons (see QRadioButton). An exclusive group emits the signal selected() whenever the current child action changes.
Constructs an action group with parent parent and name name.
If exclusive is TRUE, any toggle action that is a member of this group is toggled off by another action being toggled on.
Destroys the object and frees any allocated resources.
[virtual]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QAction.
Inserts action action to the group.
It is not necessary to manually insert actions that have this action group as their parent object.
Returns TRUE if the action group is exclusive, otherwise FALSE.
See also setExclusive().
[virtual]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QAction.
[signal]
This signal is emitted in exclusive groups when the current toggle action changes.
See also setExclusive().
[virtual]
Reimplemented for internal reasons; the API is not affected.
Reimplemented from QAction.
Sets the action group to be exclusive if enable is TRUE, or to be non-exclusive if enable is FALSE.
In an exclusive group, any toggle action that is a member of this group is toggled off by another action being toggled on.
See also isExclusive().
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright © 2000 Trolltech | Trademarks | Qt version 2.2.1
|