Qt 6.x
The Qt SDK
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 _q_sectionsRemoved (const QModelIndex &, int, int)
 
void _q_sectionsAboutToBeMoved (const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)
 
void _q_sectionsMoved (const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)
 
void _q_sectionsAboutToBeChanged (const QList< QPersistentModelIndex > &parents=QList< QPersistentModelIndex >(), QAbstractItemModel::LayoutChangeHint hint=QAbstractItemModel::NoLayoutChangeHint)
 
void _q_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 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 _q_rowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_modelDestroyed ()
 
virtual void _q_layoutChanged ()
 
virtual void _q_rowsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual void _q_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 _q_headerDataChanged ()
 
void _q_scrollerStateChanged ()
 
void _q_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 ()
 

Public Attributes

enum QHeaderViewPrivate::State state
 
int offset
 
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
 
- 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
 

Detailed Description

Definition at line 32 of file qheaderview_p.h.

Member Enumeration Documentation

◆ State

Enumerator
NoState 
ResizeSection 
MoveSection 
SelectSections 
NoClear 

Definition at line 221 of file qheaderview_p.h.

◆ StateVersion

Enumerator
VersionMarker 

Definition at line 37 of file qheaderview_p.h.

Constructor & Destructor Documentation

◆ QHeaderViewPrivate()

QHeaderViewPrivate::QHeaderViewPrivate ( )
inline

Definition at line 39 of file qheaderview_p.h.

Member Function Documentation

◆ _q_sectionsAboutToBeChanged()

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

Definition at line 2119 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 _q_sectionsAboutToBeMoved().

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

◆ _q_sectionsAboutToBeMoved()

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

Definition at line 2099 of file qheaderview.cpp.

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

+ Here is the call graph for this function:

◆ _q_sectionsChanged()

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

Definition at line 2165 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 _q_sectionsMoved().

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

◆ _q_sectionsMoved()

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

Definition at line 2109 of file qheaderview.cpp.

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

+ Here is the call graph for this function:

◆ _q_sectionsRemoved()

◆ adjustedVisualIndex()

int QHeaderViewPrivate::adjustedVisualIndex ( int  visualIndex) const

Definition at line 4001 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 3712 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 _q_sectionsChanged(), and _q_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 181 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 105 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 3686 of file qheaderview.cpp.

References i, QHeaderViewPrivate::SectionItem::resizeMode, sectionItems, sectionStartposRecalc, and QHeaderViewPrivate::SectionItem::size.

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 3759 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:

◆ doDelayedResizeSections()

void QHeaderViewPrivate::doDelayedResizeSections ( )
inline

Definition at line 205 of file qheaderview_p.h.

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

Referenced by _q_sectionsRemoved(), cascadingResize(), maybeRestorePrevLastSectionAndStretchLast(), read(), 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 210 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 3737 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 159 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 316 of file qheaderview_p.h.

References section, and sectionItems.

Referenced by _q_sectionsChanged().

+ Here is the caller graph for this function:

◆ headerSectionPosition()

int QHeaderViewPrivate::headerSectionPosition ( int  visual) const

Definition at line 3941 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 3977 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 3934 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 3951 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 169 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 165 of file qheaderview_p.h.

References cachedSizeHint.

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

+ Here is the caller graph for this function:

◆ isColumnSelected()

bool QHeaderViewPrivate::isColumnSelected ( int  column) const
inline

Definition at line 117 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 3478 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 3486 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 113 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 3461 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 151 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 3498 of file qheaderview.cpp.

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

+ Here is the caller graph for this function:

◆ logicalIndex()

int QHeaderViewPrivate::logicalIndex ( int  visualIndex) const
inline

Definition at line 135 of file qheaderview_p.h.

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

Referenced by _q_sectionsAboutToBeChanged(), _q_sectionsRemoved(), resizeSectionItem(), resizeSections(), sectionHandleAt(), 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 3529 of file qheaderview.cpp.

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

Referenced by _q_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 199 of file qheaderview_p.h.

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

Referenced by _q_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 121 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 3916 of file qheaderview.cpp.

References i, sectionItems, and sectionStartposRecalc.

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

+ Here is the caller graph for this function:

◆ removeSectionsFromSectionItems()

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

Definition at line 3701 of file qheaderview.cpp.

References sectionItems, and sectionStartposRecalc.

Referenced by _q_sectionsRemoved().

+ Here is the caller graph for this function:

