Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQuickKeysAttached Class Reference

#include <qquickitem_p.h>

+ Inheritance diagram for QQuickKeysAttached:
+ Collaboration diagram for QQuickKeysAttached:

Public Types

enum  Priority { BeforeItem , AfterItem }
 

Signals

void enabledChanged ()
 
void priorityChanged ()
 
void pressed (QQuickKeyEvent *event)
 
void released (QQuickKeyEvent *event)
 
void shortcutOverride (QQuickKeyEvent *event)
 
void digit0Pressed (QQuickKeyEvent *event)
 
void digit1Pressed (QQuickKeyEvent *event)
 
void digit2Pressed (QQuickKeyEvent *event)
 
void digit3Pressed (QQuickKeyEvent *event)
 
void digit4Pressed (QQuickKeyEvent *event)
 
void digit5Pressed (QQuickKeyEvent *event)
 
void digit6Pressed (QQuickKeyEvent *event)
 
void digit7Pressed (QQuickKeyEvent *event)
 
void digit8Pressed (QQuickKeyEvent *event)
 
void digit9Pressed (QQuickKeyEvent *event)
 
void leftPressed (QQuickKeyEvent *event)
 
void rightPressed (QQuickKeyEvent *event)
 
void upPressed (QQuickKeyEvent *event)
 
void downPressed (QQuickKeyEvent *event)
 
void tabPressed (QQuickKeyEvent *event)
 
void backtabPressed (QQuickKeyEvent *event)
 
void asteriskPressed (QQuickKeyEvent *event)
 
void numberSignPressed (QQuickKeyEvent *event)
 
void escapePressed (QQuickKeyEvent *event)
 
void returnPressed (QQuickKeyEvent *event)
 
void enterPressed (QQuickKeyEvent *event)
 
void deletePressed (QQuickKeyEvent *event)
 
void spacePressed (QQuickKeyEvent *event)
 
void backPressed (QQuickKeyEvent *event)
 
void cancelPressed (QQuickKeyEvent *event)
 
void selectPressed (QQuickKeyEvent *event)
 
void yesPressed (QQuickKeyEvent *event)
 
void noPressed (QQuickKeyEvent *event)
 
void context1Pressed (QQuickKeyEvent *event)
 
void context2Pressed (QQuickKeyEvent *event)
 
void context3Pressed (QQuickKeyEvent *event)
 
void context4Pressed (QQuickKeyEvent *event)
 
void callPressed (QQuickKeyEvent *event)
 
void hangupPressed (QQuickKeyEvent *event)
 
void flipPressed (QQuickKeyEvent *event)
 
void menuPressed (QQuickKeyEvent *event)
 
void volumeUpPressed (QQuickKeyEvent *event)
 
void volumeDownPressed (QQuickKeyEvent *event)
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked.
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 This signal is emitted after the object's name has been changed.
 

Public Member Functions

 QQuickKeysAttached (QObject *parent=nullptr)
 \qmltype Keys \instantiates QQuickKeysAttached \inqmlmodule QtQuick
 
 ~QQuickKeysAttached () override
 
bool enabled () const
 
void setEnabled (bool enabled)
 
Priority priority () const
 
void setPriority (Priority)
 
QQmlListProperty< QQuickItemforwardTo ()
 
void componentComplete () override
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 Constructs an object with parent object parent.
 
virtual ~QObject ()
 Destroys the object, deleting all its child objects.
 
virtual bool event (QEvent *event)
 This virtual function receives events to an object and should return true if the event e was recognized and processed.
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 Filters events if this object has been installed as an event filter for the watched object.
 
QString objectName () const
 
Q_WEAK_OVERLOAD void setObjectName (const QString &name)
 Sets the object's name to name.
 
void setObjectName (QAnyStringView name)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 Returns true if the object is a widget; otherwise returns false.
 
bool isWindowType () const
 Returns true if the object is a window; otherwise returns false.
 
bool isQuickItemType () const
 Returns true if the object is a QQuickItem; otherwise returns false.
 
bool signalsBlocked () const noexcept
 Returns true if signals are blocked; otherwise returns false.
 
bool blockSignals (bool b) noexcept
 If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it).
 
