8#if QT_CONFIG(accessibility)
15#if QT_CONFIG(draganddrop)
20#if QT_CONFIG(rubberband)
25#include <private/qapplication_p.h>
26#include <private/qlistview_p.h>
27#include <private/qscrollbar_p.h>
152 d->updateStyledFrameWidths();
165 d->updateStyledFrameWidths();
200#if QT_CONFIG(draganddrop)
202 setDragEnabled(movable);
203 d->viewport->setAcceptDrops(movable);
205 d->doDelayedItemsLayout();
236 d->doDelayedItemsLayout();
265 d->doDelayedItemsLayout();
271 return d->isWrapping();
290 d->resizeMode =
mode;
296 return d->resizeMode;
315 d->layoutMode =
mode;
321 return d->layoutMode;
342 d->setSpacing(space);
343 d->doDelayedItemsLayout();
397 d->setGridSize(
size);
398 d->doDelayedItemsLayout();
404 return d->gridSize();
425 if (
d->commonListView &&
d->viewMode ==
mode)
429 delete d->commonListView;
433 d->setWrapping(
false);
445 d->showElasticBand =
false;
449 d->setWrapping(
true);
461 d->showElasticBand =
true;
464#if QT_CONFIG(draganddrop)
465 bool movable = (
d->movement !=
Static);
466 setDragEnabled(movable);
467 setAcceptDrops(movable);
470 d->doDelayedItemsLayout();
491 d->modeProperties = 0;
500 return d->isHidden(
row);
510 const bool hidden =
d->isHidden(
row);
512 d->commonListView->appendHiddenRow(
row);
513 else if (!
hide && hidden)
514 d->commonListView->removeHiddenRow(
row);
515 d->doDelayedItemsLayout();
516 d->viewport->update();
535 if (
index.parent() !=
d->root ||
index.column() !=
d->column)
542 d->viewport->update(
rect);
547 verticalScrollBar()->setValue(
d->verticalScrollToValue(
index,
rect,
hint));
550 horizontalScrollBar()->setValue(
d->horizontalScrollToValue(
index,
rect,
hint));
558 const bool leftOf =
q->isRightToLeft()
561 const bool rightOf =
q->isRightToLeft()
626 std::sort(visibleIndexes.
begin(), visibleIndexes.
end());
627 for (
const auto &
index : indexes) {
628 if (std::binary_search(visibleIndexes.
cbegin(), visibleIndexes.
cend(),
index)) {
647 d->hiddenRows.clear();
661 d->hiddenRows.clear();
673 d->delayedAutoScroll.stop();
695 return d->contentsSize();
704 d_func()->commonListView->dataChanged(topLeft, bottomRight);
716 d->doDelayedItemsLayout();
730 while (
it !=
d->hiddenRows.end()) {
731 int hiddenRow =
it->row();
732 if (hiddenRow >=
start && hiddenRow <=
end) {
733 it =
d->hiddenRows.erase(
it);
740 d->doDelayedItemsLayout();
753 &&
d->showElasticBand
758 d->viewport->update(
d->mapToViewport(
rect.united(
d->elasticBand)));
759 d->elasticBand =
rect;
771 if (
d->showElasticBand &&
d->elasticBand.isValid()) {
772 d->viewport->update(
d->mapToViewport(
d->elasticBand));
777#if QT_CONFIG(wheelevent)
781void QListView::wheelEvent(QWheelEvent *
e)
784 if (
qAbs(
e->angleDelta().y()) >
qAbs(
e->angleDelta().x())) {
785 if (
e->angleDelta().x() == 0
787 &&
d->vbar->minimum() == 0 &&
d->vbar->maximum() == 0) {
788 QPoint pixelDelta(
e->pixelDelta().y(),
e->pixelDelta().x());
789 QPoint angleDelta(
e->angleDelta().y(),
e->angleDelta().x());
790 QWheelEvent hwe(
e->position(),
e->globalPosition(), pixelDelta, angleDelta,
791 e->buttons(),
e->modifiers(),
e->phase(),
e->inverted(),
e->source());
792 if (
e->spontaneous())
796 e->setAccepted(hwe.isAccepted());
812 if (
e->timerId() ==
d->batchLayoutTimer.timerId()) {
813 if (
d->doItemsLayout(
d->batchSize)) {
814 d->batchLayoutTimer.stop();
816 d->viewport->update();
828 if (
d->delayedPendingLayout)
831 QSize delta =
e->size() -
e->oldSize();
836 bool listWrap = (
d->viewMode ==
ListMode) &&
d->wrapItemText;
845 d->doDelayedItemsLayout(100);
851#if QT_CONFIG(draganddrop)
856void QListView::dragMoveEvent(QDragMoveEvent *
e)
859 if (!
d->commonListView->filterDragMoveEvent(
e)) {
863 QAbstractItemView::dragMoveEvent(
e);
871void QListView::dragLeaveEvent(QDragLeaveEvent *
e)
873 if (!d_func()->commonListView->filterDragLeaveEvent(
e))
874 QAbstractItemView::dragLeaveEvent(
e);
880void QListView::dropEvent(QDropEvent *
event)
885 dragDropMode() == QAbstractItemView::InternalMove)) {
887 bool topIndexDropped =
false;
891 if (!
event->isAccepted() &&
d->dropOn(
event, &
row, &col, &topIndex)) {
896 for (
const auto &
index : selIndexes) {
898 if (
index == topIndex) {
899 topIndexDropped =
true;
904 if (!topIndexDropped && !topIndex.
isValid()) {
905 std::sort(persIndexes.
begin(), persIndexes.
end());
910 bool dataMoved =
false;
911 for (
int i = 0;
i < persIndexes.
size(); ++
i) {
914 if (
r != pIndex.
row() &&
r != pIndex.
row() + 1) {
923 r = pIndex.
row() + 1;
932 if (
event->isAccepted())
933 d->dropEventMoved =
true;
936 if (!
d->commonListView->filterDropEvent(
event) || !
d->dropEventMoved) {
938 if (!
d->dropEventMoved)
940 QAbstractItemView::dropEvent(
event);
947void QListView::startDrag(Qt::DropActions supportedActions)
949 if (!d_func()->commonListView->filterStartDrag(supportedActions))
950 QAbstractItemView::startDrag(supportedActions);
962 if (!
d->iconSize.isValid()) {
969 option->showDecorationSelected =
false;
970 option->decorationPosition = QStyleOptionViewItem::Top;
973 option->decorationPosition = QStyleOptionViewItem::Left;
976 if (
d->gridSize().isValid()) {
977 option->rect.setSize(
d->gridSize());
988 if (!
d->itemDelegate)
990 QStyleOptionViewItem
option;
1001 const bool focus = (hasFocus() ||
d->viewport->hasFocus()) && current.
isValid();
1002 const bool alternate =
d->alternatingColors;
1007 bool alternateBase =
false;
1008 int previousRow = -2;
1011 ?
qMax(
viewport()->size().width(),
d->contentsSize().width()) - 2 *
d->spacing()
1035 option.palette.setCurrentColorGroup(cg);
1037 if (
focus && current == *
it) {
1045 int row = (*it).row();
1046 if (
row != previousRow + 1) {
1048 if (!
d->hiddenRows.isEmpty()) {
1049 for (
int r =
qMax(previousRow + 1, 0);
r <
row; ++
r) {
1050 if (!
d->isHidden(
r))
1051 alternateBase = !alternateBase;
1054 alternateBase = (
row & 1) != 0;
1057 option.features.setFlag(QStyleOptionViewItem::Alternate, alternateBase);
1061 QStyle::State oldState =
option.state;
1066 alternateBase = !alternateBase;
1073#if QT_CONFIG(draganddrop)
1074 d->commonListView->paintDragDrop(&
painter);
1077#if QT_CONFIG(rubberband)
1079 if (
d->showElasticBand &&
d->elasticBand.isValid()) {
1080 QStyleOptionRubberBand
opt;
1084 opt.
rect =
d->mapToViewport(
d->elasticBand,
false).intersected(
1085 d->viewport->rect().adjusted(-16, -16, 16, 16));
1113 return d_func()->commonListView->horizontalOffset();
1121 return d_func()->commonListView->verticalOffset();
1132 auto findAvailableRowBackward = [
d](
int row) {
1133 while (
row >= 0 &&
d->isHiddenOrDisabled(
row))
1138 auto findAvailableRowForward = [
d](
int row) {
1139 int rowCount =
d->model->rowCount(
d->root);
1142 while (row < rowCount && d->isHiddenOrDisabled(
row))
1144 if (
row >= rowCount)
1151 int row = findAvailableRowForward(0);
1154 return d->model->index(
row,
d->column,
d->root);
1159 const int row = findAvailableRowBackward(current.
row() - 1);
1162 return d->model->index(
row,
d->column,
d->root);
1165 const int row = findAvailableRowForward(current.
row() + 1);
1168 return d->model->index(
row,
d->column,
d->root);
1173 if (
rect.isEmpty()) {
1174 return d->model->index(0,
d->column,
d->root);
1176 if (
d->gridSize().isValid())
rect.setSize(
d->gridSize());
1181 switch (cursorAction) {
1183 while (intersectVector.
isEmpty()) {
1185 if (
rect.right() <= 0)
1187 if (
rect.left() < 0)
1189 intersectVector =
d->intersectingSet(
rect);
1190 d->removeCurrentAndDisabled(&intersectVector, current);
1192 return d->closestIndex(initialRect, intersectVector);
1194 while (intersectVector.
isEmpty()) {
1200 intersectVector =
d->intersectingSet(
rect);
1201 d->removeCurrentAndDisabled(&intersectVector, current);
1203 return d->closestIndex(initialRect, intersectVector);
1205 if (
rect.height() >=
d->viewport->height())
1208 rect.moveTop(
rect.top() -
d->viewport->height() + 1);
1214 while (intersectVector.
isEmpty()
1216 ||
rect.top() <= 0) {
1217 rect.translate(0, 1);
1218 if (
rect.bottom() <= 0) {
1221 intersectVector =
d->intersectingSet(
rect);
1222 findindex =
d->closestIndex(initialRect, intersectVector);
1228 while (intersectVector.
isEmpty()) {
1230 if (
rect.bottom() <= 0) {
1231#ifdef QT_KEYPAD_NAVIGATION
1232 if (QApplicationPrivate::keypadNavigationEnabled()) {
1233 int row =
d->batchStartRow() - 1;
1234 while (
row >= 0 &&
d->isHiddenOrDisabled(
row))
1237 return d->model->index(
row,
d->column,
d->root);
1244 intersectVector =
d->intersectingSet(
rect);
1245 d->removeCurrentAndDisabled(&intersectVector, current);
1247 return d->closestIndex(initialRect, intersectVector);
1249 if (
rect.height() >=
d->viewport->height())
1252 rect.moveTop(
rect.top() +
d->viewport->height() - 1);
1259 while (intersectVector.
isEmpty()
1262 rect.translate(0, -1);
1266 intersectVector =
d->intersectingSet(
rect);
1267 index =
d->closestIndex(initialRect, intersectVector);
1273 while (intersectVector.
isEmpty()) {
1276#ifdef QT_KEYPAD_NAVIGATION
1277 if (QApplicationPrivate::keypadNavigationEnabled()) {
1278 int rowCount =
d->model->rowCount(
d->root);
1280 while (row < rowCount && d->isHiddenOrDisabled(
row))
1283 return d->model->index(
row,
d->column,
d->root);
1290 intersectVector =
d->intersectingSet(
rect);
1291 d->removeCurrentAndDisabled(&intersectVector, current);
1293 return d->closestIndex(initialRect, intersectVector);
1295 return d->model->index(0,
d->column,
d->root);
1297 return d->model->index(
d->batchStartRow() - 1,
d->column,
d->root);}
1310 return d_func()->rectForIndex(
index);
1325 || !
d->isIndexValid(
index)
1326 ||
index.parent() !=
d->root
1327 ||
index.column() !=
d->column)
1330 d->executePostedLayout();
1340 if (!
d->selectionModel)
1344 int w =
qMax(
d->contentsSize().width(),
d->viewport->width());
1345 int h =
qMax(
d->contentsSize().height(),
d->viewport->height());
1351 if (
rect.width() == 1 &&
rect.height() == 1) {
1355 if (!intersectVector.
isEmpty())
1356 tl = intersectVector.
last();
1357 if (tl.
isValid() &&
d->isIndexEnabled(tl))
1367 if (!intersectVector.
isEmpty())
1368 tl = intersectVector.
last();
1371 intersectVector =
d->intersectingSet(bottomRight);
1372 if (!intersectVector.
isEmpty())
1373 br = intersectVector.
last();
1377 &&
d->isIndexEnabled(tl)
1378 &&
d->isIndexEnabled(br)) {
1380 QRect last =
d->cellRectForIndex(br);
1386 if (
top.center().y() >
bottom.center().y()) {
1394 if (isRightToLeft())
1399 if (isRightToLeft())
1403 }
else if (
top.left() >
bottom.right()) {
1404 if (isRightToLeft())
1409 if (isRightToLeft())
1427 if (
left.center().x() >
right.center().x())
1433 if (isRightToLeft())
1439 if (isRightToLeft())
1451 }
else if (
left.bottom() <
right.top()) {
1470 d->selectionModel->select(
selection, command);
1485 const QRect &viewportRect =
d->viewport->rect();
1487 if (!elem.isValid())
1494 int t = elem.topLeft().row();
1495 int b = elem.bottomRight().row();
1496 if (
d->viewMode ==
IconMode ||
d->isWrapping()) {
1497 for (
int r =
t;
r <=
b; ++
r) {
1500 selectionRegion +=
rect;
1503 while (t <= b && d->isHidden(
t)) ++
t;
1504 while (
b >=
t &&
d->isHidden(
b)) --
b;
1510 selectionRegion +=
rect;
1514 return selectionRegion;
1523 if (!
d->selectionModel)
1531 return viewSelected;
1547 if (
d->model->columnCount(
d->root) > 0) {
1548 d->resetBatchStartRow();
1550 d->doItemsLayout(
d->model->rowCount(
d->root));
1551 }
else if (!
d->batchLayoutTimer.isActive()) {
1552 if (!
d->doItemsLayout(
d->batchSize))
1553 d->batchLayoutTimer.start(0,
this);
1568 if (geometry().isEmpty() ||
d->model->rowCount(
d->root) <= 0 ||
d->model->columnCount(
d->root) <= 0) {
1569 horizontalScrollBar()->setRange(0, 0);
1570 verticalScrollBar()->setRange(0, 0);
1573 QStyleOptionViewItem
option;
1576 d->commonListView->updateHorizontalScrollBar(step);
1577 d->commonListView->updateVerticalScrollBar(step);
1583 if (
d->movement ==
Static && !
d->isWrapping()) {
1584 d->layoutChildren();
1588 horizontalScrollBar()->setRange(0, 0);
1593 verticalScrollBar()->setRange(0, 0);
1606 return (
d->isHidden(
index.row())
1607 && (
index.parent() ==
d->root)
1608 &&
index.column() ==
d->column);
1621 if (column < 0 || column >=
d->model->columnCount(
d->root))
1624 d->doDelayedItemsLayout();
1653 return d->uniformItemSizes;
1673 if (
d->wrapItemText == on)
1675 d->wrapItemText = on;
1676 d->doDelayedItemsLayout();
1682 return d->wrapItemText;
1704 d->setSelectionRectVisible(
show);
1710 return d->isSelectionRectVisible();
1730 d->doDelayedItemsLayout();
1736 return d->itemAlignment;
1763 uniformItemSizes(
false),
1765 showElasticBand(
false),
1766 itemAlignment(
Qt::Alignment())
1790 int frameAroundContents = 0;
1821 int last =
qMin(
first + delta - 1, max);
1828 if (max < 0 || last <
first) {
1856 if (!
rect.isValid())
1860 int dx = -
q->horizontalOffset();
1861 int dy = -
q->verticalOffset();
1862 return result.adjusted(dx, dy, dx, dy);
1869 int shortest = INT_MAX;
1873 for (;
it != candidates.
end(); ++
it) {
1874 if (!(*it).isValid())
1882 if ((
target.center().x() >= indexRect.
x() &&
target.center().x() < indexRect.
right())
1886 }
else if ((
target.center().y() >= indexRect.
y() &&
target.center().y() < indexRect.
bottom())
1923 for (;
it != intersectVector.
end(); ++
it) {
1926 }
else if ((*it).row() == (tl.
row() - 1)) {
1928 }
else if ((*it).row() == (br.
row() + 1)) {
1946#if QT_CONFIG(draganddrop)
1952 return QAbstractItemViewPrivate::position(
pos,
rect, idx);
1955bool QListViewPrivate::dropOn(QDropEvent *
event,
int *dropRow,
int *dropCol,
QModelIndex *dropIndex)
1960 return QAbstractItemViewPrivate::dropOn(
event, dropRow, dropCol, dropIndex);
1970 indexes->
removeIf(isCurrentOrDisabled);
1987#if QT_CONFIG(draganddrop)
1998 return v->contentsRect().marginsRemoved(
v->viewportMargins()).size();
2016 bool horizontalWantsToShow;
2017 if (verticalWantsToShow)
2022 if (bothScrollBarsAuto && !horizontalWantsToShow) {
2046 bool verticalWantsToShow;
2047 if (horizontalWantsToShow)
2052 if (bothScrollBarsAuto && !verticalWantsToShow) {
2072 verticalValue += adjusted.
top();
2076 verticalValue += adjusted.
top() - ((
area.height() - adjusted.
height()) / 2);
2077 return verticalValue;
2091 horizontalValue += ((
area.width() -
rect.width()) / 2) -
rect.left();
2094 horizontalValue -=
rect.left();
2100 horizontalValue +=
rect.left() - ((
area.width()-
rect.width()) / 2);
2103 horizontalValue +=
rect.left();
2108 return horizontalValue;
2117#if QT_CONFIG(draganddrop)
2122#if QT_CONFIG(draganddrop)
2125 QAbstractItemView::DropIndicatorPosition
r = QAbstractItemView::OnViewport;
2126 if (!
dd->overwrite) {
2127 const int margin = 2;
2128 if (
pos.x() -
rect.left() < margin) {
2129 r = QAbstractItemView::AboveItem;
2130 }
else if (
rect.right() -
pos.x() < margin) {
2131 r = QAbstractItemView::BelowItem;
2132 }
else if (
rect.contains(
pos,
true)) {
2133 r = QAbstractItemView::OnItem;
2137 touchingRect.
adjust(-1, -1, 1, 1);
2139 r = QAbstractItemView::OnItem;
2144 r =
pos.x() <
rect.center().x() ? QAbstractItemView::AboveItem : QAbstractItemView::BelowItem;
2149void QListModeViewBase::dragMoveEvent(QDragMoveEvent *
event)
2151 if (
qq->dragDropMode() == QAbstractItemView::InternalMove
2159 QPoint p =
event->position().toPoint();
2169 if (
index.isValid() &&
dd->showDropIndicator) {
2173 switch (
dd->dropIndicatorPosition) {
2174 case QAbstractItemView::AboveItem:
2175 if (
dd->isIndexDropEnabled(
index.parent())) {
2179 dd->dropIndicatorRect =
QRect();
2182 case QAbstractItemView::BelowItem:
2183 if (
dd->isIndexDropEnabled(
index.parent())) {
2187 dd->dropIndicatorRect =
QRect();
2190 case QAbstractItemView::OnItem:
2191 if (
dd->isIndexDropEnabled(
index)) {
2192 dd->dropIndicatorRect =
rect;
2195 dd->dropIndicatorRect =
QRect();
2198 case QAbstractItemView::OnViewport:
2199 dd->dropIndicatorRect =
QRect();
2206 dd->dropIndicatorRect =
QRect();
2207 dd->dropIndicatorPosition = QAbstractItemView::OnViewport;
2212 dd->viewport->update();
2230bool QListModeViewBase::dropOn(QDropEvent *
event,
int *dropRow,
int *dropCol,
QModelIndex *dropIndex)
2232 if (
event->isAccepted())
2236 if (
dd->viewport->rect().contains(
event->position().toPoint())) {
2238 QPoint p =
event->position().toPoint();
2244 if (!
index.isValid())
2254 switch (
dd->dropIndicatorPosition) {
2255 case QAbstractItemView::AboveItem:
2257 col =
index.column();
2260 case QAbstractItemView::BelowItem:
2262 col =
index.column();
2265 case QAbstractItemView::OnItem:
2266 case QAbstractItemView::OnViewport:
2270 dd->dropIndicatorPosition = QAbstractItemView::OnViewport;
2334 if (idx.
row() <= scrollBarValue)
2430 dx = previousCoordinate - currentCoordinate;
2436 dy = previousCoordinate - currentCoordinate;
2447 dy = previousCoordinate - currentCoordinate;
2453 dx = previousCoordinate - currentCoordinate;
2461 doStaticLayout(
info);
2476 QStyleOptionViewItem options;
2516 if (
info.first == 0) {
2526 }
else if (
info.wrap) {
2551 const bool useItemSize = !
info.grid.isValid();
2552 const QPoint topLeft = initStaticLayout(
info);
2553 QStyleOptionViewItem
option;
2564 int segStartPosition;
2566 int deltaFlowPosition;
2567 int deltaSegPosition;
2573 segStartPosition =
info.bounds.left();
2574 segEndPosition =
info.bounds.width();
2576 segPosition = topLeft.
y();
2577 deltaFlowPosition =
info.grid.width();
2579 deltaSegHint =
info.grid.height();
2581 segStartPosition =
info.bounds.top();
2582 segEndPosition =
info.bounds.height();
2584 segPosition = topLeft.
x();
2585 deltaFlowPosition =
info.grid.height();
2587 deltaSegHint =
info.grid.width();
2598 deltaFlowPosition =
hint.width() +
info.spacing;
2599 deltaSegHint =
hint.height() +
info.spacing;
2601 deltaFlowPosition =
hint.height() +
info.spacing;
2602 deltaSegHint =
hint.width() +
info.spacing;
2609 segPosition +=
info.spacing + deltaSegPosition;
2612 deltaSegPosition = 0;
2618 deltaSegPosition =
qMax(deltaSegHint, deltaSegPosition);
2632 rect.setBottom(segPosition + deltaSegPosition);
2634 rect.setRight(segPosition + deltaSegPosition);
2646 QRect changedRect(topLeft,
rect.bottomRight());
2647 if (
clipRect().intersects(changedRect))
2659 int segStartPosition;
2661 int flowStartPosition;
2662 int flowEndPosition;
2664 segStartPosition =
area.top();
2665 segEndPosition =
area.bottom();
2666 flowStartPosition =
area.left();
2667 flowEndPosition =
area.right();
2669 segStartPosition =
area.left();
2670 segEndPosition =
area.right();
2671 flowStartPosition =
area.top();
2672 flowEndPosition =
area.bottom();
2678 int seg = qBinarySearch<int>(
segmentPositions, segStartPosition, 0, segLast + 1);
2689 if (
index.isValid()) {
2694 const int iw = viewItem.width();
2697 if (endPos >= viewItem.x && startPos < viewItem.x + iw)
2703 qWarning(
"intersectingSet: row %d was invalid",
row);
2733int QListModeViewBase::perItemScrollingPageSteps(
int length,
int bounds,
bool wrap)
const
2757 while (
pos >= 0 && steps > 0) {
2765 return qMax(pageSteps, 1);
2768int QListModeViewBase::perItemScrollToValue(
int index,
int scrollValue,
int viewportSize,
2777 std::sort(hiddenRows.
begin(), hiddenRows.
end());
2778 int hiddenRowsBefore = 0;
2779 for (
int i = 0;
i < hiddenRows.
size() - 1; ++
i)
2780 if (hiddenRows.
at(
i) >
index + hiddenRowsBefore)
2785 int topIndex =
index;
2786 const int bottomIndex = topIndex;
2788 while (topIndex > 0 &&
2792 while (hiddenRowsBefore > 0 && hiddenRows.
at(hiddenRowsBefore - 1) >= topIndex + hiddenRowsBefore - 1)
2796 const int itemCount = bottomIndex - topIndex + 1;
2801 return index - itemCount + 1;
2803 return index - (itemCount / 2);
2810 if (flowOrientation == orientation) {
2816 const int rightSegment = leftSegment;
2819 while (leftSegment > scrollValue &&
2824 const int segmentCount = rightSegment - leftSegment + 1;
2882#if QT_CONFIG(draganddrop)
2883bool QIconModeViewBase::filterStartDrag(Qt::DropActions supportedActions)
2889 if (indexes.
size() > 0 ) {
2905 dd->dropEventMoved =
false;
2910 if (
dd->dragDropMode != QAbstractItemView::InternalMove || drag->
target() ==
qq->viewport())
2913 dd->dropEventMoved =
false;
2918bool QIconModeViewBase::filterDropEvent(QDropEvent *
e)
2920 if (
e->source() !=
qq)
2926 if (
qq->acceptDrops()) {
2936 for (
const auto &
index : indexes) {
2940 if (
qq->isRightToLeft())
2942 moveItem(
index.row(), dest);
2949 dd->dropEventMoved =
true;
2955 updateContentsSize();
2962bool QIconModeViewBase::filterDragLeaveEvent(QDragLeaveEvent *
e)
2966 return QCommonListViewBase::filterDragLeaveEvent(
e);
2969bool QIconModeViewBase::filterDragMoveEvent(QDragMoveEvent *
e)
2971 const bool wasAccepted =
e->isAccepted();
2976 if (
e->source() !=
qq || !
dd->canDrop(
e)) {
2978 e->setAccepted(wasAccepted);
3003 else if (!
index.isValid())
3020 if (scrollElasticBand)
3031 QStyleOptionViewItem
option;
3052 QStyleOptionViewItem
option;
3059 doDynamicLayout(
info);
3075 for (
int l = 0; l < leafCount; ++l)
3091 if (
info.first == 0) {
3096 int idx =
info.first - 1;
3115 const bool useItemSize = !
info.grid.isValid();
3116 const QPoint topLeft = initDynamicLayout(
info);
3118 int segStartPosition;
3120 int deltaFlowPosition;
3121 int deltaSegPosition;
3127 segStartPosition =
info.bounds.left() +
info.spacing;
3128 segEndPosition =
info.bounds.right();
3129 deltaFlowPosition =
info.grid.width();
3131 deltaSegHint =
info.grid.height();
3133 segPosition = topLeft.
y();
3135 segStartPosition =
info.bounds.top() +
info.spacing;
3136 segEndPosition =
info.bounds.bottom();
3137 deltaFlowPosition =
info.grid.height();
3139 deltaSegHint =
info.grid.width();
3141 segPosition = topLeft.
x();
3158 deltaFlowPosition =
item->w +
info.spacing;
3160 deltaFlowPosition =
item->h +
info.spacing;
3171 segPosition += deltaSegPosition;
3173 deltaSegPosition = 0;
3179 deltaSegHint =
item->h +
info.spacing;
3181 deltaSegHint =
item->w +
info.spacing;
3182 deltaSegPosition =
qMax(deltaSegPosition, deltaSegHint);
3192 item->
y = segPosition;
3195 item->
y = segPosition;
3200 item->
x = segPosition;
3203 item->
x = segPosition;
3232 if (
rect.size().isEmpty())
3235 int insertFrom =
info.first;
3237 initBspTree(
rect.size());
3244 QRect changedRect(topLeft,
rect.bottomRight());
3245 if (
clipRect().intersects(changedRect))
3263 for (
const auto &
index : indexes)
3270 if (!
item.isValid())
3272 int i =
item.indexHint;
3309 for (
int i = 0;
i < leaf.
size(); ++
i) {
3310 int idx = leaf.
at(
i);
3311 if (idx < 0 || idx >= _this->
items.
size())
3313 vi = &_this->
items[idx];
3319 vi->visited = visited;
3324void QIconModeViewBase::moveItem(
int index,
const QPoint &dest)
3351QPoint QIconModeViewBase::draggedItemsDelta()
const
3361QRect QIconModeViewBase::draggedItemsRect()
const
3364 rect.translate(draggedItemsDelta());
3389void QIconModeViewBase::updateContentsSize()
3403#if QT_CONFIG(accessibility)
3404 if (QAccessible::isActive()) {
3406 int entry = visualIndex(current);
3407 QAccessibleEvent
event(
this, QAccessible::Focus);
3408 event.setChild(
entry);
3409 QAccessible::updateAccessibility(&
event);
3421#if QT_CONFIG(accessibility)
3422 if (QAccessible::isActive()) {
3426 int entry = visualIndex(sel);
3427 QAccessibleEvent
event(
this, QAccessible::SelectionAdd);
3428 event.setChild(
entry);
3429 QAccessible::updateAccessibility(&
event);
3433 int entry = visualIndex(desel);
3434 QAccessibleEvent
event(
this, QAccessible::SelectionRemove);
3435 event.setChild(
entry);
3436 QAccessible::updateAccessibility(&
event);
3446 d->executePostedLayout();
3448 int visualIndex =
d->commonListView->itemIndex(itm);
3449 for (
const auto &idx :
std::as_const(
d->hiddenRows)) {
3450 if (idx.row() <=
index.row())
3467 const int rc =
d->model->rowCount();
3471 QStyleOptionViewItem
option;
3475 QSize sz =
d->cachedItemSize;
3478 sz =
d->itemSize(
option, idx);
3487 int maximumRows = 1000;
3489 if (userOverrideValue.
isValid() && userOverrideValue.
toInt() > 0) {
3490 maximumRows = userOverrideValue.
toInt();
3492 const int rowCount =
qMin(rc, maximumRows);
3497 for (
int row = 0;
row < rowCount; ++
row) {
3508#include "moc_qlistview.cpp"
The QAbstractItemDelegate class is used to display and edit data items from a model.
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const =0
This pure abstract function must be reimplemented if you want to provide custom rendering.
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
This pure abstract function must be reimplemented if you want to provide custom rendering.
virtual Qt::DropActions supportedDropActions() const
virtual Q_INVOKABLE Qt::ItemFlags flags(const QModelIndex &index) const
Returns the item flags for the given index.
virtual Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
Returns an object that contains serialized items of data corresponding to the list of indexes specifi...
virtual Q_INVOKABLE int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual Q_INVOKABLE 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 doDelayedItemsLayout(int delay=0)
void scrollContentsBy(int dx, int dy)
QPointer< QItemSelectionModel > selectionModel
bool shouldAutoScroll(const QPoint &pos) const
QPersistentModelIndex root
bool droppingOnItself(QDropEvent *event, const QModelIndex &index)
QPixmap renderToPixmap(const QModelIndexList &indexes, QRect *r) const
QAbstractItemModel * model
QPersistentModelIndex hover
bool isIndexEnabled(const QModelIndex &index) const
The QAbstractItemView class provides the basic functionality for item view classes.
friend class QListModeViewBase
QAbstractItemModel * model() const
Returns the model that this view is presenting.
bool event(QEvent *event) override
\reimp
void timerEvent(QTimerEvent *event) override
This function is called with the given event when a timer event is sent to the widget.
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
This slot is called when the selection is changed.
State state() const
Returns the item view's state.
virtual void reset()
Reset the internal state of the view.
void mouseReleaseEvent(QMouseEvent *event) override
This function is called with the given event when a mouse button is released, after a mouse press eve...
virtual QAbstractItemDelegate * itemDelegateForIndex(const QModelIndex &index) const
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QList< int > &roles=QList< int >())
This slot is called when items with the given roles are changed in the model.
QModelIndex currentIndex() const
Returns the model index of the current item.
virtual void rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
This slot is called when rows are about to be removed.
State
Describes the different states the view can be in.
virtual void setRootIndex(const QModelIndex &index)
Sets the root item to the item at the given index.
virtual void initViewItemOption(QStyleOptionViewItem *option) const
virtual void doItemsLayout()
void update(const QModelIndex &index)
QModelIndex rootIndex() const
Returns the model index of the model's root item.
CursorAction
This enum describes the different ways to navigate between items,.
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
This slot is called when a new item becomes the current item.
void resizeEvent(QResizeEvent *event) override
This function is called with the given event when a resize event is sent to the widget.
ScrollHint
\value EnsureVisible Scroll to ensure that the item is visible.
virtual void rowsInserted(const QModelIndex &parent, int start, int end)
This slot is called when rows are inserted.
void setState(State state)
Sets the item view's state to the given state.
void mouseMoveEvent(QMouseEvent *event) override
This function is called with the given event when a mouse move event is sent to the widget.
void setSelectionMode(QAbstractItemView::SelectionMode mode)
virtual void updateGeometries()
QSize viewportSizeHint() const override
int value
the slider's current value
void setRange(int min, int max)
Sets the slider's minimum to min and its maximum to max.
void clear()
Clears the contents of the bit array and makes it empty.
bool testBit(qsizetype i) const
Returns true if the bit at index position i is 1; otherwise returns false.
void resize(qsizetype size)
Resizes the bit array to size bits.
void setBit(qsizetype i)
Sets the bit at index position i to 1.
qsizetype size() const
Returns the number of bits stored in the bit array.
void insertLeaf(const QRect &r, int i)
void create(int n, int d=-1)
void climbTree(const QRect &rect, callback *function, QBspTreeData data)
void init(const QRect &area, NodeType type)
void removeLeaf(const QRect &r, int i)
QList< int > & leaf(int i)
virtual int horizontalScrollToValue(int index, QListView::ScrollHint hint, bool leftOf, bool rightOf, const QRect &area, const QRect &rect) const
QListView::Movement movement() const
QRect viewItemRect(const QListViewItem &item) const
QListView::ScrollMode horizontalScrollMode() const
QListView::ScrollMode verticalScrollMode() const
virtual void updateHorizontalScrollBar(const QSize &step)
virtual int horizontalOffset() const
QWidget * viewport() const
void initViewItemOption(QStyleOptionViewItem *option) const
virtual bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max)=0
virtual void appendHiddenRow(int row)
virtual void updateVerticalScrollBar(const QSize &step)
virtual QListViewItem indexToListViewItem(const QModelIndex &index) const =0
virtual void removeHiddenRow(int row)
bool uniformItemSizes() const
QSize cachedItemSize() const
virtual void scrollContentsBy(int dx, int dy, bool scrollElasticBand)
virtual int verticalOffset() const
bool isHidden(int row) const
QScrollBar * verticalScrollBar() const
QSize itemSize(const QStyleOptionViewItem &opt, const QModelIndex &idx) const
QListView::Flow flow() const
virtual void setRowCount(int)=0
virtual QRect mapToViewport(const QRect &rect) const
QScrollBar * horizontalScrollBar() const
bool isRightToLeft() const
QModelIndex modelIndex(int row) const
virtual int verticalScrollToValue(int index, QListView::ScrollHint hint, bool above, bool below, const QRect &area, const QRect &rect) const
QPoint pressedPosition() const
static bool sendEvent(QObject *receiver, QEvent *event)
Sends event event directly to receiver receiver, using the notify() function.
void setHotSpot(const QPoint &hotspot)
Sets the position of the hot spot relative to the top-left corner of the pixmap used to the point spe...
Qt::DropAction exec(Qt::DropActions supportedActions=Qt::MoveAction)
void setMimeData(QMimeData *data)
Sets the data to be sent to the given MIME data.
void setPixmap(const QPixmap &)
Sets pixmap as the pixmap used to represent the data in a drag and drop operation.
QObject * target() const
Returns the target of the drag and drop operation.
qreal y() const
This convenience function is equivalent to calling pos().y().
qreal x() const
This convenience function is equivalent to calling pos().x().
QList< QListViewItem > items
int itemIndex(const QListViewItem &item) const override
QList< QModelIndex > draggedItems
QListViewItem indexToListViewItem(const QModelIndex &index) const override
void setPositionForIndex(const QPoint &position, const QModelIndex &index) override
void setRowCount(int rowCount) override
void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override
QList< QModelIndex > intersectingSet(const QRect &area) const override
void appendHiddenRow(int row) override
QList< QModelIndex > * interSectingVector
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) override
void removeHiddenRow(int row) override
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override
Q_INVOKABLE bool isSelected(const QModelIndex &index) const
Returns true if the given model item index is selected.
QModelIndexList selectedIndexes
virtual void select(const QModelIndex &index, QItemSelectionModel::SelectionFlags command)
Selects the model item index using the specified command, and emits selectionChanged().
Q_CORE_EXPORT QModelIndexList indexes() const
Returns a list of model indexes that correspond to the selected items.
Q_CORE_EXPORT void select(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Adds the items in the range that extends from the top-left model item, specified by the topLeft index...
Q_CORE_EXPORT void merge(const QItemSelection &other, QItemSelectionModel::SelectionFlags command)
Merges the other selection with this QItemSelection using the command given.
void updateHorizontalScrollBar(const QSize &step) override
bool doBatchedItemLayout(const QListViewLayoutInfo &info, int max) override
QList< int > segmentExtents
QList< int > segmentPositions
QList< int > flowPositions
void updateVerticalScrollBar(const QSize &step) override
void scrollContentsBy(int dx, int dy, bool scrollElasticBand) override
QList< QModelIndex > intersectingSet(const QRect &area) const override
int horizontalOffset() const override
QRect mapToViewport(const QRect &rect) const override
int verticalOffset() const override
QListViewItem indexToListViewItem(const QModelIndex &index) const override
int verticalScrollToValue(int index, QListView::ScrollHint hint, bool above, bool below, const QRect &area, const QRect &rect) const override
int horizontalScrollToValue(int index, QListView::ScrollHint hint, bool leftOf, bool rightOf, const QRect &area, const QRect &rect) const override
QListModeViewBase(QListView *q, QListViewPrivate *d)
static QSize viewportSize(const QAbstractItemView *v)
void dataChanged(const QModelIndex &, const QModelIndex &) override
QList< int > segmentStartRows
QList< int > scrollValueMap
constexpr bool isValid() const
QListView::ViewMode viewMode
QSet< QPersistentModelIndex > hiddenRows
int horizontalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
QListView::Movement movement
QModelIndex closestIndex(const QRect &target, const QList< QModelIndex > &candidates) const
int batchStartRow() const
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const override
\reimp
int verticalScrollToValue(const QModelIndex &index, const QRect &rect, QListView::ScrollHint hint) const
void scrollElasticBandBy(int dx, int dy)
Qt::Alignment itemAlignment
QRect rectForIndex(const QModelIndex &index) const
QSize itemSize(const QStyleOptionViewItem &option, const QModelIndex &index) const
void selectAll(QItemSelectionModel::SelectionFlags command) override
bool doItemsLayout(int num)
QListViewItem indexToListViewItem(const QModelIndex &index) const
QModelIndex listViewItemToIndex(const QListViewItem &item) const
QItemSelection selection(const QRect &rect) const
QCommonListViewBase * commonListView
void prepareItemsLayout()
void emitIndexesMoved(const QModelIndexList &indexes)
QList< QModelIndex > intersectingSet(const QRect &area, bool doLayout=true) const
QRect mapToViewport(const QRect &rect, bool extend=true) const
void viewUpdateGeometries()
bool isHidden(int row) const
void removeCurrentAndDisabled(QList< QModelIndex > *indexes, const QModelIndex ¤t) const
QList< int > hiddenRowIds() const
The QListView class provides a list or icon view onto a model.
LayoutMode layoutMode
determines whether the layout of items should happen immediately or be delayed.
void resizeEvent(QResizeEvent *e) override
\reimp
void setSpacing(int space)
bool isSelectionRectVisible() const
int spacing
the space around the items in the layout
bool isWrapping
whether the items layout should wrap.
void scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible) override
\reimp
void initViewItemOption(QStyleOptionViewItem *option) const override
\reimp
void setRowHidden(int row, bool hide)
If hide is true, the given row will be hidden; otherwise the row will be shown.
void setLayoutMode(LayoutMode mode)
int batchSize
the number of items laid out in each batch if \l layoutMode is set to \l Batched
~QListView()
Destroys the view.
ViewMode viewMode
the view mode of the QListView.
void setWordWrap(bool on)
int verticalOffset() const override
\reimp
void timerEvent(QTimerEvent *e) override
\reimp
bool uniformItemSizes
whether all items in the listview have the same size
bool wordWrap
the item text word-wrapping policy
QSize gridSize
the size of the layout grid
QSize contentsSize() const
void setViewMode(ViewMode mode)
QListView(QWidget *parent=nullptr)
Creates a new QListView with the given parent to view a model.
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
\reimp
int modelColumn
the column in the model that is visible
QRegion visualRegionForSelection(const QItemSelection &selection) const override
\reimp
void setGridSize(const QSize &size)
Movement movement
whether the items can be moved freely, are snapped to a grid, or cannot be moved at all.
QRect rectForIndex(const QModelIndex &index) const
Returns the rectangle of the item at position index in the model.
bool event(QEvent *e) override
\reimp
void setModelColumn(int column)
void setWrapping(bool enable)
bool isRowHidden(int row) const
Returns true if the row is hidden; otherwise returns false.
QRect visualRect(const QModelIndex &index) const override
\reimp
int horizontalOffset() const override
\reimp
void setMovement(Movement movement)
void setBatchSize(int batchSize)
ViewMode
\value ListMode The items are laid out using TopToBottom flow, with Small size and Static movement \v...
void setPositionForIndex(const QPoint &position, const QModelIndex &index)
Qt::Alignment itemAlignment
the alignment of each item in its cell
void clearPropertyFlags()
Clears the QListView-specific property flags.
void setItemAlignment(Qt::Alignment alignment)
void mouseReleaseEvent(QMouseEvent *e) override
\reimp
ResizeMode
\value Fixed The items will only be laid out the first time the view is shown.
void setSelectionRectVisible(bool show)
void updateGeometries() override
\reimp
void mouseMoveEvent(QMouseEvent *e) override
\reimp
void setUniformItemSizes(bool enable)
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) override
\reimp
void setResizeMode(ResizeMode mode)
QModelIndexList selectedIndexes() const override
\reimp
Movement
\value Static The items cannot be moved by the user.
void scrollContentsBy(int dx, int dy) override
\reimp
QSize viewportSizeHint() const override
bool isIndexHidden(const QModelIndex &index) const override
\reimp
void resizeContents(int width, int height)
ResizeMode resizeMode
whether the items are laid out again when the view is resized.
Flow
\value LeftToRight The items are laid out in the view from the left to the right.
QModelIndex indexAt(const QPoint &p) const override
\reimp
void paintEvent(QPaintEvent *e) override
\reimp
LayoutMode
\value SinglePass The items are laid out all at once.
Flow flow
which direction the items layout should flow.
void doItemsLayout() override
qsizetype size() const noexcept
bool isEmpty() const noexcept
const T & constLast() const noexcept
void push_back(parameter_type t)
const_reference at(qsizetype i) const noexcept
T value(qsizetype i) const
const_iterator constBegin() const noexcept
qsizetype removeIf(Predicate pred)
void reserve(qsizetype size)
void resize(qsizetype size)
const_iterator cend() const noexcept
void append(parameter_type t)
const_iterator constEnd() const noexcept
const_iterator cbegin() const noexcept
const_iterator ConstIterator
constexpr int row() const noexcept
Returns the row this model index refers to.
constexpr int column() const noexcept
Returns the column this model index refers to.
constexpr bool isValid() const noexcept
Returns {true} if this model index is valid; otherwise returns {false}.
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
void restore()
Restores the current painter state (pops a saved state off the stack).
void save()
Saves the current painter state (pushes the state onto a stack).
ColorGroup
\value Disabled \value Active \value Inactive \value Normal synonym for Active
int row() const
Returns the row this persistent model index refers to.
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
\inmodule QtCore\reentrant
constexpr int x() const noexcept
Returns the x coordinate of this point.
constexpr int y() const noexcept
Returns the y coordinate of this point.
constexpr void setX(int x) noexcept
Sets the x coordinate of this point to the given x coordinate.
\inmodule QtCore\reentrant
bool intersects(const QRect &r) const noexcept
Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel...
constexpr void adjust(int x1, int y1, int x2, int y2) noexcept
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
constexpr void moveBottom(int pos) noexcept
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate.
constexpr void moveRight(int pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate.
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr void setRight(int pos) noexcept
Sets the right edge of the rectangle to the given x coordinate.
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void moveLeft(int pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate.
constexpr void setBottom(int pos) noexcept
Sets the bottom edge of the rectangle to the given y coordinate.
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr void setLeft(int pos) noexcept
Sets the left edge of the rectangle to the given x coordinate.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void moveTop(int pos) noexcept
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
constexpr void setTop(int pos) noexcept
Sets the top edge of the rectangle to the given y coordinate.
The QRegion class specifies a clip region for a painter.
The QResizeEvent class contains event parameters for resize events.
bool remove(const T &value)
iterator insert(const T &value)
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr int & rheight() noexcept
Returns a reference to the height.
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
constexpr int & rwidth() noexcept
Returns a reference to the width.
constexpr bool isNull() const noexcept
Returns true if both the width and height is 0; otherwise returns false.
constexpr void setHeight(int h) noexcept
Sets the height to the given height.
constexpr bool isValid() const noexcept
Returns true if both the width and height is equal to or greater than 0; otherwise returns false.
The QStyleOption class stores the parameters used by QStyle functions.
void initFrom(const QWidget *w)
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
@ SH_ScrollView_FrameOnlyAroundContents
@ PM_ScrollView_ScrollBarOverlap
bool isValid() const
Returns true if the storage type of this variant is not QMetaType::UnknownType; otherwise returns fal...
int toInt(bool *ok=nullptr) const
Returns the variant as an int if the variant has userType() \l QMetaType::Int, \l QMetaType::Bool,...
EGLImageKHR int int EGLuint64KHR * modifiers
list append(new Employee("Blackpool", "Stephen"))
QSet< QString >::iterator it
Combined button and popup list for selecting options.
constexpr const T & min(const T &a, const T &b)
QList< QModelIndex > QModelIndexList
static const QCssKnownValue positions[NumKnownPositionModes - 1]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
static int area(const QSize &s)
bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
QT_BEGIN_NAMESPACE bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLdouble GLdouble GLdouble GLdouble top
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLsizei GLsizei GLfloat distance
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLfloat GLfloat GLfloat GLfloat h
GLenum GLenum GLsizei void GLsizei void * column
GLdouble GLdouble GLdouble GLdouble q
GLenum GLenum GLsizei void * row
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static int segmentCount(const QPainterPath &path, qreal pathLength)
static QT_BEGIN_NAMESPACE QAsn1Element wrap(quint8 type, const QAsn1Element &child)
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
static QFixed flowPosition(const QTextFrame::iterator &it)
if(qFloatDistance(a, b)<(1<< 7))
[0]
QFileInfo info(fileName)
[8]
view viewport() -> scroll(dx, dy, deviceRect)
QItemSelection * selection
[0]
app setAttribute(Qt::AA_DontShowIconsInMenus)
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent