QRangeModelAdapter::RowReferenceBase Struct
template <typename Reference, typename Adapter> struct QRangeModelAdapter::RowReferenceBaseRowReferenceBase provides common API for RowReference and ConstRowReference. More...
This struct is in technology preview and is subject to change.
This struct was introduced in Qt 6.11.
Public Functions
| auto | at(int column) const |
| QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | begin() const |
| QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | cbegin() const |
| QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | cend() const |
| auto | children() const |
| QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator | end() const |
| bool | hasChildren() const |
| QRangeModelAdapter<Range, Protocol, Model>::RowReferenceBase<Reference, Adapter>::size_type | size() const |
| auto | operator[](int column) const |
Protected Functions
Detailed Description
For models that are tables or trees, accessing a row of an adapter using at(), subscript operator[], or dereferencing a RowIterator, returns a RowReference or ConstRowReference to the specified row.
See also DataReference.
Member Function Documentation
[protected default] RowReferenceBase::~RowReferenceBase()
Destroys the instance of RowReferenceBase.
auto RowReferenceBase::at(int column) const
auto RowReferenceBase::operator[](int column) const
Returns a reference wrapper to the item at column of this row.
Depending on the data structure the adapter operates on, the returned value is a const reference wrapper, a pointer to a const object, or a QVariant.
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::begin() const
Returns a ConstColumnIterator pointing to the first column of this row.
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::cbegin() const
Returns a ConstColumnIterator pointing to the first column of this row.
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::cend() const
Returns a ConstColumnIterator pointing just after the last column of this row.
template <typename I> requires if_tree<I> auto RowReferenceBase::children() const
Returns a QRangeModelAdapter operating on the same range and model as this adapter, and with this row as the root index.
Constraints
Participates in overload resolution only if Range is a tree.
QRangeModelAdapter<Range, Protocol, Model>::ConstColumnIterator RowReferenceBase::end() const
Returns a ConstColumnIterator pointing just after the last column of this row.
template <typename I> requires if_tree<I> bool RowReferenceBase::hasChildren() const
Returns true if the referenced row has one or more child rows, otherwise false.
Constraints
Participates in overload resolution only if Range is a tree.
QRangeModelAdapter<Range, Protocol, Model>::RowReferenceBase<Reference, Adapter>::size_type RowReferenceBase::size() const
Returns the number of columns in the model.
This returns the same value for all rows in the model.