Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QListViewPrivate Class Reference

#include <qlistview_p.h>

Inheritance diagram for QListViewPrivate:
Collaboration diagram for QListViewPrivate:

Public Types

enum  ModeProperties {
  Wrap = 1 , Spacing = 2 , GridSize = 4 , Flow = 8 ,
  Movement = 16 , ResizeMode = 32 , SelectionRectVisible = 64
}

Public Member Functions

 QListViewPrivate ()
 ~QListViewPrivate ()
void clear ()
void prepareItemsLayout ()
bool doItemsLayout (int num)
QList< QModelIndexintersectingSet (const QRect &area, bool doLayout=true) const
void resetBatchStartRow ()
int batchStartRow () const
QSize contentsSize () const
void setContentsSize (int w, int h)
int flipX (int x) const
QPoint flipX (const QPoint &p) const
QRect flipX (const QRect &r) const
QRect viewItemRect (const QListViewItem &item) const
QListViewItem indexToListViewItem (const QModelIndex &index) const
QModelIndex listViewItemToIndex (const QListViewItem &item) const
bool hasRectForIndex (const QModelIndex &index) const
QRect rectForIndex (const QModelIndex &index) const
QRect cellRectForIndex (const QModelIndex &index)
void viewUpdateGeometries ()
QRect mapToViewport (const QRect &rect, bool extend=true) const
QModelIndex closestIndex (const QRect &target, const QList< QModelIndex > &candidates) const
QSize itemSize (const QStyleOptionViewItem &option, const QModelIndex &index) const
bool selectionAllowed (const QModelIndex &index) const override
int horizontalScrollToValue (const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
int verticalScrollToValue (const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
QItemSelection selection (const QRect &rect) const
void selectAll (QItemSelectionModel::SelectionFlags command) override
void setGridSize (const QSize &size)
QSize gridSize () const
void setWrapping (bool b)
bool isWrapping () const
void setSpacing (int s)
int spacing () const
void setSelectionRectVisible (bool visible)
bool isSelectionRectVisible () const
QModelIndex modelIndex (int row) const
bool isHidden (int row) const
QList< int > hiddenRowIds () const
bool isHiddenOrDisabled (int row) const
void removeCurrentAndDisabled (QList< QModelIndex > *indexes, const QModelIndex &current) const
void scrollElasticBandBy (int dx, int dy)
QItemViewPaintPairs draggablePaintPairs (const QModelIndexList &indexes, QRect *r) const override
 \reimp
void emitIndexesMoved (const QModelIndexList &indexes)
Public Member Functions inherited from QAbstractItemViewPrivate
 QAbstractItemViewPrivate ()
virtual ~QAbstractItemViewPrivate ()
void init ()
virtual void rowsRemoved (const QModelIndex &parent, int start, int end)
virtual void rowsInserted (const QModelIndex &parent, int start, int end)
virtual void columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
virtual void columnsRemoved (const QModelIndex &parent, int start, int end)
virtual void columnsInserted (const QModelIndex &parent, int start, int end)
virtual void modelDestroyed ()
virtual void layoutChanged ()
virtual void rowsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
virtual void columnsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
virtual QRect intersectedRect (const QRect rect, const QModelIndex &topLeft, const QModelIndex &bottomRight) const
void headerDataChanged ()
void scrollerStateChanged ()
void delegateSizeHintChanged (const QModelIndex &index)
void fetchMore ()
bool shouldEdit (QAbstractItemView::EditTrigger trigger, const QModelIndex &index) const
bool shouldForwardEvent (QAbstractItemView::EditTrigger trigger, const QEvent *event) const
bool shouldAutoScroll (const QPoint &pos) const
void doDelayedItemsLayout (int delay=0)
void interruptDelayedItemsLayout () const
void updateGeometry ()
void startAutoScroll ()
void stopAutoScroll ()
bool droppingOnItself (QDropEvent *event, const QModelIndex &index)
QWidgeteditor (const QModelIndex &index, const QStyleOptionViewItem &options)
bool sendDelegateEvent (const QModelIndex &index, QEvent *event) const
bool openEditor (const QModelIndex &index, QEvent *event)
void updateEditorData (const QModelIndex &topLeft, const QModelIndex &bottomRight)
void selectAllInEditor (QWidget *w)
QItemSelectionModel::SelectionFlags multiSelectionCommand (const QModelIndex &index, const QEvent *event) const
QItemSelectionModel::SelectionFlags extendedSelectionCommand (const QModelIndex &index, const QEvent *event) const
QItemSelectionModel::SelectionFlags contiguousSelectionCommand (const QModelIndex &index, const QEvent *event) const
void setHoverIndex (const QPersistentModelIndex &index)
void checkMouseMove (const QPersistentModelIndex &index)
void checkMouseMove (const QPoint &pos)
QItemSelectionModel::SelectionFlags selectionBehaviorFlags () 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
QPoint contentsOffset () const override
int delegateRefCount (const QAbstractItemDelegate *delegate) const
bool isPersistent (const QModelIndex &index) const
void doDelayedReset ()
virtual QRect visualRect (const QModelIndex &index) const

Public Attributes

QCommonListViewBasecommonListView
bool wrap
int space
QSize grid
QListView::Flow flow
QListView::Movement movement
QListView::ResizeMode resizeMode
QListView::LayoutMode layoutMode
QListView::ViewMode viewMode
uint modeProperties: 8
QRect layoutBounds
QBasicTimer batchLayoutTimer
QSet< QPersistentModelIndexhiddenRows
int column
bool uniformItemSizes
QSize cachedItemSize
int batchSize
QRect elasticBand
bool showElasticBand
Qt::Alignment itemAlignment
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
QPoint draggedPositionOffset
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
int updateThreshold
std::array< QMetaObject::Connection, 14 > modelConnections
std::array< QMetaObject::Connection, 4 > scrollbarConnections

Detailed Description

Definition at line 265 of file qlistview_p.h.

Member Enumeration Documentation

◆ ModeProperties

Enumerator
Wrap 
Spacing 
GridSize 
Flow 
Movement 
ResizeMode 
SelectionRectVisible 

Definition at line 399 of file qlistview_p.h.

Constructor & Destructor Documentation

◆ QListViewPrivate()

QListViewPrivate::QListViewPrivate ( )

Definition at line 1758 of file qlistview.cpp.

◆ ~QListViewPrivate()

QListViewPrivate::~QListViewPrivate ( )

Definition at line 1777 of file qlistview.cpp.

Member Function Documentation

◆ batchStartRow()

int QListViewPrivate::batchStartRow ( ) const
inline

Definition at line 285 of file qlistview_p.h.

◆ cellRectForIndex()

QRect QListViewPrivate::cellRectForIndex ( const QModelIndex & index)
inline

Definition at line 315 of file qlistview_p.h.

◆ clear()

void QListViewPrivate::clear ( )

Definition at line 1782 of file qlistview.cpp.

◆ closestIndex()

QModelIndex QListViewPrivate::closestIndex ( const QRect & target,
const QList< QModelIndex > & candidates ) const

Definition at line 1872 of file qlistview.cpp.

◆ contentsSize()

QSize QListViewPrivate::contentsSize ( ) const
inline

Definition at line 286 of file qlistview_p.h.

◆ doItemsLayout()

bool QListViewPrivate::doItemsLayout ( int delta)

Definition at line 1824 of file qlistview.cpp.

◆ draggablePaintPairs()

QItemViewPaintPairs QListViewPrivate::draggablePaintPairs ( const QModelIndexList & indexes,
QRect * r ) const
overridevirtual

\reimp

We have a QListView way of knowing what elements are on the viewport through the intersectingSet function

Reimplemented from QAbstractItemViewPrivate.

Definition at line 616 of file qlistview.cpp.

◆ emitIndexesMoved()

void QListViewPrivate::emitIndexesMoved ( const QModelIndexList & indexes)
inline

Definition at line 380 of file qlistview_p.h.

◆ flipX() [1/3]

QPoint QListViewPrivate::flipX ( const QPoint & p) const
inline

Definition at line 291 of file qlistview_p.h.

◆ flipX() [2/3]

QRect QListViewPrivate::flipX ( const QRect & r) const
inline

Definition at line 293 of file qlistview_p.h.

◆ flipX() [3/3]

int QListViewPrivate::flipX ( int x) const
inline

Definition at line 289 of file qlistview_p.h.

◆ gridSize()

QSize QListViewPrivate::gridSize ( ) const
inline

Definition at line 350 of file qlistview_p.h.

◆ hasRectForIndex()

bool QListViewPrivate::hasRectForIndex ( const QModelIndex & index) const
inline

Definition at line 302 of file qlistview_p.h.

◆ hiddenRowIds()

QList< int > QListViewPrivate::hiddenRowIds ( ) const
inline

Definition at line 364 of file qlistview_p.h.

◆ horizontalScrollToValue()

int QListViewPrivate::horizontalScrollToValue ( const QModelIndex & index,
const QRect & rect,
QListView::ScrollHint hint ) const

Definition at line 551 of file qlistview.cpp.

◆ indexToListViewItem()

QListViewItem QListViewPrivate::indexToListViewItem ( const QModelIndex & index) const

Definition at line 1852 of file qlistview.cpp.

◆ intersectingSet()

QList< QModelIndex > QListViewPrivate::intersectingSet ( const QRect & area,
bool doLayout = true ) const
inline

Definition at line 277 of file qlistview_p.h.

◆ isHidden()

bool QListViewPrivate::isHidden ( int row) const
inline

Definition at line 359 of file qlistview_p.h.

◆ isHiddenOrDisabled()

bool QListViewPrivate::isHiddenOrDisabled ( int row) const
inline

Definition at line 372 of file qlistview_p.h.

◆ isSelectionRectVisible()

bool QListViewPrivate::isSelectionRectVisible ( ) const
inline

Definition at line 356 of file qlistview_p.h.

◆ isWrapping()

bool QListViewPrivate::isWrapping ( ) const
inline

Definition at line 352 of file qlistview_p.h.

◆ itemSize()

QSize QListViewPrivate::itemSize ( const QStyleOptionViewItem & option,
const QModelIndex & index ) const

Definition at line 1908 of file qlistview.cpp.

◆ listViewItemToIndex()

QModelIndex QListViewPrivate::listViewItemToIndex ( const QListViewItem & item) const
inline

Definition at line 299 of file qlistview_p.h.

◆ mapToViewport()

QRect QListViewPrivate::mapToViewport ( const QRect & rect,
bool extend = true ) const

Definition at line 1860 of file qlistview.cpp.

◆ modelIndex()

QModelIndex QListViewPrivate::modelIndex ( int row) const
inline

Definition at line 358 of file qlistview_p.h.

◆ prepareItemsLayout()

void QListViewPrivate::prepareItemsLayout ( )

Definition at line 1789 of file qlistview.cpp.

◆ rectForIndex()

QRect QListViewPrivate::rectForIndex ( const QModelIndex & index) const
inline

Definition at line 307 of file qlistview_p.h.

◆ removeCurrentAndDisabled()

void QListViewPrivate::removeCurrentAndDisabled ( QList< QModelIndex > * indexes,
const QModelIndex & current ) const

Definition at line 1971 of file qlistview.cpp.

◆ resetBatchStartRow()

void QListViewPrivate::resetBatchStartRow ( )
inline

Definition at line 284 of file qlistview_p.h.

◆ scrollElasticBandBy()

void QListViewPrivate::scrollElasticBandBy ( int dx,
int dy )

Definition at line 3375 of file qlistview.cpp.

◆ selectAll()

void QListViewPrivate::selectAll ( QItemSelectionModel::SelectionFlags command)
overridevirtual

Reimplemented from QAbstractItemViewPrivate.

Definition at line 575 of file qlistview.cpp.

◆ selection()

QItemSelection QListViewPrivate::selection ( const QRect & rect) const

Definition at line 1924 of file qlistview.cpp.

◆ selectionAllowed()

bool QListViewPrivate::selectionAllowed ( const QModelIndex & index) const
inlineoverridevirtual

Reimplemented from QAbstractItemViewPrivate.

Definition at line 335 of file qlistview_p.h.

◆ setContentsSize()

void QListViewPrivate::setContentsSize ( int w,
int h )
inline

Definition at line 287 of file qlistview_p.h.

◆ setGridSize()

void QListViewPrivate::setGridSize ( const QSize & size)
inline

Definition at line 349 of file qlistview_p.h.

◆ setSelectionRectVisible()

void QListViewPrivate::setSelectionRectVisible ( bool visible)
inline

Definition at line 355 of file qlistview_p.h.

◆ setSpacing()

void QListViewPrivate::setSpacing ( int s)
inline

Definition at line 353 of file qlistview_p.h.

◆ setWrapping()

void QListViewPrivate::setWrapping ( bool b)
inline

Definition at line 351 of file qlistview_p.h.

◆ spacing()

int QListViewPrivate::spacing ( ) const
inline

Definition at line 354 of file qlistview_p.h.

◆ verticalScrollToValue()

int QListViewPrivate::verticalScrollToValue ( const QModelIndex & index,
const QRect & rect,
QListView::ScrollHint hint ) const

Definition at line 565 of file qlistview.cpp.

◆ viewItemRect()

QRect QListViewPrivate::viewItemRect ( const QListViewItem & item) const
inline

Definition at line 295 of file qlistview_p.h.

◆ viewUpdateGeometries()

void QListViewPrivate::viewUpdateGeometries ( )
inline

Definition at line 327 of file qlistview_p.h.

Member Data Documentation

◆ batchLayoutTimer

QBasicTimer QListViewPrivate::batchLayoutTimer

Definition at line 414 of file qlistview_p.h.

◆ batchSize

int QListViewPrivate::batchSize

Definition at line 422 of file qlistview_p.h.

◆ cachedItemSize

QSize QListViewPrivate::cachedItemSize
mutable

Definition at line 421 of file qlistview_p.h.

◆ column

int QListViewPrivate::column

◆ commonListView

QCommonListViewBase* QListViewPrivate::commonListView

Definition at line 383 of file qlistview_p.h.

◆ elasticBand

QRect QListViewPrivate::elasticBand

Definition at line 424 of file qlistview_p.h.

◆ flow

QListView::Flow QListViewPrivate::flow

Definition at line 391 of file qlistview_p.h.

◆ grid

QSize QListViewPrivate::grid

Definition at line 389 of file qlistview_p.h.

◆ hiddenRows

QSet<QPersistentModelIndex> QListViewPrivate::hiddenRows

Definition at line 417 of file qlistview_p.h.

◆ itemAlignment

Qt::Alignment QListViewPrivate::itemAlignment

Definition at line 427 of file qlistview_p.h.

◆ layoutBounds

QRect QListViewPrivate::layoutBounds

Definition at line 411 of file qlistview_p.h.

◆ layoutMode

QListView::LayoutMode QListViewPrivate::layoutMode

Definition at line 394 of file qlistview_p.h.

◆ modeProperties

uint QListViewPrivate::modeProperties

Definition at line 409 of file qlistview_p.h.

◆ movement

QListView::Movement QListViewPrivate::movement

Definition at line 392 of file qlistview_p.h.

◆ resizeMode

QListView::ResizeMode QListViewPrivate::resizeMode

Definition at line 393 of file qlistview_p.h.

◆ showElasticBand

bool QListViewPrivate::showElasticBand

Definition at line 425 of file qlistview_p.h.

◆ space

int QListViewPrivate::space

Definition at line 388 of file qlistview_p.h.

◆ uniformItemSizes

bool QListViewPrivate::uniformItemSizes

Definition at line 420 of file qlistview_p.h.

◆ viewMode

QListView::ViewMode QListViewPrivate::viewMode

Definition at line 395 of file qlistview_p.h.

◆ wrap

bool QListViewPrivate::wrap

Definition at line 387 of file qlistview_p.h.


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