QGIS API Documentation 4.1.0-Master (d6fb7a379fb)
Loading...
Searching...
No Matches
QgsScopedConnection Class Reference

Keeps a reference to a Qt connection (a QMetaObject::Connection) and disconnects it whenever this object is deleted. More...

#include <qgsscopedconnection.h>

Public Member Functions

 QgsScopedConnection ()=default
 Default constructor (holds an invalid connection).
 QgsScopedConnection (const QgsScopedConnection &)=delete
 QgsScopedConnection (QgsScopedConnection &&other) noexcept
 Move constructor.
 QgsScopedConnection (QMetaObject::Connection connection)
 Constructor for QgsScopedConnection, managing the specified connection.
 ~QgsScopedConnection ()
 Destructor for QgsScopedConnection.
void disconnect ()
 Manually disconnects the managed connection.
QgsScopedConnectionoperator= (const QgsScopedConnection &)=delete
QgsScopedConnectionoperator= (QgsScopedConnection &&other) noexcept
QgsScopedConnectionoperator= (QMetaObject::Connection connection)

Detailed Description

Keeps a reference to a Qt connection (a QMetaObject::Connection) and disconnects it whenever this object is deleted.

Since
QGIS 4.2

Definition at line 32 of file qgsscopedconnection.h.

Constructor & Destructor Documentation

◆ QgsScopedConnection() [1/4]

QgsScopedConnection::QgsScopedConnection ( )
default

Default constructor (holds an invalid connection).

◆ QgsScopedConnection() [2/4]

QgsScopedConnection::QgsScopedConnection ( QMetaObject::Connection connection)
inlineexplicit

Constructor for QgsScopedConnection, managing the specified connection.

Definition at line 43 of file qgsscopedconnection.h.

◆ ~QgsScopedConnection()

QgsScopedConnection::~QgsScopedConnection ( )
inline

Destructor for QgsScopedConnection.

The managed connection will be automatically disconnected.

Definition at line 52 of file qgsscopedconnection.h.

◆ QgsScopedConnection() [3/4]

QgsScopedConnection::QgsScopedConnection ( const QgsScopedConnection & )
delete

◆ QgsScopedConnection() [4/4]

QgsScopedConnection::QgsScopedConnection ( QgsScopedConnection && other)
inlinenoexcept

Move constructor.

Definition at line 59 of file qgsscopedconnection.h.

Member Function Documentation

◆ disconnect()

void QgsScopedConnection::disconnect ( )
inline

Manually disconnects the managed connection.

Definition at line 86 of file qgsscopedconnection.h.

◆ operator=() [1/3]

QgsScopedConnection & QgsScopedConnection::operator= ( const QgsScopedConnection & )
delete

◆ operator=() [2/3]

QgsScopedConnection & QgsScopedConnection::operator= ( QgsScopedConnection && other)
inlinenoexcept

Definition at line 65 of file qgsscopedconnection.h.

◆ operator=() [3/3]

QgsScopedConnection & QgsScopedConnection::operator= ( QMetaObject::Connection connection)
inline

Definition at line 76 of file qgsscopedconnection.h.


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