QThreadthread () const
 Returns the thread in which the object lives.
 
void moveToThread (QThread *thread)
 Changes the thread affinity for this object and its children.
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds.
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 Kills the timer with timer identifier, id.
 
template<typename T >
findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object.
 
template<typename T >
QList< T > findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects.
 
template<typename T >
QList< T > findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
const QObjectListchildren () const
 Returns a list of child objects.
 
void setParent (QObject *parent)
 Makes the object a child of parent.
 
void installEventFilter (QObject *filterObj)
 Installs an event filter filterObj on this object.
 
void removeEventFilter (QObject *obj)
 Removes an event filter object obj from this object.
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 Dumps a tree of children to the debug output.
 
void dumpObjectInfo () const
 Dumps information about signal connections, etc.
 
bool setProperty (const char *name, const QVariant &value)
 Sets the value of the object's name property to value.
 
bool setProperty (const char *name, QVariant &&value)
 
QVariant property (const char *name) const
 Returns the value of the object's name property.
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 Returns a pointer to the parent object.
 
bool inherits (const char *classname) const
 Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false.
 
- Public Member Functions inherited from QQuickItemKeyFilter
 QQuickItemKeyFilter (QQuickItem *=nullptr)
 
virtual ~QQuickItemKeyFilter ()
 
virtual void keyPressed (QKeyEvent *event, bool post)
 
virtual void keyReleased (QKeyEvent *event, bool post)
 
virtual void shortcutOverrideEvent (QKeyEvent *event)
 
virtual void componentComplete ()
 

Static Public Member Functions

static QQuickKeysAttachedqmlAttachedProperties (QObject *)
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 \threadsafe
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 \threadsafe
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 Disconnect a connection.
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 

Properties

bool enabled
 
QQmlListProperty< QQuickItemforwardTo
 
Priority priority
 
- Properties inherited from QObject
QString objectName
 the name of this object
 

Private Member Functions

void keyPressed (QKeyEvent *event, bool post) override
 
void keyReleased (QKeyEvent *event, bool post) override
 
void shortcutOverrideEvent (QKeyEvent *event) override
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 \threadsafe
 
- Public Attributes inherited from QQuickItemKeyFilter
bool m_processPost
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr.
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 Returns the number of receivers connected to the signal.
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 This event handler can be reimplemented in a subclass to receive timer events for the object.
 
virtual void childEvent (QChildEvent *event)
 This event handler can be reimplemented in a subclass to receive child events.
 
virtual void customEvent (QEvent *event)
 This event handler can be reimplemented in a subclass to receive custom events.
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 

Detailed Description

Definition at line 884 of file qquickitem_p.h.

Member Enumeration Documentation

◆ Priority

Enumerator
BeforeItem 
AfterItem 

Definition at line 911 of file qquickitem_p.h.

Constructor & Destructor Documentation

◆ QQuickKeysAttached()

QQuickKeysAttached::QQuickKeysAttached ( QObject parent = nullptr)

\qmltype Keys \instantiates QQuickKeysAttached \inqmlmodule QtQuick

Provides key handling to Items.

All visual primitives support key handling via the Keys attached property. Keys can be handled via the onPressed and onReleased signal properties.

The signal properties have a \l KeyEvent parameter, named event which contains details of the event. If a key is handled event.accepted should be set to true to prevent the event from propagating up the item hierarchy.

Definition at line 1219 of file qquickitem.cpp.

References d, QQuickItemKeyFilter::m_processPost, QObject::parent(), qmlobject_cast< QQuickItem * >(), and qWarning.

+ Here is the call graph for this function:

◆ ~QQuickKeysAttached()

QQuickKeysAttached::~QQuickKeysAttached ( )
override

Definition at line 1230 of file qquickitem.cpp.

Member Function Documentation

◆ asteriskPressed

void QQuickKeysAttached::asteriskPressed ( QQuickKeyEvent event)
signal

◆ backPressed

void QQuickKeysAttached::backPressed ( QQuickKeyEvent event)
signal

◆ backtabPressed

void QQuickKeysAttached::backtabPressed ( QQuickKeyEvent event)
signal

◆ callPressed

