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
QMetaObject::Connection Class Reference

\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection. More...

#include <qobjectdefs.h>

+ Collaboration diagram for QMetaObject::Connection:

Public Types

typedef void *Connection::* RestrictedBool
 

Public Member Functions

 ~Connection ()
 Destructor for QMetaObject::Connection.
 
 Connection ()
 Creates a Connection instance.
 
 Connection (const Connection &other)
 Create a copy of the handle to the other connection.
 
Connectionoperator= (const Connection &other)
 Move-assigns other to this object, and returns a reference.
 
 operator RestrictedBool () const
 
 Connection (Connection &&other) noexcept
 Move-constructs a Connection instance, making it point to the same object that o was pointing to.
 
void swap (Connection &other) noexcept
 

Friends

class QObject
 
class QObjectPrivate
 
struct QMetaObject
 

Detailed Description

\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.

It can be used to check if the connection is valid and to disconnect it using QObject::disconnect(). For a signal-functor connection without a context object, it is the only way to selectively disconnect that connection.

As Connection is just a handle, the underlying signal-slot connection is unaffected when Connection is destroyed or reassigned.

Definition at line 672 of file qobjectdefs.h.

Member Typedef Documentation

◆ RestrictedBool

Definition at line 689 of file qobjectdefs.h.

Constructor & Destructor Documentation

◆ ~Connection()

QMetaObject::Connection::~Connection ( )

Destructor for QMetaObject::Connection.

Definition at line 5733 of file qobject.cpp.

◆ Connection() [1/3]

QMetaObject::Connection::Connection ( )

Creates a Connection instance.

Definition at line 5728 of file qobject.cpp.

◆ Connection() [2/3]

QMetaObject::Connection::Connection ( const Connection & other)

Create a copy of the handle to the other connection.

Definition at line 5703 of file qobject.cpp.

◆ Connection() [3/3]

QMetaObject::Connection::Connection ( Connection && other)
inlinenoexcept

Move-constructs a Connection instance, making it point to the same object that o was pointing to.

Definition at line 693 of file qobjectdefs.h.

Member Function Documentation

◆ operator RestrictedBool()

QMetaObject::Connection::operator RestrictedBool ( ) const
inline

Definition at line 690 of file qobjectdefs.h.

◆ operator=()

QMetaObject::Connection & QMetaObject::Connection::operator= ( const Connection & other)

Move-assigns other to this object, and returns a reference.

Assigns other to this connection and returns a reference to this connection.

Definition at line 5712 of file qobject.cpp.

◆ swap()

void QMetaObject::Connection::swap ( Connection & other)
inlinenoexcept
Since
5.15 \memberswap{Connection instance}

Definition at line 695 of file qobjectdefs.h.

Friends And Related Symbol Documentation

◆ QMetaObject

friend struct QMetaObject
friend

Definition at line 677 of file qobjectdefs.h.

◆ QObject

friend class QObject
friend

Definition at line 675 of file qobjectdefs.h.

◆ QObjectPrivate

friend class QObjectPrivate
friend

Definition at line 676 of file qobjectdefs.h.


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