[][src]Struct qt_core::ItemFlag

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

This enum describes the properties of an item:

C++ enum: Qt::ItemFlag.

C++ documentation:

This enum describes the properties of an item:

Note that checkable items need to be given both a suitable set of flags and an initial state, indicating whether the item is checked or not. This is handled automatically for model/view components, but needs to be explicitly set for instances of QListWidgetItem, QTableWidgetItem, and QTreeWidgetItem.

Note that it is undefined behavior to reimplement QAbstractItemModel::hasChildren to return true for an index if that index has the Qt::ItemNeverHasChildren flag set.

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

See also QAbstractItemModel.

Methods

impl ItemFlag[src]

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

impl ItemFlag[src]

pub const NoItemFlags: ItemFlag[src]

It does not have any properties set. (C++ enum variant: NoItemFlags = 0)

pub const ItemIsSelectable: ItemFlag[src]

It can be selected. (C++ enum variant: ItemIsSelectable = 1)

pub const ItemIsEditable: ItemFlag[src]

It can be edited. (C++ enum variant: ItemIsEditable = 2)

pub const ItemIsDragEnabled: ItemFlag[src]

It can be dragged. (C++ enum variant: ItemIsDragEnabled = 4)

pub const ItemIsDropEnabled: ItemFlag[src]

It can be used as a drop target. (C++ enum variant: ItemIsDropEnabled = 8)

pub const ItemIsUserCheckable: ItemFlag[src]

It can be checked or unchecked by the user. (C++ enum variant: ItemIsUserCheckable = 16)

pub const ItemIsEnabled: ItemFlag[src]

The user can interact with the item. (C++ enum variant: ItemIsEnabled = 32)

pub const ItemIsAutoTristate: ItemFlag[src]

The item's state depends on the state of its children. This enables automatic management of the state of parent items in QTreeWidget (checked if all children are checked, unchecked if all children are unchecked, or partially checked if only some children are checked). (C++ enum variant: ItemIsAutoTristate = 64)

pub const ItemIsTristate: ItemFlag[src]

This enum value is deprecated. Use Qt::ItemIsAutoTristate instead. (C++ enum variant: ItemIsTristate = 64)

pub const ItemNeverHasChildren: ItemFlag[src]

The item never has child items. This is used for optimization purposes only. (C++ enum variant: ItemNeverHasChildren = 128)

pub const ItemIsUserTristate: ItemFlag[src]

The user can cycle through three separate states. This value has been added in Qt 5.5. (C++ enum variant: ItemIsUserTristate = 256)

Trait Implementations

impl From<i32> for ItemFlag[src]

impl From<ItemFlag> for c_int[src]

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

impl Clone for ItemFlag[src]

impl Copy for ItemFlag[src]

impl Eq for ItemFlag[src]

impl PartialEq<ItemFlag> for ItemFlag[src]

impl Debug for ItemFlag[src]

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

type Output = QFlags<ItemFlag>

The resulting type after applying the | operator.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<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.

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

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

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

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

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