Trait qmetaobject::listmodel::QAbstractListModel [−][src]
pub trait QAbstractListModel: QObject {}Show 13 methods
fn row_count(&self) -> 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(&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 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
fn data(&self, index: QModelIndex, role: i32) -> QVariant
fn data(&self, index: QModelIndex, role: i32) -> QVariant
Refer to the Qt documentation of QAbstractListModel::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 QAbstractListModel::setData
fn role_names(&self) -> HashMap<i32, QByteArray>
fn role_names(&self) -> HashMap<i32, QByteArray>
Refer to the Qt documentation of QAbstractListModel::roleNames
fn begin_insert_rows(&mut self, first: i32, last: i32)
fn begin_insert_rows(&mut self, first: i32, last: i32)
Refer to the Qt documentation of QAbstractListModel::beginInsertRows
fn end_insert_rows(&mut self)
fn end_insert_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endInsertRows
fn begin_remove_rows(&mut self, first: i32, last: i32)
fn begin_remove_rows(&mut self, first: i32, last: i32)
Refer to the Qt documentation of QAbstractListModel::beginRemoveRows
fn end_remove_rows(&mut self)
fn end_remove_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endRemoveRows
fn begin_reset_model(&mut self)
fn begin_reset_model(&mut self)
Refer to the Qt documentation of QAbstractListModel::beginResetModel
fn end_reset_model(&mut self)
fn end_reset_model(&mut self)
Refer to the Qt documentation of QAbstractListModel::endResetModel
fn data_changed(&mut self, top_left: QModelIndex, bottom_right: QModelIndex)
fn data_changed(&mut self, top_left: QModelIndex, bottom_right: QModelIndex)
Refer to the Qt documentation of QAbstractListModel::dataChanged
fn row_index(&self, i: i32) -> QModelIndex
fn row_index(&self, i: i32) -> QModelIndex
Returns a QModelIndex for the given row (in the first column)