8#include <QtCore/qdebug.h>
9#include <QtCore/qloggingcategory.h>
10#include <QtCore/qcborarray.h>
11#include <QtCore/qcbormap.h>
12#include <QtCore/qcborvalue.h>
13#include <QtQml/QQmlInfo>
233 const int count = contentModel->count();
234 const bool horizontal = isHorizontal();
236 qCDebug(qlcQQuickSplitView) <<
"looking for fillWidth/Height item amongst" <<
count <<
"items";
239 int lastVisibleIndex = -1;
245 lastVisibleIndex =
i;
248 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
254 qCDebug(qlcQQuickSplitView) <<
"found fillWidth/Height item at index" << fillIndex;
259 if (fillIndex == -1) {
263 fillIndex = lastVisibleIndex != -1 ? lastVisibleIndex :
count - 1;
264 qCDebug(qlcQQuickSplitView) <<
"found no fillWidth/Height item; using last item at index" << fillIndex;
267 m_fillIndex = fillIndex;
286 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": split item " <<
item
287 <<
" at index " <<
index <<
" is not visible; skipping it and its handles (if any)";
293 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
302 if (isBeingResized) {
303 indexBeingResizedDueToDrag =
index;
304 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": dragging handle for item";
308 qreal requestedSize = 0;
309 if (isBeingResized) {
311 const qreal clampedMousePos = horizontal
321 const qreal mousePosRelativeToLeftHandleEdge = horizontal
326 const qreal pressedHandleSize = horizontal ? pressedHandleItem->
width() : pressedHandleItem->
height();
328 if (resizeLeftItem) {
334 leftEdge = horizontal
335 ? leftHandle->
x() + leftHandle->
width()
336 : leftHandle->
y() + leftHandle->
height();
341 const qreal pressedHandlePos = clampedMousePos - mousePosRelativeToLeftHandleEdge;
343 const qreal rightStop =
size - accumulated - pressedHandleSize;
344 qreal leftStop =
qMax(leftEdge, pressedHandlePos);
346 if (leftStop > rightStop)
347 leftStop = rightStop;
348 const qreal newHandlePos =
qBound(leftStop, pressedHandlePos, rightStop);
349 const qreal newItemSize = newHandlePos - leftEdge;
354 requestedSize = newItemSize;
356 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": resized (dragged) " <<
item
357 <<
" (clampedMousePos=" << clampedMousePos
358 <<
" pressedHandlePos=" << pressedHandlePos
359 <<
" accumulated=" << accumulated
360 <<
" leftEdge=" << leftEdge
361 <<
" leftStop=" << leftStop
362 <<
" rightStop=" << rightStop
363 <<
" newHandlePos=" << newHandlePos
364 <<
" newItemSize=" << newItemSize <<
")";
371 rightEdge = horizontal ? rightHandle->
x() : rightHandle->
y();
376 const qreal pressedHandlePos = clampedMousePos - mousePosRelativeToLeftHandleEdge;
378 const qreal leftStop = accumulated - pressedHandleSize;
379 qreal rightStop =
qMin(rightEdge - pressedHandleSize, pressedHandlePos);
381 if (rightStop < leftStop)
382 rightStop = leftStop;
383 const qreal newHandlePos =
qBound(leftStop, pressedHandlePos, rightStop);
384 const qreal newItemSize = rightEdge - (newHandlePos + pressedHandleSize);
389 requestedSize = newItemSize;
391 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": resized (dragged) " <<
item
392 <<
" (clampedMousePos=" << clampedMousePos
393 <<
" pressedHandlePos=" << pressedHandlePos
394 <<
" accumulated=" << accumulated
395 <<
" leftEdge=" << rightEdge
396 <<
" leftStop=" << leftStop
397 <<
" rightStop=" << rightStop
398 <<
" newHandlePos=" << newHandlePos
399 <<
" newItemSize=" << newItemSize <<
")";
404 requestedSize = horizontal
405 ? sizeData.effectivePreferredWidth : sizeData.effectivePreferredHeight;
412 sizeData.effectiveMinimumWidth,
414 sizeData.effectiveMaximumWidth);
419 sizeData.effectiveMinimumHeight,
421 sizeData.effectiveMaximumHeight);
431 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": resized split item " <<
item
433 <<
" minW=" << sizeData.effectiveMinimumWidth
434 <<
", minH=" << sizeData.effectiveMinimumHeight
435 <<
", prfW=" << sizeData.effectivePreferredWidth
436 <<
", prfH=" << sizeData.effectivePreferredHeight
437 <<
", maxW=" << sizeData.effectiveMaximumWidth
438 <<
", maxH=" << sizeData.effectiveMaximumHeight <<
")";
442 usedWidth += layoutData.
width;
444 usedHeight += layoutData.
height;
445 }
else if (indexBeingResizedDueToDrag !=
m_fillIndex) {
447 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": skipping fill item as we resize it last";
464 <<
": handle takes up " << handleItem->
width() <<
" width";
465 usedWidth += handleItem->
width();
468 <<
": handle takes up " << handleItem->
height() <<
" height";
469 usedHeight += handleItem->
height();
472 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
index <<
": handle is not visible; skipping it";
485 qreal &usedWidth,
qreal &usedHeight,
int indexBeingResizedDueToDrag)
491 <<
" is not visible or was already resized due to a drag;"
492 <<
" skipping it and its handles (if any)";
498 qmlAttachedPropertiesObject<QQuickSplitView>(fillItem,
false));
504 fillSizeData.effectiveMinimumWidth,
506 fillSizeData.effectiveMaximumWidth);
508 usedWidth += layoutData.
width;
512 fillSizeData.effectiveMinimumHeight,
514 fillSizeData.effectiveMaximumHeight);
515 usedHeight += layoutData.
height;
521 <<
": resized split fill item " << fillItem <<
" (effective"
522 <<
" minW=" << fillSizeData.effectiveMinimumWidth
523 <<
", minH=" << fillSizeData.effectiveMinimumHeight
524 <<
", maxW=" << fillSizeData.effectiveMaximumWidth
525 <<
", maxH=" << fillSizeData.effectiveMaximumHeight <<
")";
537 const qreal usedSize = horizontal ? usedWidth : usedHeight;
538 if (usedSize > maxSize) {
542 qreal delta = usedSize - maxSize;
552 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
554 const qreal maxReduce = horizontal ?
558 const qreal reduce = std::min(maxReduce, delta);
579 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
586 attached = qobject_cast<QQuickSplitViewAttached*>(
587 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
true));
623 qreal usedHeight = 0;
628 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
i <<
": split item " <<
item
629 <<
" is not visible; skipping it and its handles (if any)";
644 usedWidth +=
item->width();
646 usedHeight +=
item->height();
648 if (
Q_UNLIKELY(qlcQQuickSplitView().isDebugEnabled())) {
651 qmlAttachedPropertiesObject<QQuickSplitView>(fillItem,
false));
653 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
i <<
": positioned "
655 <<
" minW=" << sizeData.effectiveMinimumWidth
656 <<
", minH=" << sizeData.effectiveMinimumHeight
657 <<
", prfW=" << sizeData.effectivePreferredWidth
658 <<
", prfH=" << sizeData.effectivePreferredHeight
659 <<
", maxW=" << sizeData.effectiveMaximumWidth
660 <<
", maxH=" << sizeData.effectiveMaximumHeight <<
")";
667 handleItem->
setX(horizontal ? usedWidth : 0);
668 handleItem->
setY(horizontal ? 0 : usedHeight);
671 usedWidth += handleItem->
width();
673 usedHeight += handleItem->
height();
675 qCDebug(qlcQQuickSplitView).nospace() <<
" - " <<
i <<
": positioned handle " << handleItem;
723 qCDebug(qlcQQuickSplitView) <<
"laying out" <<
count <<
"split items"
724 << (horizontal ?
"horizontally" :
"vertically") <<
"in SplitView" << q_func();
728 qreal usedHeight = 0;
729 int indexBeingResizedDueToDrag = -1;
732 qCDebug(qlcQQuickSplitView) <<
" resizing:";
738 qCDebug(qlcQQuickSplitView).nospace()
739 <<
" - (remaining width=" <<
width - usedWidth
740 <<
" remaining height=" <<
height - usedHeight <<
")";
749 qCDebug(qlcQQuickSplitView) <<
" positioning:";
754 qCDebug(qlcQQuickSplitView).nospace() <<
"finished layouting";
766 qCDebug(qlcQQuickSplitView) <<
"creating" <<
count <<
"handles";
778 qCDebug(qlcQQuickSplitView) <<
"- creating handle for split item at index" <<
index
779 <<
"from handle component" <<
m_handle;
791 qCDebug(qlcQQuickSplitView) <<
"- successfully created handle item" << handleItem <<
"for split item at index" <<
index;
803 updateCursorHandle(handleItem);
813 qCDebug(qlcQQuickSplitView) <<
"removing" << excess <<
"excess handles from the end of our list";
814 for (; excess > 0; --excess) {
824 for (
int i = firstIndex;
i <= lastIndex; ++
i) {
832 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
845 if (
i < lastIndex || lastIndex < contentModel->
count() - 1) {
881 ? attachedPrivate->
m_maximumWidth : std::numeric_limits<qreal>::infinity();
887 ? attachedPrivate->
m_maximumHeight : std::numeric_limits<qreal>::infinity();
937void QQuickSplitViewPrivate::updateCursorHandle(
QQuickItem *handleItem)
956 int lastVisibleItemIndex = -1;
957 for (
int i =
count - 1;
i >= 0; --
i) {
960 lastVisibleItemIndex =
i;
965 for (
int i = 0;
i <
count - 1; ++
i) {
968 if (
i != lastVisibleItemIndex)
972 qCDebug(qlcQQuickSplitView) <<
"set visible property of handle" << handleItem <<
"at index"
979 qCDebug(qlcQQuickSplitViewPointer) <<
"updating hovered handle after" << hoveredItem <<
"was hovered";
987 if (oldHoveredHandleIndex != -1) {
990 qmlAttachedPropertiesObject<QQuickSplitHandleAttached>(oldHoveredHandle,
true));
992 qCDebug(qlcQQuickSplitViewPointer) <<
"handle item at index" << oldHoveredHandleIndex <<
"is no longer hovered";
997 qmlAttachedPropertiesObject<QQuickSplitHandleAttached>(hoveredItem,
true));
1001 qCDebug(qlcQQuickSplitViewPointer) <<
"either there is no hovered item or" << hoveredItem <<
"is not a handle";
1012 emit q->resizingChanged();
1036 if (pressedHandleIndex != -1) {
1047 if (nextItem->isVisible()) {
1048 rightOrBottomItem = nextItem;
1054 "Failed to find a visible item to the right/bottom of the one that was pressed at index %1; this shouldn't happen")
1065 qmlAttachedPropertiesObject<QQuickSplitHandleAttached>(pressedItem,
true));
1070 qCDebug(qlcQQuickSplitViewPointer).nospace() <<
"handled press -"
1073 <<
" item=" << leftOrTopItem
1076 <<
" item=" << rightOrBottomItem;
1101 qmlAttachedPropertiesObject<QQuickSplitHandleAttached>(pressedHandle,
true));
1121 qCDebug(qlcQQuickSplitView) <<
"visible property of split item"
1128 if (handleIndex != -1) {
1132 qCDebug(qlcQQuickSplitView) <<
"set visible property of handle item"
1133 << handleItem <<
"at index" << handleIndex <<
"to" <<
item->
isVisible();
1158 return splitView->d_func();
1182 for (
int i = 0;
i <
d->contentModel->count(); ++
i) {
1184 d->removeImplicitSizeListener(
item);
1202 return d->m_orientation;
1213#if QT_CONFIG(cursor)
1215 d->updateCursorHandle(handleItem);
1237 return d->m_resizing;
1288 d->destroyHandles();
1294 d->updateHandleVisibilities();
1311 return !
d->m_handleItems.contains(
item);
1328#if QT_CONFIG(cborstreamwriter)
1330 qCDebug(qlcQQuickSplitViewState) <<
"saving state for split items in" <<
this;
1334 for (
int i = 0;
i <
d->contentModel->count(); ++
i) {
1337 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
1355 qCDebug(qlcQQuickSplitViewState).nospace() <<
"- wrote preferredWidth of "
1361 qCDebug(qlcQQuickSplitViewState).nospace() <<
"- wrote preferredHeight of "
1365 cborArray.
append(cborMap);
1369 qCDebug(qlcQQuickSplitViewState) <<
"the resulting byte array is:" << byteArray;
1393 const QCborValue cborValue(QCborValue::fromCbor(cborByteArray, &parserError));
1399 qCDebug(qlcQQuickSplitViewState) <<
"restoring state for split items of" <<
this
1400 <<
"from the following string:" <<
state;
1403 const int ourCount =
d->contentModel->count();
1405 if (cborArray.
size() > ourCount) {
1406 qmlWarning(
this) <<
"Error reading SplitView state: expected "
1407 << ourCount <<
" or less split items but got " << cborArray.
size();
1422 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
true));
1423 if (isPreferredWidthSet) {
1427 if (isPreferredHeightSet) {
1433 qCDebug(qlcQQuickSplitViewState).nospace()
1434 <<
"- restored the following state for split item " <<
item <<
" at index " << splitItemIndex
1448 d->updateFillIndex();
1458 d->updateHoveredHandle(hoveredItem);
1466 d->updateHoveredHandle(
nullptr);
1472 qCDebug(qlcQQuickSplitViewPointer) <<
"childMouseEventFilter called with" <<
item <<
event;
1476 const auto &eventPoint = pointerEvent->
points().
first();
1478 const auto timestamp = pointerEvent->timestamp();
1480 switch (
event->type()) {
1482 d->handlePress(point, timestamp);
1485 if (
d->m_pressedHandleIndex != -1)
1486 item->setKeepMouseGrab(
true);
1489 d->handleRelease(point, timestamp);
1492 d->handleMove(point, timestamp);
1495 if (pointerEvent->pointCount() == 1) {
1496 d->handlePress(point, timestamp);
1500 if (
d->m_pressedHandleIndex != -1) {
1501 item->setKeepTouchGrab(
true);
1502 pointerEvent->setExclusiveGrabber(eventPoint,
item);
1507 if (pointerEvent->pointCount() == 1)
1508 d->handleRelease(point, timestamp);
1511 if (pointerEvent->pointCount() == 1)
1512 d->handleMove(point, timestamp);
1521 if (
d->m_pressedHandleIndex != -1)
1541 const int count =
d->contentModel->count();
1542 qCDebug(qlcQQuickSplitView).nospace() <<
"split item " <<
item <<
" added at index " <<
index
1543 <<
"; there are now " <<
count <<
" items";
1546 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
1557 d->addImplicitSizeListener(
item);
1559 d->updateHandleVisibilities();
1560 d->updateFillIndex();
1570 qCDebug(qlcQQuickSplitView) <<
"split item" <<
item <<
"moved to index" <<
index;
1572 d->updateHandleVisibilities();
1573 d->updateFillIndex();
1583 qCDebug(qlcQQuickSplitView).nospace() <<
"split item " <<
item <<
" removed from index " <<
index
1584 <<
"; there are now " <<
d->contentModel->count() <<
" items";
1587 if (
d->m_hoveredHandleIndex != -1 ||
d->m_pressedHandleIndex != -1) {
1588 const int handleIndex =
d->m_hoveredHandleIndex != -1 ?
d->m_hoveredHandleIndex :
d->m_pressedHandleIndex;
1589 QQuickItem *itemHandle =
d->m_handleItems.at(handleIndex);
1591 qmlAttachedPropertiesObject<QQuickSplitHandleAttached>(itemHandle,
false));
1592 if (handleAttached) {
1594 handleAttachedPrivate->setHovered(
false);
1595 handleAttachedPrivate->setPressed(
false);
1598 d->m_hoveredHandleIndex = -1;
1599 d->m_pressedHandleIndex = -1;
1604 qmlAttachedPropertiesObject<QQuickSplitView>(
item,
false));
1608 d->removeImplicitSizeListener(
item);
1610 d->removeExcessHandles();
1611 d->updateHandleVisibilities();
1612 d->updateFillIndex();
1616#if QT_CONFIG(accessibility)
1617QAccessible::Role QQuickSplitView::accessibleRole()
const
1619 return QAccessible::Pane;
1629 qmlWarning(
parent) <<
"SplitView: attached properties can only be used on Items";
1636 d->m_splitItem =
item;
1649 qmlWarning(
parent) <<
"SplitView: attached properties must be accessed through a direct child of SplitView";
1653 d->setView(splitView);
1665 return d->m_splitView;
1684 return d->m_minimumWidth;
1690 d->m_isMinimumWidthSet =
true;
1694 d->m_minimumWidth =
width;
1695 d->requestLayoutView();
1704 d->m_isMinimumWidthSet =
false;
1705 d->m_minimumWidth = -1;
1708 if (
qFuzzyCompare(newEffectiveMinimumWidth, oldEffectiveMinimumWidth))
1711 d->requestLayoutView();
1731 return d->m_minimumHeight;
1737 d->m_isMinimumHeightSet =
true;
1742 d->requestLayoutView();
1751 d->m_isMinimumHeightSet =
false;
1752 d->m_minimumHeight = -1;
1755 if (
qFuzzyCompare(newEffectiveMinimumHeight, oldEffectiveMinimumHeight))
1758 d->requestLayoutView();
1785 return d->m_preferredWidth;
1791 d->m_isPreferredWidthSet =
true;
1795 const bool ignoreNextLayoutRequest = splitViewPrivate && splitViewPrivate->m_ignoreNextLayoutRequest;
1796 if (splitViewPrivate)
1797 splitViewPrivate->m_ignoreNextLayoutRequest =
false;
1802 d->m_preferredWidth =
width;
1804 if (!ignoreNextLayoutRequest) {
1807 d->requestLayoutView();
1819 d->m_isPreferredWidthSet =
false;
1820 d->m_preferredWidth = -1;
1824 if (
qFuzzyCompare(newEffectivePreferredWidth, oldEffectivePreferredWidth))
1827 d->requestLayoutView();
1854 return d->m_preferredHeight;
1860 d->m_isPreferredHeightSet =
true;
1864 const bool ignoreNextLayoutRequest = splitViewPrivate && splitViewPrivate->m_ignoreNextLayoutRequest;
1865 if (splitViewPrivate)
1866 splitViewPrivate->m_ignoreNextLayoutRequest =
false;
1871 d->m_preferredHeight =
height;
1873 if (!ignoreNextLayoutRequest) {
1876 d->requestLayoutView();
1888 d->m_isPreferredHeightSet =
false;
1889 d->m_preferredHeight = -1;
1893 if (
qFuzzyCompare(newEffectivePreferredHeight, oldEffectivePreferredHeight))
1896 d->requestLayoutView();
1916 return d->m_maximumWidth;
1922 d->m_isMaximumWidthSet =
true;
1926 d->m_maximumWidth =
width;
1927 d->requestLayoutView();
1936 d->m_isMaximumWidthSet =
false;
1937 d->m_maximumWidth = -1;
1940 if (
qFuzzyCompare(newEffectiveMaximumWidth, oldEffectiveMaximumWidth))
1943 d->requestLayoutView();
1963 return d->m_maximumHeight;
1969 d->m_isMaximumHeightSet =
true;
1974 d->requestLayoutView();
1983 d->m_isMaximumHeightSet =
false;
1984 d->m_maximumHeight = -1;
1987 if (
qFuzzyCompare(newEffectiveMaximumHeight, oldEffectiveMaximumHeight))
1990 d->requestLayoutView();
2013 return d->m_fillWidth;
2019 d->m_isFillWidthSet =
true;
2020 if (
fill ==
d->m_fillWidth)
2023 d->m_fillWidth =
fill;
2026 d->requestLayoutView();
2049 return d->m_fillHeight;
2055 d->m_isFillHeightSet =
true;
2056 if (
fill ==
d->m_fillHeight)
2059 d->m_fillHeight =
fill;
2060 if (
d->m_splitView &&
d->m_splitView->orientation() ==
Qt::Vertical)
2062 d->requestLayoutView();
2067 : m_fillWidth(
false)
2068 , m_fillHeight(
false)
2069 , m_isFillWidthSet(
false)
2070 , m_isFillHeightSet(
false)
2071 , m_isMinimumWidthSet(
false)
2072 , m_isMinimumHeightSet(
false)
2073 , m_isPreferredWidthSet(
false)
2074 , m_isPreferredHeightSet(
false)
2075 , m_isMaximumWidthSet(
false)
2076 , m_isMaximumHeightSet(
false)
2078 , m_minimumHeight(0)
2079 , m_preferredWidth(-1)
2080 , m_preferredHeight(-1)
2081 , m_maximumWidth(
std::numeric_limits<
qreal>::infinity())
2082 , m_maximumHeight(
std::numeric_limits<
qreal>::infinity())
2093 qCDebug(qlcQQuickSplitView) <<
"set SplitView" << newView <<
"on attached object" <<
this;
2094 emit q->viewChanged();
2105 return attached->d_func();
2110 return attached->d_func();
2126 emit q->hoveredChanged();
2136 emit q->pressedChanged();
2141 return attached->d_func();
2146 return attached->d_func();
2179 return d->m_hovered;
2192 return d->m_pressed;
2202#include "moc_qquicksplitview_p.cpp"
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
\inmodule QtCore\reentrant
const_iterator constEnd() const
Returns an array iterator pointing to just after the last element in this array.
const_iterator constBegin() const
Returns an array iterator pointing to the first item in this array.
void append(const QCborValue &value)
QCborValue toCborValue() const
Explicitly construcuts a \l QCborValue object that represents this array.
qsizetype size() const noexcept
Returns the size of this array.
\inmodule QtCore\reentrant
QCborValue value(qint64 key) const
Returns the QCborValue element in this map that corresponds to key key, if there is one.
bool contains(qint64 key) const
Returns true if this map contains a key-value pair identified by key key.
\inmodule QtCore\reentrant
QCborArray toArray() const
qint64 toInteger(qint64 defaultValue=0) const
Returns the integer value stored in this QCborValue, if it is of the integer type.
double toDouble(double defaultValue=0) const
Returns the floating point value stored in this QCborValue, if it is of the Double type.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
bool isVisible() const
Returns true if the item is visible; otherwise, false is returned.
qsizetype size() const noexcept
bool isEmpty() const noexcept
iterator insert(qsizetype i, parameter_type t)
const_reference at(qsizetype i) const noexcept
void reserve(qsizetype size)
QObject * parent() const
Returns a pointer to the parent object.
void setParent(QObject *parent)
Makes the object a child of parent.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
A base class for pointer events.
const QList< QEventPoint > & points() const
Returns a list of points in this pointer event.
The QQmlComponent class encapsulates a QML component definition.
virtual QObject * beginCreate(QQmlContext *)
Create an object instance from this component, within the specified context.
virtual void completeCreate()
This method provides advanced control over component instance creation.
QQmlContext * creationContext() const
Returns the QQmlContext the component was created in.
The QQmlContext class defines a context within a QML engine.
int count() const override
\qmlproperty int QtQml.Models::ObjectModel::count
int indexOf(QObject *object, QObject *objectContext) const override
QQmlObjectModel * contentModel
virtual bool handlePress(const QPointF &point, ulong timestamp)
virtual QQuickItem * getContentItem()
virtual bool handleRelease(const QPointF &point, ulong timestamp)
virtual bool handleMove(const QPointF &point, ulong timestamp)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
quint32 componentComplete
QQmlListProperty< QObject > data()
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setFiltersChildMouseEvents(bool filter)
Sets whether pointer events intended for this item's children should be filtered through this item.
Q_INVOKABLE QPointF mapFromItem(const QQuickItem *item, const QPointF &point) const
Maps the given point in item's coordinate system to the equivalent point within this item's coordinat...
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
void setParentItem(QQuickItem *parent)
QString state() const
\qmlproperty string QtQuick::Item::state
virtual void hoverMoveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
qreal y
Defines the item's y position relative to its parent.
Q_INVOKABLE QQuickItem * childAt(qreal x, qreal y) const
\qmlmethod QtQuick::Item::childAt(real x, real y)
void setAcceptedMouseButtons(Qt::MouseButtons buttons)
Sets the mouse buttons accepted by this item to buttons.
qreal width
This property holds the width of this item.
void setKeepMouseGrab(bool)
Sets whether the mouse input should remain exclusively with this item.
qreal height
This property holds the height of this item.
virtual bool childMouseEventFilter(QQuickItem *, QEvent *)
Reimplement this method to filter the pointer events that are received by this item's children.
void setHovered(bool hovered)
void setPressed(bool pressed)
QQuickSplitHandleAttachedPrivate()
static QQuickSplitHandleAttachedPrivate * get(QQuickSplitHandleAttached *attached)
bool isHovered() const
Provides attached properties for SplitView handles.
QQuickSplitHandleAttached(QObject *parent=nullptr)
static QQuickSplitHandleAttached * qmlAttachedProperties(QObject *object)
bool isPressed() const
\qmlattachedproperty bool QtQuick.Controls::SplitHandle::pressed
unsigned m_isPreferredHeightSet
void setView(QQuickSplitView *newView)
static QQuickSplitViewAttachedPrivate * get(QQuickSplitViewAttached *attached)
unsigned m_isPreferredWidthSet
unsigned m_isMaximumWidthSet
QQuickSplitViewAttachedPrivate()
unsigned m_isMinimumWidthSet
QQuickSplitView * m_splitView
unsigned m_isMinimumHeightSet
unsigned m_isMaximumHeightSet
void preferredHeightChanged()
void setMinimumHeight(qreal height)
void resetMaximumHeight()
void setMinimumWidth(qreal width)
void setMaximumHeight(qreal height)
QQuickSplitViewAttached(QObject *parent=nullptr)
void resetMinimumHeight()
void minimumWidthChanged()
void minimumHeightChanged()
void resetPreferredWidth()
void resetPreferredHeight()
void setPreferredWidth(qreal width)
void preferredWidthChanged()
void setPreferredHeight(qreal height)
void maximumHeightChanged()
void setMaximumWidth(qreal width)
void setFillWidth(bool fill)
void maximumWidthChanged()
void setFillHeight(bool fill)
void resizeHandle(QQuickItem *handleItem)
void setResizing(bool resizing)
qreal m_rightOrBottomItemSizeBeforePress
void updatePolish() override
bool handlePress(const QPointF &point, ulong timestamp) override
qreal accumulatedSize(int firstIndex, int lastIndex) const
void itemImplicitHeightChanged(QQuickItem *item) override
void itemVisibilityChanged(QQuickItem *item) override
bool handleRelease(const QPointF &point, ulong timestamp) override
void itemImplicitWidthChanged(QQuickItem *item) override
bool isHorizontal() const
QHash< QQuickItem *, LayoutData > m_layoutData
void updateHandleVisibilities()
void layoutResizeFillItem(QQuickItem *fillItem, qreal &usedWidth, qreal &usedHeight, int indexBeingResizedDueToDrag)
int handleIndexForSplitIndex(int splitIndex) const
Qt::Orientation m_orientation
bool handleMove(const QPointF &point, ulong timestamp) override
int m_nextVisibleIndexAfterPressedHandle
void limitAndApplySizes(qreal usedWidth, qreal usedHeight)
QPointF m_handlePosBeforePress
void layoutResizeSplitItems(qreal &usedWidth, qreal &usedHeight, int &indexBeingResizedDueToDrag)
EffectiveSizeData effectiveSizeData(const QQuickItemPrivate *itemPrivate, const QQuickSplitViewAttached *attached) const
void layoutPositionItems(const QQuickItem *fillItem)
void updateHoveredHandle(QQuickItem *hoveredItem)
QList< QQuickItem * > m_handleItems
bool m_ignoreNextLayoutRequest
void removeExcessHandles()
qreal m_leftOrTopItemSizeBeforePress
static QQuickSplitViewPrivate * get(QQuickSplitView *splitView)
void createHandleItem(int index)
QQuickItem * getContentItem() override
void updateFillIndex()
Lays out items with a draggable splitter between each item.
static QQuickSplitViewAttached * qmlAttachedProperties(QObject *object)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void setOrientation(Qt::Orientation orientation)
~QQuickSplitView() override
void setHandle(QQmlComponent *handle)
void itemAdded(int index, QQuickItem *item) override
void hoverLeaveEvent(QHoverEvent *event) override
This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
void hoverMoveEvent(QHoverEvent *event) override
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
Q_INVOKABLE QVariant saveState()
\qmlmethod var QtQuick.Controls::SplitView::saveState()
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
bool isContent(QQuickItem *item) const override
void orientationChanged()
QQmlComponent * handle
\qmlproperty Component QtQuick.Controls::SplitView::handle
Qt::Orientation orientation
void itemRemoved(int index, QQuickItem *item) override
bool childMouseEventFilter(QQuickItem *item, QEvent *event) override
Reimplement this method to filter the pointer events that are received by this item's children.
Q_INVOKABLE bool restoreState(const QVariant &state)
\qmlmethod bool QtQuick.Controls::SplitView::restoreState(state)
bool isResizing() const
\qmlproperty bool QtQuick.Controls::SplitView::resizing \readonly
QQuickSplitView(QQuickItem *parent=nullptr)
void itemMoved(int index, QQuickItem *item) override
\inmodule QtCore\reentrant
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qDeleteAll(list.begin(), list.end())
QSet< QString >::iterator it
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
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)
GLuint64 GLenum void * handle
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const void * pointer
GLdouble GLdouble GLdouble GLdouble q
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
qreal effectiveMaximumHeight(const QQuickSplitViewAttachedPrivate *attachedPrivate)
qreal effectivePreferredHeight(const QQuickSplitViewAttachedPrivate *attachedPrivate, const QQuickItemPrivate *itemPrivate)
qreal effectivePreferredWidth(const QQuickSplitViewAttachedPrivate *attachedPrivate, const QQuickItemPrivate *itemPrivate)
qreal effectiveMinimumWidth(const QQuickSplitViewAttachedPrivate *attachedPrivate)
qreal effectiveMaximumWidth(const QQuickSplitViewAttachedPrivate *attachedPrivate)
qreal effectiveMinimumHeight(const QQuickSplitViewAttachedPrivate *attachedPrivate)
#define Q_ASSERT_X(cond, x, msg)
#define qPrintable(string)
QLatin1StringView QLatin1String
\inmodule QtCore\reentrant
QString errorString() const
\variable QCborParserError::offset
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent