74 Q_ASSERT_X(action != 0,
"QWidgetGroup::_q_actionChanged",
"internal error");
92 Q_ASSERT_X(action != 0,
"QWidgetGroup::_q_actionTriggered",
"internal error");
93 emit q->triggered(action);
94 emit q->selected(action);
101 Q_ASSERT_X(action != 0,
"QWidgetGroup::_q_actionHovered",
"internal error");
102 emit q->hovered(action);
183 if(!
d->actions.contains(a)) {
184 d->actions.append(a);
189 if(!a->d_func()->forceDisabled) {
191 a->d_func()->forceDisabled =
false;
193 if(!a->d_func()->forceInvisible) {
195 a->d_func()->forceInvisible =
false;
200 if(oldGroup !=
this) {
202 oldGroup->removeAction(a);
203 a->d_func()->group =
this;
219 return new QAction(text,
this);
233 return new QAction(icon, text,
this);
245 if (
d->actions.removeAll(action)) {
246 if (action ==
d->current)
251 action->d_func()->group = 0;
318 if(!(*it)->d_func()->forceDisabled) {
319 (*it)->setEnabled(b);
320 (*it)->d_func()->forceDisabled =
false;
358 if(!(*it)->d_func()->forceInvisible) {
359 (*it)->setVisible(b);
360 (*it)->d_func()->forceInvisible =
false;
435 #include "moc_qactiongroup.cpp" 437 #endif // QT_NO_ACTION T qobject_cast(QObject *object)
QPointer< QAction > current
void hovered(QAction *)
This signal is emitted when the given action in the action group is highlighted by the user; for exam...
QActionGroup(QObject *parent)
Constructs an action group for the parent object.
#define QT_END_NAMESPACE
This macro expands to.
#define it(className, varName)
void removeAction(QAction *a)
Removes the action from this group.
QAction * checkedAction() const
Returns the currently checked action in the group, or 0 if none are checked.
The QList::const_iterator class provides an STL-style const iterator for QList and QQueue...
long ASN1_INTEGER_get ASN1_INTEGER * a
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
The QActionGroup class groups actions together.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void triggered(QAction *)
This signal is emitted when the given action in the action group is activated by the user; for exampl...
QAction * addAction(QAction *a)
Adds the action to this group, and returns it.
QList< QAction * > actions
The QList::iterator class provides an STL-style non-const iterator for QList and QQueue.
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
Disconnects signal in object sender from method in object receiver.
#define Q_ASSERT_X(cond, where, what)
#define Q_DECLARE_PUBLIC(Class)
~QActionGroup()
Destroys the action group.
void _q_actionTriggered()
QList< QAction * > actions() const
Returns the list of this groups's actions.
The QAction class provides an abstract user interface action that can be inserted into widgets...
The QList class is a template class that provides lists.
The QIcon class provides scalable icons in different modes and states.