void QQuickKeysAttached::callPressed ( QQuickKeyEvent event)
signal

◆ cancelPressed

void QQuickKeysAttached::cancelPressed ( QQuickKeyEvent event)
signal

◆ componentComplete()

void QQuickKeysAttached::componentComplete ( )
overridevirtual

Reimplemented from QQuickItemKeyFilter.

Definition at line 1248 of file qquickitem.cpp.

References d, and QQuickItem::flags().

+ Here is the call graph for this function:

◆ context1Pressed

void QQuickKeysAttached::context1Pressed ( QQuickKeyEvent event)
signal

◆ context2Pressed

void QQuickKeysAttached::context2Pressed ( QQuickKeyEvent event)
signal

◆ context3Pressed

void QQuickKeysAttached::context3Pressed ( QQuickKeyEvent event)
signal

◆ context4Pressed

void QQuickKeysAttached::context4Pressed ( QQuickKeyEvent event)
signal

◆ deletePressed

void QQuickKeysAttached::deletePressed ( QQuickKeyEvent event)
signal

◆ digit0Pressed

void QQuickKeysAttached::digit0Pressed ( QQuickKeyEvent event)
signal

◆ digit1Pressed

void QQuickKeysAttached::digit1Pressed ( QQuickKeyEvent event)
signal

◆ digit2Pressed

void QQuickKeysAttached::digit2Pressed ( QQuickKeyEvent event)
signal

◆ digit3Pressed

void QQuickKeysAttached::digit3Pressed ( QQuickKeyEvent event)
signal

◆ digit4Pressed

void QQuickKeysAttached::digit4Pressed ( QQuickKeyEvent event)
signal

◆ digit5Pressed

void QQuickKeysAttached::digit5Pressed ( QQuickKeyEvent event)
signal

◆ digit6Pressed

void QQuickKeysAttached::digit6Pressed ( QQuickKeyEvent event)
signal

◆ digit7Pressed

void QQuickKeysAttached::digit7Pressed ( QQuickKeyEvent event)
signal

◆ digit8Pressed

void QQuickKeysAttached::digit8Pressed ( QQuickKeyEvent event)
signal

◆ digit9Pressed

void QQuickKeysAttached::digit9Pressed ( QQuickKeyEvent event)
signal

◆ downPressed

void QQuickKeysAttached::downPressed ( QQuickKeyEvent event)
signal

◆ enabled()

bool QQuickKeysAttached::enabled ( ) const
inline

Definition at line 902 of file qquickitem_p.h.

References d.

◆ enabledChanged

void QQuickKeysAttached::enabledChanged ( )
signal

◆ enterPressed

void QQuickKeysAttached::enterPressed ( QQuickKeyEvent event)
signal

◆ escapePressed

void QQuickKeysAttached::escapePressed ( QQuickKeyEvent event)
signal

◆ flipPressed

void QQuickKeysAttached::flipPressed ( QQuickKeyEvent event)
signal

◆ forwardTo()

QQmlListProperty< QQuickItem > QQuickKeysAttached::forwardTo ( )
inline

Definition at line 916 of file qquickitem_p.h.

References d.

◆ hangupPressed

void QQuickKeysAttached::hangupPressed ( QQuickKeyEvent event)
signal

◆ keyPressed()

void QQuickKeysAttached::keyPressed ( QKeyEvent event,
bool  post 
)
overrideprivatevirtual

Reimplemented from QQuickItemKeyFilter.

Definition at line 1264 of file qquickitem.cpp.

References d, Qt::DirectConnection, emit, i, QQuickKeyEvent::isAccepted(), QByteArray::isEmpty(), QQuickItemKeyFilter::keyPressed(), QQuickItemKeyFilter::m_processPost, metaObject(), pressed(), Q_ARG, QQuickKeyEvent::reset(), QCoreApplication::sendEvent(), and QQuickKeyEvent::setAccepted().

+ Here is the call graph for this function:

◆ keyReleased()

void QQuickKeysAttached::keyReleased ( QKeyEvent event,
bool  post 
)
overrideprivatevirtual

Reimplemented from QQuickItemKeyFilter.

Definition at line 1309 of file qquickitem.cpp.

