QtBase  v6.3.1
Public Types | Public Member Functions | Public Attributes | List of all members
QListViewPrivate Class Reference

#include <qlistview_p.h>

Inheritance diagram for QListViewPrivate:
Inheritance graph
[legend]
Collaboration diagram for QListViewPrivate:
Collaboration graph
[legend]

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
 
void emitIndexesMoved (const QModelIndexList &indexes)
 
- Public Member Functions inherited from QAbstractItemViewPrivate
 QAbstractItemViewPrivate ()
 
virtual ~QAbstractItemViewPrivate ()
 
void init ()
 
virtual void _q_rowsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_rowsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsRemoved (const QModelIndex &parent, int start, int end)
 
virtual void _q_columnsInserted (const QModelIndex &parent, int start, int end)
 
virtual void _q_modelDestroyed ()
 
virtual void _q_layoutChanged ()
 
virtual void _q_rowsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual void _q_columnsMoved (const QModelIndex &source, int sourceStart, int sourceEnd, const QModelIndex &destination, int destinationStart)
 
virtual QRect intersectedRect (const QRect rect, const QModelIndex &topLeft, const QModelIndex &bottomRight) const
 
void _q_headerDataChanged ()
 
void _q_scrollerStateChanged ()
 
void 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
 
bool isIndexDropEnabled (const QModelIndex &index) const
 
bool isIndexDragEnabled (const QModelIndex &index) const
 
QPoint contentsOffset () const override
 
int delegateRefCount (const QAbstractItemDelegate *delegate) const
 
bool isPersistent (const QModelIndex &index) const
 
QModelIndexList selectedDraggableIndexes () const
 
void doDelayedReset ()
 

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
 
bool pressedAlreadySelected
 
bool releaseFromDoubleClick
 
bool viewportEnteredNeeded
 
QAbstractItemView::State state
 
QAbstractItemView::State stateBeforeAnimation
 
QAbstractItemView::EditTriggers editTriggers
 
QAbstractItemView::EditTrigger lastTrigger
 
QPersistentModelIndex root
 
QPersistentModelIndex hover
 
bool tabKeyNavigation
 
QString keyboardInput
 
QElapsedTimer keyboardInputTime
 
bool autoScroll
 
QBasicTimer autoScrollTimer
 
int autoScrollMargin
 
int autoScrollCount
 
bool shouldScrollToCurrentOnShow
 
bool shouldClearStatusTip
 
bool alternatingColors
 
QSize iconSize
 
Qt::TextElideMode textElideMode
 
QRegion updateRegion
 
QPoint scrollDelayOffset
 
QBasicTimer updateTimer
 
QBasicTimer delayedEditing
 
QBasicTimer delayedAutoScroll
 
QBasicTimer delayedReset
 
QAbstractItemView::ScrollMode verticalScrollMode
 
QAbstractItemView::ScrollMode horizontalScrollMode
 
QItemSelection oldSelection
 
QModelIndex oldCurrent
 
bool currentIndexSet
 
bool wrapItemText
 
bool delayedPendingLayout
 
bool moveCursorUpdatedView
 
bool verticalScrollModeSet
 
bool horizontalScrollModeSet
 

Detailed Description

Definition at line 299 of file qlistview_p.h.

Member Enumeration Documentation

◆ ModeProperties

Enumerator
Wrap 
Spacing 
GridSize 
Flow 
Movement 
ResizeMode 
SelectionRectVisible 

Definition at line 433 of file qlistview_p.h.

Constructor & Destructor Documentation

◆ QListViewPrivate()

QListViewPrivate::QListViewPrivate ( )

Definition at line 1780 of file qlistview.cpp.

◆ ~QListViewPrivate()

QListViewPrivate::~QListViewPrivate ( )

Definition at line 1799 of file qlistview.cpp.

Member Function Documentation

◆ batchStartRow()

int QListViewPrivate::batchStartRow ( ) const
inline

Definition at line 319 of file qlistview_p.h.

Here is the caller graph for this function:

◆ cellRectForIndex()

