[−][src]Struct qt_widgets::QGraphicsOpacityEffect
The QGraphicsOpacityEffect class provides an opacity effect.
C++ class: QGraphicsOpacityEffect
.
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
.
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
.
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
.
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
.
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]
parent: impl CastInto<Ptr<QObject>>
) -> QBox<QGraphicsOpacityEffect>
Constructs a new QGraphicsOpacityEffect instance. The parent parameter is passed to QGraphicsEffect's constructor.
Calls C++ function: [constructor] void QGraphicsOpacityEffect::QGraphicsOpacityEffect(QObject* parent = …)
.
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()
.
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
.
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
.
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]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
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)
.
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)
.
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]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
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]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
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
.
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
.
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
.
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
.
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]
&self,
source_rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QRectF>
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
.
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
.
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]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
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)
.
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()
.
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()
.
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]
ptr: Ptr<QGraphicsEffect>
) -> Ptr<QGraphicsOpacityEffect>
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]
ptr: Ptr<QGraphicsOpacityEffect>
) -> Ptr<QGraphicsEffect>
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
impl RefUnwindSafe for QGraphicsOpacityEffect
impl Send for QGraphicsOpacityEffect
impl Sync for QGraphicsOpacityEffect
impl Unpin for QGraphicsOpacityEffect
impl UnwindSafe for QGraphicsOpacityEffect
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>,