◆ resizeSectionItem()

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

Definition at line 3926 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 3559 of file qheaderview.cpp.

References QList< T >::append(), createSectionItems(), delayedResize, emit, QAbstractItemViewPrivate::executePostedLayout(), QHeaderView::Fixed, headerSectionResizeMode(), headerSectionSize(), Qt::Horizontal, i, QHeaderView::Interactive, invalidateCachedSizeHint(), isVisualIndexHidden(), lastSectionLogicalIdx, lastSectionSize, logicalIndex(), orientation, qBound(), qMax(), QList< T >::removeFirst(), resizeRecursionBlock, sectionCount(), QBasicTimer::stop(), QHeaderView::Stretch, stretchLastSection, QList< T >::takeFirst(), 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 3510 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 131 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 101 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 187 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 129 of file qheaderview_p.h.

References sectionItems.

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

+ Here is the caller graph for this function:

◆ sectionHandleAt()

int QHeaderViewPrivate::sectionHandleAt ( int  position)

Definition at line 3337 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 109 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 195 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:

◆ sectionsHiddenToBitVector()

QBitArray QHeaderViewPrivate::sectionsHiddenToBitVector ( ) const
inline

Definition at line 323 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:

◆ setDefaultSectionSize()

void QHeaderViewPrivate::setDefaultSectionSize ( int  size)

◆ setDefaultValues()

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

Definition at line 143 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 3984 of file qheaderview.cpp.

References globalResizeMode, i, and sectionItems.

◆ setHeaderSectionResizeMode()

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

Definition at line 3971 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 334 of file qheaderview_p.h.

References QBitArray::at(), i, sectionItems, and QBitArray::size().

Referenced by read().

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

◆ setNewLastSection()

void QHeaderViewPrivate::setNewLastSection ( int  visualIndexForLastSection)

Definition at line 3520 of file qheaderview.cpp.

References headerSectionSize(), lastSectionLogicalIdx, and lastSectionSize.

Referenced by _q_sectionsRemoved(), and maybeRestorePrevLastSectionAndStretchLast().

+ 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 3366 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 155 of file qheaderview_p.h.

References sectionItems.

◆ updateDefaultSectionSizeFromStyle()

void QHeaderViewPrivate::updateDefaultSectionSizeFromStyle ( )

Definition at line 3905 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 1997 of file qheaderview.cpp.

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

Referenced by _q_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 3414 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 4032 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 3991 of file qheaderview.cpp.

References Qt::Horizontal, orientation, parent, and view.

Referenced by resizeSections().

+ Here is the caller graph for this function:

◆ visualIndex()

int QHeaderViewPrivate::visualIndex ( int  logicalIndex) const
inline

Definition at line 139 of file qheaderview_p.h.

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

Referenced by _q_sectionsAboutToBeChanged(), _q_sectionsChanged(), adjustedVisualIndex(), logicalIndex(), resizeSectionItem(), 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 258 of file qheaderview_p.h.

◆ cachedSizeHint

QSize QHeaderViewPrivate::cachedSizeHint
mutable

Definition at line 235 of file qheaderview_p.h.

Referenced by invalidateCachedSizeHint().

◆ cascadingResizing

bool QHeaderViewPrivate::cascadingResizing

Definition at line 256 of file qheaderview_p.h.

Referenced by read(), and write().

◆ cascadingSectionSize

QHash<int, int> QHeaderViewPrivate::cascadingSectionSize
mutable

◆ clickableSections

bool QHeaderViewPrivate::clickableSections

Definition at line 253 of file qheaderview_p.h.

Referenced by read(), and write().

◆ contentsSections

int QHeaderViewPrivate::contentsSections

Definition at line 261 of file qheaderview_p.h.

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

◆ customDefaultSectionSize

bool QHeaderViewPrivate::customDefaultSectionSize

Definition at line 259 of file qheaderview_p.h.

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

◆ defaultAlignment

Qt::Alignment QHeaderViewPrivate::defaultAlignment

Definition at line 268 of file qheaderview_p.h.

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

◆ defaultSectionSize

int QHeaderViewPrivate::defaultSectionSize

◆ delayedResize

QBasicTimer QHeaderViewPrivate::delayedResize
mutable

Definition at line 236 of file qheaderview_p.h.

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

◆ firstCascadingSection

int QHeaderViewPrivate::firstCascadingSection

◆ firstPos

int QHeaderViewPrivate::firstPos

Definition at line 242 of file qheaderview_p.h.

◆ firstPressed

int QHeaderViewPrivate::firstPressed

Definition at line 246 of file qheaderview_p.h.

◆ globalResizeMode

◆ hiddenSectionSize

QHash<int, int> QHeaderViewPrivate::hiddenSectionSize
mutable

◆ highlightSelected

bool QHeaderViewPrivate::highlightSelected

Definition at line 254 of file qheaderview_p.h.

Referenced by read(), and write().

◆ hover

int QHeaderViewPrivate::hover

Definition at line 248 of file qheaderview_p.h.

◆ lastCascadingSection

int QHeaderViewPrivate::lastCascadingSection

◆ lastPos

int QHeaderViewPrivate::lastPos

Definition at line 241 of file qheaderview_p.h.

◆ lastSectionLogicalIdx

◆ lastSectionSize

int QHeaderViewPrivate::lastSectionSize

◆ layoutChangePersistentSections

QList<LayoutChangeItem> QHeaderViewPrivate::layoutChangePersistentSections

Definition at line 307 of file qheaderview_p.h.

Referenced by _q_sectionsAboutToBeChanged(), and _q_sectionsChanged().

◆ length

int QHeaderViewPrivate::length

Definition at line 250 of file qheaderview_p.h.

Referenced by isLastVisibleSection(), and write().

◆ logicalIndices

QList<int> QHeaderViewPrivate::logicalIndices
mutable

◆ maximumSectionSize

int QHeaderViewPrivate::maximumSectionSize

Definition at line 264 of file qheaderview_p.h.

◆ minimumSectionSize

int QHeaderViewPrivate::minimumSectionSize

Definition at line 263 of file qheaderview_p.h.

Referenced by read(), and write().

◆ movableSections

bool QHeaderViewPrivate::movableSections

Definition at line 252 of file qheaderview_p.h.

Referenced by read(), and write().

◆ offset

int QHeaderViewPrivate::offset

Definition at line 223 of file qheaderview_p.h.

◆ orientation

◆ originalSize

int QHeaderViewPrivate::originalSize

Definition at line 243 of file qheaderview_p.h.

◆ pressed

int QHeaderViewPrivate::pressed

Definition at line 247 of file qheaderview_p.h.

◆ preventCursorChangeInSetOffset

bool QHeaderViewPrivate::preventCursorChangeInSetOffset

Definition at line 251 of file qheaderview_p.h.

Referenced by _q_sectionsRemoved(), and setDefaultSectionSize().

◆ resizeContentsPrecision

int QHeaderViewPrivate::resizeContentsPrecision

Definition at line 274 of file qheaderview_p.h.

Referenced by read(), and write().

◆ resizeRecursionBlock

bool QHeaderViewPrivate::resizeRecursionBlock

Definition at line 257 of file qheaderview_p.h.

Referenced by resizeSections().

◆ section

◆ sectionIndicatorOffset

int QHeaderViewPrivate::sectionIndicatorOffset

Definition at line 267 of file qheaderview_p.h.

Referenced by setupSectionIndicator(), and updateSectionIndicator().

◆ sectionItems

◆ sectionSelected

QBitArray QHeaderViewPrivate::sectionSelected
mutable

Definition at line 232 of file qheaderview_p.h.

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

◆ sectionStartposRecalc

◆ sortIndicatorClearable

bool QHeaderViewPrivate::sortIndicatorClearable

Definition at line 228 of file qheaderview_p.h.

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

◆ sortIndicatorOrder

Qt::SortOrder QHeaderViewPrivate::sortIndicatorOrder

Definition at line 225 of file qheaderview_p.h.

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

◆ sortIndicatorSection

int QHeaderViewPrivate::sortIndicatorSection

Definition at line 226 of file qheaderview_p.h.

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

◆ sortIndicatorShown

bool QHeaderViewPrivate::sortIndicatorShown

Definition at line 227 of file qheaderview_p.h.

Referenced by read(), and write().

◆ state

◆ stretchLastSection

bool QHeaderViewPrivate::stretchLastSection

◆ stretchSections

int QHeaderViewPrivate::stretchSections

Definition at line 260 of file qheaderview_p.h.

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

◆ target

int QHeaderViewPrivate::target

Definition at line 245 of file qheaderview_p.h.

◆ visualIndices

QList<int> QHeaderViewPrivate::visualIndices
mutable

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