Trait qmetaobject::listmodel::QAbstractListModel
source · 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§
sourcefn 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§
sourcefn get_object_description() -> &'static QObjectDescriptorwhere
Self: Sized,
fn get_object_description() -> &'static QObjectDescriptorwhere
Self: Sized,
Required for the implementation detail of the QObject custom derive
sourcefn set_data(
&mut self,
_index: QModelIndex,
_value: &QVariant,
_role: i32
) -> bool
fn set_data( &mut self, _index: QModelIndex, _value: &QVariant, _role: i32 ) -> bool
Refer to the Qt documentation of QAbstractListModel::setData
sourcefn role_names(&self) -> HashMap<i32, QByteArray>
fn role_names(&self) -> HashMap<i32, QByteArray>
Refer to the Qt documentation of QAbstractListModel::roleNames
sourcefn 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
sourcefn end_insert_rows(&mut self)
fn end_insert_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endInsertRows
sourcefn 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
sourcefn end_remove_rows(&mut self)
fn end_remove_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endRemoveRows
sourcefn begin_reset_model(&mut self)
fn begin_reset_model(&mut self)
Refer to the Qt documentation of QAbstractListModel::beginResetModel
sourcefn end_reset_model(&mut self)
fn end_reset_model(&mut self)
Refer to the Qt documentation of QAbstractListModel::endResetModel
sourcefn begin_move_rows(
&mut self,
source_parent: QModelIndex,
source_first: i32,
source_last: i32,
destination_parent: QModelIndex,
destination_child: i32
)
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
sourcefn end_move_rows(&mut self)
fn end_move_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endMoveRows
sourcefn 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
sourcefn row_index(&self, i: i32) -> QModelIndex
fn row_index(&self, i: i32) -> QModelIndex
Returns a QModelIndex for the given row (in the first column)