![]() |
Qt 6.x
The Qt SDK
|
#include <qtableview_p.h>
Classes | |
struct | Span |
Public Types | |
typedef std::list< Span * > | SpanList |
Public Member Functions | |
~QSpanCollection () | |
void | addSpan (Span *span) |
void | updateSpan (Span *span, int old_height) |
Span * | spanAt (int x, int y) const |
void | clear () |
QSet< Span * > | spansInRect (int x, int y, int w, int h) const |
void | updateInsertedRows (int start, int end) |
void | updateInsertedColumns (int start, int end) |
void | updateRemovedRows (int start, int end) |
void | updateRemovedColumns (int start, int end) |
Public Attributes | |
SpanList | spans |
This is a list of span with a binary index to look up quickly a span at a certain index.
The index is a map of map. spans are mentaly divided into sub spans so that the start of any subspans doesn't overlap with any other subspans. There is no real representation of the subspans. The key of the first map is the row where the subspan starts, the value of the first map is a list (map) of all subspans that starts at the same row. It is indexed with its row
Definition at line 44 of file qtableview_p.h.
typedef std::list<Span *> QSpanCollection::SpanList |
Definition at line 86 of file qtableview_p.h.
|
inline |
Definition at line 66 of file qtableview_p.h.
References qDeleteAll().
QT_BEGIN_NAMESPACE void QSpanCollection::addSpan | ( | QSpanCollection::Span * | span | ) |
Add a span to the collection. the collection takes the ownership.
Definition at line 33 of file qtableview.cpp.
References QMap< Key, T >::insert(), spans, and QMap< Key, T >::value().
Referenced by QTableViewPrivate::setSpan().
void QSpanCollection::clear | ( | ) |
remove and deletes all spans inside the collection
Definition at line 130 of file qtableview.cpp.
References qDeleteAll(), and spans.
QSpanCollection::Span * QSpanCollection::spanAt | ( | int | x, |
int | y | ||
) | const |
Definition at line 112 of file qtableview.cpp.
Referenced by QTableViewPrivate::heightHintForIndex(), QTableViewPrivate::setSpan(), QTableViewPrivate::span(), and QTableViewPrivate::widthHintForIndex().
QSet< QSpanCollection::Span * > QSpanCollection::spansInRect | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) | const |
return a list to all the spans that spans over cells in the given rectangle
Definition at line 140 of file qtableview.cpp.
References QMap< Key, T >::const_iterator::key(), and list.
Referenced by QTableViewPrivate::drawAndClipSpans().
void QSpanCollection::updateInsertedColumns | ( | int | start, |
int | end | ||
) |
Updates the span collection after column insertion.
Definition at line 225 of file qtableview.cpp.
References QMap< Key, T >::begin(), QMap< Key, T >::end(), Qt::endl(), QMap< Key, T >::erase(), QMap< Key, T >::insert(), it, qDebug, spans, and QMap< Key, T >::value().
Referenced by QTableViewPrivate::_q_updateSpanInsertedColumns().
void QSpanCollection::updateInsertedRows | ( | int | start, |
int | end | ||
) |
Updates the span collection after row insertion.
Definition at line 178 of file qtableview.cpp.
References Qt::endl(), qDebug, and spans.
Referenced by QTableViewPrivate::_q_updateSpanInsertedRows().
void QSpanCollection::updateRemovedColumns | ( | int | start, |
int | end | ||
) |
Updates the span collection after column removal.
Definition at line 432 of file qtableview.cpp.
References Qt::endl(), it, qDebug, qDeleteAll(), and spans.
Referenced by QTableViewPrivate::_q_updateSpanRemovedColumns().
void QSpanCollection::updateRemovedRows | ( | int | start, |
int | end | ||
) |
Updates the span collection after row removal.
Definition at line 305 of file qtableview.cpp.
References QMap< Key, T >::begin(), QMap< Key, T >::clear(), QMap< Key, T >::end(), Qt::endl(), QMap< Key, T >::insert(), QSet< T >::insert(), it, qDebug, qDeleteAll(), spans, and QMap< Key, T >::value().
Referenced by QTableViewPrivate::_q_updateSpanRemovedRows().
void QSpanCollection::updateSpan | ( | QSpanCollection::Span * | span, |
int | old_height | ||
) |
Has to be called after the height and width of a span is changed.
old_height is the height before the change
if the size of the span is now 0x0 the span will be deleted.
Definition at line 71 of file qtableview.cpp.
References Q_ASSERT, Q_UNUSED, qMax(), and spans.
Referenced by QTableViewPrivate::setSpan().
SpanList QSpanCollection::spans |
Definition at line 87 of file qtableview_p.h.
Referenced by addSpan(), clear(), QTableViewPrivate::drawAndClipSpans(), QTableViewPrivate::hasSpans(), updateInsertedColumns(), updateInsertedRows(), updateRemovedColumns(), updateRemovedRows(), and updateSpan().