Qt 4.8
Classes | Public Types | Public Functions | Public Variables | List of all members
QHeaderViewPrivate Class Reference

#include <qheaderview_p.h>

Inheritance diagram for QHeaderViewPrivate:
QAbstractItemViewPrivate QAbstractScrollAreaPrivate QFramePrivate QWidgetPrivate QObjectPrivate QObjectData

Classes

struct  SectionSpan
 

Public Types

enum  State {
  NoState, ResizeSection, MoveSection, SelectSections,
  NoClear
}
 
enum  StateVersion { VersionMarker = 0xff }
 
- Public Types inherited from QWidgetPrivate
enum  CloseMode { CloseNoEvent, CloseWithEvent, CloseWithSpontaneousEvent }
 
enum  Direction { DirectionNorth = 0x01, DirectionEast = 0x10, DirectionSouth = 0x02, DirectionWest = 0x20 }
 
enum  DrawWidgetFlags {
  DrawAsRoot = 0x01, DrawPaintOnScreen = 0x02, DrawRecursive = 0x04, DrawInvisible = 0x08,
  DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, DontDrawOpaqueChildren = 0x40, DontDrawNativeChildren = 0x80
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Public Functions

void _q_layoutAboutToBeChanged ()
 
void _q_layoutChanged ()
 This slot is called when the layout is changed. More...
 
void _q_sectionsRemoved (const QModelIndex &, int, int)
 
int adjustedVisualIndex (int visualIndex) const
 
void cascadingResize (int visual, int newSize)
 
void clear ()
 
void clearCascadingSections ()
 
bool columnIntersectsSelection (int column) const
 
void createSectionSpan (int start, int end, int size, QHeaderView::ResizeMode mode)
 
void doDelayedResizeSections ()
 
void executePostedResize () const
 
void flipSortIndicator (int section)
 
QStyleOptionHeader getStyleOption () const
 
bool hasAutoResizeSections () const
 
int headerLength () const
 
int headerSectionCount () const
 
int headerSectionPosition (int visual) const
 
QHeaderView::ResizeMode headerSectionResizeMode (int visual) const
 
int headerSectionSize (int visual) const
 
int headerVisualIndexAt (int position) const
 
void initializeIndexMapping () const
 
void invalidateCachedSizeHint () const
 
bool isColumnSelected (int column) const
 
bool isRowSelected (int row) const
 
bool isSectionSelected (int section) const
 
bool isVisualIndexHidden (int visual) const
 
int lastVisibleVisualIndex () const
 Returns the last visible (ie. More...
 
int logicalIndex (int visualIndex) const
 
bool modelIsEmpty () const
 
int modelSectionCount () const
 
void prepareSectionSelected ()
 
 QHeaderViewPrivate ()
 
bool read (QDataStream &in)
 
void removeSectionsFromSpans (int start, int end)
 
void removeSpans (const QList< int > &spans)
 
void resizeSections (QHeaderView::ResizeMode globalMode, bool useGlobalMode=false)
 Go through and resize all of the sections applying stretchLastSection, manualy stretches, sizes, and useGlobalMode. More...
 
void resizeSectionSpan (int visualIndex, int oldSize, int newSize)
 
bool reverse () const
 
bool rowIntersectsSelection (int row) const
 
void saveCascadingSectionSize (int visual, int size)
 
int sectionHandleAt (int position)
 
bool sectionIntersectsSelection (int logical) const
 
bool sectionIsCascadable (int visual) const
 
int sectionSpanIndex (int visual) const
 
void setDefaultSectionSize (int size)
 
void setDefaultValues (Qt::Orientation o)
 
void setGlobalHeaderResizeMode (QHeaderView::ResizeMode mode)
 
void setHeaderSectionResizeMode (int visual, QHeaderView::ResizeMode mode)
 
void setupSectionIndicator (int section, int position)
 
void setVisualIndexHidden (int visual, bool hidden)
 
void updateHiddenSections (int logicalFirst, int logicalLast)
 
void updateSectionIndicator (int section, int position)
 
int viewSectionSizeHint (int logical) const
 
int visualIndex (int logicalIndex) const
 
void write (QDataStream &out) const
 
- Public Functions inherited from QAbstractItemViewPrivate
virtual void _q_columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 This slot is called when columns are about to be removed. More...
 
virtual void _q_columnsInserted (const QModelIndex &parent, int start, int end)
 This slot is called when columns have been inserted. More...
 
virtual void _q_columnsRemoved (const QModelIndex &parent, int start, int end)
 This slot is called when columns have been removed. More...
 
void _q_headerDataChanged ()
 
virtual void _q_modelDestroyed ()
 
virtual void _q_rowsInserted (const QModelIndex &parent, int start, int end)
 This slot is called when rows have been inserted. More...
 
virtual void _q_rowsRemoved (const QModelIndex &parent, int start, int end)
 This slot is called when rows have been removed. More...
 
void addEditor (const QModelIndex &index, QWidget *editor, bool isStatic)
 
virtual void adjustViewOptionsForIndex (QStyleOptionViewItemV4 *, const QModelIndex &) const
 
bool canDecode (QDropEvent *e) const
 
void checkMouseMove (const QPersistentModelIndex &index)
 
void checkMouseMove (const QPoint &pos)
 
void checkPersistentEditorFocus ()
 When persistent aeditor gets/loses focus, we need to check and setcorrectly the current index. More...
 
void clearOrRemove ()
 In DND if something has been moved then this is called. More...
 
virtual QPoint contentsOffset () const
 
QItemSelectionModel::SelectionFlags contiguousSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QAbstractItemDelegatedelegateForIndex (const QModelIndex &index) const
 
int delegateRefCount (const QAbstractItemDelegate *delegate) const
 
void doDelayedItemsLayout (int delay=0)
 
void doDelayedReset ()
 
virtual QItemViewPaintPairs draggablePaintPairs (const QModelIndexList &indexes, QRect *r) const
 
virtual bool dropOn (QDropEvent *event, int *row, int *col, QModelIndex *index)
 If the event hasn't already been accepted, determines the index to drop on. More...
 
bool droppingOnItself (QDropEvent *event, const QModelIndex &index)
 Return true if this is a move from ourself and index is a child of the selection that is being moved. More...
 
QWidgeteditor (const QModelIndex &index, const QStyleOptionViewItem &options)
 
const QEditorInfoeditorForIndex (const QModelIndex &index) const
 
void executePostedLayout () const
 
QItemSelectionModel::SelectionFlags extendedSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
void fetchMore ()
 
bool hasEditor (const QModelIndex &index) const
 
QModelIndex indexForEditor (QWidget *editor) const
 
void init ()
 
void interruptDelayedItemsLayout () const
 
bool isAnimating () const
 
bool isIndexDragEnabled (const QModelIndex &index) const
 
bool isIndexDropEnabled (const QModelIndex &index) const
 
bool isIndexEnabled (const QModelIndex &index) const
 
bool isIndexSelectable (const QModelIndex &index) const
 
bool isIndexValid (const QModelIndex &index) const
 
bool isPersistent (const QModelIndex &index) const
 
QItemSelectionModel::SelectionFlags multiSelectionCommand (const QModelIndex &index, const QEvent *event) const
 
QPoint offset () const
 
bool openEditor (const QModelIndex &index, QEvent *event)
 
void paintDropIndicator (QPainter *painter)
 
virtual QAbstractItemView::DropIndicatorPosition position (const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
 
 QAbstractItemViewPrivate ()
 
void releaseEditor (QWidget *editor) const
 
void removeEditor (QWidget *editor)
 
QPixmap renderToPixmap (const QModelIndexList &indexes, QRect *r) const
 
void scrollContentsBy (int dx, int dy)
 
void scrollDirtyRegion (int dx, int dy)
 
virtual void selectAll (QItemSelectionModel::SelectionFlags command)
 
QModelIndexList selectedDraggableIndexes () const
 
virtual bool selectionAllowed (const QModelIndex &index) const
 
QItemSelectionModel::SelectionFlags selectionBehaviorFlags () const
 
bool sendDelegateEvent (const QModelIndex &index, QEvent *event) const
 
void setDirtyRegion (const QRegion &visualRegion)
 
void setHoverIndex (const QPersistentModelIndex &index)
 
bool shouldAutoScroll (const QPoint &pos) const
 
bool shouldEdit (QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const
 
bool shouldForwardEvent (QAbstractItemView::EditTrigger trigger, const QEvent *event) const
 
void startAutoScroll ()
 
void stopAutoScroll ()
 
void updateDirtyRegion ()
 
void updateEditorData (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
QStyleOptionViewItemV4 viewOptionsV4 () const
 
virtual ~QAbstractItemViewPrivate ()
 
- Public Functions inherited from QAbstractScrollAreaPrivate
void _q_hslide (int)
 
void _q_showOrHideScrollBars ()
 
void _q_vslide (int)
 
void init ()
 
void layoutChildren ()
 
 QAbstractScrollAreaPrivate ()
 
void replaceScrollBar (QScrollBar *scrollBar, Qt::Orientation orientation)
 
virtual void scrollBarPolicyChanged (Qt::Orientation, Qt::ScrollBarPolicy)
 
void setSingleFingerPanEnabled (bool on=true)
 
bool viewportEvent (QEvent *event)
 
- Public Functions inherited from QFramePrivate
void init ()
 
 QFramePrivate ()
 
void updateFrameWidth ()
 Updated the frameWidth parameter. More...
 
void updateStyledFrameWidths ()
 Updates the frame widths from the style. More...
 
- Public Functions inherited from QWidgetPrivate
void _q_showIfNotHidden ()
 
virtual void aboutToDestroy ()
 
void activateChildLayoutsRecursively ()
 
QSize adjustedSize () const
 
void adjustQuitOnCloseAttribute ()
 
QInputContextassignedInputContext () const
 
QPainterbeginSharedPainter ()
 
QWidgetchildAt_helper (const QPoint &, bool) const
 
QWidgetchildAtRecursiveHelper (const QPoint &p, bool, bool includeFrame=false) const
 
QRect clipRect () const
 
QRegion clipRegion () const
 
void clipToEffectiveMask (QRegion &region) const
 
bool close_helper (CloseMode mode)
 
void create_sys (WId window, bool initializeWindow, bool destroyOldWindow)
 
QWindowSurfacecreateDefaultWindowSurface ()
 
QWindowSurfacecreateDefaultWindowSurface_sys ()
 
void createExtra ()
 Creates the widget extra data. More...
 
void createRecursively ()
 
void createSysExtra ()
 
void createTLExtra ()
 
void createTLSysExtra ()
 
void createWinId (WId id=0)
 
void deactivateWidgetCleanup ()
 
void deleteExtra ()
 Deletes the widget extra data. More...
 
void deleteSysExtra ()
 
void deleteTLSysExtra ()
 
void drawWidget (QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter=0, QWidgetBackingStore *backingStore=0)
 
QWidgeteffectiveFocusWidget ()
 
QRect effectiveRectFor (const QRect &rect) const
 
bool endSharedPainter ()
 
void enforceNativeChildren ()
 
QWExtraextraData () const
 
QRect frameStrut () const
 
void getLayoutItemMargins (int *left, int *top, int *right, int *bottom) const
 
const QRegiongetOpaqueChildren () const
 
void handleSoftwareInputPanel (Qt::MouseButton button, bool clickCausedFocus)
 
virtual bool hasHeightForWidth () const
 
void hide_helper ()
 
void hide_sys ()
 Platform-specific part of QWidget::hide(). More...
 
void hideChildren (bool spontaneous)
 
void inheritStyle ()
 
void init (QWidget *desktopWidget, Qt::WindowFlags f)
 
QInputContextinputContext () const
 
void invalidateBuffer (const QRegion &)
 Invalidates the rgn (in widget's coordinates) of the backing store, i.e. More...
 
void invalidateBuffer (const QRect &)
 This function is equivalent to calling invalidateBuffer(QRegion(rect), ...), but is more efficient as it eliminates QRegion operations/allocations and can use the rect more precisely for additional cut-offs. More...
 
void invalidateBuffer_resizeHelper (const QPoint &oldPos, const QSize &oldSize)
 Invalidates the buffer when the widget is resized. More...
 
void invalidateGraphicsEffectsRecursively ()
 
bool isAboutToShow () const
 
bool isBackgroundInherited () const
 
bool isOverlapped (const QRect &) const
 
void lower_sys ()
 
QPoint mapFromGlobal (const QPoint &pos) const
 
QPoint mapToGlobal (const QPoint &pos) const
 
QWidgetBackingStoremaybeBackingStore () const
 
QTLWExtramaybeTopData () const
 
void moveRect (const QRect &, int dx, int dy)
 
bool nativeChildrenForced () const
 
QFont naturalWidgetFont (uint inheritedMask) const
 
QPalette naturalWidgetPalette (uint inheritedMask) const
 Returns the palette that the widget w inherits from its ancestors and QApplication::palette. More...
 
void paintBackground (QPainter *, const QRegion &, int flags=DrawAsRoot) const
 
bool paintOnScreen () const
 
void paintSiblingsRecursive (QPaintDevice *pdev, const QObjectList &children, int index, const QRegion &rgn, const QPoint &offset, int flags, QPainter *sharedPainter, QWidgetBackingStore *backingStore)
 
bool pointInsideRectAndMask (const QPoint &) const
 
QRegion prepareToRender (const QRegion &region, QWidget::RenderFlags renderFlags)
 
void propagatePaletteChange ()
 Propagate this widget's palette to all children, except style sheet widgets, and windows that don't enable window propagation (palettes don't normally propagate to windows). More...
 
 QWidgetPrivate (int version=QObjectPrivateVersion)
 
void raise_sys ()
 
QPaintDeviceredirected (QPoint *offset) const
 
void registerDropSite (bool)
 
void render (QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags, bool readyToRender)
 
void render_helper (QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, QWidget::RenderFlags renderFlags)
 
void repaint_sys (const QRegion &rgn)
 
void reparentFocusWidgets (QWidget *oldtlw)
 
void resolveFont ()
 Determine which font is implicitly imposed on this widget by its ancestors and QApplication::font, resolve this against its own font (attributes from the implicit font are copied over). More...
 
void resolveLayoutDirection ()
 
void resolveLocale ()
 
void resolvePalette ()
 Determine which palette is inherited from this widget's ancestors and QApplication::palette, resolve this against this widget's palette (attributes from the inherited palette are copied over this widget's palette). More...
 
void restoreRedirected ()
 
void scroll_sys (int dx, int dy)
 
void scroll_sys (int dx, int dy, const QRect &r)
 
void scrollChildren (int dx, int dy)
 
void scrollRect (const QRect &, int dx, int dy)
 
void sendPendingMoveAndResizeEvents (bool recursive=false, bool disableUpdates=false)
 
void sendStartupMessage (const char *message) const
 Platform-specific part of QWidget::show(). More...
 
void setConstraints_sys ()
 
void setCursor_sys (const QCursor &cursor)
 
void setDirtyOpaqueRegion ()
 
void setEnabled_helper (bool)
 
void setFocus_sys ()
 
void setFont_helper (const QFont &font)
 
void setGeometry_sys (int, int, int, int, bool)
 
void setLayoutDirection_helper (Qt::LayoutDirection)
 
void setLayoutItemMargins (int left, int top, int right, int bottom)
 
void setLayoutItemMargins (QStyle::SubElement element, const QStyleOption *opt=0)
 
void setLocale_helper (const QLocale &l, bool forceUpdate=false)
 
void setMask_sys (const QRegion &)
 
bool setMaximumSize_helper (int &maxw, int &maxh)
 
bool setMinimumSize_helper (int &minw, int &minh)
 
void setModal_sys ()
 
void setNetWmWindowTypes ()
 
void setOpaque (bool opaque)
 
void setPalette_helper (const QPalette &)
 
void setParent_sys (QWidget *parent, Qt::WindowFlags)
 
void setRedirected (QPaintDevice *replacement, const QPoint &offset)
 
void setSharedPainter (QPainter *painter)
 
void setStyle_helper (QStyle *newStyle, bool propagate, bool metalHack=false)
 
void setUpdatesEnabled_helper (bool)
 
void setWindowFilePath_helper (const QString &filePath)
 
void setWindowIcon_helper ()
 
void setWindowIcon_sys (bool forceReset=false)
 
void setWindowIconText_helper (const QString &cap)
 
void setWindowIconText_sys (const QString &cap)
 
void setWindowOpacity_sys (qreal opacity)
 
void setWindowRole ()
 
void setWindowTitle_helper (const QString &cap)
 
void setWindowTitle_sys (const QString &cap)
 
void setWinId (WId)
 
QPaintersharedPainter () const
 
void show_helper ()
 
void show_recursive ()
 Makes the widget visible in the isVisible() meaning of the word. More...
 
void show_sys ()
 Platform-specific part of QWidget::show(). More...
 
void showChildren (bool spontaneous)
 
void stackUnder_sys (QWidget *)
 
void subtractOpaqueChildren (QRegion &rgn, const QRect &clipRect) const
 
void subtractOpaqueSiblings (QRegion &source, bool *hasDirtySiblingsAbove=0, bool alsoNonOpaque=false) const
 
void syncBackingStore ()
 
void syncBackingStore (const QRegion &region)
 
QTLWExtratopData () const
 
void unsetCursor_sys ()
 
void updateFont (const QFont &)
 Assign font to this widget, and propagate it to all children, except style sheet widgets (handled differently) and windows that don't enable window propagation. More...
 
void updateFrameStrut ()
 Computes the frame rectangle when needed. More...
 
void updateGeometry_helper (bool forceUpdate)
 
void updateIsOpaque ()
 
void updateIsTranslucent ()
 
void updateSystemBackground ()
 
void updateX11AcceptFocus ()
 
void x11UpdateIsOpaque ()
 
 ~QWidgetPrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

QSize cachedSizeHint
 
bool cascadingResizing
 
QHash< int, int > cascadingSectionSize
 
bool clickableSections
 
int contentsSections
 
Qt::Alignment defaultAlignment
 
int defaultSectionSize
 
QBasicTimer delayedResize
 
int firstCascadingSection
 
int firstPos
 
QHeaderView::ResizeMode globalResizeMode
 
QHash< int, int > hiddenSectionSize
 
bool highlightSelected
 
int hover
 
int lastCascadingSection
 
int lastPos
 
int lastSectionSize
 
int length
 
QVector< int > logicalIndices
 
int minimumSectionSize
 
bool movableSections
 
int offset
 
Qt::Orientation orientation
 
int originalSize
 
QList< QPersistentModelIndexpersistentHiddenSections
 
int pressed
 
bool resizeRecursionBlock
 
int section
 
int sectionCount
 
QBitArray sectionHidden
 
QLabelsectionIndicator
 
int sectionIndicatorOffset
 
QBitArray sectionSelected
 
QVector< SectionSpansectionSpans
 
Qt::SortOrder sortIndicatorOrder
 
int sortIndicatorSection
 
bool sortIndicatorShown
 
enum QHeaderViewPrivate::State state
 
bool stretchLastSection
 
int stretchSections
 
int target
 
QVector< int > visualIndices
 
- Public Variables inherited from QAbstractItemViewPrivate
bool alternatingColors
 
bool autoScroll
 
int autoScrollCount
 
int autoScrollMargin
 
QBasicTimer autoScrollTimer
 
QMap< int, QPointer< QAbstractItemDelegate > > columnDelegates
 
QItemSelectionModel::SelectionFlag ctrlDragSelectionFlag
 
bool currentIndexSet
 
QWidgetcurrentlyCommittingEditor
 
Qt::DropAction defaultDropAction
 
QBasicTimer delayedAutoScroll
 
QBasicTimer delayedEditing
 
bool delayedPendingLayout
 
QBasicTimer delayedReset
 
QAbstractItemView::DragDropMode dragDropMode
 
bool dragEnabled
 
QAbstractItemView::DropIndicatorPosition dropIndicatorPosition
 
QRect dropIndicatorRect
 
QEditorIndexHash editorIndexHash
 
QAbstractItemView::EditTriggers editTriggers
 
QPersistentModelIndex enteredIndex
 
QAbstractItemView::ScrollMode horizontalScrollMode
 
QPersistentModelIndex hover
 
QSize iconSize
 
QIndexEditorHash indexEditorHash
 
QPointer< QAbstractItemDelegateitemDelegate
 
QString keyboardInput
 
QElapsedTimer keyboardInputTime
 
QAbstractItemView::EditTrigger lastTrigger
 
QAbstractItemModelmodel
 
bool moveCursorUpdatedView
 
bool noSelectionOnMousePress
 
bool overwrite
 
QSet< QWidget * > persistent
 
bool pressedAlreadySelected
 
QPersistentModelIndex pressedIndex
 
Qt::KeyboardModifiers pressedModifiers
 
QPoint pressedPosition
 
QPersistentModelIndex root
 
QMap< int, QPointer< QAbstractItemDelegate > > rowDelegates
 
QPoint scrollDelayOffset
 
QAbstractItemView::SelectionBehavior selectionBehavior
 
QAbstractItemView::SelectionMode selectionMode
 
QPointer< QItemSelectionModelselectionModel
 
bool shouldClearStatusTip
 
bool shouldScrollToCurrentOnShow
 
bool showDropIndicator
 
QAbstractItemView::State state
 
QAbstractItemView::State stateBeforeAnimation
 
bool tabKeyNavigation
 
Qt::TextElideMode textElideMode
 
QRegion updateRegion
 
QBasicTimer updateTimer
 
QAbstractItemView::ScrollMode verticalScrollMode
 
bool viewportEnteredNeeded
 
bool wrapItemText
 
- Public Variables inherited from QAbstractScrollAreaPrivate
int bottom
 
QRect cornerPaintingRect
 
QWidgetcornerWidget
 
QScrollBarhbar
 
Qt::ScrollBarPolicy hbarpolicy
 
int left
 
QRect reverseCornerPaintingRect
 
int right
 
QAbstractScrollAreaScrollBarContainerscrollBarContainers [Qt::Vertical+1]
 
bool singleFingerPanEnabled
 
int top
 
QScrollBarvbar
 
Qt::ScrollBarPolicy vbarpolicy
 
QWidgetviewport
 
QScopedPointer< QObjectviewportFilter
 
int xoffset
 
int yoffset
 
- Public Variables inherited from QFramePrivate
short bottomFrameWidth
 
int frameStyle
 
short frameWidth
 
QRect frect
 
short leftFrameWidth
 
short lineWidth
 
short midLineWidth
 
short rightFrameWidth
 
short topFrameWidth
 
- Public Variables inherited from QWidgetPrivate
QString accessibleDescription
 
QString accessibleName
 
QList< QAction * > actions
 
QPalette::ColorRole bg_role: 8
 
signed char bottomLayoutItemMargin
 
short bottommargin
 
QWidgetData data
 
QRegion dirty
 
uint dirtyOpaqueChildren: 1
 
QWExtraextra
 
QPaintEngineextraPaintEngine
 
QPalette::ColorRole fg_role: 8
 
QWidgetfocus_child
 
QWidgetfocus_next
 
QWidgetfocus_prev
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
QGraphicsEffectgraphicsEffect
 
Qt::HANDLE hd
 
uint high_attributes [4]
 
QPointer< QInputContextic
 
Qt::InputMethodHints imHints
 
uint inDirtyList: 1
 
uint inheritedFontResolveMask
 
uint inheritedPaletteResolveMask
 
uint inheritsInputMethodHints: 1
 
uint inSetParent: 1
 
uint isGLWidget: 1
 
uint isMoved: 1
 
uint isOpaque: 1
 
uint isScrolled: 1
 
QLayoutlayout
 
signed char leftLayoutItemMargin
 
short leftmargin
 
QLocale locale
 
QRegionneedsFlush
 
QRegion opaqueChildren
 
Qt::HANDLE picture
 
const QMetaObjectpolished
 
QPaintDeviceredirectDev
 
QPoint redirectOffset
 
signed char rightLayoutItemMargin
 
short rightmargin
 
QSizePolicy size_policy
 
QString statusTip
 
QString toolTip
 
signed char topLayoutItemMargin
 
short topmargin
 
uint usesDoubleBufferedGLContext: 1
 
QString whatsThis
 
QWidgetItemV2widgetItem
 
QX11Info xinfo
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Static Public Functions inherited from QWidgetPrivate
static void adjustFlags (Qt::WindowFlags &flags, QWidget *w=0)
 
static QGraphicsProxyWidgetnearestGraphicsProxyWidget (const QWidget *origin)
 Finds the nearest widget embedded in a graphics proxy widget along the chain formed by this widget and its ancestors. More...
 
static int pointToRect (const QPoint &p, const QRect &r)
 
static QRect screenGeometry (const QWidget *widget)
 
- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 
- Static Public Variables inherited from QWidgetPrivate
static QWidgetSetallWidgets = 0
 
static int instanceCounter = 0
 
static QWidgetkeyboardGrabber = 0
 
static QWidgetMappermapper = 0
 
static int maxInstances = 0
 
static QWidgetmouseGrabber = 0
 

Detailed Description

Definition at line 66 of file qheaderview_p.h.

Enumerations

◆ State

◆ StateVersion

Enumerator
VersionMarker 

Definition at line 71 of file qheaderview_p.h.

Constructors and Destructors

◆ QHeaderViewPrivate()

QHeaderViewPrivate::QHeaderViewPrivate ( )
inline

Definition at line 73 of file qheaderview_p.h.

74  : state(NoState),
75  offset(0),
78  sortIndicatorShown(false),
79  lastPos(-1),
80  firstPos(-1),
81  originalSize(-1),
82  section(-1),
83  target(-1),
84  pressed(-1),
85  hover(-1),
86  length(0),
87  sectionCount(0),
88  movableSections(false),
89  clickableSections(false),
90  highlightSelected(false),
91  stretchLastSection(false),
92  cascadingResizing(false),
93  resizeRecursionBlock(false),
94  stretchSections(0),
97  lastSectionSize(0),
101  {}
QLabel * sectionIndicator
QHeaderView::ResizeMode globalResizeMode
Qt::SortOrder sortIndicatorOrder
enum QHeaderViewPrivate::State state

Functions

◆ _q_layoutAboutToBeChanged()

void QHeaderViewPrivate::_q_layoutAboutToBeChanged ( )

Definition at line 1944 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

1945 {
1946  //if there is no row/column we can't have mapping for columns
1947  //because no QModelIndex in the model would be valid
1948  // ### this is far from being bullet-proof and we would need a real system to
1949  // ### map columns or rows persistently
1950  if ((orientation == Qt::Horizontal && model->rowCount(root) == 0)
1951  || model->columnCount(root) == 0)
1952  return;
1953 
1954  for (int i = 0; i < sectionHidden.count(); ++i)
1955  if (sectionHidden.testBit(i)) // ### note that we are using column or row 0
1957  ? model->index(0, logicalIndex(i), root)
1958  : model->index(logicalIndex(i), 0, root));
1959 }
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QBitArray sectionHidden
bool testBit(int i) const
Returns true if the bit at index position i is 1; otherwise returns false.
Definition: qbitarray.h:124
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const =0
Returns the index of the item in the model specified by the given row, column and parent index...
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
QPersistentModelIndex root
int count() const
Same as size().
Definition: qbitarray.h:74
QAbstractItemModel * model
int logicalIndex(int visualIndex) const
Qt::Orientation orientation
QList< QPersistentModelIndex > persistentHiddenSections

◆ _q_layoutChanged()

void QHeaderViewPrivate::_q_layoutChanged ( )
virtual

This slot is called when the layout is changed.

Warning
This function is not part of the public interface.

Reimplemented from QAbstractItemViewPrivate.

Definition at line 1961 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

1962 {
1963  Q_Q(QHeaderView);
1964  viewport->update();
1967  q->initializeSections();
1969  return;
1970  }
1971 
1972  QBitArray oldSectionHidden = sectionHidden;
1973  bool sectionCountChanged = false;
1974 
1975  for (int i = 0; i < persistentHiddenSections.count(); ++i) {
1977  if (index.isValid()) {
1978  const int logical = (orientation == Qt::Horizontal
1979  ? index.column()
1980  : index.row());
1981  q->setSectionHidden(logical, true);
1982  oldSectionHidden.setBit(logical, false);
1983  } else if (!sectionCountChanged && (modelSectionCount() != sectionCount)) {
1984  sectionCountChanged = true;
1985  break;
1986  }
1987  }
1989 
1990  for (int i = 0; i < oldSectionHidden.count(); ++i) {
1991  if (oldSectionHidden.testBit(i))
1992  q->setSectionHidden(i, false);
1993  }
1994 
1995  // the number of sections changed; we need to reread the state of the model
1996  if (sectionCountChanged)
1997  q->initializeSections();
1998 }
void setBit(int i)
Sets the bit at index position i to 1.
Definition: qbitarray.h:128
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QBitArray sectionHidden
bool testBit(int i) const
Returns true if the bit at index position i is 1; otherwise returns false.
Definition: qbitarray.h:124
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
#define Q_Q(Class)
Definition: qglobal.h:2483
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
int row() const
Returns the row this model index refers to.
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
int modelSectionCount() const
void clear()
Removes all items from the list.
Definition: qlist.h:764
bool isValid() const
Returns true if this model index is valid; otherwise returns false.
The QBitArray class provides an array of bits.
Definition: qbitarray.h:54
The QModelIndex class is used to locate data in a data model.
int count() const
Same as size().
Definition: qbitarray.h:74
quint16 index
Qt::Orientation orientation
QList< QPersistentModelIndex > persistentHiddenSections
bool modelIsEmpty() const
int column() const
Returns the column this model index refers to.
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ _q_sectionsRemoved()

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

Definition at line 1889 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

1891 {
1892  Q_Q(QHeaderView);
1893  if (parent != root)
1894  return; // we only handle changes in the top level
1895  if (qMin(logicalFirst, logicalLast) < 0
1896  || qMax(logicalLast, logicalFirst) >= sectionCount)
1897  return;
1898  int oldCount = q->count();
1899  int changeCount = logicalLast - logicalFirst + 1;
1900 
1901  updateHiddenSections(logicalFirst, logicalLast);
1902 
1904  //Q_ASSERT(headerSectionCount() == sectionCount);
1905  removeSectionsFromSpans(logicalFirst, logicalLast);
1906  } else {
1907  for (int l = logicalLast; l >= logicalFirst; --l) {
1908  int visual = visualIndices.at(l);
1909  for (int v = 0; v < sectionCount; ++v) {
1910  if (v >= logicalIndices.count())
1911  continue; // the section doesn't exist
1912  if (v > visual) {
1913  int logical = logicalIndices.at(v);
1914  --(visualIndices[logical]);
1915  }
1916  if (logicalIndex(v) > l) // no need to move the positions before l
1917  --(logicalIndices[v]);
1918  }
1919  logicalIndices.remove(visual);
1921  //Q_ASSERT(headerSectionCount() == sectionCount);
1922  removeSectionsFromSpans(visual, visual);
1923  }
1924  // ### handle sectionSelection, sectionHidden
1925  }
1926  sectionCount -= changeCount;
1927 
1928  // update sorting column
1929  if (sortIndicatorSection >= logicalFirst) {
1930  if (sortIndicatorSection <= logicalLast)
1931  sortIndicatorSection = -1;
1932  else
1933  sortIndicatorSection -= changeCount;
1934  }
1935 
1936  // if we only have the last section (the "end" position) left, the header is empty
1937  if (sectionCount <= 0)
1938  clear();
1940  emit q->sectionCountChanged(oldCount, q->count());
1941  viewport->update();
1942 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
void remove(int i)
Removes the element at index position i.
Definition: qvector.h:374
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
void updateHiddenSections(int logicalFirst, int logicalLast)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
QVector< int > visualIndices
#define emit
Definition: qobjectdefs.h:76
void removeSectionsFromSpans(int start, int end)
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
QVector< int > logicalIndices
QPersistentModelIndex root
QFactoryLoader * l
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
Definition: qvector.h:139
void invalidateCachedSizeHint() const
int logicalIndex(int visualIndex) const
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ adjustedVisualIndex()

int QHeaderViewPrivate::adjustedVisualIndex ( int  visualIndex) const

Definition at line 3667 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3668 {
3669  if (hiddenSectionSize.count() > 0) {
3671  int currentVisualIndex = 0;
3672  for (int i = 0; i < sectionSpans.count(); ++i) {
3673  if (sectionSpans.at(i).size == 0)
3674  adjustedVisualIndex += sectionSpans.at(i).count;
3675  else
3676  currentVisualIndex += sectionSpans.at(i).count;
3677  if (currentVisualIndex >= visualIndex)
3678  break;
3679  }
3681  }
3682  return visualIndex;
3683 }
QHash< int, int > hiddenSectionSize
int visualIndex(int logicalIndex) const
int adjustedVisualIndex(int visualIndex) const
QVector< SectionSpan > sectionSpans
int count(const Key &key) const
Returns the number of items associated with the key.
Definition: qhash.h:719

◆ cascadingResize()

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

Definition at line 3443 of file qheaderview.cpp.

Referenced by executePostedResize().

3444 {
3445  Q_Q(QHeaderView);
3446  const int minimumSize = q->minimumSectionSize();
3447  const int oldSize = headerSectionSize(visual);
3448  int delta = newSize - oldSize;
3449 
3450  if (delta > 0) { // larger
3451  bool sectionResized = false;
3452 
3453  // restore old section sizes
3454  for (int i = firstCascadingSection; i < visual; ++i) {
3455  if (cascadingSectionSize.contains(i)) {
3456  int currentSectionSize = headerSectionSize(i);
3457  int originalSectionSize = cascadingSectionSize.value(i);
3458  if (currentSectionSize < originalSectionSize) {
3459  int newSectionSize = currentSectionSize + delta;
3460  resizeSectionSpan(i, currentSectionSize, newSectionSize);
3461  if (newSectionSize >= originalSectionSize && false)
3462  cascadingSectionSize.remove(i); // the section is now restored
3463  sectionResized = true;
3464  break;
3465  }
3466  }
3467 
3468  }
3469 
3470  // resize the section
3471  if (!sectionResized) {
3472  newSize = qMax(newSize, minimumSize);
3473  if (oldSize != newSize)
3474  resizeSectionSpan(visual, oldSize, newSize);
3475  }
3476 
3477  // cascade the section size change
3478  for (int i = visual + 1; i < sectionCount; ++i) {
3479  if (!sectionIsCascadable(i))
3480  continue;
3481  int currentSectionSize = headerSectionSize(i);
3482  if (currentSectionSize <= minimumSize)
3483  continue;
3484  int newSectionSize = qMax(currentSectionSize - delta, minimumSize);
3485  //qDebug() << "### cascading to" << i << newSectionSize - currentSectionSize << delta;
3486  resizeSectionSpan(i, currentSectionSize, newSectionSize);
3487  saveCascadingSectionSize(i, currentSectionSize);
3488  delta = delta - (currentSectionSize - newSectionSize);
3489  //qDebug() << "new delta" << delta;
3490  //if (newSectionSize != minimumSize)
3491  if (delta <= 0)
3492  break;
3493  }
3494  } else { // smaller
3495  bool sectionResized = false;
3496 
3497  // restore old section sizes
3498  for (int i = lastCascadingSection; i > visual; --i) {
3500  continue;
3501  int currentSectionSize = headerSectionSize(i);
3502  int originalSectionSize = cascadingSectionSize.value(i);
3503  if (currentSectionSize >= originalSectionSize)
3504  continue;
3505  int newSectionSize = currentSectionSize - delta;
3506  resizeSectionSpan(i, currentSectionSize, newSectionSize);
3507  if (newSectionSize >= originalSectionSize && false) {
3508  //qDebug() << "section" << i << "restored to" << originalSectionSize;
3509  cascadingSectionSize.remove(i); // the section is now restored
3510  }
3511  sectionResized = true;
3512  break;
3513  }
3514 
3515  // resize the section
3516  resizeSectionSpan(visual, oldSize, qMax(newSize, minimumSize));
3517 
3518  // cascade the section size change
3519  if (delta < 0 && newSize < minimumSize) {
3520  for (int i = visual - 1; i >= 0; --i) {
3521  if (!sectionIsCascadable(i))
3522  continue;
3523  int sectionSize = headerSectionSize(i);
3524  if (sectionSize <= minimumSize)
3525  continue;
3526  resizeSectionSpan(i, sectionSize, qMax(sectionSize + delta, minimumSize));
3527  saveCascadingSectionSize(i, sectionSize);
3528  break;
3529  }
3530  }
3531 
3532  // let the next section get the space from the resized section
3533  if (!sectionResized) {
3534  for (int i = visual + 1; i < sectionCount; ++i) {
3535  if (!sectionIsCascadable(i))
3536  continue;
3537  int currentSectionSize = headerSectionSize(i);
3538  int newSectionSize = qMax(currentSectionSize - delta, minimumSize);
3539  resizeSectionSpan(i, currentSectionSize, newSectionSize);
3540  break;
3541  }
3542  }
3543  }
3544 
3545  if (hasAutoResizeSections())
3547 
3548  viewport->update();
3549 }
QHash< int, int > cascadingSectionSize
int headerSectionSize(int visual) const
int remove(const Key &key)
Removes all the items that have the key from the hash.
Definition: qhash.h:784
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
const T value(const Key &key) const
Returns the value associated with the key.
Definition: qhash.h:606
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
bool sectionIsCascadable(int visual) const
bool hasAutoResizeSections() const
void resizeSectionSpan(int visualIndex, int oldSize, int newSize)
void saveCascadingSectionSize(int visual, int size)
void doDelayedResizeSections()
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ clear()

void QHeaderViewPrivate::clear ( )

Definition at line 3412 of file qheaderview.cpp.

Referenced by executePostedResize().

3413 {
3414  if (state != NoClear) {
3415  length = 0;
3416  sectionCount = 0;
3417  visualIndices.clear();
3420  sectionHidden.clear();
3422  sectionSpans.clear();
3424  }
3425 }
void clear()
Clears the contents of the bit array and makes it empty.
Definition: qbitarray.h:85
QHash< int, int > hiddenSectionSize
void clear()
Removes all items from the hash.
Definition: qhash.h:574
QBitArray sectionHidden
QVector< int > visualIndices
void clear()
Removes all the elements from the vector and releases the memory used by the vector.
Definition: qvector.h:347
QVector< int > logicalIndices
QBitArray sectionSelected
QVector< SectionSpan > sectionSpans
void invalidateCachedSizeHint() const
enum QHeaderViewPrivate::State state

◆ clearCascadingSections()

void QHeaderViewPrivate::clearCascadingSections ( )
inline

Definition at line 195 of file qheaderview_p.h.

195  {
199  }
QHash< int, int > cascadingSectionSize
void clear()
Removes all items from the hash.
Definition: qhash.h:574

◆ columnIntersectsSelection()

bool QHeaderViewPrivate::columnIntersectsSelection ( int  column) const
inline

Definition at line 120 of file qheaderview_p.h.

Referenced by sectionIntersectsSelection().

120  {
121  return (selectionModel ? selectionModel->columnIntersectsSelection(column, root) : false);
122  }
QPointer< QItemSelectionModel > selectionModel
QPersistentModelIndex root
bool columnIntersectsSelection(int column, const QModelIndex &parent) const
Returns true if there are any items selected in the column with the given parent. ...

◆ createSectionSpan()

void QHeaderViewPrivate::createSectionSpan ( int  start,
int  end,
int  size,
QHeaderView::ResizeMode  mode 
)

Definition at line 3237 of file qheaderview.cpp.

3238 {
3239  // ### the code for merging spans does not merge at all opertuneties
3240  // ### what if the number of sections is reduced ?
3241 
3242  SectionSpan span(size, (end - start) + 1, mode);
3243  int start_section = 0;
3244 #ifndef QT_NO_DEBUG
3245  int initial_section_count = headerSectionCount(); // ### debug code
3246 #endif
3247 
3248  QList<int> spansToRemove;
3249  for (int i = 0; i < sectionSpans.count(); ++i) {
3250  int end_section = start_section + sectionSpans.at(i).count - 1;
3251  int section_count = sectionSpans.at(i).count;
3252  if (start <= start_section && end > end_section) {
3253  // the existing span is entirely coveded by the new span
3254  spansToRemove.append(i);
3255  } else if (start < start_section && end >= end_section) {
3256  // the existing span is entirely coveded by the new span
3257  spansToRemove.append(i);
3258  } else if (start == start_section && end == end_section) {
3259  // the new span is covered by an existin span
3260  length -= sectionSpans.at(i).size;
3261  length += size;
3262  sectionSpans[i].size = size;
3263  sectionSpans[i].resizeMode = mode;
3264  // ### check if we can merge the section with any of its neighbours
3265  removeSpans(spansToRemove);
3266  Q_ASSERT(initial_section_count == headerSectionCount());
3267  return;
3268  } else if (start > start_section && end < end_section) {
3269  if (sectionSpans.at(i).sectionSize() == span.sectionSize()
3270  && sectionSpans.at(i).resizeMode == span.resizeMode) {
3271  Q_ASSERT(initial_section_count == headerSectionCount());
3272  return;
3273  }
3274  // the new span is in the middle of the old span, so we have to split it
3275  length -= sectionSpans.at(i).size;
3276  int section_size = sectionSpans.at(i).sectionSize();
3277 #ifndef QT_NO_DEBUG
3278  int span_count = sectionSpans.at(i).count;
3279 #endif
3280  QHeaderView::ResizeMode span_mode = sectionSpans.at(i).resizeMode;
3281  // first span
3282  int first_span_count = start - start_section;
3283  int first_span_size = section_size * first_span_count;
3284  sectionSpans[i].count = first_span_count;
3285  sectionSpans[i].size = first_span_size;
3286  sectionSpans[i].resizeMode = span_mode;
3287  length += first_span_size;
3288  // middle span (the new span)
3289 #ifndef QT_NO_DEBUG
3290  int mid_span_count = span.count;
3291 #endif
3292  int mid_span_size = span.size;
3293  sectionSpans.insert(i + 1, span);
3294  length += mid_span_size;
3295  // last span
3296  int last_span_count = end_section - end;
3297  int last_span_size = section_size * last_span_count;
3298  sectionSpans.insert(i + 2, SectionSpan(last_span_size, last_span_count, span_mode));
3299  length += last_span_size;
3300  Q_ASSERT(span_count == first_span_count + mid_span_count + last_span_count);
3301  removeSpans(spansToRemove);
3302  Q_ASSERT(initial_section_count == headerSectionCount());
3303  return;
3304  } else if (start > start_section && start <= end_section && end >= end_section) {
3305  // the new span covers the last part of the existing span
3306  length -= sectionSpans.at(i).size;
3307  int removed_count = (end_section - start + 1);
3308  int span_count = sectionSpans.at(i).count - removed_count;
3309  int section_size = sectionSpans.at(i).sectionSize();
3310  int span_size = section_size * span_count;
3311  sectionSpans[i].count = span_count;
3312  sectionSpans[i].size = span_size;
3313  length += span_size;
3314  if (end == end_section) {
3315  sectionSpans.insert(i + 1, span); // insert after
3316  length += span.size;
3317  removeSpans(spansToRemove);
3318  Q_ASSERT(initial_section_count == headerSectionCount());
3319  return;
3320  }
3321  } else if (end < end_section && end >= start_section && start <= start_section) {
3322  // the new span covers the first part of the existing span
3323  length -= sectionSpans.at(i).size;
3324  int removed_count = (end - start_section + 1);
3325  int section_size = sectionSpans.at(i).sectionSize();
3326  int span_count = sectionSpans.at(i).count - removed_count;
3327  int span_size = section_size * span_count;
3328  sectionSpans[i].count = span_count;
3329  sectionSpans[i].size = span_size;
3330  length += span_size;
3331  sectionSpans.insert(i, span); // insert before
3332  length += span.size;
3333  removeSpans(spansToRemove);
3334  Q_ASSERT(initial_section_count == headerSectionCount());
3335  return;
3336  }
3337  start_section += section_count;
3338  }
3339 
3340  // ### adding and removing _ sections_ in addition to spans
3341  // ### add some more checks here
3342 
3343  if (spansToRemove.isEmpty()) {
3344  if (!sectionSpans.isEmpty()
3345  && sectionSpans.last().sectionSize() == span.sectionSize()
3346  && sectionSpans.last().resizeMode == span.resizeMode) {
3347  length += span.size;
3348  int last = sectionSpans.count() - 1;
3349  sectionSpans[last].count += span.count;
3350  sectionSpans[last].size += span.size;
3351  sectionSpans[last].resizeMode = span.resizeMode;
3352  } else {
3353  length += span.size;
3354  sectionSpans.append(span);
3355  }
3356  } else {
3357  removeSpans(spansToRemove);
3358  length += span.size;
3359  sectionSpans.insert(spansToRemove.first(), span);
3360  //Q_ASSERT(initial_section_count == headerSectionCount());
3361  }
3362 }
ResizeMode
The resize mode specifies the behavior of the header sections.
Definition: qheaderview.h:72
void removeSpans(const QList< int > &spans)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
Definition: qlist.h:152
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
int headerSectionCount() const
T & first()
Returns a reference to the first item in the list.
Definition: qlist.h:282
QVector< SectionSpan > sectionSpans
static const KeyPair *const end

◆ doDelayedResizeSections()

void QHeaderViewPrivate::doDelayedResizeSections ( )
inline

Definition at line 223 of file qheaderview_p.h.

223  {
224  if (!delayedResize.isActive())
225  delayedResize.start(0, q_func());
226  }
bool isActive() const
Returns true if the timer is running and has not been stopped; otherwise returns false.
Definition: qbasictimer.h:62
QBasicTimer delayedResize
void start(int msec, QObject *obj)
Starts (or restarts) the timer with a msec milliseconds timeout.

◆ executePostedResize()

void QHeaderViewPrivate::executePostedResize ( ) const
inline

Definition at line 228 of file qheaderview_p.h.

228  {
229  if (delayedResize.isActive() && state == NoState) {
230  const_cast<QHeaderView*>(q_func())->resizeSections();
231  }
232  }
bool isActive() const
Returns true if the timer is running and has not been stopped; otherwise returns false.
Definition: qbasictimer.h:62
QBasicTimer delayedResize
void resizeSections(QHeaderView::ResizeMode globalMode, bool useGlobalMode=false)
Go through and resize all of the sections applying stretchLastSection, manualy stretches, sizes, and useGlobalMode.
enum QHeaderViewPrivate::State state
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ flipSortIndicator()

void QHeaderViewPrivate::flipSortIndicator ( int  section)

Definition at line 3427 of file qheaderview.cpp.

Referenced by executePostedResize().

3428 {
3429  Q_Q(QHeaderView);
3430  Qt::SortOrder sortOrder;
3431  if (sortIndicatorSection == section) {
3433  } else {
3435  if (value.canConvert(QVariant::Int))
3436  sortOrder = static_cast<Qt::SortOrder>(value.toInt());
3437  else
3438  sortOrder = Qt::AscendingOrder;
3439  }
3440  q->setSortIndicator(section, sortOrder);
3441 }
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
virtual QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns the data for the given role and section in the header with the specified orientation.
#define Q_Q(Class)
Definition: qglobal.h:2483
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
Definition: qvariant.cpp:2625
SortOrder
Definition: qnamespace.h:189
bool canConvert(Type t) const
Returns true if the variant&#39;s type can be cast to the requested type, t.
Definition: qvariant.cpp:2886
Qt::SortOrder sortIndicatorOrder
QAbstractItemModel * model
Qt::Orientation orientation
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ getStyleOption()

QStyleOptionHeader QHeaderViewPrivate::getStyleOption ( ) const

Referenced by hasAutoResizeSections().

◆ hasAutoResizeSections()

bool QHeaderViewPrivate::hasAutoResizeSections ( ) const
inline

Definition at line 173 of file qheaderview_p.h.

◆ headerLength()

int QHeaderViewPrivate::headerLength ( ) const
inline

Definition at line 317 of file qheaderview_p.h.

317  { // for debugging
318  int len = 0;
319  for (int i = 0; i < sectionSpans.count(); ++i)
320  len += sectionSpans.at(i).size;
321  return len;
322  }
QVector< SectionSpan > sectionSpans

◆ headerSectionCount()

int QHeaderViewPrivate::headerSectionCount ( ) const
inline

Definition at line 310 of file qheaderview_p.h.

310  { // for debugging
311  int count = 0;
312  for (int i = 0; i < sectionSpans.count(); ++i)
313  count += sectionSpans.at(i).count;
314  return count;
315  }
QVector< SectionSpan > sectionSpans

◆ headerSectionPosition()

int QHeaderViewPrivate::headerSectionPosition ( int  visual) const

Definition at line 3597 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3598 {
3599  // ### stupid iteration
3600  int section_start = 0;
3601  int span_position = 0;
3602  const int sectionSpansCount = sectionSpans.count();
3603  for (int i = 0; i < sectionSpansCount; ++i) {
3604  const QHeaderViewPrivate::SectionSpan &currentSection = sectionSpans.at(i);
3605  int section_end = section_start + currentSection.count - 1;
3606  if (visual >= section_start && visual <= section_end)
3607  return span_position + (visual - section_start) * currentSection.sectionSize();
3608  section_start = section_end + 1;
3609  span_position += currentSection.size;
3610  }
3611  return -1;
3612 }
QVector< SectionSpan > sectionSpans

◆ headerSectionResizeMode()

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

Definition at line 3642 of file qheaderview.cpp.

Referenced by sectionIsCascadable(), and sectionSpanIndex().

3643 {
3644  int span = sectionSpanIndex(visual);
3645  if (span == -1)
3646  return globalResizeMode;
3647  return sectionSpans.at(span).resizeMode;
3648 }
QHeaderView::ResizeMode globalResizeMode
QVector< SectionSpan > sectionSpans
int sectionSpanIndex(int visual) const

◆ headerSectionSize()

int QHeaderViewPrivate::headerSectionSize ( int  visual) const

Definition at line 3582 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3583 {
3584  // ### stupid iteration
3585  int section_start = 0;
3586  const int sectionSpansCount = sectionSpans.count();
3587  for (int i = 0; i < sectionSpansCount; ++i) {
3588  const QHeaderViewPrivate::SectionSpan &currentSection = sectionSpans.at(i);
3589  int section_end = section_start + currentSection.count - 1;
3590  if (visual >= section_start && visual <= section_end)
3591  return currentSection.sectionSize();
3592  section_start = section_end + 1;
3593  }
3594  return -1;
3595 }
QVector< SectionSpan > sectionSpans

◆ headerVisualIndexAt()

int QHeaderViewPrivate::headerVisualIndexAt ( int  position) const

Definition at line 3614 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3615 {
3616  // ### stupid iteration
3617  int span_start_section = 0;
3618  int span_position = 0;
3619  const int sectionSpansCount = sectionSpans.count();
3620  for (int i = 0; i < sectionSpansCount; ++i) {
3621  const QHeaderViewPrivate::SectionSpan &currentSection = sectionSpans.at(i);
3622  int next_span_start_section = span_start_section + currentSection.count;
3623  int next_span_position = span_position + currentSection.size;
3624  if (position == span_position && currentSection.size > 0)
3625  return span_start_section;
3626  if (position > span_position && position < next_span_position) {
3627  int position_in_span = position - span_position;
3628  return span_start_section + (position_in_span / currentSection.sectionSize());
3629  }
3630  span_start_section = next_span_start_section;
3631  span_position = next_span_position;
3632  }
3633  return -1;
3634 }
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
QVector< SectionSpan > sectionSpans

◆ initializeIndexMapping()

void QHeaderViewPrivate::initializeIndexMapping ( ) const
inline

Definition at line 183 of file qheaderview_p.h.

183  {
188  for (int s = 0; s < sectionCount; ++s) {
189  visualIndices[s] = s;
190  logicalIndices[s] = s;
191  }
192  }
193  }
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Definition: qvector.h:742
void resize(int size)
Sets the size of the vector to size.
Definition: qvector.h:342
QVector< int > visualIndices
QVector< int > logicalIndices

◆ invalidateCachedSizeHint()

void QHeaderViewPrivate::invalidateCachedSizeHint ( ) const
inline

Definition at line 179 of file qheaderview_p.h.

179  {
180  cachedSizeHint = QSize();
181  }
The QSize class defines the size of a two-dimensional object using integer point precision.
Definition: qsize.h:53

◆ isColumnSelected()

bool QHeaderViewPrivate::isColumnSelected ( int  column) const
inline

Definition at line 132 of file qheaderview_p.h.

132  {
133  return (selectionModel ? selectionModel->isColumnSelected(column, root) : false);
134  }
bool isColumnSelected(int column, const QModelIndex &parent) const
Returns true if all items are selected in the column with the given parent.
QPointer< QItemSelectionModel > selectionModel
QPersistentModelIndex root

◆ isRowSelected()

bool QHeaderViewPrivate::isRowSelected ( int  row) const
inline

Definition at line 128 of file qheaderview_p.h.

128  {
129  return (selectionModel ? selectionModel->isRowSelected(row, root) : false);
130  }
QPointer< QItemSelectionModel > selectionModel
QPersistentModelIndex root
bool isRowSelected(int row, const QModelIndex &parent) const
Returns true if all items are selected in the row with the given parent.

◆ isSectionSelected()

bool QHeaderViewPrivate::isSectionSelected ( int  section) const

Definition at line 3059 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

3060 {
3061  int i = section * 2;
3062  if (i < 0 || i >= sectionSelected.count())
3063  return false;
3064  if (sectionSelected.testBit(i)) // if the value was cached
3065  return sectionSelected.testBit(i + 1);
3066  bool s = false;
3067  if (orientation == Qt::Horizontal)
3069  else
3070  s = isRowSelected(section);
3071  sectionSelected.setBit(i + 1, s); // selection state
3072  sectionSelected.setBit(i, true); // cache state
3073  return s;
3074 }
void setBit(int i)
Sets the bit at index position i to 1.
Definition: qbitarray.h:128
bool testBit(int i) const
Returns true if the bit at index position i is 1; otherwise returns false.
Definition: qbitarray.h:124
bool isRowSelected(int row) const
QBitArray sectionSelected
int count() const
Same as size().
Definition: qbitarray.h:74
Qt::Orientation orientation
bool isColumnSelected(int column) const

◆ isVisualIndexHidden()

bool QHeaderViewPrivate::isVisualIndexHidden ( int  visual) const
inline

Definition at line 165 of file qheaderview_p.h.

165  {
166  return !sectionHidden.isEmpty() && sectionHidden.at(visual);
167  }
QBitArray sectionHidden
bool at(int i) const
Returns the value of the bit at index position i.
Definition: qbitarray.h:146
bool isEmpty() const
Returns true if this bit array has size 0; otherwise returns false.
Definition: qbitarray.h:78

◆ lastVisibleVisualIndex()

int QHeaderViewPrivate::lastVisibleVisualIndex ( ) const

Returns the last visible (ie.

Warning
This function is not part of the public interface. not hidden) visual index

Definition at line 3083 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

3084 {
3085  Q_Q(const QHeaderView);
3086  for (int visual = q->count()-1; visual >= 0; --visual) {
3087  if (!q->isSectionHidden(q->logicalIndex(visual)))
3088  return visual;
3089  }
3090 
3091  //default value if no section is actually visible
3092  return -1;
3093 }
#define Q_Q(Class)
Definition: qglobal.h:2483
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ logicalIndex()

int QHeaderViewPrivate::logicalIndex ( int  visualIndex) const
inline

Definition at line 148 of file qheaderview_p.h.

Referenced by visualIndex().

148  {
150  }
int visualIndex(int logicalIndex) const
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
QVector< int > logicalIndices
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
Definition: qvector.h:139

◆ modelIsEmpty()

bool QHeaderViewPrivate::modelIsEmpty ( ) const
inline

Definition at line 219 of file qheaderview_p.h.

219  {
220  return (model->rowCount(root) == 0 || model->columnCount(root) == 0);
221  }
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QPersistentModelIndex root
QAbstractItemModel * model

◆ modelSectionCount()

int QHeaderViewPrivate::modelSectionCount ( ) const
inline

Definition at line 213 of file qheaderview_p.h.

213  {
214  return (orientation == Qt::Horizontal
216  : model->rowCount(root));
217  }
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
QPersistentModelIndex root
QAbstractItemModel * model
Qt::Orientation orientation

◆ prepareSectionSelected()

void QHeaderViewPrivate::prepareSectionSelected ( )
inline

Definition at line 136 of file qheaderview_p.h.

136  {
139  else if (sectionSelected.count() != sectionCount * 2)
140  sectionSelected.fill(false, sectionCount * 2);
141  else sectionSelected.fill(false);
142  }
void clear()
Clears the contents of the bit array and makes it empty.
Definition: qbitarray.h:85
QPointer< QItemSelectionModel > selectionModel
bool fill(bool val, int size=-1)
Sets every bit in the bit array to value, returning true if successful; otherwise returns false...
Definition: qbitarray.h:117
bool hasSelection() const
Returns true if the selection model contains any selection ranges; otherwise returns false...
QBitArray sectionSelected
int count() const
Same as size().
Definition: qbitarray.h:74

◆ read()

bool QHeaderViewPrivate::read ( QDataStream in)

Definition at line 3717 of file qheaderview.cpp.

3718 {
3719  int orient, order, align, global;
3720  in >> orient;
3721  orientation = (Qt::Orientation)orient;
3722 
3723  in >> order;
3725 
3726  in >> sortIndicatorSection;
3727  in >> sortIndicatorShown;
3728 
3729  in >> visualIndices;
3730  in >> logicalIndices;
3731 
3732  in >> sectionHidden;
3733  in >> hiddenSectionSize;
3734 
3735  in >> length;
3736  in >> sectionCount;
3737  in >> movableSections;
3738  in >> clickableSections;
3739  in >> highlightSelected;
3740  in >> stretchLastSection;
3741  in >> cascadingResizing;
3742  in >> stretchSections;
3743  in >> contentsSections;
3744  in >> defaultSectionSize;
3745  in >> minimumSectionSize;
3746 
3747  in >> align;
3748  defaultAlignment = Qt::Alignment(align);
3749 
3750  in >> global;
3752 
3753  in >> sectionSpans;
3754 
3755  return true;
3756 }
QHash< int, int > hiddenSectionSize
QBitArray sectionHidden
ResizeMode
The resize mode specifies the behavior of the header sections.
Definition: qheaderview.h:72
QVector< int > visualIndices
SortOrder
Definition: qnamespace.h:189
QHeaderView::ResizeMode globalResizeMode
QVector< int > logicalIndices
QVector< SectionSpan > sectionSpans
Qt::Alignment defaultAlignment
Qt::SortOrder sortIndicatorOrder
Orientation
Definition: qnamespace.h:174
Qt::Orientation orientation

◆ removeSectionsFromSpans()

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

Definition at line 3364 of file qheaderview.cpp.

3365 {
3366  // remove sections
3367  int start_section = 0;
3368  QList<int> spansToRemove;
3369  for (int i = 0; i < sectionSpans.count(); ++i) {
3370  int end_section = start_section + sectionSpans.at(i).count - 1;
3371  int section_size = sectionSpans.at(i).sectionSize();
3372  int section_count = sectionSpans.at(i).count;
3373  if (start <= start_section && end >= end_section) {
3374  // the change covers the entire span
3375  spansToRemove.append(i);
3376  if (end == end_section)
3377  break;
3378  } else if (start > start_section && end < end_section) {
3379  // all the removed sections are inside the span
3380  int change = (end - start + 1);
3381  sectionSpans[i].count -= change;
3382  sectionSpans[i].size = section_size * sectionSpans.at(i).count;
3383  length -= (change * section_size);
3384  break;
3385  } else if (start >= start_section && start <= end_section) {
3386  // the some of the removed sections are inside the span,at the end
3387  int change = qMin(end_section - start + 1, end - start + 1);
3388  sectionSpans[i].count -= change;
3389  sectionSpans[i].size = section_size * sectionSpans.at(i).count;
3390  start += change;
3391  length -= (change * section_size);
3392  // the change affects several spans
3393  } else if (end >= start_section && end <= end_section) {
3394  // the some of the removed sections are inside the span, at the beginning
3395  int change = qMin((end - start_section + 1), end - start + 1);
3396  sectionSpans[i].count -= change;
3397  sectionSpans[i].size = section_size * sectionSpans.at(i).count;
3398  length -= (change * section_size);
3399  break;
3400  }
3401  start_section += section_count;
3402  }
3403 
3404  for (int i = spansToRemove.count() - 1; i >= 0; --i) {
3405  int s = spansToRemove.at(i);
3406  length -= sectionSpans.at(s).size;
3407  sectionSpans.remove(s);
3408  // ### merge remaining spans
3409  }
3410 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QVector< SectionSpan > sectionSpans
static const KeyPair *const end

◆ removeSpans()

void QHeaderViewPrivate::removeSpans ( const QList< int > &  spans)
inline

Definition at line 324 of file qheaderview_p.h.

324  {
325  for (int i = spans.count() - 1; i >= 0; --i) {
326  length -= sectionSpans.at(spans.at(i)).size;
327  sectionSpans.remove(spans.at(i));
328  }
329  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QVector< SectionSpan > sectionSpans

◆ resizeSections()

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

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

Warning
This function is not part of the public interface.

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 3111 of file qheaderview.cpp.

Referenced by executePostedResize(), and QHeaderViewPrivate().

3112 {
3113  Q_Q(QHeaderView);
3114  //stop the timer in case it is delayed
3115  delayedResize.stop();
3116 
3118  if (sectionCount == 0)
3119  return;
3120 
3122  return;
3123  resizeRecursionBlock = true;
3124 
3126 
3127  const int lastVisibleSection = lastVisibleVisualIndex();
3128 
3129  // find stretchLastSection if we have it
3130  int stretchSection = -1;
3131  if (stretchLastSection && !useGlobalMode)
3132  stretchSection = lastVisibleVisualIndex();
3133 
3134  // count up the number of strected sections and how much space left for them
3135  int lengthToStrech = (orientation == Qt::Horizontal ? viewport->width() : viewport->height());
3136  int numberOfStretchedSections = 0;
3137  QList<int> section_sizes;
3138  for (int i = 0; i < sectionCount; ++i) {
3139  if (isVisualIndexHidden(i))
3140  continue;
3141 
3142  QHeaderView::ResizeMode resizeMode;
3143  if (useGlobalMode && (i != stretchSection))
3144  resizeMode = globalMode;
3145  else
3146  resizeMode = (i == stretchSection ? QHeaderView::Stretch : headerSectionResizeMode(i));
3147 
3148  if (resizeMode == QHeaderView::Stretch) {
3149  ++numberOfStretchedSections;
3150  section_sizes.append(headerSectionSize(i));
3151  continue;
3152  }
3153 
3154  // because it isn't stretch, determine its width and remove that from lengthToStrech
3155  int sectionSize = 0;
3156  if (resizeMode == QHeaderView::Interactive || resizeMode == QHeaderView::Fixed) {
3157  sectionSize = headerSectionSize(i);
3158  } else { // resizeMode == QHeaderView::ResizeToContents
3159  int logicalIndex = q->logicalIndex(i);
3160  sectionSize = qMax(viewSectionSizeHint(logicalIndex),
3161  q->sectionSizeHint(logicalIndex));
3162  }
3163  section_sizes.append(sectionSize);
3164  lengthToStrech -= sectionSize;
3165  }
3166 
3167  // calculate the new length for all of the stretched sections
3168  int stretchSectionLength = -1;
3169  int pixelReminder = 0;
3170  if (numberOfStretchedSections > 0 && lengthToStrech > 0) { // we have room to stretch in
3171  int hintLengthForEveryStretchedSection = lengthToStrech / numberOfStretchedSections;
3172  stretchSectionLength = qMax(hintLengthForEveryStretchedSection, q->minimumSectionSize());
3173  pixelReminder = lengthToStrech % numberOfStretchedSections;
3174  }
3175 
3176  int spanStartSection = 0;
3177  int previousSectionLength = 0;
3178 
3179  QHeaderView::ResizeMode previousSectionResizeMode = QHeaderView::Interactive;
3180 
3181  // resize each section along the total length
3182  for (int i = 0; i < sectionCount; ++i) {
3183  int oldSectionLength = headerSectionSize(i);
3184  int newSectionLength = -1;
3185  QHeaderView::ResizeMode newSectionResizeMode = headerSectionResizeMode(i);
3186 
3187  if (isVisualIndexHidden(i)) {
3188  newSectionLength = 0;
3189  } else {
3190  QHeaderView::ResizeMode resizeMode;
3191  if (useGlobalMode)
3192  resizeMode = globalMode;
3193  else
3194  resizeMode = (i == stretchSection
3196  : newSectionResizeMode);
3197  if (resizeMode == QHeaderView::Stretch && stretchSectionLength != -1) {
3198  if (i == lastVisibleSection)
3199  newSectionLength = qMax(stretchSectionLength, lastSectionSize);
3200  else
3201  newSectionLength = stretchSectionLength;
3202  if (pixelReminder > 0) {
3203  newSectionLength += 1;
3204  --pixelReminder;
3205  }
3206  section_sizes.removeFirst();
3207  } else {
3208  newSectionLength = section_sizes.front();
3209  section_sizes.removeFirst();
3210  }
3211  }
3212 
3213  //Q_ASSERT(newSectionLength > 0);
3214  if ((previousSectionResizeMode != newSectionResizeMode
3215  || previousSectionLength != newSectionLength) && i > 0) {
3216  int spanLength = (i - spanStartSection) * previousSectionLength;
3217  createSectionSpan(spanStartSection, i - 1, spanLength, previousSectionResizeMode);
3218  //Q_ASSERT(headerLength() == length);
3219  spanStartSection = i;
3220  }
3221 
3222  if (newSectionLength != oldSectionLength)
3223  emit q->sectionResized(logicalIndex(i), oldSectionLength, newSectionLength);
3224 
3225  previousSectionLength = newSectionLength;
3226  previousSectionResizeMode = newSectionResizeMode;
3227  }
3228 
3229  createSectionSpan(spanStartSection, sectionCount - 1,
3230  (sectionCount - spanStartSection) * previousSectionLength,
3231  previousSectionResizeMode);
3232  //Q_ASSERT(headerLength() == length);
3233  resizeRecursionBlock = false;
3234  viewport->update();
3235 }
int viewSectionSizeHint(int logical) const
int headerSectionSize(int visual) const
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
QHeaderView::ResizeMode headerSectionResizeMode(int visual) const
ResizeMode
The resize mode specifies the behavior of the header sections.
Definition: qheaderview.h:72
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
#define Q_Q(Class)
Definition: qglobal.h:2483
int lastVisibleVisualIndex() const
Returns the last visible (ie.
void update()
Updates the widget unless updates are disabled or the widget is hidden.
Definition: qwidget.cpp:10883
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
T & front()
This function is provided for STL compatibility.
Definition: qlist.h:298
QBasicTimer delayedResize
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
#define emit
Definition: qobjectdefs.h:76
void removeFirst()
Removes the first item in the list.
Definition: qlist.h:286
bool isVisualIndexHidden(int visual) const
void stop()
Stops the timer.
void createSectionSpan(int start, int end, int size, QHeaderView::ResizeMode mode)
void invalidateCachedSizeHint() const
int logicalIndex(int visualIndex) const
Qt::Orientation orientation
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ resizeSectionSpan()

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

Definition at line 3574 of file qheaderview.cpp.

3575 {
3576  Q_Q(QHeaderView);
3578  createSectionSpan(visualIndex, visualIndex, newSize, mode);
3579  emit q->sectionResized(logicalIndex(visualIndex), oldSize, newSize);
3580 }
QHeaderView::ResizeMode headerSectionResizeMode(int visual) const
ResizeMode
The resize mode specifies the behavior of the header sections.
Definition: qheaderview.h:72
#define Q_Q(Class)
Definition: qglobal.h:2483
int visualIndex(int logicalIndex) const
#define emit
Definition: qobjectdefs.h:76
void createSectionSpan(int start, int end, int size, QHeaderView::ResizeMode mode)
int logicalIndex(int visualIndex) const
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ reverse()

bool QHeaderViewPrivate::reverse ( ) const
inline

Definition at line 144 of file qheaderview_p.h.

144  {
145  return orientation == Qt::Horizontal && q_func()->isRightToLeft();
146  }
Qt::Orientation orientation

◆ rowIntersectsSelection()

bool QHeaderViewPrivate::rowIntersectsSelection ( int  row) const
inline

Definition at line 116 of file qheaderview_p.h.

Referenced by sectionIntersectsSelection().

116  {
117  return (selectionModel ? selectionModel->rowIntersectsSelection(row, root) : false);
118  }
QPointer< QItemSelectionModel > selectionModel
bool rowIntersectsSelection(int row, const QModelIndex &parent) const
Returns true if there are any items selected in the row with the given parent.
QPersistentModelIndex root

◆ saveCascadingSectionSize()

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

Definition at line 201 of file qheaderview_p.h.

201  {
202  if (!cascadingSectionSize.contains(visual)) {
203  cascadingSectionSize.insert(visual, size);
206  }
207  }
QHash< int, int > cascadingSectionSize
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
Definition: qhash.h:872
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition: qhash.h:753

◆ sectionHandleAt()

int QHeaderViewPrivate::sectionHandleAt ( int  position)

Definition at line 2961 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

2962 {
2963  Q_Q(QHeaderView);
2964  int visual = q->visualIndexAt(position);
2965  if (visual == -1)
2966  return -1;
2967  int log = logicalIndex(visual);
2968  int pos = q->sectionViewportPosition(log);
2969  int grip = q->style()->pixelMetric(QStyle::PM_HeaderGripMargin, 0, q);
2970 
2971  bool atLeft = position < pos + grip;
2972  bool atRight = (position > pos + q->sectionSize(log) - grip);
2973  if (reverse())
2974  qSwap(atLeft, atRight);
2975 
2976  if (atLeft) {
2977  //grip at the beginning of the section
2978  while(visual > -1) {
2979  int logical = q->logicalIndex(--visual);
2980  if (!q->isSectionHidden(logical))
2981  return logical;
2982  }
2983  } else if (atRight) {
2984  //grip at the end of the section
2985  return log;
2986  }
2987  return -1;
2988 }
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
#define Q_Q(Class)
Definition: qglobal.h:2483
bool reverse() const
void qSwap(T &value1, T &value2)
Definition: qglobal.h:2181
int logicalIndex(int visualIndex) const
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ sectionIntersectsSelection()

bool QHeaderViewPrivate::sectionIntersectsSelection ( int  logical) const
inline

Definition at line 124 of file qheaderview_p.h.

124  {
126  }
bool rowIntersectsSelection(int row) const
bool columnIntersectsSelection(int column) const
Qt::Orientation orientation

◆ sectionIsCascadable()

bool QHeaderViewPrivate::sectionIsCascadable ( int  visual) const
inline

Definition at line 209 of file qheaderview_p.h.

209  {
211  }
QHeaderView::ResizeMode headerSectionResizeMode(int visual) const

◆ sectionSpanIndex()

int QHeaderViewPrivate::sectionSpanIndex ( int  visual) const
inline

Definition at line 331 of file qheaderview_p.h.

331  {
332  int section_start = 0;
333  for (int i = 0; i < sectionSpans.count(); ++i) {
334  int section_end = section_start + sectionSpans.at(i).count - 1;
335  if (visual >= section_start && visual <= section_end)
336  return i;
337  section_start = section_end + 1;
338  }
339  return -1;
340  }
QVector< SectionSpan > sectionSpans

◆ setDefaultSectionSize()

void QHeaderViewPrivate::setDefaultSectionSize ( int  size)

Definition at line 3551 of file qheaderview.cpp.

3552 {
3553  Q_Q(QHeaderView);
3554  defaultSectionSize = size;
3555  int currentVisualIndex = 0;
3556  for (int i = 0; i < sectionSpans.count(); ++i) {
3558  if (span.size > 0) {
3559  //we resize it if it is not hidden (ie size > 0)
3560  const int newSize = span.count * size;
3561  if (newSize != span.size) {
3562  length += newSize - span.size; //the whole length is changed
3563  const int oldSectionSize = span.sectionSize();
3564  span.size = span.count * size;
3565  for (int i = currentVisualIndex; i < currentVisualIndex + span.count; ++i) {
3566  emit q->sectionResized(logicalIndex(i), oldSectionSize, size);
3567  }
3568  }
3569  }
3570  currentVisualIndex += span.count;
3571  }
3572 }
#define Q_Q(Class)
Definition: qglobal.h:2483
#define emit
Definition: qobjectdefs.h:76
QVector< SectionSpan > sectionSpans
int logicalIndex(int visualIndex) const
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ setDefaultValues()

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

Definition at line 156 of file qheaderview_p.h.

156  {
157  orientation = o;
158  defaultSectionSize = (o == Qt::Horizontal ? 100
159  : qMax(q_func()->minimumSectionSize(), 30));
161  ? Qt::Alignment(Qt::AlignCenter)
163  }
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
Definition: qnamespace.h:54
Qt::Alignment defaultAlignment
Qt::Orientation orientation

◆ setGlobalHeaderResizeMode()

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

Definition at line 3650 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3651 {
3652  globalResizeMode = mode;
3653  for (int i = 0; i < sectionSpans.count(); ++i)
3654  sectionSpans[i].resizeMode = mode;
3655 }
QHeaderView::ResizeMode globalResizeMode
QVector< SectionSpan > sectionSpans

◆ setHeaderSectionResizeMode()

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

Definition at line 3636 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3637 {
3638  int size = headerSectionSize(visual);
3639  createSectionSpan(visual, visual, size, mode);
3640 }
int headerSectionSize(int visual) const
void createSectionSpan(int start, int end, int size, QHeaderView::ResizeMode mode)

◆ setupSectionIndicator()

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

Definition at line 2990 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

2991 {
2992  Q_Q(QHeaderView);
2993  if (!sectionIndicator) {
2995  }
2996 
2997  int w, h;
2998  int p = q->sectionViewportPosition(section);
2999  if (orientation == Qt::Horizontal) {
3000  w = q->sectionSize(section);
3001  h = viewport->height();
3002  } else {
3003  w = viewport->width();
3004  h = q->sectionSize(section);
3005  }
3006  sectionIndicator->resize(w, h);
3007 
3008  QPixmap pm(w, h);
3009  pm.fill(QColor(0, 0, 0, 45));
3010  QRect rect(0, 0, w, h);
3011 
3012  QPainter painter(&pm);
3013  painter.setOpacity(0.75);
3014  q->paintSection(&painter, rect, section);
3015  painter.end();
3016 
3019 }
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition: qcolor.h:67
QLabel * sectionIndicator
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
int width
the width of the widget excluding any window frame
Definition: qwidget.h:166
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
void setPixmap(const QPixmap &)
Definition: qlabel.cpp:439
#define Q_Q(Class)
Definition: qglobal.h:2483
int height
the height of the widget excluding any window frame
Definition: qwidget.h:167
void resize(int w, int h)
This corresponds to resize(QSize(w, h)).
Definition: qwidget.h:1014
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QLabel widget provides a text or image display.
Definition: qlabel.h:55
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
Qt::Orientation orientation
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ setVisualIndexHidden()

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

Definition at line 169 of file qheaderview_p.h.

169  {
170  if (!sectionHidden.isEmpty()) sectionHidden.setBit(visual, hidden);
171  }
void setBit(int i)
Sets the bit at index position i to 1.
Definition: qbitarray.h:128
QBitArray sectionHidden
bool isEmpty() const
Returns true if this bit array has size 0; otherwise returns false.
Definition: qbitarray.h:78

◆ updateHiddenSections()

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

Definition at line 1860 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

1861 {
1862  Q_Q(QHeaderView);
1863  const int changeCount = logicalLast - logicalFirst + 1;
1864 
1865  // remove sections from hiddenSectionSize
1866  QHash<int, int> newHiddenSectionSize; // from logical index to section size
1867  for (int i = 0; i < logicalFirst; ++i)
1868  if (q->isSectionHidden(i))
1869  newHiddenSectionSize[i] = hiddenSectionSize[i];
1870  for (int j = logicalLast + 1; j < sectionCount; ++j)
1871  if (q->isSectionHidden(j))
1872  newHiddenSectionSize[j - changeCount] = hiddenSectionSize[j];
1873  hiddenSectionSize = newHiddenSectionSize;
1874 
1875  // remove sections from sectionsHidden
1876  if (!sectionHidden.isEmpty()) {
1877  const int newsize = qMin(sectionCount - changeCount, sectionHidden.size());
1878  QBitArray newSectionHidden(newsize);
1879  for (int j = 0, k = 0; j < sectionHidden.size(); ++j) {
1880  const int logical = logicalIndex(j);
1881  if (logical < logicalFirst || logical > logicalLast) {
1882  newSectionHidden[k++] = sectionHidden[j];
1883  }
1884  }
1885  sectionHidden = newSectionHidden;
1886  }
1887 }
QHash< int, int > hiddenSectionSize
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
QBitArray sectionHidden
#define Q_Q(Class)
Definition: qglobal.h:2483
The QBitArray class provides an array of bits.
Definition: qbitarray.h:54
int size() const
Returns the number of bits stored in the bit array.
Definition: qbitarray.h:73
int logicalIndex(int visualIndex) const
bool isEmpty() const
Returns true if this bit array has size 0; otherwise returns false.
Definition: qbitarray.h:78
The QHeaderView class provides a header row or header column for item views.
Definition: qheaderview.h:58

◆ updateSectionIndicator()

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

Definition at line 3021 of file qheaderview.cpp.

Referenced by QHeaderViewPrivate().

3022 {
3023  if (!sectionIndicator)
3024  return;
3025 
3026  if (section == -1 || target == -1) {
3028  return;
3029  }
3030 
3031  if (orientation == Qt::Horizontal)
3033  else
3035 
3037 }
QLabel * sectionIndicator
virtual QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect, const QModelIndex &idx) const
void show()
Shows the widget and its child widgets.
void hide()
Hides the widget.
Definition: qwidget.h:501
Qt::Orientation orientation
void move(int x, int y)
This corresponds to move(QPoint(x, y)).
Definition: qwidget.h:1011

◆ viewSectionSizeHint()

int QHeaderViewPrivate::viewSectionSizeHint ( int  logical) const

Definition at line 3657 of file qheaderview.cpp.

Referenced by sectionSpanIndex().

3658 {
3659  if (QAbstractItemView *view = qobject_cast<QAbstractItemView*>(parent)) {
3660  return (orientation == Qt::Horizontal
3661  ? view->sizeHintForColumn(logical)
3662  : view->sizeHintForRow(logical));
3663  }
3664  return 0;
3665 }
The QAbstractItemView class provides the basic functionality for item view classes.
QObject * parent
Definition: qobject.h:92
Qt::Orientation orientation

◆ visualIndex()

int QHeaderViewPrivate::visualIndex ( int  logicalIndex) const
inline

Definition at line 152 of file qheaderview_p.h.

Referenced by logicalIndex(), and sectionSpanIndex().

152  {
154  }
QVector< int > visualIndices
const T & at(int i) const
Returns the item at index position i in the vector.
Definition: qvector.h:350
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
Definition: qvector.h:139
int logicalIndex(int visualIndex) const

◆ write()

void QHeaderViewPrivate::write ( QDataStream out) const

Definition at line 3686 of file qheaderview.cpp.

3687 {
3688  out << int(orientation);
3689  out << int(sortIndicatorOrder);
3690  out << sortIndicatorSection;
3691  out << sortIndicatorShown;
3692 
3693  out << visualIndices;
3694  out << logicalIndices;
3695 
3696  out << sectionHidden;
3697  out << hiddenSectionSize;
3698 
3699  out << length;
3700  out << sectionCount;
3701  out << movableSections;
3702  out << clickableSections;
3703  out << highlightSelected;
3704  out << stretchLastSection;
3705  out << cascadingResizing;
3706  out << stretchSections;
3707  out << contentsSections;
3708  out << defaultSectionSize;
3709  out << minimumSectionSize;
3710 
3711  out << int(defaultAlignment);
3712  out << int(globalResizeMode);
3713 
3714  out << sectionSpans;
3715 }
QHash< int, int > hiddenSectionSize
QBitArray sectionHidden
QVector< int > visualIndices
QHeaderView::ResizeMode globalResizeMode
QVector< int > logicalIndices
QVector< SectionSpan > sectionSpans
Qt::Alignment defaultAlignment
Qt::SortOrder sortIndicatorOrder
Qt::Orientation orientation

Properties

◆ cachedSizeHint

QSize QHeaderViewPrivate::cachedSizeHint
mutable

Definition at line 252 of file qheaderview_p.h.

Referenced by invalidateCachedSizeHint().

◆ cascadingResizing

bool QHeaderViewPrivate::cascadingResizing

Definition at line 272 of file qheaderview_p.h.

◆ cascadingSectionSize

QHash<int, int> QHeaderViewPrivate::cascadingSectionSize
mutable

Definition at line 251 of file qheaderview_p.h.

Referenced by clearCascadingSections(), and saveCascadingSectionSize().

◆ clickableSections

bool QHeaderViewPrivate::clickableSections

Definition at line 269 of file qheaderview_p.h.

◆ contentsSections

int QHeaderViewPrivate::contentsSections

Definition at line 275 of file qheaderview_p.h.

Referenced by hasAutoResizeSections().

◆ defaultAlignment

Qt::Alignment QHeaderViewPrivate::defaultAlignment

Definition at line 280 of file qheaderview_p.h.

Referenced by setDefaultValues().

◆ defaultSectionSize

int QHeaderViewPrivate::defaultSectionSize

Definition at line 276 of file qheaderview_p.h.

Referenced by setDefaultValues().

◆ delayedResize

QBasicTimer QHeaderViewPrivate::delayedResize
mutable

Definition at line 253 of file qheaderview_p.h.

Referenced by doDelayedResizeSections(), and executePostedResize().

◆ firstCascadingSection

int QHeaderViewPrivate::firstCascadingSection

Definition at line 255 of file qheaderview_p.h.

Referenced by clearCascadingSections(), and saveCascadingSectionSize().

◆ firstPos

int QHeaderViewPrivate::firstPos

Definition at line 259 of file qheaderview_p.h.

◆ globalResizeMode

QHeaderView::ResizeMode QHeaderViewPrivate::globalResizeMode

Definition at line 282 of file qheaderview_p.h.

◆ hiddenSectionSize

QHash<int, int> QHeaderViewPrivate::hiddenSectionSize
mutable

Definition at line 250 of file qheaderview_p.h.

◆ highlightSelected

bool QHeaderViewPrivate::highlightSelected

Definition at line 270 of file qheaderview_p.h.

◆ hover

int QHeaderViewPrivate::hover

Definition at line 264 of file qheaderview_p.h.

◆ lastCascadingSection

int QHeaderViewPrivate::lastCascadingSection

Definition at line 256 of file qheaderview_p.h.

Referenced by clearCascadingSections(), and saveCascadingSectionSize().

◆ lastPos

int QHeaderViewPrivate::lastPos

Definition at line 258 of file qheaderview_p.h.

◆ lastSectionSize

int QHeaderViewPrivate::lastSectionSize

Definition at line 278 of file qheaderview_p.h.

◆ length

int QHeaderViewPrivate::length

Definition at line 266 of file qheaderview_p.h.

◆ logicalIndices

QVector<int> QHeaderViewPrivate::logicalIndices
mutable

Definition at line 247 of file qheaderview_p.h.

Referenced by initializeIndexMapping(), and logicalIndex().

◆ minimumSectionSize

int QHeaderViewPrivate::minimumSectionSize

Definition at line 277 of file qheaderview_p.h.

Referenced by setDefaultValues().

◆ movableSections

bool QHeaderViewPrivate::movableSections

Definition at line 268 of file qheaderview_p.h.

◆ offset

int QHeaderViewPrivate::offset

Definition at line 240 of file qheaderview_p.h.

◆ orientation

Qt::Orientation QHeaderViewPrivate::orientation

◆ originalSize

int QHeaderViewPrivate::originalSize

Definition at line 260 of file qheaderview_p.h.

◆ persistentHiddenSections

QList<QPersistentModelIndex> QHeaderViewPrivate::persistentHiddenSections

Definition at line 283 of file qheaderview_p.h.

◆ pressed

int QHeaderViewPrivate::pressed

Definition at line 263 of file qheaderview_p.h.

◆ resizeRecursionBlock

bool QHeaderViewPrivate::resizeRecursionBlock

Definition at line 273 of file qheaderview_p.h.

◆ section

int QHeaderViewPrivate::section

Definition at line 261 of file qheaderview_p.h.

Referenced by QHeaderViewPrivate().

◆ sectionCount

int QHeaderViewPrivate::sectionCount

◆ sectionHidden

QBitArray QHeaderViewPrivate::sectionHidden
mutable

Definition at line 249 of file qheaderview_p.h.

Referenced by isVisualIndexHidden(), and setVisualIndexHidden().

◆ sectionIndicator

QLabel* QHeaderViewPrivate::sectionIndicator

Definition at line 281 of file qheaderview_p.h.

◆ sectionIndicatorOffset

int QHeaderViewPrivate::sectionIndicatorOffset

Definition at line 279 of file qheaderview_p.h.

◆ sectionSelected

QBitArray QHeaderViewPrivate::sectionSelected
mutable

Definition at line 248 of file qheaderview_p.h.

Referenced by prepareSectionSelected().

◆ sectionSpans

QVector<SectionSpan> QHeaderViewPrivate::sectionSpans

Definition at line 303 of file qheaderview_p.h.

◆ sortIndicatorOrder

Qt::SortOrder QHeaderViewPrivate::sortIndicatorOrder

Definition at line 242 of file qheaderview_p.h.

◆ sortIndicatorSection

int QHeaderViewPrivate::sortIndicatorSection

Definition at line 243 of file qheaderview_p.h.

◆ sortIndicatorShown

bool QHeaderViewPrivate::sortIndicatorShown

Definition at line 244 of file qheaderview_p.h.

◆ state

enum QHeaderViewPrivate::State QHeaderViewPrivate::state

Referenced by executePostedResize().

◆ stretchLastSection

bool QHeaderViewPrivate::stretchLastSection

Definition at line 271 of file qheaderview_p.h.

Referenced by hasAutoResizeSections().

◆ stretchSections

int QHeaderViewPrivate::stretchSections

Definition at line 274 of file qheaderview_p.h.

Referenced by hasAutoResizeSections().

◆ target

int QHeaderViewPrivate::target

Definition at line 262 of file qheaderview_p.h.

◆ visualIndices

QVector<int> QHeaderViewPrivate::visualIndices
mutable

Definition at line 246 of file qheaderview_p.h.

Referenced by initializeIndexMapping(), and visualIndex().


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