Home · All Classes · Main Classes · Grouped Classes · Modules · Functions

Declaring signals

Any signal in a class derived from QDBusAbstractAdaptor will be automatically relayed into D-BUS, provided that the signal's parameters conform to certain rules (see qdbustypesystem.html for more information). No special code is necessary to make this relay.

However, signals must still be emitted. The easiest way to emit an adaptor signal is to connect another signal to it, so that the Qt signal/slot mechanism automatically emits the adaptor signal too. This can be done in the adaptor's constructor, as has been done in the adaptor example.

The convenience function QDBusAbstractAdaptor::setAutoRelaySignals can also be used to connect or disconnect every signal in the real object to the same signal in the adaptor. It will inspect the list of signals in both classes and connect those that have exact parameter match.

See also Using adaptors, Declaring slots, The QtDBus type system, and QDBusAbstractAdaptor.


Copyright © 2006 Trolltech Trademarks
Qt 4.2.0