References d, emit, i, QQuickKeyEvent::isAccepted(), QQuickItemKeyFilter::keyReleased(), QQuickItemKeyFilter::m_processPost, released(), QQuickKeyEvent::reset(), and QCoreApplication::sendEvent().

+ Here is the call graph for this function:

◆ leftPressed

void QQuickKeysAttached::leftPressed ( QQuickKeyEvent event)
signal

◆ menuPressed

void QQuickKeysAttached::menuPressed ( QQuickKeyEvent event)
signal

◆ noPressed

void QQuickKeysAttached::noPressed ( QQuickKeyEvent event)
signal

◆ numberSignPressed

void QQuickKeysAttached::numberSignPressed ( QQuickKeyEvent event)
signal

◆ pressed

void QQuickKeysAttached::pressed ( QQuickKeyEvent event)
signal

Referenced by keyPressed().

+ Here is the caller graph for this function:

◆ priority()

QQuickKeysAttached::Priority QQuickKeysAttached::priority ( ) const

Definition at line 1234 of file qquickitem.cpp.

References AfterItem, BeforeItem, and QQuickItemKeyFilter::m_processPost.

◆ priorityChanged

void QQuickKeysAttached::priorityChanged ( )
signal

Referenced by setPriority().

+ Here is the caller graph for this function:

◆ qmlAttachedProperties()

QQuickKeysAttached * QQuickKeysAttached::qmlAttachedProperties ( QObject obj)
static

Definition at line 1393 of file qquickitem.cpp.

◆ released

void QQuickKeysAttached::released ( QQuickKeyEvent event)
signal

Referenced by keyReleased().

+ Here is the caller graph for this function:

◆ returnPressed

void QQuickKeysAttached::returnPressed ( QQuickKeyEvent event)
signal

◆ rightPressed

void QQuickKeysAttached::rightPressed ( QQuickKeyEvent event)
signal

◆ selectPressed

void QQuickKeysAttached::selectPressed ( QQuickKeyEvent event)
signal

◆ setEnabled()

void QQuickKeysAttached::setEnabled ( bool  enabled)
inline

Definition at line 903 of file qquickitem_p.h.

References d, enabled, and Q_EMIT.

◆ setPriority()

void QQuickKeysAttached::setPriority ( Priority  order)

Definition at line 1239 of file qquickitem.cpp.

References AfterItem, emit, QQuickItemKeyFilter::m_processPost, and priorityChanged().

+ Here is the call graph for this function:

◆ shortcutOverride

void QQuickKeysAttached::shortcutOverride ( QQuickKeyEvent event)
signal

Referenced by shortcutOverrideEvent().

+ Here is the caller graph for this function:

◆ shortcutOverrideEvent()

void QQuickKeysAttached::shortcutOverrideEvent ( QKeyEvent event)
overrideprivatevirtual

Reimplemented from QQuickItemKeyFilter.

Definition at line 1383 of file qquickitem.cpp.

References d, emit, QQuickKeyEvent::isAccepted(), QQuickKeyEvent::reset(), and shortcutOverride().

+ Here is the call graph for this function:

◆ spacePressed

void QQuickKeysAttached::spacePressed ( QQuickKeyEvent event)
signal

◆ tabPressed

void QQuickKeysAttached::tabPressed ( QQuickKeyEvent event)
signal

◆ upPressed

void QQuickKeysAttached::upPressed ( QQuickKeyEvent event)
signal

◆ volumeDownPressed

void QQuickKeysAttached::volumeDownPressed ( QQuickKeyEvent event)
signal

◆ volumeUpPressed

void QQuickKeysAttached::volumeUpPressed ( QQuickKeyEvent event)
signal

◆ yesPressed

void QQuickKeysAttached::yesPressed ( QQuickKeyEvent event)
signal

Property Documentation

◆ enabled

bool QQuickKeysAttached::enabled
readwrite

Definition at line 881 of file qquickitem_p.h.

◆ forwardTo

QQmlListProperty<QQuickItem> QQuickKeysAttached::forwardTo
read

Definition at line 881 of file qquickitem_p.h.

◆ priority

Priority QQuickKeysAttached::priority
readwrite

Definition at line 881 of file qquickitem_p.h.


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