Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSpanCollection Class Reference

#include <qtableview_p.h>

+ Collaboration diagram for QSpanCollection:

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)
 
SpanspanAt (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
 

Detailed Description

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 46 of file qtableview_p.h.

Member Typedef Documentation

◆ SpanList

typedef std::list<Span *> QSpanCollection::SpanList

Definition at line 88 of file qtableview_p.h.

Constructor & Destructor Documentation

◆ ~QSpanCollection()

QSpanCollection::~QSpanCollection ( )
inline

Definition at line 68 of file qtableview_p.h.

References qDeleteAll().

+ Here is the call graph for this function:

Member Function Documentation

◆ addSpan()

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 spans, and QMap< Key, T >::value().

Referenced by QTableViewPrivate::setSpan().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clear()

void QSpanCollection::clear ( )

remove and deletes all spans inside the collection

Definition at line 130 of file qtableview.cpp.

References qDeleteAll(), and spans.

+ Here is the call graph for this function:

◆ spanAt()

QSpanCollection::Span * QSpanCollection::spanAt ( int x,
int y ) const
Returns
a spans that spans over cell x,y (column,row) or \nullptr if there is none.

Definition at line 112 of file qtableview.cpp.

Referenced by QTableViewPrivate::heightHintForIndex(), QTableViewPrivate::setSpan(), QTableViewPrivate::span(), and QTableViewPrivate::widthHintForIndex().

+ Here is the caller graph for this function:

◆ spansInRect()

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 list.

Referenced by QTableViewPrivate::drawAndClipSpans().

+ Here is the caller graph for this function:

◆ updateInsertedColumns()

void QSpanCollection::updateInsertedColumns ( int start,
int end )

Updates the span collection after column insertion.

Definition at line 231 of file qtableview.cpp.

References QSet< T >::begin(), QSet< T >::end(), Qt::endl(), QSet< T >::erase(), QSet< T >::insert(), it, qDebug, spans, and QMap< Key, T >::value().

Referenced by QTableViewPrivate::updateSpanInsertedColumns().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateInsertedRows()

void QSpanCollection::updateInsertedRows ( int start,
int end )

Updates the span collection after row insertion.

Definition at line 185 of file qtableview.cpp.

References Qt::endl(), qDebug, and spans.

Referenced by QTableViewPrivate::updateSpanInsertedRows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateRemovedColumns()

void QSpanCollection::updateRemovedColumns ( int start,
int end )

Updates the span collection after column removal.

Definition at line 435 of file qtableview.cpp.

References QSet< T >::begin(), QSet< T >::end(), Qt::endl(), QSet< T >::erase(), it, qDebug, qDeleteAll(), and spans.

Referenced by QTableViewPrivate::updateSpanRemovedColumns().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateRemovedRows()

void QSpanCollection::updateRemovedRows ( int start,
int end )

Updates the span collection after row removal.

Definition at line 310 of file qtableview.cpp.

References QSet< T >::begin(), QSet< T >::end(), Qt::endl(), QSet< T >::erase(), QSet< T >::insert(), it, qDebug, qDeleteAll(), spans, and QMap< Key, T >::value().

Referenced by QTableViewPrivate::updateSpanRemovedRows().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSpan()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ spans


The documentation for this class was generated from the following files: