Trait qmetaobject::itemmodel::QAbstractItemModel[][src]

pub trait QAbstractItemModel: QObject {
Show 19 methods fn index(&self, row: i32, column: i32, parent: QModelIndex) -> QModelIndex;
fn parent(&self, index: QModelIndex) -> QModelIndex;
fn row_count(&self, parent: QModelIndex) -> i32;
fn column_count(&self, parent: QModelIndex) -> i32;
fn data(&self, index: QModelIndex, role: i32) -> QVariant; 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(&self, parent: QModelIndex, first: i32, last: i32) { ... }
fn end_insert_rows(&self) { ... }
fn begin_remove_rows(&self, parent: QModelIndex, first: i32, last: i32) { ... }
fn end_remove_rows(&self) { ... }
fn begin_reset_model(&self) { ... }
fn end_reset_model(&self) { ... }
fn layout_about_to_be_changed(&self) { ... }
fn update_model_indexes(
        &self,
        f: &mut dyn FnMut(QModelIndex) -> QModelIndex
    ) { ... }
fn layout_changed(&self) { ... }
fn data_changed(&self, top_left: QModelIndex, bottom_right: QModelIndex) { ... }
fn create_index(&self, row: i32, column: i32, id: usize) -> QModelIndex { ... }
}
Expand description

This trait allow to override a Qt QAbstractItemModel

Required methods

Refer to the Qt documentation of QAbstractItemModel::index

Refer to the Qt documentation of QAbstractItemModel::parent

Refer to the Qt documentation of QAbstractItemModel::rowCount

Refer to the Qt documentation of QAbstractItemModel::columnCount

Refer to the Qt documentation of QAbstractItemModel::data

Provided methods

Required for the implementation detail of the QObject custom derive

Refer to the Qt documentation of QAbstractItemModel::setData

Refer to the Qt documentation of QAbstractItemModel::roleNames

Refer to the Qt documentation of QAbstractListModel::beginInsertRows

Refer to the Qt documentation of QAbstractListModel::endInsertRows

Refer to the Qt documentation of QAbstractListModel::beginRemoveRows

Refer to the Qt documentation of QAbstractListModel::endRemoveRows

Refer to the Qt documentation of QAbstractListModel::beginResetModel

Refer to the Qt documentation of QAbstractListModel::endResetModel

Refer to the Qt documentation of QAbstractListModel::layoutAboutToBeChanged

update_model_indexes need to be called between layout_about_to_be_changed and layout_changed

Refer to the Qt documentation of QAbstractListModel::layoutAboutToBeChanged

update_model_indexes need to be called between layout_about_to_be_changed and layout_changed

Refer to the Qt documentation of QAbstractListModel::layoutChanged

update_model_indexes need to be called between layout_about_to_be_changed and layout_changed

Refer to the Qt documentation of QAbstractListModel::dataChanged

Refer to the Qt documentation of QAbstractItemModel::createIndex

Implementors