[][src]Struct qt_widgets::QGraphicsColorizeEffect

#[repr(C)]pub struct QGraphicsColorizeEffect { /* fields omitted */ }

The QGraphicsColorizeEffect class provides a colorize effect.

C++ class: QGraphicsColorizeEffect.

C++ documentation:

The QGraphicsColorizeEffect class provides a colorize effect.

A colorize effect renders the source with a tint of its color(). The color can be modified using the setColor() function.

By default, the color is light blue (QColor(0, 0, 192)).

Methods

impl QGraphicsColorizeEffect[src]

pub fn slot_set_color(&self) -> Receiver<(*const QColor,)>[src]

This property holds the color of the effect.

Returns a built-in Qt slot QGraphicsColorizeEffect::setColor that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the color of the effect.

By default, the color is light blue (QColor(0, 0, 192)).

Access functions:

QColor color() const
void setColor(const QColor &c)

Notifier signal:

void colorChanged(const QColor &color)

pub fn slot_set_strength(&self) -> Receiver<(c_double,)>[src]

This property holds the strength of the effect.

Returns a built-in Qt slot QGraphicsColorizeEffect::setStrength that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the strength of the effect.

By default, the strength is 1.0. A strength 0.0 equals to no effect, while 1.0 means full colorization.

Access functions:

qreal strength() const
void setStrength(qreal strength)

Notifier signal:

void strengthChanged(qreal strength)

pub fn color_changed(&self) -> Signal<(*const QColor,)>[src]

This signal is emitted whenever the effect's color changes. The color parameter holds the effect's new color.

Returns a built-in Qt signal QGraphicsColorizeEffect::colorChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the effect's color changes. The color parameter holds the effect's new color.

Note: Notifier signal for property color.

pub fn strength_changed(&self) -> Signal<(c_double,)>[src]

This signal is emitted whenever setStrength() changes the colorize strength property. strength contains the new strength value of the colorize effect.

Returns a built-in Qt signal QGraphicsColorizeEffect::strengthChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever setStrength() changes the colorize strength property. strength contains the new strength value of the colorize effect.

Note: Notifier signal for property strength.

pub unsafe fn color(&self) -> CppBox<QColor>[src]

This property holds the color of the effect.

Calls C++ function: QColor QGraphicsColorizeEffect::color() const.

C++ documentation:

This property holds the color of the effect.

By default, the color is light blue (QColor(0, 0, 192)).

Access functions:

QColor color() const
void setColor(const QColor &c)

Notifier signal:

void colorChanged(const QColor &color)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGraphicsColorizeEffect::metaObject() const.

pub unsafe fn new_1a(
    parent: impl CastInto<Ptr<QObject>>
) -> QBox<QGraphicsColorizeEffect>
[src]

Constructs a new QGraphicsColorizeEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.

Calls C++ function: [constructor] void QGraphicsColorizeEffect::QGraphicsColorizeEffect(QObject* parent = …).

C++ documentation:

Constructs a new QGraphicsColorizeEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.

pub unsafe fn new_0a() -> QBox<QGraphicsColorizeEffect>[src]

The QGraphicsColorizeEffect class provides a colorize effect.

Calls C++ function: [constructor] void QGraphicsColorizeEffect::QGraphicsColorizeEffect().

C++ documentation:

The QGraphicsColorizeEffect class provides a colorize effect.

A colorize effect renders the source with a tint of its color(). The color can be modified using the setColor() function.

By default, the color is light blue (QColor(0, 0, 192)).

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsColorizeEffect::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QGraphicsColorizeEffect::qt_metacast(const char* arg1).

pub unsafe fn set_color(&self, c: impl CastInto<Ref<QColor>>)[src]

This property holds the color of the effect.

Calls C++ function: [slot] void QGraphicsColorizeEffect::setColor(const QColor& c).

C++ documentation:

This property holds the color of the effect.

By default, the color is light blue (QColor(0, 0, 192)).

Access functions:

QColor color() const
void setColor(const QColor &c)

