Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQuickActionGroupPrivate Class Reference

Groups actions together. More...

Inheritance diagram for QQuickActionGroupPrivate:
Collaboration diagram for QQuickActionGroupPrivate:

Public Member Functions

void clear ()
void actionTriggered ()
void _q_updateCurrent ()
void clear ()
void actionTriggered ()
void _q_updateCurrent ()
Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
void setObjectNameWithoutBindings (const QString &name)
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
virtual ~QObjectPrivate ()
void deleteChildren ()
void clearBindingStorage ()
void setParent_helper (QObject *)
void moveToThread_helper ()
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
QObjectList receiverList (const char *signal) const
void ensureConnectionData ()
void addConnection (int signal, Connection *c)
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
bool maybeSignalConnected (uint signalIndex) const
bool isDeclarativeSignalConnected (uint signalIdx) const
void connectNotify (const QMetaMethod &signal)
void disconnectNotify (const QMetaMethod &signal)
void reinitBindingStorageAfterThreadMove ()
virtual std::string flagsForDumping () const
virtual void writeToDebugStream (QDebug &) const
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
Public Member Functions inherited from QObjectData
 QObjectData ()=default
virtual ~QObjectData ()=0
const QMetaObjectdynamicMetaObject () const

Static Public Member Functions

static bool changeEnabled (QQuickAction *action, bool enabled)
static void actions_append (QQmlListProperty< QQuickAction > *prop, QQuickAction *obj)
static qsizetype actions_count (QQmlListProperty< QQuickAction > *prop)
static QQuickActionactions_at (QQmlListProperty< QQuickAction > *prop, qsizetype index)
static void actions_clear (QQmlListProperty< QQuickAction > *prop)
static bool changeEnabled (QQuickAction *action, bool enabled)
static void actions_append (QQmlListProperty< QQuickAction > *prop, QQuickAction *obj)
static qsizetype actions_count (QQmlListProperty< QQuickAction > *prop)
static QQuickActionactions_at (QQmlListProperty< QQuickAction > *prop, qsizetype index)
static void actions_clear (QQmlListProperty< QQuickAction > *prop)
Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
static QObjectPrivateget (QObject *o)
static const QObjectPrivateget (const QObject *o)
template<typename Func1, typename Func2>
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
template<typename Func1, typename Func2>
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
static bool disconnect (const QObject *sender, int signal_index, void **slot)
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)

Public Attributes

bool enabled = true
bool exclusive = true
QPointer< QQuickActioncheckedAction
QList< QQuickAction * > actions
Public Attributes inherited from QObjectPrivate
ExtraDataextraData
QAtomicPointer< QThreadDatathreadData
QAtomicPointer< ConnectionDataconnections
union { 
   QObject *   currentChildBeingDeleted 
   QAbstractDeclarativeData *   declarativeData 
}; 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
Public Attributes inherited from QObjectData
QObjectq_ptr
QObjectparent
QObjectList children
uint isWidget: 1
uint blockSig: 1
uint wasDeleted: 1
uint isDeletingChildren: 1
uint sendChildEvents: 1
uint receiveChildEvents: 1
uint isWindow: 1
uint deleteLaterCalled: 1
uint isQuickItem: 1
uint willBeWidget: 1
uint wasWidget: 1
uint receiveParentEvents: 1
uint unused: 20
QAtomicInt postedEvents
QDynamicMetaObjectDatametaObject
QBindingStorage bindingStorage

Additional Inherited Members

Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>

Detailed Description

Groups actions together.

\qmltype ActionGroup
\inherits QtObject

! \nativetype QQuickActionGroup \inqmlmodule QtQuick.Controls

Since
5.10

ActionGroup is a non-visual group of actions. A mutually \l exclusive action group is used with actions where only one of the options can be selected at a time.

The most straight-forward way to use ActionGroup is to declare actions as children of the group.

ActionGroup {
id: alignmentGroup
Action {
checked: true
checkable: true
text: qsTr("Left")
}
Action {
checkable: true
text: qsTr("Center")
}
checkable: true
text: qsTr("Right")
}
}
GLenum GLuint id

Alternatively, the \l group attached property allows declaring the actions elsewhere and assigning them to a specific group.

