[][src]Struct qt_widgets::QGraphicsOpacityEffect

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

The QGraphicsOpacityEffect class provides an opacity effect.

C++ class: QGraphicsOpacityEffect.

C++ documentation:

The QGraphicsOpacityEffect class provides an opacity effect.

An opacity effect renders the source with an opacity. This effect is useful for making the source semi-transparent, similar to a fade-in/fade-out sequence. The opacity can be modified using the setOpacity() function.

By default, the opacity is 0.7.

Methods

impl QGraphicsOpacityEffect[src]

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

This property holds the opacity of the effect.

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

C++ documentation:

This property holds the opacity of the effect.

The value should be in the range of 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.

By default, the opacity is 0.7.

Access functions:

qreal opacity() const
void setOpacity(qreal opacity)

Notifier signal:

void opacityChanged(qreal opacity)

See also setOpacityMask().

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

This property holds the opacity mask of the effect.

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

C++ documentation:

This property holds the opacity mask of the effect.

An opacity mask allows you apply opacity to portions of an element.

For example:

... QLinearGradient alphaGradient(rect.topLeft(), rect.bottomLeft()); alphaGradient.setColorAt(0.0, Qt::transparent); alphaGradient.setColorAt(0.5, Qt::black); alphaGradient.setColorAt(1.0, Qt::transparent); QGraphicsOpacityEffect *effect = new QGraphicsOpacityEffect; effect->setOpacityMask(alphaGradient); ...

There is no opacity mask by default.

Access functions:

QBrush opacityMask() const
void setOpacityMask(const QBrush &mask)

Notifier signal:

void opacityMaskChanged(const QBrush &mask)

See also setOpacity().

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

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

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

C++ documentation:

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

Note: Notifier signal for property opacity.

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

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

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

C++ documentation:

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

Note: Notifier signal for property opacityMask.

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

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

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

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

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

C++ documentation:

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

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

The QGraphicsOpacityEffect class provides an opacity effect.

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

C++ documentation:

The QGraphicsOpacityEffect class provides an opacity effect.

An opacity effect renders the source with an opacity. This effect is useful for making the source semi-transparent, similar to a fade-in/fade-out sequence. The opacity can be modified using the setOpacity() function.

By default, the opacity is 0.7.

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

This property holds the opacity of the effect.

Calls C++ function: double QGraphicsOpacityEffect::opacity() const.

C++ documentation:

This property holds the opacity of the effect.

The value should be in the range of 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.

By default, the opacity is 0.7.

Access functions:

qreal opacity() const
void setOpacity(qreal opacity)

Notifier signal:

void opacityChanged(qreal opacity)

See also setOpacityMask().

pub unsafe fn opacity_mask(&self) -> CppBox<QBrush>[src]

This property holds the opacity mask of the effect.

Calls C++ function: QBrush QGraphicsOpacityEffect::opacityMask() const.

C++ documentation:

This property holds the opacity mask of the effect.

An opacity mask allows you apply opacity to portions of an element.

For example:

... QLinearGradient alphaGradient(rect.topLeft(), rect.bottomLeft()); alphaGradient.setColorAt(0.0, Qt::transparent); alphaGradient.setColorAt(0.5, Qt::black); alphaGradient.setColorAt(1.0, Qt::transparent); QGraphicsOpacityEffect *effect = new QGraphicsOpacityEffect; effect->setOpacityMask(alphaGradient); ...

There is no opacity mask by default.

Access functions:

QBrush opacityMask() const
void setOpacityMask(const QBrush &mask)

Notifier signal:

void opacityMaskChanged(const QBrush &mask)

See also setOpacity().

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

Calls C++ function: virtual int QGraphicsOpacityEffect::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* QGraphicsOpacityEffect::qt_metacast(const char* arg1).

pub unsafe fn set_opacity(&self, opacity: c_double)[src]

This property holds the opacity of the effect.

Calls C++ function: [slot] void QGraphicsOpacityEffect::setOpacity(double opacity).

C++ documentation:

This property holds the opacity of the effect.

The value should be in the range of 0.0 to 1.0, where 0.0 is fully transparent and 1.0 is fully opaque.

By default, the opacity is 0.7.

Access functions:

qreal opacity() const
void setOpacity(qreal opacity)

Notifier signal:

void opacityChanged(qreal opacity)

See also setOpacityMask().

pub unsafe fn set_opacity_mask(&self, mask: impl CastInto<Ref<QBrush>>)[src]

This property holds the opacity mask of the effect.

Calls C++ function: [slot] void QGraphicsOpacityEffect::setOpacityMask(const QBrush& mask).

C++ documentation:

This property holds the opacity mask of the effect.

An opacity mask allows you apply opacity to portions of an element.

For example:

... QLinearGradient alphaGradient(rect.topLeft(), rect.bottomLeft()); alphaGradient.setColorAt(0.0, Qt::transparent); alphaGradient.setColorAt(0.5, Qt::black); alphaGradient.setColorAt(1.0, Qt::transparent); QGraphicsOpacityEffect *effect = new QGraphicsOpacityEffect; effect->setOpacityMask(alphaGradient); ...

There is no opacity mask by default.

Access functions:

QBrush opacityMask() const
void setOpacityMask(const QBrush &mask)

Notifier signal:

void opacityMaskChanged(const QBrush &mask)

See also setOpacity().

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

Returns a reference to the staticMetaObject field.

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

Calls C++ function: static QString QGraphicsOpacityEffect::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 QGraphicsOpacityEffect::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 QGraphicsOpacityEffect[src]

unsafe fn delete(&self)[src]

Destroys the effect.

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

C++ documentation:

Destroys the effect.

impl Deref for QGraphicsOpacityEffect[src]

type Target = QGraphicsEffect

The resulting type after dereferencing.

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

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

impl DynamicCast<QGraphicsOpacityEffect> for QGraphicsEffect[src]

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

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

impl DynamicCast<QGraphicsOpacityEffect> for QObject[src]

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

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

impl StaticDowncast<QGraphicsOpacityEffect> for QGraphicsEffect[src]

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

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

impl StaticDowncast<QGraphicsOpacityEffect> for QObject[src]

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

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

impl StaticUpcast<QGraphicsEffect> for QGraphicsOpacityEffect[src]

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

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

impl StaticUpcast<QObject> for QGraphicsOpacityEffect[src]

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

Calls C++ function: QObject* static_cast<QObject*>(QGraphicsOpacityEffect* 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.