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
fn index(&self, row: i32, column: i32, parent: QModelIndex) -> QModelIndex
fn index(&self, row: i32, column: i32, parent: QModelIndex) -> QModelIndex
Refer to the Qt documentation of QAbstractItemModel::index
fn parent(&self, index: QModelIndex) -> QModelIndex
fn parent(&self, index: QModelIndex) -> QModelIndex
Refer to the Qt documentation of QAbstractItemModel::parent
fn row_count(&self, parent: QModelIndex) -> i32
fn row_count(&self, parent: QModelIndex) -> i32
Refer to the Qt documentation of QAbstractItemModel::rowCount
fn column_count(&self, parent: QModelIndex) -> i32
fn column_count(&self, parent: QModelIndex) -> i32
Refer to the Qt documentation of QAbstractItemModel::columnCount
fn data(&self, index: QModelIndex, role: i32) -> QVariant
fn data(&self, index: QModelIndex, role: i32) -> QVariant
Refer to the Qt documentation of QAbstractItemModel::data
Provided methods
fn get_object_description() -> &'static QObjectDescriptor where
Self: Sized,
fn get_object_description() -> &'static QObjectDescriptor where
Self: Sized,
Required for the implementation detail of the QObject custom derive
Refer to the Qt documentation of QAbstractItemModel::setData
fn role_names(&self) -> HashMap<i32, QByteArray>
fn role_names(&self) -> HashMap<i32, QByteArray>
Refer to the Qt documentation of QAbstractItemModel::roleNames
fn begin_insert_rows(&self, parent: QModelIndex, first: i32, last: i32)
fn begin_insert_rows(&self, parent: QModelIndex, first: i32, last: i32)
Refer to the Qt documentation of QAbstractListModel::beginInsertRows
fn end_insert_rows(&self)
fn end_insert_rows(&self)
Refer to the Qt documentation of QAbstractListModel::endInsertRows
fn begin_remove_rows(&self, parent: QModelIndex, first: i32, last: i32)
fn begin_remove_rows(&self, parent: QModelIndex, first: i32, last: i32)
Refer to the Qt documentation of QAbstractListModel::beginRemoveRows
fn end_remove_rows(&self)
fn end_remove_rows(&self)
Refer to the Qt documentation of QAbstractListModel::endRemoveRows
fn begin_reset_model(&self)
fn begin_reset_model(&self)
Refer to the Qt documentation of QAbstractListModel::beginResetModel
fn end_reset_model(&self)
fn end_reset_model(&self)
Refer to the Qt documentation of QAbstractListModel::endResetModel
fn layout_about_to_be_changed(&self)
fn layout_about_to_be_changed(&self)
Refer to the Qt documentation of QAbstractListModel::layoutAboutToBeChanged
update_model_indexes need to be called between layout_about_to_be_changed and layout_changed
fn update_model_indexes(&self, f: &mut dyn FnMut(QModelIndex) -> QModelIndex)
fn update_model_indexes(&self, f: &mut dyn FnMut(QModelIndex) -> QModelIndex)
Refer to the Qt documentation of QAbstractListModel::layoutAboutToBeChanged
update_model_indexes need to be called between layout_about_to_be_changed and layout_changed
fn layout_changed(&self)
fn layout_changed(&self)
Refer to the Qt documentation of QAbstractListModel::layoutChanged
update_model_indexes need to be called between layout_about_to_be_changed and layout_changed
fn data_changed(&self, top_left: QModelIndex, bottom_right: QModelIndex)
fn data_changed(&self, top_left: QModelIndex, bottom_right: QModelIndex)
Refer to the Qt documentation of QAbstractListModel::dataChanged
fn create_index(&self, row: i32, column: i32, id: usize) -> QModelIndex
fn create_index(&self, row: i32, column: i32, id: usize) -> QModelIndex
Refer to the Qt documentation of QAbstractItemModel::createIndex