Notifier signal:

void colorChanged(const QColor &color)

pub unsafe fn set_strength(&self, strength: c_double)[src]

This property holds the strength of the effect.

Calls C++ function: [slot] void QGraphicsColorizeEffect::setStrength(double strength).

C++ documentation:

This property holds the strength of the effect.

By default, the strength is 1.0. A strength 0.0 equals to no effect, while 1.0 means full colorization.

Access functions:

qreal strength() const
void setStrength(qreal strength)

Notifier signal:

void strengthChanged(qreal strength)

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn strength(&self) -> c_double[src]

This property holds the strength of the effect.

Calls C++ function: double QGraphicsColorizeEffect::strength() const.

C++ documentation:

This property holds the strength of the effect.

By default, the strength is 1.0. A strength 0.0 equals to no effect, while 1.0 means full colorization.

Access functions:

qreal strength() const
void setStrength(qreal strength)

Notifier signal:

void strengthChanged(qreal strength)

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGraphicsColorizeEffect::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGraphicsColorizeEffect::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QGraphicsEffect>

pub fn slot_set_enabled(&self) -> Receiver<(bool,)>[src]

This property holds whether the effect is enabled or not.

Returns a built-in Qt slot QGraphicsEffect::setEnabled that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds whether the effect is enabled or not.

If an effect is disabled, the source will be rendered with as normal, with no interference from the effect. If the effect is enabled, the source will be rendered with the effect applied.

This property is enabled by default.

Using this property, you can disable certain effects on slow platforms, in order to ensure that the user interface is responsive.

Access functions:

bool isEnabled() const
void setEnabled(bool enable)

Notifier signal:

void enabledChanged(bool enabled)

pub fn slot_update(&self) -> Receiver<()>[src]

Schedules a redraw of the effect. Call this function whenever the effect needs to be redrawn. This function does not trigger a redraw of the source.

Returns a built-in Qt slot QGraphicsEffect::update that can be passed to qt_core::Signal::connect.

C++ documentation:

Schedules a redraw of the effect. Call this function whenever the effect needs to be redrawn. This function does not trigger a redraw of the source.

See also updateBoundingRect().

pub fn enabled_changed(&self) -> Signal<(bool,)>[src]

This signal is emitted whenever the effect is enabled or disabled. The enabled parameter holds the effects's new enabled state.

Returns a built-in Qt signal QGraphicsEffect::enabledChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted whenever the effect is enabled or disabled. The enabled parameter holds the effects's new enabled state.

Note: Notifier signal for property enabled.

See also isEnabled().

pub unsafe fn bounding_rect(&self) -> CppBox<QRectF>[src]

Returns the effective bounding rectangle for this effect, i.e., the bounding rectangle of the source in device coordinates, adjusted by any margins applied by the effect itself.

Calls C++ function: QRectF QGraphicsEffect::boundingRect() const.

C++ documentation:

Returns the effective bounding rectangle for this effect, i.e., the bounding rectangle of the source in device coordinates, adjusted by any margins applied by the effect itself.

See also boundingRectFor() and updateBoundingRect().

