![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qquickaction_p_p.h>
Static Public Member Functions | |
static QQuickActionPrivate * | get (QQuickAction *action) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (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 | explicitEnabled = false | |
bool | enabled = true | |
bool | checked = false | |
bool | checkable = false | |
QString | text | |
QQuickIcon | icon | |
QQuickActionGroup * | group = nullptr | |
![]() | ||
ExtraData * | extraData | |
QAtomicPointer< QThreadData > | threadData | |
QAtomicPointer< ConnectionData > | connections | |
union { | ||
QObject * currentChildBeingDeleted | ||
QAbstractDeclarativeData * declarativeData | ||
}; | ||
QAtomicPointer< QtSharedPointer::ExternalRefCountData > | sharedRefcount | |
![]() | ||
QObject * | q_ptr | |
QObject * | parent | |
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 | |
QDynamicMetaObjectData * | metaObject | |
QBindingStorage | bindingStorage | |
Additional Inherited Members | |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData> |
![]() | |
using | InDestructorTest |
using | WasDeletedTest |
Definition at line 31 of file qquickaction_p_p.h.
|
inlinestatic |
Definition at line 37 of file qquickaction_p_p.h.
bool QQuickActionPrivate::handleShortcutEvent | ( | QObject * | object, |
QShortcutEvent * | event ) |
|
overridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 260 of file qquickaction.cpp.
|
overridevirtual |
Reimplemented from QQuickItemChangeListener.
Definition at line 242 of file qquickaction.cpp.
void QQuickActionPrivate::registerItem | ( | QQuickItem * | item | ) |
Definition at line 211 of file qquickaction.cpp.
QT_BEGIN_NAMESPACE void QQuickActionPrivate::setEnabled | ( | bool | enable | ) |
Abstract user interface action.
\qmltype Action \inherits QtObject
! \nativetype QQuickAction \inqmlmodule QtQuick.Controls
Action represents an abstract user interface action that can have shortcuts and can be assigned to menu items and toolbar buttons.
Actions may contain \l text, an \l icon, and a \l shortcut. Actions are normally \l triggered by the user via menu items, toolbar buttons, or keyboard shortcuts. A \l checkable Action toggles its \l checked state when triggered.
Action is commonly used to implement application commands that can be invoked via menu items, toolbar buttons, and keyboard shortcuts. Since the user expects the commands to be performed in the same way, regardless of the user interface used, it is useful to represent the commands as shareable actions.
Action can be also used to separate the logic and the visual presentation. For example, when declaring buttons and menu items in .ui.qml files, actions can be declared elsewhere and assigned from the outside.
When an action is paired with buttons and menu items, the enabled
, checkable
, and checked
states are synced automatically. For example, in a word processor, if the user clicks a "Bold" toolbar button, the "Bold" menu item will automatically be checked. Buttons and menu items get their text
and icon
from the action by default. An action-specific text
or icon
can be overridden for a specific control by specifying text
or icon
directly on the control.
Since Action presents a user interface action, it is intended to be assigned to a \l MenuItem, \l ToolButton, or any other control that inherits \l AbstractButton. For keyboard shortcuts, the simpler \l Shortcut type is more appropriate.
\qmlsignal QtQuick.Controls::Action::toggled(QtObject source)
This signal is emitted when the action is toggled. The source argument identifies the object that toggled the action.
For example, if the action is assigned to a menu item and a toolbar button, the action is toggled when the control is toggled, the shortcut is activated, or when \l toggle() is called directly.
\qmlsignal QtQuick.Controls::Action::triggered(QtObject source)
This signal is emitted when the action is triggered. The source argument identifies the object that triggered the action.
For example, if the action is assigned to a menu item and a toolbar button, the action is triggered when the control is clicked, the shortcut is activated, or when \l trigger() is called directly.
Definition at line 172 of file qquickaction.cpp.
Definition at line 515 of file qquickaction.cpp.
References enabled.
void QQuickActionPrivate::unregisterItem | ( | QQuickItem * | item | ) |
Definition at line 226 of file qquickaction.cpp.
bool QQuickActionPrivate::unwatchItem | ( | QQuickItem * | item | ) |
Definition at line 200 of file qquickaction.cpp.
bool QQuickActionPrivate::watchItem | ( | QQuickItem * | item | ) |
Definition at line 189 of file qquickaction.cpp.
bool QQuickActionPrivate::checkable = false |
Definition at line 89 of file qquickaction_p_p.h.
bool QQuickActionPrivate::checked = false |
Definition at line 88 of file qquickaction_p_p.h.
bool QQuickActionPrivate::enabled = true |
Definition at line 87 of file qquickaction_p_p.h.
Referenced by trigger().
bool QQuickActionPrivate::explicitEnabled = false |
Definition at line 86 of file qquickaction_p_p.h.
QQuickActionGroup* QQuickActionPrivate::group = nullptr |
Definition at line 98 of file qquickaction_p_p.h.
QQuickIcon QQuickActionPrivate::icon |
Definition at line 91 of file qquickaction_p_p.h.
QString QQuickActionPrivate::text |
Definition at line 90 of file qquickaction_p_p.h.