ActionGroup { id: alignmentGroup }
Action {
checked: true
checkable: true
text: qsTr("Left")
ActionGroup.group: alignmentGroup
}
Action {
checkable: true
text: qsTr("Center")
ActionGroup.group: alignmentGroup
}
Action {
checkable: true
text: qsTr("Right")
ActionGroup.group: alignmentGroup
}
GLboolean GLuint group
[16]

More advanced use cases can be handled using the addAction() and removeAction() methods.

See also
Action, ButtonGroup

\qmlsignal QtQuick.Controls::ActionGroup::triggered(Action action)

This signal is emitted when an action in the group has been triggered.

This signal is convenient for implementing a common signal handler for all actions in the same group.

ActionGroup {
onTriggered: console.log("triggered:", action.text)
Action { text: "First" }
Action { text: "Second" }
Action { text: "Third" }
}
See also
Action::triggered()

Definition at line 110 of file qquickactiongroup.cpp.

Member Function Documentation

◆ _q_updateCurrent() [1/2]

void QQuickActionGroupPrivate::_q_updateCurrent ( )

Definition at line 150 of file qquickactiongroup.cpp.

References exclusive.

◆ _q_updateCurrent() [2/2]

void QQuickActionGroupPrivate::_q_updateCurrent ( )

◆ actions_append() [1/2]

void QQuickActionGroupPrivate::actions_append ( QQmlListProperty< QQuickAction > * prop,
QQuickAction * obj )
static

Definition at line 167 of file qquickactiongroup.cpp.

◆ actions_append() [2/2]

void QQuickActionGroupPrivate::actions_append ( QQmlListProperty< QQuickAction > * prop,
QQuickAction * obj )
static

◆ actions_at() [1/2]

QQuickAction * QQuickActionGroupPrivate::actions_at ( QQmlListProperty< QQuickAction > * prop,
qsizetype index )
static

Definition at line 179 of file qquickactiongroup.cpp.

◆ actions_at() [2/2]

QQuickAction * QQuickActionGroupPrivate::actions_at ( QQmlListProperty< QQuickAction > * prop,
qsizetype index )
static

◆ actions_clear() [1/2]

void QQuickActionGroupPrivate::actions_clear ( QQmlListProperty< QQuickAction > * prop)
static

Definition at line 185 of file qquickactiongroup.cpp.

◆ actions_clear() [2/2]

void QQuickActionGroupPrivate::actions_clear ( QQmlListProperty< QQuickAction > * prop)
static

◆ actions_count() [1/2]

qsizetype QQuickActionGroupPrivate::actions_count ( QQmlListProperty< QQuickAction > * prop)
static

Definition at line 173 of file qquickactiongroup.cpp.

◆ actions_count() [2/2]

qsizetype QQuickActionGroupPrivate::actions_count ( QQmlListProperty< QQuickAction > * prop)
static

◆ actionTriggered() [1/2]

void QQuickActionGroupPrivate::actionTriggered ( )

Definition at line 142 of file qquickactiongroup.cpp.

◆ actionTriggered() [2/2]

void QQuickActionGroupPrivate::actionTriggered ( )

◆ changeEnabled() [1/2]

bool QQuickActionGroupPrivate::changeEnabled ( QQuickAction * action,
bool enabled )
static

Definition at line 162 of file qquickactiongroup.cpp.

◆ changeEnabled() [2/2]

bool QQuickActionGroupPrivate::changeEnabled ( QQuickAction * action,
bool enabled )
static

◆ clear() [1/2]

void QQuickActionGroupPrivate::clear ( )

Definition at line 132 of file qquickactiongroup.cpp.

◆ clear() [2/2]

void QQuickActionGroupPrivate::clear ( )

Member Data Documentation

◆ actions

QList< QQuickAction * > QQuickActionGroupPrivate::actions

Definition at line 129 of file qquickactiongroup.cpp.

◆ checkedAction

QPointer< QQuickAction > QQuickActionGroupPrivate::checkedAction

Definition at line 128 of file qquickactiongroup.cpp.

◆ enabled

bool QQuickActionGroupPrivate::enabled = true

Definition at line 126 of file qquickactiongroup.cpp.

◆ exclusive

bool QQuickActionGroupPrivate::exclusive = true

Definition at line 127 of file qquickactiongroup.cpp.

Referenced by _q_updateCurrent().


The documentation for this class was generated from the following file: