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
QHeaderViewPrivate Class Reference

#include <qheaderview_p.h>

+ Inheritance diagram for QHeaderViewPrivate:
+ Collaboration diagram for QHeaderViewPrivate:

Classes

struct  LayoutChangeItem
 
struct  SectionItem
 

Public Types

enum  StateVersion { VersionMarker = 0xff }
 
enum  State {
  NoState , ResizeSection , MoveSection , SelectSections ,
  NoClear
}
 

Public Member Functions

 QHeaderViewPrivate ()
 
int lastVisibleVisualIndex () const
 
void restoreSizeOnPrevLastSection ()
 
void setNewLastSection (int visualIndexForLastSection)
 
void maybeRestorePrevLastSectionAndStretchLast ()
 
int sectionHandleAt (int position)
 
void setupSectionIndicator (int section, int position)
 
void updateSectionIndicator (int section, int position)
 
void updateHiddenSections (int logicalFirst, int logicalLast)
 
void resizeSections (QHeaderView::ResizeMode globalMode, bool useGlobalMode=false)
 
void sectionsRemoved (const QModelIndex &, int, int)
 
void sectionsAboutToBeMoved (const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)
 
void sectionsMoved (const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)
 
void sectionsAboutToBeChanged (const QList< QPersistentModelIndex > &parents=QList< QPersistentModelIndex >(), QAbstractItemModel::LayoutChangeHint hint=QAbstractItemModel::NoLayoutChangeHint)
 
void sectionsChanged (const QList< QPersistentModelIndex > &parents=QList< QPersistentModelIndex >(), QAbstractItemModel::LayoutChangeHint hint=QAbstractItemModel::NoLayoutChangeHint)
 
bool isSectionSelected (int section) const
 
bool isFirstVisibleSection (int section) const
 
bool isLastVisibleSection (int section) const
 
bool rowIntersectsSelection (int row) const
 
bool columnIntersectsSelection (int column) const
 
bool sectionIntersectsSelection (int logical) const
 
bool isRowSelected (int row) const
 
bool isColumnSelected (int column) const
 
void prepareSectionSelected ()
 
int sectionCount () const
 
bool reverse () const
 
int logicalIndex (int visualIndex) const
 
int visualIndex (int logicalIndex) const
 
void setDefaultValues (Qt::Orientation o)
 
bool isVisualIndexHidden (int visual) const
 
void setVisualIndexHidden (int visual, bool hidden)
 
bool hasAutoResizeSections () const
 
QStyleOptionHeader getStyleOption () const
 
void invalidateCachedSizeHint () const
 
void initializeIndexMapping () const
 
void clearCascadingSections ()
 
void saveCascadingSectionSize (int visual, int size)
 
bool sectionIsCascadable (int visual) const
 
int modelSectionCount () const
 
void doDelayedResizeSections ()
 
void executePostedResize () const
 
void disconnectModel ()
 
void clear ()
 
void flipSortIndicator (int section)
 
Qt::SortOrder defaultSortOrderForSection (int section) const
 
void cascadingResize (int visual, int newSize)
 
void createSectionItems (int start, int end, int sectionSize, QHeaderView::ResizeMode mode)
 
void removeSectionsFromSectionItems (int start, int end)
 
void resizeSectionItem (int visualIndex, int oldSize, int newSize)
 
void setDefaultSectionSize (int size)
 
void updateDefaultSectionSizeFromStyle ()
 
void recalcSectionStartPos () const
 
int headerLength () const
 
QBitArray sectionsHiddenToBitVector () const
 
void setHiddenSectionsFromBitVector (const QBitArray &sectionHidden)
 
int headerSectionSize (int visual) const
 
int headerSectionPosition (int visual) const
 
int headerVisualIndexAt (int position) const
 
void setHeaderSectionResizeMode (int visual, QHeaderView::ResizeMode mode)
 
QHeaderView::ResizeMode headerSectionResizeMode (int visual) const
 
void setGlobalHeaderResizeMode (QHeaderView::ResizeMode mode)
 
int viewSectionSizeHint (int logical) const
 
int adjustedVisualIndex (int visualIndex) const
 
void setScrollOffset (const QScrollBar *scrollBar, QAbstractItemView::ScrollMode scrollMode)
 
void updateSectionsBeforeAfter (int logical)
 
void write (QDataStream &out) const
 
bool read (QDataStream &in)
 
- Public Member Functions inherited from QAbstractItemViewPrivate
 QAbstractItemViewPrivate ()
 
virtual ~QAbstractItemViewPrivate ()
 
void init ()
 
virtual void rowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual void columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void columnsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void columnsInserted (const QModelIndex &parent, int start, int end)
 
virtual void modelDestroyed ()
 
virtual void layoutChanged ()
 
virtual void rowsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual void columnsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual QRect intersectedRect (const QRect rect, const QModelIndex &topLeft, const QModelIndex &bottomRight) const
 
void headerDataChanged ()
 
void scrollerStateChanged ()
 
void delegateSizeHintChanged (const QModelIndex &index)
 
void fetchMore ()
 
