[][src]Struct qt_widgets::q_graphics_view::OptimizationFlag

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

This enum describes flags that you can enable to improve rendering performance in QGraphicsView. By default, none of these flags are set. Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms.

C++ enum: QGraphicsView::OptimizationFlag.

C++ documentation:

This enum describes flags that you can enable to improve rendering performance in QGraphicsView. By default, none of these flags are set. Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms.

This enum was introduced or modified in Qt 4.3.

The OptimizationFlags type is a typedef for QFlags<OptimizationFlag>. It stores an OR combination of OptimizationFlag values.

Methods

impl OptimizationFlag[src]

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

impl OptimizationFlag[src]

pub const DontClipPainter: OptimizationFlag[src]

This value is obsolete and has no effect. (C++ enum variant: DontClipPainter = 1)

pub const DontSavePainterState: OptimizationFlag[src]

When rendering, QGraphicsView protects the painter state (see QPainter::save()) when rendering the background or foreground, and when rendering each item. This allows you to leave the painter in an altered state (i.e., you can call QPainter::setPen() or QPainter::setBrush() without restoring the state after painting). However, if the items consistently do restore the state, you should enable this flag to prevent QGraphicsView from doing the same. (C++ enum variant: DontSavePainterState = 2)

pub const DontAdjustForAntialiasing: OptimizationFlag[src]

Disables QGraphicsView's antialiasing auto-adjustment of exposed areas. Items that render antialiased lines on the boundaries of their QGraphicsItem::boundingRect() can end up rendering parts of the line outside. To prevent rendering artifacts, QGraphicsView expands all exposed regions by 2 pixels in all directions. If you enable this flag, QGraphicsView will no longer perform these adjustments, minimizing the areas that require redrawing, which improves performance. A common side effect is that items that do draw with antialiasing can leave painting traces behind on the scene as they are moved. (C++ enum variant: DontAdjustForAntialiasing = 4)

pub const IndirectPainting: OptimizationFlag[src]

Since Qt 4.6, restore the old painting algorithm that calls QGraphicsView::drawItems() and QGraphicsScene::drawItems(). To be used only for compatibility with old code. (C++ enum variant: IndirectPainting = 8)

Trait Implementations

impl<T: Into<QFlags<OptimizationFlag>>> BitOr<T> for OptimizationFlag[src]

type Output = QFlags<OptimizationFlag>

The resulting type after applying the | operator.

impl Clone for OptimizationFlag[src]

impl Copy for OptimizationFlag[src]

impl Debug for OptimizationFlag[src]

impl Eq for OptimizationFlag[src]

impl From<OptimizationFlag> for c_int[src]

impl From<OptimizationFlag> for QFlags<OptimizationFlag>[src]

impl From<i32> for OptimizationFlag[src]

impl PartialEq<OptimizationFlag> for OptimizationFlag[src]

impl StructuralEq for OptimizationFlag[src]

impl StructuralPartialEq for OptimizationFlag[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.