summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews/qabstractitemview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/itemviews/qabstractitemview.cpp')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp152
1 files changed, 76 insertions, 76 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 759ee1a77b..afcb91818c 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -852,8 +852,8 @@ QAbstractItemDelegate *QAbstractItemView::itemDelegateForColumn(int column) cons
}
/*!
- Returns the item delegate used by this view and model for
- the given \a index.
+ Returns the item delegate used by this view and model for
+ the given \a index.
*/
QAbstractItemDelegate *QAbstractItemView::itemDelegate(const QModelIndex &index) const
{
@@ -862,14 +862,14 @@ QAbstractItemDelegate *QAbstractItemView::itemDelegate(const QModelIndex &index)
}
/*!
- \property QAbstractItemView::selectionMode
- \brief which selection mode the view operates in
+ \property QAbstractItemView::selectionMode
+ \brief which selection mode the view operates in
- This property controls whether the user can select one or many items
- and, in many-item selections, whether the selection must be a
- continuous range of items.
+ This property controls whether the user can select one or many items
+ and, in many-item selections, whether the selection must be a
+ continuous range of items.
- \sa SelectionMode SelectionBehavior
+ \sa SelectionMode SelectionBehavior
*/
void QAbstractItemView::setSelectionMode(SelectionMode mode)
{
@@ -884,13 +884,13 @@ QAbstractItemView::SelectionMode QAbstractItemView::selectionMode() const
}
/*!
- \property QAbstractItemView::selectionBehavior
- \brief which selection behavior the view uses
+ \property QAbstractItemView::selectionBehavior
+ \brief which selection behavior the view uses
- This property holds whether selections are done
- in terms of single items, rows or columns.
+ This property holds whether selections are done
+ in terms of single items, rows or columns.
- \sa SelectionMode SelectionBehavior
+ \sa SelectionMode SelectionBehavior
*/
void QAbstractItemView::setSelectionBehavior(QAbstractItemView::SelectionBehavior behavior)
@@ -991,11 +991,11 @@ QModelIndex QAbstractItemView::rootIndex() const
}
/*!
- Selects all item in the view.
- This function wil use the selection selection behavior
- set on the view when selecting.
+ Selects all items in the view.
+ This function will use the selection behavior
+ set on the view when selecting.
- \sa setSelection(), selectedIndexes(), clearSelection()
+ \sa setSelection(), selectedIndexes(), clearSelection()
*/
void QAbstractItemView::selectAll()
{
@@ -1224,10 +1224,10 @@ bool QAbstractItemView::tabKeyNavigation() const
#ifndef QT_NO_DRAGANDDROP
/*!
- \property QAbstractItemView::showDropIndicator
- \brief whether the drop indicator is shown when dragging items and dropping.
+ \property QAbstractItemView::showDropIndicator
+ \brief whether the drop indicator is shown when dragging items and dropping.
- \sa dragEnabled DragDropMode dragDropOverwriteMode acceptDrops
+ \sa dragEnabled DragDropMode dragDropOverwriteMode acceptDrops
*/
void QAbstractItemView::setDropIndicatorShown(bool enable)
@@ -1243,10 +1243,10 @@ bool QAbstractItemView::showDropIndicator() const
}
/*!
- \property QAbstractItemView::dragEnabled
- \brief whether the view supports dragging of its own items
+ \property QAbstractItemView::dragEnabled
+ \brief whether the view supports dragging of its own items
- \sa showDropIndicator DragDropMode dragDropOverwriteMode acceptDrops
+ \sa showDropIndicator DragDropMode dragDropOverwriteMode acceptDrops
*/
void QAbstractItemView::setDragEnabled(bool enable)
@@ -1282,11 +1282,11 @@ bool QAbstractItemView::dragEnabled() const
*/
/*!
- \property QAbstractItemView::dragDropMode
- \brief the drag and drop event the view will act upon
+ \property QAbstractItemView::dragDropMode
+ \brief the drag and drop event the view will act upon
- \since 4.2
- \sa showDropIndicator dragDropOverwriteMode
+ \since 4.2
+ \sa showDropIndicator dragDropOverwriteMode
*/
void QAbstractItemView::setDragDropMode(DragDropMode behavior)
{
@@ -1322,14 +1322,14 @@ QAbstractItemView::DragDropMode QAbstractItemView::dragDropMode() const
#endif // QT_NO_DRAGANDDROP
/*!
- \property QAbstractItemView::alternatingRowColors
- \brief whether to draw the background using alternating colors
+ \property QAbstractItemView::alternatingRowColors
+ \brief whether to draw the background using alternating colors
- If this property is true, the item background will be drawn using
- QPalette::Base and QPalette::AlternateBase; otherwise the background
- will be drawn using the QPalette::Base color.
+ If this property is true, the item background will be drawn using
+ QPalette::Base and QPalette::AlternateBase; otherwise the background
+ will be drawn using the QPalette::Base color.
- By default, this property is false.
+ By default, this property is false.
*/
void QAbstractItemView::setAlternatingRowColors(bool enable)
{
@@ -2261,8 +2261,8 @@ void QAbstractItemView::inputMethodEvent(QInputMethodEvent *event)
\value BelowItem The item will be dropped below the index.
\value OnViewport The item will be dropped onto a region of the viewport with
-no items. The way each view handles items dropped onto the viewport depends on
-the behavior of the underlying model in use.
+ no items. The way each view handles items dropped onto the viewport depends on
+ the behavior of the underlying model in use.
*/
@@ -2279,11 +2279,11 @@ QAbstractItemView::DropIndicatorPosition QAbstractItemView::dropIndicatorPositio
#endif
/*!
- This convenience function returns a list of all selected and
- non-hidden item indexes in the view. The list contains no
- duplicates, and is not sorted.
+ This convenience function returns a list of all selected and
+ non-hidden item indexes in the view. The list contains no
+ duplicates, and is not sorted.
- \sa QItemSelectionModel::selectedIndexes()
+ \sa QItemSelectionModel::selectedIndexes()
*/
QModelIndexList QAbstractItemView::selectedIndexes() const
{
@@ -2365,8 +2365,8 @@ bool QAbstractItemView::edit(const QModelIndex &index, EditTrigger trigger, QEve
}
/*!
- \internal
- Updates the data shown in the open editor widgets in the view.
+ \internal
+ Updates the data shown in the open editor widgets in the view.
*/
void QAbstractItemView::updateEditorData()
{
@@ -2375,8 +2375,8 @@ void QAbstractItemView::updateEditorData()
}
/*!
- \internal
- Updates the geometry of the open editor widgets in the view.
+ \internal
+ Updates the geometry of the open editor widgets in the view.
*/
void QAbstractItemView::updateEditorGeometries()
{
@@ -2425,7 +2425,7 @@ void QAbstractItemView::updateGeometries()
}
/*!
- \internal
+ \internal
*/
void QAbstractItemView::verticalScrollbarValueChanged(int value)
{
@@ -2436,7 +2436,7 @@ void QAbstractItemView::verticalScrollbarValueChanged(int value)
}
/*!
- \internal
+ \internal
*/
void QAbstractItemView::horizontalScrollbarValueChanged(int value)
{
@@ -2538,9 +2538,9 @@ void QAbstractItemView::closeEditor(QWidget *editor, QAbstractItemDelegate::EndE
}
/*!
- Commit the data in the \a editor to the model.
+ Commit the data in the \a editor to the model.
- \sa closeEditor()
+ \sa closeEditor()
*/
void QAbstractItemView::commitData(QWidget *editor)
{
@@ -2559,9 +2559,9 @@ void QAbstractItemView::commitData(QWidget *editor)
}
/*!
- This function is called when the given \a editor has been destroyed.
+ This function is called when the given \a editor has been destroyed.
- \sa closeEditor()
+ \sa closeEditor()
*/
void QAbstractItemView::editorDestroyed(QObject *editor)
{
@@ -2632,12 +2632,12 @@ int QAbstractItemView::verticalStepsPerItem() const
}
/*!
- Moves to and selects the item best matching the string \a search.
- If no item is found nothing happens.
+ Moves to and selects the item best matching the string \a search.
+ If no item is found nothing happens.
- In the default implementation, the search is reset if \a search is empty, or
- the time interval since the last search has exceeded
- QApplication::keyboardInputInterval().
+ In the default implementation, the search is reset if \a search is empty, or
+ the time interval since the last search has exceeded
+ QApplication::keyboardInputInterval().
*/
void QAbstractItemView::keyboardSearch(const QString &search)
{
@@ -2691,9 +2691,9 @@ void QAbstractItemView::keyboardSearch(const QString &search)
setCurrentIndex(firstMatch);
break;
}
- int row = firstMatch.row() + 1;
- if (row >= d->model->rowCount(firstMatch.parent()))
- row = 0;
+ int row = firstMatch.row() + 1;
+ if (row >= d->model->rowCount(firstMatch.parent()))
+ row = 0;
current = firstMatch.sibling(row, firstMatch.column());
}
} while (current != start && firstMatch.isValid());
@@ -2800,9 +2800,9 @@ void QAbstractItemView::openPersistentEditor(const QModelIndex &index)
}
/*!
- Closes the persistent editor for the item at the given \a index.
+ Closes the persistent editor for the item at the given \a index.
- \sa openPersistentEditor()
+ \sa openPersistentEditor()
*/
void QAbstractItemView::closePersistentEditor(const QModelIndex &index)
{
@@ -3337,14 +3337,14 @@ void QAbstractItemView::setDirtyRegion(const QRegion &region)
}
/*!
- Prepares the view for scrolling by (\a{dx},\a{dy}) pixels by moving the dirty regions in the
- opposite direction. You only need to call this function if you are implementing a scrolling
- viewport in your view subclass.
+ Prepares the view for scrolling by (\a{dx},\a{dy}) pixels by moving the dirty regions in the
+ opposite direction. You only need to call this function if you are implementing a scrolling
+ viewport in your view subclass.
- If you implement scrollContentsBy() in a subclass of QAbstractItemView, call this function
- before you call QWidget::scroll() on the viewport. Alternatively, just call update().
+ If you implement scrollContentsBy() in a subclass of QAbstractItemView, call this function
+ before you call QWidget::scroll() on the viewport. Alternatively, just call update().
- \sa scrollContentsBy(), dirtyRegionOffset(), setDirtyRegion()
+ \sa scrollContentsBy(), dirtyRegionOffset(), setDirtyRegion()
*/
void QAbstractItemView::scrollDirtyRegion(int dx, int dy)
{
@@ -3353,13 +3353,13 @@ void QAbstractItemView::scrollDirtyRegion(int dx, int dy)
}
/*!
- Returns the offset of the dirty regions in the view.
+ Returns the offset of the dirty regions in the view.
- If you use scrollDirtyRegion() and implement a paintEvent() in a subclass of
- QAbstractItemView, you should translate the area given by the paint event with
- the offset returned from this function.
+ If you use scrollDirtyRegion() and implement a paintEvent() in a subclass of
+ QAbstractItemView, you should translate the area given by the paint event with
+ the offset returned from this function.
- \sa scrollDirtyRegion(), setDirtyRegion()
+ \sa scrollDirtyRegion(), setDirtyRegion()
*/
QPoint QAbstractItemView::dirtyRegionOffset() const
{
@@ -3531,7 +3531,7 @@ QItemSelectionModel::SelectionFlags QAbstractItemViewPrivate::extendedSelectionC
const bool shiftKeyPressed = modifiers & Qt::ShiftModifier;
const bool controlKeyPressed = modifiers & Qt::ControlModifier;
if (((index == pressedIndex && selectionModel->isSelected(index))
- || !index.isValid()) && state != QAbstractItemView::DragSelectingState
+ || !index.isValid()) && state != QAbstractItemView::DragSelectingState
&& !shiftKeyPressed && !controlKeyPressed && !rightButtonPressed)
return QItemSelectionModel::ClearAndSelect|selectionBehaviorFlags();
return QItemSelectionModel::NoUpdate;
@@ -3763,7 +3763,7 @@ void QAbstractItemViewPrivate::updateEditorData(const QModelIndex &tl, const QMo
but the behavior is view dependant (table just clears the selected indexes for example).
Either remove the selected rows or clear them
- */
+*/
void QAbstractItemViewPrivate::clearOrRemove()
{
#ifndef QT_NO_DRAGANDDROP
@@ -3799,7 +3799,7 @@ void QAbstractItemViewPrivate::clearOrRemove()
When persistent aeditor gets/loses focus, we need to check
and setcorrectly the current index.
- */
+*/
void QAbstractItemViewPrivate::checkPersistentEditorFocus()
{
Q_Q(QAbstractItemView);
@@ -3886,10 +3886,10 @@ bool QAbstractItemViewPrivate::openEditor(const QModelIndex &index, QEvent *even
}
/*
- \internal
+ \internal
- returns the pair QRect/QModelIndex that should be painted on the viewports's rect
- */
+ returns the pair QRect/QModelIndex that should be painted on the viewports's rect
+*/
QItemViewPaintPairs QAbstractItemViewPrivate::draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const
{