QRect QListViewPrivate::cellRectForIndex ( const QModelIndex index)
inline

Definition at line 349 of file qlistview_p.h.

Here is the call graph for this function:

◆ clear()

void QListViewPrivate::clear ( )

Definition at line 1804 of file qlistview.cpp.

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

◆ closestIndex()

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

Definition at line 1894 of file qlistview.cpp.

Here is the call graph for this function:

◆ contentsSize()

QSize QListViewPrivate::contentsSize ( ) const
inline

Definition at line 320 of file qlistview_p.h.

◆ doItemsLayout()

bool QListViewPrivate::doItemsLayout ( int  num)

Definition at line 1846 of file qlistview.cpp.

Here is the call graph for this function:

◆ 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 653 of file qlistview.cpp.

Here is the call graph for this function:

◆ emitIndexesMoved()

void QListViewPrivate::emitIndexesMoved ( const QModelIndexList indexes)
inline

Definition at line 414 of file qlistview_p.h.

◆ flipX() [1/3]

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

Definition at line 325 of file qlistview_p.h.

◆ flipX() [2/3]

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

Definition at line 327 of file qlistview_p.h.

◆ flipX() [3/3]

int QListViewPrivate::flipX ( int  x) const
inline

Definition at line 323 of file qlistview_p.h.

◆ gridSize()

QSize QListViewPrivate::gridSize ( ) const
inline

Definition at line 384 of file qlistview_p.h.

Here is the caller graph for this function:

◆ hasRectForIndex()

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

Definition at line 336 of file qlistview_p.h.

Here is the call graph for this function:

◆ hiddenRowIds()

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

Definition at line 398 of file qlistview_p.h.

Here is the call graph for this function:

◆ horizontalScrollToValue()

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

Definition at line 589 of file qlistview.cpp.

◆ indexToListViewItem()

QListViewItem QListViewPrivate::indexToListViewItem ( const QModelIndex index) const

Definition at line 1874 of file qlistview.cpp.

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

◆ intersectingSet()

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

Definition at line 311 of file qlistview_p.h.

Here is the caller graph for this function:

◆ isHidden()

bool QListViewPrivate::isHidden ( int  row) const
inline

Definition at line 393 of file qlistview_p.h.

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

◆ isHiddenOrDisabled()

bool QListViewPrivate::isHiddenOrDisabled ( int  row) const
inline

Definition at line 406 of file qlistview_p.h.

Here is the call graph for this function:

◆ isSelectionRectVisible()

bool QListViewPrivate::isSelectionRectVisible ( ) const
inline

Definition at line 390 of file qlistview_p.h.

◆ isWrapping()

bool QListViewPrivate::isWrapping ( ) const
inline

Definition at line 386 of file qlistview_p.h.

Here is the caller graph for this function:

◆ itemSize()

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

Definition at line 1930 of file qlistview.cpp.

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

◆ listViewItemToIndex()

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

Definition at line 333 of file qlistview_p.h.

Here is the call graph for this function:

◆ mapToViewport()

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

Definition at line 1882 of file qlistview.cpp.

Here is the call graph for this function:

◆ modelIndex()

QModelIndex QListViewPrivate::modelIndex ( int  row) const
inline

Definition at line 392 of file qlistview_p.h.

Here is the call graph for this function:

◆ prepareItemsLayout()

void QListViewPrivate::prepareItemsLayout ( )

Definition at line 1811 of file qlistview.cpp.

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

◆ rectForIndex()

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

Definition at line 341 of file qlistview_p.h.

Here is the call graph for this function:

◆ removeCurrentAndDisabled()

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

Definition at line 1993 of file qlistview.cpp.

Here is the call graph for this function:

◆ resetBatchStartRow()

void QListViewPrivate::resetBatchStartRow ( )
inline

Definition at line 318 of file qlistview_p.h.

◆ scrollElasticBandBy()

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

Definition at line 3397 of file qlistview.cpp.

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

◆ selectAll()

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

Reimplemented from QAbstractItemViewPrivate.

