Connection Class
class QMetaObject::Connectionパブリック関数
Connection() | |
Connection(const QMetaObject::Connection &other) | |
Connection(QMetaObject::Connection &&o) | |
~Connection() | |
void | swap(QMetaObject::Connection &other) |
bool | operator bool() const |
QMetaObject::Connection & | operator=(QMetaObject::Connection &&other) |
QMetaObject::Connection & | operator=(const QMetaObject::Connection &other) |
詳細説明
シグナル・スロット(またはシグナル・ファンクタ)接続のハンドルを表す。
接続が有効かどうかをチェックしたり、QObject::disconnect() を使用して接続を切断したりするために使用できる。コンテキスト・オブジェクトを持たないシグナル・ファンクタ接続の場合、これはその接続を選択的に切断する唯一の方法です。
Connectionは単なるハンドルなので、Connectionが破棄されたり再割り当てされたりしても、基礎となるシグナルスロット接続は影響を受けない。
メンバー関数ドキュメント
Connection::Connection()
Connection インスタンスを作成します。
Connection::Connection(const QMetaObject::Connection &other)
other コネクションへのハンドルのコピーを作成する。
[noexcept]
Connection::Connection(QMetaObject::Connection &&o)
Move-Connectionインスタンスを構築し、o が指していたのと同じオブジェクトを指すようにする。
[noexcept]
Connection::~Connection()
QMetaObject::Connection のデストラクタ。
[noexcept]
void Connection::swap(QMetaObject::Connection &other)
このConnectionインスタンスをother と交換する。この操作は非常に速く、失敗することはない。
bool Connection::operator bool() const
接続が有効な場合はtrue
を返す。
QObject::connect への呼び出しが成功した場合、接続は有効である。QObject::connect がシグナルまたはスロットを見つけられなかった場合、または引数が一致しなかった場合、接続は無効である。
[noexcept]
QMetaObject::Connection &Connection::operator=(QMetaObject::Connection &&other)
Move-このオブジェクトにother を割り当て、参照を返す。
QMetaObject::Connection &Connection::operator=(const QMetaObject::Connection &other)
この接続にother を割り当て、この接続への参照を返す。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.