pub trait QAbstractListModel: QObject {
Show 15 methods // Required methods fn row_count(&self) -> i32; fn data(&self, index: QModelIndex, role: i32) -> QVariant; // Provided methods fn get_object_description() -> &'static QObjectDescriptor where Self: Sized { ... } fn set_data( &mut self, _index: QModelIndex, _value: &QVariant, _role: i32 ) -> bool { ... } fn role_names(&self) -> HashMap<i32, QByteArray> { ... } fn begin_insert_rows(&mut self, first: i32, last: i32) { ... } fn end_insert_rows(&mut self) { ... } fn begin_remove_rows(&mut self, first: i32, last: i32) { ... } fn end_remove_rows(&mut self) { ... } fn begin_reset_model(&mut self) { ... } fn end_reset_model(&mut self) { ... } fn begin_move_rows( &mut self, source_parent: QModelIndex, source_first: i32, source_last: i32, destination_parent: QModelIndex, destination_child: i32 ) { ... } fn end_move_rows(&mut self) { ... } fn data_changed(&mut self, top_left: QModelIndex, bottom_right: QModelIndex) { ... } fn row_index(&self, i: i32) -> QModelIndex { ... }
}
Expand description

This trait allow to override a Qt QAbstractListModel

Required Methods§

source

fn row_count(&self) -> i32

Refer to the Qt documentation of QAbstractListModel::rowCount

source

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

Refer to the Qt documentation of QAbstractListModel::data

Provided Methods§

source

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

Required for the implementation detail of the QObject custom derive

source

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

Refer to the Qt documentation of QAbstractListModel::setData

source

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

Refer to the Qt documentation of QAbstractListModel::roleNames

source

fn begin_insert_rows(&mut self, first: i32, last: i32)

Refer to the Qt documentation of QAbstractListModel::beginInsertRows

source

fn end_insert_rows(&mut self)

Refer to the Qt documentation of QAbstractListModel::endInsertRows

source

fn begin_remove_rows(&mut self, first: i32, last: i32)

Refer to the Qt documentation of QAbstractListModel::beginRemoveRows

source

fn end_remove_rows(&mut self)

Refer to the Qt documentation of QAbstractListModel::endRemoveRows

source

fn begin_reset_model(&mut self)

Refer to the Qt documentation of QAbstractListModel::beginResetModel

source

fn end_reset_model(&mut self)

Refer to the Qt documentation of QAbstractListModel::endResetModel

source

fn begin_move_rows( &mut self, source_parent: QModelIndex, source_first: i32, source_last: i32, destination_parent: QModelIndex, destination_child: i32 )

Refer to the Qt documentation of QAbstractListModel::beginMoveRows

source

fn end_move_rows(&mut self)

Refer to the Qt documentation of QAbstractListModel::endMoveRows

source

fn data_changed(&mut self, top_left: QModelIndex, bottom_right: QModelIndex)

Refer to the Qt documentation of QAbstractListModel::dataChanged

source

fn row_index(&self, i: i32) -> QModelIndex

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

Implementors§