Struct qmetaobject::listmodel::SimpleListModel
source · pub struct SimpleListModel<T: SimpleListItem + 'static> { /* private fields */ }
Expand description
A simple QAbstractListModel which just wrap a vector of items.
Implementations§
source§impl<T: SimpleListItem> SimpleListModel<T>
impl<T: SimpleListItem> SimpleListModel<T>
Trait Implementations§
source§impl<T: Default + SimpleListItem + 'static> Default for SimpleListModel<T>
impl<T: Default + SimpleListItem + 'static> Default for SimpleListModel<T>
source§fn default() -> SimpleListModel<T>
fn default() -> SimpleListModel<T>
Returns the “default value” for a type. Read more
source§impl<'a, T> FromIterator<&'a T> for SimpleListModel<T>
impl<'a, T> FromIterator<&'a T> for SimpleListModel<T>
source§fn from_iter<I: IntoIterator<Item = &'a T>>(iter: I) -> SimpleListModel<T>
fn from_iter<I: IntoIterator<Item = &'a T>>(iter: I) -> SimpleListModel<T>
Creates a value from an iterator. Read more
source§impl<T> FromIterator<T> for SimpleListModel<T>where
T: SimpleListItem + Default,
impl<T> FromIterator<T> for SimpleListModel<T>where
T: SimpleListItem + Default,
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> SimpleListModel<T>
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> SimpleListModel<T>
Creates a value from an iterator. Read more
source§impl<T> Index<usize> for SimpleListModel<T>where
T: SimpleListItem,
impl<T> Index<usize> for SimpleListModel<T>where
T: SimpleListItem,
source§impl<T> QAbstractListModel for SimpleListModel<T>where
T: SimpleListItem,
impl<T> QAbstractListModel for SimpleListModel<T>where
T: SimpleListItem,
source§fn data(&self, index: QModelIndex, role: i32) -> QVariant
fn data(&self, index: QModelIndex, role: i32) -> QVariant
Refer to the Qt documentation of QAbstractListModel::data
source§fn role_names(&self) -> HashMap<i32, QByteArray>
fn role_names(&self) -> HashMap<i32, QByteArray>
Refer to the Qt documentation of QAbstractListModel::roleNames
source§fn 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
source§fn 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
source§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
source§fn end_insert_rows(&mut self)
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)
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)
fn end_remove_rows(&mut self)
Refer to the Qt documentation of QAbstractListModel::endRemoveRows
source§fn begin_reset_model(&mut self)
fn begin_reset_model(&mut self)
Refer to the Qt documentation of QAbstractListModel::beginResetModel
source§fn end_reset_model(&mut self)
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
)
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)
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)
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
fn row_index(&self, i: i32) -> QModelIndex
Returns a QModelIndex for the given row (in the first column)
source§impl<T: SimpleListItem + 'static> QObject for SimpleListModel<T>
impl<T: SimpleListItem + 'static> QObject for SimpleListModel<T>
source§fn meta_object(&self) -> *const QMetaObject
fn meta_object(&self) -> *const QMetaObject
Returns a pointer to a meta object
source§fn static_meta_object() -> *const QMetaObject
fn static_meta_object() -> *const QMetaObject
Returns a pointer to a meta object
source§fn get_cpp_object(&self) -> *mut c_void
fn get_cpp_object(&self) -> *mut c_void
return a C++ pointer to the QObject* (can be null if not yet initialized)
source§unsafe fn get_from_cpp<'pinned_ref>(
ptr: *mut c_void
) -> QObjectPinned<'pinned_ref, Self>
unsafe fn get_from_cpp<'pinned_ref>( ptr: *mut c_void ) -> QObjectPinned<'pinned_ref, Self>
Return a rust object belonging to a C++ object
source§unsafe fn cpp_construct(pinned: &RefCell<Self>) -> *mut c_void
unsafe fn cpp_construct(pinned: &RefCell<Self>) -> *mut c_void
Construct the C++ Object. Read more
source§unsafe fn qml_construct(
pinned: &RefCell<Self>,
mem: *mut c_void,
extra_destruct: extern "C" fn(_: *mut c_void)
)
unsafe fn qml_construct( pinned: &RefCell<Self>, mem: *mut c_void, extra_destruct: extern "C" fn(_: *mut c_void) )
Construct the C++ Object, suitable for callbacks to construct QML objects.
source§fn get_object_description() -> &'static QObjectDescriptorwhere
Self: Sized,
fn get_object_description() -> &'static QObjectDescriptorwhere
Self: Sized,
Returns a QObjectDescriptor for this type
Auto Trait Implementations§
impl<T> RefUnwindSafe for SimpleListModel<T>where
T: RefUnwindSafe,
impl<T> !Send for SimpleListModel<T>
impl<T> !Sync for SimpleListModel<T>
impl<T> Unpin for SimpleListModel<T>where
T: Unpin,
impl<T> UnwindSafe for SimpleListModel<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more