QActionGroup(3qt)

NAME
QActionGroup - Combines actions to a group

#include <qaction.h>

Inherits QAction.

  Public Members
QActionGroup ( QWidget * parent, const char * name = 0, bool exclusive = TRUE )
~QActionGroup ()
void setExclusive ( bool )
bool isExclusive () const
void insert ( QAction * )

  Signals
void selected ( QAction * )

  Properties
Type | Name | READ | WRITE | Options
bool | exclusive | isExclusive | setExclusive

DESCRIPTION
The QActionGroup class combines actions to a group.

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.

MEMBER FUNCTION DOCUMENTATION

QActionGroup::QActionGroup ( QWidget * parent, const char * name = 0, bool exclusive = TRUE )
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.

QActionGroup::~QActionGroup ()
Destroys the object and frees any allocated resources.

bool QActionGroup::addTo ( QWidget * w ) [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QAction.

void QActionGroup::insert ( QAction * action )
Inserts action action to the group.

It is not necessary to manually insert actions that have this action group as their parent object.

bool QActionGroup::isExclusive () const
Returns TRUE if the action group is exclusive, otherwise FALSE.

See also setExclusive().

bool QActionGroup::removeFrom ( QWidget * w ) [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QAction.

void QActionGroup::selected ( QAction * ) [signal]
This signal is emitted in exclusive groups when the current toggle action changes.

See also setExclusive().

void QActionGroup::setEnabled ( bool enable ) [virtual]
Reimplemented for internal reasons; the API is not affected.

Reimplemented from QAction.

void QActionGroup::setExclusive ( bool enable )
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().

SEE ALSO
http://doc.trolltech.com/qactiongroup.html http://www.trolltech.com/faq/tech.html

COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement.

AUTHOR
Generated automatically from the source code.

BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qactiongroup.3qt) and the Qt version (2.3.1).