[−][src]Struct qt_widgets::SlotOfToolButtonStyle
Binds a Qt signal with arguments ::qt_core::ToolButtonStyle
to a Rust closure.
Corresponding C++ argument types: (Qt::ToolButtonStyle
).
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 SlotOfToolButtonStyle
[src]
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
pub unsafe fn new<T: FnMut(ToolButtonStyle) + 'static>(
parent: impl CastInto<Ptr<QObject>>,
callback: T
) -> QBox<SlotOfToolButtonStyle>
[src]
parent: impl CastInto<Ptr<QObject>>,
callback: T
) -> QBox<SlotOfToolButtonStyle>
Creates a new object.
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
pub unsafe fn set<T: FnMut(ToolButtonStyle) + 'static>(&self, callback: T)
[src]
Assigns callback
as the signal handler.
func
will be called each time a connected signal is emitted. Any previously assigned function will be deregistered. Passing None
will deregister the handler without setting a new one.
pub unsafe fn slot(&self, arg0: ToolButtonStyle)
[src]
Calls the slot directly, invoking the assigned handler (if any).
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
pub unsafe fn tr(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
pub unsafe fn tr_utf8(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Trait Implementations
impl AsReceiver for SlotOfToolButtonStyle
[src]
type Arguments = (ToolButtonStyle,)
Argument types expected by this receiver.
fn as_receiver(&self) -> Receiver<Self::Arguments>
[src]
impl CppDeletable for SlotOfToolButtonStyle
[src]
unsafe fn delete(&self)
[src]
Calls C++ function: [destructor] void ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle::~ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle()
.
impl Deref for SlotOfToolButtonStyle
[src]
type Target = QObject
The resulting type after dereferencing.
fn deref(&self) -> &QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle* ptr)
.
impl DynamicCast<SlotOfToolButtonStyle> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<SlotOfToolButtonStyle>
[src]
Calls C++ function: ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle* dynamic_cast<ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle*>(QObject* ptr)
.
impl StaticDowncast<SlotOfToolButtonStyle> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<SlotOfToolButtonStyle>
[src]
Calls C++ function: ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle* static_cast<ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle*>(QObject* ptr)
.
impl StaticUpcast<QObject> for SlotOfToolButtonStyle
[src]
unsafe fn static_upcast(ptr: Ptr<SlotOfToolButtonStyle>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(ctr_qt_widgets_ffi_slot_wrapper_Qt_ToolButtonStyle* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for SlotOfToolButtonStyle
impl Send for SlotOfToolButtonStyle
impl Sync for SlotOfToolButtonStyle
impl Unpin for SlotOfToolButtonStyle
impl UnwindSafe for SlotOfToolButtonStyle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
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>,