pub struct QSignalSpy { /* private fields */ }Expand description
The QSignalSpy is a struct that enables introspection of signal emission.
A QSignalSpy can connect to a signal of a QObject and record each time the signal is emitted.
QSignalSpy itself is a QVariantList. Each emission of the signal will append one item to the list, containing the arguments of the signal.
See also: QSignalSpy documentation.
Implementations§
Source§impl QSignalSpy
impl QSignalSpy
Sourcepub fn new(qobject: &QObject, signal_name: &str) -> UniquePtr<Self>
pub fn new(qobject: &QObject, signal_name: &str) -> UniquePtr<Self>
Creates a new QSignalSpy that listens for emissions of a signal of the qobject.
§Arguments
signal_name- The name of the signal function to observe.
Sourcepub fn count(&self) -> isize
pub fn count(&self) -> isize
Returns the number of items currently stored in the underlying QList.
Sourcepub fn take_at(self: Pin<&mut Self>, idx: isize) -> QVariantList
pub fn take_at(self: Pin<&mut Self>, idx: isize) -> QVariantList
Removes the element at position idx from the underlying QList and returns it.
Sourcepub fn take_first(self: Pin<&mut Self>) -> QVariantList
pub fn take_first(self: Pin<&mut Self>) -> QVariantList
Removes the first item from the underlying QList and returns it.
Sourcepub fn take_last(self: Pin<&mut Self>) -> QVariantList
pub fn take_last(self: Pin<&mut Self>) -> QVariantList
Removes the last item from the underlying QList and returns it.
Trait Implementations§
Source§impl ExternType for QSignalSpy
impl ExternType for QSignalSpy
impl UniquePtrTarget for QSignalSpy
Auto Trait Implementations§
impl !Freeze for QSignalSpy
impl RefUnwindSafe for QSignalSpy
impl !Send for QSignalSpy
impl !Sync for QSignalSpy
impl !Unpin for QSignalSpy
impl UnsafeUnpin for QSignalSpy
impl UnwindSafe for QSignalSpy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more