pub unsafe fn bounding_rect_for(
    &self,
    source_rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
[src]

Returns the effective bounding rectangle for this effect, given the provided rect in the device coordinates. When writing you own custom effect, you must call updateBoundingRect() whenever any parameters are changed that may cause this this function to return a different value.

Calls C++ function: virtual QRectF QGraphicsEffect::boundingRectFor(const QRectF& sourceRect) const.

C++ documentation:

Returns the effective bounding rectangle for this effect, given the provided rect in the device coordinates. When writing you own custom effect, you must call updateBoundingRect() whenever any parameters are changed that may cause this this function to return a different value.

See also sourceBoundingRect().

pub unsafe fn is_enabled(&self) -> bool[src]

This property holds whether the effect is enabled or not.

Calls C++ function: bool QGraphicsEffect::isEnabled() const.

C++ documentation:

This property holds whether the effect is enabled or not.

If an effect is disabled, the source will be rendered with as normal, with no interference from the effect. If the effect is enabled, the source will be rendered with the effect applied.

This property is enabled by default.

Using this property, you can disable certain effects on slow platforms, in order to ensure that the user interface is responsive.

Access functions:

bool isEnabled() const
void setEnabled(bool enable)

Notifier signal:

void enabledChanged(bool enabled)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGraphicsEffect::metaObject() const.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsEffect::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QGraphicsEffect::qt_metacast(const char* arg1).

pub unsafe fn set_enabled(&self, enable: bool)[src]

This property holds whether the effect is enabled or not.

Calls C++ function: [slot] void QGraphicsEffect::setEnabled(bool enable).

C++ documentation:

This property holds whether the effect is enabled or not.

If an effect is disabled, the source will be rendered with as normal, with no interference from the effect. If the effect is enabled, the source will be rendered with the effect applied.

This property is enabled by default.

Using this property, you can disable certain effects on slow platforms, in order to ensure that the user interface is responsive.

Access functions:

bool isEnabled() const
void setEnabled(bool enable)

Notifier signal:

void enabledChanged(bool enabled)

pub unsafe fn update(&self)[src]

Schedules a redraw of the effect. Call this function whenever the effect needs to be redrawn. This function does not trigger a redraw of the source.

Calls C++ function: [slot] void QGraphicsEffect::update().

C++ documentation:

Schedules a redraw of the effect. Call this function whenever the effect needs to be redrawn. This function does not trigger a redraw of the source.

See also updateBoundingRect().

Trait Implementations

impl CppDeletable for QGraphicsColorizeEffect[src]

unsafe fn delete(&self)[src]

Destroys the effect.

Calls C++ function: virtual [destructor] void QGraphicsColorizeEffect::~QGraphicsColorizeEffect().

C++ documentation:

Destroys the effect.

impl Deref for QGraphicsColorizeEffect[src]

type Target = QGraphicsEffect

The resulting type after dereferencing.

fn deref(&self) -> &QGraphicsEffect[src]

Calls C++ function: QGraphicsEffect* static_cast<QGraphicsEffect*>(QGraphicsColorizeEffect* ptr).

impl DynamicCast<QGraphicsColorizeEffect> for QGraphicsEffect[src]

unsafe fn dynamic_cast(
    ptr: Ptr<QGraphicsEffect>
) -> Ptr<QGraphicsColorizeEffect>
[src]

Calls C++ function: QGraphicsColorizeEffect* dynamic_cast<QGraphicsColorizeEffect*>(QGraphicsEffect* ptr).

impl DynamicCast<QGraphicsColorizeEffect> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGraphicsColorizeEffect>[src]

Calls C++ function: QGraphicsColorizeEffect* dynamic_cast<QGraphicsColorizeEffect*>(QObject* ptr).

impl StaticDowncast<QGraphicsColorizeEffect> for QGraphicsEffect[src]

unsafe fn static_downcast(
    ptr: Ptr<QGraphicsEffect>
) -> Ptr<QGraphicsColorizeEffect>
[src]

Calls C++ function: QGraphicsColorizeEffect* static_cast<QGraphicsColorizeEffect*>(QGraphicsEffect* ptr).

impl StaticDowncast<QGraphicsColorizeEffect> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGraphicsColorizeEffect>[src]

Calls C++ function: QGraphicsColorizeEffect* static_cast<QGraphicsColorizeEffect*>(QObject* ptr).

impl StaticUpcast<QGraphicsEffect> for QGraphicsColorizeEffect[src]

unsafe fn static_upcast(
    ptr: Ptr<QGraphicsColorizeEffect>
) -> Ptr<QGraphicsEffect>
[src]

Calls C++ function: QGraphicsEffect* static_cast<QGraphicsEffect*>(QGraphicsColorizeEffect* ptr).

impl StaticUpcast<QObject> for QGraphicsColorizeEffect[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsColorizeEffect>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QGraphicsColorizeEffect* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.