[][src]Struct qt_widgets::q_graphics_view::ViewportUpdateMode

#[repr(transparent)]
pub struct ViewportUpdateMode(_);

This enum describes how QGraphicsView updates its viewport when the scene contents change or are exposed.

C++ enum: QGraphicsView::ViewportUpdateMode.

C++ documentation:

This enum describes how QGraphicsView updates its viewport when the scene contents change or are exposed.

This enum was introduced or modified in Qt 4.3.

See also viewportUpdateMode.

Methods

impl ViewportUpdateMode[src]

pub fn to_int(&self) -> c_int[src]

impl ViewportUpdateMode[src]

pub const FullViewportUpdate: ViewportUpdateMode[src]

When any visible part of the scene changes or is reexposed, QGraphicsView will update the entire viewport. This approach is fastest when QGraphicsView spends more time figuring out what to draw than it would spend drawing (e.g., when very many small items are repeatedly updated). This is the preferred update mode for viewports that do not support partial updates, such as QGLWidget, and for viewports that need to disable scroll optimization. (C++ enum variant: FullViewportUpdate = 0)

pub const MinimalViewportUpdate: ViewportUpdateMode[src]

QGraphicsView will determine the minimal viewport region that requires a redraw, minimizing the time spent drawing by avoiding a redraw of areas that have not changed. This is QGraphicsView's default mode. Although this approach provides the best performance in general, if there are many small visible changes on the scene, QGraphicsView might end up spending more time finding the minimal approach than it will spend drawing. (C++ enum variant: MinimalViewportUpdate = 1)

pub const SmartViewportUpdate: ViewportUpdateMode[src]

QGraphicsView will attempt to find an optimal update mode by analyzing the areas that require a redraw. (C++ enum variant: SmartViewportUpdate = 2)

pub const NoViewportUpdate: ViewportUpdateMode[src]

QGraphicsView will never update its viewport when the scene changes; the user is expected to control all updates. This mode disables all (potentially slow) item visibility testing in QGraphicsView, and is suitable for scenes that either require a fixed frame rate, or where the viewport is otherwise updated externally. (C++ enum variant: NoViewportUpdate = 3)

pub const BoundingRectViewportUpdate: ViewportUpdateMode[src]

The bounding rectangle of all changes in the viewport will be redrawn. This mode has the advantage that QGraphicsView searches only one region for changes, minimizing time spent determining what needs redrawing. The disadvantage is that areas that have not changed also need to be redrawn. (C++ enum variant: BoundingRectViewportUpdate = 4)

Trait Implementations

impl Clone for ViewportUpdateMode[src]

impl Copy for ViewportUpdateMode[src]

impl Debug for ViewportUpdateMode[src]

impl Eq for ViewportUpdateMode[src]

impl From<ViewportUpdateMode> for c_int[src]

impl From<i32> for ViewportUpdateMode[src]

impl PartialEq<ViewportUpdateMode> for ViewportUpdateMode[src]

impl StructuralEq for ViewportUpdateMode[src]

impl StructuralPartialEq for ViewportUpdateMode[src]

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.