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
sourceimpl<T: SimpleListItem> SimpleListModel<T>
impl<T: SimpleListItem> SimpleListModel<T>
Trait Implementations
sourceimpl<T: Default + SimpleListItem + 'static> Default for SimpleListModel<T>
impl<T: Default + SimpleListItem + 'static> Default for SimpleListModel<T>
sourcefn default() -> SimpleListModel<T>
fn default() -> SimpleListModel<T>
Returns the “default value” for a type. Read more
sourceimpl<'a, T> FromIterator<&'a T> for SimpleListModel<T> where
T: SimpleListItem + Default + Clone,
impl<'a, T> FromIterator<&'a T> for SimpleListModel<T> where
T: SimpleListItem + Default + Clone,
sourcefn 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
sourceimpl<T> FromIterator<T> for SimpleListModel<T> where
T: SimpleListItem + Default,
impl<T> FromIterator<T> for SimpleListModel<T> where
T: SimpleListItem + Default,
sourcefn 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
sourceimpl<T> Index<usize> for SimpleListModel<T> where
T: SimpleListItem,
impl<T> Index<usize> for SimpleListModel<T> where
T: SimpleListItem,
sourceimpl<T> QAbstractListModel for SimpleListModel<T> where
T: SimpleListItem,
impl<T> QAbstractListModel for SimpleListModel<T> where
T: SimpleListItem,
sourcefn data(&self, index: QModelIndex, role: i32) -> QVariant
fn data(&self, index: QModelIndex, role: i32) -> QVariant
Refer to the Qt documentation of QAbstractListModel::data
sourcefn role_names(&self) -> HashMap<i32, QByteArray>
fn role_names(&self) -> HashMap<i32, QByteArray>
Refer to the Qt documentation of QAbstractListModel::roleNames
sourcefn 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
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 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 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)
sourceimpl<T: SimpleListItem + 'static> QObject for SimpleListModel<T>
impl<T: SimpleListItem + 'static> QObject for SimpleListModel<T>
sourcefn meta_object(&self) -> *const QMetaObject
fn meta_object(&self) -> *const QMetaObject
Returns a pointer to a meta object
sourcefn static_meta_object() -> *const QMetaObject
fn static_meta_object() -> *const QMetaObject
Returns a pointer to a meta object
sourcefn 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)
sourceunsafe 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
sourceunsafe 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
sourceunsafe 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.
sourcefn get_object_description() -> &'static QObjectDescriptor where
Self: Sized,
fn get_object_description() -> &'static QObjectDescriptor where
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more