Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 47 of file qtableview_p.h.

Member Typedef Documentation

◆ SpanList

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

Definition at line 89 of file qtableview_p.h.

Constructor & Destructor Documentation

◆ ~QSpanCollection()

QSpanCollection::~QSpanCollection ( )
inline

Definition at line 69 of file qtableview_p.h.

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 36 of file qtableview.cpp.

◆ clear()

void QSpanCollection::clear ( )

remove and deletes all spans inside the collection

Definition at line 133 of file qtableview.cpp.

◆ 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 115 of file qtableview.cpp.

◆ 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 143 of file qtableview.cpp.

◆ updateInsertedColumns()

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

Updates the span collection after column insertion.

Definition at line 234 of file qtableview.cpp.

◆ updateInsertedRows()

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

Updates the span collection after row insertion.

Definition at line 188 of file qtableview.cpp.

◆ updateRemovedColumns()

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

Updates the span collection after column removal.

Definition at line 438 of file qtableview.cpp.

◆ updateRemovedRows()

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

Updates the span collection after row removal.

Definition at line 313 of file qtableview.cpp.

◆ 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 74 of file qtableview.cpp.

Member Data Documentation

◆ spans

SpanList QSpanCollection::spans

Definition at line 90 of file qtableview_p.h.


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