11 #include <QModelIndex> 32 const QAbstractItemModel *Model_ =
nullptr;
65 ModelIterator (
const QAbstractItemModel *model,
int row,
int col = 0,
66 Direction dir = Direction::Rows,
const QModelIndex& parent = {});
73 ModelIterator& operator++ ();
80 ModelIterator operator++ (
int);
87 ModelIterator& operator-- ();
94 ModelIterator operator-- (
int);
101 ModelIterator& operator+= (
int count);
109 ModelIterator& operator-= (
int count);
123 int operator- (
const ModelIterator& other)
const;
160 Direction GetDirection ()
const;
162 int& GetIncrementable ();
163 int GetIncrementable ()
const;
189 .End_ = { model.rowCount () },
204 struct std::iterator_traits<
LC::Util::ModelIterator>
212 static_assert (std::ranges::input_range<LC::Util::ModelRange>);
constexpr detail::AggregateType< detail::AggregateFunction::Count, Ptr > count
Direction
The direction of traversal.
const ModelIterator Begin_
auto operator*(const F &function, const T &functor) -> decltype(Fmap(functor, function))
An operator-style alias for Fmap().
The model should be traversed by rows.
ModelRange ModelRows(const QAbstractItemModel &model, int from, int to, int column=0)
random_access_iterator_tag iterator_category
bool operator==(const ModelIterator &left, const ModelIterator &right)
ModelRange AllModelRows(const QAbstractItemModel &model, int column=0)
Provides an iterator-based API to a Qt model.