bool shouldEdit (QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const
 
bool shouldForwardEvent (QAbstractItemView::EditTrigger trigger, const QEvent *event) const
 
bool shouldAutoScroll (const QPoint &pos) const
 
void doDelayedItemsLayout (int delay=0)
 
void interruptDelayedItemsLayout () const
 
void updateGeometry ()
 
void startAutoScroll ()
 
void stopAutoScroll ()
 
bool droppingOnItself (QDropEvent *event, const QModelIndex &index)
 
QWidgeteditor (const QModelIndex &index, const QStyleOptionViewItem &options)
 
bool sendDelegateEvent (const QModelIndex &index, QEvent *event) const
 
bool openEditor (const QModelIndex &index, QEvent *event)
 
void updateEditorData (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void selectAllInEditor (QWidget *w)
 
QItemSelectionModel::SelectionFlags multiSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QItemSelectionModel::SelectionFlags extendedSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QItemSelectionModel::SelectionFlags contiguousSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
virtual void selectAll (QItemSelectionModel::SelectionFlags command)
 
void setHoverIndex (const QPersistentModelIndex &index)
 
void checkMouseMove (const QPersistentModelIndex &index)
 
void checkMouseMove (const QPoint &pos)
 
QItemSelectionModel::SelectionFlags selectionBehaviorFlags () const
 
virtual QItemViewPaintPairs draggablePaintPairs (const QModelIndexList &indexes, QRect *r) const
 
virtual void adjustViewOptionsForIndex (QStyleOptionViewItem *, const QModelIndex &) const
 
void releaseEditor (QWidget *editor, const QModelIndex &index=QModelIndex()) const
 
void executePostedLayout () const
 
void setDirtyRegion (const QRegion &visualRegion)
 
void scrollDirtyRegion (int dx, int dy)
 
void scrollContentsBy (int dx, int dy)
 
void updateDirtyRegion ()
 
void clearOrRemove ()
 
void checkPersistentEditorFocus ()
 
QPixmap renderToPixmap (const QModelIndexList &indexes, QRect *r) const
 
QPoint offset () const
 
const QEditorInfoeditorForIndex (const QModelIndex &index) const
 
bool hasEditor (const QModelIndex &index) const
 
QModelIndex indexForEditor (QWidget *editor) const
 
void addEditor (const QModelIndex &index, QWidget *editor, bool isStatic)
 
void removeEditor (QWidget *editor)
 
bool isAnimating () const
 
bool isIndexValid (const QModelIndex &index) const
 
bool isIndexSelectable (const QModelIndex &index) const
 
bool isIndexEnabled (const QModelIndex &index) const
 
virtual bool selectionAllowed (const QModelIndex &index) const
 
QPoint contentsOffset () const override
 
int delegateRefCount (const QAbstractItemDelegate *delegate) const
 
bool isPersistent (const QModelIndex &index) const
 
void doDelayedReset ()
 
virtual QRect visualRect (const QModelIndex &index) const
 

Public Attributes

enum QHeaderViewPrivate::State state
 
int headerOffset
 
Qt::Orientation orientation
 
Qt::SortOrder sortIndicatorOrder
 
int sortIndicatorSection
 
bool sortIndicatorShown
 
bool sortIndicatorClearable
 
QList< int > visualIndices
 
QList< int > logicalIndices
 
QBitArray sectionSelected
 
QHash< int, int > hiddenSectionSize
 
QHash< int, int > cascadingSectionSize
 
QSize cachedSizeHint
 
QBasicTimer delayedResize
 
int firstCascadingSection
 
int lastCascadingSection
 
int lastPos
 
int firstPos
 
int originalSize
 
int section
 
int target
 
int firstPressed
 
int pressed
 
int hover
 
int length
 
bool preventCursorChangeInSetOffset
 
bool movableSections
 
bool clickableSections
 
bool highlightSelected
 
bool stretchLastSection
 
bool cascadingResizing
 
bool resizeRecursionBlock
 
bool allowUserMoveOfSection0
 
bool customDefaultSectionSize
 
int stretchSections
 
int contentsSections
 
int defaultSectionSize
 
int minimumSectionSize
 
int maximumSectionSize
 
int lastSectionSize
 
int lastSectionLogicalIdx
 
int sectionIndicatorOffset
 
Qt::Alignment defaultAlignment
 
QHeaderView::ResizeMode globalResizeMode
 
bool sectionStartposRecalc
 
int resizeContentsPrecision
 
QList< SectionItemsectionItems
 
QList< LayoutChangeItemlayoutChangePersistentSections
 
std::array< QMetaObject::Connection, 8 > modelConnections
 
- Public Attributes inherited from QAbstractItemViewPrivate
QAbstractItemModelmodel
 
QPointer< QAbstractItemDelegateitemDelegate
 
QMap< int, QPointer< QAbstractItemDelegate > > rowDelegates
 
QMap< int, QPointer< QAbstractItemDelegate > > columnDelegates
 
QPointer< QItemSelectionModelselectionModel
 
QItemSelectionModel::SelectionFlag ctrlDragSelectionFlag
 
bool noSelectionOnMousePress
 
QAbstractItemView::SelectionMode selectionMode
 
QAbstractItemView::SelectionBehavior selectionBehavior
 
QEditorIndexHash editorIndexHash
 
QIndexEditorHash indexEditorHash
 
QSet< QWidget * > persistent
 
QWidgetcurrentlyCommittingEditor
 
QBasicTimer pressClosedEditorWatcher
 
QPersistentModelIndex lastEditedIndex
 
bool pressClosedEditor
 
bool waitForIMCommit
 
QPersistentModelIndex enteredIndex
 
QPersistentModelIndex pressedIndex
 
QPersistentModelIndex currentSelectionStartIndex
 
Qt::KeyboardModifiers pressedModifiers
 
QPoint pressedPosition
 
QPoint draggedPosition
 
bool pressedAlreadySelected
 
bool releaseFromDoubleClick
 
bool viewportEnteredNeeded
 
QAbstractItemView::State state
 
QAbstractItemView::State stateBeforeAnimation
 
QAbstractItemView::EditTriggers editTriggers
 
QAbstractItemView::EditTrigger lastTrigger
 
QPersistentModelIndex root
 
QPersistentModelIndex hover
 
bool tabKeyNavigation
 
QString keyboardInput
 
QElapsedTimer keyboardInputTime
 
bool autoScroll
 
QBasicTimer autoScrollTimer
 
int autoScrollMargin
 
int autoScrollCount
 
bool shouldScrollToCurrentOnShow
 
bool shouldClearStatusTip
 
bool alternatingColors
 
QSize iconSize
 
Qt::TextElideMode textElideMode
 
QRegion updateRegion
 
QPoint scrollDelayOffset
 
QBasicTimer updateTimer
 
QBasicTimer delayedEditing
 
QBasicTimer delayedAutoScroll
 
QBasicTimer delayedReset
 
QAbstractItemView::ScrollMode verticalScrollMode
 
QAbstractItemView::ScrollMode horizontalScrollMode
 
QItemSelection oldSelection
 
QModelIndex oldCurrent
 
bool currentIndexSet
 
bool wrapItemText
 
bool delayedPendingLayout
 
bool moveCursorUpdatedView
 
bool verticalScrollModeSet
 
bool horizontalScrollModeSet
 
std::array< QMetaObject::Connection, 14 > modelConnections
 
std::array< QMetaObject::Connection, 4 > scrollbarConnections
 

Detailed Description

Definition at line 34 of file qheaderview_p.h.

Member Enumeration Documentation

◆ State

Enumerator
NoState 
ResizeSection 
MoveSection 
SelectSections 
NoClear 

Definition at line 233 of file qheaderview_p.h.

◆ StateVersion

Enumerator
VersionMarker 

Definition at line 39 of file qheaderview_p.h.

Constructor & Destructor Documentation

◆ QHeaderViewPrivate()

QHeaderViewPrivate::QHeaderViewPrivate ( )
inline

Definition at line 41 of file qheaderview_p.h.

Member Function Documentation

◆ adjustedVisualIndex()

int QHeaderViewPrivate::adjustedVisualIndex ( int visualIndex) const

Definition at line 3964 of file qheaderview.cpp.

References adjustedVisualIndex(), hiddenSectionSize, i, QHash< Key, T >::isEmpty(), isVisualIndexHidden(), sectionItems, and visualIndex().

Referenced by adjustedVisualIndex().

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

◆ cascadingResize()

void QHeaderViewPrivate::cascadingResize ( int visual,
int newSize )

◆ clear()

void QHeaderViewPrivate::clear ( )

Definition at line 3675 of file qheaderview.cpp.

References QBitArray::clear(), QList< T >::clear(), QHash< Key, T >::clear(), hiddenSectionSize, invalidateCachedSizeHint(), lastSectionLogicalIdx, logicalIndices, NoClear, sectionItems, sectionSelected, state, and visualIndices.

Referenced by sectionsChanged(), and sectionsRemoved().

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

◆ clearCascadingSections()

void QHeaderViewPrivate::clearCascadingSections ( )
inline

Definition at line 187 of file qheaderview_p.h.

References cascadingSectionSize, QHash< Key, T >::clear(), firstCascadingSection, lastCascadingSection, and sectionItems.

+ Here is the call graph for this function:

◆ columnIntersectsSelection()

bool QHeaderViewPrivate::columnIntersectsSelection ( int column) const
inline

Definition at line 111 of file qheaderview_p.h.

References QItemSelectionModel::columnIntersectsSelection(), QAbstractItemViewPrivate::root, and QAbstractItemViewPrivate::selectionModel.

Referenced by sectionIntersectsSelection().

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

◆ createSectionItems()

void QHeaderViewPrivate::createSectionItems ( int start,
int end,
int sectionSize,
QHeaderView::ResizeMode mode )

Definition at line 3649 of file qheaderview.cpp.

References i, sectionItems, and sectionStartposRecalc.

Referenced by resizeSectionItem(), resizeSections(), and setHeaderSectionResizeMode().

+ Here is the caller graph for this function:

◆ defaultSortOrderForSection()

Qt::SortOrder QHeaderViewPrivate::defaultSortOrderForSection ( int section) const

Definition at line 3722 of file qheaderview.cpp.

References Qt::AscendingOrder, QAbstractItemModel::headerData(), Qt::InitialSortOrderRole, QAbstractItemViewPrivate::model, orientation, and section.

Referenced by flipSortIndicator().

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

◆ disconnectModel()

void QHeaderViewPrivate::disconnectModel ( )
inline

Definition at line 222 of file qheaderview_p.h.

References connection, QObject::disconnect(), and modelConnections.

+ Here is the call graph for this function:

◆ doDelayedResizeSections()

void QHeaderViewPrivate::doDelayedResizeSections ( )
inline

Definition at line 211 of file qheaderview_p.h.

References delayedResize, QBasicTimer::isActive(), and QBasicTimer::start().

Referenced by cascadingResize(), maybeRestorePrevLastSectionAndStretchLast(), read(), sectionsRemoved(), and setDefaultSectionSize().

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

◆ executePostedResize()

void QHeaderViewPrivate::executePostedResize ( ) const
inline

Definition at line 216 of file qheaderview_p.h.

References delayedResize, QBasicTimer::isActive(), NoState, resizeSections(), and state.

+ Here is the call graph for this function:

◆ flipSortIndicator()

void QHeaderViewPrivate::flipSortIndicator ( int section)

Definition at line 3700 of file qheaderview.cpp.

References Qt::AscendingOrder, defaultSortOrderForSection(), flipOrder(), section, sortIndicatorClearable, sortIndicatorOrder, and sortIndicatorSection.

+ Here is the call graph for this function:

◆ getStyleOption()

QStyleOptionHeader QHeaderViewPrivate::getStyleOption ( ) const

◆ hasAutoResizeSections()

bool QHeaderViewPrivate::hasAutoResizeSections ( ) const
inline

Definition at line 165 of file qheaderview_p.h.

References contentsSections, stretchLastSection, and stretchSections.

Referenced by cascadingResize(), and setDefaultSectionSize().

+ Here is the caller graph for this function:

◆ headerLength()

int QHeaderViewPrivate::headerLength ( ) const
inline

Definition at line 329 of file qheaderview_p.h.

References section, and sectionItems.

Referenced by sectionsChanged().

+ Here is the caller graph for this function:

◆ headerSectionPosition()

int QHeaderViewPrivate::headerSectionPosition ( int visual) const

Definition at line 3904 of file qheaderview.cpp.

References recalcSectionStartPos(), sectionCount(), sectionItems, and sectionStartposRecalc.

+ Here is the call graph for this function:

◆ headerSectionResizeMode()

QHeaderView::ResizeMode QHeaderViewPrivate::headerSectionResizeMode ( int visual) const

Definition at line 3940 of file qheaderview.cpp.

References globalResizeMode, and sectionItems.

Referenced by resizeSectionItem(), resizeSections(), and sectionIsCascadable().

+ Here is the caller graph for this function:

◆ headerSectionSize()

int QHeaderViewPrivate::headerSectionSize ( int visual) const

Definition at line 3897 of file qheaderview.cpp.

References sectionCount(), and sectionItems.

Referenced by cascadingResize(), resizeSections(), setHeaderSectionResizeMode(), setNewLastSection(), and updateSectionsBeforeAfter().

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

◆ headerVisualIndexAt()

int QHeaderViewPrivate::headerVisualIndexAt ( int position) const

Definition at line 3914 of file qheaderview.cpp.

References position(), recalcSectionStartPos(), sectionItems, and sectionStartposRecalc.

+ Here is the call graph for this function:

◆ initializeIndexMapping()

void QHeaderViewPrivate::initializeIndexMapping ( ) const
inline

Definition at line 175 of file qheaderview_p.h.

References logicalIndices, QList< T >::resize(), sectionCount(), QList< T >::size(), and visualIndices.

+ Here is the call graph for this function:

◆ invalidateCachedSizeHint()

void QHeaderViewPrivate::invalidateCachedSizeHint ( ) const
inline

Definition at line 171 of file qheaderview_p.h.

References cachedSizeHint.

Referenced by clear(), resizeSections(), sectionsRemoved(), and setDefaultSectionSize().

+ Here is the caller graph for this function:

◆ isColumnSelected()

bool QHeaderViewPrivate::isColumnSelected ( int column) const
inline

Definition at line 123 of file qheaderview_p.h.

References QItemSelectionModel::isColumnSelected(), QAbstractItemViewPrivate::root, and QAbstractItemViewPrivate::selectionModel.

Referenced by isSectionSelected().

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

◆ isFirstVisibleSection()

bool QHeaderViewPrivate::isFirstVisibleSection ( int section) const

Definition at line 3441 of file qheaderview.cpp.

References item, recalcSectionStartPos(), section, sectionItems, and sectionStartposRecalc.

+ Here is the call graph for this function:

◆ isLastVisibleSection()

bool QHeaderViewPrivate::isLastVisibleSection ( int section) const

Definition at line 3449 of file qheaderview.cpp.

References item, length, recalcSectionStartPos(), section, sectionItems, and sectionStartposRecalc.

+ Here is the call graph for this function:

◆ isRowSelected()

bool QHeaderViewPrivate::isRowSelected ( int row) const
inline

Definition at line 119 of file qheaderview_p.h.

References QItemSelectionModel::isRowSelected(), QAbstractItemViewPrivate::root, and QAbstractItemViewPrivate::selectionModel.

Referenced by isSectionSelected().

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

◆ isSectionSelected()

bool QHeaderViewPrivate::isSectionSelected ( int section) const

Definition at line 3424 of file qheaderview.cpp.

References Qt::Horizontal, i, isColumnSelected(), isRowSelected(), orientation, section, sectionSelected, QBitArray::setBit(), QBitArray::size(), and QBitArray::testBit().

+ Here is the call graph for this function:

◆ isVisualIndexHidden()

bool QHeaderViewPrivate::isVisualIndexHidden ( int visual) const
inline

Definition at line 157 of file qheaderview_p.h.

References sectionItems.

Referenced by adjustedVisualIndex(), cascadingResize(), resizeSections(), and setDefaultSectionSize().

+ Here is the caller graph for this function:

◆ lastVisibleVisualIndex()

int QHeaderViewPrivate::lastVisibleVisualIndex ( ) const

Returns the last visible (ie. not hidden) visual index

Definition at line 3461 of file qheaderview.cpp.

Referenced by maybeRestorePrevLastSectionAndStretchLast(), read(), and sectionsRemoved().

+ Here is the caller graph for this function:

◆ logicalIndex()

int QHeaderViewPrivate::logicalIndex ( int visualIndex) const
inline

Definition at line 141 of file qheaderview_p.h.

References QList< T >::at(), QList< T >::isEmpty(), logicalIndices, and visualIndex().

Referenced by resizeSectionItem(), resizeSections(), sectionHandleAt(), sectionsAboutToBeChanged(), sectionsRemoved(), setDefaultSectionSize(), updateSectionsBeforeAfter(), and visualIndex().

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

◆ maybeRestorePrevLastSectionAndStretchLast()

void QHeaderViewPrivate::maybeRestorePrevLastSectionAndStretchLast ( )

Definition at line 3492 of file qheaderview.cpp.

References doDelayedResizeSections(), lastSectionLogicalIdx, lastVisibleVisualIndex(), restoreSizeOnPrevLastSection(), and setNewLastSection().

Referenced by sectionsChanged().

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

◆ modelSectionCount()

int QHeaderViewPrivate::modelSectionCount ( ) const
inline

Definition at line 205 of file qheaderview_p.h.

References QAbstractItemModel::columnCount(), Qt::Horizontal, QAbstractItemViewPrivate::model, orientation, QAbstractItemViewPrivate::root, and QAbstractItemModel::rowCount().

Referenced by sectionsChanged().

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

◆ prepareSectionSelected()

void QHeaderViewPrivate::prepareSectionSelected ( )
inline

Definition at line 127 of file qheaderview_p.h.

References QBitArray::clear(), QBitArray::fill(), QItemSelectionModel::hasSelection, sectionCount(), sectionSelected, QAbstractItemViewPrivate::selectionModel, and QBitArray::size().

+ Here is the call graph for this function:

◆ read()

◆ recalcSectionStartPos()

void QHeaderViewPrivate::recalcSectionStartPos ( ) const

Definition at line 3879 of file qheaderview.cpp.

References i, sectionItems, and sectionStartposRecalc.

Referenced by headerSectionPosition(), headerVisualIndexAt(), isFirstVisibleSection(), isLastVisibleSection(), read(), and sectionsChanged().

+ Here is the caller graph for this function:

◆ removeSectionsFromSectionItems()

void QHeaderViewPrivate::removeSectionsFromSectionItems ( int start,
int end )

Definition at line 3664 of file qheaderview.cpp.

References sectionItems, and sectionStartposRecalc.

Referenced by sectionsRemoved().

+ Here is the caller graph for this function:

◆ resizeSectionItem()

void QHeaderViewPrivate::resizeSectionItem ( int visualIndex,
int oldSize,
int newSize )

Definition at line 3889 of file qheaderview.cpp.

References createSectionItems(), emit, headerSectionResizeMode(), logicalIndex(), and visualIndex().

Referenced by cascadingResize().

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

◆ resizeSections()

void QHeaderViewPrivate::resizeSections ( QHeaderView::ResizeMode globalMode,
bool useGlobalMode = false )

Go through and resize all of the sections applying stretchLastSection, manual stretches, sizes, and useGlobalMode.

The different resize modes are: Interactive - the user decides the size Stretch - take up whatever space is left Fixed - the size is set programmatically outside the header ResizeToContentes - the size is set based on the contents of the row or column in the parent view

The resize mode will not affect the last section if stretchLastSection is true.

Definition at line 3522 of file qheaderview.cpp.

References createSectionItems(), delayedResize, emit, QAbstractItemViewPrivate::executePostedLayout(), QHeaderView::Fixed, headerSectionResizeMode(), headerSectionSize(), Qt::Horizontal, i, QHeaderView::Interactive, invalidateCachedSizeHint(), isVisualIndexHidden(), lastSectionLogicalIdx, lastSectionSize, logicalIndex(), orientation, qBound(), qMax(), resizeRecursionBlock, sectionCount(), QBasicTimer::stop(), QHeaderView::Stretch, stretchLastSection, viewport(), and viewSectionSizeHint().

Referenced by executePostedResize().

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

◆ restoreSizeOnPrevLastSection()

void QHeaderViewPrivate::restoreSizeOnPrevLastSection ( )

Definition at line 3473 of file qheaderview.cpp.

References lastSectionLogicalIdx, and lastSectionSize.

Referenced by maybeRestorePrevLastSectionAndStretchLast().

+ Here is the caller graph for this function:

◆ reverse()

bool QHeaderViewPrivate::reverse ( ) const
inline

Definition at line 137 of file qheaderview_p.h.

References Qt::Horizontal, and orientation.

Referenced by sectionHandleAt(), and updateSectionsBeforeAfter().

+ Here is the caller graph for this function:

◆ rowIntersectsSelection()

bool QHeaderViewPrivate::rowIntersectsSelection ( int row) const
inline

Definition at line 107 of file qheaderview_p.h.

References QAbstractItemViewPrivate::root, QItemSelectionModel::rowIntersectsSelection(), and QAbstractItemViewPrivate::selectionModel.

Referenced by sectionIntersectsSelection().

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

◆ saveCascadingSectionSize()

void QHeaderViewPrivate::saveCascadingSectionSize ( int visual,
int size )
inline

Definition at line 193 of file qheaderview_p.h.

References cascadingSectionSize, QHash< Key, T >::contains(), firstCascadingSection, QHash< Key, T >::insert(), lastCascadingSection, qMax(), and qMin().

Referenced by cascadingResize().

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

◆ sectionCount()

int QHeaderViewPrivate::sectionCount ( ) const
inline

Definition at line 135 of file qheaderview_p.h.

References sectionItems.

Referenced by cascadingResize(), headerSectionPosition(), headerSectionSize(), initializeIndexMapping(), prepareSectionSelected(), resizeSections(), sectionsRemoved(), updateHiddenSections(), updateSectionsBeforeAfter(), and write().

+ Here is the caller graph for this function:

◆ sectionHandleAt()

int QHeaderViewPrivate::sectionHandleAt ( int position)

Definition at line 3300 of file qheaderview.cpp.

References logicalIndex(), QStyle::PM_HeaderGripMargin, pos, position(), qSwap(), and reverse().

+ Here is the call graph for this function:

◆ sectionIntersectsSelection()

bool QHeaderViewPrivate::sectionIntersectsSelection ( int logical) const
inline

Definition at line 115 of file qheaderview_p.h.

References columnIntersectsSelection(), Qt::Horizontal, orientation, and rowIntersectsSelection().

+ Here is the call graph for this function:

◆ sectionIsCascadable()

bool QHeaderViewPrivate::sectionIsCascadable ( int visual) const
inline

Definition at line 201 of file qheaderview_p.h.

References headerSectionResizeMode(), and QHeaderView::Interactive.

Referenced by cascadingResize().

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

◆ sectionsAboutToBeChanged()

void QHeaderViewPrivate::sectionsAboutToBeChanged ( const QList< QPersistentModelIndex > & parents = QList<QPersistentModelIndex>(),
QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint )

Definition at line 2082 of file qheaderview.cpp.

References QAbstractItemModel::columnCount(), defaultSectionSize, globalResizeMode, hiddenSectionSize, hint(), Qt::Horizontal, QAbstractItemModel::HorizontalSortHint, i, QAbstractItemModel::index(), lastSectionLogicalIdx, lastSectionSize, layoutChangePersistentSections, logicalIndex(), QAbstractItemViewPrivate::model, orientation, QAbstractItemViewPrivate::root, QAbstractItemModel::rowCount(), sectionItems, stretchLastSection, QHash< Key, T >::value(), Qt::Vertical, QAbstractItemModel::VerticalSortHint, and visualIndex().

Referenced by sectionsAboutToBeMoved(), and QHeaderView::setModel().

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

◆ sectionsAboutToBeMoved()

void QHeaderViewPrivate::sectionsAboutToBeMoved ( const QModelIndex & sourceParent,
int logicalStart,
int logicalEnd,
const QModelIndex & destinationParent,
int logicalDestination )

Definition at line 2058 of file qheaderview.cpp.

References Q_UNUSED, QAbstractItemViewPrivate::root, and sectionsAboutToBeChanged().

Referenced by QHeaderView::setModel().

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

◆ sectionsChanged()

Definition at line 2128 of file qheaderview.cpp.

References clear(), QHash< Key, T >::clear(), defaultSectionSize, emit, globalResizeMode, headerLength(), hiddenSectionSize, hint(), Qt::Horizontal, QAbstractItemModel::HorizontalSortHint, item, lastSectionLogicalIdx, layoutChangePersistentSections, maybeRestorePrevLastSectionAndStretchLast(), modelSectionCount(), orientation, qBound(), recalcSectionStartPos(), sectionItems, stretchLastSection, Qt::Vertical, QAbstractItemModel::VerticalSortHint, viewport(), and visualIndex().

Referenced by sectionsMoved(), and QHeaderView::setModel().

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

◆ sectionsHiddenToBitVector()

QBitArray QHeaderViewPrivate::sectionsHiddenToBitVector ( ) const
inline

Definition at line 336 of file qheaderview_p.h.

References hiddenSectionSize, QHash< Key, T >::isEmpty(), QBitArray::resize(), and sectionItems.

Referenced by write().

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

◆ sectionsMoved()

void QHeaderViewPrivate::sectionsMoved ( const QModelIndex & sourceParent,
int logicalStart,
int logicalEnd,
const QModelIndex & destinationParent,
int logicalDestination )

Definition at line 2070 of file qheaderview.cpp.

References Q_UNUSED, QAbstractItemViewPrivate::root, and sectionsChanged().

Referenced by QHeaderView::setModel().

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

◆ sectionsRemoved()

void QHeaderViewPrivate::sectionsRemoved ( const QModelIndex & parent,
int logicalFirst,
int logicalLast )

Definition at line 1972 of file qheaderview.cpp.

References QList< T >::at(), clear(), QList< T >::data(), doDelayedResizeSections(), emit, invalidateCachedSizeHint(), QList< T >::isEmpty(), lastSectionLogicalIdx, lastVisibleVisualIndex(), logicalIndex(), logicalIndices, preventCursorChangeInSetOffset, Q_ASSERT, qMax(), qMin(), QList< T >::remove(), removeSectionsFromSectionItems(), QList< T >::resize(), ResizeSection, QAbstractItemViewPrivate::root, sectionCount(), sectionItems, sectionStartposRecalc, setNewLastSection(), QList< T >::size(), sortIndicatorSection, state, updateHiddenSections(), viewport(), and visualIndices.

Referenced by QHeaderView::setModel().

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

◆ setDefaultSectionSize()

void QHeaderViewPrivate::setDefaultSectionSize ( int size)

◆ setDefaultValues()

void QHeaderViewPrivate::setDefaultValues ( Qt::Orientation o)
inline

Definition at line 149 of file qheaderview_p.h.

References Qt::AlignCenter, Qt::AlignLeft, Qt::AlignVCenter, defaultAlignment, Qt::Horizontal, o, orientation, and updateDefaultSectionSizeFromStyle().

+ Here is the call graph for this function:

◆ setGlobalHeaderResizeMode()

void QHeaderViewPrivate::setGlobalHeaderResizeMode ( QHeaderView::ResizeMode mode)

Definition at line 3947 of file qheaderview.cpp.

References globalResizeMode, i, and sectionItems.

◆ setHeaderSectionResizeMode()

void QHeaderViewPrivate::setHeaderSectionResizeMode ( int visual,
QHeaderView::ResizeMode mode )

Definition at line 3934 of file qheaderview.cpp.

References createSectionItems(), and headerSectionSize().

+ Here is the call graph for this function:

◆ setHiddenSectionsFromBitVector()

void QHeaderViewPrivate::setHiddenSectionsFromBitVector ( const QBitArray & sectionHidden)
inline

Definition at line 347 of file qheaderview_p.h.

References i, and sectionItems.

Referenced by read().

+ Here is the caller graph for this function:

◆ setNewLastSection()

void QHeaderViewPrivate::setNewLastSection ( int visualIndexForLastSection)

Definition at line 3483 of file qheaderview.cpp.

References headerSectionSize(), lastSectionLogicalIdx, and lastSectionSize.

Referenced by maybeRestorePrevLastSectionAndStretchLast(), and sectionsRemoved().

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

◆ setScrollOffset()

void QHeaderViewPrivate::setScrollOffset ( const QScrollBar * scrollBar,
QAbstractItemView::ScrollMode scrollMode )

◆ setupSectionIndicator()

void QHeaderViewPrivate::setupSectionIndicator ( int section,
int position )

Definition at line 3329 of file qheaderview.cpp.

References QVariant::canConvert(), QPainter::end(), QPixmap::fill(), Qt::FontRole, QAbstractItemModel::headerData(), Qt::Horizontal, QVariant::isValid(), QAbstractItemViewPrivate::model, orientation, painter, position(), qMax(), rect, section, sectionIndicatorOffset, QPixmap::setDevicePixelRatio(), QPainter::setFont(), QPainter::setOpacity(), variant, and viewport().

+ Here is the call graph for this function:

◆ setVisualIndexHidden()

void QHeaderViewPrivate::setVisualIndexHidden ( int visual,
bool hidden )
inline

Definition at line 161 of file qheaderview_p.h.

References sectionItems.

◆ updateDefaultSectionSizeFromStyle()

void QHeaderViewPrivate::updateDefaultSectionSizeFromStyle ( )

Definition at line 3868 of file qheaderview.cpp.

References defaultSectionSize, Qt::Horizontal, orientation, QStyle::PM_HeaderDefaultSectionSizeHorizontal, QStyle::PM_HeaderDefaultSectionSizeVertical, and qMax().

Referenced by read(), and setDefaultValues().

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

◆ updateHiddenSections()

void QHeaderViewPrivate::updateHiddenSections ( int logicalFirst,
int logicalLast )

Definition at line 1956 of file qheaderview.cpp.

References hiddenSectionSize, i, j, and sectionCount().

Referenced by sectionsRemoved().

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

◆ updateSectionIndicator()

void QHeaderViewPrivate::updateSectionIndicator ( int section,
int position )

Definition at line 3377 of file qheaderview.cpp.

References Qt::Horizontal, orientation, position(), section, and sectionIndicatorOffset.

+ Here is the call graph for this function:

◆ updateSectionsBeforeAfter()

void QHeaderViewPrivate::updateSectionsBeforeAfter ( int logical)

Definition at line 3995 of file qheaderview.cpp.

References headerSectionSize(), Qt::Horizontal, logicalIndex(), orientation, reverse(), sectionCount(), viewport(), and visualIndex().

+ Here is the call graph for this function:

◆ viewSectionSizeHint()

int QHeaderViewPrivate::viewSectionSizeHint ( int logical) const

Definition at line 3954 of file qheaderview.cpp.

References Qt::Horizontal, orientation, and view.

Referenced by resizeSections().

+ Here is the caller graph for this function:

◆ visualIndex()

int QHeaderViewPrivate::visualIndex ( int logicalIndex) const
inline

Definition at line 145 of file qheaderview_p.h.

References QList< T >::at(), QList< T >::isEmpty(), logicalIndex(), and visualIndices.

Referenced by adjustedVisualIndex(), logicalIndex(), resizeSectionItem(), sectionsAboutToBeChanged(), sectionsChanged(), and updateSectionsBeforeAfter().

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

◆ write()

Member Data Documentation

◆ allowUserMoveOfSection0

bool QHeaderViewPrivate::allowUserMoveOfSection0

Definition at line 270 of file qheaderview_p.h.

◆ cachedSizeHint

QSize QHeaderViewPrivate::cachedSizeHint
mutable

Definition at line 247 of file qheaderview_p.h.

Referenced by invalidateCachedSizeHint().

◆ cascadingResizing

bool QHeaderViewPrivate::cascadingResizing

Definition at line 268 of file qheaderview_p.h.

Referenced by read(), and write().

◆ cascadingSectionSize

QHash<int, int> QHeaderViewPrivate::cascadingSectionSize
mutable

◆ clickableSections

bool QHeaderViewPrivate::clickableSections

Definition at line 265 of file qheaderview_p.h.

Referenced by read(), and write().

◆ contentsSections

int QHeaderViewPrivate::contentsSections

Definition at line 273 of file qheaderview_p.h.

Referenced by hasAutoResizeSections(), read(), and write().

◆ customDefaultSectionSize

bool QHeaderViewPrivate::customDefaultSectionSize

Definition at line 271 of file qheaderview_p.h.

Referenced by read(), setDefaultSectionSize(), and write().

◆ defaultAlignment

Qt::Alignment QHeaderViewPrivate::defaultAlignment

Definition at line 280 of file qheaderview_p.h.

Referenced by read(), setDefaultValues(), and write().

◆ defaultSectionSize

int QHeaderViewPrivate::defaultSectionSize

◆ delayedResize

QBasicTimer QHeaderViewPrivate::delayedResize
mutable

Definition at line 248 of file qheaderview_p.h.

Referenced by doDelayedResizeSections(), executePostedResize(), and resizeSections().

◆ firstCascadingSection

int QHeaderViewPrivate::firstCascadingSection

◆ firstPos

int QHeaderViewPrivate::firstPos

Definition at line 254 of file qheaderview_p.h.

◆ firstPressed

int QHeaderViewPrivate::firstPressed

Definition at line 258 of file qheaderview_p.h.

◆ globalResizeMode

◆ headerOffset

int QHeaderViewPrivate::headerOffset

Definition at line 235 of file qheaderview_p.h.

◆ hiddenSectionSize

QHash<int, int> QHeaderViewPrivate::hiddenSectionSize
mutable

◆ highlightSelected

bool QHeaderViewPrivate::highlightSelected

Definition at line 266 of file qheaderview_p.h.

Referenced by read(), and write().

◆ hover

int QHeaderViewPrivate::hover

Definition at line 260 of file qheaderview_p.h.

◆ lastCascadingSection

int QHeaderViewPrivate::lastCascadingSection

◆ lastPos

int QHeaderViewPrivate::lastPos

Definition at line 253 of file qheaderview_p.h.

◆ lastSectionLogicalIdx

◆ lastSectionSize

int QHeaderViewPrivate::lastSectionSize

◆ layoutChangePersistentSections

QList<LayoutChangeItem> QHeaderViewPrivate::layoutChangePersistentSections

Definition at line 319 of file qheaderview_p.h.

Referenced by sectionsAboutToBeChanged(), and sectionsChanged().

◆ length

int QHeaderViewPrivate::length

Definition at line 262 of file qheaderview_p.h.

Referenced by isLastVisibleSection(), and write().

◆ logicalIndices

QList<int> QHeaderViewPrivate::logicalIndices
mutable

◆ maximumSectionSize

int QHeaderViewPrivate::maximumSectionSize

Definition at line 276 of file qheaderview_p.h.

◆ minimumSectionSize

int QHeaderViewPrivate::minimumSectionSize

Definition at line 275 of file qheaderview_p.h.

Referenced by read(), and write().

◆ modelConnections

std::array<QMetaObject::Connection, 8> QHeaderViewPrivate::modelConnections

Definition at line 320 of file qheaderview_p.h.

Referenced by disconnectModel().

◆ movableSections

bool QHeaderViewPrivate::movableSections

Definition at line 264 of file qheaderview_p.h.

Referenced by read(), and write().

◆ orientation

◆ originalSize

int QHeaderViewPrivate::originalSize

Definition at line 255 of file qheaderview_p.h.

◆ pressed

int QHeaderViewPrivate::pressed

Definition at line 259 of file qheaderview_p.h.

◆ preventCursorChangeInSetOffset

bool QHeaderViewPrivate::preventCursorChangeInSetOffset

Definition at line 263 of file qheaderview_p.h.

Referenced by sectionsRemoved(), and setDefaultSectionSize().

◆ resizeContentsPrecision

int QHeaderViewPrivate::resizeContentsPrecision

Definition at line 286 of file qheaderview_p.h.

Referenced by read(), and write().

◆ resizeRecursionBlock

bool QHeaderViewPrivate::resizeRecursionBlock

Definition at line 269 of file qheaderview_p.h.

Referenced by resizeSections().

◆ section

◆ sectionIndicatorOffset

int QHeaderViewPrivate::sectionIndicatorOffset

Definition at line 279 of file qheaderview_p.h.

Referenced by setupSectionIndicator(), and updateSectionIndicator().

◆ sectionItems

◆ sectionSelected

QBitArray QHeaderViewPrivate::sectionSelected
mutable

Definition at line 244 of file qheaderview_p.h.

Referenced by clear(), isSectionSelected(), and prepareSectionSelected().

◆ sectionStartposRecalc

◆ sortIndicatorClearable

bool QHeaderViewPrivate::sortIndicatorClearable

Definition at line 240 of file qheaderview_p.h.

Referenced by flipSortIndicator(), read(), and write().

◆ sortIndicatorOrder

Qt::SortOrder QHeaderViewPrivate::sortIndicatorOrder

Definition at line 237 of file qheaderview_p.h.

Referenced by flipSortIndicator(), read(), and write().

◆ sortIndicatorSection

int QHeaderViewPrivate::sortIndicatorSection

Definition at line 238 of file qheaderview_p.h.

Referenced by flipSortIndicator(), read(), sectionsRemoved(), and write().

◆ sortIndicatorShown

bool QHeaderViewPrivate::sortIndicatorShown

Definition at line 239 of file qheaderview_p.h.

Referenced by read(), and write().

◆ state

◆ stretchLastSection

bool QHeaderViewPrivate::stretchLastSection

◆ stretchSections

int QHeaderViewPrivate::stretchSections

Definition at line 272 of file qheaderview_p.h.

Referenced by hasAutoResizeSections(), read(), and write().

◆ target

int QHeaderViewPrivate::target

Definition at line 257 of file qheaderview_p.h.

◆ visualIndices

QList<int> QHeaderViewPrivate::visualIndices
mutable

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