[][src]Trait qmetaobject::listmodel::QAbstractListModel

pub trait QAbstractListModel: QObject {
    fn row_count(&self) -> i32;
fn data(&self, index: QModelIndex, role: i32) -> QVariant; fn get_object_description() -> &'static QObjectDescription
    where
        Self: Sized
, { ... }
fn set_data(
        &mut self,
        _index: QModelIndex,
        _value: &QVariant,
        _role: i32
    ) -> bool { ... }
fn role_names(&self) -> HashMap<i32, QByteArray> { ... } }

This trait allow to override a Qt QAbstractListModel

Required methods

fn row_count(&self) -> i32

Refer to the Qt documentation of QAbstractListModel::rowCount

fn data(&self, index: QModelIndex, role: i32) -> QVariant

Refer to the Qt documentation of QAbstractListModel::data

Loading content...

Provided methods

fn get_object_description() -> &'static QObjectDescription where
    Self: Sized

Required for the implementation detail of the QObject custom derive

fn set_data(
    &mut self,
    _index: QModelIndex,
    _value: &QVariant,
    _role: i32
) -> bool

Refer to the Qt documentation of QAbstractListModel::setData

fn role_names(&self) -> HashMap<i32, QByteArray>

Refer to the Qt documentation of QAbstractListModel::roleNames

Loading content...

Methods

impl dyn QAbstractListModel[src]

pub fn begin_insert_rows(&mut self, first: i32, last: i32)[src]

Refer to the Qt documentation of QAbstractListModel::beginInsertRows

pub fn end_insert_rows(&mut self)[src]

Refer to the Qt documentation of QAbstractListModel::endInsertRows

pub fn begin_remove_rows(&mut self, first: i32, last: i32)[src]

Refer to the Qt documentation of QAbstractListModel::beginRemoveRows

pub fn end_remove_rows(&mut self)[src]

Refer to the Qt documentation of QAbstractListModel::endRemoveRows

pub fn begin_reset_model(&mut self)[src]

Refer to the Qt documentation of QAbstractListModel::beginResetModel

pub fn end_reset_model(&mut self)[src]

Refer to the Qt documentation of QAbstractListModel::endResetModel

pub fn data_changed(&mut self, top_left: QModelIndex, bottom_right: QModelIndex)[src]

Refer to the Qt documentation of QAbstractListModel::dataChanged

pub fn row_index(&self, i: i32) -> QModelIndex[src]

Returns a QModelIndex for the given row (in the first column)

Implementors

impl<T> QAbstractListModel for SimpleListModel<T> where
    T: SimpleListItem
[src]

Loading content...