[−][src]Struct qt_widgets::SlotOfQTreeWidgetItemQTreeWidgetItem
Binds a Qt signal with arguments ::cpp_utils::MutPtr<crate::QTreeWidgetItem>,::cpp_utils::MutPtr<crate::QTreeWidgetItem>
to a Rust closure.
Corresponding C++ argument types: (QTreeWidgetItem*, QTreeWidgetItem*
).
Create an object using new()
and bind your closure using set()
. The closure will be called with the signal's arguments when the slot is invoked. Use connect()
method of a qt_core::Signal
object to connect the signal to this slot. The closure will be executed each time the slot is invoked until source signals are disconnected or the slot object is destroyed.
The slot object takes ownership of the passed closure. If set()
is called again, previously set closure is dropped. Make sure that the slot object does not outlive objects referenced by the closure.
If set()
was not called, slot invocation has no effect.
Methods
impl<'a> SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
[src]
pub fn new<F: FnMut(MutPtr<QTreeWidgetItem>, MutPtr<QTreeWidgetItem>) + 'a>(
f: F
) -> SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
[src]
f: F
) -> SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
Constructs a new object.
pub fn set<F: FnMut(MutPtr<QTreeWidgetItem>, MutPtr<QTreeWidgetItem>) + 'a>(
&mut self,
f: F
)
[src]
&mut self,
f: F
)
Sets f
as the callback closure. If set()
is called again, previous closure is dropped.
pub fn clear(&mut self)
[src]
Drops the previously set closure, if any. After this, slot invocation will have no effect until a new closure is set.
pub unsafe fn as_raw(
&mut self
) -> MutRef<RawSlotOfQTreeWidgetItemQTreeWidgetItem>
[src]
&mut self
) -> MutRef<RawSlotOfQTreeWidgetItemQTreeWidgetItem>
Trait Implementations
impl<'a> Default for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
[src]
impl<'a, 'b: 'a> AsReceiver for &'b SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
[src]
type Arguments = <RawSlotOfQTreeWidgetItemQTreeWidgetItem as AsReceiver>::Arguments
fn as_receiver(&self) -> Receiver<Self::Arguments>
[src]
Auto Trait Implementations
impl<'a> !Send for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
impl<'a> !Sync for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
impl<'a> Unpin for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
impl<'a> !RefUnwindSafe for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
impl<'a> !UnwindSafe for SlotOfQTreeWidgetItemQTreeWidgetItem<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,