Definition at line 613 of file qlistview.cpp.

Here is the call graph for this function:

◆ selection()

QItemSelection QListViewPrivate::selection ( const QRect rect) const

Definition at line 1946 of file qlistview.cpp.

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

◆ selectionAllowed()

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

Reimplemented from QAbstractItemViewPrivate.

Definition at line 369 of file qlistview_p.h.

◆ setContentsSize()

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

Definition at line 321 of file qlistview_p.h.

◆ setGridSize()

void QListViewPrivate::setGridSize ( const QSize size)
inline

Definition at line 383 of file qlistview_p.h.

◆ setSelectionRectVisible()

void QListViewPrivate::setSelectionRectVisible ( bool  visible)
inline

Definition at line 389 of file qlistview_p.h.

◆ setSpacing()

void QListViewPrivate::setSpacing ( int  s)
inline

Definition at line 387 of file qlistview_p.h.

◆ setWrapping()

void QListViewPrivate::setWrapping ( bool  b)
inline

Definition at line 385 of file qlistview_p.h.

◆ spacing()

int QListViewPrivate::spacing ( ) const
inline

Definition at line 388 of file qlistview_p.h.

Here is the caller graph for this function:

◆ verticalScrollToValue()

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

Definition at line 603 of file qlistview.cpp.

◆ viewItemRect()

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

Definition at line 329 of file qlistview_p.h.

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

◆ viewUpdateGeometries()

void QListViewPrivate::viewUpdateGeometries ( )
inline

Definition at line 361 of file qlistview_p.h.

Here is the caller graph for this function:

Member Data Documentation

◆ batchLayoutTimer

QBasicTimer QListViewPrivate::batchLayoutTimer

Definition at line 448 of file qlistview_p.h.

◆ batchSize

int QListViewPrivate::batchSize

Definition at line 456 of file qlistview_p.h.

◆ cachedItemSize

QSize QListViewPrivate::cachedItemSize
mutable

Definition at line 455 of file qlistview_p.h.

◆ column

int QListViewPrivate::column

Definition at line 453 of file qlistview_p.h.

◆ commonListView

QCommonListViewBase* QListViewPrivate::commonListView

Definition at line 417 of file qlistview_p.h.

◆ elasticBand

QRect QListViewPrivate::elasticBand

Definition at line 458 of file qlistview_p.h.

◆ flow

QListView::Flow QListViewPrivate::flow

Definition at line 425 of file qlistview_p.h.

◆ grid

QSize QListViewPrivate::grid

Definition at line 423 of file qlistview_p.h.

◆ hiddenRows

QSet<QPersistentModelIndex> QListViewPrivate::hiddenRows

Definition at line 451 of file qlistview_p.h.

◆ itemAlignment

Qt::Alignment QListViewPrivate::itemAlignment

Definition at line 461 of file qlistview_p.h.

◆ layoutBounds

QRect QListViewPrivate::layoutBounds

Definition at line 445 of file qlistview_p.h.

◆ layoutMode

QListView::LayoutMode QListViewPrivate::layoutMode

Definition at line 428 of file qlistview_p.h.

◆ modeProperties

uint QListViewPrivate::modeProperties

Definition at line 443 of file qlistview_p.h.

◆ movement

QListView::Movement QListViewPrivate::movement

Definition at line 426 of file qlistview_p.h.

◆ resizeMode

QListView::ResizeMode QListViewPrivate::resizeMode

Definition at line 427 of file qlistview_p.h.

◆ showElasticBand

bool QListViewPrivate::showElasticBand

Definition at line 459 of file qlistview_p.h.

◆ space

int QListViewPrivate::space

Definition at line 422 of file qlistview_p.h.

◆ uniformItemSizes

bool QListViewPrivate::uniformItemSizes

Definition at line 454 of file qlistview_p.h.

◆ viewMode

QListView::ViewMode QListViewPrivate::viewMode

Definition at line 429 of file qlistview_p.h.

◆ wrap

bool QListViewPrivate::wrap

Definition at line 421 of file qlistview_p.h.


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