D-Bus 어댑터에서 신호 선언하기
QDBusAbstractAdaptor 에서 파생된 클래스의 모든 신호는 신호의 파라미터가 특정 규칙을 준수하는 경우 자동으로 D-Bus로 릴레이됩니다(자세한 내용은 Qt D-Bus 유형 시스템 참조). 이 릴레이를 만드는 데 특별한 코드는 필요하지 않습니다.
그러나 신호는 여전히 방출되어야 합니다. 어댑터 신호를 방출하는 가장 쉬운 방법은 다른 신호를 어댑터에 연결하여 Qt의 신호 및 슬롯 메커니즘이 자동으로 어댑터 신호도 방출하도록 하는 것입니다. 이 작업은 어댑터의 생성자에서 할 수 있는데, D-Bus Complex Ping Pong 예제에서 볼 수 있습니다.
QDBusAbstractAdaptor::setAutoRelaySignals() 편의 기능을 사용하여 실제 객체의 신호와 어댑터의 해당 신호 간에 연결을 만들고 끊을 수도 있습니다. 이 함수는 두 클래스의 신호 목록을 검사하고 매개변수가 정확히 일치하는 신호만 연결합니다.
Qt D-Bus 어댑터 사용, D-Bus 어댑터에서 슬롯 선언하기, Qt D-Bus 유형 시스템 및 QDBusAbstractAdaptor 을참조하세요 .
© 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.