diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..69fc26f6e215a6ae043704b2c6aec63b8c9c799f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickitem_p.h @@ -0,0 +1,118 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QACCESSIBLEQUICKITEM_H +#define QACCESSIBLEQUICKITEM_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(accessibility) + +class QTextDocument; + +class Q_QUICK_EXPORT QAccessibleQuickItem : public QAccessibleObject, public QAccessibleActionInterface, public QAccessibleValueInterface, public QAccessibleTextInterface +{ +public: + QAccessibleQuickItem(QQuickItem *item); + + QWindow *window() const override; + + QRect rect() const override; + QRect viewRect() const; + + bool clipsChildren() const; + QAccessibleInterface *childAt(int x, int y) const override; + + QAccessibleInterface *parent() const override; + QAccessibleInterface *child(int index) const override; + int childCount() const override; + int indexOfChild(const QAccessibleInterface *iface) const override; + QList childItems() const; + + QAccessible::State state() const override; + QAccessible::Role role() const override; + QString text(QAccessible::Text) const override; + void setText(QAccessible::Text, const QString &text) override; + + bool isAccessible() const; + + // Action Interface + QStringList actionNames() const override; + void doAction(const QString &actionName) override; + QStringList keyBindingsForAction(const QString &actionName) const override; + + // Value Interface + QVariant currentValue() const override; + void setCurrentValue(const QVariant &value) override; + QVariant maximumValue() const override; + QVariant minimumValue() const override; + QVariant minimumStepSize() const override; + + + // Text Interface + void selection(int selectionIndex, int *startOffset, int *endOffset) const override; + int selectionCount() const override; + void addSelection(int startOffset, int endOffset) override; + void removeSelection(int selectionIndex) override; + void setSelection(int selectionIndex, int startOffset, int endOffset) override; + + // cursor + int cursorPosition() const override; + void setCursorPosition(int position) override; + + // text + QString text(int startOffset, int endOffset) const override; + QString textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, + int *startOffset, int *endOffset) const override; + QString textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, + int *startOffset, int *endOffset) const override; + QString textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, + int *startOffset, int *endOffset) const override; + int characterCount() const override; + + // character <-> geometry + QRect characterRect(int /* offset */) const override { return QRect(); } + int offsetAtPoint(const QPoint & /* point */) const override { return -1; } + + void scrollToSubstring(int /* startIndex */, int /* endIndex */) override {} + QString attributes(int /* offset */, int *startOffset, int *endOffset) const override + { *startOffset = 0; *endOffset = 0; return QString(); } + + QTextDocument *textDocument() const; + +protected: + QQuickItem *item() const { return static_cast(object()); } + void *interface_cast(QAccessible::InterfaceType t) override; + +private: + // for Text nodes: + QTextDocument *m_doc; + typedef QHash ChildCache; + mutable ChildCache m_childToId; + +}; + +QRect itemScreenRect(QQuickItem *item); +QList accessibleUnignoredChildren(QQuickItem *item, bool paintOrder = false); + +#endif // accessibility + +QT_END_NAMESPACE + +#endif // QACCESSIBLEQUICKITEM_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..28fca9323426c3555d98117051121082e87c97fb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qaccessiblequickview_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QAccessibleQuickView_H +#define QAccessibleQuickView_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(accessibility) + +class Q_QUICK_EXPORT QAccessibleQuickWindow : public QAccessibleObject +{ +public: + QAccessibleQuickWindow(QQuickWindow *object); + + QAccessibleInterface *parent() const override; + QAccessibleInterface *child(int index) const override; + QAccessibleInterface *focusChild() const override; + + QAccessible::Role role() const override; + QAccessible::State state() const override; + QRect rect() const override; + + int childCount() const override; + int indexOfChild(const QAccessibleInterface *iface) const override; + QString text(QAccessible::Text text) const override; + QAccessibleInterface *childAt(int x, int y) const override; + +private: + QQuickWindow *window() const override { return static_cast(object()); } + QList rootItems() const; +}; + +#endif // accessibility + +QT_END_NAMESPACE + +#endif // QAccessibleQuickView_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qqmldesignermetaobject_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qqmldesignermetaobject_p.h new file mode 100644 index 0000000000000000000000000000000000000000..917d589cfc4bbf38a6d336bc896f49df05222e4f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qqmldesignermetaobject_p.h @@ -0,0 +1,74 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef NODEINSTANCEMETAOBJECT_H +#define NODEINSTANCEMETAOBJECT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include +#include +#include +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +struct MetaPropertyData; + +class QQmlDesignerMetaObject : public QQmlOpenMetaObject +{ +public: + ~QQmlDesignerMetaObject(); + + static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject*, const QQuickDesignerSupport::PropertyName &propertyName)); + +protected: + static QQmlDesignerMetaObject* getNodeInstanceMetaObject(QObject *object, QQmlEngine *engine); + + void createNewDynamicProperty(const QString &name); + int createProperty(const char *name, const char *passAlong) override; + int openMetaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a); + int metaCall(QObject *o, QMetaObject::Call _c, int _id, void **_a) override; + void notifyPropertyChange(int id); + void setValue(int id, const QVariant &value); + QVariant propertyWriteValue(int, const QVariant &) override; + + QObject *myObject() const { return object(); } + + QDynamicMetaObjectData *dynamicMetaObjectParent() const; + + int propertyOffset() const; + + int count() const; + QByteArray name(int) const; + +private: + QQmlDesignerMetaObject(QObject *object, QQmlEngine *engine); + void init(QObject *); + + QQmlPropertyCache::Ptr cache() const; + + QPointer m_context; + QScopedPointer m_data; + + friend class QQuickDesignerSupportProperties; +}; + +QT_END_NAMESPACE + +#endif // NODEINSTANCEMETAOBJECT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquadpath_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquadpath_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4120bd450a266fb7667c61b47f0f9f513596cf6c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquadpath_p.h @@ -0,0 +1,341 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUADPATH_P_H +#define QQUADPATH_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuadPath +{ +public: + // This is a copy of the flags in QQuickShapePath ### TODO: use a common definition + enum PathHint : quint8 { + PathLinear = 0x1, + PathQuadratic = 0x2, + PathConvex = 0x4, + PathFillOnRight = 0x8, + PathSolid = 0x10, + PathNonIntersecting = 0x20, + PathNonOverlappingControlPointTriangles = 0x40 + }; + Q_DECLARE_FLAGS(PathHints, PathHint) + + class Q_QUICK_EXPORT Element + { + public: + Element () + : m_isSubpathStart(false), m_isSubpathEnd(false), m_isLine(false) + { + } + + Element (QVector2D s, QVector2D c, QVector2D e) + : sp(s), cp(c), ep(e), m_isSubpathStart(false), m_isSubpathEnd(false), m_isLine(false) + { + } + + bool isSubpathStart() const + { + return m_isSubpathStart; + } + + bool isSubpathEnd() const + { + return m_isSubpathEnd; + } + + bool isLine() const + { + return m_isLine; + } + + bool isConvex() const + { + return m_curvatureFlags & Convex; + } + + QVector2D startPoint() const + { + return sp; + } + + QVector2D controlPoint() const + { + return cp; + } + + QVector2D endPoint() const + { + return ep; + } + + QVector2D midPoint() const + { + return isLine() ? 0.5f * (sp + ep) : (0.25f * sp) + (0.5f * cp) + (0.25 * ep); + } + + /* For a curve, returns the control point. For a line, returns an arbitrary point on the + * inside side of the line (assuming the curvature has been set for the path). The point + * doesn't need to actually be inside the shape: it just makes for easier calculations + * later when it is at the same side as the fill. */ + QVector2D referencePoint() const + { + if (isLine()) { + QVector2D normal(sp.y() - ep.y(), ep.x() - sp.x()); + return m_curvatureFlags & Element::FillOnRight ? sp + normal : sp - normal; + } else { + return cp; + } + } + + Element segmentFromTo(float t0, float t1) const; + + Element reversed() const; + + int childCount() const { return m_numChildren; } + + int indexOfChild(int childNumber) const + { + Q_ASSERT(childNumber >= 0 && childNumber < childCount()); + return -(m_firstChildIndex + 1 + childNumber); + } + + QVector2D pointAtFraction(float t) const; + + QVector2D tangentAtFraction(float t) const + { + return isLine() ? (ep - sp) : ((1 - t) * 2 * (cp - sp)) + (t * 2 * (ep - cp)); + } + + QVector2D normalAtFraction(float t) const + { + const QVector2D tan = tangentAtFraction(t); + return QVector2D(-tan.y(), tan.x()); + } + + float extent() const; + + void setAsConvex(bool isConvex) + { + if (isConvex) + m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags | Element::Convex); + else + m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags & ~Element::Convex); + } + + void setFillOnRight(bool isFillOnRight) + { + if (isFillOnRight) + m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags | Element::FillOnRight); + else + m_curvatureFlags = Element::CurvatureFlags(m_curvatureFlags & ~Element::FillOnRight); + } + + bool isFillOnRight() const { return m_curvatureFlags & FillOnRight; } + + bool isControlPointOnLeft() const + { + return isPointOnLeft(cp, sp, ep); + } + + enum CurvatureFlags : quint8 { + CurvatureUndetermined = 0, + FillOnRight = 1, + Convex = 2 + }; + + enum FillSide : quint8 { + FillSideUndetermined = 0, + FillSideRight = 1, + FillSideLeft = 2, + FillSideBoth = 3 + }; + + private: + int intersectionsAtY(float y, float *fractions, bool swapXY = false) const; + + QVector2D sp; + QVector2D cp; + QVector2D ep; + int m_firstChildIndex = 0; + quint8 m_numChildren = 0; + CurvatureFlags m_curvatureFlags = CurvatureUndetermined; + quint8 m_isSubpathStart : 1; + quint8 m_isSubpathEnd : 1; + quint8 m_isLine : 1; + friend class QQuadPath; + friend Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath::Element &); + }; + + void moveTo(const QVector2D &to) + { + m_subPathToStart = true; + m_currentPoint = to; + } + + void lineTo(const QVector2D &to) + { + addElement({}, to, true); + } + + void quadTo(const QVector2D &control, const QVector2D &to) + { + addElement(control, to); + } + + Element &elementAt(int i) + { + return i < 0 ? m_childElements[-(i + 1)] : m_elements[i]; + } + + const Element &elementAt(int i) const + { + return i < 0 ? m_childElements[-(i + 1)] : m_elements[i]; + } + + int indexOfChildAt(int i, int childNumber) const + { + return elementAt(i).indexOfChild(childNumber); + } + + QRectF controlPointRect() const; + + Qt::FillRule fillRule() const { return m_windingFill ? Qt::WindingFill : Qt::OddEvenFill; } + void setFillRule(Qt::FillRule rule) { m_windingFill = (rule == Qt::WindingFill); } + + void reserve(int size) { m_elements.reserve(size); } + int elementCount() const { return m_elements.size(); } + bool isEmpty() const { return m_elements.size() == 0; } + int elementCountRecursive() const; + + static QQuadPath fromPainterPath(const QPainterPath &path, PathHints hints = {}); + QPainterPath toPainterPath() const; + QString asSvgString() const; + + QQuadPath subPathsClosed(bool *didClose = nullptr) const; + void addCurvatureData(); + QQuadPath flattened() const; + QQuadPath dashed(qreal lineWidth, const QList &dashPattern, qreal dashOffset = 0) const; + void splitElementAt(int index); + bool contains(const QVector2D &point) const; + bool contains(const QVector2D &point, int fromIndex, int toIndex) const; + Element::FillSide fillSideOf(int elementIdx, float elementT) const; + + template + void iterateChildrenOf(Element &e, Func &&lambda) + { + const int lastChildIndex = e.m_firstChildIndex + e.childCount() - 1; + for (int i = e.m_firstChildIndex; i <= lastChildIndex; i++) { + Element &c = m_childElements[i]; + if (c.childCount() > 0) + iterateChildrenOf(c, lambda); + else + lambda(c, -(i + 1)); + } + } + + template + void iterateChildrenOf(const Element &e, Func &&lambda) const + { + const int lastChildIndex = e.m_firstChildIndex + e.childCount() - 1; + for (int i = e.m_firstChildIndex; i <= lastChildIndex; i++) { + const Element &c = m_childElements[i]; + if (c.childCount() > 0) + iterateChildrenOf(c, lambda); + else + lambda(c, -(i + 1)); + } + } + + template + void iterateElements(Func &&lambda) + { + for (int i = 0; i < m_elements.size(); i++) { + Element &e = m_elements[i]; + if (e.childCount() > 0) + iterateChildrenOf(e, lambda); + else + lambda(e, i); + } + } + + template + void iterateElements(Func &&lambda) const + { + for (int i = 0; i < m_elements.size(); i++) { + const Element &e = m_elements[i]; + if (e.childCount() > 0) + iterateChildrenOf(e, lambda); + else + lambda(e, i); + } + } + + static QVector2D closestPointOnLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep); + static bool isPointOnLeft(const QVector2D &p, const QVector2D &sp, const QVector2D &ep); + static bool isPointOnLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep); + static bool isPointNearLine(const QVector2D &p, const QVector2D &sp, const QVector2D &ep); + + bool testHint(PathHint hint) const + { + return m_hints.testFlag(hint); + } + + void setHint(PathHint hint, bool on = true) + { + m_hints.setFlag(hint, on); + } + + PathHints pathHints() const + { + return m_hints; + } + + void setPathHints(PathHints newHints) + { + m_hints = newHints; + } + +private: + void addElement(const QVector2D &control, const QVector2D &to, bool isLine = false); + void addElement(const Element &e); + Element::CurvatureFlags coordinateOrderOfElement(const Element &element) const; + + friend Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath &); + + QList m_elements; + QList m_childElements; + QVector2D m_currentPoint; + bool m_subPathToStart = true; + bool m_windingFill = false; + PathHints m_hints; + + friend class QSGCurveProcessor; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuadPath::PathHints); + +Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath::Element &); +Q_QUICK_EXPORT QDebug operator<<(QDebug, const QQuadPath &); + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickabstractpaletteprovider_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickabstractpaletteprovider_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2a6286329dd62e0806ba1b17b0d327a5be2fee5e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickabstractpaletteprovider_p.h @@ -0,0 +1,31 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKABSTRACTPALETTEPROVIDER_P_H +#define QQUICKABSTRACTPALETTEPROVIDER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractPaletteProvider +{ +public: + virtual ~QQuickAbstractPaletteProvider() = default; + virtual QPalette defaultPalette() const = 0; + virtual QPalette parentPalette(const QPalette &fallbackPalette) const { return fallbackPalette; } +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTPALETTEPROVIDER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessibleattached_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessibleattached_p.h new file mode 100644 index 0000000000000000000000000000000000000000..277d8e082d6d33ba495e599baff256e8d926294d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessibleattached_p.h @@ -0,0 +1,250 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKACCESSIBLEATTACHED_H +#define QQUICKACCESSIBLEATTACHED_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include + +#if QT_CONFIG(accessibility) + +#include +#include + +QT_BEGIN_NAMESPACE + + +#define STATE_PROPERTY(P) \ + Q_PROPERTY(bool P READ P WRITE set_ ## P NOTIFY P ## Changed FINAL) \ + bool P() const { return m_proxying && !m_stateExplicitlySet.P ? m_proxying->P() : m_state.P ; } \ + void set_ ## P(bool arg) \ + { \ + if (m_proxying) \ + m_proxying->set_##P(arg);\ + m_stateExplicitlySet.P = true; \ + if (m_state.P == arg) \ + return; \ + m_state.P = arg; \ + Q_EMIT P ## Changed(arg); \ + QAccessible::State changedState; \ + changedState.P = true; \ + QAccessibleStateChangeEvent ev(parent(), changedState); \ + QAccessible::updateAccessibility(&ev); \ + } \ + Q_SIGNAL void P ## Changed(bool arg); + +class Q_QUICK_EXPORT QQuickAccessibleAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QAccessible::Role role READ role WRITE setRole NOTIFY roleChanged FINAL) + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL) + Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged FINAL) + Q_PROPERTY(QString id READ id WRITE setId NOTIFY idChanged REVISION(6, 8) FINAL) + Q_PROPERTY(bool ignored READ ignored WRITE setIgnored NOTIFY ignoredChanged FINAL) + + QML_NAMED_ELEMENT(Accessible) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Accessible is only available via attached properties.") + QML_ATTACHED(QQuickAccessibleAttached) + QML_EXTENDED_NAMESPACE(QAccessible) + +public: + STATE_PROPERTY(checkable) + STATE_PROPERTY(checked) + STATE_PROPERTY(editable) + STATE_PROPERTY(focusable) + STATE_PROPERTY(focused) + STATE_PROPERTY(multiLine) + STATE_PROPERTY(readOnly) + STATE_PROPERTY(selected) + STATE_PROPERTY(selectable) + STATE_PROPERTY(pressed) + STATE_PROPERTY(checkStateMixed) + STATE_PROPERTY(defaultButton) + STATE_PROPERTY(passwordEdit) + STATE_PROPERTY(selectableText) + STATE_PROPERTY(searchEdit) + + QQuickAccessibleAttached(QObject *parent); + ~QQuickAccessibleAttached(); + + QAccessible::Role role() const { return m_role; } + void setRole(QAccessible::Role role); + QString name() const { + if (m_state.passwordEdit) + return QString(); + if (!m_nameExplicitlySet && m_proxying && m_proxying->wasNameExplicitlySet()) + return m_proxying->name(); + return m_name; + } + + bool wasNameExplicitlySet() const; + void setName(const QString &name) { + m_nameExplicitlySet = true; + if (name != m_name) { + m_name = name; + Q_EMIT nameChanged(); + QAccessibleEvent ev(parent(), QAccessible::NameChanged); + QAccessible::updateAccessibility(&ev); + } + } + void setNameImplicitly(const QString &name); + + QString description() const { + return !m_descriptionExplicitlySet && m_proxying ? m_proxying->description() : m_description; + } + void setDescription(const QString &description) + { + if (!m_descriptionExplicitlySet && m_proxying) { + disconnect(m_proxying, &QQuickAccessibleAttached::descriptionChanged, this, &QQuickAccessibleAttached::descriptionChanged); + } + m_descriptionExplicitlySet = true; + if (m_description != description) { + m_description = description; + Q_EMIT descriptionChanged(); + QAccessibleEvent ev(parent(), QAccessible::DescriptionChanged); + QAccessible::updateAccessibility(&ev); + } + } + + QString id() const { return m_id; } + void setId(const QString &id) + { + if (m_id != id) { + m_id = id; + Q_EMIT idChanged(); + QAccessibleEvent ev(parent(), QAccessible::IdentifierChanged); + QAccessible::updateAccessibility(&ev); + } + } + + // Factory function + static QQuickAccessibleAttached *qmlAttachedProperties(QObject *obj); + + static QQuickAccessibleAttached *attachedProperties(const QObject *obj) + { + return qobject_cast(qmlAttachedPropertiesObject(obj, false)); + } + + // Property getter + static QVariant property(const QObject *object, const char *propertyName) + { + if (QObject *attachedObject = QQuickAccessibleAttached::attachedProperties(object)) + return attachedObject->property(propertyName); + return QVariant(); + } + + static bool setProperty(QObject *object, const char *propertyName, const QVariant &value) + { + QObject *obj = qmlAttachedPropertiesObject(object, true); + if (!obj) { + qWarning("cannot set property Accessible.%s of QObject %s", propertyName, object->metaObject()->className()); + return false; + } + return obj->setProperty(propertyName, value); + } + + static QObject *findAccessible(QObject *object, QAccessible::Role role = QAccessible::NoRole) + { + while (object) { + QQuickAccessibleAttached *att = QQuickAccessibleAttached::attachedProperties(object); + if (att && (role == QAccessible::NoRole || att->role() == role)) { + break; + } + if (auto action = object->property("action").value(); action) { + QQuickAccessibleAttached *att = QQuickAccessibleAttached::attachedProperties(action); + if (att && (role == QAccessible::NoRole || att->role() == role)) { + object = action; + break; + } + } + object = object->parent(); + } + return object; + } + + QAccessible::State state() const { return m_state; } + bool ignored() const; + bool doAction(const QString &actionName); + void availableActions(QStringList *actions) const; + + Q_REVISION(6, 2) Q_INVOKABLE static QString stripHtml(const QString &html); + void setProxying(QQuickAccessibleAttached *proxying); + + Q_REVISION(6, 8) Q_INVOKABLE void announce(const QString &message, QAccessible::AnnouncementPoliteness politeness = QAccessible::AnnouncementPoliteness::Polite); + +public Q_SLOTS: + void valueChanged() { + QAccessibleValueChangeEvent ev(parent(), parent()->property("value")); + QAccessible::updateAccessibility(&ev); + } + void cursorPositionChanged() { + QAccessibleTextCursorEvent ev(parent(), parent()->property("cursorPosition").toInt()); + QAccessible::updateAccessibility(&ev); + } + + void setIgnored(bool ignored); + +Q_SIGNALS: + void roleChanged(); + void nameChanged(); + void descriptionChanged(); + void idChanged(); + void ignoredChanged(); + void pressAction(); + void toggleAction(); + void increaseAction(); + void decreaseAction(); + void scrollUpAction(); + void scrollDownAction(); + void scrollLeftAction(); + void scrollRightAction(); + void previousPageAction(); + void nextPageAction(); + +private: + QAccessible::Role m_role; + QAccessible::State m_state; + QAccessible::State m_stateExplicitlySet; + QString m_name; + bool m_nameExplicitlySet = false; + QString m_description; + bool m_descriptionExplicitlySet = false; + QQuickAccessibleAttached* m_proxying = nullptr; + QString m_id; + + static QMetaMethod sigPress; + static QMetaMethod sigToggle; + static QMetaMethod sigIncrease; + static QMetaMethod sigDecrease; + static QMetaMethod sigScrollUp; + static QMetaMethod sigScrollDown; + static QMetaMethod sigScrollLeft; + static QMetaMethod sigScrollRight; + static QMetaMethod sigPreviousPage; + static QMetaMethod sigNextPage; + +public: + using QObject::property; +}; + + +QT_END_NAMESPACE + +#endif // accessibility + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessiblefactory_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessiblefactory_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d2111243cf7023361353f85e94121924d5a71226 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickaccessiblefactory_p.h @@ -0,0 +1,29 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKACCESSIBLEFACTORY_H +#define QQUICKACCESSIBLEFACTORY_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE +#if QT_CONFIG(accessibility) + +QAccessibleInterface *qQuickAccessibleFactory(const QString &classname, QObject *object); + +#endif +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p.h new file mode 100644 index 0000000000000000000000000000000000000000..92886fce5e9772818191a748674ff530efed30e0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p.h @@ -0,0 +1,183 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANCHORS_P_H +#define QQUICKANCHORS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickAnchorsPrivate; +class QQuickAnchorLine; +class Q_QUICK_EXPORT QQuickAnchors : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQuickAnchorLine left READ left WRITE setLeft RESET resetLeft NOTIFY leftChanged FINAL) + Q_PROPERTY(QQuickAnchorLine right READ right WRITE setRight RESET resetRight NOTIFY rightChanged FINAL) + Q_PROPERTY(QQuickAnchorLine horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter NOTIFY horizontalCenterChanged FINAL) + Q_PROPERTY(QQuickAnchorLine top READ top WRITE setTop RESET resetTop NOTIFY topChanged FINAL) + Q_PROPERTY(QQuickAnchorLine bottom READ bottom WRITE setBottom RESET resetBottom NOTIFY bottomChanged FINAL) + Q_PROPERTY(QQuickAnchorLine verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter NOTIFY verticalCenterChanged FINAL) + Q_PROPERTY(QQuickAnchorLine baseline READ baseline WRITE setBaseline RESET resetBaseline NOTIFY baselineChanged FINAL) + Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged FINAL) + Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin RESET resetLeftMargin NOTIFY leftMarginChanged FINAL) + Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL) + Q_PROPERTY(qreal horizontalCenterOffset READ horizontalCenterOffset WRITE setHorizontalCenterOffset NOTIFY horizontalCenterOffsetChanged FINAL) + Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin RESET resetTopMargin NOTIFY topMarginChanged FINAL) + Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin RESET resetBottomMargin NOTIFY bottomMarginChanged FINAL) + Q_PROPERTY(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged FINAL) + Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged FINAL) + Q_PROPERTY(QQuickItem *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged FINAL) + Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged FINAL) + Q_PROPERTY(bool alignWhenCentered READ alignWhenCentered WRITE setAlignWhenCentered NOTIFY centerAlignedChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickAnchors(QQuickItem *item, QObject *parent=nullptr); + ~QQuickAnchors() override; + + enum Anchor +#if defined(Q_CC_CLANG) || !defined(Q_CC_GNU) // meaning: clang and msvc, but NOT gcc proper (because, you know, Q_CC_CLANG implies Q_CC_GNU) + // Not specifying the enum base type will have MSVC 'interpret' it as signed instead of an unsigned bit-field. + // However, specifying the enum base type breaks many GCCs, which complain that it can't store all values in a 7 bit bitfield. + : uint +#endif + { + InvalidAnchor = 0x0, + LeftAnchor = 0x01, + RightAnchor = 0x02, + TopAnchor = 0x04, + BottomAnchor = 0x08, + HCenterAnchor = 0x10, + VCenterAnchor = 0x20, + BaselineAnchor = 0x40, + Horizontal_Mask = LeftAnchor | RightAnchor | HCenterAnchor, + Vertical_Mask = TopAnchor | BottomAnchor | VCenterAnchor | BaselineAnchor + }; + Q_DECLARE_FLAGS(Anchors, Anchor) + Q_FLAG(Anchors) + + QQuickAnchorLine left() const; + void setLeft(const QQuickAnchorLine &edge); + void resetLeft(); + + QQuickAnchorLine right() const; + void setRight(const QQuickAnchorLine &edge); + void resetRight(); + + QQuickAnchorLine horizontalCenter() const; + void setHorizontalCenter(const QQuickAnchorLine &edge); + void resetHorizontalCenter(); + + QQuickAnchorLine top() const; + void setTop(const QQuickAnchorLine &edge); + void resetTop(); + + QQuickAnchorLine bottom() const; + void setBottom(const QQuickAnchorLine &edge); + void resetBottom(); + + QQuickAnchorLine verticalCenter() const; + void setVerticalCenter(const QQuickAnchorLine &edge); + void resetVerticalCenter(); + + QQuickAnchorLine baseline() const; + void setBaseline(const QQuickAnchorLine &edge); + void resetBaseline(); + + qreal leftMargin() const; + void setLeftMargin(qreal); + void resetLeftMargin(); + + qreal rightMargin() const; + void setRightMargin(qreal); + void resetRightMargin(); + + qreal horizontalCenterOffset() const; + void setHorizontalCenterOffset(qreal); + + qreal topMargin() const; + void setTopMargin(qreal); + void resetTopMargin(); + + qreal bottomMargin() const; + void setBottomMargin(qreal); + void resetBottomMargin(); + + qreal margins() const; + void setMargins(qreal); + + qreal verticalCenterOffset() const; + void setVerticalCenterOffset(qreal); + + qreal baselineOffset() const; + void setBaselineOffset(qreal); + + QQuickItem *fill() const; + void setFill(QQuickItem *); + void resetFill(); + + QQuickItem *centerIn() const; + void setCenterIn(QQuickItem *); + void resetCenterIn(); + + Anchors usedAnchors() const; + Qt::Orientations activeDirections() const; + + bool mirrored(); + + bool alignWhenCentered() const; + void setAlignWhenCentered(bool); + + void classBegin(); + void componentComplete(); + +Q_SIGNALS: + void leftChanged(); + void rightChanged(); + void topChanged(); + void bottomChanged(); + void verticalCenterChanged(); + void horizontalCenterChanged(); + void baselineChanged(); + void fillChanged(); + void centerInChanged(); + void leftMarginChanged(); + void rightMarginChanged(); + void topMarginChanged(); + void bottomMarginChanged(); + void marginsChanged(); + void verticalCenterOffsetChanged(); + void horizontalCenterOffsetChanged(); + void baselineOffsetChanged(); + void centerAlignedChanged(); + +private: + friend class QQuickItemPrivate; + Q_DISABLE_COPY(QQuickAnchors) + Q_DECLARE_PRIVATE(QQuickAnchors) +}; +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAnchors::Anchors) + +QT_END_NAMESPACE + +#endif // QQUICKANCHORS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..eb714c78ed20af9b6b0cf4d2ebf9f634e5bb4a4c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanchors_p_p.h @@ -0,0 +1,188 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANCHORS_P_P_H +#define QQUICKANCHORS_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanchors_p.h" +#include "qquickitemchangelistener_p.h" +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickAnchorLine +{ + Q_GADGET + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickAnchorLine() {} + QQuickAnchorLine(QQuickItem *i, QQuickAnchors::Anchor l) : item(i), anchorLine(l) {} + QQuickAnchorLine(QQuickItem *i, uint l) + : item(i) + , anchorLine(static_cast(l)) + { Q_ASSERT(l < ((QQuickAnchors::BaselineAnchor << 1) - 1)); } + + QQuickItem *item = nullptr; + QQuickAnchors::Anchor anchorLine = QQuickAnchors::InvalidAnchor; +}; + +inline bool operator==(const QQuickAnchorLine& a, const QQuickAnchorLine& b) +{ + return a.item == b.item && a.anchorLine == b.anchorLine; +} + +class QQuickAnchorsPrivate : public QObjectPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickAnchors) +public: + QQuickAnchorsPrivate(QQuickItem *i) + : leftMargin(0) + , rightMargin(0) + , topMargin(0) + , bottomMargin(0) + , margins(0) + , vCenterOffset(0) + , hCenterOffset(0) + , baselineOffset(0) + , item(i) + , fill(nullptr) + , centerIn(nullptr) + , leftAnchorItem(nullptr) + , rightAnchorItem(nullptr) + , topAnchorItem(nullptr) + , bottomAnchorItem(nullptr) + , vCenterAnchorItem(nullptr) + , hCenterAnchorItem(nullptr) + , baselineAnchorItem(nullptr) + , leftAnchorLine(QQuickAnchors::InvalidAnchor) + , leftMarginExplicit(false) + , rightAnchorLine(QQuickAnchors::InvalidAnchor) + , rightMarginExplicit(false) + , topAnchorLine(QQuickAnchors::InvalidAnchor) + , topMarginExplicit(false) + , bottomAnchorLine(QQuickAnchors::InvalidAnchor) + , bottomMarginExplicit(false) + , vCenterAnchorLine(QQuickAnchors::InvalidAnchor) + , updatingMe(false) + , hCenterAnchorLine(QQuickAnchors::InvalidAnchor) + , inDestructor(false) + , baselineAnchorLine(QQuickAnchors::InvalidAnchor) + , centerAligned(true) + , usedAnchors(QQuickAnchors::InvalidAnchor) + , componentComplete(true) + , updatingFill(0) + , updatingCenterIn(0) + , updatingHorizontalAnchor(0) + , updatingVerticalAnchor(0) + { + } + + void clearItem(QQuickItem *); + + QQuickGeometryChange calculateDependency(QQuickItem *) const; + void addDepend(QQuickItem *); + void remDepend(QQuickItem *); + bool isItemComplete() const; + + void setItemHeight(qreal); + void setItemWidth(qreal); + void setItemX(qreal); + void setItemY(qreal); + void setItemPos(const QPointF &); + void setItemSize(const QSizeF &); + + void update(); + void updateOnComplete(); + void updateMe(); + + // QQuickItemGeometryListener interface + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; + QQuickAnchorsPrivate *anchorPrivate() override { return this; } + + bool checkHValid() const; + bool checkVValid() const; + bool checkHAnchorValid(QQuickAnchorLine anchor) const; + bool checkVAnchorValid(QQuickAnchorLine anchor) const; + bool calcStretch(QQuickItem *edge1Item, QQuickAnchors::Anchor edge1Line, + QQuickItem *edge2Item, QQuickAnchors::Anchor edge2Line, + qreal offset1, qreal offset2, QQuickAnchors::Anchor line, qreal &stretch) const; + + bool isMirrored() const; + void updateHorizontalAnchors(); + void updateVerticalAnchors(); + void fillChanged(); + void centerInChanged(); + + qreal leftMargin; + qreal rightMargin; + qreal topMargin; + qreal bottomMargin; + qreal margins; + qreal vCenterOffset; + qreal hCenterOffset; + qreal baselineOffset; + + QQuickItem *item; + + QQuickItem *fill; + QQuickItem *centerIn; + + QQuickItem *leftAnchorItem; + QQuickItem *rightAnchorItem; + QQuickItem *topAnchorItem; + QQuickItem *bottomAnchorItem; + QQuickItem *vCenterAnchorItem; + QQuickItem *hCenterAnchorItem; + QQuickItem *baselineAnchorItem; + + // The bit fields below are carefully laid out in chunks of 1 byte, so the compiler doesn't + // need to generate 2 loads (and combining shifts/ors) to create a single field. + + QQuickAnchors::Anchor leftAnchorLine : 7; + uint leftMarginExplicit : 1; + QQuickAnchors::Anchor rightAnchorLine : 7; + uint rightMarginExplicit : 1; + QQuickAnchors::Anchor topAnchorLine : 7; + uint topMarginExplicit : 1; + QQuickAnchors::Anchor bottomAnchorLine : 7; + uint bottomMarginExplicit : 1; + + QQuickAnchors::Anchor vCenterAnchorLine : 7; + uint updatingMe : 1; + QQuickAnchors::Anchor hCenterAnchorLine : 7; + uint inDestructor : 1; + QQuickAnchors::Anchor baselineAnchorLine : 7; + uint centerAligned : 1; + uint usedAnchors : 7; // QQuickAnchors::Anchors + uint componentComplete : 1; + + // Instead of using a mostly empty bit field, we can stretch the following fields up to be full + // bytes. The advantage is that incrementing/decrementing does not need any combining ands/ors. + qint8 updatingFill; + qint8 updatingCenterIn; + qint8 updatingHorizontalAnchor; + qint8 updatingVerticalAnchor; + + + static inline QQuickAnchorsPrivate *get(QQuickAnchors *o) { + return static_cast(QObjectPrivate::get(o)); + } +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QQuickAnchorLine) + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..75b289c18a338a05f642c77f0e0d38490c2b0250 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATEDIMAGE_P_H +#define QQUICKANIMATEDIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_animatedimage); + +#include "qquickimage_p.h" + +QT_BEGIN_NAMESPACE + +class QMovie; +class QQuickAnimatedImagePrivate; + +class Q_QUICK_EXPORT QQuickAnimatedImage : public QQuickImage +{ + Q_OBJECT + + Q_PROPERTY(bool playing READ isPlaying WRITE setPlaying NOTIFY playingChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY frameChanged) + Q_PROPERTY(int frameCount READ frameCount NOTIFY frameCountChanged) + Q_PROPERTY(qreal speed READ speed WRITE setSpeed NOTIFY speedChanged REVISION(2, 11)) + + QML_NAMED_ELEMENT(AnimatedImage) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickAnimatedImage(QQuickItem *parent=nullptr); + ~QQuickAnimatedImage(); + + bool isPlaying() const; + void setPlaying(bool play); + + bool isPaused() const; + void setPaused(bool pause); + + int currentFrame() const override; + void setCurrentFrame(int frame) override; + + int frameCount() const override; + + qreal speed() const; + void setSpeed(qreal speed); + + // Extends QQuickImage's src property + void setSource(const QUrl&) override; + +Q_SIGNALS: + void playingChanged(); + void pausedChanged(); + void frameChanged(); + void currentFrameChanged(); + void frameCountChanged(); + Q_REVISION(2, 11) void speedChanged(); + +private Q_SLOTS: + void movieUpdate(); + void movieRequestFinished(); + void playingStatusChanged(); + void onCacheChanged(); + +protected: + void load() override; + void componentComplete() override; + +private: + Q_DISABLE_COPY(QQuickAnimatedImage) + Q_DECLARE_PRIVATE(QQuickAnimatedImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATEDIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bb560220ba0c3a158055b48a5631a1958647f29f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedimage_p_p.h @@ -0,0 +1,61 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATEDIMAGE_P_P_H +#define QQUICKANIMATEDIMAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_animatedimage); + +#include "qquickimage_p_p.h" + +QT_BEGIN_NAMESPACE + +class QMovie; +#if QT_CONFIG(qml_network) +class QNetworkReply; +#endif + +class QQuickAnimatedImagePrivate : public QQuickImagePrivate +{ + Q_DECLARE_PUBLIC(QQuickAnimatedImage) + +public: + QQuickAnimatedImagePrivate() + : playing(true), paused(false), oldPlaying(false) + { + } + + QQuickPixmap *infoForCurrentFrame(QQmlEngine *engine); + void setMovie(QMovie *movie); + void clearCache(); + + qreal speed = 1; + QMovie *movie = nullptr; + int presetCurrentFrame = 0; + QMap frameMap; + +#if QT_CONFIG(qml_network) + QNetworkReply *reply = nullptr; +#endif + + bool playing : 1; + bool paused : 1; + bool oldPlaying : 1; +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATEDIMAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p.h new file mode 100644 index 0000000000000000000000000000000000000000..de0902f527c62b77904f3cfe4fb55e61f728de17 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p.h @@ -0,0 +1,165 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATEDSPRITE_P_H +#define QQUICKANIMATEDSPRITE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QSGContext; +class QQuickSprite; +class QQuickSpriteEngine; +class QSGGeometryNode; +class QQuickAnimatedSpritePrivate; +class QSGSpriteNode; +class Q_QUICK_EXPORT QQuickAnimatedSprite : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged) + Q_PROPERTY(bool interpolate READ interpolate WRITE setInterpolate NOTIFY interpolateChanged) + //###try to share similar spriteEngines for less overhead? + //These properties come out of QQuickSprite, since an AnimatedSprite is a renderer for a single sprite + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(bool reverse READ reverse WRITE setReverse NOTIFY reverseChanged) + Q_PROPERTY(bool frameSync READ frameSync WRITE setFrameSync NOTIFY frameSyncChanged) + Q_PROPERTY(int frameCount READ frameCount WRITE setFrameCount NOTIFY frameCountChanged) + //If frame height or width is not specified, it is assumed to be a single long row of square frames. + //Otherwise, it can be multiple contiguous rows, when one row runs out the next will be used. + Q_PROPERTY(int frameHeight READ frameHeight WRITE setFrameHeight NOTIFY frameHeightChanged) + Q_PROPERTY(int frameWidth READ frameWidth WRITE setFrameWidth NOTIFY frameWidthChanged) + Q_PROPERTY(int frameX READ frameX WRITE setFrameX NOTIFY frameXChanged) + Q_PROPERTY(int frameY READ frameY WRITE setFrameY NOTIFY frameYChanged) + //Precedence order: frameRate, frameDuration + Q_PROPERTY(qreal frameRate READ frameRate WRITE setFrameRate NOTIFY frameRateChanged RESET resetFrameRate) + Q_PROPERTY(int frameDuration READ frameDuration WRITE setFrameDuration NOTIFY frameDurationChanged RESET resetFrameDuration) + //Extra Simple Sprite Stuff + Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopsChanged) + Q_PROPERTY(bool paused READ paused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY currentFrameChanged) + Q_PROPERTY(FinishBehavior finishBehavior READ finishBehavior WRITE setFinishBehavior NOTIFY finishBehaviorChanged REVISION(2, 15)) + QML_NAMED_ELEMENT(AnimatedSprite) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickAnimatedSprite(QQuickItem *parent = nullptr); + enum LoopParameters { + Infinite = -1 + }; + Q_ENUM(LoopParameters) + + enum FinishBehavior { + FinishAtInitialFrame, + FinishAtFinalFrame + }; + Q_ENUM(FinishBehavior) + + bool running() const; + bool interpolate() const; + QUrl source() const; + bool reverse() const; + bool frameSync() const; + int frameCount() const; + int frameHeight() const; + int frameWidth() const; + int frameX() const; + int frameY() const; + qreal frameRate() const; + int frameDuration() const; + int loops() const; + bool paused() const; + int currentFrame() const; + FinishBehavior finishBehavior() const; + void setFinishBehavior(FinishBehavior arg); + +Q_SIGNALS: + + void pausedChanged(bool arg); + void runningChanged(bool arg); + void interpolateChanged(bool arg); + + void sourceChanged(const QUrl &arg); + void reverseChanged(bool arg); + void frameSyncChanged(bool arg); + void frameCountChanged(int arg); + void frameHeightChanged(int arg); + void frameWidthChanged(int arg); + void frameXChanged(int arg); + void frameYChanged(int arg); + void frameRateChanged(qreal arg); + void frameDurationChanged(int arg); + void loopsChanged(int arg); + void currentFrameChanged(int arg); + Q_REVISION(2, 15) void finishBehaviorChanged(FinishBehavior arg); + + Q_REVISION(2, 12) void finished(); + +public Q_SLOTS: + void start(); + void stop(); + void restart() {stop(); start();} + void advance(int frames=1); + void pause(); + void resume(); + + void setRunning(bool arg); + void setPaused(bool arg); + void setInterpolate(bool arg); + void setSource(const QUrl &arg); + void setReverse(bool arg); + void setFrameSync(bool arg); + void setFrameCount(int arg); + void setFrameHeight(int arg); + void setFrameWidth(int arg); + void setFrameX(int arg); + void setFrameY(int arg); + void setFrameRate(qreal arg); + void setFrameDuration(int arg); + void resetFrameRate(); + void resetFrameDuration(); + void setLoops(int arg); + void setCurrentFrame(int arg); + +private Q_SLOTS: + void createEngine(); + +protected Q_SLOTS: + void reset(); + +protected: + void componentComplete() override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + void itemChange(ItemChange, const ItemChangeData &) override; + +private: + void maybeUpdate(); + bool isCurrentFrameChangedConnected(); + void prepareNextFrame(QSGSpriteNode *node); + void reloadImage(); + QSGSpriteNode* initNode(); + +private: + Q_DECLARE_PRIVATE(QQuickAnimatedSprite) +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATEDSPRITE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b027b86001a1ad0d07f899b5812728580e1f840f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatedsprite_p_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATEDSPRITE_P_P_H +#define QQUICKANIMATEDSPRITE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include "qquickitem_p.h" +#include "qquicksprite_p.h" +#include "qquickanimatedsprite_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickAnimatedSpritePrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickAnimatedSprite) + +public: + QQuickAnimatedSpritePrivate() + : m_sprite(nullptr) + , m_spriteEngine(nullptr) + , m_curFrame(0) + , m_pleaseReset(false) + , m_running(true) + , m_paused(false) + , m_interpolate(true) + , m_loops(-1) + , m_curLoop(0) + , m_pauseOffset(0) + , m_finishBehavior(QQuickAnimatedSprite::FinishAtInitialFrame) + { + } + + QQuickSprite* m_sprite; + QQuickSpriteEngine* m_spriteEngine; + QElapsedTimer m_timestamp; + int m_curFrame; + bool m_pleaseReset; + bool m_running; + bool m_paused; + bool m_interpolate; + QSize m_sheetSize; + int m_loops; + int m_curLoop; + int m_pauseOffset; + QQuickAnimatedSprite::FinishBehavior m_finishBehavior; +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATEDSPRITE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7652561cd946e837b5118a8dfdffb33e097807bb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p.h @@ -0,0 +1,455 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATION_H +#define QQUICKANIMATION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstate_p.h" +#include + +#include +#include +#include + +#include +#include +#include "private/qabstractanimationjob_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractAnimationPrivate; +class QQuickAnimationGroup; +class Q_QUICK_EXPORT QQuickAbstractAnimation : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAbstractAnimation) + + Q_INTERFACES(QQmlParserStatus) + Q_INTERFACES(QQmlPropertyValueSource) + Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(bool alwaysRunToEnd READ alwaysRunToEnd WRITE setAlwaysRunToEnd NOTIFY alwaysRunToEndChanged) + Q_PROPERTY(int loops READ loops WRITE setLoops NOTIFY loopCountChanged) + Q_CLASSINFO("DefaultMethod", "start()") + + QML_NAMED_ELEMENT(Animation) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Animation is an abstract class") + +public: + enum ThreadingModel { + GuiThread, + RenderThread, + AnyThread + }; + + QQuickAbstractAnimation(QObject *parent=nullptr); + ~QQuickAbstractAnimation() override; + + enum Loops { Infinite = -2 }; + Q_ENUM(Loops) + + bool isRunning() const; + void setRunning(bool); + bool isPaused() const; + void setPaused(bool); + bool alwaysRunToEnd() const; + void setAlwaysRunToEnd(bool); + + int loops() const; + void setLoops(int); + int duration() const; + + int currentTime(); + void setCurrentTime(int); + + QQuickAnimationGroup *group() const; + void setGroup(QQuickAnimationGroup *, int index = -1); + + void setDefaultTarget(const QQmlProperty &); + void setDisableUserControl(); + void setEnableUserControl(); + bool userControlDisabled() const; + void classBegin() override; + void componentComplete() override; + + virtual ThreadingModel threadingModel() const; + +Q_SIGNALS: + void started(); + void stopped(); + void runningChanged(bool); + void pausedChanged(bool); + void alwaysRunToEndChanged(bool); + void loopCountChanged(int); + Q_REVISION(2, 12) void finished(); + +public Q_SLOTS: + void restart(); + void start(); + void pause(); + void resume(); + void stop(); + void complete(); + +protected: + QQuickAbstractAnimation(QQuickAbstractAnimationPrivate &dd, QObject *parent); + QAbstractAnimationJob* initInstance(QAbstractAnimationJob *animation); + +public: + enum TransitionDirection { Forward, Backward }; + virtual QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr); + QAbstractAnimationJob* qtAnimation(); + +private: + void setTarget(const QQmlProperty &) override; + void notifyRunningChanged(bool running); + friend class QQuickBehavior; + friend class QQuickBehaviorPrivate; + friend class QQuickAnimationGroup; +}; + +class QQuickPauseAnimationPrivate; +class Q_QUICK_EXPORT QQuickPauseAnimation : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPauseAnimation) + + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + QML_NAMED_ELEMENT(PauseAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPauseAnimation(QObject *parent=nullptr); + ~QQuickPauseAnimation() override; + + int duration() const; + void setDuration(int); + +Q_SIGNALS: + void durationChanged(int); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +class QQuickScriptActionPrivate; +class Q_QUICK_EXPORT QQuickScriptAction : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickScriptAction) + + Q_PROPERTY(QQmlScriptString script READ script WRITE setScript) + Q_PROPERTY(QString scriptName READ stateChangeScriptName WRITE setStateChangeScriptName) + QML_NAMED_ELEMENT(ScriptAction) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickScriptAction(QObject *parent=nullptr); + ~QQuickScriptAction() override; + + QQmlScriptString script() const; + void setScript(const QQmlScriptString &); + + QString stateChangeScriptName() const; + void setStateChangeScriptName(const QString &); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +class QQuickPropertyActionPrivate; +class Q_QUICK_EXPORT QQuickPropertyAction : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyAction) + + Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged) + Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) + Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged) + Q_PROPERTY(QQmlListProperty targets READ targets) + Q_PROPERTY(QQmlListProperty exclude READ exclude) + Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) + QML_NAMED_ELEMENT(PropertyAction) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPropertyAction(QObject *parent=nullptr); + ~QQuickPropertyAction() override; + + QObject *target() const; + void setTargetObject(QObject *); + + QString property() const; + void setProperty(const QString &); + + QString properties() const; + void setProperties(const QString &); + + QQmlListProperty targets(); + QQmlListProperty exclude(); + + QVariant value() const; + void setValue(const QVariant &); + +Q_SIGNALS: + void valueChanged(const QVariant &); + void propertiesChanged(const QString &); + void targetChanged(); + void propertyChanged(); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +class QQuickPropertyAnimationPrivate; +class Q_QUICK_EXPORT QQuickPropertyAnimation : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) + + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(QVariant from READ from WRITE setFrom NOTIFY fromChanged) + Q_PROPERTY(QVariant to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) + Q_PROPERTY(QObject *target READ target WRITE setTargetObject NOTIFY targetChanged) + Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) + Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged) + Q_PROPERTY(QQmlListProperty targets READ targets) + Q_PROPERTY(QQmlListProperty exclude READ exclude) + QML_NAMED_ELEMENT(PropertyAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPropertyAnimation(QObject *parent=nullptr); + ~QQuickPropertyAnimation() override; + + virtual int duration() const; + virtual void setDuration(int); + + QVariant from() const; + void setFrom(const QVariant &); + + QVariant to() const; + void setTo(const QVariant &); + + QEasingCurve easing() const; + void setEasing(const QEasingCurve &); + + QObject *target() const; + void setTargetObject(QObject *); + + QString property() const; + void setProperty(const QString &); + + QString properties() const; + void setProperties(const QString &); + + QQmlListProperty targets(); + QQmlListProperty exclude(); + +protected: + QQuickStateActions createTransitionActions(QQuickStateActions &actions, + QQmlProperties &modified, + QObject *defaultTarget = nullptr); + + QQuickPropertyAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent); + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +Q_SIGNALS: + void durationChanged(int); + void fromChanged(); + void toChanged(); + void easingChanged(const QEasingCurve &); + void propertiesChanged(const QString &); + void targetChanged(); + void propertyChanged(); +}; + +class Q_QUICK_EXPORT QQuickColorAnimation : public QQuickPropertyAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) + Q_PROPERTY(QColor from READ from WRITE setFrom) + Q_PROPERTY(QColor to READ to WRITE setTo) + QML_NAMED_ELEMENT(ColorAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickColorAnimation(QObject *parent=nullptr); + ~QQuickColorAnimation() override; + + QColor from() const; + void setFrom(const QColor &); + + QColor to() const; + void setTo(const QColor &); +}; + +class Q_QUICK_EXPORT QQuickNumberAnimation : public QQuickPropertyAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) + + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + QML_NAMED_ELEMENT(NumberAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickNumberAnimation(QObject *parent=nullptr); + ~QQuickNumberAnimation() override; + + qreal from() const; + void setFrom(qreal); + + qreal to() const; + void setTo(qreal); + +protected: + QQuickNumberAnimation(QQuickPropertyAnimationPrivate &dd, QObject *parent); + +private: + void init(); +}; + +class Q_QUICK_EXPORT QQuickVector3dAnimation : public QQuickPropertyAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyAnimation) + + Q_PROPERTY(QVector3D from READ from WRITE setFrom NOTIFY fromChanged) + Q_PROPERTY(QVector3D to READ to WRITE setTo NOTIFY toChanged) + QML_NAMED_ELEMENT(Vector3dAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickVector3dAnimation(QObject *parent=nullptr); + ~QQuickVector3dAnimation() override; + + QVector3D from() const; + void setFrom(QVector3D); + + QVector3D to() const; + void setTo(QVector3D); +}; + +class QQuickRotationAnimationPrivate; +class Q_QUICK_EXPORT QQuickRotationAnimation : public QQuickPropertyAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickRotationAnimation) + + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged) + QML_NAMED_ELEMENT(RotationAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickRotationAnimation(QObject *parent=nullptr); + ~QQuickRotationAnimation() override; + + qreal from() const; + void setFrom(qreal); + + qreal to() const; + void setTo(qreal); + + enum RotationDirection { Numerical, Shortest, Clockwise, Counterclockwise }; + Q_ENUM(RotationDirection) + RotationDirection direction() const; + void setDirection(RotationDirection direction); + +Q_SIGNALS: + void directionChanged(); +}; + +class QQuickAnimationGroupPrivate; +class Q_QUICK_EXPORT QQuickAnimationGroup : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnimationGroup) + + Q_CLASSINFO("DefaultProperty", "animations") + Q_PROPERTY(QQmlListProperty animations READ animations) + +public: + QQuickAnimationGroup(QObject *parent); + ~QQuickAnimationGroup() override; + + QQmlListProperty animations(); + friend class QQuickAbstractAnimation; + +protected: + QQuickAnimationGroup(QQuickAnimationGroupPrivate &dd, QObject *parent); +}; + +class Q_QUICK_EXPORT QQuickSequentialAnimation : public QQuickAnimationGroup +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnimationGroup) + QML_NAMED_ELEMENT(SequentialAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickSequentialAnimation(QObject *parent=nullptr); + ~QQuickSequentialAnimation() override; + +protected: + ThreadingModel threadingModel() const override; + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +class Q_QUICK_EXPORT QQuickParallelAnimation : public QQuickAnimationGroup +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnimationGroup) + QML_NAMED_ELEMENT(ParallelAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickParallelAnimation(QObject *parent=nullptr); + ~QQuickParallelAnimation() override; + +protected: + ThreadingModel threadingModel() const override; + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKANIMATION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..45f561a5110ead3b3198a82a6323b16042d0537f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimation_p_p.h @@ -0,0 +1,304 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATION2_P_H +#define QQUICKANIMATION2_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanimation_p.h" + +#include + +#include +#include + +#include +#include "private/qpauseanimationjob_p.h" +#include + +#include +#include "private/qanimationgroupjob_p.h" +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +//interface for classes that provide animation actions for QActionAnimation +class QAbstractAnimationAction +{ +public: + virtual ~QAbstractAnimationAction() {} + virtual void doAction() = 0; + virtual void debugAction(QDebug, int) const {} +}; + +//templated animation action +//allows us to specify an action that calls a function of a class. +//(so that class doesn't have to inherit QQuickAbstractAnimationAction) +template +class QAnimationActionProxy : public QAbstractAnimationAction +{ +public: + QAnimationActionProxy(T *instance) : m_instance(instance) {} + void doAction() override { (m_instance->*method)(); } + void debugAction(QDebug d, int indentLevel) const override { (m_instance->*debugMethod)(d, indentLevel); } +private: + T *m_instance; +}; + +//performs an action of type QAbstractAnimationAction +class Q_AUTOTEST_EXPORT QActionAnimation : public QAbstractAnimationJob +{ + Q_DISABLE_COPY(QActionAnimation) +public: + QActionAnimation(); + + QActionAnimation(QAbstractAnimationAction *action); + ~QActionAnimation() override; + + int duration() const override; + void setAnimAction(QAbstractAnimationAction *action); + +protected: + void updateCurrentTime(int) override; + void updateState(State newState, State oldState) override; + void debugAnimation(QDebug d) const override; + +private: + QAbstractAnimationAction *animAction; +}; + +class QQuickBulkValueUpdater +{ +public: + virtual ~QQuickBulkValueUpdater() {} + virtual void setValue(qreal value) = 0; + virtual void debugUpdater(QDebug, int) const {} +}; + +//animates QQuickBulkValueUpdater (assumes start and end values will be reals or compatible) +class Q_QUICK_AUTOTEST_EXPORT QQuickBulkValueAnimator : public QAbstractAnimationJob +{ + Q_DISABLE_COPY(QQuickBulkValueAnimator) +public: + QQuickBulkValueAnimator(); + ~QQuickBulkValueAnimator() override; + + void setAnimValue(QQuickBulkValueUpdater *value); + QQuickBulkValueUpdater *getAnimValue() const { return animValue; } + + void setFromIsSourcedValue(bool *value) { fromIsSourced = value; } + + int duration() const override { return m_duration; } + void setDuration(int msecs) { m_duration = msecs; } + + QEasingCurve easingCurve() const { return easing; } + void setEasingCurve(const QEasingCurve &curve) { easing = curve; } + +protected: + void updateCurrentTime(int currentTime) override; + void topLevelAnimationLoopChanged() override; + void debugAnimation(QDebug d) const override; + +private: + QQuickBulkValueUpdater *animValue; + bool *fromIsSourced; + int m_duration; + QEasingCurve easing; +}; + +//an animation that just gives a tick +template +class QTickAnimationProxy : public QAbstractAnimationJob +{ + Q_DISABLE_COPY(QTickAnimationProxy) +public: + QTickAnimationProxy(T *instance) : QAbstractAnimationJob(), m_instance(instance) {} + int duration() const override { return -1; } +protected: + void updateCurrentTime(int msec) override { (m_instance->*method)(msec); } + +private: + T *m_instance; +}; + +class Q_QUICK_EXPORT QQuickAbstractAnimationPrivate : public QObjectPrivate, public QAnimationJobChangeListener +{ + Q_DECLARE_PUBLIC(QQuickAbstractAnimation) +public: + QQuickAbstractAnimationPrivate() + : running(false), paused(false), alwaysRunToEnd(false), + /*connectedTimeLine(false), */componentComplete(true), + avoidPropertyValueSourceStart(false), disableUserControl(false), + needsDeferredSetRunning(false), loopCount(1), group(nullptr), animationInstance(nullptr) {} + + bool running:1; + bool paused:1; + bool alwaysRunToEnd:1; + //bool connectedTimeLine:1; + bool componentComplete:1; + bool avoidPropertyValueSourceStart:1; + bool disableUserControl:1; + bool needsDeferredSetRunning:1; + + int loopCount; + + void commence(); + void animationFinished(QAbstractAnimationJob *) override; + + QQmlProperty defaultProperty; + + QQuickAnimationGroup *group; + QAbstractAnimationJob* animationInstance; + + static QQmlProperty createProperty(QObject *obj, const QString &str, QObject *infoObj, QString *errorMessage = nullptr); + void animationGroupDirty(); +}; + +class QQuickPauseAnimationPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickPauseAnimation) +public: + QQuickPauseAnimationPrivate() + : QQuickAbstractAnimationPrivate(), duration(250) {} + + int duration; +}; + +class QQuickScriptActionPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickScriptAction) +public: + QQuickScriptActionPrivate(); + + QQmlScriptString script; + QString name; + QQmlScriptString runScriptScript; + bool hasRunScriptScript; + bool reversing; + + void execute(); + QAbstractAnimationAction* createAction(); + void debugAction(QDebug d, int indentLevel) const; + typedef QAnimationActionProxy Proxy; +}; + +class QQuickPropertyActionPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickPropertyAction) +public: + QQuickPropertyActionPrivate() + : QQuickAbstractAnimationPrivate(), target(nullptr) {} + + QObject *target; + QString propertyName; + QString properties; + QList targets; + QList exclude; + + QQmlNullableValue value; +}; + +class QQuickAnimationGroupPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickAnimationGroup) +public: + QQuickAnimationGroupPrivate() + : QQuickAbstractAnimationPrivate(), animationDirty(false) {} + + static void append_animation(QQmlListProperty *list, QQuickAbstractAnimation *role); + static QQuickAbstractAnimation *at_animation(QQmlListProperty *list, qsizetype index); + static qsizetype count_animation(QQmlListProperty *list); + static void clear_animation(QQmlListProperty *list); + static void replace_animation(QQmlListProperty *list, qsizetype index, + QQuickAbstractAnimation *role); + static void removeLast_animation(QQmlListProperty *list); + QList animations; + + void restartFromCurrentLoop(); + void animationCurrentLoopChanged(QAbstractAnimationJob *job) override; + bool animationDirty: 1; +}; + +class Q_QUICK_EXPORT QQuickPropertyAnimationPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickPropertyAnimation) +public: + QQuickPropertyAnimationPrivate() + : QQuickAbstractAnimationPrivate(), target(nullptr), fromIsDefined(false), toIsDefined(false), ourPropertiesDirty(false), + defaultToInterpolatorType(0), interpolatorType(0), interpolator(nullptr), duration(250), actions(nullptr) {} + + void animationCurrentLoopChanged(QAbstractAnimationJob *job) override; + + QVariant from; + QVariant to; + + QObject *target; + QString propertyName; + QString properties; + QList> targets; + QList exclude; + QString defaultProperties; + + bool fromIsDefined:1; + bool toIsDefined:1; + bool ourPropertiesDirty : 1; + bool defaultToInterpolatorType:1; + int interpolatorType; + QVariantAnimation::Interpolator interpolator; + int duration; + QEasingCurve easing; + + // for animations that don't use the QQuickBulkValueAnimator + QQuickStateActions *actions; + + static QVariant interpolateVariant(const QVariant &from, const QVariant &to, qreal progress); + static void convertVariant(QVariant &variant, QMetaType type); +}; + +class QQuickRotationAnimationPrivate : public QQuickPropertyAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickRotationAnimation) +public: + QQuickRotationAnimationPrivate() : direction(QQuickRotationAnimation::Numerical) {} + + QQuickRotationAnimation::RotationDirection direction; +}; + +class Q_AUTOTEST_EXPORT QQuickAnimationPropertyUpdater : public QQuickBulkValueUpdater +{ +public: + QQuickAnimationPropertyUpdater() : interpolatorType(0), interpolator(nullptr), prevInterpolatorType(0), reverse(false), fromIsSourced(false), fromIsDefined(false), wasDeleted(nullptr) {} + ~QQuickAnimationPropertyUpdater() override; + + void setValue(qreal v) override; + + void debugUpdater(QDebug d, int indentLevel) const override; + + QQuickStateActions actions; + int interpolatorType; //for Number/ColorAnimation + QVariantAnimation::Interpolator interpolator; + int prevInterpolatorType; //for generic + bool reverse; + bool fromIsSourced; + bool fromIsDefined; + bool *wasDeleted; +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATION2_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimationcontroller_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimationcontroller_p.h new file mode 100644 index 0000000000000000000000000000000000000000..589f81ab678969774a34462ca15521a357c8f164 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimationcontroller_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATIONCONTROLLER_H +#define QQUICKANIMATIONCONTROLLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickanimation_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickAnimationControllerPrivate; +class Q_QUICK_EXPORT QQuickAnimationController : public QObject, public QQmlFinalizerHook +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(QQuickAnimationController) + Q_INTERFACES(QQmlFinalizerHook) + + Q_DECLARE_PRIVATE(QQuickAnimationController) + Q_CLASSINFO("DefaultProperty", "animation") + QML_NAMED_ELEMENT(AnimationController) + QML_ADDED_IN_VERSION(2, 0) + + Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged) + Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation NOTIFY animationChanged) + +public: + QQuickAnimationController(QObject *parent=nullptr); + ~QQuickAnimationController(); + + qreal progress() const; + void setProgress(qreal progress); + + QQuickAbstractAnimation *animation() const; + void setAnimation(QQuickAbstractAnimation *animation); + + void componentFinalized() override; +Q_SIGNALS: + void progressChanged(); + void animationChanged(); +public Q_SLOTS: + void reload(); + void completeToBeginning(); + void completeToEnd(); +private Q_SLOTS: + void updateProgress(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATIONCONTROLLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..486fb1d67bc924d55bf1a124fd19a98689cfe6f2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p.h @@ -0,0 +1,177 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATOR_P_H +#define QQUICKANIMATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanimation_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickItem; + +class QQuickAnimatorJob; +class QQuickAnimatorPrivate; +class Q_QUICK_EXPORT QQuickAnimator : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnimator) + Q_PROPERTY(QQuickItem *target READ targetItem WRITE setTargetItem NOTIFY targetItemChanged) + Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged) + + QML_NAMED_ELEMENT(Animator) + QML_ADDED_IN_VERSION(2, 2) + QML_UNCREATABLE("Animator is an abstract class") + +public: + QQuickItem *targetItem() const; + void setTargetItem(QQuickItem *target); + + int duration() const; + void setDuration(int duration); + + QEasingCurve easing() const; + void setEasing(const QEasingCurve & easing); + + qreal to() const; + void setTo(qreal to); + + qreal from() const; + void setFrom(qreal from); + +protected: + ThreadingModel threadingModel() const override { return RenderThread; } + virtual QQuickAnimatorJob *createJob() const = 0; + virtual QString propertyName() const = 0; + QAbstractAnimationJob *transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection, + QObject *) override; + + QQuickAnimator(QQuickAnimatorPrivate &dd, QObject *parent = nullptr); + QQuickAnimator(QObject *parent = nullptr); + +Q_SIGNALS: + void targetItemChanged(QQuickItem *); + void durationChanged(int duration); + void easingChanged(const QEasingCurve &curve); + void toChanged(qreal to); + void fromChanged(qreal from); +}; + +class Q_QUICK_EXPORT QQuickScaleAnimator : public QQuickAnimator +{ + Q_OBJECT + QML_NAMED_ELEMENT(ScaleAnimator) + QML_ADDED_IN_VERSION(2, 2) +public: + QQuickScaleAnimator(QObject *parent = nullptr); +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override { return QStringLiteral("scale"); } +}; + +class Q_QUICK_EXPORT QQuickXAnimator : public QQuickAnimator +{ + Q_OBJECT + QML_NAMED_ELEMENT(XAnimator) + QML_ADDED_IN_VERSION(2, 2) +public: + QQuickXAnimator(QObject *parent = nullptr); +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override { return QStringLiteral("x"); } +}; + +class Q_QUICK_EXPORT QQuickYAnimator : public QQuickAnimator +{ + Q_OBJECT + QML_NAMED_ELEMENT(YAnimator) + QML_ADDED_IN_VERSION(2, 2) +public: + QQuickYAnimator(QObject *parent = nullptr); +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override { return QStringLiteral("y"); } +}; + +class Q_QUICK_EXPORT QQuickOpacityAnimator : public QQuickAnimator +{ + Q_OBJECT + QML_NAMED_ELEMENT(OpacityAnimator) + QML_ADDED_IN_VERSION(2, 2) +public: + QQuickOpacityAnimator(QObject *parent = nullptr); +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override { return QStringLiteral("opacity"); } +}; + +class QQuickRotationAnimatorPrivate; +class Q_QUICK_EXPORT QQuickRotationAnimator : public QQuickAnimator +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickRotationAnimator) + Q_PROPERTY(RotationDirection direction READ direction WRITE setDirection NOTIFY directionChanged) + QML_NAMED_ELEMENT(RotationAnimator) + QML_ADDED_IN_VERSION(2, 2) + +public: + enum RotationDirection { Numerical, Shortest, Clockwise, Counterclockwise }; + Q_ENUM(RotationDirection) + + QQuickRotationAnimator(QObject *parent = nullptr); + + void setDirection(RotationDirection dir); + RotationDirection direction() const; + +Q_SIGNALS: + void directionChanged(RotationDirection dir); + +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override { return QStringLiteral("rotation"); } +}; + +#if QT_CONFIG(quick_shadereffect) +class QQuickUniformAnimatorPrivate; +class Q_QUICK_EXPORT QQuickUniformAnimator : public QQuickAnimator +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickUniformAnimator) + Q_PROPERTY(QString uniform READ uniform WRITE setUniform NOTIFY uniformChanged) + QML_NAMED_ELEMENT(UniformAnimator) + QML_ADDED_IN_VERSION(2, 2) + +public: + QQuickUniformAnimator(QObject *parent = nullptr); + + QString uniform() const; + void setUniform(const QString &); + +Q_SIGNALS: + void uniformChanged(const QString &); + +protected: + QQuickAnimatorJob *createJob() const override; + QString propertyName() const override; +}; +#endif + +QT_END_NAMESPACE + +#endif // QQUICKANIMATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b2b5258466f1f98dc02f9197daf14ce0d331cd0c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimator_p_p.h @@ -0,0 +1,74 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATOR_P_P_H +#define QQUICKANIMATOR_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanimator_p.h" +#include "qquickanimation_p_p.h" +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickAnimatorJob; + +class QQuickAnimatorPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickAnimator) +public: + QQuickAnimatorPrivate() + : target(0) + , duration(250) + , from(0) + , to(0) + , fromIsDefined(false) + , toIsDefined(false) + { + } + + QPointer target; + int duration; + QEasingCurve easing; + qreal from; + qreal to; + + uint fromIsDefined : 1; + uint toIsDefined : 1; + + void apply(QQuickAnimatorJob *job, const QString &propertyName, QQuickStateActions &actions, QQmlProperties &modified, QObject *defaultTarget); +}; + +class QQuickRotationAnimatorPrivate : public QQuickAnimatorPrivate +{ +public: + QQuickRotationAnimatorPrivate() + : direction(QQuickRotationAnimator::Numerical) + { + } + QQuickRotationAnimator::RotationDirection direction; +}; + +#if QT_CONFIG(quick_shadereffect) +class QQuickUniformAnimatorPrivate : public QQuickAnimatorPrivate +{ +public: + QString uniform; +}; +#endif + +QT_END_NAMESPACE + +#endif // QQUICKANIMATOR_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorcontroller_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorcontroller_p.h new file mode 100644 index 0000000000000000000000000000000000000000..68f12ff03e8bd9e2cf145b90e7e78a486a38551c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorcontroller_p.h @@ -0,0 +1,76 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// Copyright (C) 2016 Gunnar Sletta +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATORCONTROLLER_P_H +#define QQUICKANIMATORCONTROLLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanimatorjob_p.h" +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT QQuickAnimatorController : public QObject, public QAnimationJobChangeListener +{ + Q_OBJECT + +public: + QQuickAnimatorController(QQuickWindow *window); + ~QQuickAnimatorController(); + + void advance(); + void beforeNodeSync(); + void afterNodeSync(); + + void animationFinished(QAbstractAnimationJob *job) override; + void animationStateChanged(QAbstractAnimationJob *job, QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override; + + void requestSync(); + + // These are called from the GUI thread (the proxy) + void start(const QSharedPointer &job); + void cancel(const QSharedPointer &job); + bool isPendingStart(const QSharedPointer &job) const { return m_rootsPendingStart.contains(job); } + + void lock() { m_mutex.lock(); } + void unlock() { m_mutex.unlock(); } + + void windowNodesDestroyed(); + + QQuickWindow *window() const { return m_window; } + +private: + friend class tst_Animators; + + void start_helper(QAbstractAnimationJob *job); + void cancel_helper(QAbstractAnimationJob *job); + + QSet m_runningAnimators; + QHash > m_animationRoots; + QSet > m_rootsPendingStop; + QSet > m_rootsPendingStart; + + QQuickWindow *m_window; + QMutex m_mutex; +}; + + + +QT_END_NAMESPACE + +#endif // QQUICKANIMATORCONTROLLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorjob_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorjob_p.h new file mode 100644 index 0000000000000000000000000000000000000000..06de54f163bb309529335448648eb0159cbc1000 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickanimatorjob_p.h @@ -0,0 +1,290 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// Copyright (C) 2016 Gunnar Sletta +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATORJOB_P_H +#define QQUICKANIMATORJOB_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAnimator; +class QQuickWindow; +class QQuickItem; +class QQuickAbstractAnimation; + +class QQuickAnimatorController; + +class QSGOpacityNode; + +class Q_QUICK_EXPORT QQuickAnimatorProxyJob : public QObject, public QAbstractAnimationJob +{ + Q_OBJECT + +public: + QQuickAnimatorProxyJob(QAbstractAnimationJob *job, QQuickAbstractAnimation *animation); + ~QQuickAnimatorProxyJob(); + + int duration() const override { return m_duration; } + + const QSharedPointer &job() const { return m_job; } + +protected: + void updateCurrentTime(int) override; + void updateLoopCount(int) override; + void updateState(QAbstractAnimationJob::State newState, QAbstractAnimationJob::State oldState) override; + void debugAnimation(QDebug d) const override; + +public Q_SLOTS: + void windowChanged(QQuickWindow *window); + void sceneGraphInitialized(); + +private: + void syncBackCurrentValues(); + void readyToAnimate(); + void setWindow(QQuickWindow *window); + static QObject *findAnimationContext(QQuickAbstractAnimation *); + + QPointer m_controller; + QSharedPointer m_job; + int m_duration; + + enum InternalState { + State_Starting, // Used when it should be running, but no we're still missing the controller. + State_Running, + State_Paused, + State_Stopped + }; + + InternalState m_internalState; +}; + +class Q_QUICK_EXPORT QQuickAnimatorJob : public QAbstractAnimationJob +{ +public: + virtual void setTarget(QQuickItem *target); + QQuickItem *target() const { return m_target; } + + void setFrom(qreal from) { + m_from = from; + boundValue(); + } + qreal from() const { return m_from; } + + void setTo(qreal to) { + m_to = to; + boundValue(); + } + qreal to() const { return m_to; } + + void setDuration(int duration) { m_duration = duration; } + int duration() const override { return m_duration; } + + QEasingCurve easingCurve() const { return m_easing; } + void setEasingCurve(const QEasingCurve &curve) { m_easing = curve; } + + // Initialize is called on the GUI thread just before it is started + // and taken over on the render thread. + virtual void initialize(QQuickAnimatorController *controller); + + // Called on the render thread during SG shutdown. + virtual void invalidate() = 0; + + // Called on the GUI thread after a complete render thread animation job + // has been completed to write back a given animator's result to the + // source item. + virtual void writeBack() = 0; + + // Called before the SG sync on the render thread. The GUI thread is + // locked during this call. + virtual void preSync() { } + + // Called after the SG sync on the render thread. The GUI thread is + // locked during this call. + virtual void postSync() { } + + // Called after animations have ticked on the render thread. No locks are + // held at this time, so synchronization needs to be taken into account + // if applicable. + virtual void commit() { } + + bool isTransform() const { return m_isTransform; } + bool isUniform() const { return m_isUniform; } + + qreal value() const; + + QQuickAnimatorController *controller() const { return m_controller; } + +protected: + QQuickAnimatorJob(); + void debugAnimation(QDebug d) const override; + + qreal progress(int time) const; + void boundValue(); + + QPointer m_target; + QQuickAnimatorController *m_controller; + + qreal m_from; + qreal m_to; + qreal m_value; + + QEasingCurve m_easing; + + int m_duration; + + uint m_isTransform : 1; + uint m_isUniform : 1; +}; + +class QQuickTransformAnimatorJob : public QQuickAnimatorJob +{ +public: + + struct Helper + { + Helper() + : ref(1) + , node(nullptr) + , ox(0) + , oy(0) + , dx(0) + , dy(0) + , scale(1) + , rotation(0) + , wasSynced(false) + , wasChanged(false) + { + } + + void sync(); + void commit(); + + int ref; + QQuickItem *item; + QSGTransformNode *node; + + // Origin + float ox; + float oy; + + float dx; + float dy; + float scale; + float rotation; + + uint wasSynced : 1; + uint wasChanged : 1; + }; + + ~QQuickTransformAnimatorJob(); + + void commit() override; + void preSync() override; + + void setTarget(QQuickItem *item) override; + +protected: + QQuickTransformAnimatorJob(); + void invalidate() override; + + Helper *m_helper; +}; + +class Q_QUICK_EXPORT QQuickScaleAnimatorJob : public QQuickTransformAnimatorJob +{ +public: + void updateCurrentTime(int time) override; + void writeBack() override; +}; + +class Q_QUICK_EXPORT QQuickXAnimatorJob : public QQuickTransformAnimatorJob +{ +public: + void updateCurrentTime(int time) override; + void writeBack() override; +}; + +class Q_QUICK_EXPORT QQuickYAnimatorJob : public QQuickTransformAnimatorJob +{ +public: + void updateCurrentTime(int time) override; + void writeBack() override; +}; + +class Q_QUICK_EXPORT QQuickRotationAnimatorJob : public QQuickTransformAnimatorJob +{ +public: + QQuickRotationAnimatorJob(); + + void updateCurrentTime(int time) override; + void writeBack() override; + + void setDirection(QQuickRotationAnimator::RotationDirection direction) { m_direction = direction; } + QQuickRotationAnimator::RotationDirection direction() const { return m_direction; } + +private: + QQuickRotationAnimator::RotationDirection m_direction; +}; + +class Q_QUICK_EXPORT QQuickOpacityAnimatorJob : public QQuickAnimatorJob +{ +public: + QQuickOpacityAnimatorJob(); + + void invalidate() override; + void updateCurrentTime(int time) override; + void writeBack() override; + void postSync() override; + +private: + QSGOpacityNode *m_opacityNode; +}; + +#if QT_CONFIG(quick_shadereffect) +class QQuickShaderEffect; + +class Q_QUICK_EXPORT QQuickUniformAnimatorJob : public QQuickAnimatorJob +{ +public: + QQuickUniformAnimatorJob(); + + void setTarget(QQuickItem *target) override; + + void setUniform(const QByteArray &uniform) { m_uniform = uniform; } + QByteArray uniform() const { return m_uniform; } + + void updateCurrentTime(int time) override; + void writeBack() override; + void postSync() override; + + void invalidate() override; + +private: + QByteArray m_uniform; + QPointer m_effect; +}; +#endif + +QT_END_NAMESPACE + +#endif // QQUICKANIMATORJOB_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickapplication_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickapplication_p.h new file mode 100644 index 0000000000000000000000000000000000000000..57ce83b72872a55f777835c6ceecdb40850d632e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickapplication_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKAPPLICATION_P_H +#define QQUICKAPPLICATION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickApplication : public QQmlApplication +{ + Q_OBJECT + Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) // deprecated, use 'state' instead + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged FINAL) + Q_PROPERTY(bool supportsMultipleWindows READ supportsMultipleWindows CONSTANT FINAL) + Q_PROPERTY(Qt::ApplicationState state READ state NOTIFY stateChanged FINAL) + Q_PROPERTY(QFont font READ font CONSTANT FINAL) + Q_PROPERTY(QString displayName READ displayName WRITE setDisplayName NOTIFY displayNameChanged FINAL) + Q_PROPERTY(QQmlListProperty screens READ screens NOTIFY screensChanged FINAL) + Q_PROPERTY(QStyleHints *styleHints READ styleHints CONSTANT FINAL) + + QML_NAMED_ELEMENT(Application) + QML_SINGLETON + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickApplication(QObject *parent = nullptr); + virtual ~QQuickApplication(); + bool active() const; + Qt::LayoutDirection layoutDirection() const; + bool supportsMultipleWindows() const; + Qt::ApplicationState state() const; + QFont font() const; + QQmlListProperty screens(); + QString displayName() const; + void setDisplayName(const QString &displayName); + QStyleHints *styleHints(); + +Q_SIGNALS: + void activeChanged(); + void displayNameChanged(); + void layoutDirectionChanged(); + void stateChanged(Qt::ApplicationState state); + void screensChanged(); + +private Q_SLOTS: + void updateScreens(); + +private: + Q_DISABLE_COPY(QQuickApplication) + QVector m_screens; +}; + +QT_END_NAMESPACE + +#endif // QQUICKAPPLICATION_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickbehavior_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickbehavior_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c014a22d70a4287ac579b6ab9aeec665568be8c9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickbehavior_p.h @@ -0,0 +1,73 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBEHAVIOR_H +#define QQUICKBEHAVIOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractAnimation; +class QQuickBehaviorPrivate; +class Q_QUICK_EXPORT QQuickBehavior : public QObject, public QQmlPropertyValueInterceptor, public QQmlFinalizerHook +{ + Q_OBJECT + Q_INTERFACES(QQmlFinalizerHook) + Q_DECLARE_PRIVATE(QQuickBehavior) + + Q_INTERFACES(QQmlPropertyValueInterceptor) + Q_CLASSINFO("DefaultProperty", "animation") + Q_PROPERTY(QQuickAbstractAnimation *animation READ animation WRITE setAnimation) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(QVariant targetValue READ targetValue NOTIFY targetValueChanged REVISION(2, 13)) + Q_PROPERTY(QQmlProperty targetProperty READ targetProperty NOTIFY targetPropertyChanged REVISION(2, 15)) + Q_CLASSINFO("DeferredPropertyNames", "animation") + QML_NAMED_ELEMENT(Behavior) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickBehavior(QObject *parent=nullptr); + ~QQuickBehavior(); + + void setTarget(const QQmlProperty &) override; + void write(const QVariant &value) override; + bool bindable(QUntypedBindable *untypedBindable, QUntypedBindable target) override; + + QQuickAbstractAnimation *animation(); + void setAnimation(QQuickAbstractAnimation *); + + bool enabled() const; + void setEnabled(bool enabled); + + QVariant targetValue() const; + + QQmlProperty targetProperty() const; + + void componentFinalized() override; + +Q_SIGNALS: + void enabledChanged(); + void targetValueChanged(); + void targetPropertyChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKBEHAVIOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f1162fe368b631a7ad004189f0646154100b7d19 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p.h @@ -0,0 +1,81 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBORDERIMAGE_P_H +#define QQUICKBORDERIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimagebase_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickScaleGrid; +class QQuickGridScaledImage; +class QQuickBorderImagePrivate; +class Q_QUICK_EXPORT QQuickBorderImage : public QQuickImageBase +{ + Q_OBJECT + + Q_PROPERTY(QQuickScaleGrid *border READ border CONSTANT) + Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) + Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) + // read-only for BorderImage + Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) + QML_NAMED_ELEMENT(BorderImage) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickBorderImage(QQuickItem *parent=nullptr); + ~QQuickBorderImage(); + + QQuickScaleGrid *border(); + + enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile }; + Q_ENUM(TileMode) + + TileMode horizontalTileMode() const; + void setHorizontalTileMode(TileMode); + + TileMode verticalTileMode() const; + void setVerticalTileMode(TileMode); + + void setSource(const QUrl &url) override; + +Q_SIGNALS: + void horizontalTileModeChanged(); + void verticalTileModeChanged(); + void sourceSizeChanged(); + +protected: + void load() override; + void pixmapChange() override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + +private: + void setGridScaledImage(const QQuickGridScaledImage& sci); + +private Q_SLOTS: + void doUpdate(); + void requestFinished() override; +#if QT_CONFIG(qml_network) + void sciRequestFinished(); +#endif + +private: + Q_DISABLE_COPY(QQuickBorderImage) + Q_DECLARE_PRIVATE(QQuickBorderImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKBORDERIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0aab2a2d25d00185e64e413f2fdc3315fe703db1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickborderimage_p_p.h @@ -0,0 +1,76 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBORDERIMAGE_P_P_H +#define QQUICKBORDERIMAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimagebase_p_p.h" +#include "qquickscalegrid_p_p.h" + +#include + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(qml_network) +class QNetworkReply; +#endif +class QQuickBorderImagePrivate : public QQuickImageBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickBorderImage) + +public: + QQuickBorderImagePrivate() + { + } + + ~QQuickBorderImagePrivate() + { + } + + QQuickScaleGrid *getScaleGrid() + { + Q_Q(QQuickBorderImage); + if (!border) { + border = new QQuickScaleGrid(q); + qmlobject_connect(border, QQuickScaleGrid, SIGNAL(borderChanged()), + q, QQuickBorderImage, SLOT(doUpdate())); + } + return border; + } + + static void calculateRects(const QQuickScaleGrid *border, + const QSize &sourceSize, + const QSizeF &targetSize, + int horizontalTileMode, + int verticalTileMode, + qreal devicePixelRatio, + QRectF *targetRect, + QRectF *innerTargetRect, + QRectF *innerSourceRect, + QRectF *subSourceRect); + + QUrl sciurl; + QQuickScaleGrid *border = nullptr; + QQuickBorderImage::TileMode horizontalTileMode = QQuickBorderImage::Stretch; + QQuickBorderImage::TileMode verticalTileMode = QQuickBorderImage::Stretch; + bool pixmapChanged = false; + +#if QT_CONFIG(qml_network) + QNetworkReply *sciReply = nullptr; +#endif +}; + +QT_END_NAMESPACE + +#endif // QQUICKBORDERIMAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvascontext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvascontext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ec111ad34fc95ae1eb1c7b4176b411e752090f1b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvascontext_p.h @@ -0,0 +1,62 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCANVASCONTEXT_P_H +#define QQUICKCANVASCONTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QV4 { + struct ExecutionEngine; +} + +class QQuickCanvasItem; +class QSGLayer; + +class QQuickCanvasContext : public QObject +{ + Q_OBJECT + +public: + QQuickCanvasContext(QObject *parent = nullptr); + ~QQuickCanvasContext(); + + virtual QStringList contextNames() const = 0; + + // Init (ignore options if necessary) + virtual void init(QQuickCanvasItem *canvasItem, const QVariantMap &args) = 0; + + virtual void prepare(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing); + virtual void flush(); + + virtual QV4::ExecutionEngine *v4Engine() const = 0; + virtual void setV4Engine(QV4::ExecutionEngine *engine) = 0; + virtual QV4::ReturnedValue v4value() const = 0; + + virtual QImage toImage(const QRectF& bounds) = 0; + +Q_SIGNALS: + void textureChanged(); +}; + +QT_END_NAMESPACE + +#endif //QQUICKCANVASCONTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvasitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvasitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bd572da77d767077ef7d653141762a5b35ffbc20 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcanvasitem_p.h @@ -0,0 +1,188 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCANVASITEM_P_H +#define QQUICKCANVASITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickCanvasContext; + +class QQuickCanvasItemPrivate; +class QQuickPixmap; + +class QQuickCanvasPixmap final : public QQmlRefCounted +{ +public: + QQuickCanvasPixmap(const QImage& image); + QQuickCanvasPixmap(QQuickPixmap *pixmap); + ~QQuickCanvasPixmap(); + + QImage image(); + + qreal width() const; + qreal height() const; + bool isValid() const; + QQuickPixmap *pixmap() const { return m_pixmap;} + +private: + QQuickPixmap *m_pixmap; + QImage m_image; +}; + +class QQuickCanvasItem : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged) + Q_PROPERTY(QString contextType READ contextType WRITE setContextType NOTIFY contextTypeChanged) + Q_PROPERTY(QJSValue context READ context NOTIFY contextChanged) + Q_PROPERTY(QSizeF canvasSize READ canvasSize WRITE setCanvasSize NOTIFY canvasSizeChanged) + Q_PROPERTY(QSize tileSize READ tileSize WRITE setTileSize NOTIFY tileSizeChanged) + Q_PROPERTY(QRectF canvasWindow READ canvasWindow WRITE setCanvasWindow NOTIFY canvasWindowChanged) + Q_PROPERTY(RenderTarget renderTarget READ renderTarget WRITE setRenderTarget NOTIFY renderTargetChanged) + Q_PROPERTY(RenderStrategy renderStrategy READ renderStrategy WRITE setRenderStrategy NOTIFY renderStrategyChanged) + QML_NAMED_ELEMENT(Canvas) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum RenderTarget { + Image, + FramebufferObject + }; + Q_ENUM(RenderTarget) + + enum RenderStrategy { + Immediate, + Threaded, + Cooperative + }; + Q_ENUM(RenderStrategy) + + QQuickCanvasItem(QQuickItem *parent = nullptr); + ~QQuickCanvasItem(); + + bool isAvailable() const; + + QString contextType() const; + void setContextType(const QString &contextType); + + QJSValue context() const; + + QSizeF canvasSize() const; + void setCanvasSize(const QSizeF &); + + QSize tileSize() const; + void setTileSize(const QSize &); + + QRectF canvasWindow() const; + void setCanvasWindow(const QRectF& rect); + + RenderTarget renderTarget() const; + void setRenderTarget(RenderTarget target); + + RenderStrategy renderStrategy() const; + void setRenderStrategy(RenderStrategy strategy); + + QQuickCanvasContext *rawContext() const; + + QImage toImage(const QRectF& rect = QRectF()) const; + + Q_INVOKABLE void getContext(QQmlV4FunctionPtr args); + + Q_INVOKABLE void requestAnimationFrame(QQmlV4FunctionPtr args); + Q_INVOKABLE void cancelRequestAnimationFrame(QQmlV4FunctionPtr args); + + Q_INVOKABLE void requestPaint(); + Q_INVOKABLE void markDirty(const QRectF& dirtyRect = QRectF()); + + Q_INVOKABLE bool save(const QString &filename, const QSizeF &imageSize = QSizeF()) const; + Q_INVOKABLE QString toDataURL(const QString& type = QLatin1String("image/png")) const; + QQmlRefPointer loadedPixmap(const QUrl& url, QSizeF sourceSize = QSizeF()); + + bool isTextureProvider() const override; + QSGTextureProvider *textureProvider() const override; + +Q_SIGNALS: + void paint(const QRect ®ion); + void painted(); + void availableChanged(); + void contextTypeChanged(); + void contextChanged(); + void canvasSizeChanged(); + void tileSizeChanged(); + void canvasWindowChanged(); + void renderTargetChanged(); + void renderStrategyChanged(); + void imageLoaded(); + +public Q_SLOTS: + void loadImage(const QUrl& url, QSizeF sourceSize = QSizeF()); + void unloadImage(const QUrl& url); + bool isImageLoaded(const QUrl& url) const; + bool isImageLoading(const QUrl& url) const; + bool isImageError(const QUrl& url) const; + +private Q_SLOTS: + void sceneGraphInitialized(); + void checkAnimationCallbacks(); + void invalidateSceneGraph(); + void schedulePolish(); + +protected: + void componentComplete() override; + void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &) override; + void updatePolish() override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void releaseResources() override; + bool event(QEvent *event) override; +private: + Q_DECLARE_PRIVATE(QQuickCanvasItem) + Q_INVOKABLE void delayedCreate(); + bool createContext(const QString &contextType); + void initializeContext(QQuickCanvasContext *context, const QVariantMap &args = QVariantMap()); + static QRect tiledRect(const QRectF &window, const QSize &tileSize); + bool isPaintConnected(); +}; + +class QQuickContext2DRenderThread : public QThread +{ + Q_OBJECT +public: + QQuickContext2DRenderThread(QQmlEngine *eng); + ~QQuickContext2DRenderThread(); + + static QQuickContext2DRenderThread *instance(QQmlEngine *engine); + +private: + QQmlEngine *m_engine; + QObject *m_eventLoopQuitHack; + static QHash renderThreads; + static QMutex renderThreadsMutex; +}; + +QT_END_NAMESPACE + +#endif //QQUICKCANVASITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickclipnode_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickclipnode_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ec12a1af4ed0bd25ca5cd22f3bd428e2cae4c3f8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickclipnode_p.h @@ -0,0 +1,49 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCLIPNODE_P_H +#define QQUICKCLIPNODE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDefaultClipNode : public QSGClipNode +{ +public: + QQuickDefaultClipNode(const QRectF &); + + void setRect(const QRectF &); + QRectF rect() const { return m_rect; } + + void setRadius(qreal radius); + qreal radius() const { return m_radius; } + + virtual void update(); + +private: + void updateGeometry(); + QRectF m_rect; + qreal m_radius; + + uint m_dirty_geometry : 1; + uint m_reserved : 31; + + QSGGeometry m_geometry; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCLIPNODE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcolorgroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcolorgroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8637b12ca36ef133edec92b76aa7de9753576288 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcolorgroup_p.h @@ -0,0 +1,208 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKCOLORGROUP_H +#define QQUICKCOLORGROUP_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of QQuickColorGroup. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickPalette; +class QQuickPaletteColorProvider; + +class Q_QUICK_EXPORT QQuickColorGroup : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QColor alternateBase READ alternateBase WRITE setAlternateBase RESET resetAlternateBase NOTIFY alternateBaseChanged FINAL) + Q_PROPERTY(QColor base READ base WRITE setBase RESET resetBase NOTIFY baseChanged FINAL) + Q_PROPERTY(QColor brightText READ brightText WRITE setBrightText RESET resetBrightText NOTIFY brightTextChanged FINAL) + Q_PROPERTY(QColor button READ button WRITE setButton RESET resetButton NOTIFY buttonChanged FINAL) + Q_PROPERTY(QColor buttonText READ buttonText WRITE setButtonText RESET resetButtonText NOTIFY buttonTextChanged FINAL) + Q_PROPERTY(QColor dark READ dark WRITE setDark RESET resetDark NOTIFY darkChanged FINAL) + Q_PROPERTY(QColor highlight READ highlight WRITE setHighlight RESET resetHighlight NOTIFY highlightChanged FINAL) + Q_PROPERTY(QColor highlightedText READ highlightedText WRITE setHighlightedText RESET resetHighlightedText NOTIFY highlightedTextChanged FINAL) + Q_PROPERTY(QColor light READ light WRITE setLight RESET resetLight NOTIFY lightChanged FINAL) + Q_PROPERTY(QColor link READ link WRITE setLink RESET resetLink NOTIFY linkChanged FINAL) + Q_PROPERTY(QColor linkVisited READ linkVisited WRITE setLinkVisited RESET resetLinkVisited NOTIFY linkVisitedChanged FINAL) + Q_PROPERTY(QColor mid READ mid WRITE setMid RESET resetMid NOTIFY midChanged FINAL) + Q_PROPERTY(QColor midlight READ midlight WRITE setMidlight RESET resetMidlight NOTIFY midlightChanged FINAL) + Q_PROPERTY(QColor shadow READ shadow WRITE setShadow RESET resetShadow NOTIFY shadowChanged FINAL) + Q_PROPERTY(QColor text READ text WRITE setText RESET resetText NOTIFY textChanged FINAL) + Q_PROPERTY(QColor toolTipBase READ toolTipBase WRITE setToolTipBase RESET resetToolTipBase NOTIFY toolTipBaseChanged FINAL) + Q_PROPERTY(QColor toolTipText READ toolTipText WRITE setToolTipText RESET resetToolTipText NOTIFY toolTipTextChanged FINAL) + Q_PROPERTY(QColor window READ window WRITE setWindow RESET resetWindow NOTIFY windowChanged FINAL) + Q_PROPERTY(QColor windowText READ windowText WRITE setWindowText RESET resetWindowText NOTIFY windowTextChanged FINAL) + Q_PROPERTY(QColor placeholderText READ placeholderText WRITE setPlaceholderText + RESET resetPlaceholderText NOTIFY placeholderTextChanged REVISION(6, 2) FINAL) + Q_PROPERTY(QColor accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged REVISION(6, 6) FINAL) + + QML_NAMED_ELEMENT(ColorGroup) + QML_ADDED_IN_VERSION(6, 0) + +public: // Types + using GroupPtr = QPointer; + +public: + Q_DISABLE_COPY_MOVE(QQuickColorGroup) + + explicit QQuickColorGroup(QObject *parent = nullptr); + + QColor alternateBase() const; + void setAlternateBase(const QColor &color); + void resetAlternateBase(); + + QColor base() const; + void setBase(const QColor &color); + void resetBase(); + + QColor brightText() const; + void setBrightText(const QColor &color); + void resetBrightText(); + + QColor button() const; + void setButton(const QColor &color); + void resetButton(); + + QColor buttonText() const; + void setButtonText(const QColor &color); + void resetButtonText(); + + QColor dark() const; + void setDark(const QColor &color); + void resetDark(); + + QColor highlight() const; + void setHighlight(const QColor &color); + void resetHighlight(); + + QColor highlightedText() const; + void setHighlightedText(const QColor &color); + void resetHighlightedText(); + + QColor light() const; + void setLight(const QColor &color); + void resetLight(); + + QColor link() const; + void setLink(const QColor &color); + void resetLink(); + + QColor linkVisited() const; + void setLinkVisited(const QColor &color); + void resetLinkVisited(); + + QColor mid() const; + void setMid(const QColor &color); + void resetMid(); + + QColor midlight() const; + void setMidlight(const QColor &color); + void resetMidlight(); + + QColor shadow() const; + void setShadow(const QColor &color); + void resetShadow(); + + QColor text() const; + void setText(const QColor &color); + void resetText(); + + QColor toolTipBase() const; + void setToolTipBase(const QColor &color); + void resetToolTipBase(); + + QColor toolTipText() const; + void setToolTipText(const QColor &color); + void resetToolTipText(); + + QColor window() const; + void setWindow(const QColor &color); + void resetWindow(); + + QColor windowText() const; + void setWindowText(const QColor &color); + void resetWindowText(); + + QColor placeholderText() const; + void setPlaceholderText(const QColor &color); + void resetPlaceholderText(); + + QColor accent() const; + void setAccent(const QColor &color); + void resetAccent(); + + QPalette::ColorGroup groupTag() const; + void setGroupTag(QPalette::ColorGroup tag); + + const QQuickPaletteColorProvider &colorProvider() const; + QQuickPaletteColorProvider &colorProvider(); + + static QQuickColorGroup* createWithParent(QQuickPalette &parent); + +Q_SIGNALS: + void alternateBaseChanged(); + void baseChanged(); + void brightTextChanged(); + void buttonChanged(); + void buttonTextChanged(); + void darkChanged(); + void highlightChanged(); + void highlightedTextChanged(); + void lightChanged(); + void linkChanged(); + void linkVisitedChanged(); + void midChanged(); + void midlightChanged(); + void shadowChanged(); + void textChanged(); + void toolTipBaseChanged(); + void toolTipTextChanged(); + void windowChanged(); + void windowTextChanged(); + Q_REVISION(6, 2) void placeholderTextChanged(); + Q_REVISION(6, 6) void accentChanged(); + + void changed(); + +protected: + explicit QQuickColorGroup(QQuickPalette &parent); + + static constexpr QPalette::ColorGroup defaultGroupTag() { return QPalette::All; } + + virtual QPalette::ColorGroup currentColorGroup() const; + +private: + using Notifier = void (QQuickColorGroup::* )(); + + QColor color(QPalette::ColorRole role) const; + void setColor(QPalette::ColorRole role, QColor color, Notifier notifier); + void resetColor(QPalette::ColorRole role, Notifier notifier); + +private: + QPalette::ColorGroup m_groupTag; + std::shared_ptr m_colorProvider; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORGROUP_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2d_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2d_p.h new file mode 100644 index 0000000000000000000000000000000000000000..946da136c9782a5bb420463543b22150d6b88310 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2d_p.h @@ -0,0 +1,244 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTEXT2D_P_H +#define QQUICKCONTEXT2D_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +//#define QQUICKCONTEXT2D_DEBUG //enable this for just DEBUG purpose! + +#ifdef QQUICKCONTEXT2D_DEBUG +#include +#endif + +QT_BEGIN_NAMESPACE + +namespace QV4 { + struct ExecutionEngine; +} + +class QQuickContext2DCommandBuffer; +class QQuickContext2DTexture; +class QQuickPixmap; +class QSGTexture; +class QSurface; + +class QQuickContext2D : public QQuickCanvasContext +{ + Q_OBJECT + +public: + Q_DISABLE_COPY(QQuickContext2D) + + enum TextBaseLineType { Alphabetic=0, Top, Middle, Bottom, Hanging}; + enum TextAlignType { Start=0, End, Left, Right, Center}; + enum PaintCommand { + Invalid = 0, + UpdateMatrix, + ClearRect, + FillRect, + StrokeRect, + Fill, + Stroke, + Clip, + UpdateBrush, + GlobalAlpha, + GlobalCompositeOperation, + StrokeStyle, + FillStyle, + LineWidth, + LineCap, + LineJoin, + LineDash, + LineDashOffset, + MiterLimit, + ShadowOffsetX, + ShadowOffsetY, + ShadowBlur, + ShadowColor, + Font, + TextBaseline, + TextAlign, + FillText, + StrokeText, + DrawImage, + DrawPixmap, + GetImageData + }; + + struct State { + State() + : strokeStyle(QColor(Qt::black)) + , fillStyle(QColor(Qt::black)) + , fillPatternRepeatX(false) + , fillPatternRepeatY(false) + , strokePatternRepeatX(false) + , strokePatternRepeatY(false) + , invertibleCTM(true) + , clip(false) + , fillRule(Qt::WindingFill) + , globalAlpha(1.0) + , lineWidth(1) + , lineCap(Qt::FlatCap) + , lineJoin(Qt::MiterJoin) + , lineDashOffset(0) + , miterLimit(10) + , shadowOffsetX(0) + , shadowOffsetY(0) + , shadowBlur(0) + , shadowColor(qRgba(0, 0, 0, 0)) + , globalCompositeOperation(QPainter::CompositionMode_SourceOver) + , font(QFont(QLatin1String("sans-serif"))) + , textAlign(QQuickContext2D::Start) + , textBaseline(QQuickContext2D::Alphabetic) + { + font.setPixelSize(10); + } + + QTransform matrix; + QPainterPath clipPath; + QBrush strokeStyle; + QBrush fillStyle; + bool fillPatternRepeatX:1; + bool fillPatternRepeatY:1; + bool strokePatternRepeatX:1; + bool strokePatternRepeatY:1; + bool invertibleCTM:1; + bool clip:1; + Qt::FillRule fillRule; + qreal globalAlpha; + qreal lineWidth; + Qt::PenCapStyle lineCap; + Qt::PenJoinStyle lineJoin; + QVector lineDash; + qreal lineDashOffset; + qreal miterLimit; + qreal shadowOffsetX; + qreal shadowOffsetY; + qreal shadowBlur; + QColor shadowColor; + QPainter::CompositionMode globalCompositeOperation; + QFont font; + QQuickContext2D::TextAlignType textAlign; + QQuickContext2D::TextBaseLineType textBaseline; + }; + + QQuickContext2D(QObject *parent = nullptr); + ~QQuickContext2D(); + + QStringList contextNames() const override; + void init(QQuickCanvasItem *canvasItem, const QVariantMap &args) override; + void prepare(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing) override; + void flush() override; + void sync(); + QThread *thread() const { return m_thread; } + QQuickContext2DTexture *texture() const; + QImage toImage(const QRectF& bounds) override; + + QV4::ReturnedValue v4value() const override; + QV4::ExecutionEngine *v4Engine() const override; + void setV4Engine(QV4::ExecutionEngine *eng) override; + + QQuickCanvasItem* canvas() const { return m_canvas; } + QQuickContext2DCommandBuffer* buffer() const { return m_buffer; } + + bool bufferValid() const { return m_buffer != nullptr; } + void popState(); + void pushState(); + void reset(); + + void fill(); + void clip(); + void stroke(); + void fillRect(qreal x, qreal y, qreal w, qreal h); + void strokeRect(qreal x, qreal y, qreal w, qreal h); + void clearRect(qreal x, qreal y, qreal w, qreal h); + void drawText(const QString& text, qreal x, qreal y, bool fill); + + //Transform APIs + void scale(qreal x, qreal y); + void rotate(qreal angle); + void shear(qreal h, qreal v); + void translate(qreal x, qreal y); + void transform(qreal a, qreal b, qreal c, qreal d, qreal e, qreal f); + void setTransform(qreal a, qreal b, qreal c, qreal d, qreal e, qreal f); + + // Path APIs + void beginPath(); + void closePath(); + void moveTo(qreal x, qreal y); + void lineTo(qreal x, qreal y); + void quadraticCurveTo(qreal cpx, qreal cpy, qreal x, qreal y); + void bezierCurveTo(qreal cp1x, qreal cp1y, + qreal cp2x, qreal cp2y, qreal x, qreal y); + void arcTo(qreal x1, qreal y1, qreal x2, qreal y2, qreal radius); + void rect(qreal x, qreal y, qreal w, qreal h); + void roundedRect(qreal x, qreal y,qreal w, qreal h, qreal xr, qreal yr); + void ellipse(qreal x, qreal y,qreal w, qreal h); + void text(const QString& str, qreal x, qreal y); + void arc(qreal x, qreal y, qreal radius, + qreal startAngle, qreal endAngle, + bool anticlockwise); + void addArcTo(const QPointF& p1, const QPointF& p2, qreal radius); + + bool isPointInPath(qreal x, qreal y) const; + + QPainterPath createTextGlyphs(qreal x, qreal y, const QString& text); + QQmlRefPointer createPixmap(const QUrl& url, QSizeF sourceSize = QSizeF()); + + QSurface *surface() const { return m_surface.data(); } + void setGrabbedImage(const QImage& grab); + + State state; + QStack m_stateStack; + QQuickCanvasItem* m_canvas; + QQuickContext2DCommandBuffer* m_buffer; + QPainterPath m_path; + QV4::PersistentValue m_fillStyle; + QV4::PersistentValue m_strokeStyle; + QV4::PersistentValue m_v4path; + QV4::ExecutionEngine *m_v4engine; + QScopedPointer m_surface; + QV4::PersistentValue m_v4value; + QQuickContext2DTexture *m_texture; + QQuickCanvasItem::RenderTarget m_renderTarget; + QQuickCanvasItem::RenderStrategy m_renderStrategy; + QQueue m_bufferQueue; + QThread *m_thread; + QImage m_grabbedImage; + bool m_grabbed:1; + + static QMutex mutex; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTEXT2D_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dcommandbuffer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dcommandbuffer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f048b1e08c67394f428e29b669d9606aa7f06149 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dcommandbuffer_p.h @@ -0,0 +1,260 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTEXT2DCOMMANDBUFFER_P_H +#define QQUICKCONTEXT2DCOMMANDBUFFER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include +#include "qquickcontext2d_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickCanvasItem; +class QMutex; + +class QQuickContext2DCommandBuffer +{ +public: + QQuickContext2DCommandBuffer(); + ~QQuickContext2DCommandBuffer(); + void reset(); + void clear(); + + inline int size() const { return commands.size(); } + inline bool isEmpty() const {return commands.isEmpty(); } + inline bool hasNext() const {return cmdIdx < commands.size(); } + inline QQuickContext2D::PaintCommand takeNextCommand() { return commands.at(cmdIdx++); } + + inline qreal takeGlobalAlpha() { return takeReal(); } + inline QPainter::CompositionMode takeGlobalCompositeOperation(){ return static_cast(takeInt()); } + inline QBrush takeStrokeStyle() { return takeBrush(); } + inline QBrush takeFillStyle() { return takeBrush(); } + + inline qreal takeLineWidth() { return takeReal(); } + inline Qt::PenCapStyle takeLineCap() { return static_cast(takeInt());} + inline Qt::PenJoinStyle takeLineJoin(){ return static_cast(takeInt());} + inline qreal takeMiterLimit() { return takeReal(); } + + inline void setGlobalAlpha( qreal alpha) + { + commands << QQuickContext2D::GlobalAlpha; + reals << alpha; + } + + inline void setGlobalCompositeOperation(QPainter::CompositionMode cm) + { + commands << QQuickContext2D::GlobalCompositeOperation; + ints << cm; + } + + inline void setStrokeStyle(const QBrush &style, bool repeatX = false, bool repeatY = false) + { + commands << QQuickContext2D::StrokeStyle; + brushes << style; + bools << repeatX << repeatY; + } + + inline void drawImage(const QImage& image, const QRectF& sr, const QRectF& dr) + { + commands << QQuickContext2D::DrawImage; + images << image; + rects << sr << dr; + } + + inline void drawPixmap(QQmlRefPointer pixmap, const QRectF& sr, const QRectF& dr) + { + commands << QQuickContext2D::DrawPixmap; + pixmaps << pixmap; + rects << sr << dr; + } + + inline qreal takeShadowOffsetX() { return takeReal(); } + inline qreal takeShadowOffsetY() { return takeReal(); } + inline qreal takeShadowBlur() { return takeReal(); } + inline QColor takeShadowColor() { return takeColor(); } + + + inline void updateMatrix(const QTransform& matrix) + { + commands << QQuickContext2D::UpdateMatrix; + matrixes << matrix; + } + + inline void clearRect(const QRectF& r) + { + commands << QQuickContext2D::ClearRect; + rects << r; + } + + inline void fillRect(const QRectF& r) + { + commands << QQuickContext2D::FillRect; + rects << r; + } + + inline void strokeRect(const QRectF& r) + { + QPainterPath p; + p.addRect(r); + + commands << QQuickContext2D::Stroke; + pathes << p; + } + + + inline void fill(const QPainterPath& path) + { + commands << QQuickContext2D::Fill; + pathes << path; + + } + + inline void stroke(const QPainterPath& path) + { + commands << QQuickContext2D::Stroke; + pathes << path; + } + + inline void clip(bool enabled, const QPainterPath& path) + { + commands << QQuickContext2D::Clip; + bools << enabled; + pathes << path; + } + + + + inline void setFillStyle(const QBrush &style, bool repeatX = false, bool repeatY = false) + { + commands << QQuickContext2D::FillStyle; + brushes << style; + bools << repeatX << repeatY; + } + + + inline void setLineWidth( qreal w) + { + commands << QQuickContext2D::LineWidth; + reals << w; + } + + inline void setLineCap(Qt::PenCapStyle cap) + { + commands << QQuickContext2D::LineCap; + ints << cap; + } + + inline void setLineJoin(Qt::PenJoinStyle join) + { + commands << QQuickContext2D::LineJoin; + ints << join; + } + + inline void setLineDash(const QVector &pattern) + { + commands << QQuickContext2D::LineDash; + reals << pattern.size(); + for (qreal r : pattern) + reals << r; + } + + inline void setLineDashOffset( qreal offset) + { + commands << QQuickContext2D::LineDashOffset; + reals << offset; + } + + inline void setMiterLimit( qreal limit) + { + commands << QQuickContext2D::MiterLimit; + reals << limit; + } + + inline void setShadowOffsetX( qreal x) + { + commands << QQuickContext2D::ShadowOffsetX; + reals << x; + } + + inline void setShadowOffsetY( qreal y) + { + commands << QQuickContext2D::ShadowOffsetY; + reals << y; + } + + inline void setShadowBlur( qreal b) + { + commands << QQuickContext2D::ShadowBlur; + reals << b; + } + + inline void setShadowColor(const QColor &color) + { + commands << QQuickContext2D::ShadowColor; + colors << color; + } + + inline QTransform takeMatrix() { return matrixes.at(matrixIdx++); } + + inline QRectF takeRect() { return rects.at(rectIdx++); } + + inline QPainterPath takePath() { return pathes.at(pathIdx++); } + + inline const QImage& takeImage() { return images.at(imageIdx++); } + inline QQmlRefPointer takePixmap() { return pixmaps.at(pixmapIdx++); } + + inline int takeInt() { return ints.at(intIdx++); } + inline bool takeBool() {return bools.at(boolIdx++); } + inline qreal takeReal() { return reals.at(realIdx++); } + inline QColor takeColor() { return colors.at(colorIdx++); } + inline QBrush takeBrush() { return brushes.at(brushIdx++); } + + void replay(QPainter* painter, QQuickContext2D::State& state, const QVector2D &scaleFactor); + +private: + static QPen makePen(const QQuickContext2D::State& state); + void setPainterState(QPainter* painter, const QQuickContext2D::State& state, const QPen& pen); + int cmdIdx; + int intIdx; + int boolIdx; + int realIdx; + int rectIdx; + int colorIdx; + int matrixIdx; + int brushIdx; + int pathIdx; + int imageIdx; + int pixmapIdx; + QVector commands; + + QVector ints; + QVector bools; + QVector reals; + QVector rects; + QVector colors; + QVector matrixes; + QVector brushes; + QVector pathes; + QVector images; + QVector > pixmaps; + QMutex queueLock; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTEXT2DCOMMANDBUFFER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtexture_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtexture_p.h new file mode 100644 index 0000000000000000000000000000000000000000..929f5308f303ab458db3a65378a09cd4051b4e6f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtexture_p.h @@ -0,0 +1,165 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTEXT2DTEXTURE_P_H +#define QQUICKCONTEXT2DTEXTURE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include +#include "qquickcanvasitem_p.h" +#include "qquickcontext2d_p.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickContext2DTile; +class QQuickContext2DCommandBuffer; + +class QQuickContext2DTexture : public QObject +{ + Q_OBJECT +public: + class PaintEvent : public QEvent { + public: + PaintEvent(QQuickContext2DCommandBuffer *b) : QEvent(QEvent::Type(QEvent::User + 1)), buffer(b) {} + QQuickContext2DCommandBuffer *buffer; + }; + + class CanvasChangeEvent : public QEvent { + public: + CanvasChangeEvent(const QSize &cSize, + const QSize &tSize, + const QRect &cWindow, + const QRect &dRect, + bool sm, + bool aa) + : QEvent(QEvent::Type(QEvent::User + 2)) + , canvasSize(cSize) + , tileSize(tSize) + , canvasWindow(cWindow) + , dirtyRect(dRect) + , smooth(sm) + , antialiasing(aa) + { + } + QSize canvasSize; + QSize tileSize; + QRect canvasWindow; + QRect dirtyRect; + bool smooth; + bool antialiasing; + }; + + QQuickContext2DTexture(); + ~QQuickContext2DTexture(); + + virtual QQuickCanvasItem::RenderTarget renderTarget() const = 0; + static QRect tiledRect(const QRectF& window, const QSize& tileSize); + + bool setCanvasSize(const QSize &size); + bool setTileSize(const QSize &size); + bool setCanvasWindow(const QRect& canvasWindow); + void setSmooth(bool smooth); + void setAntialiasing(bool antialiasing); + bool setDirtyRect(const QRect &dirtyRect); + bool canvasDestroyed(); + void setOnCustomThread(bool is) { m_onCustomThread = is; } + bool isOnCustomThread() const { return m_onCustomThread; } + + // Called during sync() on the scene graph thread while GUI is blocked. + virtual QSGTexture *textureForNextFrame(QSGTexture *lastFrame, QQuickWindow *window) = 0; + bool event(QEvent *e) override; + +Q_SIGNALS: + void textureChanged(); + +public Q_SLOTS: + void canvasChanged(const QSize& canvasSize, const QSize& tileSize, const QRect& canvasWindow, const QRect& dirtyRect, bool smooth, bool antialiasing); + void paint(QQuickContext2DCommandBuffer *ccb); + void markDirtyTexture(); + void setItem(QQuickCanvasItem* item); + virtual void grabImage(const QRectF& region = QRectF()) = 0; + +protected: + virtual QVector2D scaleFactor() const { return QVector2D(1, 1); } + + void paintWithoutTiles(QQuickContext2DCommandBuffer *ccb); + virtual QPaintDevice* beginPainting() {m_painting = true; return nullptr; } + virtual void endPainting() {m_painting = false;} + virtual QQuickContext2DTile* createTile() const = 0; + virtual void compositeTile(QQuickContext2DTile* tile) = 0; + + void clearTiles(); + virtual QSize adjustedTileSize(const QSize &ts); + QRect createTiles(const QRect& window); + + QList m_tiles; + QQuickContext2D *m_context; + QSurface *m_surface; + + QQuickContext2D::State m_state; + + QQuickCanvasItem* m_item; + QSize m_canvasSize; + QSize m_tileSize; + QRect m_canvasWindow; + qreal m_canvasDevicePixelRatio; + + QMutex m_mutex; + QWaitCondition m_condition; + + uint m_canvasWindowChanged : 1; + uint m_dirtyTexture : 1; + uint m_smooth : 1; + uint m_antialiasing : 1; + uint m_tiledCanvas : 1; + uint m_painting : 1; + uint m_onCustomThread : 1; // Not GUI and not SGRender +}; + +class QSGPlainTexture; +class QQuickContext2DImageTexture : public QQuickContext2DTexture +{ + Q_OBJECT + +public: + QQuickContext2DImageTexture(); + ~QQuickContext2DImageTexture(); + + QQuickCanvasItem::RenderTarget renderTarget() const override; + + QQuickContext2DTile* createTile() const override; + QPaintDevice* beginPainting() override; + void endPainting() override; + void compositeTile(QQuickContext2DTile* tile) override; + + QSGTexture *textureForNextFrame(QSGTexture *lastFrame, QQuickWindow *window) override; + +public Q_SLOTS: + void grabImage(const QRectF& region = QRectF()) override; + +private: + QImage m_image; + QImage m_displayImage; + QPainter m_painter; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTEXT2DTEXTURE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtile_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtile_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6544b62b05480fb72027ad312b79afba628226a3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickcontext2dtile_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTEXT2DTILE_P_H +#define QQUICKCONTEXT2DTILE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_canvas); + +#include "qquickcontext2d_p.h" +QT_BEGIN_NAMESPACE + +class QQuickContext2DTexture; +class QQuickContext2DCommandBuffer; + +class QQuickContext2DTile +{ +public: + QQuickContext2DTile(); + virtual ~QQuickContext2DTile(); + + bool dirty() const {return m_dirty;} + void markDirty(bool dirty) {m_dirty = dirty;} + + QRect rect() const {return m_rect;} + + virtual void setRect(const QRect& r) = 0; + virtual QPainter* createPainter(bool smooth, bool antialiasing); + virtual void drawFinished() {} + +protected: + virtual void aboutToDraw() {} + uint m_dirty : 1; + QRect m_rect; + QPaintDevice* m_device; + QPainter m_painter; +}; + +class QQuickContext2DImageTile : public QQuickContext2DTile +{ +public: + QQuickContext2DImageTile(); + ~QQuickContext2DImageTile(); + void setRect(const QRect& r) override; + const QImage& image() const {return m_image;} +private: + QImage m_image; +}; +QT_END_NAMESPACE + +#endif // QQUICKCONTEXT2DTILE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p.h new file mode 100644 index 0000000000000000000000000000000000000000..aa4390ac1338c08b770d477badab20ad2ce702e7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p.h @@ -0,0 +1,64 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDELIVERYAGENT_P_H +#define QQUICKDELIVERYAGENT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickDeliveryAgentPrivate; + +class Q_QUICK_EXPORT QQuickDeliveryAgent : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickDeliveryAgent) + +public: + struct Q_QUICK_EXPORT Transform + { + virtual ~Transform(); + virtual QPointF map(const QPointF &point) = 0; + }; + + explicit QQuickDeliveryAgent(QQuickItem *rootItem); + virtual ~QQuickDeliveryAgent(); + + QQuickItem *rootItem() const; + + Transform *sceneTransform() const; + void setSceneTransform(Transform *transform); + bool event(QEvent *ev) override; + +Q_SIGNALS: + +private: + Q_DISABLE_COPY(QQuickDeliveryAgent) +}; + +#ifndef QT_NO_DEBUG_STREAM +QDebug Q_QUICK_EXPORT operator<<(QDebug debug, const QQuickDeliveryAgent *da); +#endif + +QT_END_NAMESPACE + +#endif // QQUICKDELIVERYAGENT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..972ad53bd9a3b1ee93a6d495f697b6ab921e873b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdeliveryagent_p_p.h @@ -0,0 +1,204 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDELIVERYAGENT_P_P_H +#define QQUICKDELIVERYAGENT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickDragGrabber; +class QQuickItem; +class QQuickPointerHandler; +class QQuickWindow; + +/*! \internal + Extra device-specific data to be stored in QInputDevicePrivate::qqExtra +*/ +struct QQuickPointingDeviceExtra { + // used in QQuickPointerHandlerPrivate::deviceDeliveryTargets + QVector deliveryTargets; +}; + +class Q_QUICK_EXPORT QQuickDeliveryAgentPrivate : public QObjectPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickDeliveryAgent) + QQuickDeliveryAgentPrivate(QQuickItem *root); + ~QQuickDeliveryAgentPrivate(); + + QQuickItem *rootItem = nullptr; + + QQuickItem *activeFocusItem = nullptr; + + void deliverKeyEvent(QKeyEvent *e); + + enum FocusOption { + DontChangeFocusProperty = 0x01, + DontChangeSubFocusItem = 0x02 + }; + Q_DECLARE_FLAGS(FocusOptions, FocusOption) + + void setFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = { }); + void clearFocusInScope(QQuickItem *scope, QQuickItem *item, Qt::FocusReason reason, FocusOptions = { }); + static void notifyFocusChangesRecur(QQuickItem **item, int remaining, Qt::FocusReason reason); + void clearFocusObject(); + void updateFocusItemTransform(); + + QQuickItem *focusTargetItem() const; + + // Keeps track of the item currently receiving mouse events +#if QT_CONFIG(quick_draganddrop) + QQuickDragGrabber *dragGrabber = nullptr; +#endif + QQuickItem *lastUngrabbed = nullptr; + QStack eventsInDelivery; + QFlatMap, uint> hoverItems; + QVector hasFiltered; // during event delivery to a single receiver, the filtering parents for which childMouseEventFilter was already called + QVector skipDelivery; // during delivery of one event to all receivers, Items to which we know delivery is no longer necessary + + std::unique_ptr delayedTouch; + QList knownPointingDevices; + + uint currentHoverId = 0; +#if QT_CONFIG(wheelevent) + uint lastWheelEventAccepted = 0; +#endif + uchar compressedTouchCount = 0; + bool allowChildEventFiltering = true; + bool frameSynchronousHoverEnabled = true; + bool hoveredLeafItemFound = false; + + bool isSubsceneAgent = false; + static bool subsceneAgentsExist; + // QQuickDeliveryAgent::event() sets this to the one that's currently (trying to) handle the event + static QQuickDeliveryAgent *currentEventDeliveryAgent; + static QQuickDeliveryAgent *currentOrItemDeliveryAgent(const QQuickItem *item); + + Qt::FocusReason lastFocusReason = Qt::OtherFocusReason; + int pointerEventRecursionGuard = 0; + + int touchMouseId = -1; // only for obsolete stuff like QQuickItem::grabMouse() + // TODO get rid of these + const QPointingDevice *touchMouseDevice = nullptr; + ulong touchMousePressTimestamp = 0; + QPoint touchMousePressPos; // in screen coordinates + + QQuickDeliveryAgent::Transform *sceneTransform = nullptr; + + bool isDeliveringTouchAsMouse() const { return touchMouseId != -1 && touchMouseDevice; } + void cancelTouchMouseSynthesis(); + + bool checkIfDoubleTapped(ulong newPressEventTimestamp, const QPoint &newPressPos); + void resetIfDoubleTapPrevented(const QEventPoint &pressedPoint); + QPointingDevicePrivate::EventPointData *mousePointData(); + QPointerEvent *eventInDelivery() const; + + // Mouse positions are saved in widget coordinates + QPointF lastMousePosition; + bool deliverTouchAsMouse(QQuickItem *item, QTouchEvent *pointerEvent); + void translateTouchEvent(QTouchEvent *touchEvent); + void removeGrabber(QQuickItem *grabber, bool mouse = true, bool touch = true, bool cancel = false); + void clearGrabbers(QPointerEvent *pointerEvent); + void onGrabChanged(QObject *grabber, QPointingDevice::GrabTransition transition, const QPointerEvent *event, const QEventPoint &point); + static QPointerEvent *clonePointerEvent(QPointerEvent *event, std::optional transformedLocalPos = std::nullopt); + void deliverToPassiveGrabbers(const QVector > &passiveGrabbers, QPointerEvent *pointerEvent); + bool sendFilteredMouseEvent(QEvent *event, QQuickItem *receiver, QQuickItem *filteringParent); + bool sendFilteredPointerEvent(QPointerEvent *event, QQuickItem *receiver, QQuickItem *filteringParent = nullptr); + bool sendFilteredPointerEventImpl(QPointerEvent *event, QQuickItem *receiver, QQuickItem *filteringParent); + bool deliverSinglePointEventUntilAccepted(QPointerEvent *); + + // entry point of events to the window + void handleTouchEvent(QTouchEvent *); + void handleMouseEvent(QMouseEvent *); + bool compressTouchEvent(QTouchEvent *); + void flushFrameSynchronousEvents(QQuickWindow *win); + void deliverDelayedTouchEvent(); + void handleWindowDeactivate(QQuickWindow *win); + void handleWindowHidden(QQuickWindow *win); + + // utility functions that used to be in QQuickPointerEvent et al. + bool allUpdatedPointsAccepted(const QPointerEvent *ev); + static void localizePointerEvent(QPointerEvent *ev, const QQuickItem *dest); + QList exclusiveGrabbers(QPointerEvent *ev); + static bool anyPointGrabbed(const QPointerEvent *ev); + static bool allPointsGrabbed(const QPointerEvent *ev); + static bool isMouseEvent(const QPointerEvent *ev); + static bool isMouseOrWheelEvent(const QPointerEvent *ev); + static bool isHoverEvent(const QPointerEvent *ev); + static bool isTouchEvent(const QPointerEvent *ev); + static bool isTabletEvent(const QPointerEvent *ev); + static bool isEventFromMouseOrTouchpad(const QPointerEvent *ev); + static bool isSynthMouse(const QPointerEvent *ev); + static bool isWithinDoubleClickInterval(ulong timeInterval); + static bool isWithinDoubleTapDistance(const QPoint &distanceBetweenPresses); + static bool isSinglePointDevice(const QInputDevice *dev); + static QQuickPointingDeviceExtra *deviceExtra(const QInputDevice *device); + + // delivery of pointer events: + void touchToMouseEvent(QEvent::Type type, const QEventPoint &p, const QTouchEvent *touchEvent, QMutableSinglePointEvent *mouseEvent); + void ensureDeviceConnected(const QPointingDevice *dev); + void deliverPointerEvent(QPointerEvent *); + bool deliverTouchCancelEvent(QTouchEvent *); + bool deliverPressOrReleaseEvent(QPointerEvent *, bool handlersOnly = false); + void deliverUpdatedPoints(QPointerEvent *event); + void deliverMatchingPointsToItem(QQuickItem *item, bool isGrabber, QPointerEvent *pointerEvent, bool handlersOnly = false); + + QVector pointerTargets(QQuickItem *, const QPointerEvent *event, const QEventPoint &point, + bool checkMouseButtons, bool checkAcceptsTouch) const; + QVector mergePointerTargets(const QVector &list1, const QVector &list2) const; + + // hover delivery + enum class HoverChange : uint8_t { + Clear, + Set, + }; + bool deliverHoverEvent(const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp); + bool deliverHoverEventRecursive(QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp); + bool deliverHoverEventToItem(QQuickItem *item, const QPointF &scenePos, const QPointF &lastScenePos, Qt::KeyboardModifiers modifiers, ulong timestamp, + HoverChange hoverChange); + bool sendHoverEvent(QEvent::Type, QQuickItem *, const QPointF &scenePos, const QPointF &lastScenePos, + Qt::KeyboardModifiers modifiers, ulong timestamp); + bool clearHover(ulong timestamp = 0); + +#if QT_CONFIG(quick_draganddrop) + void deliverDragEvent(QQuickDragGrabber *, QEvent *); + bool deliverDragEvent(QQuickDragGrabber *, QQuickItem *, QDragMoveEvent *, + QVarLengthArray *currentGrabItems = nullptr, + QObject *formerTarget = nullptr); +#endif + + static bool dragOverThreshold(qreal d, Qt::Axis axis, QMouseEvent *event, int startDragThreshold = -1); + + static bool dragOverThreshold(qreal d, Qt::Axis axis, const QEventPoint &tp, int startDragThreshold = -1); + + static bool dragOverThreshold(QVector2D delta); +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickDeliveryAgentPrivate::FocusOptions) + +QT_END_NAMESPACE + +#endif // QQUICKDELIVERYAGENT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomobjectdata_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomobjectdata_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6987f60028c81080bf4812ea801f309b9338bc9d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomobjectdata_p.h @@ -0,0 +1,70 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERCUSTOMOBJECTDATA_H +#define DESIGNERCUSTOMOBJECTDATA_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE +class QQmlContext; + +class QQuickDesignerCustomObjectData +{ +public: + static void registerData(QObject *object); + static QQuickDesignerCustomObjectData *get(QObject *object); + static QVariant getResetValue(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName); + static void doResetProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName); + static bool hasValidResetBinding(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName); + static bool hasBindingForProperty(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName, + bool *hasChanged); + static void setPropertyBinding(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName, + const QString &expression); + static void keepBindingFromGettingDeleted(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName); + void handleDestroyed(); + +private: + QQuickDesignerCustomObjectData(QObject *object); + void populateResetHashes(); + QObject *object() const; + QVariant getResetValue(const QQuickDesignerSupport::PropertyName &propertyName) const; + void doResetProperty(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName); + bool hasValidResetBinding(const QQuickDesignerSupport::PropertyName &propertyName) const; + QQmlAnyBinding getResetBinding(const QQuickDesignerSupport::PropertyName &propertyName) const; + bool hasBindingForProperty(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, bool *hasChanged) const; + void setPropertyBinding(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName, const QString &expression); + void keepBindingFromGettingDeleted(QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName); + + QObject *m_object; + QHash m_resetValueHash; + QHash m_resetBindingHash; + mutable QHash m_hasBindingHash; +}; + +QT_END_NAMESPACE + +#endif // DESIGNERCUSTOMOBJECTDATA_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomparserobject_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomparserobject_p.h new file mode 100644 index 0000000000000000000000000000000000000000..67f78d9cbb6bfe2d34683fa6ee06b2052e84a690 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignercustomparserobject_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKDESIGNERCUSTOMPARSEROBJECT_H +#define QUICKDESIGNERCUSTOMPARSEROBJECT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickDesignerCustomParserObject : public QObject +{ + Q_OBJECT + +public: + QQuickDesignerCustomParserObject(); +}; + +class QQuickDesignerCustomParser : public QQmlCustomParser +{ +public: + QQuickDesignerCustomParser() + : QQmlCustomParser(AcceptsAttachedProperties | AcceptsSignalHandlers) {} + + void verifyBindings(const QQmlRefPointer &compilationUnit, const QList &props) override; + void applyBindings(QObject *obj, const QQmlRefPointer &compilationUnit, const QList &bindings) override; +}; + +QT_END_NAMESPACE + +#endif // QUICKDESIGNERCUSTOMPARSEROBJECT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupport_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupport_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c5b91c032c9e4545385b1ed15411649e208db8b4 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupport_p.h @@ -0,0 +1,134 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORT_H +#define DESIGNERSUPPORT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QSGLayer; +class QImage; +class QTransform; +class QQmlContext; +class QQuickView; +class QObject; +class QQuickWindow; + +class Q_QUICK_EXPORT QQuickDesignerSupport +{ +public: + typedef QByteArray PropertyName; + typedef QList PropertyNameList; + typedef QByteArray TypeName; + + enum DirtyType { + TransformOrigin = 0x00000001, + Transform = 0x00000002, + BasicTransform = 0x00000004, + Position = 0x00000008, + Size = 0x00000010, + + ZValue = 0x00000020, + Content = 0x00000040, + Smooth = 0x00000080, + OpacityValue = 0x00000100, + ChildrenChanged = 0x00000200, + ChildrenStackingChanged = 0x00000400, + ParentChanged = 0x00000800, + + Clip = 0x00001000, + Window = 0x00002000, + + EffectReference = 0x00008000, + Visible = 0x00010000, + HideReference = 0x00020000, + + TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position | Size | Window, + ComplexTransformUpdateMask = Transform | Window, + ContentUpdateMask = Size | Content | Smooth | Window, + ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window, + AllMask = TransformUpdateMask | ContentUpdateMask | ChildrenUpdateMask + }; + + + QQuickDesignerSupport(); + ~QQuickDesignerSupport(); + + void refFromEffectItem(QQuickItem *referencedItem, bool hide = true); + void derefFromEffectItem(QQuickItem *referencedItem, bool unhide = true); + + QImage renderImageForItem(QQuickItem *referencedItem, const QRectF &boundingRect, const QSize &imageSize); + + static bool isDirty(QQuickItem *referencedItem, DirtyType dirtyType); + static void addDirty(QQuickItem *referencedItem, DirtyType dirtyType); + static void resetDirty(QQuickItem *referencedItem); + + static QTransform windowTransform(QQuickItem *referencedItem); + static QTransform parentTransform(QQuickItem *referencedItem); + + static bool isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem); + static bool areChildrenAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem); + static bool hasAnchor(QQuickItem *item, const QString &name); + static QQuickItem *anchorFillTargetItem(QQuickItem *item); + static QQuickItem *anchorCenterInTargetItem(QQuickItem *item); + static QPair anchorLineTarget(QQuickItem *item, const QString &name, QQmlContext *context); + static void resetAnchor(QQuickItem *item, const QString &name); + static void emitComponentCompleteSignalForAttachedProperty(QObject *item); + + static QList statesForItem(QQuickItem *item); + + static bool isComponentComplete(QQuickItem *item); + + static int borderWidth(QQuickItem *item); + + static void refreshExpressions(QQmlContext *context); + + static void setRootItem(QQuickView *view, QQuickItem *item); + + static bool isValidWidth(QQuickItem *item); + static bool isValidHeight(QQuickItem *item); + + static void updateDirtyNode(QQuickItem *item); + + static void activateDesignerMode(); + + static void disableComponentComplete(); + static void enableComponentComplete(); + + static void polishItems(QQuickWindow *window); + +private: + QHash m_itemTextureHash; +}; + +class Q_QUICK_EXPORT ComponentCompleteDisabler +{ +public: + ComponentCompleteDisabler(); + + ~ComponentCompleteDisabler(); +}; + +typedef QQuickDesignerSupport DesignerSupport; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportitems_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportitems_p.h new file mode 100644 index 0000000000000000000000000000000000000000..be7b04727a0ed5d883fff00c6f10435be1c3158c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportitems_p.h @@ -0,0 +1,48 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORTITEM_H +#define DESIGNERSUPPORTITEM_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDesignerSupportItems +{ +public: + static QObject *createPrimitive(const QString &typeName, QTypeRevision version, QQmlContext *context); + static QObject *createComponent(const QUrl &componentUrl, QQmlContext *context); + static void tweakObjects(QObject *object); + static bool objectWasDeleted(QObject *object); + static void disableNativeTextRendering(QQuickItem *item); + static void disableTextCursor(QQuickItem *item); + static void disableTransition(QObject *object); + static void disableBehaivour(QObject *object); + static void stopUnifiedTimer(); + static void registerFixResourcePathsForObjectCallBack(void (*callback)(QObject *)); +}; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORTITEM_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportmetainfo_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportmetainfo_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6fa71b0e041572d307af0fe178c84cb9abbbbfd7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportmetainfo_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORTMETAINFO_H +#define DESIGNERSUPPORTMETAINFO_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDesignerSupportMetaInfo +{ +public: + static bool isSubclassOf(QObject *object, const QByteArray &superTypeName); + static void registerNotifyPropertyChangeCallBack(void (*callback)(QObject *, const QQuickDesignerSupport::PropertyName &)); + static void registerMockupObject(const char *uri, int versionMajor, int versionMinor, const char *qmlName); +}; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORTMETAINFO_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportproperties_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportproperties_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6d3df49087a85e1c8fea927c2a7375f3f58783d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportproperties_p.h @@ -0,0 +1,67 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORTPROPERTIES_H +#define DESIGNERSUPPORTPROPERTIES_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDesignerSupportProperties +{ +public: + static void createNewDynamicProperty(QObject *object, QQmlEngine *engine, const QString &name); + static void registerNodeInstanceMetaObject(QObject *object, QQmlEngine *engine); + static void registerCustomData(QObject *object); + static QVariant getResetValue(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName); + static void doResetProperty(QObject *object, QQmlContext *context, const QQuickDesignerSupport::PropertyName &propertyName); + static bool hasValidResetBinding(QObject *object, const QQuickDesignerSupport::PropertyName &propertyName); + + static bool hasBindingForProperty(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName, + bool *hasChanged); + static void setPropertyBinding(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName, + const QString &expression); + static void keepBindingFromGettingDeleted(QObject *object, + QQmlContext *context, + const QQuickDesignerSupport::PropertyName &propertyName); + + static bool isPropertyQObject(const QMetaProperty &metaProperty); + static QObject *readQObjectProperty(const QMetaProperty &metaProperty, QObject *object); + + static void getPropertyCache(QObject *object); + static bool isPropertyBlackListed(const QQuickDesignerSupport::PropertyName &propertyName); + static QQuickDesignerSupport::PropertyNameList propertyNameListForWritableProperties(QObject *object); + static QQuickDesignerSupport::PropertyNameList allPropertyNames(QObject *object, + const QQuickDesignerSupport::PropertyName &baseName = QQuickDesignerSupport::PropertyName(), + QObjectList *inspectedObjects = nullptr, + int depth = 0); + static bool hasFullImplementedListInterface(const QQmlListReference &list); +}; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORTPROPERTIES_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportpropertychanges_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportpropertychanges_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9d2b1ba971372dcd748cb82006c271f66c177954 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportpropertychanges_p.h @@ -0,0 +1,40 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORTPROPERTYCHANGES_H +#define DESIGNERSUPPORTPROPERTYCHANGES_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDesignerSupportPropertyChanges +{ +public: + static void detachFromState(QObject *propertyChanges); + static void attachToState(QObject *propertyChanges); + static QObject *targetObject(QObject *propertyChanges); + static void removeProperty(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName); + static QVariant getProperty(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName); + static void changeValue(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName, const QVariant &value); + static void changeExpression(QObject *propertyChanges, const QQuickDesignerSupport::PropertyName &propertyName, const QString &expression); + static QObject *stateObject(QObject *propertyChanges); + static bool isNormalProperty(const QQuickDesignerSupport::PropertyName &propertyName); +}; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORTPROPERTYCHANGES_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportstates_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportstates_p.h new file mode 100644 index 0000000000000000000000000000000000000000..862a33ccc894bb62922acdca75b547d8539d84e2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdesignersupportstates_p.h @@ -0,0 +1,46 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DESIGNERSUPPORTSTATES_H +#define DESIGNERSUPPORTSTATES_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdesignersupport_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickDesignerSupportStates +{ +public: + static bool isStateActive(QObject *object, QQmlContext *context); + static void activateState(QObject *object, QQmlContext *context); + static void deactivateState(QObject *object); + static bool changeValueInRevertList(QObject *state, + QObject *target, + const QQuickDesignerSupport::PropertyName &propertyName, + const QVariant &value); + + static bool updateStateBinding(QObject *state, QObject *target, + const QQuickDesignerSupport::PropertyName &propertyName, + const QString &expression); + + static bool resetStateProperty(QObject *state, QObject *target, + const QQuickDesignerSupport::PropertyName &propertyName, + const QVariant &); +}; + +QT_END_NAMESPACE + +#endif // DESIGNERSUPPORTSTATES_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6e5b111fe6753f9c29ddeb5fc69209301f14faae --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p.h @@ -0,0 +1,299 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAG_P_H +#define QQUICKDRAG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include + +#include +#include +#include + +QT_REQUIRE_CONFIG(quick_draganddrop); + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickDrag; + +class QQuickDragGrabber +{ + class Item : public QQmlGuard + { + public: + Item(QQuickItem *item) : QQmlGuard(Item::objectDestroyedImpl, item) {} + + QIntrusiveListNode node; + private: + static void objectDestroyedImpl(QQmlGuardImpl *guard) { delete static_cast(guard); } + }; + + typedef QIntrusiveList ItemList; + +public: + QQuickDragGrabber() : m_target(nullptr) {} + ~QQuickDragGrabber() { while (!m_items.isEmpty()) delete m_items.first(); } + + + QObject *target() const + { + if (m_target) + return m_target; + else if (!m_items.isEmpty()) + return *m_items.first(); + else + return nullptr; + } + void setTarget(QObject *target) { m_target = target; } + void resetTarget() { m_target = nullptr; } + + bool isEmpty() const { return m_items.isEmpty(); } + + typedef ItemList::iterator iterator; + iterator begin() { return m_items.begin(); } + iterator end() { return m_items.end(); } + + void grab(QQuickItem *item) { m_items.insert(new Item(item)); } + iterator release(iterator at) { Item *item = *at; at = at.erase(); delete item; return at; } + + auto& ignoreList() { return m_ignoreDragItems; } + +private: + + ItemList m_items; + QVarLengthArray m_ignoreDragItems; + QObject *m_target; +}; + +class QQuickDropEventEx : public QDropEvent +{ +public: + void setProposedAction(Qt::DropAction action) { m_defaultAction = action; m_dropAction = action; } + + static void setProposedAction(QDropEvent *event, Qt::DropAction action) { + static_cast(event)->setProposedAction(action); + } + + void copyActions(const QDropEvent &from) { + m_defaultAction = from.proposedAction(); m_dropAction = from.dropAction(); } + + static void copyActions(QDropEvent *to, const QDropEvent &from) { + static_cast(to)->copyActions(from); + } +}; + +class QQuickDragMimeData : public QMimeData +{ + Q_OBJECT +public: + QQuickDragMimeData() + : m_source(nullptr) + { + } + + QStringList keys() const { return m_keys; } + QObject *source() const { return m_source; } + +private: + QObject *m_source; + Qt::DropActions m_supportedActions; + QStringList m_keys; + + friend class QQuickDragAttached; + friend class QQuickDragAttachedPrivate; +}; + +class QQuickDragAttached; +class Q_QUICK_EXPORT QQuickDrag : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged RESET resetTarget FINAL) + Q_PROPERTY(Axis axis READ axis WRITE setAxis NOTIFY axisChanged FINAL FINAL) + Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged FINAL) + Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged FINAL) + Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged FINAL) + Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged FINAL) + Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) + Q_PROPERTY(bool filterChildren READ filterChildren WRITE setFilterChildren NOTIFY filterChildrenChanged FINAL) + Q_PROPERTY(bool smoothed READ smoothed WRITE setSmoothed NOTIFY smoothedChanged FINAL) + // Note, threshold was added in QtQuick 2.2 but REVISION is not supported (or needed) for grouped + // properties See QTBUG-33179 + Q_PROPERTY(qreal threshold READ threshold WRITE setThreshold NOTIFY thresholdChanged RESET resetThreshold FINAL) + //### consider drag and drop + + QML_NAMED_ELEMENT(Drag) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Drag is only available via attached properties.") + QML_ATTACHED(QQuickDragAttached) + +public: + QQuickDrag(QObject *parent=nullptr); + ~QQuickDrag(); + + enum DragType { None, Automatic, Internal }; + Q_ENUM(DragType) + + QQuickItem *target() const; + void setTarget(QQuickItem *target); + void resetTarget(); + + enum Axis { XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis }; + Q_ENUM(Axis) + Axis axis() const; + void setAxis(Axis); + + qreal xmin() const; + void setXmin(qreal); + qreal xmax() const; + void setXmax(qreal); + qreal ymin() const; + void setYmin(qreal); + qreal ymax() const; + void setYmax(qreal); + + bool smoothed() const; + void setSmoothed(bool smooth); + + qreal threshold() const; + void setThreshold(qreal); + void resetThreshold(); + + bool active() const; + void setActive(bool); + + bool filterChildren() const; + void setFilterChildren(bool); + + static QQuickDragAttached *qmlAttachedProperties(QObject *obj); + +Q_SIGNALS: + void targetChanged(); + void axisChanged(); + void minimumXChanged(); + void maximumXChanged(); + void minimumYChanged(); + void maximumYChanged(); + void activeChanged(); + void filterChildrenChanged(); + void smoothedChanged(); + void thresholdChanged(); + +private: + QQuickItem *_target; + Axis _axis; + qreal _xmin; + qreal _xmax; + qreal _ymin; + qreal _ymax; + bool _active : 1; + bool _filterChildren: 1; + bool _smoothed : 1; + qreal _threshold; + Q_DISABLE_COPY(QQuickDrag) +}; + +class QQuickDragAttachedPrivate; +class Q_QUICK_EXPORT QQuickDragAttached : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickDragAttached) + + Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL) + Q_PROPERTY(QObject *source READ source WRITE setSource NOTIFY sourceChanged RESET resetSource FINAL) + Q_PROPERTY(QObject *target READ target NOTIFY targetChanged FINAL) + Q_PROPERTY(QPointF hotSpot READ hotSpot WRITE setHotSpot NOTIFY hotSpotChanged FINAL) + Q_PROPERTY(QUrl imageSource READ imageSource WRITE setImageSource NOTIFY imageSourceChanged FINAL) + // imageSourceSize is new in Qt 6.8; revision omitted because of QTBUG-33179 + Q_PROPERTY(QSize imageSourceSize READ imageSourceSize WRITE setImageSourceSize NOTIFY imageSourceSizeChanged FINAL) + Q_PROPERTY(QStringList keys READ keys WRITE setKeys NOTIFY keysChanged FINAL) + Q_PROPERTY(QVariantMap mimeData READ mimeData WRITE setMimeData NOTIFY mimeDataChanged FINAL) + Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions WRITE setSupportedActions NOTIFY supportedActionsChanged FINAL) + Q_PROPERTY(Qt::DropAction proposedAction READ proposedAction WRITE setProposedAction NOTIFY proposedActionChanged FINAL) + Q_PROPERTY(QQuickDrag::DragType dragType READ dragType WRITE setDragType NOTIFY dragTypeChanged FINAL) + + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickDragAttached(QObject *parent); + ~QQuickDragAttached(); + + bool isActive() const; + void setActive(bool active); + + QObject *source() const; + void setSource(QObject *item); + void resetSource(); + + QObject *target() const; + + QPointF hotSpot() const; + void setHotSpot(const QPointF &hotSpot); + + QUrl imageSource() const; + void setImageSource(const QUrl &url); + + QSize imageSourceSize() const; + void setImageSourceSize(const QSize &size); + + QStringList keys() const; + void setKeys(const QStringList &keys); + + QVariantMap mimeData() const; + void setMimeData(const QVariantMap &mimeData); + + Qt::DropActions supportedActions() const; + void setSupportedActions(Qt::DropActions actions); + + Qt::DropAction proposedAction() const; + void setProposedAction(Qt::DropAction action); + + QQuickDrag::DragType dragType() const; + void setDragType(QQuickDrag::DragType dragType); + + Q_INVOKABLE int drop(); + + bool event(QEvent *event) override; + +public Q_SLOTS: + void start(QQmlV4FunctionPtr); + void startDrag(QQmlV4FunctionPtr); + void cancel(); + +Q_SIGNALS: + void dragStarted(); + void dragFinished(Qt::DropAction dropAction); + + void activeChanged(); + void sourceChanged(); + void targetChanged(); + void hotSpotChanged(); + void imageSourceChanged(); + void imageSourceSizeChanged(); // new in Qt 6.8 + void keysChanged(); + void mimeDataChanged(); + void supportedActionsChanged(); + void proposedActionChanged(); + void dragTypeChanged(); +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c313c2252e05bfde8a656ba014e06f0393977cee --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdrag_p_p.h @@ -0,0 +1,99 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAG_P_P_H +#define QQUICKDRAG_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickdrag_p.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT QQuickDragAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickDragAttached) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + static QQuickDragAttachedPrivate *get(QQuickDragAttached *attached) { + return static_cast(QObjectPrivate::get(attached)); } + + QQuickDragAttachedPrivate() + : attachedItem(nullptr) + , mimeData(nullptr) + , proposedAction(Qt::MoveAction) + , supportedActions(Qt::MoveAction | Qt::CopyAction | Qt::LinkAction) + , active(false) + , listening(false) + , inEvent(false) + , dragRestarted(false) + , itemMoved(false) + , eventQueued(false) + , overrideActions(false) + , dragType(QQuickDrag::Internal) + { + } + + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; + void itemParentChanged(QQuickItem *, QQuickItem *parent) override; + void updatePosition(); + void restartDrag(); + void deliverEnterEvent(); + void deliverMoveEvent(); + void deliverLeaveEvent(); + void deliverEvent(QQuickWindow *window, QEvent *event); + void start(Qt::DropActions supportedActions); + Qt::DropAction startDrag(Qt::DropActions supportedActions); + void setTarget(QQuickItem *item); + QMimeData *createMimeData() const; + void loadPixmap(); + + QQuickDragGrabber dragGrabber; + + QPointer source; + QPointer target; + QPointer window; + QQuickItem *attachedItem; + QQuickDragMimeData *mimeData; + Qt::DropAction proposedAction; + Qt::DropActions supportedActions; + bool active : 1; + bool listening : 1; + bool inEvent : 1; + bool dragRestarted : 1; + bool itemMoved : 1; + bool eventQueued : 1; + bool overrideActions : 1; + QPointF hotSpot; + QUrl imageSource; + QSize imageSourceSize; + QQuickPixmap pixmapLoader; + QStringList keys; + QVariantMap externalMimeData; + QQuickDrag::DragType dragType; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdragaxis_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdragaxis_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7dcb285b83b5ec71be9e97fa1a720ccb229e0e95 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdragaxis_p.h @@ -0,0 +1,81 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAGAXIS_P_H +#define QQUICKDRAGAXIS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickPointerHandler; + +class Q_QUICK_EXPORT QQuickDragAxis : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal minimum READ minimum WRITE setMinimum NOTIFY minimumChanged) + Q_PROPERTY(qreal maximum READ maximum WRITE setMaximum NOTIFY maximumChanged) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(qreal activeValue READ activeValue NOTIFY activeValueChanged REVISION(6, 5)) + QML_NAMED_ELEMENT(DragAxis) + QML_ADDED_IN_VERSION(2, 12) + QML_UNCREATABLE("DragAxis is only available as a grouped property of DragHandler or PinchHandler.") + +public: + QQuickDragAxis(QQuickPointerHandler *handler, const QString &propertyName, + qreal initValue = 0); + + qreal minimum() const { return m_minimum; } + void setMinimum(qreal minimum); + + qreal maximum() const { return m_maximum; } + void setMaximum(qreal maximum); + + bool enabled() const { return m_enabled; } + void setEnabled(bool enabled); + + qreal activeValue() const { return m_activeValue; } + + qreal persistentValue() const { return m_accumulatedValue; } + +protected: + void onActiveChanged(bool active, qreal initActiveValue); + qreal targetValue(); + void updateValue(qreal activeValue, qreal accumulatedValue, qreal delta = 0); + +Q_SIGNALS: + void minimumChanged(); + void maximumChanged(); + void enabledChanged(); + Q_REVISION(6, 5) void activeValueChanged(qreal delta); + +private: + qreal m_minimum = std::numeric_limits::lowest(); + qreal m_maximum = std::numeric_limits::max(); + qreal m_startValue = 0; + qreal m_activeValue = 0; + qreal m_accumulatedValue = 0; + QString m_propertyName; + bool m_enabled = true; + + friend class QQuickDragHandler; + friend class QQuickPinchHandler; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDRAGAXIS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdraghandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdraghandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7ab61f2bc4d8973c5afe913a8424758755c4da5f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdraghandler_p.h @@ -0,0 +1,94 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAGHANDLER_H +#define QQUICKDRAGHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickmultipointhandler_p.h" +#include "qquickdragaxis_p.h" + +QT_BEGIN_NAMESPACE + +using namespace Qt::StringLiterals; + +class Q_QUICK_EXPORT QQuickDragHandler : public QQuickMultiPointHandler +{ + Q_OBJECT + Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT) + Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 2) + Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged) +#endif + Q_PROPERTY(QVector2D activeTranslation READ activeTranslation NOTIFY translationChanged REVISION(6, 2)) + Q_PROPERTY(QVector2D persistentTranslation READ persistentTranslation WRITE setPersistentTranslation NOTIFY translationChanged REVISION(6, 2)) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged REVISION(2, 14)) + QML_NAMED_ELEMENT(DragHandler) + QML_ADDED_IN_VERSION(2, 12) + +public: + enum SnapMode { + NoSnap = 0, + SnapAuto, + SnapIfPressedOutsideTarget, + SnapAlways + }; + Q_ENUM(SnapMode) + + explicit QQuickDragHandler(QQuickItem *parent = nullptr); + + void handlePointerEventImpl(QPointerEvent *event) override; + + QQuickDragAxis *xAxis() { return &m_xAxis; } + QQuickDragAxis *yAxis() { return &m_yAxis; } + +#if QT_DEPRECATED_SINCE(6, 2) + QVector2D translation() const { return activeTranslation(); } +#endif + QVector2D activeTranslation() const { return QVector2D(QPointF(m_xAxis.activeValue(), m_yAxis.activeValue())); } + void setActiveTranslation(const QVector2D &trans); + QVector2D persistentTranslation() const { return QVector2D(QPointF(m_xAxis.persistentValue(), m_yAxis.persistentValue())); } + void setPersistentTranslation(const QVector2D &trans); + QQuickDragHandler::SnapMode snapMode() const; + void setSnapMode(QQuickDragHandler::SnapMode mode); + +Q_SIGNALS: + void translationChanged(QVector2D delta); + Q_REVISION(2, 14) void snapModeChanged(); + +protected: + bool wantsPointerEvent(QPointerEvent *event) override; + void onActiveChanged() override; + void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override; + +private: + void ungrab(); + void enforceAxisConstraints(QPointF *localPos); + QPointF targetCentroidPosition(); + +private: + QPointF m_pressTargetPos; // We must also store the local targetPos, because we cannot deduce + // the press target pos from the scene pos in case there was e.g a + // flick in one of the ancestors during the drag. + + QQuickDragAxis m_xAxis = {this, u"x"_s}; + QQuickDragAxis m_yAxis = {this, u"y"_s}; + QQuickDragHandler::SnapMode m_snapMode = SnapAuto; + bool m_pressedInsideTarget = false; + + friend class QQuickDragAxis; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDRAGHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdroparea_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdroparea_p.h new file mode 100644 index 0000000000000000000000000000000000000000..70a84a3711239506e49b927950d9a959868ee164 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickdroparea_p.h @@ -0,0 +1,164 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDROPAREA_P_H +#define QQUICKDROPAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +QT_REQUIRE_CONFIG(quick_draganddrop); + +QT_BEGIN_NAMESPACE + +class QQuickDropAreaPrivate; +class QQuickDragEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x FINAL) + Q_PROPERTY(qreal y READ y FINAL) + Q_PROPERTY(QObject *source READ source FINAL) + Q_PROPERTY(QStringList keys READ keys FINAL) + Q_PROPERTY(Qt::DropActions supportedActions READ supportedActions FINAL) + Q_PROPERTY(Qt::DropActions proposedAction READ proposedAction FINAL) + Q_PROPERTY(Qt::DropAction action READ action WRITE setAction RESET resetAction FINAL) + Q_PROPERTY(bool accepted READ accepted WRITE setAccepted FINAL) + Q_PROPERTY(bool hasColor READ hasColor FINAL) + Q_PROPERTY(bool hasHtml READ hasHtml FINAL) + Q_PROPERTY(bool hasText READ hasText FINAL) + Q_PROPERTY(bool hasUrls READ hasUrls FINAL) + Q_PROPERTY(QVariant colorData READ colorData FINAL) + Q_PROPERTY(QString html READ html FINAL) + Q_PROPERTY(QString text READ text FINAL) + Q_PROPERTY(QList urls READ urls FINAL) + Q_PROPERTY(QStringList formats READ formats FINAL) + QML_NAMED_ELEMENT(DragEvent) + QML_UNCREATABLE("DragEvent is only meant to be created by DropArea") + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickDragEvent(QQuickDropAreaPrivate *d, QDropEvent *event) : d(d), event(event) {} + + qreal x() const { return event->position().x(); } + qreal y() const { return event->position().y(); } + + QObject *source() const; + + Qt::DropActions supportedActions() const { return event->possibleActions(); } + Qt::DropActions proposedAction() const { return event->proposedAction(); } + Qt::DropAction action() const { return event->dropAction(); } + void setAction(Qt::DropAction action) { event->setDropAction(action); } + void resetAction() { event->setDropAction(event->proposedAction()); } + + QStringList keys() const; + + bool accepted() const { return event->isAccepted(); } + void setAccepted(bool accepted) { event->setAccepted(accepted); } + + bool hasColor() const; + bool hasHtml() const; + bool hasText() const; + bool hasUrls() const; + QVariant colorData() const; + QString html() const; + QString text() const; + QList urls() const; + QStringList formats() const; + + Q_INVOKABLE QString getDataAsString(const QString &format) const; + Q_INVOKABLE QByteArray getDataAsArrayBuffer(const QString &format) const; + Q_INVOKABLE void acceptProposedAction(); + Q_INVOKABLE void accept(); + Q_INVOKABLE void accept(Qt::DropAction action); + +private: + QQuickDropAreaPrivate *d; + QDropEvent *event; +}; + +class QQuickDropAreaDrag : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal y READ y NOTIFY positionChanged FINAL) + Q_PROPERTY(QObject *source READ source NOTIFY sourceChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickDropAreaDrag(QQuickDropAreaPrivate *d, QObject *parent = nullptr); + ~QQuickDropAreaDrag(); + + qreal x() const; + qreal y() const; + QObject *source() const; + +Q_SIGNALS: + void positionChanged(); + void sourceChanged(); + +private: + QQuickDropAreaPrivate *d; + + friend class QQuickDropArea; + friend class QQuickDropAreaPrivate; +}; + +class QQuickDropAreaPrivate; +class Q_QUICK_EXPORT QQuickDropArea : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(bool containsDrag READ containsDrag NOTIFY containsDragChanged) + Q_PROPERTY(QStringList keys READ keys WRITE setKeys NOTIFY keysChanged) + Q_PROPERTY(QQuickDropAreaDrag *drag READ drag CONSTANT) + QML_NAMED_ELEMENT(DropArea) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickDropArea(QQuickItem *parent=0); + ~QQuickDropArea(); + + bool containsDrag() const; + void setContainsDrag(bool drag); + + QStringList keys() const; + void setKeys(const QStringList &keys); + + QQuickDropAreaDrag *drag(); + +Q_SIGNALS: + void containsDragChanged(); + void keysChanged(); + void sourceChanged(); + + void entered(QQuickDragEvent *drag); + void exited(); + void positionChanged(QQuickDragEvent *drag); + void dropped(QQuickDragEvent *drop); + +protected: + void dragMoveEvent(QDragMoveEvent *event) override; + void dragEnterEvent(QDragEnterEvent *event) override; + void dragLeaveEvent(QDragLeaveEvent *event) override; + void dropEvent(QDropEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickDropArea) + Q_DECLARE_PRIVATE(QQuickDropArea) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDROPAREA_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickevents_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickevents_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f5ded0ebfaf68f739296839de4816374a367f313 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickevents_p_p.h @@ -0,0 +1,262 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKEVENTS_P_P_H +#define QQUICKEVENTS_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include +#include +#include +#include +#include + +#if QT_CONFIG(shortcut) +# include +#endif + +QT_BEGIN_NAMESPACE + +class QPointingDevice; +class QPointerEvent; +class QMouseEvent; +class QQuickPointerHandler; + +class Q_QUICK_EXPORT QQuickKeyEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(int key READ key CONSTANT FINAL) + Q_PROPERTY(QString text READ text CONSTANT FINAL) + Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL) + Q_PROPERTY(bool isAutoRepeat READ isAutoRepeat CONSTANT FINAL) + Q_PROPERTY(int count READ count CONSTANT FINAL) + Q_PROPERTY(quint32 nativeScanCode READ nativeScanCode CONSTANT FINAL) + Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL) + QML_NAMED_ELEMENT(KeyEvent) + QML_UNCREATABLE("Should only be used by signal handlers in the Keys attached property") + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickKeyEvent() + {} + + void reset(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, + const QString &text = QString(), bool autorep = false, ushort count = 1) + { + m_type = type; + m_key = key; + m_modifiers = modifiers; + m_text = text; + m_autoRepeat = autorep; + m_count = count; + setAccepted(false); + } + + void reset(const QKeyEvent &ke) + { + m_type = ke.type(); + m_key = ke.key(); + m_modifiers = ke.modifiers(); + m_text = ke.text(); + m_autoRepeat = ke.isAutoRepeat(); + m_count = ke.count(); + m_nativeScanCode = ke.nativeScanCode(); + setAccepted(false); + } + + int key() const { return m_key; } + QString text() const { return m_text; } + int modifiers() const { return m_modifiers; } + bool isAutoRepeat() const { return m_autoRepeat; } + int count() const { return m_count; } + quint32 nativeScanCode() const { return m_nativeScanCode; } + + bool isAccepted() { return m_accepted; } + void setAccepted(bool accepted) { m_accepted = accepted; } + +#if QT_CONFIG(shortcut) + Q_REVISION(2, 2) Q_INVOKABLE bool matches(QKeySequence::StandardKey key) const; +#endif + +private: + QString m_text; + quint32 m_nativeScanCode = 0; + QEvent::Type m_type = QEvent::None; + int m_key = 0; + int m_modifiers = 0; + int m_count = 0; + bool m_accepted = false; + bool m_autoRepeat = false; +}; + +class Q_QUICK_EXPORT QQuickMouseEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x CONSTANT FINAL) + Q_PROPERTY(qreal y READ y CONSTANT FINAL) + Q_PROPERTY(int button READ button CONSTANT FINAL) + Q_PROPERTY(int buttons READ buttons CONSTANT FINAL) + Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL) +#if QT_DEPRECATED_SINCE(6, 6) + Q_PROPERTY(int source READ source CONSTANT REVISION(2, 7) FINAL) +#endif + Q_PROPERTY(bool isClick READ isClick CONSTANT FINAL) + Q_PROPERTY(bool wasHeld READ wasHeld CONSTANT FINAL) + Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL) + Q_PROPERTY(int flags READ flags CONSTANT REVISION(2, 11) FINAL) + QML_NAMED_ELEMENT(MouseEvent) + QML_UNCREATABLE("Should only be used by mouse event signal handlers, for example in MouseArea") + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickMouseEvent() + : _wasHeld(false), _isClick(false), _accepted(false) + {} + + void reset(qreal x, qreal y, Qt::MouseButton button, Qt::MouseButtons buttons, + Qt::KeyboardModifiers modifiers, bool isClick = false, bool wasHeld = false, + Qt::MouseEventFlags flags = { }) + { + _x = x; + _y = y; + _button = button; + _buttons = buttons; + _modifiers = modifiers; + _source = Qt::MouseEventNotSynthesized; + _wasHeld = wasHeld; + _isClick = isClick; + _accepted = true; + _flags = flags; + } + + qreal x() const { return _x; } + qreal y() const { return _y; } + int button() const { return _button; } + int buttons() const { return _buttons; } + int modifiers() const { return _modifiers; } +#if QT_DEPRECATED_SINCE(6, 6) + int source() const { return _source; } +#endif + bool wasHeld() const { return _wasHeld; } + bool isClick() const { return _isClick; } + + // only for internal usage + void setX(qreal x) { _x = x; } + void setY(qreal y) { _y = y; } + void setPosition(const QPointF &point) { _x = point.x(); _y = point.y(); } +#if QT_DEPRECATED_SINCE(6, 6) + void setSource(Qt::MouseEventSource s) { _source = s; } +#endif + + bool isAccepted() { return _accepted; } + void setAccepted(bool accepted) { _accepted = accepted; } + int flags() const { return _flags; } +private: + qreal _x = 0; + qreal _y = 0; + Qt::MouseButton _button = Qt::NoButton; + Qt::MouseButtons _buttons = Qt::NoButton; + Qt::KeyboardModifiers _modifiers = Qt::NoModifier; + Qt::MouseEventSource _source = Qt::MouseEventNotSynthesized; + bool _wasHeld : 1; + bool _isClick : 1; + bool _accepted : 1; + Qt::MouseEventFlags _flags = Qt::NoMouseEventFlag; +}; + +#if QT_CONFIG(wheelevent) +class Q_QUICK_EXPORT QQuickWheelEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(const QPointingDevice *device READ pointingDevice CONSTANT FINAL) + Q_PROPERTY(qreal x READ x CONSTANT FINAL) + Q_PROPERTY(qreal y READ y CONSTANT FINAL) + Q_PROPERTY(QPoint angleDelta READ angleDelta CONSTANT FINAL) + Q_PROPERTY(QPoint pixelDelta READ pixelDelta CONSTANT FINAL) + Q_PROPERTY(Qt::ScrollPhase phase READ phase CONSTANT FINAL) + Q_PROPERTY(int buttons READ buttons CONSTANT FINAL) + Q_PROPERTY(int modifiers READ modifiers CONSTANT FINAL) + Q_PROPERTY(bool inverted READ inverted CONSTANT FINAL) + Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL) + QML_NAMED_ELEMENT(WheelEvent) + QML_UNCREATABLE("Should only be used by wheel event signal handlers, for example in MouseArea") + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickWheelEvent() = default; + + void reset(const QWheelEvent *event) + { + _device = event->pointingDevice(); + _x = event->position().x(); + _y = event->position().y(); + _angleDelta = event->angleDelta(); + _pixelDelta = event->pixelDelta(); + _buttons = event->buttons(); + _modifiers = event->modifiers(); + _accepted = true; + _inverted = event->inverted(); + _phase = event->phase(); + } + + const QPointingDevice *pointingDevice() const { return _device; } + qreal x() const { return _x; } + qreal y() const { return _y; } + QPoint angleDelta() const { return _angleDelta; } + QPoint pixelDelta() const { return _pixelDelta; } + int buttons() const { return _buttons; } + int modifiers() const { return _modifiers; } + Qt::ScrollPhase phase() const { return _phase; } + bool inverted() const { return _inverted; } + bool isAccepted() { return _accepted; } + void setAccepted(bool accepted) { _accepted = accepted; } + +private: + const QPointingDevice *_device = nullptr; + qreal _x = 0; + qreal _y = 0; + QPoint _angleDelta; + QPoint _pixelDelta; + Qt::MouseButtons _buttons = Qt::NoButton; + Qt::KeyboardModifiers _modifiers = Qt::NoModifier; + Qt::ScrollPhase _phase = Qt::NoScrollPhase; + bool _inverted = false; + bool _accepted = false; +}; +#endif + +class Q_QUICK_EXPORT QQuickCloseEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool accepted READ isAccepted WRITE setAccepted FINAL) + QML_NAMED_ELEMENT(CloseEvent) + QML_UNCREATABLE("Should only be used by Window's closing signal") + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickCloseEvent() {} + + bool isAccepted() { return _accepted; } + void setAccepted(bool accepted) { _accepted = accepted; } + +private: + bool _accepted = true; +}; + +QT_END_NAMESPACE + +#endif // QQUICKEVENTS_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bf6f320a7e8f3bd5eee43cf277daf64912bfb3d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p.h @@ -0,0 +1,290 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFLICKABLE_P_H +#define QQUICKFLICKABLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlickablePrivate; +class QQuickFlickableVisibleArea; +class Q_QUICK_EXPORT QQuickFlickable : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged) + Q_PROPERTY(qreal contentX READ contentX WRITE setContentX NOTIFY contentXChanged) + Q_PROPERTY(qreal contentY READ contentY WRITE setContentY NOTIFY contentYChanged) + Q_PROPERTY(QQuickItem *contentItem READ contentItem CONSTANT) + + Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin NOTIFY topMarginChanged) + Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin NOTIFY bottomMarginChanged) + Q_PROPERTY(qreal originY READ originY NOTIFY originYChanged) + + Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged) + Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged) + Q_PROPERTY(qreal originX READ originX NOTIFY originXChanged) + + Q_PROPERTY(qreal horizontalVelocity READ horizontalVelocity NOTIFY horizontalVelocityChanged) + Q_PROPERTY(qreal verticalVelocity READ verticalVelocity NOTIFY verticalVelocityChanged) + + Q_PROPERTY(BoundsBehavior boundsBehavior READ boundsBehavior WRITE setBoundsBehavior NOTIFY boundsBehaviorChanged) + Q_PROPERTY(BoundsMovement boundsMovement READ boundsMovement WRITE setBoundsMovement NOTIFY boundsMovementChanged REVISION(2, 10)) + Q_PROPERTY(QQuickTransition *rebound READ rebound WRITE setRebound NOTIFY reboundChanged) + Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged) + Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged) + Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged) + Q_PROPERTY(bool movingHorizontally READ isMovingHorizontally NOTIFY movingHorizontallyChanged) + Q_PROPERTY(bool movingVertically READ isMovingVertically NOTIFY movingVerticallyChanged) + Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) + Q_PROPERTY(bool flickingHorizontally READ isFlickingHorizontally NOTIFY flickingHorizontallyChanged) + Q_PROPERTY(bool flickingVertically READ isFlickingVertically NOTIFY flickingVerticallyChanged) + Q_PROPERTY(bool dragging READ isDragging NOTIFY draggingChanged) + Q_PROPERTY(bool draggingHorizontally READ isDraggingHorizontally NOTIFY draggingHorizontallyChanged) + Q_PROPERTY(bool draggingVertically READ isDraggingVertically NOTIFY draggingVerticallyChanged) + Q_PROPERTY(FlickableDirection flickableDirection READ flickableDirection WRITE setFlickableDirection NOTIFY flickableDirectionChanged) + + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged) + Q_PROPERTY(int pressDelay READ pressDelay WRITE setPressDelay NOTIFY pressDelayChanged) + + Q_PROPERTY(bool atXEnd READ isAtXEnd NOTIFY atXEndChanged) + Q_PROPERTY(bool atYEnd READ isAtYEnd NOTIFY atYEndChanged) + Q_PROPERTY(bool atXBeginning READ isAtXBeginning NOTIFY atXBeginningChanged) + Q_PROPERTY(bool atYBeginning READ isAtYBeginning NOTIFY atYBeginningChanged) + + Q_PROPERTY(QQuickFlickableVisibleArea *visibleArea READ visibleArea CONSTANT) + + Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged) + Q_PROPERTY(bool synchronousDrag READ synchronousDrag WRITE setSynchronousDrag NOTIFY synchronousDragChanged REVISION(2, 12)) + + Q_PROPERTY(qreal horizontalOvershoot READ horizontalOvershoot NOTIFY horizontalOvershootChanged REVISION(2, 9)) + Q_PROPERTY(qreal verticalOvershoot READ verticalOvershoot NOTIFY verticalOvershootChanged REVISION(2, 9)) + + Q_PROPERTY(QQmlListProperty flickableData READ flickableData) + Q_PROPERTY(QQmlListProperty flickableChildren READ flickableChildren) + Q_CLASSINFO("DefaultProperty", "flickableData") + QML_NAMED_ELEMENT(Flickable) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickFlickable(QQuickItem *parent=nullptr); + ~QQuickFlickable() override; + + QQmlListProperty flickableData(); + QQmlListProperty flickableChildren(); + + enum BoundsBehaviorFlag { + StopAtBounds = 0x0, + DragOverBounds = 0x1, + OvershootBounds = 0x2, + DragAndOvershootBounds = DragOverBounds | OvershootBounds + }; + Q_DECLARE_FLAGS(BoundsBehavior, BoundsBehaviorFlag) + Q_FLAG(BoundsBehavior) + + BoundsBehavior boundsBehavior() const; + void setBoundsBehavior(BoundsBehavior); + + enum BoundsMovement { + // StopAtBounds = 0x0, + FollowBoundsBehavior = 0x1 + }; + Q_ENUM(BoundsMovement) + + BoundsMovement boundsMovement() const; + void setBoundsMovement(BoundsMovement movement); + + QQuickTransition *rebound() const; + void setRebound(QQuickTransition *transition); + + qreal contentWidth() const; + void setContentWidth(qreal); + + qreal contentHeight() const; + void setContentHeight(qreal); + + qreal contentX() const; + virtual void setContentX(qreal pos); + + qreal contentY() const; + virtual void setContentY(qreal pos); + + qreal topMargin() const; + void setTopMargin(qreal m); + + qreal bottomMargin() const; + void setBottomMargin(qreal m); + + qreal leftMargin() const; + void setLeftMargin(qreal m); + + qreal rightMargin() const; + void setRightMargin(qreal m); + + virtual qreal originY() const; + virtual qreal originX() const; + + bool isMoving() const; + bool isMovingHorizontally() const; + bool isMovingVertically() const; + bool isFlicking() const; + bool isFlickingHorizontally() const; + bool isFlickingVertically() const; + bool isDragging() const; + bool isDraggingHorizontally() const; + bool isDraggingVertically() const; + + int pressDelay() const; + void setPressDelay(int delay); + + qreal maximumFlickVelocity() const; + void setMaximumFlickVelocity(qreal); + + qreal flickDeceleration() const; + void setFlickDeceleration(qreal); + + bool isInteractive() const; + void setInteractive(bool); + + qreal horizontalVelocity() const; + qreal verticalVelocity() const; + + bool isAtXEnd() const; + bool isAtXBeginning() const; + bool isAtYEnd() const; + bool isAtYBeginning() const; + + QQuickItem *contentItem() const; + + enum FlickableDirection { AutoFlickDirection=0x0, HorizontalFlick=0x1, VerticalFlick=0x2, HorizontalAndVerticalFlick=0x3, + AutoFlickIfNeeded=0xc }; + Q_ENUM(FlickableDirection) + FlickableDirection flickableDirection() const; + void setFlickableDirection(FlickableDirection); + + bool pixelAligned() const; + void setPixelAligned(bool align); + + bool synchronousDrag() const; + void setSynchronousDrag(bool v); + + qreal horizontalOvershoot() const; + qreal verticalOvershoot() const; + + Q_INVOKABLE void resizeContent(qreal w, qreal h, QPointF center); + Q_INVOKABLE void returnToBounds(); + Q_INVOKABLE void flick(qreal xVelocity, qreal yVelocity); + Q_INVOKABLE void cancelFlick(); + +Q_SIGNALS: + void contentWidthChanged(); + void contentHeightChanged(); + void contentXChanged(); + void contentYChanged(); + void topMarginChanged(); + void bottomMarginChanged(); + void leftMarginChanged(); + void rightMarginChanged(); + void originYChanged(); + void originXChanged(); + void movingChanged(); + void movingHorizontallyChanged(); + void movingVerticallyChanged(); + void flickingChanged(); + void flickingHorizontallyChanged(); + void flickingVerticallyChanged(); + void draggingChanged(); + void draggingHorizontallyChanged(); + void draggingVerticallyChanged(); + void horizontalVelocityChanged(); + void verticalVelocityChanged(); + void isAtBoundaryChanged(); + void flickableDirectionChanged(); + void interactiveChanged(); + void boundsBehaviorChanged(); + Q_REVISION(2, 10) void boundsMovementChanged(); + void reboundChanged(); + void maximumFlickVelocityChanged(); + void flickDecelerationChanged(); + void pressDelayChanged(); + void movementStarted(); + void movementEnded(); + void flickStarted(); + void flickEnded(); + void dragStarted(); + void dragEnded(); + void pixelAlignedChanged(); + Q_REVISION(2, 12) void synchronousDragChanged(); + Q_REVISION(2, 9) void horizontalOvershootChanged(); + Q_REVISION(2, 9) void verticalOvershootChanged(); + + // The next four signals should be marked as Q_REVISION(2, 12). See QTBUG-71243 + void atXEndChanged(); + void atYEndChanged(); + void atXBeginningChanged(); + void atYBeginningChanged(); + +protected: + bool childMouseEventFilter(QQuickItem *, QEvent *) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void touchEvent(QTouchEvent *event) override; +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + void timerEvent(QTimerEvent *event) override; + + QQuickFlickableVisibleArea *visibleArea(); + +protected Q_SLOTS: + void movementStarting(); + void movementEnding(); + void movementEnding(bool hMovementEnding, bool vMovementEnding); + void velocityTimelineCompleted(); + void timelineCompleted(); + +protected: + virtual qreal minXExtent() const; + virtual qreal minYExtent() const; + virtual qreal maxXExtent() const; + virtual qreal maxYExtent() const; + qreal vWidth() const; + qreal vHeight() const; + void componentComplete() override; + virtual void viewportMoved(Qt::Orientations orient); + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void mouseUngrabEvent() override; + bool filterPointerEvent(QQuickItem *receiver, QPointerEvent *event); + + bool xflick() const; + bool yflick() const; + +protected: + QQuickFlickable(QQuickFlickablePrivate &dd, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickFlickable) + Q_DECLARE_PRIVATE(QQuickFlickable) + friend class QQuickFlickableVisibleArea; + friend class QQuickFlickableReboundTransition; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFLICKABLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6f3d184311bd3b78a81c505080bbfa90d29b2b81 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickable_p_p.h @@ -0,0 +1,287 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFLICKABLE_P_P_H +#define QQUICKFLICKABLE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickflickable_p.h" +#include "qquickitem_p.h" +#include "qquickitemchangelistener_p.h" + +#include +#include +#include "qplatformdefs.h" + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlickableVisibleArea; +class QQuickTransition; +class QQuickFlickableReboundTransition; + +class Q_QUICK_EXPORT QQuickFlickablePrivate : public QQuickItemPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickFlickable) + +public: + static inline QQuickFlickablePrivate *get(QQuickFlickable *o) { return o->d_func(); } + + QQuickFlickablePrivate(); + void init(); + + struct Velocity : public QQuickTimeLineValue + { + Velocity(QQuickFlickablePrivate *p) + : parent(p) {} + void setValue(qreal v) override { + if (v != value()) { + QQuickTimeLineValue::setValue(v); + parent->updateVelocity(); + } + } + QQuickFlickablePrivate *parent; + }; + + enum MovementReason { Other, SetIndex, Mouse }; + + struct AxisData { + AxisData(QQuickFlickablePrivate *fp, void (QQuickFlickablePrivate::*func)(qreal)) + : move(fp, func) + , smoothVelocity(fp), atEnd(false), atBeginning(true) + , transitionToSet(false) + , fixingUp(false), inOvershoot(false), inRebound(false), moving(false), flicking(false) + , flickingWhenDragBegan(false), dragging(false), extentsChanged(false) + , explicitValue(false), contentPositionChangedExternallyDuringDrag(false) + , minExtentDirty(true), maxExtentDirty(true) + {} + + ~AxisData(); + + void reset() { + velocityBuffer.clear(); + dragStartOffset = 0; + fixingUp = false; + inOvershoot = false; + contentPositionChangedExternallyDuringDrag = false; + } + + void markExtentsDirty() { + minExtentDirty = true; + maxExtentDirty = true; + extentsChanged = true; + } + + void resetTransitionTo() { + transitionTo = 0; + transitionToSet = false; + } + + void addVelocitySample(qreal v, qreal maxVelocity); + void updateVelocity(); + + QQuickTimeLineValueProxy move; + QQuickFlickableReboundTransition *transitionToBounds = nullptr; + qreal viewSize = -1; + qreal pressPos = 0; + qreal lastPos = 0; + qreal dragStartOffset = 0; + qreal dragMinBound = 0; + qreal dragMaxBound = 0; + qreal previousDragDelta = 0; + qreal velocity = 0; + qreal flickTarget = 0; + qreal startMargin = 0; + qreal endMargin = 0; + qreal origin = 0; + qreal overshoot = 0; + qreal transitionTo = 0; + qreal continuousFlickVelocity = 0; + QElapsedTimer velocityTime; + int vTime = 0; + QQuickFlickablePrivate::Velocity smoothVelocity; + QPODVector velocityBuffer; + // bitfield + uint atEnd : 1; + uint atBeginning : 1; + uint transitionToSet : 1; + uint fixingUp : 1; + uint inOvershoot : 1; + uint inRebound : 1; + uint moving : 1; + uint flicking : 1; + uint flickingWhenDragBegan : 1; + uint dragging : 1; + uint extentsChanged : 1; + uint explicitValue : 1; + uint contentPositionChangedExternallyDuringDrag : 1; + // mutable portion of bitfield + mutable uint minExtentDirty : 1; + mutable uint maxExtentDirty : 1; + // end bitfield + }; + + bool flickX(QEvent::Type eventType, qreal velocity); + bool flickY(QEvent::Type eventType, qreal velocity); + virtual bool flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, + QQuickTimeLineCallback::Callback fixupCallback, + QEvent::Type eventType, qreal velocity); + void flickingStarted(bool flickingH, bool flickingV); + + void fixupX(); + void fixupY(); + virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent); + void adjustContentPos(AxisData &data, qreal toPos); + void resetTimeline(AxisData &data); + void clearTimeline(); + + void updateBeginningEnd(); + + bool isInnermostPressDelay(QQuickItem *item) const; + void captureDelayedPress(QQuickItem *item, QPointerEvent *event); + void clearDelayedPress(); + void replayDelayedPress(); + + void setViewportX(qreal x); + void setViewportY(qreal y); + + qreal overShootDistance(qreal velocity) const; + + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; + + void draggingStarting(); + void draggingEnding(); + + bool isViewMoving() const; + + void cancelInteraction(); + + void addPointerHandler(QQuickPointerHandler *h) override; + + virtual bool wantsPointerEvent(const QPointerEvent *) { return true; } + +public: + QQuickItem *contentItem; + + AxisData hData; + AxisData vData; + + MovementReason moveReason = Other; + + QQuickTimeLine timeline; + bool hMoved : 1; + bool vMoved : 1; + bool stealMouse : 1; + bool pressed : 1; + bool scrollingPhase : 1; + bool interactive : 1; + bool calcVelocity : 1; + bool pixelAligned : 1; + bool syncDrag : 1; + QElapsedTimer timer; + qint64 lastPosTime; + qint64 lastPressTime; + QPointF lastPos; + QPointF pressPos; + QVector2D accumulatedWheelPixelDelta; + qreal deceleration; + qreal wheelDeceleration; + qreal maxVelocity; + QPointerEvent *delayedPressEvent; + QBasicTimer delayedPressTimer; + int pressDelay; + int fixupDuration; + qreal flickBoost; + qreal initialWheelFlickDistance; + + enum FixupMode { Normal, Immediate, ExtentChanged }; + FixupMode fixupMode; + + static void fixupY_callback(void *); + static void fixupX_callback(void *); + + void updateVelocity(); + int vTime; + QQuickTimeLine velocityTimeline; + QQuickFlickableVisibleArea *visibleArea; + QQuickFlickable::FlickableDirection flickableDirection; + QQuickFlickable::BoundsBehavior boundsBehavior; + QQuickFlickable::BoundsMovement boundsMovement; + QQuickTransition *rebound; + + void viewportAxisMoved(AxisData &data, qreal minExtent, qreal maxExtent, + QQuickTimeLineCallback::Callback fixupCallback); + + void handlePressEvent(QPointerEvent *); + void handleMoveEvent(QPointerEvent *); + void handleReleaseEvent(QPointerEvent *); + + void maybeBeginDrag(qint64 currentTimestamp, const QPointF &pressPosn, + Qt::MouseButtons buttons = Qt::NoButton); + void drag(qint64 currentTimestamp, QEvent::Type eventType, const QPointF &localPos, + const QVector2D &deltas, bool overThreshold, bool momentum, + bool velocitySensitiveOverBounds, const QVector2D &velocity); + + QVector2D firstPointLocalVelocity(QPointerEvent *event); + qint64 computeCurrentTime(QInputEvent *event) const; + qreal devicePixelRatio() const; + + // flickableData property + static void data_append(QQmlListProperty *, QObject *); + static qsizetype data_count(QQmlListProperty *); + static QObject *data_at(QQmlListProperty *, qsizetype); + static void data_clear(QQmlListProperty *); +}; + +class Q_QUICK_EXPORT QQuickFlickableVisibleArea : public QObject +{ + Q_OBJECT + + Q_PROPERTY(qreal xPosition READ xPosition NOTIFY xPositionChanged FINAL) + Q_PROPERTY(qreal yPosition READ yPosition NOTIFY yPositionChanged FINAL) + Q_PROPERTY(qreal widthRatio READ widthRatio NOTIFY widthRatioChanged FINAL) + Q_PROPERTY(qreal heightRatio READ heightRatio NOTIFY heightRatioChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickFlickableVisibleArea(QQuickFlickable *parent=nullptr); + + qreal xPosition() const; + qreal widthRatio() const; + qreal yPosition() const; + qreal heightRatio() const; + + void updateVisible(); + +Q_SIGNALS: + void xPositionChanged(qreal xPosition); + void yPositionChanged(qreal yPosition); + void widthRatioChanged(qreal widthRatio); + void heightRatioChanged(qreal heightRatio); + +private: + QQuickFlickable *flickable; + qreal m_xPosition; + qreal m_widthRatio; + qreal m_yPosition; + qreal m_heightRatio; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFLICKABLE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickablebehavior_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickablebehavior_p.h new file mode 100644 index 0000000000000000000000000000000000000000..81496cf5bb10b2330da9d809b04f3d5917f95af5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflickablebehavior_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2016 Research In Motion. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFLICKABLEBEHAVIOR_H +#define QQUICKFLICKABLEBEHAVIOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +/* ### Platform specific flickable mechanics are defined either here, or in + mkspec files. Long-term (QtQuick 3) Flickable needs to allow such + mechanic details to be controlled via QML so that platforms can easily + load custom behavior at QML compile time. +*/ + +// The maximum number of pixels a flick can overshoot +#ifndef QML_FLICK_OVERSHOOT +#define QML_FLICK_OVERSHOOT 150 +#endif + +// The number of samples to use in calculating the velocity of a flick +#ifndef QML_FLICK_SAMPLEBUFFER +#define QML_FLICK_SAMPLEBUFFER 3 +#endif + +// The number of samples to discard when calculating the flick velocity. +// Touch panels often produce inaccurate results as the finger is lifted. +#ifndef QML_FLICK_DISCARDSAMPLES +#define QML_FLICK_DISCARDSAMPLES 0 +#endif + +// How much faster to decelerate when overshooting +#ifndef QML_FLICK_OVERSHOOTFRICTION +#define QML_FLICK_OVERSHOOTFRICTION 8 +#endif + +// Multiflick acceleration minimum flick velocity threshold +#ifndef QML_FLICK_MULTIFLICK_THRESHOLD +#define QML_FLICK_MULTIFLICK_THRESHOLD 1250 +#endif + +// If the time (ms) between the last move and the release exceeds this, then velocity will be zero. +#ifndef QML_FLICK_VELOCITY_DECAY_TIME +#define QML_FLICK_VELOCITY_DECAY_TIME 50 +#endif + +// Multiflick acceleration minimum contentSize/viewSize ratio +#ifndef QML_FLICK_MULTIFLICK_RATIO +#define QML_FLICK_MULTIFLICK_RATIO 10 +#endif + +// Multiflick acceleration maximum velocity multiplier +#ifndef QML_FLICK_MULTIFLICK_MAXBOOST +#define QML_FLICK_MULTIFLICK_MAXBOOST 3.0 +#endif + +// Really slow flicks can be annoying. +const qreal _q_MinimumFlickVelocity = 75.0; + +// If QQuickFlickablePrivate::wheelDeceleration (perhaps overridden via QT_QUICK_FLICKABLE_WHEEL_DECELERATION) +// is greater than this, we switch to proportional wheel scrolling: no "acceleration" at all. +const qreal _q_MaximumWheelDeceleration = 14999; + +#endif //QQUICKFLICKABLEBEHAVIOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflipable_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflipable_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c848822d4ce984d500dfa685aa831da32b18d24e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickflipable_p.h @@ -0,0 +1,74 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFLIPABLE_P_H +#define QQUICKFLIPABLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_flipable); + +#include "qquickitem.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlipablePrivate; +class Q_QUICK_EXPORT QQuickFlipable : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QQuickItem *front READ front WRITE setFront NOTIFY frontChanged) + Q_PROPERTY(QQuickItem *back READ back WRITE setBack NOTIFY backChanged) + Q_PROPERTY(Side side READ side NOTIFY sideChanged) + QML_NAMED_ELEMENT(Flipable) + QML_ADDED_IN_VERSION(2, 0) + //### flipAxis + //### flipRotation +public: + QQuickFlipable(QQuickItem *parent=nullptr); + ~QQuickFlipable(); + + QQuickItem *front() const; + void setFront(QQuickItem *); + + QQuickItem *back(); + void setBack(QQuickItem *); + + enum Side { Front, Back }; + Q_ENUM(Side) + Side side() const; + +Q_SIGNALS: + void frontChanged(); + void backChanged(); + void sideChanged(); + +protected: + void updatePolish() override; + +private Q_SLOTS: + void retransformBack(); + +private: + Q_DISABLE_COPY(QQuickFlipable) + Q_DECLARE_PRIVATE(QQuickFlipable) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFLIPABLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfocusscope_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfocusscope_p.h new file mode 100644 index 0000000000000000000000000000000000000000..58b6dd397e0e2c2832490f2af6f8d3be00771f83 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfocusscope_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOCUSSCOPE_P_H +#define QQUICKFOCUSSCOPE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickFocusScope : public QQuickItem +{ + Q_OBJECT + QML_NAMED_ELEMENT(FocusScope) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickFocusScope(QQuickItem *parent=nullptr); +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOCUSSCOPE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontloader_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontloader_p.h new file mode 100644 index 0000000000000000000000000000000000000000..85dffec5f00363f4be03360990d26cb6f2acf420 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontloader_p.h @@ -0,0 +1,68 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFONTLOADER_H +#define QQUICKFONTLOADER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFontLoaderPrivate; +class Q_QUICK_EXPORT QQuickFontLoader : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickFontLoader) + + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(QString name READ name NOTIFY nameChanged) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(QFont font READ font NOTIFY fontChanged) + QML_NAMED_ELEMENT(FontLoader) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum Status { Null = 0, Ready, Loading, Error }; + Q_ENUM(Status) + + QQuickFontLoader(QObject *parent = nullptr); + + QUrl source() const; + void setSource(const QUrl &url); + + QString name() const; + + QFont font() const; + + Status status() const; + +private Q_SLOTS: + void updateFontInfo(int); + +Q_SIGNALS: + void sourceChanged(); + void nameChanged(); + void fontChanged(); + void statusChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKFONTLOADER_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontmetrics_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontmetrics_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5833cbd0b6c9fbac57186927f519ae9086218739 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickfontmetrics_p.h @@ -0,0 +1,89 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFONTMETRICS_H +#define QQUICKFONTMETRICS_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QFont; + +class Q_QUICK_EXPORT QQuickFontMetrics : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + Q_PROPERTY(qreal ascent READ ascent NOTIFY fontChanged) + Q_PROPERTY(qreal descent READ descent NOTIFY fontChanged) + Q_PROPERTY(qreal height READ height NOTIFY fontChanged) + Q_PROPERTY(qreal leading READ leading NOTIFY fontChanged) + Q_PROPERTY(qreal lineSpacing READ lineSpacing NOTIFY fontChanged) + Q_PROPERTY(qreal minimumLeftBearing READ minimumLeftBearing NOTIFY fontChanged) + Q_PROPERTY(qreal minimumRightBearing READ minimumRightBearing NOTIFY fontChanged) + Q_PROPERTY(qreal maximumCharacterWidth READ maximumCharacterWidth NOTIFY fontChanged) + Q_PROPERTY(qreal xHeight READ xHeight NOTIFY fontChanged) + Q_PROPERTY(qreal averageCharacterWidth READ averageCharacterWidth NOTIFY fontChanged) + Q_PROPERTY(qreal underlinePosition READ underlinePosition NOTIFY fontChanged) + Q_PROPERTY(qreal overlinePosition READ overlinePosition NOTIFY fontChanged) + Q_PROPERTY(qreal strikeOutPosition READ strikeOutPosition NOTIFY fontChanged) + Q_PROPERTY(qreal lineWidth READ lineWidth NOTIFY fontChanged) + QML_NAMED_ELEMENT(FontMetrics) + QML_ADDED_IN_VERSION(2, 4) +public: + explicit QQuickFontMetrics(QObject *parent = nullptr); + + QFont font() const; + void setFont(const QFont &font); + + qreal ascent() const; + qreal descent() const; + qreal height() const; + qreal leading() const; + qreal lineSpacing() const; + qreal minimumLeftBearing() const; + qreal minimumRightBearing() const; + qreal maximumCharacterWidth() const; + + qreal xHeight() const; + qreal averageCharacterWidth() const; + + qreal underlinePosition() const; + qreal overlinePosition() const; + qreal strikeOutPosition() const; + qreal lineWidth() const; + + Q_INVOKABLE qreal advanceWidth(const QString &text) const; + Q_INVOKABLE QRectF boundingRect(const QString &text) const; + Q_INVOKABLE QRectF tightBoundingRect(const QString &text) const; + Q_INVOKABLE QString elidedText(const QString &text, Qt::TextElideMode mode, qreal width, int flags = 0) const; + +Q_SIGNALS: + void fontChanged(const QFont &font); + +private: + QFont m_font; + QFontMetricsF m_metrics; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFONTMETRICS_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickforeignutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickforeignutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..97303530968f703a8c82ac111b3321b43a0903f7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickforeignutils_p.h @@ -0,0 +1,120 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKFOREIGN_P_H +#define QTQUICKFOREIGN_P_H + +#include + +#include +#include +#if QT_CONFIG(im) +#include +#endif +#if QT_CONFIG(validator) +#include +#endif +#if QT_CONFIG(shortcut) +#include +#endif + +#include + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +struct QStyleHintsForeign +{ + Q_GADGET + QML_FOREIGN(QStyleHints) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(6, 4) +}; + +struct QImageForeign +{ + Q_GADGET + QML_FOREIGN(QImage) + QML_ANONYMOUS +}; + +#if QT_CONFIG(validator) +struct QValidatorForeign +{ + Q_GADGET + QML_FOREIGN(QValidator) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +}; + +#if QT_CONFIG(regularexpression) +struct QRegularExpressionValidatorForeign +{ + Q_GADGET + QML_FOREIGN(QRegularExpressionValidator) + QML_NAMED_ELEMENT(RegularExpressionValidator) + QML_ADDED_IN_VERSION(2, 14) +}; +#endif // QT_CONFIG(regularexpression) + +#endif // QT_CONFIG(validator) + +#if QT_CONFIG(im) +struct QInputMethodForeign +{ + Q_GADGET + QML_FOREIGN(QInputMethod) + QML_NAMED_ELEMENT(InputMethod) + QML_ADDED_IN_VERSION(2, 0) + QML_REMOVED_IN_VERSION(6, 4) + QML_UNCREATABLE("InputMethod is an abstract class.") +}; +#endif // QT_CONFIG(im) + +#if QT_CONFIG(shortcut) +namespace QKeySequenceForeign +{ + Q_NAMESPACE + QML_FOREIGN_NAMESPACE(QKeySequence) + QML_NAMED_ELEMENT(StandardKey) + QML_ADDED_IN_VERSION(2, 2) +}; +#endif // QT_CONFIG(shortcut) + +struct QEventPointForeign +{ + Q_GADGET + QML_FOREIGN(QEventPoint) + QML_VALUE_TYPE(eventPoint) + QML_ADDED_IN_VERSION(6, 5) +}; + +// Prevent the same QEventPoint type from being exported into qmltypes +// twice, as a value type and a namespace. +// TODO: Remove once QTBUG-115855 is fixed. +struct QEventPointDerived : public QEventPoint +{ + Q_GADGET +}; + +namespace QEventPointForeignNamespace +{ + Q_NAMESPACE + QML_FOREIGN_NAMESPACE(QEventPointDerived) + QML_NAMED_ELEMENT(EventPoint) + QML_ADDED_IN_VERSION(6, 6) +}; + +QT_END_NAMESPACE + +#endif // QTQUICKFOREIGN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickframeanimation_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickframeanimation_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a8f2d7b7ec57dacf832cb15674fa979d29b568ad --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickframeanimation_p.h @@ -0,0 +1,83 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFRAMEANIMATION_H +#define QQUICKFRAMEANIMATION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFrameAnimationPrivate; +class Q_QUICK_EXPORT QQuickFrameAnimation : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickFrameAnimation) + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(int currentFrame READ currentFrame NOTIFY currentFrameChanged) + Q_PROPERTY(qreal frameTime READ frameTime NOTIFY frameTimeChanged) + Q_PROPERTY(qreal smoothFrameTime READ smoothFrameTime NOTIFY smoothFrameTimeChanged) + Q_PROPERTY(qreal elapsedTime READ elapsedTime NOTIFY elapsedTimeChanged) + QML_NAMED_ELEMENT(FrameAnimation) + QML_ADDED_IN_VERSION(6, 4) + +public: + QQuickFrameAnimation(QObject *parent = nullptr); + + bool isRunning() const; + void setRunning(bool running); + + bool isPaused() const; + void setPaused(bool paused); + + int currentFrame() const; + qreal frameTime() const; + qreal smoothFrameTime() const; + qreal elapsedTime() const; + +protected: + void classBegin() override; + void componentComplete() override; + +public Q_SLOTS: + void start(); + void stop(); + void restart(); + void pause(); + void resume(); + void reset(); + +Q_SIGNALS: + void triggered(); + void runningChanged(); + void pausedChanged(); + void currentFrameChanged(); + void frameTimeChanged(); + void smoothFrameTimeChanged(); + void elapsedTimeChanged(); + +private: + void setCurrentFrame(int frame); + void setElapsedTime(qreal elapsedTime); + +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsconfiguration_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsconfiguration_p.h new file mode 100644 index 0000000000000000000000000000000000000000..45e3e2b6da9788405ab0c46dfa911515185b92da --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsconfiguration_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGRAPHICSCONFIGURATION_P_H +#define QQUICKGRAPHICSCONFIGURATION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickgraphicsconfiguration.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickGraphicsConfigurationPrivate +{ +public: + static QQuickGraphicsConfigurationPrivate *get(QQuickGraphicsConfiguration *p) { return p->d; } + static const QQuickGraphicsConfigurationPrivate *get(const QQuickGraphicsConfiguration *p) { return p->d; } + QQuickGraphicsConfigurationPrivate(); + QQuickGraphicsConfigurationPrivate(const QQuickGraphicsConfigurationPrivate &other); + + enum Flag { + UseDepthBufferFor2D = 0x01, + EnableDebugLayer = 0x02, + EnableDebugMarkers = 0x04, + PreferSoftwareDevice = 0x08, + AutoPipelineCache = 0x10, + EnableTimestamps = 0x20 + }; + Q_DECLARE_FLAGS(Flags, Flag) + + QAtomicInt ref; + QByteArrayList deviceExtensions; + Flags flags; + QString pipelineCacheSaveFile; + QString pipelineCacheLoadFile; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickGraphicsConfigurationPrivate::Flags) + +QT_END_NAMESPACE + +#endif // QQUICKGRAPHICSCONFIGURATION_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsdevice_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsdevice_p.h new file mode 100644 index 0000000000000000000000000000000000000000..54872c3cb059bf67b239719526f046b5546db095 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsdevice_p.h @@ -0,0 +1,86 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGRAPHICSDEVICE_P_H +#define QQUICKGRAPHICSDEVICE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickgraphicsdevice.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickGraphicsDevicePrivate +{ +public: + static QQuickGraphicsDevicePrivate *get(QQuickGraphicsDevice *p) { return p->d; } + static const QQuickGraphicsDevicePrivate *get(const QQuickGraphicsDevice *p) { return p->d; } + QQuickGraphicsDevicePrivate(); + QQuickGraphicsDevicePrivate(const QQuickGraphicsDevicePrivate &other); + + enum class Type { + Null, + OpenGLContext, + Adapter, + DeviceAndContext, + DeviceAndCommandQueue, + PhysicalDevice, + DeviceObjects, + Rhi + }; + + QAtomicInt ref; + Type type = Type::Null; + + struct Adapter { + quint32 luidLow; + qint32 luidHigh; + int featureLevel; + }; + + struct DeviceAndContext { + void *device; + void *context; + }; + + struct DeviceAndCommandQueue { + void *device; + void *cmdQueue; + }; + + struct PhysicalDevice { + void *physicalDevice; + }; + + struct DeviceObjects { + void *physicalDevice; + void *device; + int queueFamilyIndex; + int queueIndex; + }; + + union { + QOpenGLContext *context; + Adapter adapter; + DeviceAndContext deviceAndContext; + DeviceAndCommandQueue deviceAndCommandQueue; + PhysicalDevice physicalDevice; + DeviceObjects deviceObjects; + QRhi *rhi; + } u; +}; + +QT_END_NAMESPACE + +#endif // QQUICKGRAPHICSDEVICE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsinfo_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsinfo_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0cd6c84e0c7a386d5d310ed9ebb6d10793864fe2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgraphicsinfo_p.h @@ -0,0 +1,146 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGRAPHICSINFO_P_H +#define QQUICKGRAPHICSINFO_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickWindow; + +class QQuickGraphicsInfo : public QObject +{ + Q_OBJECT + Q_PROPERTY(GraphicsApi api READ api NOTIFY apiChanged FINAL) + Q_PROPERTY(ShaderType shaderType READ shaderType NOTIFY shaderTypeChanged FINAL) + Q_PROPERTY(ShaderCompilationType shaderCompilationType READ shaderCompilationType NOTIFY shaderCompilationTypeChanged FINAL) + Q_PROPERTY(ShaderSourceType shaderSourceType READ shaderSourceType NOTIFY shaderSourceTypeChanged FINAL) + + Q_PROPERTY(int majorVersion READ majorVersion NOTIFY majorVersionChanged FINAL) + Q_PROPERTY(int minorVersion READ minorVersion NOTIFY minorVersionChanged FINAL) + Q_PROPERTY(OpenGLContextProfile profile READ profile NOTIFY profileChanged FINAL) + Q_PROPERTY(RenderableType renderableType READ renderableType NOTIFY renderableTypeChanged FINAL) + + QML_NAMED_ELEMENT(GraphicsInfo) + QML_ADDED_IN_VERSION(2, 8) + QML_UNCREATABLE("GraphicsInfo is only available via attached properties.") + QML_ATTACHED(QQuickGraphicsInfo) + +public: + enum GraphicsApi { + Unknown = QSGRendererInterface::Unknown, + Software = QSGRendererInterface::Software, + OpenVG = QSGRendererInterface::OpenVG, + OpenGL = QSGRendererInterface::OpenGL, + Direct3D11 = QSGRendererInterface::Direct3D11, + Vulkan = QSGRendererInterface::Vulkan, + Metal = QSGRendererInterface::Metal, + Null = QSGRendererInterface::Null, + Direct3D12 = QSGRendererInterface::Direct3D12, + + OpenGLRhi = QSGRendererInterface::OpenGLRhi, + Direct3D11Rhi = QSGRendererInterface::Direct3D11Rhi, + VulkanRhi = QSGRendererInterface::VulkanRhi, + MetalRhi = QSGRendererInterface::MetalRhi, + NullRhi = QSGRendererInterface::NullRhi + }; + Q_ENUM(GraphicsApi) + + enum ShaderType { + UnknownShadingLanguage = QSGRendererInterface::UnknownShadingLanguage, + GLSL = QSGRendererInterface::GLSL, + HLSL = QSGRendererInterface::HLSL, + RhiShader = QSGRendererInterface::RhiShader + }; + Q_ENUM(ShaderType) + + enum ShaderCompilationType { + RuntimeCompilation = QSGRendererInterface::RuntimeCompilation, + OfflineCompilation = QSGRendererInterface::OfflineCompilation + }; + Q_ENUM(ShaderCompilationType) + + enum ShaderSourceType { + ShaderSourceString = QSGRendererInterface::ShaderSourceString, + ShaderSourceFile = QSGRendererInterface::ShaderSourceFile, + ShaderByteCode = QSGRendererInterface::ShaderByteCode + }; + Q_ENUM(ShaderSourceType) + + enum OpenGLContextProfile { + OpenGLNoProfile = QSurfaceFormat::NoProfile, + OpenGLCoreProfile = QSurfaceFormat::CoreProfile, + OpenGLCompatibilityProfile = QSurfaceFormat::CompatibilityProfile + }; + Q_ENUM(OpenGLContextProfile) + + enum RenderableType { + SurfaceFormatUnspecified = QSurfaceFormat::DefaultRenderableType, + SurfaceFormatOpenGL = QSurfaceFormat::OpenGL, + SurfaceFormatOpenGLES = QSurfaceFormat::OpenGLES + }; + Q_ENUM(RenderableType) + + QQuickGraphicsInfo(QQuickItem *item = nullptr); + + static QQuickGraphicsInfo *qmlAttachedProperties(QObject *object); + + GraphicsApi api() const { return m_api; } + ShaderType shaderType() const { return m_shaderType; } + ShaderCompilationType shaderCompilationType() const { return m_shaderCompilationType; } + ShaderSourceType shaderSourceType() const { return m_shaderSourceType; } + + int majorVersion() const { return m_majorVersion; } + int minorVersion() const { return m_minorVersion; } + OpenGLContextProfile profile() const { return m_profile; } + RenderableType renderableType() const { return m_renderableType; } + +Q_SIGNALS: + void apiChanged(); + void shaderTypeChanged(); + void shaderCompilationTypeChanged(); + void shaderSourceTypeChanged(); + + void majorVersionChanged(); + void minorVersionChanged(); + void profileChanged(); + void renderableTypeChanged(); + +private Q_SLOTS: + void updateInfo(); + void setWindow(QQuickWindow *window); + +private: + QPointer m_window; + GraphicsApi m_api; + ShaderType m_shaderType; + ShaderCompilationType m_shaderCompilationType; + ShaderSourceType m_shaderSourceType; + int m_majorVersion; + int m_minorVersion; + OpenGLContextProfile m_profile; + RenderableType m_renderableType; +}; + +QT_END_NAMESPACE + +#endif // QQUICKGRAPHICSINFO_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgridview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgridview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a104fdca1c7d82e6873d3f252a759411c505c4a7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickgridview_p.h @@ -0,0 +1,114 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGRIDVIEW_P_H +#define QQUICKGRIDVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_gridview); + +#include "qquickitemview_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickGridViewAttached; +class QQuickGridViewPrivate; +class Q_QUICK_EXPORT QQuickGridView : public QQuickItemView +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickGridView) + + Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(qreal cellWidth READ cellWidth WRITE setCellWidth NOTIFY cellWidthChanged) + Q_PROPERTY(qreal cellHeight READ cellHeight WRITE setCellHeight NOTIFY cellHeightChanged) + + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) + + Q_CLASSINFO("DefaultProperty", "data") + QML_NAMED_ELEMENT(GridView) + QML_ADDED_IN_VERSION(2, 0) + QML_ATTACHED(QQuickGridViewAttached) + +public: + enum Flow { + FlowLeftToRight = LeftToRight, + FlowTopToBottom = TopToBottom + }; + Q_ENUM(Flow) + + QQuickGridView(QQuickItem *parent=nullptr); + + void setHighlightFollowsCurrentItem(bool) override; + void setHighlightMoveDuration(int) override; + + Flow flow() const; + void setFlow(Flow); + + qreal cellWidth() const; + void setCellWidth(qreal); + + qreal cellHeight() const; + void setCellHeight(qreal); + + enum SnapMode { NoSnap, SnapToRow, SnapOneRow }; + Q_ENUM(SnapMode) + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + static QQuickGridViewAttached *qmlAttachedProperties(QObject *); + +public Q_SLOTS: + void moveCurrentIndexUp(); + void moveCurrentIndexDown(); + void moveCurrentIndexLeft(); + void moveCurrentIndexRight(); + +Q_SIGNALS: + void cellWidthChanged(); + void cellHeightChanged(); + void highlightMoveDurationChanged(); + void flowChanged(); + void snapModeChanged(); + +protected: + void viewportMoved(Qt::Orientations) override; + void keyPressEvent(QKeyEvent *) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void initItem(int index, QObject *item) override; +}; + +class QQuickGridViewAttached : public QQuickItemViewAttached +{ + Q_OBJECT + Q_PROPERTY(QQuickGridView *view READ view NOTIFY viewChanged FINAL) +public: + QQuickGridViewAttached(QObject *parent) + : QQuickItemViewAttached(parent) {} + ~QQuickGridViewAttached() {} + QQuickGridView *view() const { return m_view; } + void setView(QQuickGridView *view) { + if (view != m_view) { + m_view = view; + Q_EMIT viewChanged(); + } + } +private: + QPointer m_view; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKGRIDVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhandlerpoint_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhandlerpoint_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0901a322e855bca6c376af4a68bddd35272119c6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhandlerpoint_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKHANDLERPOINT_H +#define QQUICKHANDLERPOINT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickpointerdevicehandler_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickMultiPointHandler; +class QQuickSinglePointHandler; + +class Q_QUICK_EXPORT QQuickHandlerPoint { + Q_GADGET + Q_PROPERTY(int id READ id FINAL) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId FINAL) + Q_PROPERTY(QPointF position READ position FINAL) + Q_PROPERTY(QPointF scenePosition READ scenePosition FINAL) + Q_PROPERTY(QPointF pressPosition READ pressPosition FINAL) + Q_PROPERTY(QPointF scenePressPosition READ scenePressPosition FINAL) + Q_PROPERTY(QPointF sceneGrabPosition READ sceneGrabPosition FINAL) + Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons FINAL) + Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers FINAL) + Q_PROPERTY(QVector2D velocity READ velocity FINAL) + Q_PROPERTY(qreal rotation READ rotation FINAL) + Q_PROPERTY(qreal pressure READ pressure FINAL) + Q_PROPERTY(QSizeF ellipseDiameters READ ellipseDiameters FINAL) + Q_PROPERTY(QPointingDevice *device READ device FINAL) + QML_ANONYMOUS + +public: + QQuickHandlerPoint(); + + int id() const { return m_id; } + Qt::MouseButtons pressedButtons() const { return m_pressedButtons; } + Qt::KeyboardModifiers modifiers() const { return m_pressedModifiers; } + QPointF pressPosition() const { return m_pressPosition; } + QPointF scenePressPosition() const { return m_scenePressPosition; } + QPointF sceneGrabPosition() const { return m_sceneGrabPosition; } + QPointF position() const { return m_position; } + QPointF scenePosition() const { return m_scenePosition; } + QVector2D velocity() const { return m_velocity; } + qreal rotation() const { return m_rotation; } + qreal pressure() const { return m_pressure; } + QSizeF ellipseDiameters() const { return m_ellipseDiameters; } + QPointingDeviceUniqueId uniqueId() const { return m_uniqueId; } + // non-const only because of QML engine limitations (similar to QTBUG-61749) + QPointingDevice *device() const { return const_cast(m_device); } + void localize(QQuickItem *item); + + void reset(); + void reset(const QPointerEvent *event, const QEventPoint &point); + void reset(const QVector &points); + +private: + int m_id = -1; + const QPointingDevice *m_device = QPointingDevice::primaryPointingDevice(); + QPointingDeviceUniqueId m_uniqueId; + Qt::MouseButtons m_pressedButtons = Qt::NoButton; + Qt::KeyboardModifiers m_pressedModifiers = Qt::NoModifier; + QPointF m_position; + QPointF m_scenePosition; + QPointF m_pressPosition; + QPointF m_scenePressPosition; + QPointF m_sceneGrabPosition; + QVector2D m_velocity; + qreal m_rotation = 0; + qreal m_pressure = 0; + QSizeF m_ellipseDiameters; + friend class QQuickMultiPointHandler; + friend class QQuickSinglePointHandler; +}; + +QT_END_NAMESPACE + +#endif // QQUICKHANDLERPOINT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhoverhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhoverhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d72414edfb4cc880ff2124b3af3bd75c14f5f962 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickhoverhandler_p.h @@ -0,0 +1,69 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKHOVERHANDLER_H +#define QQUICKHOVERHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qquicksinglepointhandler_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickHoverHandlerPrivate; + +class Q_QUICK_EXPORT QQuickHoverHandler : public QQuickSinglePointHandler +{ + Q_OBJECT + Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged) + Q_PROPERTY(bool blocking READ isBlocking WRITE setBlocking NOTIFY blockingChanged REVISION(6, 3)) + QML_NAMED_ELEMENT(HoverHandler) + QML_ADDED_IN_VERSION(2, 12) + +public: + explicit QQuickHoverHandler(QQuickItem *parent = nullptr); + ~QQuickHoverHandler(); + + bool event(QEvent *) override; + + bool isHovered() const { return m_hovered; } + + bool isBlocking() const { return m_blocking; } + void setBlocking(bool blocking); + +Q_SIGNALS: + void hoveredChanged(); + Q_REVISION(6, 3) void blockingChanged(); + +protected: + void componentComplete() override; + bool wantsPointerEvent(QPointerEvent *event) override; + void handleEventPoint(QPointerEvent *ev, QEventPoint &point) override; + + Q_DECLARE_PRIVATE(QQuickHoverHandler) + +private: + void setHovered(bool hovered); + +private: + bool m_hovered = false; + bool m_hoveredTablet = false; + bool m_blocking = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKHOVERHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2e9395008b4977c92b10527c4bbdd51f9880f7b1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p.h @@ -0,0 +1,105 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGE_P_H +#define QQUICKIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimagebase_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickImagePrivate; +class Q_QUICK_EXPORT QQuickImage : public QQuickImageBase +{ + Q_OBJECT + + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) + Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedGeometryChanged) + Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedGeometryChanged) + Q_PROPERTY(HAlignment horizontalAlignment READ horizontalAlignment WRITE setHorizontalAlignment NOTIFY horizontalAlignmentChanged) + Q_PROPERTY(VAlignment verticalAlignment READ verticalAlignment WRITE setVerticalAlignment NOTIFY verticalAlignmentChanged) + Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize RESET resetSourceSize NOTIFY sourceSizeChanged) + Q_PROPERTY(bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged REVISION(2, 3)) + Q_PROPERTY(bool autoTransform READ autoTransform WRITE setAutoTransform NOTIFY autoTransformChanged REVISION(2, 5)) + Q_PROPERTY(QRectF sourceClipRect READ sourceClipRect WRITE setSourceClipRect RESET resetSourceClipRect NOTIFY sourceClipRectChanged REVISION(2, 15)) + QML_NAMED_ELEMENT(Image) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickImage(QQuickItem *parent=nullptr); + ~QQuickImage(); + + enum HAlignment { AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter }; + Q_ENUM(HAlignment) + enum VAlignment { AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter }; + Q_ENUM(VAlignment) + + enum FillMode { Stretch, PreserveAspectFit, PreserveAspectCrop, Tile, TileVertically, TileHorizontally, Pad }; + Q_ENUM(FillMode) + + FillMode fillMode() const; + void setFillMode(FillMode); + + qreal paintedWidth() const; + qreal paintedHeight() const; + + QRectF boundingRect() const override; + + HAlignment horizontalAlignment() const; + void setHorizontalAlignment(HAlignment align); + + VAlignment verticalAlignment() const; + void setVerticalAlignment(VAlignment align); + + bool isTextureProvider() const override { return true; } + QSGTextureProvider *textureProvider() const override; + + bool mipmap() const; + void setMipmap(bool use); + + void emitAutoTransformBaseChanged() override { Q_EMIT autoTransformChanged(); } + +Q_SIGNALS: + void fillModeChanged(); + void paintedGeometryChanged(); + void horizontalAlignmentChanged(HAlignment alignment); + void verticalAlignmentChanged(VAlignment alignment); + Q_REVISION(2, 3) void mipmapChanged(bool); + Q_REVISION(2, 5) void autoTransformChanged(); + +private Q_SLOTS: + void invalidateSceneGraph(); + +protected: + QQuickImage(QQuickImagePrivate &dd, QQuickItem *parent); + void pixmapChange() override; + void updatePaintedGeometry(); + void releaseResources() override; + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + +private: + Q_DISABLE_COPY(QQuickImage) + Q_DECLARE_PRIVATE(QQuickImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9b5b3fb7141501cec3ac340f6963df2e4f890f83 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimage_p_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGE_P_P_H +#define QQUICKIMAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimagebase_p_p.h" +#include "qquickimage_p.h" +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickImageTextureProvider : public QSGTextureProvider +{ + Q_OBJECT +public: + QQuickImageTextureProvider(); + + void updateTexture(QSGTexture *texture); + + QSGTexture *texture() const override ; + + friend class QQuickImage; + + QSGTexture *m_texture; + bool m_smooth; + bool m_mipmap; +}; + +class Q_QUICK_EXPORT QQuickImagePrivate : public QQuickImageBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickImage) + +public: + QQuickImagePrivate(); + void setImage(const QImage &img); + void setPixmap(const QQuickPixmap &pixmap); + + bool pixmapChanged : 1; + bool mipmap : 1; + QQuickImage::HAlignment hAlign = QQuickImage::AlignHCenter; + QQuickImage::VAlignment vAlign = QQuickImage::AlignVCenter; + QQuickImage::FillMode fillMode = QQuickImage::Stretch; + + qreal paintedWidth = 0; + qreal paintedHeight = 0; + QQuickImageTextureProvider *provider = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p.h new file mode 100644 index 0000000000000000000000000000000000000000..89fc177622056c44980ca845e411dc581e30ff87 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p.h @@ -0,0 +1,142 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGEBASE_P_H +#define QQUICKIMAGEBASE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickImageBasePrivate; +class Q_QUICK_EXPORT QQuickImageBase : public QQuickImplicitSizeItem +{ + Q_OBJECT + + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) + Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) + Q_PROPERTY(bool cache READ cache WRITE setCache NOTIFY cacheChanged) + Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged) + Q_PROPERTY(bool mirrorVertically READ mirrorVertically WRITE setMirrorVertically NOTIFY mirrorVerticallyChanged REVISION(6, 2)) + Q_PROPERTY(bool retainWhileLoading READ retainWhileLoading WRITE setRetainWhileLoading NOTIFY retainWhileLoadingChanged REVISION(6, 8)) + Q_PROPERTY(int currentFrame READ currentFrame WRITE setCurrentFrame NOTIFY currentFrameChanged REVISION(2, 14)) + Q_PROPERTY(int frameCount READ frameCount NOTIFY frameCountChanged REVISION(2, 14)) + Q_PROPERTY(QColorSpace colorSpace READ colorSpace WRITE setColorSpace NOTIFY colorSpaceChanged REVISION(2, 15)) + + QML_NAMED_ELEMENT(ImageBase); + QML_ADDED_IN_VERSION(2, 14) + QML_UNCREATABLE("ImageBase is an abstract base class.") + +public: + enum LoadPixmapOption { + NoOption = 0x0000, + HandleDPR = 0x0001, + UseProviderOptions = 0x0002 + }; + + Q_DECLARE_FLAGS(LoadPixmapOptions, LoadPixmapOption) + Q_FLAG(LoadPixmapOptions) + + QQuickImageBase(QQuickItem *parent=nullptr); + ~QQuickImageBase(); + enum Status { Null, Ready, Loading, Error }; + Q_ENUM(Status) + Status status() const; + qreal progress() const; + + QUrl source() const; + virtual void setSource(const QUrl &url); + + bool asynchronous() const; + void setAsynchronous(bool); + + bool cache() const; + void setCache(bool); + + QImage image() const; + + virtual void setSourceSize(const QSize&); + QSize sourceSize() const; + void resetSourceSize(); + + QRectF sourceClipRect() const; + void setSourceClipRect(const QRectF &r); + void resetSourceClipRect(); + + virtual void setMirror(bool mirror); + bool mirror() const; + + virtual void setMirrorVertically(bool mirror); + bool mirrorVertically() const; + + virtual void setCurrentFrame(int frame); + virtual int currentFrame() const; + + virtual int frameCount() const; + + virtual void setAutoTransform(bool transform); + bool autoTransform() const; + + QColorSpace colorSpace() const; + virtual void setColorSpace(const QColorSpace &colorSpace); + + bool retainWhileLoading() const; + void setRetainWhileLoading(bool retain); + + static void resolve2xLocalFile(const QUrl &url, qreal targetDevicePixelRatio, QUrl *sourceUrl, qreal *sourceDevicePixelRatio); + + // Use a virtual rather than a signal->signal to avoid the huge + // connect/conneciton overhead for this rare case. + virtual void emitAutoTransformBaseChanged() { } + +Q_SIGNALS: + void sourceChanged(const QUrl &); + void sourceSizeChanged(); + void statusChanged(QQuickImageBase::Status); + void progressChanged(qreal progress); + void asynchronousChanged(); + void cacheChanged(); + void mirrorChanged(); + Q_REVISION(2, 14) void currentFrameChanged(); + Q_REVISION(2, 14) void frameCountChanged(); + Q_REVISION(2, 15) void sourceClipRectChanged(); + Q_REVISION(2, 15) void colorSpaceChanged(); + Q_REVISION(6, 2) void mirrorVerticallyChanged(); + Q_REVISION(6, 8) void retainWhileLoadingChanged(); + +protected: + void loadEmptyUrl(); + void loadPixmap(const QUrl &url, LoadPixmapOptions loadOptions = NoOption); + virtual void load(); + void componentComplete() override; + virtual void pixmapChange(); + void itemChange(ItemChange change, const ItemChangeData &value) override; + QQuickImageBase(QQuickImageBasePrivate &dd, QQuickItem *parent); + +private Q_SLOTS: + virtual void requestFinished(); + void requestProgress(qint64,qint64); + +private: + Q_DISABLE_COPY(QQuickImageBase) + Q_DECLARE_PRIVATE(QQuickImageBase) +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGEBASE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a7ae284f3a944d56d1e1c71d81f4c0c1cfa49d37 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimagebase_p_p.h @@ -0,0 +1,75 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGEBASE_P_P_H +#define QQUICKIMAGEBASE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p_p.h" +#include "qquickimagebase_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QNetworkReply; +class Q_QUICK_EXPORT QQuickImageBasePrivate : public QQuickImplicitSizeItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickImageBase) + +public: + QQuickImageBasePrivate() + : async(false), + cache(true), + mirrorHorizontally(false), + mirrorVertically(false), + oldAutoTransform(false), + retainWhileLoading(false) + { + pendingPix = &pix1; + currentPix = &pix1; + } + + virtual bool updateDevicePixelRatio(qreal targetDevicePixelRatio); + + void setStatus(QQuickImageBase::Status value); + void setProgress(qreal value); + + QUrl url; + QQuickPixmap *pendingPix = nullptr; + QQuickPixmap *currentPix = nullptr; + QQuickPixmap pix1; + QQuickPixmap pix2; + QSize sourcesize; + QSize oldSourceSize; + QRectF sourceClipRect; + QQuickImageProviderOptions providerOptions; + QColorSpace colorSpace; + + int currentFrame = 0; + int frameCount = 0; + qreal progress = 0; + qreal devicePixelRatio = 1; + QQuickImageBase::Status status = QQuickImageBase::Null; + + bool async : 1; + bool cache : 1; + bool mirrorHorizontally: 1; + bool mirrorVertically : 1; + bool oldAutoTransform : 1; + bool retainWhileLoading : 1; +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGEBASE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimageprovider_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimageprovider_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fe2359700125c3d87c5ab6809a909728b780d5de --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimageprovider_p.h @@ -0,0 +1,40 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKQQUICKIMAGEPROVIDER_P_H +#define QQUICKQQUICKIMAGEPROVIDER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickImageResponsePrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickImageResponse) +public: + QAtomicInteger finished = false; + + void _q_finished() + { + // synchronizes-with the loadAcquire in QQuickPixmapReader::processJob: + finished.storeRelease(true); + } +}; + + +QT_END_NAMESPACE + +#endif // QQUICKQQUICKIMAGEPROVIDER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7882d8e757b7d2b3dd1830a5935e4ae672bd74b5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p.h @@ -0,0 +1,42 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMPLICITSIZEITEM_H +#define QQUICKIMPLICITSIZEITEM_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickImplicitSizeItemPrivate; +class Q_QUICK_EXPORT QQuickImplicitSizeItem : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(qreal implicitWidth READ implicitWidth NOTIFY implicitWidthChanged) + Q_PROPERTY(qreal implicitHeight READ implicitHeight NOTIFY implicitHeightChanged) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(6, 2) + +protected: + QQuickImplicitSizeItem(QQuickImplicitSizeItemPrivate &dd, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickImplicitSizeItem) + Q_DECLARE_PRIVATE(QQuickImplicitSizeItem) +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMPLICITSIZEITEM_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..48651e2442cd1a2a193eb2a7a9d5bacaec43cc09 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickimplicitsizeitem_p_p.h @@ -0,0 +1,36 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMPLICITSIZEITEM_P_H +#define QQUICKIMPLICITSIZEITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem_p.h" +#include "qquickpainteditem_p.h" +#include "qquickimplicitsizeitem_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickImplicitSizeItemPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickImplicitSizeItem) + +public: + QQuickImplicitSizeItemPrivate() + { + } +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMPLICITSIZEITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickinputmethod_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickinputmethod_p.h new file mode 100644 index 0000000000000000000000000000000000000000..df03d012eabb2bb43c61c62ed106d6c84d337134 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickinputmethod_p.h @@ -0,0 +1,86 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKINPUTMETHOD_P_H +#define QQUICKINPUTMETHOD_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE +class Q_QUICK_EXPORT QQuickInputMethod : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(InputMethod) + QML_ADDED_IN_VERSION(6, 4) + QML_SINGLETON + + Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged FINAL) + Q_PROPERTY(QRectF anchorRectangle READ anchorRectangle NOTIFY anchorRectangleChanged FINAL) + Q_PROPERTY(QRectF keyboardRectangle READ keyboardRectangle NOTIFY keyboardRectangleChanged FINAL) + Q_PROPERTY(QRectF inputItemClipRectangle READ inputItemClipRectangle NOTIFY + inputItemClipRectangleChanged FINAL) + Q_PROPERTY(bool visible READ isVisible NOTIFY visibleChanged FINAL) + Q_PROPERTY(bool animating READ isAnimating NOTIFY animatingChanged FINAL) + Q_PROPERTY(QLocale locale READ locale NOTIFY localeChanged FINAL) + Q_PROPERTY(Qt::LayoutDirection inputDirection READ inputDirection NOTIFY inputDirectionChanged FINAL) +public: + explicit QQuickInputMethod(QObject *parent = nullptr); + + QRectF anchorRectangle() const; + QRectF cursorRectangle() const; + Qt::LayoutDirection inputDirection() const; + QRectF inputItemClipRectangle() const; + + QRectF inputItemRectangle() const; + void setInputItemRectangle(const QRectF &rect); + + QTransform inputItemTransform() const; + void setInputItemTransform(const QTransform &transform); + + bool isAnimating() const; + + bool isVisible() const; + void setVisible(bool visible); + + QRectF keyboardRectangle() const; + QLocale locale() const; +Q_SIGNALS: + void anchorRectangleChanged(); + void animatingChanged(); + void cursorRectangleChanged(); + void inputDirectionChanged(Qt::LayoutDirection newDirection); + void inputItemClipRectangleChanged(); + void keyboardRectangleChanged(); + void localeChanged(); + void visibleChanged(); + +public Q_SLOTS: + void commit(); + void hide(); + void invokeAction(QInputMethod::Action a, int cursorPosition); + void reset(); + void show(); + void update(Qt::InputMethodQueries queries); +}; + +QT_END_NAMESPACE + +#endif // QQUICKINPUTMETHOD_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..022b353b99c6ae04961ce1c43d6ca4406f9bf974 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitem_p.h @@ -0,0 +1,1066 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEM_P_H +#define QQUICKITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if QT_CONFIG(quick_shadereffect) +#include +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QNetworkReply; +class QQuickItemKeyFilter; +class QQuickLayoutMirroringAttached; +class QQuickEnterKeyAttached; +class QQuickScreenAttached; +class QQuickPointerHandler; + +class QQuickContents : public QQuickItemChangeListener +{ +public: + QQuickContents(QQuickItem *item); + ~QQuickContents() override; + + QRectF rectF() const { return m_contents; } + + inline void calcGeometry(QQuickItem *changed = nullptr); + void complete(); + +protected: + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override; + void itemDestroyed(QQuickItem *item) override; + void itemChildAdded(QQuickItem *, QQuickItem *) override; + void itemChildRemoved(QQuickItem *, QQuickItem *) override; + //void itemVisibilityChanged(QQuickItem *item) + +private: + bool calcHeight(QQuickItem *changed = nullptr); + bool calcWidth(QQuickItem *changed = nullptr); + void updateRect(); + + QQuickItem *m_item; + QRectF m_contents; +}; + +void QQuickContents::calcGeometry(QQuickItem *changed) +{ + bool wChanged = calcWidth(changed); + bool hChanged = calcHeight(changed); + if (wChanged || hChanged) + updateRect(); +} + +class QQuickTransformPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickTransform) +public: + static QQuickTransformPrivate* get(QQuickTransform *transform) { return transform->d_func(); } + + QQuickTransformPrivate(); + + QList items; +}; + +#if QT_CONFIG(quick_shadereffect) + +class Q_QUICK_EXPORT QQuickItemLayer : public QObject, public QQuickItemChangeListener +{ + Q_OBJECT + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL) + Q_PROPERTY(QSize textureSize READ size WRITE setSize NOTIFY sizeChanged FINAL) + Q_PROPERTY(QRectF sourceRect READ sourceRect WRITE setSourceRect NOTIFY sourceRectChanged FINAL) + Q_PROPERTY(bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged FINAL) + Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged FINAL) + Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged REVISION(6, 5) FINAL) + Q_PROPERTY(QQuickShaderEffectSource::WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged FINAL) + Q_PROPERTY(QQuickShaderEffectSource::Format format READ format WRITE setFormat NOTIFY formatChanged FINAL) + Q_PROPERTY(QByteArray samplerName READ name WRITE setName NOTIFY nameChanged FINAL) + Q_PROPERTY(QQmlComponent *effect READ effect WRITE setEffect NOTIFY effectChanged FINAL) + Q_PROPERTY(QQuickShaderEffectSource::TextureMirroring textureMirroring READ textureMirroring WRITE setTextureMirroring NOTIFY textureMirroringChanged FINAL) + Q_PROPERTY(int samples READ samples WRITE setSamples NOTIFY samplesChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickItemLayer(QQuickItem *item); + ~QQuickItemLayer() override; + + void classBegin(); + void componentComplete(); + + bool enabled() const { return m_enabled; } + void setEnabled(bool enabled); + + bool mipmap() const { return m_mipmap; } + void setMipmap(bool mipmap); + + bool smooth() const { return m_smooth; } + void setSmooth(bool s); + + bool live() const { return m_live; } + void setLive(bool live); + + QSize size() const { return m_size; } + void setSize(const QSize &size); + + QQuickShaderEffectSource::Format format() const { return m_format; } + void setFormat(QQuickShaderEffectSource::Format f); + + QRectF sourceRect() const { return m_sourceRect; } + void setSourceRect(const QRectF &sourceRect); + + QQuickShaderEffectSource::WrapMode wrapMode() const { return m_wrapMode; } + void setWrapMode(QQuickShaderEffectSource::WrapMode mode); + + QByteArray name() const { return m_name; } + void setName(const QByteArray &name); + + QQmlComponent *effect() const { return m_effectComponent; } + void setEffect(QQmlComponent *effect); + + QQuickShaderEffectSource::TextureMirroring textureMirroring() const { return m_textureMirroring; } + void setTextureMirroring(QQuickShaderEffectSource::TextureMirroring mirroring); + + int samples() const { return m_samples; } + void setSamples(int count); + + QQuickShaderEffectSource *effectSource() const { return m_effectSource; } + + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; + void itemOpacityChanged(QQuickItem *) override; + void itemParentChanged(QQuickItem *, QQuickItem *) override; + void itemSiblingOrderChanged(QQuickItem *) override; + void itemVisibilityChanged(QQuickItem *) override; + + void updateMatrix(); + void updateGeometry(); + void updateOpacity(); + void updateZ(); + +Q_SIGNALS: + void enabledChanged(bool enabled); + void sizeChanged(const QSize &size); + void mipmapChanged(bool mipmap); + void wrapModeChanged(QQuickShaderEffectSource::WrapMode mode); + void nameChanged(const QByteArray &name); + void effectChanged(QQmlComponent *component); + void smoothChanged(bool smooth); + void liveChanged(bool live); + void formatChanged(QQuickShaderEffectSource::Format format); + void sourceRectChanged(const QRectF &sourceRect); + void textureMirroringChanged(QQuickShaderEffectSource::TextureMirroring mirroring); + void samplesChanged(int count); + +private: + friend class QQuickTransformAnimatorJob; + friend class QQuickOpacityAnimatorJob; + + void activate(); + void deactivate(); + void activateEffect(); + void deactivateEffect(); + + QQuickItem *m_item; + bool m_enabled; + bool m_mipmap; + bool m_smooth; + bool m_live; + bool m_componentComplete; + QQuickShaderEffectSource::WrapMode m_wrapMode; + QQuickShaderEffectSource::Format m_format; + QSize m_size; + QRectF m_sourceRect; + QByteArray m_name; + QQmlComponent *m_effectComponent; + QQuickItem *m_effect; + QQuickShaderEffectSource *m_effectSource; + QQuickShaderEffectSource::TextureMirroring m_textureMirroring; + int m_samples; +}; + +#endif + +class Q_QUICK_EXPORT QQuickItemPrivate + : public QObjectPrivate + , public QQuickPaletteProviderPrivateBase +{ + Q_DECLARE_PUBLIC(QQuickItem) + +public: + static QQuickItemPrivate* get(QQuickItem *item) { return item->d_func(); } + static const QQuickItemPrivate* get(const QQuickItem *item) { return item->d_func(); } + + QQuickItemPrivate(); + ~QQuickItemPrivate() override; + void init(QQuickItem *parent); + + QQmlListProperty data(); + QQmlListProperty resources(); + QQmlListProperty children(); + QQmlListProperty visibleChildren(); + + QQmlListProperty states(); + QQmlListProperty transitions(); + + QString state() const; + void setState(const QString &); + + QQuickAnchorLine left() const; + QQuickAnchorLine right() const; + QQuickAnchorLine horizontalCenter() const; + QQuickAnchorLine top() const; + QQuickAnchorLine bottom() const; + QQuickAnchorLine verticalCenter() const; + QQuickAnchorLine baseline() const; + +#if QT_CONFIG(quick_shadereffect) + QQuickItemLayer *layer() const; +#endif + + void localizedTouchEvent(const QTouchEvent *event, bool isFiltering, QMutableTouchEvent *localized); + bool hasPointerHandlers() const; + bool hasEnabledHoverHandlers() const; + virtual void addPointerHandler(QQuickPointerHandler *h); + virtual void removePointerHandler(QQuickPointerHandler *h); + + // data property + static void data_append(QQmlListProperty *, QObject *); + static qsizetype data_count(QQmlListProperty *); + static QObject *data_at(QQmlListProperty *, qsizetype); + static void data_clear(QQmlListProperty *); + static void data_removeLast(QQmlListProperty *); + + // resources property + static QObject *resources_at(QQmlListProperty *, qsizetype); + static void resources_append(QQmlListProperty *, QObject *); + static qsizetype resources_count(QQmlListProperty *); + static void resources_clear(QQmlListProperty *); + static void resources_removeLast(QQmlListProperty *); + + // children property + static void children_append(QQmlListProperty *, QQuickItem *); + static qsizetype children_count(QQmlListProperty *); + static QQuickItem *children_at(QQmlListProperty *, qsizetype); + static void children_clear(QQmlListProperty *); + static void children_removeLast(QQmlListProperty *); + + // visibleChildren property + static qsizetype visibleChildren_count(QQmlListProperty *prop); + static QQuickItem *visibleChildren_at(QQmlListProperty *prop, qsizetype index); + + // transform property + static qsizetype transform_count(QQmlListProperty *list); + static void transform_append(QQmlListProperty *list, QQuickTransform *); + static QQuickTransform *transform_at(QQmlListProperty *list, qsizetype); + static void transform_clear(QQmlListProperty *list); + + void _q_resourceObjectDeleted(QObject *); + quint64 _q_createJSWrapper(QQmlV4ExecutionEnginePtr engine); + + enum ChangeType { + Geometry = 0x01, + SiblingOrder = 0x02, + Visibility = 0x04, + Opacity = 0x08, + Destroyed = 0x10, + Parent = 0x20, + Children = 0x40, + Rotation = 0x80, + ImplicitWidth = 0x100, + ImplicitHeight = 0x200, + Enabled = 0x400, + Focus = 0x800, + AllChanges = 0xFFFFFFFF + }; + + Q_DECLARE_FLAGS(ChangeTypes, ChangeType) + + struct ChangeListener { + using ChangeTypes = QQuickItemPrivate::ChangeTypes; + + ChangeListener(QQuickItemChangeListener *l = nullptr, ChangeTypes t = { }) + : listener(l) + , types(t) + , gTypes(QQuickGeometryChange::All) + {} + + ChangeListener(QQuickItemChangeListener *l, QQuickGeometryChange gt) + : listener(l) + , types(Geometry) + , gTypes(gt) + {} + + bool operator==(const ChangeListener &other) const + { return listener == other.listener && types == other.types; } + + QQuickItemChangeListener *listener; + ChangeTypes types; + QQuickGeometryChange gTypes; //NOTE: not used for == + +#ifndef QT_NO_DEBUG_STREAM + private: + friend QDebug operator<<(QDebug debug, const QQuickItemPrivate::ChangeListener &listener); +#endif // QT_NO_DEBUG_STREAM + }; + + // call QQuickItemChangeListener + template + void notifyChangeListeners(QQuickItemPrivate::ChangeTypes changeTypes, Fn &&function, Args &&...args) + { + if (changeListeners.isEmpty()) + return; + + const auto listeners = changeListeners; // NOTE: intentional copy (QTBUG-54732) + for (const QQuickItemPrivate::ChangeListener &change : listeners) { + if (change.types & changeTypes) { + if constexpr (std::is_member_function_pointer_v) + (change.listener->*function)(args...); + else + function(change, args...); + } + } + } + + struct ExtraData { + ExtraData(); + + qreal z; + qreal scale; + qreal rotation; + qreal opacity; + + QQuickContents *contents; + QQuickScreenAttached *screenAttached; + QQuickLayoutMirroringAttached* layoutDirectionAttached; + QQuickEnterKeyAttached *enterKeyAttached; + QQuickItemKeyFilter *keyHandler; + QVector pointerHandlers; +#if QT_CONFIG(quick_shadereffect) + mutable QQuickItemLayer *layer; +#endif +#if QT_CONFIG(cursor) + QCursor cursor; +#endif + QPointF userTransformOriginPoint; + + // these do not include child items + int effectRefCount; + int hideRefCount; + // updated recursively for child items as well + int recursiveEffectRefCount; + // Mask contains() method index + int maskContainsIndex; + + // Contains mask + QPointer mask; + + QSGOpacityNode *opacityNode; + QQuickDefaultClipNode *clipNode; + QSGRootNode *rootNode; + // subsceneDeliveryAgent is set only if this item is the root of a subscene, not on all items within. + QQuickDeliveryAgent *subsceneDeliveryAgent = nullptr; + + QObjectList resourcesList; + + // Although acceptedMouseButtons is inside ExtraData, we actually store + // the LeftButton flag in the extra.tag() bit. This is because it is + // extremely common to set acceptedMouseButtons to LeftButton, but very + // rare to use any of the other buttons. + Qt::MouseButtons acceptedMouseButtons; + Qt::MouseButtons acceptedMouseButtonsWithoutHandlers; + + uint origin:5; // QQuickItem::TransformOrigin + uint transparentForPositioner : 1; + + // 26 bits padding + }; + + enum ExtraDataTag { + NoTag = 0x1, + LeftMouseButtonAccepted = 0x2 + }; + Q_DECLARE_FLAGS(ExtraDataTags, ExtraDataTag) + + QLazilyAllocated extra; + // If the mask is an Item, inform it that it's being used as a mask (true) or is no longer being used (false) + virtual void registerAsContainmentMask(QQuickItem * /* maskedItem */, bool /* set */) { } + + QQuickAnchors *anchors() const; + mutable QQuickAnchors *_anchors; + + inline Qt::MouseButtons acceptedMouseButtons() const; + + QVector changeListeners; + + void addItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types); + void updateOrAddItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types); + void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types); + void updateOrAddGeometryChangeListener(QQuickItemChangeListener *listener, QQuickGeometryChange types); + void updateOrRemoveGeometryChangeListener(QQuickItemChangeListener *listener, QQuickGeometryChange types); + + QQuickStateGroup *_states(); + QQuickStateGroup *_stateGroup; + + inline QQuickItem::TransformOrigin origin() const; + + // Bit 0 + quint32 flags:7; + quint32 widthValidFlag:1; + quint32 heightValidFlag:1; + quint32 componentComplete:1; + quint32 keepMouse:1; + quint32 keepTouch:1; + quint32 hoverEnabled:1; + quint32 smooth:1; + quint32 antialiasing:1; + quint32 focus:1; + // Bit 16 + quint32 activeFocus:1; + quint32 notifiedFocus:1; + quint32 notifiedActiveFocus:1; + quint32 filtersChildMouseEvents:1; + quint32 explicitVisible:1; + quint32 effectiveVisible:1; + quint32 explicitEnable:1; + quint32 effectiveEnable:1; + quint32 polishScheduled:1; + quint32 inheritedLayoutMirror:1; + quint32 effectiveLayoutMirror:1; + quint32 isMirrorImplicit:1; + quint32 inheritMirrorFromParent:1; + quint32 inheritMirrorFromItem:1; + quint32 isAccessible:1; + quint32 culled:1; + // Bit 32 + quint32 hasCursor:1; + quint32 subtreeCursorEnabled:1; + quint32 subtreeHoverEnabled:1; + quint32 activeFocusOnTab:1; + quint32 implicitAntialiasing:1; + quint32 antialiasingValid:1; + // isTabFence: When true, the item acts as a fence within the tab focus chain. + // This means that the item and its children will be skipped from the tab focus + // chain when navigating from its parent or any of its siblings. Similarly, + // when any of the item's descendants gets focus, the item constrains the tab + // focus chain and prevents tabbing outside. + quint32 isTabFence:1; + quint32 replayingPressEvent:1; + // Bit 40 + quint32 touchEnabled:1; + quint32 hasCursorHandler:1; + // set true when this item does not expect events via a subscene delivery agent; false otherwise + quint32 maybeHasSubsceneDeliveryAgent:1; + // set true if this item or any child wants QQuickItemPrivate::transformChanged() to visit all children + // (e.g. when parent has ItemIsViewport and child has ItemObservesViewport) + quint32 subtreeTransformChangedEnabled:1; + quint32 inDestructor:1; // has entered ~QQuickItem + quint32 focusReason:4; + quint32 focusPolicy:4; + // Bit 53 + + enum DirtyType { + TransformOrigin = 0x00000001, + Transform = 0x00000002, + BasicTransform = 0x00000004, + Position = 0x00000008, + Size = 0x00000010, + + ZValue = 0x00000020, + Content = 0x00000040, + Smooth = 0x00000080, + OpacityValue = 0x00000100, + ChildrenChanged = 0x00000200, + ChildrenStackingChanged = 0x00000400, + ParentChanged = 0x00000800, + + Clip = 0x00001000, + Window = 0x00002000, + + EffectReference = 0x00008000, + Visible = 0x00010000, + HideReference = 0x00020000, + Antialiasing = 0x00040000, + // When you add an attribute here, don't forget to update + // dirtyToString() + + TransformUpdateMask = TransformOrigin | Transform | BasicTransform | Position | + Window, + ComplexTransformUpdateMask = Transform | Window, + ContentUpdateMask = Size | Content | Smooth | Window | Antialiasing, + ChildrenUpdateMask = ChildrenChanged | ChildrenStackingChanged | EffectReference | Window + }; + + quint32 dirtyAttributes; + QString dirtyToString() const; + void dirty(DirtyType); + void addToDirtyList(); + void removeFromDirtyList(); + QQuickItem *nextDirtyItem; + QQuickItem**prevDirtyItem; + + void setCulled(bool); + + QQuickWindow *window; + int windowRefCount; + inline QSGContext *sceneGraphContext() const; + inline QSGRenderContext *sceneGraphRenderContext() const; + + QQuickItem *parentItem; + + QList childItems; + mutable QList *sortedChildItems; + QList paintOrderChildItems() const; + void addChild(QQuickItem *); + void removeChild(QQuickItem *); + void siblingOrderChanged(); + + inline void markSortedChildrenDirty(QQuickItem *child); + + void refWindow(QQuickWindow *); + void derefWindow(); + + QPointer subFocusItem; + void updateSubFocusItem(QQuickItem *scope, bool focus); + + bool setFocusIfNeeded(QEvent::Type); + Qt::FocusReason lastFocusChangeReason() const; + virtual bool setLastFocusChangeReason(Qt::FocusReason reason); + + QTransform windowToItemTransform() const; + QTransform itemToWindowTransform() const; + void itemToParentTransform(QTransform *) const; + + static bool focusNextPrev(QQuickItem *item, bool forward); + static QQuickItem *nextTabChildItem(const QQuickItem *item, int start); + static QQuickItem *prevTabChildItem(const QQuickItem *item, int start); + static QQuickItem *nextPrevItemInTabFocusChain(QQuickItem *item, bool forward, bool wrap = true); + + static bool canAcceptTabFocus(QQuickItem *item); + + void setX(qreal x) {q_func()->setX(x);} + void xChanged() {q_func()->xChanged();} + Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, x, &QQuickItemPrivate::setX, &QQuickItemPrivate::xChanged); + void setY(qreal y) {q_func()->setY(y);} + void yChanged() {q_func()->yChanged();} + Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, y, &QQuickItemPrivate::setY, &QQuickItemPrivate::yChanged); + void setWidth(qreal width) {q_func()->setWidth(width);} + void widthChanged() {q_func()->widthChanged();} + Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, width, &QQuickItemPrivate::setWidth, &QQuickItemPrivate::widthChanged); + void setHeight(qreal height) {q_func()->setHeight(height);} + void heightChanged() {q_func()->heightChanged();} + Q_OBJECT_COMPAT_PROPERTY(QQuickItemPrivate, qreal, height, &QQuickItemPrivate::setHeight, &QQuickItemPrivate::heightChanged); + qreal implicitWidth; + qreal implicitHeight; + + bool widthValid() const { return widthValidFlag || (width.hasBinding() && !QQmlPropertyBinding::isUndefined(width.binding()) ); } + bool heightValid() const { return heightValidFlag || (height.hasBinding() && !QQmlPropertyBinding::isUndefined(height.binding()) ); } + + qreal baselineOffset; + + QList transforms; + + inline qreal z() const { return extra.isAllocated()?extra->z:0; } + inline qreal scale() const { return extra.isAllocated()?extra->scale:1; } + inline qreal rotation() const { return extra.isAllocated()?extra->rotation:0; } + inline qreal opacity() const { return extra.isAllocated()?extra->opacity:1; } + + void setAccessible(); + + virtual qreal getImplicitWidth() const; + virtual qreal getImplicitHeight() const; + virtual void implicitWidthChanged(); + virtual void implicitHeightChanged(); + +#if QT_CONFIG(accessibility) + QAccessible::Role effectiveAccessibleRole() const; +private: + virtual QAccessible::Role accessibleRole() const; +public: +#endif + + void setImplicitAntialiasing(bool antialiasing); + + void resolveLayoutMirror(); + void setImplicitLayoutMirror(bool mirror, bool inherit); + void setLayoutMirror(bool mirror); + bool isMirrored() const { + return effectiveLayoutMirror; + } + + void emitChildrenRectChanged(const QRectF &rect) { + Q_Q(QQuickItem); + Q_EMIT q->childrenRectChanged(rect); + } + + QPointF computeTransformOrigin() const; + virtual bool transformChanged(QQuickItem *transformedItem); + + QPointF adjustedPosForTransform(const QPointF ¢roid, + const QPointF &startPos, const QVector2D &activeTranslatation, + qreal startScale, qreal activeScale, + qreal startRotation, qreal activeRotation); + + QQuickDeliveryAgent *deliveryAgent(); + QQuickDeliveryAgentPrivate *deliveryAgentPrivate(); + QQuickDeliveryAgent *ensureSubsceneDeliveryAgent(); + + void deliverKeyEvent(QKeyEvent *); + bool filterKeyEvent(QKeyEvent *, bool post); +#if QT_CONFIG(im) + void deliverInputMethodEvent(QInputMethodEvent *); +#endif + void deliverShortcutOverrideEvent(QKeyEvent *); + + void deliverPointerEvent(QEvent *); + + bool anyPointerHandlerWants(const QPointerEvent *event, const QEventPoint &point) const; + virtual bool handlePointerEvent(QPointerEvent *, bool avoidGrabbers = false); + + virtual void setVisible(bool visible); + + bool isTransparentForPositioner() const; + void setTransparentForPositioner(bool trans); + + bool calcEffectiveVisible() const; + bool setEffectiveVisibleRecur(bool); + bool calcEffectiveEnable() const; + void setEffectiveEnableRecur(QQuickItem *scope, bool); + + + inline QSGTransformNode *itemNode(); + inline QSGNode *childContainerNode(); + + /* + QSGNode order is: + - itemNode + - (opacityNode) + - (clipNode) + - (rootNode) (shader effect source's root node) + */ + + QSGOpacityNode *opacityNode() const { return extra.isAllocated()?extra->opacityNode:nullptr; } + QQuickDefaultClipNode *clipNode() const { return extra.isAllocated()?extra->clipNode:nullptr; } + QSGRootNode *rootNode() const { return extra.isAllocated()?extra->rootNode:nullptr; } + + QSGTransformNode *itemNodeInstance; + QSGNode *paintNode; + + virtual QSGTransformNode *createTransformNode(); + + // A reference from an effect item means that this item is used by the effect, so + // it should insert a root node. + void refFromEffectItem(bool hide); + void recursiveRefFromEffectItem(int refs); + void derefFromEffectItem(bool unhide); + + void itemChange(QQuickItem::ItemChange, const QQuickItem::ItemChangeData &); + + void enableSubtreeChangeNotificationsForParentHierachy(); + + virtual void mirrorChange() {} + + void setHasCursorInChild(bool hasCursor); + void setHasHoverInChild(bool hasHover); +#if QT_CONFIG(cursor) + QCursor effectiveCursor(const QQuickPointerHandler *handler) const; + QQuickPointerHandler *effectiveCursorHandler() const; +#endif + + virtual void updatePolish() { } + virtual void dumpItemTree(int indent) const; + + QLayoutPolicy sizePolicy() const; + void setSizePolicy(const QLayoutPolicy::Policy &horizontalPolicy, const QLayoutPolicy::Policy &verticalPolicy); + QLayoutPolicy szPolicy; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickItemPrivate::ExtraDataTags) + +/* + Key filters can be installed on a QQuickItem, but not removed. Currently they + are only used by attached objects (which are only destroyed on Item + destruction), so this isn't a problem. If in future this becomes any form + of public API, they will have to support removal too. +*/ +class QQuickItemKeyFilter +{ +public: + QQuickItemKeyFilter(QQuickItem * = nullptr); + virtual ~QQuickItemKeyFilter(); + + virtual void keyPressed(QKeyEvent *event, bool post); + virtual void keyReleased(QKeyEvent *event, bool post); +#if QT_CONFIG(im) + virtual void inputMethodEvent(QInputMethodEvent *event, bool post); + virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const; +#endif + virtual void shortcutOverrideEvent(QKeyEvent *event); + virtual void componentComplete(); + + bool m_processPost; + +private: + QQuickItemKeyFilter *m_next; +}; + +class QQuickKeyNavigationAttachedPrivate : public QObjectPrivate +{ +public: + QQuickKeyNavigationAttachedPrivate() + : leftSet(false), rightSet(false), upSet(false), downSet(false), + tabSet(false), backtabSet(false) {} + + QPointer left; + QPointer right; + QPointer up; + QPointer down; + QPointer tab; + QPointer backtab; + bool leftSet : 1; + bool rightSet : 1; + bool upSet : 1; + bool downSet : 1; + bool tabSet : 1; + bool backtabSet : 1; +}; + +class Q_QUICK_EXPORT QQuickKeyNavigationAttached : public QObject, public QQuickItemKeyFilter +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickKeyNavigationAttached) + + Q_PROPERTY(QQuickItem *left READ left WRITE setLeft NOTIFY leftChanged FINAL) + Q_PROPERTY(QQuickItem *right READ right WRITE setRight NOTIFY rightChanged FINAL) + Q_PROPERTY(QQuickItem *up READ up WRITE setUp NOTIFY upChanged FINAL) + Q_PROPERTY(QQuickItem *down READ down WRITE setDown NOTIFY downChanged FINAL) + Q_PROPERTY(QQuickItem *tab READ tab WRITE setTab NOTIFY tabChanged FINAL) + Q_PROPERTY(QQuickItem *backtab READ backtab WRITE setBacktab NOTIFY backtabChanged FINAL) + Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged FINAL) + + QML_NAMED_ELEMENT(KeyNavigation) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("KeyNavigation is only available via attached properties.") + QML_ATTACHED(QQuickKeyNavigationAttached) + +public: + QQuickKeyNavigationAttached(QObject * = nullptr); + + QQuickItem *left() const; + void setLeft(QQuickItem *); + QQuickItem *right() const; + void setRight(QQuickItem *); + QQuickItem *up() const; + void setUp(QQuickItem *); + QQuickItem *down() const; + void setDown(QQuickItem *); + QQuickItem *tab() const; + void setTab(QQuickItem *); + QQuickItem *backtab() const; + void setBacktab(QQuickItem *); + + enum Priority { BeforeItem, AfterItem }; + Q_ENUM(Priority) + Priority priority() const; + void setPriority(Priority); + + static QQuickKeyNavigationAttached *qmlAttachedProperties(QObject *); + +Q_SIGNALS: + void leftChanged(); + void rightChanged(); + void upChanged(); + void downChanged(); + void tabChanged(); + void backtabChanged(); + void priorityChanged(); + +private: + void keyPressed(QKeyEvent *event, bool post) override; + void keyReleased(QKeyEvent *event, bool post) override; + void setFocusNavigation(QQuickItem *currentItem, const char *dir, + Qt::FocusReason reason = Qt::OtherFocusReason); +}; + +class QQuickLayoutMirroringAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled RESET resetEnabled NOTIFY enabledChanged FINAL) + Q_PROPERTY(bool childrenInherit READ childrenInherit WRITE setChildrenInherit NOTIFY childrenInheritChanged FINAL) + + QML_NAMED_ELEMENT(LayoutMirroring) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("LayoutMirroring is only available via attached properties.") + QML_ATTACHED(QQuickLayoutMirroringAttached) + +public: + explicit QQuickLayoutMirroringAttached(QObject *parent = nullptr); + + bool enabled() const; + void setEnabled(bool); + void resetEnabled(); + + bool childrenInherit() const; + void setChildrenInherit(bool); + + static QQuickLayoutMirroringAttached *qmlAttachedProperties(QObject *); +Q_SIGNALS: + void enabledChanged(); + void childrenInheritChanged(); +private: + friend class QQuickItemPrivate; + QQuickItemPrivate *itemPrivate; +}; + +class QQuickEnterKeyAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(Qt::EnterKeyType type READ type WRITE setType NOTIFY typeChanged FINAL) + + QML_NAMED_ELEMENT(EnterKey) + QML_UNCREATABLE("EnterKey is only available via attached properties") + QML_ADDED_IN_VERSION(2, 6) + QML_ATTACHED(QQuickEnterKeyAttached) + +public: + explicit QQuickEnterKeyAttached(QObject *parent = nullptr); + + Qt::EnterKeyType type() const; + void setType(Qt::EnterKeyType type); + + static QQuickEnterKeyAttached *qmlAttachedProperties(QObject *); +Q_SIGNALS: + void typeChanged(); +private: + friend class QQuickItemPrivate; + QQuickItemPrivate *itemPrivate; + + Qt::EnterKeyType keyType; +}; + +class QQuickKeysAttachedPrivate : public QObjectPrivate +{ +public: + QQuickKeysAttachedPrivate() + : inPress(false), inRelease(false), inIM(false), enabled(true) + {} + + //loop detection + bool inPress:1; + bool inRelease:1; + bool inIM:1; + + bool enabled : 1; + + QQuickItem *imeItem = nullptr; + QList targets; + QQuickItem *item = nullptr; + QQuickKeyEvent theKeyEvent; +}; + +class Q_QUICK_EXPORT QQuickKeysAttached : public QObject, public QQuickItemKeyFilter +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickKeysAttached) + + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged FINAL) + Q_PROPERTY(QQmlListProperty forwardTo READ forwardTo FINAL) + Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged FINAL) + + QML_NAMED_ELEMENT(Keys) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Keys is only available via attached properties") + QML_ATTACHED(QQuickKeysAttached) + +public: + QQuickKeysAttached(QObject *parent=nullptr); + ~QQuickKeysAttached() override; + + bool enabled() const { Q_D(const QQuickKeysAttached); return d->enabled; } + void setEnabled(bool enabled) { + Q_D(QQuickKeysAttached); + if (enabled != d->enabled) { + d->enabled = enabled; + Q_EMIT enabledChanged(); + } + } + + enum Priority { BeforeItem, AfterItem}; + Q_ENUM(Priority) + Priority priority() const; + void setPriority(Priority); + + QQmlListProperty forwardTo() { + Q_D(QQuickKeysAttached); + return QQmlListProperty(this, &(d->targets)); + } + + void componentComplete() override; + + static QQuickKeysAttached *qmlAttachedProperties(QObject *); + +Q_SIGNALS: + void enabledChanged(); + void priorityChanged(); + void pressed(QQuickKeyEvent *event); + void released(QQuickKeyEvent *event); + void shortcutOverride(QQuickKeyEvent *event); + void digit0Pressed(QQuickKeyEvent *event); + void digit1Pressed(QQuickKeyEvent *event); + void digit2Pressed(QQuickKeyEvent *event); + void digit3Pressed(QQuickKeyEvent *event); + void digit4Pressed(QQuickKeyEvent *event); + void digit5Pressed(QQuickKeyEvent *event); + void digit6Pressed(QQuickKeyEvent *event); + void digit7Pressed(QQuickKeyEvent *event); + void digit8Pressed(QQuickKeyEvent *event); + void digit9Pressed(QQuickKeyEvent *event); + + void leftPressed(QQuickKeyEvent *event); + void rightPressed(QQuickKeyEvent *event); + void upPressed(QQuickKeyEvent *event); + void downPressed(QQuickKeyEvent *event); + void tabPressed(QQuickKeyEvent *event); + void backtabPressed(QQuickKeyEvent *event); + + void asteriskPressed(QQuickKeyEvent *event); + void numberSignPressed(QQuickKeyEvent *event); + void escapePressed(QQuickKeyEvent *event); + void returnPressed(QQuickKeyEvent *event); + void enterPressed(QQuickKeyEvent *event); + void deletePressed(QQuickKeyEvent *event); + void spacePressed(QQuickKeyEvent *event); + void backPressed(QQuickKeyEvent *event); + void cancelPressed(QQuickKeyEvent *event); + void selectPressed(QQuickKeyEvent *event); + void yesPressed(QQuickKeyEvent *event); + void noPressed(QQuickKeyEvent *event); + void context1Pressed(QQuickKeyEvent *event); + void context2Pressed(QQuickKeyEvent *event); + void context3Pressed(QQuickKeyEvent *event); + void context4Pressed(QQuickKeyEvent *event); + void callPressed(QQuickKeyEvent *event); + void hangupPressed(QQuickKeyEvent *event); + void flipPressed(QQuickKeyEvent *event); + void menuPressed(QQuickKeyEvent *event); + void volumeUpPressed(QQuickKeyEvent *event); + void volumeDownPressed(QQuickKeyEvent *event); + +private: + void keyPressed(QKeyEvent *event, bool post) override; + void keyReleased(QKeyEvent *event, bool post) override; +#if QT_CONFIG(im) + void inputMethodEvent(QInputMethodEvent *, bool post) override; + QVariant inputMethodQuery(Qt::InputMethodQuery query) const override; +#endif + void shortcutOverrideEvent(QKeyEvent *event) override; + static QByteArray keyToSignal(int key); + + bool isConnected(const char *signalName) const; +}; + +Qt::MouseButtons QQuickItemPrivate::acceptedMouseButtons() const +{ + return ((extra.tag().testFlag(LeftMouseButtonAccepted) ? Qt::LeftButton : Qt::MouseButton(0)) | + (extra.isAllocated() ? extra->acceptedMouseButtons : Qt::MouseButtons{})); +} + +QSGContext *QQuickItemPrivate::sceneGraphContext() const +{ + Q_ASSERT(window); + return static_cast(QObjectPrivate::get(window))->context->sceneGraphContext(); +} + +QSGRenderContext *QQuickItemPrivate::sceneGraphRenderContext() const +{ + Q_ASSERT(window); + return static_cast(QObjectPrivate::get(window))->context; +} + +void QQuickItemPrivate::markSortedChildrenDirty(QQuickItem *child) +{ + // If sortedChildItems == &childItems then all in childItems have z == 0 + // and we don't need to invalidate if the changed item also has z == 0. + if (child->z() != 0. || sortedChildItems != &childItems) { + if (sortedChildItems != &childItems) + delete sortedChildItems; + sortedChildItems = nullptr; + } +} + +QQuickItem::TransformOrigin QQuickItemPrivate::origin() const +{ + return extra.isAllocated() ? QQuickItem::TransformOrigin(extra->origin) + : QQuickItem::Center; +} + +QSGTransformNode *QQuickItemPrivate::itemNode() +{ + if (!itemNodeInstance) { + itemNodeInstance = createTransformNode(); + itemNodeInstance->setFlag(QSGNode::OwnedByParent, false); +#ifdef QSG_RUNTIME_DESCRIPTION + Q_Q(QQuickItem); + qsgnode_set_description(itemNodeInstance, QString::fromLatin1("QQuickItem(%1:%2)").arg(QString::fromLatin1(q->metaObject()->className())).arg(q->objectName())); +#endif + } + return itemNodeInstance; +} + +QSGNode *QQuickItemPrivate::childContainerNode() +{ + if (rootNode()) + return rootNode(); + else if (clipNode()) + return clipNode(); + else if (opacityNode()) + return opacityNode(); + else + return itemNode(); +} + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickItemPrivate::ChangeTypes) +Q_DECLARE_TYPEINFO(QQuickItemPrivate::ChangeListener, Q_PRIMITIVE_TYPE); + +QT_END_NAMESPACE + +#endif // QQUICKITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ccd5a50f4982cb1bb9e3763fe8fc1434fd37aaed --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p.h @@ -0,0 +1,177 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMANIMATION_H +#define QQUICKITEMANIMATION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickParentAnimationPrivate; +class Q_QUICK_EXPORT QQuickParentAnimation : public QQuickAnimationGroup +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickParentAnimation) + + Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged) + Q_PROPERTY(QQuickItem *newParent READ newParent WRITE setNewParent NOTIFY newParentChanged) + Q_PROPERTY(QQuickItem *via READ via WRITE setVia NOTIFY viaChanged) + QML_NAMED_ELEMENT(ParentAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickParentAnimation(QObject *parent=nullptr); + + QQuickItem *target() const; + void setTargetObject(QQuickItem *); + + QQuickItem *newParent() const; + void setNewParent(QQuickItem *); + + QQuickItem *via() const; + void setVia(QQuickItem *); + +Q_SIGNALS: + void targetChanged(); + void newParentChanged(); + void viaChanged(); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +class QQuickAnchorAnimationPrivate; +class Q_QUICK_EXPORT QQuickAnchorAnimation : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnchorAnimation) + Q_PROPERTY(QQmlListProperty targets READ targets) + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) + QML_NAMED_ELEMENT(AnchorAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickAnchorAnimation(QObject *parent=nullptr); + + QQmlListProperty targets(); + + int duration() const; + void setDuration(int); + + QEasingCurve easing() const; + void setEasing(const QEasingCurve &); + +Q_SIGNALS: + void durationChanged(int); + void easingChanged(const QEasingCurve&); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +}; + +#if QT_CONFIG(quick_path) + +class QQuickItem; +class QQuickPath; +class QQuickPathAnimationPrivate; +class Q_QUICK_EXPORT QQuickPathAnimation : public QQuickAbstractAnimation +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(QQuickPathAnimation) + Q_DECLARE_PRIVATE(QQuickPathAnimation) + + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(QEasingCurve easing READ easing WRITE setEasing NOTIFY easingChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(QQuickItem *target READ target WRITE setTargetObject NOTIFY targetChanged) + Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) + Q_PROPERTY(QPointF anchorPoint READ anchorPoint WRITE setAnchorPoint NOTIFY anchorPointChanged) + Q_PROPERTY(int orientationEntryDuration READ orientationEntryDuration WRITE setOrientationEntryDuration NOTIFY orientationEntryDurationChanged) + Q_PROPERTY(int orientationExitDuration READ orientationExitDuration WRITE setOrientationExitDuration NOTIFY orientationExitDurationChanged) + Q_PROPERTY(qreal endRotation READ endRotation WRITE setEndRotation NOTIFY endRotationChanged) + QML_NAMED_ELEMENT(PathAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPathAnimation(QObject *parent=nullptr); + virtual ~QQuickPathAnimation(); + + enum Orientation { + Fixed, + RightFirst, + LeftFirst, + BottomFirst, + TopFirst + }; + Q_ENUM(Orientation) + + int duration() const; + void setDuration(int); + + QEasingCurve easing() const; + void setEasing(const QEasingCurve &); + + QQuickPath *path() const; + void setPath(QQuickPath *); + + QQuickItem *target() const; + void setTargetObject(QQuickItem *); + + Orientation orientation() const; + void setOrientation(Orientation orientation); + + QPointF anchorPoint() const; + void setAnchorPoint(const QPointF &point); + + int orientationEntryDuration() const; + void setOrientationEntryDuration(int); + + int orientationExitDuration() const; + void setOrientationExitDuration(int); + + qreal endRotation() const; + void setEndRotation(qreal); + +protected: + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +Q_SIGNALS: + void durationChanged(int); + void easingChanged(const QEasingCurve &); + void pathChanged(); + void targetChanged(); + void orientationChanged(Orientation); + void anchorPointChanged(const QPointF &); + void orientationEntryDurationChanged(qreal); + void orientationExitDurationChanged(qreal); + void endRotationChanged(qreal); +}; + +#endif + +QT_END_NAMESPACE + +#endif // QQUICKITEMANIMATION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3bca43f427ac3358fd001b38803fdf8e02cc92b7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemanimation_p_p.h @@ -0,0 +1,128 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATION_P_H +#define QQUICKANIMATION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitemanimation_p.h" + +#if QT_CONFIG(quick_path) +#include +#endif +#include + +QT_BEGIN_NAMESPACE + +class QQuickParentAnimationPrivate : public QQuickAnimationGroupPrivate +{ + Q_DECLARE_PUBLIC(QQuickParentAnimation) +public: + QQuickParentAnimationPrivate() + : QQuickAnimationGroupPrivate(), target(nullptr), newParent(nullptr), via(nullptr) {} + + QQuickItem *target; + QQuickItem *newParent; + QQuickItem *via; + + QPointF computeTransformOrigin(QQuickItem::TransformOrigin origin, qreal width, qreal height) const; +}; + +class QQuickAnchorAnimationPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickAnchorAnimation) +public: + QQuickAnchorAnimationPrivate() : interpolator(QVariantAnimationPrivate::getInterpolator(QMetaType::QReal)), duration(250) {} + + QVariantAnimation::Interpolator interpolator; + int duration; + QEasingCurve easing; + QList targets; +}; + +#if QT_CONFIG(quick_path) + +class QQuickPathAnimationUpdater : public QQuickBulkValueUpdater +{ +public: + QQuickPathAnimationUpdater() : path(nullptr), pathLength(0), target(nullptr), reverse(false), + fromIsSourced(false), fromIsDefined(false), toIsDefined(false), + toX(0), toY(0), currentV(0), orientation(QQuickPathAnimation::Fixed), + entryInterval(0), exitInterval(0) {} + ~QQuickPathAnimationUpdater() {} + + void setValue(qreal v) override; + + QQuickPath *path; + + QPainterPath painterPath; + QQuickCachedBezier prevBez; + qreal pathLength; + QList attributePoints; + + QQuickItem *target; + bool reverse; + bool fromIsSourced; + bool fromIsDefined; + bool toIsDefined; + qreal toX; + qreal toY; + qreal currentV; + QQmlNullableValue interruptStart; + //TODO: bundle below into common struct + QQuickPathAnimation::Orientation orientation; + QPointF anchorPoint; + qreal entryInterval; + qreal exitInterval; + QQmlNullableValue endRotation; + QQmlNullableValue startRotation; +}; + +class QQuickPathAnimationPrivate; +class QQuickPathAnimationAnimator : public QQuickBulkValueAnimator +{ +public: + QQuickPathAnimationAnimator(QQuickPathAnimationPrivate * = nullptr); + ~QQuickPathAnimationAnimator(); + + void clearTemplate() { animationTemplate = nullptr; } + + QQuickPathAnimationUpdater *pathUpdater() const { return static_cast(getAnimValue()); } +private: + QQuickPathAnimationPrivate *animationTemplate; +}; + +class QQuickPathAnimationPrivate : public QQuickAbstractAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickPathAnimation) +public: + QQuickPathAnimationPrivate() : path(nullptr), target(nullptr), + orientation(QQuickPathAnimation::Fixed), entryDuration(0), exitDuration(0), duration(250) {} + + QQuickPath *path; + QQuickItem *target; + QQuickPathAnimation::Orientation orientation; + QPointF anchorPoint; + qreal entryDuration; + qreal exitDuration; + QQmlNullableValue endRotation; + int duration; + QEasingCurve easingCurve; + QHash activeAnimations; +}; + +#endif + +QT_END_NAMESPACE + +#endif // QQUICKANIMATION_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemchangelistener_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemchangelistener_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c3bd797e483de8025991f3c5e950136e03b7e77b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemchangelistener_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMCHANGELISTENER_P_H +#define QQUICKITEMCHANGELISTENER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QRectF; +class QQuickItem; +class QQuickAnchorsPrivate; + +class QQuickGeometryChange +{ +public: + enum Kind: int { + Nothing = 0x00, + X = 0x01, + Y = 0x02, + Width = 0x04, + Height = 0x08, + + Size = Width | Height, + All = X | Y | Size + }; + + QQuickGeometryChange(int change = Nothing) + : kind(change) + {} + + bool noChange() const { return kind == Nothing; } + bool anyChange() const { return !noChange(); } + + bool xChange() const { return kind & X; } + bool yChange() const { return kind & Y; } + bool widthChange() const { return kind & Width; } + bool heightChange() const { return kind & Height; } + + bool positionChange() const { return xChange() || yChange(); } + bool sizeChange() const { return widthChange() || heightChange(); } + + bool horizontalChange() const { return xChange() || widthChange(); } + bool verticalChange() const { return yChange() || heightChange(); } + + void setXChange(bool enabled) { set(X, enabled); } + void setYChange(bool enabled) { set(Y, enabled); } + void setWidthChange(bool enabled) { set(Width, enabled); } + void setHeightChange(bool enabled) { set(Height, enabled); } + void setSizeChange(bool enabled) { set(Size, enabled); } + void setAllChanged(bool enabled) { set(All, enabled); } + void setHorizontalChange(bool enabled) { set(X | Width, enabled); } + void setVerticalChange(bool enabled) { set(Y | Height, enabled); } + + void set(int bits, bool enabled) + { + if (enabled) { + kind |= bits; + } else { + kind &= ~bits; + } + } + + bool matches(QQuickGeometryChange other) const { return kind & other.kind; } + +private: + int kind; +}; + +#define QT_QUICK_NEW_GEOMETRY_CHANGED_HANDLING + +class Q_QUICK_EXPORT QQuickItemChangeListener +{ +public: + virtual ~QQuickItemChangeListener(); + + virtual void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF & /* oldGeometry */) {} + virtual void itemSiblingOrderChanged(QQuickItem *) {} + virtual void itemVisibilityChanged(QQuickItem *) {} + virtual void itemEnabledChanged(QQuickItem *) {} + virtual void itemOpacityChanged(QQuickItem *) {} + virtual void itemDestroyed(QQuickItem *) {} + virtual void itemChildAdded(QQuickItem *, QQuickItem * /* child */ ) {} + virtual void itemChildRemoved(QQuickItem *, QQuickItem * /* child */ ) {} + virtual void itemParentChanged(QQuickItem *, QQuickItem * /* parent */ ) {} + virtual void itemRotationChanged(QQuickItem *) {} + virtual void itemImplicitWidthChanged(QQuickItem *) {} + virtual void itemImplicitHeightChanged(QQuickItem *) {} + virtual void itemFocusChanged(QQuickItem *, Qt::FocusReason /* reason */) {} + + virtual QQuickAnchorsPrivate *anchorPrivate() { return nullptr; } +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMCHANGELISTENER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemsmodule_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemsmodule_p.h new file mode 100644 index 0000000000000000000000000000000000000000..df33a453abc690491dc49ffdd515e4fdeaf46cc9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemsmodule_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMSMODULE_P_H +#define QQUICKITEMSMODULE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItemsModule +{ +public: + static void defineModule(); +}; + +struct QInputDeviceForeign +{ + Q_GADGET + QML_FOREIGN(QInputDevice) + QML_NAMED_ELEMENT(InputDevice) + QML_ADDED_IN_VERSION(6, 0) + QML_UNCREATABLE("InputDevice is only available via read-only properties.") +}; + +struct QPointingDeviceForeign +{ + Q_GADGET + QML_FOREIGN(QPointingDevice) + QML_NAMED_ELEMENT(PointerDevice) + QML_ADDED_IN_VERSION(2, 12) + QML_UNCREATABLE("PointerDevice is only available via read-only properties.") +}; + +struct QPointingDeviceUniqueIdForeign +{ + Q_GADGET + QML_FOREIGN(QPointingDeviceUniqueId) + QML_VALUE_TYPE(pointingDeviceUniqueId) + QML_ADDED_IN_VERSION(2, 9) + QML_UNCREATABLE("pointingDeviceUniqueId cannot be created in QML.") +}; + +#if !QT_CONFIG(quick_animatedimage) +struct QQuickAnimatedImageNotAvailable +{ + Q_GADGET + QML_UNAVAILABLE + QML_NAMED_ELEMENT(AnimatedImage) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Qt was built without support for QMovie.") +}; +#endif + +QT_END_NAMESPACE + +#endif // QQUICKITEMSMODULE_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cc95ebd67c5d849e2f00804cfc32c1f735eacff5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p.h @@ -0,0 +1,389 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMVIEW_P_H +#define QQUICKITEMVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_itemview); + +#include "qquickflickable_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcItemViewDelegateLifecycle) + +class QQmlChangeSet; + +class QQuickItemViewPrivate; + +class Q_QUICK_EXPORT QQuickItemView : public QQuickFlickable +{ + Q_OBJECT + + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(int count READ count NOTIFY countChanged) + + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) + Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged) + + Q_PROPERTY(bool keyNavigationWraps READ isWrapEnabled WRITE setWrapEnabled NOTIFY keyNavigationWrapsChanged) + Q_PROPERTY(bool keyNavigationEnabled READ isKeyNavigationEnabled WRITE setKeyNavigationEnabled NOTIFY keyNavigationEnabledChanged REVISION(2, 7)) + Q_PROPERTY(int cacheBuffer READ cacheBuffer WRITE setCacheBuffer NOTIFY cacheBufferChanged) + Q_PROPERTY(int displayMarginBeginning READ displayMarginBeginning WRITE setDisplayMarginBeginning NOTIFY displayMarginBeginningChanged REVISION(2, 3)) + Q_PROPERTY(int displayMarginEnd READ displayMarginEnd WRITE setDisplayMarginEnd NOTIFY displayMarginEndChanged REVISION(2, 3)) + + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged) + Q_PROPERTY(Qt::LayoutDirection effectiveLayoutDirection READ effectiveLayoutDirection NOTIFY effectiveLayoutDirectionChanged) + Q_PROPERTY(VerticalLayoutDirection verticalLayoutDirection READ verticalLayoutDirection WRITE setVerticalLayoutDirection NOTIFY verticalLayoutDirectionChanged) + + Q_PROPERTY(QQmlComponent *header READ header WRITE setHeader NOTIFY headerChanged) + Q_PROPERTY(QQuickItem *headerItem READ headerItem NOTIFY headerItemChanged) + Q_PROPERTY(QQmlComponent *footer READ footer WRITE setFooter NOTIFY footerChanged) + Q_PROPERTY(QQuickItem *footerItem READ footerItem NOTIFY footerItemChanged) + +#if QT_CONFIG(quick_viewtransitions) + Q_PROPERTY(QQuickTransition *populate READ populateTransition WRITE setPopulateTransition NOTIFY populateTransitionChanged) + Q_PROPERTY(QQuickTransition *add READ addTransition WRITE setAddTransition NOTIFY addTransitionChanged) + Q_PROPERTY(QQuickTransition *addDisplaced READ addDisplacedTransition WRITE setAddDisplacedTransition NOTIFY addDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *move READ moveTransition WRITE setMoveTransition NOTIFY moveTransitionChanged) + Q_PROPERTY(QQuickTransition *moveDisplaced READ moveDisplacedTransition WRITE setMoveDisplacedTransition NOTIFY moveDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *remove READ removeTransition WRITE setRemoveTransition NOTIFY removeTransitionChanged) + Q_PROPERTY(QQuickTransition *removeDisplaced READ removeDisplacedTransition WRITE setRemoveDisplacedTransition NOTIFY removeDisplacedTransitionChanged) + Q_PROPERTY(QQuickTransition *displaced READ displacedTransition WRITE setDisplacedTransition NOTIFY displacedTransitionChanged) +#endif + + Q_PROPERTY(QQmlComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QQuickItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) + Q_PROPERTY(bool highlightFollowsCurrentItem READ highlightFollowsCurrentItem WRITE setHighlightFollowsCurrentItem NOTIFY highlightFollowsCurrentItemChanged) + Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged) + Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged RESET resetPreferredHighlightBegin) + Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged RESET resetPreferredHighlightEnd) + Q_PROPERTY(int highlightMoveDuration READ highlightMoveDuration WRITE setHighlightMoveDuration NOTIFY highlightMoveDurationChanged) + + Q_PROPERTY(bool reuseItems READ reuseItems WRITE setReuseItems NOTIFY reuseItemsChanged REVISION(2, 15)) + + QML_NAMED_ELEMENT(ItemView) + QML_UNCREATABLE("ItemView is an abstract base class.") + QML_ADDED_IN_VERSION(2, 1) + +public: + // this holds all layout enum values so they can be referred to by other enums + // to ensure consistent values - e.g. QML references to GridView.TopToBottom flow + // and GridView.TopToBottom vertical layout direction should have same value + enum LayoutDirection { + LeftToRight = Qt::LeftToRight, + RightToLeft = Qt::RightToLeft, + VerticalTopToBottom, + VerticalBottomToTop + }; + Q_ENUM(LayoutDirection) + + enum VerticalLayoutDirection { + TopToBottom = VerticalTopToBottom, + BottomToTop = VerticalBottomToTop + }; + Q_ENUM(VerticalLayoutDirection) + + QQuickItemView(QQuickFlickablePrivate &dd, QQuickItem *parent = nullptr); + ~QQuickItemView(); + + QVariant model() const; + void setModel(const QVariant &); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); + + int count() const; + + int currentIndex() const; + void setCurrentIndex(int idx); + + QQuickItem *currentItem() const; + + bool isWrapEnabled() const; + void setWrapEnabled(bool); + + bool isKeyNavigationEnabled() const; + void setKeyNavigationEnabled(bool); + + int cacheBuffer() const; + void setCacheBuffer(int); + + int displayMarginBeginning() const; + void setDisplayMarginBeginning(int); + + int displayMarginEnd() const; + void setDisplayMarginEnd(int); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection(Qt::LayoutDirection); + Qt::LayoutDirection effectiveLayoutDirection() const; + + VerticalLayoutDirection verticalLayoutDirection() const; + void setVerticalLayoutDirection(VerticalLayoutDirection layoutDirection); + + QQmlComponent *footer() const; + void setFooter(QQmlComponent *); + QQuickItem *footerItem() const; + + QQmlComponent *header() const; + void setHeader(QQmlComponent *); + QQuickItem *headerItem() const; + +#if QT_CONFIG(quick_viewtransitions) + QQuickTransition *populateTransition() const; + void setPopulateTransition(QQuickTransition *transition); + + QQuickTransition *addTransition() const; + void setAddTransition(QQuickTransition *transition); + + QQuickTransition *addDisplacedTransition() const; + void setAddDisplacedTransition(QQuickTransition *transition); + + QQuickTransition *moveTransition() const; + void setMoveTransition(QQuickTransition *transition); + + QQuickTransition *moveDisplacedTransition() const; + void setMoveDisplacedTransition(QQuickTransition *transition); + + QQuickTransition *removeTransition() const; + void setRemoveTransition(QQuickTransition *transition); + + QQuickTransition *removeDisplacedTransition() const; + void setRemoveDisplacedTransition(QQuickTransition *transition); + + QQuickTransition *displacedTransition() const; + void setDisplacedTransition(QQuickTransition *transition); +#endif + + QQmlComponent *highlight() const; + void setHighlight(QQmlComponent *); + + QQuickItem *highlightItem() const; + + bool highlightFollowsCurrentItem() const; + virtual void setHighlightFollowsCurrentItem(bool); + + enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange }; + Q_ENUM(HighlightRangeMode) + HighlightRangeMode highlightRangeMode() const; + void setHighlightRangeMode(HighlightRangeMode mode); + + qreal preferredHighlightBegin() const; + void setPreferredHighlightBegin(qreal); + void resetPreferredHighlightBegin(); + + qreal preferredHighlightEnd() const; + void setPreferredHighlightEnd(qreal); + void resetPreferredHighlightEnd(); + + int highlightMoveDuration() const; + virtual void setHighlightMoveDuration(int); + + bool reuseItems() const; + void setReuseItems(bool reuse); + + enum PositionMode { Beginning, Center, End, Visible, Contain, SnapPosition }; + Q_ENUM(PositionMode) + + Q_INVOKABLE void positionViewAtIndex(int index, int mode); + Q_INVOKABLE int indexAt(qreal x, qreal y) const; + Q_INVOKABLE QQuickItem *itemAt(qreal x, qreal y) const; + Q_REVISION(2, 13) Q_INVOKABLE QQuickItem *itemAtIndex(int index) const; + Q_INVOKABLE void positionViewAtBeginning(); + Q_INVOKABLE void positionViewAtEnd(); + Q_REVISION(2, 1) Q_INVOKABLE void forceLayout(); + + void setContentX(qreal pos) override; + void setContentY(qreal pos) override; + qreal originX() const override; + qreal originY() const override; + +Q_SIGNALS: + void modelChanged(); + void delegateChanged(); + void countChanged(); + void currentIndexChanged(); + void currentItemChanged(); + + void keyNavigationWrapsChanged(); + Q_REVISION(2, 7) void keyNavigationEnabledChanged(); + void cacheBufferChanged(); + void displayMarginBeginningChanged(); + void displayMarginEndChanged(); + + void layoutDirectionChanged(); + void effectiveLayoutDirectionChanged(); + void verticalLayoutDirectionChanged(); + + void headerChanged(); + void footerChanged(); + void headerItemChanged(); + void footerItemChanged(); + +#if QT_CONFIG(quick_viewtransitions) + void populateTransitionChanged(); + void addTransitionChanged(); + void addDisplacedTransitionChanged(); + void moveTransitionChanged(); + void moveDisplacedTransitionChanged(); + void removeTransitionChanged(); + void removeDisplacedTransitionChanged(); + void displacedTransitionChanged(); +#endif + + void highlightChanged(); + void highlightItemChanged(); + void highlightFollowsCurrentItemChanged(); + void highlightRangeModeChanged(); + void preferredHighlightBeginChanged(); + void preferredHighlightEndChanged(); + void highlightMoveDurationChanged(); + + Q_REVISION(2, 15) void reuseItemsChanged(); + +protected: + void updatePolish() override; + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + qreal minYExtent() const override; + qreal maxYExtent() const override; + qreal minXExtent() const override; + qreal maxXExtent() const override; + +protected Q_SLOTS: + void destroyRemoved(); + void createdItem(int index, QObject *item); + virtual void initItem(int index, QObject *item); + void modelUpdated(const QQmlChangeSet &changeSet, bool reset); + void destroyingItem(QObject *item); + Q_REVISION(2, 15) void onItemPooled(int modelIndex, QObject *object); + Q_REVISION(2, 15) void onItemReused(int modelIndex, QObject *object); + void animStopped(); + void trackedPositionChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickItemView) +}; + + +class Q_QUICK_EXPORT QQuickItemViewAttached : public QObject +{ + Q_OBJECT + + Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged FINAL) + Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged FINAL) + + Q_PROPERTY(QString section READ section NOTIFY sectionChanged FINAL) + Q_PROPERTY(QString previousSection READ prevSection NOTIFY prevSectionChanged FINAL) + Q_PROPERTY(QString nextSection READ nextSection NOTIFY nextSectionChanged FINAL) + +public: + QQuickItemViewAttached(QObject *parent) + : QObject(parent), m_isCurrent(false), m_delayRemove(false) {} + ~QQuickItemViewAttached() {} + + bool isCurrentItem() const { return m_isCurrent; } + void setIsCurrentItem(bool c) { + if (m_isCurrent != c) { + m_isCurrent = c; + Q_EMIT currentItemChanged(); + } + } + + bool delayRemove() const { return m_delayRemove; } + void setDelayRemove(bool delay) { + if (m_delayRemove != delay) { + m_delayRemove = delay; + Q_EMIT delayRemoveChanged(); + } + } + + QString section() const { return m_section; } + void setSection(const QString §) { + if (m_section != sect) { + m_section = sect; + Q_EMIT sectionChanged(); + } + } + + QString prevSection() const { return m_prevSection; } + void setPrevSection(const QString §) { + if (m_prevSection != sect) { + m_prevSection = sect; + Q_EMIT prevSectionChanged(); + } + } + + QString nextSection() const { return m_nextSection; } + void setNextSection(const QString §) { + if (m_nextSection != sect) { + m_nextSection = sect; + Q_EMIT nextSectionChanged(); + } + } + + void setSections(const QString &prev, const QString §, const QString &next) { + bool prevChanged = prev != m_prevSection; + bool sectChanged = sect != m_section; + bool nextChanged = next != m_nextSection; + m_prevSection = prev; + m_section = sect; + m_nextSection = next; + if (prevChanged) + Q_EMIT prevSectionChanged(); + if (sectChanged) + Q_EMIT sectionChanged(); + if (nextChanged) + Q_EMIT nextSectionChanged(); + } + + void emitAdd() { Q_EMIT add(); } + void emitRemove() { Q_EMIT remove(); } + +Q_SIGNALS: + void viewChanged(); + void currentItemChanged(); + void delayRemoveChanged(); + + void add(); + void remove(); + + void sectionChanged(); + void prevSectionChanged(); + void nextSectionChanged(); + + void pooled(); + void reused(); + +public: + bool m_isCurrent : 1; + bool m_delayRemove : 1; + + // current only used by list view + mutable QString m_section; + QString m_prevSection; + QString m_nextSection; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKITEMVIEW_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c890d4689d79c203215e922ae6dcad8ea766332d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemview_p_p.h @@ -0,0 +1,372 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMVIEW_P_P_H +#define QQUICKITEMVIEW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_itemview); + +#include "qquickitemview_p.h" +#include "qquickitemviewfxitem_p_p.h" +#if QT_CONFIG(quick_viewtransitions) +#include "qquickitemviewtransition_p.h" +#endif +#include "qquickflickable_p_p.h" +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT FxViewItem : public QQuickItemViewFxItem +{ +public: + FxViewItem(QQuickItem *, QQuickItemView *, bool own, QQuickItemViewAttached *attached); + + QQuickItemView *view; + QQuickItemViewAttached *attached; +}; + + +class Q_AUTOTEST_EXPORT QQuickItemViewChangeSet +{ +public: + QQuickItemViewChangeSet(); + + bool hasPendingChanges() const; + void prepare(int currentIndex, int count); + void reset(); + + void applyChanges(const QQmlChangeSet &changeSet); + + void applyBufferedChanges(const QQuickItemViewChangeSet &other); + + int itemCount; + int newCurrentIndex; + QQmlChangeSet pendingChanges; + QMultiHash removedItems; + + bool active : 1; + bool currentChanged : 1; + bool currentRemoved : 1; +}; + + +class Q_QUICK_AUTOTEST_EXPORT QQuickItemViewPrivate + : public QQuickFlickablePrivate +#if QT_CONFIG(quick_viewtransitions) + , public QQuickItemViewTransitionChangeListener +#endif + , public QAnimationJobChangeListener +{ +public: + Q_DECLARE_PUBLIC(QQuickItemView) + QQuickItemViewPrivate(); + ~QQuickItemViewPrivate(); + + static inline QQuickItemViewPrivate *get(QQuickItemView *o) { return o->d_func(); } + + struct ChangeResult { + QQmlNullableValue visiblePos; + bool changedFirstItem; + qreal sizeChangesBeforeVisiblePos; + qreal sizeChangesAfterVisiblePos; + int countChangeBeforeVisible; + int countChangeAfterVisibleItems; + + ChangeResult() + : visiblePos(0), changedFirstItem(false), + sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0), + countChangeBeforeVisible(0), countChangeAfterVisibleItems(0) {} + + ChangeResult(const QQmlNullableValue &p) + : visiblePos(p), changedFirstItem(false), + sizeChangesBeforeVisiblePos(0), sizeChangesAfterVisiblePos(0), + countChangeBeforeVisible(0), countChangeAfterVisibleItems(0) {} + + ChangeResult &operator+=(const ChangeResult &other) { + if (&other == this) + return *this; + changedFirstItem &= other.changedFirstItem; + sizeChangesBeforeVisiblePos += other.sizeChangesBeforeVisiblePos; + sizeChangesAfterVisiblePos += other.sizeChangesAfterVisiblePos; + countChangeBeforeVisible += other.countChangeBeforeVisible; + countChangeAfterVisibleItems += other.countChangeAfterVisibleItems; + return *this; + } + + void reset() { + changedFirstItem = false; + sizeChangesBeforeVisiblePos = 0.0; + sizeChangesAfterVisiblePos = 0.0; + countChangeBeforeVisible = 0; + countChangeAfterVisibleItems = 0; + } + }; + + enum BufferMode { NoBuffer = 0x00, BufferBefore = 0x01, BufferAfter = 0x02 }; + + bool isValid() const; + qreal position() const; + qreal size() const; + qreal startPosition() const; + qreal endPosition() const; + qreal contentStartOffset() const; + int findLastVisibleIndex(int defaultValue = -1) const; + FxViewItem *visibleItem(int modelIndex) const; + FxViewItem *firstItemInView() const; + int findLastIndexInView() const; + int mapFromModel(int modelIndex) const; + + virtual void init(); + virtual void clear(bool onDestruction=false); + virtual void updateViewport(); + + void regenerate(bool orientationChanged=false); + void layout(); + void animationFinished(QAbstractAnimationJob *) override; + void refill(); + void refill(qreal from, qreal to); + void mirrorChange() override; + + FxViewItem *createItem(int modelIndex,QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested); + bool releaseCurrentItem(QQmlInstanceModel::ReusableFlag reusableFlag) + { + auto oldCurrentItem = std::exchange(currentItem, nullptr); + return releaseItem(oldCurrentItem, reusableFlag); + } + virtual bool releaseItem(FxViewItem *item, QQmlInstanceModel::ReusableFlag reusableFlag); + + QQuickItem *createHighlightItem(); + QQuickItem *createComponentItem(QQmlComponent *component, qreal zValue, bool createDefault = false) const; + virtual void initializeComponentItem(QQuickItem *) const; + + void updateCurrent(int modelIndex); + void updateTrackedItem(); + void updateUnrequestedIndexes(); + void updateUnrequestedPositions(); + void updateVisibleIndex(); + void positionViewAtIndex(int index, int mode); + + qreal minExtentForAxis(const AxisData &axisData, bool forXAxis) const; + qreal maxExtentForAxis(const AxisData &axisData, bool forXAxis) const; + qreal calculatedMinExtent() const; + qreal calculatedMaxExtent() const; + + void applyDelegateChange(); + + void applyPendingChanges(); + bool applyModelChanges(ChangeResult *insertionResult, ChangeResult *removalResult); + bool applyRemovalChange(const QQmlChangeSet::Change &removal, ChangeResult *changeResult, int *removedCount); + void removeItem(FxViewItem *item, const QQmlChangeSet::Change &removal, ChangeResult *removeResult); + virtual void updateSizeChangesBeforeVisiblePos(FxViewItem *item, ChangeResult *removeResult); + void repositionFirstItem(FxViewItem *prevVisibleItemsFirst, qreal prevVisibleItemsFirstPos, + FxViewItem *prevFirstVisible, ChangeResult *insertionResult, ChangeResult *removalResult); + +#if QT_CONFIG(quick_viewtransitions) + void createTransitioner(); + void prepareVisibleItemTransitions(); + void prepareRemoveTransitions(QMultiHash *removedItems); + bool prepareNonVisibleItemTransition(FxViewItem *item, const QRectF &viewBounds); + void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) override; +#endif + + int findMoveKeyIndex(QQmlChangeSet::MoveKey key, const QVector &changes) const; + + void checkVisible() const; + void showVisibleItems() const; + + void markExtentsDirty() { + if (layoutOrientation() == Qt::Vertical) + vData.markExtentsDirty(); + else + hData.markExtentsDirty(); + } + + bool hasPendingChanges() const { + return currentChanges.hasPendingChanges() + || bufferedChanges.hasPendingChanges() +#if QT_CONFIG(quick_viewtransitions) + ||runDelayedRemoveTransition +#endif + ; + } + + void refillOrLayout() { + if (hasPendingChanges()) + layout(); + else + refill(); + } + + void forceLayoutPolish() { + Q_Q(QQuickItemView); + forceLayout = true; + q->polish(); + } + + void releaseVisibleItems(QQmlInstanceModel::ReusableFlag reusableFlag) { + // make a copy and clear the visibleItems first to avoid destroyed + // items being accessed during the loop (QTBUG-61294) + const QList oldVisible = visibleItems; + visibleItems.clear(); + for (FxViewItem *item : oldVisible) + releaseItem(item, reusableFlag); + } + + void emitCountChanged(); + + virtual QQuickItemViewAttached *getAttachedObject(const QObject *) const { return nullptr; } + + QPointer model; + QVariant modelVariant; + int itemCount; + int buffer; + int bufferMode; + int displayMarginBeginning; + int displayMarginEnd; + Qt::LayoutDirection layoutDirection; + QQuickItemView::VerticalLayoutDirection verticalLayoutDirection; + + QList visibleItems; + qreal firstVisibleItemPosition = 0; + void storeFirstVisibleItemPosition() { + if (!visibleItems.isEmpty()) { + firstVisibleItemPosition = visibleItems.constFirst()->position(); + } + } + int visibleIndex; + int currentIndex; + FxViewItem *currentItem; + FxViewItem *trackedItem; + QHash unrequestedItems; + int requestedIndex; + QQuickItemViewChangeSet currentChanges; + QQuickItemViewChangeSet bufferedChanges; + QPauseAnimationJob bufferPause; + + QQmlComponent *highlightComponent; + std::unique_ptr highlight; + int highlightRange; // enum value + qreal highlightRangeStart; + qreal highlightRangeEnd; + int highlightMoveDuration; + + QQmlComponent *headerComponent; + FxViewItem *header; + QQmlComponent *footerComponent; + FxViewItem *footer; + + // Reusing delegate items cannot be on by default for backwards compatibility. + // Reusing an item will e.g mean that Component.onCompleted will only be called for an + // item when it's created and not when it's reused, which will break legacy applications. + QQmlInstanceModel::ReusableFlag reusableFlag = QQmlInstanceModel::NotReusable; + + struct MovedItem { + FxViewItem *item; + QQmlChangeSet::MoveKey moveKey; + MovedItem(FxViewItem *i, QQmlChangeSet::MoveKey k) + : item(i), moveKey(k) {} + }; +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitioner *transitioner; + QVector releasePendingTransition; +#endif + + mutable qreal minExtent; + mutable qreal maxExtent; + + bool ownModel : 1; + bool wrap : 1; + bool keyNavigationEnabled : 1; + bool explicitKeyNavigationEnabled : 1; + bool inLayout : 1; + bool inViewportMoved : 1; + bool forceLayout : 1; + bool currentIndexCleared : 1; + bool haveHighlightRange : 1; + bool autoHighlight : 1; + bool highlightRangeStartValid : 1; + bool highlightRangeEndValid : 1; + bool fillCacheBuffer : 1; + bool inRequest : 1; +#if QT_CONFIG(quick_viewtransitions) + bool runDelayedRemoveTransition : 1; +#endif + bool delegateValidated : 1; + bool isClearing : 1; + +protected: + virtual Qt::Orientation layoutOrientation() const = 0; + virtual bool isContentFlowReversed() const = 0; + + virtual qreal positionAt(int index) const = 0; + virtual qreal endPositionAt(int index) const = 0; + virtual qreal originPosition() const = 0; + virtual qreal lastPosition() const = 0; + + virtual qreal headerSize() const = 0; + virtual qreal footerSize() const = 0; + virtual bool showHeaderForIndex(int index) const = 0; + virtual bool showFooterForIndex(int index) const = 0; + virtual void updateHeader() = 0; + virtual void updateFooter() = 0; + virtual bool hasStickyHeader() const { return false; } + virtual bool hasStickyFooter() const { return false; } + + virtual void createHighlight(bool onDestruction = false) = 0; + virtual void updateHighlight() = 0; + virtual void resetHighlightPosition() = 0; + virtual bool movingFromHighlight() { return false; } + + virtual void setPosition(qreal pos) = 0; + virtual void fixupPosition() = 0; + + virtual bool addVisibleItems(qreal fillFrom, qreal fillTo, qreal bufferFrom, qreal bufferTo, bool doBuffer) = 0; + virtual bool removeNonVisibleItems(qreal bufferFrom, qreal bufferTo) = 0; + virtual void visibleItemsChanged() {} + + virtual FxViewItem *newViewItem(int index, QQuickItem *item) = 0; + virtual void repositionItemAt(FxViewItem *item, int index, qreal sizeBuffer) = 0; + virtual void repositionPackageItemAt(QQuickItem *item, int index) = 0; + virtual void resetFirstItemPosition(qreal pos = 0.0) = 0; + virtual void adjustFirstItem(qreal forwards, qreal backwards, int changeBeforeVisible) = 0; + + virtual void layoutVisibleItems(int fromModelIndex = 0) = 0; + virtual void changedVisibleIndex(int newIndex) = 0; + + virtual bool applyInsertionChange(const QQmlChangeSet::Change &insert, ChangeResult *changeResult, + QList *newItems, QList *movingIntoView) = 0; + + virtual bool needsRefillForAddedOrRemovedIndex(int) const { return false; } +#if QT_CONFIG(quick_viewtransitions) + virtual void translateAndTransitionItemsAfter(int afterIndex, const ChangeResult &insertionResult, const ChangeResult &removalResult) = 0; +#endif + + virtual void initializeViewItem(FxViewItem *) {} + virtual void initializeCurrentItem() {} + virtual void updateSectionCriteria() {} + virtual void updateSections() {} + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKITEMVIEW_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewfxitem_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewfxitem_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c31a4583cb7be51f516a7896590deb30132edd65 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewfxitem_p_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFXVIEWITEM_P_P_H +#define QQUICKFXVIEWITEM_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#if QT_CONFIG(quick_viewtransitions) +#include +#endif +#include + +#include + +QT_REQUIRE_CONFIG(quick_itemview); + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickItemViewFxItem +{ +public: + QQuickItemViewFxItem(QQuickItem *item, bool ownItem, QQuickItemChangeListener *changeListener); + virtual ~QQuickItemViewFxItem(); + + qreal itemX() const; + qreal itemY() const; + inline qreal itemWidth() const { return item ? item->width() : 0; } + inline qreal itemHeight() const { return item ? item->height() : 0; } + + void moveTo(const QPointF &pos, bool immediate); + void setVisible(bool visible); + void trackGeometry(bool track); + + QRectF geometry() const; + void setGeometry(const QRectF &geometry); + +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitioner::TransitionType scheduledTransitionType() const; + bool transitionScheduledOrRunning() const; + bool transitionRunning() const; + bool isPendingRemoval() const; + + void transitionNextReposition(QQuickItemViewTransitioner *transitioner, QQuickItemViewTransitioner::TransitionType type, bool asTarget); + bool prepareTransition(QQuickItemViewTransitioner *transitioner, const QRectF &viewBounds); + void startTransition(QQuickItemViewTransitioner *transitioner); +#endif + + // these are positions and sizes along the current direction of scrolling/flicking + virtual qreal position() const = 0; + virtual qreal endPosition() const = 0; + virtual qreal size() const = 0; + virtual qreal sectionSize() const = 0; + + virtual bool contains(qreal x, qreal y) const = 0; + + SelfDeletable m_selfDeletable; + QPointer item; + QQuickItemChangeListener *changeListener; +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitionableItem *transitionableItem; +#endif + int index = -1; + bool ownItem : 1; + bool releaseAfterTransition : 1; + bool trackGeom : 1; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFXVIEWITEM_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewtransition_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewtransition_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6c360be5e4e8dc877ef20caf9d91b722efb6ecbb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickitemviewtransition_p.h @@ -0,0 +1,201 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMVIEWTRANSITION_P_P_H +#define QQUICKITEMVIEWTRANSITION_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_viewtransitions); + +#include +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickTransition; +class QQuickItemViewTransitionableItem; +class QQuickItemViewTransitionJob; + + +class Q_QUICK_EXPORT QQuickItemViewTransitionChangeListener +{ +public: + QQuickItemViewTransitionChangeListener() {} + virtual ~QQuickItemViewTransitionChangeListener() {} + + virtual void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) = 0; +}; + + +class Q_QUICK_EXPORT QQuickItemViewTransitioner +{ +public: + enum TransitionType { + NoTransition, + PopulateTransition, + AddTransition, + MoveTransition, + RemoveTransition + }; + + QQuickItemViewTransitioner(); + virtual ~QQuickItemViewTransitioner(); + + bool canTransition(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const; + void transitionNextReposition(QQuickItemViewTransitionableItem *item, QQuickItemViewTransitioner::TransitionType type, bool isTarget); + + void addToTargetLists(QQuickItemViewTransitioner::TransitionType type, QQuickItemViewTransitionableItem *item, int index); + void resetTargetLists(); + + QQuickTransition *transitionObject(QQuickItemViewTransitioner::TransitionType type, bool asTarget) const; + const QList &targetIndexes(QQuickItemViewTransitioner::TransitionType type) const; + const QList &targetItems(QQuickItemViewTransitioner::TransitionType type) const; + + inline void setPopulateTransitionEnabled(bool b) { usePopulateTransition = b; } + inline bool populateTransitionEnabled() const { return usePopulateTransition; } + + inline void setChangeListener(QQuickItemViewTransitionChangeListener *obj) { changeListener = obj; } + + QSet runningJobs; + + QList addTransitionIndexes; + QList moveTransitionIndexes; + QList removeTransitionIndexes; + QList addTransitionTargets; + QList moveTransitionTargets; + QList removeTransitionTargets; + + QQmlGuard populateTransition; + QQmlGuard addTransition; + QQmlGuard addDisplacedTransition; + QQmlGuard moveTransition; + QQmlGuard moveDisplacedTransition; + QQmlGuard removeTransition; + QQmlGuard removeDisplacedTransition; + QQmlGuard displacedTransition; + +private: + friend class QQuickItemViewTransitionJob; + + QQuickItemViewTransitionChangeListener *changeListener; + bool usePopulateTransition; + + void finishedTransition(QQuickItemViewTransitionJob *job, QQuickItemViewTransitionableItem *item); +}; + + +/* + An item that can be transitioned using QQuickViewTransitionJob. + */ +class Q_QUICK_EXPORT QQuickItemViewTransitionableItem +{ +public: + QQuickItemViewTransitionableItem(QQuickItem *i); + virtual ~QQuickItemViewTransitionableItem(); + + qreal itemX() const; + qreal itemY() const; + + void moveTo(const QPointF &pos, bool immediate = false); + + bool transitionScheduledOrRunning() const; + bool transitionRunning() const; + bool isPendingRemoval() const; + + bool prepareTransition(QQuickItemViewTransitioner *transitioner, int index, const QRectF &viewBounds); + void startTransition(QQuickItemViewTransitioner *transitioner, int index); + void completeTransition(QQuickTransition *quickTransition); + + SelfDeletable m_selfDeletable; + QPointF nextTransitionTo; + QPointF lastMovedTo; + QPointF nextTransitionFrom; + QQuickItem *item; + QQuickItemViewTransitionJob *transition; + QQuickItemViewTransitioner::TransitionType nextTransitionType; + bool isTransitionTarget : 1; + bool nextTransitionToSet : 1; + bool nextTransitionFromSet : 1; + bool lastMovedToSet : 1; + bool prepared : 1; + +private: + friend class QQuickItemViewTransitioner; + friend class QQuickItemViewTransitionJob; + void setNextTransition(QQuickItemViewTransitioner::TransitionType, bool isTargetItem); + bool transitionWillChangePosition() const; + void finishedTransition(); + void resetNextTransitionPos(); + void clearCurrentScheduledTransition(); + void stopTransition(); +}; + + +class QQuickViewTransitionAttached : public QObject +{ + Q_OBJECT + + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(QQuickItem* item READ item NOTIFY itemChanged FINAL) + Q_PROPERTY(QPointF destination READ destination NOTIFY destinationChanged FINAL) + + Q_PROPERTY(QList targetIndexes READ targetIndexes NOTIFY targetIndexesChanged FINAL) + Q_PROPERTY(QQmlListProperty targetItems READ targetItems NOTIFY targetItemsChanged FINAL) + + QML_NAMED_ELEMENT(ViewTransition) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("ViewTransition is only available via attached properties.") + QML_ATTACHED(QQuickViewTransitionAttached) + +public: + QQuickViewTransitionAttached(QObject *parent); + + int index() const { return m_index; } + QQuickItem *item() const { return m_item; } + QPointF destination() const { return m_destination; } + + QList targetIndexes() const { return m_targetIndexes; } + QQmlListProperty targetItems(); + + static QQuickViewTransitionAttached *qmlAttachedProperties(QObject *); + +Q_SIGNALS: + void indexChanged(); + void itemChanged(); + void destinationChanged(); + + void targetIndexesChanged(); + void targetItemsChanged(); + +private: + friend class QQuickItemViewTransitionJob; + QPointF m_destination; + QList m_targetIndexes; + QList m_targetItems; + + QPointer m_item; + int m_index; +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMVIEWTRANSITION_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicklistview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicklistview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9c0f68a3337e890a724e647b30ab1b36f2e3f89d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicklistview_p.h @@ -0,0 +1,199 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLISTVIEW_P_H +#define QQUICKLISTVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_listview); + +#include "qquickitemview_p.h" + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickListView; +class QQuickListViewPrivate; +class Q_QUICK_EXPORT QQuickViewSection : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString property READ property WRITE setProperty NOTIFY propertyChanged) + Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY criteriaChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(int labelPositioning READ labelPositioning WRITE setLabelPositioning NOTIFY labelPositioningChanged) + QML_NAMED_ELEMENT(ViewSection) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickViewSection(QQuickListView *parent=nullptr); + + QString property() const { return m_property; } + void setProperty(const QString &); + + enum SectionCriteria { FullString, FirstCharacter }; + Q_ENUM(SectionCriteria) + SectionCriteria criteria() const { return m_criteria; } + void setCriteria(SectionCriteria); + + QQmlComponent *delegate() const { return m_delegate; } + void setDelegate(QQmlComponent *delegate); + + QString sectionString(const QString &value); + + enum LabelPositioning { InlineLabels = 0x01, CurrentLabelAtStart = 0x02, NextLabelAtEnd = 0x04 }; + Q_ENUM(LabelPositioning) + int labelPositioning() const { return m_labelPositioning; } + void setLabelPositioning(int pos); + +Q_SIGNALS: + void sectionsChanged(); + void propertyChanged(); + void criteriaChanged(); + void delegateChanged(); + void labelPositioningChanged(); + +private: + QString m_property; + SectionCriteria m_criteria; + QQmlComponent *m_delegate; + int m_labelPositioning; + QQuickListViewPrivate *m_view; +}; + + +class QQmlInstanceModel; +class QQuickListViewAttached; +class Q_QUICK_EXPORT QQuickListView : public QQuickItemView +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickListView) + + Q_PROPERTY(qreal highlightMoveVelocity READ highlightMoveVelocity WRITE setHighlightMoveVelocity NOTIFY highlightMoveVelocityChanged) + Q_PROPERTY(qreal highlightResizeVelocity READ highlightResizeVelocity WRITE setHighlightResizeVelocity NOTIFY highlightResizeVelocityChanged) + Q_PROPERTY(int highlightResizeDuration READ highlightResizeDuration WRITE setHighlightResizeDuration NOTIFY highlightResizeDurationChanged) + + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) + Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged) + + Q_PROPERTY(QQuickViewSection *section READ sectionCriteria CONSTANT) + Q_PROPERTY(QString currentSection READ currentSection NOTIFY currentSectionChanged) + + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) + + Q_PROPERTY(HeaderPositioning headerPositioning READ headerPositioning WRITE setHeaderPositioning NOTIFY headerPositioningChanged REVISION(2, 4)) + Q_PROPERTY(FooterPositioning footerPositioning READ footerPositioning WRITE setFooterPositioning NOTIFY footerPositioningChanged REVISION(2, 4)) + + Q_CLASSINFO("DefaultProperty", "data") + QML_NAMED_ELEMENT(ListView) + QML_ADDED_IN_VERSION(2, 0) + QML_ATTACHED(QQuickListViewAttached) + +public: + QQuickListView(QQuickItem *parent=nullptr); + ~QQuickListView(); + + qreal spacing() const; + void setSpacing(qreal spacing); + + enum Orientation { Horizontal = Qt::Horizontal, Vertical = Qt::Vertical }; + Q_ENUM(Orientation) + Orientation orientation() const; + void setOrientation(Orientation); + + QQuickViewSection *sectionCriteria(); + QString currentSection() const; + + void setHighlightFollowsCurrentItem(bool) override; + + qreal highlightMoveVelocity() const; + void setHighlightMoveVelocity(qreal); + + qreal highlightResizeVelocity() const; + void setHighlightResizeVelocity(qreal); + + int highlightResizeDuration() const; + void setHighlightResizeDuration(int); + + void setHighlightMoveDuration(int) override; + + enum SnapMode { NoSnap, SnapToItem, SnapOneItem }; + Q_ENUM(SnapMode) + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + enum HeaderPositioning { InlineHeader, OverlayHeader, PullBackHeader }; + Q_ENUM(HeaderPositioning) + HeaderPositioning headerPositioning() const; + void setHeaderPositioning(HeaderPositioning positioning); + + enum FooterPositioning { InlineFooter, OverlayFooter, PullBackFooter }; + Q_ENUM(FooterPositioning) + FooterPositioning footerPositioning() const; + void setFooterPositioning(FooterPositioning positioning); + + static QQuickListViewAttached *qmlAttachedProperties(QObject *); + +public Q_SLOTS: + void incrementCurrentIndex(); + void decrementCurrentIndex(); + +Q_SIGNALS: + void spacingChanged(); + void orientationChanged(); + void currentSectionChanged(); + void highlightMoveVelocityChanged(); + void highlightResizeVelocityChanged(); + void highlightResizeDurationChanged(); + void snapModeChanged(); + Q_REVISION(2, 4) void headerPositioningChanged(); + Q_REVISION(2, 4) void footerPositioningChanged(); + +protected: + void viewportMoved(Qt::Orientations orient) override; + void keyPressEvent(QKeyEvent *) override; + void geometryChange(const QRectF &newGeometry,const QRectF &oldGeometry) override; + void initItem(int index, QObject *item) override; + qreal maxYExtent() const override; + qreal maxXExtent() const override; +}; + +class Q_QUICK_EXPORT QQuickListViewAttached : public QQuickItemViewAttached +{ + Q_OBJECT + Q_PROPERTY(QQuickListView *view READ view NOTIFY viewChanged FINAL) +public: + QQuickListViewAttached(QObject *parent) + : QQuickItemViewAttached(parent), m_sectionItem(nullptr) {} + ~QQuickListViewAttached() {} + QQuickListView *view() const { return m_view; } + void setView(QQuickListView *view) { + if (view != m_view) { + m_view = view; + Q_EMIT viewChanged(); + } + } + +public: + QPointer m_sectionItem; +private: + QPointer m_view; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKLISTVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e10fc241e7086ef6729099ba86631c5557d9185c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p.h @@ -0,0 +1,92 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLOADER_P_H +#define QQUICKLOADER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickLoaderPrivate; +class Q_QUICK_EXPORT QQuickLoader : public QQuickImplicitSizeItem +{ + Q_OBJECT + + Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) + Q_PROPERTY(QUrl source READ source WRITE setSourceWithoutResolve NOTIFY sourceChanged) + Q_PROPERTY(QQmlComponent *sourceComponent READ sourceComponent WRITE setSourceComponent RESET resetSourceComponent NOTIFY sourceComponentChanged) + Q_PROPERTY(QObject *item READ item NOTIFY itemChanged) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) + Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) + QML_NAMED_ELEMENT(Loader) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickLoader(QQuickItem *parent = nullptr); + virtual ~QQuickLoader(); + + bool active() const; + void setActive(bool newVal); + + Q_INVOKABLE void setSource(const QUrl &source, QJSValue initialProperties); + Q_INVOKABLE void setSource(const QUrl &source); + + QUrl source() const; + void setSourceWithoutResolve(const QUrl &source); + + QQmlComponent *sourceComponent() const; + void setSourceComponent(QQmlComponent *); + void resetSourceComponent(); + + enum Status { Null, Ready, Loading, Error }; + Q_ENUM(Status) + Status status() const; + qreal progress() const; + + bool asynchronous() const; + void setAsynchronous(bool a); + + QObject *item() const; + +Q_SIGNALS: + void itemChanged(); + void activeChanged(); + void sourceChanged(); + void sourceComponentChanged(); + void statusChanged(); + void progressChanged(); + void loaded(); + void asynchronousChanged(); + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + +private: + QUrl setSourceUrlHelper(const QUrl &unresolvedUrl); + void setSource(const QUrl &sourceUrl, bool needsClear); + void loadFromSource(); + void loadFromSourceComponent(); + Q_DISABLE_COPY(QQuickLoader) + Q_DECLARE_PRIVATE(QQuickLoader) + Q_PRIVATE_SLOT(d_func(), void _q_sourceLoaded()) + Q_PRIVATE_SLOT(d_func(), void _q_updateSize()) +}; + +QT_END_NAMESPACE + +#endif // QQUICKLOADER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ea01acad375174524f91cf7a67d0e961bff1ea43 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickloader_p_p.h @@ -0,0 +1,93 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLOADER_P_P_H +#define QQUICKLOADER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickloader_p.h" +#include "qquickimplicitsizeitem_p_p.h" +#include "qquickitemchangelistener_p.h" +#include + +#include +#include + +QT_BEGIN_NAMESPACE + + +class QQuickLoaderPrivate; +class QQuickLoaderIncubator : public QQmlIncubator +{ +public: + QQuickLoaderIncubator(QQuickLoaderPrivate *l, IncubationMode mode) : QQmlIncubator(mode), loader(l) {} + +protected: + void statusChanged(Status) override; + void setInitialState(QObject *) override; + +private: + QQuickLoaderPrivate *loader; +}; + +class QQmlContext; +class QQuickLoaderPrivate : public QQuickImplicitSizeItemPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickLoader) + +public: + QQuickLoaderPrivate(); + ~QQuickLoaderPrivate(); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override; + void itemImplicitWidthChanged(QQuickItem *) override; + void itemImplicitHeightChanged(QQuickItem *) override; + void clear(); + void initResize(); + void load(); + + void incubatorStateChanged(QQmlIncubator::Status status); + void setInitialState(QObject *o); + void disposeInitialPropertyValues(); + QQuickLoader::Status computeStatus() const; + void updateStatus(); + void createComponent(); + + qreal getImplicitWidth() const override; + qreal getImplicitHeight() const override; + + QUrl source; + QQuickItem *item; + QObject *object; + QQmlStrongJSQObjectReference component; + QQmlContext *itemContext; + QQuickLoaderIncubator *incubator; + QV4::PersistentValue initialPropertyValues; + QV4::PersistentValue qmlCallingContext; + bool updatingSize: 1; + bool active : 1; + bool loadingFromSource : 1; + bool asynchronous : 1; + // We need to use char instead of QQuickLoader::Status + // as otherwise the size of the class would increase + // on 32-bit systems, as sizeof(Status) == sizeof(int) + // and sizeof(int) > remaining padding on 32 bit + char status; + + void _q_sourceLoaded(); + void _q_updateSize(bool loaderGeometryChanged = true); +}; + +QT_END_NAMESPACE + +#endif // QQUICKLOADER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p.h new file mode 100644 index 0000000000000000000000000000000000000000..69b152fd6f335e8aa5acd23c8a8e38b970233c8c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p.h @@ -0,0 +1,166 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMOUSEAREA_P_H +#define QQUICKMOUSEAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMouseEvent; +class QQuickDrag; +class QQuickMouseAreaPrivate; +class QQuickWheelEvent; +// used in Qt Location +class Q_QUICK_EXPORT QQuickMouseArea : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(qreal mouseX READ mouseX NOTIFY mouseXChanged) + Q_PROPERTY(qreal mouseY READ mouseY NOTIFY mouseYChanged) + Q_PROPERTY(bool containsMouse READ hovered NOTIFY hoveredChanged) + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(bool scrollGestureEnabled READ isScrollGestureEnabled WRITE setScrollGestureEnabled NOTIFY scrollGestureEnabledChanged REVISION(2, 5)) + Q_PROPERTY(Qt::MouseButtons pressedButtons READ pressedButtons NOTIFY pressedButtonsChanged) + Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged) + Q_PROPERTY(bool hoverEnabled READ hoverEnabled WRITE setHoverEnabled NOTIFY hoverEnabledChanged) +#if QT_CONFIG(quick_draganddrop) + Q_PROPERTY(QQuickDrag *drag READ drag CONSTANT) //### add flicking to QQuickDrag or add a QQuickFlick ??? +#endif + Q_PROPERTY(bool preventStealing READ preventStealing WRITE setPreventStealing NOTIFY preventStealingChanged) + Q_PROPERTY(bool propagateComposedEvents READ propagateComposedEvents WRITE setPropagateComposedEvents NOTIFY propagateComposedEventsChanged) +#if QT_CONFIG(cursor) + Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape RESET unsetCursor NOTIFY cursorShapeChanged) +#endif + Q_PROPERTY(bool containsPress READ containsPress NOTIFY containsPressChanged REVISION(2, 4)) + Q_PROPERTY(int pressAndHoldInterval READ pressAndHoldInterval WRITE setPressAndHoldInterval NOTIFY pressAndHoldIntervalChanged RESET resetPressAndHoldInterval REVISION(2, 9)) + QML_NAMED_ELEMENT(MouseArea) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickMouseArea(QQuickItem *parent=nullptr); + ~QQuickMouseArea(); + + qreal mouseX() const; + qreal mouseY() const; + + bool isEnabled() const; + void setEnabled(bool); + + bool isScrollGestureEnabled() const; + void setScrollGestureEnabled(bool); + + bool hovered() const; + bool isPressed() const; + bool containsPress() const; + + Qt::MouseButtons pressedButtons() const; + + Qt::MouseButtons acceptedButtons() const; + void setAcceptedButtons(Qt::MouseButtons buttons); + + bool hoverEnabled() const; + void setHoverEnabled(bool h); + +#if QT_CONFIG(quick_draganddrop) + QQuickDrag *drag(); +#endif + + bool preventStealing() const; + void setPreventStealing(bool prevent); + + bool propagateComposedEvents() const; + void setPropagateComposedEvents(bool propagate); + +#if QT_CONFIG(cursor) + Qt::CursorShape cursorShape() const; + void setCursorShape(Qt::CursorShape shape); +#endif + + int pressAndHoldInterval() const; + void setPressAndHoldInterval(int interval); + void resetPressAndHoldInterval(); + +Q_SIGNALS: + void hoveredChanged(); + void pressedChanged(); + void enabledChanged(); + Q_REVISION(2, 5) void scrollGestureEnabledChanged(); + void pressedButtonsChanged(); + void acceptedButtonsChanged(); + void hoverEnabledChanged(); +#if QT_CONFIG(cursor) + void cursorShapeChanged(); +#endif + void positionChanged(QQuickMouseEvent *mouse); + void mouseXChanged(QQuickMouseEvent *mouse); + void mouseYChanged(QQuickMouseEvent *mouse); + void preventStealingChanged(); + void propagateComposedEventsChanged(); + + void pressed(QQuickMouseEvent *mouse); + void pressAndHold(QQuickMouseEvent *mouse); + void released(QQuickMouseEvent *mouse); + void clicked(QQuickMouseEvent *mouse); + void doubleClicked(QQuickMouseEvent *mouse); +#if QT_CONFIG(wheelevent) + void wheel(QQuickWheelEvent *wheel); +#endif + void entered(); + void exited(); + void canceled(); + Q_REVISION(2, 4) void containsPressChanged(); + Q_REVISION(2, 9) void pressAndHoldIntervalChanged(); + +protected: + void setHovered(bool); + bool setPressed(Qt::MouseButton button, bool p, Qt::MouseEventSource source); + bool sendMouseEvent(QMouseEvent *event); + + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseUngrabEvent() override; + void touchUngrabEvent() override; + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + bool childMouseEventFilter(QQuickItem *i, QEvent *e) override; + void timerEvent(QTimerEvent *event) override; + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData& value) override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + +private: + void handlePress(); + void handleRelease(); + void ungrabMouse(); + +private: + Q_DISABLE_COPY(QQuickMouseArea) + Q_DECLARE_PRIVATE(QQuickMouseArea) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMOUSEAREA_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..76204bb5628f61a0fdf4957d36771eec9b710499 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmousearea_p_p.h @@ -0,0 +1,89 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMOUSEAREA_P_P_H +#define QQUICKMOUSEAREA_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem_p.h" +#include "qquickevents_p_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMouseEvent; +class QQuickMouseArea; +class QQuickMouseAreaPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickMouseArea) + +public: + QQuickMouseAreaPrivate(); + ~QQuickMouseAreaPrivate(); + void init(); + + void saveEvent(QMouseEvent *event); + enum PropagateType{ + Click, + DoubleClick, + PressAndHold + }; + void propagate(QQuickMouseEvent* event, PropagateType); + bool propagateHelper(QQuickMouseEvent*, QQuickItem*,const QPointF &, PropagateType); + + bool isPressAndHoldConnected(); + bool isDoubleClickConnected(); + bool isClickConnected(); +#if QT_CONFIG(wheelevent) + bool isWheelConnected(); +#endif + + bool enabled : 1; + bool hoverEnabled : 1; + bool scrollGestureEnabled : 1; + bool hovered : 1; + bool longPress : 1; + bool moved : 1; + bool stealMouse : 1; + bool doubleClick : 1; + bool preventStealing : 1; + bool propagateComposedEvents : 1; + bool overThreshold : 1; + Qt::MouseButtons pressed; + int pressAndHoldInterval; +#if QT_CONFIG(quick_draganddrop) + QQuickDrag *drag; +#endif + QPointF startScene; + QPointF targetStartPos; + QPointF lastPos; + QQmlNullableValue lastScenePos; + Qt::MouseButton lastButton; + Qt::MouseButtons lastButtons; + Qt::KeyboardModifiers lastModifiers; + QBasicTimer pressAndHoldTimer; +#if QT_CONFIG(cursor) + QCursor *cursor; +#endif + QQuickMouseEvent quickMouseEvent; +#if QT_CONFIG(wheelevent) + QQuickWheelEvent quickWheelEvent; +#endif + Qt::MouseEventFlags lastFlags; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMOUSEAREA_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8dc88cb6325240401e9e21041d06091b9b55ceca --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERMULTIHANDLER_H +#define QQUICKPOINTERMULTIHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickhandlerpoint_p.h" +#include "qquickpointerdevicehandler_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickMultiPointHandlerPrivate; + +class Q_QUICK_EXPORT QQuickMultiPointHandler : public QQuickPointerDeviceHandler +{ + Q_OBJECT + Q_PROPERTY(int minimumPointCount READ minimumPointCount WRITE setMinimumPointCount NOTIFY minimumPointCountChanged) + Q_PROPERTY(int maximumPointCount READ maximumPointCount WRITE setMaximumPointCount NOTIFY maximumPointCountChanged) + Q_PROPERTY(QQuickHandlerPoint centroid READ centroid NOTIFY centroidChanged) + +public: + explicit QQuickMultiPointHandler(QQuickItem *parent = nullptr, int minimumPointCount = 2, int maximumPointCount = -1); + + int minimumPointCount() const; + void setMinimumPointCount(int c); + + int maximumPointCount() const; + void setMaximumPointCount(int maximumPointCount); + + const QQuickHandlerPoint ¢roid() const; + +Q_SIGNALS: + void minimumPointCountChanged(); + void maximumPointCountChanged(); + void centroidChanged(); + +protected: + struct PointData { + PointData() : id(0), angle(0) {} + PointData(quint64 id, qreal angle) : id(id), angle(angle) {} + quint64 id; + qreal angle; + }; + + bool wantsPointerEvent(QPointerEvent *event) override; + void handlePointerEventImpl(QPointerEvent *event) override; + void onActiveChanged() override; + void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override; + QList ¤tPoints(); + QQuickHandlerPoint &mutableCentroid(); + bool hasCurrentPoints(QPointerEvent *event); + QVector eligiblePoints(QPointerEvent *event); + qreal averageTouchPointDistance(const QPointF &ref); + qreal averageStartingDistance(const QPointF &ref); + qreal averageTouchPointAngle(const QPointF &ref); + qreal averageStartingAngle(const QPointF &ref); + QVector angles(const QPointF &ref) const; + static qreal averageAngleDelta(const QVector &old, const QVector &newAngles); + void acceptPoints(const QVector &points); + bool grabPoints(QPointerEvent *event, const QVector &points); + void moveTarget(QPointF pos); + + Q_DECLARE_PRIVATE(QQuickMultiPointHandler) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERMULTIHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f4b85799c78852b1896303cc92d9e19788951bef --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointhandler_p_p.h @@ -0,0 +1,47 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERMULTIHANDLER_P_H +#define QQUICKPOINTERMULTIHANDLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickhandlerpoint_p.h" +#include "qquickpointerdevicehandler_p_p.h" +#include "qquickmultipointhandler_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickMultiPointHandlerPrivate : public QQuickPointerDeviceHandlerPrivate +{ + Q_DECLARE_PUBLIC(QQuickMultiPointHandler) + +public: + static QQuickMultiPointHandlerPrivate* get(QQuickMultiPointHandler *q) { return q->d_func(); } + static const QQuickMultiPointHandlerPrivate* get(const QQuickMultiPointHandler *q) { return q->d_func(); } + + QQuickMultiPointHandlerPrivate(int minPointCount, int maxPointCount); + + QMetaProperty &xMetaProperty() const; + QMetaProperty &yMetaProperty() const; + + QVector currentPoints; + QQuickHandlerPoint centroid; + int minimumPointCount; + int maximumPointCount; + mutable QMetaProperty xProperty; + mutable QMetaProperty yProperty; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERMULTIHANDLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointtoucharea_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointtoucharea_p.h new file mode 100644 index 0000000000000000000000000000000000000000..04d8097536367f38619a70cacb2e50273a7a5ad8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickmultipointtoucharea_p.h @@ -0,0 +1,293 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMULTIPOINTTOUCHAREA_H +#define QQUICKMULTIPOINTTOUCHAREA_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include +#include +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMultiPointTouchArea; +class Q_QUICK_EXPORT QQuickTouchPoint : public QObject +{ + Q_OBJECT + Q_PROPERTY(int pointId READ pointId NOTIFY pointIdChanged) + Q_PROPERTY(QPointingDeviceUniqueId uniqueId READ uniqueId NOTIFY uniqueIdChanged REVISION(2, 9)) + Q_PROPERTY(bool pressed READ pressed NOTIFY pressedChanged) + Q_PROPERTY(qreal x READ x NOTIFY xChanged) + Q_PROPERTY(qreal y READ y NOTIFY yChanged) + Q_PROPERTY(QSizeF ellipseDiameters READ ellipseDiameters NOTIFY ellipseDiametersChanged REVISION(2, 9)) + Q_PROPERTY(qreal pressure READ pressure NOTIFY pressureChanged) + Q_PROPERTY(qreal rotation READ rotation NOTIFY rotationChanged REVISION(2, 9)) + Q_PROPERTY(QVector2D velocity READ velocity NOTIFY velocityChanged) + Q_PROPERTY(QRectF area READ area NOTIFY areaChanged) + + Q_PROPERTY(qreal startX READ startX NOTIFY startXChanged) + Q_PROPERTY(qreal startY READ startY NOTIFY startYChanged) + Q_PROPERTY(qreal previousX READ previousX NOTIFY previousXChanged) + Q_PROPERTY(qreal previousY READ previousY NOTIFY previousYChanged) + Q_PROPERTY(qreal sceneX READ sceneX NOTIFY sceneXChanged) + Q_PROPERTY(qreal sceneY READ sceneY NOTIFY sceneYChanged) + QML_NAMED_ELEMENT(TouchPoint) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickTouchPoint(bool qmlDefined = true) + : _qmlDefined(qmlDefined) + {} + + int pointId() const { return _id; } + void setPointId(int id); + + QPointingDeviceUniqueId uniqueId() const { return _uniqueId; } + void setUniqueId(const QPointingDeviceUniqueId &id); + + qreal x() const { return _x; } + qreal y() const { return _y; } + void setPosition(QPointF pos); + + QSizeF ellipseDiameters() const { return _ellipseDiameters; } + void setEllipseDiameters(const QSizeF &d); + + qreal pressure() const { return _pressure; } + void setPressure(qreal pressure); + + qreal rotation() const { return _rotation; } + void setRotation(qreal r); + + QVector2D velocity() const { return _velocity; } + void setVelocity(const QVector2D &velocity); + + QRectF area() const { return _area; } + void setArea(const QRectF &area); + + bool isQmlDefined() const { return _qmlDefined; } + + bool inUse() const { return _inUse; } + void setInUse(bool inUse) { _inUse = inUse; } + + bool pressed() const { return _pressed; } + void setPressed(bool pressed); + + qreal startX() const { return _startX; } + void setStartX(qreal startX); + + qreal startY() const { return _startY; } + void setStartY(qreal startY); + + qreal previousX() const { return _previousX; } + void setPreviousX(qreal previousX); + + qreal previousY() const { return _previousY; } + void setPreviousY(qreal previousY); + + qreal sceneX() const { return _sceneX; } + void setSceneX(qreal sceneX); + + qreal sceneY() const { return _sceneY; } + void setSceneY(qreal sceneY); + +Q_SIGNALS: + void pressedChanged(); + void pointIdChanged(); + Q_REVISION(2, 9) void uniqueIdChanged(); + void xChanged(); + void yChanged(); + Q_REVISION(2, 9) void ellipseDiametersChanged(); + void pressureChanged(); + Q_REVISION(2, 9) void rotationChanged(); + void velocityChanged(); + void areaChanged(); + void startXChanged(); + void startYChanged(); + void previousXChanged(); + void previousYChanged(); + void sceneXChanged(); + void sceneYChanged(); + +private: + friend class QQuickMultiPointTouchArea; + int _id = 0; + qreal _x = 0.0; + qreal _y = 0.0; + qreal _pressure = 0.0; + qreal _rotation = 0; + QSizeF _ellipseDiameters; + QVector2D _velocity; + QRectF _area; + bool _qmlDefined; + bool _inUse = false; //whether the point is currently in use (only valid when _qmlDefined == true) + bool _pressed = false; + qreal _startX = 0.0; + qreal _startY = 0.0; + qreal _previousX = 0.0; + qreal _previousY = 0.0; + qreal _sceneX = 0.0; + qreal _sceneY = 0.0; + QPointingDeviceUniqueId _uniqueId; +}; + +class QQuickGrabGestureEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty touchPoints READ touchPoints CONSTANT FINAL) + Q_PROPERTY(qreal dragThreshold READ dragThreshold CONSTANT FINAL) + QML_NAMED_ELEMENT(GestureEvent) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("GestureEvent is only available in the context of handling the gestureStarted signal from MultiPointTouchArea.") + +public: + QQuickGrabGestureEvent() : _dragThreshold(QGuiApplication::styleHints()->startDragDistance()) {} + + Q_INVOKABLE void grab() { _grab = true; } + bool wantsGrab() const { return _grab; } + + QQmlListProperty touchPoints() { + return QQmlListProperty(this, &_touchPoints); + } + qreal dragThreshold() const { return _dragThreshold; } + +private: + friend class QQuickMultiPointTouchArea; + bool _grab = false; + qreal _dragThreshold; + QList _touchPoints; +}; + +class Q_QUICK_EXPORT QQuickMultiPointTouchArea : public QQuickItem +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(QQuickMultiPointTouchArea) + + Q_PROPERTY(QQmlListProperty touchPoints READ touchPoints CONSTANT) + Q_PROPERTY(int minimumTouchPoints READ minimumTouchPoints WRITE setMinimumTouchPoints NOTIFY minimumTouchPointsChanged) + Q_PROPERTY(int maximumTouchPoints READ maximumTouchPoints WRITE setMaximumTouchPoints NOTIFY maximumTouchPointsChanged) + Q_PROPERTY(bool mouseEnabled READ mouseEnabled WRITE setMouseEnabled NOTIFY mouseEnabledChanged) + QML_NAMED_ELEMENT(MultiPointTouchArea) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickMultiPointTouchArea(QQuickItem *parent=nullptr); + ~QQuickMultiPointTouchArea(); + + int minimumTouchPoints() const; + void setMinimumTouchPoints(int num); + int maximumTouchPoints() const; + void setMaximumTouchPoints(int num); + bool mouseEnabled() const { return _mouseEnabled; } + void setMouseEnabled(bool arg); + + QQmlListProperty touchPoints() { + return QQmlListProperty(this, nullptr, QQuickMultiPointTouchArea::touchPoint_append, QQuickMultiPointTouchArea::touchPoint_count, QQuickMultiPointTouchArea::touchPoint_at, nullptr); + } + + static void touchPoint_append(QQmlListProperty *list, QQuickTouchPoint* touch) { + QQuickMultiPointTouchArea *q = static_cast(list->object); + q->addTouchPrototype(touch); + } + + static qsizetype touchPoint_count(QQmlListProperty *list) { + QQuickMultiPointTouchArea *q = static_cast(list->object); + return q->_touchPrototypes.size(); + } + + static QQuickTouchPoint* touchPoint_at(QQmlListProperty *list, qsizetype index) { + QQuickMultiPointTouchArea *q = static_cast(list->object); + return q->_touchPrototypes.value(index); + } + +Q_SIGNALS: +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + void pressed(const QList &touchPoints); + void updated(const QList &touchPoints); + void released(const QList &touchPoints); + void canceled(const QList &touchPoints); +#else + void pressed(const QList &points); + void updated(const QList &points); + void released(const QList &points); + void canceled(const QList &points); +#endif + void gestureStarted(QQuickGrabGestureEvent *gesture); +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + void touchUpdated(const QList &touchPoints); +#else + void touchUpdated(const QList &points); +#endif + void minimumTouchPointsChanged(); + void maximumTouchPointsChanged(); + void mouseEnabledChanged(); + +protected: + void touchEvent(QTouchEvent *) override; + bool childMouseEventFilter(QQuickItem *receiver, QEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseUngrabEvent() override; + void touchUngrabEvent() override; + + void addTouchPrototype(QQuickTouchPoint* prototype); + void addTouchPoint(const QEventPoint *p); + void addTouchPoint(const QMouseEvent *e); + void clearTouchLists(); + + void updateTouchPoint(QQuickTouchPoint*, const QEventPoint*); + void updateTouchPoint(QQuickTouchPoint *dtp, const QMouseEvent *e); + enum class RemapEventPoints { No, ToLocal }; + void updateTouchData(QEvent*, RemapEventPoints remap = RemapEventPoints::No); + + bool sendMouseEvent(QMouseEvent *event); + bool shouldFilter(QEvent *event); + void grabGesture(QPointingDevice *dev); + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; +#ifdef Q_OS_MACOS + void hoverEnterEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + void setTouchEventsEnabled(bool enable); + void itemChange(ItemChange change, const ItemChangeData &data) override; +#endif + +private: + void ungrab(bool normalRelease = false); + QMap _touchPrototypes; //TouchPoints defined in QML + QMap _touchPoints; //All current touch points + QList _releasedTouchPoints; + QList _pressedTouchPoints; + QList _movedTouchPoints; + int _minimumTouchPoints; + int _maximumTouchPoints; + QVector _lastFilterableTouchPointIds; + QPointer _mouseTouchPoint; // exists when mouse button is down and _mouseEnabled is true; null otherwise + QEventPoint _mouseQpaTouchPoint; // synthetic QPA touch point to hold state and position of the mouse + const QPointingDevice *_touchMouseDevice; + QPointF _mousePos; + bool _stealMouse; + bool _mouseEnabled; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMULTIPOINTTOUCHAREA_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpainteditem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpainteditem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8d81d9af52fc82d888ae3a3ab332aa04fffa1f99 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpainteditem_p.h @@ -0,0 +1,51 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPAINTEDITEM_P_P_H +#define QQUICKPAINTEDITEM_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickpainteditem.h" +#include "qquickitem_p.h" +#include "qquickpainteditem.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickPaintedItemTextureProvider; +class QSGPainterNode; + +class Q_QUICK_EXPORT QQuickPaintedItemPrivate : public QQuickItemPrivate +{ +public: + QQuickPaintedItemPrivate(); + + QSize contentsSize; + qreal contentsScale; + QColor fillColor; + QQuickPaintedItem::RenderTarget renderTarget; + QQuickPaintedItem::PerformanceHints performanceHints; + QSize textureSize; + + QRect dirtyRect; + + bool opaquePainting: 1; + bool mipmap: 1; + + mutable QQuickPaintedItemTextureProvider *textureProvider; + QSGPainterNode *node; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPAINTEDITEM_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalette_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalette_p.h new file mode 100644 index 0000000000000000000000000000000000000000..86bbcb616e40f4f6aeabd2e9836563d8d0f00483 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalette_p.h @@ -0,0 +1,96 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKPALETTE_H +#define QQUICKPALETTE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of QQuickPalette. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractPaletteProvider; + +class Q_QUICK_EXPORT QQuickPalette : public QQuickColorGroup +{ + Q_OBJECT + + Q_PROPERTY(QQuickColorGroup *active READ active WRITE setActive RESET resetActive NOTIFY activeChanged FINAL) + Q_PROPERTY(QQuickColorGroup *inactive READ inactive WRITE setInactive RESET resetInactive NOTIFY inactiveChanged FINAL) + Q_PROPERTY(QQuickColorGroup *disabled READ disabled WRITE setDisabled RESET resetDisabled NOTIFY disabledChanged FINAL) + QML_NAMED_ELEMENT(Palette) + QML_ADDED_IN_VERSION(6, 0) + +public: // Types + using PalettePtr = QPointer; + +public: + Q_DISABLE_COPY_MOVE(QQuickPalette) + explicit QQuickPalette(QObject *parent = nullptr); + + QQuickColorGroup *active() const; + QQuickColorGroup *inactive() const; + QQuickColorGroup *disabled() const; + void resetActive(); + void resetInactive(); + void resetDisabled(); + + QPalette::ColorGroup currentColorGroup() const override; + void setCurrentGroup(QPalette::ColorGroup currentGroup); + + void fromQPalette(QPalette palette); + QPalette toQPalette() const; + + const QQuickAbstractPaletteProvider *paletteProvider() const; + void setPaletteProvider(const QQuickAbstractPaletteProvider *paletteProvider); + + void reset(); + + void inheritPalette(const QPalette &palette); + +public Q_SLOTS: + void setActive(QQuickColorGroup *active); + void setInactive(QQuickColorGroup *inactive); + void setDisabled(QQuickColorGroup *disabled); + +Q_SIGNALS: + void activeChanged(); + void inactiveChanged(); + void disabledChanged(); + +private: + void setColorGroup(QPalette::ColorGroup groupTag, + const QQuickColorGroup::GroupPtr &group, + void (QQuickPalette::*notifier)()); + + QQuickColorGroup::GroupPtr colorGroup(QPalette::ColorGroup groupTag) const; + QQuickColorGroup::GroupPtr findColorGroup(QPalette::ColorGroup groupTag) const; + + void registerColorGroup(QQuickColorGroup *group, QPalette::ColorGroup groupTag); + + bool isValidColorGroup(QPalette::ColorGroup groupTag, + const QQuickColorGroup::GroupPtr &colorGroup) const; + + static constexpr QPalette::ColorGroup defaultCurrentGroup() { return QPalette::Active; } + +private: + std::array m_colorGroups = {}; + QPalette::ColorGroup m_currentGroup; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPALETTE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalettecolorprovider_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalettecolorprovider_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b79bcf24d72dc2825fd773c133a8600302df8b6e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpalettecolorprovider_p.h @@ -0,0 +1,67 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKPALETTECOLORPROVIDER_P_H +#define QQUICKPALETTECOLORPROVIDER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractPaletteProvider; + +class Q_QUICK_EXPORT QQuickPaletteColorProvider + : public std::enable_shared_from_this +{ +public: + QQuickPaletteColorProvider(); + + const QColor &color(QPalette::ColorGroup group, QPalette::ColorRole role) const; + bool setColor(QPalette::ColorGroup group, QPalette::ColorRole role, QColor color); + bool resetColor(QPalette::ColorGroup group, QPalette::ColorRole role); + bool resetColor(QPalette::ColorGroup group); + + bool fromQPalette(QPalette p); + QPalette palette() const; + + const QQuickAbstractPaletteProvider *paletteProvider() const; + void setPaletteProvider(const QQuickAbstractPaletteProvider *paletteProvider); + + bool copyColorGroup(QPalette::ColorGroup cg, const QQuickPaletteColorProvider &p); + + bool reset(); + + bool inheritPalette(const QPalette &palette); + +private: + bool doInheritPalette(const QPalette &palette); + bool updateInheritedPalette(); + void ensureRequestedPalette(); + + QPalette m_resolvedPalette; + QLazilyAllocated m_requestedPalette; + QLazilyAllocated m_lastInheritedPalette; + + using Deleter = std::function; + using ProviderPtr = std::unique_ptr; + ProviderPtr m_paletteProvider; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPALETTECOLORPROVIDER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpaletteproviderprivatebase_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpaletteproviderprivatebase_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c67de3217c4882426508ded6031f9944d4225a36 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpaletteproviderprivatebase_p.h @@ -0,0 +1,386 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKPALETTEPROVIDERPRIVATEBASE_H +#define QQUICKPALETTEPROVIDERPRIVATEBASE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QWindow; +class QQuickWindow; +class QQuickWindowPrivate; +class QQuickItem; +class QQuickItemPrivate; +class QQuickPopup; +class QQuickPopupPrivate; + +/*! + \internal + + Implements all required operations with palette. + + I -- is interface class (e.g. QQuickItem). + Impl -- is implementation class (e.g. QQuickItemPrivate). + + To use this class you need to inherit implementation class from it. + */ +template +class QQuickPaletteProviderPrivateBase : public QQuickAbstractPaletteProvider +{ + static_assert(std::is_base_of{}, "The interface class must inherit QObject"); + +public: + virtual ~QQuickPaletteProviderPrivateBase() = default; + + /*! + \internal + + Get current palette. + + \note Palette might be lazily allocated. Signal \p paletteCreated() + will be emitted by an object of interface class in this case. + + \note This function doesn't ask an object of interface class to emit + paletteChanged() signal in order to avoid problems with + property bindigns. + */ + virtual QQuickPalette *palette() const; + + /*! + \internal + + Set new palette. Doesn't transfer ownership. + */ + virtual void setPalette(QQuickPalette *p); + + /*! + \internal + + Reset palette to the default one. + */ + virtual void resetPalette(); + + /*! + \internal + + Check if everything is internally allocated and palette exists. + + Use before call \p palette() to avoid unnecessary allocations. + */ + virtual bool providesPalette() const; + + /*! + \internal + + The default palette for this component. + */ + QPalette defaultPalette() const override; + + /*! + \internal + + The parent palette for this component. Can be null. + */ + QPalette parentPalette(const QPalette &fallbackPalette) const override; + + /*! + \internal + + Inherit from \p parentPalette. This function is also called when + either parent or window of this item is changed. + */ + void inheritPalette(const QPalette &parentPalette); + + /*! + \internal + + Updates children palettes. The default implementation invokes + inheritPalette for all visual children. + + This function is also called when palette is changed + (signal changed() is emitted). + */ + virtual void updateChildrenPalettes(const QPalette &parentPalette); + +protected: + void setCurrentColorGroup(); + +private: + using PalettePtr = std::unique_ptr; + using Self = QQuickPaletteProviderPrivateBase; + + void registerPalette(PalettePtr palette); + + bool isValidPalette(const QQuickPalette *palette) const; + + QQuickPalette *windowPalette() const; + + + void connectItem(); + + const I *itemWithPalette() const; + I *itemWithPalette(); + + QQuickPalette *paletteData() const; + + QPalette toQPalette() const; + +private: + PalettePtr m_palette; +}; + +template +QQuickPalette *QQuickPaletteProviderPrivateBase::palette() const +{ + if (!providesPalette()) { + // It's required to create a new palette without parent, + // because this method can be called from the rendering thread + const_cast(this)->registerPalette(std::make_unique()); + Q_EMIT const_cast(this)->itemWithPalette()->paletteCreated(); + } + + return paletteData(); +} + +template +bool QQuickPaletteProviderPrivateBase::isValidPalette(const QQuickPalette *palette) const +{ + if (!palette) { + qWarning("Palette cannot be null."); + return false; + } + + if (providesPalette() && paletteData() == palette) { + qWarning("Self assignment makes no sense."); + return false; + } + + return true; +} + +template +void QQuickPaletteProviderPrivateBase::setPalette(QQuickPalette *p) +{ + if (isValidPalette(p)) { + palette()->fromQPalette(p->toQPalette()); + } +} + +template +void QQuickPaletteProviderPrivateBase::resetPalette() +{ + paletteData()->reset(); +} + +template +bool QQuickPaletteProviderPrivateBase::providesPalette() const +{ + return !!m_palette; +} + +template +QPalette QQuickPaletteProviderPrivateBase::defaultPalette() const +{ + return QPalette(); +} + +template +inline constexpr bool isRootWindow() { return std::is_base_of_v; } + +template +void QQuickPaletteProviderPrivateBase::registerPalette(PalettePtr palette) +{ + if constexpr (!isRootWindow()) { + // Connect item only once, before initial data allocation + if (!providesPalette()) { + connectItem(); + } + } + + m_palette = std::move(palette); + m_palette->setPaletteProvider(this); + m_palette->inheritPalette(parentPalette(defaultPalette())); + + setCurrentColorGroup(); + + // In order to avoid extra noise, we should connect + // the following signals only after everything is already setup + I::connect(paletteData(), &QQuickPalette::changed, itemWithPalette(), &I::paletteChanged); + I::connect(paletteData(), &QQuickPalette::changed, itemWithPalette(), [this]{ updateChildrenPalettes(toQPalette()); }); +} + +template struct dependent_false : std::false_type {}; +template decltype(auto) getPrivateImpl(I &t) { return Impl::get(&t); } + +template +decltype(auto) getPrivate(T &item) +{ + if constexpr (std::is_base_of_v) { + return getPrivateImpl(item); + } else if constexpr (std::is_base_of_v) { + return getPrivateImpl(item); + } else { + static_assert (dependent_false::value, "Extend please."); + } +} + +template +QQuickPalette *QQuickPaletteProviderPrivateBase::windowPalette() const +{ + if constexpr (!isRootWindow()) { + if (auto window = itemWithPalette()->window()) { + if (getPrivate(*window)->providesPalette()) { + return getPrivate(*window)->palette(); + } + } + } + + return nullptr; +} + +template +QPalette QQuickPaletteProviderPrivateBase::parentPalette(const QPalette &fallbackPalette) const +{ + if constexpr (!isRootWindow()) { + // Popups should always inherit from their window, even child popups: QTBUG-115707. + if (!std::is_base_of_v) { + for (auto parentItem = itemWithPalette()->parentItem(); parentItem; + parentItem = parentItem->parentItem()) { + + // Don't allocate a new palette here. Use only if it's already pre allocated + if (parentItem && getPrivate(*parentItem)->providesPalette()) { + return getPrivate(*parentItem)->palette()->toQPalette(); + } + } + } + + if (auto wp = windowPalette()) { + return wp->toQPalette(); + } + } + + return fallbackPalette; +} + +template +const QQuickItem* rootItem(const I &item) +{ + if constexpr (isRootWindow()) { + return item.contentItem(); + } else if constexpr (std::is_base_of_v) { + return nullptr; + } else { + return &item; + } +} + +template +void QQuickPaletteProviderPrivateBase::inheritPalette(const QPalette &parentPalette) +{ + if (providesPalette()) { + // If palette is changed, then this function will be invoked + // for all children because of connection with signal changed() + palette()->inheritPalette(parentPalette); + } else { + // Otherwise, just propagate parent palette to all children + updateChildrenPalettes(parentPalette); + } +} + +template +void QQuickPaletteProviderPrivateBase::setCurrentColorGroup() +{ + if constexpr (!isRootWindow()) { + if (providesPalette()) { + const bool enabled = itemWithPalette()->isEnabled(); + const auto window = itemWithPalette()->window(); + const bool active = window ? window->isActive() : true; + palette()->setCurrentGroup(enabled ? (active ? QPalette::Active : QPalette::Inactive) + : QPalette::Disabled); + } + } +} + +template +void QQuickPaletteProviderPrivateBase::updateChildrenPalettes(const QPalette &parentPalette) +{ + if constexpr (std::is_same_v && std::is_same_v) { + /* QQuickWindowPrivate instantiates this template, but does not include QQuickItemPrivate + * This causes an error with the QQuickItemPrivate::inheritPalette call below on MSVC in + * static builds, as QQuickItemPrivate is incomplete. To work around this situation, we do + * nothing in this instantiation of updateChildrenPalettes and instead add an override in + * QQuickWindowPrivate, which does the correct thing. + */ + Q_UNREACHABLE_RETURN(); // You are not supposed to call this function + } else { + if (auto root = rootItem(*itemWithPalette())) { + for (auto &&child : root->childItems()) { + if (Q_LIKELY(child)) { + getPrivate(*child)->inheritPalette(parentPalette); + } + } + } + } +} + +template +void QQuickPaletteProviderPrivateBase::connectItem() +{ + Q_ASSERT(itemWithPalette()); + + if constexpr (!isRootWindow()) { + // Item with palette has the same lifetime as its implementation that inherits this class + I::connect(itemWithPalette(), &I::parentChanged, + itemWithPalette(), [this]() { inheritPalette(parentPalette(defaultPalette())); }); + I::connect(itemWithPalette(), &I::windowChanged, + itemWithPalette(), [this]() { inheritPalette(parentPalette(defaultPalette())); }); + I::connect(itemWithPalette(), &I::enabledChanged, + itemWithPalette(), [this]() { setCurrentColorGroup(); }); + } +} + +template +const I *QQuickPaletteProviderPrivateBase::itemWithPalette() const +{ + static_assert(std::is_base_of{}, + "The Impl class must inherit QObjectData"); + + return static_cast(static_cast(this)->q_ptr); +} + +template +I *QQuickPaletteProviderPrivateBase::itemWithPalette() +{ + return const_cast(const_cast(this)->itemWithPalette()); +} + +template +QQuickPalette *QQuickPaletteProviderPrivateBase::paletteData() const +{ + Q_ASSERT(m_palette); return m_palette.get(); +} + +template +QPalette QQuickPaletteProviderPrivateBase::toQPalette() const +{ + return palette()->toQPalette(); +} + +QT_END_NAMESPACE + +#endif // QQUICKPALETTEPROVIDERPRIVATEBASE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p.h new file mode 100644 index 0000000000000000000000000000000000000000..04d57cb39f35786d078e90b0794746e6450a0b34 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p.h @@ -0,0 +1,768 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPATH_H +#define QQUICKPATH_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_path); + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickCurve; +struct QQuickPathData +{ + int index; + QPointF endPoint; + QList curves; +}; + +class Q_QUICK_EXPORT QQuickPathElement : public QObject +{ + Q_OBJECT + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathElement(QObject *parent=nullptr) : QObject(parent) {} +Q_SIGNALS: + void changed(); +}; + +class Q_QUICK_EXPORT QQuickPathAttribute : public QQuickPathElement +{ + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) + QML_NAMED_ELEMENT(PathAttribute) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathAttribute(QObject *parent=nullptr) : QQuickPathElement(parent) {} + + + QString name() const; + void setName(const QString &name); + + qreal value() const; + void setValue(qreal value); + +Q_SIGNALS: + void nameChanged(); + void valueChanged(); + +private: + QString _name; + qreal _value = 0; +}; + +class Q_QUICK_EXPORT QQuickCurve : public QQuickPathElement +{ + Q_OBJECT + + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) + Q_PROPERTY(qreal relativeX READ relativeX WRITE setRelativeX NOTIFY relativeXChanged) + Q_PROPERTY(qreal relativeY READ relativeY WRITE setRelativeY NOTIFY relativeYChanged) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickCurve(QObject *parent=nullptr) : QQuickPathElement(parent) {} + + qreal x() const; + void setX(qreal x); + bool hasX(); + + qreal y() const; + void setY(qreal y); + bool hasY(); + + qreal relativeX() const; + void setRelativeX(qreal x); + bool hasRelativeX(); + + qreal relativeY() const; + void setRelativeY(qreal y); + bool hasRelativeY(); + + virtual void addToPath(QPainterPath &, const QQuickPathData &) {} + +Q_SIGNALS: + void xChanged(); + void yChanged(); + void relativeXChanged(); + void relativeYChanged(); + +private: + QQmlNullableValue _x; + QQmlNullableValue _y; + QQmlNullableValue _relativeX; + QQmlNullableValue _relativeY; +}; + +class Q_QUICK_EXPORT QQuickPathLine : public QQuickCurve +{ + Q_OBJECT + QML_NAMED_ELEMENT(PathLine) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathLine(QObject *parent=nullptr) : QQuickCurve(parent) {} + + void addToPath(QPainterPath &path, const QQuickPathData &) override; +}; + +class Q_QUICK_EXPORT QQuickPathMove : public QQuickCurve +{ + Q_OBJECT + QML_NAMED_ELEMENT(PathMove) + QML_ADDED_IN_VERSION(2, 9) +public: + QQuickPathMove(QObject *parent=nullptr) : QQuickCurve(parent) {} + + void addToPath(QPainterPath &path, const QQuickPathData &) override; +}; + +class Q_QUICK_EXPORT QQuickPathQuad : public QQuickCurve +{ + Q_OBJECT + + Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY controlXChanged) + Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY controlYChanged) + Q_PROPERTY(qreal relativeControlX READ relativeControlX WRITE setRelativeControlX NOTIFY relativeControlXChanged) + Q_PROPERTY(qreal relativeControlY READ relativeControlY WRITE setRelativeControlY NOTIFY relativeControlYChanged) + + QML_NAMED_ELEMENT(PathQuad) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathQuad(QObject *parent=nullptr) : QQuickCurve(parent) {} + + qreal controlX() const; + void setControlX(qreal x); + + qreal controlY() const; + void setControlY(qreal y); + + qreal relativeControlX() const; + void setRelativeControlX(qreal x); + bool hasRelativeControlX(); + + qreal relativeControlY() const; + void setRelativeControlY(qreal y); + bool hasRelativeControlY(); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void controlXChanged(); + void controlYChanged(); + void relativeControlXChanged(); + void relativeControlYChanged(); + +private: + qreal _controlX = 0; + qreal _controlY = 0; + QQmlNullableValue _relativeControlX; + QQmlNullableValue _relativeControlY; +}; + +class Q_QUICK_EXPORT QQuickPathCubic : public QQuickCurve +{ + Q_OBJECT + + Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY control1XChanged) + Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY control1YChanged) + Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY control2XChanged) + Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY control2YChanged) + Q_PROPERTY(qreal relativeControl1X READ relativeControl1X WRITE setRelativeControl1X NOTIFY relativeControl1XChanged) + Q_PROPERTY(qreal relativeControl1Y READ relativeControl1Y WRITE setRelativeControl1Y NOTIFY relativeControl1YChanged) + Q_PROPERTY(qreal relativeControl2X READ relativeControl2X WRITE setRelativeControl2X NOTIFY relativeControl2XChanged) + Q_PROPERTY(qreal relativeControl2Y READ relativeControl2Y WRITE setRelativeControl2Y NOTIFY relativeControl2YChanged) + QML_NAMED_ELEMENT(PathCubic) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathCubic(QObject *parent=nullptr) : QQuickCurve(parent) {} + + qreal control1X() const; + void setControl1X(qreal x); + + qreal control1Y() const; + void setControl1Y(qreal y); + + qreal control2X() const; + void setControl2X(qreal x); + + qreal control2Y() const; + void setControl2Y(qreal y); + + qreal relativeControl1X() const; + void setRelativeControl1X(qreal x); + bool hasRelativeControl1X(); + + qreal relativeControl1Y() const; + void setRelativeControl1Y(qreal y); + bool hasRelativeControl1Y(); + + qreal relativeControl2X() const; + void setRelativeControl2X(qreal x); + bool hasRelativeControl2X(); + + qreal relativeControl2Y() const; + void setRelativeControl2Y(qreal y); + bool hasRelativeControl2Y(); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void control1XChanged(); + void control1YChanged(); + void control2XChanged(); + void control2YChanged(); + void relativeControl1XChanged(); + void relativeControl1YChanged(); + void relativeControl2XChanged(); + void relativeControl2YChanged(); + +private: + qreal _control1X = 0; + qreal _control1Y = 0; + qreal _control2X = 0; + qreal _control2Y = 0; + QQmlNullableValue _relativeControl1X; + QQmlNullableValue _relativeControl1Y; + QQmlNullableValue _relativeControl2X; + QQmlNullableValue _relativeControl2Y; +}; + +class Q_QUICK_EXPORT QQuickPathCatmullRomCurve : public QQuickCurve +{ + Q_OBJECT + QML_NAMED_ELEMENT(PathCurve) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathCatmullRomCurve(QObject *parent=nullptr) : QQuickCurve(parent) {} + + void addToPath(QPainterPath &path, const QQuickPathData &) override; +}; + +class Q_QUICK_EXPORT QQuickPathArc : public QQuickCurve +{ + Q_OBJECT + Q_PROPERTY(qreal radiusX READ radiusX WRITE setRadiusX NOTIFY radiusXChanged) + Q_PROPERTY(qreal radiusY READ radiusY WRITE setRadiusY NOTIFY radiusYChanged) + Q_PROPERTY(bool useLargeArc READ useLargeArc WRITE setUseLargeArc NOTIFY useLargeArcChanged) + Q_PROPERTY(ArcDirection direction READ direction WRITE setDirection NOTIFY directionChanged) + Q_PROPERTY(qreal xAxisRotation READ xAxisRotation WRITE setXAxisRotation NOTIFY xAxisRotationChanged REVISION(2, 9)) + QML_NAMED_ELEMENT(PathArc) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPathArc(QObject *parent=nullptr) + : QQuickCurve(parent) {} + + enum ArcDirection { Clockwise, Counterclockwise }; + Q_ENUM(ArcDirection) + + qreal radiusX() const; + void setRadiusX(qreal); + + qreal radiusY() const; + void setRadiusY(qreal); + + bool useLargeArc() const; + void setUseLargeArc(bool); + + ArcDirection direction() const; + void setDirection(ArcDirection direction); + + qreal xAxisRotation() const; + void setXAxisRotation(qreal rotation); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void radiusXChanged(); + void radiusYChanged(); + void useLargeArcChanged(); + void directionChanged(); + Q_REVISION(2, 9) void xAxisRotationChanged(); + +private: + qreal _radiusX = 0; + qreal _radiusY = 0; + bool _useLargeArc = false; + ArcDirection _direction = Clockwise; + qreal _xAxisRotation = 0; +}; + +class Q_QUICK_EXPORT QQuickPathAngleArc : public QQuickCurve +{ + Q_OBJECT + Q_PROPERTY(qreal centerX READ centerX WRITE setCenterX NOTIFY centerXChanged) + Q_PROPERTY(qreal centerY READ centerY WRITE setCenterY NOTIFY centerYChanged) + Q_PROPERTY(qreal radiusX READ radiusX WRITE setRadiusX NOTIFY radiusXChanged) + Q_PROPERTY(qreal radiusY READ radiusY WRITE setRadiusY NOTIFY radiusYChanged) + Q_PROPERTY(qreal startAngle READ startAngle WRITE setStartAngle NOTIFY startAngleChanged) + Q_PROPERTY(qreal sweepAngle READ sweepAngle WRITE setSweepAngle NOTIFY sweepAngleChanged) + Q_PROPERTY(bool moveToStart READ moveToStart WRITE setMoveToStart NOTIFY moveToStartChanged) + + QML_NAMED_ELEMENT(PathAngleArc) + QML_ADDED_IN_VERSION(2, 11) + +public: + QQuickPathAngleArc(QObject *parent=nullptr) + : QQuickCurve(parent) {} + + qreal centerX() const; + void setCenterX(qreal); + + qreal centerY() const; + void setCenterY(qreal); + + qreal radiusX() const; + void setRadiusX(qreal); + + qreal radiusY() const; + void setRadiusY(qreal); + + qreal startAngle() const; + void setStartAngle(qreal); + + qreal sweepAngle() const; + void setSweepAngle(qreal); + + bool moveToStart() const; + void setMoveToStart(bool); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void centerXChanged(); + void centerYChanged(); + void radiusXChanged(); + void radiusYChanged(); + void startAngleChanged(); + void sweepAngleChanged(); + void moveToStartChanged(); + +private: + qreal _centerX = 0; + qreal _centerY = 0; + qreal _radiusX = 0; + qreal _radiusY = 0; + qreal _startAngle = 0; + qreal _sweepAngle = 0; + bool _moveToStart = true; +}; + +class Q_QUICK_EXPORT QQuickPathSvg : public QQuickCurve +{ + Q_OBJECT + Q_PROPERTY(QString path READ path WRITE setPath NOTIFY pathChanged) + QML_NAMED_ELEMENT(PathSvg) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathSvg(QObject *parent=nullptr) : QQuickCurve(parent) {} + + QString path() const; + void setPath(const QString &path); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void pathChanged(); + +private: + QString _path; +}; + +class Q_QUICK_EXPORT QQuickPathRectangle : public QQuickCurve +{ + Q_OBJECT + + Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL) + Q_PROPERTY(qreal height READ height WRITE setHeight NOTIFY heightChanged FINAL) + Q_PROPERTY(qreal strokeAdjustment READ strokeAdjustment WRITE setStrokeAdjustment NOTIFY strokeAdjustmentChanged FINAL) + Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged FINAL) + Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius RESET resetTopLeftRadius NOTIFY topLeftRadiusChanged FINAL) + Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged RESET resetTopRightRadius FINAL) + Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged RESET resetBottomLeftRadius FINAL) + Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged RESET resetBottomRightRadius FINAL) + + QML_NAMED_ELEMENT(PathRectangle) + QML_ADDED_IN_VERSION(6, 8) +public: + QQuickPathRectangle(QObject *parent = nullptr) : QQuickCurve(parent) {} + + qreal width() const; + void setWidth(qreal width); + + qreal height() const; + void setHeight(qreal height); + + qreal strokeAdjustment() const; + void setStrokeAdjustment(qreal newStrokeAdjustment); + + qreal radius() const; + void setRadius(qreal newRadius); + + qreal topLeftRadius() const { return cornerRadius(Qt::TopLeftCorner); } + void setTopLeftRadius(qreal radius) { setCornerRadius(Qt::TopLeftCorner, radius); } + void resetTopLeftRadius() { resetCornerRadius(Qt::TopLeftCorner); } + + qreal topRightRadius() const { return cornerRadius(Qt::TopRightCorner); } + void setTopRightRadius(qreal radius) { setCornerRadius(Qt::TopRightCorner, radius); } + void resetTopRightRadius() { resetCornerRadius(Qt::TopRightCorner); } + + qreal bottomLeftRadius() const { return cornerRadius(Qt::BottomLeftCorner); } + void setBottomLeftRadius(qreal radius) { setCornerRadius(Qt::BottomLeftCorner, radius); } + void resetBottomLeftRadius() { resetCornerRadius(Qt::BottomLeftCorner); } + + qreal bottomRightRadius() const { return cornerRadius(Qt::BottomRightCorner); } + void setBottomRightRadius(qreal radius) { setCornerRadius(Qt::BottomRightCorner, radius); } + void resetBottomRightRadius() { resetCornerRadius(Qt::BottomRightCorner); } + + qreal cornerRadius(Qt::Corner corner) const; + void setCornerRadius(Qt::Corner corner, qreal newCornerRadius); + void resetCornerRadius(Qt::Corner corner); + + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void widthChanged(); + void heightChanged(); + void strokeAdjustmentChanged(); + void radiusChanged(); + void topLeftRadiusChanged(); + void topRightRadiusChanged(); + void bottomLeftRadiusChanged(); + void bottomRightRadiusChanged(); + +private: + void emitCornerRadiusChanged(Qt::Corner corner); + + qreal _width = 0; + qreal _height = 0; + qreal _strokeAdjustment = 0; + struct ExtraData + { + ExtraData() { std::fill_n(cornerRadii, 4, -1); } + qreal radius = 0; + qreal cornerRadii[4]; + }; + QLazilyAllocated _extra; +}; + +class Q_QUICK_EXPORT QQuickPathPercent : public QQuickPathElement +{ + Q_OBJECT + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged) + QML_NAMED_ELEMENT(PathPercent) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPathPercent(QObject *parent=nullptr) : QQuickPathElement(parent) {} + + qreal value() const; + void setValue(qreal value); + +Q_SIGNALS: + void valueChanged(); + +private: + qreal _value = 0; +}; + +class Q_QUICK_EXPORT QQuickPathPolyline : public QQuickCurve +{ + Q_OBJECT + Q_PROPERTY(QPointF start READ start NOTIFY startChanged) + Q_PROPERTY(QVariant path READ path WRITE setPath NOTIFY pathChanged) + QML_NAMED_ELEMENT(PathPolyline) + QML_ADDED_IN_VERSION(2, 14) +public: + QQuickPathPolyline(QObject *parent=nullptr); + + QVariant path() const; + void setPath(const QVariant &path); + void setPath(const QVector &path); + QPointF start() const; + void addToPath(QPainterPath &path, const QQuickPathData &data) override; + +Q_SIGNALS: + void pathChanged(); + void startChanged(); + +private: + QVector m_path; +}; + +class Q_QUICK_EXPORT QQuickPathMultiline : public QQuickCurve +{ + Q_OBJECT + Q_PROPERTY(QPointF start READ start NOTIFY startChanged) + Q_PROPERTY(QVariant paths READ paths WRITE setPaths NOTIFY pathsChanged) + QML_NAMED_ELEMENT(PathMultiline) + QML_ADDED_IN_VERSION(2, 14) +public: + QQuickPathMultiline(QObject *parent=nullptr); + + QVariant paths() const; + void setPaths(const QVariant &paths); + void setPaths(const QVector> &paths); + QPointF start() const; + void addToPath(QPainterPath &path, const QQuickPathData &) override; + +Q_SIGNALS: + void pathsChanged(); + void startChanged(); + +private: + QPointF absolute(const QPointF &relative) const; + + QVector> m_paths; +}; + +struct QQuickCachedBezier +{ + QQuickCachedBezier() {} + QBezier bezier; + int element; + qreal bezLength; + qreal currLength; + qreal p; + bool isValid = false; +}; + +class QQuickPathPrivate; +class Q_QUICK_EXPORT QQuickPath : public QObject, public QQmlParserStatus +{ + Q_OBJECT + + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QQmlListProperty pathElements READ pathElements) + Q_PROPERTY(qreal startX READ startX WRITE setStartX NOTIFY startXChanged) + Q_PROPERTY(qreal startY READ startY WRITE setStartY NOTIFY startYChanged) + Q_PROPERTY(bool closed READ isClosed NOTIFY changed) + Q_PROPERTY(bool simplify READ simplify WRITE setSimplify NOTIFY simplifyChanged REVISION(6, 6) FINAL) + Q_PROPERTY(QSizeF scale READ scale WRITE setScale NOTIFY scaleChanged REVISION(2, 14)) + Q_CLASSINFO("DefaultProperty", "pathElements") + QML_NAMED_ELEMENT(Path) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPath(QObject *parent=nullptr); + ~QQuickPath() override; + + QQmlListProperty pathElements(); + + qreal startX() const; + void setStartX(qreal x); + bool hasStartX() const; + + qreal startY() const; + void setStartY(qreal y); + bool hasStartY() const; + + bool isClosed() const; + + QPainterPath path() const; + void setPath(const QPainterPath &path); + + QStringList attributes() const; + qreal attributeAt(const QString &, qreal) const; + Q_REVISION(2, 14) Q_INVOKABLE QPointF pointAtPercent(qreal t) const; + QPointF sequentialPointAt(qreal p, qreal *angle = nullptr) const; + void invalidateSequentialHistory() const; + + QSizeF scale() const; + void setScale(const QSizeF &scale); + + bool simplify() const; + void setSimplify(bool s); + + bool isAsynchronous() const; + void setAsynchronous(bool a); + +Q_SIGNALS: + void changed(); + void startXChanged(); + void startYChanged(); + Q_REVISION(6, 6) void simplifyChanged(); + Q_REVISION(2, 14) void scaleChanged(); + +protected: + QQuickPath(QQuickPathPrivate &dd, QObject *parent = nullptr); + void componentComplete() override; + void classBegin() override; + void disconnectPathElements(); + void connectPathElements(); + void gatherAttributes(); + + // pathElements property + static QQuickPathElement *pathElements_at(QQmlListProperty *, qsizetype); + static void pathElements_append(QQmlListProperty *, QQuickPathElement *); + static qsizetype pathElements_count(QQmlListProperty *); + static void pathElements_clear(QQmlListProperty *); + +private Q_SLOTS: + void processPath(); + +private: + struct AttributePoint { + AttributePoint() {} + AttributePoint(const AttributePoint &other) + : percent(other.percent), scale(other.scale), origpercent(other.origpercent), values(other.values) {} + AttributePoint &operator=(const AttributePoint &other) { + percent = other.percent; scale = other.scale; origpercent = other.origpercent; values = other.values; return *this; + } + qreal percent = 0; //massaged percent along the painter path + qreal scale = 1; + qreal origpercent = 0; //'real' percent along the painter path + QHash values; + }; + + void doProcessPath(); + void interpolate(int idx, const QString &name, qreal value); + void endpoint(const QString &name); + void createPointCache() const; + + static void interpolate(QList &points, int idx, const QString &name, qreal value); + static void endpoint(QList &attributePoints, const QString &name); + static QPointF forwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = nullptr); + static QPointF backwardsPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = nullptr); + +private: + Q_DISABLE_COPY(QQuickPath) + Q_DECLARE_PRIVATE(QQuickPath) + friend class QQuickPathAnimationUpdater; + +public: + QPainterPath createPath(const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList &attributePoints, bool *closed = nullptr); + QPainterPath createShapePath(const QPointF &startPoint, const QPointF &endPoint, qreal &pathLength, bool *closed = nullptr); + static QPointF sequentialPointAt(const QPainterPath &path, const qreal &pathLength, const QList &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle = nullptr); +}; + +class Q_QUICK_EXPORT QQuickPathText : public QQuickPathElement +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) + Q_PROPERTY(qreal width READ width NOTIFY changed) + Q_PROPERTY(qreal height READ height NOTIFY changed) + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + QML_NAMED_ELEMENT(PathText) + QML_ADDED_IN_VERSION(2, 15) +public: + QQuickPathText(QObject *parent=nullptr) : QQuickPathElement(parent) + { + connect(this, &QQuickPathText::xChanged, this, &QQuickPathElement::changed); + connect(this, &QQuickPathText::yChanged, this, &QQuickPathElement::changed); + connect(this, &QQuickPathText::textChanged, this, &QQuickPathElement::changed); + connect(this, &QQuickPathText::fontChanged, this, &QQuickPathElement::changed); + + connect(this, &QQuickPathElement::changed, this, &QQuickPathText::invalidate); + } + + void addToPath(QPainterPath &path); + + qreal x() const { return _x; } + qreal y() const { return _y; } + QString text() const { return _text; } + QFont font() const { return _font; } + + void setX(qreal x) + { + if (qFuzzyCompare(_x, x)) + return; + + _x = x; + Q_EMIT xChanged(); + } + + void setY(qreal y) + { + if (qFuzzyCompare(_y, y)) + return; + + _y = y; + Q_EMIT yChanged(); + } + + void setText(const QString &text) + { + if (text == _text) + return; + + _text = text; + Q_EMIT textChanged(); + } + + void setFont(const QFont &font) + { + if (font == _font) + return; + + _font = font; + Q_EMIT fontChanged(); + } + + qreal width() const + { + updatePath(); + return _path.boundingRect().width(); + } + + qreal height() const + { + updatePath(); + return _path.boundingRect().height(); + } + +Q_SIGNALS: + void xChanged(); + void yChanged(); + void textChanged(); + void fontChanged(); + +private Q_SLOTS: + void invalidate() + { + _path.clear(); + } + +private: + void updatePath() const; + + QString _text; + qreal _x = qreal(0.0); + qreal _y = qreal(0.0); + QFont _font; + + mutable QPainterPath _path; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPATH_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2f29d5515cffb7daa80881cd66ee83e0031972cf --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpath_p_p.h @@ -0,0 +1,67 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPATH_P_H +#define QQUICKPATH_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_path); + +#include "qquickpath_p.h" + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPathPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickPath) + +public: + static QQuickPathPrivate* get(QQuickPath *path) { return path->d_func(); } + static const QQuickPathPrivate* get(const QQuickPath *path) { return path->d_func(); } + + QQuickPathPrivate() + : componentComplete(true), isShapePath(false), simplify(false) + , processPending(false), asynchronous(false), useCustomPath(false) + {} + + QPainterPath _path; + QList _pathElements; + mutable QVector _pointCache; + QList _attributePoints; + QStringList _attributes; + QList _pathCurves; + QList _pathTexts; + mutable QQuickCachedBezier prevBez; + QQmlNullableValue startX; + QQmlNullableValue startY; + qreal pathLength = 0; + QSizeF scale = QSizeF(1, 1); + bool closed = false; + bool componentComplete : 1; + bool isShapePath : 1; + bool simplify : 1; + bool processPending : 1; + bool asynchronous : 1; + bool useCustomPath : 1; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathinterpolator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathinterpolator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..710da9ca0a464aab52cff1463c28f650308c5bc9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathinterpolator_p.h @@ -0,0 +1,71 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPATHINTERPOLATOR_P_H +#define QQUICKPATHINTERPOLATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_path); + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPath; +class Q_QUICK_EXPORT QQuickPathInterpolator : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged) + Q_PROPERTY(qreal x READ x NOTIFY xChanged) + Q_PROPERTY(qreal y READ y NOTIFY yChanged) + Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged) + QML_NAMED_ELEMENT(PathInterpolator) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickPathInterpolator(QObject *parent = nullptr); + + QQuickPath *path() const; + void setPath(QQuickPath *path); + + qreal progress() const; + void setProgress(qreal progress); + + qreal x() const; + qreal y() const; + qreal angle() const; + +Q_SIGNALS: + void pathChanged(); + void progressChanged(); + void xChanged(); + void yChanged(); + void angleChanged(); + +private Q_SLOTS: + void _q_pathUpdated(); + +private: + QQuickPath *_path; + qreal _x; + qreal _y; + qreal _angle; + qreal _progress; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPATHINTERPOLATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b3bc63c23253b7c5adecbb44d2cb27eefdef3518 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p.h @@ -0,0 +1,267 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPATHVIEW_P_H +#define QQUICKPATHVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_pathview); + +#include "qquickitem.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlChangeSet; + +class QQuickPathViewPrivate; +class QQuickPathViewAttached; +class Q_QUICK_EXPORT QQuickPathView : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) + Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged) + Q_PROPERTY(qreal offset READ offset WRITE setOffset NOTIFY offsetChanged) + + Q_PROPERTY(QQmlComponent *highlight READ highlight WRITE setHighlight NOTIFY highlightChanged) + Q_PROPERTY(QQuickItem *highlightItem READ highlightItem NOTIFY highlightItemChanged) + + Q_PROPERTY(qreal preferredHighlightBegin READ preferredHighlightBegin WRITE setPreferredHighlightBegin NOTIFY preferredHighlightBeginChanged) + Q_PROPERTY(qreal preferredHighlightEnd READ preferredHighlightEnd WRITE setPreferredHighlightEnd NOTIFY preferredHighlightEndChanged) + Q_PROPERTY(HighlightRangeMode highlightRangeMode READ highlightRangeMode WRITE setHighlightRangeMode NOTIFY highlightRangeModeChanged) + Q_PROPERTY(int highlightMoveDuration READ highlightMoveDuration WRITE setHighlightMoveDuration NOTIFY highlightMoveDurationChanged) + + Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin NOTIFY dragMarginChanged) + Q_PROPERTY(qreal maximumFlickVelocity READ maximumFlickVelocity WRITE setMaximumFlickVelocity NOTIFY maximumFlickVelocityChanged) + Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged) + + Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged) + Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged) + Q_PROPERTY(bool dragging READ isDragging NOTIFY draggingChanged) + + Q_PROPERTY(int count READ count NOTIFY countChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount RESET resetPathItemCount NOTIFY pathItemCountChanged) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged) + Q_PROPERTY(MovementDirection movementDirection READ movementDirection WRITE setMovementDirection NOTIFY movementDirectionChanged REVISION(2, 7)) + + Q_PROPERTY(int cacheItemCount READ cacheItemCount WRITE setCacheItemCount NOTIFY cacheItemCountChanged) + QML_NAMED_ELEMENT(PathView) + QML_ADDED_IN_VERSION(2, 0) + QML_ATTACHED(QQuickPathViewAttached) + +public: + QQuickPathView(QQuickItem *parent = nullptr); + virtual ~QQuickPathView(); + + QVariant model() const; + void setModel(const QVariant &); + + QQuickPath *path() const; + void setPath(QQuickPath *); + + int currentIndex() const; + void setCurrentIndex(int idx); + + QQuickItem *currentItem() const; + + qreal offset() const; + void setOffset(qreal offset); + + QQmlComponent *highlight() const; + void setHighlight(QQmlComponent *highlight); + QQuickItem *highlightItem() const; + + enum HighlightRangeMode { NoHighlightRange, ApplyRange, StrictlyEnforceRange }; + Q_ENUM(HighlightRangeMode) + HighlightRangeMode highlightRangeMode() const; + void setHighlightRangeMode(HighlightRangeMode mode); + + qreal preferredHighlightBegin() const; + void setPreferredHighlightBegin(qreal); + + qreal preferredHighlightEnd() const; + void setPreferredHighlightEnd(qreal); + + int highlightMoveDuration() const; + void setHighlightMoveDuration(int); + + qreal dragMargin() const; + void setDragMargin(qreal margin); + + qreal flickDeceleration() const; + void setFlickDeceleration(qreal dec); + + qreal maximumFlickVelocity() const; + void setMaximumFlickVelocity(qreal); + + bool isInteractive() const; + void setInteractive(bool); + + bool isMoving() const; + bool isFlicking() const; + bool isDragging() const; + + int count() const; + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); + + int pathItemCount() const; + void setPathItemCount(int); + void resetPathItemCount(); + + int cacheItemCount() const; + void setCacheItemCount(int); + + enum SnapMode { NoSnap, SnapToItem, SnapOneItem }; + Q_ENUM(SnapMode) + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + enum MovementDirection { Shortest, Negative, Positive }; + Q_ENUM(MovementDirection) + MovementDirection movementDirection() const; + void setMovementDirection(MovementDirection dir); + + enum PositionMode { Beginning, Center, End, Contain=4, SnapPosition }; // 3 == Visible in other views + Q_ENUM(PositionMode) + Q_INVOKABLE void positionViewAtIndex(int index, int mode); + Q_INVOKABLE int indexAt(qreal x, qreal y) const; + Q_INVOKABLE QQuickItem *itemAt(qreal x, qreal y) const; + Q_REVISION(2, 13) Q_INVOKABLE QQuickItem *itemAtIndex(int index) const; + + static QQuickPathViewAttached *qmlAttachedProperties(QObject *); + +public Q_SLOTS: + void incrementCurrentIndex(); + void decrementCurrentIndex(); + +Q_SIGNALS: + void currentIndexChanged(); + void currentItemChanged(); + void offsetChanged(); + void modelChanged(); + void countChanged(); + void pathChanged(); + void preferredHighlightBeginChanged(); + void preferredHighlightEndChanged(); + void highlightRangeModeChanged(); + void dragMarginChanged(); + void snapPositionChanged(); + void delegateChanged(); + void pathItemCountChanged(); + void maximumFlickVelocityChanged(); + void flickDecelerationChanged(); + void interactiveChanged(); + void movingChanged(); + void flickingChanged(); + void draggingChanged(); + void highlightChanged(); + void highlightItemChanged(); + void highlightMoveDurationChanged(); + void movementStarted(); + void movementEnded(); + Q_REVISION(2, 7) void movementDirectionChanged(); + void flickStarted(); + void flickEnded(); + void dragStarted(); + void dragEnded(); + void snapModeChanged(); + void cacheItemCountChanged(); + +protected: + void updatePolish() override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *) override; + bool childMouseEventFilter(QQuickItem *, QEvent *) override; + void mouseUngrabEvent() override; + void componentComplete() override; + +private Q_SLOTS: + void refill(); + void ticked(); + void movementEnding(); + void modelUpdated(const QQmlChangeSet &changeSet, bool reset); + void createdItem(int index, QObject *item); + void initItem(int index, QObject *item); + void destroyingItem(QObject *item); + void pathUpdated(); + +private: + friend class QQuickPathViewAttached; + Q_DISABLE_COPY(QQuickPathView) + Q_DECLARE_PRIVATE(QQuickPathView) +}; + +class QQmlOpenMetaObject; +class QQuickPathViewAttached : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQuickPathView *view READ view CONSTANT FINAL) + Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged FINAL) + Q_PROPERTY(bool onPath READ isOnPath NOTIFY pathChanged FINAL) + +public: + QQuickPathViewAttached(QObject *parent); + ~QQuickPathViewAttached(); + + QQuickPathView *view() const { return m_view; } + + bool isCurrentItem() const { return m_isCurrent; } + void setIsCurrentItem(bool c) { + if (m_isCurrent != c) { + m_isCurrent = c; + Q_EMIT currentItemChanged(); + } + } + + QVariant value(const QByteArray &name) const; + void setValue(const QByteArray &name, const QVariant &val); + + bool isOnPath() const { return m_onPath; } + void setOnPath(bool on) { + if (on != m_onPath) { + m_onPath = on; + Q_EMIT pathChanged(); + } + } + qreal m_percent; + +Q_SIGNALS: + void currentItemChanged(); + void pathChanged(); + +private: + friend class QQuickPathViewPrivate; + friend class QQuickPathView; + QQuickPathView *m_view; + QQmlOpenMetaObject *m_metaobject; + bool m_onPath : 1; + bool m_isCurrent : 1; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKPATHVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..40b869e9571ae2068cc4bcb9d5604f21385531f2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpathview_p_p.h @@ -0,0 +1,173 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPATHVIEW_P_P_H +#define QQUICKPATHVIEW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_pathview); + +#include "qquickpathview_p.h" +#include "qquickitem_p.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQmlOpenMetaObjectType; +class QQuickPathViewAttached; +class QQuickPathViewPrivate : public QQuickItemPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickPathView) + +public: + QQuickPathViewPrivate(); + + void init(); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override { + if (change.sizeChange() && (!highlightItem || item != highlightItem)) { + if (QQuickPathViewAttached *att = attached(item)) + att->m_percent = -1; + scheduleLayout(); + } + } + + void itemDestroyed(QQuickItem *item) override + { + if (!items.removeOne(item)) + itemCache.removeOne(item); + } + + void scheduleLayout() { + Q_Q(QQuickPathView); + if (!layoutScheduled) { + layoutScheduled = true; + q->polish(); + } + } + + QQuickItem *getItem(int modelIndex, qreal z = 0, bool async=false); + void releaseCurrentItem() + { + auto oldCurrentItem = std::exchange(currentItem, nullptr); + releaseItem(oldCurrentItem); + } + void releaseItem(QQuickItem *item); + QQuickPathViewAttached *attached(QQuickItem *item); + QQmlOpenMetaObjectType *attachedType(); + void clear(); + void updateMappedRange(); + qreal positionOfIndex(qreal index) const; + bool isInBound(qreal position, qreal lower, qreal upper, bool emptyRangeCheck = true) const; + void createHighlight(); + void updateHighlight(); + void setHighlightPosition(qreal pos); + bool isValid() const { + return model && model->count() > 0 && model->isValid() && path; + } + + void handleMousePressEvent(QMouseEvent *event); + void handleMouseMoveEvent(QMouseEvent *event); + void handleMouseReleaseEvent(QMouseEvent *); + + int calcCurrentIndex(); + void createCurrentItem(); + void updateCurrent(); + static void fixOffsetCallback(void*); + void fixOffset(); + void setOffset(qreal offset); + void setAdjustedOffset(qreal offset); + void regenerate(); + void updateItem(QQuickItem *, qreal); + enum MovementReason { Other, SetIndex, Mouse }; + void snapToIndex(int index, MovementReason reason); + QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const; + void addVelocitySample(qreal v); + qreal calcVelocity() const; + qint64 computeCurrentTime(QInputEvent *event) const; + void setDragging(bool d); + + QQuickPath *path; + int currentIndex; + QPointer currentItem; + qreal currentItemOffset; + qreal startPc; + QPointF startPoint; + QPointF startPos; + qreal offset; + qreal offsetAdj; + qreal mappedRange; + qreal mappedCache; + bool stealMouse : 1; + bool ownModel : 1; + bool interactive : 1; + bool haveHighlightRange : 1; + bool autoHighlight : 1; + bool highlightUp : 1; + bool layoutScheduled : 1; + bool moving : 1; + bool flicking : 1; + bool dragging : 1; + bool inRequest : 1; + bool delegateValidated : 1; + bool inRefill : 1; + QElapsedTimer timer; + qint64 lastPosTime; + QPointF lastPos; + qreal dragMargin; + qreal deceleration; + qreal maximumFlickVelocity; + QQuickTimeLine tl; + QQuickTimeLineValueProxy moveOffset; + int flickDuration; + int pathItems; + int requestedIndex; + int cacheSize; + int requestedCacheSize; + qreal requestedZ; + QList items; + QList itemCache; + QPointer model; + QVariant modelVariant; + MovementReason moveReason; + QQuickPathView::MovementDirection movementDirection; // default + QQuickPathView::MovementDirection moveDirection; // next movement + QQmlOpenMetaObjectType *attType; + QQmlComponent *highlightComponent; + QQuickItem *highlightItem; + QQuickTimeLineValueProxy moveHighlight; + qreal highlightPosition; + qreal highlightRangeStart; + qreal highlightRangeEnd; + QQuickPathView::HighlightRangeMode highlightRangeMode; + int highlightMoveDuration; + int modelCount; + QPODVector velocityBuffer; + QQuickPathView::SnapMode snapMode; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p.h new file mode 100644 index 0000000000000000000000000000000000000000..165856863a62ac933f248083a0fc1ac2ebda80d0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p.h @@ -0,0 +1,281 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPINCHAREA_H +#define QQUICKPINCHAREA_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qquickitem.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPinch : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget RESET resetTarget NOTIFY targetChanged) + Q_PROPERTY(qreal minimumScale READ minimumScale WRITE setMinimumScale NOTIFY minimumScaleChanged) + Q_PROPERTY(qreal maximumScale READ maximumScale WRITE setMaximumScale NOTIFY maximumScaleChanged) + Q_PROPERTY(qreal minimumRotation READ minimumRotation WRITE setMinimumRotation NOTIFY minimumRotationChanged) + Q_PROPERTY(qreal maximumRotation READ maximumRotation WRITE setMaximumRotation NOTIFY maximumRotationChanged) + Q_PROPERTY(Axis dragAxis READ axis WRITE setAxis NOTIFY dragAxisChanged) + Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged) + Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged) + Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged) + Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged) + Q_PROPERTY(bool active READ active NOTIFY activeChanged) + QML_NAMED_ELEMENT(Pinch) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPinch(); + + QQuickItem *target() const { return m_target; } + void setTarget(QQuickItem *target) { + if (target == m_target) + return; + m_target = target; + Q_EMIT targetChanged(); + } + void resetTarget() { + if (!m_target) + return; + m_target = nullptr; + Q_EMIT targetChanged(); + } + + qreal minimumScale() const { return m_minScale; } + void setMinimumScale(qreal s) { + if (s == m_minScale) + return; + m_minScale = s; + Q_EMIT minimumScaleChanged(); + } + qreal maximumScale() const { return m_maxScale; } + void setMaximumScale(qreal s) { + if (s == m_maxScale) + return; + m_maxScale = s; + Q_EMIT maximumScaleChanged(); + } + + qreal minimumRotation() const { return m_minRotation; } + void setMinimumRotation(qreal r) { + if (r == m_minRotation) + return; + m_minRotation = r; + Q_EMIT minimumRotationChanged(); + } + qreal maximumRotation() const { return m_maxRotation; } + void setMaximumRotation(qreal r) { + if (r == m_maxRotation) + return; + m_maxRotation = r; + Q_EMIT maximumRotationChanged(); + } + + enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XAndYAxis=0x03, XandYAxis=XAndYAxis }; + Q_ENUM(Axis) + Axis axis() const { return m_axis; } + void setAxis(Axis a) { + if (a == m_axis) + return; + m_axis = a; + Q_EMIT dragAxisChanged(); + } + + qreal xmin() const { return m_xmin; } + void setXmin(qreal x) { + if (x == m_xmin) + return; + m_xmin = x; + Q_EMIT minimumXChanged(); + } + qreal xmax() const { return m_xmax; } + void setXmax(qreal x) { + if (x == m_xmax) + return; + m_xmax = x; + Q_EMIT maximumXChanged(); + } + qreal ymin() const { return m_ymin; } + void setYmin(qreal y) { + if (y == m_ymin) + return; + m_ymin = y; + Q_EMIT minimumYChanged(); + } + qreal ymax() const { return m_ymax; } + void setYmax(qreal y) { + if (y == m_ymax) + return; + m_ymax = y; + Q_EMIT maximumYChanged(); + } + + bool active() const { return m_active; } + void setActive(bool a) { + if (a == m_active) + return; + m_active = a; + Q_EMIT activeChanged(); + } + +Q_SIGNALS: + void targetChanged(); + void minimumScaleChanged(); + void maximumScaleChanged(); + void minimumRotationChanged(); + void maximumRotationChanged(); + void dragAxisChanged(); + void minimumXChanged(); + void maximumXChanged(); + void minimumYChanged(); + void maximumYChanged(); + void activeChanged(); + +private: + QQuickItem *m_target; + qreal m_minScale; + qreal m_maxScale; + qreal m_minRotation; + qreal m_maxRotation; + Axis m_axis; + qreal m_xmin; + qreal m_xmax; + qreal m_ymin; + qreal m_ymax; + bool m_active; +}; + +class Q_QUICK_EXPORT QQuickPinchEvent : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QPointF center READ center FINAL) + Q_PROPERTY(QPointF startCenter READ startCenter FINAL) + Q_PROPERTY(QPointF previousCenter READ previousCenter FINAL) + Q_PROPERTY(qreal scale READ scale FINAL) + Q_PROPERTY(qreal previousScale READ previousScale FINAL) + Q_PROPERTY(qreal angle READ angle FINAL) + Q_PROPERTY(qreal previousAngle READ previousAngle FINAL) + Q_PROPERTY(qreal rotation READ rotation FINAL) + Q_PROPERTY(QPointF point1 READ point1 FINAL) + Q_PROPERTY(QPointF startPoint1 READ startPoint1 FINAL) + Q_PROPERTY(QPointF point2 READ point2 FINAL) + Q_PROPERTY(QPointF startPoint2 READ startPoint2 FINAL) + Q_PROPERTY(int pointCount READ pointCount FINAL) + Q_PROPERTY(bool accepted READ accepted WRITE setAccepted FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPinchEvent(QPointF c, qreal s, qreal a, qreal r) + : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r) + , m_pointCount(0), m_accepted(true) {} + + QPointF center() const { return m_center; } + QPointF startCenter() const { return m_startCenter; } + void setStartCenter(QPointF c) { m_startCenter = c; } + QPointF previousCenter() const { return m_lastCenter; } + void setPreviousCenter(QPointF c) { m_lastCenter = c; } + qreal scale() const { return m_scale; } + qreal previousScale() const { return m_lastScale; } + void setPreviousScale(qreal s) { m_lastScale = s; } + qreal angle() const { return m_angle; } + qreal previousAngle() const { return m_lastAngle; } + void setPreviousAngle(qreal a) { m_lastAngle = a; } + qreal rotation() const { return m_rotation; } + QPointF point1() const { return m_point1; } + void setPoint1(QPointF p) { m_point1 = p; } + QPointF startPoint1() const { return m_startPoint1; } + void setStartPoint1(QPointF p) { m_startPoint1 = p; } + QPointF point2() const { return m_point2; } + void setPoint2(QPointF p) { m_point2 = p; } + QPointF startPoint2() const { return m_startPoint2; } + void setStartPoint2(QPointF p) { m_startPoint2 = p; } + int pointCount() const { return m_pointCount; } + void setPointCount(int count) { m_pointCount = count; } + + bool accepted() const { return m_accepted; } + void setAccepted(bool a) { m_accepted = a; } + +private: + QPointF m_center; + QPointF m_startCenter; + QPointF m_lastCenter; + qreal m_scale; + qreal m_lastScale; + qreal m_angle; + qreal m_lastAngle; + qreal m_rotation; + QPointF m_point1; + QPointF m_point2; + QPointF m_startPoint1; + QPointF m_startPoint2; + int m_pointCount; + bool m_accepted; +}; + + +class QQuickPinchAreaPrivate; +class Q_QUICK_EXPORT QQuickPinchArea : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(QQuickPinch *pinch READ pinch CONSTANT) + QML_NAMED_ELEMENT(PinchArea) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPinchArea(QQuickItem *parent=nullptr); + ~QQuickPinchArea(); + + bool isEnabled() const; + void setEnabled(bool); + + QQuickPinch *pinch(); + +Q_SIGNALS: + void enabledChanged(); + void pinchStarted(QQuickPinchEvent *pinch); + void pinchUpdated(QQuickPinchEvent *pinch); + void pinchFinished(QQuickPinchEvent *pinch); + Q_REVISION(2, 5) void smartZoom(QQuickPinchEvent *pinch); + +protected: + bool childMouseEventFilter(QQuickItem *i, QEvent *e) override; + void touchEvent(QTouchEvent *event) override; + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData& value) override; + bool event(QEvent *) override; + +private: + void clearPinch(QTouchEvent *event); + void cancelPinch(QTouchEvent *event); + void updatePinch(QTouchEvent *event, bool filtering); + void updatePinchTarget(); + +private: + Q_DISABLE_COPY(QQuickPinchArea) + Q_DECLARE_PRIVATE(QQuickPinchArea) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPINCHAREA_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d8b27a48bcb67752c8693f6b3ee9219f263413c1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpincharea_p_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPINCHAREA_P_H +#define QQUICKPINCHAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qquickitem_p.h" +#include "qquickpincharea_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickPinch; +class QQuickPinchAreaPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickPinchArea) +public: + QQuickPinchAreaPrivate() + : enabled(true), inPinch(false), pinchRejected(false), pinchActivated(false), initPinch(false) + { + } + + ~QQuickPinchAreaPrivate(); + + void init() + { + Q_Q(QQuickPinchArea); + q->setAcceptTouchEvents(true); + q->setFiltersChildMouseEvents(true); + } + + bool enabled : 1; + bool inPinch : 1; + bool pinchRejected : 1; + bool pinchActivated : 1; + bool initPinch : 1; + int id1 = -1; + QQuickPinch *pinch = nullptr; + QPointF sceneStartPoint1; + QPointF sceneStartPoint2; + QPointF lastPoint1; + QPointF lastPoint2; + qreal pinchStartDist = 0; + qreal pinchStartScale = 1; + qreal pinchLastScale = 1; + qreal pinchStartRotation = 0; + qreal pinchStartAngle = 0; + qreal pinchLastAngle = 0; + qreal pinchRotation = 0; + QPointF sceneStartCenter; + QPointF pinchStartCenter; + QPointF sceneLastCenter; + QPointF pinchStartPos; + QList touchPoints; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPINCHAREA_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpinchhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpinchhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b7015d513b30f8e6993c831a0bcccb673a1ae51e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpinchhandler_p.h @@ -0,0 +1,131 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPINCHHANDLER_H +#define QQUICKPINCHHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickmultipointhandler_p.h" +#include +#include "qquickdragaxis_p.h" + +QT_BEGIN_NAMESPACE + +using namespace Qt::StringLiterals; + +class Q_QUICK_EXPORT QQuickPinchHandler : public QQuickMultiPointHandler +{ + Q_OBJECT + + Q_PROPERTY(QQuickDragAxis *scaleAxis READ scaleAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 5) + Q_PROPERTY(qreal minimumScale READ minimumScale WRITE setMinimumScale NOTIFY minimumScaleChanged) + Q_PROPERTY(qreal maximumScale READ maximumScale WRITE setMaximumScale NOTIFY maximumScaleChanged) + Q_PROPERTY(qreal scale READ scale NOTIFY updated) +#endif + Q_PROPERTY(qreal activeScale READ activeScale NOTIFY scaleChanged) + Q_PROPERTY(qreal persistentScale READ persistentScale WRITE setPersistentScale NOTIFY scaleChanged) + + Q_PROPERTY(QQuickDragAxis *rotationAxis READ rotationAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 5) + Q_PROPERTY(qreal minimumRotation READ minimumRotation WRITE setMinimumRotation NOTIFY minimumRotationChanged) + Q_PROPERTY(qreal maximumRotation READ maximumRotation WRITE setMaximumRotation NOTIFY maximumRotationChanged) + Q_PROPERTY(qreal rotation READ rotation NOTIFY updated) +#endif + Q_PROPERTY(qreal activeRotation READ activeRotation NOTIFY rotationChanged) + Q_PROPERTY(qreal persistentRotation READ persistentRotation WRITE setPersistentRotation NOTIFY rotationChanged) + + Q_PROPERTY(QQuickDragAxis * xAxis READ xAxis CONSTANT) + Q_PROPERTY(QQuickDragAxis * yAxis READ yAxis CONSTANT) +#if QT_DEPRECATED_SINCE(6, 5) + Q_PROPERTY(QVector2D translation READ translation NOTIFY updated) +#endif + Q_PROPERTY(QPointF activeTranslation READ activeTranslation NOTIFY translationChanged REVISION(6, 5)) + Q_PROPERTY(QPointF persistentTranslation READ persistentTranslation WRITE setPersistentTranslation NOTIFY translationChanged REVISION(6, 5)) + + QML_NAMED_ELEMENT(PinchHandler) + QML_ADDED_IN_VERSION(2, 12) + +public: + explicit QQuickPinchHandler(QQuickItem *parent = nullptr); + + QQuickDragAxis *xAxis() { return &m_xAxis; } + QQuickDragAxis *yAxis() { return &m_yAxis; } +#if QT_DEPRECATED_SINCE(6, 5) + QVector2D translation() const { return QVector2D(activeTranslation()); } +#endif + QPointF activeTranslation() const { return QPointF(m_xAxis.activeValue(), m_yAxis.activeValue()); } + QPointF persistentTranslation() const { return QPointF(m_xAxis.persistentValue(), m_yAxis.persistentValue()); } + void setPersistentTranslation(const QPointF &trans); + + QQuickDragAxis *scaleAxis() { return &m_scaleAxis; } +#if QT_DEPRECATED_SINCE(6, 5) + qreal minimumScale() const { return m_scaleAxis.minimum(); } + void setMinimumScale(qreal minimumScale); + qreal maximumScale() const { return m_scaleAxis.maximum(); } + void setMaximumScale(qreal maximumScale); + qreal scale() const { return persistentScale(); } +#endif + qreal activeScale() const { return m_scaleAxis.activeValue(); } + void setActiveScale(qreal scale); + qreal persistentScale() const { return m_scaleAxis.persistentValue(); } + void setPersistentScale(qreal scale); + + QQuickDragAxis *rotationAxis() { return &m_rotationAxis; } +#if QT_DEPRECATED_SINCE(6, 5) + qreal minimumRotation() const { return m_rotationAxis.minimum(); } + void setMinimumRotation(qreal minimumRotation); + qreal maximumRotation() const { return m_rotationAxis.maximum(); } + void setMaximumRotation(qreal maximumRotation); + qreal rotation() const { return activeRotation(); } +#endif + qreal activeRotation() const { return m_rotationAxis.activeValue(); } + void setActiveRotation(qreal rot); + qreal persistentRotation() const { return m_rotationAxis.persistentValue(); } + void setPersistentRotation(qreal rot); + +Q_SIGNALS: + void minimumScaleChanged(); + void maximumScaleChanged(); + void minimumRotationChanged(); + void maximumRotationChanged(); + void updated(); + void scaleChanged(qreal delta); + void rotationChanged(qreal delta); + void translationChanged(QVector2D delta); + +protected: + bool wantsPointerEvent(QPointerEvent *event) override; + void onActiveChanged() override; + void handlePointerEventImpl(QPointerEvent *event) override; + +private: + QQuickDragAxis m_xAxis = {this, u"x"_s}; + QQuickDragAxis m_yAxis = {this, u"y"_s}; + QQuickDragAxis m_scaleAxis = {this, u"scale"_s, 1}; + QQuickDragAxis m_rotationAxis = {this, u"rotation"_s}; + + // internal + qreal m_startDistance = 0; + qreal m_accumulatedStartCentroidDistance = 0; + QPointF m_startTargetPos; + QVector m_startAngles; + QQuickMatrix4x4 m_transform; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPINCHHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmap_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmap_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d0b836414c699ed6bcf1db55e095f7f976e9b339 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmap_p.h @@ -0,0 +1,205 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPIXMAP_H +#define QQUICKPIXMAP_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlEngine; +class QQuickPixmapData; +class QQuickTextureFactory; +class QQuickImageProviderOptionsPrivate; + +class QQuickDefaultTextureFactory : public QQuickTextureFactory +{ + Q_OBJECT +public: + QQuickDefaultTextureFactory(const QImage &i); + QSGTexture *createTexture(QQuickWindow *window) const override; + QSize textureSize() const override { return size; } + int textureByteCount() const override { return size.width() * size.height() * 4; } + QImage image() const override { return im; } + +private: + QImage im; + QSize size; +}; + +class QQuickImageProviderPrivate +{ +public: + QQuickImageProvider::ImageType type; + QQuickImageProvider::Flags flags; + bool isProviderWithOptions; +}; + +// ### Qt 6: Make public moving to qquickimageprovider.h +class Q_QUICK_EXPORT QQuickImageProviderOptions +{ +public: + enum AutoTransform { + UsePluginDefaultTransform = -1, + ApplyTransform = 0, + DoNotApplyTransform = 1 + }; + + QQuickImageProviderOptions(); + ~QQuickImageProviderOptions(); + + QQuickImageProviderOptions(const QQuickImageProviderOptions&); + QQuickImageProviderOptions& operator=(const QQuickImageProviderOptions&); + + bool operator==(const QQuickImageProviderOptions&) const; + + AutoTransform autoTransform() const; + void setAutoTransform(AutoTransform autoTransform); + + bool preserveAspectRatioCrop() const; + void setPreserveAspectRatioCrop(bool preserveAspectRatioCrop); + + bool preserveAspectRatioFit() const; + void setPreserveAspectRatioFit(bool preserveAspectRatioFit); + + QColorSpace targetColorSpace() const; + void setTargetColorSpace(const QColorSpace &colorSpace); + + QRectF sourceClipRect() const; + void setSourceClipRect(const QRectF &rect); + +private: + QSharedDataPointer d; +}; + +/*! \internal + A class that encapsulates the action of fetching a pixmap, as well as the + pixmap itself (indirectly via QQuickPixmapData::textureFactory) and the + responsibility of canceling outstanding requests. Rather than relying on + QPixmapCache which doesn't cache all the information Qt Quick needs, + QQuickPixmap implements its own cache, that correctly degrades over time. + (QQuickPixmapData::release() marks it as being not-currently-used, and + QQuickPixmapCache::shrinkCache() sweeps away the least-recently-released + instances until the remaining bytes are less than cache_limit.) +*/ +class Q_QUICK_EXPORT QQuickPixmap +{ + Q_DECLARE_TR_FUNCTIONS(QQuickPixmap) +public: + enum Status { Null, Ready, Error, Loading }; + + enum Option { + Asynchronous = 0x00000001, + Cache = 0x00000002 + }; + Q_DECLARE_FLAGS(Options, Option) + + QQuickPixmap(); + QQuickPixmap(QQmlEngine *, const QUrl &); + QQuickPixmap(QQmlEngine *, const QUrl &, Options options); + QQuickPixmap(QQmlEngine *, const QUrl &, const QRect ®ion, const QSize &); + QQuickPixmap(const QUrl &, const QImage &image); + ~QQuickPixmap(); + + bool isNull() const; + bool isReady() const; + bool isError() const; + bool isLoading() const; + + Status status() const; + QString error() const; + const QUrl &url() const; + const QSize &implicitSize() const; + const QRect &requestRegion() const; + const QSize &requestSize() const; + QQuickImageProviderOptions::AutoTransform autoTransform() const; + int frameCount() const; + QImage image() const; + void setImage(const QImage &); + void setPixmap(const QQuickPixmap &other); + + QColorSpace colorSpace() const; + + QQuickTextureFactory *textureFactory() const; + + QRect rect() const; + int width() const; + int height() const; + + void load(QQmlEngine *, const QUrl &); + void load(QQmlEngine *, const QUrl &, QQuickPixmap::Options options); + void load(QQmlEngine *, const QUrl &, const QRect &requestRegion, const QSize &requestSize); + void load(QQmlEngine *, const QUrl &, const QRect &requestRegion, const QSize &requestSize, QQuickPixmap::Options options); + void load(QQmlEngine *, const QUrl &, const QRect &requestRegion, const QSize &requestSize, + QQuickPixmap::Options options, const QQuickImageProviderOptions &providerOptions, int frame = 0, int frameCount = 1, + qreal devicePixelRatio = 1.0); + void loadImageFromDevice(QQmlEngine *engine, QIODevice *device, const QUrl &url, + const QRect &requestRegion, const QSize &requestSize, + const QQuickImageProviderOptions &providerOptions, int frame = 0, int frameCount = 1); + + void clear(); + void clear(QObject *); + + bool connectFinished(QObject *, const char *); + bool connectFinished(QObject *, int); + bool connectDownloadProgress(QObject *, const char *); + bool connectDownloadProgress(QObject *, int); + + static void purgeCache(); + static bool isCached(const QUrl &url, const QRect &requestRegion, const QSize &requestSize, + const int frame, const QQuickImageProviderOptions &options); + static bool isScalableImageFormat(const QUrl &url); + + static const QLatin1String itemGrabberScheme; + +private: + Q_DISABLE_COPY(QQuickPixmap) + QQuickPixmapData *d; + friend class QQuickPixmapData; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPixmap::Options) + +// ### Qt 6: This should be made public in Qt 6. It's functionality can't be merged into +// QQuickImageProvider without breaking source compatibility. +class Q_QUICK_EXPORT QQuickImageProviderWithOptions : public QQuickAsyncImageProvider +{ +public: + QQuickImageProviderWithOptions(ImageType type, Flags flags = Flags()); + + QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) override; + QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) override; + QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize) override; + QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize) override; + + virtual QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); + virtual QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize, const QQuickImageProviderOptions &options); + virtual QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize, const QQuickImageProviderOptions &options); + virtual QQuickImageResponse *requestImageResponse(const QString &id, const QSize &requestedSize, const QQuickImageProviderOptions &options); + + static QSize loadSize(const QSize &originalSize, const QSize &requestedSize, const QByteArray &format, const QQuickImageProviderOptions &options, + qreal devicePixelRatio = 1.0); + static QQuickImageProviderWithOptions *checkedCast(QQuickImageProvider *provider); +}; + +QT_END_NAMESPACE + +#endif // QQUICKPIXMAP_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmapcache_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmapcache_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d323253eed69a6824894f953185cc60261a5b383 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpixmapcache_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPIXMAPCACHE_H +#define QQUICKPIXMAPCACHE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPixmapData; + +/*! \internal + A composite key to identify a QQuickPixmapData instance in a QHash. +*/ +struct Q_AUTOTEST_EXPORT QQuickPixmapKey +{ + const QUrl *url; + const QRect *region; + const QSize *size; + int frame; + QQuickImageProviderOptions options; +}; + +/*! \internal + A singleton managing the storage and garbage collection of QQuickPixmapData + instances. It's exported only for the sake of autotests, and should not be + manipulated outside qquickpixmap.cpp and qquickpixmapcache.cpp. +*/ +class Q_AUTOTEST_EXPORT QQuickPixmapCache : public QObject +{ + Q_OBJECT + +public: + static QQuickPixmapCache *instance(); + ~QQuickPixmapCache() override; + + void unreferencePixmap(QQuickPixmapData *); + void referencePixmap(QQuickPixmapData *); + + void purgeCache(); + +protected: + void timerEvent(QTimerEvent *) override; + +private: + QQuickPixmapCache() = default; + Q_DISABLE_COPY(QQuickPixmapCache) + + void shrinkCache(int remove); + int destroyCache(); + qsizetype referencedCost() const; + +private: + QHash m_cache; + mutable QMutex m_cacheMutex; // avoid simultaneous iteration and modification + + QQuickPixmapData *m_unreferencedPixmaps = nullptr; + QQuickPixmapData *m_lastUnreferencedPixmap = nullptr; + + int m_unreferencedCost = 0; + int m_timerId = -1; + bool m_destroying = false; + + friend class QQuickPixmap; + friend class QQuickPixmapData; + friend class tst_qquickpixmapcache; + friend class tst_qquicktext; + friend class tst_qquicktextedit; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPIXMAPCACHE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..39bde710ba0e676667a9ce368ee360255ad8d386 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p.h @@ -0,0 +1,62 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#include "qquickpointerhandler_p.h" + +#ifndef QQUICKPOINTERDEVICEHANDLER_H +#define QQUICKPOINTERDEVICEHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +class QQuickPointerDeviceHandlerPrivate; + +class Q_QUICK_EXPORT QQuickPointerDeviceHandler : public QQuickPointerHandler +{ + Q_OBJECT + Q_PROPERTY(QInputDevice::DeviceTypes acceptedDevices READ acceptedDevices WRITE + setAcceptedDevices NOTIFY acceptedDevicesChanged) + Q_PROPERTY(QPointingDevice::PointerTypes acceptedPointerTypes READ acceptedPointerTypes WRITE setAcceptedPointerTypes NOTIFY acceptedPointerTypesChanged) + Q_PROPERTY(Qt::MouseButtons acceptedButtons READ acceptedButtons WRITE setAcceptedButtons NOTIFY acceptedButtonsChanged) + Q_PROPERTY(Qt::KeyboardModifiers acceptedModifiers READ acceptedModifiers WRITE setAcceptedModifiers NOTIFY acceptedModifiersChanged) + +public: + explicit QQuickPointerDeviceHandler(QQuickItem *parent = nullptr); + + QInputDevice::DeviceTypes acceptedDevices() const; + QPointingDevice::PointerTypes acceptedPointerTypes() const; + Qt::MouseButtons acceptedButtons() const; + Qt::KeyboardModifiers acceptedModifiers() const; + +public Q_SLOTS: + void setAcceptedDevices(QInputDevice::DeviceTypes acceptedDevices); + void setAcceptedPointerTypes(QPointingDevice::PointerTypes acceptedPointerTypes); + void setAcceptedButtons(Qt::MouseButtons buttons); + void setAcceptedModifiers(Qt::KeyboardModifiers acceptedModifiers); + +Q_SIGNALS: + void acceptedDevicesChanged(); + void acceptedPointerTypesChanged(); + void acceptedButtonsChanged(); + void acceptedModifiersChanged(); + +protected: + QQuickPointerDeviceHandler(QQuickPointerDeviceHandlerPrivate &dd, QQuickItem *parent = nullptr); + + bool wantsPointerEvent(QPointerEvent *event) override; + + Q_DECLARE_PRIVATE(QQuickPointerDeviceHandler) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERDEVICEHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9fdaf604e7ef95aed14c5458a91c79dcf2e1e5db --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerdevicehandler_p_p.h @@ -0,0 +1,39 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERDEVICEHANDLER_P_H +#define QQUICKPOINTERDEVICEHANDLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickpointerdevicehandler_p.h" +#include "qquickpointerhandler_p_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPointerDeviceHandlerPrivate : public QQuickPointerHandlerPrivate +{ + Q_DECLARE_PUBLIC(QQuickPointerDeviceHandler) + +public: + static QQuickPointerDeviceHandlerPrivate* get(QQuickPointerDeviceHandler *q) { return q->d_func(); } + static const QQuickPointerDeviceHandlerPrivate* get(const QQuickPointerDeviceHandler *q) { return q->d_func(); } + + QPointingDevice::DeviceTypes acceptedDevices = QPointingDevice::DeviceType::AllDevices; + QPointingDevice::PointerTypes acceptedPointerTypes = QPointingDevice::PointerType::AllPointerTypes; + Qt::MouseButtons acceptedButtons = Qt::LeftButton; + Qt::KeyboardModifiers acceptedModifiers = Qt::KeyboardModifierMask; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERDEVICEHANDLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e21cdfc25b2b30b6a7ea30b1177c18257bcd7ae3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p.h @@ -0,0 +1,158 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERHANDLER_H +#define QQUICKPOINTERHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcPointerHandlerDispatch) + +class QQuickItem; +class QQuickPointerHandlerPrivate; +class QPointerEvent; + +class Q_QUICK_EXPORT QQuickPointerHandler : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(bool active READ active NOTIFY activeChanged) + Q_PROPERTY(QQuickItem * target READ target WRITE setTarget NOTIFY targetChanged) + Q_PROPERTY(QQuickItem * parent READ parentItem WRITE setParentItem NOTIFY parentChanged) + Q_PROPERTY(GrabPermissions grabPermissions READ grabPermissions WRITE setGrabPermissions NOTIFY grabPermissionChanged) + Q_PROPERTY(qreal margin READ margin WRITE setMargin NOTIFY marginChanged) + Q_PROPERTY(int dragThreshold READ dragThreshold WRITE setDragThreshold RESET resetDragThreshold NOTIFY dragThresholdChanged REVISION(2, 15)) +#if QT_CONFIG(cursor) + Q_PROPERTY(Qt::CursorShape cursorShape READ cursorShape WRITE setCursorShape RESET resetCursorShape NOTIFY cursorShapeChanged REVISION(2, 15)) +#endif + + Q_CLASSINFO("ParentProperty", "parent") + QML_NAMED_ELEMENT(PointerHandler) + QML_UNCREATABLE("PointerHandler is an abstract base class.") + QML_ADDED_IN_VERSION(2, 12) + +public: + explicit QQuickPointerHandler(QQuickItem *parent = nullptr); + ~QQuickPointerHandler(); + + enum GrabPermission { + TakeOverForbidden = 0x0, + CanTakeOverFromHandlersOfSameType = 0x01, + CanTakeOverFromHandlersOfDifferentType= 0x02, + CanTakeOverFromItems = 0x04, + CanTakeOverFromAnything = 0x0F, + ApprovesTakeOverByHandlersOfSameType = 0x10, + ApprovesTakeOverByHandlersOfDifferentType= 0x20, + ApprovesTakeOverByItems = 0x40, + ApprovesCancellation = 0x80, + ApprovesTakeOverByAnything = 0xF0 + }; + Q_DECLARE_FLAGS(GrabPermissions, GrabPermission) + Q_FLAG(GrabPermissions) + +public: + bool enabled() const; + void setEnabled(bool enabled); + + bool active() const; + + QQuickItem *target() const; + void setTarget(QQuickItem *target); + + QQuickItem * parentItem() const; + void setParentItem(QQuickItem *p); + + void handlePointerEvent(QPointerEvent *event); + + GrabPermissions grabPermissions() const; + void setGrabPermissions(GrabPermissions grabPermissions); + + qreal margin() const; + void setMargin(qreal pointDistanceThreshold); + + int dragThreshold() const; + void setDragThreshold(int t); + void resetDragThreshold(); + +#if QT_CONFIG(cursor) + Qt::CursorShape cursorShape() const; + void setCursorShape(Qt::CursorShape shape); + void resetCursorShape(); + bool isCursorShapeExplicitlySet() const; +#endif + +Q_SIGNALS: + void enabledChanged(); + void activeChanged(); + void targetChanged(); + void marginChanged(); + Q_REVISION(2, 15) void dragThresholdChanged(); + void grabChanged(QPointingDevice::GrabTransition transition, QEventPoint point); + void grabPermissionChanged(); + void canceled(QEventPoint point); +#if QT_CONFIG(cursor) + Q_REVISION(2, 15) void cursorShapeChanged(); +#endif + Q_REVISION(6, 3) void parentChanged(); + +protected: + QQuickPointerHandler(QQuickPointerHandlerPrivate &dd, QQuickItem *parent); + + void classBegin() override; + void componentComplete() override; + bool event(QEvent *) override; + + QPointerEvent *currentEvent(); + virtual bool wantsPointerEvent(QPointerEvent *event); + virtual bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point); + virtual void handlePointerEventImpl(QPointerEvent *event); + void setActive(bool active); + virtual void onTargetChanged(QQuickItem *oldTarget) { Q_UNUSED(oldTarget); } + virtual void onActiveChanged() { } + virtual void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, + QPointerEvent *event, QEventPoint &point); + virtual bool canGrab(QPointerEvent *event, const QEventPoint &point); + virtual bool approveGrabTransition(QPointerEvent *event, const QEventPoint &point, QObject *proposedGrabber); + void setPassiveGrab(QPointerEvent *event, const QEventPoint &point, bool grab = true); + bool setExclusiveGrab(QPointerEvent *ev, const QEventPoint &point, bool grab = true); + void cancelAllGrabs(QPointerEvent *event, QEventPoint &point); + QPointF eventPos(const QEventPoint &point) const; + bool parentContains(const QEventPoint &point) const; + bool parentContains(const QPointF &scenePosition) const; + + friend class QQuickDeliveryAgentPrivate; + friend class QQuickItemPrivate; + friend class QQuickMenuPrivate; + friend class QQuickWindowPrivate; + + Q_DECLARE_PRIVATE(QQuickPointerHandler) +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPointerHandler::GrabPermissions) + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c6cea64868e828f8ca77210be27156311cd3f6d5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointerhandler_p_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERHANDLER_P_H +#define QQUICKPOINTERHANDLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qevent.h" + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPointerHandlerPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickPointerHandler) + +public: + static QQuickPointerHandlerPrivate* get(QQuickPointerHandler *q) { return q->d_func(); } + static const QQuickPointerHandlerPrivate* get(const QQuickPointerHandler *q) { return q->d_func(); } + + QQuickPointerHandlerPrivate(); + + template + bool dragOverThreshold(qreal d, Qt::Axis axis, const TEventPoint &p) const; + + bool dragOverThreshold(QVector2D delta) const; + bool dragOverThreshold(const QEventPoint &point) const; + + virtual void onParentChanged(QQuickItem * /*oldParent*/, QQuickItem * /*newParent*/) {} + virtual void onEnabledChanged() {} + + static QVector &deviceDeliveryTargets(const QInputDevice *device); + + QPointerEvent *currentEvent = nullptr; + QQuickItem *target = nullptr; + qreal m_margin = 0; + quint64 lastEventTime = 0; + qint16 dragThreshold = -1; // -1 means use the platform default + uint8_t grabPermissions : 8; + Qt::CursorShape cursorShape : 6; + bool enabled : 1; + bool active : 1; + bool targetExplicitlySet : 1; + bool hadKeepMouseGrab : 1; // some handlers override target()->setKeepMouseGrab(); this remembers previous state + bool hadKeepTouchGrab : 1; // some handlers override target()->setKeepTouchGrab(); this remembers previous state + bool cursorSet : 1; + bool cursorDirty : 1; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERHANDLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..db810d8e579ac432937b4449c8fa2b66424bf9e0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpointhandler_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPONTHANDLER_H +#define QQUICKPONTHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicksinglepointhandler_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPointHandler : public QQuickSinglePointHandler +{ + Q_OBJECT + Q_PROPERTY(QVector2D translation READ translation NOTIFY translationChanged) + QML_NAMED_ELEMENT(PointHandler) + QML_ADDED_IN_VERSION(2, 12) + +public: + explicit QQuickPointHandler(QQuickItem *parent = nullptr); + + QVector2D translation() const; + +Q_SIGNALS: + void translationChanged(); + +protected: + bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override; + void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPONTHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p.h new file mode 100644 index 0000000000000000000000000000000000000000..58d58ba7b298716c20466c548cdf09c6e5875061 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p.h @@ -0,0 +1,375 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOSITIONERS_P_H +#define QQUICKPOSITIONERS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_positioners); + +#include "qquickimplicitsizeitem_p.h" +#if QT_CONFIG(quick_viewtransitions) +#include "qquickitemviewtransition_p.h" +#endif + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickBasePositionerPrivate; + +class QQuickPositionerAttached : public QObject +{ + Q_OBJECT + +public: + QQuickPositionerAttached(QObject *parent); + + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(bool isFirstItem READ isFirstItem NOTIFY isFirstItemChanged FINAL) + Q_PROPERTY(bool isLastItem READ isLastItem NOTIFY isLastItemChanged FINAL) + + int index() const { return m_index; } + void setIndex(int index); + + bool isFirstItem() const { return m_isFirstItem; } + void setIsFirstItem(bool isFirstItem); + + bool isLastItem() const { return m_isLastItem; } + void setIsLastItem(bool isLastItem); + +Q_SIGNALS: + void indexChanged(); + void isFirstItemChanged(); + void isLastItemChanged(); + +private: + int m_index; + bool m_isFirstItem; + bool m_isLastItem; +}; + +class Q_QUICK_EXPORT QQuickBasePositioner : public QQuickImplicitSizeItem +{ + Q_OBJECT + + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) +#if QT_CONFIG(quick_viewtransitions) + Q_PROPERTY(QQuickTransition *populate READ populate WRITE setPopulate NOTIFY populateChanged) + Q_PROPERTY(QQuickTransition *move READ move WRITE setMove NOTIFY moveChanged) + Q_PROPERTY(QQuickTransition *add READ add WRITE setAdd NOTIFY addChanged) +#endif + + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION(2, 6)) + + QML_NAMED_ELEMENT(Positioner) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Positioner is an abstract type that is only available as an attached property.") + QML_ATTACHED(QQuickPositionerAttached) + +public: + enum PositionerType { None = 0x0, Horizontal = 0x1, Vertical = 0x2, Both = 0x3 }; + + QQuickBasePositioner(PositionerType, QQuickItem *parent); + ~QQuickBasePositioner(); + + qreal spacing() const; + void setSpacing(qreal); + +#if QT_CONFIG(quick_viewtransitions) + QQuickTransition *populate() const; + void setPopulate(QQuickTransition *); + + QQuickTransition *move() const; + void setMove(QQuickTransition *); + + QQuickTransition *add() const; + void setAdd(QQuickTransition *); +#endif + + static QQuickPositionerAttached *qmlAttachedProperties(QObject *obj); + + void updateAttachedProperties(QQuickPositionerAttached *specificProperty = nullptr, QQuickItem *specificPropertyOwner = nullptr) const; + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + Q_REVISION(2, 9) Q_INVOKABLE void forceLayout(); + +protected: + QQuickBasePositioner(QQuickBasePositionerPrivate &dd, PositionerType at, QQuickItem *parent); + void componentComplete() override; + void itemChange(ItemChange, const ItemChangeData &) override; + + void updatePolish() override; + +Q_SIGNALS: + void spacingChanged(); + void populateChanged(); + void moveChanged(); + void addChanged(); + Q_REVISION(2, 6) void paddingChanged(); + Q_REVISION(2, 6) void topPaddingChanged(); + Q_REVISION(2, 6) void leftPaddingChanged(); + Q_REVISION(2, 6) void rightPaddingChanged(); + Q_REVISION(2, 6) void bottomPaddingChanged(); + Q_REVISION(2, 9) void positioningComplete(); + +protected Q_SLOTS: + void prePositioning(); + +protected: + virtual void doPositioning(QSizeF *contentSize)=0; + virtual void reportConflictingAnchors()=0; + + class PositionedItem + { + public : + PositionedItem(QQuickItem *i); + ~PositionedItem(); + bool operator==(const PositionedItem &other) const { return other.item == item; } + + qreal itemX() const; + qreal itemY() const; + + void moveTo(const QPointF &pos); + +#if QT_CONFIG(quick_viewtransitions) + void transitionNextReposition(QQuickItemViewTransitioner *transitioner, QQuickItemViewTransitioner::TransitionType type, bool asTarget); + bool prepareTransition(QQuickItemViewTransitioner *transitioner, const QRectF &viewBounds); + void startTransition(QQuickItemViewTransitioner *transitioner); +#endif + + void updatePadding(qreal lp, qreal tp, qreal rp, qreal bp); + + QQuickItem *item; +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitionableItem *transitionableItem; +#endif + int index; + bool isNew; + bool isVisible; + + qreal topPadding; + qreal leftPadding; + qreal rightPadding; + qreal bottomPadding; + }; + + QPODVector positionedItems; + QPODVector unpositionedItems;//Still 'in' the positioner, just not positioned + + void positionItem(qreal x, qreal y, PositionedItem *target); + void positionItemX(qreal, PositionedItem *target); + void positionItemY(qreal, PositionedItem *target); + + void removePositionedItem(QPODVector *items, int index); + void clearPositionedItems(QPODVector *items); + +private: + Q_DISABLE_COPY(QQuickBasePositioner) + Q_DECLARE_PRIVATE(QQuickBasePositioner) +}; + +class Q_QUICK_EXPORT QQuickColumn : public QQuickBasePositioner +{ + Q_OBJECT + QML_NAMED_ELEMENT(Column) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickColumn(QQuickItem *parent=nullptr); + +protected: + void doPositioning(QSizeF *contentSize) override; + void reportConflictingAnchors() override; +}; + +class QQuickRowPrivate; +class Q_QUICK_EXPORT QQuickRow: public QQuickBasePositioner +{ + Q_OBJECT + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged) + Q_PROPERTY(Qt::LayoutDirection effectiveLayoutDirection READ effectiveLayoutDirection NOTIFY effectiveLayoutDirectionChanged) + QML_NAMED_ELEMENT(Row) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickRow(QQuickItem *parent=nullptr); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Qt::LayoutDirection effectiveLayoutDirection() const; + +Q_SIGNALS: + void layoutDirectionChanged(); + void effectiveLayoutDirectionChanged(); + +protected: + void doPositioning(QSizeF *contentSize) override; + void reportConflictingAnchors() override; +private: + Q_DECLARE_PRIVATE(QQuickRow) +}; + +class QQuickGridPrivate; +class Q_QUICK_EXPORT QQuickGrid : public QQuickBasePositioner +{ + Q_OBJECT + Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged) + Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged) + Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged RESET resetRowSpacing) + Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged RESET resetColumnSpacing) + Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged) + Q_PROPERTY(Qt::LayoutDirection effectiveLayoutDirection READ effectiveLayoutDirection NOTIFY effectiveLayoutDirectionChanged) + Q_PROPERTY(HAlignment horizontalItemAlignment READ hItemAlign WRITE setHItemAlign NOTIFY horizontalAlignmentChanged REVISION(2, 1)) + Q_PROPERTY(HAlignment effectiveHorizontalItemAlignment READ effectiveHAlign NOTIFY effectiveHorizontalAlignmentChanged REVISION(2, 1)) + Q_PROPERTY(VAlignment verticalItemAlignment READ vItemAlign WRITE setVItemAlign NOTIFY verticalAlignmentChanged REVISION(2, 1)) + QML_NAMED_ELEMENT(Grid) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickGrid(QQuickItem *parent=nullptr); + + int rows() const { return m_rows; } + void setRows(const int rows); + + int columns() const { return m_columns; } + void setColumns(const int columns); + + qreal rowSpacing() const { return m_rowSpacing; } + void setRowSpacing(qreal); + void resetRowSpacing() { m_useRowSpacing = false; } + + qreal columnSpacing() const { return m_columnSpacing; } + void setColumnSpacing(qreal); + void resetColumnSpacing() { m_useColumnSpacing = false; } + + enum Flow { LeftToRight, TopToBottom }; + Q_ENUM(Flow) + Flow flow() const; + void setFlow(Flow); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Qt::LayoutDirection effectiveLayoutDirection() const; + + enum HAlignment { AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter}; + Q_ENUM(HAlignment) + enum VAlignment { AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter }; + Q_ENUM(VAlignment) + + HAlignment hItemAlign() const; + void setHItemAlign(HAlignment align); + HAlignment effectiveHAlign() const; + + VAlignment vItemAlign() const; + void setVItemAlign(VAlignment align); + +Q_SIGNALS: + void rowsChanged(); + void columnsChanged(); + void flowChanged(); + void layoutDirectionChanged(); + void effectiveLayoutDirectionChanged(); + void rowSpacingChanged(); + void columnSpacingChanged(); + Q_REVISION(2, 1) void horizontalAlignmentChanged(HAlignment alignment); + Q_REVISION(2, 1) void effectiveHorizontalAlignmentChanged(HAlignment alignment); + Q_REVISION(2, 1) void verticalAlignmentChanged(VAlignment alignment); + +protected: + void doPositioning(QSizeF *contentSize) override; + void reportConflictingAnchors() override; + +private: + int m_rows; + int m_columns; + qreal m_rowSpacing; + qreal m_columnSpacing; + bool m_useRowSpacing; + bool m_useColumnSpacing; + Flow m_flow; + HAlignment m_hItemAlign; + VAlignment m_vItemAlign; + Q_DECLARE_PRIVATE(QQuickGrid) +}; + +class QQuickFlowPrivate; +class Q_QUICK_EXPORT QQuickFlow: public QQuickBasePositioner +{ + Q_OBJECT + Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged) + Q_PROPERTY(Qt::LayoutDirection effectiveLayoutDirection READ effectiveLayoutDirection NOTIFY effectiveLayoutDirectionChanged) + QML_NAMED_ELEMENT(Flow) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickFlow(QQuickItem *parent=nullptr); + + enum Flow { LeftToRight, TopToBottom }; + Q_ENUM(Flow) + Flow flow() const; + void setFlow(Flow); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Qt::LayoutDirection effectiveLayoutDirection() const; + +Q_SIGNALS: + void flowChanged(); + void layoutDirectionChanged(); + void effectiveLayoutDirectionChanged(); + +protected: + void doPositioning(QSizeF *contentSize) override; + void reportConflictingAnchors() override; +protected: + QQuickFlow(QQuickFlowPrivate &dd, QQuickItem *parent); +private: + Q_DECLARE_PRIVATE(QQuickFlow) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOSITIONERS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3442e5ff4aeb05934ff61aac5a7eea9663e995ad --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpositioners_p_p.h @@ -0,0 +1,155 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOSITIONERS_P_P_H +#define QQUICKPOSITIONERS_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_positioners); + +#include "qquickpositioners_p.h" +#include "qquickimplicitsizeitem_p_p.h" + +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItemViewTransitioner; + +class QQuickBasePositionerPrivate : public QQuickImplicitSizeItemPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickBasePositioner) + +public: + struct ExtraData { + ExtraData(); + + qreal padding; + qreal topPadding; + qreal leftPadding; + qreal rightPadding; + qreal bottomPadding; + bool explicitTopPadding : 1; + bool explicitLeftPadding : 1; + bool explicitRightPadding : 1; + bool explicitBottomPadding : 1; + }; + QLazilyAllocated extra; + + QQuickBasePositionerPrivate() + : spacing(0), type(QQuickBasePositioner::None) +#if QT_CONFIG(quick_viewtransitions) + , transitioner(0) +#endif + , positioningDirty(false) + , doingPositioning(false), anchorConflict(false), layoutDirection(Qt::LeftToRight) + + { + } + + void init(QQuickBasePositioner::PositionerType at) + { + type = at; + } + + qreal spacing; + + QQuickBasePositioner::PositionerType type; +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitioner *transitioner; +#endif + + void watchChanges(QQuickItem *other); + void unwatchChanges(QQuickItem* other); + void setPositioningDirty() { + Q_Q(QQuickBasePositioner); + if (!positioningDirty) { + positioningDirty = true; + q->polish(); + } + } + + bool positioningDirty : 1; + bool doingPositioning : 1; + bool anchorConflict : 1; + + Qt::LayoutDirection layoutDirection; + + void mirrorChange() override { + effectiveLayoutDirectionChange(); + } + bool isLeftToRight() const { + if (type == QQuickBasePositioner::Vertical) + return true; + else + return effectiveLayoutMirror ? layoutDirection == Qt::RightToLeft : layoutDirection == Qt::LeftToRight; + } + + void itemSiblingOrderChanged(QQuickItem* other) override + { + Q_UNUSED(other); + setPositioningDirty(); + } + + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &) override + { + if (change.sizeChange()) + setPositioningDirty(); + } + + void itemVisibilityChanged(QQuickItem *) override + { + setPositioningDirty(); + } + + void itemDestroyed(QQuickItem *item) override + { + Q_Q(QQuickBasePositioner); + int index = q->positionedItems.find(QQuickBasePositioner::PositionedItem(item)); + if (index >= 0) + q->removePositionedItem(&q->positionedItems, index); + } + + static Qt::LayoutDirection getLayoutDirection(const QQuickBasePositioner *positioner) + { + return positioner->d_func()->layoutDirection; + } + + static Qt::LayoutDirection getEffectiveLayoutDirection(const QQuickBasePositioner *positioner) + { + if (positioner->d_func()->effectiveLayoutMirror) + return positioner->d_func()->layoutDirection == Qt::RightToLeft ? Qt::LeftToRight : Qt::RightToLeft; + else + return positioner->d_func()->layoutDirection; + } + + virtual void effectiveLayoutDirectionChange() + { + } + + inline qreal padding() const { return extra.isAllocated() ? extra->padding : 0.0; } + void setTopPadding(qreal value, bool reset = false); + void setLeftPadding(qreal value, bool reset = false); + void setRightPadding(qreal value, bool reset = false); + void setBottomPadding(qreal value, bool reset = false); +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOSITIONERS_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickprofiler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickprofiler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..49a68a4d0a6555704f73ee4c3602120f339ce8d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickprofiler_p.h @@ -0,0 +1,396 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPROFILER_P_H +#define QQUICKPROFILER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#if QT_CONFIG(qml_debug) +#include +#endif + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +#if !QT_CONFIG(qml_debug) + +#define Q_QUICK_PROFILE_IF_ENABLED(feature, Code) + +struct QQuickProfiler { + static void registerAnimationCallback() {} +}; + +#else + +#define Q_QUICK_PROFILE_IF_ENABLED(feature, Code)\ + if (QQuickProfiler::featuresEnabled & (1 << feature)) {\ + Code;\ + } else\ + (void)0 + +// This struct is somewhat dangerous to use: +// You can save values either with 32 or 64 bit precision. toByteArrays will +// guess the precision from messageType. If you state the wrong messageType +// you will get undefined results. +// The messageType is itself a bit field. You can pack multiple messages into +// one object, e.g. RangeStart and RangeLocation. Each one will be read +// independently by toByteArrays. Thus you can only pack messages if their data +// doesn't overlap. Again, it's up to you to figure that out. +struct Q_AUTOTEST_EXPORT QQuickProfilerData +{ + QQuickProfilerData() {} + + QQuickProfilerData(qint64 time, int messageType, int detailType, const QUrl &url, int x = 0, + int y = 0, int framerate = 0, int count = 0) : + time(time), messageType(messageType), detailType(detailType), detailUrl(url), x(x), y(y), + framerate(framerate), count(count) {} + + QQuickProfilerData(qint64 time, int messageType, int detailType, int framerateOrInputType = 0, + int countOrInputA = 0, int threadIdOrInputB = 0) : + time(time), messageType(messageType), detailType(detailType), + framerate(framerateOrInputType), count(countOrInputA), threadId(threadIdOrInputB) {} + + // Special ctor for scenegraph frames. Note that it's missing the QString/QUrl params. + // This is slightly ugly, but makes it easier to disambiguate between int and qint64 params. + QQuickProfilerData(qint64 time, int messageType, int detailType, qint64 d1, qint64 d2, + qint64 d3, qint64 d4, qint64 d5) : + time(time), messageType(messageType), detailType(detailType), subtime_1(d1), subtime_2(d2), + subtime_3(d3), subtime_4(d4), subtime_5(d5) {} + + + qint64 time; + int messageType; //bit field of Message + int detailType; + + QUrl detailUrl; + + union { + qint64 subtime_1; + int x; //used for pixmaps + }; + + union { + qint64 subtime_2; + int y; //used for pixmaps + }; + + union { + qint64 subtime_3; + int framerate; //used by animation events + int inputType; + }; + + union { + qint64 subtime_4; + int count; //used by animation events and for pixmaps + int inputA; //used by input events + }; + + union { + qint64 subtime_5; + int threadId; + int inputB; //used by input events + }; +}; + +Q_DECLARE_TYPEINFO(QQuickProfilerData, Q_RELOCATABLE_TYPE); + +class QQuickProfilerSceneGraphData : public QQmlProfilerDefinitions { +private: + static const uint s_numSceneGraphTimings = 5; + + template + struct TimingData { + qint64 values[size][s_numSceneGraphTimings + 1]; + }; + + QThreadStorage > renderThreadTimings; + TimingData guiThreadTimings; + +public: + template + qint64 *timings() + { + if constexpr (type < NumRenderThreadFrameTypes) + return renderThreadTimings.localData().values[type]; + else + return guiThreadTimings.values[type - NumRenderThreadFrameTypes]; + } +}; + +class Q_QUICK_EXPORT QQuickProfiler : public QObject, public QQmlProfilerDefinitions { + Q_OBJECT +public: + + enum AnimationThread { + GuiThread, + RenderThread + }; + + enum SceneGraphContextStage { + SceneGraphContextStart, + SceneGraphContextMaterialCompile + }; + + enum SceneGraphRendererStage { + SceneGraphRendererStart, + SceneGraphRendererPreprocess, + SceneGraphRendererUpdate, + SceneGraphRendererBinding, + SceneGraphRendererRender + }; + + enum SceneGraphAdaptationLayerStage { + SceneGraphAdaptationLayerStart, + SceneGraphAdaptationLayerGlyphRender, + SceneGraphAdaptationLayerGlyphStore + }; + + enum SceneGraphRenderLoopStage { + SceneGraphRenderLoopStart, + SceneGraphRenderLoopSync, + SceneGraphRenderLoopRender, + SceneGraphRenderLoopSwap + }; + + enum SceneGraphPolishStage { + SceneGraphPolishStart, + SceneGraphPolishPolish + }; + + enum SceneGraphPolishAndSyncStage { + SceneGraphPolishAndSyncStart, + SceneGraphPolishAndSyncPolish, + SceneGraphPolishAndSyncWait, + SceneGraphPolishAndSyncSync, + SceneGraphPolishAndSyncAnimations + }; + + enum SceneGraphTexturePrepareStage { + SceneGraphTexturePrepareStart, + SceneGraphTexturePrepareBind, + SceneGraphTexturePrepareConvert, + SceneGraphTexturePrepareSwizzle, + SceneGraphTexturePrepareUpload, + SceneGraphTexturePrepareMipmap + }; + + enum SceneGraphTextureDeletionStage { + SceneGraphTextureDeletionStart, + SceneGraphTextureDeletionDelete + }; + + template + static void inputEvent(int x, int y = 0) + { + s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), 1 << Event, + 1 << DetailType, InputType, x, y)); + } + + static void animationFrame(qint64 delta, AnimationThread threadId) + { + int animCount = QUnifiedTimer::instance()->runningAnimationCount(); + + if (animCount > 0 && delta > 0) { + s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), 1 << Event, + 1 << AnimationFrame, 1000 / (int)delta /* trim fps to integer */, animCount, + threadId)); + } + } + + template + static void startSceneGraphFrame() + { + startSceneGraphFrame(); + s_instance->m_sceneGraphData.timings()[0] = + s_instance->m_sceneGraphData.timings()[0]; + } + + template + static void startSceneGraphFrame() + { + s_instance->m_sceneGraphData.timings()[0] = s_instance->timestamp(); + } + + template + static void recordSceneGraphTimestamp(uint position) + { + s_instance->m_sceneGraphData.timings()[position] = s_instance->timestamp(); + } + + template + static void skipSceneGraphTimestamps(uint position) + { + qint64 *timings = s_instance->m_sceneGraphData.timings(); + const qint64 last = timings[position]; + for (uint i = 0; i < Skip; ++i) + timings[++position] = last; + } + + template + static void reportSceneGraphFrame(uint position, quint64 payload = ~0) + { + qint64 *timings = s_instance->m_sceneGraphData.timings(); + if (Record) + timings[position] = s_instance->timestamp(); + s_instance->processMessage(QQuickProfilerData( + timings[position], 1 << SceneGraphFrame, 1 << FrameType, + position > 0 ? timings[1] - timings[0] : payload, + position > 1 ? timings[2] - timings[1] : payload, + position > 2 ? timings[3] - timings[2] : payload, + position > 3 ? timings[4] - timings[3] : payload, + position > 4 ? timings[5] - timings[4] : payload)); + } + + template + static void reportSceneGraphFrame(uint position, quint64 payload = ~0) + { + reportSceneGraphFrame(position, payload); + s_instance->m_sceneGraphData.timings()[0] = + s_instance->m_sceneGraphData.timings()[position]; + } + + template + static void pixmapStateChanged(const QUrl &url) + { + s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), + 1 << PixmapCacheEvent, 1 << PixmapState, url)); + } + + static void pixmapLoadingFinished(const QUrl &url, const QSize &size) + { + s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), + 1 << PixmapCacheEvent, + (1 << PixmapLoadingFinished) | ((size.width() > 0 && size.height() > 0) ? (1 << PixmapSizeKnown) : 0), + url, size.width(), size.height())); + } + + template + static void pixmapCountChanged(const QUrl &url, int count) + { + s_instance->processMessage(QQuickProfilerData(s_instance->timestamp(), + 1 << PixmapCacheEvent, 1 << CountType, url, 0, 0, 0, count)); + } + + static void registerAnimationCallback(); + + qint64 timestamp() { return m_timer.nsecsElapsed(); } + + static quint64 featuresEnabled; + + static void initialize(QObject *parent); + + ~QQuickProfiler() override; + +Q_SIGNALS: + void dataReady(const QVector &data); + +protected: + friend class QQuickProfilerAdapter; + + static QQuickProfiler *s_instance; + QMutex m_dataMutex; + QElapsedTimer m_timer; + QVector m_data; + QQuickProfilerSceneGraphData m_sceneGraphData; + + QQuickProfiler(QObject *parent); + + void processMessage(const QQuickProfilerData &message) + { + QMutexLocker lock(&m_dataMutex); + if (Q_LIKELY(m_data.isEmpty() || m_data.last().time <= message.time)) { + m_data.append(message); + return; + } + + // Since the scenegraph data is recorded from different threads, contention for the lock + // can cause it to be processed out of order here. Insert the message at the right place. + const auto it = std::find_if( + m_data.rbegin(), m_data.rend(), + [t = message.time](const QQuickProfilerData &i) { return i.time <= t; }); + m_data.insert(it.base(), message); + } + + void startProfilingImpl(quint64 features); + void stopProfilingImpl(); + void reportDataImpl(); + void setTimer(const QElapsedTimer &t); +}; + +#endif // QT_CONFIG(qml_debug) + +#define Q_QUICK_PROFILE(feature, Method)\ + Q_QUICK_PROFILE_IF_ENABLED(feature, QQuickProfiler::Method) + +// Record current timestamp for \a Type at position 0. +#define Q_QUICK_SG_PROFILE_START(Type)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::startSceneGraphFrame())) + +// Record current timestamp for \a Type at \a position. +#define Q_QUICK_SG_PROFILE_RECORD(Type, position)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::recordSceneGraphTimestamp(position))) + +// Use the timestamp for \a Type at position \a position and repeat it \a Skip times in subsequent +// positions. +#define Q_QUICK_SG_PROFILE_SKIP(Type, position, Skip)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::skipSceneGraphTimestamps(position))) + +// Record current timestamp for both \a Type1 and \a Type2 at position 0. +#define Q_QUICK_SG_PROFILE_START_SYNCHRONIZED(Type1, Type2)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::startSceneGraphFrame())) + +// report \a Type1, using the current timestamp at \a position, and switch to \a Typ2, using +// the current timestamp at position 0. +#define Q_QUICK_SG_PROFILE_SWITCH(Type1, Type2, position)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame(\ + position))) + +// report \a Type, using data points 0 to \a position, including \a position. +#define Q_QUICK_SG_PROFILE_REPORT(Type, position)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame(position))) + +// report \a Type, using data points 0 to \a position, including \a position, and setting the +// timestamp at \a position to the current one. +#define Q_QUICK_SG_PROFILE_END(Type, position)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame(position))) + +// report \a Type, using data points 0 to \a position, including \a position, and setting the +// timestamp at \a position to the current one. Remaining data points up to position 5 are filled +// with \a Payload. +#define Q_QUICK_SG_PROFILE_END_WITH_PAYLOAD(Type, position, Payload)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileSceneGraph,\ + (QQuickProfiler::reportSceneGraphFrame(position,\ + Payload))) + +#define Q_QUICK_INPUT_PROFILE(Type, DetailType, A, B)\ + Q_QUICK_PROFILE_IF_ENABLED(QQuickProfiler::ProfileInputEvents,\ + (QQuickProfiler::inputEvent(A, B))) + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpropertychanges_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpropertychanges_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fee0937e67a1260670b638158a8c729f4fdc77d8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickpropertychanges_p.h @@ -0,0 +1,92 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPROPERTYCHANGES_H +#define QQUICKPROPERTYCHANGES_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstatechangescript_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickPropertyChangesPrivate; +class Q_QUICK_EXPORT QQuickPropertyChanges : public QQuickStateOperation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickPropertyChanges) + Q_PROPERTY(QObject *target READ object WRITE setObject NOTIFY objectChanged) + Q_PROPERTY(bool restoreEntryValues READ restoreEntryValues WRITE setRestoreEntryValues + NOTIFY restoreEntryValuesChanged) + Q_PROPERTY(bool explicit READ isExplicit WRITE setIsExplicit NOTIFY isExplicitChanged) + QML_NAMED_ELEMENT(PropertyChanges) + QML_ADDED_IN_VERSION(2, 0) + QML_CUSTOMPARSER + Q_CLASSINFO("ImmediatePropertyNames", "target,restoreEntryValues,explicit,objectName") + +public: + QQuickPropertyChanges(); + ~QQuickPropertyChanges(); + + QObject *object() const; + void setObject(QObject *); + + bool restoreEntryValues() const; + void setRestoreEntryValues(bool); + + bool isExplicit() const; + void setIsExplicit(bool); + + ActionList actions() override; + + bool containsProperty(const QString &name) const; + bool containsValue(const QString &name) const; + bool containsExpression(const QString &name) const; + void changeValue(const QString &name, const QVariant &value); + void changeExpression(const QString &name, const QString &expression); + void removeProperty(const QString &name); + QVariant value(const QString &name) const; + QString expression(const QString &name) const; + + void detachFromState(); + void attachToState(); + + QVariant property(const QString &name) const; + +Q_SIGNALS: + void objectChanged(); + void restoreEntryValuesChanged(); + void isExplicitChanged(); +}; + +class QQuickPropertyChangesParser : public QQmlCustomParser +{ +public: + QQuickPropertyChangesParser() + : QQmlCustomParser(AcceptsAttachedProperties) {} + + void verifyList(const QQmlRefPointer &compilationUnit, const QV4::CompiledData::Binding *binding); + + void verifyBindings(const QQmlRefPointer &compilationUnit, const QList &props) override; + void applyBindings(QObject *obj, const QQmlRefPointer &compilationUnit, const QList &bindings) override; +}; + +template<> +inline QQmlCustomParser *qmlCreateCustomParser() +{ + return new QQuickPropertyChangesParser; +} + +QT_END_NAMESPACE + +#endif // QQUICKPROPERTYCHANGES_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..713d07aa513569e3fd2a89d667a5750edf276001 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p.h @@ -0,0 +1,191 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRECTANGLE_P_H +#define QQUICKRECTANGLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" + +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickPen : public QObject +{ + Q_OBJECT + + Q_PROPERTY(qreal width READ width WRITE setWidth NOTIFY widthChanged FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL) + Q_PROPERTY(bool pixelAligned READ pixelAligned WRITE setPixelAligned NOTIFY pixelAlignedChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickPen(QObject *parent=nullptr); + + qreal width() const; + void setWidth(qreal w); + + QColor color() const; + void setColor(const QColor &c); + + bool pixelAligned() const; + void setPixelAligned(bool aligned); + + bool isValid() const; + +Q_SIGNALS: + void widthChanged(); + void colorChanged(); + void pixelAlignedChanged(); + +private: + qreal m_width; + QColor m_color; + bool m_aligned : 1; + bool m_valid : 1; +}; + +class Q_QUICK_EXPORT QQuickGradientStop : public QObject +{ + Q_OBJECT + + Q_PROPERTY(qreal position READ position WRITE setPosition) + Q_PROPERTY(QColor color READ color WRITE setColor) + QML_NAMED_ELEMENT(GradientStop) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickGradientStop(QObject *parent=nullptr); + + qreal position() const; + void setPosition(qreal position); + + QColor color() const; + void setColor(const QColor &color); + +private: + void updateGradient(); + +private: + qreal m_position; + QColor m_color; +}; + +class Q_QUICK_EXPORT QQuickGradient : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQmlListProperty stops READ stops) + Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged REVISION(2, 12)) + Q_CLASSINFO("DefaultProperty", "stops") + QML_NAMED_ELEMENT(Gradient) + QML_ADDED_IN_VERSION(2, 0) + QML_EXTENDED_NAMESPACE(QGradient) + +public: + QQuickGradient(QObject *parent=nullptr); + ~QQuickGradient() override; + + enum Orientation { Vertical = Qt::Vertical, + Horizontal = Qt::Horizontal }; + Q_ENUM(Orientation) + + QQmlListProperty stops(); + + Orientation orientation() const { return m_orientation; } + void setOrientation(Orientation orientation); + + QGradientStops gradientStops() const; + +Q_SIGNALS: + void updated(); + void orientationChanged(); + +private: + void doUpdate(); + +private: + QList m_stops; + Orientation m_orientation = Vertical; + friend class QQuickRectangle; + friend class QQuickGradientStop; +}; + +class QQuickRectanglePrivate; +class Q_QUICK_EXPORT QQuickRectangle : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(QJSValue gradient READ gradient WRITE setGradient RESET resetGradient) + Q_PROPERTY(QQuickPen * border READ border CONSTANT) + Q_PROPERTY(qreal radius READ radius WRITE setRadius NOTIFY radiusChanged) + Q_PROPERTY(qreal topLeftRadius READ topLeftRadius WRITE setTopLeftRadius NOTIFY topLeftRadiusChanged RESET resetTopLeftRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal topRightRadius READ topRightRadius WRITE setTopRightRadius NOTIFY topRightRadiusChanged RESET resetTopRightRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal bottomLeftRadius READ bottomLeftRadius WRITE setBottomLeftRadius NOTIFY bottomLeftRadiusChanged RESET resetBottomLeftRadius REVISION(6, 7) FINAL) + Q_PROPERTY(qreal bottomRightRadius READ bottomRightRadius WRITE setBottomRightRadius NOTIFY bottomRightRadiusChanged RESET resetBottomRightRadius REVISION(6, 7) FINAL) + QML_NAMED_ELEMENT(Rectangle) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickRectangle(QQuickItem *parent=nullptr); + + QColor color() const; + void setColor(const QColor &); + + QQuickPen *border(); + + QJSValue gradient() const; + void setGradient(const QJSValue &gradient); + void resetGradient(); + + qreal radius() const; + void setRadius(qreal radius); + + qreal topLeftRadius() const; + void setTopLeftRadius(qreal radius); + void resetTopLeftRadius(); + qreal topRightRadius() const; + void setTopRightRadius(qreal radius); + void resetTopRightRadius(); + qreal bottomLeftRadius() const; + void setBottomLeftRadius(qreal radius); + void resetBottomLeftRadius(); + qreal bottomRightRadius() const; + void setBottomRightRadius(qreal radius); + void resetBottomRightRadius(); + +Q_SIGNALS: + void colorChanged(); + void radiusChanged(); + Q_REVISION(6, 7) void topLeftRadiusChanged(); + Q_REVISION(6, 7) void topRightRadiusChanged(); + Q_REVISION(6, 7) void bottomLeftRadiusChanged(); + Q_REVISION(6, 7) void bottomRightRadiusChanged(); + +protected: + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + +private Q_SLOTS: + void doUpdate(); + +private: + Q_DISABLE_COPY(QQuickRectangle) + Q_DECLARE_PRIVATE(QQuickRectangle) +}; + +QT_END_NAMESPACE + +#endif // QQUICKRECTANGLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9d17aa45b7eb86bce522d711afab895ad96688eb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrectangle_p_p.h @@ -0,0 +1,68 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRECTANGLE_P_P_H +#define QQUICKRECTANGLE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickGradient; +class QQuickRectangle; +class QQuickRectanglePrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickRectangle) + +public: + QQuickRectanglePrivate() : + color(Qt::white), gradient(QJSValue::UndefinedValue), pen(0), radius(0) + { + } + + ~QQuickRectanglePrivate() + { + } + + QColor color; + QJSValue gradient; + QQuickPen *pen; + qreal radius; + + struct ExtraData { + ExtraData() + : topLeftRadius(-1.), + topRightRadius(-1.), + bottomLeftRadius(-1.), + bottomRightRadius(-1.) + { + } + + qreal topLeftRadius; + qreal topRightRadius; + qreal bottomLeftRadius; + qreal bottomRightRadius; + }; + QLazilyAllocated extraRectangle; + + static int doUpdateSlotIdx; + + void maybeSetImplicitAntialiasing(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKRECTANGLE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendercontrol_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendercontrol_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1369c9bd95584578078fba46324700346c35a4f9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendercontrol_p.h @@ -0,0 +1,76 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRENDERCONTROL_P_H +#define QQUICKRENDERCONTROL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickrendercontrol.h" +#include + +QT_BEGIN_NAMESPACE + +class QRhi; +class QRhiCommandBuffer; +class QOffscreenSurface; +class QQuickGraphicsConfiguration; + +class Q_QUICK_EXPORT QQuickRenderControlPrivate : public QObjectPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickRenderControl) + + enum FrameStatus { + NotRecordingFrame, + RecordingFrame, + DeviceLostInBeginFrame, + ErrorInBeginFrame + }; + + QQuickRenderControlPrivate(QQuickRenderControl *renderControl); + + static QQuickRenderControlPrivate *get(QQuickRenderControl *renderControl) { + return renderControl->d_func(); + } + + static bool isRenderWindowFor(QQuickWindow *quickWin, const QWindow *renderWin); + virtual bool isRenderWindow(const QWindow *w); + + static void cleanup(); + + void windowDestroyed(); + + void update(); + void maybeUpdate(); + + bool initRhi(); + void resetRhi(const QQuickGraphicsConfiguration &config); + + QImage grab(); + + QQuickRenderControl *q; + bool initialized; + QQuickWindow *window; + static QSGContext *sg; + QSGRenderContext *rc; + QRhi *rhi; + bool ownRhi; + QRhiCommandBuffer *cb; + QOffscreenSurface *offscreenSurface; + int sampleCount; + FrameStatus frameStatus; +}; + +QT_END_NAMESPACE + +#endif // QQUICKRENDERCONTROL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendertarget_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendertarget_p.h new file mode 100644 index 0000000000000000000000000000000000000000..32ed74e9ed4fff992ff5fffad5ceade2c294eaa6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrendertarget_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRENDERTARGET_P_H +#define QQUICKRENDERTARGET_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qquickrendertarget.h" +#include + +QT_BEGIN_NAMESPACE + +class QRhi; +struct QQuickWindowRenderTarget; + +class Q_QUICK_EXPORT QQuickRenderTargetPrivate +{ +public: + static QQuickRenderTargetPrivate *get(QQuickRenderTarget *rt) { return rt->d; } + static const QQuickRenderTargetPrivate *get(const QQuickRenderTarget *rt) { return rt->d; } + QQuickRenderTargetPrivate(); + QQuickRenderTargetPrivate(const QQuickRenderTargetPrivate &other); + bool resolve(QRhi *rhi, QQuickWindowRenderTarget *dst); + + enum class Type { + Null, + NativeTexture, + NativeTextureArray, + NativeRenderbuffer, + RhiRenderTarget, + PaintDevice + }; + + QAtomicInt ref; + Type type = Type::Null; + QSize pixelSize; + qreal devicePixelRatio = 1.0; + int sampleCount = 1; + struct NativeTexture { + quint64 object; + int layoutOrState; + uint rhiFormat; + uint rhiFormatFlags; + uint rhiViewFormat; + uint rhiViewFormatFlags; + }; + struct NativeTextureArray { + quint64 object; + int layoutOrState; + int arraySize; + uint rhiFormat; + uint rhiFormatFlags; + uint rhiViewFormat; + uint rhiViewFormatFlags; + }; + union { + NativeTexture nativeTexture; + NativeTextureArray nativeTextureArray; + quint64 nativeRenderbufferObject; + QRhiRenderTarget *rhiRt; + QPaintDevice *paintDevice; + } u; + + QRhiTexture *customDepthTexture = nullptr; + bool mirrorVertically = false; + bool multisampleResolve = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKRENDERTARGET_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p.h new file mode 100644 index 0000000000000000000000000000000000000000..49bba335608b0fa8ec97cc514cc994383a07f9e5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKREPEATER_P_H +#define QQUICKREPEATER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" + +#include + +QT_REQUIRE_CONFIG(quick_repeater); + +QT_BEGIN_NAMESPACE + +class QQmlChangeSet; + +class QQuickRepeaterPrivate; +class Q_QUICK_EXPORT QQuickRepeater : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(int count READ count NOTIFY countChanged) + Q_CLASSINFO("DefaultProperty", "delegate") + QML_NAMED_ELEMENT(Repeater) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickRepeater(QQuickItem *parent=nullptr); + virtual ~QQuickRepeater(); + + QVariant model() const; + void setModel(const QVariant &); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); + + int count() const; + + Q_INVOKABLE QQuickItem *itemAt(int index) const; + +Q_SIGNALS: + void modelChanged(); + void delegateChanged(); + void countChanged(); + + void itemAdded(int index, QQuickItem *item); + void itemRemoved(int index, QQuickItem *item); + +private: + void clear(); + void regenerate(); + +protected: + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + +private Q_SLOTS: + void createdItem(int index, QObject *item); + void initItem(int, QObject *item); + void modelUpdated(const QQmlChangeSet &changeSet, bool reset); + +private: + Q_DISABLE_COPY(QQuickRepeater) + Q_DECLARE_PRIVATE(QQuickRepeater) +}; + +QT_END_NAMESPACE + +#endif // QQUICKREPEATER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f104aa18da0213638ebc117de1060ffc37e4048f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrepeater_p_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKREPEATER_P_P_H +#define QQUICKREPEATER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickrepeater_p.h" +#include "qquickitem_p.h" + +#include + +QT_REQUIRE_CONFIG(quick_repeater); + +QT_BEGIN_NAMESPACE + +class QQmlContext; +class QQmlInstanceModel; +class QQuickRepeaterPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickRepeater) + +public: + QQuickRepeaterPrivate(); + ~QQuickRepeaterPrivate(); + +private: + void requestItems(); + + QPointer model; + QVariant dataSource; + QPointer dataSourceAsObject; + bool ownModel : 1; + bool dataSourceIsObject : 1; + bool delegateValidated : 1; + int itemCount; + + QVector > deletables; +}; + +QT_END_NAMESPACE + +#endif // QQUICKREPEATER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrhiitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrhiitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1fce010684bc8c9915e184972f0a1fea48098395 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickrhiitem_p.h @@ -0,0 +1,101 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRHIITEM_P_H +#define QQUICKRHIITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickrhiitem.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickRhiItemNode : public QSGTextureProvider, public QSGSimpleTextureNode +{ + Q_OBJECT + +public: + QQuickRhiItemNode(QQuickRhiItem *item); + + QSGTexture *texture() const override; + + void sync(); + QRhiCommandBuffer *queryCommandBuffer(); + void resetColorBufferObjects(); + void resetRenderTargetObjects(); + + bool isValid() const + { + return m_rhi && m_sgTexture; + } + + void scheduleUpdate() + { + m_renderPending = true; + m_window->update(); // ensure getting to beforeRendering() at some point + } + + bool hasRenderer() const + { + return m_renderer != nullptr; + } + + void setRenderer(QQuickRhiItemRenderer *r) + { + m_renderer.reset(r); + } + + QQuickRhiItem *m_item; + QQuickWindow *m_window; + QSize m_pixelSize; + qreal m_dpr = 0.0f; + QRhi *m_rhi = nullptr; + bool m_renderPending = true; + std::unique_ptr m_sgTexture; + std::unique_ptr m_renderer; + QRhiTexture *m_colorTexture = nullptr; + QRhiTexture *m_resolveTexture = nullptr; + std::unique_ptr m_msaaColorBuffer; + std::unique_ptr m_depthStencilBuffer; + std::unique_ptr m_renderTarget; + std::unique_ptr m_renderPassDescriptor; + +public slots: + void render(); +}; + +class QQuickRhiItemPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickRhiItem) + +public: + static QQuickRhiItemPrivate *get(QQuickRhiItem *item) { return item->d_func(); } + + mutable QQuickRhiItemNode *node = nullptr; + QQuickRhiItem::TextureFormat itemTextureFormat = QQuickRhiItem::TextureFormat::RGBA8; + QRhiTexture::Format rhiTextureFormat = QRhiTexture::RGBA8; + int samples = 1; + bool autoRenderTarget = true; + bool mirrorVertically = false; + bool blend = false; + int fixedTextureWidth = 0; + int fixedTextureHeight = 0; + QSize effectiveTextureSize; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscalegrid_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscalegrid_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b38e73b34fb9f72addc5f2b0f42ead342c95bf47 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscalegrid_p_p.h @@ -0,0 +1,102 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCALEGRID_P_P_H +#define QQUICKSCALEGRID_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickborderimage_p.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickScaleGrid : public QObject +{ + Q_OBJECT + + Q_PROPERTY(int left READ left WRITE setLeft NOTIFY leftBorderChanged FINAL) + Q_PROPERTY(int top READ top WRITE setTop NOTIFY topBorderChanged FINAL) + Q_PROPERTY(int right READ right WRITE setRight NOTIFY rightBorderChanged FINAL) + Q_PROPERTY(int bottom READ bottom WRITE setBottom NOTIFY bottomBorderChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickScaleGrid(QObject *parent=nullptr); + + bool isNull() const; + + int left() const { return _left; } + void setLeft(int); + + int top() const { return _top; } + void setTop(int); + + int right() const { return _right; } + void setRight(int); + + int bottom() const { return _bottom; } + void setBottom(int); + +Q_SIGNALS: + void borderChanged(); + void leftBorderChanged(); + void topBorderChanged(); + void rightBorderChanged(); + void bottomBorderChanged(); + +private: + int _left; + int _top; + int _right; + int _bottom; +}; + +class Q_AUTOTEST_EXPORT QQuickGridScaledImage +{ +public: + QQuickGridScaledImage(); + QQuickGridScaledImage(const QQuickGridScaledImage &); + QQuickGridScaledImage(QIODevice*); + QQuickGridScaledImage &operator=(const QQuickGridScaledImage &); + bool isValid() const; + int gridLeft() const; + int gridRight() const; + int gridTop() const; + int gridBottom() const; + QQuickBorderImage::TileMode horizontalTileRule() const { return _h; } + QQuickBorderImage::TileMode verticalTileRule() const { return _v; } + + QString pixmapUrl() const; + +private: + static QQuickBorderImage::TileMode stringToRule(QStringView); + +private: + int _l; + int _r; + int _t; + int _b; + QQuickBorderImage::TileMode _h; + QQuickBorderImage::TileMode _v; + QString _pix; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSCALEGRID_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscreen_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscreen_p.h new file mode 100644 index 0000000000000000000000000000000000000000..04869af4b2274f5aad26dc7255e11841065df068 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickscreen_p.h @@ -0,0 +1,133 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCREEN_P_H +#define QQUICKSCREEN_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + + +class QQuickItem; +class QQuickWindow; +class QScreen; + + +class Q_QUICK_EXPORT QQuickScreenInfo : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString name READ name NOTIFY nameChanged FINAL) + Q_PROPERTY(QString manufacturer READ manufacturer NOTIFY manufacturerChanged REVISION(2, 10) FINAL) + Q_PROPERTY(QString model READ model NOTIFY modelChanged REVISION(2, 10) FINAL) + Q_PROPERTY(QString serialNumber READ serialNumber NOTIFY serialNumberChanged REVISION(2, 10) FINAL) + Q_PROPERTY(int width READ width NOTIFY widthChanged FINAL) + Q_PROPERTY(int height READ height NOTIFY heightChanged FINAL) + Q_PROPERTY(int desktopAvailableWidth READ desktopAvailableWidth NOTIFY desktopGeometryChanged FINAL) + Q_PROPERTY(int desktopAvailableHeight READ desktopAvailableHeight NOTIFY desktopGeometryChanged FINAL) + Q_PROPERTY(qreal logicalPixelDensity READ logicalPixelDensity NOTIFY logicalPixelDensityChanged FINAL) + Q_PROPERTY(qreal pixelDensity READ pixelDensity NOTIFY pixelDensityChanged FINAL) + Q_PROPERTY(qreal devicePixelRatio READ devicePixelRatio NOTIFY devicePixelRatioChanged FINAL) + Q_PROPERTY(Qt::ScreenOrientation primaryOrientation READ primaryOrientation NOTIFY primaryOrientationChanged FINAL) + Q_PROPERTY(Qt::ScreenOrientation orientation READ orientation NOTIFY orientationChanged FINAL) + + Q_PROPERTY(int virtualX READ virtualX NOTIFY virtualXChanged REVISION(2, 3) FINAL) + Q_PROPERTY(int virtualY READ virtualY NOTIFY virtualYChanged REVISION(2, 3) FINAL) + QML_NAMED_ELEMENT(ScreenInfo) + QML_ADDED_IN_VERSION(2, 3) + QML_UNCREATABLE("ScreenInfo can only be used via the attached property.") + +public: + QQuickScreenInfo(QObject *parent = nullptr, QScreen *wrappedScreen = nullptr); + + QString name() const; + QString manufacturer() const; + QString model() const; + QString serialNumber() const; + int width() const; + int height() const; + int desktopAvailableWidth() const; + int desktopAvailableHeight() const; + qreal logicalPixelDensity() const; + qreal pixelDensity() const; + qreal devicePixelRatio() const; + Qt::ScreenOrientation primaryOrientation() const; + Qt::ScreenOrientation orientation() const; + int virtualX() const; + int virtualY() const; + + void setWrappedScreen(QScreen *screen); + QScreen *wrappedScreen() const; + +Q_SIGNALS: + void nameChanged(); + Q_REVISION(2, 10) void manufacturerChanged(); + Q_REVISION(2, 10) void modelChanged(); + Q_REVISION(2, 10) void serialNumberChanged(); + void widthChanged(); + void heightChanged(); + void desktopGeometryChanged(); + void logicalPixelDensityChanged(); + void pixelDensityChanged(); + void devicePixelRatioChanged(); + void primaryOrientationChanged(); + void orientationChanged(); + Q_REVISION(2, 3) void virtualXChanged(); + Q_REVISION(2, 3) void virtualYChanged(); + +protected: + QPointer m_screen; +}; + +class Q_QUICK_EXPORT QQuickScreenAttached : public QQuickScreenInfo +{ + Q_OBJECT + + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickScreenAttached(QObject* attachee); + + //Treats int as Qt::ScreenOrientation, due to QTBUG-20639 + Q_INVOKABLE int angleBetween(int a, int b); + + void windowChanged(QQuickWindow*); + +protected Q_SLOTS: + void screenChanged(QScreen*); + +private: + QQuickWindow* m_window = nullptr; + QQuickItem* m_attachee; +}; + +class Q_QUICK_EXPORT QQuickScreen : public QObject +{ + Q_OBJECT + QML_ATTACHED(QQuickScreenAttached) + QML_NAMED_ELEMENT(Screen) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Screen can only be used via the attached property.") + +public: + static QQuickScreenAttached *qmlAttachedProperties(QObject *object){ return new QQuickScreenAttached(object); } +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickselectable_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickselectable_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b30ce7f1da8beb776bc112708a2a1fd48c5e3240 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickselectable_p.h @@ -0,0 +1,47 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSELECTABLE_P_H +#define QQUICKSELECTABLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickSelectable +{ +public: + enum class CallBackFlag { + CancelSelection, + SelectionRectangleChanged + }; + + virtual QQuickItem *selectionPointerHandlerTarget() const = 0; + + virtual bool startSelection(const QPointF &pos, Qt::KeyboardModifiers modifiers) = 0; + virtual void setSelectionStartPos(const QPointF &pos) = 0; + virtual void setSelectionEndPos(const QPointF &pos) = 0; + virtual void clearSelection() = 0; + virtual void normalizeSelection() = 0; + + virtual QRectF selectionRectangle() const = 0; + virtual QSizeF scrollTowardsPoint(const QPointF &pos, const QSizeF &step) = 0; + + virtual void setCallback(std::function func) = 0; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f7b608f765b6b68ecf25dc0db2e13100d68dfd7f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p.h @@ -0,0 +1,110 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHADEREFFECT_P_H +#define QQUICKSHADEREFFECT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShaderEffectPrivate; + +class Q_QUICK_EXPORT QQuickShaderEffect : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QUrl fragmentShader READ fragmentShader WRITE setFragmentShader NOTIFY fragmentShaderChanged) + Q_PROPERTY(QUrl vertexShader READ vertexShader WRITE setVertexShader NOTIFY vertexShaderChanged) + Q_PROPERTY(bool blending READ blending WRITE setBlending NOTIFY blendingChanged) + Q_PROPERTY(QVariant mesh READ mesh WRITE setMesh NOTIFY meshChanged) + Q_PROPERTY(CullMode cullMode READ cullMode WRITE setCullMode NOTIFY cullModeChanged) + Q_PROPERTY(QString log READ log NOTIFY logChanged) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(bool supportsAtlasTextures READ supportsAtlasTextures WRITE setSupportsAtlasTextures NOTIFY supportsAtlasTexturesChanged REVISION(2, 4)) + QML_NAMED_ELEMENT(ShaderEffect) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum CullMode { + NoCulling, + BackFaceCulling, + FrontFaceCulling + }; + Q_ENUM(CullMode) + + enum Status { + Compiled, + Uncompiled, + Error + }; + Q_ENUM(Status) + + QQuickShaderEffect(QQuickItem *parent = nullptr); + ~QQuickShaderEffect() override; + + QUrl fragmentShader() const; + void setFragmentShader(const QUrl &fileUrl); + + QUrl vertexShader() const; + void setVertexShader(const QUrl &fileUrl); + + bool blending() const; + void setBlending(bool enable); + + QVariant mesh() const; + void setMesh(const QVariant &mesh); + + CullMode cullMode() const; + void setCullMode(CullMode face); + + bool supportsAtlasTextures() const; + void setSupportsAtlasTextures(bool supports); + + QString log() const; + Status status() const; + + bool isComponentComplete() const; + + bool updateUniformValue(const QByteArray &name, const QVariant &value); + +Q_SIGNALS: + void fragmentShaderChanged(); + void vertexShaderChanged(); + void blendingChanged(); + void meshChanged(); + void cullModeChanged(); + void logChanged(); + void statusChanged(); + void supportsAtlasTexturesChanged(); + +protected: + bool event(QEvent *e) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override; + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + +private: + Q_DECLARE_PRIVATE(QQuickShaderEffect) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHADEREFFECT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fd3708d478bccf26100762385e74611d7c736fdd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffect_p_p.h @@ -0,0 +1,126 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHADEREFFECT_P_P_H +#define QQUICKSHADEREFFECT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QtPrivate { +class EffectSlotMapper; +} + +class QQuickShaderEffectPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickShaderEffect) + +public: + QQuickShaderEffectPrivate(); + ~QQuickShaderEffectPrivate(); + + void updatePolish() override; + + QUrl fragmentShader() const { return m_fragShader; } + void setFragmentShader(const QUrl &fileUrl); + + QUrl vertexShader() const { return m_vertShader; } + void setVertexShader(const QUrl &fileUrl); + + bool blending() const { return m_blending; } + void setBlending(bool enable); + + QVariant mesh() const; + void setMesh(const QVariant &mesh); + + QQuickShaderEffect::CullMode cullMode() const { return m_cullMode; } + void setCullMode(QQuickShaderEffect::CullMode face); + + QString log() const; + QQuickShaderEffect::Status status() const; + + bool supportsAtlasTextures() const { return m_supportsAtlasTextures; } + void setSupportsAtlasTextures(bool supports); + + QString parseLog(); + + void handleEvent(QEvent *); + void handleGeometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry); + QSGNode *handleUpdatePaintNode(QSGNode *, QQuickItem::UpdatePaintNodeData *); + void handleComponentComplete(); + void handleItemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value); + void maybeUpdateShaders(); + bool updateUniformValue(const QByteArray &name, const QVariant &value, + QSGShaderEffectNode *node); + + void propertyChanged(int mappedId); + void sourceDestroyed(QObject *object); + void markGeometryDirtyAndUpdate(); + void markGeometryDirtyAndUpdateIfSupportsAtlas(); + void shaderCodePrepared(bool ok, QSGGuiThreadShaderEffectManager::ShaderInfo::Type typeHint, + const QUrl &loadUrl, QSGGuiThreadShaderEffectManager::ShaderInfo *result); + +private: + QSGGuiThreadShaderEffectManager *shaderEffectManager() const; + + enum Shader { + Vertex, + Fragment, + + NShader + }; + bool updateShader(Shader shaderType, const QUrl &fileUrl); + void updateShaderVars(Shader shaderType); + void disconnectSignals(Shader shaderType); + void clearMappers(Shader shaderType); + std::optional findMappedShaderVariableId(const QByteArray &name) const; + std::optional findMappedShaderVariableId(const QByteArray &name, Shader shaderType) const; + bool sourceIsUnique(QQuickItem *source, Shader typeToSkip, int indexToSkip) const; + + bool inDestructor = false; + const QMetaObject *m_itemMetaObject = nullptr; + QSize m_meshResolution; + QQuickShaderEffectMesh *m_mesh; + QMetaObject::Connection m_meshConnection; + QQuickGridMesh m_defaultMesh; + QQuickShaderEffect::CullMode m_cullMode; + bool m_blending; + bool m_supportsAtlasTextures; + mutable QSGGuiThreadShaderEffectManager *m_mgr; + QUrl m_fragShader; + bool m_fragNeedsUpdate; + QUrl m_vertShader; + bool m_vertNeedsUpdate; + + QSGShaderEffectNode::ShaderData m_shaders[NShader]; + QSGShaderEffectNode::DirtyShaderFlags m_dirty; + QSet m_dirtyConstants[NShader]; + QSet m_dirtyTextures[NShader]; + QSGGuiThreadShaderEffectManager::ShaderInfo *m_inProgress[NShader]; + + QVector m_mappers[NShader]; + + QHash m_destroyedConnections; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHADEREFFECT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectmesh_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectmesh_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cbd146eca77a9294633eb929b25d844a1200501a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectmesh_p.h @@ -0,0 +1,145 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include "qqmlparserstatus.h" + +#include +#include +#include +#include +#include +#include +#include + +#ifndef QQUICKSHADEREFFECTMESH_P_H +#define QQUICKSHADEREFFECTMESH_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +Q_QUICK_EXPORT const char *qtPositionAttributeName(); +Q_QUICK_EXPORT const char *qtTexCoordAttributeName(); + +class QSGGeometry; +class QRectF; + +class Q_QUICK_EXPORT QQuickShaderEffectMesh : public QObject +{ + Q_OBJECT + + QML_NAMED_ELEMENT(ShaderEffectMesh) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Cannot create instance of abstract class ShaderEffectMesh.") + +public: + QQuickShaderEffectMesh(QObject *parent = nullptr); + virtual bool validateAttributes(const QVector &attributes, int *posIndex) = 0; + // If 'geometry' != 0, 'attrCount' is the same as last time the function was called. + virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, int attrCount, int posIndex, + const QRectF &srcRect, const QRectF &rect) = 0; + // If updateGeometry() fails, the reason should appear in the log. + virtual QString log() const { return QString(); } + +Q_SIGNALS: + // Emitted when the geometry needs to be updated. + void geometryChanged(); + +protected: + QQuickShaderEffectMesh(QObjectPrivate &dd, QObject *parent = nullptr); +}; + +class Q_QUICK_EXPORT QQuickGridMesh : public QQuickShaderEffectMesh +{ + Q_OBJECT + Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged) + QML_NAMED_ELEMENT(GridMesh) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickGridMesh(QObject *parent = nullptr); + bool validateAttributes(const QVector &attributes, int *posIndex) override; + QSGGeometry *updateGeometry(QSGGeometry *geometry, int attrCount, int posIndex, + const QRectF &srcRect, const QRectF &rect) override; + QString log() const override { return m_log; } + + void setResolution(const QSize &res); + QSize resolution() const; + +Q_SIGNALS: + void resolutionChanged(); + +private: + QSize m_resolution; + QString m_log; +}; + +class QQuickScaleGrid; +class QQuickBorderImageMesh : public QQuickShaderEffectMesh +{ + Q_OBJECT + + Q_PROPERTY(QQuickScaleGrid *border READ border CONSTANT) + Q_PROPERTY(QSize size READ size WRITE setSize NOTIFY sizeChanged) + Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) + Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) + + QML_NAMED_ELEMENT(BorderImageMesh) + QML_ADDED_IN_VERSION(2, 8) + +public: + QQuickBorderImageMesh(QObject *parent = nullptr); + + bool validateAttributes(const QVector &attributes, int *posIndex) override; + QSGGeometry *updateGeometry(QSGGeometry *geometry, int attrCount, int posIndex, + const QRectF &srcRect, const QRectF &rect) override; + + QQuickScaleGrid *border() const; + + enum TileMode { Stretch = Qt::StretchTile, Repeat = Qt::RepeatTile, Round = Qt::RoundTile }; + Q_ENUM(TileMode) + + QSize size() const; + void setSize(const QSize &size); + + TileMode horizontalTileMode() const; + void setHorizontalTileMode(TileMode); + + TileMode verticalTileMode() const; + void setVerticalTileMode(TileMode); + +Q_SIGNALS: + void sizeChanged(); + void horizontalTileModeChanged(); + void verticalTileModeChanged(); + +private: + QQuickScaleGrid *m_border; + QSize m_size; + TileMode m_horizontalTileMode; + TileMode m_verticalTileMode; +}; + +inline QColor qt_premultiply_color(const QColor &c) +{ + float r, g, b, a; + c.getRgbF(&r, &g, &b, &a); + return QColor::fromRgbF(r * a, g * a, b * a, a); +} + + +QT_END_NAMESPACE + +#endif // QQUICKSHADEREFFECTMESH_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectsource_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectsource_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6546adaeebc4bffc056c27f149af5a50ca530045 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshadereffectsource_p.h @@ -0,0 +1,175 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHADEREFFECTSOURCE_P_H +#define QQUICKSHADEREFFECTSOURCE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include "qquickitem.h" +#include +#include +#include +#include +#include + +#include "qpointer.h" +#include "qsize.h" +#include "qrect.h" + +QT_BEGIN_NAMESPACE + +class QSGNode; +class UpdatePaintNodeData; +class QOpenGLFramebufferObject; +class QSGSimpleRectNode; + +class QQuickShaderEffectSourceTextureProvider; + +class Q_QUICK_EXPORT QQuickShaderEffectSource : public QQuickItem, public QQuickItemChangeListener +{ + Q_OBJECT + Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(QQuickItem *sourceItem READ sourceItem WRITE setSourceItem NOTIFY sourceItemChanged) + Q_PROPERTY(QRectF sourceRect READ sourceRect WRITE setSourceRect NOTIFY sourceRectChanged) + Q_PROPERTY(QSize textureSize READ textureSize WRITE setTextureSize NOTIFY textureSizeChanged) + Q_PROPERTY(Format format READ format WRITE setFormat NOTIFY formatChanged) + Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged) + Q_PROPERTY(bool hideSource READ hideSource WRITE setHideSource NOTIFY hideSourceChanged) + Q_PROPERTY(bool mipmap READ mipmap WRITE setMipmap NOTIFY mipmapChanged) + Q_PROPERTY(bool recursive READ recursive WRITE setRecursive NOTIFY recursiveChanged) + Q_PROPERTY(TextureMirroring textureMirroring READ textureMirroring WRITE setTextureMirroring NOTIFY textureMirroringChanged REVISION(2, 6)) + Q_PROPERTY(int samples READ samples WRITE setSamples NOTIFY samplesChanged REVISION(2, 9)) + QML_NAMED_ELEMENT(ShaderEffectSource) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum WrapMode { + ClampToEdge, + RepeatHorizontally, + RepeatVertically, + Repeat + }; + Q_ENUM(WrapMode) + + enum Format { + RGBA8 = 1, + RGBA16F, + RGBA32F, + + // Qt 5 legacy values that were ignored starting from Qt 6.0 + Alpha = RGBA8, + RGB = RGBA8, + RGBA = RGBA8 + }; + Q_ENUM(Format) + + enum TextureMirroring { + NoMirroring = 0x00, + MirrorHorizontally = 0x01, + MirrorVertically = 0x02 + }; + Q_ENUM(TextureMirroring) + + QQuickShaderEffectSource(QQuickItem *parent = nullptr); + ~QQuickShaderEffectSource() override; + + WrapMode wrapMode() const; + void setWrapMode(WrapMode mode); + + QQuickItem *sourceItem() const; + void setSourceItem(QQuickItem *item); + + QRectF sourceRect() const; + void setSourceRect(const QRectF &rect); + + QSize textureSize() const; + void setTextureSize(const QSize &size); + + Format format() const; + void setFormat(Format format); + + bool live() const; + void setLive(bool live); + + bool hideSource() const; + void setHideSource(bool hide); + + bool mipmap() const; + void setMipmap(bool enabled); + + bool recursive() const; + void setRecursive(bool enabled); + + TextureMirroring textureMirroring() const; + void setTextureMirroring(TextureMirroring mirroring); + + bool isTextureProvider() const override { return true; } + QSGTextureProvider *textureProvider() const override; + + Q_INVOKABLE void scheduleUpdate(); + + int samples() const; + void setSamples(int count); + +Q_SIGNALS: + void wrapModeChanged(); + void sourceItemChanged(); + void sourceRectChanged(); + void textureSizeChanged(); + void formatChanged(); + void liveChanged(); + void hideSourceChanged(); + void mipmapChanged(); + void recursiveChanged(); + void textureMirroringChanged(); + void samplesChanged(); + + void scheduledUpdateCompleted(); + +private Q_SLOTS: + void sourceItemDestroyed(QObject *item); + void invalidateSceneGraph(); + +protected: + void releaseResources() override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + +private: + void ensureTexture(); + + QQuickShaderEffectSourceTextureProvider *m_provider; + QSGLayer *m_texture; + WrapMode m_wrapMode; + QQuickItem *m_sourceItem; + QRectF m_sourceRect; + QSize m_textureSize; + Format m_format; + int m_samples; + uint m_live : 1; + uint m_hideSource : 1; + uint m_mipmap : 1; + uint m_recursive : 1; + uint m_grab : 1; + uint m_textureMirroring : 2; // Stores TextureMirroring enum +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHADEREFFECTSOURCE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshortcut_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshortcut_p.h new file mode 100644 index 0000000000000000000000000000000000000000..78e08b93565804751c2581382c06412344efac43 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickshortcut_p.h @@ -0,0 +1,107 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHORTCUT_P_H +#define QQUICKSHORTCUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QShortcutEvent; + +class Q_QUICK_EXPORT QQuickShortcut : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QVariant sequence READ sequence WRITE setSequence NOTIFY sequenceChanged FINAL) + Q_PROPERTY(QVariantList sequences READ sequences WRITE setSequences NOTIFY sequencesChanged FINAL REVISION(2, 9)) + Q_PROPERTY(QString nativeText READ nativeText NOTIFY sequenceChanged FINAL REVISION(2, 6)) + Q_PROPERTY(QString portableText READ portableText NOTIFY sequenceChanged FINAL REVISION(2, 6)) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) + Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL) + Q_PROPERTY(Qt::ShortcutContext context READ context WRITE setContext NOTIFY contextChanged FINAL) + QML_NAMED_ELEMENT(Shortcut) + QML_ADDED_IN_VERSION(2, 5) + +public: + explicit QQuickShortcut(QObject *parent = nullptr); + ~QQuickShortcut(); + + QVariant sequence() const; + void setSequence(const QVariant &sequence); + + QVariantList sequences() const; + void setSequences(const QVariantList &sequences); + + QString nativeText() const; + QString portableText() const; + + bool isEnabled() const; + void setEnabled(bool enabled); + + bool autoRepeat() const; + void setAutoRepeat(bool repeat); + + Qt::ShortcutContext context() const; + void setContext(Qt::ShortcutContext context); + +Q_SIGNALS: + void sequenceChanged(); + Q_REVISION(2, 9) void sequencesChanged(); + void enabledChanged(); + void autoRepeatChanged(); + void contextChanged(); + + void activated(); + void activatedAmbiguously(); + +protected: + void classBegin() override; + void componentComplete() override; + bool event(QEvent *event) override; + + struct Shortcut { + Shortcut() : id(0) { } + bool matches(QShortcutEvent *event) const; + int id; + QVariant userValue; + QKeySequence keySequence; + }; + + void setEnabled(Shortcut &shortcut, bool enabled); + void setAutoRepeat(Shortcut &shortcut, bool repeat); + + void grabShortcut(Shortcut &shortcut, Qt::ShortcutContext context); + void ungrabShortcut(Shortcut &shortcut); + +private: + bool m_enabled; + bool m_completed; + bool m_autorepeat; + Qt::ShortcutContext m_context; + Shortcut m_shortcut; + QVector m_shortcuts; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHORTCUT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d7365516d1adf0d71e628c7b0590b0f6f4c69457 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERSINGLEHANDLER_H +#define QQUICKPOINTERSINGLEHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickhandlerpoint_p.h" +#include "qquickpointerdevicehandler_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickSinglePointHandlerPrivate; + +class Q_QUICK_EXPORT QQuickSinglePointHandler : public QQuickPointerDeviceHandler +{ + Q_OBJECT + Q_PROPERTY(QQuickHandlerPoint point READ point NOTIFY pointChanged) + +public: + explicit QQuickSinglePointHandler(QQuickItem *parent = nullptr); + + QQuickHandlerPoint point() const; + +Q_SIGNALS: + void pointChanged(); + +protected: + QQuickSinglePointHandler(QQuickSinglePointHandlerPrivate &dd, QQuickItem *parent); + + bool wantsPointerEvent(QPointerEvent *event) override; + void handlePointerEventImpl(QPointerEvent *event) override; + virtual void handleEventPoint(QPointerEvent *event, QEventPoint &point); + + QEventPoint ¤tPoint(QPointerEvent *ev); + void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, QPointerEvent *event, QEventPoint &point) override; + + void setIgnoreAdditionalPoints(bool v = true); + + void moveTarget(QPointF pos, QEventPoint &point); + + void setPointId(int id); + + Q_DECLARE_PRIVATE(QQuickSinglePointHandler) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERSINGLEHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b3709b68139001053ccecbf3c3fd3d4b280403cb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksinglepointhandler_p_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOINTERSINGLEHANDLER_P_H +#define QQUICKPOINTERSINGLEHANDLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickhandlerpoint_p.h" +#include "qquickpointerdevicehandler_p_p.h" +#include "qquicksinglepointhandler_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickSinglePointHandlerPrivate : public QQuickPointerDeviceHandlerPrivate +{ + Q_DECLARE_PUBLIC(QQuickSinglePointHandler) + +public: + static QQuickSinglePointHandlerPrivate* get(QQuickSinglePointHandler *q) { return q->d_func(); } + static const QQuickSinglePointHandlerPrivate* get(const QQuickSinglePointHandler *q) { return q->d_func(); } + + QQuickSinglePointHandlerPrivate(); + + void reset(); + + QQuickHandlerPoint pointInfo; + bool ignoreAdditionalPoints = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOINTERSINGLEHANDLER_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p.h new file mode 100644 index 0000000000000000000000000000000000000000..97cdb6ca30e38537ee7576cf6ffa4174c7708609 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p.h @@ -0,0 +1,68 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSMOOTHEDANIMATION_H +#define QQUICKSMOOTHEDANIMATION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qquickanimation_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQmlProperty; +class QQuickSmoothedAnimationPrivate; +class Q_QUICK_EXPORT QQuickSmoothedAnimation : public QQuickNumberAnimation +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickSmoothedAnimation) + + Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity NOTIFY velocityChanged) + Q_PROPERTY(ReversingMode reversingMode READ reversingMode WRITE setReversingMode NOTIFY reversingModeChanged) + Q_PROPERTY(qreal maximumEasingTime READ maximumEasingTime WRITE setMaximumEasingTime NOTIFY maximumEasingTimeChanged) + QML_NAMED_ELEMENT(SmoothedAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum ReversingMode { Eased, Immediate, Sync }; + Q_ENUM(ReversingMode) + + QQuickSmoothedAnimation(QObject *parent = nullptr); + + ReversingMode reversingMode() const; + void setReversingMode(ReversingMode); + + int duration() const override; + void setDuration(int) override; + + qreal velocity() const; + void setVelocity(qreal); + + int maximumEasingTime() const; + void setMaximumEasingTime(int); + + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; +Q_SIGNALS: + void velocityChanged(); + void reversingModeChanged(); + void maximumEasingTimeChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSMOOTHEDANIMATION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ae925129a011528630d13e50ab3a8633bd1ef699 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksmoothedanimation_p_p.h @@ -0,0 +1,115 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSMOOTHEDANIMATION2_P_H +#define QQUICKSMOOTHEDANIMATION2_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicksmoothedanimation_p.h" +#include "qquickanimation_p.h" + +#include "qquickanimation_p_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE +class QSmoothedAnimation; +class QSmoothedAnimationTimer : public QTimer +{ + Q_OBJECT +public: + explicit QSmoothedAnimationTimer(QSmoothedAnimation *animation, QObject *parent = nullptr); + ~QSmoothedAnimationTimer(); +public Q_SLOTS: + void stopAnimation(); +private: + QSmoothedAnimation *m_animation; +}; + +class QQuickSmoothedAnimationPrivate; +class Q_AUTOTEST_EXPORT QSmoothedAnimation : public QAbstractAnimationJob +{ + Q_DISABLE_COPY(QSmoothedAnimation) +public: + QSmoothedAnimation(QQuickSmoothedAnimationPrivate * = nullptr); + + ~QSmoothedAnimation(); + qreal to; + qreal velocity; + int userDuration; + + int maximumEasingTime; + QQuickSmoothedAnimation::ReversingMode reversingMode; + + qreal initialVelocity; + qreal trackVelocity; + + QQmlProperty target; + + int duration() const override; + void restart(); + void init(); + + void prepareForRestart(); + void clearTemplate() { animationTemplate = nullptr; } + +protected: + void updateCurrentTime(int) override; + void updateState(QAbstractAnimationJob::State, QAbstractAnimationJob::State) override; + void debugAnimation(QDebug d) const override; + +private: + qreal easeFollow(qreal); + qreal initialValue; + + bool invert; + + int finalDuration; + + // Parameters for use in updateCurrentTime() + qreal a; // Acceleration + qreal d; // Deceleration + qreal tf; // Total time + qreal tp; // Time at which peak velocity occurs + qreal td; // Time at which deceleration begins + qreal vp; // Velocity at tp + qreal sp; // Displacement at tp + qreal sd; // Displacement at td + qreal vi; // "Normalized" initialvelocity + qreal s; // Total s + + int lastTime; + bool skipUpdate; + + bool recalc(); + void delayedStop(); + QSmoothedAnimationTimer *delayedStopTimer; + QQuickSmoothedAnimationPrivate *animationTemplate; +}; + +class QQuickSmoothedAnimationPrivate : public QQuickPropertyAnimationPrivate +{ + Q_DECLARE_PUBLIC(QQuickSmoothedAnimation) +public: + QQuickSmoothedAnimationPrivate(); + ~QQuickSmoothedAnimationPrivate(); + void updateRunningAnimations(); + + QSmoothedAnimation *anim; + QHash activeAnimations; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSMOOTHEDANIMATION2_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspringanimation_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspringanimation_p.h new file mode 100644 index 0000000000000000000000000000000000000000..12d5a0ccc8f47f51c86320d5923d40af6d1c61a4 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspringanimation_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPRINGANIMATION_H +#define QQUICKSPRINGANIMATION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qquickanimation_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSpringAnimationPrivate; +class Q_QUICK_EXPORT QQuickSpringAnimation : public QQuickNumberAnimation +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(QQuickSpringAnimation) + Q_DECLARE_PRIVATE(QQuickSpringAnimation) + Q_INTERFACES(QQmlPropertyValueSource) + + Q_PROPERTY(qreal velocity READ velocity WRITE setVelocity) + Q_PROPERTY(qreal spring READ spring WRITE setSpring) + Q_PROPERTY(qreal damping READ damping WRITE setDamping) + Q_PROPERTY(qreal epsilon READ epsilon WRITE setEpsilon) + Q_PROPERTY(qreal modulus READ modulus WRITE setModulus NOTIFY modulusChanged) + Q_PROPERTY(qreal mass READ mass WRITE setMass NOTIFY massChanged) + QML_NAMED_ELEMENT(SpringAnimation) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickSpringAnimation(QObject *parent=nullptr); + ~QQuickSpringAnimation(); + + qreal velocity() const; + void setVelocity(qreal velocity); + + qreal spring() const; + void setSpring(qreal spring); + + qreal damping() const; + void setDamping(qreal damping); + + qreal epsilon() const; + void setEpsilon(qreal epsilon); + + qreal mass() const; + void setMass(qreal modulus); + + qreal modulus() const; + void setModulus(qreal modulus); + + QAbstractAnimationJob* transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, + QObject *defaultTarget = nullptr) override; + +Q_SIGNALS: + void modulusChanged(); + void massChanged(); + void syncChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPRINGANIMATION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksprite_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksprite_p.h new file mode 100644 index 0000000000000000000000000000000000000000..43ffe609c358f77b4901e5690948a6b669bb80be --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksprite_p.h @@ -0,0 +1,311 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPRITE_P_H +#define QQUICKSPRITE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include +#include +#include +#include +#include +#include "qquickspriteengine_p.h" +#include + +QT_BEGIN_NAMESPACE + +// exported, since it's used in QtQuickParticles +class Q_QUICK_EXPORT QQuickSprite : public QQuickStochasticState +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + //Renderers have to query this hint when advancing frames + Q_PROPERTY(bool reverse READ reverse WRITE setReverse NOTIFY reverseChanged) + Q_PROPERTY(bool frameSync READ frameSync WRITE setFrameSync NOTIFY frameSyncChanged) + Q_PROPERTY(int frames READ frames WRITE setFrames NOTIFY frameCountChanged) + Q_PROPERTY(int frameCount READ frameCount WRITE setFrameCount NOTIFY frameCountChanged) + //If frame height or width is not specified, it is assumed to be a single long row of square frames. + //Otherwise, it can be multiple contiguous rows, when one row runs out the next will be used. + Q_PROPERTY(int frameHeight READ frameHeight WRITE setFrameHeight NOTIFY frameHeightChanged) + Q_PROPERTY(int frameWidth READ frameWidth WRITE setFrameWidth NOTIFY frameWidthChanged) + Q_PROPERTY(int frameX READ frameX WRITE setFrameX NOTIFY frameXChanged) + Q_PROPERTY(int frameY READ frameY WRITE setFrameY NOTIFY frameYChanged) + //Precedence order: frameRate, frameDuration, duration + Q_PROPERTY(qreal frameRate READ frameRate WRITE setFrameRate NOTIFY frameRateChanged RESET resetFrameRate) + Q_PROPERTY(qreal frameRateVariation READ frameRateVariation WRITE setFrameRateVariation NOTIFY frameRateVariationChanged) + Q_PROPERTY(int frameDuration READ frameDuration WRITE setFrameDuration NOTIFY frameDurationChanged RESET resetFrameDuration) + Q_PROPERTY(int frameDurationVariation READ frameDurationVariation WRITE setFrameDurationVariation NOTIFY frameDurationVariationChanged) + QML_NAMED_ELEMENT(Sprite) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSprite(QObject *parent = nullptr); + ~QQuickSprite() override; + + QUrl source() const + { + return m_source; + } + + int frameHeight() const + { + return m_frameHeight; + } + + int frameWidth() const + { + return m_frameWidth; + } + + bool reverse() const + { + return m_reverse; + } + + int frames() const + { + return m_frames; + } + + int frameCount() const + { + return m_frames; + } + + int frameX() const + { + return m_frameX; + } + + int frameY() const + { + return m_frameY; + } + + void resetFrameRate() + { + setFrameRate(-1); + } + + qreal frameRate() const + { + return m_frameRate; + } + + qreal frameRateVariation() const + { + return m_frameRateVariation; + } + + void resetFrameDuration() + { + setFrameDuration(-1); + } + + int frameDuration() const + { + return m_frameDuration; + } + + int frameDurationVariation() const + { + return m_frameDurationVariation; + } + + int variedDuration() const override; + + bool frameSync() const + { + return m_frameSync; + } + + void setDevicePixelRatio(qreal dpr) + { + m_devicePixelRatio = dpr; + } + + qreal devicePixelRatio() const + { + return m_devicePixelRatio; + } + +Q_SIGNALS: + + void sourceChanged(QUrl arg); + + void frameHeightChanged(int arg); + + void frameWidthChanged(int arg); + + void reverseChanged(bool arg); + + void frameCountChanged(int arg); + + void frameXChanged(int arg); + + void frameYChanged(int arg); + + void frameRateChanged(qreal arg); + + void frameRateVariationChanged(qreal arg); + + void frameDurationChanged(int arg); + + void frameDurationVariationChanged(int arg); + + void frameSyncChanged(bool arg); + +public Q_SLOTS: + + void setSource(QUrl arg) + { + if (m_source != arg) { + m_source = arg; + Q_EMIT sourceChanged(arg); + startImageLoading(); + } + } + + void setFrameHeight(int arg) + { + if (m_frameHeight != arg) { + m_frameHeight = arg; + Q_EMIT frameHeightChanged(arg); + } + } + + void setFrameWidth(int arg) + { + if (m_frameWidth != arg) { + m_frameWidth = arg; + Q_EMIT frameWidthChanged(arg); + } + } + + void setReverse(bool arg) + { + if (m_reverse != arg) { + m_reverse = arg; + Q_EMIT reverseChanged(arg); + } + } + + void setFrames(int arg) + { + qWarning() << "Sprite::frames has been renamed Sprite::frameCount"; + setFrameCount(arg); + } + + void setFrameCount(int arg) + { + if (m_frames != arg) { + m_frames = arg; + Q_EMIT frameCountChanged(arg); + } + } + + void setFrameX(int arg) + { + if (m_frameX != arg) { + m_frameX = arg; + Q_EMIT frameXChanged(arg); + } + } + + void setFrameY(int arg) + { + if (m_frameY != arg) { + m_frameY = arg; + Q_EMIT frameYChanged(arg); + } + } + + void setFrameRate(qreal arg) + { + if (m_frameRate != arg) { + m_frameRate = arg; + Q_EMIT frameRateChanged(arg); + } + } + + void setFrameRateVariation(qreal arg) + { + if (m_frameRateVariation != arg) { + m_frameRateVariation = arg; + Q_EMIT frameRateVariationChanged(arg); + } + } + + void setFrameDuration(int arg) + { + if (m_frameDuration != arg) { + m_frameDuration = arg; + Q_EMIT frameDurationChanged(arg); + } + } + + void setFrameDurationVariation(int arg) + { + if (m_frameDurationVariation != arg) { + m_frameDurationVariation = arg; + Q_EMIT frameDurationVariationChanged(arg); + } + } + + void setFrameSync(bool arg) + { + if (m_frameSync != arg) { + m_frameSync = arg; + Q_EMIT frameSyncChanged(arg); + } + } + +private Q_SLOTS: + void startImageLoading(); + +private: + friend class QQuickImageParticle; + //friend class QQuickSpriteSequence; + friend class QQuickAnimatedSprite; + friend class QQuickSpriteEngine; + friend class QQuickStochasticEngine; + + int m_generatedCount; + int m_framesPerRow; + int m_rowY; + int m_rowStartX; + + QUrl m_source; + bool m_reverse; + int m_frameHeight; + int m_frameWidth; + int m_frames; + int m_frameX; + int m_frameY; + qreal m_frameRate; + qreal m_frameRateVariation; + int m_frameDuration; + int m_frameDurationVariation; + bool m_frameSync; + qreal m_devicePixelRatio; + QQuickPixmap m_pix; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPRITE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspriteengine_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspriteengine_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d41051b11706850a6c53922952583495f6382831 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspriteengine_p.h @@ -0,0 +1,311 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPRITEENGINE_P_H +#define QQUICKSPRITEENGINE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickSprite; +class Q_QUICK_EXPORT QQuickStochasticState : public QObject //Currently for internal use only - Sprite and ParticleGroup +{ + Q_OBJECT + Q_PROPERTY(int duration READ duration WRITE setDuration NOTIFY durationChanged) + Q_PROPERTY(int durationVariation READ durationVariation WRITE setDurationVariation NOTIFY durationVariationChanged) + //Note that manually advanced sprites need to query this variable and implement own behaviour for it + Q_PROPERTY(bool randomStart READ randomStart WRITE setRandomStart NOTIFY randomStartChanged) + Q_PROPERTY(QVariantMap to READ to WRITE setTo NOTIFY toChanged) + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) + +public: + QQuickStochasticState(QObject* parent = nullptr) + : QObject(parent) + { + } + + int duration() const + { + return m_duration; + } + + QString name() const + { + return m_name; + } + + QVariantMap to() const + { + return m_to; + } + + int durationVariation() const + { + return m_durationVariation; + } + + + virtual int variedDuration() const + { + return qMax(0.0 , m_duration + + (m_durationVariation * QRandomGenerator::global()->bounded(2.0)) + - m_durationVariation); + } + + bool randomStart() const + { + return m_randomStart; + } + +Q_SIGNALS: + void durationChanged(int arg); + + void nameChanged(const QString &arg); + + void toChanged(const QVariantMap &arg); + + void durationVariationChanged(int arg); + + void entered();//### Just playing around - don't expect full state API + + void randomStartChanged(bool arg); + +public Q_SLOTS: + void setDuration(int arg) + { + if (m_duration != arg) { + m_duration = arg; + Q_EMIT durationChanged(arg); + } + } + + void setName(const QString &arg) + { + if (m_name != arg) { + m_name = arg; + Q_EMIT nameChanged(arg); + } + } + + void setTo(const QVariantMap &arg) + { + if (m_to != arg) { + m_to = arg; + Q_EMIT toChanged(arg); + } + } + + void setDurationVariation(int arg) + { + if (m_durationVariation != arg) { + m_durationVariation = arg; + Q_EMIT durationVariationChanged(arg); + } + } + + void setRandomStart(bool arg) + { + if (m_randomStart != arg) { + m_randomStart = arg; + Q_EMIT randomStartChanged(arg); + } + } + +private: + QString m_name; + QVariantMap m_to; + int m_duration = -1; + int m_durationVariation = 0; + + friend class QQuickStochasticEngine; + bool m_randomStart = false; +}; + +class Q_QUICK_EXPORT QQuickStochasticEngine : public QObject +{ + Q_OBJECT + //TODO: Optimize single state case? + Q_PROPERTY(QString globalGoal READ globalGoal WRITE setGlobalGoal NOTIFY globalGoalChanged FINAL) + Q_PROPERTY(QQmlListProperty states READ states FINAL) +public: + explicit QQuickStochasticEngine(QObject *parent = nullptr); + QQuickStochasticEngine(const QList &states, QObject *parent = nullptr); + ~QQuickStochasticEngine() override; + + QQmlListProperty states() + { + return QQmlListProperty(this, &m_states); + } + + QString globalGoal() const + { + return m_globalGoal; + } + + int count() const {return m_things.size();} + void setCount(int c); + + void setGoal(int state, int sprite=0, bool jump=false); + void start(int index=0, int state=0); + virtual void restart(int index=0); + virtual void advance(int index=0);//Sends state to the next chosen state, unlike goal. + void stop(int index=0); + int curState(int index=0) const {return m_things[index];} + + QQuickStochasticState* state(int idx) const {return m_states[idx];} + int stateIndex(QQuickStochasticState* s) const {return m_states.indexOf(s);} + int stateIndex(const QString& s) const { + for (int i=0; iname() == s) + return i; + return -1; + } + + int stateCount() {return m_states.size();} +private: +Q_SIGNALS: + + void globalGoalChanged(const QString &arg); + void stateChanged(int idx); + +public Q_SLOTS: + void setGlobalGoal(const QString &arg) + { + if (m_globalGoal != arg) { + m_globalGoal = arg; + Q_EMIT globalGoalChanged(arg); + } + } + + uint updateSprites(uint time); + +protected: + friend class QQuickParticleSystem; + void addToUpdateList(uint t, int idx); + int nextState(int curState, int idx=0); + int goalSeek(int curState, int idx, int dist=-1); + QList m_states; + //### Consider struct or class for the four data variables? + QVector m_things;//int is the index in m_states of the current state + QVector m_goals; + QVector m_duration; + QVector m_startTimes; + QVector > > m_stateUpdates;//### This could be done faster - priority queue? + + QElapsedTimer m_advanceTimer; + uint m_timeOffset; + QString m_globalGoal; + int m_maxFrames; + int m_imageStateCount; + bool m_addAdvance; +}; + +class Q_QUICK_EXPORT QQuickSpriteEngine : public QQuickStochasticEngine +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty sprites READ sprites FINAL) +public: + explicit QQuickSpriteEngine(QObject *parent = nullptr); + QQuickSpriteEngine(const QList &sprites, QObject *parent = nullptr); + ~QQuickSpriteEngine() override; + QQmlListProperty sprites() + { + return QQmlListProperty(this, &m_sprites); + } + + QQuickSprite* sprite(int sprite = 0) const; + int spriteState(int sprite = 0) const; + int spriteStart(int sprite = 0) const; + int spriteFrames(int sprite = 0) const; + int spriteDuration(int sprite = 0) const; + int spriteX(int sprite = 0) const; + int spriteY(int sprite = 0) const; + int spriteWidth(int sprite = 0) const; + int spriteHeight(int sprite = 0) const; + int spriteCount() const;//Like state count + int maxFrames() const; + + void restart(int index=0) override; + void advance(int index=0) override; + + //Similar API to QQuickPixmap for async loading convenience + bool isNull() const { return status() == QQuickPixmap::Null; } + bool isReady() const { return status() == QQuickPixmap::Ready; } + bool isLoading() const { return status() == QQuickPixmap::Loading; } + bool isError() const { return status() == QQuickPixmap::Error; } + QQuickPixmap::Status status() const; //Composed status of all Sprites + void startAssemblingImage(); + QImage assembledImage(int maxSize = 2048); + +private: + int pseudospriteProgress(int, int, int *rd = nullptr) const; + QList m_sprites; + bool m_startedImageAssembly; + bool m_loaded; + bool m_errorsPrinted; +}; + +//Common use is to have your own list property which is transparently an engine +inline void spriteAppend(QQmlListProperty *p, QQuickSprite* s) +{ + reinterpret_cast *>(p->data)->append(s); + p->object->metaObject()->invokeMethod(p->object, "createEngine"); +} + +inline QQuickSprite* spriteAt(QQmlListProperty *p, qsizetype idx) +{ + return reinterpret_cast *>(p->data)->at(idx); +} + +inline void spriteClear(QQmlListProperty *p) +{ + reinterpret_cast *>(p->data)->clear(); + p->object->metaObject()->invokeMethod(p->object, "createEngine"); +} + +inline qsizetype spriteCount(QQmlListProperty *p) +{ + return reinterpret_cast *>(p->data)->size(); +} + +inline void spriteReplace(QQmlListProperty *p, qsizetype idx, QQuickSprite *s) +{ + reinterpret_cast *>(p->data)->replace(idx, s); + p->object->metaObject()->invokeMethod(p->object, "createEngine"); +} + +inline void spriteRemoveLast(QQmlListProperty *p) +{ + reinterpret_cast *>(p->data)->removeLast(); + p->object->metaObject()->invokeMethod(p->object, "createEngine"); +} + +QT_END_NAMESPACE + +#endif // QQUICKSPRITEENGINE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p.h new file mode 100644 index 0000000000000000000000000000000000000000..04cc1252fe578656f561d217b278630aa3c8bd26 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p.h @@ -0,0 +1,84 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPRITESEQUENCE_P_H +#define QQUICKSPRITESEQUENCE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include + +QT_BEGIN_NAMESPACE + +class QSGContext; +class QQuickSprite; +class QQuickSpriteEngine; +class QQuickSpriteSequencePrivate; +class QSGSpriteNode; +class Q_QUICK_EXPORT QQuickSpriteSequence : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged) + Q_PROPERTY(bool interpolate READ interpolate WRITE setInterpolate NOTIFY interpolateChanged) + Q_PROPERTY(QString goalSprite READ goalSprite WRITE setGoalSprite NOTIFY goalSpriteChanged) + Q_PROPERTY(QString currentSprite READ currentSprite NOTIFY currentSpriteChanged) + //###try to share similar spriteEngines for less overhead? + Q_PROPERTY(QQmlListProperty sprites READ sprites) + Q_CLASSINFO("DefaultProperty", "sprites") + QML_NAMED_ELEMENT(SpriteSequence) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSpriteSequence(QQuickItem *parent = nullptr); + + QQmlListProperty sprites(); + + bool running() const; + bool interpolate() const; + QString goalSprite() const; + QString currentSprite() const; + +Q_SIGNALS: + + void runningChanged(bool arg); + void interpolateChanged(bool arg); + void goalSpriteChanged(const QString &arg); + void currentSpriteChanged(const QString &arg); + +public Q_SLOTS: + + void jumpTo(const QString &sprite); + void setGoalSprite(const QString &sprite); + void setRunning(bool arg); + void setInterpolate(bool arg); + +private Q_SLOTS: + void createEngine(); + +protected: + void reset(); + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; +private: + void prepareNextFrame(QSGSpriteNode *node); + QSGSpriteNode* initNode(); + +private: + Q_DECLARE_PRIVATE(QQuickSpriteSequence) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPRITESEQUENCE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b027328085de8d3898e5d6e814c12753ddd8032f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickspritesequence_p_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPRITESEQUENCE_P_P_H +#define QQUICKSPRITESEQUENCE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_sprite); + +#include "qquickitem_p.h" +#include "qquicksprite_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickSpriteSequence; + +class QQuickSpriteSequencePrivate :public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickSpriteSequence) +public: + QQuickSpriteSequencePrivate() + : m_spriteEngine(nullptr) + , m_curFrame(0) + , m_pleaseReset(false) + , m_running(true) + , m_interpolate(true) + , m_curStateIdx(0) + { + + } + QList m_sprites; + QQuickSpriteEngine* m_spriteEngine; + QElapsedTimer m_timestamp; + int m_curFrame; + bool m_pleaseReset; + bool m_running; + bool m_interpolate; + QString m_goalState; + QString m_curState; + int m_curStateIdx; + QSize m_sheetSize; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPRITESEQUENCE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0e6315842acf58a8615cda58f74c80cf8c6d7e52 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p.h @@ -0,0 +1,181 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTATE_H +#define QQUICKSTATE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickStateActionEvent; +class QQmlBinding; +class QQmlExpression; + +class Q_QUICK_EXPORT QQuickStateAction +{ +public: + QQuickStateAction(); + QQuickStateAction(QObject *, const QString &, const QVariant &); + QQuickStateAction(QObject *, const QQmlProperty &property, const QString &, + const QVariant &); + + bool restore:1; + bool actionDone:1; + bool reverseEvent:1; + bool deletableToBinding:1; + + QQmlProperty property; + QVariant fromValue; + QVariant toValue; + + QQmlAnyBinding fromBinding; + QQmlAnyBinding toBinding; + QQuickStateActionEvent *event; + + //strictly for matching + QObject *specifiedObject; + QString specifiedProperty; + + void deleteFromBinding(); +}; + +class Q_AUTOTEST_EXPORT QQuickStateActionEvent +{ +public: + virtual ~QQuickStateActionEvent(); + + enum EventType { Script, SignalHandler, ParentChange, AnchorChanges }; + + virtual EventType type() const = 0; + + virtual void execute(); + virtual bool isReversable(); + virtual void reverse(); + virtual void saveOriginals() {} + virtual bool needsCopy() { return false; } + virtual void copyOriginals(QQuickStateActionEvent *) {} + + virtual bool isRewindable() { return isReversable(); } + virtual void rewind() {} + virtual void saveCurrentValues() {} + virtual void saveTargetValues() {} + + virtual bool changesBindings(); + virtual void clearBindings(); + virtual bool mayOverride(QQuickStateActionEvent*other); +}; + +//### rename to QQuickStateChange? +class QQuickStateGroup; +class QQuickState; +class QQuickStateOperationPrivate; +class Q_QUICK_EXPORT QQuickStateOperation : public QObject +{ + Q_OBJECT + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickStateOperation(QObject *parent = nullptr) + : QObject(parent) {} + typedef QList ActionList; + + virtual ActionList actions(); + + QQuickState *state() const; + void setState(QQuickState *state); + +protected: + QQuickStateOperation(QObjectPrivate &dd, QObject *parent = nullptr); + +private: + Q_DECLARE_PRIVATE(QQuickStateOperation) + Q_DISABLE_COPY(QQuickStateOperation) +}; + +typedef QQuickStateOperation::ActionList QQuickStateActions; + +class QQuickTransition; +class QQuickStatePrivate; +class Q_QUICK_EXPORT QQuickState : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QString name READ name WRITE setName) + Q_PROPERTY(bool when READ when WRITE setWhen) + Q_PROPERTY(QString extend READ extends WRITE setExtends) + Q_PROPERTY(QQmlListProperty changes READ changes) + Q_CLASSINFO("DefaultProperty", "changes") + Q_CLASSINFO("DeferredPropertyNames", "changes") + QML_NAMED_ELEMENT(State) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickState(QObject *parent=nullptr); + ~QQuickState() override; + + QString name() const; + void setName(const QString &); + bool isNamed() const; + + bool isWhenKnown() const; + bool when() const; + void setWhen(bool); + + QString extends() const; + void setExtends(const QString &); + + QQmlListProperty changes(); + int operationCount() const; + QQuickStateOperation *operationAt(int) const; + + QQuickState &operator<<(QQuickStateOperation *); + + void apply(QQuickTransition *, QQuickState *revert); + void cancel(); + + QQuickStateGroup *stateGroup() const; + void setStateGroup(QQuickStateGroup *); + + bool containsPropertyInRevertList(QObject *target, const QString &name) const; + bool changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue); + bool changeBindingInRevertList(QObject *target, const QString &name, QQmlAnyBinding binding); + bool removeEntryFromRevertList(QObject *target, const QString &name); + void addEntryToRevertList(const QQuickStateAction &action); + void removeAllEntriesFromRevertList(QObject *target); + void addEntriesToRevertList(const QList &actions); + QVariant valueInRevertList(QObject *target, const QString &name) const; + QQmlAnyBinding bindingInRevertList(QObject *target, const QString &name) const; + + bool isStateActive() const; + +Q_SIGNALS: + void completed(); + +private: + Q_DECLARE_PRIVATE(QQuickState) + Q_DISABLE_COPY(QQuickState) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTATE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cf3378e419ea535c3e8536251900987461944941 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstate_p_p.h @@ -0,0 +1,247 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTATE_P_H +#define QQUICKSTATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstate_p.h" + +#include "qquicktransitionmanager_p_p.h" + +#include +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSimpleAction +{ +public: + enum State { StartState, EndState }; + QQuickSimpleAction(const QQuickStateAction &a, State state = StartState) + { + m_property = a.property; + m_specifiedObject = a.specifiedObject; + m_specifiedProperty = a.specifiedProperty; + m_event = a.event; + if (state == StartState) { + m_value = a.fromValue; + m_binding = QQmlAnyBinding::ofProperty(m_property); + m_reverseEvent = true; + } else { + m_value = a.toValue; + m_binding = a.toBinding; + m_reverseEvent = false; + } + } + + ~QQuickSimpleAction() + { + } + + QQuickSimpleAction(const QQuickSimpleAction &other) + : m_property(other.m_property), + m_value(other.m_value), + m_binding(other.binding()), + m_specifiedObject(other.m_specifiedObject), + m_specifiedProperty(other.m_specifiedProperty), + m_event(other.m_event), + m_reverseEvent(other.m_reverseEvent) + { + } + + QQuickSimpleAction &operator =(const QQuickSimpleAction &other) + { + m_property = other.m_property; + m_value = other.m_value; + m_binding = other.binding(); + m_specifiedObject = other.m_specifiedObject; + m_specifiedProperty = other.m_specifiedProperty; + m_event = other.m_event; + m_reverseEvent = other.m_reverseEvent; + + return *this; + } + + void setProperty(const QQmlProperty &property) + { + m_property = property; + } + + const QQmlProperty &property() const + { + return m_property; + } + + void setValue(const QVariant &value) + { + m_value = value; + } + + const QVariant &value() const + { + return m_value; + } + + void setBinding(QQmlAnyBinding binding) + { + m_binding = binding; + } + + QQmlAnyBinding binding() const + { + return m_binding; + } + + QObject *specifiedObject() const + { + return m_specifiedObject; + } + + const QString &specifiedProperty() const + { + return m_specifiedProperty; + } + + QQuickStateActionEvent *event() const + { + return m_event; + } + + bool reverseEvent() const + { + return m_reverseEvent; + } + +private: + QQmlProperty m_property; + QVariant m_value; + QQmlAnyBinding m_binding; + QObject *m_specifiedObject; + QString m_specifiedProperty; + QQuickStateActionEvent *m_event; + bool m_reverseEvent; +}; + +class QQuickRevertAction +{ +public: + QQuickRevertAction() : event(nullptr) {} + QQuickRevertAction(const QQmlProperty &prop) : property(prop), event(nullptr) {} + QQuickRevertAction(QQuickStateActionEvent *e) : event(e) {} + QQmlProperty property; + QQuickStateActionEvent *event; +}; + +class QQuickStateOperationPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickStateOperation) + +public: + + QQuickStateOperationPrivate() + : m_state(nullptr) {} + + QQuickState *m_state; +}; + +class QQuickStatePrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickState) + +public: + QQuickStatePrivate() + : when(false), whenKnown(false), named(false), inState(false), group(nullptr) {} + + typedef QList SimpleActionList; + + QString name; + bool when; + bool whenKnown; + bool named; + + struct OperationGuard : public QQmlGuard + { + OperationGuard(QObject *obj, QList *l) : QQmlGuard( + OperationGuard::objectDestroyedImpl, nullptr) + ,list(l) + { + setObject(static_cast(obj)); + } + QList *list; + + private: + static void objectDestroyedImpl(QQmlGuardImpl *guard) { + auto This = static_cast(guard); + // we assume priv will always be destroyed after objectDestroyed calls + This->list->removeOne(*This); + } + }; + QList operations; + + static void operations_append(QQmlListProperty *prop, QQuickStateOperation *op) { + QList *list = static_cast *>(prop->data); + op->setState(qobject_cast(prop->object)); + list->append(OperationGuard(op, list)); + } + static void operations_clear(QQmlListProperty *prop) { + QList *list = static_cast *>(prop->data); + for (auto &e : *list) + e->setState(nullptr); + list->clear(); + } + static qsizetype operations_count(QQmlListProperty *prop) { + QList *list = static_cast *>(prop->data); + return list->size(); + } + static QQuickStateOperation *operations_at(QQmlListProperty *prop, qsizetype index) { + QList *list = static_cast *>(prop->data); + return list->at(index); + } + static void operations_replace(QQmlListProperty *prop, qsizetype index, + QQuickStateOperation *op) { + QList *list = static_cast *>(prop->data); + auto &guard = list->at(index); + if (guard.object() == op) { + op->setState(qobject_cast(prop->object)); + } else { + list->at(index)->setState(nullptr); + op->setState(qobject_cast(prop->object)); + list->replace(index, OperationGuard(op, list)); + } + } + static void operations_removeLast(QQmlListProperty *prop) { + QList *list = static_cast *>(prop->data); + list->last()->setState(nullptr); + list->removeLast(); + } + + QQuickTransitionManager transitionManager; + + SimpleActionList revertList; + QList reverting; + QString extends; + mutable bool inState; + QQuickStateGroup *group; + + QQuickStateOperation::ActionList generateActionList() const; + void complete(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstatechangescript_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstatechangescript_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7001dd04621717166f6c3b8e342cd93fc3f981b7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstatechangescript_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTATEOPERATIONS_H +#define QQUICKSTATEOPERATIONS_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstate_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickStateChangeScriptPrivate; +class Q_QUICK_EXPORT QQuickStateChangeScript : public QQuickStateOperation, public QQuickStateActionEvent +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickStateChangeScript) + + Q_PROPERTY(QQmlScriptString script READ script WRITE setScript) + Q_PROPERTY(QString name READ name WRITE setName) + QML_NAMED_ELEMENT(StateChangeScript) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickStateChangeScript(QObject *parent=nullptr); + + ActionList actions() override; + + EventType type() const override; + + QQmlScriptString script() const; + void setScript(const QQmlScriptString &); + + QString name() const; + void setName(const QString &); + + void execute() override; +}; + + +QT_END_NAMESPACE + +#endif // QQUICKSTATEOPERATIONS_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstategroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstategroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7f4f6dc20e582c68bbcde6b07577a74ba7e9a505 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstategroup_p.h @@ -0,0 +1,64 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTATEGROUP_H +#define QQUICKSTATEGROUP_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstate_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickStateGroupPrivate; +class Q_QUICK_EXPORT QQuickStateGroup : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_DECLARE_PRIVATE(QQuickStateGroup) + + Q_PROPERTY(QString state READ state WRITE setState NOTIFY stateChanged) + Q_PROPERTY(QQmlListProperty states READ statesProperty DESIGNABLE false) + Q_PROPERTY(QQmlListProperty transitions READ transitionsProperty DESIGNABLE false) + QML_NAMED_ELEMENT(StateGroup) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickStateGroup(QObject * = nullptr); + virtual ~QQuickStateGroup(); + + QString state() const; + void setState(const QString &); + + QQmlListProperty statesProperty(); + QList states() const; + + QQmlListProperty transitionsProperty(); + + QQuickState *findState(const QString &name) const; + void removeState(QQuickState *state); + + void classBegin() override; + void componentComplete() override; +Q_SIGNALS: + void stateChanged(const QString &); + +private: + friend class QQuickState; + friend class QQuickStatePrivate; + bool updateAutoState(); + void stateAboutToComplete(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTATEGROUP_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstateoperations_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstateoperations_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7db1617a7baedf64a0ce5c59b1ecdad90177ea50 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstateoperations_p.h @@ -0,0 +1,189 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTATEOPERATIONS_P_H +#define QQUICKSTATEOPERATIONS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickitem.h" +#include "qquickanchors_p.h" + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickParentChangePrivate; +class Q_QUICK_EXPORT QQuickParentChange : public QQuickStateOperation, public QQuickStateActionEvent +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickParentChange) + + Q_PROPERTY(QQuickItem *target READ object WRITE setObject) + Q_PROPERTY(QQuickItem *parent READ parent WRITE setParent) + Q_PROPERTY(QQmlScriptString x READ x WRITE setX) + Q_PROPERTY(QQmlScriptString y READ y WRITE setY) + Q_PROPERTY(QQmlScriptString width READ width WRITE setWidth) + Q_PROPERTY(QQmlScriptString height READ height WRITE setHeight) + Q_PROPERTY(QQmlScriptString scale READ scale WRITE setScale) + Q_PROPERTY(QQmlScriptString rotation READ rotation WRITE setRotation) + Q_CLASSINFO("ParentProperty", "parent") + QML_NAMED_ELEMENT(ParentChange) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickParentChange(QObject *parent=nullptr); + + QQuickItem *object() const; + void setObject(QQuickItem *); + + QQuickItem *parent() const; + void setParent(QQuickItem *); + + QQuickItem *originalParent() const; + + QQmlScriptString x() const; + void setX(const QQmlScriptString &x); + bool xIsSet() const; + + QQmlScriptString y() const; + void setY(const QQmlScriptString &y); + bool yIsSet() const; + + QQmlScriptString width() const; + void setWidth(const QQmlScriptString &width); + bool widthIsSet() const; + + QQmlScriptString height() const; + void setHeight(const QQmlScriptString &height); + bool heightIsSet() const; + + QQmlScriptString scale() const; + void setScale(const QQmlScriptString &scale); + bool scaleIsSet() const; + + QQmlScriptString rotation() const; + void setRotation(const QQmlScriptString &rotation); + bool rotationIsSet() const; + + ActionList actions() override; + + void saveOriginals() override; + //virtual void copyOriginals(QQuickStateActionEvent*); + void execute() override; + bool isReversable() override; + void reverse() override; + EventType type() const override; + bool mayOverride(QQuickStateActionEvent*other) override; + void rewind() override; + void saveCurrentValues() override; +}; + +class QQuickAnchorChanges; +class QQuickAnchorSetPrivate; +class Q_QUICK_EXPORT QQuickAnchorSet : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QQmlScriptString left READ left WRITE setLeft RESET resetLeft FINAL) + Q_PROPERTY(QQmlScriptString right READ right WRITE setRight RESET resetRight FINAL) + Q_PROPERTY(QQmlScriptString horizontalCenter READ horizontalCenter WRITE setHorizontalCenter RESET resetHorizontalCenter FINAL) + Q_PROPERTY(QQmlScriptString top READ top WRITE setTop RESET resetTop FINAL) + Q_PROPERTY(QQmlScriptString bottom READ bottom WRITE setBottom RESET resetBottom FINAL) + Q_PROPERTY(QQmlScriptString verticalCenter READ verticalCenter WRITE setVerticalCenter RESET resetVerticalCenter FINAL) + Q_PROPERTY(QQmlScriptString baseline READ baseline WRITE setBaseline RESET resetBaseline FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickAnchorSet(QObject *parent=nullptr); + virtual ~QQuickAnchorSet(); + + QQmlScriptString left() const; + void setLeft(const QQmlScriptString &edge); + void resetLeft(); + + QQmlScriptString right() const; + void setRight(const QQmlScriptString &edge); + void resetRight(); + + QQmlScriptString horizontalCenter() const; + void setHorizontalCenter(const QQmlScriptString &edge); + void resetHorizontalCenter(); + + QQmlScriptString top() const; + void setTop(const QQmlScriptString &edge); + void resetTop(); + + QQmlScriptString bottom() const; + void setBottom(const QQmlScriptString &edge); + void resetBottom(); + + QQmlScriptString verticalCenter() const; + void setVerticalCenter(const QQmlScriptString &edge); + void resetVerticalCenter(); + + QQmlScriptString baseline() const; + void setBaseline(const QQmlScriptString &edge); + void resetBaseline(); + + QQuickAnchors::Anchors usedAnchors() const; + +private: + friend class QQuickAnchorChanges; + Q_DISABLE_COPY(QQuickAnchorSet) + Q_DECLARE_PRIVATE(QQuickAnchorSet) +}; + +class QQuickAnchorChangesPrivate; +class Q_QUICK_EXPORT QQuickAnchorChanges : public QQuickStateOperation, public QQuickStateActionEvent +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickAnchorChanges) + + Q_PROPERTY(QQuickItem *target READ object WRITE setObject) + Q_PROPERTY(QQuickAnchorSet *anchors READ anchors CONSTANT) + QML_NAMED_ELEMENT(AnchorChanges) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickAnchorChanges(QObject *parent=nullptr); + + ActionList actions() override; + + QQuickAnchorSet *anchors() const; + + QQuickItem *object() const; + void setObject(QQuickItem *); + + void execute() override; + bool isReversable() override; + void reverse() override; + EventType type() const override; + bool mayOverride(QQuickStateActionEvent*other) override; + bool changesBindings() override; + void saveOriginals() override; + bool needsCopy() override { return true; } + void copyOriginals(QQuickStateActionEvent*) override; + void clearBindings() override; + void rewind() override; + void saveCurrentValues() override; + + QList additionalActions() const; + void saveTargetValues() override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTATEOPERATIONS_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstyledtext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstyledtext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..330020cf403c88989ac1d5d8de0cf6ff390fbac2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquickstyledtext_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTYLEDTEXT_H +#define QQUICKSTYLEDTEXT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickStyledTextImgTag; +class QQuickStyledTextPrivate; +class QString; +class QQmlContext; + +class Q_AUTOTEST_EXPORT QQuickStyledTextImgTag +{ +public: + QQuickStyledTextImgTag() = default; + ~QQuickStyledTextImgTag() = default; + + enum Align { + Bottom, + Middle, + Top + }; + + QUrl url; + QPointF pos; + QSize size; + int position = 0; + qreal offset = 0.0; // this offset allows us to compensate for flooring reserved space + Align align = QQuickStyledTextImgTag::Bottom; + QScopedPointer pix; +}; + +class Q_AUTOTEST_EXPORT QQuickStyledText +{ +public: + static void parse(const QString &string, QTextLayout &layout, + QList &imgTags, + const QUrl &baseUrl, + QQmlContext *context, + bool preloadImages, + bool *fontSizeModified); + +private: + QQuickStyledText(const QString &string, QTextLayout &layout, + QList &imgTags, + const QUrl &baseUrl, + QQmlContext *context, + bool preloadImages, + bool *fontSizeModified); + ~QQuickStyledText(); + + QQuickStyledTextPrivate *d; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksvgparser_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksvgparser_p.h new file mode 100644 index 0000000000000000000000000000000000000000..dc9d40981fc6f912ce2edc66fdda971b65da40f0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksvgparser_p.h @@ -0,0 +1,34 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSVGPARSER_P_H +#define QQUICKSVGPARSER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QQuickSvgParser +{ + bool parsePathDataFast(const QString &dataStr, QPainterPath &path); + Q_QUICK_EXPORT void pathArc(QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, + int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx, + qreal cury); +} + +QT_END_NAMESPACE + +#endif // QQUICKSVGPARSER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksystempalette_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksystempalette_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4fe3373e92054c2bfd78cba4fa1ac13bf56dfcc2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicksystempalette_p.h @@ -0,0 +1,91 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSYSTEMPALETTE_H +#define QQUICKSYSTEMPALETTE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSystemPalettePrivate; +class Q_QUICK_EXPORT QQuickSystemPalette : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickSystemPalette) + + Q_PROPERTY(QQuickSystemPalette::ColorGroup colorGroup READ colorGroup WRITE setColorGroup NOTIFY paletteChanged) + Q_PROPERTY(QColor window READ window NOTIFY paletteChanged) + Q_PROPERTY(QColor windowText READ windowText NOTIFY paletteChanged) + Q_PROPERTY(QColor base READ base NOTIFY paletteChanged) + Q_PROPERTY(QColor text READ text NOTIFY paletteChanged) + Q_PROPERTY(QColor alternateBase READ alternateBase NOTIFY paletteChanged) + Q_PROPERTY(QColor button READ button NOTIFY paletteChanged) + Q_PROPERTY(QColor buttonText READ buttonText NOTIFY paletteChanged) + Q_PROPERTY(QColor light READ light NOTIFY paletteChanged) + Q_PROPERTY(QColor midlight READ midlight NOTIFY paletteChanged) + Q_PROPERTY(QColor dark READ dark NOTIFY paletteChanged) + Q_PROPERTY(QColor mid READ mid NOTIFY paletteChanged) + Q_PROPERTY(QColor shadow READ shadow NOTIFY paletteChanged) + Q_PROPERTY(QColor highlight READ highlight NOTIFY paletteChanged) + Q_PROPERTY(QColor highlightedText READ highlightedText NOTIFY paletteChanged) + Q_PROPERTY(QColor placeholderText READ placeholderText NOTIFY paletteChanged REVISION(6, 2)) + Q_PROPERTY(QColor accent READ accent NOTIFY paletteChanged REVISION(6, 7) FINAL) + QML_NAMED_ELEMENT(SystemPalette) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickSystemPalette(QObject *parent=nullptr); + + enum ColorGroup { Active = QPalette::Active, Inactive = QPalette::Inactive, Disabled = QPalette::Disabled }; + Q_ENUM(ColorGroup) + + QColor window() const; + QColor windowText() const; + + QColor base() const; + QColor text() const; + QColor alternateBase() const; + + QColor button() const; + QColor buttonText() const; + + QColor light() const; + QColor midlight() const; + QColor dark() const; + QColor mid() const; + QColor shadow() const; + + QColor highlight() const; + QColor highlightedText() const; + + QColor placeholderText() const; + QColor accent() const; + + QQuickSystemPalette::ColorGroup colorGroup() const; + void setColorGroup(QQuickSystemPalette::ColorGroup); + +Q_SIGNALS: + void paletteChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSYSTEMPALETTE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..40152913f95a3cfc4bab784e845af12d542a5503 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p.h @@ -0,0 +1,343 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTABLEVIEW_P_H +#define QQUICKTABLEVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +QT_REQUIRE_CONFIG(quick_tableview); + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTableViewAttached; +class QQuickTableViewPrivate; +class QItemSelectionModel; + +class Q_QUICK_EXPORT QQuickTableView : public QQuickFlickable, public QQmlFinalizerHook +{ + Q_OBJECT + Q_INTERFACES(QQmlFinalizerHook) + + Q_PROPERTY(int rows READ rows NOTIFY rowsChanged) + Q_PROPERTY(int columns READ columns NOTIFY columnsChanged) + Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged) + Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged) + Q_PROPERTY(QJSValue rowHeightProvider READ rowHeightProvider WRITE setRowHeightProvider NOTIFY rowHeightProviderChanged) + Q_PROPERTY(QJSValue columnWidthProvider READ columnWidthProvider WRITE setColumnWidthProvider NOTIFY columnWidthProviderChanged) + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(bool reuseItems READ reuseItems WRITE setReuseItems NOTIFY reuseItemsChanged) + Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged) + Q_PROPERTY(QQuickTableView *syncView READ syncView WRITE setSyncView NOTIFY syncViewChanged REVISION(2, 14)) + Q_PROPERTY(Qt::Orientations syncDirection READ syncDirection WRITE setSyncDirection NOTIFY syncDirectionChanged REVISION(2, 14)) + Q_PROPERTY(int leftColumn READ leftColumn NOTIFY leftColumnChanged REVISION(6, 0)) + Q_PROPERTY(int rightColumn READ rightColumn NOTIFY rightColumnChanged REVISION(6, 0)) + Q_PROPERTY(int topRow READ topRow NOTIFY topRowChanged REVISION(6, 0)) + Q_PROPERTY(int bottomRow READ bottomRow NOTIFY bottomRowChanged REVISION(6, 0)) + Q_PROPERTY(QItemSelectionModel *selectionModel READ selectionModel WRITE setSelectionModel NOTIFY selectionModelChanged REVISION(6, 2)) + Q_PROPERTY(bool animate READ animate WRITE setAnimate NOTIFY animateChanged REVISION(6, 4)) + Q_PROPERTY(bool keyNavigationEnabled READ keyNavigationEnabled WRITE setKeyNavigationEnabled NOTIFY keyNavigationEnabledChanged REVISION(6, 4)) + Q_PROPERTY(bool pointerNavigationEnabled READ pointerNavigationEnabled WRITE setPointerNavigationEnabled NOTIFY pointerNavigationEnabledChanged REVISION(6, 4)) + Q_PROPERTY(int currentRow READ currentRow NOTIFY currentRowChanged REVISION(6, 4) FINAL) + Q_PROPERTY(int currentColumn READ currentColumn NOTIFY currentColumnChanged REVISION(6, 4) FINAL) + Q_PROPERTY(bool alternatingRows READ alternatingRows WRITE setAlternatingRows NOTIFY alternatingRowsChanged REVISION(6, 4) FINAL) + Q_PROPERTY(SelectionBehavior selectionBehavior READ selectionBehavior WRITE setSelectionBehavior NOTIFY selectionBehaviorChanged REVISION(6, 4) FINAL) + Q_PROPERTY(bool resizableColumns READ resizableColumns WRITE setResizableColumns NOTIFY resizableColumnsChanged REVISION(6, 5) FINAL) + Q_PROPERTY(bool resizableRows READ resizableRows WRITE setResizableRows NOTIFY resizableRowsChanged REVISION(6, 5) FINAL) + Q_PROPERTY(EditTriggers editTriggers READ editTriggers WRITE setEditTriggers NOTIFY editTriggersChanged REVISION(6, 5) FINAL) + Q_PROPERTY(SelectionMode selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged REVISION(6, 6) FINAL) + + QML_NAMED_ELEMENT(TableView) + QML_ADDED_IN_VERSION(2, 12) + QML_ATTACHED(QQuickTableViewAttached) + +public: + enum PositionModeFlag { + AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter, + AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter, + AlignCenter = AlignVCenter | AlignHCenter, + Visible = 0x01000, + Contain = 0x02000 + }; + Q_DECLARE_FLAGS(PositionMode, PositionModeFlag) + Q_FLAG(PositionMode) + + enum SelectionBehavior { + SelectionDisabled, + SelectCells, + SelectRows, + SelectColumns + }; + Q_ENUM(SelectionBehavior) + + enum SelectionMode { + SingleSelection, + ContiguousSelection, + ExtendedSelection + }; + Q_ENUM(SelectionMode) + + enum EditTrigger { + NoEditTriggers = 0x0, + SingleTapped = 0x1, + DoubleTapped = 0x2, + SelectedTapped = 0x4, + EditKeyPressed = 0x8, + AnyKeyPressed = 0x10, + }; + Q_DECLARE_FLAGS(EditTriggers, EditTrigger) + Q_FLAG(EditTriggers) + + QQuickTableView(QQuickItem *parent = nullptr); + ~QQuickTableView() override; + int rows() const; + int columns() const; + + qreal rowSpacing() const; + void setRowSpacing(qreal spacing); + + qreal columnSpacing() const; + void setColumnSpacing(qreal spacing); + + QJSValue rowHeightProvider() const; + void setRowHeightProvider(const QJSValue &provider); + + QJSValue columnWidthProvider() const; + void setColumnWidthProvider(const QJSValue &provider); + + QVariant model() const; + void setModel(const QVariant &newModel); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *); + + bool reuseItems() const; + void setReuseItems(bool reuseItems); + + void setContentWidth(qreal width); + void setContentHeight(qreal height); + + QQuickTableView *syncView() const; + void setSyncView(QQuickTableView *view); + + Qt::Orientations syncDirection() const; + void setSyncDirection(Qt::Orientations direction); + + QItemSelectionModel *selectionModel() const; + void setSelectionModel(QItemSelectionModel *selectionModel); + + bool animate() const; + void setAnimate(bool animate); + + bool keyNavigationEnabled() const; + void setKeyNavigationEnabled(bool enabled); + bool pointerNavigationEnabled() const; + void setPointerNavigationEnabled(bool enabled); + + int leftColumn() const; + int rightColumn() const; + int topRow() const; + int bottomRow() const; + + int currentRow() const; + int currentColumn() const; + + bool alternatingRows() const; + void setAlternatingRows(bool alternatingRows); + + SelectionBehavior selectionBehavior() const; + void setSelectionBehavior(SelectionBehavior selectionBehavior); + SelectionMode selectionMode() const; + void setSelectionMode(SelectionMode selectionMode); + + bool resizableColumns() const; + void setResizableColumns(bool enabled); + + bool resizableRows() const; + void setResizableRows(bool enabled); + + EditTriggers editTriggers() const; + void setEditTriggers(EditTriggers editTriggers); + + Q_INVOKABLE void forceLayout(); + Q_INVOKABLE void positionViewAtCell(const QPoint &cell, PositionMode mode, const QPointF &offset = QPointF(), const QRectF &subRect = QRectF()); + Q_INVOKABLE void positionViewAtIndex(const QModelIndex &index, PositionMode mode, const QPointF &offset = QPointF(), const QRectF &subRect = QRectF()); + Q_INVOKABLE void positionViewAtRow(int row, PositionMode mode, qreal offset = 0, const QRectF &subRect = QRectF()); + Q_INVOKABLE void positionViewAtColumn(int column, PositionMode mode, qreal offset = 0, const QRectF &subRect = QRectF()); + Q_INVOKABLE QQuickItem *itemAtCell(const QPoint &cell) const; + + Q_REVISION(6, 4) Q_INVOKABLE QPoint cellAtPosition(const QPointF &position, bool includeSpacing = false) const; + Q_REVISION(6, 4) Q_INVOKABLE QPoint cellAtPosition(qreal x, qreal y, bool includeSpacing = false) const; +#if QT_DEPRECATED_SINCE(6, 4) + QT_DEPRECATED_VERSION_X_6_4("Use index(row, column) instead") + Q_REVISION(6, 4) Q_INVOKABLE virtual QModelIndex modelIndex(int row, int column) const; + QT_DEPRECATED_VERSION_X_6_4("Use cellAtPosition() instead") + Q_INVOKABLE QPoint cellAtPos(const QPointF &position, bool includeSpacing = false) const; + Q_INVOKABLE QPoint cellAtPos(qreal x, qreal y, bool includeSpacing = false) const; +#endif + + Q_REVISION(6, 2) Q_INVOKABLE bool isColumnLoaded(int column) const; + Q_REVISION(6, 2) Q_INVOKABLE bool isRowLoaded(int row) const; + + Q_REVISION(6, 2) Q_INVOKABLE qreal columnWidth(int column) const; + Q_REVISION(6, 2) Q_INVOKABLE qreal rowHeight(int row) const; + Q_REVISION(6, 2) Q_INVOKABLE qreal implicitColumnWidth(int column) const; + Q_REVISION(6, 2) Q_INVOKABLE qreal implicitRowHeight(int row) const; + + Q_REVISION(6, 4) Q_INVOKABLE QModelIndex index(int row, int column) const; + Q_REVISION(6, 4) Q_INVOKABLE virtual QModelIndex modelIndex(const QPoint &cell) const; + Q_REVISION(6, 4) Q_INVOKABLE virtual QPoint cellAtIndex(const QModelIndex &index) const; + Q_REVISION(6, 4) Q_INVOKABLE int rowAtIndex(const QModelIndex &index) const; + Q_REVISION(6, 4) Q_INVOKABLE int columnAtIndex(const QModelIndex &index) const; + + Q_REVISION(6, 5) Q_INVOKABLE void setColumnWidth(int column, qreal size); + Q_REVISION(6, 5) Q_INVOKABLE void clearColumnWidths(); + Q_REVISION(6, 5) Q_INVOKABLE qreal explicitColumnWidth(int column) const; + + Q_REVISION(6, 5) Q_INVOKABLE void setRowHeight(int row, qreal size); + Q_REVISION(6, 5) Q_INVOKABLE void clearRowHeights(); + Q_REVISION(6, 5) Q_INVOKABLE qreal explicitRowHeight(int row) const; + + Q_REVISION(6, 5) Q_INVOKABLE void edit(const QModelIndex &index); + Q_REVISION(6, 5) Q_INVOKABLE void closeEditor(); + + Q_REVISION(6, 5) Q_INVOKABLE QQuickItem *itemAtIndex(const QModelIndex &index) const; + +#if QT_DEPRECATED_SINCE(6, 5) + QT_DEPRECATED_VERSION_X_6_5("Use itemAtIndex(index(row, column)) instead") + Q_INVOKABLE QQuickItem *itemAtCell(int column, int row) const; + QT_DEPRECATED_VERSION_X_6_5("Use positionViewAtIndex(index(row, column)) instead") + Q_INVOKABLE void positionViewAtCell(int column, int row, PositionMode mode, const QPointF &offset = QPointF(), const QRectF &subRect = QRectF()); +#endif + + Q_REVISION(6, 8) Q_INVOKABLE void moveColumn(int source, int destination); + Q_REVISION(6, 8) Q_INVOKABLE void moveRow(int source, int destination); + Q_REVISION(6, 8) Q_INVOKABLE void clearColumnReordering(); + Q_REVISION(6, 8) Q_INVOKABLE void clearRowReordering(); + + static QQuickTableViewAttached *qmlAttachedProperties(QObject *); + +Q_SIGNALS: + void rowsChanged(); + void columnsChanged(); + void rowSpacingChanged(); + void columnSpacingChanged(); + void rowHeightProviderChanged(); + void columnWidthProviderChanged(); + void modelChanged(); + void delegateChanged(); + void reuseItemsChanged(); + Q_REVISION(2, 14) void syncViewChanged(); + Q_REVISION(2, 14) void syncDirectionChanged(); + Q_REVISION(6, 0) void leftColumnChanged(); + Q_REVISION(6, 0) void rightColumnChanged(); + Q_REVISION(6, 0) void topRowChanged(); + Q_REVISION(6, 0) void bottomRowChanged(); + Q_REVISION(6, 2) void selectionModelChanged(); + Q_REVISION(6, 4) void animateChanged(); + Q_REVISION(6, 4) void keyNavigationEnabledChanged(); + Q_REVISION(6, 4) void pointerNavigationEnabledChanged(); + Q_REVISION(6, 4) void currentRowChanged(); + Q_REVISION(6, 4) void currentColumnChanged(); + Q_REVISION(6, 4) void alternatingRowsChanged(); + Q_REVISION(6, 4) void selectionBehaviorChanged(); + Q_REVISION(6, 5) void resizableColumnsChanged(); + Q_REVISION(6, 5) void resizableRowsChanged(); + Q_REVISION(6, 5) void editTriggersChanged(); + Q_REVISION(6, 5) void layoutChanged(); + Q_REVISION(6, 6) void selectionModeChanged(); + Q_REVISION(6, 8) void rowMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex); + Q_REVISION(6, 8) void columnMoved(int logicalIndex, int oldVisualIndex, int newVisualIndex); + + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void viewportMoved(Qt::Orientations orientation) override; + void keyPressEvent(QKeyEvent *e) override; + bool eventFilter(QObject *obj, QEvent *event) override; + +protected: + QQuickTableView(QQuickTableViewPrivate &dd, QQuickItem *parent); + // QQmlFinalizerHook interface + void componentFinalized() override; + +private: + Q_DISABLE_COPY(QQuickTableView) + Q_DECLARE_PRIVATE(QQuickTableView) + + qreal minXExtent() const override; + qreal maxXExtent() const override; + qreal minYExtent() const override; + qreal maxYExtent() const override; +}; + +class Q_QUICK_EXPORT QQuickTableViewAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickTableView *view READ view NOTIFY viewChanged FINAL) + Q_PROPERTY(QQmlComponent *editDelegate READ editDelegate WRITE setEditDelegate NOTIFY editDelegateChanged FINAL) + +public: + QQuickTableViewAttached(QObject *parent) + : QObject(parent) {} + + QQuickTableView *view() const { return m_view; } + void setView(QQuickTableView *newTableView) { + if (newTableView == m_view) + return; + m_view = newTableView; + Q_EMIT viewChanged(); + } + + QQmlComponent *editDelegate() const { return m_editDelegate; } + void setEditDelegate(QQmlComponent *newEditDelegate) + { + if (m_editDelegate == newEditDelegate) + return; + m_editDelegate = newEditDelegate; + Q_EMIT editDelegateChanged(); + } + +Q_SIGNALS: + void viewChanged(); + void pooled(); + void reused(); + void editDelegateChanged(); + void commit(); + +private: + QPointer m_view; + QQmlGuard m_editDelegate; + + friend class QQuickTableViewPrivate; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickTableView::PositionMode) +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickTableView::EditTriggers) + +QT_END_NAMESPACE + +#endif // QQUICKTABLEVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3b593c39c8b436c9b74e7726d10b3b705d73a8a4 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktableview_p_p.h @@ -0,0 +1,709 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTABLEVIEW_P_P_H +#define QQUICKTABLEVIEW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicktableview_p.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcTableViewDelegateLifecycle) + +static const qreal kDefaultRowHeight = 50; +static const qreal kDefaultColumnWidth = 50; +static const int kEdgeIndexNotSet = -2; +static const int kEdgeIndexAtEnd = -3; + +class FxTableItem; +class QQuickTableSectionSizeProviderPrivate; + +/*! \internal + * TableView uses QQuickTableViewHoverHandler to track where the pointer is + * on top of the table, and change the cursor at the places where a drag + * would start a resize of a row or a column. + */ +class QQuickTableViewHoverHandler : public QQuickHoverHandler +{ + Q_OBJECT + +public: + QQuickTableViewHoverHandler(QQuickTableView *view); + inline bool isHoveringGrid() const { return m_row != -1 || m_column != -1; }; + + int m_row = -1; + int m_column = -1; + + friend class QQuickTableViewPrivate; + +protected: + void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; +}; + +class QQuickTableViewPointerHandler : public QQuickSinglePointHandler +{ + Q_OBJECT + +public: + enum State { + Listening, // the pointer is not being pressed between the cells + Tracking, // the pointer is being pressed between the cells + DraggingStarted, // dragging started + Dragging, // a drag is ongoing + DraggingFinished // dragging was finished + }; + + QQuickTableViewPointerHandler(QQuickTableView *view); + + State m_state = Listening; + State state() { return m_state; } + +protected: + bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override; +}; + +/*! \internal + * TableView uses QQuickTableViewResizeHandler to enable the user to resize + * rows and columns. By using a custom pointer handler, we can get away with + * using a single pointer handler for the whole content item, rather than + * e.g having to split it up into multiple items with drag handlers placed + * between the cells. + */ +class QQuickTableViewResizeHandler : public QQuickTableViewPointerHandler +{ + Q_OBJECT + +public: + QQuickTableViewResizeHandler(QQuickTableView *view); + + int m_row = -1; + qreal m_rowStartY = -1; + qreal m_rowStartHeight = -1; + + int m_column = -1; + qreal m_columnStartX = -1; + qreal m_columnStartWidth = -1; + + void updateState(QEventPoint &point); + void updateDrag(QPointerEvent *event, QEventPoint &point); + + friend class QQuickTableViewPrivate; + +protected: + void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; + void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, + QPointerEvent *ev, QEventPoint &point) override; +}; + +class QQuickTableViewSectionDragHandler : public QQuickTableViewPointerHandler +{ + Q_OBJECT + +public: + QQuickTableViewSectionDragHandler(QQuickTableView *view); + ~QQuickTableViewSectionDragHandler(); + + void grabSection(); + + void handleDrag(QQuickDragEvent *event); + void handleDrop(QQuickDragEvent *event); + void handleDragDropAction(Qt::DropAction action); + + void setSectionOrientation(Qt::Orientation orientation) { m_sectionOrientation = orientation; } + + friend class QQuickTableViewPrivate; + +protected: + void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; + +private: + void resetDragData(); + void resetSectionOverlay(); + + QSharedPointer m_grabResult; + QPointer m_drag; + int m_source = -1; + int m_destination = -1; + QPointer m_dropArea; + Qt::Orientation m_sectionOrientation; + + QPointF m_dragPoint; + QSizeF m_step = QSizeF(1, 1); + QTimer m_scrollTimer; +}; + +/*! \internal + * QQuickTableViewTapHandler used to handle tap events explicitly for table view + */ +class QQuickTableViewTapHandler : public QQuickTapHandler +{ + Q_OBJECT + +public: + explicit QQuickTableViewTapHandler(QQuickTableView *view); + bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override; + + friend class QQuickTableViewPrivate; +}; + +class Q_QUICK_EXPORT QQuickTableViewPrivate : public QQuickFlickablePrivate, public QQuickSelectable +{ +public: + Q_DECLARE_PUBLIC(QQuickTableView) + + class TableEdgeLoadRequest + { + // Whenever we need to load new rows or columns in the + // table, we fill out a TableEdgeLoadRequest. + // TableEdgeLoadRequest is just a struct that keeps track + // of which cells that needs to be loaded, and which cell + // the table is currently loading. The loading itself is + // done by QQuickTableView. + + public: + void begin(const QPoint &cell, const QPointF &pos, QQmlIncubator::IncubationMode incubationMode) + { + Q_ASSERT(!m_active); + m_active = true; + m_edge = Qt::Edge(0); + m_mode = incubationMode; + m_edgeIndex = cell.x(); + m_visibleCellsInEdge.clear(); + m_visibleCellsInEdge.append(cell.y()); + m_currentIndex = 0; + m_startPos = pos; + qCDebug(lcTableViewDelegateLifecycle()) << "begin top-left:" << toString(); + } + + void begin(Qt::Edge edgeToLoad, int edgeIndex, const QVector visibleCellsInEdge, QQmlIncubator::IncubationMode incubationMode) + { + Q_ASSERT(!m_active); + m_active = true; + m_edge = edgeToLoad; + m_edgeIndex = edgeIndex; + m_visibleCellsInEdge = visibleCellsInEdge; + m_mode = incubationMode; + m_currentIndex = 0; + qCDebug(lcTableViewDelegateLifecycle()) << "begin:" << toString(); + } + + inline void markAsDone() { m_active = false; } + inline bool isActive() const { return m_active; } + + inline QPoint currentCell() const { return cellAt(m_currentIndex); } + inline bool hasCurrentCell() const { return m_currentIndex < m_visibleCellsInEdge.size(); } + inline void moveToNextCell() { ++m_currentIndex; } + + inline Qt::Edge edge() const { return m_edge; } + inline int row() const { return cellAt(0).y(); } + inline int column() const { return cellAt(0).x(); } + inline QQmlIncubator::IncubationMode incubationMode() const { return m_mode; } + + inline QPointF startPosition() const { return m_startPos; } + + QString toString() const + { + QString str; + QDebug dbg(&str); + dbg.nospace() << "TableSectionLoadRequest(" << "edge:" + << m_edge << ", edgeIndex:" << m_edgeIndex << ", incubation:"; + + switch (m_mode) { + case QQmlIncubator::Asynchronous: + dbg << "Asynchronous"; + break; + case QQmlIncubator::AsynchronousIfNested: + dbg << "AsynchronousIfNested"; + break; + case QQmlIncubator::Synchronous: + dbg << "Synchronous"; + break; + } + + return str; + } + + private: + Qt::Edge m_edge = Qt::Edge(0); + QVector m_visibleCellsInEdge; + int m_edgeIndex = 0; + int m_currentIndex = 0; + bool m_active = false; + QQmlIncubator::IncubationMode m_mode = QQmlIncubator::AsynchronousIfNested; + QPointF m_startPos; + + inline QPoint cellAt(int index) const { + return !m_edge || (m_edge & (Qt::LeftEdge | Qt::RightEdge)) + ? QPoint(m_edgeIndex, m_visibleCellsInEdge[index]) + : QPoint(m_visibleCellsInEdge[index], m_edgeIndex); + } + }; + + class EdgeRange { + public: + EdgeRange(); + bool containsIndex(Qt::Edge edge, int index); + + int startIndex; + int endIndex; + qreal size; + }; + + enum class RebuildState { + Begin = 0, + LoadInitalTable, + VerifyTable, + LayoutTable, + CancelOvershoot, + UpdateContentSize, + PreloadColumns, + PreloadRows, + MovePreloadedItemsToPool, + Done + }; + + enum class SectionState { + Idle = 0, + Moving + }; + + enum class RebuildOption { + None = 0, + All = 0x1, + LayoutOnly = 0x2, + ViewportOnly = 0x4, + CalculateNewTopLeftRow = 0x8, + CalculateNewTopLeftColumn = 0x10, + CalculateNewContentWidth = 0x20, + CalculateNewContentHeight = 0x40, + PositionViewAtRow = 0x80, + PositionViewAtColumn = 0x100, + }; + Q_DECLARE_FLAGS(RebuildOptions, RebuildOption) + +public: + QQuickTableViewPrivate(); + ~QQuickTableViewPrivate() override; + + static inline QQuickTableViewPrivate *get(QQuickTableView *q) { return q->d_func(); } + + void updatePolish() override; + void fixup(AxisData &data, qreal minExtent, qreal maxExtent) override; + +public: + QHash loadedItems; + + // model, tableModel and modelVariant all point to the same model. modelVariant + // is the model assigned by the user. And tableModel is the wrapper model we create + // around it. But if the model is an instance model directly, we cannot wrap it, so + // we need a pointer for that case as well. + QQmlInstanceModel* model = nullptr; + QPointer tableModel = nullptr; + QVariant modelVariant; + + // When the applications assignes a new model or delegate to the view, we keep them + // around until we're ready to take them into use (syncWithPendingChanges). + QVariant assignedModel = QVariant(int(0)); + QQmlGuard assignedDelegate; + + // loadedRows/Columns describes the rows and columns that are currently loaded (from top left + // row/column to bottom right row/column). loadedTableOuterRect describes the actual + // pixels that all the loaded delegate items cover, and is matched agains the viewport to determine when + // we need to fill up with more rows/columns. loadedTableInnerRect describes the pixels + // that the loaded table covers if you remove one row/column on each side of the table, and + // is used to determine rows/columns that are no longer visible and can be unloaded. + QMinimalFlatSet loadedColumns; + QMinimalFlatSet loadedRows; + QRectF loadedTableOuterRect; + QRectF loadedTableInnerRect; + + QPointF origin = QPointF(0, 0); + QSizeF endExtent = QSizeF(0, 0); + + QRectF viewportRect = QRectF(0, 0, -1, -1); + + QSize tableSize; + + RebuildState rebuildState = RebuildState::Done; + RebuildOptions rebuildOptions = RebuildOption::All; + RebuildOptions scheduledRebuildOptions = RebuildOption::All; + + TableEdgeLoadRequest loadRequest; + + QSizeF cellSpacing = QSizeF(0, 0); + + QQmlTableInstanceModel::ReusableFlag reusableFlag = QQmlTableInstanceModel::Reusable; + + bool blockItemCreatedCallback = false; + mutable bool layoutWarningIssued = false; + bool polishing = false; + bool syncVertically = false; + bool syncHorizontally = false; + bool inSetLocalViewportPos = false; + bool inSyncViewportPosRecursive = false; + bool inUpdateContentSize = false; + bool animate = true; + bool keyNavigationEnabled = true; + bool pointerNavigationEnabled = true; + bool alternatingRows = true; + bool resizableColumns = false; + bool resizableRows = false; +#if QT_CONFIG(cursor) + bool m_cursorSet = false; +#endif + + // isTransposed is currently only used by HeaderView. + // Consider making it public. + bool isTransposed = false; + + bool warnNoSelectionModel = true; + + QJSValue rowHeightProvider; + QJSValue columnWidthProvider; + + mutable EdgeRange cachedNextVisibleEdgeIndex[4]; + mutable EdgeRange cachedColumnWidth; + mutable EdgeRange cachedRowHeight; + + // TableView uses contentWidth/height to report the size of the table (this + // will e.g make scrollbars written for Flickable work out of the box). This + // value is continuously calculated, and will change/improve as more columns + // are loaded into view. At the same time, we want to open up for the + // possibility that the application can set the content width explicitly, in + // case it knows what the exact width should be from the start. We therefore + // override the contentWidth/height properties from QQuickFlickable, to be able + // to implement this combined behavior. This also lets us lazy build the table + // if the application needs to know the content size early on. + QQmlNullableValue explicitContentWidth; + QQmlNullableValue explicitContentHeight; + + QSizeF averageEdgeSize; + + QPointer assignedSyncView; + QPointer syncView; + QList > syncChildren; + Qt::Orientations assignedSyncDirection = Qt::Horizontal | Qt::Vertical; + + QPointer selectionModel; + QQuickTableView::SelectionBehavior selectionBehavior = QQuickTableView::SelectCells; + QQuickTableView::SelectionMode selectionMode = QQuickTableView::ExtendedSelection; + QItemSelectionModel::SelectionFlag selectionFlag = QItemSelectionModel::NoUpdate; + std::function selectableCallbackFunction; + bool inSelectionModelUpdate = false; + + int assignedPositionViewAtRowAfterRebuild = 0; + int assignedPositionViewAtColumnAfterRebuild = 0; + int positionViewAtRowAfterRebuild = 0; + int positionViewAtColumnAfterRebuild = 0; + qreal positionViewAtRowOffset = 0; + qreal positionViewAtColumnOffset = 0; + QRectF positionViewAtRowSubRect; + QRectF positionViewAtColumnSubRect; + Qt::Alignment positionViewAtRowAlignment = Qt::AlignTop; + Qt::Alignment positionViewAtColumnAlignment = Qt::AlignLeft; + + QQuickPropertyAnimation positionXAnimation; + QQuickPropertyAnimation positionYAnimation; + + QPoint selectionStartCell = {-1, -1}; + QPoint selectionEndCell = {-1, -1}; + QItemSelection existingSelection; + + QMargins edgesBeforeRebuild; + QSize tableSizeBeforeRebuild; + + int currentRow = -1; + int currentColumn = -1; + + QHash explicitColumnWidths; + QHash explicitRowHeights; + + QQuickTableViewHoverHandler *hoverHandler = nullptr; + QQuickTableViewResizeHandler *resizeHandler = nullptr; + QQuickTableViewSectionDragHandler *sectionDragHandler = nullptr; + QQuickTableViewPointerHandler *activePtrHandler = nullptr; + + QQmlTableInstanceModel *editModel = nullptr; + QQuickItem *editItem = nullptr; + QPersistentModelIndex editIndex; + QQuickTableView::EditTriggers editTriggers = QQuickTableView::DoubleTapped | QQuickTableView::EditKeyPressed; + +#ifdef QT_DEBUG + QString forcedIncubationMode = qEnvironmentVariable("QT_TABLEVIEW_INCUBATION_MODE"); +#endif + + struct SectionData { + int index = -1; + int prevIndex = -1; + }; + + QList visualIndices[Qt::Vertical]; + QList logicalIndices[Qt::Vertical]; + + SectionState m_sectionState = SectionState::Idle; + +public: + void init(); + + QQuickTableViewAttached *getAttachedObject(const QObject *object) const; + + int modelIndexAtCell(const QPoint &cell) const; + QPoint cellAtModelIndex(int modelIndex) const; + int modelIndexToCellIndex(const QModelIndex &modelIndex, bool visualIndex = true) const; + inline bool cellIsValid(const QPoint &cell) const { return cell.x() != -1 && cell.y() != -1; } + + qreal sizeHintForColumn(int column) const; + qreal sizeHintForRow(int row) const; + QSize calculateTableSize(); + void updateTableSize(); + + inline bool isColumnHidden(int column) const; + inline bool isRowHidden(int row) const; + + qreal getColumnLayoutWidth(int column); + qreal getRowLayoutHeight(int row); + qreal getColumnWidth(int column) const; + qreal getRowHeight(int row) const; + qreal getEffectiveRowY(int row) const; + qreal getEffectiveRowHeight(int row) const; + qreal getEffectiveColumnX(int column) const; + qreal getEffectiveColumnWidth(int column) const; + qreal getAlignmentContentX(int column, Qt::Alignment alignment, const qreal offset, const QRectF &subRect); + qreal getAlignmentContentY(int row, Qt::Alignment alignment, const qreal offset, const QRectF &subRect); + + int topRow() const { return *loadedRows.cbegin(); } + int bottomRow() const { return *loadedRows.crbegin(); } + int leftColumn() const { return *loadedColumns.cbegin(); } + int rightColumn() const { return *loadedColumns.crbegin(); } + + QQuickTableView *rootSyncView() const; + + bool updateTableRecursive(); + bool updateTable(); + void relayoutTableItems(); + + void layoutVerticalEdge(Qt::Edge tableEdge); + void layoutHorizontalEdge(Qt::Edge tableEdge); + void layoutTopLeftItem(); + void layoutTableEdgeFromLoadRequest(); + + void updateContentWidth(); + void updateContentHeight(); + void updateAverageColumnWidth(); + void updateAverageRowHeight(); + RebuildOptions checkForVisibilityChanges(); + void forceLayout(bool immediate); + + void updateExtents(); + void syncLoadedTableRectFromLoadedTable(); + void syncLoadedTableFromLoadRequest(); + void shiftLoadedTableRect(const QPointF newPosition); + + int nextVisibleEdgeIndex(Qt::Edge edge, int startIndex) const; + int nextVisibleEdgeIndexAroundLoadedTable(Qt::Edge edge) const; + inline bool atTableEnd(Qt::Edge edge) const { return nextVisibleEdgeIndexAroundLoadedTable(edge) == kEdgeIndexAtEnd; } + inline bool atTableEnd(Qt::Edge edge, int startIndex) const { return nextVisibleEdgeIndex(edge, startIndex) == kEdgeIndexAtEnd; } + inline int edgeToArrayIndex(Qt::Edge edge) const; + void clearEdgeSizeCache(); + + bool canLoadTableEdge(Qt::Edge tableEdge, const QRectF fillRect) const; + bool canUnloadTableEdge(Qt::Edge tableEdge, const QRectF fillRect) const; + Qt::Edge nextEdgeToLoad(const QRectF rect); + Qt::Edge nextEdgeToUnload(const QRectF rect); + + qreal cellWidth(const QPoint &cell) const; + qreal cellHeight(const QPoint &cell) const; + + FxTableItem *loadedTableItem(const QPoint &cell) const; + FxTableItem *createFxTableItem(const QPoint &cell, QQmlIncubator::IncubationMode incubationMode); + FxTableItem *loadFxTableItem(const QPoint &cell, QQmlIncubator::IncubationMode incubationMode); + + void releaseItem(FxTableItem *fxTableItem, QQmlTableInstanceModel::ReusableFlag reusableFlag); + void releaseLoadedItems(QQmlTableInstanceModel::ReusableFlag reusableFlag); + + void unloadItem(const QPoint &cell); + void loadEdge(Qt::Edge edge, QQmlIncubator::IncubationMode incubationMode); + void unloadEdge(Qt::Edge edge); + void loadAndUnloadVisibleEdges(QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested); + void drainReusePoolAfterLoadRequest(); + void processLoadRequest(); + + void processRebuildTable(); + bool moveToNextRebuildState(); + void calculateTopLeft(QPoint &topLeft, QPointF &topLeftPos); + void loadInitialTable(); + + void layoutAfterLoadingInitialTable(); + void adjustViewportXAccordingToAlignment(); + void adjustViewportYAccordingToAlignment(); + void cancelOvershootAfterLayout(); + + void scheduleRebuildTable(QQuickTableViewPrivate::RebuildOptions options); + +#if QT_CONFIG(cursor) + void updateCursor(); +#endif + void updateEditItem(); + void updateContentSize(); + + QTypeRevision resolveImportVersion(); + void createWrapperModel(); + QAbstractItemModel *qaim(QVariant modelAsVariant) const; + + virtual void initItemCallback(int modelIndex, QObject *item); + virtual void itemCreatedCallback(int modelIndex, QObject *object); + virtual void itemPooledCallback(int modelIndex, QObject *object); + virtual void itemReusedCallback(int modelIndex, QObject *object); + virtual void modelUpdated(const QQmlChangeSet &changeSet, bool reset); + + virtual void syncWithPendingChanges(); + virtual void syncDelegate(); + virtual QVariant modelImpl() const; + virtual void setModelImpl(const QVariant &newModel); + virtual void syncModel(); + virtual void syncSyncView(); + virtual void syncPositionView(); + virtual QAbstractItemModel *selectionSourceModel(); + inline void syncRebuildOptions(); + + void connectToModel(); + void disconnectFromModel(); + + void rowsMovedCallback(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row); + void columnsMovedCallback(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int column); + void rowsInsertedCallback(const QModelIndex &parent, int begin, int end); + void rowsRemovedCallback(const QModelIndex &parent, int begin, int end); + void columnsInsertedCallback(const QModelIndex &parent, int begin, int end); + void columnsRemovedCallback(const QModelIndex &parent, int begin, int end); + void layoutChangedCallback(const QList &parents, QAbstractItemModel::LayoutChangeHint hint); + void modelResetCallback(); + bool compareModel(const QVariant& model1, const QVariant& model2) const; + + void positionViewAtRow(int row, Qt::Alignment alignment, qreal offset, const QRectF subRect = QRectF()); + void positionViewAtColumn(int column, Qt::Alignment alignment, qreal offset, const QRectF subRect = QRectF()); + bool scrollToRow(int row, Qt::Alignment alignment, qreal offset, const QRectF subRect = QRectF()); + bool scrollToColumn(int column, Qt::Alignment alignment, qreal offset, const QRectF subRect = QRectF()); + + void scheduleRebuildIfFastFlick(); + void setLocalViewportX(qreal contentX); + void setLocalViewportY(qreal contentY); + void syncViewportRect(); + void syncViewportPosRecursive(); + + bool selectedInSelectionModel(const QPoint &cell) const; + void selectionChangedInSelectionModel(const QItemSelection &selected, const QItemSelection &deselected); + void updateSelectedOnAllDelegateItems(); + void setSelectedOnDelegateItem(const QModelIndex &modelIndex, bool select); + + bool currentInSelectionModel(const QPoint &cell) const; + void currentChangedInSelectionModel(const QModelIndex ¤t, const QModelIndex &previous); + void setCurrentOnDelegateItem(const QModelIndex &index, bool isCurrent); + void updateCurrentRowAndColumn(); + + void fetchMoreData(); + + void _q_componentFinalized(); + void registerCallbackWhenBindingsAreEvaluated(); + + inline QString tableLayoutToString() const; + void dumpTable() const; + + void setRequiredProperty(const char *property, + const QVariant &value, + int serializedModelIndex, + QObject *object, bool init); + + void handleTap(const QQuickHandlerPoint &point); + void setCurrentIndexFromTap(const QPointF &pos); + void setCurrentIndex(const QPoint &cell); + bool setCurrentIndexFromKeyEvent(QKeyEvent *e); + bool canEdit(const QModelIndex tappedIndex, bool warn); + bool editFromKeyEvent(QKeyEvent *e); + + // QQuickSelectable + QQuickItem *selectionPointerHandlerTarget() const override; + bool startSelection(const QPointF &pos, Qt::KeyboardModifiers modifiers) override; + void setSelectionStartPos(const QPointF &pos) override; + void setSelectionEndPos(const QPointF &pos) override; + void clearSelection() override; + void normalizeSelection() override; + QRectF selectionRectangle() const override; + QSizeF scrollTowardsPoint(const QPointF &pos, const QSizeF &step) override; + void setCallback(std::function func) override; + void cancelSelectionTracking(); + + QPoint clampedCellAtPos(const QPointF &pos) const; + virtual void updateSelection(const QRect &oldSelection, const QRect &newSelection); + QRect selection() const; + // ---------------- + + // Section drag handler + void initSectionDragHandler(Qt::Orientation orientation); + void destroySectionDragHandler(); + inline void setActivePointerHandler(QQuickTableViewPointerHandler *handler) { activePtrHandler = handler; } + inline QQuickTableViewPointerHandler* activePointerHandler() const { return activePtrHandler; } + // Row/Column reordering + void moveSection(int source , int destination, Qt::Orientations orientation); + void initializeIndexMapping(); + void clearIndexMapping(); + void clearSection(Qt::Orientations orientation); + virtual int logicalRowIndex(const int visualIndex) const; + virtual int logicalColumnIndex(const int visualIndex) const; + virtual int visualRowIndex(const int logicalIndex) const; + virtual int visualColumnIndex(const int logicalIndex) const; + void setContainsDragOnDelegateItem(const QModelIndex &modelIndex, bool overlay); + int getEditCellIndex(const QModelIndex &index) const; +}; + +class FxTableItem : public QQuickItemViewFxItem +{ +public: + FxTableItem(QQuickItem *item, QQuickTableView *table, bool own) + : QQuickItemViewFxItem(item, own, QQuickTableViewPrivate::get(table)) + { + } + + qreal position() const override { return 0; } + qreal endPosition() const override { return 0; } + qreal size() const override { return 0; } + qreal sectionSize() const override { return 0; } + bool contains(qreal, qreal) const override { return false; } + + QPoint cell; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickTableViewPrivate::RebuildOptions) + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktaphandler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktaphandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..eeb44e267facadaf942f861a468af0a8651caf24 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktaphandler_p.h @@ -0,0 +1,124 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTAPHANDLER_H +#define QQUICKTAPHANDLER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +#include "qquicksinglepointhandler_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickTapHandler : public QQuickSinglePointHandler +{ + Q_OBJECT + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged) + Q_PROPERTY(int tapCount READ tapCount NOTIFY tapCountChanged) + Q_PROPERTY(qreal timeHeld READ timeHeld NOTIFY timeHeldChanged) + Q_PROPERTY(qreal longPressThreshold READ longPressThreshold WRITE setLongPressThreshold NOTIFY longPressThresholdChanged RESET resetLongPressThreshold) + Q_PROPERTY(GesturePolicy gesturePolicy READ gesturePolicy WRITE setGesturePolicy NOTIFY gesturePolicyChanged) + Q_PROPERTY(QQuickTapHandler::ExclusiveSignals exclusiveSignals READ exclusiveSignals WRITE setExclusiveSignals NOTIFY exclusiveSignalsChanged REVISION(6, 5)) + + QML_NAMED_ELEMENT(TapHandler) + QML_ADDED_IN_VERSION(2, 12) + +public: + enum GesturePolicy { + DragThreshold, + WithinBounds, + ReleaseWithinBounds, + DragWithinBounds + }; + Q_ENUM(GesturePolicy) + + enum ExclusiveSignal { + NotExclusive = 0, + SingleTap = 1 << 0, + DoubleTap = 1 << 1 + }; + Q_DECLARE_FLAGS(ExclusiveSignals, ExclusiveSignal) + Q_FLAG(ExclusiveSignals) + + explicit QQuickTapHandler(QQuickItem *parent = nullptr); + + bool isPressed() const { return m_pressed; } + + int tapCount() const { return m_tapCount; } + qreal timeHeld() const { return (m_holdTimer.isValid() ? m_holdTimer.elapsed() / 1000.0 : -1.0); } + + qreal longPressThreshold() const; + void setLongPressThreshold(qreal longPressThreshold); + void resetLongPressThreshold(); + + GesturePolicy gesturePolicy() const { return m_gesturePolicy; } + void setGesturePolicy(GesturePolicy gesturePolicy); + + QQuickTapHandler::ExclusiveSignals exclusiveSignals() const { return m_exclusiveSignals; } + void setExclusiveSignals(QQuickTapHandler::ExclusiveSignals newexclusiveSignals); + +Q_SIGNALS: + void pressedChanged(); + void tapCountChanged(); + void timeHeldChanged(); + void longPressThresholdChanged(); + void gesturePolicyChanged(); + Q_REVISION(6, 5) void exclusiveSignalsChanged(); + // the second argument (Qt::MouseButton) was added in 6.2: avoid name clashes with IDs by not naming it for now + void tapped(QEventPoint eventPoint, Qt::MouseButton /* button */); + void singleTapped(QEventPoint eventPoint, Qt::MouseButton /* button */); + void doubleTapped(QEventPoint eventPoint, Qt::MouseButton /* button */); + void longPressed(); + +protected: + void onGrabChanged(QQuickPointerHandler *grabber, QPointingDevice::GrabTransition transition, + QPointerEvent *ev, QEventPoint &point) override; + void timerEvent(QTimerEvent *event) override; + bool wantsEventPoint(const QPointerEvent *event, const QEventPoint &point) override; + void handleEventPoint(QPointerEvent *event, QEventPoint &point) override; + +private: + void setPressed(bool press, bool cancel, QPointerEvent *event, QEventPoint &point); + void connectPreRenderSignal(bool conn = true); + void updateTimeHeld(); + +private: + QPointF m_lastTapPos; + quint64 m_lastTapTimestamp = 0; + QElapsedTimer m_holdTimer; + QBasicTimer m_longPressTimer; + QBasicTimer m_doubleTapTimer; + QEventPoint m_singleTapReleasedPoint; + QMetaObject::Connection m_preRenderSignalConnection; + Qt::MouseButton m_singleTapReleasedButton; + int m_tapCount = 0; + int m_longPressThreshold = -1; + GesturePolicy m_gesturePolicy = GesturePolicy::DragThreshold; + ExclusiveSignals m_exclusiveSignals = NotExclusive; + bool m_pressed = false; + bool m_longPressed = false; + + static quint64 m_multiTapInterval; + static int m_mouseMultiClickDistanceSquared; + static int m_touchMultiTapDistanceSquared; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickTapHandler::ExclusiveSignals) + +QT_END_NAMESPACE + +#endif // QQUICKTAPHANDLER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..da24bb26a57e20d8dff51e3323f4f80bbba69c40 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p.h @@ -0,0 +1,360 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXT_P_H +#define QQUICKTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p.h" +#include "qquicktextinterface_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTextPrivate; +class QQuickTextLine; +class Q_QUICK_EXPORT QQuickText : public QQuickImplicitSizeItem, public QQuickTextInterface +{ + Q_OBJECT + Q_INTERFACES(QQuickTextInterface) + + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(QColor linkColor READ linkColor WRITE setLinkColor NOTIFY linkColorChanged) + Q_PROPERTY(TextStyle style READ style WRITE setStyle NOTIFY styleChanged) + Q_PROPERTY(QColor styleColor READ styleColor WRITE setStyleColor NOTIFY styleColorChanged) + Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign RESET resetHAlign NOTIFY horizontalAlignmentChanged) + Q_PROPERTY(HAlignment effectiveHorizontalAlignment READ effectiveHAlign NOTIFY effectiveHorizontalAlignmentChanged) + Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) + Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged) + Q_PROPERTY(bool truncated READ truncated NOTIFY truncatedChanged) + Q_PROPERTY(int maximumLineCount READ maximumLineCount WRITE setMaximumLineCount NOTIFY maximumLineCountChanged RESET resetMaximumLineCount) + + Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged) + Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode? + Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentWidthChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentHeightChanged) + Q_PROPERTY(qreal paintedWidth READ contentWidth NOTIFY contentWidthChanged) // Compatibility + Q_PROPERTY(qreal paintedHeight READ contentHeight NOTIFY contentHeightChanged) + Q_PROPERTY(qreal lineHeight READ lineHeight WRITE setLineHeight NOTIFY lineHeightChanged) + Q_PROPERTY(LineHeightMode lineHeightMode READ lineHeightMode WRITE setLineHeightMode NOTIFY lineHeightModeChanged) + Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged) + Q_PROPERTY(int minimumPixelSize READ minimumPixelSize WRITE setMinimumPixelSize NOTIFY minimumPixelSizeChanged) + Q_PROPERTY(int minimumPointSize READ minimumPointSize WRITE setMinimumPointSize NOTIFY minimumPointSizeChanged) + Q_PROPERTY(FontSizeMode fontSizeMode READ fontSizeMode WRITE setFontSizeMode NOTIFY fontSizeModeChanged) + Q_PROPERTY(RenderType renderType READ renderType WRITE setRenderType NOTIFY renderTypeChanged) + Q_PROPERTY(QString hoveredLink READ hoveredLink NOTIFY linkHovered REVISION(2, 2)) + Q_PROPERTY(int renderTypeQuality READ renderTypeQuality WRITE setRenderTypeQuality NOTIFY renderTypeQualityChanged REVISION(6, 0)) + + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION(2, 6)) + + Q_PROPERTY(QJSValue fontInfo READ fontInfo NOTIFY fontInfoChanged REVISION(2, 9)) + Q_PROPERTY(QSizeF advance READ advance NOTIFY contentSizeChanged REVISION(2, 10)) + QML_NAMED_ELEMENT(Text) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickText(QQuickItem *parent=nullptr); + ~QQuickText() override; + + enum HAlignment { AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify }; + Q_ENUM(HAlignment) + enum VAlignment { AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter }; + Q_ENUM(VAlignment) + enum TextStyle { Normal, + Outline, + Raised, + Sunken }; + Q_ENUM(TextStyle) + enum TextFormat { PlainText = Qt::PlainText, + RichText = Qt::RichText, + MarkdownText = Qt::MarkdownText, + AutoText = Qt::AutoText, + StyledText = 4 }; + Q_ENUM(TextFormat) + enum TextElideMode { ElideLeft = Qt::ElideLeft, + ElideRight = Qt::ElideRight, + ElideMiddle = Qt::ElideMiddle, + ElideNone = Qt::ElideNone }; + Q_ENUM(TextElideMode) + + enum WrapMode { NoWrap = QTextOption::NoWrap, + WordWrap = QTextOption::WordWrap, + WrapAnywhere = QTextOption::WrapAnywhere, + WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, // COMPAT + Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere + }; + Q_ENUM(WrapMode) + + enum RenderType { QtRendering, + NativeRendering, + CurveRendering + }; + Q_ENUM(RenderType) + + enum RenderTypeQuality { DefaultRenderTypeQuality = -1, + LowRenderTypeQuality = 26, + NormalRenderTypeQuality = 52, + HighRenderTypeQuality = 104, + VeryHighRenderTypeQuality = 208 + }; + Q_ENUM(RenderTypeQuality) + + enum LineHeightMode { ProportionalHeight, FixedHeight }; + Q_ENUM(LineHeightMode) + + enum FontSizeMode { FixedSize = 0x0, HorizontalFit = 0x01, VerticalFit = 0x02, + Fit = HorizontalFit | VerticalFit }; + Q_ENUM(FontSizeMode) + + QString text() const; + void setText(const QString &); + + QFont font() const; + void setFont(const QFont &font); + + QColor color() const; + void setColor(const QColor &c); + + QColor linkColor() const; + void setLinkColor(const QColor &color); + + TextStyle style() const; + void setStyle(TextStyle style); + + QColor styleColor() const; + void setStyleColor(const QColor &c); + + HAlignment hAlign() const; + void setHAlign(HAlignment align); + void resetHAlign(); + HAlignment effectiveHAlign() const; + + VAlignment vAlign() const; + void setVAlign(VAlignment align); + + WrapMode wrapMode() const; + void setWrapMode(WrapMode w); + + int lineCount() const; + bool truncated() const; + + int maximumLineCount() const; + void setMaximumLineCount(int lines); + void resetMaximumLineCount(); + + TextFormat textFormat() const; + void setTextFormat(TextFormat format); + + TextElideMode elideMode() const; + void setElideMode(TextElideMode); + + qreal lineHeight() const; + void setLineHeight(qreal lineHeight); + + LineHeightMode lineHeightMode() const; + void setLineHeightMode(LineHeightMode); + + + QUrl baseUrl() const; + void setBaseUrl(const QUrl &url); + void resetBaseUrl(); + + int minimumPixelSize() const; + void setMinimumPixelSize(int size); + + int minimumPointSize() const; + void setMinimumPointSize(int size); + + FontSizeMode fontSizeMode() const; + void setFontSizeMode(FontSizeMode mode); + + void componentComplete() override; + + int resourcesLoading() const; // mainly for testing + + qreal contentWidth() const; + qreal contentHeight() const; + + QRectF boundingRect() const override; + QRectF clipRect() const override; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) +#if QT_DEPRECATED_SINCE(5, 15) + QT_DEPRECATED_X("Use forceLayout() instead") + Q_INVOKABLE void doLayout(); +#endif +#endif + Q_REVISION(2, 9) Q_INVOKABLE void forceLayout(); + + RenderType renderType() const; + void setRenderType(RenderType renderType); + + int renderTypeQuality() const; + void setRenderTypeQuality(int renderTypeQuality); + + QString hoveredLink() const; + + Q_REVISION(2, 3) Q_INVOKABLE QString linkAt(qreal x, qreal y) const; + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + QJSValue fontInfo() const; + QSizeF advance() const; + + void invalidate() override; + +Q_SIGNALS: + void textChanged(const QString &text); + void linkActivated(const QString &link); + Q_REVISION(2, 2) void linkHovered(const QString &link); + void fontChanged(const QFont &font); + void colorChanged(); + void linkColorChanged(); + void styleChanged(QQuickText::TextStyle style); + void styleColorChanged(); + void horizontalAlignmentChanged(QQuickText::HAlignment alignment); + void verticalAlignmentChanged(QQuickText::VAlignment alignment); + void wrapModeChanged(); + void lineCountChanged(); + void truncatedChanged(); + void maximumLineCountChanged(); + void textFormatChanged(QQuickText::TextFormat textFormat); + void elideModeChanged(QQuickText::TextElideMode mode); + void contentSizeChanged(); + // The next two signals should be marked as Q_REVISION(2, 12). See QTBUG-71247 + void contentWidthChanged(qreal contentWidth); + void contentHeightChanged(qreal contentHeight); + + void lineHeightChanged(qreal lineHeight); + void lineHeightModeChanged(LineHeightMode mode); + void fontSizeModeChanged(); + void minimumPixelSizeChanged(); + void minimumPointSizeChanged(); + void effectiveHorizontalAlignmentChanged(); + void lineLaidOut(QQuickTextLine *line); + void baseUrlChanged(); + void renderTypeChanged(); + Q_REVISION(2, 6) void paddingChanged(); + Q_REVISION(2, 6) void topPaddingChanged(); + Q_REVISION(2, 6) void leftPaddingChanged(); + Q_REVISION(2, 6) void rightPaddingChanged(); + Q_REVISION(2, 6) void bottomPaddingChanged(); + Q_REVISION(2, 9) void fontInfoChanged(); + Q_REVISION(6, 0) void renderTypeQualityChanged(); + +protected: + QQuickText(QQuickTextPrivate &dd, QQuickItem *parent = nullptr); + + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + + void updatePolish() override; + + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + void invalidateFontCaches(); + +private Q_SLOTS: + void q_updateLayout(); + void triggerPreprocess(); + Q_REVISION(6, 7) QVariant loadResource(int type, const QUrl &source); + void resourceRequestFinished(); + void imageDownloadFinished(); + +private: + Q_DISABLE_COPY(QQuickText) + Q_DECLARE_PRIVATE(QQuickText) +}; + +Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, QQuickText::HAlignment, QQuickText::VAlignment) + +class QTextLine; +class Q_QUICK_EXPORT QQuickTextLine : public QObject +{ + Q_OBJECT + Q_PROPERTY(int number READ number FINAL) + Q_PROPERTY(qreal width READ width WRITE setWidth FINAL) + Q_PROPERTY(qreal height READ height WRITE setHeight FINAL) + Q_PROPERTY(qreal x READ x WRITE setX FINAL) + Q_PROPERTY(qreal y READ y WRITE setY FINAL) + Q_PROPERTY(qreal implicitWidth READ implicitWidth REVISION(2, 15) FINAL) + Q_PROPERTY(bool isLast READ isLast REVISION(2, 15) FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickTextLine(); + + void setLine(QTextLine* line); + void setLineOffset(int offset); + void setFullLayoutTextLength(int length); + int number() const; + qreal implicitWidth() const; + bool isLast() const; + + qreal width() const; + void setWidth(qreal width); + + qreal height() const; + void setHeight(qreal height); + + qreal x() const; + void setX(qreal x); + + qreal y() const; + void setY(qreal y); + +private: + QTextLine *m_line; + qreal m_height; + int m_lineOffset; + int m_fullLayoutTextLength; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ff8de44246b884e223e13985674a618073a42b04 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktext_p_p.h @@ -0,0 +1,200 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXT_P_P_H +#define QQUICKTEXT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicktext_p.h" +#include "qquickimplicitsizeitem_p_p.h" + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QTextLayout; + +class Q_QUICK_EXPORT QQuickTextPrivate : public QQuickImplicitSizeItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickText) +public: + QQuickTextPrivate(); + ~QQuickTextPrivate(); + void init(); + + void updateBaseline(qreal baseline, qreal dy); + void updateSize(); + void signalSizeChange(const QSizeF &previousSize); + void updateLayout(); + bool determineHorizontalAlignment(); + bool setHAlign(QQuickText::HAlignment, bool forceAlign = false); + void mirrorChange() override; + bool isLineLaidOutConnected(); + void setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height); + + int lineHeightOffset() const; + QString elidedText(qreal lineWidth, const QTextLine &line, const QTextLine *nextLine = nullptr) const; + void elideFormats(int start, int length, int offset, QVector *elidedFormats); + void clearFormats(); + + void processHoverEvent(QHoverEvent *event); + bool transformChanged(QQuickItem *transformedItem) override; + + QRectF layedOutTextRect; + QSizeF advance; + + struct ExtraData { + ExtraData(); + + qreal padding; + qreal topPadding; + qreal leftPadding; + qreal rightPadding; + qreal bottomPadding; + bool explicitTopPadding : 1; + bool explicitLeftPadding : 1; + bool explicitRightPadding : 1; + bool explicitBottomPadding : 1; + qreal lineHeight; + QTextDocument *doc; + QQuickTextImageHandler *imageHandler = nullptr; + QString activeLink; + QString hoveredLink; + int minimumPixelSize; + int minimumPointSize; + int maximumLineCount; + int renderTypeQuality; + bool lineHeightValid : 1; + QQuickText::LineHeightMode lineHeightMode; + QQuickText::FontSizeMode fontSizeMode; + QList imgTags; + QList visibleImgTags; + QList pixmapsInProgress; + QUrl baseUrl; + }; + QLazilyAllocated extra; + + QString text; + QFont font; + QFont sourceFont; + QFontInfo fontInfo; + + QTextLayout layout; + QScopedPointer elideLayout; + QScopedPointer textLine; + + qreal lineWidth; + + QRgb color; + QRgb linkColor; + QRgb styleColor; + + int lineCount; + int multilengthEos; + + enum UpdateType { + UpdateNone, + UpdatePreprocess, + UpdatePaintNode + }; + + QQuickText::TextElideMode elideMode; + QQuickText::HAlignment hAlign; + QQuickText::VAlignment vAlign; + QQuickText::TextFormat format; + QQuickText::WrapMode wrapMode; + QQuickText::TextStyle style; + QQuickText::RenderType renderType; + UpdateType updateType; + + QString assignedFont; + + bool maximumLineCountValid:1; + bool updateOnComponentComplete:1; + bool richText:1; + bool styledText:1; + bool markdownText:1; + bool widthExceeded:1; + bool heightExceeded:1; + bool internalWidthUpdate:1; + bool requireImplicitSize:1; + bool implicitWidthValid:1; + bool implicitHeightValid:1; + bool truncated:1; + bool hAlignImplicit:1; + bool rightToLeftText:1; + bool layoutTextElided:1; + bool textHasChanged:1; + bool needToUpdateLayout:1; + bool formatModifiesFontSize:1; + bool polishSize:1; // Workaround for problem with polish called after updateSize (QTBUG-42636) + bool updateSizeRecursionGuard:1; + bool containsUnscalableGlyphs:1; + + static const QChar elideChar; + static const int largeTextSizeThreshold; + + qreal getImplicitWidth() const override; + qreal getImplicitHeight() const override; + + qreal availableWidth() const; + qreal availableHeight() const; + + inline qreal padding() const { return extra.isAllocated() ? extra->padding : 0.0; } + void setTopPadding(qreal value, bool reset = false); + void setLeftPadding(qreal value, bool reset = false); + void setRightPadding(qreal value, bool reset = false); + void setBottomPadding(qreal value, bool reset = false); + + void ensureDoc(); + void updateDocumentText(); + + qreal devicePixelRatio() const; + + QRectF setupTextLayout(qreal * const baseline); + void setupCustomLineGeometry(QTextLine &line, qreal &height, int fullLayoutTextLength, int lineOffset = 0); + bool isLinkActivatedConnected(); + bool isLinkHoveredConnected(); + QStringList links() const; + + struct LinkDesc { + QString m_anchor; + QString m_anchorTarget; + int m_startIndex; + int m_endIndex; + QRect rect; + }; + + QVector getLinks() const; + + static QString anchorAt(const QTextLayout *layout, const QPointF &mousePos); + QString anchorAt(const QPointF &pos) const; + + inline qreal lineHeight() const { return extra.isAllocated() ? extra->lineHeight : 1.0; } + inline int maximumLineCount() const { return extra.isAllocated() ? extra->maximumLineCount : INT_MAX; } + inline int renderTypeQuality() const { return extra.isAllocated() ? extra->renderTypeQuality : QQuickText::DefaultRenderTypeQuality; } + inline QQuickText::LineHeightMode lineHeightMode() const { return extra.isAllocated() ? extra->lineHeightMode : QQuickText::ProportionalHeight; } + inline QQuickText::FontSizeMode fontSizeMode() const { return extra.isAllocated() ? extra->fontSizeMode : QQuickText::FixedSize; } + inline int minimumPixelSize() const { return extra.isAllocated() ? extra->minimumPixelSize : 12; } + inline int minimumPointSize() const { return extra.isAllocated() ? extra->minimumPointSize : 12; } + static inline QQuickTextPrivate *get(QQuickText *t) { return t->d_func(); } +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c31347370a13b1daa2a28351d0944df2805839fb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p.h @@ -0,0 +1,186 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTCONTROL_P_H +#define QQUICKTEXTCONTROL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + + +class QStyleSheet; +class QTextDocument; +class QQuickTextControlPrivate; +class QAbstractScrollArea; +class QEvent; +class QTimerEvent; +class QTransform; + +class Q_AUTOTEST_EXPORT QQuickTextControl : public QInputControl +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickTextControl) +public: + explicit QQuickTextControl(QTextDocument *doc, QObject *parent = nullptr); + virtual ~QQuickTextControl(); + + QTextDocument *document() const; + void setDocument(QTextDocument *doc); + + void setTextCursor(const QTextCursor &cursor); + QTextCursor textCursor() const; + + void setTextInteractionFlags(Qt::TextInteractionFlags flags); + Qt::TextInteractionFlags textInteractionFlags() const; + + QString toPlainText() const; + +#if QT_CONFIG(texthtmlparser) + QString toHtml() const; +#endif +#if QT_CONFIG(textmarkdownwriter) + QString toMarkdown() const; +#endif + + bool hasImState() const; + bool overwriteMode() const; + void setOverwriteMode(bool overwrite); + bool cursorVisible() const; + void setCursorVisible(bool visible); + QRectF anchorRect() const; + QRectF cursorRect(const QTextCursor &cursor) const; + QRectF cursorRect() const; + QRectF selectionRect(const QTextCursor &cursor) const; + QRectF selectionRect() const; + + QString hoveredLink() const; + QString anchorAt(const QPointF &pos) const; + QTextBlock blockWithMarkerAt(const QPointF &pos) const; + + void setCursorWidth(int width); + + void setAcceptRichText(bool accept); + + void moveCursor(QTextCursor::MoveOperation op, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor); + + bool canPaste() const; + + void setCursorIsFocusIndicator(bool b); + void setWordSelectionEnabled(bool enabled); +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + void setTouchDragSelectionEnabled(bool enabled); +#endif + + void updateCursorRectangle(bool force); + + virtual int hitTest(const QPointF &point, Qt::HitTestAccuracy accuracy) const; + virtual QRectF blockBoundingRect(const QTextBlock &block) const; + + QString preeditText() const; + +public Q_SLOTS: + void setPlainText(const QString &text); + void setMarkdownText(const QString &text); + void setHtml(const QString &text); + +#if QT_CONFIG(clipboard) + void cut(); + void copy(); + void paste(QClipboard::Mode mode = QClipboard::Clipboard); +#endif + + void undo(); + void redo(); + void clear(); + + void selectAll(); + +Q_SIGNALS: + void textChanged(); + void preeditTextChanged(); + void contentsChange(int from, int charsRemoved, int charsAdded); + void undoAvailable(bool b); + void redoAvailable(bool b); + void currentCharFormatChanged(const QTextCharFormat &format); + void copyAvailable(bool b); + void selectionChanged(); + void cursorPositionChanged(); + void overwriteModeChanged(bool overwriteMode); + + // control signals + void updateCursorRequest(); + void updateRequest(); + void cursorRectangleChanged(); + void linkActivated(const QString &link); + void linkHovered(const QString &link); + void markerClicked(); + void markerHovered(bool marker); + +public: + virtual void processEvent(QEvent *e, const QTransform &transform); + void processEvent(QEvent *e, const QPointF &coordinateOffset = QPointF()); + +#if QT_CONFIG(im) + virtual QVariant inputMethodQuery(Qt::InputMethodQuery property) const; + Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, const QVariant &argument) const; +#endif + + virtual QMimeData *createMimeDataFromSelection() const; + virtual bool canInsertFromMimeData(const QMimeData *source) const; + virtual void insertFromMimeData(const QMimeData *source); + + bool cursorOn() const; + +protected: + void timerEvent(QTimerEvent *e) override; + + bool event(QEvent *e) override; + +private: + Q_DISABLE_COPY(QQuickTextControl) + Q_PRIVATE_SLOT(d_func(), void _q_updateCurrentCharFormatAndSelection()) + Q_PRIVATE_SLOT(d_func(), void _q_updateCursorPosChanged(const QTextCursor &)) +}; + + +// also used by QLabel +class QQuickTextEditMimeData : public QMimeData +{ +public: + inline QQuickTextEditMimeData(const QTextDocumentFragment &aFragment) : fragment(aFragment) {} + + QStringList formats() const override; + +protected: + QVariant retrieveData(const QString &mimeType, QMetaType type) const override; + +private: + void setup() const; + + mutable QTextDocumentFragment fragment; +}; + +QT_END_NAMESPACE + +#endif // QQuickTextControl_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4573ab279e52d8adf740d3988c0d57a660fcd5ef --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextcontrol_p_p.h @@ -0,0 +1,144 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTCONTROL_P_P_H +#define QQUICKTEXTCONTROL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "QtGui/qtextdocumentfragment.h" +#include "QtGui/qtextcursor.h" +#include "QtGui/qtextformat.h" +#include "QtGui/qtextobject.h" +#include "QtGui/qabstracttextdocumentlayout.h" +#include "QtCore/qbasictimer.h" +#include "QtCore/qpointer.h" +#include "private/qobject_p.h" + +QT_BEGIN_NAMESPACE + +class QMimeData; +class QAbstractScrollArea; + +class QQuickTextControlPrivate : public QObjectPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickTextControl) + QQuickTextControlPrivate(); + + bool cursorMoveKeyEvent(QKeyEvent *e); + + void updateCurrentCharFormat(); + + void setContent(Qt::TextFormat format, const QString &text); + + void paste(const QMimeData *source); + + void setCursorPosition(const QPointF &pos); + void setCursorPosition(int pos, QTextCursor::MoveMode mode = QTextCursor::MoveAnchor); + + void repaintCursor(); + inline void repaintSelection() + { repaintOldAndNewSelection(QTextCursor()); } + void repaintOldAndNewSelection(const QTextCursor &oldSelection); + + void selectionChanged(bool forceEmitSelectionChanged = false); + + void _q_updateCurrentCharFormatAndSelection(); + +#if QT_CONFIG(clipboard) + void setClipboardSelection(); +#endif + + void _q_updateCursorPosChanged(const QTextCursor &someCursor); + + void setBlinkingCursorEnabled(bool enable); + void updateCursorFlashTime(); + + void extendWordwiseSelection(int suggestedNewPosition, qreal mouseXPosition); + void extendBlockwiseSelection(int suggestedNewPosition); + + void _q_setCursorAfterUndoRedo(int undoPosition, int charsAdded, int charsRemoved); + + QRectF rectForPosition(int position) const; + + void keyPressEvent(QKeyEvent *e); + void keyReleaseEvent(QKeyEvent *e); + void mousePressEvent(QMouseEvent *event, const QPointF &pos); + void mouseMoveEvent(QMouseEvent *event, const QPointF &pos); + void mouseReleaseEvent(QMouseEvent *event, const QPointF &pos); + void mouseDoubleClickEvent(QMouseEvent *event, const QPointF &pos); + bool sendMouseEventToInputContext(QMouseEvent *event, const QPointF &pos); + void focusEvent(QFocusEvent *e); +#if QT_CONFIG(im) + void inputMethodEvent(QInputMethodEvent *); +#endif + void hoverEvent(QHoverEvent *e, const QPointF &pos); + + void activateLinkUnderCursor(QString href = QString()); + +#if QT_CONFIG(im) + bool isPreediting() const; + void commitPreedit(); + void cancelPreedit(); +#endif + + QPointF tripleClickPoint; + QPointF mousePressPos; + + QTextCharFormat lastCharFormat; + + QTextDocument *doc; + QTextCursor cursor; + QTextCursor selectedWordOnDoubleClick; + QTextCursor selectedBlockOnTripleClick; + QString anchorOnMousePress; + QString linkToCopy; + QString hoveredLink; + QTextBlock blockWithMarkerUnderMousePress; + + QBasicTimer cursorBlinkTimer; + ulong timestampAtLastDoubleClick = 0; // will only be set at a double click + +#if QT_CONFIG(im) + int preeditCursor; +#endif + + Qt::TextInteractionFlags interactionFlags; + + bool cursorOn : 1; + bool cursorIsFocusIndicator : 1; + bool mousePressed : 1; + bool lastSelectionState : 1; + bool ignoreAutomaticScrollbarAdjustement : 1; + bool overwriteMode : 1; + bool acceptRichText : 1; + bool cursorVisible : 1; // used to hide the cursor in the preedit area + bool cursorBlinkingEnabled : 1; + bool hasFocus : 1; + bool hadSelectionOnMousePress : 1; + bool wordSelectionEnabled : 1; + bool hasImState : 1; + bool cursorRectangleChanged : 1; + bool hoveredMarker: 1; + bool selectByTouchDrag: 1; + bool imSelectionAfterPress: 1; + + int lastSelectionStart; + int lastSelectionEnd; + + void _q_copyLink(); +}; + +QT_END_NAMESPACE + +#endif // QQuickTextControl_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextdocument_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextdocument_p.h new file mode 100644 index 0000000000000000000000000000000000000000..083f230a79e8e0021879e0a90e13655556881f89 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextdocument_p.h @@ -0,0 +1,90 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTDOCUMENT_P_H +#define QQUICKTEXTDOCUMENT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicktextdocument.h" + +#include +#include +#include +#include +#include +#include + +#if QT_CONFIG(mimetype) +#include +#endif + +QT_BEGIN_NAMESPACE + +class QQuickPixmap; +class QQuickTextEdit; + +/*! \internal + QTextImageHandler would attempt to resolve relative paths, and load the + image itself if the document returns an invalid image from loadResource(). + We replace it with this version instead, because Qt Quick's text resources + are resolved against the Text item's context, and because we override + intrinsicSize(). drawObject() is empty because we don't need to use this + handler to paint images: they get put into scene graph nodes instead. +*/ +class QQuickTextImageHandler : public QObject, public QTextObjectInterface +{ + Q_OBJECT + Q_INTERFACES(QTextObjectInterface) +public: + QQuickTextImageHandler(QObject *parent = nullptr); + ~QQuickTextImageHandler() override = default; + QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format) override; + void drawObject(QPainter *, const QRectF &, QTextDocument *, int, const QTextFormat &) override { } +}; + +class QQuickTextDocumentPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickTextDocument) +public: + static QQuickTextDocumentPrivate *get(QQuickTextDocument *doc) { return doc->d_func(); } + static const QQuickTextDocumentPrivate *get(const QQuickTextDocument *doc) { return doc->d_func(); } + + void load(); + void writeTo(const QUrl &fileUrl); + QTextDocument *document() const; + void setDocument(QTextDocument *doc); + void setStatus(QQuickTextDocument::Status s, const QString &err); + + // so far the QQuickItem given to the QQuickTextDocument ctor is always a QQuickTextEdit + QQuickTextEdit *editor = nullptr; + QUrl url; + QString errorString; + Qt::TextFormat detectedFormat = Qt::AutoText; // url's extension, independent of TextEdit.textFormat + std::optional encoding; // only relevant for HTML (Qt::RichText) + QQuickTextDocument::Status status = QQuickTextDocument::Status::Null; +}; + +namespace QtPrivate { +class ProtectedLayoutAccessor: public QAbstractTextDocumentLayout +{ +public: + inline QTextCharFormat formatAccessor(int pos) + { + return format(pos); + } +}; +} // namespace QtPrivate + +QT_END_NAMESPACE + +#endif // QQUICKTEXTDOCUMENT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p.h new file mode 100644 index 0000000000000000000000000000000000000000..055e459d4a8019471554f27699959b3c0f62c45d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p.h @@ -0,0 +1,436 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTEDIT_P_H +#define QQUICKTEXTEDIT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p.h" +#include "qquicktextinterface_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QTextDocument; +class QQuickTextDocument; +class QQuickTextEditPrivate; +class QQuickTextSelection; +class QTextBlock; + +class QQuickTextBlockForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QTextBlock) + QML_EXTENDED(QQuickTextBlockForeign) +}; + +class Q_QUICK_EXPORT QQuickTextEdit : public QQuickImplicitSizeItem, public QQuickTextInterface +{ + Q_OBJECT + Q_INTERFACES(QQuickTextInterface) + + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor NOTIFY selectionColorChanged) + Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor NOTIFY selectedTextColorChanged) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign RESET resetHAlign NOTIFY horizontalAlignmentChanged) + Q_PROPERTY(HAlignment effectiveHorizontalAlignment READ effectiveHAlign NOTIFY effectiveHorizontalAlignmentChanged) + Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) + Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged) + Q_PROPERTY(int length READ length NOTIFY textChanged) + Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentSizeChanged) + Q_PROPERTY(qreal paintedWidth READ contentWidth NOTIFY contentSizeChanged) // Compatibility + Q_PROPERTY(qreal paintedHeight READ contentHeight NOTIFY contentSizeChanged) + Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged) + Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged) + Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged) + Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged) + Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) + Q_PROPERTY(QQmlComponent* cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) + Q_PROPERTY(bool overwriteMode READ overwriteMode WRITE setOverwriteMode NOTIFY overwriteModeChanged) + Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged) + Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged) + Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged) + Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged) + Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged) + Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged) + Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged) + Q_PROPERTY(bool selectByKeyboard READ selectByKeyboard WRITE setSelectByKeyboard NOTIFY selectByKeyboardChanged REVISION(2, 1)) + Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) + Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged) + Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) + Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged) + Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged) + Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged) + Q_PROPERTY(QUrl baseUrl READ baseUrl WRITE setBaseUrl RESET resetBaseUrl NOTIFY baseUrlChanged) + Q_PROPERTY(RenderType renderType READ renderType WRITE setRenderType NOTIFY renderTypeChanged) + Q_PROPERTY(QQuickTextDocument *textDocument READ textDocument CONSTANT FINAL REVISION(2, 1)) + Q_PROPERTY(QString hoveredLink READ hoveredLink NOTIFY linkHovered REVISION(2, 2)) + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION(2, 6)) + Q_PROPERTY(QString preeditText READ preeditText NOTIFY preeditTextChanged REVISION(2, 7)) + Q_PROPERTY(qreal tabStopDistance READ tabStopDistance WRITE setTabStopDistance NOTIFY tabStopDistanceChanged REVISION(2, 10)) + Q_PROPERTY(QQuickTextSelection* cursorSelection READ cursorSelection REVISION(6, 7) CONSTANT FINAL) + QML_NAMED_ELEMENT(TextEdit) +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + QML_ADDED_IN_VERSION(6, 4) +#endif + +public: + QQuickTextEdit(QQuickItem *parent=nullptr); + ~QQuickTextEdit() override; + + enum HAlignment { + AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify + }; + Q_ENUM(HAlignment) + + enum VAlignment { + AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter + }; + Q_ENUM(VAlignment) + + enum TextFormat { + PlainText = Qt::PlainText, + RichText = Qt::RichText, + AutoText = Qt::AutoText, + MarkdownText = Qt::MarkdownText + }; + Q_ENUM(TextFormat) + + enum WrapMode { NoWrap = QTextOption::NoWrap, + WordWrap = QTextOption::WordWrap, + WrapAnywhere = QTextOption::WrapAnywhere, + WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, // COMPAT + Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere + }; + Q_ENUM(WrapMode) + + enum SelectionMode { + SelectCharacters, + SelectWords + }; + Q_ENUM(SelectionMode) + + enum RenderType { QtRendering, + NativeRendering, + CurveRendering + }; + Q_ENUM(RenderType) + + QString text() const; + void setText(const QString &); + + Q_REVISION(2, 7) QString preeditText() const; + + TextFormat textFormat() const; + void setTextFormat(TextFormat format); + + QFont font() const; + void setFont(const QFont &font); + + QColor color() const; + void setColor(const QColor &c); + + QColor selectionColor() const; + void setSelectionColor(const QColor &c); + + QColor selectedTextColor() const; + void setSelectedTextColor(const QColor &c); + + HAlignment hAlign() const; + void setHAlign(HAlignment align); + void resetHAlign(); + HAlignment effectiveHAlign() const; + + VAlignment vAlign() const; + void setVAlign(VAlignment align); + + WrapMode wrapMode() const; + void setWrapMode(WrapMode w); + + int lineCount() const; + + int length() const; + + bool isCursorVisible() const; + void setCursorVisible(bool on); + + int cursorPosition() const; + void setCursorPosition(int pos); + + QQmlComponent* cursorDelegate() const; + void setCursorDelegate(QQmlComponent*); + + bool overwriteMode() const; + void setOverwriteMode(bool overwrite); + + int selectionStart() const; + int selectionEnd() const; + + QString selectedText() const; + + bool focusOnPress() const; + void setFocusOnPress(bool on); + + bool persistentSelection() const; + void setPersistentSelection(bool on); + + qreal textMargin() const; + void setTextMargin(qreal margin); + + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + + bool selectByKeyboard() const; + void setSelectByKeyboard(bool); + + bool selectByMouse() const; + void setSelectByMouse(bool); + + SelectionMode mouseSelectionMode() const; + void setMouseSelectionMode(SelectionMode mode); + + bool canPaste() const; + + bool canUndo() const; + bool canRedo() const; + + void componentComplete() override; + + int resourcesLoading() const; // mainly for testing + + /* FROM EDIT */ + void setReadOnly(bool); + bool isReadOnly() const; + + QRectF cursorRectangle() const; + +#if QT_CONFIG(im) + QVariant inputMethodQuery(Qt::InputMethodQuery property) const override; + Q_REVISION(2, 4) Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const; +#endif + + qreal contentWidth() const; + qreal contentHeight() const; + + QUrl baseUrl() const; + void setBaseUrl(const QUrl &url); + void resetBaseUrl(); + + Q_INVOKABLE QRectF positionToRectangle(int) const; + Q_INVOKABLE int positionAt(qreal x, qreal y) const; + Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE void moveCursorSelection(int pos, SelectionMode mode); + + QQuickTextSelection *cursorSelection() const; + + QRectF boundingRect() const override; + QRectF clipRect() const override; + + bool isInputMethodComposing() const; + + RenderType renderType() const; + void setRenderType(RenderType renderType); + + Q_INVOKABLE QString getText(int start, int end) const; + Q_INVOKABLE QString getFormattedText(int start, int end) const; + + QQuickTextDocument *textDocument(); + + QString hoveredLink() const; + + Q_REVISION(2, 3) Q_INVOKABLE QString linkAt(qreal x, qreal y) const; + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + int tabStopDistance() const; + void setTabStopDistance(qreal distance); + + void invalidate() override; + +Q_SIGNALS: + void textChanged(); + Q_REVISION(2, 7) void preeditTextChanged(); + void contentSizeChanged(); + void cursorPositionChanged(); + void cursorRectangleChanged(); + void selectionStartChanged(); + void selectionEndChanged(); + void selectedTextChanged(); + void colorChanged(const QColor &color); + void selectionColorChanged(const QColor &color); + void selectedTextColorChanged(const QColor &color); + void fontChanged(const QFont &font); + void horizontalAlignmentChanged(QQuickTextEdit::HAlignment alignment); + void verticalAlignmentChanged(QQuickTextEdit::VAlignment alignment); + void wrapModeChanged(); + void lineCountChanged(); + void textFormatChanged(QQuickTextEdit::TextFormat textFormat); + void readOnlyChanged(bool isReadOnly); + void cursorVisibleChanged(bool isCursorVisible); + void cursorDelegateChanged(); + void overwriteModeChanged(bool overwriteMode); + void activeFocusOnPressChanged(bool activeFocusOnPressed); + void persistentSelectionChanged(bool isPersistentSelection); + void textMarginChanged(qreal textMargin); + Q_REVISION(2, 1) void selectByKeyboardChanged(bool selectByKeyboard); + void selectByMouseChanged(bool selectByMouse); + void mouseSelectionModeChanged(QQuickTextEdit::SelectionMode mode); + void linkActivated(const QString &link); + Q_REVISION(2, 2) void linkHovered(const QString &link); + void canPasteChanged(); + void canUndoChanged(); + void canRedoChanged(); + void inputMethodComposingChanged(); + void effectiveHorizontalAlignmentChanged(); + void baseUrlChanged(); + void inputMethodHintsChanged(); + void renderTypeChanged(); + Q_REVISION(2, 6) void editingFinished(); + Q_REVISION(2, 6) void paddingChanged(); + Q_REVISION(2, 6) void topPaddingChanged(); + Q_REVISION(2, 6) void leftPaddingChanged(); + Q_REVISION(2, 6) void rightPaddingChanged(); + Q_REVISION(2, 6) void bottomPaddingChanged(); + Q_REVISION(2, 10) void tabStopDistanceChanged(qreal distance); + +public Q_SLOTS: + void selectAll(); + void selectWord(); + void select(int start, int end); + void deselect(); + bool isRightToLeft(int start, int end); +#if QT_CONFIG(clipboard) + void cut(); + void copy(); + void paste(); +#endif + void undo(); + void redo(); + void insert(int position, const QString &text); + void remove(int start, int end); + Q_REVISION(2, 2) void append(const QString &text); + Q_REVISION(2, 7) void clear(); + +private Q_SLOTS: + void q_invalidate(); + void q_textChanged(); + void q_contentsChange(int, int, int); + void updateSelection(); + void moveCursorDelegate(); + void createCursor(); + void q_canPasteChanged(); + void updateWholeDocument(); + void invalidateBlock(const QTextBlock &block); + void updateCursor(); + void q_linkHovered(const QString &link); + void q_markerHovered(bool hovered); + void q_updateAlignment(); + void updateSize(); + void triggerPreprocess(); + Q_REVISION(6, 7) QVariant loadResource(int type, const QUrl &source); + void resourceRequestFinished(); + +private: + void markDirtyNodesForRange(int start, int end, int charDelta); + void updateTotalLines(); + void invalidateFontCaches(); + QTextDocument* document() const; + void setDocument(QTextDocument *doc); + +protected: + QQuickTextEdit(QQuickTextEditPrivate &dd, QQuickItem *parent = nullptr); +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + void setOldSelectionDefault(); +#endif + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + + bool event(QEvent *) override; + void keyPressEvent(QKeyEvent *) override; + void keyReleaseEvent(QKeyEvent *) override; + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + + // mouse filter? + void mousePressEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; +#if QT_CONFIG(im) + void inputMethodEvent(QInputMethodEvent *e) override; +#endif + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData) override; + void updatePolish() override; + + friend class QQuickTextUtil; + friend class QQuickTextDocumentPrivate; + +private: + Q_DISABLE_COPY(QQuickTextEdit) + Q_DECLARE_PRIVATE(QQuickTextEdit) +}; + +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +class QQuickPre64TextEdit : public QQuickTextEdit { + Q_OBJECT + QML_NAMED_ELEMENT(TextEdit) + QML_ADDED_IN_VERSION(2, 0) + QML_REMOVED_IN_VERSION(6, 4) +public: + QQuickPre64TextEdit(QQuickItem *parent = nullptr); +}; +#endif + +Q_DECLARE_MIXED_ENUM_OPERATORS_SYMMETRIC(int, QQuickTextEdit::HAlignment, QQuickTextEdit::VAlignment) + +QT_END_NAMESPACE + +#endif // QQUICKTEXTEDIT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..658e810fd6603eccef6b961339171bf8767100b0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextedit_p_p.h @@ -0,0 +1,235 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTEDIT_P_P_H +#define QQUICKTEXTEDIT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquicktextedit_p.h" +#include "qquickimplicitsizeitem_p_p.h" +#include "qquicktextutil_p.h" + +#include + +#include +#include +#include +#include + +#if QT_CONFIG(accessibility) +#include +#endif + +#include + +QT_BEGIN_NAMESPACE +class QTextLayout; +class QQuickPixmap; +class QQuickTextControl; +class QSGInternalTextNode; +class QQuickTextNodeEngine; + +class Q_QUICK_EXPORT QQuickTextEditPrivate : public QQuickImplicitSizeItemPrivate +#if QT_CONFIG(accessibility) + , public QAccessible::ActivationObserver +#endif +{ +public: + Q_DECLARE_PUBLIC(QQuickTextEdit) + + typedef QQuickTextEdit Public; + + struct Node { + explicit Node(int startPos = std::numeric_limits::max(), + QSGInternalTextNode *node = nullptr) + : m_node(node), m_startPos(startPos) { } + QSGInternalTextNode *textNode() const { return m_node; } + void moveStartPos(int delta) { Q_ASSERT(m_startPos + delta > 0); m_startPos += delta; } + int startPos() const { return m_startPos; } + void setDirty() { m_dirty = true; } + bool dirty() const { return m_dirty; } + + private: + QSGInternalTextNode *m_node; + int m_startPos; + bool m_dirty = false; + +#ifndef QT_NO_DEBUG_STREAM + friend QDebug Q_QUICK_EXPORT operator<<(QDebug, const Node &); +#endif + }; + typedef QList::iterator TextNodeIterator; + + struct ExtraData { + ExtraData(); + + qreal padding = 0; + qreal topPadding = 0; + qreal leftPadding = 0; + qreal rightPadding = 0; + qreal bottomPadding = 0; + bool explicitTopPadding : 1; + bool explicitLeftPadding : 1; + bool explicitRightPadding : 1; + bool explicitBottomPadding : 1; + bool implicitResize : 1; + }; + QLazilyAllocated extra; + + + QQuickTextEditPrivate() + : dirty(false), richText(false), cursorVisible(false), cursorPending(false) + , focusOnPress(true), persistentSelection(false), requireImplicitWidth(false) + , selectByMouse(true), canPaste(false), canPasteValid(false), hAlignImplicit(true) + , textCached(true), inLayout(false), selectByKeyboard(false), selectByKeyboardSet(false) + , hadSelection(false), markdownText(false), inResize(false), ownsDocument(false) + , containsUnscalableGlyphs(false) + { +#if QT_CONFIG(accessibility) + QAccessible::installActivationObserver(this); +#endif + } + + ~QQuickTextEditPrivate() + { +#if QT_CONFIG(accessibility) + QAccessible::removeActivationObserver(this); +#endif + } + + static QQuickTextEditPrivate *get(QQuickTextEdit *item) { + return static_cast(QObjectPrivate::get(item)); } + + void init(); + + void resetInputMethod(); + void updateDefaultTextOption(); + void onDocumentStatusChanged(); + void relayoutDocument(); + bool determineHorizontalAlignment(); + bool setHAlign(QQuickTextEdit::HAlignment, bool forceAlign = false); + void mirrorChange() override; + bool transformChanged(QQuickItem *transformedItem) override; + qreal getImplicitWidth() const override; + Qt::LayoutDirection textDirection(const QString &text) const; + bool isLinkHoveredConnected(); + +#if QT_CONFIG(cursor) + void updateMouseCursorShape(); +#endif + + void setNativeCursorEnabled(bool) {} + void handleFocusEvent(QFocusEvent *event); + void addCurrentTextNodeToRoot(QQuickTextNodeEngine *, QSGTransformNode *, QSGInternalTextNode *, TextNodeIterator&, int startPos); + QSGInternalTextNode* createTextNode(); + +#if QT_CONFIG(im) + Qt::InputMethodHints effectiveInputMethodHints() const; +#endif + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; +#endif + + inline qreal padding() const { return extra.isAllocated() ? extra->padding : 0.0; } + void setTopPadding(qreal value, bool reset = false); + void setLeftPadding(qreal value, bool reset = false); + void setRightPadding(qreal value, bool reset = false); + void setBottomPadding(qreal value, bool reset = false); + + bool isImplicitResizeEnabled() const; + void setImplicitResizeEnabled(bool enabled); + + QColor color = QRgb(0xFF000000); + QColor selectionColor = QRgb(0xFF000080); + QColor selectedTextColor = QRgb(0xFFFFFFFF); + + QSizeF contentSize; + + qreal textMargin = 0; + qreal xoff = 0; + qreal yoff = 0; + + QString text; + QUrl baseUrl; + QFont sourceFont; + QFont font; + + QQmlComponent* cursorComponent = nullptr; + QQuickItem* cursorItem = nullptr; + QTextDocument *document = nullptr; + QQuickTextControl *control = nullptr; + QQuickTextDocument *quickDocument = nullptr; + mutable QQuickTextSelection *cursorSelection = nullptr; + QList textNodeMap; + QList pixmapsInProgress; + + int lastSelectionStart = 0; + int lastSelectionEnd = 0; + int lineCount = 0; + int firstBlockInViewport = -1; // can be wrong after scrolling sometimes + int firstBlockPastViewport = -1; // only for the autotest + int renderedBlockCount = -1; // only for the autotest + QRectF renderedRegion; + + enum UpdateType { + UpdateNone, + UpdateOnlyPreprocess, + UpdatePaintNode, + UpdateAll + }; + + QQuickTextEdit::HAlignment hAlign = QQuickTextEdit::AlignLeft; + QQuickTextEdit::VAlignment vAlign = QQuickTextEdit::AlignTop; + QQuickTextEdit::TextFormat format = QQuickTextEdit::PlainText; + QQuickTextEdit::WrapMode wrapMode = QQuickTextEdit::NoWrap; + QQuickTextEdit::RenderType renderType = QQuickTextUtil::textRenderType(); + Qt::LayoutDirection contentDirection = Qt::LayoutDirectionAuto; + QQuickTextEdit::SelectionMode mouseSelectionMode = QQuickTextEdit::SelectCharacters; +#if QT_CONFIG(im) + Qt::InputMethodHints inputMethodHints = Qt::ImhNone; +#endif + UpdateType updateType = UpdatePaintNode; + + bool dirty : 1; + bool richText : 1; + bool cursorVisible : 1; + bool cursorPending : 1; + bool focusOnPress : 1; + bool persistentSelection : 1; + bool requireImplicitWidth:1; + bool selectByMouse:1; + bool canPaste:1; + bool canPasteValid:1; + bool hAlignImplicit:1; + bool textCached:1; + bool inLayout:1; + bool selectByKeyboard:1; + bool selectByKeyboardSet:1; + bool hadSelection : 1; + bool markdownText : 1; + bool inResize : 1; + bool ownsDocument : 1; + bool containsUnscalableGlyphs : 1; + + static const int largeTextSizeThreshold; +}; + +#ifndef QT_NO_DEBUG_STREAM +QDebug Q_QUICK_EXPORT operator<<(QDebug debug, const QQuickTextEditPrivate::Node &); +#endif + +QT_END_NAMESPACE + +#endif // QQUICKTEXTEDIT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p.h new file mode 100644 index 0000000000000000000000000000000000000000..316be4cc6687f3c97024ea704bce15e306814658 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p.h @@ -0,0 +1,420 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTINPUT_P_H +#define QQUICKTEXTINPUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickimplicitsizeitem_p.h" +#include "qquicktextinterface_p.h" +#include +#if QT_CONFIG(validator) +#include +#endif + +QT_BEGIN_NAMESPACE + +class QQuickTextInputPrivate; +class Q_QUICK_EXPORT QQuickTextInput : public QQuickImplicitSizeItem, public QQuickTextInterface +{ + Q_OBJECT + Q_INTERFACES(QQuickTextInterface) + + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) + Q_PROPERTY(int length READ length NOTIFY textChanged) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(QColor selectionColor READ selectionColor WRITE setSelectionColor NOTIFY selectionColorChanged) + Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor NOTIFY selectedTextColorChanged) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) + Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign RESET resetHAlign NOTIFY horizontalAlignmentChanged) + Q_PROPERTY(HAlignment effectiveHorizontalAlignment READ effectiveHAlign NOTIFY effectiveHorizontalAlignmentChanged) + Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) + Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + + Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged) + Q_PROPERTY(bool cursorVisible READ isCursorVisible WRITE setCursorVisible NOTIFY cursorVisibleChanged) + Q_PROPERTY(int cursorPosition READ cursorPosition WRITE setCursorPosition NOTIFY cursorPositionChanged) + Q_PROPERTY(QRectF cursorRectangle READ cursorRectangle NOTIFY cursorRectangleChanged) + Q_PROPERTY(QQmlComponent *cursorDelegate READ cursorDelegate WRITE setCursorDelegate NOTIFY cursorDelegateChanged) + Q_PROPERTY(bool overwriteMode READ overwriteMode WRITE setOverwriteMode NOTIFY overwriteModeChanged) + Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged) + Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged) + Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectedTextChanged) + + Q_PROPERTY(int maximumLength READ maxLength WRITE setMaxLength NOTIFY maximumLengthChanged) +#if QT_CONFIG(validator) + Q_PROPERTY(QValidator* validator READ validator WRITE setValidator NOTIFY validatorChanged) +#endif + Q_PROPERTY(QString inputMask READ inputMask WRITE setInputMask NOTIFY inputMaskChanged) + Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged) + + Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged) + Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode NOTIFY echoModeChanged) + Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged) + Q_PROPERTY(QString passwordCharacter READ passwordCharacter WRITE setPasswordCharacter NOTIFY passwordCharacterChanged) + Q_PROPERTY(int passwordMaskDelay READ passwordMaskDelay WRITE setPasswordMaskDelay RESET resetPasswordMaskDelay NOTIFY passwordMaskDelayChanged REVISION(2, 4)) + Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged) + Q_PROPERTY(QString preeditText READ preeditText NOTIFY preeditTextChanged REVISION(2, 7)) + Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged) + Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) + Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged) + Q_PROPERTY(bool persistentSelection READ persistentSelection WRITE setPersistentSelection NOTIFY persistentSelectionChanged) + Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) + Q_PROPERTY(bool canUndo READ canUndo NOTIFY canUndoChanged) + Q_PROPERTY(bool canRedo READ canRedo NOTIFY canRedoChanged) + Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged) + Q_PROPERTY(qreal contentWidth READ contentWidth NOTIFY contentSizeChanged) + Q_PROPERTY(qreal contentHeight READ contentHeight NOTIFY contentSizeChanged) + Q_PROPERTY(RenderType renderType READ renderType WRITE setRenderType NOTIFY renderTypeChanged) + + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged REVISION(2, 6)) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged REVISION(2, 6)) + QML_NAMED_ELEMENT(TextInput) + QML_ADDED_IN_VERSION(2, 0) +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + QML_ADDED_IN_VERSION(6, 4) +#endif + +public: + QQuickTextInput(QQuickItem * parent=nullptr); + ~QQuickTextInput(); + + void componentComplete() override; + + enum EchoMode {//To match QLineEdit::EchoMode + Normal, + NoEcho, + Password, + PasswordEchoOnEdit + }; + Q_ENUM(EchoMode) + + enum HAlignment { + AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter + }; + Q_ENUM(HAlignment) + + enum VAlignment { + AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter + }; + Q_ENUM(VAlignment) + + enum WrapMode { + NoWrap = QTextOption::NoWrap, + WordWrap = QTextOption::WordWrap, + WrapAnywhere = QTextOption::WrapAnywhere, + WrapAtWordBoundaryOrAnywhere = QTextOption::WrapAtWordBoundaryOrAnywhere, // COMPAT + Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere + }; + Q_ENUM(WrapMode) + + enum SelectionMode { + SelectCharacters, + SelectWords + }; + Q_ENUM(SelectionMode) + + enum CursorPosition { + CursorBetweenCharacters, + CursorOnCharacter + }; + Q_ENUM(CursorPosition) + + enum RenderType { QtRendering, + NativeRendering, + CurveRendering + }; + Q_ENUM(RenderType) + + //Auxilliary functions needed to control the TextInput from QML + Q_INVOKABLE void positionAt(QQmlV4FunctionPtr args) const; + Q_INVOKABLE QRectF positionToRectangle(int pos) const; + Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE void moveCursorSelection(int pos, SelectionMode mode); + + RenderType renderType() const; + void setRenderType(RenderType renderType); + + QString text() const; + void setText(const QString &); + + int length() const; + + QFont font() const; + void setFont(const QFont &font); + + QColor color() const; + void setColor(const QColor &c); + + QColor selectionColor() const; + void setSelectionColor(const QColor &c); + + QColor selectedTextColor() const; + void setSelectedTextColor(const QColor &c); + + HAlignment hAlign() const; + void setHAlign(HAlignment align); + void resetHAlign(); + HAlignment effectiveHAlign() const; + + VAlignment vAlign() const; + void setVAlign(VAlignment align); + + WrapMode wrapMode() const; + void setWrapMode(WrapMode w); + + bool isReadOnly() const; + void setReadOnly(bool); + + bool isCursorVisible() const; + void setCursorVisible(bool on); + + int cursorPosition() const; + void setCursorPosition(int cp); + + QRectF cursorRectangle() const; + + int selectionStart() const; + int selectionEnd() const; + + QString selectedText() const; + + int maxLength() const; + void setMaxLength(int ml); + +#if QT_CONFIG(validator) + QValidator * validator() const; + void setValidator(QValidator* v); +#endif + + QString inputMask() const; + void setInputMask(const QString &im); + + EchoMode echoMode() const; + void setEchoMode(EchoMode echo); + + QString passwordCharacter() const; + void setPasswordCharacter(const QString &str); + + int passwordMaskDelay() const; + void setPasswordMaskDelay(int delay); + void resetPasswordMaskDelay(); + + QString displayText() const; + Q_REVISION(2, 7) QString preeditText() const; + + QQmlComponent* cursorDelegate() const; + void setCursorDelegate(QQmlComponent*); + + bool overwriteMode() const; + void setOverwriteMode(bool overwrite); + + bool focusOnPress() const; + void setFocusOnPress(bool); + + bool autoScroll() const; + void setAutoScroll(bool); + + bool selectByMouse() const; + void setSelectByMouse(bool); + + SelectionMode mouseSelectionMode() const; + void setMouseSelectionMode(SelectionMode mode); + + bool persistentSelection() const; + void setPersistentSelection(bool persist); + + bool hasAcceptableInput() const; + +#if QT_CONFIG(im) + QVariant inputMethodQuery(Qt::InputMethodQuery property) const override; + Q_REVISION(2, 4) Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, const QVariant &argument) const; +#endif + + QRectF boundingRect() const override; + QRectF clipRect() const override; + + bool canPaste() const; + + bool canUndo() const; + bool canRedo() const; + + bool isInputMethodComposing() const; + + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + + Q_INVOKABLE QString getText(int start, int end) const; + + qreal contentWidth() const; + qreal contentHeight() const; + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + void invalidate() override; + +Q_SIGNALS: + void textChanged(); + void cursorPositionChanged(); + void cursorRectangleChanged(); + void selectionStartChanged(); + void selectionEndChanged(); + void selectedTextChanged(); + void accepted(); + void acceptableInputChanged(); + Q_REVISION(2, 2) void editingFinished(); + Q_REVISION(2, 9) void textEdited(); + void colorChanged(); + void selectionColorChanged(); + void selectedTextColorChanged(); + void fontChanged(const QFont &font); + void horizontalAlignmentChanged(QQuickTextInput::HAlignment alignment); + void verticalAlignmentChanged(QQuickTextInput::VAlignment alignment); + void wrapModeChanged(); + void readOnlyChanged(bool isReadOnly); + void cursorVisibleChanged(bool isCursorVisible); + void cursorDelegateChanged(); + void overwriteModeChanged(bool overwriteMode); + void maximumLengthChanged(int maximumLength); +#if QT_CONFIG(validator) + void validatorChanged(); +#endif + void inputMaskChanged(const QString &inputMask); + void echoModeChanged(QQuickTextInput::EchoMode echoMode); + void passwordCharacterChanged(); + Q_REVISION(2, 4) void passwordMaskDelayChanged(int delay); + void displayTextChanged(); + Q_REVISION(2, 7) void preeditTextChanged(); + void activeFocusOnPressChanged(bool activeFocusOnPress); + void autoScrollChanged(bool autoScroll); + void selectByMouseChanged(bool selectByMouse); + void mouseSelectionModeChanged(QQuickTextInput::SelectionMode mode); + void persistentSelectionChanged(); + void canPasteChanged(); + void canUndoChanged(); + void canRedoChanged(); + void inputMethodComposingChanged(); + void effectiveHorizontalAlignmentChanged(); + void contentSizeChanged(); + void inputMethodHintsChanged(); + void renderTypeChanged(); + Q_REVISION(2, 6) void paddingChanged(); + Q_REVISION(2, 6) void topPaddingChanged(); + Q_REVISION(2, 6) void leftPaddingChanged(); + Q_REVISION(2, 6) void rightPaddingChanged(); + Q_REVISION(2, 6) void bottomPaddingChanged(); + +private: + void invalidateFontCaches(); + void ensureActiveFocus(Qt::FocusReason reason); + +protected: + QQuickTextInput(QQuickTextInputPrivate &dd, QQuickItem *parent = nullptr); +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + void setOldSelectionDefault(); +#endif + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void keyPressEvent(QKeyEvent* ev) override; +#if QT_CONFIG(im) + void inputMethodEvent(QInputMethodEvent *) override; +#endif + void mouseUngrabEvent() override; + bool event(QEvent *e) override; + void focusOutEvent(QFocusEvent *event) override; + void focusInEvent(QFocusEvent *event) override; + void timerEvent(QTimerEvent *event) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override; + void updatePolish() override; + +public Q_SLOTS: + void selectAll(); + void selectWord(); + void select(int start, int end); + void deselect(); + bool isRightToLeft(int start, int end); +#if QT_CONFIG(clipboard) + void cut(); + void copy(); + void paste(); +#endif + void undo(); + void redo(); + void insert(int position, const QString &text); + void remove(int start, int end); + Q_REVISION(2, 4) void ensureVisible(int position); + Q_REVISION(2, 7) void clear(); + +private Q_SLOTS: + void selectionChanged(); + void createCursor(); + void updateCursorRectangle(bool scroll = true); + void q_canPasteChanged(); + void q_updateAlignment(); + void triggerPreprocess(); + +#if QT_CONFIG(validator) + void q_validatorChanged(); +#endif + +private: + friend class QQuickTextUtil; + + Q_DECLARE_PRIVATE(QQuickTextInput) +}; + +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) +class QQuickPre64TextInput : public QQuickTextInput { + Q_OBJECT + QML_NAMED_ELEMENT(TextInput) + QML_ADDED_IN_VERSION(2, 0) + QML_REMOVED_IN_VERSION(6, 4) +public: + QQuickPre64TextInput(QQuickItem *parent = nullptr); +}; +#endif + +QT_END_NAMESPACE + +#endif // QQUICKTEXTINPUT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bdcf27d7fc01542a179c0dda9179b3e8f89f5fa5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinput_p_p.h @@ -0,0 +1,512 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTINPUT_P_P_H +#define QQUICKTEXTINPUT_P_P_H + +#include "qquicktextinput_p.h" +#include "qquicktext_p.h" +#include "qquickimplicitsizeitem_p_p.h" +#include "qquicktextutil_p.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "qplatformdefs.h" + +#include + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. + +QT_BEGIN_NAMESPACE + +class QSGInternalTextNode; +class QInputControl; + +class Q_QUICK_EXPORT QQuickTextInputPrivate : public QQuickImplicitSizeItemPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickTextInput) + + typedef QQuickTextInput Public; + + struct ExtraData { + ExtraData(); + + qreal padding; + qreal topPadding; + qreal leftPadding; + qreal rightPadding; + qreal bottomPadding; + bool explicitTopPadding : 1; + bool explicitLeftPadding : 1; + bool explicitRightPadding : 1; + bool explicitBottomPadding : 1; + bool implicitResize : 1; + }; + QLazilyAllocated extra; + + QQuickTextInputPrivate() + : hscroll(0) + , vscroll(0) + , cursorItem(nullptr) + , textNode(nullptr) + , m_maskData(nullptr) + , color(QRgb(0xFF000000)) + , selectionColor(QRgb(0xFF000080)) + , selectedTextColor(QRgb(0xFFFFFFFF)) + , m_cursor(0) +#if QT_CONFIG(im) + , m_preeditCursor(0) + , m_undoPreeditState(-1) +#endif + , m_blinkEnabled(false) + , m_blinkTimer(0) + , m_maxLength(32767) + , m_lastCursorPos(-1) + , m_undoState(0) + , m_selstart(0) + , m_selend(0) +#if QT_CONFIG(im) + , inputMethodHints(Qt::ImhNone) +#endif + , hAlign(QQuickTextInput::AlignLeft) + , vAlign(QQuickTextInput::AlignTop) + , wrapMode(QQuickTextInput::NoWrap) + , m_echoMode(QQuickTextInput::Normal) + , renderType(QQuickTextUtil::textRenderType()) + , updateType(UpdatePaintNode) + , mouseSelectionMode(QQuickTextInput::SelectCharacters) + , m_layoutDirection(Qt::LayoutDirectionAuto) + , m_passwordCharacter(QGuiApplication::styleHints()->passwordMaskCharacter()) + , m_passwordMaskDelay(QGuiApplication::styleHints()->passwordMaskDelay()) + , focusOnPress(true) + , cursorVisible(false) + , cursorPending(false) + , autoScroll(true) + , selectByMouse(true) + , canPaste(false) + , canPasteValid(false) + , canUndo(false) + , canRedo(false) + , hAlignImplicit(true) + , selectPressed(false) + , hadSelectionOnMousePress(false) + , textLayoutDirty(true) + , persistentSelection(false) + , hasImState(false) + , m_separator(0) + , m_readOnly(0) + , m_textDirty(0) +#if QT_CONFIG(im) + , m_preeditDirty(0) +#endif + , m_selDirty(0) + , m_validInput(1) + , m_acceptableInput(1) + , m_blinkStatus(0) + , m_passwordEchoEditing(false) + , inLayout(false) + , requireImplicitWidth(false) + , overwriteMode(false) + , containsUnscalableGlyphs(false) +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + , selectByTouchDrag(false) +#endif + { + } + + ~QQuickTextInputPrivate() + { + // If this control is used for password input, we don't want the + // password data to stay in the process memory, therefore we need + // to zero it out + if (m_echoMode != QQuickTextInput::Normal) + m_text.fill(u'\0'); + } + + void init(); + void cancelInput(); + void startCreatingCursor(); + void ensureVisible(int position, int preeditCursor = 0, int preeditLength = 0); + void updateHorizontalScroll(); + void updateVerticalScroll(); + bool determineHorizontalAlignment(); + bool setHAlign(QQuickTextInput::HAlignment, bool forceAlign = false); + void mirrorChange() override; + bool sendMouseEventToInputContext(QMouseEvent *event); +#if QT_CONFIG(im) + Qt::InputMethodHints effectiveInputMethodHints() const; +#endif + void handleFocusEvent(QFocusEvent *event); + + struct MaskInputData { + enum Casemode { NoCaseMode, Upper, Lower }; + QChar maskChar; // either the separator char or the inputmask + bool separator; + Casemode caseMode; + }; + + // undo/redo handling + enum CommandType { Separator, Insert, Remove, Delete, RemoveSelection, DeleteSelection, SetSelection }; + struct Command { + inline Command() {} + inline Command(CommandType t, int p, QChar c, int ss, int se) : type(t),uc(c),pos(p),selStart(ss),selEnd(se) {} + uint type : 4; + QChar uc; + int pos, selStart, selEnd; + }; + + enum DrawFlags { + DrawText = 0x01, + DrawSelections = 0x02, + DrawCursor = 0x04, + DrawAll = DrawText | DrawSelections | DrawCursor + }; + + QElapsedTimer tripleClickTimer; + QSizeF contentSize; + QPointF pressPos; + QPointF tripleClickStartPoint; + + QPointer cursorComponent; +#if QT_CONFIG(validator) + QPointer m_validator; +#endif + + qreal hscroll; + qreal vscroll; + + QTextLayout m_textLayout; + QString m_text; + QString m_inputMask; + QString m_cancelText; + QFont font; + QFont sourceFont; + + QQuickItem *cursorItem; + QSGInternalTextNode *textNode; + std::unique_ptr m_maskData; + QInputControl *m_inputControl; + + QList m_transactions; + QVector m_history; + + QColor color; + QColor selectionColor; + QColor selectedTextColor; + + QBasicTimer m_passwordEchoTimer; + int lastSelectionStart; + int lastSelectionEnd; + int m_cursor; +#if QT_CONFIG(im) + int m_preeditCursor; + int m_undoPreeditState; +#endif + bool m_blinkEnabled; + int m_blinkTimer; + int m_maxLength; + int m_lastCursorPos; + int m_undoState; + int m_selstart; + int m_selend; + + enum UpdateType { + UpdateNone, + UpdateOnlyPreprocess, + UpdatePaintNode + }; + +#if QT_CONFIG(im) + Qt::InputMethodHints inputMethodHints; +#endif + QQuickTextInput::HAlignment hAlign; + QQuickTextInput::VAlignment vAlign; + QQuickTextInput::WrapMode wrapMode; + QQuickTextInput::EchoMode m_echoMode; + QQuickTextInput::RenderType renderType; + UpdateType updateType; + QQuickTextInput::SelectionMode mouseSelectionMode; + Qt::LayoutDirection m_layoutDirection; + + QChar m_blank; + QChar m_passwordCharacter; + int m_passwordMaskDelay; + + bool focusOnPress:1; + bool cursorVisible:1; + bool cursorPending:1; + bool autoScroll:1; + bool selectByMouse:1; + bool canPaste:1; + bool canPasteValid:1; + bool canUndo:1; + bool canRedo:1; + bool hAlignImplicit:1; + bool selectPressed:1; + bool hadSelectionOnMousePress:1; + bool textLayoutDirty:1; + bool persistentSelection:1; + bool hasImState : 1; + bool m_separator : 1; + bool m_readOnly : 1; + bool m_textDirty : 1; +#if QT_CONFIG(im) + bool m_preeditDirty : 1; +#endif + bool m_selDirty : 1; + bool m_validInput : 1; + bool m_acceptableInput : 1; + bool m_blinkStatus : 1; + bool m_passwordEchoEditing : 1; + bool inLayout:1; + bool requireImplicitWidth:1; + bool overwriteMode:1; + bool containsUnscalableGlyphs:1; +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) + bool selectByTouchDrag:1; +#endif + + static inline QQuickTextInputPrivate *get(QQuickTextInput *t) { + return t->d_func(); + } + bool hasPendingTripleClick() const { + return !tripleClickTimer.hasExpired(QGuiApplication::styleHints()->mouseDoubleClickInterval()); + } + + void setNativeCursorEnabled(bool) { + updateCursorBlinking(); + } + + int nextMaskBlank(int pos) + { + int c = findInMask(pos, true, false); + m_separator |= (c != pos); + return (c != -1 ? c : m_maxLength); + } + + int prevMaskBlank(int pos) + { + int c = findInMask(pos, false, false); + m_separator |= (c != pos); + return (c != -1 ? c : 0); + } + + bool isUndoAvailable() const { return !m_readOnly && m_undoState; } + bool isRedoAvailable() const { return !m_readOnly && m_undoState < (int)m_history.size(); } + void clearUndo() { + m_history.clear(); + m_undoState = 0; +#if QT_CONFIG(im) + m_undoPreeditState = -1; +#endif + } + + bool allSelected() const { return !m_text.isEmpty() && m_selstart == 0 && m_selend == (int)m_text.size(); } + bool hasSelectedText() const { return !m_text.isEmpty() && m_selend > m_selstart; } + + void setSelection(int start, int length); + + inline QString selectedText() const { return hasSelectedText() ? m_text.mid(m_selstart, m_selend - m_selstart) : QString(); } + QString textBeforeSelection() const { return hasSelectedText() ? m_text.left(m_selstart) : QString(); } + QString textAfterSelection() const { return hasSelectedText() ? m_text.mid(m_selend) : QString(); } + + int selectionStart() const { return hasSelectedText() ? m_selstart : -1; } + int selectionEnd() const { return hasSelectedText() ? m_selend : -1; } + + QRectF anchorRectangle() const; + + int positionAt(qreal x, qreal y, QTextLine::CursorPosition position) const; + int positionAt(const QPointF &point, QTextLine::CursorPosition position = QTextLine::CursorBetweenCharacters) const { + return positionAt(point.x(), point.y(), position); + } + + void removeSelection() + { + int priorState = m_undoState; + removeSelectedText(); + finishChange(priorState); + } + + int start() const { return 0; } + int end() const { return m_text.size(); } + + QString realText() const; + +#if QT_CONFIG(clipboard) + void copy(QClipboard::Mode mode = QClipboard::Clipboard) const; + void paste(QClipboard::Mode mode = QClipboard::Clipboard); +#endif + +#if QT_CONFIG(im) + void commitPreedit(); + void cancelPreedit(); +#endif + + Qt::CursorMoveStyle cursorMoveStyle() const { return m_textLayout.cursorMoveStyle(); } + void setCursorMoveStyle(Qt::CursorMoveStyle style) { m_textLayout.setCursorMoveStyle(style); } + + void moveCursor(int pos, bool mark = false); + void cursorForward(bool mark, int steps) + { + int c = m_cursor; + if (steps > 0) { + while (steps--) + c = cursorMoveStyle() == Qt::VisualMoveStyle ? m_textLayout.rightCursorPosition(c) + : m_textLayout.nextCursorPosition(c); + } else if (steps < 0) { + while (steps++) + c = cursorMoveStyle() == Qt::VisualMoveStyle ? m_textLayout.leftCursorPosition(c) + : m_textLayout.previousCursorPosition(c); + } + moveCursor(c, mark); + } + + void cursorWordForward(bool mark) { moveCursor(m_textLayout.nextCursorPosition(m_cursor, QTextLayout::SkipWords), mark); } + void cursorWordBackward(bool mark) { moveCursor(m_textLayout.previousCursorPosition(m_cursor, QTextLayout::SkipWords), mark); } + + void home(bool mark) { moveCursor(0, mark); } + void end(bool mark) { moveCursor(q_func()->text().size(), mark); } + + void backspace(); + void del(); + void deselect() { internalDeselect(); finishChange(); } + void selectAll() { m_selstart = m_selend = m_cursor = 0; moveCursor(m_text.size(), true); } + + void insert(const QString &); + void clear(); + void selectWordAtPos(int); + + void setCursorPosition(int pos) { if (pos <= m_text.size()) moveCursor(qMax(0, pos)); } + + bool fixup(); + + QString inputMask() const { return m_maskData ? m_inputMask + QLatin1Char(';') + m_blank : QString(); } + void setInputMask(const QString &mask) + { + parseInputMask(mask); + if (m_maskData) + moveCursor(nextMaskBlank(0)); + } + + // input methods +#if QT_CONFIG(im) + bool composeMode() const { return !m_textLayout.preeditAreaText().isEmpty(); } + + QString preeditAreaText() const { return m_textLayout.preeditAreaText(); } +#endif + + void updatePasswordEchoEditing(bool editing); + + void cancelPasswordEchoTimer() { + m_passwordEchoTimer.stop(); + } + + Qt::LayoutDirection textDirection() const; + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection(Qt::LayoutDirection direction) + { + if (direction != m_layoutDirection) { + m_layoutDirection = direction; + updateDisplayText(); + } + } + +#if QT_CONFIG(im) + void processInputMethodEvent(QInputMethodEvent *event); +#endif + void processKeyEvent(QKeyEvent* ev); + + void setBlinkingCursorEnabled(bool enable); + void updateCursorBlinking(); + + void updateLayout(); + void updateBaselineOffset(); + + qreal calculateImplicitWidthForText(const QString &text) const; + qreal getImplicitWidth() const override; + + inline qreal padding() const { return extra.isAllocated() ? extra->padding : 0.0; } + void setTopPadding(qreal value, bool reset = false); + void setLeftPadding(qreal value, bool reset = false); + void setRightPadding(qreal value, bool reset = false); + void setBottomPadding(qreal value, bool reset = false); + + bool isImplicitResizeEnabled() const; + void setImplicitResizeEnabled(bool enabled); + +private: + void removeSelectedText(); + void internalSetText(const QString &txt, int pos = -1, bool edited = true); + void updateDisplayText(bool forceUpdate = false); + + void internalInsert(const QString &s); + void internalDelete(bool wasBackspace = false); + void internalRemove(int pos); + + inline void internalDeselect() + { + m_selDirty |= (m_selend > m_selstart); + m_selstart = m_selend = 0; + } + + void internalUndo(int until = -1); + void internalRedo(); + void emitUndoRedoChanged(); + + bool emitCursorPositionChanged(); + + bool finishChange(int validateFromState = -1, bool update = false, bool edited = true); + + void addCommand(const Command& cmd); + + inline void separate() { m_separator = true; } + + bool separateSelection(); + void deleteStartOfWord(); + void deleteEndOfWord(); + void deleteEndOfLine(); + + enum ValidatorState { +#if QT_CONFIG(validator) + InvalidInput = QValidator::Invalid, + IntermediateInput = QValidator::Intermediate, + AcceptableInput = QValidator::Acceptable +#else + InvalidInput, + IntermediateInput, + AcceptableInput +#endif + }; + + // masking + void parseInputMask(const QString &maskFields); + bool isValidInput(QChar key, QChar mask) const; + ValidatorState hasAcceptableInput(const QString &text) const; + void checkIsValid(); + QString maskString(uint pos, const QString &str, bool clear = false) const; + QString clearString(uint pos, uint len) const; + QString stripString(const QString &str) const; + int findInMask(int pos, bool forward, bool findSeparator, QChar searchChar = QChar()) const; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTINPUT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinterface_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinterface_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c2fdc98a9c9af6b558440a6b7e0c98b5cbfb22f7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextinterface_p.h @@ -0,0 +1,31 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTINTERFACE_P_H +#define QQUICKTEXTINTERFACE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +class Q_QUICK_EXPORT QQuickTextInterface +{ +public: + virtual void invalidate() = 0; +}; + +#define QQuickTextInterface_iid "org.qt-project.Qt.QQuickTextInterface" +Q_DECLARE_INTERFACE(QQuickTextInterface, QQuickTextInterface_iid) + +QT_END_NAMESPACE + +#endif // QQUICKTEXTINTERFACE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextmetrics_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextmetrics_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d83240e5add20334279510a9987af1a9b21d53ba --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextmetrics_p.h @@ -0,0 +1,94 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTMETRICS_H +#define QQUICKTEXTMETRICS_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QFont; + +class Q_QUICK_EXPORT QQuickTextMetrics : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL) + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + Q_PROPERTY(qreal advanceWidth READ advanceWidth NOTIFY metricsChanged FINAL) + Q_PROPERTY(QRectF boundingRect READ boundingRect NOTIFY metricsChanged FINAL) + Q_PROPERTY(qreal width READ width NOTIFY metricsChanged FINAL) + Q_PROPERTY(qreal height READ height NOTIFY metricsChanged FINAL) + Q_PROPERTY(QRectF tightBoundingRect READ tightBoundingRect NOTIFY metricsChanged FINAL) + Q_PROPERTY(QString elidedText READ elidedText NOTIFY metricsChanged FINAL) + Q_PROPERTY(Qt::TextElideMode elide READ elide WRITE setElide NOTIFY elideChanged FINAL) + Q_PROPERTY(qreal elideWidth READ elideWidth WRITE setElideWidth NOTIFY elideWidthChanged FINAL) + Q_PROPERTY(QQuickText::RenderType renderType READ renderType WRITE setRenderType + NOTIFY renderTypeChanged) + QML_NAMED_ELEMENT(TextMetrics) + QML_ADDED_IN_VERSION(2, 4) + +public: + explicit QQuickTextMetrics(QObject *parent = nullptr); + + QFont font() const; + void setFont(const QFont &font); + + QString text() const; + void setText(const QString &text); + + Qt::TextElideMode elide() const; + void setElide(Qt::TextElideMode elide); + + qreal elideWidth() const; + void setElideWidth(qreal elideWidth); + + qreal advanceWidth() const; + QRectF boundingRect() const; + qreal width() const; + qreal height() const; + QRectF tightBoundingRect() const; + QString elidedText() const; + + QQuickText::RenderType renderType() const; + void setRenderType(QQuickText::RenderType renderType); + +Q_SIGNALS: + void fontChanged(); + void textChanged(); + void elideChanged(); + void elideWidthChanged(); + void metricsChanged(); + void renderTypeChanged(); + +private: + QString m_text; + QFont m_font; + QFontMetricsF m_metrics; + Qt::TextElideMode m_elide; + qreal m_elideWidth; + QQuickText::RenderType m_renderType; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTMETRICS_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextnodeengine_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextnodeengine_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bc85dc5022917f4f3d24aac8b255ba6659c0d869 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextnodeengine_p.h @@ -0,0 +1,242 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include +#include +#include +#include +#include +#include +#include +#include "qquickclipnode_p.h" +#include "qsginternaltextnode_p.h" + +#ifndef QQUICKTEXTNODEENGINE_P_H +#define QQUICKTEXTNODEENGINE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +// Engine that takes glyph runs as input, and produces a set of glyph nodes, clip nodes, +// and rectangle nodes to represent the text, decorations and selection. Will try to minimize +// number of nodes, and join decorations in neighbouring items + +class QQuickTextNodeEngine { +public: + enum Decoration { + NoDecoration = 0x0, + Underline = 0x1, + Overline = 0x2, + StrikeOut = 0x4, + Background = 0x8 + }; + Q_DECLARE_FLAGS(Decorations, Decoration) + + enum SelectionState { + Unselected, + Selected + }; + + struct BinaryTreeNode { + + BinaryTreeNode() + : selectionState(Unselected), clipNode(0), decorations(Decoration::NoDecoration) + , ascent(0.0), leftChildIndex(-1), rightChildIndex(-1) + { + } + + BinaryTreeNode(const QRectF &brect, const QImage &i, SelectionState selState, qreal a) + : boundingRect(brect), selectionState(selState), clipNode(0), decorations(Decoration::NoDecoration) + , image(i), ascent(a), leftChildIndex(-1), rightChildIndex(-1) + { + } + + BinaryTreeNode(const QGlyphRun &g, SelectionState selState, const QRectF &brect, + const Decorations &decs, const QColor &c, const QColor &bc, const QColor &dc, + const QPointF &pos, qreal a); + + QGlyphRun glyphRun; + QRectF boundingRect; + SelectionState selectionState; + QQuickDefaultClipNode *clipNode; + Decorations decorations; + QColor color; + QColor backgroundColor; + QColor decorationColor; + QPointF position; + QImage image; + qreal ascent; + + int leftChildIndex; + int rightChildIndex; + + QList > ranges; + + static void insert(QVarLengthArray *binaryTree, const QRectF &rect, const QImage &image, qreal ascent, SelectionState selectionState) + { insert(binaryTree, BinaryTreeNode(rect, image, selectionState, ascent)); } + + static void insert(QVarLengthArray *binaryTree, const QGlyphRun &glyphRun, SelectionState selectionState, + Decorations decorations, const QColor &textColor, const QColor &backgroundColor, const QColor &underlineColor, const QPointF &position); + static void insert(QVarLengthArray *binaryTree, const BinaryTreeNode &binaryTreeNode); + static void inOrder(const QVarLengthArray &binaryTree, QVarLengthArray *sortedIndexes, int currentIndex = 0); + }; + + struct BinaryTreeNodeKey + { + BinaryTreeNodeKey(BinaryTreeNode *node); + + bool operator==(const BinaryTreeNodeKey &otherKey) const + { + return fontEngine == otherKey.fontEngine + && clipNode == otherKey.clipNode + && color == otherKey.color + && selectionState == otherKey.selectionState; + } + + QFontEngine *fontEngine; + QQuickDefaultClipNode *clipNode; + QRgb color; + int selectionState; + }; + + QQuickTextNodeEngine() + : m_currentTextDirection(Qt::LeftToRight) + , m_hasSelection(false) + , m_hasContents(false) + {} + + bool hasContents() const { return m_hasContents; } + void addTextBlock(QTextDocument *, const QTextBlock &, const QPointF &position, const QColor &textColor, + const QColor& anchorColor, int selectionStart, int selectionEnd, const QRectF &viewport = QRectF()); + QTextLine currentLine() const { return m_currentLine; } + + void setCurrentLine(const QTextLine ¤tLine) + { + if (m_currentLine.isValid()) + processCurrentLine(); + + m_currentLine = currentLine; + } + + void setCurrentTextDirection(Qt::LayoutDirection textDirection) + { + m_currentTextDirection = textDirection; + } + + void addBorder(const QRectF &rect, qreal border, QTextFrameFormat::BorderStyle borderStyle, + const QBrush &borderBrush); + void addFrameDecorations(QTextDocument *document, QTextFrame *frame); + void addImage(const QRectF &rect, const QImage &image, qreal ascent, + SelectionState selectionState, + QTextFrameFormat::Position layoutPosition); + int addText(const QTextBlock &block, + const QTextCharFormat &charFormat, + const QColor &textColor, + const QVarLengthArray &colorChanges, + int textPos, int fragmentEnd, + int selectionStart, int selectionEnd); + void addTextObject(const QTextBlock &block, const QPointF &position, const QTextCharFormat &format, + SelectionState selectionState, + QTextDocument *textDocument, int pos, + QTextFrameFormat::Position layoutPosition = QTextFrameFormat::InFlow); + void addSelectedGlyphs(const QGlyphRun &glyphRun); + void addUnselectedGlyphs(const QGlyphRun &glyphRun); + void addGlyphsInRange(int rangeStart, int rangeEnd, + const QColor &color, const QColor &backgroundColor, const QColor &underlineColor, + int selectionStart, int selectionEnd); + void addGlyphsForRanges(const QVarLengthArray &ranges, + int start, int end, + int selectionStart, int selectionEnd); + + void mergeProcessedNodes(QList *regularNodes, + QList *imageNodes); + void addToSceneGraph(QSGInternalTextNode *parent, + QQuickText::TextStyle style = QQuickText::Normal, + const QColor &styleColor = QColor()); + + void setSelectionColor(const QColor &selectionColor) + { + m_selectionColor = selectionColor; + } + + void setSelectedTextColor(const QColor &selectedTextColor) + { + m_selectedTextColor = selectedTextColor; + } + + void setTextColor(const QColor &textColor) + { + m_textColor = textColor; + } + + void setAnchorColor(const QColor &anchorColor) + { + m_anchorColor = anchorColor; + } + + void setPosition(const QPointF &position) + { + m_position = position; + } + + + +private: + struct TextDecoration + { + TextDecoration() : selectionState(Unselected) {} + TextDecoration(const SelectionState &s, + const QRectF &r, + const QColor &c) + : selectionState(s) + , rect(r) + , color(c) + { + } + + SelectionState selectionState; + QRectF rect; + QColor color; + }; + + void processCurrentLine(); + void addTextDecorations(const QVarLengthArray &textDecorations, qreal offset, qreal thickness); + void mergeFormats(QTextLayout *textLayout, QVarLengthArray *mergedFormats); + + QColor m_selectionColor; + QColor m_textColor; + QColor m_backgroundColor; + QColor m_decorationColor; + QColor m_selectedTextColor; + QColor m_anchorColor; + QPointF m_position; + + QTextLine m_currentLine; + Qt::LayoutDirection m_currentTextDirection; + + QList > m_backgrounds; + QList m_selectionRects; + QVarLengthArray m_currentLineTree; + + QList m_lines; + QVector m_processedNodes; + + bool m_hasSelection : 1; + bool m_hasContents : 1; + friend class QSGInternalTextNode; + +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTNODEENGINE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextselection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextselection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4c578ae0ebaf356a2d4fbeeb786c55eb4d56135d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextselection_p.h @@ -0,0 +1,80 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTSELECTION_H +#define QQUICKTEXTSELECTION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QFont; +class QQuickTextControl; + +class Q_QUICK_EXPORT QQuickTextSelection : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL) + + QML_ANONYMOUS + QML_ADDED_IN_VERSION(6, 7) + +public: + explicit QQuickTextSelection(QObject *parent = nullptr); + + QString text() const; + void setText(const QString &text); + + QFont font() const; + void setFont(const QFont &font); + + QColor color() const; + void setColor(QColor color); + + Qt::Alignment alignment() const; + void setAlignment(Qt::Alignment align); + +Q_SIGNALS: + void textChanged(); + void fontChanged(); + void colorChanged(); + void alignmentChanged(); + +private: + QTextCursor cursor() const; + void updateFromCharFormat(const QTextCharFormat &fmt); + void updateFromBlockFormat(); + +private: + QTextCursor m_cursor; + QTextCharFormat m_charFormat; + QTextBlockFormat m_blockFormat; + QQuickTextControl *m_control = nullptr; +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QQuickTextSelection) + +#endif // QQUICKTEXTSELECTION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextutil_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextutil_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7248c4e31e5f6e2d82a78b9b3270b77a28df3cf3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktextutil_p.h @@ -0,0 +1,111 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTUTIL_P_H +#define QQUICKTEXTUTIL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTextUtil : public QObject // For the benefit of translations. +{ + Q_OBJECT +public: + template static void setCursorDelegate(Private *d, QQmlComponent *delegate); + template static void createCursor(Private *d); + + template static typename T::RenderType textRenderType(); + + static qreal alignedX(qreal textWidth, qreal itemWidth, int alignment); + static qreal alignedY(qreal textHeight, qreal itemHeight, int alignment); + +private: + static QQuickItem *createCursor( + QQmlComponent *component, + QQuickItem *parent, + const QRectF &cursorRectangle, + const char *className); + +}; + +template +void QQuickTextUtil::setCursorDelegate(Private *d, QQmlComponent *delegate) +{ + if (d->cursorComponent == delegate) + return; + + typename Private::Public *parent = d->q_func(); + + if (d->cursorComponent) { + disconnect(d->cursorComponent, SIGNAL(statusChanged(QQmlComponent::Status)), + parent, SLOT(createCursor())); + } + + delete d->cursorItem; + d->cursorItem = 0; + d->cursorPending = true; + + d->cursorComponent = delegate; + + if (parent->isCursorVisible() && parent->isComponentComplete()) + createCursor(d); + + Q_EMIT parent->cursorDelegateChanged(); +} + +template +void QQuickTextUtil::createCursor(Private *d) +{ + if (!d->cursorPending) + return; + + d->cursorPending = false; + + typename Private::Public *parent = d->q_func(); + if (d->cursorComponent) { + d->cursorItem = createCursor( + d->cursorComponent, + parent, + parent->cursorRectangle(), + Private::Public::staticMetaObject.className()); + } + + d->setNativeCursorEnabled(!d->cursorItem); + d->updateType = Private::UpdatePaintNode; + parent->update(); +} + +template +typename T::RenderType QQuickTextUtil::textRenderType() +{ + switch (QQuickWindow::textRenderType()) { + case QQuickWindow::QtTextRendering: + return T::QtRendering; + case QQuickWindow::NativeTextRendering: + return T::NativeRendering; + case QQuickWindow::CurveTextRendering: + return T::CurveRendering; + } + + Q_UNREACHABLE_RETURN(T::QtRendering); +} + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktimeline_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktimeline_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8b3c7811ba2293f297fd6206446aed34d2dcf090 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktimeline_p_p.h @@ -0,0 +1,156 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTIMELINE_H +#define QQUICKTIMELINE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "private/qabstractanimationjob_p.h" + +QT_BEGIN_NAMESPACE + +class QEasingCurve; +class QQuickTimeLineValue; +class QQuickTimeLineCallback; +struct QQuickTimeLinePrivate; +class QQuickTimeLineObject; +class Q_QUICK_EXPORT QQuickTimeLine : public QObject, QAbstractAnimationJob +{ +Q_OBJECT +public: + QQuickTimeLine(QObject *parent = nullptr); + ~QQuickTimeLine(); + + enum SyncMode { LocalSync, GlobalSync }; + SyncMode syncMode() const; + void setSyncMode(SyncMode); + + void pause(QQuickTimeLineObject &, int); + void callback(const QQuickTimeLineCallback &); + void set(QQuickTimeLineValue &, qreal); + + int accel(QQuickTimeLineValue &, qreal velocity, qreal accel); + int accel(QQuickTimeLineValue &, qreal velocity, qreal accel, qreal maxDistance); + int accelDistance(QQuickTimeLineValue &, qreal velocity, qreal distance); + + void move(QQuickTimeLineValue &, qreal destination, int time = 500); + void move(QQuickTimeLineValue &, qreal destination, const QEasingCurve &, int time = 500); + void moveBy(QQuickTimeLineValue &, qreal change, int time = 500); + void moveBy(QQuickTimeLineValue &, qreal change, const QEasingCurve &, int time = 500); + + void sync(); + void setSyncPoint(int); + int syncPoint() const; + + void sync(QQuickTimeLineValue &); + void sync(QQuickTimeLineValue &, QQuickTimeLineValue &); + + void reset(QQuickTimeLineValue &); + + void complete(); + void clear(); + bool isActive() const; + + int time() const; + + int duration() const override; +Q_SIGNALS: + void updated(); + void completed(); + +protected: + void updateCurrentTime(int) override; + void debugAnimation(QDebug d) const override; + +private: + void remove(QQuickTimeLineObject *); + friend class QQuickTimeLineObject; + friend struct QQuickTimeLinePrivate; + QQuickTimeLinePrivate *d; +}; + +class Q_AUTOTEST_EXPORT QQuickTimeLineObject +{ +public: + QQuickTimeLineObject(); + virtual ~QQuickTimeLineObject(); + +protected: + friend class QQuickTimeLine; + friend struct QQuickTimeLinePrivate; + QQuickTimeLine *_t; +}; + +class Q_AUTOTEST_EXPORT QQuickTimeLineValue : public QQuickTimeLineObject +{ +public: + QQuickTimeLineValue(qreal v = 0.) : _v(v) {} + + virtual qreal value() const { return _v; } + virtual void setValue(qreal v) { _v = v; } + + QQuickTimeLine *timeLine() const { return _t; } + + operator qreal() const { return _v; } + QQuickTimeLineValue &operator=(qreal v) { setValue(v); return *this; } +private: + friend class QQuickTimeLine; + friend struct QQuickTimeLinePrivate; + qreal _v; +}; + +class Q_AUTOTEST_EXPORT QQuickTimeLineCallback +{ +public: + typedef void (*Callback)(void *); + + QQuickTimeLineCallback(); + QQuickTimeLineCallback(QQuickTimeLineObject *b, Callback, void * = nullptr); + QQuickTimeLineCallback(const QQuickTimeLineCallback &o); + + QQuickTimeLineCallback &operator=(const QQuickTimeLineCallback &o); + QQuickTimeLineObject *callbackObject() const; + +private: + friend struct QQuickTimeLinePrivate; + Callback d0; + void *d1; + QQuickTimeLineObject *d2; +}; + +template +class QQuickTimeLineValueProxy : public QQuickTimeLineValue +{ +public: + QQuickTimeLineValueProxy(T *object, void (T::*func)(qreal), qreal v = 0.) + : QQuickTimeLineValue(v), object(object), setter(func) + { + Q_ASSERT(object); + } + + void setValue(qreal v) override + { + QQuickTimeLineValue::setValue(v); + (object->*setter)(v); + } + +private: + T *object; + void (T::*setter)(qreal); +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransition_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransition_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b619770c29b1107dd38da02b56d2a153b697d50b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransition_p.h @@ -0,0 +1,111 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTRANSITION_H +#define QQUICKTRANSITION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickstate_p.h" +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractAnimation; +class QQuickTransitionPrivate; +class QQuickTransitionManager; +class QQuickTransition; + +class QQuickTransitionInstance : QAnimationJobChangeListener +{ +public: + QQuickTransitionInstance(QQuickTransition *transition, QAbstractAnimationJob *anim); + ~QQuickTransitionInstance(); + + void start(); + void stop(); + void complete(); + + bool isRunning() const; + +protected: + void animationStateChanged(QAbstractAnimationJob *, QAbstractAnimationJob::State, QAbstractAnimationJob::State) override; + + void removeStateChangeListener() + { + m_anim->removeAnimationChangeListener(this, QAbstractAnimationJob::StateChange); + } + +private: + QQmlGuard m_transition; + QAbstractAnimationJob *m_anim; + friend class QQuickTransition; +}; + +class Q_QUICK_EXPORT QQuickTransition : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickTransition) + + Q_PROPERTY(QString from READ fromState WRITE setFromState NOTIFY fromChanged) + Q_PROPERTY(QString to READ toState WRITE setToState NOTIFY toChanged) + Q_PROPERTY(bool reversible READ reversible WRITE setReversible NOTIFY reversibleChanged) + Q_PROPERTY(bool running READ running NOTIFY runningChanged) + Q_PROPERTY(QQmlListProperty animations READ animations) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_CLASSINFO("DefaultProperty", "animations") + Q_CLASSINFO("DeferredPropertyNames", "animations") + QML_NAMED_ELEMENT(Transition) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickTransition(QObject *parent=nullptr); + ~QQuickTransition(); + + QString fromState() const; + void setFromState(const QString &); + + QString toState() const; + void setToState(const QString &); + + bool reversible() const; + void setReversible(bool); + + bool enabled() const; + void setEnabled(bool enabled); + + bool running() const; + + QQmlListProperty animations(); + + QQuickTransitionInstance *prepare(QQuickStateOperation::ActionList &actions, + QList &after, + QQuickTransitionManager *end, + QObject *defaultTarget); + + void setReversed(bool r); + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void reversibleChanged(); + void enabledChanged(); + void runningChanged(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKTRANSITION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransitionmanager_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransitionmanager_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1d1064139dfd9975c00f70d837fe6cfbbcc36b96 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktransitionmanager_p_p.h @@ -0,0 +1,55 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTRANSITIONMANAGER_P_H +#define QQUICKTRANSITIONMANAGER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickanimation_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickState; +class QQuickStateAction; +class QQuickTransitionManagerPrivate; +class Q_QUICK_EXPORT QQuickTransitionManager +{ +public: + QQuickTransitionManager(); + virtual ~QQuickTransitionManager(); + + bool isRunning() const; + + void transition(const QList &, QQuickTransition *transition, QObject *defaultTarget = nullptr); + + void cancel(); + + SelfDeletable m_selfDeletable; +protected: + virtual void finished(); + +private: + Q_DISABLE_COPY(QQuickTransitionManager) + QQuickTransitionManagerPrivate *d; + + void complete(); + void setState(QQuickState *); + + friend class QQuickState; + friend class ParallelAnimationWrapper; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTRANSITIONMANAGER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktranslate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktranslate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..00e8fc826d3470d2d1aa4b148ff33380efb4a5d1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuick/6.8.1/QtQuick/private/qquicktranslate_p.h @@ -0,0 +1,154 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTRANSLATE_P_H +#define QQUICKTRANSLATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTranslatePrivate; +class Q_QUICK_EXPORT QQuickTranslate : public QQuickTransform +{ + Q_OBJECT + + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) + QML_NAMED_ELEMENT(Translate) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickTranslate(QObject *parent = nullptr); + + qreal x() const; + void setX(qreal); + + qreal y() const; + void setY(qreal); + + void applyTo(QMatrix4x4 *matrix) const override; + +Q_SIGNALS: + void xChanged(); + void yChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickTranslate) +}; + +class QQuickScalePrivate; +class Q_QUICK_EXPORT QQuickScale : public QQuickTransform +{ + Q_OBJECT + + Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged) + Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged) + Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged) + Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged) + QML_NAMED_ELEMENT(Scale) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickScale(QObject *parent = nullptr); + + QVector3D origin() const; + void setOrigin(const QVector3D &point); + + qreal xScale() const; + void setXScale(qreal); + + qreal yScale() const; + void setYScale(qreal); + + qreal zScale() const; + void setZScale(qreal); + + void applyTo(QMatrix4x4 *matrix) const override; + +Q_SIGNALS: + void originChanged(); + void xScaleChanged(); + void yScaleChanged(); + void zScaleChanged(); + void scaleChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickScale) +}; + +class QQuickRotationPrivate; +class Q_QUICK_EXPORT QQuickRotation : public QQuickTransform +{ + Q_OBJECT + + Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged) + Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) + Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged) + QML_NAMED_ELEMENT(Rotation) + QML_ADDED_IN_VERSION(2, 0) +public: + QQuickRotation(QObject *parent = nullptr); + + QVector3D origin() const; + void setOrigin(const QVector3D &point); + + qreal angle() const; + void setAngle(qreal); + + QVector3D axis() const; + void setAxis(const QVector3D &axis); + void setAxis(Qt::Axis axis); + + void applyTo(QMatrix4x4 *matrix) const override; + +Q_SIGNALS: + void originChanged(); + void angleChanged(); + void axisChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickRotation) +}; + +class QQuickMatrix4x4Private; +class Q_QUICK_EXPORT QQuickMatrix4x4 : public QQuickTransform +{ + Q_OBJECT + + Q_PROPERTY(QMatrix4x4 matrix READ matrix WRITE setMatrix NOTIFY matrixChanged) + QML_NAMED_ELEMENT(Matrix4x4) + QML_ADDED_IN_VERSION(2, 3) +public: + QQuickMatrix4x4(QObject *parent = nullptr); + + QMatrix4x4 matrix() const; + void setMatrix(const QMatrix4x4& matrix); + + void applyTo(QMatrix4x4 *matrix) const override; + +Q_SIGNALS: + void matrixChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickMatrix4x4) +}; + + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..49eceb84ecc5f637d4def1a57822a7fe74dc4044 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyle_p.h @@ -0,0 +1,48 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTYLE_P_H +#define QQUICKSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QSettings; + +class Q_QUICKCONTROLS2_EXPORT QQuickStylePrivate +{ +public: + static QString style(); + static QString effectiveStyleName(const QString &styleName); + static QString fallbackStyle(); + static bool isCustomStyle(); + static bool isResolved(); + static bool isUsingDefaultStyle(); + static bool exists(); + static void init(); + static void reset(); + static QString configFilePath(); + static QSharedPointer settings(const QString &group = QString()); + static const QFont *readFont(const QSharedPointer &settings); + static const QPalette *readPalette(const QSharedPointer &settings); + static bool isDarkSystemTheme(); + static QStringList builtInStyles(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyleplugin_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyleplugin_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f8f9b1f1f58993f52f795e5c41882a559bafa35f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qquickstyleplugin_p.h @@ -0,0 +1,48 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTYLEPLUGIN_P_H +#define QQUICKSTYLEPLUGIN_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; + +class Q_QUICKCONTROLS2_EXPORT QQuickStylePlugin : public QQmlExtensionPlugin +{ + Q_OBJECT + +public: + explicit QQuickStylePlugin(QObject *parent = nullptr); + ~QQuickStylePlugin(); + + virtual QString name() const = 0; + virtual void initializeTheme(QQuickTheme *theme) = 0; + virtual void updateTheme() {} + + void registerTypes(const char *uri) override; + void unregisterTypes() override; + +private: + QQuickTheme *createTheme(const QString &name); + + Q_DISABLE_COPY(QQuickStylePlugin) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTYLEPLUGIN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qtquickcontrols2-config_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qtquickcontrols2-config_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3ae993d31534ef30562d345c69dbe436c9f2b1eb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2/6.8.1/QtQuickControls2/private/qtquickcontrols2-config_p.h @@ -0,0 +1,18 @@ +#define QT_FEATURE_quickcontrols2_basic 1 + +#define QT_FEATURE_quickcontrols2_fusion 1 + +#define QT_FEATURE_quickcontrols2_imagine 1 + +#define QT_FEATURE_quickcontrols2_material 1 + +#define QT_FEATURE_quickcontrols2_universal 1 + +#define QT_FEATURE_quickcontrols2_fluentwinui3 1 + +#define QT_FEATURE_quickcontrols2_macos -1 + +#define QT_FEATURE_quickcontrols2_ios -1 + +#define QT_FEATURE_quickcontrols2_windows 1 + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasicstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasicstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ee7057615ad6eda8f33523049747b2c248629f43 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasicstyle_p.h @@ -0,0 +1,119 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBASICSTYLE_P_H +#define QQUICKBASICSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2BASIC_EXPORT QQuickBasicStyle : public QObject +{ + Q_OBJECT + Q_PROPERTY(QColor backgroundColor READ backgroundColor CONSTANT FINAL) + Q_PROPERTY(QColor overlayModalColor READ overlayModalColor CONSTANT FINAL) + Q_PROPERTY(QColor overlayDimColor READ overlayDimColor CONSTANT FINAL) + Q_PROPERTY(QColor textColor READ textColor CONSTANT FINAL) + Q_PROPERTY(QColor textDarkColor READ textDarkColor CONSTANT FINAL) + Q_PROPERTY(QColor textLightColor READ textLightColor CONSTANT FINAL) + Q_PROPERTY(QColor textLinkColor READ textLinkColor CONSTANT FINAL) + Q_PROPERTY(QColor textSelectionColor READ textSelectionColor CONSTANT FINAL) + Q_PROPERTY(QColor textDisabledColor READ textDisabledColor CONSTANT FINAL) + Q_PROPERTY(QColor textDisabledLightColor READ textDisabledLightColor CONSTANT FINAL) + Q_PROPERTY(QColor textPlaceholderColor READ textPlaceholderColor CONSTANT FINAL) + Q_PROPERTY(QColor focusColor READ focusColor CONSTANT FINAL) + Q_PROPERTY(QColor focusLightColor READ focusLightColor CONSTANT FINAL) + Q_PROPERTY(QColor focusPressedColor READ focusPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor buttonColor READ buttonColor CONSTANT FINAL) + Q_PROPERTY(QColor buttonPressedColor READ buttonPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor buttonCheckedColor READ buttonCheckedColor CONSTANT FINAL) + Q_PROPERTY(QColor buttonCheckedPressedColor READ buttonCheckedPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor buttonCheckedFocusColor READ buttonCheckedFocusColor CONSTANT FINAL) + Q_PROPERTY(QColor toolButtonColor READ toolButtonColor CONSTANT FINAL) + Q_PROPERTY(QColor tabButtonColor READ tabButtonColor CONSTANT FINAL) + Q_PROPERTY(QColor tabButtonPressedColor READ tabButtonPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor tabButtonCheckedPressedColor READ tabButtonCheckedPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor delegateColor READ delegateColor CONSTANT FINAL) + Q_PROPERTY(QColor delegatePressedColor READ delegatePressedColor CONSTANT FINAL) + Q_PROPERTY(QColor delegateFocusColor READ delegateFocusColor CONSTANT FINAL) + Q_PROPERTY(QColor indicatorPressedColor READ indicatorPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor indicatorDisabledColor READ indicatorDisabledColor CONSTANT FINAL) + Q_PROPERTY(QColor indicatorFrameColor READ indicatorFrameColor CONSTANT FINAL) + Q_PROPERTY(QColor indicatorFramePressedColor READ indicatorFramePressedColor CONSTANT FINAL) + Q_PROPERTY(QColor indicatorFrameDisabledColor READ indicatorFrameDisabledColor CONSTANT FINAL) + Q_PROPERTY(QColor frameDarkColor READ frameDarkColor CONSTANT FINAL) + Q_PROPERTY(QColor frameLightColor READ frameLightColor CONSTANT FINAL) + Q_PROPERTY(QColor scrollBarColor READ scrollBarColor CONSTANT FINAL) + Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor CONSTANT FINAL) + Q_PROPERTY(QColor progressBarColor READ progressBarColor CONSTANT FINAL) + Q_PROPERTY(QColor pageIndicatorColor READ pageIndicatorColor CONSTANT FINAL) + Q_PROPERTY(QColor separatorColor READ separatorColor CONSTANT FINAL) + Q_PROPERTY(QColor disabledDarkColor READ disabledDarkColor CONSTANT FINAL) + Q_PROPERTY(QColor disabledLightColor READ disabledLightColor CONSTANT FINAL) + QML_NAMED_ELEMENT(Basic) + QML_SINGLETON + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickBasicStyle(QObject *parent = nullptr); + + QColor backgroundColor() const; + QColor overlayModalColor() const; + QColor overlayDimColor() const; + QColor textColor() const; + QColor textDarkColor() const; + QColor textLightColor() const; + QColor textLinkColor() const; + QColor textSelectionColor() const; + QColor textDisabledColor() const; + QColor textDisabledLightColor() const; + QColor textPlaceholderColor() const; + QColor focusColor() const; + QColor focusLightColor() const; + QColor focusPressedColor() const; + QColor buttonColor() const; + QColor buttonPressedColor() const; + QColor buttonCheckedColor() const; + QColor buttonCheckedPressedColor() const; + QColor buttonCheckedFocusColor() const; + QColor toolButtonColor() const; + QColor tabButtonColor() const; + QColor tabButtonPressedColor() const; + QColor tabButtonCheckedPressedColor() const; + QColor delegateColor() const; + QColor delegatePressedColor() const; + QColor delegateFocusColor() const; + QColor indicatorPressedColor() const; + QColor indicatorDisabledColor() const; + QColor indicatorFrameColor() const; + QColor indicatorFramePressedColor() const; + QColor indicatorFrameDisabledColor() const; + QColor frameDarkColor() const; + QColor frameLightColor() const; + QColor scrollBarColor() const; + QColor scrollBarPressedColor() const; + QColor progressBarColor() const; + QColor pageIndicatorColor() const; + QColor separatorColor() const; + QColor disabledDarkColor() const; + QColor disabledLightColor() const; +}; + +QT_END_NAMESPACE + +#endif // QQUICKBASICSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasictheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasictheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..64c62e2ede6b8445160ad8b86d3ecd21cf52df20 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qquickbasictheme_p.h @@ -0,0 +1,32 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBASICTHEME_P_H +#define QQUICKBASICTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; + +class Q_QUICKCONTROLS2BASIC_EXPORT QQuickBasicTheme +{ +public: + static void initialize(QQuickTheme *theme); +}; + +QT_END_NAMESPACE + +#endif // QQUICKBASICTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qtquickcontrols2basicforeign_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qtquickcontrols2basicforeign_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4cfb9947053edd268f8257b945177b3b3ce7c128 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Basic/6.8.1/QtQuickControls2Basic/private/qtquickcontrols2basicforeign_p.h @@ -0,0 +1,51 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QTQUICKCONTROLS2BASICFOREIGN_P_H +#define QTQUICKCONTROLS2BASICFOREIGN_P_H + +#include +#include +#if QT_CONFIG(quicktemplates2_container) +#include +#endif + +QT_BEGIN_NAMESPACE + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +// These are necessary in order to use C++ types in a file where only QtQuick.Controls has been imported. +// Control types like Button don't need this done for them, as each style module provides a Button type, +// and QtQuick.Controls is a sort of alias for the active style import. + +struct QQuickOverlayAttachedForeign +{ + Q_GADGET + QML_NAMED_ELEMENT(Overlay) + QML_FOREIGN(QQuickOverlay) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 3) +}; + +#if QT_CONFIG(quicktemplates2_container) +struct QQuickSplitHandleAttachedForeign +{ + Q_GADGET + QML_NAMED_ELEMENT(SplitHandle) + QML_FOREIGN(QQuickSplitHandleAttached) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 13) +}; +#endif + +QT_END_NAMESPACE + +#endif // QTQUICKCONTROLS2BASICFOREIGN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicbusyindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicbusyindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..90f0a2a7e3578abb08eee4a552f96b938c0146b0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicbusyindicator_p.h @@ -0,0 +1,60 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDEFAULTBUSYINDICATOR_P_H +#define QQUICKDEFAULTBUSYINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickBasicBusyIndicator : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor pen READ pen WRITE setPen FINAL) + Q_PROPERTY(QColor fill READ fill WRITE setFill FINAL) + Q_PROPERTY(bool running READ isRunning WRITE setRunning) + QML_NAMED_ELEMENT(BusyIndicatorImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickBasicBusyIndicator(QQuickItem *parent = nullptr); + + QColor pen() const; + void setPen(const QColor &pen); + + QColor fill() const; + void setFill(const QColor &fill); + + bool isRunning() const; + void setRunning(bool running); + + int elapsed() const; + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + bool m_running = false; + int m_elapsed = 0; + QColor m_pen; + QColor m_fill; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDEFAULTBUSYINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicdial_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicdial_p.h new file mode 100644 index 0000000000000000000000000000000000000000..dae7969dd26fc0f9b5720f2abfd4c2228aa0ab39 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicdial_p.h @@ -0,0 +1,60 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDEFAULTDIAL_P_H +#define QQUICKDEFAULTDIAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickBasicDial : public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL) + Q_PROPERTY(qreal startAngle READ startAngle WRITE setStartAngle FINAL) + Q_PROPERTY(qreal endAngle READ endAngle WRITE setEndAngle FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + QML_NAMED_ELEMENT(DialImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickBasicDial(QQuickItem *parent = nullptr); + + qreal progress() const; + void setProgress(qreal progress); + + qreal startAngle() const; + void setStartAngle(qreal startAngle); + + qreal endAngle() const; + void setEndAngle(qreal endAngle); + + QColor color() const; + void setColor(const QColor &color); + + void paint(QPainter *painter) override; + +private: + qreal m_progress = 0; + qreal m_startAngle = -140.; + qreal m_endAngle = 140.; + QColor m_color = Qt::black; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDEFAULTDIAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicprogressbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicprogressbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b4ac51583b6769bfdbfb4936946f6e831fa04c82 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2BasicStyleImpl/6.8.1/QtQuickControls2BasicStyleImpl/private/qquickbasicprogressbar_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDEFAULTPROGRESSBAR_P_H +#define QQUICKDEFAULTPROGRESSBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickBasicProgressBar : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL) + Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + QML_NAMED_ELEMENT(ProgressBarImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickBasicProgressBar(QQuickItem *parent = nullptr); + + bool isIndeterminate() const; + void setIndeterminate(bool indeterminate); + + qreal progress() const; + void setProgress(qreal progress); + + QColor color() const; + void setColor(const QColor &color); + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + qreal m_progress = 0; + bool m_indeterminate = false; + QColor m_color; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDEFAULTPROGRESSBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2FluentWinUI3StyleImpl/6.8.1/QtQuickControls2FluentWinUI3StyleImpl/private/qquickfluentwinui3focusstroke_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FluentWinUI3StyleImpl/6.8.1/QtQuickControls2FluentWinUI3StyleImpl/private/qquickfluentwinui3focusstroke_p.h new file mode 100644 index 0000000000000000000000000000000000000000..31c150e84c2ec5997533f29cb1066d7b8eb27abd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FluentWinUI3StyleImpl/6.8.1/QtQuickControls2FluentWinUI3StyleImpl/private/qquickfluentwinui3focusstroke_p.h @@ -0,0 +1,39 @@ + +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKFLUENTWINUI3FOCUSSTROKE_P_H +#define QQUICKFLUENTWINUI3FOCUSSTROKE_P_H +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include +#include +#include +QT_BEGIN_NAMESPACE +class QQuickFluentWinUI3FocusStroke : public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(int radius READ radius WRITE setRadius FINAL) + QML_NAMED_ELEMENT(FocusStroke) + QML_ADDED_IN_VERSION(6, 8) +public: + explicit QQuickFluentWinUI3FocusStroke(QQuickItem *parent = nullptr); + int radius() const; + void setRadius(int radius); + QColor color() const; + void setColor(const QColor &color); + void paint(QPainter *painter) override; +private: + QColor m_color = Qt::white; + int m_radius; +}; +QT_END_NAMESPACE +#endif // QQUICKFLUENTWINUI3FOCUSSTROKE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusionstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusionstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5ff4c533fe250fe3aa8b678f7d41feb124254795 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusionstyle_p.h @@ -0,0 +1,61 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFUSIONSTYLE_P_H +#define QQUICKFUSIONSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPalette; + +class Q_QUICKCONTROLS2FUSION_EXPORT QQuickFusionStyle : public QObject +{ + Q_OBJECT + Q_PROPERTY(QColor lightShade READ lightShade CONSTANT FINAL) + Q_PROPERTY(QColor darkShade READ darkShade CONSTANT FINAL) + Q_PROPERTY(QColor topShadow READ topShadow CONSTANT FINAL) + Q_PROPERTY(QColor innerContrastLine READ innerContrastLine CONSTANT FINAL) + QML_NAMED_ELEMENT(Fusion) + QML_SINGLETON + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickFusionStyle(QObject *parent = nullptr); + + static QColor lightShade(); + static QColor darkShade(); + static QColor topShadow(); + static QColor innerContrastLine(); + + Q_INVOKABLE static QColor highlight(QQuickPalette *palette); + Q_INVOKABLE static QColor highlightedText(QQuickPalette *palette); + Q_INVOKABLE static QColor outline(QQuickPalette *palette); + Q_INVOKABLE static QColor highlightedOutline(QQuickPalette *palette); + Q_INVOKABLE static QColor tabFrameColor(QQuickPalette *palette); + Q_INVOKABLE static QColor buttonColor(QQuickPalette *palette, bool highlighted = false, bool down = false, bool hovered = false); + Q_INVOKABLE static QColor buttonOutline(QQuickPalette *palette, bool highlighted = false, bool enabled = true); + Q_INVOKABLE static QColor gradientStart(const QColor &baseColor); + Q_INVOKABLE static QColor gradientStop(const QColor &baseColor); + Q_INVOKABLE static QColor mergedColors(const QColor &colorA, const QColor &colorB, int factor = 50); + Q_INVOKABLE static QColor grooveColor(QQuickPalette *palette); +}; + +QT_END_NAMESPACE + +#endif // QQUICKFUSIONSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusiontheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusiontheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3e756d358a5fad0359d2a8431e1967f0b945fa83 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Fusion/6.8.1/QtQuickControls2Fusion/private/qquickfusiontheme_p.h @@ -0,0 +1,32 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFUSIONTHEME_P_H +#define QQUICKFUSIONTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; + +class Q_QUICKCONTROLS2FUSION_EXPORT QQuickFusionTheme +{ +public: + static void initialize(QQuickTheme *theme); +}; + +QT_END_NAMESPACE + +#endif // QQUICKFUSIONTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionbusyindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionbusyindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e75a1a395ad9b8fb07b4aba280d17bdca56276c1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionbusyindicator_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFUSIONBUSYINDICATOR_P_H +#define QQUICKFUSIONBUSYINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFusionBusyIndicator : public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(bool running READ isRunning WRITE setRunning) + QML_NAMED_ELEMENT(BusyIndicatorImpl) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickFusionBusyIndicator(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + + bool isRunning() const; + void setRunning(bool running); + + void paint(QPainter *painter) override; + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + +private: + bool m_running = false; + QColor m_color; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFUSIONBUSYINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusiondial_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusiondial_p.h new file mode 100644 index 0000000000000000000000000000000000000000..659d149e6807845ac85fc1c90eed0f3b54aa6354 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusiondial_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFUSIONDIAL_P_H +#define QQUICKFUSIONDIAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFusionDial : public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(bool highlight READ highlight WRITE setHighlight FINAL) + QML_NAMED_ELEMENT(DialImpl) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickFusionDial(QQuickItem *parent = nullptr); + + bool highlight() const; + void setHighlight(bool highlight); + + void paint(QPainter *painter) override; + +private: + bool m_highlight = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFUSIONDIAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionknob_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionknob_p.h new file mode 100644 index 0000000000000000000000000000000000000000..34cb12666fa97d2ebc766b0b7d9d3acfcb127920 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2FusionStyleImpl/6.8.1/QtQuickControls2FusionStyleImpl/private/qquickfusionknob_p.h @@ -0,0 +1,37 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFUSIONKNOB_P_H +#define QQUICKFUSIONKNOB_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFusionKnob : public QQuickPaintedItem +{ + Q_OBJECT + QML_NAMED_ELEMENT(KnobImpl) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickFusionKnob(QQuickItem *parent = nullptr); + + void paint(QPainter *painter) override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFUSIONKNOB_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginestyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginestyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7fa7c9136de755189d341d2e0af66bc120e3c1b6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginestyle_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGINESTYLE_P_H +#define QQUICKIMAGINESTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMAGINE_EXPORT QQuickImagineStyle : public QQuickAttachedPropertyPropagator +{ + Q_OBJECT + Q_PROPERTY(QString path READ path WRITE setPath RESET resetPath NOTIFY pathChanged FINAL) + Q_PROPERTY(QUrl url READ url NOTIFY pathChanged FINAL) + QML_NAMED_ELEMENT(Imagine) + QML_ATTACHED(QQuickImagineStyle) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickImagineStyle(QObject *parent = nullptr); + + static QQuickImagineStyle *qmlAttachedProperties(QObject *object); + + QString path() const; + void setPath(const QString &path); + void inheritPath(const QString &path); + void propagatePath(); + void resetPath(); + + QUrl url() const; + +Q_SIGNALS: + void pathChanged(); + +protected: + void attachedParentChange(QQuickAttachedPropertyPropagator *newParent, QQuickAttachedPropertyPropagator *oldParent) override; + +private: + void init(); + + bool m_explicitPath = false; + QString m_path; +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGINESTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginetheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginetheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5d4339ece7828b9708868528b7dc76afc5ac8862 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Imagine/6.8.1/QtQuickControls2Imagine/private/qquickimaginetheme_p.h @@ -0,0 +1,32 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGINETHEME_P_H +#define QQUICKIMAGINETHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; + +class Q_QUICKCONTROLS2IMAGINE_EXPORT QQuickImagineTheme +{ +public: + static void initialize(QQuickTheme *theme); +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGINETHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickanimatednode_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickanimatednode_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3a85a0402becd058c9f08d7b428982b2bd4ee07e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickanimatednode_p.h @@ -0,0 +1,80 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKANIMATEDNODE_P_H +#define QQUICKANIMATEDNODE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickWindow; + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickAnimatedNode : public QObject, public QSGTransformNode +{ + Q_OBJECT + +public: + explicit QQuickAnimatedNode(QQuickItem *target); + + bool isRunning() const; + + int currentTime() const; + void setCurrentTime(int time); + + int duration() const; + void setDuration(int duration); + + enum LoopCount { Infinite = -1 }; + + int loopCount() const; + void setLoopCount(int count); + + virtual void sync(QQuickItem *target); + + QQuickWindow *window() const; + + // must be called from sync() or updatePaintNode() + void start(int duration = 0); + void restart(); + void stop(); + +Q_SIGNALS: + void started(); + void stopped(); + +protected: + virtual void updateCurrentTime(int time); + +private Q_SLOTS: + void advance(); + void update(); + +private: + bool m_running = false; + int m_duration = 0; + int m_loopCount = 1; + int m_currentTime = 0; + int m_currentLoop = 0; + QElapsedTimer m_timer; + QQuickWindow *m_window = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKANIMATEDNODE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickchecklabel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickchecklabel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b7fcfc39d0ff10858e2f81ff9830884814d18bee --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickchecklabel_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCHECKLABEL_P_H +#define QQUICKCHECKLABEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickCheckLabel : public QQuickText +{ + Q_OBJECT + QML_NAMED_ELEMENT(CheckLabel) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickCheckLabel(QQuickItem *parent = nullptr); +}; + +struct QQuickTextForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickText) + QML_ADDED_IN_VERSION(2, 3) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCHECKLABEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickclippedtext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickclippedtext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d79b0a79b95d89363889933ce31f2c16898bfd9c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickclippedtext_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCLIPPEDTEXT_P_H +#define QQUICKCLIPPEDTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickClippedText : public QQuickText +{ + Q_OBJECT + Q_PROPERTY(qreal clipX READ clipX WRITE setClipX FINAL) + Q_PROPERTY(qreal clipY READ clipY WRITE setClipY FINAL) + Q_PROPERTY(qreal clipWidth READ clipWidth WRITE setClipWidth FINAL) + Q_PROPERTY(qreal clipHeight READ clipHeight WRITE setClipHeight FINAL) + QML_NAMED_ELEMENT(ClippedText) + QML_ADDED_IN_VERSION(2, 2) + +public: + explicit QQuickClippedText(QQuickItem *parent = nullptr); + + qreal clipX() const; + void setClipX(qreal x); + + qreal clipY() const; + void setClipY(qreal y); + + qreal clipWidth() const; + void setClipWidth(qreal width); + + qreal clipHeight() const; + void setClipHeight(qreal height); + + QRectF clipRect() const override; + +private: + void markClipDirty(); + + bool m_hasClipWidth = false; + bool m_hasClipHeight = false; + qreal m_clipX = 0; + qreal m_clipY = 0; + qreal m_clipWidth = 0; + qreal m_clipHeight = 0; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCLIPPEDTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolor_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolor_p.h new file mode 100644 index 0000000000000000000000000000000000000000..87549e893078aabfe0e130bee449e1aa8d6e5816 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolor_p.h @@ -0,0 +1,41 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLOR_P_H +#define QQUICKCOLOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickColor : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(Color) + QML_SINGLETON + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickColor(QObject *parent = nullptr); + + Q_INVOKABLE QColor transparent(const QColor &color, qreal opacity) const; + Q_INVOKABLE QColor blend(const QColor &a, const QColor &b, qreal factor) const; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolorimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolorimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2f5ddfdb73eefe111e92bc99faf1237d7fb7d793 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickcolorimage_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORIMAGE_P_H +#define QQUICKCOLORIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickColorImage : public QQuickImage +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor NOTIFY colorChanged FINAL) + Q_PROPERTY(QColor defaultColor READ defaultColor WRITE setDefaultColor RESET resetDefaultColor NOTIFY defaultColorChanged FINAL) + QML_NAMED_ELEMENT(ColorImage) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickColorImage(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + void resetColor(); + + QColor defaultColor() const; + void setDefaultColor(const QColor &color); + void resetDefaultColor(); + +Q_SIGNALS: + void colorChanged(); + void defaultColorChanged(); + +protected: + void pixmapChange() override; + +private: + QColor m_color = Qt::transparent; + QColor m_defaultColor = Qt::transparent; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cc4ec2217638cdd6cc24025297978ac54af9842b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKICONIMAGE_P_H +#define QQUICKICONIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickIconImagePrivate; + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickIconImage : public QQuickImage +{ + Q_OBJECT + Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged FINAL) + QML_NAMED_ELEMENT(IconImage) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickIconImage(QQuickItem *parent = nullptr); + + QString name() const; + void setName(const QString &name); + + QColor color() const; + void setColor(const QColor &color); + + void setSource(const QUrl &url) override; + + void snapPositionTo(QPointF pos); + +Q_SIGNALS: + void nameChanged(); + void colorChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + void pixmapChange() override; + +private: + Q_DISABLE_COPY(QQuickIconImage) + Q_DECLARE_PRIVATE(QQuickIconImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKICONIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..067ee1589bbd9a06da5921af622c737da0a3ff1b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconimage_p_p.h @@ -0,0 +1,45 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKICONIMAGE_P_P_H +#define QQUICKICONIMAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickIconImagePrivate : public QQuickImagePrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickIconImage) + + ~QQuickIconImagePrivate() override; + void updateIcon(); + void updateFillMode(); + qreal calculateDevicePixelRatio() const; + bool updateDevicePixelRatio(qreal targetDevicePixelRatio) override; + + QUrl source; + QColor color = Qt::transparent; + QThemeIconInfo icon; + bool updatingIcon = false; + bool isThemeIcon = false; + bool updatingFillMode = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKICONIMAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f48c9e68fe0f17b43f13bf50d691922c4723f831 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p.h @@ -0,0 +1,107 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKICONLABEL_P_H +#define QQUICKICONLABEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickIconLabelPrivate; + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickIconLabel : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon FINAL) + Q_PROPERTY(QString text READ text WRITE setText FINAL) + Q_PROPERTY(QFont font READ font WRITE setFont FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(Display display READ display WRITE setDisplay FINAL) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing FINAL) + Q_PROPERTY(bool mirrored READ isMirrored WRITE setMirrored FINAL) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment FINAL) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding FINAL) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding FINAL) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding FINAL) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding FINAL) + QML_NAMED_ELEMENT(IconLabel) + QML_ADDED_IN_VERSION(2, 3) + +public: + enum Display { + IconOnly, + TextOnly, + TextBesideIcon, + TextUnderIcon + }; + Q_ENUM(Display) + + explicit QQuickIconLabel(QQuickItem *parent = nullptr); + ~QQuickIconLabel(); + + QQuickIcon icon() const; + void setIcon(const QQuickIcon &icon); + + QString text() const; + void setText(const QString &text); + + QFont font() const; + void setFont(const QFont &font); + + QColor color() const; + void setColor(const QColor &color); + + Display display() const; + void setDisplay(Display display); + + qreal spacing() const; + void setSpacing(qreal spacing); + + bool isMirrored() const; + void setMirrored(bool mirrored); + + Qt::Alignment alignment() const; + void setAlignment(Qt::Alignment alignment); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + +private: + Q_DISABLE_COPY(QQuickIconLabel) + Q_DECLARE_PRIVATE(QQuickIconLabel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKICONLABEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3c7daa41a33ac239253ec6eeb78dd04d13a905d5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickiconlabel_p_p.h @@ -0,0 +1,80 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKICONLABEL_P_P_H +#define QQUICKICONLABEL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickIconImage; +class QQuickMnemonicLabel; + +class Q_AUTOTEST_EXPORT QQuickIconLabelPrivate : public QQuickItemPrivate, public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickIconLabel) + +public: + ~QQuickIconLabelPrivate() override; + + bool hasIcon() const; + bool hasText() const; + + bool createImage(); + bool destroyImage(); + bool updateImage(); + void syncImage(); + void updateOrSyncImage(); + + bool createLabel(); + bool destroyLabel(); + bool updateLabel(); + void syncLabel(); + void updateOrSyncLabel(); + + void updateImplicitSize(); + void layout(); + + void watchChanges(QQuickItem *item); + void unwatchChanges(QQuickItem *item); + void setPositioningDirty(); + + bool isLeftToRight() const; + + void itemImplicitWidthChanged(QQuickItem *) override; + void itemImplicitHeightChanged(QQuickItem *) override; + void itemDestroyed(QQuickItem *item) override; + + bool mirrored = false; + QQuickIconLabel::Display display = QQuickIconLabel::TextBesideIcon; + Qt::Alignment alignment = Qt::AlignCenter; + qreal spacing = 0; + qreal topPadding = 0; + qreal leftPadding = 0; + qreal rightPadding = 0; + qreal bottomPadding = 0; + QFont font; + QColor color; + QString text; + QQuickIcon icon; + QQuickIconImage *image = nullptr; + QQuickMnemonicLabel *label = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKICONLABEL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickimageselector_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickimageselector_p.h new file mode 100644 index 0000000000000000000000000000000000000000..46b2d6962fb7e1a7a8162b4df74790c67f2fe646 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickimageselector_p.h @@ -0,0 +1,121 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGESELECTOR_P_H +#define QQUICKIMAGESELECTOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickImageSelector : public QObject, public QQmlParserStatus, public QQmlPropertyValueInterceptor +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source NOTIFY sourceChanged FINAL) + Q_PROPERTY(QString name READ name WRITE setName FINAL) + Q_PROPERTY(QString path READ path WRITE setPath FINAL) + Q_PROPERTY(QVariantList states READ states WRITE setStates FINAL) + Q_PROPERTY(QString separator READ separator WRITE setSeparator FINAL) + Q_PROPERTY(bool cache READ cache WRITE setCache FINAL) + Q_INTERFACES(QQmlParserStatus QQmlPropertyValueInterceptor) + QML_NAMED_ELEMENT(ImageSelector) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickImageSelector(QObject *parent = nullptr); + + QUrl source() const; + void setSource(const QUrl &source); + + QString name() const; + void setName(const QString &name); + + QString path() const; + void setPath(const QString &path); + + QVariantList states() const; + void setStates(const QVariantList &states); + + QString separator() const; + void setSeparator(const QString &separator); + + bool cache() const; + void setCache(bool cache); + + void write(const QVariant &value) override; + void setTarget(const QQmlProperty &property) override; + +Q_SIGNALS: + void sourceChanged(); + +protected: + void classBegin() override; + void componentComplete() override; + + virtual QStringList fileExtensions() const; + + QString cacheKey() const; + void updateSource(); + void setUrl(const QUrl &url); + bool updateActiveStates(); + int calculateScore(const QStringList &states) const; + +private: + bool m_cache = false; + bool m_complete = false; + QUrl m_source; + QString m_path; + QString m_name; + QString m_separator = QLatin1String("-"); + QVariantList m_allStates; + QStringList m_activeStates; + QQmlProperty m_property; +}; + +class QQuickNinePatchImageSelector : public QQuickImageSelector +{ + Q_OBJECT + QML_NAMED_ELEMENT(NinePatchImageSelector) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickNinePatchImageSelector(QObject *parent = nullptr); + +protected: + QStringList fileExtensions() const override; +}; + +class QQuickAnimatedImageSelector : public QQuickImageSelector +{ + Q_OBJECT + QML_NAMED_ELEMENT(AnimatedImageSelector) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickAnimatedImageSelector(QObject *parent = nullptr); + +protected: + QStringList fileExtensions() const override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGESELECTOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickitemgroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickitemgroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..decfaac84c8e0ed964a31ecf464c14b5d1063742 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickitemgroup_p.h @@ -0,0 +1,50 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMGROUP_P_H +#define QQUICKITEMGROUP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickItemGroup : public QQuickImplicitSizeItem, protected QQuickItemChangeListener +{ + Q_OBJECT + QML_NAMED_ELEMENT(ItemGroup) + QML_ADDED_IN_VERSION(2, 2) + +public: + explicit QQuickItemGroup(QQuickItem *parent = nullptr); + ~QQuickItemGroup(); + +protected: + void watch(QQuickItem *item); + void unwatch(QQuickItem *item); + + QSizeF calculateImplicitSize() const; + void updateImplicitSize(); + + void itemChange(ItemChange change, const ItemChangeData &data) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMGROUP_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickmnemoniclabel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickmnemoniclabel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..055a57d32ec8458a634e49a750c7d536a90c4cdc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickmnemoniclabel_p.h @@ -0,0 +1,49 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMNEMONICLABEL_P_H +#define QQUICKMNEMONICLABEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickMnemonicLabel : public QQuickText +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText FINAL) + Q_PROPERTY(bool mnemonicVisible READ isMnemonicVisible WRITE setMnemonicVisible FINAL) + QML_NAMED_ELEMENT(MnemonicLabel) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickMnemonicLabel(QQuickItem *parent = nullptr); + + QString text() const; + void setText(const QString &text); + + bool isMnemonicVisible() const; + void setMnemonicVisible(bool visible); + +private: + void updateMnemonic(); + + bool m_mnemonicVisible = true; + QString m_fullText; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMNEMONICLABEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickninepatchimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickninepatchimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e0e60906e23bc6d1f8712c5a557cb08eeaccf826 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickninepatchimage_p.h @@ -0,0 +1,73 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKNINEPATCHIMAGE_P_H +#define QQUICKNINEPATCHIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickNinePatchImagePrivate; + +class QQuickNinePatchImage : public QQuickImage +{ + Q_OBJECT + Q_PROPERTY(qreal topPadding READ topPadding NOTIFY topPaddingChanged FINAL) + Q_PROPERTY(qreal leftPadding READ leftPadding NOTIFY leftPaddingChanged FINAL) + Q_PROPERTY(qreal rightPadding READ rightPadding NOTIFY rightPaddingChanged FINAL) + Q_PROPERTY(qreal bottomPadding READ bottomPadding NOTIFY bottomPaddingChanged FINAL) + Q_PROPERTY(qreal topInset READ topInset NOTIFY topInsetChanged FINAL) + Q_PROPERTY(qreal leftInset READ leftInset NOTIFY leftInsetChanged FINAL) + Q_PROPERTY(qreal rightInset READ rightInset NOTIFY rightInsetChanged FINAL) + Q_PROPERTY(qreal bottomInset READ bottomInset NOTIFY bottomInsetChanged FINAL) + QML_NAMED_ELEMENT(NinePatchImage) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickNinePatchImage(QQuickItem *parent = nullptr); + + qreal topPadding() const; + qreal leftPadding() const; + qreal rightPadding() const; + qreal bottomPadding() const; + + qreal topInset() const; + qreal leftInset() const; + qreal rightInset() const; + qreal bottomInset() const; + +Q_SIGNALS: + void topPaddingChanged(); + void leftPaddingChanged(); + void rightPaddingChanged(); + void bottomPaddingChanged(); + + void topInsetChanged(); + void leftInsetChanged(); + void rightInsetChanged(); + void bottomInsetChanged(); + +protected: + void pixmapChange() override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override; + +private: + Q_DISABLE_COPY(QQuickNinePatchImage) + Q_DECLARE_PRIVATE(QQuickNinePatchImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKNINEPATCHIMAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickpaddedrectangle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickpaddedrectangle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9edc86016a458be6c7d5a58ce5d650ef16de8ffd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickpaddedrectangle_p.h @@ -0,0 +1,86 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPADDEDRECTANGLE_P_H +#define QQUICKPADDEDRECTANGLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickPaddedRectangle : public QQuickRectangle +{ + Q_OBJECT + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged FINAL) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged FINAL) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged FINAL) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged FINAL) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL) + QML_NAMED_ELEMENT(PaddedRectangle) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickPaddedRectangle(QQuickItem *parent = nullptr); + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + +Q_SIGNALS: + void paddingChanged(); + void topPaddingChanged(); + void leftPaddingChanged(); + void rightPaddingChanged(); + void bottomPaddingChanged(); + +protected: + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + +private: + void setTopPadding(qreal padding, bool has); + void setLeftPadding(qreal padding, bool has); + void setRightPadding(qreal padding, bool has); + void setBottomPadding(qreal padding, bool has); + + qreal m_padding = 0; + qreal m_topPadding = 0; + qreal m_leftPadding = 0; + qreal m_rightPadding = 0; + qreal m_bottomPadding = 0; + bool m_hasTopPadding = false; + bool m_hasLeftPadding = false; + bool m_hasRightPadding = false; + bool m_hasBottomPadding = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPADDEDRECTANGLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplaceholdertext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplaceholdertext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b0904962aec3b44e5382a43dffc9e94a549b23d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplaceholdertext_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLACEHOLDERTEXT_P_H +#define QQUICKPLACEHOLDERTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickPlaceholderText : public QQuickText +{ + Q_OBJECT + QML_NAMED_ELEMENT(PlaceholderText) + QML_ADDED_IN_VERSION(2, 2) + +public: + explicit QQuickPlaceholderText(QQuickItem *parent = nullptr); + +protected: + void componentComplete() override; + + QQuickItem *textControl() const; + +private Q_SLOTS: + void updateAlignment(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLACEHOLDERTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplatformtheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplatformtheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5757429a483205221c83329dcbfaffeb07c21a41 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquickplatformtheme_p.h @@ -0,0 +1,45 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMTHEME_P_H +#define QQUICKPLATFORMTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickPlatformTheme : public QObject +{ + Q_OBJECT + // This exposes the enums in QPlatformTheme to QML. We can't use QML_EXTENDED + // because it's not possible to extend a QGadget (QPlatformTheme) with an QObject (us). + QML_EXTENDED_NAMESPACE(QPlatformTheme) + QML_NAMED_ELEMENT(PlatformTheme) + QML_SINGLETON + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickPlatformTheme(QObject *parent = nullptr); + + Q_INVOKABLE QVariant themeHint(QPlatformTheme::ThemeHint themeHint) const; + + static QVariant getThemeHint(QPlatformTheme::ThemeHint themeHint); +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquicktumblerview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquicktumblerview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4a381ae6ba718db79aa56288650c55a4e436fd90 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qquicktumblerview_p.h @@ -0,0 +1,78 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTUMBLERVIEW_P_H +#define QQUICKTUMBLERVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickListView; +class QQuickPath; +class QQuickPathView; + +class QQuickTumbler; + +class Q_QUICKCONTROLS2IMPL_EXPORT QQuickTumblerView : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged) + QML_NAMED_ELEMENT(TumblerView) + QML_ADDED_IN_VERSION(2, 1) + +public: + QQuickTumblerView(QQuickItem *parent = nullptr); + + QVariant model() const; + void setModel(const QVariant &model); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + QQuickPath *path() const; + void setPath(QQuickPath *path); + +Q_SIGNALS: + void modelChanged(); + void delegateChanged(); + void pathChanged(); + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &data) override; + +private: + QQuickItem *view(); + void createView(); + void updateView(); + void updateModel(); + + void wrapChange(); + + QQuickTumbler *m_tumbler = nullptr; + QVariant m_model; + QQmlComponent *m_delegate = nullptr; + QQuickPathView *m_pathView = nullptr; + QQuickListView *m_listView = nullptr; + QQuickPath *m_path = nullptr; +}; + +QT_END_NAMESPACE + +#endif // TUMBLERVIEW_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3b5a795b21abe8005f8628b2e9a127052b132841 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Impl/6.8.1/QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKCONTROLS2IMPLGLOBAL_H +#define QTQUICKCONTROLS2IMPLGLOBAL_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#endif // QTQUICKCONTROLS2IMPLGLOBAL_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1552a28606f028d631c3e678184d5a99518fc15a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialstyle_p.h @@ -0,0 +1,366 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALSTYLE_P_H +#define QQUICKMATERIALSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKCONTROLS2MATERIAL_EXPORT QQuickMaterialStyle : public QQuickAttachedPropertyPropagator +{ + Q_OBJECT + Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL) + Q_PROPERTY(QVariant primary READ primary WRITE setPrimary RESET resetPrimary NOTIFY primaryChanged FINAL) + Q_PROPERTY(QVariant accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged FINAL) + Q_PROPERTY(QVariant foreground READ foreground WRITE setForeground RESET resetForeground NOTIFY foregroundChanged FINAL) + Q_PROPERTY(QVariant background READ background WRITE setBackground RESET resetBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(int elevation READ elevation WRITE setElevation RESET resetElevation NOTIFY elevationChanged FINAL) + Q_PROPERTY(RoundedScale roundedScale READ roundedScale WRITE setRoundedScale RESET resetRoundedScale + NOTIFY roundedScaleChanged FINAL) + Q_PROPERTY(ContainerStyle containerStyle READ containerStyle WRITE setContainerStyle RESET resetContainerStyle + NOTIFY containerStyleChanged FINAL) + + Q_PROPERTY(QColor primaryColor READ primaryColor NOTIFY primaryChanged FINAL) // TODO: remove? + Q_PROPERTY(QColor accentColor READ accentColor NOTIFY accentChanged FINAL) // TODO: remove? + Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor primaryHighlightedTextColor READ primaryHighlightedTextColor NOTIFY primaryHighlightedTextColorChanged FINAL) + Q_PROPERTY(QColor secondaryTextColor READ secondaryTextColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor hintTextColor READ hintTextColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor textSelectionColor READ textSelectionColor NOTIFY themeOrAccentChanged FINAL) + Q_PROPERTY(QColor dropShadowColor READ dropShadowColor CONSTANT FINAL) + Q_PROPERTY(QColor dividerColor READ dividerColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor iconColor READ iconColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor iconDisabledColor READ iconDisabledColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor frameColor READ frameColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor rippleColor READ rippleColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor highlightedRippleColor READ highlightedRippleColor NOTIFY themeOrAccentChanged FINAL) + Q_PROPERTY(QColor switchUncheckedTrackColor READ switchUncheckedTrackColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchCheckedTrackColor READ switchCheckedTrackColor NOTIFY themeOrAccentChanged FINAL) + Q_PROPERTY(QColor switchUncheckedHandleColor READ switchUncheckedHandleColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchUncheckedHoveredHandleColor READ switchUncheckedHoveredHandleColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledUncheckedTrackColor READ switchDisabledUncheckedTrackColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledCheckedTrackColor READ switchDisabledCheckedTrackColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledUncheckedTrackBorderColor READ switchDisabledUncheckedTrackBorderColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchCheckedHandleColor READ switchCheckedHandleColor NOTIFY themeOrAccentChanged FINAL) + Q_PROPERTY(QColor switchDisabledUncheckedHandleColor READ switchDisabledUncheckedHandleColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledCheckedHandleColor READ switchDisabledCheckedHandleColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledCheckedIconColor READ switchDisabledCheckedIconColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor switchDisabledUncheckedIconColor READ switchDisabledUncheckedIconColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor scrollBarColor READ scrollBarColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor scrollBarHoveredColor READ scrollBarHoveredColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor scrollBarPressedColor READ scrollBarPressedColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor dialogColor READ dialogColor NOTIFY dialogColorChanged FINAL) + Q_PROPERTY(QColor backgroundDimColor READ backgroundDimColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor listHighlightColor READ listHighlightColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor tooltipColor READ tooltipColor NOTIFY tooltipColorChanged FINAL) + Q_PROPERTY(QColor toolBarColor READ toolBarColor NOTIFY toolBarColorChanged FINAL) + Q_PROPERTY(QColor toolTextColor READ toolTextColor NOTIFY toolTextColorChanged FINAL) + Q_PROPERTY(QColor spinBoxDisabledIconColor READ spinBoxDisabledIconColor NOTIFY themeChanged FINAL) + Q_PROPERTY(QColor sliderDisabledColor READ sliderDisabledColor NOTIFY themeChanged FINAL REVISION(2, 15)) + Q_PROPERTY(QColor textFieldFilledContainerColor READ textFieldFilledContainerColor NOTIFY themeChanged FINAL) + + Q_PROPERTY(int touchTarget READ touchTarget CONSTANT FINAL) + Q_PROPERTY(int buttonVerticalPadding READ buttonVerticalPadding CONSTANT FINAL) + Q_PROPERTY(int buttonHeight READ buttonHeight CONSTANT FINAL) + Q_PROPERTY(int delegateHeight READ delegateHeight CONSTANT FINAL) + Q_PROPERTY(int dialogButtonBoxHeight READ dialogButtonBoxHeight CONSTANT FINAL) + Q_PROPERTY(int dialogTitleFontPixelSize READ dialogTitleFontPixelSize CONSTANT FINAL) + Q_PROPERTY(RoundedScale dialogRoundedScale READ dialogRoundedScale CONSTANT FINAL) + Q_PROPERTY(int frameVerticalPadding READ frameVerticalPadding CONSTANT FINAL) + Q_PROPERTY(int menuItemHeight READ menuItemHeight CONSTANT FINAL) + Q_PROPERTY(int menuItemVerticalPadding READ menuItemVerticalPadding CONSTANT FINAL) + Q_PROPERTY(int switchIndicatorWidth READ switchIndicatorWidth CONSTANT FINAL) + Q_PROPERTY(int switchIndicatorHeight READ switchIndicatorHeight CONSTANT FINAL) + Q_PROPERTY(int switchNormalHandleHeight READ switchNormalHandleHeight CONSTANT FINAL) + Q_PROPERTY(int switchCheckedHandleHeight READ switchCheckedHandleHeight CONSTANT FINAL) + Q_PROPERTY(int switchLargestHandleHeight READ switchLargestHandleHeight CONSTANT FINAL) + Q_PROPERTY(int switchDelegateVerticalPadding READ switchDelegateVerticalPadding CONSTANT FINAL) + Q_PROPERTY(int textFieldHeight READ textFieldHeight CONSTANT FINAL) + Q_PROPERTY(int textFieldHorizontalPadding READ textFieldHorizontalPadding CONSTANT FINAL) + Q_PROPERTY(int textFieldVerticalPadding READ textFieldVerticalPadding CONSTANT FINAL) + Q_PROPERTY(int tooltipHeight READ tooltipHeight CONSTANT FINAL) + + QML_NAMED_ELEMENT(Material) + QML_ATTACHED(QQuickMaterialStyle) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 0) + +public: + enum Theme { + Light, + Dark, + System + }; + + enum Variant { + Normal, + Dense + }; + + enum Color { + Red, + Pink, + Purple, + DeepPurple, + Indigo, + Blue, + LightBlue, + Cyan, + Teal, + Green, + LightGreen, + Lime, + Yellow, + Amber, + Orange, + DeepOrange, + Brown, + Grey, + BlueGrey + }; + + enum Shade { + Shade50, + Shade100, + Shade200, + Shade300, + Shade400, + Shade500, + Shade600, + Shade700, + Shade800, + Shade900, + ShadeA100, + ShadeA200, + ShadeA400, + ShadeA700, + }; + + enum class RoundedScale { + NotRounded, + ExtraSmallScale = 4, + SmallScale = 8, + MediumScale = 12, + LargeScale = 16, + ExtraLargeScale = 28, + FullScale = 0xFF // For full we use half the height of the item. + }; + + enum class ContainerStyle { + Filled, + Outlined + }; + + Q_ENUM(Theme) + Q_ENUM(Variant) + Q_ENUM(Color) + Q_ENUM(Shade) + Q_ENUM(RoundedScale) + Q_ENUM(ContainerStyle) + + explicit QQuickMaterialStyle(QObject *parent = nullptr); + + static QQuickMaterialStyle *qmlAttachedProperties(QObject *object); + + Theme theme() const; + void setTheme(Theme theme); + void inheritTheme(Theme theme); + void propagateTheme(); + void resetTheme(); + void themeChange(); + + QVariant primary() const; + void setPrimary(const QVariant &accent); + void inheritPrimary(uint primary, bool custom); + void propagatePrimary(); + void resetPrimary(); + void primaryChange(); + + QVariant accent() const; + void setAccent(const QVariant &accent); + void inheritAccent(uint accent, bool custom); + void propagateAccent(); + void resetAccent(); + void accentChange(); + + QVariant foreground() const; + void setForeground(const QVariant &foreground); + void inheritForeground(uint foreground, bool custom, bool has); + void propagateForeground(); + void resetForeground(); + void foregroundChange(); + + QVariant background() const; + void setBackground(const QVariant &background); + void inheritBackground(uint background, bool custom, bool has); + void propagateBackground(); + void resetBackground(); + void backgroundChange(); + + int elevation() const; + void setElevation(int elevation); + void resetElevation(); + void elevationChange(); + + RoundedScale roundedScale() const; + void setRoundedScale(RoundedScale roundedScale); + void resetRoundedScale(); + + ContainerStyle containerStyle() const; + void setContainerStyle(ContainerStyle containerStyle); + void resetContainerStyle(); + + QColor primaryColor() const; + QColor accentColor() const; + QColor backgroundColor() const; + QColor primaryTextColor() const; + QColor primaryHighlightedTextColor() const; + QColor secondaryTextColor() const; + QColor hintTextColor() const; + QColor textSelectionColor() const; + QColor dropShadowColor() const; + QColor dividerColor() const; + QColor iconColor() const; + QColor iconDisabledColor() const; + Q_INVOKABLE QColor buttonColor(Theme theme, const QVariant &background, const QVariant &accent, + bool enabled, bool flat, bool highlighted, bool checked) const; + QColor frameColor() const; + QColor rippleColor() const; + QColor highlightedRippleColor() const; + QColor switchUncheckedTrackColor() const; + QColor switchCheckedTrackColor() const; + QColor switchDisabledUncheckedTrackColor() const; + QColor switchDisabledCheckedTrackColor() const; + QColor switchDisabledUncheckedTrackBorderColor() const; + QColor switchUncheckedHandleColor() const; + QColor switchUncheckedHoveredHandleColor() const; + QColor switchCheckedHandleColor() const; + QColor switchDisabledUncheckedHandleColor() const; + QColor switchDisabledCheckedHandleColor() const; + QColor switchDisabledCheckedIconColor() const; + QColor switchDisabledUncheckedIconColor() const; + QColor scrollBarColor() const; + QColor scrollBarHoveredColor() const; + QColor scrollBarPressedColor() const; + QColor dialogColor() const; + QColor backgroundDimColor() const; + QColor listHighlightColor() const; + QColor tooltipColor() const; + QColor toolBarColor() const; + QColor toolTextColor() const; + QColor spinBoxDisabledIconColor() const; + QColor sliderDisabledColor() const; + QColor textFieldFilledContainerColor() const; + + Q_INVOKABLE QColor color(Color color, Shade shade = Shade500) const; + Q_INVOKABLE QColor shade(const QColor &color, Shade shade) const; + + int touchTarget() const; + int buttonVerticalPadding() const; + Q_INVOKABLE int buttonLeftPadding(bool flat, bool hasIcon) const; + Q_INVOKABLE int buttonRightPadding(bool flat, bool hasIcon, bool hasText) const; + int buttonHeight() const; + int delegateHeight() const; + int dialogButtonBoxHeight() const; + int dialogTitleFontPixelSize() const; + RoundedScale dialogRoundedScale() const; + int frameVerticalPadding() const; + int menuItemHeight() const; + int menuItemVerticalPadding() const; + int switchIndicatorWidth() const; + int switchIndicatorHeight() const; + int switchNormalHandleHeight() const; + int switchCheckedHandleHeight() const; + int switchLargestHandleHeight() const; + int switchDelegateVerticalPadding() const; + int textFieldHeight() const; + int textFieldHorizontalPadding() const; + int textFieldVerticalPadding() const; + int tooltipHeight() const; + + static void initGlobals(); + + static Variant variant(); + +Q_SIGNALS: + void themeChanged(); + void primaryChanged(); + void accentChanged(); + void foregroundChanged(); + void backgroundChanged(); + void elevationChanged(); + + void themeOrAccentChanged(); + + void primaryHighlightedTextColorChanged(); + void dialogColorChanged(); + void tooltipColorChanged(); + void toolBarColorChanged(); + void toolTextColorChanged(); + void roundedScaleChanged(); + void containerStyleChanged(); + +protected: + void attachedParentChange(QQuickAttachedPropertyPropagator *newParent, QQuickAttachedPropertyPropagator *oldParent) override; + +private: + void init(); + bool variantToRgba(const QVariant &var, const char *name, QRgb *rgba, bool *custom) const; + + QColor backgroundColor(Shade shade) const; + QColor accentColor(Shade shade) const; + + Shade themeShade() const; + + // These reflect whether a color value was explicitly set on the specific + // item that this attached style object represents. + bool m_explicitTheme = false; + bool m_explicitPrimary = false; + bool m_explicitAccent = false; + bool m_explicitForeground = false; + bool m_explicitBackground = false; + // These reflect whether the color value that was either inherited or + // explicitly set is in the form that QColor expects, rather than one of + // our pre-defined color enum values. + bool m_customPrimary = false; + bool m_customAccent = false; + bool m_customForeground = false; + bool m_customBackground = false; + // These will be true when this item has an explicit or inherited foreground/background + // color, or these colors were declared globally via settings (e.g. conf or env vars). + // Some color properties of the style will return different values depending on whether + // or not these are set. + bool m_hasForeground = false; + bool m_hasBackground = false; + // The actual values for this item, whether explicit, inherited or globally set. + bool m_systemTheme = false; + Theme m_theme = Light; + uint m_primary = 0; + uint m_accent = 0; + uint m_foreground = 0; + uint m_background = 0; + int m_elevation = 0; + RoundedScale m_roundedScale = RoundedScale::NotRounded; + ContainerStyle m_containerStyle = ContainerStyle::Filled; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialtheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialtheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..963c231718d3a2690ddb53923f00990d103c17cb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Material/6.8.1/QtQuickControls2Material/private/qquickmaterialtheme_p.h @@ -0,0 +1,36 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALTHEME_P_H +#define QQUICKMATERIALTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; +class QQuickMaterialStyle; + +class Q_QUICKCONTROLS2MATERIAL_EXPORT QQuickMaterialTheme +{ +public: + static void initialize(QQuickTheme *theme); + static void registerSystemStyle(QQuickMaterialStyle *style); + static void unregisterSystemStyle(QQuickMaterialStyle *style); + static void updateTheme(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialbusyindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialbusyindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..711b3f4ce5a2813898d12548b48046df5bd6d5d1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialbusyindicator_p.h @@ -0,0 +1,55 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALBUSYINDICATOR_P_H +#define QQUICKMATERIALBUSYINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMaterialBusyIndicator : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(bool running READ isRunning WRITE setRunning FINAL) + QML_NAMED_ELEMENT(BusyIndicatorImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickMaterialBusyIndicator(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + + bool isRunning() const; + void setRunning(bool running); + + int elapsed() const; + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + bool m_running = false; + int m_elapsed = 0; + QColor m_color = Qt::black; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALBUSYINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialplaceholdertext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialplaceholdertext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9d409df624a84b2a34cb5038c38d37a5722dc236 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialplaceholdertext_p.h @@ -0,0 +1,105 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALPLACEHOLDERTEXT_P_H +#define QQUICKMATERIALPLACEHOLDERTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QParallelAnimationGroup; + +class QQuickMaterialPlaceholderText : public QQuickPlaceholderText +{ + Q_OBJECT + Q_PROPERTY(bool filled READ isFilled WRITE setFilled NOTIFY filledChanged FINAL) + Q_PROPERTY(bool controlHasActiveFocus READ controlHasActiveFocus + WRITE setControlHasActiveFocus NOTIFY controlHasActiveFocusChanged FINAL) + Q_PROPERTY(bool controlHasText READ controlHasText WRITE setControlHasText NOTIFY controlHasTextChanged FINAL) + Q_PROPERTY(int largestHeight READ largestHeight NOTIFY largestHeightChanged FINAL) + Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding NOTIFY verticalPaddingChanged FINAL) + Q_PROPERTY(qreal controlImplicitBackgroundHeight READ controlImplicitBackgroundHeight + WRITE setControlImplicitBackgroundHeight NOTIFY controlImplicitBackgroundHeightChanged FINAL) + Q_PROPERTY(qreal controlHeight READ controlHeight WRITE setControlHeight FINAL) + QML_NAMED_ELEMENT(FloatingPlaceholderText) + QML_ADDED_IN_VERSION(6, 5) + +public: + explicit QQuickMaterialPlaceholderText(QQuickItem *parent = nullptr); + + bool isFilled() const; + void setFilled(bool filled); + + int largestHeight() const; + + bool controlHasActiveFocus() const; + void setControlHasActiveFocus(bool controlHasActiveFocus); + + bool controlHasText() const; + void setControlHasText(bool controlHasText); + + qreal controlImplicitBackgroundHeight() const; + void setControlImplicitBackgroundHeight(qreal controlImplicitBackgroundHeight); + + qreal controlHeight() const; + void setControlHeight(qreal controlHeight); + + qreal verticalPadding() const; + void setVerticalPadding(qreal verticalPadding); + +signals: + void filledChanged(); + void largestHeightChanged(); + void controlHasActiveFocusChanged(); + void controlHasTextChanged(); + void controlImplicitBackgroundHeightChanged(); + void verticalPaddingChanged(); + +private slots: + void adjustTransformOrigin(); + +private: + bool shouldFloat() const; + bool shouldAnimate() const; + + void updateY(); + qreal normalTargetY() const; + qreal floatingTargetY() const; + + void controlGotActiveFocus(); + void controlLostActiveFocus(); + + void maybeSetFocusAnimationProgress(); + + void componentComplete() override; + + bool m_filled = false; + bool m_controlHasActiveFocus = false; + bool m_controlHasText = false; + int m_largestHeight = 0; + qreal m_verticalPadding = 0; + qreal m_controlImplicitBackgroundHeight = 0; + qreal m_controlHeight = 0; + QPointer m_focusInAnimation; + QPointer m_focusOutAnimation; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALPLACEHOLDERTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialprogressbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialprogressbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..928d752f15abfa139a64a4592f25780385fbc8cf --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialprogressbar_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALPROGRESSBAR_P_H +#define QQUICKMATERIALPROGRESSBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMaterialProgressBar : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL) + Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL) + QML_NAMED_ELEMENT(ProgressBarImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickMaterialProgressBar(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + + qreal progress() const; + void setProgress(qreal progress); + + bool isIndeterminate() const; + void setIndeterminate(bool indeterminate); + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + QColor m_color = Qt::black; + qreal m_progress = 0.0; + bool m_indeterminate = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALPROGRESSBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialripple_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialripple_p.h new file mode 100644 index 0000000000000000000000000000000000000000..888a080cdf37b31f58527e9f938f669d88ea2964 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialripple_p.h @@ -0,0 +1,86 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALRIPPLE_P_H +#define QQUICKMATERIALRIPPLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMaterialRipple : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(qreal clipRadius READ clipRadius WRITE setClipRadius FINAL) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed FINAL) + Q_PROPERTY(bool active READ isActive WRITE setActive FINAL) + Q_PROPERTY(QQuickItem *anchor READ anchor WRITE setAnchor FINAL) + Q_PROPERTY(Trigger trigger READ trigger WRITE setTrigger FINAL) + QML_NAMED_ELEMENT(Ripple) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickMaterialRipple(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + + qreal clipRadius() const; + void setClipRadius(qreal radius); + + bool isActive() const; + void setActive(bool active); + + bool isPressed() const; + void setPressed(bool pressed); + + enum Trigger { Press, Release }; + Q_ENUM (Trigger) + + Trigger trigger() const; + void setTrigger(Trigger trigger); + + QPointF anchorPoint() const; + + QQuickItem *anchor() const; + void setAnchor(QQuickItem *anchor); + + qreal diameter() const; + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + void timerEvent(QTimerEvent *event) override; + + void prepareWave(); + void enterWave(); + void exitWave(); + +private: + bool m_active = false; + bool m_pressed = false; + int m_waves = 0; + int m_enterDelay = 0; + Trigger m_trigger = Press; + qreal m_clipRadius = 0.0; + QColor m_color; + QQuickItem *m_anchor = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALRIPPLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialtextcontainer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialtextcontainer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..09a5ec270f29d87130824cbde464324f44d23df6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2MaterialStyleImpl/6.8.1/QtQuickControls2MaterialStyleImpl/private/qquickmaterialtextcontainer_p.h @@ -0,0 +1,122 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMATERIALTEXTCONTAINER_P_H +#define QQUICKMATERIALTEXTCONTAINER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMaterialTextContainer : public QQuickPaintedItem +{ + Q_OBJECT + Q_PROPERTY(bool filled READ isFilled WRITE setFilled FINAL) + Q_PROPERTY(bool controlHasActiveFocus READ controlHasActiveFocus + WRITE setControlHasActiveFocus NOTIFY controlHasActiveFocusChanged FINAL) + Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor FINAL) + Q_PROPERTY(QColor outlineColor READ outlineColor WRITE setOutlineColor FINAL) + Q_PROPERTY(QColor focusedOutlineColor READ focusedOutlineColor WRITE setFocusedOutlineColor FINAL) + Q_PROPERTY(qreal focusAnimationProgress READ focusAnimationProgress WRITE setFocusAnimationProgress FINAL) + Q_PROPERTY(qreal placeholderTextWidth READ placeholderTextWidth WRITE setPlaceholderTextWidth FINAL) + Q_PROPERTY(PlaceHolderHAlignment placeholderTextHAlign READ placeholderTextHAlign WRITE setPlaceholderTextHAlign FINAL) + Q_PROPERTY(bool controlHasText READ controlHasText WRITE setControlHasText NOTIFY controlHasTextChanged FINAL) + Q_PROPERTY(bool placeholderHasText READ placeholderHasText WRITE setPlaceholderHasText NOTIFY placeholderHasTextChanged FINAL) + Q_PROPERTY(int horizontalPadding READ horizontalPadding WRITE setHorizontalPadding NOTIFY horizontalPaddingChanged FINAL) + QML_NAMED_ELEMENT(MaterialTextContainer) + QML_ADDED_IN_VERSION(6, 5) + +public: + explicit QQuickMaterialTextContainer(QQuickItem *parent = nullptr); + + enum PlaceHolderHAlignment { + AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify + }; + Q_ENUM(PlaceHolderHAlignment) + + bool isFilled() const; + void setFilled(bool filled); + + QColor fillColor() const; + void setFillColor(const QColor &fillColor); + + QColor outlineColor() const; + void setOutlineColor(const QColor &outlineColor); + + QColor focusedOutlineColor() const; + void setFocusedOutlineColor(const QColor &focusedOutlineColor); + + qreal focusAnimationProgress() const; + void setFocusAnimationProgress(qreal progress); + + qreal placeholderTextWidth() const; + void setPlaceholderTextWidth(qreal placeholderTextWidth); + + bool controlHasActiveFocus() const; + void setControlHasActiveFocus(bool controlHasActiveFocus); + + bool controlHasText() const; + void setControlHasText(bool controlHasText); + + bool placeholderHasText() const; + void setPlaceholderHasText(bool placeholderHasText); + + int horizontalPadding() const; + void setHorizontalPadding(int horizontalPadding); + + void paint(QPainter *painter) override; + + PlaceHolderHAlignment placeholderTextHAlign() const; + void setPlaceholderTextHAlign(PlaceHolderHAlignment placeHolderTextHAlign); + +signals: + void animateChanged(); + void controlHasActiveFocusChanged(); + void controlHasTextChanged(); + void placeholderHasTextChanged(); + void horizontalPaddingChanged(); + +private: + bool shouldAnimateOutline() const; + + QQuickItem *textControl() const; + void controlGotActiveFocus(); + void controlLostActiveFocus(); + void startFocusAnimation(); + + void maybeSetFocusAnimationProgress(); + + void componentComplete() override; + + QColor m_fillColor; + QColor m_outlineColor; + QColor m_focusedOutlineColor; + qreal m_focusAnimationProgress = 0; + qreal m_placeholderTextWidth = 0; + bool m_filled = false; + bool m_controlHasActiveFocus = false; + bool m_controlHasText = false; + bool m_placeholderHasText = false; + int m_horizontalPadding = 0; + PlaceHolderHAlignment m_placeholderTextHAlign; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMATERIALTEXTCONTAINER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversalstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversalstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3251d570562c9c832491a1d273f1d719b2bf06d0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversalstyle_p.h @@ -0,0 +1,214 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKUNIVERSALSTYLE_P_H +#define QQUICKUNIVERSALSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickUniversalStylePrivate; + +class Q_QUICKCONTROLS2UNIVERSAL_EXPORT QQuickUniversalStyle : public QQuickAttachedPropertyPropagator +{ + Q_OBJECT + Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL) + Q_PROPERTY(QVariant accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged FINAL) + Q_PROPERTY(QVariant foreground READ foreground WRITE setForeground RESET resetForeground NOTIFY foregroundChanged FINAL) + Q_PROPERTY(QVariant background READ background WRITE setBackground RESET resetBackground NOTIFY backgroundChanged FINAL) + + Q_PROPERTY(QColor altHighColor READ altHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor altLowColor READ altLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor altMediumColor READ altMediumColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor altMediumHighColor READ altMediumHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor altMediumLowColor READ altMediumLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor baseHighColor READ baseHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor baseLowColor READ baseLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor baseMediumColor READ baseMediumColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor baseMediumHighColor READ baseMediumHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor baseMediumLowColor READ baseMediumLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeAltLowColor READ chromeAltLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeBlackHighColor READ chromeBlackHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeBlackLowColor READ chromeBlackLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeBlackMediumLowColor READ chromeBlackMediumLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeBlackMediumColor READ chromeBlackMediumColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeDisabledHighColor READ chromeDisabledHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeDisabledLowColor READ chromeDisabledLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeHighColor READ chromeHighColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeLowColor READ chromeLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeMediumColor READ chromeMediumColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeMediumLowColor READ chromeMediumLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor chromeWhiteColor READ chromeWhiteColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor listLowColor READ listLowColor NOTIFY paletteChanged FINAL) + Q_PROPERTY(QColor listMediumColor READ listMediumColor NOTIFY paletteChanged FINAL) + + QML_NAMED_ELEMENT(Universal) + QML_ATTACHED(QQuickUniversalStyle) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickUniversalStyle(QObject *parent = nullptr); + + static QQuickUniversalStyle *qmlAttachedProperties(QObject *object); + + enum Theme { Light, Dark, System }; + Q_ENUM(Theme) + + Theme theme() const; + void setTheme(Theme theme); + void inheritTheme(Theme theme); + void propagateTheme(); + void resetTheme(); + + enum Color { + Lime, + Green, + Emerald, + Teal, + Cyan, + Cobalt, + Indigo, + Violet, + Pink, + Magenta, + Crimson, + Red, + Orange, + Amber, + Yellow, + Brown, + Olive, + Steel, + Mauve, + Taupe + }; + Q_ENUM(Color) + + QVariant accent() const; + void setAccent(const QVariant &accent); + void inheritAccent(QRgb accent); + void propagateAccent(); + void resetAccent(); + + QVariant foreground() const; + void setForeground(const QVariant &foreground); + void inheritForeground(QRgb foreground, bool has); + void propagateForeground(); + void resetForeground(); + + QVariant background() const; + void setBackground(const QVariant &background); + void inheritBackground(QRgb background, bool has); + void propagateBackground(); + void resetBackground(); + + Q_INVOKABLE QColor color(Color color) const; + + QColor altHighColor() const; + QColor altLowColor() const; + QColor altMediumColor() const; + QColor altMediumHighColor() const; + QColor altMediumLowColor() const; + QColor baseHighColor() const; + QColor baseLowColor() const; + QColor baseMediumColor() const; + QColor baseMediumHighColor() const; + QColor baseMediumLowColor() const; + QColor chromeAltLowColor() const; + QColor chromeBlackHighColor() const; + QColor chromeBlackLowColor() const; + QColor chromeBlackMediumLowColor() const; + QColor chromeBlackMediumColor() const; + QColor chromeDisabledHighColor() const; + QColor chromeDisabledLowColor() const; + QColor chromeHighColor() const; + QColor chromeLowColor() const; + QColor chromeMediumColor() const; + QColor chromeMediumLowColor() const; + QColor chromeWhiteColor() const; + QColor listLowColor() const; + QColor listMediumColor() const; + + enum SystemColor { + AltHigh, + AltLow, + AltMedium, + AltMediumHigh, + AltMediumLow, + BaseHigh, + BaseLow, + BaseMedium, + BaseMediumHigh, + BaseMediumLow, + ChromeAltLow, + ChromeBlackHigh, + ChromeBlackLow, + ChromeBlackMediumLow, + ChromeBlackMedium, + ChromeDisabledHigh, + ChromeDisabledLow, + ChromeHigh, + ChromeLow, + ChromeMedium, + ChromeMediumLow, + ChromeWhite, + ListLow, + ListMedium + }; + + QColor systemColor(SystemColor role) const; + + static void initGlobals(); + +Q_SIGNALS: + void themeChanged(); + void accentChanged(); + void foregroundChanged(); + void backgroundChanged(); + void paletteChanged(); + +protected: + void attachedParentChange(QQuickAttachedPropertyPropagator *newParent, QQuickAttachedPropertyPropagator *oldParent) override; + +private: + bool variantToRgba(const QVariant &var, const char *name, QRgb *rgba) const; + + // These reflect whether a color value was explicitly set on the specific + // item that this attached style object represents. + bool m_explicitTheme = false; + bool m_explicitAccent = false; + bool m_explicitForeground = false; + bool m_explicitBackground = false; + // These will be true when this item has an explicit or inherited foreground/background + // color, or these colors were declared globally via settings (e.g. conf or env vars). + // Some color properties of the style will return different values depending on whether + // or not these are set. + bool m_hasForeground = false; + bool m_hasBackground = false; + bool m_usingSystemTheme = false; + // The actual values for this item, whether explicit, inherited or globally set. + Theme m_theme = Light; + QRgb m_accent = Qt::blue; + QRgb m_foreground = Qt::black; + QRgb m_background = Qt::white; +}; + +QT_END_NAMESPACE + +#endif // QQUICKUNIVERSALSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversaltheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversaltheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4f22991b1bc525860b78f9632c8e1266e6492c61 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2Universal/6.8.1/QtQuickControls2Universal/private/qquickuniversaltheme_p.h @@ -0,0 +1,36 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKUNIVERSALTHEME_P_H +#define QQUICKUNIVERSALTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTheme; +class QQuickUniversalStyle; + +class Q_QUICKCONTROLS2UNIVERSAL_EXPORT QQuickUniversalTheme +{ +public: + static void initialize(QQuickTheme *theme); + static void registerSystemStyle(QQuickUniversalStyle *style); + static void unregisterSystemStyle(QQuickUniversalStyle *style); + static void updateTheme(); +}; + +QT_END_NAMESPACE + +#endif // QQUICKUNIVERSALTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalbusyindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalbusyindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..09ef09381a0a8f4d3f4a18e5b601ae89a0e36389 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalbusyindicator_p.h @@ -0,0 +1,55 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKUNIVERSALBUSYINDICATOR_P_H +#define QQUICKUNIVERSALBUSYINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickUniversalBusyIndicator : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(int count READ count WRITE setCount FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + QML_NAMED_ELEMENT(BusyIndicatorImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickUniversalBusyIndicator(QQuickItem *parent = nullptr); + + int count() const; + void setCount(int count); + + QColor color() const; + void setColor(const QColor &color); + + int elapsed() const; + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + int m_count = 5; + int m_elapsed = 0; + QColor m_color = Qt::black; +}; + +QT_END_NAMESPACE + +#endif // QQUICKUNIVERSALBUSYINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalfocusrectangle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalfocusrectangle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0f0d7eca393842b60f32a9f38aa7ad2c5e4b399a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalfocusrectangle_p.h @@ -0,0 +1,37 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKUNIVERSALFOCUSRECTANGLE_P_H +#define QQUICKUNIVERSALFOCUSRECTANGLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickUniversalFocusRectangle : public QQuickPaintedItem +{ + Q_OBJECT + QML_NAMED_ELEMENT(FocusRectangle) + QML_ADDED_IN_VERSION(2, 0) + +public: + QQuickUniversalFocusRectangle(QQuickItem *parent = nullptr); + + void paint(QPainter *painter) override; +}; + +QT_END_NAMESPACE + +#endif // QQUICKUNIVERSALFOCUSRECTANGLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalprogressbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalprogressbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2b6021f0a499a57921110eb13b88817819fee9c8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControls2UniversalStyleImpl/6.8.1/QtQuickControls2UniversalStyleImpl/private/qquickuniversalprogressbar_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKUNIVERSALPROGRESSBAR_P_H +#define QQUICKUNIVERSALPROGRESSBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickUniversalProgressBar : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor FINAL) + Q_PROPERTY(qreal progress READ progress WRITE setProgress FINAL) + Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate FINAL) + QML_NAMED_ELEMENT(ProgressBarImpl) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickUniversalProgressBar(QQuickItem *parent = nullptr); + + QColor color() const; + void setColor(const QColor &color); + + qreal progress() const; + void setProgress(qreal progress); + + bool isIndeterminate() const; + void setIndeterminate(bool indeterminate); + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override; + +private: + QColor m_color = Qt::black; + qreal m_progress = 0.0; + bool m_indeterminate = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKUNIVERSALPROGRESSBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/controlstestutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/controlstestutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b7606545e2dadc2a1384e824d290eb6a27700591 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/controlstestutils_p.h @@ -0,0 +1,101 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef CONTROLSTESTUTILS_P_H +#define CONTROLSTESTUTILS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQmlEngine; +class QQuickApplicationWindow; +class QQuickAbstractButton; + +namespace QQuickControlsTestUtils +{ + class QQuickControlsApplicationHelper : public QQuickVisualTestUtils::QQuickApplicationHelper + { + public: + QQuickControlsApplicationHelper(QQmlDataTest *testCase, const QString &testFilePath, + const QVariantMap &initialProperties = {}, + const QStringList &qmlImportPaths = {}); + + QQuickApplicationWindow *appWindow = nullptr; + }; + + struct QQuickStyleHelper + { + [[nodiscard]] bool updateStyle(const QString &style); + + QString currentStyle; + QScopedPointer engine; + }; + + typedef std::function ForEachCallback; + + void forEachControl(QQmlEngine *engine, const QString &qqc2ImportPath, const QString &sourcePath, + const QString &targetPath, const QStringList &skipList, ForEachCallback callback); + void addTestRowForEachControl(QQmlEngine *engine, const QString &qqc2ImportPath, const QString &sourcePath, + const QString &targetPath, const QStringList &skipList = QStringList()); + + [[nodiscard]] bool verifyButtonClickable(QQuickAbstractButton *button); + [[nodiscard]] bool clickButton(QQuickAbstractButton *button); + [[nodiscard]] bool doubleClickButton(QQuickAbstractButton *button); + + class ComponentCreator : public QObject + { + Q_OBJECT + QML_ELEMENT + QML_SINGLETON + Q_MOC_INCLUDE() + + public: + Q_INVOKABLE QQmlComponent *createComponent(const QByteArray &data); + }; + + class StyleInfo : public QObject + { + Q_OBJECT + Q_PROPERTY(QString styleName READ styleName CONSTANT FINAL) + QML_ELEMENT + QML_SINGLETON + + public: + QString styleName() const; + }; + + class MockPlatformTheme : public QPlatformTheme + { + Qt::ColorScheme colorScheme() const override + { + return m_colorScheme; + } + void requestColorScheme(Qt::ColorScheme theme) override + { + m_colorScheme = theme; + QWindowSystemInterfacePrivate::ThemeChangeEvent tce{nullptr}; + QGuiApplicationPrivate::processThemeChanged(&tce); + } + + private: + Qt::ColorScheme m_colorScheme = Qt::ColorScheme::Unknown; + }; +} + +QT_END_NAMESPACE + +#endif // CONTROLSTESTUTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/dialogstestutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/dialogstestutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bf0860fec7473c507e886a7353a6601d16f2d228 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/dialogstestutils_p.h @@ -0,0 +1,181 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef DIALOGSTESTUTILS_H +#define DIALOGSTESTUTILS_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include + +// We need these for Windows, because FolderListModel returns a lowercase drive letter; e.g.: +// "file:///c:/blah.txt", whereas other API returns "file:///C:/blah.txt". +#define COMPARE_URL(url1, url2) \ + QCOMPARE(QFileInfo(url1.toLocalFile()).absoluteFilePath(), QFileInfo(url2.toLocalFile()).absoluteFilePath()); + +// Store a copy of the arguments in case { ... } list initializer syntax is used as an argument, +// which could result in two different lists being created and passed to std::transform() +// (and would also require it to be enclosed in parentheses everywhere it's used). +#define COMPARE_URLS(actualUrls, expectedUrls) \ +{ \ + const QList actualUrlsCopy = actualUrls; \ + QList actualPaths; \ + std::transform(actualUrlsCopy.begin(), actualUrlsCopy.end(), std::back_insert_iterator(actualPaths), \ + [](const QUrl &url) { return QFileInfo(url.toLocalFile()).absoluteFilePath(); }); \ + const QList expectedUrlsCopy = expectedUrls; \ + QList expectedPaths; \ + std::transform(expectedUrlsCopy.begin(), expectedUrlsCopy.end(), std::back_insert_iterator(expectedPaths), \ + [](const QUrl &url) { return QFileInfo(url.toLocalFile()).absoluteFilePath(); }); \ + QCOMPARE(actualPaths, expectedPaths); \ +} + +#define OPEN_QUICK_DIALOG() \ +QVERIFY2(dialogHelper.isWindowInitialized(), dialogHelper.failureMessage()); \ +QVERIFY(dialogHelper.waitForWindowActive()); \ +QVERIFY(dialogHelper.openDialog()); \ +QTRY_VERIFY(dialogHelper.isQuickDialogOpen()); + +#define CLOSE_QUICK_DIALOG() \ + do { \ + dialogHelper.dialog->close(); \ + QVERIFY(!dialogHelper.dialog->isVisible()); \ + QTRY_VERIFY(!dialogHelper.quickDialog->isVisible()); \ + } while (false) + +QT_BEGIN_NAMESPACE +class QWindow; + +class QQuickListView; + +class QQuickAbstractButton; + +class QQuickDialogButtonBox; +class QQuickFolderBreadcrumbBar; + +namespace QQuickDialogTestUtils +{ + +// Saves duplicating a bunch of code in every test. +template +class DialogTestHelper +{ +public: + DialogTestHelper(QQmlDataTest *testCase, const QString &testFilePath, + const QStringList &qmlImportPaths = {}, const QVariantMap &initialProperties = {}) : + appHelper(testCase, testFilePath, initialProperties, qmlImportPaths) + { + if (!appHelper.ready) + return; + + dialog = appHelper.window->property("dialog").value(); + if (!dialog) { + appHelper.errorMessage = "\"dialog\" property is not valid"; + return; + } + + appHelper.window->show(); + appHelper.window->requestActivate(); + } + + Q_REQUIRED_RESULT bool isWindowInitialized() const + { + return appHelper.ready; + } + + Q_REQUIRED_RESULT bool waitForWindowActive() + { + return QTest::qWaitForWindowActive(appHelper.window); + } + + /* + Opens the dialog. For non-native dialogs, it is necessary to ensure that + isQuickDialogOpen() returns true before trying to access its internals. + */ + virtual bool openDialog() + { + dialog->open(); + if (!dialog->isVisible()) { + appHelper.errorMessage = "Dialog is not visible"; + return false; + } + + // We might want to call this function more than once, + // and we only need to get these members the first time. + if (!quickDialog) { + quickDialog = appHelper.window->findChild(); + if (!quickDialog) { + appHelper.errorMessage = "Can't find Qt Quick-based dialog"; + return false; + } + } + + return true; + } + + QQuickWindow *popupWindow() const + { + return quickDialog->contentItem()->window(); + } + + Q_REQUIRED_RESULT bool waitForPopupWindowActiveAndPolished() + { + if (!isQuickDialogOpen()) { + QByteArray msg("Dialog wasn't open, when {} was called"); + msg.replace("{}", __func__); + appHelper.errorMessage = msg; + return false; + } + QQuickWindow *dialogPopupWindow = popupWindow(); + if (!dialogPopupWindow) + return false; + dialogPopupWindow->requestActivate(); + if (!QTest::qWaitForWindowActive(dialogPopupWindow)) + return false; + return QQuickTest::qWaitForPolish(dialogPopupWindow); + } + + bool isQuickDialogOpen() const + { + return quickDialog->isOpened(); + } + + QQuickWindow *window() const + { + return appHelper.window; + } + + const char *failureMessage() const + { + return appHelper.errorMessage.constData(); + } + + QQuickVisualTestUtils::QQuickApplicationHelper appHelper; + DialogType *dialog = nullptr; + QuickDialogType *quickDialog = nullptr; +}; + +bool verifyFileDialogDelegates(QQuickListView *fileDialogListView, const QStringList &expectedFiles, QString &failureMessage); + +bool verifyBreadcrumbDelegates(QQuickFolderBreadcrumbBar *breadcrumbBar, const QUrl &expectedFolder, QString &failureMessage); + +QQuickAbstractButton *findDialogButton(QQuickDialogButtonBox *box, const QString &buttonText); + +void enterText(QWindow *window, const QString &textToEnter); +} + +QT_END_NAMESPACE + +#endif // DIALOGSTESTUTILS_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/qtest_quickcontrols_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/qtest_quickcontrols_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5f2213fd4a7e7de822db1ee4bf61a3a67f59cf2a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickControlsTestUtils/6.8.1/QtQuickControlsTestUtils/private/qtest_quickcontrols_p.h @@ -0,0 +1,68 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QTEST_QUICKCONTROLS_P_H +#define QTEST_QUICKCONTROLS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +inline QStringList testStyles() +{ + // It's not enough to check if the name is empty, because since Qt 6 + // we set an appropriate style for the platform if no style was specified. + // Also, we need the name check to come first, as isUsingDefaultStyle() does not do any resolving, + // and so its return value wouldn't be correct otherwise. + if (QQuickStyle::name().isEmpty() || QQuickStylePrivate::isUsingDefaultStyle()) + return QQuickStylePrivate::builtInStyles(); + return QStringList(QQuickStyle::name()); +} + +inline int runTests(QObject *testObject, int argc, char *argv[]) +{ + int res = 0; + QTest::qInit(testObject, argc, argv); + const QByteArray testObjectName = QTestResult::currentTestObjectName(); + // setCurrentTestObject() takes a C string, which means we must ensure + // that the string we pass in lives long enough (i.e until the next call + // to setCurrentTestObject()), so store the name outside of the loop. + QByteArray testName; + const QStringList styles = testStyles(); + for (const QString &style : styles) { + qmlClearTypeRegistrations(); + QQuickStyle::setStyle(style); + testName = testObjectName + "::" + style.toLocal8Bit(); + QTestResult::setCurrentTestObject(testName); + res += QTest::qRun(); + } + QTestResult::setCurrentTestObject(testObjectName); + QTest::qCleanup(); + return res; +} + +#define QTEST_QUICKCONTROLS_MAIN(TestCase) \ +int main(int argc, char *argv[]) \ +{ \ + qputenv("QML_NO_TOUCH_COMPRESSION", "1"); \ + QGuiApplication app(argc, argv); \ + TestCase tc; \ + QTEST_SET_MAIN_SOURCE_PATH \ + return runTests(&tc, argc, argv); \ +} + +#endif // QTEST_QUICKCONTROLS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickabstractdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickabstractdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..64e0091e12d38ddb59f956fa6c0ba3558ee08884 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickabstractdialog_p.h @@ -0,0 +1,133 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKABSTRACTDIALOG_P_H +#define QQUICKABSTRACTDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "qtquickdialogs2global_p.h" + +QT_BEGIN_NAMESPACE + +class QWindow; +class QPlatformDialogHelper; + +class Q_QUICKDIALOGS2_EXPORT QQuickAbstractDialog : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QQmlListProperty data READ data FINAL) + Q_PROPERTY(QWindow *parentWindow READ parentWindow WRITE setParentWindow NOTIFY parentWindowChanged RESET resetParentWindow FINAL) + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + Q_PROPERTY(Qt::WindowFlags flags READ flags WRITE setFlags NOTIFY flagsChanged FINAL) + Q_PROPERTY(Qt::WindowModality modality READ modality WRITE setModality NOTIFY modalityChanged FINAL) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) + Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL) + Q_CLASSINFO("DefaultProperty", "data") + Q_MOC_INCLUDE() + QML_ANONYMOUS + QML_ADDED_IN_VERSION(6, 2) + +public: + explicit QQuickAbstractDialog(QQuickDialogType type, QObject *parent = nullptr); + ~QQuickAbstractDialog(); + + QPlatformDialogHelper *handle() const; + + QQmlListProperty data(); + + QWindow *parentWindow() const; + void setParentWindow(QWindow *window); + void resetParentWindow(); + + QString title() const; + void setTitle(const QString &title); + + Qt::WindowFlags flags() const; + void setFlags(Qt::WindowFlags flags); + + Qt::WindowModality modality() const; + void setModality(Qt::WindowModality modality); + + bool isVisible() const; + void setVisible(bool visible); + + enum StandardCode { Rejected, Accepted }; + Q_ENUM(StandardCode) + + int result() const; + void setResult(int result); + +public Q_SLOTS: + void open(); + void close(); + virtual void accept(); + virtual void reject(); + virtual void done(int result); + +Q_SIGNALS: + void accepted(); + void rejected(); + void parentWindowChanged(); + void titleChanged(); + void flagsChanged(); + void modalityChanged(); + void visibleChanged(); + void resultChanged(); + +protected: + void classBegin() override; + void componentComplete() override; + + enum class CreateOptions { TryAllDialogTypes = 0, DontTryNativeDialog = 1 }; + bool create(CreateOptions = CreateOptions::TryAllDialogTypes); + void destroy(); + + virtual bool useNativeDialog() const; + virtual void onCreate(QPlatformDialogHelper *dialog); + virtual void onShow(QPlatformDialogHelper *dialog); + virtual void onHide(QPlatformDialogHelper *dialog); + virtual int dialogCode() const; + + QQuickItem *findParentItem() const; + QWindow *windowForOpen() const; + void deferredOpen(QWindow *window); + + int m_result = Rejected; + QWindow *m_parentWindow = nullptr; + QString m_title; + Qt::WindowFlags m_flags = Qt::Dialog; + Qt::WindowModality m_modality = Qt::WindowModal; + QQuickDialogType m_type = QQuickDialogType::FileDialog; + QList m_data; + std::unique_ptr m_handle; + bool m_visibleRequested = false; + bool m_visible = false; + bool m_complete = false; + bool m_parentWindowExplicitlySet = false; + bool m_firstShow = true; +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickcolordialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickcolordialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..339c7c5b3d9533ebf28fe794ab9cddfb644edd31 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickcolordialog_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORDIALOG_P_H +#define QQUICKCOLORDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickabstractdialog_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2_EXPORT QQuickColorDialog : public QQuickAbstractDialog +{ + Q_OBJECT + Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor NOTIFY selectedColorChanged) + Q_PROPERTY(QColorDialogOptions::ColorDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged) + Q_FLAGS(QColorDialogOptions::ColorDialogOptions) + QML_NAMED_ELEMENT(ColorDialog) + QML_ADDED_IN_VERSION(6, 4) + +public: + explicit QQuickColorDialog(QObject *parent = nullptr); + + QColor selectedColor() const; + void setSelectedColor(const QColor &color); + + QColorDialogOptions::ColorDialogOptions options() const; + void setOptions(QColorDialogOptions::ColorDialogOptions options); + void resetOptions(); + +Q_SIGNALS: + void selectedColorChanged(); + void optionsChanged(); + +protected: + bool useNativeDialog() const override; + void onCreate(QPlatformDialogHelper *dialog) override; + void onShow(QPlatformDialogHelper *dialog) override; + +private: + QSharedPointer m_options; + QColor m_selectedColor; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfiledialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfiledialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bba84e22f61c5664370ca2a54e4517a3078b5121 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfiledialog_p.h @@ -0,0 +1,130 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFILEDIALOG_P_H +#define QQUICKFILEDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickabstractdialog_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFileNameFilter; + +class Q_QUICKDIALOGS2_EXPORT QQuickFileDialog : public QQuickAbstractDialog +{ + Q_OBJECT + Q_PROPERTY(FileMode fileMode READ fileMode WRITE setFileMode NOTIFY fileModeChanged FINAL) + Q_PROPERTY(QUrl selectedFile READ selectedFile WRITE setSelectedFile NOTIFY selectedFileChanged FINAL) + Q_PROPERTY(QList selectedFiles READ selectedFiles NOTIFY selectedFilesChanged FINAL) + Q_PROPERTY(QUrl currentFile READ currentFile WRITE setCurrentFile NOTIFY currentFileChanged FINAL) + Q_PROPERTY(QList currentFiles READ currentFiles WRITE setCurrentFiles NOTIFY currentFilesChanged FINAL) + Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL) + Q_PROPERTY(QFileDialogOptions::FileDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged FINAL) + Q_PROPERTY(QStringList nameFilters READ nameFilters WRITE setNameFilters RESET resetNameFilters NOTIFY nameFiltersChanged FINAL) + Q_PROPERTY(QQuickFileNameFilter *selectedNameFilter READ selectedNameFilter CONSTANT) + Q_PROPERTY(QString defaultSuffix READ defaultSuffix WRITE setDefaultSuffix RESET resetDefaultSuffix NOTIFY defaultSuffixChanged FINAL) + Q_PROPERTY(QString acceptLabel READ acceptLabel WRITE setAcceptLabel RESET resetAcceptLabel NOTIFY acceptLabelChanged FINAL) + Q_PROPERTY(QString rejectLabel READ rejectLabel WRITE setRejectLabel RESET resetRejectLabel NOTIFY rejectLabelChanged FINAL) + Q_FLAGS(QFileDialogOptions::FileDialogOptions) + QML_NAMED_ELEMENT(FileDialog) + QML_ADDED_IN_VERSION(6, 2) + Q_MOC_INCLUDE() + +public: + explicit QQuickFileDialog(QObject *parent = nullptr); + + enum FileMode { + OpenFile, + OpenFiles, + SaveFile + }; + Q_ENUM(FileMode) + + FileMode fileMode() const; + void setFileMode(FileMode fileMode); + + QUrl selectedFile() const; + void setSelectedFile(const QUrl &selectedFile); + + QList selectedFiles() const; + + QUrl currentFile() const; + void setCurrentFile(const QUrl &file); + + QList currentFiles() const; + void setCurrentFiles(const QList ¤tFiles); + + QUrl currentFolder() const; + void setCurrentFolder(const QUrl ¤tFolder); + + QFileDialogOptions::FileDialogOptions options() const; + void setOptions(QFileDialogOptions::FileDialogOptions options); + void resetOptions(); + + QStringList nameFilters() const; + void setNameFilters(const QStringList &filters); + void resetNameFilters(); + + QQuickFileNameFilter *selectedNameFilter() const; + + QString defaultSuffix() const; + void setDefaultSuffix(const QString &suffix); + void resetDefaultSuffix(); + + QString acceptLabel() const; + void setAcceptLabel(const QString &label); + void resetAcceptLabel(); + + QString rejectLabel() const; + void setRejectLabel(const QString &label); + void resetRejectLabel(); + +Q_SIGNALS: + void fileModeChanged(); + void selectedFileChanged(); + void selectedFilesChanged(); + void currentFileChanged(); + void currentFilesChanged(); + void currentFolderChanged(); + void optionsChanged(); + void nameFiltersChanged(); + void defaultSuffixChanged(); + void acceptLabelChanged(); + void rejectLabelChanged(); + +protected: + bool useNativeDialog() const override; + void onCreate(QPlatformDialogHelper *dialog) override; + void onShow(QPlatformDialogHelper *dialog) override; + void onHide(QPlatformDialogHelper *dialog) override; + void accept() override; + +private: + QUrl addDefaultSuffix(const QUrl &file) const; + QList addDefaultSuffixes(const QList &files) const; + + void setSelectedFiles(const QList &selectedFiles); + + FileMode m_fileMode; + QList m_selectedFiles; + QSharedPointer m_options; + mutable QQuickFileNameFilter *m_selectedNameFilter; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFILEDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfolderdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfolderdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b547066d354ed257ee8a052a27f3eb10e455d56f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfolderdialog_p.h @@ -0,0 +1,78 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOLDERDIALOG_P_H +#define QQUICKFOLDERDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickabstractdialog_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFileNameFilter; + +class Q_QUICKDIALOGS2_EXPORT QQuickFolderDialog : public QQuickAbstractDialog +{ + Q_OBJECT + Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL) + Q_PROPERTY(QUrl selectedFolder READ selectedFolder WRITE setSelectedFolder NOTIFY selectedFolderChanged FINAL) + Q_PROPERTY(QFileDialogOptions::FileDialogOptions options READ options WRITE setOptions RESET resetOptions NOTIFY optionsChanged FINAL) + Q_PROPERTY(QString acceptLabel READ acceptLabel WRITE setAcceptLabel RESET resetAcceptLabel NOTIFY acceptLabelChanged FINAL) + Q_PROPERTY(QString rejectLabel READ rejectLabel WRITE setRejectLabel RESET resetRejectLabel NOTIFY rejectLabelChanged FINAL) + Q_FLAGS(QFileDialogOptions::FileDialogOptions) + QML_NAMED_ELEMENT(FolderDialog) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickFolderDialog(QObject *parent = nullptr); + + QUrl currentFolder() const; + void setCurrentFolder(const QUrl &folder); + + QUrl selectedFolder() const; + void setSelectedFolder(const QUrl &folder); + + QFileDialogOptions::FileDialogOptions options() const; + void setOptions(QFileDialogOptions::FileDialogOptions options); + void resetOptions(); + + QString acceptLabel() const; + void setAcceptLabel(const QString &label); + void resetAcceptLabel(); + + QString rejectLabel() const; + void setRejectLabel(const QString &label); + void resetRejectLabel(); + +Q_SIGNALS: + void currentFolderChanged(); + void selectedFolderChanged(); + void optionsChanged(); + void acceptLabelChanged(); + void rejectLabelChanged(); + +protected: + bool useNativeDialog() const override; + void onCreate(QPlatformDialogHelper *dialog) override; + void onShow(QPlatformDialogHelper *dialog) override; + +private: + QSharedPointer m_options; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOLDERDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfontdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfontdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..333545d3d672ce50a5846fb17ffe52a983b6cfd5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickfontdialog_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFONTDIALOG_P_H +#define QQUICKFONTDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qquickabstractdialog_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2_EXPORT QQuickFontDialog : public QQuickAbstractDialog +{ + Q_OBJECT + Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont NOTIFY selectedFontChanged) + Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged FINAL) + Q_PROPERTY(QFontDialogOptions::FontDialogOptions options READ options WRITE setOptions + RESET resetOptions NOTIFY optionsChanged) + Q_FLAGS(QFontDialogOptions::FontDialogOptions) + QML_NAMED_ELEMENT(FontDialog) + QML_ADDED_IN_VERSION(6, 2) + +public: + explicit QQuickFontDialog(QObject *parent = nullptr); + + void setCurrentFont(const QFont &font); + QFont currentFont() const; + + void setSelectedFont(const QFont &font); + QFont selectedFont() const; + + QFontDialogOptions::FontDialogOptions options() const; + void setOptions(QFontDialogOptions::FontDialogOptions options); + void resetOptions(); + +Q_SIGNALS: + void selectedFontChanged(); + void currentFontChanged(); + void optionsChanged(); + +protected: + bool useNativeDialog() const override; + void onCreate(QPlatformDialogHelper *dialog) override; + void onShow(QPlatformDialogHelper *dialog) override; + +private: + QSharedPointer m_options; + QFont m_selectedFont; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFONTDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickmessagedialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickmessagedialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f24e058bfbd285248077033155fd7f5e48018b30 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qquickmessagedialog_p.h @@ -0,0 +1,75 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMESSAGEDIALOG_P_H +#define QQUICKMESSAGEDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickabstractdialog_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2_EXPORT QQuickMessageDialog : public QQuickAbstractDialog +{ + Q_OBJECT + +private: + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + Q_PROPERTY(QString informativeText READ informativeText WRITE setInformativeText NOTIFY informativeTextChanged FINAL) + Q_PROPERTY(QString detailedText READ detailedText WRITE setDetailedText NOTIFY detailedTextChanged FINAL) + Q_PROPERTY(QPlatformDialogHelper::StandardButtons buttons READ buttons WRITE setButtons NOTIFY buttonsChanged FINAL) + QML_EXTENDED_NAMESPACE(QPlatformDialogHelper) + QML_NAMED_ELEMENT(MessageDialog) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickMessageDialog(QObject *parent = nullptr); + + QString text() const; + void setText(const QString &text); + + QString informativeText() const; + void setInformativeText(const QString &text); + + QString detailedText() const; + void setDetailedText(const QString &text); + + QPlatformDialogHelper::StandardButtons buttons() const; + void setButtons(QPlatformDialogHelper::StandardButtons buttons); + +Q_SIGNALS: + void textChanged(); + void informativeTextChanged(); + void detailedTextChanged(); + void buttonsChanged(); + + void buttonClicked(QPlatformDialogHelper::StandardButton button, + QPlatformDialogHelper::ButtonRole role); + +private Q_SLOTS: + void handleClick(QPlatformDialogHelper::StandardButton button, + QPlatformDialogHelper::ButtonRole role); + +protected: + void onCreate(QPlatformDialogHelper *dialog) override; + void onShow(QPlatformDialogHelper *dialog) override; + int dialogCode() const override; + +private: + QSharedPointer m_options; + QPlatformDialogHelper::ButtonRole m_roleOfLastButtonPressed = QPlatformDialogHelper::NoRole; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMESSAGEDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2foreign_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2foreign_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3870839d090e93f70605426649dfc4acf1f4544f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2foreign_p.h @@ -0,0 +1,34 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKDIALOGS2FOREIGN_P_H +#define QTQUICKDIALOGS2FOREIGN_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +struct QQuickFileNameFilterQuickDialogs2Foreign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickFileNameFilter) + QML_ADDED_IN_VERSION(6, 2) +}; + +QT_END_NAMESPACE + +#endif // QTQUICKDIALOGS2FOREIGN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2global_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2global_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d65a34f8bece78223dd800653207e76f70037039 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2/6.8.1/QtQuickDialogs2/private/qtquickdialogs2global_p.h @@ -0,0 +1,22 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKDIALOGS2GLOBAL_P_H +#define QTQUICKDIALOGS2GLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#endif // QTQUICKDIALOGS2GLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c88f2709ca446f9455c124a3bdda0c810614d3f2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p.h @@ -0,0 +1,96 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKABSTRACTCOLORPICKER_P_H +#define QQUICKABSTRACTCOLORPICKER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickAbstractColorPickerPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickAbstractColorPicker : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(qreal hue READ hue WRITE setHue NOTIFY colorChanged) + Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY colorChanged) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY colorChanged) + Q_PROPERTY(qreal lightness READ lightness WRITE setLightness NOTIFY colorChanged) + Q_PROPERTY(qreal alpha READ alpha WRITE setAlpha NOTIFY colorChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) + Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL) + Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,handle") + QML_NAMED_ELEMENT(AbstractColorPicker) + QML_ADDED_IN_VERSION(6, 4) + QML_UNCREATABLE("AbstractColorPicker is abstract.") + +public: + QColor color() const; + void setColor(const QColor &c); + + qreal hue() const; + void setHue(qreal hue); + + qreal saturation() const; + void setSaturation(qreal saturation); + + qreal value() const; + void setValue(qreal value); + + qreal lightness() const; + void setLightness(qreal lightness); + + qreal alpha() const; + void setAlpha(qreal alpha); + + bool isPressed() const; + void setPressed(bool pressed); + + QQuickItem *handle() const; + void setHandle(QQuickItem *handle); + + qreal implicitHandleWidth() const; + qreal implicitHandleHeight() const; + +Q_SIGNALS: + void colorChanged(const QColor &color); + void pressedChanged(); + void handleChanged(); + void implicitHandleWidthChanged(); + void implicitHandleHeightChanged(); + + void colorPicked(const QColor &color); + +protected: + QQuickAbstractColorPicker(QQuickAbstractColorPickerPrivate &dd, QQuickItem *parent); + + virtual QColor colorAt(const QPointF &pos) = 0; + void componentComplete() override; + +private: + void updateColor(const QPointF &pos); + Q_DISABLE_COPY(QQuickAbstractColorPicker) + Q_DECLARE_PRIVATE(QQuickAbstractColorPicker) +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTCOLORPICKER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bd8060fa428a139054dc5a42d9de2e63d77148c0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickabstractcolorpicker_p_p.h @@ -0,0 +1,60 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKABSTRACTCOLORPICKER_P_P_H +#define QQUICKABSTRACTCOLORPICKER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickabstractcolorpicker_p.h" +#include "qquickcolordialogutils_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickAbstractColorPickerPrivate : public QQuickControlPrivate +{ + Q_DECLARE_PUBLIC(QQuickAbstractColorPicker); + +public: + explicit QQuickAbstractColorPickerPrivate(); + + static QQuickAbstractColorPickerPrivate *get(QQuickAbstractColorPicker *colorPicker) + { + return colorPicker->d_func(); + } + + bool handlePress(const QPointF &point, ulong timestamp) override; + bool handleMove(const QPointF &point, ulong timestamp) override; + bool handleRelease(const QPointF &point, ulong timestamp) override; + void handleUngrab() override; + + void cancelHandle(); + void executeHandle(bool complete = false); + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + + HSVA m_hsva; + QPointF m_pressPoint; + QQuickDeferredPointer m_handle; + bool m_pressed = false; + +protected: + bool m_hsl = false; // Use hsv by default. +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTCOLORPICKER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2775c89c3d16fa06c63e37c0040ce2a94240e74a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p.h @@ -0,0 +1,148 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORDIALOGIMPL_P_H +#define QQUICKCOLORDIALOGIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickDialogButtonBox; +class QQuickAbstractColorPicker; +class QQuickColorInputs; +class QQuickSlider; + +class QQuickColorDialogImplAttached; +class QQuickColorDialogImplAttachedPrivate; +class QQuickColorDialogImplPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickColorDialogImpl : public QQuickDialog +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(qreal hue READ hue WRITE setHue NOTIFY colorChanged) + Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY colorChanged) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY colorChanged) + Q_PROPERTY(qreal lightness READ lightness WRITE setLightness NOTIFY colorChanged) + Q_PROPERTY(qreal alpha READ alpha WRITE setAlpha NOTIFY colorChanged FINAL) + Q_PROPERTY(int red READ red WRITE setRed NOTIFY colorChanged FINAL) + Q_PROPERTY(int green READ green WRITE setGreen NOTIFY colorChanged FINAL) + Q_PROPERTY(int blue READ blue WRITE setBlue NOTIFY colorChanged FINAL) + Q_PROPERTY(bool isHsl READ isHsl WRITE setHsl NOTIFY specChanged FINAL) + QML_NAMED_ELEMENT(ColorDialogImpl) + QML_ATTACHED(QQuickColorDialogImplAttached) + QML_ADDED_IN_VERSION(6, 4) + +public: + explicit QQuickColorDialogImpl(QObject *parent = nullptr); + + static QQuickColorDialogImplAttached *qmlAttachedProperties(QObject *object); + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + QColor color() const; + void setColor(const QColor &c); + + int red() const; + void setRed(int red); + + int green() const; + void setGreen(int green); + + int blue() const; + void setBlue(int blue); + + qreal alpha() const; + void setAlpha(qreal alpha); + + qreal hue() const; + void setHue(qreal hue); + + qreal saturation() const; + void setSaturation(qreal saturation); + + qreal value() const; + void setValue(qreal value); + + qreal lightness() const; + void setLightness(qreal lightness); + + bool isHsl() const; + void setHsl(bool hsl); + + Q_INVOKABLE void invokeEyeDropper(); + +Q_SIGNALS: + void colorChanged(const QColor &color); + void specChanged(); + +private: + Q_DISABLE_COPY(QQuickColorDialogImpl) + Q_DECLARE_PRIVATE(QQuickColorDialogImpl) +}; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickColorDialogImplAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox WRITE setButtonBox NOTIFY buttonBoxChanged FINAL) + Q_PROPERTY(QQuickAbstractButton *eyeDropperButton READ eyeDropperButton WRITE setEyeDropperButton NOTIFY eyeDropperButtonChanged FINAL) + Q_PROPERTY(QQuickAbstractColorPicker *colorPicker READ colorPicker WRITE setColorPicker NOTIFY + colorPickerChanged FINAL) + Q_PROPERTY(QQuickColorInputs *colorInputs READ colorInputs WRITE setColorInputs NOTIFY + colorInputsChanged FINAL) + Q_PROPERTY(QQuickSlider *alphaSlider READ alphaSlider WRITE setAlphaSlider NOTIFY + alphaSliderChanged FINAL) + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + Q_MOC_INCLUDE("qquickabstractcolorpicker_p.h") + Q_MOC_INCLUDE("qquickcolorinputs_p.h") + +public: + explicit QQuickColorDialogImplAttached(QObject *parent = nullptr); + + QQuickDialogButtonBox *buttonBox() const; + void setButtonBox(QQuickDialogButtonBox *buttonBox); + + QQuickAbstractButton *eyeDropperButton() const; + void setEyeDropperButton(QQuickAbstractButton *eyeDropperButton); + + QQuickAbstractColorPicker *colorPicker() const; + void setColorPicker(QQuickAbstractColorPicker *colorPicker); + + QQuickColorInputs *colorInputs() const; + void setColorInputs(QQuickColorInputs *colorInputs); + + QQuickSlider *alphaSlider() const; + void setAlphaSlider(QQuickSlider *alphaSlider); + +Q_SIGNALS: + void buttonBoxChanged(); + void eyeDropperButtonChanged(); + void colorPickerChanged(); + void colorInputsChanged(); + void alphaSliderChanged(); + +private: + Q_DISABLE_COPY(QQuickColorDialogImplAttached) + Q_DECLARE_PRIVATE(QQuickColorDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORDIALOGIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..71242896442cb7e3726f45d822e8be26800d7b43 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogimpl_p_p.h @@ -0,0 +1,98 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORDIALOGIMPL_P_P_H +#define QQUICKCOLORDIALOGIMPL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickcolordialogimpl_p.h" +#include "qquickabstractcolorpicker_p.h" +#include "qquickcolorinputs_p.h" + +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickEyeDropperEventFilter : public QObject +{ +public: + enum class LeaveReason { Default, Cancel }; + explicit QQuickEyeDropperEventFilter(std::function callOnLeave, + std::function callOnUpdate) + : m_leave(callOnLeave), m_update(callOnUpdate) + { + } + +protected: + bool eventFilter(QObject *obj, QEvent *event) override; + +private: + std::function m_leave; + std::function m_update; + QPoint m_lastPosition; +}; + +class QQuickColorDialogImplPrivate : public QQuickDialogPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickColorDialogImpl); + +public: + explicit QQuickColorDialogImplPrivate(); + ~QQuickColorDialogImplPrivate(); + + static QQuickColorDialogImplPrivate *get(QQuickColorDialogImpl *dialog) + { + return dialog->d_func(); + } + + QQuickColorDialogImplAttached *attachedOrWarn(); + + void handleClick(QQuickAbstractButton *button) override; + + void eyeDropperEnter(); + void eyeDropperLeave(const QPoint &pos, QQuickEyeDropperEventFilter::LeaveReason actionOnLeave); + void eyeDropperPointerMoved(const QPoint &pos); + + void alphaSliderMoved(); + + QSharedPointer options; + HSVA m_hsva; + std::unique_ptr eyeDropperEventFilter; + QPointer m_eyeDropperWindow; + QColor m_eyeDropperPreviousColor; + bool m_eyeDropperMode = false; + bool m_showAlpha = false; + bool m_hsl = false; +}; + +class QQuickColorDialogImplAttachedPrivate : public QObjectPrivate +{ +public: + QPointer buttonBox; + QPointer eyeDropperButton; + QPointer colorInputs; + QPointer colorPicker; + QPointer alphaSlider; + + Q_DECLARE_PUBLIC(QQuickColorDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORDIALOGIMPL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4aac9a68e2c089966766909b53f6bf2de9fe70b6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolordialogutils_p.h @@ -0,0 +1,36 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORDIALOGUTILS_P_H +#define QQUICKCOLORDIALOGUTILS_P_H + + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +std::pair getSaturationAndValue(qreal saturation, qreal lightness); + +std::pair getSaturationAndLightness(qreal saturation, qreal value); + +struct HSVA +{ + qreal h = .0; + qreal s = .0; + union { + qreal v = 1.0; + qreal l; + }; + qreal a = 1.0; +}; + +#endif // QQUICKCOLORDIALOGUTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolorinputs_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolorinputs_p.h new file mode 100644 index 0000000000000000000000000000000000000000..32dbb26c48a557ea8616f7ceaa3b08da77d86471 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickcolorinputs_p.h @@ -0,0 +1,172 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOLORINPUTS_P_H +#define QQUICKCOLORINPUTS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +#include "qquickcolordialogutils_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickColorInputs : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + Q_PROPERTY(int red READ red NOTIFY colorChanged) + Q_PROPERTY(int green READ green NOTIFY colorChanged) + Q_PROPERTY(int blue READ blue NOTIFY colorChanged) + Q_PROPERTY(qreal hue READ hue NOTIFY colorChanged) + Q_PROPERTY(qreal hslSaturation READ hslSaturation NOTIFY colorChanged) + Q_PROPERTY(qreal hsvSaturation READ hsvSaturation NOTIFY colorChanged) + Q_PROPERTY(qreal value READ value NOTIFY colorChanged) + Q_PROPERTY(qreal lightness READ lightness NOTIFY colorChanged) + Q_PROPERTY(qreal alpha READ alpha NOTIFY colorChanged) + Q_PROPERTY(bool showAlpha READ showAlpha WRITE setShowAlpha NOTIFY showAlphaChanged) + Q_PROPERTY(QQuickTextInput *hexInput READ hexInput WRITE setHexInput NOTIFY hexInputChanged) + Q_PROPERTY(QQuickTextInput *redInput READ redInput WRITE setRedInput NOTIFY redInputChanged) + Q_PROPERTY(QQuickTextInput *greenInput READ greenInput WRITE setGreenInput NOTIFY greenInputChanged) + Q_PROPERTY(QQuickTextInput *blueInput READ blueInput WRITE setBlueInput NOTIFY blueInputChanged) + Q_PROPERTY(QQuickTextInput *hsvHueInput READ hsvHueInput WRITE setHsvHueInput NOTIFY hsvHueInputChanged) + Q_PROPERTY(QQuickTextInput *hslHueInput READ hslHueInput WRITE setHslHueInput NOTIFY hslHueInputChanged) + Q_PROPERTY(QQuickTextInput *hsvSaturationInput READ hsvSaturationInput WRITE setHsvSaturationInput NOTIFY hsvSaturationInputChanged) + Q_PROPERTY(QQuickTextInput *hslSaturationInput READ hslSaturationInput WRITE setHslSaturationInput NOTIFY hslSaturationInputChanged) + Q_PROPERTY(QQuickTextInput *valueInput READ valueInput WRITE setValueInput NOTIFY valueInputChanged) + Q_PROPERTY(QQuickTextInput *lightnessInput READ lightnessInput WRITE setLightnessInput NOTIFY lightnessInputChanged) + Q_PROPERTY(QQuickTextInput *rgbAlphaInput READ rgbAlphaInput WRITE setRgbAlphaInput NOTIFY rgbAlphaInputChanged) + Q_PROPERTY(QQuickTextInput *hsvAlphaInput READ hsvAlphaInput WRITE setHsvAlphaInput NOTIFY hsvAlphaInputChanged) + Q_PROPERTY(QQuickTextInput *hslAlphaInput READ hslAlphaInput WRITE setHslAlphaInput NOTIFY hslAlphaInputChanged) + QML_NAMED_ELEMENT(ColorInputsImpl) + +public: + explicit QQuickColorInputs(); + + QColor color() const; + void setColor(const QColor &c); + int red() const; + int green() const; + int blue() const; + qreal alpha() const; + qreal hue() const; + qreal hslSaturation() const; + qreal hsvSaturation() const; + qreal value() const; + qreal lightness() const; + + bool showAlpha() const; + void setShowAlpha(bool showAlpha); + + QQuickTextInput *hexInput() const; + void setHexInput(QQuickTextInput *hexInput); + + QQuickTextInput *redInput() const; + void setRedInput(QQuickTextInput *redInput); + + QQuickTextInput *greenInput() const; + void setGreenInput(QQuickTextInput *greenInput); + + QQuickTextInput *blueInput() const; + void setBlueInput(QQuickTextInput *blueInput); + + QQuickTextInput *hsvHueInput() const; + void setHsvHueInput(QQuickTextInput *hsvHueInput); + + QQuickTextInput *hslHueInput() const; + void setHslHueInput(QQuickTextInput *hslHueInput); + + QQuickTextInput *hsvSaturationInput() const; + void setHsvSaturationInput(QQuickTextInput *hsvSaturationInput); + + QQuickTextInput *hslSaturationInput() const; + void setHslSaturationInput(QQuickTextInput *hslSaturationInput); + + QQuickTextInput *valueInput() const; + void setValueInput(QQuickTextInput *valueInput); + + QQuickTextInput *lightnessInput() const; + void setLightnessInput(QQuickTextInput *lightnessInput); + + QQuickTextInput *rgbAlphaInput() const; + void setRgbAlphaInput(QQuickTextInput *alphaInput); + + QQuickTextInput *hsvAlphaInput() const; + void setHsvAlphaInput(QQuickTextInput *alphaInput); + + QQuickTextInput *hslAlphaInput() const; + void setHslAlphaInput(QQuickTextInput *alphaInput); + +Q_SIGNALS: + void colorChanged(const QColor &c); + void colorModified(const QColor &c); + void hslChanged(); + void showAlphaChanged(bool); + void hexInputChanged(); + void redInputChanged(); + void greenInputChanged(); + void blueInputChanged(); + void hsvHueInputChanged(); + void hslHueInputChanged(); + void hsvSaturationInputChanged(); + void hslSaturationInputChanged(); + void valueInputChanged(); + void lightnessInputChanged(); + void rgbAlphaInputChanged(); + void hsvAlphaInputChanged(); + void hslAlphaInputChanged(); + +private: + void handleHexChanged(); + void handleRedChanged(); + void handleGreenChanged(); + void handleBlueChanged(); + void handleHsvHueChanged(); + void handleHslHueChanged(); + void handleHueChanged(const QString &input); + void handleHsvSaturationChanged(); + void handleHslSaturationChanged(); + void handleSaturationChanged(const QString &input); + void handleValueChanged(); + void handleLightnessChanged(); + void handleRgbAlphaChanged(); + void handleHsvAlphaChanged(); + void handleHslAlphaChanged(); + void handleAlphaChanged(const QString &input); + + QPointer m_hexInput; + QPointer m_redInput; + QPointer m_greenInput; + QPointer m_blueInput; + QPointer m_hsvHueInput; + QPointer m_hslHueInput; + QPointer m_hsvSaturationInput; + QPointer m_hslSaturationInput; + QPointer m_valueInput; + QPointer m_lightnessInput; + QPointer m_rgbAlphaInput; + QPointer m_hsvAlphaInput; + QPointer m_hslAlphaInput; + HSVA m_hsva; + bool m_showAlpha = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOLORINPUTS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickdialogimplfactory_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickdialogimplfactory_p.h new file mode 100644 index 0000000000000000000000000000000000000000..496220e3bf0de3399a4759efb8af1c06ffe93b21 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickdialogimplfactory_p.h @@ -0,0 +1,36 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKQMLDIALOGFACTORY_P_H +#define QQUICKQMLDIALOGFACTORY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickDialogImplFactory +{ +public: + static std::unique_ptr createPlatformDialogHelper(QQuickDialogType type, QObject *parent); +}; + +QT_END_NAMESPACE + +#endif // QQUICKQMLDIALOGFACTORY_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogdelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogdelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5703611c3ec7e883780d6b4b01a03d972e7d3010 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogdelegate_p.h @@ -0,0 +1,58 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFILEDIALOGDELEGATE_P_H +#define QQUICKFILEDIALOGDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickDialog; +class QQuickFileDialogDelegatePrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFileDialogDelegate : public QQuickItemDelegate +{ + Q_OBJECT + Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged) + Q_PROPERTY(QUrl file READ file WRITE setFile NOTIFY fileChanged) + QML_NAMED_ELEMENT(FileDialogDelegate) + QML_ADDED_IN_VERSION(6, 2) + +public: + explicit QQuickFileDialogDelegate(QQuickItem *parent = nullptr); + + QQuickDialog *dialog() const; + void setDialog(QQuickDialog *dialog); + + QUrl file() const; + void setFile(const QUrl &file); + +Q_SIGNALS: + void dialogChanged(); + void fileChanged(); + +protected: + void keyReleaseEvent(QKeyEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickFileDialogDelegate) + Q_DECLARE_PRIVATE(QQuickFileDialogDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFILEDIALOGDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bcf32b66f264df073df7cdb1d215f67ad78588f6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p.h @@ -0,0 +1,162 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFILEDIALOGIMPL_P_H +#define QQUICKFILEDIALOGIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickComboBox; +class QQuickDialogButtonBox; +class QQuickTextField; +class QQuickLabel; + +class QQuickFileDialogImplAttached; +class QQuickFileDialogImplAttachedPrivate; +class QQuickFileDialogImplPrivate; +class QQuickFileNameFilter; +class QQuickFolderBreadcrumbBar; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFileDialogImpl : public QQuickDialog +{ + Q_OBJECT + Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL) + Q_PROPERTY(QUrl selectedFile READ selectedFile WRITE setSelectedFile NOTIFY selectedFileChanged FINAL) + Q_PROPERTY(QStringList nameFilters READ nameFilters NOTIFY nameFiltersChanged FINAL) + Q_PROPERTY(QQuickFileNameFilter *selectedNameFilter READ selectedNameFilter CONSTANT) + Q_PROPERTY(QString fileName READ fileName WRITE setFileName NOTIFY selectedFileChanged FINAL) + Q_PROPERTY(QString currentFolderName READ currentFolderName NOTIFY selectedFileChanged FINAL) + QML_NAMED_ELEMENT(FileDialogImpl) + QML_ATTACHED(QQuickFileDialogImplAttached) + QML_ADDED_IN_VERSION(6, 2) + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + +public: + explicit QQuickFileDialogImpl(QObject *parent = nullptr); + + static QQuickFileDialogImplAttached *qmlAttachedProperties(QObject *object); + + enum class SetReason { + // Either user interaction or e.g. a change in ListView's currentIndex after changing its model. + External, + // As a result of the user setting an initial selectedFile. + Internal + }; + + QUrl currentFolder() const; + void setCurrentFolder(const QUrl ¤tFolder, SetReason setReason = SetReason::External); + + QUrl selectedFile() const; + void setSelectedFile(const QUrl &file); + void setInitialCurrentFolderAndSelectedFile(const QUrl &file); + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + QStringList nameFilters() const; + void resetNameFilters(); + + QQuickFileNameFilter *selectedNameFilter() const; + + void setAcceptLabel(const QString &label); + void setRejectLabel(const QString &label); + + QString fileName() const; + void setFileName(const QString &fileName); + + QString currentFolderName() const; + +public Q_SLOTS: + void selectNameFilter(const QString &filter); + +Q_SIGNALS: + void currentFolderChanged(const QUrl &folderUrl); + void selectedFileChanged(const QUrl &selectedFileUrl); + void nameFiltersChanged(); + void fileSelected(const QUrl &fileUrl); + void filterSelected(const QString &filter); + +private: + void componentComplete() override; + void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override; + + Q_DISABLE_COPY(QQuickFileDialogImpl) + Q_DECLARE_PRIVATE(QQuickFileDialogImpl) +}; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFileDialogImplAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox WRITE setButtonBox NOTIFY buttonBoxChanged FINAL) + Q_PROPERTY(QQuickComboBox *nameFiltersComboBox READ nameFiltersComboBox WRITE setNameFiltersComboBox NOTIFY nameFiltersComboBoxChanged) + Q_PROPERTY(QQuickListView *fileDialogListView READ fileDialogListView WRITE setFileDialogListView NOTIFY fileDialogListViewChanged) + Q_PROPERTY(QQuickFolderBreadcrumbBar *breadcrumbBar READ breadcrumbBar WRITE setBreadcrumbBar NOTIFY breadcrumbBarChanged) + Q_PROPERTY(QQuickLabel *fileNameLabel READ fileNameLabel WRITE setFileNameLabel NOTIFY fileNameLabelChanged FINAL) + Q_PROPERTY(QQuickTextField *fileNameTextField READ fileNameTextField WRITE setFileNameTextField NOTIFY fileNameTextFieldChanged FINAL) + Q_PROPERTY(QQuickDialog *overwriteConfirmationDialog READ overwriteConfirmationDialog WRITE setOverwriteConfirmationDialog NOTIFY overwriteConfirmationDialogChanged FINAL) + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + Q_MOC_INCLUDE() + +public: + explicit QQuickFileDialogImplAttached(QObject *parent = nullptr); + + QQuickDialogButtonBox *buttonBox() const; + void setButtonBox(QQuickDialogButtonBox *buttonBox); + + QQuickComboBox *nameFiltersComboBox() const; + void setNameFiltersComboBox(QQuickComboBox *nameFiltersComboBox); + + QString selectedNameFilter() const; + void selectNameFilter(const QString &filter); + + QQuickListView *fileDialogListView() const; + void setFileDialogListView(QQuickListView *fileDialogListView); + + QQuickFolderBreadcrumbBar *breadcrumbBar() const; + void setBreadcrumbBar(QQuickFolderBreadcrumbBar *breadcrumbBar); + + QQuickLabel *fileNameLabel() const; + void setFileNameLabel(QQuickLabel *fileNameLabel); + + QQuickTextField *fileNameTextField() const; + void setFileNameTextField(QQuickTextField *fileNameTextField); + + QQuickDialog *overwriteConfirmationDialog() const; + void setOverwriteConfirmationDialog(QQuickDialog *dialog); + +Q_SIGNALS: + void buttonBoxChanged(); + void nameFiltersComboBoxChanged(); + void fileDialogListViewChanged(); + void breadcrumbBarChanged(); + void fileNameLabelChanged(); + void fileNameTextFieldChanged(); + void overwriteConfirmationDialogChanged(); + +private: + Q_DISABLE_COPY(QQuickFileDialogImplAttached) + Q_DECLARE_PRIVATE(QQuickFileDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFILEDIALOGIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ac45ecf71e2796f7fd2ce87bf3ecc596448a2ffa --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfiledialogimpl_p_p.h @@ -0,0 +1,95 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFILEDIALOG_P_P_H +#define QQUICKFILEDIALOG_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +#include "qquickfiledialogimpl_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFileNameFilter; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFileDialogImplPrivate : public QQuickDialogPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickFileDialogImpl) + + QQuickFileDialogImplPrivate(); + + static QQuickFileDialogImplPrivate *get(QQuickFileDialogImpl *dialog) + { + return dialog->d_func(); + } + + QQuickFileDialogImplAttached *attachedOrWarn(); + + void setNameFilters(const QStringList &filters); + + void updateEnabled(); + void updateSelectedFile(const QString &oldFolderPath); + void updateFileNameTextEdit(); + static QDir::SortFlags fileListSortFlags(); + static QFileInfoList fileList(const QDir &dir); + void setFileDialogListViewCurrentIndex(int newCurrentIndex); + void tryUpdateFileDialogListViewCurrentIndex(int newCurrentIndex); + void fileDialogListViewCountChanged(); + + void handleAccept() override; + void handleClick(QQuickAbstractButton *button) override; + void selectFile(); + + QSharedPointer options; + QUrl currentFolder; + QUrl selectedFile; + QQuickAbstractButton *lastButtonClicked = nullptr; + QStringList nameFilters; + mutable QQuickFileNameFilter *selectedNameFilter = nullptr; + QString acceptLabel; + QString rejectLabel; + bool setCurrentIndexToInitiallySelectedFile = false; + QFileInfoList cachedFileList; + int pendingCurrentIndexToSet = -1; +}; + +class QQuickFileDialogImplAttachedPrivate : public QObjectPrivate +{ + void nameFiltersComboBoxItemActivated(int index); + void fileDialogListViewCurrentIndexChanged(); + void fileNameEditedByUser(); + void fileNameEditingByUserFinished(); + +public: + Q_DECLARE_PUBLIC(QQuickFileDialogImplAttached) + + QPointer buttonBox; + QPointer nameFiltersComboBox; + QPointer fileDialogListView; + QPointer breadcrumbBar; + QPointer fileNameLabel; + QPointer fileNameTextField; + QPointer overwriteConfirmationDialog; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFILEDIALOG_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8ac3cdd136a5bdc0219f34d7b328ec405f2d7620 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p.h @@ -0,0 +1,92 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOLDERBREADCRUMBBAR_P_H +#define QQUICKFOLDERBREADCRUMBBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qquickfiledialogimpl_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFolderBreadcrumbBarPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFolderBreadcrumbBar : public QQuickContainer +{ + Q_OBJECT + Q_PROPERTY(QQuickDialog *dialog READ dialog WRITE setDialog NOTIFY dialogChanged) + Q_PROPERTY(QQmlComponent *buttonDelegate READ buttonDelegate WRITE setButtonDelegate NOTIFY buttonDelegateChanged) + Q_PROPERTY(QQmlComponent *separatorDelegate READ separatorDelegate WRITE setSeparatorDelegate NOTIFY separatorDelegateChanged) + Q_PROPERTY(QQuickAbstractButton *upButton READ upButton WRITE setUpButton NOTIFY upButtonChanged) + Q_PROPERTY(QQuickTextField *textField READ textField WRITE setTextField NOTIFY textFieldChanged) + Q_PROPERTY(int upButtonSpacing READ upButtonSpacing WRITE setUpButtonSpacing NOTIFY upButtonSpacingChanged) + QML_NAMED_ELEMENT(FolderBreadcrumbBar) + QML_ADDED_IN_VERSION(6, 2) + +public: + explicit QQuickFolderBreadcrumbBar(QQuickItem *parent = nullptr); + + QQuickDialog *dialog() const; + void setDialog(QQuickDialog *dialog); + + QQmlComponent *buttonDelegate(); + void setButtonDelegate(QQmlComponent *delegate); + + QQmlComponent *separatorDelegate(); + void setSeparatorDelegate(QQmlComponent *delegate); + + QQuickAbstractButton *upButton(); + void setUpButton(QQuickAbstractButton *upButton); + + int upButtonSpacing() const; + void setUpButtonSpacing(int upButtonSpacing); + + QQuickTextField *textField(); + void setTextField(QQuickTextField *textField); + +Q_SIGNALS: + void dialogChanged(); + void buttonDelegateChanged(); + void separatorDelegateChanged(); + void upButtonChanged(); + void upButtonSpacingChanged(); + void textFieldChanged(); + +protected: + bool event(QEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &data) override; + + bool isContent(QQuickItem *item) const override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickFolderBreadcrumbBar) + Q_DECLARE_PRIVATE(QQuickFolderBreadcrumbBar) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOLDERBREADCRUMBBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..59df76a967cf16ea3e1bd470e1c597b9ace8f90b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderbreadcrumbbar_p_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOLDERBREADCRUMBBAR_P_P_H +#define QQUICKFOLDERBREADCRUMBBAR_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractButton; +class QQuickTextField; + +class QQuickFileDialogImpl; +class QQuickFolderDialogImpl; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFolderBreadcrumbBarPrivate : public QQuickContainerPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickFolderBreadcrumbBar) + + QQuickItem *createDelegateItem(QQmlComponent *component, const QVariantMap &initialProperties); + static QString folderBaseName(const QString &folderPath); + static QStringList crumbPathsForFolder(const QUrl &folder); + void repopulate(); + void crumbClicked(); + void folderChanged(); + + void cancelUpButton(); + void executeUpButton(bool complete = false); + void goUp(); + + void cancelTextField(); + void executeTextField(bool complete = false); + void toggleTextFieldVisibility(); + void textFieldAccepted(); + + void textFieldVisibleChanged(); + void textFieldActiveFocusChanged(); + void handleTextFieldShown(); + void handleTextFieldHidden(); + void ungrabEditPathShortcut(); + + QQuickFileDialogImpl *asFileDialog() const; + QQuickFolderDialogImpl *asFolderDialog() const; + bool isFileDialog() const; + QUrl dialogFolder() const; + void setDialogFolder(const QUrl &folder); + + qreal getContentWidth() const override; + qreal getContentHeight() const override; + void resizeContent() override; + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + +private: + QQuickDialog *dialog = nullptr; + QList folderPaths; + QQmlComponent *buttonDelegate = nullptr; + QQmlComponent *separatorDelegate = nullptr; + QQuickDeferredPointer upButton; + QQuickDeferredPointer textField; + int editPathToggleShortcutId = 0; +#if QT_CONFIG(shortcut) + int goUpShortcutId = 0; +#endif + int upButtonSpacing = 0; + bool repopulating = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOLDERBREADCRUMBBAR_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4e552d2476b1bc5b4d1c6a84ddbb2b83631a7e28 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p.h @@ -0,0 +1,98 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOLDERDIALOGIMPL_P_H +#define QQUICKFOLDERDIALOGIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This folder is not part of the Qt API. It exists purely as an +// implementation detail. This header folder may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickDialogButtonBox; + +class QQuickFolderDialogImplAttached; +class QQuickFolderDialogImplAttachedPrivate; +class QQuickFolderDialogImplPrivate; +class QQuickFolderBreadcrumbBar; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFolderDialogImpl : public QQuickDialog +{ + Q_OBJECT + Q_PROPERTY(QUrl currentFolder READ currentFolder WRITE setCurrentFolder NOTIFY currentFolderChanged FINAL) + Q_PROPERTY(QUrl selectedFolder READ selectedFolder WRITE setSelectedFolder NOTIFY selectedFolderChanged FINAL) + QML_NAMED_ELEMENT(FolderDialogImpl) + QML_ATTACHED(QQuickFolderDialogImplAttached) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickFolderDialogImpl(QObject *parent = nullptr); + + static QQuickFolderDialogImplAttached *qmlAttachedProperties(QObject *object); + + QUrl currentFolder() const; + void setCurrentFolder(const QUrl &folder); + + QUrl selectedFolder() const; + void setSelectedFolder(const QUrl &selectedFolder); + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + void setAcceptLabel(const QString &label); + void setRejectLabel(const QString &label); + +Q_SIGNALS: + void currentFolderChanged(const QUrl &folderUrl); + void selectedFolderChanged(const QUrl &folderUrl); + void nameFiltersChanged(); + +private: + void componentComplete() override; + void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override; + + Q_DISABLE_COPY(QQuickFolderDialogImpl) + Q_DECLARE_PRIVATE(QQuickFolderDialogImpl) +}; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFolderDialogImplAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickListView *folderDialogListView READ folderDialogListView WRITE setFolderDialogListView NOTIFY folderDialogListViewChanged) + Q_PROPERTY(QQuickFolderBreadcrumbBar *breadcrumbBar READ breadcrumbBar WRITE setBreadcrumbBar NOTIFY breadcrumbBarChanged) + Q_MOC_INCLUDE() + +public: + explicit QQuickFolderDialogImplAttached(QObject *parent = nullptr); + + QQuickListView *folderDialogListView() const; + void setFolderDialogListView(QQuickListView *folderDialogListView); + + QQuickFolderBreadcrumbBar *breadcrumbBar() const; + void setBreadcrumbBar(QQuickFolderBreadcrumbBar *breadcrumbBar); + +Q_SIGNALS: + void folderDialogListViewChanged(); + void breadcrumbBarChanged(); + +private: + Q_DISABLE_COPY(QQuickFolderDialogImplAttached) + Q_DECLARE_PRIVATE(QQuickFolderDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOLDERDIALOGIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..83f203403940021c2c60395ab6dd0b279a8f30d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfolderdialogimpl_p_p.h @@ -0,0 +1,68 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFOLDERDIALOG_P_P_H +#define QQUICKFOLDERDIALOG_P_P_H + +// +// W A R N I N G +// ------------- +// +// This Folder is not part of the Qt API. It exists purely as an +// implementation detail. This header Folder may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include "qquickfolderdialogimpl_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFolderDialogImplPrivate : public QQuickDialogPrivate +{ + Q_DECLARE_PUBLIC(QQuickFolderDialogImpl) + +public: + QQuickFolderDialogImplPrivate(); + + static QQuickFolderDialogImplPrivate *get(QQuickFolderDialogImpl *dialog) + { + return dialog->d_func(); + } + + QQuickFolderDialogImplAttached *attachedOrWarn(); + + void updateEnabled(); + void updateSelectedFolder(const QString &oldFolderPath); + + void handleAccept() override; + void handleClick(QQuickAbstractButton *button) override; + + QSharedPointer options; + QUrl currentFolder; + QUrl selectedFolder; + QString acceptLabel; + QString rejectLabel; +}; + +class QQuickFolderDialogImplAttachedPrivate : public QObjectPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickFolderDialogImplAttached) + + void folderDialogListViewCurrentIndexChanged(); + + QPointer buttonBox; + QPointer folderDialogListView; + QPointer breadcrumbBar; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFOLDERDIALOG_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bd57fbd12b7748158d20abbd16f3ad6601348452 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p.h @@ -0,0 +1,181 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFONTDIALOGIMPL_P_H +#define QQUICKFONTDIALOGIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickDialogButtonBox; + +class QQuickFontDialogImplAttached; +class QQuickFontDialogImplAttachedPrivate; +class QQuickFontDialogImplPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFontDialogImpl : public QQuickDialog +{ + Q_OBJECT + Q_PROPERTY(QFont currentFont READ currentFont WRITE setCurrentFont NOTIFY currentFontChanged FINAL) + QML_NAMED_ELEMENT(FontDialogImpl) + QML_ATTACHED(QQuickFontDialogImplAttached) + QML_ADDED_IN_VERSION(6, 2) + +public: + explicit QQuickFontDialogImpl(QObject *parent = nullptr); + + static QQuickFontDialogImplAttached *qmlAttachedProperties(QObject *object); + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + QFont currentFont() const; + void setCurrentFont(const QFont &font, bool selectInListViews = false); + + void init(); + +Q_SIGNALS: + void optionsChanged(); + void currentFontChanged(const QFont &font); + +private: + void keyReleaseEvent(QKeyEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + + Q_DISABLE_COPY(QQuickFontDialogImpl) + Q_DECLARE_PRIVATE(QQuickFontDialogImpl) +}; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickFontDialogImplAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickListView *familyListView READ familyListView WRITE setFamilyListView + NOTIFY familyListViewChanged) + Q_PROPERTY(QQuickListView *styleListView READ styleListView WRITE setStyleListView + NOTIFY styleListViewChanged) + Q_PROPERTY(QQuickListView *sizeListView READ sizeListView WRITE setSizeListView + NOTIFY sizeListViewChanged) + Q_PROPERTY(QQuickTextEdit *sampleEdit READ sampleEdit WRITE setSampleEdit + NOTIFY sampleEditChanged) + Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox WRITE setButtonBox + NOTIFY buttonBoxChanged) + Q_PROPERTY(QQuickComboBox *writingSystemComboBox READ writingSystemComboBox + WRITE setWritingSystemComboBox NOTIFY writingSystemComboBoxChanged) + Q_PROPERTY(QQuickCheckBox *underlineCheckBox READ underlineCheckBox WRITE setUnderlineCheckBox + NOTIFY underlineCheckBoxChanged) + Q_PROPERTY(QQuickCheckBox *strikeoutCheckBox READ strikeoutCheckBox WRITE setStrikeoutCheckBox + NOTIFY strikeoutCheckBoxChanged) + + Q_PROPERTY(QQuickTextField *familyEdit READ familyEdit WRITE setFamilyEdit + NOTIFY familyEditChanged) + Q_PROPERTY(QQuickTextField *styleEdit READ styleEdit WRITE setStyleEdit NOTIFY styleEditChanged) + Q_PROPERTY(QQuickTextField *sizeEdit READ sizeEdit WRITE setSizeEdit NOTIFY sizeEditChanged) + + Q_MOC_INCLUDE() + +public: + explicit QQuickFontDialogImplAttached(QObject *parent = nullptr); + + QQuickListView *familyListView() const; + void setFamilyListView(QQuickListView *familyListView); + + QQuickListView *styleListView() const; + void setStyleListView(QQuickListView *styleListView); + + QQuickListView *sizeListView() const; + void setSizeListView(QQuickListView *sizeListView); + + QQuickTextEdit *sampleEdit() const; + void setSampleEdit(QQuickTextEdit *sampleEdit); + + QQuickDialogButtonBox *buttonBox() const; + void setButtonBox(QQuickDialogButtonBox *buttonBox); + + QQuickComboBox *writingSystemComboBox() const; + void setWritingSystemComboBox(QQuickComboBox *writingSystemComboBox); + + QQuickCheckBox *underlineCheckBox() const; + void setUnderlineCheckBox(QQuickCheckBox *underlineCheckBox); + + QQuickCheckBox *strikeoutCheckBox() const; + void setStrikeoutCheckBox(QQuickCheckBox *strikethroughCheckBox); + + QQuickTextField *familyEdit() const; + void setFamilyEdit(QQuickTextField *familyEdit); + + QQuickTextField *styleEdit() const; + void setStyleEdit(QQuickTextField *styleEdit); + + QQuickTextField *sizeEdit() const; + void setSizeEdit(QQuickTextField *sizeEdit); + +Q_SIGNALS: + void buttonBoxChanged(); + void familyListViewChanged(); + void styleListViewChanged(); + void sizeListViewChanged(); + void sampleEditChanged(); + void writingSystemComboBoxChanged(); + void underlineCheckBoxChanged(); + void strikeoutCheckBoxChanged(); + void familyEditChanged(); + void styleEditChanged(); + void sizeEditChanged(); + +public: + void searchFamily(const QString &s) { searchListView(s, familyListView()); } + void searchStyle(const QString &s) { searchListView(s, styleListView()); } + void clearSearch(); + + void updateFamilies(); + void selectFontInListViews(const QFont &font); + +private: + void updateStyles(); + void updateSizes(); + + void _q_familyChanged(); + void _q_styleChanged(); + void _q_sizeEdited(); + void _q_sizeChanged(); + void _q_updateSample(); + + void _q_writingSystemChanged(int index); + + void searchListView(const QString &s, QQuickListView *listView); + + QFontDatabase::WritingSystem m_writingSystem; + QString m_selectedFamily; + QString m_selectedStyle; + QString m_search; + int m_selectedSize; + bool m_smoothlyScalable; + bool m_ignoreFamilyUpdate; + bool m_ignoreStyleUpdate; + + Q_DISABLE_COPY(QQuickFontDialogImplAttached) + Q_DECLARE_PRIVATE(QQuickFontDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFONTDIALOGIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8d3169d5aeeb17a8df8eec17352b550643b2e5b1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickfontdialogimpl_p_p.h @@ -0,0 +1,73 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFONTDIALOGIMPL_P_P_H +#define QQUICKFONTDIALOGIMPL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qquickfontdialogimpl_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFontDialogImplPrivate : public QQuickDialogPrivate +{ + Q_DECLARE_PUBLIC(QQuickFontDialogImpl) +public: + QQuickFontDialogImplPrivate(); + + static QQuickFontDialogImplPrivate *get(QQuickFontDialogImpl *dialog) + { + return dialog->d_func(); + } + + QQuickFontDialogImplAttached *attachedOrWarn(); + + void updateEnabled(); + + void handleAccept() override; + void handleClick(QQuickAbstractButton *button) override; + + QSharedPointer options; + + QFont currentFont; +}; + +class QQuickFontDialogImplAttachedPrivate : public QObjectPrivate +{ + void currentFontChanged(const QFont &font); + +public: + Q_DECLARE_PUBLIC(QQuickFontDialogImplAttached) + + QPointer buttonBox; + QPointer familyListView; + QPointer styleListView; + QPointer sizeListView; + QPointer sampleEdit; + QPointer writingSystemComboBox; + QPointer underlineCheckBox; + QPointer strikeoutCheckBox; + QPointer familyEdit; + QPointer styleEdit; + QPointer sizeEdit; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFONTDIALOGIMPL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5b71a7f250df08b9f0d603b65122e882edc36c9a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p.h @@ -0,0 +1,96 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMESSAGEDIALOGIMPL_P_H +#define QQUICKMESSAGEDIALOGIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickMessageDialogImplAttached; +class QQuickMessageDialogImplAttachedPrivate; +class QQuickMessageDialogImplPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickMessageDialogImpl : public QQuickDialog +{ + Q_OBJECT + Q_PROPERTY(QString text READ text NOTIFY optionsChanged) + Q_PROPERTY(QString informativeText READ informativeText NOTIFY optionsChanged) + Q_PROPERTY(QString detailedText READ detailedText NOTIFY optionsChanged) + Q_PROPERTY(bool showDetailedText READ showDetailedText NOTIFY showDetailedTextChanged) + QML_NAMED_ELEMENT(MessageDialogImpl) + QML_ATTACHED(QQuickMessageDialogImplAttached) + QML_ADDED_IN_VERSION(6, 3) +public: + explicit QQuickMessageDialogImpl(QObject *parent = nullptr); + + static QQuickMessageDialogImplAttached *qmlAttachedProperties(QObject *object); + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + bool showDetailedText() const; + QString text() const; + QString informativeText() const; + QString detailedText() const; + +Q_SIGNALS: + void buttonClicked(QPlatformDialogHelper::StandardButton button, + QPlatformDialogHelper::ButtonRole role); + void showDetailedTextChanged(); + void optionsChanged(); + +public Q_SLOTS: + void toggleShowDetailedText(); + +private: + Q_DISABLE_COPY(QQuickMessageDialogImpl) + Q_DECLARE_PRIVATE(QQuickMessageDialogImpl) +}; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickMessageDialogImplAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox WRITE setButtonBox NOTIFY + buttonBoxChanged) + Q_PROPERTY(QQuickButton *detailedTextButton READ detailedTextButton WRITE setDetailedTextButton + NOTIFY detailedTextButtonChanged) +public: + explicit QQuickMessageDialogImplAttached(QObject *parent = nullptr); + + QQuickDialogButtonBox *buttonBox() const; + void setButtonBox(QQuickDialogButtonBox *buttons); + + QQuickButton *detailedTextButton() const; + void setDetailedTextButton(QQuickButton *detailedTextButton); + +Q_SIGNALS: + void buttonBoxChanged(); + void detailedTextButtonChanged(); + +private: + Q_DISABLE_COPY(QQuickMessageDialogImplAttached) + Q_DECLARE_PRIVATE(QQuickMessageDialogImplAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMESSAGEDIALOGIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a70b791f402efc4e5fd18a7072911be40eabbde0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickmessagedialogimpl_p_p.h @@ -0,0 +1,56 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMESSAGEDIALOGIMPL_P_P_H +#define QQUICKMESSAGEDIALOGIMPL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This Folder is not part of the Qt API. It exists purely as an +// implementation detail. This header Folder may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qquickmessagedialogimpl_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class QQuickMessageDialogImplPrivate : public QQuickDialogPrivate +{ + Q_DECLARE_PUBLIC(QQuickMessageDialogImpl) + +public: + QQuickMessageDialogImplPrivate(); + + static QQuickMessageDialogImplPrivate *get(QQuickMessageDialogImpl *dialog) + { + return dialog->d_func(); + } + + QQuickMessageDialogImplAttached *attachedOrWarn(); + + void handleClick(QQuickAbstractButton *button) override; + + QSharedPointer options; + bool m_showDetailedText = false; +}; + +class QQuickMessageDialogImplAttachedPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickMessageDialogImplAttached) +public: + QPointer buttonBox; + QPointer detailedTextButton; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMESSAGEDIALOGIMPL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformcolordialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformcolordialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b9ae0c1583021dba3bc04a7d7467f03bc8641310 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformcolordialog_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMCOLORDIALOG_P_H +#define QQUICKPLATFORMCOLORDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickColorDialogImpl; +class QWindow; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickPlatformColorDialog + : public QPlatformColorDialogHelper +{ + Q_OBJECT + +public: + explicit QQuickPlatformColorDialog(QObject *parent); + ~QQuickPlatformColorDialog() = default; + + bool isValid() const; + + virtual void setCurrentColor(const QColor &color) override; + virtual QColor currentColor() const override; + + void exec() override; + bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; + void hide() override; + + QQuickColorDialogImpl *dialog() const; + +private: + QQuickColorDialogImpl *m_dialog = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMCOLORDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfiledialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfiledialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9750e7d44d66b318dad9d79132678ccd10600b2f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfiledialog_p.h @@ -0,0 +1,58 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMFILEDIALOG_P_H +#define QQUICKPLATFORMFILEDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFileDialogImpl; +class QWindow; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickPlatformFileDialog : public QPlatformFileDialogHelper +{ + Q_OBJECT + +public: + explicit QQuickPlatformFileDialog(QObject *parent); + ~QQuickPlatformFileDialog() = default; + + bool isValid() const; + bool defaultNameFilterDisables() const override; + void setDirectory(const QUrl &directory) override; + QUrl directory() const override; + void selectFile(const QUrl &file) override; + QList selectedFiles() const override; + void setFilter() override; + void selectNameFilter(const QString &filter) override; + QString selectedNameFilter() const override; + + void exec() override; + bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; + void hide() override; + + QQuickFileDialogImpl *dialog() const; + +private: + QQuickFileDialogImpl *m_dialog = nullptr; + QString m_pendingNameFilter; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMFILEDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfolderdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfolderdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bcd36498535cc96380d1bec69b9bdbb95c80c643 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfolderdialog_p.h @@ -0,0 +1,58 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMFOLDERDIALOG_P_H +#define QQUICKPLATFORMFOLDERDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This folder is not part of the Qt API. It exists purely as an +// implementation detail. This header folder may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qquickfolderdialogimpl_p.h" +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFileDialogImpl; +class QWindow; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickPlatformFolderDialog : public QPlatformFileDialogHelper +{ + Q_OBJECT + +public: + explicit QQuickPlatformFolderDialog(QObject *parent); + ~QQuickPlatformFolderDialog() = default; + + bool isValid() const; + bool defaultNameFilterDisables() const override; + void setDirectory(const QUrl &directory) override; + QUrl directory() const override; + void selectFile(const QUrl &file) override; + QList selectedFiles() const override; + void setFilter() override; + void selectNameFilter(const QString &filter) override; + QString selectedNameFilter() const override; + + void exec() override; + bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; + void hide() override; + + QQuickFolderDialogImpl *dialog() const; + +private: + QQuickFolderDialogImpl *m_dialog = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMFOLDERDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfontdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfontdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c14cc4008667da8e715c0ab2febc495275b4a846 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformfontdialog_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMFONTDIALOG_P_H +#define QQUICKPLATFORMFONTDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickFontDialogImpl; +class QWindow; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickPlatformFontDialog + : public QPlatformFontDialogHelper +{ + Q_OBJECT + +public: + explicit QQuickPlatformFontDialog(QObject *parent); + ~QQuickPlatformFontDialog() = default; + + bool isValid() const; + + virtual void setCurrentFont(const QFont &font) override; + virtual QFont currentFont() const override; + + void exec() override; + bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; + void hide() override; + + QQuickFontDialogImpl *dialog() const; + +private: + QQuickFontDialogImpl *m_dialog = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMFONTDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformmessagedialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformmessagedialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0de59d80388dce8df7514dd686c5343fe4cabe32 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquickplatformmessagedialog_p.h @@ -0,0 +1,48 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPLATFORMMESSAGEDIALOG_P_H +#define QQUICKPLATFORMMESSAGEDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include "qtquickdialogs2quickimplglobal_p.h" +#include "qquickmessagedialogimpl_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickPlatformMessageDialog + : public QPlatformMessageDialogHelper +{ + Q_OBJECT + +public: + explicit QQuickPlatformMessageDialog(QObject *parent); + ~QQuickPlatformMessageDialog() = default; + + bool isValid() const; + + void exec() override; + bool show(Qt::WindowFlags flags, Qt::WindowModality modality, QWindow *parent) override; + void hide() override; + + QQuickMessageDialogImpl *dialog() const; + +private: + QQuickMessageDialogImpl *m_dialog = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPLATFORMMESSAGEDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquicksaturationlightnesspicker_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquicksaturationlightnesspicker_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9a5e01dc91287644ef4b59c74ce0f11c092615e6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qquicksaturationlightnesspicker_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSATURATIONLIGHTNESSPICKER_P_H +#define QQUICKSATURATIONLIGHTNESSPICKER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickabstractcolorpicker_p.h" +#include "qtquickdialogs2quickimplglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickSaturationLightnessPickerPrivate; + +class Q_QUICKDIALOGS2QUICKIMPL_EXPORT QQuickSaturationLightnessPicker + : public QQuickAbstractColorPicker +{ + Q_OBJECT + QML_NAMED_ELEMENT(SaturationLightnessPickerImpl) + +public: + explicit QQuickSaturationLightnessPicker(QQuickItem *parent = nullptr); + +protected: + QColor colorAt(const QPointF &pos) override; + +private: + Q_DISABLE_COPY(QQuickSaturationLightnessPicker) + Q_DECLARE_PRIVATE(QQuickSaturationLightnessPicker) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSATURATIONLIGHTNESSPICKER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplforeign_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplforeign_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b8cbd73dbb47cddc9bf093a24c3c6d78da54f962 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplforeign_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKDIALOGS2QUICKIMPLFOREIGN_P_H +#define QTQUICKDIALOGS2QUICKIMPLFOREIGN_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +struct QQuickFileNameFilterQuickDialogs2QuickImplForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickFileNameFilter) + QML_ADDED_IN_VERSION(6, 2) +}; + +// TODO: remove these ones when not needed (QTBUG-88179) + +// verticalPadding, etc. +struct QQuickControlForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickControl) + QML_ADDED_IN_VERSION(2, 0) +}; + +struct QQuickAbstractButtonForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickAbstractButton) + QML_ADDED_IN_VERSION(2, 0) +}; + +struct QQuickIconForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickIcon) + QML_ADDED_IN_VERSION(6, 2) +}; + +// For leftInset, etc. +struct QQuickPopupForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickPopup) + QML_ADDED_IN_VERSION(2, 0) +}; + +struct QQuickDialogForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickDialog) + QML_ADDED_IN_VERSION(2, 1) +}; + +QT_END_NAMESPACE + +#endif // QTQUICKDIALOGS2QUICKIMPLFOREIGN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a7c5a0653ff51df0d5ef5091d0bd7fcfc3f545a4 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2QuickImpl/6.8.1/QtQuickDialogs2QuickImpl/private/qtquickdialogs2quickimplglobal_p.h @@ -0,0 +1,22 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKDIALOGS2QUICKIMPLGLOBAL_P_H +#define QTQUICKDIALOGS2QUICKIMPLGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#endif // QTQUICKDIALOGS2QUICKIMPLGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickdialogtype_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickdialogtype_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d51d3141abbb37b4519c0a1cb6e1a9ac91ea8952 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickdialogtype_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIALOGTYPE_P_H +#define QQUICKDIALOGTYPE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +// We need our own type for the extra FolderDialog value, so that we can load FolderDialog.qml, +// otherwise we would just use QPlatformTheme::DialogType and then we wouldn't need this. +enum class QQuickDialogType { + FileDialog, + ColorDialog, + FontDialog, + MessageDialog, + FolderDialog +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIALOGTYPE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickfilenamefilter_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickfilenamefilter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cdf668ac55eb31e8a7ef3b4b57c5f19a4e4b0fe7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qquickfilenamefilter_p.h @@ -0,0 +1,69 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFILENAMEFILTER_P_H +#define QQUICKFILENAMEFILTER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +#include "qtquickdialogs2utilsglobal_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKDIALOGS2UTILS_EXPORT QQuickFileNameFilter : public QObject +{ + Q_OBJECT + Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged FINAL) + Q_PROPERTY(QString name READ name NOTIFY nameChanged FINAL) + Q_PROPERTY(QStringList extensions READ extensions NOTIFY extensionsChanged FINAL) + Q_PROPERTY(QStringList globs READ globs NOTIFY globsChanged FINAL) + +public: + explicit QQuickFileNameFilter(QObject *parent = nullptr); + + int index() const; + void setIndex(int index); + + QString name() const; + QStringList extensions() const; + QStringList globs() const; + + QSharedPointer options() const; + void setOptions(const QSharedPointer &options); + + void update(const QString &filter); + +Q_SIGNALS: + void indexChanged(int index); + void nameChanged(const QString &name); + void extensionsChanged(const QStringList &extensions); + void globsChanged(const QStringList &globs); + +private: + QStringList nameFilters() const; + QString nameFilter(int index) const; + + int m_index; + QString m_name; + QStringList m_extensions; + QStringList m_globs; + QSharedPointer m_options; +}; + +QT_END_NAMESPACE + +#endif // QQUICKFILENAMEFILTER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qtquickdialogs2utilsglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qtquickdialogs2utilsglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a72a9b8b7a7cb812da4e5fecdc08946dfe3e664c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickDialogs2Utils/6.8.1/QtQuickDialogs2Utils/private/qtquickdialogs2utilsglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKDIALOGS2UTILSGLOBAL_P_H +#define QTQUICKDIALOGS2UTILSGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#endif // QTQUICKDIALOGS2UTILSUTILSGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qgfxsourceproxy_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qgfxsourceproxy_p.h new file mode 100644 index 0000000000000000000000000000000000000000..330cb7b70d8b394724112cf401ca3bdd4c9abcf5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qgfxsourceproxy_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2016 Jolla Ltd, author: +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QGFXSOURCEPROXY_P_H +#define QGFXSOURCEPROXY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShaderEffectSource; + +class QGfxSourceProxyME : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickItem *input READ input WRITE setInput NOTIFY inputChanged RESET resetInput FINAL) + Q_PROPERTY(QQuickItem *output READ output NOTIFY outputChanged FINAL) + Q_PROPERTY(QRectF sourceRect READ sourceRect WRITE setSourceRect NOTIFY sourceRectChanged FINAL) + Q_PROPERTY(bool active READ isActive NOTIFY activeChanged FINAL) + Q_PROPERTY(Interpolation interpolation READ interpolation WRITE setInterpolation NOTIFY interpolationChanged FINAL) + +public: + enum class Interpolation { + Any, + Nearest, + Linear + }; + Q_ENUM(Interpolation) + + QGfxSourceProxyME(QQuickItem *parentItem = nullptr); + ~QGfxSourceProxyME(); + + QQuickItem *input() const { return m_input; } + void setInput(QQuickItem *input); + void resetInput() { setInput(nullptr); } + + QQuickItem *output() const { return m_output; } + + QRectF sourceRect() const { return m_sourceRect; } + void setSourceRect(const QRectF &sourceRect); + + bool isActive() const { return m_output && m_output != m_input; } + + void setInterpolation(Interpolation i); + Interpolation interpolation() const { return m_interpolation; } + +protected: + void updatePolish() override; + +Q_SIGNALS: + void inputChanged(); + void outputChanged(); + void sourceRectChanged(); + void activeChanged(); + void interpolationChanged(); + +private Q_SLOTS: + void repolish(); + +private: + void setOutput(QQuickItem *output); + void useProxy(); + static QObject *findLayer(QQuickItem *); + + QRectF m_sourceRect; + QQuickItem *m_input = nullptr; + QQuickItem *m_output = nullptr; + QQuickShaderEffectSource *m_proxy = nullptr; + + Interpolation m_interpolation = Interpolation::Any; +}; + +QT_END_NAMESPACE + +#endif // QGFXSOURCEPROXY_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a31b07d3d0585afb8bc1d73ca752fcb3329f5a9c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p.h @@ -0,0 +1,200 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMULTIEFFECT_H +#define QQUICKMULTIEFFECT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include "qtquickeffectsglobal_p.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMultiEffectPrivate; + +class Q_QUICKEFFECTS_EXPORT QQuickMultiEffect : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickItem *source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(bool autoPaddingEnabled READ autoPaddingEnabled WRITE setAutoPaddingEnabled NOTIFY autoPaddingEnabledChanged) + Q_PROPERTY(QRectF paddingRect READ paddingRect WRITE setPaddingRect NOTIFY paddingRectChanged) + Q_PROPERTY(qreal brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged) + Q_PROPERTY(qreal contrast READ contrast WRITE setContrast NOTIFY contrastChanged) + Q_PROPERTY(qreal saturation READ saturation WRITE setSaturation NOTIFY saturationChanged) + Q_PROPERTY(qreal colorization READ colorization WRITE setColorization NOTIFY colorizationChanged) + Q_PROPERTY(QColor colorizationColor READ colorizationColor WRITE setColorizationColor NOTIFY colorizationColorChanged) + Q_PROPERTY(bool blurEnabled READ blurEnabled WRITE setBlurEnabled NOTIFY blurEnabledChanged) + Q_PROPERTY(qreal blur READ blur WRITE setBlur NOTIFY blurChanged) + Q_PROPERTY(int blurMax READ blurMax WRITE setBlurMax NOTIFY blurMaxChanged) + Q_PROPERTY(qreal blurMultiplier READ blurMultiplier WRITE setBlurMultiplier NOTIFY blurMultiplierChanged) + Q_PROPERTY(bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled NOTIFY shadowEnabledChanged) + Q_PROPERTY(qreal shadowOpacity READ shadowOpacity WRITE setShadowOpacity NOTIFY shadowOpacityChanged) + Q_PROPERTY(qreal shadowBlur READ shadowBlur WRITE setShadowBlur NOTIFY shadowBlurChanged) + Q_PROPERTY(qreal shadowHorizontalOffset READ shadowHorizontalOffset WRITE setShadowHorizontalOffset NOTIFY shadowHorizontalOffsetChanged) + Q_PROPERTY(qreal shadowVerticalOffset READ shadowVerticalOffset WRITE setShadowVerticalOffset NOTIFY shadowVerticalOffsetChanged) + Q_PROPERTY(QColor shadowColor READ shadowColor WRITE setShadowColor NOTIFY shadowColorChanged) + Q_PROPERTY(qreal shadowScale READ shadowScale WRITE setShadowScale NOTIFY shadowScaleChanged) + Q_PROPERTY(bool maskEnabled READ maskEnabled WRITE setMaskEnabled NOTIFY maskEnabledChanged) + Q_PROPERTY(QQuickItem *maskSource READ maskSource WRITE setMaskSource NOTIFY maskSourceChanged) + Q_PROPERTY(qreal maskThresholdMin READ maskThresholdMin WRITE setMaskThresholdMin NOTIFY maskThresholdMinChanged) + Q_PROPERTY(qreal maskSpreadAtMin READ maskSpreadAtMin WRITE setMaskSpreadAtMin NOTIFY maskSpreadAtMinChanged) + Q_PROPERTY(qreal maskThresholdMax READ maskThresholdMax WRITE setMaskThresholdMax NOTIFY maskThresholdMaxChanged) + Q_PROPERTY(qreal maskSpreadAtMax READ maskSpreadAtMax WRITE setMaskSpreadAtMax NOTIFY maskSpreadAtMaxChanged) + Q_PROPERTY(bool maskInverted READ maskInverted WRITE setMaskInverted NOTIFY maskInvertedChanged) + Q_PROPERTY(QRectF itemRect READ itemRect NOTIFY itemRectChanged) + Q_PROPERTY(QString fragmentShader READ fragmentShader NOTIFY fragmentShaderChanged) + Q_PROPERTY(QString vertexShader READ vertexShader NOTIFY vertexShaderChanged) + Q_PROPERTY(bool hasProxySource READ hasProxySource NOTIFY hasProxySourceChanged) + QML_NAMED_ELEMENT(MultiEffect) + QML_ADDED_IN_VERSION(6, 5) + +public: + QQuickMultiEffect(QQuickItem *parent = nullptr); + ~QQuickMultiEffect() override; + + QQuickItem *source() const; + void setSource(QQuickItem *item); + + bool autoPaddingEnabled() const; + void setAutoPaddingEnabled(bool enabled); + + QRectF paddingRect() const; + void setPaddingRect(const QRectF &rect); + + qreal brightness() const; + void setBrightness(qreal brightness); + + qreal contrast() const; + void setContrast(qreal contrast); + + qreal saturation() const; + void setSaturation(qreal saturation); + + qreal colorization() const; + void setColorization(qreal colorization); + + QColor colorizationColor() const; + void setColorizationColor(const QColor &color); + + bool blurEnabled() const; + void setBlurEnabled(bool enabled); + + qreal blur() const; + void setBlur(qreal blur); + + int blurMax() const; + void setBlurMax(int blurMax); + + qreal blurMultiplier() const; + void setBlurMultiplier(qreal blurMultiplier); + + bool shadowEnabled() const; + void setShadowEnabled(bool enabled); + + qreal shadowOpacity() const; + void setShadowOpacity(qreal shadowOpacity); + + qreal shadowBlur() const; + void setShadowBlur(qreal shadowBlur); + + qreal shadowHorizontalOffset() const; + void setShadowHorizontalOffset(qreal offset); + + qreal shadowVerticalOffset() const; + void setShadowVerticalOffset(qreal offset); + + QColor shadowColor() const; + void setShadowColor(const QColor &color); + + qreal shadowScale() const; + void setShadowScale(qreal shadowScale); + + bool maskEnabled() const; + void setMaskEnabled(bool enabled); + + QQuickItem *maskSource() const; + void setMaskSource(QQuickItem *item); + + qreal maskThresholdMin() const; + void setMaskThresholdMin(qreal threshold); + + qreal maskSpreadAtMin() const; + void setMaskSpreadAtMin(qreal spread); + + qreal maskThresholdMax() const; + void setMaskThresholdMax(qreal threshold); + + qreal maskSpreadAtMax() const; + void setMaskSpreadAtMax(qreal spread); + + bool maskInverted() const; + void setMaskInverted(bool inverted); + + QRectF itemRect() const; + QString fragmentShader() const; + QString vertexShader() const; + bool hasProxySource() const; + +Q_SIGNALS: + void shaderChanged(); + void itemSizeChanged(); + void sourceChanged(); + void autoPaddingEnabledChanged(); + void paddingRectChanged(); + void brightnessChanged(); + void contrastChanged(); + void saturationChanged(); + void colorizationChanged(); + void colorizationColorChanged(); + void blurEnabledChanged(); + void blurChanged(); + void blurMaxChanged(); + void blurMultiplierChanged(); + void shadowEnabledChanged(); + void shadowOpacityChanged(); + void shadowBlurChanged(); + void shadowHorizontalOffsetChanged(); + void shadowVerticalOffsetChanged(); + void shadowColorChanged(); + void shadowScaleChanged(); + void maskEnabledChanged(); + void maskSourceChanged(); + void maskThresholdMinChanged(); + void maskSpreadAtMinChanged(); + void maskThresholdMaxChanged(); + void maskSpreadAtMaxChanged(); + void maskInvertedChanged(); + void itemRectChanged(); + void fragmentShaderChanged(); + void vertexShaderChanged(); + void hasProxySourceChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + +private: + Q_DECLARE_PRIVATE(QQuickMultiEffect) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMULTIEFFECT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2d1214ed5939007e217377ef6c81e6d4ee840289 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qquickmultieffect_p_p.h @@ -0,0 +1,192 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMULTIEFFECT_P_P_H +#define QQUICKMULTIEFFECT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_shadereffect); + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShaderEffect; +class QQuickShaderEffectSource; + +class QQuickMultiEffectPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickMultiEffect) + +public: + QQuickMultiEffectPrivate(); + ~QQuickMultiEffectPrivate(); + + QQuickItem *source() const; + void setSource(QQuickItem *item); + + bool autoPaddingEnabled() const; + void setAutoPaddingEnabled(bool enabled); + + QRectF paddingRect() const; + void setPaddingRect(const QRectF &rect); + + qreal brightness() const; + void setBrightness(qreal brightness); + + qreal contrast() const; + void setContrast(qreal contrast); + + qreal saturation() const; + void setSaturation(qreal saturation); + + qreal colorization() const; + void setColorization(qreal colorization); + + QColor colorizationColor() const; + void setColorizationColor(const QColor &color); + + bool blurEnabled() const; + void setBlurEnabled(bool enabled); + + qreal blur() const; + void setBlur(qreal blur); + + int blurMax() const; + void setBlurMax(int blurMax); + + qreal blurMultiplier() const; + void setBlurMultiplier(qreal blurMultiplier); + + bool shadowEnabled() const; + void setShadowEnabled(bool enabled); + + qreal shadowOpacity() const; + void setShadowOpacity(qreal shadowOpacity); + + qreal shadowBlur() const; + void setShadowBlur(qreal shadowBlur); + + qreal shadowHorizontalOffset() const; + void setShadowHorizontalOffset(qreal offset); + + qreal shadowVerticalOffset() const; + void setShadowVerticalOffset(qreal offset); + + QColor shadowColor() const; + void setShadowColor(const QColor &color); + + qreal shadowScale() const; + void setShadowScale(qreal shadowScale); + + bool maskEnabled() const; + void setMaskEnabled(bool enabled); + + QQuickItem *maskSource() const; + void setMaskSource(QQuickItem *item); + + qreal maskThresholdMin() const; + void setMaskThresholdMin(qreal threshold); + + qreal maskSpreadAtMin() const; + void setMaskSpreadAtMin(qreal spread); + + qreal maskThresholdMax() const; + void setMaskThresholdMax(qreal threshold); + + qreal maskSpreadAtMax() const; + void setMaskSpreadAtMax(qreal spread); + + bool maskInverted() const; + void setMaskInverted(bool inverted); + + QRectF itemRect() const; + QString fragmentShader() const; + QString vertexShader() const; + bool hasProxySource() const; + + void handleGeometryChange(const QRectF &newGeometry, const QRectF &oldGeometry); + void handleItemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value); + void initialize(); + void updateMaskThresholdSpread(); + void updateCenterOffset(); + void updateShadowOffset(); + void updateColorizationColor(); + void updateShadowColor(); + float calculateLod(float blurAmount); + float blurWeight(float v); + void getBlurWeights(float blurLod, QVector4D &blurWeight1, QVector2D &blurWeight2); + void updateBlurWeights(); + void updateShadowBlurWeights(); + void updateBlurItemSizes(bool forceUpdate = false); + void updateEffectShaders(); + void updateBlurLevel(bool forceUpdate = false); + void updateBlurItemsAmount(int blurLevel); + void updateSourcePadding(); + void updateProxyActiveCheck(); + void proxyOutputChanged(); + +private: + bool m_initialized = false; + QQuickItem *m_sourceItem = nullptr; + QGfxSourceProxyME *m_shaderSource = nullptr; + QQuickShaderEffect *m_shaderEffect = nullptr; + QQuickShaderEffectSource *m_dummyShaderSource = nullptr; + QVector m_blurEffects; + bool m_autoPaddingEnabled = true; + QRectF m_paddingRect; + qreal m_brightness = 0.0; + qreal m_contrast = 0.0; + qreal m_saturation = 0.0; + qreal m_colorization = 0.0; + QColor m_colorizationColor = { 255, 0, 0, 255 }; + bool m_blurEnabled = false; + qreal m_blur = 0.0; + int m_blurMax = 32; + qreal m_blurMultiplier = 0.0; + bool m_shadowEnabled = false; + qreal m_shadowOpacity = 1.0; + qreal m_shadowBlur = 1.0; + qreal m_shadowHorizontalOffset = 0.0; + qreal m_shadowVerticalOffset = 0.0; + QColor m_shadowColor = { 0, 0, 0, 255 }; + qreal m_shadowScale = 1.0; + bool m_maskEnabled = false; + QQuickItem *m_maskSourceItem = nullptr; + qreal m_maskThresholdMin = 0.0; + qreal m_maskSpreadAtMin = 0.0; + qreal m_maskThresholdMax = 1.0; + qreal m_maskSpreadAtMax = 0.0; + bool m_maskInverted = false; + + int m_blurLevel = 0; + QString m_vertShader; + QString m_fragShader; + QSizeF m_firstBlurItemSize; + + QVector4D m_blurWeight1; + QVector2D m_blurWeight2; + QVector4D m_shadowBlurWeight1; + QVector2D m_shadowBlurWeight2; +}; + + + +QT_END_NAMESPACE + +#endif // QQUICKMULTIEFFECT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qtquickeffectsglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qtquickeffectsglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c6a3ed5ccd67057727d1d69e3f71698ee0e59c16 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickEffects/6.8.1/QtQuickEffects/private/qtquickeffectsglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKEFFECTSGLOBAL_P_H +#define QTQUICKEFFECTSGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#endif // QTQUICKEFFECTSGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickgridlayoutengine_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickgridlayoutengine_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2745806ddb92606cbe25faf3c3d35444de8ecde6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickgridlayoutengine_p.h @@ -0,0 +1,132 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGRIDLAYOUTENGINE_P_H +#define QQUICKGRIDLAYOUTENGINE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the graphics view layout classes. This header +// file may change from version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qquickitem.h" +#include "qquicklayout_p.h" +#include "qdebug.h" +QT_BEGIN_NAMESPACE + +class QQuickGridLayoutItem : public QGridLayoutItem { +public: + QQuickGridLayoutItem(QQuickItem *item, int row, int column, + int rowSpan = 1, int columnSpan = 1, Qt::Alignment alignment = { }) + : QGridLayoutItem(row, column, rowSpan, columnSpan, alignment), m_item(item), sizeHintCacheDirty(true), useFallbackToWidthOrHeight(true) {} + + + QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const override + { + Q_UNUSED(constraint); // Quick Layouts does not support constraint atm + return effectiveSizeHints()[which]; + } + + QSizeF *effectiveSizeHints() const + { + if (!sizeHintCacheDirty) + return cachedSizeHints; + + QQuickLayout::effectiveSizeHints_helper(m_item, cachedSizeHints, nullptr, useFallbackToWidthOrHeight); + useFallbackToWidthOrHeight = false; + + sizeHintCacheDirty = false; + return cachedSizeHints; + } + + void setCachedSizeHints(QSizeF *sizeHints) + { + for (int i = 0; i < Qt::NSizeHints; ++i) { + cachedSizeHints[i] = sizeHints[i]; + } + sizeHintCacheDirty = false; + } + + void invalidate() + { + qCDebug(lcQuickLayouts) << "QQuickGridLayoutItem::invalidate()"; + sizeHintCacheDirty = true; + } + + QLayoutPolicy::Policy sizePolicy(Qt::Orientation orientation) const override + { + return QQuickLayout::effectiveSizePolicy_helper(m_item, orientation, attachedLayoutObject(m_item, false)); + } + + void setGeometry(const QRectF &rect) override + { + QQuickLayoutAttached *info = attachedLayoutObject(m_item, false); + const QRectF r = info ? rect.marginsRemoved(info->effectiveQMargins()) : rect; + const QSizeF oldSize(m_item->width(), m_item->height()); + const QSizeF newSize = r.size(); + m_item->setPosition(r.topLeft()); + if (newSize == oldSize) { + // We need to enforce a rearrange when the geometry is the same + if (QQuickLayout *lay = qobject_cast(m_item)) { + if (lay->invalidatedArrangement()) + lay->rearrange(newSize); + } + } else { + m_item->setSize(newSize); + } + } + + inline virtual QString toString() const override { return QDebug::toString(m_item); } + + QQuickItem *layoutItem() const { return m_item; } + + QQuickItem *m_item; +private: + mutable QSizeF cachedSizeHints[Qt::NSizeHints]; + mutable unsigned sizeHintCacheDirty : 1; + mutable unsigned useFallbackToWidthOrHeight : 1; +}; + +class QQuickGridLayoutEngine : public QGridLayoutEngine { +public: + QQuickGridLayoutEngine() : QGridLayoutEngine(Qt::AlignVCenter, true /*snapToPixelGrid*/) { } + + int indexOf(QQuickItem *item) const { + for (int i = 0; i < q_items.size(); ++i) { + if (item == static_cast(q_items.at(i))->layoutItem()) + return i; + } + return -1; + } + + QQuickGridLayoutItem *findLayoutItem(QQuickItem *layoutItem) const + { + for (int i = q_items.size() - 1; i >= 0; --i) { + QQuickGridLayoutItem *item = static_cast(q_items.at(i)); + if (item->layoutItem() == layoutItem) + return item; + } + return 0; + } + + void setAlignment(QQuickItem *quickItem, Qt::Alignment alignment); + + void setStretchFactor(QQuickItem *quickItem, int stretch, Qt::Orientation orientation); + +}; + + + +QT_END_NAMESPACE + +#endif // QQUICKGRIDLAYOUTENGINE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayout_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayout_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e6b23974606b20d8fcc483ec651ae4ee0df726cf --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayout_p.h @@ -0,0 +1,420 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLAYOUT_P_H +#define QQUICKLAYOUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickLayoutAttached; +Q_DECLARE_LOGGING_CATEGORY(lcQuickLayouts) + +class QQuickLayoutPrivate; +class Q_QUICKLAYOUTS_EXPORT QQuickLayout : public QQuickItem, public QQuickItemChangeListener + +{ + Q_OBJECT + QML_NAMED_ELEMENT(Layout) + QML_ADDED_IN_VERSION(1, 0) + QML_UNCREATABLE("Do not create objects of type Layout.") + QML_ATTACHED(QQuickLayoutAttached) + +public: + enum SizeHint { + MinimumSize = 0, + PreferredSize, + MaximumSize, + NSizes + }; + + enum EnsureLayoutItemsUpdatedOption { + Recursive = 0b001, + ApplySizeHints = 0b010 + }; + + enum SizePolicy { + SizePolicyImplicit = 1, + SizePolicyExplicit + }; + Q_ENUM(SizePolicy) + + Q_DECLARE_FLAGS(EnsureLayoutItemsUpdatedOptions, EnsureLayoutItemsUpdatedOption) + + explicit QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent = nullptr); + ~QQuickLayout(); + + static QQuickLayoutAttached *qmlAttachedProperties(QObject *object); + + + void componentComplete() override; + virtual QSizeF sizeHint(Qt::SizeHint whichSizeHint) const = 0; + virtual void setAlignment(QQuickItem *item, Qt::Alignment align) = 0; + virtual void setStretchFactor(QQuickItem *item, int stretchFactor, Qt::Orientation orient) = 0; + + virtual void invalidate(QQuickItem * childItem = nullptr); + virtual void updateLayoutItems() = 0; + + void ensureLayoutItemsUpdated(EnsureLayoutItemsUpdatedOptions options = {}) const; + + // iterator + virtual QQuickItem *itemAt(int index) const = 0; + virtual int itemCount() const = 0; + + virtual void rearrange(const QSizeF &); + + static void effectiveSizeHints_helper(QQuickItem *item, QSizeF *cachedSizeHints, QQuickLayoutAttached **info, bool useFallbackToWidthOrHeight); + static QLayoutPolicy::Policy effectiveSizePolicy_helper(QQuickItem *item, Qt::Orientation orientation, QQuickLayoutAttached *info); + bool shouldIgnoreItem(QQuickItem *child) const; + void checkAnchors(QQuickItem *item) const; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + bool isReady() const; + void deactivateRecur(); + + bool invalidated() const; + bool invalidatedArrangement() const; + bool isMirrored() const; + + /* QQuickItemChangeListener */ + void itemSiblingOrderChanged(QQuickItem *item) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + void itemVisibilityChanged(QQuickItem *item) override; + + void maybeSubscribeToBaseLineOffsetChanges(QQuickItem *item); + + Q_INVOKABLE void _q_dumpLayoutTree() const; + void dumpLayoutTreeRecursive(int level, QString &buf) const; + +protected: + void updatePolish() override; + + enum Orientation { + Vertical = 0, + Horizontal, + NOrientations + }; + +protected Q_SLOTS: + void invalidateSenderItem(); + +private: + unsigned m_inUpdatePolish : 1; + unsigned m_polishInsideUpdatePolish : 2; + + Q_DECLARE_PRIVATE(QQuickLayout) + + friend class QQuickLayoutAttached; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickLayout::EnsureLayoutItemsUpdatedOptions) + +class QQuickLayoutPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickLayout) +public: + QQuickLayoutPrivate() : m_dirty(true) + , m_dirtyArrangement(true) + , m_isReady(false) + , m_disableRearrange(true) + , m_hasItemChangeListeners(false) {} + + void applySizeHints() const; + +protected: + /* m_dirty == true means that something in the layout was changed, + but its state has not been synced to the internal grid layout engine. It is usually: + 1. A child item was added or removed from the layout (or made visible/invisble) + 2. A child item got one of its size hints changed + */ + mutable unsigned m_dirty : 1; + /* m_dirtyArrangement == true means that the layout still needs a rearrange despite that + * m_dirty == false. This is only used for the case that a layout has been invalidated, + * but its new size is the same as the old size (in that case the child layout won't get + * a geometryChanged() notification, which rearrange() usually reacts to) + */ + mutable unsigned m_dirtyArrangement : 1; + unsigned m_isReady : 1; + unsigned m_disableRearrange : 1; + unsigned m_hasItemChangeListeners : 1; // if false, we don't need to remove its item change listeners... +}; + + +class Q_QUICKLAYOUTS_EXPORT QQuickLayoutAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth NOTIFY minimumWidthChanged FINAL) + Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight NOTIFY minimumHeightChanged FINAL) + Q_PROPERTY(qreal preferredWidth READ preferredWidth WRITE setPreferredWidth NOTIFY preferredWidthChanged FINAL) + Q_PROPERTY(qreal preferredHeight READ preferredHeight WRITE setPreferredHeight NOTIFY preferredHeightChanged FINAL) + Q_PROPERTY(qreal maximumWidth READ maximumWidth WRITE setMaximumWidth NOTIFY maximumWidthChanged FINAL) + Q_PROPERTY(qreal maximumHeight READ maximumHeight WRITE setMaximumHeight NOTIFY maximumHeightChanged FINAL) + Q_PROPERTY(bool fillHeight READ fillHeight WRITE setFillHeight NOTIFY fillHeightChanged FINAL) + Q_PROPERTY(bool fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged FINAL) + Q_PROPERTY(QQuickLayout::SizePolicy useDefaultSizePolicy READ useDefaultSizePolicy WRITE setUseDefaultSizePolicy NOTIFY useDefaultSizePolicyChanged FINAL REVISION(6, 8)) + Q_PROPERTY(int row READ row WRITE setRow NOTIFY rowChanged FINAL) + Q_PROPERTY(int column READ column WRITE setColumn NOTIFY columnChanged FINAL) + Q_PROPERTY(int rowSpan READ rowSpan WRITE setRowSpan NOTIFY rowSpanChanged FINAL) + Q_PROPERTY(int columnSpan READ columnSpan WRITE setColumnSpan NOTIFY columnSpanChanged FINAL) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged FINAL) + Q_PROPERTY(int horizontalStretchFactor READ horizontalStretchFactor WRITE setHorizontalStretchFactor NOTIFY horizontalStretchFactorChanged FINAL) + Q_PROPERTY(int verticalStretchFactor READ verticalStretchFactor WRITE setVerticalStretchFactor NOTIFY verticalStretchFactorChanged FINAL) + + Q_PROPERTY(qreal margins READ margins WRITE setMargins NOTIFY marginsChanged FINAL) + Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin RESET resetLeftMargin NOTIFY leftMarginChanged FINAL) + Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin RESET resetTopMargin NOTIFY topMarginChanged FINAL) + Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL) + Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin RESET resetBottomMargin NOTIFY bottomMarginChanged FINAL) + +public: + QQuickLayoutAttached(QObject *object); + + qreal minimumWidth() const { return !m_isMinimumWidthSet ? sizeHint(Qt::MinimumSize, Qt::Horizontal) : m_minimumWidth; } + void setMinimumWidth(qreal width); + bool isMinimumWidthSet() const {return m_isMinimumWidthSet; } + + qreal minimumHeight() const { return !m_isMinimumHeightSet ? sizeHint(Qt::MinimumSize, Qt::Vertical) : m_minimumHeight; } + void setMinimumHeight(qreal height); + bool isMinimumHeightSet() const {return m_isMinimumHeightSet; } + + qreal preferredWidth() const { return m_preferredWidth; } + void setPreferredWidth(qreal width); + bool isPreferredWidthSet() const {return m_preferredWidth > -1; } + + qreal preferredHeight() const { return m_preferredHeight; } + void setPreferredHeight(qreal width); + bool isPreferredHeightSet() const {return m_preferredHeight > -1; } + + qreal maximumWidth() const { return !m_isMaximumWidthSet ? sizeHint(Qt::MaximumSize, Qt::Horizontal) : m_maximumWidth; } + void setMaximumWidth(qreal width); + bool isMaximumWidthSet() const {return m_isMaximumWidthSet; } + + qreal maximumHeight() const { return !m_isMaximumHeightSet ? sizeHint(Qt::MaximumSize, Qt::Vertical) : m_maximumHeight; } + void setMaximumHeight(qreal height); + bool isMaximumHeightSet() const {return m_isMaximumHeightSet; } + + void setMinimumImplicitSize(const QSizeF &sz); + void setMaximumImplicitSize(const QSizeF &sz); + + bool fillWidth() const { + if (auto *itemPriv = itemForSizePolicy(m_isFillWidthSet)) { + QLayoutPolicy::Policy hPolicy = itemPriv->sizePolicy().horizontalPolicy(); + return hPolicy & QLayoutPolicy::GrowFlag; + } + return m_fillWidth; + } + void setFillWidth(bool fill); + bool isFillWidthSet() const { return m_isFillWidthSet; } + + bool fillHeight() const { + if (auto *itemPriv = itemForSizePolicy(m_isFillHeightSet)) { + QLayoutPolicy::Policy vPolicy = itemPriv->sizePolicy().verticalPolicy(); + return vPolicy & QLayoutPolicy::GrowFlag; + } + return m_fillHeight; + } + void setFillHeight(bool fill); + bool isFillHeightSet() const { return m_isFillHeightSet; } + + QQuickLayout::SizePolicy useDefaultSizePolicy() const { + const bool appDefSizePolicy = QGuiApplication::testAttribute(Qt::AA_QtQuickUseDefaultSizePolicy); + return (m_isUseDefaultSizePolicySet ? m_useDefaultSizePolicy : (appDefSizePolicy ? QQuickLayout::SizePolicyImplicit : QQuickLayout::SizePolicyExplicit)); + } + void setUseDefaultSizePolicy(QQuickLayout::SizePolicy sizePolicy); + + int row() const { return qMax(m_row, 0); } + void setRow(int row); + bool isRowSet() const { return m_row >= 0; } + int column() const { return qMax(m_column, 0); } + void setColumn(int column); + bool isColumnSet() const { return m_column >= 0; } + + int rowSpan() const { return m_rowSpan; } + void setRowSpan(int span); + int columnSpan() const { return m_columnSpan; } + void setColumnSpan(int span); + + Qt::Alignment alignment() const { return m_alignment; } + void setAlignment(Qt::Alignment align); + bool isAlignmentSet() const {return m_isAlignmentSet; } + + int horizontalStretchFactor() const { return m_horizontalStretch; } + void setHorizontalStretchFactor(int stretchFactor); + bool isHorizontalStretchFactorSet() const { return m_horizontalStretch > -1; } + int verticalStretchFactor() const { return m_verticalStretch; } + void setVerticalStretchFactor(int stretchFactor); + bool isVerticalStretchFactorSet() const { return m_verticalStretch > -1; } + + qreal margins() const { return m_defaultMargins; } + void setMargins(qreal m); + bool isMarginsSet() const { return m_isMarginsSet; } + + qreal leftMargin() const { return m_isLeftMarginSet ? m_margins.left() : m_defaultMargins; } + void setLeftMargin(qreal m); + void resetLeftMargin(); + bool isLeftMarginSet() const { return m_isLeftMarginSet; } + + qreal topMargin() const { return m_isTopMarginSet ? m_margins.top() : m_defaultMargins; } + void setTopMargin(qreal m); + void resetTopMargin(); + bool isTopMarginSet() const {return m_isTopMarginSet; } + + qreal rightMargin() const { return m_isRightMarginSet ? m_margins.right() : m_defaultMargins; } + void setRightMargin(qreal m); + void resetRightMargin(); + bool isRightMarginSet() const { return m_isRightMarginSet; } + + qreal bottomMargin() const { return m_isBottomMarginSet ? m_margins.bottom() : m_defaultMargins; } + void setBottomMargin(qreal m); + void resetBottomMargin(); + bool isBottomMarginSet() const { return m_isBottomMarginSet; } + + QMarginsF qMargins() const { + return QMarginsF(leftMargin(), topMargin(), rightMargin(), bottomMargin()); + } + + QMarginsF effectiveQMargins() const { + bool mirrored = parentLayout() && parentLayout()->isMirrored(); + if (mirrored) + return QMarginsF(rightMargin(), topMargin(), leftMargin(), bottomMargin()); + else + return qMargins(); + } + + bool setChangesNotificationEnabled(bool enabled) + { + const bool old = m_changesNotificationEnabled; + m_changesNotificationEnabled = enabled; + return old; + } + + qreal sizeHint(Qt::SizeHint which, Qt::Orientation orientation) const; + + bool isExtentExplicitlySet(Qt::Orientation o, Qt::SizeHint whichSize) const + { + switch (whichSize) { + case Qt::MinimumSize: + return o == Qt::Horizontal ? m_isMinimumWidthSet : m_isMinimumHeightSet; + case Qt::MaximumSize: + return o == Qt::Horizontal ? m_isMaximumWidthSet : m_isMaximumHeightSet; + case Qt::PreferredSize: + return true; // Layout.preferredWidth is always explicitly set + case Qt::MinimumDescent: // Not supported + case Qt::NSizeHints: + return false; + } + return false; + } + + QQuickItemPrivate *itemForSizePolicy(bool isFillSet) const + { + QQuickItemPrivate *itemPriv = nullptr; + if (!isFillSet && qobject_cast(item()) && + QGuiApplication::testAttribute(Qt::AA_QtQuickUseDefaultSizePolicy)) + itemPriv = QQuickItemPrivate::get(item()); + return itemPriv; + } + +Q_SIGNALS: + void minimumWidthChanged(); + void minimumHeightChanged(); + void preferredWidthChanged(); + void preferredHeightChanged(); + void maximumWidthChanged(); + void maximumHeightChanged(); + void fillWidthChanged(); + void fillHeightChanged(); + Q_REVISION(6, 8) void useDefaultSizePolicyChanged(); + void leftMarginChanged(); + void topMarginChanged(); + void rightMarginChanged(); + void bottomMarginChanged(); + void marginsChanged(); + void rowChanged(); + void columnChanged(); + void rowSpanChanged(); + void columnSpanChanged(); + void alignmentChanged(); + void horizontalStretchFactorChanged(); + void verticalStretchFactorChanged(); + +private: + void invalidateItem(); + QQuickLayout *parentLayout() const; + QQuickItem *item() const; +private: + qreal m_minimumWidth; + qreal m_minimumHeight; + qreal m_preferredWidth; + qreal m_preferredHeight; + qreal m_maximumWidth; + qreal m_maximumHeight; + + qreal m_defaultMargins; + QMarginsF m_margins; + + qreal m_fallbackWidth; + qreal m_fallbackHeight; + + // GridLayout specific properties + int m_row; + int m_column; + int m_rowSpan; + int m_columnSpan; + + unsigned m_fillWidth : 1; + unsigned m_fillHeight : 1; + unsigned m_isFillWidthSet : 1; + unsigned m_isFillHeightSet : 1; + unsigned m_isUseDefaultSizePolicySet: 1; + QQuickLayout::SizePolicy m_useDefaultSizePolicy; + unsigned m_isMinimumWidthSet : 1; + unsigned m_isMinimumHeightSet : 1; + // preferredWidth and preferredHeight are always explicit, since + // their implicit equivalent is implicitWidth and implicitHeight + unsigned m_isMaximumWidthSet : 1; + unsigned m_isMaximumHeightSet : 1; + unsigned m_changesNotificationEnabled : 1; + unsigned m_isMarginsSet : 1; + unsigned m_isLeftMarginSet : 1; + unsigned m_isTopMarginSet : 1; + unsigned m_isRightMarginSet : 1; + unsigned m_isBottomMarginSet : 1; + unsigned m_isAlignmentSet : 1; + Qt::Alignment m_alignment; + int m_horizontalStretch; + int m_verticalStretch; + friend class QQuickLayout; +}; + +inline QQuickLayoutAttached *attachedLayoutObject(QQuickItem *item, bool create = true) +{ + return static_cast(qmlAttachedPropertiesObject(item, create)); +} + +QT_END_NAMESPACE + +#endif // QQUICKLAYOUT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..eb5939e9758d1938e46b930f786d9730a2f3602f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLAYOUTGLOBAL_P_H +#define QQUICKLAYOUTGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#endif // QQUICKLAYOUTGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutitemproxy_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutitemproxy_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5d91b0ed49cc7404a9251a708e8d9fa4cd53abe5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutitemproxy_p.h @@ -0,0 +1,147 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLAYOUTITEMPROXY_P_H +#define QQUICKLAYOUTITEMPROXY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +class QQuickLayoutItemProxyAttachedData; +class QQuickLayoutItemProxyPrivate; +class QQuickLayoutItemProxy : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged) + QML_NAMED_ELEMENT(LayoutItemProxy) + QML_ADDED_IN_VERSION(6, 6) + +public: + QQuickLayoutItemProxy(QQuickItem *parent = nullptr); + ~QQuickLayoutItemProxy() override; + + void geometryChange(const QRectF &newGeom, const QRectF &oldGeom) override; + void itemChange(ItemChange c, const ItemChangeData &d) override; + + QQuickItem *target() const; + void setTarget(QQuickItem *newTarget); + Q_INVOKABLE QQuickItem *effectiveTarget() const; + void clearTarget(); + + void maybeTakeControl(); +public slots: + void updatePos(); + +private slots: + // We define some slots to react to changes to the Layout attached properties. + // They are all named following the same scheme, which allows us to use a macro. +#define propertyForwarding(Property) \ + void target##Property##Changed(); \ + void proxy##Property##Changed(); + + propertyForwarding(MinimumWidth) + propertyForwarding(MinimumHeight) + propertyForwarding(PreferredWidth) + propertyForwarding(PreferredHeight) + propertyForwarding(MaximumWidth) + propertyForwarding(MaximumHeight) + propertyForwarding(FillWidth) + propertyForwarding(FillHeight) + propertyForwarding(Alignment) + propertyForwarding(HorizontalStretchFactor) + propertyForwarding(VerticalStretchFactor) + propertyForwarding(Margins) + propertyForwarding(LeftMargin) + propertyForwarding(TopMargin) + propertyForwarding(RightMargin) + propertyForwarding(BottomMargin) +#undef propertyForwarding + +signals: + void targetChanged(); + +private: + Q_DECLARE_PRIVATE(QQuickLayoutItemProxy) +}; + +class QQuickLayoutItemProxyPrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickLayoutItemProxy) + +public: + QQuickLayoutItemProxyPrivate(); + + // the target of the LayoutItem + QQuickItem *target = nullptr; + + // These values are required to know why the Layout property of the proxy changed + // If it changed because the target changed we should keep the connection valid + // If a Layout property change is not invoked by the target, it was set + // explicitly by the application developer and we should disconnect the connection + // between target and proxy for this property. + unsigned m_expectProxyMinimumWidthChange : 1; + unsigned m_expectProxyMinimumHeightChange : 1; + unsigned m_expectProxyPreferredWidthChange : 1; + unsigned m_expectProxyPreferredHeightChange : 1; + unsigned m_expectProxyMaximumWidthChange : 1; + unsigned m_expectProxyMaximumHeightChange : 1; + unsigned m_expectProxyFillWidthChange : 1; + unsigned m_expectProxyFillHeightChange : 1; + unsigned m_expectProxyAlignmentChange : 1; + unsigned m_expectProxyHorizontalStretchFactorChange : 1; + unsigned m_expectProxyVerticalStretchFactorChange : 1; + unsigned m_expectProxyMarginsChange : 1; + unsigned m_expectProxyLeftMarginChange : 1; + unsigned m_expectProxyTopMarginChange : 1; + unsigned m_expectProxyRightMarginChange : 1; + unsigned m_expectProxyBottomMarginChange : 1; + + friend class QQuickLayoutItemProxy; +}; + +class QQuickLayoutItemProxyAttachedData : public QObject +{ + Q_OBJECT + + QML_ANONYMOUS + Q_PROPERTY(bool proxyHasControl READ proxyHasControl NOTIFY controllingProxyChanged) + Q_PROPERTY(QQuickLayoutItemProxy* controllingProxy READ getControllingProxy NOTIFY controllingProxyChanged) + Q_PROPERTY(QQmlListProperty proxies READ getProxies NOTIFY proxiesChanged) + +public: + QQuickLayoutItemProxyAttachedData(QObject *parent); + ~QQuickLayoutItemProxyAttachedData() override; + void registerProxy(QQuickLayoutItemProxy *proxy); + void releaseProxy(QQuickLayoutItemProxy *proxy); + bool takeControl(QQuickLayoutItemProxy *proxy); + void releaseControl(QQuickLayoutItemProxy *proxy); + QQuickLayoutItemProxy *getControllingProxy() const; + QQmlListProperty getProxies(); + bool proxyHasControl() const; + +signals: + void controlTaken(); + void controlReleased(); + void controllingProxyChanged(); + void proxiesChanged(); + +private: + QList proxies; + QQuickLayoutItemProxy* controllingProxy; +}; + +Q_DECLARE_METATYPE(QQuickLayoutItemProxyAttachedData*); + +#endif // QQUICKLAYOUTITEMPROXY_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutstyleinfo_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutstyleinfo_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0866ca1a384c3648c9b4b216bb0cdb48429b674b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklayoutstyleinfo_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLAYOUTSTYLEINFO_P_H +#define QQUICKLAYOUTSTYLEINFO_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickLayoutStyleInfo : public QAbstractLayoutStyleInfo +{ +public: + QQuickLayoutStyleInfo(); + + qreal spacing(Qt::Orientation orientation) const override; + qreal windowMargin(Qt::Orientation orientation) const override; + bool hasChangedCore() const override; + +}; + +QT_END_NAMESPACE + +#endif // QQUICKLAYOUTSTYLEINFO_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklinearlayout_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklinearlayout_p.h new file mode 100644 index 0000000000000000000000000000000000000000..933f28fb67dd3ce976b9d69323b733181fcb8b64 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquicklinearlayout_p.h @@ -0,0 +1,254 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLINEARLAYOUT_P_H +#define QQUICKLINEARLAYOUT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qquicklayout_p.h" +#include "qquickgridlayoutengine_p.h" + +QT_BEGIN_NAMESPACE + +/********************************** + ** + ** QQuickGridLayoutBase + ** + **/ +class QQuickGridLayoutBasePrivate; + +class Q_QUICKLAYOUTS_EXPORT QQuickGridLayoutBase : public QQuickLayout +{ + Q_OBJECT + + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection + NOTIFY layoutDirectionChanged REVISION(1, 1)) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(1, 1) + +public: + + QQuickGridLayoutBase(); + + explicit QQuickGridLayoutBase(QQuickGridLayoutBasePrivate &dd, + Qt::Orientation orientation, + QQuickItem *parent = nullptr); + + ~QQuickGridLayoutBase(); + void componentComplete() override; + void invalidate(QQuickItem *childItem = nullptr) override; + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + QSizeF sizeHint(Qt::SizeHint whichSizeHint) const override; + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection(Qt::LayoutDirection dir); + Qt::LayoutDirection effectiveLayoutDirection() const; + void setAlignment(QQuickItem *item, Qt::Alignment align) override; + void setStretchFactor(QQuickItem *item, int stretchFactor, Qt::Orientation orient) override; + + /* QQuickItemChangeListener */ + void itemDestroyed(QQuickItem *item) override; + void itemVisibilityChanged(QQuickItem *item) override; + +protected: + void updateLayoutItems() override; + QQuickItem *itemAt(int index) const override; + int itemCount() const override; + + void rearrange(const QSizeF &size) override; + virtual void insertLayoutItems() {} + +Q_SIGNALS: + Q_REVISION(1, 1) void layoutDirectionChanged(); + +private: + void removeGridItem(QGridLayoutItem *gridItem); + Q_DECLARE_PRIVATE(QQuickGridLayoutBase) +}; + +class QQuickLayoutStyleInfo; + +class QQuickGridLayoutBasePrivate : public QQuickLayoutPrivate +{ + Q_DECLARE_PUBLIC(QQuickGridLayoutBase) + +public: + QQuickGridLayoutBasePrivate() : m_recurRearrangeCounter(0) + , m_rearranging(false) + , m_layoutDirection(Qt::LeftToRight) + {} + + void mirrorChange() override + { + Q_Q(QQuickGridLayoutBase); + q->invalidate(); + } + + QQuickGridLayoutEngine engine; + Qt::Orientation orientation; + unsigned m_recurRearrangeCounter : 2; + unsigned m_rearranging : 1; + QVector m_invalidateAfterRearrange; + Qt::LayoutDirection m_layoutDirection : 2; + + QQuickLayoutStyleInfo *styleInfo; +}; + +/********************************** + ** + ** QQuickGridLayout + ** + **/ +class QQuickGridLayoutPrivate; +class Q_QUICKLAYOUTS_EXPORT QQuickGridLayout : public QQuickGridLayoutBase +{ + Q_OBJECT + + Q_PROPERTY(qreal columnSpacing READ columnSpacing WRITE setColumnSpacing NOTIFY columnSpacingChanged) + Q_PROPERTY(qreal rowSpacing READ rowSpacing WRITE setRowSpacing NOTIFY rowSpacingChanged) + Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged) + Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged) + Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(bool uniformCellWidths READ uniformCellWidths WRITE setUniformCellWidths + NOTIFY uniformCellWidthsChanged REVISION(6, 6) FINAL) + Q_PROPERTY(bool uniformCellHeights READ uniformCellHeights WRITE setUniformCellHeights + NOTIFY uniformCellHeightsChanged REVISION(6, 6) FINAL) + + QML_NAMED_ELEMENT(GridLayout) + QML_ADDED_IN_VERSION(1, 0) +public: + explicit QQuickGridLayout(QQuickItem *parent = nullptr); + qreal columnSpacing() const; + void setColumnSpacing(qreal spacing); + qreal rowSpacing() const; + void setRowSpacing(qreal spacing); + + int columns() const; + void setColumns(int columns); + int rows() const; + void setRows(int rows); + + enum Flow { LeftToRight, TopToBottom }; + Q_ENUM(Flow) + Flow flow() const; + void setFlow(Flow flow); + + bool uniformCellWidths() const; + void setUniformCellWidths(bool uniformCellWidths); + bool uniformCellHeights() const; + void setUniformCellHeights(bool uniformCellHeights); + + void insertLayoutItems() override; + +Q_SIGNALS: + void columnSpacingChanged(); + void rowSpacingChanged(); + + void columnsChanged(); + void rowsChanged(); + + void flowChanged(); + + Q_REVISION(6, 6) void uniformCellWidthsChanged(); + Q_REVISION(6, 6) void uniformCellHeightsChanged(); +private: + Q_DECLARE_PRIVATE(QQuickGridLayout) +}; + +class QQuickGridLayoutPrivate : public QQuickGridLayoutBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickGridLayout) +public: + QQuickGridLayoutPrivate(): columns(-1), rows(-1), flow(QQuickGridLayout::LeftToRight) {} + int columns; + int rows; + QQuickGridLayout::Flow flow; +}; + + +/********************************** + ** + ** QQuickLinearLayout + ** + **/ +class QQuickLinearLayoutPrivate; +class Q_QUICKLAYOUTS_EXPORT QQuickLinearLayout : public QQuickGridLayoutBase +{ + Q_OBJECT + QML_ANONYMOUS + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing NOTIFY spacingChanged) + Q_PROPERTY(bool uniformCellSizes READ uniformCellSizes WRITE setUniformCellSizes + NOTIFY uniformCellSizesChanged REVISION(6, 6) FINAL) +public: + explicit QQuickLinearLayout(Qt::Orientation orientation, + QQuickItem *parent = nullptr); + void insertLayoutItem(QQuickItem *item); + qreal spacing() const; + void setSpacing(qreal spacing); + bool uniformCellSizes() const; + void setUniformCellSizes(bool uniformCellSizes); + + void insertLayoutItems() override; + +Q_SIGNALS: + void spacingChanged(); + Q_REVISION(6, 6) void uniformCellSizesChanged(); +private: + Q_DECLARE_PRIVATE(QQuickLinearLayout) +}; + +class QQuickLinearLayoutPrivate : public QQuickGridLayoutBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickLinearLayout) +public: + QQuickLinearLayoutPrivate() {} +}; + + +/********************************** + ** + ** QQuickRowLayout + ** + **/ +class Q_QUICKLAYOUTS_EXPORT QQuickRowLayout : public QQuickLinearLayout +{ + Q_OBJECT + QML_NAMED_ELEMENT(RowLayout) + QML_ADDED_IN_VERSION(1, 0) + +public: + explicit QQuickRowLayout(QQuickItem *parent = nullptr) + : QQuickLinearLayout(Qt::Horizontal, parent) {} +}; + + +/********************************** + ** + ** QQuickColumnLayout + ** + **/ +class Q_QUICKLAYOUTS_EXPORT QQuickColumnLayout : public QQuickLinearLayout +{ + Q_OBJECT + QML_NAMED_ELEMENT(ColumnLayout) + QML_ADDED_IN_VERSION(1, 0) + +public: + explicit QQuickColumnLayout(QQuickItem *parent = nullptr) + : QQuickLinearLayout(Qt::Vertical, parent) {} +}; + +QT_END_NAMESPACE + +#endif // QQUICKLINEARLAYOUT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickstacklayout_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickstacklayout_p.h new file mode 100644 index 0000000000000000000000000000000000000000..db1c61c19c7404fb0db9d4feefb27457ba1dd969 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickLayouts/6.8.1/QtQuickLayouts/private/qquickstacklayout_p.h @@ -0,0 +1,134 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTACKLAYOUT_H +#define QQUICKSTACKLAYOUT_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickStackLayoutPrivate; +class QQuickStackLayoutAttached; + +class Q_QUICKLAYOUTS_EXPORT QQuickStackLayout : public QQuickLayout +{ + Q_OBJECT + Q_PROPERTY(int count READ count NOTIFY countChanged) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged) + QML_NAMED_ELEMENT(StackLayout) + QML_ADDED_IN_VERSION(1, 3) + QML_ATTACHED(QQuickStackLayoutAttached) + +public: + explicit QQuickStackLayout(QQuickItem *parent = nullptr); + int count() const; + int currentIndex() const; + void setCurrentIndex(int index); + + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + QSizeF sizeHint(Qt::SizeHint whichSizeHint) const override; + void setAlignment(QQuickItem *item, Qt::Alignment align) override; + void invalidate(QQuickItem *childItem = nullptr) override; + void updateLayoutItems() override { } + void rearrange(const QSizeF &) override; + void setStretchFactor(QQuickItem *item, int stretchFactor, Qt::Orientation orient) override; + + // iterator + Q_INVOKABLE QQuickItem *itemAt(int index) const override; + int itemCount() const override; + int indexOf(QQuickItem *item) const; + + /* QQuickItemChangeListener */ + void itemSiblingOrderChanged(QQuickItem *item) override; + + static QQuickStackLayoutAttached *qmlAttachedProperties(QObject *object); + +Q_SIGNALS: + void currentIndexChanged(); + void countChanged(); + +private: + enum AdjustCurrentIndexPolicy { + DontAdjustCurrentIndex, + AdjustCurrentIndex + }; + + static void collectItemSizeHints(QQuickItem *item, QSizeF *sizeHints); + bool shouldIgnoreItem(QQuickItem *item) const; + void childItemsChanged(AdjustCurrentIndexPolicy adjustCurrentIndexPolicy = DontAdjustCurrentIndex); + Q_DECLARE_PRIVATE(QQuickStackLayout) + + friend class QQuickStackLayoutAttached; + + QList m_items; + + struct SizeHints { + inline QSizeF &min() { return array[Qt::MinimumSize]; } + inline QSizeF &pref() { return array[Qt::PreferredSize]; } + inline QSizeF &max() { return array[Qt::MaximumSize]; } + QSizeF array[Qt::NSizeHints]; + }; + + mutable QHash m_cachedItemSizeHints; + mutable QSizeF m_cachedSizeHints[Qt::NSizeHints]; + SizeHints &cachedItemSizeHints(int index) const; +}; + +class QQuickStackLayoutPrivate : public QQuickLayoutPrivate +{ + Q_DECLARE_PUBLIC(QQuickStackLayout) +public: + QQuickStackLayoutPrivate() : count(0), currentIndex(-1), explicitCurrentIndex(false) {} +private: + int count; + int currentIndex; + bool explicitCurrentIndex; +}; + +class Q_QUICKLAYOUTS_EXPORT QQuickStackLayoutAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL) + Q_PROPERTY(QQuickStackLayout *layout READ layout NOTIFY layoutChanged FINAL) + +public: + QQuickStackLayoutAttached(QObject *object); + + int index() const; + void setIndex(int index); + + bool isCurrentItem() const; + void setIsCurrentItem(bool isCurrentItem); + + QQuickStackLayout *layout() const; + void setLayout(QQuickStackLayout *layout); + +Q_SIGNALS: + void indexChanged(); + void isCurrentItemChanged(); + void layoutChanged(); + +private: + int m_index = -1; + bool m_isCurrentItem = false; + QQuickStackLayout *m_layout = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTACKLAYOUT_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..347bd8ac8afd6f3be8f0ac570b719bc34dfe1fc8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickage_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef KILLAFFECTOR_H +#define KILLAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickAgeAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(int lifeLeft READ lifeLeft WRITE setLifeLeft NOTIFY lifeLeftChanged) + Q_PROPERTY(bool advancePosition READ advancePosition WRITE setAdvancePosition NOTIFY advancePositionChanged) + QML_NAMED_ELEMENT(Age) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickAgeAffector(QQuickItem *parent = nullptr); + + int lifeLeft() const + { + return m_lifeLeft; + } + + bool advancePosition() const + { + return m_advancePosition; + } + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + void lifeLeftChanged(int arg); + void advancePositionChanged(bool arg); + +public Q_SLOTS: + void setLifeLeft(int arg) + { + if (m_lifeLeft != arg) { + m_lifeLeft = arg; + Q_EMIT lifeLeftChanged(arg); + } + } + + void setAdvancePosition(bool arg) + { + if (m_advancePosition != arg) { + m_advancePosition = arg; + Q_EMIT advancePositionChanged(arg); + } + } + +private: + int m_lifeLeft; + bool m_advancePosition; +}; + +QT_END_NAMESPACE +#endif // KILLAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickangledirection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickangledirection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fee0a9db37da8f40b39f501d5a633b3685f99e96 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickangledirection_p.h @@ -0,0 +1,106 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQuickANGLEDDIRECTION_H +#define QQuickANGLEDDIRECTION_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickdirection_p.h" +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickAngleDirection : public QQuickDirection +{ + Q_OBJECT + Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) + Q_PROPERTY(qreal magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged) + Q_PROPERTY(qreal angleVariation READ angleVariation WRITE setAngleVariation NOTIFY angleVariationChanged) + Q_PROPERTY(qreal magnitudeVariation READ magnitudeVariation WRITE setMagnitudeVariation NOTIFY magnitudeVariationChanged) + QML_NAMED_ELEMENT(AngleDirection) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickAngleDirection(QObject *parent = nullptr); + QPointF sample(const QPointF &from) override; + qreal angle() const + { + return m_angle; + } + + qreal magnitude() const + { + return m_magnitude; + } + + qreal angleVariation() const + { + return m_angleVariation; + } + + qreal magnitudeVariation() const + { + return m_magnitudeVariation; + } + +Q_SIGNALS: + + void angleChanged(qreal arg); + + void magnitudeChanged(qreal arg); + + void angleVariationChanged(qreal arg); + + void magnitudeVariationChanged(qreal arg); + +public Q_SLOTS: +void setAngle(qreal arg) +{ + if (m_angle != arg) { + m_angle = arg; + Q_EMIT angleChanged(arg); + } +} + +void setMagnitude(qreal arg) +{ + if (m_magnitude != arg) { + m_magnitude = arg; + Q_EMIT magnitudeChanged(arg); + } +} + +void setAngleVariation(qreal arg) +{ + if (m_angleVariation != arg) { + m_angleVariation = arg; + Q_EMIT angleVariationChanged(arg); + } +} + +void setMagnitudeVariation(qreal arg) +{ + if (m_magnitudeVariation != arg) { + m_magnitudeVariation = arg; + Q_EMIT magnitudeVariationChanged(arg); + } +} + +private: +qreal m_angle; +qreal m_magnitude; +qreal m_angleVariation; +qreal m_magnitudeVariation; +}; + +QT_END_NAMESPACE +#endif // QQuickANGLEDDIRECTION_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcumulativedirection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcumulativedirection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d658b1e83439554116f7675c3bf31df9ff84ec7a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcumulativedirection_p.h @@ -0,0 +1,41 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQuickCUMULATIVEDIRECTION_P_H +#define QQuickCUMULATIVEDIRECTION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickdirection_p.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickCumulativeDirection : public QQuickDirection +{ + Q_OBJECT + Q_PROPERTY(QQmlListProperty directions READ directions) + Q_CLASSINFO("DefaultProperty", "directions") + QML_NAMED_ELEMENT(CumulativeDirection) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickCumulativeDirection(QObject *parent = nullptr); + QQmlListProperty directions(); + QPointF sample(const QPointF &from) override; +private: + QList m_directions; +}; + +QT_END_NAMESPACE + +#endif // QQuickCUMULATIVEDIRECTION_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcustomaffector_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcustomaffector_p.h new file mode 100644 index 0000000000000000000000000000000000000000..44aeae2c5be48a5fc0a1d54e2b8c3c639ee2c57e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickcustomaffector_p.h @@ -0,0 +1,136 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef CUSTOMAFFECTOR_H +#define CUSTOMAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickparticlesystem_p.h" +#include "qquickparticleextruder_p.h" +#include "qquickparticleaffector_p.h" +#include "qquickdirection_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickCustomAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(bool relative READ relative WRITE setRelative NOTIFY relativeChanged) + Q_PROPERTY(QQuickDirection *position READ position WRITE setPosition NOTIFY positionChanged RESET positionReset) + Q_PROPERTY(QQuickDirection *velocity READ velocity WRITE setVelocity NOTIFY velocityChanged RESET velocityReset) + Q_PROPERTY(QQuickDirection *acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged RESET accelerationReset) + QML_NAMED_ELEMENT(Affector) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickCustomAffector(QQuickItem *parent = nullptr); + void affectSystem(qreal dt) override; + + QQuickDirection * position() const + { + return m_position; + } + + QQuickDirection * velocity() const + { + return m_velocity; + } + + QQuickDirection * acceleration() const + { + return m_acceleration; + } + + void positionReset() + { + m_position = &m_nullVector; + } + + void velocityReset() + { + m_velocity = &m_nullVector; + } + + void accelerationReset() + { + m_acceleration = &m_nullVector; + } + + bool relative() const + { + return m_relative; + } + + +Q_SIGNALS: + void affectParticles(const QList &particles, qreal dt); + + void positionChanged(QQuickDirection * arg); + + void velocityChanged(QQuickDirection * arg); + + void accelerationChanged(QQuickDirection * arg); + + void relativeChanged(bool arg); + +public Q_SLOTS: + void setPosition(QQuickDirection * arg) + { + if (m_position != arg) { + m_position = arg; + Q_EMIT positionChanged(arg); + } + } + + void setVelocity(QQuickDirection * arg) + { + if (m_velocity != arg) { + m_velocity = arg; + Q_EMIT velocityChanged(arg); + } + } + + void setAcceleration(QQuickDirection * arg) + { + if (m_acceleration != arg) { + m_acceleration = arg; + Q_EMIT accelerationChanged(arg); + } + } + + void setRelative(bool arg) + { + if (m_relative != arg) { + m_relative = arg; + Q_EMIT relativeChanged(arg); + } + } + +protected: + bool isAffectConnected(); + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +private: + void affectProperties(const QList &particles, qreal dt); + QQuickDirection * m_position; + QQuickDirection * m_velocity; + QQuickDirection * m_acceleration; + + QQuickDirection m_nullVector; + bool m_relative; +}; + +QT_END_NAMESPACE +#endif // CUSTOMAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickdirection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickdirection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ec17b6b51bacafb8c4c690369b4ca20d975a4f2b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickdirection_p.h @@ -0,0 +1,45 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef VARYINGVECTOR_H +#define VARYINGVECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickDirection : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(NullVector) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") + +public: + explicit QQuickDirection(QObject *parent = nullptr); + + virtual QPointF sample(const QPointF &from); +Q_SIGNALS: + +public Q_SLOTS: + +protected: +}; + +QT_END_NAMESPACE +#endif // VARYINGVECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickellipseextruder_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickellipseextruder_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0da572bf085ef2ca63c56fa44681f6faf575a36a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickellipseextruder_p.h @@ -0,0 +1,55 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef ELLIPSEEXTRUDER_H +#define ELLIPSEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleextruder_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickEllipseExtruder : public QQuickParticleExtruder +{ + Q_OBJECT + Q_PROPERTY(bool fill READ fill WRITE setFill NOTIFY fillChanged)//###Use base class? If it's still box + QML_NAMED_ELEMENT(EllipseShape) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickEllipseExtruder(QObject *parent = nullptr); + QPointF extrude(const QRectF &) override; + bool contains(const QRectF &bounds, const QPointF &point) override; + + bool fill() const + { + return m_fill; + } + +Q_SIGNALS: + + void fillChanged(bool arg); + +public Q_SLOTS: + + void setFill(bool arg) + { + if (m_fill != arg) { + m_fill = arg; + Q_EMIT fillChanged(arg); + } + } +private: + bool m_fill; +}; + +QT_END_NAMESPACE +#endif // ELLIPSEEXTRUDER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickfriction_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickfriction_p.h new file mode 100644 index 0000000000000000000000000000000000000000..522853a34409d084b93966523c6a3d2f45a6556b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickfriction_p.h @@ -0,0 +1,73 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef FRICTIONAFFECTOR_H +#define FRICTIONAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickFrictionAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(qreal factor READ factor WRITE setFactor NOTIFY factorChanged) + Q_PROPERTY(qreal threshold READ threshold WRITE setThreshold NOTIFY thresholdChanged) + QML_NAMED_ELEMENT(Friction) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickFrictionAffector(QQuickItem *parent = nullptr); + + qreal factor() const + { + return m_factor; + } + + qreal threshold() const + { + return m_threshold; + } + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + + void factorChanged(qreal arg); + void thresholdChanged(qreal arg); + +public Q_SLOTS: + + void setFactor(qreal arg) + { + if (m_factor != arg) { + m_factor = arg; + Q_EMIT factorChanged(arg); + } + } + + void setThreshold(qreal arg) + { + if (m_threshold != arg) { + m_threshold = arg; + Q_EMIT thresholdChanged(arg); + } + } + +private: + qreal m_factor; + qreal m_threshold; +}; + +QT_END_NAMESPACE +#endif // FRICTIONAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgravity_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgravity_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a878cfe9432046406c0c9a546a27761de9986193 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgravity_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef GRAVITYAFFECTOR_H +#define GRAVITYAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickGravityAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(qreal magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged) + Q_PROPERTY(qreal acceleration READ magnitude WRITE setAcceleration NOTIFY magnitudeChanged) + Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) + QML_NAMED_ELEMENT(Gravity) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickGravityAffector(QQuickItem *parent = nullptr); + qreal magnitude() const; + qreal angle() const; + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + void magnitudeChanged(qreal arg); + void angleChanged(qreal arg); + +public Q_SLOTS: + void setMagnitude(qreal arg); + void setAcceleration(qreal arg); + void setAngle(qreal arg); + +private: + qreal m_magnitude; + qreal m_angle; + + bool m_needRecalc; + qreal m_dx; + qreal m_dy; +}; + +QT_END_NAMESPACE +#endif // GRAVITYAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgroupgoal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgroupgoal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c7cb60b585306a0b83b2bd1ce3292ce4e35e5542 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickgroupgoal_p.h @@ -0,0 +1,71 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef GROUPGOALAFFECTOR_H +#define GROUPGOALAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickStochasticEngine; + +class Q_QUICKPARTICLES_EXPORT QQuickGroupGoalAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(QString goalState READ goalState WRITE setGoalState NOTIFY goalStateChanged) + Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) + QML_NAMED_ELEMENT(GroupGoal) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickGroupGoalAffector(QQuickItem *parent = nullptr); + + QString goalState() const + { + return m_goalState; + } + + bool jump() const + { + return m_jump; + } + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + + void goalStateChanged(const QString &arg); + + void jumpChanged(bool arg); + +public Q_SLOTS: + + void setGoalState(const QString &arg); + + void setJump(bool arg) + { + if (m_jump != arg) { + m_jump = arg; + Q_EMIT jumpChanged(arg); + } + } + +private: + QString m_goalState; + bool m_jump; +}; + +QT_END_NAMESPACE + +#endif // GROUPGOALAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickimageparticle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickimageparticle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b82bb785df3080a90bec434608986c6a7225527a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickimageparticle_p.h @@ -0,0 +1,457 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKIMAGEPARTICLE_P_H +#define QQUICKIMAGEPARTICLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickparticlepainter_p.h" +#include "qquickdirection_p.h" +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class ImageMaterialData; +class QSGGeometryNode; +class QSGMaterial; + +class QQuickSprite; +class QQuickStochasticEngine; + +class QRhi; + +struct SimplePointVertex { + float x; + float y; + float t; + float lifeSpan; + float size; + float endSize; + float vx; + float vy; + float ax; + float ay; +}; + +struct ColoredPointVertex { + float x; + float y; + float t; + float lifeSpan; + float size; + float endSize; + float vx; + float vy; + float ax; + float ay; + Color4ub color; +}; + +// Like Colored, but using DrawTriangles instead of DrawPoints +struct ColoredVertex { + float x; + float y; + float t; + float lifeSpan; + float size; + float endSize; + float vx; + float vy; + float ax; + float ay; + Color4ub color; + uchar tx; + uchar ty; + uchar _padding[2]; // feel free to use +}; + +struct DeformableVertex { + float x; + float y; + float rotation; + float rotationVelocity; + float t; + float lifeSpan; + float size; + float endSize; + float vx; + float vy; + float ax; + float ay; + Color4ub color; + float xx; + float xy; + float yx; + float yy; + uchar tx; + uchar ty; + uchar autoRotate; + uchar _padding; // feel free to use +}; + +struct SpriteVertex { + float x; + float y; + float rotation; + float rotationVelocity; + float t; + float lifeSpan; + float size; + float endSize; + float vx; + float vy; + float ax; + float ay; + Color4ub color; + float xx; + float xy; + float yx; + float yy; + uchar tx; + uchar ty; + uchar autoRotate; + uchar _padding; // feel free to use + float animW; + float animH; + float animProgress; + float animX1; + float animY1; + float animX2; +}; + +template +struct Vertices { + Vertex v1; + Vertex v2; + Vertex v3; + Vertex v4; +}; + +class ImageMaterial : public QSGMaterial +{ +public: + virtual ImageMaterialData *state() = 0; +}; + +class Q_QUICKPARTICLES_EXPORT QQuickImageParticle : public QQuickParticlePainter +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ image WRITE setImage NOTIFY imageChanged) + Q_PROPERTY(QQmlListProperty sprites READ sprites) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + //### Is it worth having progress like Image has? + //Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) + + Q_PROPERTY(QUrl colorTable READ colortable WRITE setColortable NOTIFY colortableChanged) + Q_PROPERTY(QUrl sizeTable READ sizetable WRITE setSizetable NOTIFY sizetableChanged) + Q_PROPERTY(QUrl opacityTable READ opacitytable WRITE setOpacitytable NOTIFY opacitytableChanged) + + //###Now just colorize - add a flag for 'solid' color particles(where the img is just a mask?)? + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged RESET resetColor) + //Stacks (added) with individual colorVariations + Q_PROPERTY(qreal colorVariation READ colorVariation WRITE setColorVariation NOTIFY colorVariationChanged RESET resetColor) + Q_PROPERTY(qreal redVariation READ redVariation WRITE setRedVariation NOTIFY redVariationChanged RESET resetColor) + Q_PROPERTY(qreal greenVariation READ greenVariation WRITE setGreenVariation NOTIFY greenVariationChanged RESET resetColor) + Q_PROPERTY(qreal blueVariation READ blueVariation WRITE setBlueVariation NOTIFY blueVariationChanged RESET resetColor) + //Stacks (multiplies) with the Alpha in the color, mostly here so you can use svg color names (which have full alpha) + Q_PROPERTY(qreal alpha READ alpha WRITE setAlpha NOTIFY alphaChanged RESET resetColor) + Q_PROPERTY(qreal alphaVariation READ alphaVariation WRITE setAlphaVariation NOTIFY alphaVariationChanged RESET resetColor) + + Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged RESET resetRotation) + Q_PROPERTY(qreal rotationVariation READ rotationVariation WRITE setRotationVariation NOTIFY rotationVariationChanged RESET resetRotation) + Q_PROPERTY(qreal rotationVelocity READ rotationVelocity WRITE setRotationVelocity NOTIFY rotationVelocityChanged RESET resetRotation) + Q_PROPERTY(qreal rotationVelocityVariation READ rotationVelocityVariation WRITE setRotationVelocityVariation NOTIFY rotationVelocityVariationChanged RESET resetRotation) + //If true, then will face the direction of motion. Stacks with rotation, e.g. setting rotation + //to 180 will lead to facing away from the direction of motion + Q_PROPERTY(bool autoRotation READ autoRotation WRITE setAutoRotation NOTIFY autoRotationChanged RESET resetRotation) + + //xVector is the vector from the top-left point to the top-right point, and is multiplied by current size + Q_PROPERTY(QQuickDirection* xVector READ xVector WRITE setXVector NOTIFY xVectorChanged RESET resetDeformation) + //yVector is the same, but top-left to bottom-left. The particle is always a parallelogram. + Q_PROPERTY(QQuickDirection* yVector READ yVector WRITE setYVector NOTIFY yVectorChanged RESET resetDeformation) + Q_PROPERTY(bool spritesInterpolate READ spritesInterpolate WRITE setSpritesInterpolate NOTIFY spritesInterpolateChanged) + + Q_PROPERTY(EntryEffect entryEffect READ entryEffect WRITE setEntryEffect NOTIFY entryEffectChanged) + QML_NAMED_ELEMENT(ImageParticle) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickImageParticle(QQuickItem *parent = nullptr); + virtual ~QQuickImageParticle(); + + enum Status { Null, Ready, Loading, Error }; + Q_ENUM(Status) + + QQmlListProperty sprites(); + QQuickStochasticEngine* spriteEngine() {return m_spriteEngine;} + + enum EntryEffect { + None = 0, + Fade = 1, + Scale = 2 + }; + Q_ENUM(EntryEffect) + + enum PerformanceLevel{//TODO: Expose? + Unknown = 0, + SimplePoint, + ColoredPoint, + Colored, + Deformable, + Tabled, + Sprites + }; + + QUrl image() const { return m_image ? m_image->source : QUrl(); } + void setImage(const QUrl &image); + + QUrl colortable() const { return m_colorTable ? m_colorTable->source : QUrl(); } + void setColortable(const QUrl &table); + + QUrl sizetable() const { return m_sizeTable ? m_sizeTable->source : QUrl(); } + void setSizetable (const QUrl &table); + + QUrl opacitytable() const { return m_opacityTable ? m_opacityTable->source : QUrl(); } + void setOpacitytable(const QUrl &table); + + QColor color() const { return m_color; } + void setColor(const QColor &color); + + qreal colorVariation() const { return m_color_variation; } + void setColorVariation(qreal var); + + qreal alphaVariation() const { return m_alphaVariation; } + + qreal alpha() const { return m_alpha; } + + qreal redVariation() const { return m_redVariation; } + + qreal greenVariation() const { return m_greenVariation; } + + qreal blueVariation() const { return m_blueVariation; } + + qreal rotation() const { return m_rotation; } + + qreal rotationVariation() const { return m_rotationVariation; } + + qreal rotationVelocity() const { return m_rotationVelocity; } + + qreal rotationVelocityVariation() const { return m_rotationVelocityVariation; } + + bool autoRotation() const { return m_autoRotation; } + + QQuickDirection* xVector() const { return m_xVector; } + + QQuickDirection* yVector() const { return m_yVector; } + + bool spritesInterpolate() const { return m_spritesInterpolate; } + + bool bypassOptimizations() const { return m_bypassOptimizations; } + + EntryEffect entryEffect() const { return m_entryEffect; } + + Status status() const { return m_status; } + + void resetColor(); + void resetRotation(); + void resetDeformation(); + +Q_SIGNALS: + + void imageChanged(); + void colortableChanged(); + void sizetableChanged(); + void opacitytableChanged(); + + void colorChanged(); + void colorVariationChanged(); + + void alphaVariationChanged(qreal arg); + + void alphaChanged(qreal arg); + + void redVariationChanged(qreal arg); + + void greenVariationChanged(qreal arg); + + void blueVariationChanged(qreal arg); + + void rotationChanged(qreal arg); + + void rotationVariationChanged(qreal arg); + + void rotationVelocityChanged(qreal arg); + + void rotationVelocityVariationChanged(qreal arg); + + void autoRotationChanged(bool arg); + + void xVectorChanged(QQuickDirection* arg); + + void yVectorChanged(QQuickDirection* arg); + + void spritesInterpolateChanged(bool arg); + + void bypassOptimizationsChanged(bool arg); + + void entryEffectChanged(EntryEffect arg); + + void statusChanged(Status arg); + +public Q_SLOTS: + void setAlphaVariation(qreal arg); + + void setAlpha(qreal arg); + + void setRedVariation(qreal arg); + + void setGreenVariation(qreal arg); + + void setBlueVariation(qreal arg); + + void setRotation(qreal arg); + + void setRotationVariation(qreal arg); + + void setRotationVelocity(qreal arg); + + void setRotationVelocityVariation(qreal arg); + + void setAutoRotation(bool arg); + + void setXVector(QQuickDirection* arg); + + void setYVector(QQuickDirection* arg); + + void setSpritesInterpolate(bool arg); + + void setBypassOptimizations(bool arg); + + void setEntryEffect(EntryEffect arg); + +protected: + void reset() override; + void initialize(int gIdx, int pIdx) override; + void commit(int gIdx, int pIdx) override; + + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + bool prepareNextFrame(QSGNode**); + void buildParticleNodes(QSGNode**); + + void sceneGraphInvalidated() override; + +private Q_SLOTS: + void createEngine(); //### method invoked by sprite list changing (in engine.h) - pretty nasty + + void spriteAdvance(int spriteIndex); + void spritesUpdate(qreal time = 0 ); + void mainThreadFetchImageData(); + void invalidateSceneGraph(); + +private: + struct ImageData { + QUrl source; + QQuickPixmap pix; + }; + QScopedPointer m_image; + QScopedPointer m_colorTable; + QScopedPointer m_sizeTable; + QScopedPointer m_opacityTable; + bool loadingSomething(); + + void finishBuildParticleNodes(QSGNode **n); + + QColor m_color; + qreal m_color_variation; + + QSGNode *m_outgoingNode; + QHash m_nodes; + QHash m_idxStarts;//TODO: Proper resizing will lead to needing a spriteEngine per particle - do this after sprite engine gains transparent sharing? + QList > m_startsIdx;//Same data, optimized for alternate retrieval + + int m_lastIdxStart; + QSGMaterial *m_material; + + // derived values... + + qreal m_alphaVariation; + qreal m_alpha; + qreal m_redVariation; + qreal m_greenVariation; + qreal m_blueVariation; + qreal m_rotation; + qreal m_rotationVariation; + qreal m_rotationVelocity; + qreal m_rotationVelocityVariation; + bool m_autoRotation; + QQuickDirection* m_xVector; + QQuickDirection* m_yVector; + + QList m_sprites; + QQuickSpriteEngine* m_spriteEngine; + bool m_spritesInterpolate; + + bool m_explicitColor; + bool m_explicitRotation; + bool m_explicitDeformation; + bool m_explicitAnimation; + QHash > m_shadowData; + void clearShadows(); + QQuickParticleData* getShadowDatum(QQuickParticleData* datum); + + bool m_bypassOptimizations; + PerformanceLevel perfLevel; + PerformanceLevel m_targetPerfLevel; + void checkPerfLevel(PerformanceLevel level); + + bool m_debugMode; + + template + void initTexCoords(Vertex* v, int count){ + Vertex* end = v + count; + // Vertex coords between (0.0, 0.0) and (1.0, 1.0) + while (v < end){ + v[0].tx = 0; + v[0].ty = 0; + + v[1].tx = 255; + v[1].ty = 0; + + v[2].tx = 0; + v[2].ty = 255; + + v[3].tx = 255; + v[3].ty = 255; + + v += 4; + } + } + + ImageMaterialData *getState(QSGMaterial *m) { + return static_cast(m)->state(); + } + + EntryEffect m_entryEffect; + Status m_status; + int m_startedImageLoading; + QRhi *m_rhi; + bool m_apiChecked; + qreal m_dpr; + bool m_previousActive; +}; + +QT_END_NAMESPACE + +#endif // QQUICKIMAGEPARTICLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickitemparticle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickitemparticle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8e2f239c28facdc09310e328209d010ca856480f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickitemparticle_p.h @@ -0,0 +1,120 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef ITEMPARTICLE_H +#define ITEMPARTICLE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticlepainter_p.h" +#include +#include +#include +QT_BEGIN_NAMESPACE + +class QQuickItemParticleAttached; + +class Q_QUICKPARTICLES_EXPORT QQuickItemParticle : public QQuickParticlePainter +{ + Q_OBJECT + Q_PROPERTY(bool fade READ fade WRITE setFade NOTIFY fadeChanged) + Q_PROPERTY(QQmlComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged) + QML_NAMED_ELEMENT(ItemParticle) + QML_ADDED_IN_VERSION(2, 0) + QML_ATTACHED(QQuickItemParticleAttached) +public: + explicit QQuickItemParticle(QQuickItem *parent = nullptr); + ~QQuickItemParticle(); + + bool fade() const { return m_fade; } + + QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override; + + static QQuickItemParticleAttached *qmlAttachedProperties(QObject *object); + QQmlComponent* delegate() const + { + return m_delegate; + } + +Q_SIGNALS: + void fadeChanged(); + + void delegateChanged(QQmlComponent* arg); + +public Q_SLOTS: + //TODO: Add a follow mode, where moving the delegate causes the logical particle to go with it? + void freeze(QQuickItem* item); + void unfreeze(QQuickItem* item); + void take(QQuickItem* item,bool prioritize=false);//take by modelparticle + void give(QQuickItem* item);//give from modelparticle + + void setFade(bool arg){if (arg == m_fade) return; m_fade = arg; Q_EMIT fadeChanged();} + void setDelegate(QQmlComponent* arg) + { + if (m_delegate != arg) { + m_delegate = arg; + Q_EMIT delegateChanged(arg); + } + } + +protected: + void reset() override; + void commit(int gIdx, int pIdx) override; + void initialize(int gIdx, int pIdx) override; + void prepareNextFrame(); +private: + bool clockShouldUpdate() const; + void updateClock(); + void reconnectSystem(QQuickParticleSystem *system); + void reconnectParent(QQuickItem *parent); + void processDeletables(); + void tick(int time = 0); + QSet m_deletables; + QList m_managed; + bool m_fade; + + QList m_pendingItems; + QSet m_stasis; + qreal m_lastT; + int m_activeCount; + QQmlComponent* m_delegate; + + typedef QTickAnimationProxy Clock; + Clock *clock; + QMetaObject::Connection m_systemRunStateConnection; + QMetaObject::Connection m_systemPauseStateConnection; + QMetaObject::Connection m_systemEnabledStateConnection; + QMetaObject::Connection m_parentEnabledStateConnection; +}; + +class QQuickItemParticleAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickItemParticle* particle READ particle CONSTANT FINAL); +public: + QQuickItemParticleAttached(QObject* parent) + : QObject(parent), m_mp(0), m_parentItem(nullptr) + {;} + QQuickItemParticle* particle() const { return m_mp; } + void detach(){Q_EMIT detached();} + void attach(){Q_EMIT attached();} +private: + QQuickItemParticle* m_mp; + QPointer m_parentItem; + friend class QQuickItemParticle; +Q_SIGNALS: + void detached(); + void attached(); +}; + +QT_END_NAMESPACE + +#endif // ITEMPARTICLE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicklineextruder_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicklineextruder_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d461c8f6fe57a7b93ce87e9b7452cedba55a8b08 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicklineextruder_p.h @@ -0,0 +1,52 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef LINEEXTRUDER_H +#define LINEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleextruder_p.h" + +class Q_QUICKPARTICLES_EXPORT QQuickLineExtruder : public QQuickParticleExtruder +{ + Q_OBJECT + //Default is topleft to bottom right. Flipped makes it topright to bottom left + Q_PROPERTY(bool mirrored READ mirrored WRITE setMirrored NOTIFY mirroredChanged) + QML_NAMED_ELEMENT(LineShape) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickLineExtruder(QObject *parent = nullptr); + QPointF extrude(const QRectF &) override; + bool mirrored() const + { + return m_mirrored; + } + +Q_SIGNALS: + + void mirroredChanged(bool arg); + +public Q_SLOTS: + + void setMirrored(bool arg) + { + if (m_mirrored != arg) { + m_mirrored = arg; + Q_EMIT mirroredChanged(arg); + } + } +private: + bool m_mirrored; +}; + +#endif // LINEEXTRUDER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickmaskextruder_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickmaskextruder_p.h new file mode 100644 index 0000000000000000000000000000000000000000..192244b0058060a566499915c88dd61ab4d48c3a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickmaskextruder_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef MASKEXTRUDER_H +#define MASKEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleextruder_p.h" +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickMaskExtruder : public QQuickParticleExtruder +{ + Q_OBJECT + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + QML_NAMED_ELEMENT(MaskShape) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickMaskExtruder(QObject *parent = nullptr); + QPointF extrude(const QRectF &) override; + bool contains(const QRectF &bounds, const QPointF &point) override; + + QUrl source() const + { + return m_source; + } + +Q_SIGNALS: + + void sourceChanged(const QUrl &arg); + +public Q_SLOTS: + void setSource(const QUrl &arg); + +private Q_SLOTS: + void startMaskLoading(); + void finishMaskLoading(); + +private: + QUrl m_source; + + void ensureInitialized(const QRectF &r); + int m_lastWidth; + int m_lastHeight; + QQuickPixmap m_pix; + QImage m_img; + QList m_mask;//TODO: More memory efficient datastructures + //Perhaps just the mask for the largest bounds is stored, and interpolate up +}; + +QT_END_NAMESPACE + +#endif // MASKEXTRUDER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleaffector_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleaffector_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f261565d170aa3aade64f87a8581f082c02c4806 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleaffector_p.h @@ -0,0 +1,177 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef PARTICLEAFFECTOR_H +#define PARTICLEAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickparticlesystem_p.h" +#include "qquickparticleextruder_p.h" +#include "qtquickparticlesglobal_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickParticleAffector : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) + Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged) + Q_PROPERTY(QStringList whenCollidingWith READ whenCollidingWith WRITE setWhenCollidingWith NOTIFY whenCollidingWithChanged) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(bool once READ onceOff WRITE setOnceOff NOTIFY onceChanged) + Q_PROPERTY(QQuickParticleExtruder* shape READ shape WRITE setShape NOTIFY shapeChanged) + + QML_NAMED_ELEMENT(ParticleAffector) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") + +public: + explicit QQuickParticleAffector(QQuickItem *parent = nullptr); + virtual void affectSystem(qreal dt); + virtual void reset(QQuickParticleData*);//As some store their own data per particle? + QQuickParticleSystem* system() const + { + return m_system; + } + + QStringList groups() const + { + return m_groups; + } + + bool enabled() const + { + return m_enabled; + } + + bool onceOff() const + { + return m_onceOff; + } + + QQuickParticleExtruder* shape() const + { + return m_shape; + } + + QStringList whenCollidingWith() const + { + return m_whenCollidingWith; + } + +Q_SIGNALS: + + void systemChanged(QQuickParticleSystem* arg); + + void groupsChanged(const QStringList &arg); + + void enabledChanged(bool arg); + + void onceChanged(bool arg); + + void shapeChanged(QQuickParticleExtruder* arg); + + void affected(qreal x, qreal y); + + void whenCollidingWithChanged(const QStringList &arg); + +public Q_SLOTS: +void setSystem(QQuickParticleSystem* arg) +{ + if (m_system != arg) { + m_system = arg; + if (m_system) + m_system->registerParticleAffector(this); + Q_EMIT systemChanged(arg); + } +} + +void setGroups(const QStringList &arg) +{ + if (m_groups != arg) { + m_groups = arg; + m_updateIntSet = true; + Q_EMIT groupsChanged(arg); + } +} + +void setEnabled(bool arg) +{ + if (m_enabled != arg) { + m_enabled = arg; + Q_EMIT enabledChanged(arg); + } +} + +void setOnceOff(bool arg) +{ + if (m_onceOff != arg) { + m_onceOff = arg; + m_needsReset = true; + Q_EMIT onceChanged(arg); + } +} + +void setShape(QQuickParticleExtruder* arg) +{ + if (m_shape != arg) { + m_shape = arg; + Q_EMIT shapeChanged(arg); + } +} + +void setWhenCollidingWith(const QStringList &arg) +{ + if (m_whenCollidingWith != arg) { + m_whenCollidingWith = arg; + Q_EMIT whenCollidingWithChanged(arg); + } +} +public Q_SLOTS: + void updateOffsets(); + +protected: + friend class QQuickParticleSystem; + virtual bool affectParticle(QQuickParticleData *d, qreal dt); + bool m_needsReset:1;//### What is this really saving? + bool m_ignoresTime:1; + bool m_onceOff:1; + bool m_enabled:1; + + QQuickParticleSystem* m_system; + QStringList m_groups; + bool activeGroup(int g); + bool shouldAffect(QQuickParticleData* datum);//Call to do the logic on whether it is affecting that datum + void postAffect(QQuickParticleData* datum);//Call to do the post-affect logic on particles which WERE affected(once off, needs reset, affected signal) + void componentComplete() override; + bool isAffectedConnected(); + static const qreal simulationDelta; + static const qreal simulationCutoff; + + QPointF m_offset; + QSet> m_onceOffed; +private: + QSet m_groupIds; + bool m_updateIntSet; + + QQuickParticleExtruder* m_shape; + + QStringList m_whenCollidingWith; + + bool isColliding(QQuickParticleData* d) const; +}; + +QT_END_NAMESPACE +#endif // PARTICLEAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleemitter_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleemitter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e66e739df2d7dd6c272ada234a9ecf383b7ce4d6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleemitter_p.h @@ -0,0 +1,338 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef PARTICLEEMITTER_H +#define PARTICLEEMITTER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickparticlesystem_p.h" +#include "qquickparticleextruder_p.h" +#include "qquickdirection_p.h" + +#include +#include +#include +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickParticleEmitter : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) + Q_PROPERTY(QString group READ group WRITE setGroup NOTIFY groupChanged) + Q_PROPERTY(QQuickParticleExtruder* shape READ extruder WRITE setExtruder NOTIFY extruderChanged) + Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(int startTime READ startTime WRITE setStartTime NOTIFY startTimeChanged) + + Q_PROPERTY(qreal emitRate READ particlesPerSecond WRITE setParticlesPerSecond NOTIFY particlesPerSecondChanged) + Q_PROPERTY(int lifeSpan READ particleDuration WRITE setParticleDuration NOTIFY particleDurationChanged) + Q_PROPERTY(int lifeSpanVariation READ particleDurationVariation WRITE setParticleDurationVariation NOTIFY particleDurationVariationChanged) + Q_PROPERTY(int maximumEmitted READ maxParticleCount WRITE setMaxParticleCount NOTIFY maximumEmittedChanged) + + Q_PROPERTY(qreal size READ particleSize WRITE setParticleSize NOTIFY particleSizeChanged) + Q_PROPERTY(qreal endSize READ particleEndSize WRITE setParticleEndSize NOTIFY particleEndSizeChanged) + Q_PROPERTY(qreal sizeVariation READ particleSizeVariation WRITE setParticleSizeVariation NOTIFY particleSizeVariationChanged) + + Q_PROPERTY(QQuickDirection *velocity READ velocity WRITE setVelocity NOTIFY velocityChanged) + Q_PROPERTY(QQuickDirection *acceleration READ acceleration WRITE setAcceleration NOTIFY accelerationChanged) + Q_PROPERTY(qreal velocityFromMovement READ velocityFromMovement WRITE setVelocityFromMovement NOTIFY velocityFromMovementChanged) + QML_NAMED_ELEMENT(Emitter) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickParticleEmitter(QQuickItem *parent = nullptr); + virtual ~QQuickParticleEmitter(); + virtual void emitWindow(int timeStamp); + + enum Lifetime { + InfiniteLife = QQuickParticleSystem::maxLife + }; + Q_ENUM(Lifetime) + + bool enabled() const + { + return m_enabled; + } + + qreal particlesPerSecond() const + { + return m_particlesPerSecond; + } + + int particleDuration() const + { + return m_particleDuration; + } + + QQuickParticleSystem* system() const + { + return m_system; + } + + QString group() const + { + return m_group; + } + + QQuickParticleGroupData::ID groupId() const + { + if (m_groupIdNeedRecalculation) + reclaculateGroupId(); + return m_groupId; + } + + int particleDurationVariation() const + { + return m_particleDurationVariation; + } + + qreal velocityFromMovement() const { return m_velocity_from_movement; } + void setVelocityFromMovement(qreal s); + void componentComplete() override; +Q_SIGNALS: + void emitParticles(const QList &particles); + void particlesPerSecondChanged(qreal); + void particleDurationChanged(int); + void enabledChanged(bool); + + void systemChanged(QQuickParticleSystem* arg); + + void groupChanged(const QString &arg); + + void particleDurationVariationChanged(int arg); + + void extruderChanged(QQuickParticleExtruder* arg); + + void particleSizeChanged(qreal arg); + + void particleEndSizeChanged(qreal arg); + + void particleSizeVariationChanged(qreal arg); + + void velocityChanged(QQuickDirection * arg); + + void accelerationChanged(QQuickDirection * arg); + + void maximumEmittedChanged(int arg); + void particleCountChanged(); + + void velocityFromMovementChanged(); + + void startTimeChanged(int arg); + +public Q_SLOTS: + void pulse(int milliseconds); + void burst(int num); + void burst(int num, qreal x, qreal y); + + void setEnabled(bool arg); + + void setParticlesPerSecond(qreal arg) + { + if (m_particlesPerSecond != arg) { + m_particlesPerSecond = arg; + Q_EMIT particlesPerSecondChanged(arg); + } + } + + void setParticleDuration(int arg) + { + if (m_particleDuration != arg) { + m_particleDuration = arg; + Q_EMIT particleDurationChanged(arg); + } + } + + void setSystem(QQuickParticleSystem* arg) + { + if (m_system != arg) { + m_system = arg; + m_groupIdNeedRecalculation = true; + if (m_system) + m_system->registerParticleEmitter(this); + Q_EMIT systemChanged(arg); + } + } + + void setGroup(const QString &arg) + { + if (m_group != arg) { + m_group = arg; + m_groupIdNeedRecalculation = true; + Q_EMIT groupChanged(arg); + } + } + + void setParticleDurationVariation(int arg) + { + if (m_particleDurationVariation != arg) { + m_particleDurationVariation = arg; + Q_EMIT particleDurationVariationChanged(arg); + } + } + void setExtruder(QQuickParticleExtruder* arg) + { + if (m_extruder != arg) { + m_extruder = arg; + Q_EMIT extruderChanged(arg); + } + } + + void setParticleSize(qreal arg) + { + if (m_particleSize != arg) { + m_particleSize = arg; + Q_EMIT particleSizeChanged(arg); + } + } + + void setParticleEndSize(qreal arg) + { + if (m_particleEndSize != arg) { + m_particleEndSize = arg; + Q_EMIT particleEndSizeChanged(arg); + } + } + + void setParticleSizeVariation(qreal arg) + { + if (m_particleSizeVariation != arg) { + m_particleSizeVariation = arg; + Q_EMIT particleSizeVariationChanged(arg); + } + } + + void setVelocity(QQuickDirection * arg) + { + if (m_velocity != arg) { + m_velocity = arg; + Q_EMIT velocityChanged(arg); + } + } + + void setAcceleration(QQuickDirection * arg) + { + if (m_acceleration != arg) { + m_acceleration = arg; + Q_EMIT accelerationChanged(arg); + } + } + + void setMaxParticleCount(int arg); + + void setStartTime(int arg) + { + if (m_startTime != arg) { + m_startTime = arg; + Q_EMIT startTimeChanged(arg); + } + } + + virtual void reset(); +public: + int particleCount() const + { + if (m_maxParticleCount >= 0) + return m_maxParticleCount; + return m_particlesPerSecond*((m_particleDuration+m_particleDurationVariation)/1000.0); + } + + QQuickParticleExtruder* extruder() const + { + return m_extruder; + } + + qreal particleSize() const + { + return m_particleSize; + } + + qreal particleEndSize() const + { + return m_particleEndSize; + } + + qreal particleSizeVariation() const + { + return m_particleSizeVariation; + } + + QQuickDirection * velocity() const + { + return m_velocity; + } + + QQuickDirection * acceleration() const + { + return m_acceleration; + } + + int maxParticleCount() const + { + return m_maxParticleCount; + } + + int startTime() const + { + return m_startTime; + } + + void reclaculateGroupId() const; + +protected: + qreal m_particlesPerSecond; + int m_particleDuration; + int m_particleDurationVariation; + bool m_enabled; + QQuickParticleSystem* m_system; + QQuickParticleExtruder* m_extruder; + QQuickParticleExtruder* m_defaultExtruder; + QQuickParticleExtruder* effectiveExtruder(); + QQuickDirection * m_velocity; + QQuickDirection * m_acceleration; + qreal m_particleSize; + qreal m_particleEndSize; + qreal m_particleSizeVariation; + + int m_startTime; + bool m_overwrite; + + int m_pulseLeft; + QList > m_burstQueue; + int m_maxParticleCount; + + //Used in default implementation, but might be useful + qreal m_velocity_from_movement; + + int m_emitCap; + bool m_reset_last; + qreal m_last_timestamp; + qreal m_last_emission; + + QPointF m_last_emitter; + QPointF m_last_last_emitter; + + bool isEmitConnected(); + +private: // data + QString m_group; + mutable bool m_groupIdNeedRecalculation; + mutable QQuickParticleGroupData::ID m_groupId; + QQuickDirection m_nullVector; + +}; + +QT_END_NAMESPACE + +#endif // PARTICLEEMITTER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleextruder_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleextruder_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2ee620ad9c51c7cb6474f83f4776949b4aba1c3f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticleextruder_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef PARTICLEEXTRUDER_H +#define PARTICLEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickParticleExtruder : public QObject +{ + Q_OBJECT + + QML_NAMED_ELEMENT(ParticleExtruder) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") + +public: + explicit QQuickParticleExtruder(QObject *parent = nullptr); + virtual QPointF extrude(const QRectF &); + virtual bool contains(const QRectF &bounds, const QPointF &point); +}; + +QT_END_NAMESPACE + +#endif // PARTICLEEXTRUDER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlegroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlegroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7aeec4cac46fcced82ad8b68dce4a703557acdb2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlegroup_p.h @@ -0,0 +1,69 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQuickPARTICLEGROUP +#define QQuickPARTICLEGROUP + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include +#include "qquickparticlesystem_p.h" +#include "qqmlparserstatus.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickParticleGroup : public QQuickStochasticState, + public QQmlParserStatus +{ + Q_OBJECT + Q_PROPERTY(QQuickParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) + + //Intercept children requests and assign to the group & system + Q_PROPERTY(QQmlListProperty particleChildren READ particleChildren DESIGNABLE false)//### Hidden property for in-state system definitions - ought not to be used in actual "Sprite" states + Q_CLASSINFO("DefaultProperty", "particleChildren") + QML_NAMED_ELEMENT(ParticleGroup) + QML_ADDED_IN_VERSION(2, 0) + Q_INTERFACES(QQmlParserStatus) + +public: + explicit QQuickParticleGroup(QObject *parent = nullptr); + + QQmlListProperty particleChildren(); + + QQuickParticleSystem* system() const + { + return m_system; + } + +public Q_SLOTS: + + void setSystem(QQuickParticleSystem* arg); + + void delayRedirect(QObject* obj); + +Q_SIGNALS: + + void systemChanged(QQuickParticleSystem* arg); + +protected: + void componentComplete() override; + void classBegin() override {} + +private: + + void performDelayedRedirects(); + + QQuickParticleSystem* m_system; + QList m_delayedRedirects; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlepainter_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlepainter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b8d6f7d4db854f1ce22139eb93fadee18418508d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlepainter_p.h @@ -0,0 +1,125 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef PARTICLE_H +#define PARTICLE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include "qquickparticlesystem_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickParticlePainter : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQuickParticleSystem* system READ system WRITE setSystem NOTIFY systemChanged) + Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged) + + QML_NAMED_ELEMENT(ParticlePainter) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Abstract type. Use one of the inheriting types instead.") + +public: // data + typedef QQuickParticleVarLengthArray GroupIDs; + +public: + explicit QQuickParticlePainter(QQuickItem *parent = nullptr); + //Data Interface to system + void load(QQuickParticleData*); + void reload(QQuickParticleData*); + void setCount(int c); + + int count() const + { + return m_count; + } + + void performPendingCommits();//Called from updatePaintNode + QQuickParticleSystem* system() const + { + return m_system; + } + + QStringList groups() const + { + return m_groups; + } + + const GroupIDs &groupIds() const + { + if (m_groupIdsNeedRecalculation) { + recalculateGroupIds(); + } + return m_groupIds; + } + + void itemChange(ItemChange, const ItemChangeData &) override; + +Q_SIGNALS: + void countChanged(); + void systemChanged(QQuickParticleSystem* arg); + + void groupsChanged(const QStringList &arg); + +public Q_SLOTS: + void setSystem(QQuickParticleSystem* arg); + + void setGroups(const QStringList &arg); + + void calcSystemOffset(bool resetPending = false); + +private Q_SLOTS: + virtual void sceneGraphInvalidated() {} + +protected: + /* Reset resets all your internal data structures. But anything attached to a particle should + be in attached data. So reset + reloads should have no visible effect. + ###Hunt down all cases where we do a complete reset for convenience and be more targeted + */ + virtual void reset(); + + void componentComplete() override; + virtual void initialize(int gIdx, int pIdx){//Called from main thread + Q_UNUSED(gIdx); + Q_UNUSED(pIdx); + } + virtual void commit(int gIdx, int pIdx){//Called in Render Thread + //###If you need to do something on size changed, check m_data size in this? Or we reset you every time? + Q_UNUSED(gIdx); + Q_UNUSED(pIdx); + } + + QQuickParticleSystem* m_system; + friend class QQuickParticleSystem; + int m_count; + bool m_pleaseReset;//Used by subclasses, but it's a nice optimization to know when stuff isn't going to matter. + QPointF m_systemOffset; + + QQuickWindow *m_window; + bool m_windowChanged; + +private: // methods + void recalculateGroupIds() const; + +private: // data + QStringList m_groups; + QSet > m_pendingCommits; + mutable GroupIDs m_groupIds; + mutable bool m_groupIdsNeedRecalculation; +}; + +QT_END_NAMESPACE +#endif // PARTICLE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlesystem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlesystem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..35bd38e0b58a5a5ff9f8e19284a6235ee73d29e9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickparticlesystem_p.h @@ -0,0 +1,583 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef PARTICLESYSTEM_H +#define PARTICLESYSTEM_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +template +class QQuickParticleVarLengthArray: public QVarLengthArray +{ +public: + void insert(const T &element) + { + if (!this->contains(element)) { + this->append(element); + } + } + + bool removeOne(const T &element) + { + for (int i = 0; i < this->size(); ++i) { + if (this->at(i) == element) { + this->remove(i); + return true; + } + } + + return false; + } +}; + +class QQuickParticleSystem; +class QQuickParticleAffector; +class QQuickParticleEmitter; +class QQuickParticlePainter; +class QQuickParticleData; +class QQuickParticleSystemAnimation; +class QQuickStochasticEngine; +class QQuickSprite; +class QQuickV4ParticleData; +class QQuickParticleGroup; +class QQuickImageParticle; + +struct QQuickParticleDataHeapNode{ + int time;//in ms + QSet data;//Set ptrs instead? +}; + +class Q_QUICKPARTICLES_EXPORT QQuickParticleDataHeap { + //Idea is to do a binary heap, but which also stores a set of int,Node* so that if the int already exists, you can + //add it to the data* list. Pops return the whole list at once. +public: + QQuickParticleDataHeap(); + void insert(QQuickParticleData* data); + void insertTimed(QQuickParticleData* data, int time); + + int top(); + + bool isEmpty() const { return m_end == 0; } + + QSet pop(); + + void clear(); + + bool contains(QQuickParticleData*);//O(n), for debugging purposes only +private: + void grow(); + void swap(int, int); + void bubbleUp(int); + void bubbleDown(int); + int m_size; + int m_end; + QQuickParticleDataHeapNode m_tmp; + QVector m_data; + QHash m_lookups; +}; + +class Q_QUICKPARTICLES_EXPORT QQuickParticleGroupData { + class FreeList + { + public: + FreeList() {} + + void resize(int newSize) + { + Q_ASSERT(newSize >= 0); + int oldSize = isUnused.size(); + isUnused.resize(newSize, true); + if (newSize > oldSize) { + if (firstUnused == UINT_MAX) { + firstUnused = oldSize; + } else { + firstUnused = std::min(firstUnused, unsigned(oldSize)); + } + } else if (firstUnused >= unsigned(newSize)) { + firstUnused = UINT_MAX; + } + } + + void free(int index) + { + isUnused.setBit(index); + firstUnused = std::min(firstUnused, unsigned(index)); + --allocated; + } + + int count() const + { return allocated; } + + bool hasUnusedEntries() const + { return firstUnused != UINT_MAX; } + + int alloc() + { + if (hasUnusedEntries()) { + int nextFree = firstUnused; + isUnused.clearBit(firstUnused); + firstUnused = isUnused.findNext(firstUnused, true, false); + if (firstUnused >= unsigned(isUnused.size())) { + firstUnused = UINT_MAX; + } + ++allocated; + return nextFree; + } else { + return -1; + } + } + + private: + QV4::BitVector isUnused; + unsigned firstUnused = UINT_MAX; + int allocated = 0; + }; + +public: // types + typedef int ID; + enum { InvalidID = -1, DefaultGroupID = 0 }; + +public: + QQuickParticleGroupData(const QString &name, QQuickParticleSystem* sys); + ~QQuickParticleGroupData(); + + int size() const + { + return m_size; + } + + bool isActive() { return freeList.count() > 0; } + + QString name() const; + + void setSize(int newSize); + + const ID index; + QQuickParticleVarLengthArray painters;//TODO: What if they are dynamically removed? + + //TODO: Refactor particle data list out into a separate class + QVector data; + FreeList freeList; + QQuickParticleDataHeap dataHeap; + bool recycle(); //Force recycling round, returns true if all indexes are now reusable + + void initList(); + void kill(QQuickParticleData* d); + + //After calling this, initialize, then call prepareRecycler(d) + QQuickParticleData* newDatum(bool respectsLimits); + + //TODO: Find and clean up those that don't get added to the recycler (currently they get lost) + void prepareRecycler(QQuickParticleData* d); + +private: + int m_size; + QQuickParticleSystem* m_system; + // Only used in recycle() for tracking of alive particles after latest recycling round + QVector m_latestAliveParticles; +}; + +struct Color4ub { + uchar r; + uchar g; + uchar b; + uchar a; +}; + +class Q_QUICKPARTICLES_EXPORT QQuickParticleData +{ +public: + //Convenience functions for working backwards, because parameters are from the start of particle life + //If setting multiple parameters at once, doing the conversion yourself will be faster. + + //sets the x accleration without affecting the instantaneous x velocity or position + void setInstantaneousAX(float ax, QQuickParticleSystem *particleSystem); + //sets the x velocity without affecting the instantaneous x postion + void setInstantaneousVX(float vx, QQuickParticleSystem *particleSystem); + //sets the instantaneous x postion + void setInstantaneousX(float x, QQuickParticleSystem *particleSystem); + //sets the y accleration without affecting the instantaneous y velocity or position + void setInstantaneousAY(float ay, QQuickParticleSystem *particleSystem); + //sets the y velocity without affecting the instantaneous y postion + void setInstantaneousVY(float vy, QQuickParticleSystem *particleSystem); + //sets the instantaneous Y postion + void setInstantaneousY(float y, QQuickParticleSystem *particleSystem); + + //TODO: Slight caching? + float curX(QQuickParticleSystem *particleSystem) const; + float curVX(QQuickParticleSystem *particleSystem) const; + float curAX() const { return ax; } + float curAX(QQuickParticleSystem *) const { return ax; } // used by the macros in qquickv4particledata.cpp + float curY(QQuickParticleSystem *particleSystem) const; + float curVY(QQuickParticleSystem *particleSystem) const; + float curAY() const { return ay; } + float curAY(QQuickParticleSystem *) const { return ay; } // used by the macros in qquickv4particledata.cpp + + int index = 0; + int systemIndex = -1; + + //General Position Stuff + float x = 0; + float y = 0; + float t = -1; + float lifeSpan = 0; + float size = 0; + float endSize = 0; + float vx = 0; + float vy = 0; + float ax = 0; + float ay = 0; + + //Painter-specific stuff, now universally shared + //Used by ImageParticle color mode + Color4ub color = { 255, 255, 255, 255}; + //Used by ImageParticle deform mode + float xx = 1; + float xy = 0; + float yx = 0; + float yy = 1; + float rotation = 0; + float rotationVelocity = 0; + uchar autoRotate = 0; // Basically a bool + //Used by ImageParticle Sprite mode + float animIdx = 0; + float frameDuration = 1; + float frameAt = -1;//Used for duration -1 + float frameCount = 1; + float animT = -1; + float animX = 0; + float animY = 0; + float animWidth = 1; + float animHeight = 1; + + QQuickParticleGroupData::ID groupId = 0; + + //Used by ImageParticle data shadowing + QQuickImageParticle* colorOwner = nullptr; + QQuickImageParticle* rotationOwner = nullptr; + QQuickImageParticle* deformationOwner = nullptr; + QQuickImageParticle* animationOwner = nullptr; + + //Used by ItemParticle + QQuickItem* delegate = nullptr; + //Used by custom affectors + float update = 0; + + void debugDump(QQuickParticleSystem *particleSystem) const; + bool stillAlive(QQuickParticleSystem *particleSystem) const; //Only checks end, because usually that's all you need and it's a little faster. + bool alive(QQuickParticleSystem *particleSystem) const; + float lifeLeft(QQuickParticleSystem *particleSystem) const; + + float curSize(QQuickParticleSystem *particleSystem) const; + + QQuickV4ParticleData v4Value(QQuickParticleSystem *particleSystem); + void extendLife(float time, QQuickParticleSystem *particleSystem); + + static inline constexpr float EPSILON() noexcept { return 0.001f; } +}; + +static_assert(std::is_trivially_copyable_v); +static_assert(std::is_trivially_destructible_v); + +class Q_QUICKPARTICLES_EXPORT QQuickParticleSystem : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged) + Q_PROPERTY(bool paused READ isPaused WRITE setPaused NOTIFY pausedChanged) + Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged) + QML_NAMED_ELEMENT(ParticleSystem) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickParticleSystem(QQuickItem *parent = nullptr); + ~QQuickParticleSystem(); + + bool isRunning() const + { + return m_running; + } + + int count() const + { + return particleCount; + } + + static const int maxLife = 600000; + +Q_SIGNALS: + + void systemInitialized(); + void runningChanged(bool arg); + void pausedChanged(bool arg); + void emptyChanged(bool arg); + +public Q_SLOTS: + void start(){setRunning(true);} + void stop(){setRunning(false);} + void restart(){setRunning(false);setRunning(true);} + void pause(){setPaused(true);} + void resume(){setPaused(false);} + + void reset(); + void setRunning(bool arg); + void setPaused(bool arg); + + virtual int duration() const { return -1; } + + +protected: + //This one only once per frame (effectively) + void componentComplete() override; + +private Q_SLOTS: + void emittersChanged(); + void loadPainter(QQuickParticlePainter *p); + void createEngine(); //Not invoked by sprite engine, unlike Sprite uses + void particleStateChange(int idx); + +public: + //These can be called multiple times per frame, performance critical + void emitParticle(QQuickParticleData* p, QQuickParticleEmitter *particleEmitter); + QQuickParticleData *newDatum( + int groupId, bool respectLimits = true, int sysIdx = -1, + const QQuickParticleData *cloneFrom = nullptr); + void finishNewDatum(QQuickParticleData*); + void moveGroups(QQuickParticleData *d, int newGIdx); + int nextSystemIndex(); + + //This one only once per painter per frame + int systemSync(QQuickParticlePainter* p); + + //Data members here for ease of related class and auto-test usage. Not "public" API. TODO: d_ptrize + QSet needsReset; + QVector bySysIdx; //Another reference to the data (data owned by group), but by sysIdx + QQuickStochasticEngine* stateEngine; + + QHash groupIds; + QVarLengthArray groupData; + int nextFreeGroupId; + int registerParticleGroupData(const QString &name, QQuickParticleGroupData *pgd); + + //Also only here for auto-test usage + void updateCurrentTime( int currentTime ); + QQuickParticleSystemAnimation* m_animation; + bool m_running; + bool m_debugMode; + + int timeInt; + bool initialized; + int particleCount; + + void registerParticlePainter(QQuickParticlePainter* p); + void registerParticleEmitter(QQuickParticleEmitter* e); + void finishRegisteringParticleEmitter(QQuickParticleEmitter *e); + void registerParticleAffector(QQuickParticleAffector* a); + void registerParticleGroup(QQuickParticleGroup* g); + + static void statePropertyRedirect(QQmlListProperty *prop, QObject *value); + static void stateRedirect(QQuickParticleGroup* group, QQuickParticleSystem* sys, QObject *value); + bool isPaused() const + { + return m_paused; + } + + bool isEmpty() const + { + return m_empty; + } + +private: + void searchNextFreeGroupId(); + +private: + void emitterAdded(QQuickParticleEmitter *e); + void postProcessEmitters(); + void initializeSystem(); + void initGroups(); + QList > m_emitters; + QList > m_affectors; + QList > m_painters; + QList > m_syncList; + QList m_groups; + int m_nextIndex; + QSet m_reusableIndexes; + bool m_componentComplete; + + bool m_paused; + bool m_allDead; + bool m_empty; +}; + +// Internally, this animation drives all the timing. Painters sync up in their updatePaintNode +class QQuickParticleSystemAnimation : public QAbstractAnimation +{ + Q_OBJECT +public: + QQuickParticleSystemAnimation(QQuickParticleSystem* system) + : QAbstractAnimation(static_cast(system)), m_system(system) + { } +protected: + void updateCurrentTime(int t) override + { + m_system->updateCurrentTime(t); + } + + int duration() const override + { + return -1; + } + +private: + QQuickParticleSystem* m_system; +}; + +inline void QQuickParticleData::setInstantaneousAX(float ax, QQuickParticleSystem* particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + float vx = (this->vx + t * this->ax) - t * ax; + float ex = this->x + this->vx * t + 0.5f * this->ax * t_sq; + float x = ex - t * vx - 0.5f * t_sq * ax; + + this->ax = ax; + this->vx = vx; + this->x = x; +} + +inline void QQuickParticleData::setInstantaneousVX(float vx, QQuickParticleSystem* particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + float evx = vx - t * this->ax; + float ex = this->x + this->vx * t + 0.5f * this->ax * t_sq; + float x = ex - t * evx - 0.5f * t_sq * this->ax; + + this->vx = evx; + this->x = x; +} + +inline void QQuickParticleData::setInstantaneousX(float x, QQuickParticleSystem* particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + this->x = x - t * this->vx - 0.5f * t_sq * this->ax; +} + +inline void QQuickParticleData::setInstantaneousAY(float ay, QQuickParticleSystem* particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + float vy = (this->vy + t * this->ay) - t * ay; + float ey = this->y + this->vy * t + 0.5f * this->ay * t_sq; + float y = ey - t * vy - 0.5f * t_sq * ay; + + this->ay = ay; + this->vy = vy; + this->y = y; +} + +inline void QQuickParticleData::setInstantaneousVY(float vy, QQuickParticleSystem* particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + float evy = vy - t * this->ay; + float ey = this->y + this->vy * t + 0.5f * this->ay * t_sq; + float y = ey - t*evy - 0.5f * t_sq * this->ay; + + this->vy = evy; + this->y = y; +} + +inline void QQuickParticleData::setInstantaneousY(float y, QQuickParticleSystem *particleSystem) +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + this->y = y - t * this->vy - 0.5f * t_sq * this->ay; +} + +inline float QQuickParticleData::curX(QQuickParticleSystem *particleSystem) const +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + return this->x + this->vx * t + 0.5f * this->ax * t_sq; +} + +inline float QQuickParticleData::curVX(QQuickParticleSystem *particleSystem) const +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + return this->vx + t * this->ax; +} + +inline float QQuickParticleData::curY(QQuickParticleSystem *particleSystem) const +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + float t_sq = t * t; + return y + vy * t + 0.5f * ay * t_sq; +} + +inline float QQuickParticleData::curVY(QQuickParticleSystem *particleSystem) const +{ + float t = (particleSystem->timeInt / 1000.0f) - this->t; + return vy + t*ay; +} + +inline bool QQuickParticleData::stillAlive(QQuickParticleSystem* system) const +{ + if (!system) + return false; + return (t + lifeSpan - EPSILON()) > (system->timeInt / 1000.0f); +} + +inline bool QQuickParticleData::alive(QQuickParticleSystem* system) const +{ + if (!system) + return false; + float st = (system->timeInt / 1000.0f); + return (t + EPSILON()) < st && (t + lifeSpan - EPSILON()) > st; +} + +inline float QQuickParticleData::lifeLeft(QQuickParticleSystem *particleSystem) const +{ + if (!particleSystem) + return 0.0f; + return (t + lifeSpan) - (particleSystem->timeInt / 1000.0f); +} + +inline float QQuickParticleData::curSize(QQuickParticleSystem *particleSystem) const +{ + if (!particleSystem || lifeSpan == 0.0f) + return 0.0f; + return size + (endSize - size) * (1 - (lifeLeft(particleSystem) / lifeSpan)); +} + +QT_END_NAMESPACE + +#endif // PARTICLESYSTEM_H + + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointattractor_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointattractor_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9b2d6666bef84c81f43c73260ba615c76862e788 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointattractor_p.h @@ -0,0 +1,140 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef ATTRACTORAFFECTOR_H +#define ATTRACTORAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickAttractorAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged) + Q_PROPERTY(qreal pointX READ pointX WRITE setPointX NOTIFY pointXChanged) + Q_PROPERTY(qreal pointY READ pointY WRITE setPointY NOTIFY pointYChanged) + Q_PROPERTY(AffectableParameters affectedParameter READ affectedParameter WRITE setAffectedParameter NOTIFY affectedParameterChanged) + Q_PROPERTY(Proportion proportionalToDistance READ proportionalToDistance WRITE setProportionalToDistance NOTIFY proportionalToDistanceChanged) + QML_NAMED_ELEMENT(Attractor) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum Proportion{ + Constant, + Linear, + Quadratic, + InverseLinear, + InverseQuadratic + }; + Q_ENUM(Proportion) + + enum AffectableParameters { + Position, + Velocity, + Acceleration + }; + Q_ENUM(AffectableParameters) + + explicit QQuickAttractorAffector(QQuickItem *parent = nullptr); + + qreal strength() const + { + return m_strength; + } + + qreal pointX() const + { + return m_x; + } + + qreal pointY() const + { + return m_y; + } + + AffectableParameters affectedParameter() const + { + return m_physics; + } + + Proportion proportionalToDistance() const + { + return m_proportionalToDistance; + } + +Q_SIGNALS: + + void strengthChanged(qreal arg); + + void pointXChanged(qreal arg); + + void pointYChanged(qreal arg); + + void affectedParameterChanged(AffectableParameters arg); + + void proportionalToDistanceChanged(Proportion arg); + +public Q_SLOTS: +void setStrength(qreal arg) +{ + if (m_strength != arg) { + m_strength = arg; + Q_EMIT strengthChanged(arg); + } +} + +void setPointX(qreal arg) +{ + if (m_x != arg) { + m_x = arg; + Q_EMIT pointXChanged(arg); + } +} + +void setPointY(qreal arg) +{ + if (m_y != arg) { + m_y = arg; + Q_EMIT pointYChanged(arg); + } +} +void setAffectedParameter(AffectableParameters arg) +{ + if (m_physics != arg) { + m_physics = arg; + Q_EMIT affectedParameterChanged(arg); + } +} + +void setProportionalToDistance(Proportion arg) +{ + if (m_proportionalToDistance != arg) { + m_proportionalToDistance = arg; + Q_EMIT proportionalToDistanceChanged(arg); + } +} + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +private: +qreal m_strength; +qreal m_x; +qreal m_y; +AffectableParameters m_physics; +Proportion m_proportionalToDistance; +}; + +QT_END_NAMESPACE +#endif // ATTRACTORAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointdirection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointdirection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..91c76fc21c394bdf7479cf15d0e65a1f8ca8efde --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickpointdirection_p.h @@ -0,0 +1,105 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef POINTVECTOR_H +#define POINTVECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickdirection_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickPointDirection : public QQuickDirection +{ + Q_OBJECT + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged) + Q_PROPERTY(qreal xVariation READ xVariation WRITE setXVariation NOTIFY xVariationChanged) + Q_PROPERTY(qreal yVariation READ yVariation WRITE setYVariation NOTIFY yVariationChanged) + QML_NAMED_ELEMENT(PointDirection) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickPointDirection(QObject *parent = nullptr); + QPointF sample(const QPointF &from) override; + qreal x() const + { + return m_x; + } + + qreal y() const + { + return m_y; + } + + qreal xVariation() const + { + return m_xVariation; + } + + qreal yVariation() const + { + return m_yVariation; + } + +Q_SIGNALS: + + void xChanged(qreal arg); + + void yChanged(qreal arg); + + void xVariationChanged(qreal arg); + + void yVariationChanged(qreal arg); + +public Q_SLOTS: + void setX(qreal arg) + { + if (m_x != arg) { + m_x = arg; + Q_EMIT xChanged(arg); + } + } + + void setY(qreal arg) + { + if (m_y != arg) { + m_y = arg; + Q_EMIT yChanged(arg); + } + } + + void setXVariation(qreal arg) + { + if (m_xVariation != arg) { + m_xVariation = arg; + Q_EMIT xVariationChanged(arg); + } + } + + void setYVariation(qreal arg) + { + if (m_yVariation != arg) { + m_yVariation = arg; + Q_EMIT yVariationChanged(arg); + } + } + +private: + + qreal m_x; + qreal m_y; + qreal m_xVariation; + qreal m_yVariation; +}; + +QT_END_NAMESPACE +#endif // POINTVECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickrectangleextruder_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickrectangleextruder_p.h new file mode 100644 index 0000000000000000000000000000000000000000..91849054243bec16828681e535a42a4cd0895126 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickrectangleextruder_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef RECTANGLEEXTRUDER_H +#define RECTANGLEEXTRUDER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickparticleextruder_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickRectangleExtruder : public QQuickParticleExtruder +{ + Q_OBJECT + Q_PROPERTY(bool fill READ fill WRITE setFill NOTIFY fillChanged) + QML_NAMED_ELEMENT(RectangleShape) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickRectangleExtruder(QObject *parent = nullptr); + QPointF extrude(const QRectF &) override; + bool contains(const QRectF &bounds, const QPointF &point) override; + bool fill() const + { + return m_fill; + } + +Q_SIGNALS: + + void fillChanged(bool arg); + +public Q_SLOTS: + + void setFill(bool arg) + { + if (m_fill != arg) { + m_fill = arg; + Q_EMIT fillChanged(arg); + } + } +protected: + bool m_fill; +}; + +QT_END_NAMESPACE + +#endif // RectangleEXTRUDER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickspritegoal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickspritegoal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..acf345c0e6614cec68e146eef015ca6f48cefed8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickspritegoal_p.h @@ -0,0 +1,95 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef SPRITEGOALAFFECTOR_H +#define SPRITEGOALAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickStochasticEngine; + +class Q_QUICKPARTICLES_EXPORT QQuickSpriteGoalAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(QString goalState READ goalState WRITE setGoalState NOTIFY goalStateChanged) + Q_PROPERTY(bool jump READ jump WRITE setJump NOTIFY jumpChanged) + Q_PROPERTY(bool systemStates READ systemStates WRITE setSystemStates NOTIFY systemStatesChanged) + QML_NAMED_ELEMENT(SpriteGoal) + QML_ADDED_IN_VERSION(2, 0) +public: + explicit QQuickSpriteGoalAffector(QQuickItem *parent = nullptr); + + QString goalState() const + { + return m_goalState; + } + + bool jump() const + { + return m_jump; + } + bool systemStates() const + { + return m_systemStates; + } + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + + void goalStateChanged(const QString &arg); + + void jumpChanged(bool arg); + + void systemStatesChanged(bool arg); + +public Q_SLOTS: + +void setGoalState(const QString &arg); + +void setJump(bool arg) +{ + if (m_jump != arg) { + m_jump = arg; + Q_EMIT jumpChanged(arg); + } +} + +void setSystemStates(bool arg) +{ + if (m_systemStates != arg) { + //TODO: GroupGoal was added (and this deprecated) Oct 4 - remove it in a few weeks. + qmlWarning(this) << "systemStates is deprecated and will be removed soon. Use GroupGoal instead."; + m_systemStates = arg; + Q_EMIT systemStatesChanged(arg); + } +} + +private: + void updateStateIndex(QQuickStochasticEngine* e); + QString m_goalState; + int m_goalIdx; + QQuickStochasticEngine* m_lastEngine; + bool m_jump; + bool m_systemStates; + + bool m_notUsingEngine; +}; + +QT_END_NAMESPACE + +#endif // SPRITEGOALAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktargetdirection_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktargetdirection_p.h new file mode 100644 index 0000000000000000000000000000000000000000..81ebb49cf764d56e32650025472b13e834194980 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktargetdirection_p.h @@ -0,0 +1,163 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef DIRECTEDVECTOR_H +#define DIRECTEDVECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickdirection_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class Q_QUICKPARTICLES_EXPORT QQuickTargetDirection : public QQuickDirection +{ + Q_OBJECT + Q_PROPERTY(qreal targetX READ targetX WRITE setTargetX NOTIFY targetXChanged) + Q_PROPERTY(qreal targetY READ targetY WRITE setTargetY NOTIFY targetYChanged) + //If targetItem is set, X/Y are ignored. Aims at middle of item, use variation for variation + Q_PROPERTY(QQuickItem* targetItem READ targetItem WRITE setTargetItem NOTIFY targetItemChanged) + + Q_PROPERTY(qreal targetVariation READ targetVariation WRITE setTargetVariation NOTIFY targetVariationChanged) + + //TODO: An enum would be better + Q_PROPERTY(bool proportionalMagnitude READ proportionalMagnitude WRITE setProportionalMagnitude NOTIFY proprotionalMagnitudeChanged) + Q_PROPERTY(qreal magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged) + Q_PROPERTY(qreal magnitudeVariation READ magnitudeVariation WRITE setMagnitudeVariation NOTIFY magnitudeVariationChanged) + QML_NAMED_ELEMENT(TargetDirection) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTargetDirection(QObject *parent = nullptr); + QPointF sample(const QPointF &from) override; + + qreal targetX() const + { + return m_targetX; + } + + qreal targetY() const + { + return m_targetY; + } + + qreal targetVariation() const + { + return m_targetVariation; + } + + qreal magnitude() const + { + return m_magnitude; + } + + bool proportionalMagnitude() const + { + return m_proportionalMagnitude; + } + + qreal magnitudeVariation() const + { + return m_magnitudeVariation; + } + + QQuickItem* targetItem() const + { + return m_targetItem; + } + +Q_SIGNALS: + + void targetXChanged(qreal arg); + + void targetYChanged(qreal arg); + + void targetVariationChanged(qreal arg); + + void magnitudeChanged(qreal arg); + + void proprotionalMagnitudeChanged(bool arg); + + void magnitudeVariationChanged(qreal arg); + + void targetItemChanged(QQuickItem* arg); + +public Q_SLOTS: + void setTargetX(qreal arg) + { + if (m_targetX != arg) { + m_targetX = arg; + Q_EMIT targetXChanged(arg); + } + } + + void setTargetY(qreal arg) + { + if (m_targetY != arg) { + m_targetY = arg; + Q_EMIT targetYChanged(arg); + } + } + + void setTargetVariation(qreal arg) + { + if (m_targetVariation != arg) { + m_targetVariation = arg; + Q_EMIT targetVariationChanged(arg); + } + } + + void setMagnitude(qreal arg) + { + if (m_magnitude != arg) { + m_magnitude = arg; + Q_EMIT magnitudeChanged(arg); + } + } + + void setProportionalMagnitude(bool arg) + { + if (m_proportionalMagnitude != arg) { + m_proportionalMagnitude = arg; + Q_EMIT proprotionalMagnitudeChanged(arg); + } + } + + void setMagnitudeVariation(qreal arg) + { + if (m_magnitudeVariation != arg) { + m_magnitudeVariation = arg; + Q_EMIT magnitudeVariationChanged(arg); + } + } + + void setTargetItem(QQuickItem* arg) + { + if (m_targetItem != arg) { + m_targetItem = arg; + Q_EMIT targetItemChanged(arg); + } + } + +private: + qreal m_targetX; + qreal m_targetY; + qreal m_targetVariation; + bool m_proportionalMagnitude; + qreal m_magnitude; + qreal m_magnitudeVariation; + QQuickItem *m_targetItem; +}; + +QT_END_NAMESPACE +#endif // DIRECTEDVECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktrailemitter_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktrailemitter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b40aeac675656d836e9ce513b05e4ae7390cb75f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquicktrailemitter_p.h @@ -0,0 +1,141 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef FOLLOWEMITTER_H +#define FOLLOWEMITTER_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleemitter_p.h" +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +class Q_QUICKPARTICLES_EXPORT QQuickTrailEmitter : public QQuickParticleEmitter +{ + Q_OBJECT + Q_PROPERTY(QString follow READ follow WRITE setFollow NOTIFY followChanged) + Q_PROPERTY(int emitRatePerParticle READ particlesPerParticlePerSecond WRITE setParticlesPerParticlePerSecond NOTIFY particlesPerParticlePerSecondChanged) + + Q_PROPERTY(QQuickParticleExtruder* emitShape READ emissonShape WRITE setEmissionShape NOTIFY emissionShapeChanged) + Q_PROPERTY(qreal emitHeight READ emitterYVariation WRITE setEmitterYVariation NOTIFY emitterYVariationChanged) + Q_PROPERTY(qreal emitWidth READ emitterXVariation WRITE setEmitterXVariation NOTIFY emitterXVariationChanged) + QML_NAMED_ELEMENT(TrailEmitter) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum EmitSize { + ParticleSize = -2//Anything less than 0 will do + }; + Q_ENUM(EmitSize) + explicit QQuickTrailEmitter(QQuickItem *parent = nullptr); + void emitWindow(int timeStamp) override; + void reset() override; + + int particlesPerParticlePerSecond() const + { + return m_particlesPerParticlePerSecond; + } + + qreal emitterXVariation() const + { + return m_emitterXVariation; + } + + qreal emitterYVariation() const + { + return m_emitterYVariation; + } + + QString follow() const + { + return m_follow; + } + + QQuickParticleExtruder* emissonShape() const + { + return m_emissionExtruder; + } + +Q_SIGNALS: + void emitFollowParticles( + const QList &particles, + const QQuickV4ParticleData &followed); + + void particlesPerParticlePerSecondChanged(int arg); + + void emitterXVariationChanged(qreal arg); + + void emitterYVariationChanged(qreal arg); + + void followChanged(const QString &arg); + + void emissionShapeChanged(QQuickParticleExtruder* arg); + +public Q_SLOTS: + + void setParticlesPerParticlePerSecond(int arg) + { + if (m_particlesPerParticlePerSecond != arg) { + m_particlesPerParticlePerSecond = arg; + Q_EMIT particlesPerParticlePerSecondChanged(arg); + } + } + void setEmitterXVariation(qreal arg) + { + if (m_emitterXVariation != arg) { + m_emitterXVariation = arg; + Q_EMIT emitterXVariationChanged(arg); + } + } + + void setEmitterYVariation(qreal arg) + { + if (m_emitterYVariation != arg) { + m_emitterYVariation = arg; + Q_EMIT emitterYVariationChanged(arg); + } + } + + void setFollow(const QString &arg) + { + if (m_follow != arg) { + m_follow = arg; + Q_EMIT followChanged(arg); + } + } + + void setEmissionShape(QQuickParticleExtruder* arg) + { + if (m_emissionExtruder != arg) { + m_emissionExtruder = arg; + Q_EMIT emissionShapeChanged(arg); + } + } + +private Q_SLOTS: + void recalcParticlesPerSecond(); + +private: + QVector m_lastEmission; + int m_particlesPerParticlePerSecond; + qreal m_lastTimeStamp; + qreal m_emitterXVariation; + qreal m_emitterYVariation; + QString m_follow; + int m_followCount; + QQuickParticleExtruder* m_emissionExtruder; + QQuickParticleExtruder* m_defaultEmissionExtruder; + bool isEmitFollowConnected(); +}; + +QT_END_NAMESPACE +#endif // FOLLOWEMITTER_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickturbulence_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickturbulence_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b24cc22ce2074130742c67d616d44feeac801208 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickturbulence_p.h @@ -0,0 +1,87 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef TURBULENCEAFFECTOR_H +#define TURBULENCEAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include "qquickparticleaffector_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QQuickParticlePainter; + +class Q_QUICKPARTICLES_EXPORT QQuickTurbulenceAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(qreal strength READ strength WRITE setStrength NOTIFY strengthChanged) + Q_PROPERTY(QUrl noiseSource READ noiseSource WRITE setNoiseSource NOTIFY noiseSourceChanged) + QML_NAMED_ELEMENT(Turbulence) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTurbulenceAffector(QQuickItem *parent = nullptr); + ~QQuickTurbulenceAffector(); + void affectSystem(qreal dt) override; + + qreal strength() const + { + return m_strength; + } + + QUrl noiseSource() const + { + return m_noiseSource; + } +Q_SIGNALS: + + void strengthChanged(qreal arg); + + void noiseSourceChanged(const QUrl &arg); + +public Q_SLOTS: + + void setStrength(qreal arg) + { + if (m_strength != arg) { + m_strength = arg; + Q_EMIT strengthChanged(arg); + } + } + + void setNoiseSource(const QUrl &arg) + { + if (m_noiseSource != arg) { + m_noiseSource = arg; + Q_EMIT noiseSourceChanged(arg); + initializeGrid(); + } + } + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; +private: + void ensureInit(); + void mapUpdate(); + void initializeGrid(); + qreal boundsRespectingField(int x, int y); + qreal m_strength; + int m_gridSize; + qreal** m_field; + QPointF** m_vectorField; + bool m_inited; + QUrl m_noiseSource; +}; + +QT_END_NAMESPACE +#endif // TURBULENCEAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickv4particledata_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickv4particledata_p.h new file mode 100644 index 0000000000000000000000000000000000000000..10b349931069ab0ea51054508c388aacb8019e2d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickv4particledata_p.h @@ -0,0 +1,127 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQuickV8PARTICLEDATA_H +#define QQuickV8PARTICLEDATA_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickV4ParticleData +{ + Q_GADGET + QML_VALUE_TYPE(particle) + QML_ADDED_IN_VERSION(6, 7) + +#define Q_QUICK_PARTICLE_ACCESSOR(TYPE, VARIABLE, NAME) \ + Q_PROPERTY(TYPE NAME READ NAME WRITE set_ ## NAME FINAL) \ + TYPE NAME() const { return datum ? datum->VARIABLE : TYPE(); } \ + void set_ ## NAME(TYPE a) { if (datum) datum->VARIABLE = a; } + + Q_QUICK_PARTICLE_ACCESSOR(float, x, initialX) + Q_QUICK_PARTICLE_ACCESSOR(float, vx, initialVX) + Q_QUICK_PARTICLE_ACCESSOR(float, ax, initialAX) + Q_QUICK_PARTICLE_ACCESSOR(float, y, initialY) + Q_QUICK_PARTICLE_ACCESSOR(float, vy, initialVY) + Q_QUICK_PARTICLE_ACCESSOR(float, ay, initialAY) + Q_QUICK_PARTICLE_ACCESSOR(float, t, t) + Q_QUICK_PARTICLE_ACCESSOR(float, size, startSize) + Q_QUICK_PARTICLE_ACCESSOR(float, endSize, endSize) + Q_QUICK_PARTICLE_ACCESSOR(float, lifeSpan, lifeSpan) + Q_QUICK_PARTICLE_ACCESSOR(float, rotation, rotation) + Q_QUICK_PARTICLE_ACCESSOR(float, rotationVelocity, rotationVelocity) + Q_QUICK_PARTICLE_ACCESSOR(bool, autoRotate, autoRotate) + Q_QUICK_PARTICLE_ACCESSOR(bool, update, update) + Q_QUICK_PARTICLE_ACCESSOR(float, xx, xDeformationVectorX) + Q_QUICK_PARTICLE_ACCESSOR(float, yx, yDeformationVectorX) + Q_QUICK_PARTICLE_ACCESSOR(float, xy, xDeformationVectorY) + Q_QUICK_PARTICLE_ACCESSOR(float, yy, yDeformationVectorY) + + // Undocumented? + Q_QUICK_PARTICLE_ACCESSOR(float, animIdx, animationIndex) + Q_QUICK_PARTICLE_ACCESSOR(float, frameDuration, frameDuration) + Q_QUICK_PARTICLE_ACCESSOR(float, frameAt, frameAt) + Q_QUICK_PARTICLE_ACCESSOR(float, frameCount, frameCount) + Q_QUICK_PARTICLE_ACCESSOR(float, animT, animationT) + +#undef Q_QUICK_PARTICLE_ACCESSOR + +#define Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(GETTER, SETTER, NAME) \ + Q_PROPERTY(float NAME READ NAME WRITE set_ ## NAME) \ + float NAME() const { return (datum && particleSystem) ? datum->GETTER(particleSystem) : 0; } \ + void set_ ## NAME(float a) { if (datum && particleSystem) datum->SETTER(a, particleSystem); } + + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curX, setInstantaneousX, x) + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curVX, setInstantaneousVX, vx) + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curAX, setInstantaneousAX, ax) + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curY, setInstantaneousY, y) + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curVY, setInstantaneousVY, vy) + Q_QUICK_PARTICLE_SYSTEM_ACCESSOR(curAY, setInstantaneousAY, ay) + +#undef Q_QUICK_PARTICLE_SYSTEM_ACCESSOR + +#define Q_QUICK_PARTICLE_COLOR_ACCESSOR(VAR, NAME) \ + Q_PROPERTY(float NAME READ NAME WRITE set_ ## NAME) \ + float NAME() const { return datum ? datum->color.VAR / 255.0 : 0.0; } \ + void set_ ## NAME(float a)\ + {\ + if (datum)\ + datum->color.VAR = qMin(255, qMax(0, (int)::floor(a * 255.0)));\ + } + + Q_QUICK_PARTICLE_COLOR_ACCESSOR(r, red) + Q_QUICK_PARTICLE_COLOR_ACCESSOR(g, green) + Q_QUICK_PARTICLE_COLOR_ACCESSOR(b, blue) + Q_QUICK_PARTICLE_COLOR_ACCESSOR(a, alpha) + +#undef Q_QUICK_PARTICLE_COLOR_ACCESSOR + + Q_PROPERTY(float lifeLeft READ lifeLeft) + Q_PROPERTY(float currentSize READ currentSize) + +public: + QQuickV4ParticleData() = default; + QQuickV4ParticleData(QQuickParticleData *datum, QQuickParticleSystem *system) + : datum(datum) + , particleSystem(system) + {} + + Q_INVOKABLE void discard() + { + if (datum) + datum->lifeSpan = 0; + } + + float lifeLeft() const + { + return (datum && particleSystem) ? datum->lifeLeft(particleSystem) : 0.0; + } + + float currentSize() const + { + return (datum && particleSystem) ? datum->curSize(particleSystem) : 0.0; + } + +private: + QQuickParticleData *datum = nullptr; + QQuickParticleSystem *particleSystem = nullptr; +}; + + +QT_END_NAMESPACE + + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickwander_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickwander_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5b3b526a20d2502be83eb1a5b29710143871f807 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qquickwander_p.h @@ -0,0 +1,131 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef WANDERAFFECTOR_H +#define WANDERAFFECTOR_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// +#include +#include "qquickparticleaffector_p.h" + +QT_BEGIN_NAMESPACE + +struct WanderData{ + qreal x_vel; + qreal y_vel; + qreal x_peak; + qreal x_var; + qreal y_peak; + qreal y_var; +}; + +class Q_QUICKPARTICLES_EXPORT QQuickWanderAffector : public QQuickParticleAffector +{ + Q_OBJECT + Q_PROPERTY(qreal pace READ pace WRITE setPace NOTIFY paceChanged) + Q_PROPERTY(qreal xVariance READ xVariance WRITE setXVariance NOTIFY xVarianceChanged) + Q_PROPERTY(qreal yVariance READ yVariance WRITE setYVariance NOTIFY yVarianceChanged) + Q_PROPERTY(AffectableParameters affectedParameter READ affectedParameter WRITE setAffectedParameter NOTIFY affectedParameterChanged) + QML_NAMED_ELEMENT(Wander) + QML_ADDED_IN_VERSION(2, 0) + +public: + enum AffectableParameters { + Position, + Velocity, + Acceleration + }; + Q_ENUM(AffectableParameters) + + explicit QQuickWanderAffector(QQuickItem *parent = nullptr); + ~QQuickWanderAffector(); +// virtual void reset(int systemIdx); + + qreal xVariance() const + { + return m_xVariance; + } + + qreal yVariance() const + { + return m_yVariance; + } + + qreal pace() const + { + return m_pace; + } + + AffectableParameters affectedParameter() const + { + return m_affectedParameter; + } + +protected: + bool affectParticle(QQuickParticleData *d, qreal dt) override; + +Q_SIGNALS: + + void xVarianceChanged(qreal arg); + + void yVarianceChanged(qreal arg); + + void paceChanged(qreal arg); + + + void affectedParameterChanged(AffectableParameters arg); + +public Q_SLOTS: +void setXVariance(qreal arg) +{ + if (m_xVariance != arg) { + m_xVariance = arg; + Q_EMIT xVarianceChanged(arg); + } +} + +void setYVariance(qreal arg) +{ + if (m_yVariance != arg) { + m_yVariance = arg; + Q_EMIT yVarianceChanged(arg); + } +} + +void setPace(qreal arg) +{ + if (m_pace != arg) { + m_pace = arg; + Q_EMIT paceChanged(arg); + } +} + + +void setAffectedParameter(AffectableParameters arg) +{ + if (m_affectedParameter != arg) { + m_affectedParameter = arg; + Q_EMIT affectedParameterChanged(arg); + } +} + +private: + WanderData* getData(int idx); + QHash m_wanderData; + qreal m_xVariance; + qreal m_yVariance; + qreal m_pace; + AffectableParameters m_affectedParameter; +}; + +QT_END_NAMESPACE +#endif // WANDERAFFECTOR_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qtquickparticlesglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qtquickparticlesglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..50a590aa402fb465f63331fdbd1af406e707745f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickParticles/6.8.1/QtQuickParticles/private/qtquickparticlesglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKPARTICLESGLOBAL_P_H +#define QTQUICKPARTICLESGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#endif // QTQUICKPARTICLESGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b785bce51e025ba71cf9ba304659bfd340e63087 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p.h @@ -0,0 +1,438 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPE_P_H +#define QQUICKSHAPE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShapePathPrivate; +class QQuickShapePrivate; + +void Q_QUICKSHAPES_EXPORT QQuickShapes_initializeModule(); + +class Q_QUICKSHAPES_EXPORT QQuickShapesModule +{ +public: + static void defineModule(); +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapeGradient : public QQuickGradient +{ + Q_OBJECT + Q_PROPERTY(SpreadMode spread READ spread WRITE setSpread NOTIFY spreadChanged) + Q_CLASSINFO("DefaultProperty", "stops") + + QML_NAMED_ELEMENT(ShapeGradient) + QML_ADDED_IN_VERSION(1, 0) + QML_UNCREATABLE("ShapeGradient is an abstract base class."); + +public: + enum SpreadMode { + PadSpread, + ReflectSpread, + RepeatSpread + }; + Q_ENUM(SpreadMode) + + QQuickShapeGradient(QObject *parent = nullptr); + + SpreadMode spread() const; + void setSpread(SpreadMode mode); + +Q_SIGNALS: + void spreadChanged(); + +private: + SpreadMode m_spread; +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapeLinearGradient : public QQuickShapeGradient +{ + Q_OBJECT + Q_PROPERTY(qreal x1 READ x1 WRITE setX1 NOTIFY x1Changed) + Q_PROPERTY(qreal y1 READ y1 WRITE setY1 NOTIFY y1Changed) + Q_PROPERTY(qreal x2 READ x2 WRITE setX2 NOTIFY x2Changed) + Q_PROPERTY(qreal y2 READ y2 WRITE setY2 NOTIFY y2Changed) + Q_CLASSINFO("DefaultProperty", "stops") + QML_NAMED_ELEMENT(LinearGradient) + QML_ADDED_IN_VERSION(1, 0) + +public: + QQuickShapeLinearGradient(QObject *parent = nullptr); + + qreal x1() const; + void setX1(qreal v); + qreal y1() const; + void setY1(qreal v); + qreal x2() const; + void setX2(qreal v); + qreal y2() const; + void setY2(qreal v); + +Q_SIGNALS: + void x1Changed(); + void y1Changed(); + void x2Changed(); + void y2Changed(); + +private: + QPointF m_start; + QPointF m_end; +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapeRadialGradient : public QQuickShapeGradient +{ + Q_OBJECT + Q_PROPERTY(qreal centerX READ centerX WRITE setCenterX NOTIFY centerXChanged) + Q_PROPERTY(qreal centerY READ centerY WRITE setCenterY NOTIFY centerYChanged) + Q_PROPERTY(qreal centerRadius READ centerRadius WRITE setCenterRadius NOTIFY centerRadiusChanged) + Q_PROPERTY(qreal focalX READ focalX WRITE setFocalX NOTIFY focalXChanged) + Q_PROPERTY(qreal focalY READ focalY WRITE setFocalY NOTIFY focalYChanged) + Q_PROPERTY(qreal focalRadius READ focalRadius WRITE setFocalRadius NOTIFY focalRadiusChanged) + Q_CLASSINFO("DefaultProperty", "stops") + QML_NAMED_ELEMENT(RadialGradient) + QML_ADDED_IN_VERSION(1, 0) + +public: + QQuickShapeRadialGradient(QObject *parent = nullptr); + + qreal centerX() const; + void setCenterX(qreal v); + + qreal centerY() const; + void setCenterY(qreal v); + + qreal centerRadius() const; + void setCenterRadius(qreal v); + + qreal focalX() const; + void setFocalX(qreal v); + + qreal focalY() const; + void setFocalY(qreal v); + + qreal focalRadius() const; + void setFocalRadius(qreal v); + +Q_SIGNALS: + void centerXChanged(); + void centerYChanged(); + void focalXChanged(); + void focalYChanged(); + void centerRadiusChanged(); + void focalRadiusChanged(); + +private: + QPointF m_centerPoint; + QPointF m_focalPoint; + qreal m_centerRadius = 0; + qreal m_focalRadius = 0; +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapeConicalGradient : public QQuickShapeGradient +{ + Q_OBJECT + Q_PROPERTY(qreal centerX READ centerX WRITE setCenterX NOTIFY centerXChanged) + Q_PROPERTY(qreal centerY READ centerY WRITE setCenterY NOTIFY centerYChanged) + Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged) + Q_CLASSINFO("DefaultProperty", "stops") + QML_NAMED_ELEMENT(ConicalGradient) + QML_ADDED_IN_VERSION(1, 0) + +public: + QQuickShapeConicalGradient(QObject *parent = nullptr); + + qreal centerX() const; + void setCenterX(qreal v); + + qreal centerY() const; + void setCenterY(qreal v); + + qreal angle() const; + void setAngle(qreal v); + +Q_SIGNALS: + void centerXChanged(); + void centerYChanged(); + void angleChanged(); + +private: + QPointF m_centerPoint; + qreal m_angle = 0; +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapePath : public QQuickPath +{ + Q_OBJECT + + Q_PROPERTY(QColor strokeColor READ strokeColor WRITE setStrokeColor NOTIFY strokeColorChanged) + Q_PROPERTY(qreal strokeWidth READ strokeWidth WRITE setStrokeWidth NOTIFY strokeWidthChanged) + Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor NOTIFY fillColorChanged) + Q_PROPERTY(FillRule fillRule READ fillRule WRITE setFillRule NOTIFY fillRuleChanged) + Q_PROPERTY(JoinStyle joinStyle READ joinStyle WRITE setJoinStyle NOTIFY joinStyleChanged) + Q_PROPERTY(int miterLimit READ miterLimit WRITE setMiterLimit NOTIFY miterLimitChanged) + Q_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle NOTIFY capStyleChanged) + Q_PROPERTY(StrokeStyle strokeStyle READ strokeStyle WRITE setStrokeStyle NOTIFY strokeStyleChanged) + Q_PROPERTY(qreal dashOffset READ dashOffset WRITE setDashOffset NOTIFY dashOffsetChanged) + Q_PROPERTY(QVector dashPattern READ dashPattern WRITE setDashPattern NOTIFY dashPatternChanged) + Q_PROPERTY(QQuickShapeGradient *fillGradient READ fillGradient WRITE setFillGradient RESET resetFillGradient) + Q_PROPERTY(QSizeF scale READ scale WRITE setScale NOTIFY scaleChanged REVISION(1, 14)) + Q_PROPERTY(PathHints pathHints READ pathHints WRITE setPathHints NOTIFY pathHintsChanged REVISION(6, 7) FINAL) + Q_PROPERTY(QMatrix4x4 fillTransform READ fillTransform WRITE setFillTransform NOTIFY fillTransformChanged REVISION(6, 8) FINAL) + Q_PROPERTY(QQuickItem *fillItem READ fillItem WRITE setFillItem NOTIFY fillItemChanged REVISION(6, 8) FINAL) + QML_NAMED_ELEMENT(ShapePath) + QML_ADDED_IN_VERSION(1, 0) + +public: + enum FillRule { + OddEvenFill = Qt::OddEvenFill, + WindingFill = Qt::WindingFill + }; + Q_ENUM(FillRule) + + enum JoinStyle { + MiterJoin = Qt::MiterJoin, + BevelJoin = Qt::BevelJoin, + RoundJoin = Qt::RoundJoin + }; + Q_ENUM(JoinStyle) + + enum CapStyle { + FlatCap = Qt::FlatCap, + SquareCap = Qt::SquareCap, + RoundCap = Qt::RoundCap + }; + Q_ENUM(CapStyle) + + enum StrokeStyle { + SolidLine = Qt::SolidLine, + DashLine = Qt::DashLine + }; + Q_ENUM(StrokeStyle) + + enum PathHint { + PathLinear = 0x1, + PathQuadratic = 0x2, + PathConvex = 0x4, + PathFillOnRight = 0x8, + PathSolid = 0x10, + PathNonIntersecting = 0x20, + PathNonOverlappingControlPointTriangles = 0x40 + }; + Q_DECLARE_FLAGS(PathHints, PathHint) + Q_FLAG(PathHints) + + QQuickShapePath(QObject *parent = nullptr); + ~QQuickShapePath(); + + QColor strokeColor() const; + void setStrokeColor(const QColor &color); + + qreal strokeWidth() const; + void setStrokeWidth(qreal w); + + QColor fillColor() const; + void setFillColor(const QColor &color); + + FillRule fillRule() const; + void setFillRule(FillRule fillRule); + + JoinStyle joinStyle() const; + void setJoinStyle(JoinStyle style); + + int miterLimit() const; + void setMiterLimit(int limit); + + CapStyle capStyle() const; + void setCapStyle(CapStyle style); + + StrokeStyle strokeStyle() const; + void setStrokeStyle(StrokeStyle style); + + qreal dashOffset() const; + void setDashOffset(qreal offset); + + QVector dashPattern() const; + void setDashPattern(const QVector &array); + + QQuickShapeGradient *fillGradient() const; + void setFillGradient(QQuickShapeGradient *gradient); + void resetFillGradient(); + + PathHints pathHints() const; + void setPathHints(PathHints newPathHints); + + QMatrix4x4 fillTransform() const; + void setFillTransform(const QMatrix4x4 &matrix); + + QQuickItem *fillItem() const; + void setFillItem(QQuickItem *newFillItem); + +Q_SIGNALS: + void shapePathChanged(); + void strokeColorChanged(); + void strokeWidthChanged(); + void fillColorChanged(); + void fillRuleChanged(); + void joinStyleChanged(); + void miterLimitChanged(); + void capStyleChanged(); + void strokeStyleChanged(); + void dashOffsetChanged(); + void dashPatternChanged(); + + Q_REVISION(6, 7) void pathHintsChanged(); + Q_REVISION(6, 8) void fillTransformChanged(); + Q_REVISION(6, 8) void fillItemChanged(); + +private: + Q_DISABLE_COPY(QQuickShapePath) + Q_DECLARE_PRIVATE(QQuickShapePath) + Q_PRIVATE_SLOT(d_func(), void _q_fillGradientChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_fillItemDestroyed()) +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickShapePath::PathHints) + +class Q_QUICKSHAPES_EXPORT QQuickShape : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(RendererType rendererType READ rendererType NOTIFY rendererChanged) + Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) + Q_PROPERTY(bool vendorExtensionsEnabled READ vendorExtensionsEnabled WRITE setVendorExtensionsEnabled NOTIFY vendorExtensionsEnabledChanged) + Q_PROPERTY(RendererType preferredRendererType READ preferredRendererType + WRITE setPreferredRendererType NOTIFY preferredRendererTypeChanged REVISION(6, 6) FINAL) + Q_PROPERTY(Status status READ status NOTIFY statusChanged) + Q_PROPERTY(ContainsMode containsMode READ containsMode WRITE setContainsMode NOTIFY containsModeChanged REVISION(1, 11)) + Q_PROPERTY(QRectF boundingRect READ boundingRect NOTIFY boundingRectChanged REVISION(6, 6) FINAL) + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged REVISION(6, 7) FINAL) + Q_PROPERTY(HAlignment horizontalAlignment READ horizontalAlignment WRITE setHorizontalAlignment NOTIFY horizontalAlignmentChanged REVISION(6, 7) FINAL) + Q_PROPERTY(VAlignment verticalAlignment READ verticalAlignment WRITE setVerticalAlignment NOTIFY verticalAlignmentChanged REVISION(6, 7) FINAL) + + Q_PROPERTY(QQmlListProperty data READ data) + Q_CLASSINFO("DefaultProperty", "data") + QML_NAMED_ELEMENT(Shape) + QML_ADDED_IN_VERSION(1, 0) + +public: + enum RendererType { + UnknownRenderer, + GeometryRenderer, + NvprRenderer, + SoftwareRenderer, + CurveRenderer + }; + Q_ENUM(RendererType) + + enum Status { + Null, + Ready, + Processing + }; + Q_ENUM(Status) + + enum ContainsMode { + BoundingRectContains, + FillContains + }; + Q_ENUM(ContainsMode) + + enum FillMode { + NoResize, + PreserveAspectFit, + PreserveAspectCrop, + Stretch + }; + Q_ENUM(FillMode) + + enum HAlignment { AlignLeft = Qt::AlignLeft, + AlignRight = Qt::AlignRight, + AlignHCenter = Qt::AlignHCenter }; + Q_ENUM(HAlignment) + enum VAlignment { AlignTop = Qt::AlignTop, + AlignBottom = Qt::AlignBottom, + AlignVCenter = Qt::AlignVCenter }; + Q_ENUM(VAlignment) + + QQuickShape(QQuickItem *parent = nullptr); + ~QQuickShape(); + + RendererType rendererType() const; + + bool asynchronous() const; + void setAsynchronous(bool async); + + Q_REVISION(6, 6) RendererType preferredRendererType() const; + Q_REVISION(6, 6) void setPreferredRendererType(RendererType preferredType); + + Q_REVISION(6, 6) QRectF boundingRect() const override; + + bool vendorExtensionsEnabled() const; + void setVendorExtensionsEnabled(bool enable); + + Status status() const; + + ContainsMode containsMode() const; + void setContainsMode(ContainsMode containsMode); + + bool contains(const QPointF &point) const override; + + QQmlListProperty data(); + + Q_REVISION(6, 7) FillMode fillMode() const; + Q_REVISION(6, 7) void setFillMode(FillMode newFillMode); + + Q_REVISION(6, 7) HAlignment horizontalAlignment() const; + Q_REVISION(6, 7) void setHorizontalAlignment(HAlignment newHorizontalAlignment); + + Q_REVISION(6, 7) VAlignment verticalAlignment() const; + Q_REVISION(6, 7) void setVerticalAlignment(VAlignment newVerticalAlignment); + +protected: + QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *) override; + void updatePolish() override; + void itemChange(ItemChange change, const ItemChangeData &data) override; + void componentComplete() override; + void classBegin() override; + +Q_SIGNALS: + void rendererChanged(); + void asynchronousChanged(); + void vendorExtensionsEnabledChanged(); + void statusChanged(); + Q_REVISION(6, 6) void preferredRendererTypeChanged(); + Q_REVISION(6, 6) void boundingRectChanged(); + Q_REVISION(1, 11) void containsModeChanged(); + + Q_REVISION(6, 7) void fillModeChanged(); + Q_REVISION(6, 7) void horizontalAlignmentChanged(); + Q_REVISION(6, 7) void verticalAlignmentChanged(); + +private: + Q_DISABLE_COPY(QQuickShape) + Q_DECLARE_PRIVATE(QQuickShape) + Q_PRIVATE_SLOT(d_func(), void _q_shapePathChanged()) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHAPE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..99866f9d7e00259d9c38ac771fa4781150a6277a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshape_p_p.h @@ -0,0 +1,174 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPE_P_P_H +#define QQUICKSHAPE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#if QT_CONFIG(opengl) +# include +#endif +QT_BEGIN_NAMESPACE + +class QSGPlainTexture; +class QRhi; + +class QQuickAbstractPathRenderer +{ +public: + enum Flag { + SupportsAsync = 0x01 + }; + Q_DECLARE_FLAGS(Flags, Flag) + enum FillGradientType { NoGradient = 0, LinearGradient, RadialGradient, ConicalGradient }; + + virtual ~QQuickAbstractPathRenderer() { } + + // Gui thread + virtual void beginSync(int totalCount, bool *countChanged) = 0; + virtual void endSync(bool async) = 0; + virtual void setAsyncCallback(void (*)(void *), void *) { } + virtual Flags flags() const { return {}; } + virtual void setPath(int index, const QQuickPath *path) = 0; + virtual void setPath(int index, const QPainterPath &path, QQuickShapePath::PathHints pathHints = {}) = 0; + virtual void setStrokeColor(int index, const QColor &color) = 0; + virtual void setStrokeWidth(int index, qreal w) = 0; + virtual void setFillColor(int index, const QColor &color) = 0; + virtual void setFillRule(int index, QQuickShapePath::FillRule fillRule) = 0; + virtual void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) = 0; + virtual void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) = 0; + virtual void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, + qreal dashOffset, const QVector &dashPattern) = 0; + virtual void setFillGradient(int index, QQuickShapeGradient *gradient) = 0; + virtual void setFillTextureProvider(int index, QQuickItem *textureProviderItem) = 0; + virtual void setFillTransform(int index, const QSGTransform &transform) = 0; + virtual void setTriangulationScale(qreal) { } + virtual void handleSceneChange(QQuickWindow *window) = 0; + + // Render thread, with gui blocked + virtual void updateNode() = 0; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickAbstractPathRenderer::Flags) + +struct QQuickShapeStrokeFillParams +{ + QQuickShapeStrokeFillParams(); + + QColor strokeColor; + qreal strokeWidth; + QColor fillColor; + QQuickShapePath::FillRule fillRule; + QQuickShapePath::JoinStyle joinStyle; + int miterLimit; + QQuickShapePath::CapStyle capStyle; + QQuickShapePath::StrokeStyle strokeStyle; + qreal dashOffset; + QVector dashPattern; + QQuickShapeGradient *fillGradient; + QSGTransform fillTransform; + QQuickItem *fillItem; +}; + +class Q_QUICKSHAPES_EXPORT QQuickShapePathPrivate : public QQuickPathPrivate +{ + Q_DECLARE_PUBLIC(QQuickShapePath) + +public: + enum Dirty { + DirtyPath = 0x01, + DirtyStrokeColor = 0x02, + DirtyStrokeWidth = 0x04, + DirtyFillColor = 0x08, + DirtyFillRule = 0x10, + DirtyStyle = 0x20, + DirtyDash = 0x40, + DirtyFillGradient = 0x80, + DirtyFillTransform = 0x100, + DirtyFillItem = 0x200, + + DirtyAll = 0x3FF + }; + + QQuickShapePathPrivate(); + + void _q_pathChanged(); + void _q_fillGradientChanged(); + void _q_fillItemDestroyed(); + + void handleSceneChange(); + + static QQuickShapePathPrivate *get(QQuickShapePath *p) { return p->d_func(); } + + int dirty; + QQuickShapeStrokeFillParams sfp; + QQuickShapePath::PathHints pathHints; +}; + +class QQuickShapePrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickShape) + +public: + QQuickShapePrivate(); + ~QQuickShapePrivate(); + + QQuickShape::RendererType selectRendererType(); + void createRenderer(); + QSGNode *createNode(); + void sync(); + + void _q_shapePathChanged(); + void setStatus(QQuickShape::Status newStatus); + void handleSceneChange(QQuickWindow *w); + + static QQuickShapePrivate *get(QQuickShape *item) { return item->d_func(); } + + static void asyncShapeReady(void *data); + + qreal getImplicitWidth() const override; + qreal getImplicitHeight() const override; + + int effectRefCount; + QVector sp; + QElapsedTimer syncTimer; + QQuickAbstractPathRenderer *renderer = nullptr; + int syncTimingTotalDirty = 0; + int syncTimeCounter = 0; + QQuickShape::Status status = QQuickShape::Null; + QQuickShape::RendererType rendererType = QQuickShape::UnknownRenderer; + QQuickShape::RendererType preferredType = QQuickShape::UnknownRenderer; + QQuickShape::ContainsMode containsMode = QQuickShape::BoundingRectContains; + QQuickShape::FillMode fillMode = QQuickShape::NoResize; + QQuickShape::HAlignment horizontalAlignment = QQuickShape::AlignLeft; + QQuickShape::VAlignment verticalAlignment = QQuickShape::AlignTop; + + bool spChanged = false; + bool rendererChanged = false; + bool async = false; + bool enableVendorExts = false; + bool syncTimingActive = false; + qreal triangulationScale = 1.0; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..823693f0065c4b2b271f687e4e3338c8583d240a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p.h @@ -0,0 +1,165 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPECURVERENDERER_P_H +#define QQUICKSHAPECURVERENDERER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShapeCurveRunnable; + +class Q_QUICKSHAPES_EXPORT QQuickShapeCurveRenderer : public QQuickAbstractPathRenderer +{ +public: + QQuickShapeCurveRenderer(QQuickItem *item) + : m_item(item) + { } + ~QQuickShapeCurveRenderer() override; + + void beginSync(int totalCount, bool *countChanged) override; + void setPath(int index, const QQuickPath *path) override; + void setPath(int index, const QPainterPath &path, QQuickShapePath::PathHints pathHints = {}) override; + void setStrokeColor(int index, const QColor &color) override; + void setStrokeWidth(int index, qreal w) override; + void setFillColor(int index, const QColor &color) override; + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, + qreal dashOffset, const QVector &dashPattern) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; + void setFillTextureProvider(int index, QQuickItem *textureProviderItem) override; + void setFillTransform(int index, const QSGTransform &transform) override; + void endSync(bool async) override; + void setAsyncCallback(void (*)(void *), void *) override; + Flags flags() const override { return SupportsAsync; } + void handleSceneChange(QQuickWindow *window) override; + + void updateNode() override; + + void setRootNode(QSGNode *node); + void clearNodeReferences(); + + using NodeList = QVector; + + enum DirtyFlag + { + PathDirty = 0x01, + FillDirty = 0x02, + StrokeDirty = 0x04, + UniformsDirty = 0x08 + }; + + enum DebugVisualizationOption { + NoDebug = 0, + DebugCurves = 0x01, + DebugWireframe = 0x02 + }; + + static int debugVisualization(); + static void setDebugVisualization(int options); + +private: + struct PathData { + + bool isFillVisible() const + { + return gradientType != QGradient::NoGradient + || fillTextureProviderItem != nullptr + || fillColor.alpha() > 0; + } + + bool isStrokeVisible() const + { + return validPenWidth && pen.color().alpha() > 0 && pen.style() != Qt::NoPen; + } + + QGradient::Type gradientType = QGradient::NoGradient; + QSGGradientCache::GradientDesc gradient; + QSGTransform fillTransform; + QColor fillColor; + Qt::FillRule fillRule = Qt::OddEvenFill; + QPen pen; + bool validPenWidth = true; + int m_dirty = 0; + QQuickShapePath::PathHints pathHints; + + QPainterPath originalPath; + QQuadPath path; + QQuadPath fillPath; + + NodeList fillNodes; + NodeList strokeNodes; + + QQuickShapeCurveRunnable *currentRunner = nullptr; + QQuickItem *fillTextureProviderItem = nullptr; + }; + + void setUpRunner(PathData *pathData); + void maybeUpdateAsyncItem(); + + static void processPath(PathData *pathData); + static NodeList addFillNodes(const QQuadPath &path); + static NodeList addTriangulatingStrokerNodes(const QQuadPath &path, const QPen &pen); + static NodeList addCurveStrokeNodes(const QQuadPath &path, const QPen &pen); + + QQuickItem *m_item; + QSGNode *m_rootNode = nullptr; + QVector m_paths; + void (*m_asyncCallback)(void *) = nullptr; + void *m_asyncCallbackData = nullptr; + static int debugVisualizationFlags; + + friend class QQuickShapeCurveRunnable; +}; + +class QQuickShapeCurveRunnable : public QObject, public QRunnable +{ + Q_OBJECT + +public: + ~QQuickShapeCurveRunnable() override; + void run() override; + + bool isInitialized = false; + bool isAsync = false; + bool isDone = false; + bool orphaned = false; + + // input / output + QQuickShapeCurveRenderer::PathData pathData; + +Q_SIGNALS: + void done(QQuickShapeCurveRunnable *self); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHAPECURVERENDERER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..42b0e46b35e5b1ea82ed9d8625d1f0d3caa8ff79 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapecurverenderer_p_p.h @@ -0,0 +1,28 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + + +#ifndef QQUICKSHAPECURVERENDERER_P_P_H +#define QQUICKSHAPECURVERENDERER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcShapeCurveRenderer); + +QT_END_NAMESPACE + +#endif //QQUICKSHAPECURVERENDERER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapegenericrenderer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapegenericrenderer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b3905a2f83de2004d70acc8d549759290d8ac675 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapegenericrenderer_p.h @@ -0,0 +1,397 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPEGENERICRENDERER_P_H +#define QQUICKSHAPEGENERICRENDERER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShapeGenericNode; +class QQuickShapeGenericStrokeFillNode; +class QQuickShapeFillRunnable; +class QQuickShapeStrokeRunnable; + +class QQuickShapeGenericRenderer : public QQuickAbstractPathRenderer +{ +public: + enum Dirty { + DirtyFillGeom = 0x01, + DirtyStrokeGeom = 0x02, + DirtyColor = 0x04, + DirtyFillGradient = 0x08, + DirtyFillTransform = 0x10, + DirtyFillTexture = 0x20, + DirtyList = 0x40 // only for accDirty + }; + + QQuickShapeGenericRenderer(QQuickItem *item) + : m_item(item), + m_api(QSGRendererInterface::Unknown), + m_rootNode(nullptr), + m_accDirty(0), + m_asyncCallback(nullptr), + m_asyncCallbackData(nullptr) + { } + ~QQuickShapeGenericRenderer(); + + void beginSync(int totalCount, bool *countChanged) override; + void setPath(int index, const QQuickPath *path) override; + void setPath(int index, const QPainterPath &path, QQuickShapePath::PathHints pathHints = {}) override; + void setStrokeColor(int index, const QColor &color) override; + void setStrokeWidth(int index, qreal w) override; + void setFillColor(int index, const QColor &color) override; + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, + qreal dashOffset, const QVector &dashPattern) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; + void setFillTextureProvider(int index, QQuickItem *textureProviderItem) override; + void setFillTransform(int index, const QSGTransform &transform) override; + void setTriangulationScale(qreal scale) override; + void endSync(bool async) override; + void setAsyncCallback(void (*)(void *), void *) override; + Flags flags() const override { return SupportsAsync; } + void handleSceneChange(QQuickWindow *window) override; + + void updateNode() override; + + void setRootNode(QQuickShapeGenericNode *node); + + struct Color4ub { unsigned char r, g, b, a; }; + typedef QVector VertexContainerType; + typedef QVector TexturedVertexContainerType; + typedef QVector IndexContainerType; + + static void triangulateFill(const QPainterPath &path, + const Color4ub &fillColor, + VertexContainerType *fillVertices, + IndexContainerType *fillIndices, + QSGGeometry::Type *indexType, + bool supportsElementIndexUint, + qreal triangulationScale); + static void triangulateStroke(const QPainterPath &path, + const QPen &pen, + const Color4ub &strokeColor, + VertexContainerType *strokeVertices, + const QSize &clipSize, + qreal triangulationScale); + +private: + void maybeUpdateAsyncItem(); + + struct ShapePathData { + float strokeWidth; + QPen pen; + Color4ub strokeColor = { uchar(0), uchar(0), uchar(0), uchar(0) }; + Color4ub fillColor = { uchar(0), uchar(0), uchar(0), uchar(0) }; + Qt::FillRule fillRule; + QPainterPath path; + FillGradientType fillGradientActive; + QSGGradientCache::GradientDesc fillGradient; + QQuickItem *fillTextureProviderItem = nullptr; + QSGTransform fillTransform; + VertexContainerType fillVertices; + IndexContainerType fillIndices; + QSGGeometry::Type indexType; + VertexContainerType strokeVertices; + int syncDirty; + int effectiveDirty = 0; + QQuickShapeFillRunnable *pendingFill = nullptr; + QQuickShapeStrokeRunnable *pendingStroke = nullptr; + }; + + void updateShadowDataInNode(ShapePathData *d, QQuickShapeGenericStrokeFillNode *n); + void updateFillNode(ShapePathData *d, QQuickShapeGenericNode *node); + void updateStrokeNode(ShapePathData *d, QQuickShapeGenericNode *node); + + QQuickItem *m_item; + QSGRendererInterface::GraphicsApi m_api; + QQuickShapeGenericNode *m_rootNode; + QVector m_sp; + int m_accDirty; + void (*m_asyncCallback)(void *); + void *m_asyncCallbackData; + float m_triangulationScale = 1.0; +}; + +class QQuickShapeFillRunnable : public QObject, public QRunnable +{ + Q_OBJECT + +public: + void run() override; + + bool orphaned = false; + + // input + QPainterPath path; + QQuickShapeGenericRenderer::Color4ub fillColor; + bool supportsElementIndexUint; + qreal triangulationScale; + + // output + QQuickShapeGenericRenderer::VertexContainerType fillVertices; + QQuickShapeGenericRenderer::IndexContainerType fillIndices; + QSGGeometry::Type indexType; + +Q_SIGNALS: + void done(QQuickShapeFillRunnable *self); +}; + +class QQuickShapeStrokeRunnable : public QObject, public QRunnable +{ + Q_OBJECT + +public: + void run() override; + + bool orphaned = false; + + // input + QPainterPath path; + QPen pen; + QQuickShapeGenericRenderer::Color4ub strokeColor; + QSize clipSize; + qreal triangulationScale; + + // output + QQuickShapeGenericRenderer::VertexContainerType strokeVertices; + +Q_SIGNALS: + void done(QQuickShapeStrokeRunnable *self); +}; + +class QQuickShapeGenericStrokeFillNode : public QObject, public QSGGeometryNode +{ + Q_OBJECT +public: + QQuickShapeGenericStrokeFillNode(QQuickWindow *window); + + enum Material { + MatSolidColor, + MatLinearGradient, + MatRadialGradient, + MatConicalGradient, + MatTextureFill + }; + + void activateMaterial(QQuickWindow *window, Material m); + + // shadow data for custom materials + QSGGradientCache::GradientDesc m_fillGradient; + QSGTextureProvider *m_fillTextureProvider = nullptr; + QSGTransform m_fillTransform; + void preprocess() override; + +private Q_SLOTS: + void handleTextureChanged(); + void handleTextureProviderDestroyed(); + +private: + QScopedPointer m_material; + + friend class QQuickShapeGenericRenderer; +}; + +class QQuickShapeGenericNode : public QSGNode +{ +public: + QQuickShapeGenericStrokeFillNode *m_fillNode = nullptr; + QQuickShapeGenericStrokeFillNode *m_strokeNode = nullptr; + QQuickShapeGenericNode *m_next = nullptr; +}; + +class QQuickShapeGenericMaterialFactory +{ +public: + static QSGMaterial *createVertexColor(QQuickWindow *window); + static QSGMaterial *createLinearGradient(QQuickWindow *window, QQuickShapeGenericStrokeFillNode *node); + static QSGMaterial *createRadialGradient(QQuickWindow *window, QQuickShapeGenericStrokeFillNode *node); + static QSGMaterial *createConicalGradient(QQuickWindow *window, QQuickShapeGenericStrokeFillNode *node); + static QSGMaterial *createTextureFill(QQuickWindow *window, QQuickShapeGenericStrokeFillNode *node); +}; + +class QQuickShapeLinearGradientRhiShader : public QSGMaterialShader +{ +public: + QQuickShapeLinearGradientRhiShader(int viewCount); + + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, + QSGMaterial *oldMaterial) override; + void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, + QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; + +private: + QSGTransform m_fillTransform; + QVector2D m_gradA; + QVector2D m_gradB; +}; + +class QQuickShapeLinearGradientMaterial : public QSGMaterial +{ +public: + QQuickShapeLinearGradientMaterial(QQuickShapeGenericStrokeFillNode *node) + : m_node(node) + { + // Passing RequiresFullMatrix is essential in order to prevent the + // batch renderer from baking in simple, translate-only transforms into + // the vertex data. The shader will rely on the fact that + // vertexCoord.xy is the Shape-space coordinate and so no modifications + // are welcome. + setFlag(Blending | RequiresFullMatrix); + } + + QSGMaterialType *type() const override; + int compare(const QSGMaterial *other) const override; + QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override; + + QQuickShapeGenericStrokeFillNode *node() const { return m_node; } + +private: + QQuickShapeGenericStrokeFillNode *m_node; +}; + +class QQuickShapeRadialGradientRhiShader : public QSGMaterialShader +{ +public: + QQuickShapeRadialGradientRhiShader(int viewCount); + + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, + QSGMaterial *oldMaterial) override; + void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, + QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; + +private: + QSGTransform m_fillTransform; + QVector2D m_focalPoint; + QVector2D m_focalToCenter; + float m_centerRadius; + float m_focalRadius; +}; + +class QQuickShapeRadialGradientMaterial : public QSGMaterial +{ +public: + QQuickShapeRadialGradientMaterial(QQuickShapeGenericStrokeFillNode *node) + : m_node(node) + { + setFlag(Blending | RequiresFullMatrix); + } + + QSGMaterialType *type() const override; + int compare(const QSGMaterial *other) const override; + QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override; + + QQuickShapeGenericStrokeFillNode *node() const { return m_node; } + +private: + QQuickShapeGenericStrokeFillNode *m_node; +}; + +class QQuickShapeConicalGradientRhiShader : public QSGMaterialShader +{ +public: + QQuickShapeConicalGradientRhiShader(int viewCount); + + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, + QSGMaterial *oldMaterial) override; + void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, + QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; + +private: + QSGTransform m_fillTransform; + QVector2D m_centerPoint; + float m_angle; +}; + +class QQuickShapeConicalGradientMaterial : public QSGMaterial +{ +public: + QQuickShapeConicalGradientMaterial(QQuickShapeGenericStrokeFillNode *node) + : m_node(node) + { + setFlag(Blending | RequiresFullMatrix); + } + + QSGMaterialType *type() const override; + int compare(const QSGMaterial *other) const override; + QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override; + + QQuickShapeGenericStrokeFillNode *node() const { return m_node; } + +private: + QQuickShapeGenericStrokeFillNode *m_node; +}; + +class QQuickShapeTextureFillRhiShader : public QSGMaterialShader +{ +public: + QQuickShapeTextureFillRhiShader(int viewCount); + + bool updateUniformData(RenderState &state, QSGMaterial *newMaterial, + QSGMaterial *oldMaterial) override; + void updateSampledImage(RenderState &state, int binding, QSGTexture **texture, + QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; + +private: + QSGTransform m_fillTransform; + QVector2D m_boundsOffset; + QVector2D m_boundsSize; +}; + +class QQuickShapeTextureFillMaterial : public QSGMaterial +{ +public: + QQuickShapeTextureFillMaterial(QQuickShapeGenericStrokeFillNode *node) + : m_node(node) + { + setFlag(Blending | RequiresFullMatrix); + } + ~QQuickShapeTextureFillMaterial() override; + + QSGMaterialType *type() const override; + int compare(const QSGMaterial *other) const override; + QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override; + + QQuickShapeGenericStrokeFillNode *node() const { return m_node; } + + QSGPlainTexture *dummyTexture() const + { + return m_dummyTexture; + } + + void setDummyTexture(QSGPlainTexture *texture) + { + m_dummyTexture = texture; + } + +private: + QQuickShapeGenericStrokeFillNode *m_node; + QSGPlainTexture *m_dummyTexture = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHAPEGENERICRENDERER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d38ddbc0d759c062dbacc6de768db3446a65124d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesglobal_p.h @@ -0,0 +1,27 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPESGLOBAL_P_H +#define QQUICKSHAPESGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickshapesglobal.h" +#include + +QT_BEGIN_NAMESPACE + +void Q_QUICKSHAPES_EXPORT qml_register_types_QtQuick_Shapes(); + +QT_END_NAMESPACE + +#endif // QQUICKSHAPESGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesoftwarerenderer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesoftwarerenderer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4a9dcdb2409260dec4c26b8970cccbcbd5ed7231 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickShapes/6.8.1/QtQuickShapes/private/qquickshapesoftwarerenderer_p.h @@ -0,0 +1,104 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHAPESOFTWARERENDERER_P_H +#define QQUICKSHAPESOFTWARERENDERER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickShapeSoftwareRenderNode; + +class QQuickShapeSoftwareRenderer : public QQuickAbstractPathRenderer +{ +public: + enum Dirty { + DirtyPath = 0x01, + DirtyPen = 0x02, + DirtyFillRule = 0x04, + DirtyBrush = 0x08, + DirtyList = 0x10 + }; + + void beginSync(int totalCount, bool *countChanged) override; + void setPath(int index, const QQuickPath *path) override; + void setPath(int index, const QPainterPath &path, QQuickShapePath::PathHints pathHints = {}) override; + void setStrokeColor(int index, const QColor &color) override; + void setStrokeWidth(int index, qreal w) override; + void setFillColor(int index, const QColor &color) override; + void setFillRule(int index, QQuickShapePath::FillRule fillRule) override; + void setJoinStyle(int index, QQuickShapePath::JoinStyle joinStyle, int miterLimit) override; + void setCapStyle(int index, QQuickShapePath::CapStyle capStyle) override; + void setStrokeStyle(int index, QQuickShapePath::StrokeStyle strokeStyle, + qreal dashOffset, const QVector &dashPattern) override; + void setFillGradient(int index, QQuickShapeGradient *gradient) override; + void setFillTextureProvider(int index, QQuickItem *textureProviderItem) override; + void setFillTransform(int index, const QSGTransform &transform) override; + void endSync(bool async) override; + void handleSceneChange(QQuickWindow *window) override; + + void updateNode() override; + + void setNode(QQuickShapeSoftwareRenderNode *node); + +private: + QQuickShapeSoftwareRenderNode *m_node = nullptr; + int m_accDirty = 0; + struct ShapePathGuiData { + int dirty = 0; + QPainterPath path; + QPen pen; + float strokeWidth; + QColor fillColor; + QBrush brush; + Qt::FillRule fillRule; + }; + QVector m_sp; +}; + +class QQuickShapeSoftwareRenderNode : public QSGRenderNode +{ +public: + QQuickShapeSoftwareRenderNode(QQuickShape *item); + ~QQuickShapeSoftwareRenderNode(); + + void render(const RenderState *state) override; + void releaseResources() override; + StateFlags changedStates() const override; + RenderingFlags flags() const override; + QRectF rect() const override; + +private: + QQuickShape *m_item; + + struct ShapePathRenderData { + QPainterPath path; + QPen pen; + float strokeWidth; + QBrush brush; + }; + QVector m_sp; + QRectF m_boundingRect; + + friend class QQuickShapeSoftwareRenderer; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHAPESOFTWARERENDERER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qaccessiblequickpage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qaccessiblequickpage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2df9de0007fd05d2366ca4dd3a7e6d9d0cd42a4b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qaccessiblequickpage_p.h @@ -0,0 +1,37 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QACCESSIBLEQUICKPAGE_H +#define QACCESSIBLEQUICKPAGE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickPage; + +class QAccessibleQuickPage : public QAccessibleQuickItem +{ +public: + QAccessibleQuickPage(QQuickPage *page); + QAccessibleInterface *child(int index) const override; + int indexOfChild(const QAccessibleInterface *iface) const override; +private: + QQuickPage *page() const; + QList orderedChildItems() const; +}; + +QT_END_NAMESPACE + +#endif // QACCESSIBLEQUICKPAGE_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0a5afa10d1740ff97d15ee9ac184139e8ed6c092 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p.h @@ -0,0 +1,193 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKABSTRACTBUTTON_P_H +#define QQUICKABSTRACTBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQuickAbstractButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickAbstractButton : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText RESET resetText NOTIFY textChanged FINAL) + Q_PROPERTY(bool down READ isDown WRITE setDown NOTIFY downChanged RESET resetDown FINAL) + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL) + Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL) + Q_PROPERTY(bool autoExclusive READ autoExclusive WRITE setAutoExclusive NOTIFY autoExclusiveChanged FINAL) + Q_PROPERTY(bool autoRepeat READ autoRepeat WRITE setAutoRepeat NOTIFY autoRepeatChanged FINAL) + Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(2, 3)) + Q_PROPERTY(Display display READ display WRITE setDisplay NOTIFY displayChanged FINAL REVISION(2, 3)) + Q_PROPERTY(QQuickAction *action READ action WRITE setAction NOTIFY actionChanged FINAL REVISION(2, 3)) + // 2.4 (Qt 5.11) + Q_PROPERTY(int autoRepeatDelay READ autoRepeatDelay WRITE setAutoRepeatDelay NOTIFY autoRepeatDelayChanged FINAL REVISION(2, 4)) + Q_PROPERTY(int autoRepeatInterval READ autoRepeatInterval WRITE setAutoRepeatInterval NOTIFY autoRepeatIntervalChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal pressX READ pressX NOTIFY pressXChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal pressY READ pressY NOTIFY pressYChanged FINAL REVISION(2, 4)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator") + QML_NAMED_ELEMENT(AbstractButton) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickAbstractButton(QQuickItem *parent = nullptr); + ~QQuickAbstractButton(); + + QString text() const; + void setText(const QString &text); + void resetText(); + + bool isDown() const; + void setDown(bool down); + void resetDown(); + + bool isPressed() const; + void setPressed(bool pressed); + + bool isChecked() const; + void setChecked(bool checked); + + bool isCheckable() const; + void setCheckable(bool checkable); + + bool autoExclusive() const; + void setAutoExclusive(bool exclusive); + + bool autoRepeat() const; + void setAutoRepeat(bool repeat); + + QQuickItem *indicator() const; + void setIndicator(QQuickItem *indicator); + + // 2.3 (Qt 5.10) + QQuickIcon icon() const; + void setIcon(const QQuickIcon &icon); + + enum Display { + IconOnly, + TextOnly, + TextBesideIcon, + TextUnderIcon + }; + Q_ENUM(Display) + + Display display() const; + void setDisplay(Display display); + + QQuickAction *action() const; + void setAction(QQuickAction *action); + +#if QT_CONFIG(shortcut) + QKeySequence shortcut() const; + void setShortcut(const QKeySequence &shortcut); +#endif + + // 2.4 (Qt 5.11) + int autoRepeatDelay() const; + void setAutoRepeatDelay(int delay); + + int autoRepeatInterval() const; + void setAutoRepeatInterval(int interval); + + qreal pressX() const; + qreal pressY() const; + + // 2.5 (Qt 5.12) + qreal implicitIndicatorWidth() const; + qreal implicitIndicatorHeight() const; + +public Q_SLOTS: + void toggle(); + Q_REVISION(6, 8) void click(); + Q_REVISION(6, 8) void animateClick(); + +Q_SIGNALS: + void pressed(); + void released(); + void canceled(); + void clicked(); + void pressAndHold(); + void doubleClicked(); + void textChanged(); + void downChanged(); + void pressedChanged(); + void checkedChanged(); + void checkableChanged(); + void autoExclusiveChanged(); + void autoRepeatChanged(); + void indicatorChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void toggled(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void iconChanged(); + Q_REVISION(2, 3) void displayChanged(); + Q_REVISION(2, 3) void actionChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void autoRepeatDelayChanged(); + Q_REVISION(2, 4) void autoRepeatIntervalChanged(); + Q_REVISION(2, 4) void pressXChanged(); + Q_REVISION(2, 4) void pressYChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void implicitIndicatorWidthChanged(); + Q_REVISION(2, 5) void implicitIndicatorHeightChanged(); + +protected: + QQuickAbstractButton(QQuickAbstractButtonPrivate &dd, QQuickItem *parent); + + void componentComplete() override; + + bool event(QEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void timerEvent(QTimerEvent *event) override; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + + enum ButtonChange { + ButtonCheckedChange, + ButtonCheckableChange, + ButtonPressedChanged, + ButtonTextChange + }; + virtual void buttonChange(ButtonChange change); + + virtual void nextCheckState(); + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; + Q_INVOKABLE void accessiblePressAction(); +#endif + +private: + Q_DISABLE_COPY(QQuickAbstractButton) + Q_DECLARE_PRIVATE(QQuickAbstractButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..00f5c863838bce8615536222448d24ffeec4d372 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickabstractbutton_p_p.h @@ -0,0 +1,126 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKABSTRACTBUTTON_P_P_H +#define QQUICKABSTRACTBUTTON_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#if QT_CONFIG(shortcut) +# include +#endif + +#include + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQuickButtonGroup; + +class Q_QUICKTEMPLATES2_EXPORT QQuickAbstractButtonPrivate : public QQuickControlPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickAbstractButton) + + static QQuickAbstractButtonPrivate *get(QQuickAbstractButton *button) + { + return button->d_func(); + } + + QPointF centerPressPoint() const; + void setPressPoint(const QPointF &point); + void setMovePoint(const QPointF &point); + + bool handlePress(const QPointF &point, ulong timestamp) override; + bool handleMove(const QPointF &point, ulong timestamp) override; + bool handleRelease(const QPointF &point, ulong timestamp) override; + void handleUngrab() override; + + virtual bool acceptKeyClick(Qt::Key key) const; + + bool isPressAndHoldConnected(); + bool isDoubleClickConnected(); + void startPressAndHold(); + void stopPressAndHold(); + + void startRepeatDelay(); + void startPressRepeat(); + void stopPressRepeat(); + +#if QT_CONFIG(shortcut) + void grabShortcut(); + void ungrabShortcut(); +#endif + + QQuickAbstractButton *findCheckedButton() const; + QList findExclusiveButtons() const; + + void actionTextChange(); + void setText(const QString &text, bool isExplicit); + void init(); + + void updateEffectiveIcon(); + + void click(); + void trigger(bool doubleClick = false); + void toggle(bool value); + + void cancelIndicator(); + void executeIndicator(bool complete = false); + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + // copied from qabstractbutton.cpp + static const int AUTO_REPEAT_DELAY = 300; + static const int AUTO_REPEAT_INTERVAL = 100; + + bool explicitText = false; + bool down = false; + bool explicitDown = false; + bool pressed = false; + bool keepPressed = false; + bool checked = false; + bool checkable = false; + bool autoExclusive = false; + bool autoRepeat = false; + bool wasHeld = false; + bool wasDoubleClick = false; + int holdTimer = 0; + int delayTimer = 0; + int repeatTimer = 0; + int repeatDelay = AUTO_REPEAT_DELAY; + int repeatInterval = AUTO_REPEAT_INTERVAL; + int animateTimer = 0; +#if QT_CONFIG(shortcut) + int shortcutId = 0; + QKeySequence shortcut; +#endif + qreal lastTouchReleaseTimestamp = 0; + QString text; + QQuickIcon icon; + QQuickIcon effectiveIcon; + QPointF pressPoint; + QPointF movePoint; + Qt::MouseButtons pressButtons = Qt::NoButton; + QQuickAbstractButton::Display display = QQuickAbstractButton::TextBesideIcon; + QQuickDeferredPointer indicator; + QQuickButtonGroup *group = nullptr; + QPointer action; +}; + +QT_END_NAMESPACE + +#endif // QQUICKABSTRACTBUTTON_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickaction_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickaction_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fbaf590034451da53100c42c856ff84dc4c70318 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickaction_p.h @@ -0,0 +1,95 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKACTION_P_H +#define QQUICKACTION_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickIcon; +class QQuickActionPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickAction : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged RESET resetEnabled FINAL) + Q_PROPERTY(bool checked READ isChecked WRITE setChecked NOTIFY checkedChanged FINAL) + Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged FINAL) +#if QT_CONFIG(shortcut) + Q_PRIVATE_PROPERTY(QQuickAction::d_func(), QVariant shortcut READ shortcut WRITE setShortcut NOTIFY shortcutChanged FINAL) +#endif + QML_NAMED_ELEMENT(Action) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickAction(QObject *parent = nullptr); + ~QQuickAction(); + + QString text() const; + void setText(const QString &text); + + QQuickIcon icon() const; + void setIcon(const QQuickIcon &icon); + + bool isEnabled() const; + void setEnabled(bool enabled); + void resetEnabled(); + + bool isChecked() const; + void setChecked(bool checked); + + bool isCheckable() const; + void setCheckable(bool checkable); + +#if QT_CONFIG(shortcut) + QKeySequence shortcut() const; + void setShortcut(const QKeySequence &shortcut); +#endif + +public Q_SLOTS: + void toggle(QObject *source = nullptr); + void trigger(QObject *source = nullptr); + +Q_SIGNALS: + void textChanged(const QString &text); + void iconChanged(const QQuickIcon &icon); + void enabledChanged(bool enabled); + void checkedChanged(bool checked); + void checkableChanged(bool checkable); +#if QT_CONFIG(shortcut) + void shortcutChanged(const QKeySequence &shortcut); +#endif + + void toggled(QObject *source = nullptr); + void triggered(QObject *source = nullptr); + +protected: + bool event(QEvent *event) override; + bool eventFilter(QObject *object, QEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickAction) + Q_DECLARE_PRIVATE(QQuickAction) +}; + +QT_END_NAMESPACE + +#endif // QQUICKACTION_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickactiongroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickactiongroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9167e2116c4bda58a2eaaf2ec50136202e531286 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickactiongroup_p.h @@ -0,0 +1,97 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKACTIONGROUP_P_H +#define QQUICKACTIONGROUP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQuickActionGroupPrivate; +class QQuickActionGroupAttached; +class QQuickActionGroupAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickActionGroup : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickAction *checkedAction READ checkedAction WRITE setCheckedAction NOTIFY checkedActionChanged FINAL) + Q_PROPERTY(QQmlListProperty actions READ actions NOTIFY actionsChanged FINAL) + Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) + Q_CLASSINFO("DefaultProperty", "actions") + QML_NAMED_ELEMENT(ActionGroup) + QML_ATTACHED(QQuickActionGroupAttached) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickActionGroup(QObject *parent = nullptr); + ~QQuickActionGroup(); + + static QQuickActionGroupAttached *qmlAttachedProperties(QObject *object); + + QQuickAction *checkedAction() const; + void setCheckedAction(QQuickAction *checkedAction); + + QQmlListProperty actions(); + + bool isExclusive() const; + void setExclusive(bool exclusive); + + bool isEnabled() const; + void setEnabled(bool enabled); + +public Q_SLOTS: + void addAction(QQuickAction *action); + void removeAction(QQuickAction *action); + +Q_SIGNALS: + void checkedActionChanged(); + void actionsChanged(); + void exclusiveChanged(); + void enabledChanged(); + void triggered(QQuickAction *action); + +private: + Q_DISABLE_COPY(QQuickActionGroup) + Q_DECLARE_PRIVATE(QQuickActionGroup) + + Q_PRIVATE_SLOT(d_func(), void _q_updateCurrent()) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickActionGroupAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickActionGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL) + +public: + explicit QQuickActionGroupAttached(QObject *parent = nullptr); + + QQuickActionGroup *group() const; + void setGroup(QQuickActionGroup *group); + +Q_SIGNALS: + void groupChanged(); + +private: + Q_DISABLE_COPY(QQuickActionGroupAttached) + Q_DECLARE_PRIVATE(QQuickActionGroupAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKACTIONGROUP_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickapplicationwindow_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickapplicationwindow_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e9a7920e9a723c0cdda3b053d95fca32dde6ba4f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickapplicationwindow_p.h @@ -0,0 +1,138 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKAPPLICATIONWINDOW_P_H +#define QQUICKAPPLICATIONWINDOW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickApplicationWindowPrivate; +class QQuickApplicationWindowAttached; +class QQuickApplicationWindowAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickApplicationWindow : public QQuickWindowQmlImpl +{ + Q_OBJECT + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QQuickItem *contentItem READ contentItem CONSTANT FINAL) + Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQmlListProperty contentData READ contentData FINAL) + Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL) + Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL) + Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL) + Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL) + Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(QQuickItem *menuBar READ menuBar WRITE setMenuBar NOTIFY menuBarChanged FINAL REVISION(2, 3)) + // 2.14 (Qt 6) + Q_PRIVATE_PROPERTY(QQuickApplicationWindow::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3)) + Q_CLASSINFO("DeferredPropertyNames", "background") + Q_CLASSINFO("DefaultProperty", "contentData") + QML_NAMED_ELEMENT(ApplicationWindow) + QML_ADDED_IN_VERSION(2, 0) + QML_ATTACHED(QQuickApplicationWindowAttached) + +public: + explicit QQuickApplicationWindow(QWindow *parent = nullptr); + ~QQuickApplicationWindow(); + + static QQuickApplicationWindowAttached *qmlAttachedProperties(QObject *object); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + QQuickItem *contentItem() const; + + QQuickItem *activeFocusControl() const; + + QQuickItem *header() const; + void setHeader(QQuickItem *header); + + QQuickItem *footer() const; + void setFooter(QQuickItem *footer); + + QFont font() const; + void setFont(const QFont &font); + void resetFont(); + + QLocale locale() const; + void setLocale(const QLocale &locale); + void resetLocale(); + + QQuickItem *menuBar() const; + void setMenuBar(QQuickItem *menuBar); + +Q_SIGNALS: + void backgroundChanged(); + void activeFocusControlChanged(); + void headerChanged(); + void footerChanged(); + void fontChanged(); + void localeChanged(); + Q_REVISION(2, 3) void menuBarChanged(); + +protected: + bool isComponentComplete() const; + void classBegin() override; + void componentComplete() override; + void resizeEvent(QResizeEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickApplicationWindow) + Q_DECLARE_PRIVATE(QQuickApplicationWindow) + Q_PRIVATE_SLOT(d_func(), void _q_updateActiveFocus()) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickApplicationWindowAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickApplicationWindow *window READ window NOTIFY windowChanged FINAL) + Q_PROPERTY(QQuickItem *contentItem READ contentItem NOTIFY contentItemChanged FINAL) + Q_PROPERTY(QQuickItem *activeFocusControl READ activeFocusControl NOTIFY activeFocusControlChanged FINAL) + Q_PROPERTY(QQuickItem *header READ header NOTIFY headerChanged FINAL) + Q_PROPERTY(QQuickItem *footer READ footer NOTIFY footerChanged FINAL) + Q_PROPERTY(QQuickItem *menuBar READ menuBar NOTIFY menuBarChanged FINAL) // REVISION(2, 3) + +public: + explicit QQuickApplicationWindowAttached(QObject *parent = nullptr); + + QQuickApplicationWindow *window() const; + QQuickItem *contentItem() const; + QQuickItem *activeFocusControl() const; + QQuickItem *header() const; + QQuickItem *footer() const; + QQuickItem *menuBar() const; + +Q_SIGNALS: + void windowChanged(); + void contentItemChanged(); + void activeFocusControlChanged(); + void headerChanged(); + void footerChanged(); + // 2.3 (Qt 5.10) + /*Q_REVISION(2, 3)*/ void menuBarChanged(); + +private: + Q_DISABLE_COPY(QQuickApplicationWindowAttached) + Q_DECLARE_PRIVATE(QQuickApplicationWindowAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKAPPLICATIONWINDOW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbusyindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbusyindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ed05d6bd177c2323ae7db5fb798cc691f531bf3b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbusyindicator_p.h @@ -0,0 +1,56 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBUSYINDICATOR_P_H +#define QQUICKBUSYINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickBusyIndicatorPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickBusyIndicator : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged FINAL) + QML_NAMED_ELEMENT(BusyIndicator) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickBusyIndicator(QQuickItem *parent = nullptr); + + bool isRunning() const; + void setRunning(bool running); + +Q_SIGNALS: + void runningChanged(); + +protected: +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickBusyIndicator) + Q_DECLARE_PRIVATE(QQuickBusyIndicator) +}; + +QT_END_NAMESPACE + +#endif // QQUICKBUSYINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2530c277ef957ba0b06081ceabd91a9c5e79af4d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBUTTON_P_H +#define QQUICKBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickButton : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL) + Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL) + QML_NAMED_ELEMENT(Button) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickButton(QQuickItem *parent = nullptr); + + bool isHighlighted() const; + void setHighlighted(bool highlighted); + + bool isFlat() const; + void setFlat(bool flat); + +Q_SIGNALS: + void highlightedChanged(); + void flatChanged(); + +protected: + QQuickButton(QQuickButtonPrivate &dd, QQuickItem *parent); + + QFont defaultFont() const override; + +private: + Q_DISABLE_COPY(QQuickButton) + Q_DECLARE_PRIVATE(QQuickButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..921e6560ca7d363b809f250510f8512b0cac8bb0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbutton_p_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBUTTON_P_P_H +#define QQUICKBUTTON_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickButtonPrivate : public QQuickAbstractButtonPrivate +{ + Q_DECLARE_PUBLIC(QQuickButton) + +public: + QPalette defaultPalette() const override; + + bool flat = false; + bool highlighted = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKBUTTON_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbuttongroup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbuttongroup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..da921f7d281469b9d26691a7c754ae0a6a7f373b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickbuttongroup_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKBUTTONGROUP_P_H +#define QQUICKBUTTONGROUP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractButton; +class QQuickButtonGroupPrivate; +class QQuickButtonGroupAttached; +class QQuickButtonGroupAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickButtonGroup : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_PROPERTY(QQuickAbstractButton *checkedButton READ checkedButton WRITE setCheckedButton NOTIFY checkedButtonChanged FINAL) + Q_PROPERTY(QQmlListProperty buttons READ buttons NOTIFY buttonsChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool exclusive READ isExclusive WRITE setExclusive NOTIFY exclusiveChanged FINAL REVISION(2, 3)) + // 2.4 (Qt 5.11) + Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL REVISION(2, 4)) + Q_INTERFACES(QQmlParserStatus) + QML_NAMED_ELEMENT(ButtonGroup) + QML_ATTACHED(QQuickButtonGroupAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickButtonGroup(QObject *parent = nullptr); + ~QQuickButtonGroup(); + + static QQuickButtonGroupAttached *qmlAttachedProperties(QObject *object); + + QQuickAbstractButton *checkedButton() const; + void setCheckedButton(QQuickAbstractButton *checkedButton); + + QQmlListProperty buttons(); + + bool isExclusive() const; + void setExclusive(bool exclusive); + + // 2.4 (Qt 5.11) + Qt::CheckState checkState() const; + void setCheckState(Qt::CheckState state); + +public Q_SLOTS: + void addButton(QQuickAbstractButton *button); + void removeButton(QQuickAbstractButton *button); + +Q_SIGNALS: + void checkedButtonChanged(); + void buttonsChanged(); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void clicked(QQuickAbstractButton *button); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void exclusiveChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void checkStateChanged(); + +protected: + void classBegin() override; + void componentComplete() override; + +private: + Q_DISABLE_COPY(QQuickButtonGroup) + Q_DECLARE_PRIVATE(QQuickButtonGroup) + + Q_PRIVATE_SLOT(d_func(), void _q_updateCurrent()) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickButtonGroupAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickButtonGroup *group READ group WRITE setGroup NOTIFY groupChanged FINAL) + +public: + explicit QQuickButtonGroupAttached(QObject *parent = nullptr); + + QQuickButtonGroup *group() const; + void setGroup(QQuickButtonGroup *group); + +Q_SIGNALS: + void groupChanged(); + +private: + Q_DISABLE_COPY(QQuickButtonGroupAttached) + Q_DECLARE_PRIVATE(QQuickButtonGroupAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKBUTTONGROUP_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5937108dfbfe96ffceda3920b80cc53fb294e3c2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendar_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCALENDAR_P_H +#define QQUICKCALENDAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickCalendar : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(Calendar) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickCalendar(QObject *parent = nullptr); + + enum Month { + January, + February, + March, + April, + May, + June, + July, + August, + September, + October, + November, + December + }; + Q_ENUM(Month) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCALENDAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendarmodel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendarmodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a967837f2d5ac830c755c90ab7d26cc496600d8c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcalendarmodel_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCALENDARMODEL_P_H +#define QQUICKCALENDARMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickCalendarModelPrivate; + +class QQuickCalendarModel : public QAbstractListModel, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(QDate from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(QDate to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(int count READ rowCount NOTIFY countChanged) + QML_NAMED_ELEMENT(CalendarModel) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickCalendarModel(QObject *parent = nullptr); + + QDate from() const; + void setFrom(QDate from); + + QDate to() const; + void setTo(QDate to); + + Q_INVOKABLE int monthAt(int index) const; + Q_INVOKABLE int yearAt(int index) const; + Q_INVOKABLE int indexOf(QDate date) const; + Q_INVOKABLE int indexOf(int year, int month) const; + + enum { + MonthRole, + YearRole + }; + + QHash roleNames() const override; + QVariant data(const QModelIndex &index, int role) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void countChanged(); + +protected: + void classBegin() override; + void componentComplete() override; + +private: + Q_DISABLE_COPY(QQuickCalendarModel) + Q_DECLARE_PRIVATE(QQuickCalendarModel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCALENDARMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckbox_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckbox_p.h new file mode 100644 index 0000000000000000000000000000000000000000..58b0feed3f5cc8e8f5808d86380b934b7ee5672b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckbox_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCHECKBOX_P_H +#define QQUICKCHECKBOX_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickCheckBoxPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickCheckBox : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL) + Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL) + // 2.4 (Qt 5.11) + Q_PROPERTY(QJSValue nextCheckState READ getNextCheckState WRITE setNextCheckState NOTIFY + nextCheckStateChanged FINAL REVISION(2, 4)) + QML_NAMED_ELEMENT(CheckBox) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickCheckBox(QQuickItem *parent = nullptr); + + bool isTristate() const; + void setTristate(bool tristate); + + Qt::CheckState checkState() const; + void setCheckState(Qt::CheckState state); + QJSValue getNextCheckState() const; + void setNextCheckState(const QJSValue &callback); + +Q_SIGNALS: + void tristateChanged(); + void checkStateChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void nextCheckStateChanged(); + +protected: + QFont defaultFont() const override; + + void buttonChange(ButtonChange change) override; + void nextCheckState() override; + +private: + Q_DISABLE_COPY(QQuickCheckBox) + Q_DECLARE_PRIVATE(QQuickCheckBox) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCHECKBOX_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckdelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckdelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..43f724fdb881896be800715125492fdbe97128f9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcheckdelegate_p.h @@ -0,0 +1,66 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCHECKDELEGATE_P_H +#define QQUICKCHECKDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickCheckDelegatePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickCheckDelegate : public QQuickItemDelegate +{ + Q_OBJECT + Q_PROPERTY(bool tristate READ isTristate WRITE setTristate NOTIFY tristateChanged FINAL) + Q_PROPERTY(Qt::CheckState checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL) + // 2.4 (Qt 5.11) + Q_PRIVATE_PROPERTY(QQuickCheckDelegate::d_func(), QJSValue nextCheckState MEMBER nextCheckState WRITE setNextCheckState NOTIFY nextCheckStateChanged FINAL REVISION(2, 4)) + QML_NAMED_ELEMENT(CheckDelegate) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickCheckDelegate(QQuickItem *parent = nullptr); + + bool isTristate() const; + void setTristate(bool tristate); + + Qt::CheckState checkState() const; + void setCheckState(Qt::CheckState state); + +Q_SIGNALS: + void tristateChanged(); + void checkStateChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void nextCheckStateChanged(); + +protected: + QFont defaultFont() const override; + + void buttonChange(ButtonChange change) override; + void nextCheckState() override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickCheckDelegate) + Q_DECLARE_PRIVATE(QQuickCheckDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCHECKDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcombobox_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcombobox_p.h new file mode 100644 index 0000000000000000000000000000000000000000..678864fa0393063a0c99aaacf9b99b029e80a93b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcombobox_p.h @@ -0,0 +1,246 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCOMBOBOX_P_H +#define QQUICKCOMBOBOX_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_REQUIRE_CONFIG(qml_delegate_model); + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcItemManagement) + +class QValidator; +class QQuickPopup; +class QQmlInstanceModel; +class QQuickComboBoxPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickComboBox : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int count READ count NOTIFY countChanged FINAL) + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL) + Q_PROPERTY(QQmlInstanceModel *delegateModel READ delegateModel NOTIFY delegateModelChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(int highlightedIndex READ highlightedIndex NOTIFY highlightedIndexChanged FINAL) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) + Q_PROPERTY(QString currentText READ currentText NOTIFY currentTextChanged FINAL) + Q_PROPERTY(QString displayText READ displayText WRITE setDisplayText RESET resetDisplayText NOTIFY displayTextChanged FINAL) + Q_PROPERTY(QString textRole READ textRole WRITE setTextRole NOTIFY textRoleChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL) + Q_PROPERTY(QQuickPopup *popup READ popup WRITE setPopup NOTIFY popupChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool flat READ isFlat WRITE setFlat NOTIFY flatChanged FINAL REVISION(2, 1)) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool down READ isDown WRITE setDown RESET resetDown NOTIFY downChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL REVISION(2, 2)) + Q_PROPERTY(QString editText READ editText WRITE setEditText RESET resetEditText NOTIFY editTextChanged FINAL REVISION(2, 2)) +#if QT_CONFIG(validator) + Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL REVISION(2, 2)) +#endif + Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool acceptableInput READ hasAcceptableInput NOTIFY acceptableInputChanged FINAL REVISION(2, 2)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,indicator,popup") + // 2.14 (Qt 5.14) + Q_PROPERTY(QVariant currentValue READ currentValue NOTIFY currentValueChanged FINAL REVISION(2, 14)) + Q_PROPERTY(QString valueRole READ valueRole WRITE setValueRole NOTIFY valueRoleChanged FINAL REVISION(2, 14)) + // 2.15 (Qt 5.15) + Q_PROPERTY(bool selectTextByMouse READ selectTextByMouse WRITE setSelectTextByMouse NOTIFY selectTextByMouseChanged FINAL REVISION(2, 15)) + // 6.0 (Qt 6.0) + Q_PROPERTY(ImplicitContentWidthPolicy implicitContentWidthPolicy READ implicitContentWidthPolicy + WRITE setImplicitContentWidthPolicy NOTIFY implicitContentWidthPolicyChanged FINAL REVISION(6, 0)) + QML_NAMED_ELEMENT(ComboBox) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickComboBox(QQuickItem *parent = nullptr); + ~QQuickComboBox(); + + int count() const; + + QVariant model() const; + void setModel(const QVariant &model); + QQmlInstanceModel *delegateModel() const; + + bool isPressed() const; + void setPressed(bool pressed); + + int highlightedIndex() const; + + int currentIndex() const; + void setCurrentIndex(int index); + + QString currentText() const; + + QString displayText() const; + void setDisplayText(const QString &text); + void resetDisplayText(); + + QString textRole() const; + void setTextRole(const QString &role); + + QString valueRole() const; + void setValueRole(const QString &role); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + QQuickItem *indicator() const; + void setIndicator(QQuickItem *indicator); + + QQuickPopup *popup() const; + void setPopup(QQuickPopup *popup); + + Q_INVOKABLE QString textAt(int index) const; + Q_INVOKABLE int find(const QString &text, Qt::MatchFlags flags = Qt::MatchExactly) const; + + // 2.1 (Qt 5.8) + bool isFlat() const; + void setFlat(bool flat); + + // 2.2 (Qt 5.9) + bool isDown() const; + void setDown(bool down); + void resetDown(); + + bool isEditable() const; + void setEditable(bool editable); + + QString editText() const; + void setEditText(const QString &text); + void resetEditText(); + +#if QT_CONFIG(validator) + QValidator *validator() const; + void setValidator(QValidator *validator); +#endif + + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + + bool isInputMethodComposing() const; + bool hasAcceptableInput() const; + + // 2.5 (Qt 5.12) + qreal implicitIndicatorWidth() const; + qreal implicitIndicatorHeight() const; + + // 2.14 (Qt 5.14) + QVariant currentValue() const; + Q_REVISION(2, 14) Q_INVOKABLE QVariant valueAt(int index) const; + Q_REVISION(2, 14) Q_INVOKABLE int indexOfValue(const QVariant &value) const; + + // 2.15 (Qt 5.15) + bool selectTextByMouse() const; + void setSelectTextByMouse(bool canSelect); + + // 6.0 (Qt 6.0) + enum ImplicitContentWidthPolicy { + ContentItemImplicitWidth, + WidestText, + WidestTextWhenCompleted + }; + Q_ENUM(ImplicitContentWidthPolicy) + + ImplicitContentWidthPolicy implicitContentWidthPolicy() const; + void setImplicitContentWidthPolicy(ImplicitContentWidthPolicy policy); + +public Q_SLOTS: + void incrementCurrentIndex(); + void decrementCurrentIndex(); + Q_REVISION(2, 2) void selectAll(); + +Q_SIGNALS: + void activated(int index); + void highlighted(int index); + void countChanged(); + void modelChanged(); + void delegateModelChanged(); + void pressedChanged(); + void highlightedIndexChanged(); + void currentIndexChanged(); + void currentTextChanged(); + void displayTextChanged(); + void textRoleChanged(); + void delegateChanged(); + void indicatorChanged(); + void popupChanged(); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void flatChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void accepted(); + Q_REVISION(2, 2) void downChanged(); + Q_REVISION(2, 2) void editableChanged(); + Q_REVISION(2, 2) void editTextChanged(); +#if QT_CONFIG(validator) + Q_REVISION(2, 2) void validatorChanged(); +#endif + Q_REVISION(2, 2) void inputMethodHintsChanged(); + Q_REVISION(2, 2) void inputMethodComposingChanged(); + Q_REVISION(2, 2) void acceptableInputChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void implicitIndicatorWidthChanged(); + Q_REVISION(2, 5) void implicitIndicatorHeightChanged(); + // 2.14 (Qt 5.14) + Q_REVISION(2, 14) void valueRoleChanged(); + Q_REVISION(2, 14) void currentValueChanged(); + // 2.15 (Qt 5.15) + Q_REVISION(2, 15) void selectTextByMouseChanged(); + // 6.0 (Qt 6.0) + Q_REVISION(6, 0) void implicitContentWidthPolicyChanged(); + +protected: + bool eventFilter(QObject *object, QEvent *event) override; + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; +#if QT_CONFIG(im) + void inputMethodEvent(QInputMethodEvent *event) override; +#endif + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + bool event(QEvent *e) override; + + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + void fontChange(const QFont &newFont, const QFont &oldFont) override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickComboBox) + Q_DECLARE_PRIVATE(QQuickComboBox) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCOMBOBOX_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a10d0a68d6a8191e5c1b56bd6be6068a63d19282 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTAINER_P_H +#define QQUICKCONTAINER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickContainerPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickContainer : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int count READ count NOTIFY countChanged FINAL) + Q_PROPERTY(QVariant contentModel READ contentModel CONSTANT FINAL) + Q_PROPERTY(QQmlListProperty contentData READ contentData) + Q_PROPERTY(QQmlListProperty contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) + Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DefaultProperty", "contentData") + QML_NAMED_ELEMENT(Container) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickContainer(QQuickItem *parent = nullptr); + ~QQuickContainer(); + + int count() const; + Q_INVOKABLE QQuickItem *itemAt(int index) const; + Q_INVOKABLE void addItem(QQuickItem *item); + Q_INVOKABLE void insertItem(int index, QQuickItem *item); + Q_INVOKABLE void moveItem(int from, int to); + Q_INVOKABLE void removeItem(QQuickItem *item); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index); + + QVariant contentModel() const; + QQmlListProperty contentData(); + QQmlListProperty contentChildren(); + + int currentIndex() const; + QQuickItem *currentItem() const; + + // 2.5 (Qt 5.12) + qreal contentWidth() const; + void setContentWidth(qreal width); + void resetContentWidth(); + + qreal contentHeight() const; + void setContentHeight(qreal height); + void resetContentHeight(); + +public Q_SLOTS: + void setCurrentIndex(int index); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void incrementCurrentIndex(); + Q_REVISION(2, 1) void decrementCurrentIndex(); + +Q_SIGNALS: + void countChanged(); + void contentChildrenChanged(); + void currentIndexChanged(); + void currentItemChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void contentWidthChanged(); + Q_REVISION(2, 5) void contentHeightChanged(); + +protected: + QQuickContainer(QQuickContainerPrivate &dd, QQuickItem *parent); + + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &data) override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + + virtual bool isContent(QQuickItem *item) const; + virtual void itemAdded(int index, QQuickItem *item); + virtual void itemMoved(int index, QQuickItem *item); + virtual void itemRemoved(int index, QQuickItem *item); + +private: + Q_DISABLE_COPY(QQuickContainer) + Q_DECLARE_PRIVATE(QQuickContainer) + Q_PRIVATE_SLOT(d_func(), void _q_currentIndexChanged()) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTAINER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9c3673cf390a801f6e78a7257bf49bf5b3c2c5c2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontainer_p_p.h @@ -0,0 +1,78 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTAINER_P_P_H +#define QQUICKCONTAINER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickContainerPrivate : public QQuickControlPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickContainer) + + static QQuickContainerPrivate *get(QQuickContainer *container) + { + return container->d_func(); + } + + void init(); + void cleanup(); + + QQuickItem *itemAt(int index) const; + void insertItem(int index, QQuickItem *item); + void moveItem(int from, int to, QQuickItem *item); + void removeItem(int index, QQuickItem *item); + void reorderItems(); + void maybeCullItem(QQuickItem *item); + void maybeCullItems(); + + void _q_currentIndexChanged(); + + void itemChildAdded(QQuickItem *item, QQuickItem *child) override; + void itemSiblingOrderChanged(QQuickItem *item) override; + void itemParentChanged(QQuickItem *item, QQuickItem *parent) override; + void itemDestroyed(QQuickItem *item) override; + + static void contentData_append(QQmlListProperty *prop, QObject *obj); + static qsizetype contentData_count(QQmlListProperty *prop); + static QObject *contentData_at(QQmlListProperty *prop, qsizetype index); + static void contentData_clear(QQmlListProperty *prop); + + static void contentChildren_append(QQmlListProperty *prop, QQuickItem *obj); + static qsizetype contentChildren_count(QQmlListProperty *prop); + static QQuickItem *contentChildren_at(QQmlListProperty *prop, qsizetype index); + static void contentChildren_clear(QQmlListProperty *prop); + + void updateContentWidth(); + void updateContentHeight(); + + bool hasContentWidth = false; + bool hasContentHeight = false; + qreal contentWidth = 0; + qreal contentHeight = 0; + QObjectList contentData; + QQmlObjectModel *contentModel = nullptr; + qsizetype currentIndex = -1; + bool updatingCurrent = false; + QQuickItemPrivate::ChangeTypes changeTypes = Destroyed | Parent | SiblingOrder; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTAINER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontentitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontentitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1d12641c9e8d12f708426aee2fc045d9dd7923dc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontentitem_p.h @@ -0,0 +1,37 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTENTITEM_P_H +#define QQUICKCONTENTITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickContentItem : public QQuickItem +{ + Q_OBJECT + +public: + explicit QQuickContentItem(QQuickItem *parent = nullptr); + explicit QQuickContentItem(const QObject *scope, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickContentItem) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTENTITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6c7e2ca133ef5993f0e93c2e50ec41573dd1ec7a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p.h @@ -0,0 +1,257 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTROL_P_H +#define QQUICKCONTROL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickControlPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickControl : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL) + Q_PROPERTY(qreal availableWidth READ availableWidth NOTIFY availableWidthChanged FINAL) + Q_PROPERTY(qreal availableHeight READ availableHeight NOTIFY availableHeightChanged FINAL) + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged FINAL) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged FINAL) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged FINAL) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged FINAL) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL) + Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL) + Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL) + QT6_ONLY(Q_PROPERTY(Qt::FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy NOTIFY focusPolicyChanged FINAL)) + Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL) + Q_PROPERTY(bool visualFocus READ hasVisualFocus NOTIFY visualFocusChanged FINAL) + Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL) + Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL) + Q_PROPERTY(bool wheelEnabled READ isWheelEnabled WRITE setWheelEnabled NOTIFY wheelEnabledChanged FINAL) + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL) + Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset RESET resetBaselineOffset NOTIFY baselineOffsetChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem") + QML_NAMED_ELEMENT(Control) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickControl(QQuickItem *parent = nullptr); + ~QQuickControl(); + + QFont font() const; + void setFont(const QFont &font); + void resetFont(); + + qreal availableWidth() const; + qreal availableHeight() const; + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + qreal spacing() const; + void setSpacing(qreal spacing); + void resetSpacing(); + + QLocale locale() const; + void setLocale(const QLocale &locale); + void resetLocale(); + + bool isMirrored() const; + + Qt::FocusReason focusReason() const; + void setFocusReason(Qt::FocusReason reason); + + bool hasVisualFocus() const; + + bool isHovered() const; + void setHovered(bool hovered); + + bool isHoverEnabled() const; + void setHoverEnabled(bool enabled); + void resetHoverEnabled(); + + bool isWheelEnabled() const; + void setWheelEnabled(bool enabled); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + QQuickItem *contentItem() const; + void setContentItem(QQuickItem *item); + + qreal baselineOffset() const; + void setBaselineOffset(qreal offset); + void resetBaselineOffset(); + + // 2.5 (Qt 5.12) + qreal horizontalPadding() const; + void setHorizontalPadding(qreal padding); + void resetHorizontalPadding(); + + qreal verticalPadding() const; + void setVerticalPadding(qreal padding); + void resetVerticalPadding(); + + qreal implicitContentWidth() const; + qreal implicitContentHeight() const; + + qreal implicitBackgroundWidth() const; + qreal implicitBackgroundHeight() const; + + qreal topInset() const; + void setTopInset(qreal inset); + void resetTopInset(); + + qreal leftInset() const; + void setLeftInset(qreal inset); + void resetLeftInset(); + + qreal rightInset() const; + void setRightInset(qreal inset); + void resetRightInset(); + + qreal bottomInset() const; + void setBottomInset(qreal inset); + void resetBottomInset(); + +Q_SIGNALS: + void fontChanged(); + void availableWidthChanged(); + void availableHeightChanged(); + void paddingChanged(); + void topPaddingChanged(); + void leftPaddingChanged(); + void rightPaddingChanged(); + void bottomPaddingChanged(); + void spacingChanged(); + void localeChanged(); + void focusReasonChanged(); + void mirroredChanged(); + void visualFocusChanged(); + void hoveredChanged(); + void hoverEnabledChanged(); + void wheelEnabledChanged(); + void backgroundChanged(); + void contentItemChanged(); + void baselineOffsetChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void horizontalPaddingChanged(); + Q_REVISION(2, 5) void verticalPaddingChanged(); + Q_REVISION(2, 5) void implicitContentWidthChanged(); + Q_REVISION(2, 5) void implicitContentHeightChanged(); + Q_REVISION(2, 5) void implicitBackgroundWidthChanged(); + Q_REVISION(2, 5) void implicitBackgroundHeightChanged(); + Q_REVISION(2, 5) void topInsetChanged(); + Q_REVISION(2, 5) void leftInsetChanged(); + Q_REVISION(2, 5) void rightInsetChanged(); + Q_REVISION(2, 5) void bottomInsetChanged(); + +protected: + virtual QFont defaultFont() const; + + QQuickControl(QQuickControlPrivate &dd, QQuickItem *parent); + + void classBegin() override; + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; +#if QT_CONFIG(quicktemplates2_hover) + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; +#endif + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseUngrabEvent() override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; + void touchUngrabEvent() override; +#endif +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + virtual void fontChange(const QFont &newFont, const QFont &oldFont); +#if QT_CONFIG(quicktemplates2_hover) + virtual void hoverChange(); +#endif + virtual void mirrorChange(); + virtual void spacingChange(qreal newSpacing, qreal oldSpacing); + virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding); + virtual void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem); + virtual void localeChange(const QLocale &newLocale, const QLocale &oldLocale); + virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset); + virtual void enabledChange(); + +#if QT_CONFIG(accessibility) + virtual QAccessible::Role accessibleRole() const; + virtual void accessibilityActiveChanged(bool active); +#endif + + // helper functions which avoid to check QT_CONFIG(accessibility) + QString accessibleName() const; + void maybeSetAccessibleName(const QString &name); + + QVariant accessibleProperty(const char *propertyName); + bool setAccessibleProperty(const char *propertyName, const QVariant &value); + +private: + Q_DISABLE_COPY(QQuickControl) + Q_DECLARE_PRIVATE(QQuickControl) +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTROL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4ef9837ee112482aee6102d3aa5938262f39ac0f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickcontrol_p_p.h @@ -0,0 +1,217 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKCONTROL_P_P_H +#define QQUICKCONTROL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include +#include + +#if QT_CONFIG(accessibility) +#include +#endif + +#include + +QT_BEGIN_NAMESPACE + +Q_DECLARE_LOGGING_CATEGORY(lcItemManagement) + +class QQuickAccessibleAttached; + +class Q_QUICKTEMPLATES2_EXPORT QQuickControlPrivate : public QQuickItemPrivate, public QQuickItemChangeListener +#if QT_CONFIG(accessibility) + , public QAccessible::ActivationObserver +#endif +{ +public: + Q_DECLARE_PUBLIC(QQuickControl) + + QQuickControlPrivate(); + ~QQuickControlPrivate(); + + static QQuickControlPrivate *get(QQuickControl *control) + { + return control->d_func(); + } + + void init(); + +#if QT_CONFIG(quicktemplates2_multitouch) + virtual bool acceptTouch(const QTouchEvent::TouchPoint &point); +#endif + virtual bool handlePress(const QPointF &point, ulong timestamp); + virtual bool handleMove(const QPointF &point, ulong timestamp); + virtual bool handleRelease(const QPointF &point, ulong timestamp); + virtual void handleUngrab(); + + void mirrorChange() override; + + inline QMarginsF getPadding() const { return QMarginsF(getLeftPadding(), getTopPadding(), getRightPadding(), getBottomPadding()); } + inline qreal getTopPadding() const { return extra.isAllocated() && extra->hasTopPadding ? extra->topPadding : getVerticalPadding(); } + inline qreal getLeftPadding() const { return extra.isAllocated() && extra->hasLeftPadding ? extra->leftPadding : getHorizontalPadding(); } + inline qreal getRightPadding() const { return extra.isAllocated() && extra->hasRightPadding ? extra->rightPadding : getHorizontalPadding(); } + inline qreal getBottomPadding() const { return extra.isAllocated() && extra->hasBottomPadding ? extra->bottomPadding : getVerticalPadding(); } + inline qreal getHorizontalPadding() const { return hasHorizontalPadding ? horizontalPadding : padding; } + inline qreal getVerticalPadding() const { return hasVerticalPadding ? verticalPadding : padding; } + + void setTopPadding(qreal value, bool reset = false); + void setLeftPadding(qreal value, bool reset = false); + void setRightPadding(qreal value, bool reset = false); + void setBottomPadding(qreal value, bool reset = false); + void setHorizontalPadding(qreal value, bool reset = false); + void setVerticalPadding(qreal value, bool reset = false); + + inline QMarginsF getInset() const { return QMarginsF(getLeftInset(), getTopInset(), getRightInset(), getBottomInset()); } + inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; } + inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; } + inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; } + inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; } + + void setTopInset(qreal value, bool reset = false); + void setLeftInset(qreal value, bool reset = false); + void setRightInset(qreal value, bool reset = false); + void setBottomInset(qreal value, bool reset = false); + + virtual void resizeBackground(); + virtual void resizeContent(); + + virtual QQuickItem *getContentItem(); + void setContentItem_helper(QQuickItem *item, bool notify = true); + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; + static QQuickAccessibleAttached *accessibleAttached(const QObject *object); +#endif + + virtual void resolveFont(); + void inheritFont(const QFont &font); + void updateFont(const QFont &font); + static void updateFontRecur(QQuickItem *item, const QFont &font); + inline void setFont_helper(const QFont &font) { + if (resolvedFont.resolveMask() == font.resolveMask() && resolvedFont == font) + return; + updateFont(font); + } + static QFont parentFont(const QQuickItem *item); + + void updateLocale(const QLocale &l, bool e); + static void updateLocaleRecur(QQuickItem *item, const QLocale &l); + static QLocale calcLocale(const QQuickItem *item); + +#if QT_CONFIG(quicktemplates2_hover) + void updateHoverEnabled(bool enabled, bool xplicit); + static void updateHoverEnabledRecur(QQuickItem *item, bool enabled); + static bool calcHoverEnabled(const QQuickItem *item); +#endif + + static void warnIfCustomizationNotSupported(QObject *control, QQuickItem *item, const QString &propertyName); + + virtual void cancelContentItem(); + virtual void executeContentItem(bool complete = false); + + virtual void cancelBackground(); + virtual void executeBackground(bool complete = false); + + enum class UnhideVisibility { + Show, + Hide + }; + + static void hideOldItem(QQuickItem *item); + static void unhideOldItem(QQuickControl *control, QQuickItem *item, + UnhideVisibility visibility = UnhideVisibility::Show); + + void updateBaselineOffset(); + + static const ChangeTypes ImplicitSizeChanges; + + void addImplicitSizeListener(QQuickItem *item, ChangeTypes changes = ImplicitSizeChanges); + void removeImplicitSizeListener(QQuickItem *item, ChangeTypes changes = ImplicitSizeChanges); + + static void addImplicitSizeListener(QQuickItem *item, QQuickItemChangeListener *listener, ChangeTypes changes = ImplicitSizeChanges); + static void removeImplicitSizeListener(QQuickItem *item, QQuickItemChangeListener *listener, ChangeTypes changes = ImplicitSizeChanges); + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemDestroyed(QQuickItem *item) override; + void itemFocusChanged(QQuickItem *item, Qt::FocusReason reason) override; + + bool setLastFocusChangeReason(Qt::FocusReason) override; + + virtual qreal getContentWidth() const; + virtual qreal getContentHeight() const; + + void updateImplicitContentWidth(); + void updateImplicitContentHeight(); + void updateImplicitContentSize(); + + QPalette defaultPalette() const override; + + struct ExtraData { + bool hasTopPadding = false; + bool hasLeftPadding = false; + bool hasRightPadding = false; + bool hasBottomPadding = false; + bool hasBaselineOffset = false; + bool hasTopInset = false; + bool hasLeftInset = false; + bool hasRightInset = false; + bool hasBottomInset = false; + bool hasBackgroundWidth = false; + bool hasBackgroundHeight = false; + qreal topPadding = 0; + qreal leftPadding = 0; + qreal rightPadding = 0; + qreal bottomPadding = 0; + qreal topInset = 0; + qreal leftInset = 0; + qreal rightInset = 0; + qreal bottomInset = 0; + QFont requestedFont; + }; + QLazilyAllocated extra; + + bool hasHorizontalPadding = false; + bool hasVerticalPadding = false; + bool hasLocale = false; + bool wheelEnabled = false; +#if QT_CONFIG(quicktemplates2_hover) + bool hovered = false; + bool explicitHoverEnabled = false; +#endif + bool resizingBackground = false; + int touchId = -1; + qreal padding = 0; + qreal horizontalPadding = 0; + qreal verticalPadding = 0; + qreal implicitContentWidth = 0; + qreal implicitContentHeight = 0; + qreal spacing = 0; + QLocale locale; + QFont resolvedFont; + QQuickDeferredPointer background; + QQuickDeferredPointer contentItem; +}; + +QT_END_NAMESPACE + +#endif // QQUICKCONTROL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekmodel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekmodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..93a9f1f37b571c219d784478965584fed6eb256e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekmodel_p.h @@ -0,0 +1,62 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDAYOFWEEKMODEL_P_H +#define QQUICKDAYOFWEEKMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickDayOfWeekModelPrivate; + +class QQuickDayOfWeekModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL) + Q_PROPERTY(int count READ rowCount CONSTANT FINAL) + +public: + explicit QQuickDayOfWeekModel(QObject *parent = nullptr); + + QLocale locale() const; + void setLocale(const QLocale &locale); + + Q_INVOKABLE int dayAt(int index) const; + + enum { + DayRole = Qt::UserRole + 1, + LongNameRole, + ShortNameRole, + NarrowNameRole + }; + + QHash roleNames() const override; + QVariant data(const QModelIndex &index, int role) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + +Q_SIGNALS: + void localeChanged(); + +private: + Q_DISABLE_COPY(QQuickDayOfWeekModel) + Q_DECLARE_PRIVATE(QQuickDayOfWeekModel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDAYOFWEEKMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekrow_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekrow_p.h new file mode 100644 index 0000000000000000000000000000000000000000..22e648abecbaa59d5c107dbad0691b4211fdb583 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdayofweekrow_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDAYOFWEEKROW_P_H +#define QQUICKDAYOFWEEKROW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickDayOfWeekRowPrivate; + +class QQuickDayOfWeekRow : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + QML_NAMED_ELEMENT(AbstractDayOfWeekRow) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickDayOfWeekRow(QQuickItem *parent = nullptr); + + QVariant source() const; + void setSource(const QVariant &source); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + +Q_SIGNALS: + void sourceChanged(); + void delegateChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override; + +private: + Q_DISABLE_COPY(QQuickDayOfWeekRow) + Q_DECLARE_PRIVATE(QQuickDayOfWeekRow) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDAYOFWEEKROW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredexecute_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredexecute_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fae13abd7cffdbb0103939b8cc33b59991334b24 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredexecute_p_p.h @@ -0,0 +1,60 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDEFERREDEXECUTE_P_P_H +#define QQUICKDEFERREDEXECUTE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QString; +class QObject; + +namespace QtQuickPrivate { + Q_QUICKTEMPLATES2_EXPORT void beginDeferred(QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate, bool isOwnState); + Q_QUICKTEMPLATES2_EXPORT void cancelDeferred(QObject *object, const QString &property); + Q_QUICKTEMPLATES2_EXPORT void completeDeferred(QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate); +} + +template +void quickBeginDeferred(QObject *object, const QString &property, QQuickDeferredPointer &delegate) +{ + if (!QQmlVME::componentCompleteEnabled()) + return; + + QtQuickPrivate::beginDeferred(object, property, &delegate, delegate.setExecuting(true)); + delegate.setExecuting(false); +} + +inline void quickCancelDeferred(QObject *object, const QString &property) +{ + QtQuickPrivate::cancelDeferred(object, property); +} + +template +void quickCompleteDeferred(QObject *object, const QString &property, QQuickDeferredPointer &delegate) +{ + Q_ASSERT(!delegate.wasExecuted()); + QtQuickPrivate::completeDeferred(object, property, &delegate); + delegate.setExecuted(); +} + +QT_END_NAMESPACE + +#endif // QQUICKDEFERREDEXECUTE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredpointer_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredpointer_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bd674f757eb4b3ca1df3cae95ff45f493d29cc39 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdeferredpointer_p_p.h @@ -0,0 +1,134 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDEFERREDPOINTER_P_P_H +#define QQUICKDEFERREDPOINTER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickUntypedDeferredPointer +{ + Q_DISABLE_COPY_MOVE(QQuickUntypedDeferredPointer) +public: + QQmlComponentPrivate::DeferredState *deferredState() const + { + return value.isT1() ? nullptr : &value.asT2()->state; + } + + void clearDeferredState() + { + if (value.isT1()) + return; + value.clearFlag(); + DeferredState *state = value.asT2(); + value = state->value; + delete state; + } + + bool wasExecuted() const { return value.isT1() && value.flag(); } + void setExecuted() + { + Q_ASSERT(value.isT1()); + value.setFlag(); + } + + bool isExecuting() const { return value.isT2() && value.flag(); } + bool setExecuting(bool b) + { + if (b) { + if (value.isT2()) { + // Not our state. Set the flag, but leave it alone. + value.setFlag(); + return false; + } + + value = new DeferredState { + QQmlComponentPrivate::DeferredState(), + value.asT1() + }; + value.setFlag(); + return true; + } + + if (value.isT2()) { + value.clearFlag(); + return true; + } + + return false; + } + +protected: + QQuickUntypedDeferredPointer() = default; + QQuickUntypedDeferredPointer(void *v) : value(v) + { + Q_ASSERT(value.isT1()); + Q_ASSERT(!value.flag()); + } + + QQuickUntypedDeferredPointer &operator=(void *v) + { + if (value.isT1()) + value = v; + else + value.asT2()->value = v; + return *this; + } + + ~QQuickUntypedDeferredPointer() + { + if (value.isT2()) + delete value.asT2(); + } + + void *data() const { return value.isT1() ? value.asT1() : value.asT2()->value; } + +private: + struct DeferredState + { + QQmlComponentPrivate::DeferredState state; + void *value = nullptr; + }; + + QBiPointer value; +}; + +template +class QQuickDeferredPointer : public QQuickUntypedDeferredPointer +{ + Q_DISABLE_COPY_MOVE(QQuickDeferredPointer) +public: + Q_NODISCARD_CTOR QQuickDeferredPointer() = default; + ~QQuickDeferredPointer() = default; + + Q_NODISCARD_CTOR QQuickDeferredPointer(T *v) : QQuickUntypedDeferredPointer(v) {} + QQuickDeferredPointer &operator=(T *o) { + QQuickUntypedDeferredPointer::operator=(o); + return *this; + } + + T *data() const { return static_cast(QQuickUntypedDeferredPointer::data()); } + operator bool() const { return data() != nullptr; } + operator T*() const { return data(); } + T *operator*() const { return data(); } + T *operator->() const { return data(); } +}; + +QT_END_NAMESPACE + +#endif // QQUICKDEFERREDPOINTER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdelaybutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdelaybutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5dfd30d49fa82f1792a2f52c56052ed5f8766a9d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdelaybutton_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDELAYBUTTON_P_H +#define QQUICKDELAYBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTransition; +class QQuickDelayButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDelayButton : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL) + Q_PROPERTY(qreal progress READ progress WRITE setProgress NOTIFY progressChanged FINAL) + Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) + QML_NAMED_ELEMENT(DelayButton) + QML_ADDED_IN_VERSION(2, 2) + +public: + explicit QQuickDelayButton(QQuickItem *parent = nullptr); + + int delay() const; + void setDelay(int delay); + + qreal progress() const; + void setProgress(qreal progress); + + QQuickTransition *transition() const; + void setTransition(QQuickTransition *transition); + +Q_SIGNALS: + void activated(); + void delayChanged(); + void progressChanged(); + void transitionChanged(); + +protected: + void buttonChange(ButtonChange change) override; + void nextCheckState() override; + + QFont defaultFont() const override; + +private: + Q_DISABLE_COPY(QQuickDelayButton) + Q_DECLARE_PRIVATE(QQuickDelayButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDELAYBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdial_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdial_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2efa02911970973e77de8119969f226704214232 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdial_p.h @@ -0,0 +1,165 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIAL_P_H +#define QQUICKDIAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickDialAttached; +class QQuickDialPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDial : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL) + Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal angle READ angle NOTIFY angleChanged FINAL) + Q_PROPERTY(qreal startAngle READ startAngle WRITE setStartAngle NOTIFY startAngleChanged FINAL REVISION(6, 6)) + Q_PROPERTY(qreal endAngle READ endAngle WRITE setEndAngle NOTIFY endAngleChanged FINAL REVISION(6, 6)) + Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL) + Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2)) + // 2.5 (Qt 5.12) + Q_PROPERTY(InputMode inputMode READ inputMode WRITE setInputMode NOTIFY inputModeChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,handle") + QML_NAMED_ELEMENT(Dial) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickDial(QQuickItem *parent = nullptr); + + qreal from() const; + void setFrom(qreal from); + + qreal to() const; + void setTo(qreal to); + + qreal value() const; + void setValue(qreal value); + + qreal position() const; + + qreal angle() const; + + qreal stepSize() const; + void setStepSize(qreal step); + + qreal startAngle() const; + void setStartAngle(qreal startAngle); + + qreal endAngle() const; + void setEndAngle(qreal endAngle); + + enum SnapMode { + NoSnap, + SnapAlways, + SnapOnRelease + }; + Q_ENUM(SnapMode) + + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + enum InputMode { + Circular, + Horizontal, + Vertical, + }; + Q_ENUM(InputMode) + + enum WrapDirection { + Clockwise, + CounterClockwise + }; + Q_ENUM(WrapDirection) + + bool wrap() const; + void setWrap(bool wrap); + + bool isPressed() const; + void setPressed(bool pressed); + + QQuickItem *handle() const; + void setHandle(QQuickItem *handle); + + // 2.2 (Qt 5.9) + bool live() const; + void setLive(bool live); + + // 2.5 (Qt 5.12) + InputMode inputMode() const; + void setInputMode(InputMode mode); + +public Q_SLOTS: + void increase(); + void decrease(); + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void valueChanged(); + void positionChanged(); + void angleChanged(); + void stepSizeChanged(); + void snapModeChanged(); + void wrapChanged(); + void pressedChanged(); + void handleChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void moved(); + Q_REVISION(2, 2) void liveChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void inputModeChanged(); + Q_REVISION(6, 6) void startAngleChanged(); + Q_REVISION(6, 6) void endAngleChanged(); + Q_REVISION(6, 6) void wrapped(WrapDirection); + +protected: + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + void mirrorChange() override; + void componentComplete() override; + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickDial) + Q_DECLARE_PRIVATE(QQuickDial) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p.h new file mode 100644 index 0000000000000000000000000000000000000000..91c26e19a6db18d0a48ec74149c4a4abff84f3e7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p.h @@ -0,0 +1,118 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIALOG_P_H +#define QQUICKDIALOG_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickDialogPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDialog : public QQuickPopup +{ + Q_OBJECT + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL) + Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL) + Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL REVISION(2, 3)) + QML_EXTENDED_NAMESPACE(QPlatformDialogHelper) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5)) + QML_NAMED_ELEMENT(Dialog) + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickDialog(QObject *parent = nullptr); + ~QQuickDialog(); + + QString title() const; + void setTitle(const QString &title); + + QQuickItem *header() const; + void setHeader(QQuickItem *header); + + QQuickItem *footer() const; + void setFooter(QQuickItem *footer); + + QPlatformDialogHelper::StandardButtons standardButtons() const; + void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons); + Q_REVISION(2, 3) Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const; + + // 2.3 (Qt 5.10) + enum StandardCode { Rejected, Accepted }; + Q_ENUM(StandardCode) + + int result() const; + void setResult(int result); + + // 2.5 (Qt 5.12) + qreal implicitHeaderWidth() const; + qreal implicitHeaderHeight() const; + + qreal implicitFooterWidth() const; + qreal implicitFooterHeight() const; + + void setOpacity(qreal opacity) override; + +public Q_SLOTS: + virtual void accept(); + virtual void reject(); + virtual void done(int result); + +Q_SIGNALS: + void accepted(); + void rejected(); + void titleChanged(); + void headerChanged(); + void footerChanged(); + void standardButtonsChanged(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void applied(); + Q_REVISION(2, 3) void reset(); + Q_REVISION(2, 3) void discarded(); + Q_REVISION(2, 3) void helpRequested(); + Q_REVISION(2, 3) void resultChanged(); + // 2.5 (Qt 5.12) + void implicitHeaderWidthChanged(); + void implicitHeaderHeightChanged(); + void implicitFooterWidthChanged(); + void implicitFooterHeightChanged(); + +protected: + QQuickDialog(QQuickDialogPrivate &dd, QObject *parent); + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickDialog) + Q_DECLARE_PRIVATE(QQuickDialog) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIALOG_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2c643d74ca536e2222e150f6b7f41c43b665d8f0 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialog_p_p.h @@ -0,0 +1,53 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIALOG_P_P_H +#define QQUICKDIALOG_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAbstractButton; +class QQuickDialogButtonBox; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDialogPrivate : public QQuickPopupPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickDialog) + + static QQuickDialogPrivate *get(QQuickDialog *dialog) + { + return dialog->d_func(); + } + + static QPlatformDialogHelper::ButtonRole buttonRole(QQuickAbstractButton *button); + + virtual void handleAccept(); + virtual void handleReject(); + virtual void handleClick(QQuickAbstractButton *button); + + Qt::WindowFlags popupWindowType() const override; + + int result = 0; + QString title; + QQuickDialogButtonBox *buttonBox = nullptr; + QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIALOG_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b9d36bb1be71495077bbb37ef88f69a166b2a713 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p.h @@ -0,0 +1,135 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIALOGBUTTONBOX_P_H +#define QQUICKDIALOGBUTTONBOX_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickDialogButtonBoxPrivate; +class QQuickDialogButtonBoxAttached; +class QQuickDialogButtonBoxAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDialogButtonBox : public QQuickContainer +{ + Q_OBJECT + Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment RESET resetAlignment NOTIFY alignmentChanged FINAL) + Q_PROPERTY(QPlatformDialogHelper::StandardButtons standardButtons READ standardButtons WRITE setStandardButtons NOTIFY standardButtonsChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(QPlatformDialogHelper::ButtonLayout buttonLayout READ buttonLayout WRITE setButtonLayout RESET resetButtonLayout NOTIFY buttonLayoutChanged FINAL REVISION(2, 5)) + QML_NAMED_ELEMENT(DialogButtonBox) + QML_ATTACHED(QQuickDialogButtonBoxAttached) + QML_EXTENDED_NAMESPACE(QPlatformDialogHelper) + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickDialogButtonBox(QQuickItem *parent = nullptr); + ~QQuickDialogButtonBox(); + + enum Position { + Header, + Footer + }; + Q_ENUM(Position) + + Position position() const; + void setPosition(Position position); + + Qt::Alignment alignment() const; + void setAlignment(Qt::Alignment alignment); + void resetAlignment(); + + QPlatformDialogHelper::StandardButtons standardButtons() const; + void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons); + Q_INVOKABLE QQuickAbstractButton *standardButton(QPlatformDialogHelper::StandardButton button) const; + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + static QQuickDialogButtonBoxAttached *qmlAttachedProperties(QObject *object); + + QPlatformDialogHelper::ButtonLayout buttonLayout() const; + void setButtonLayout(QPlatformDialogHelper::ButtonLayout layout); + void resetButtonLayout(); + +Q_SIGNALS: + void accepted(); + void rejected(); + void helpRequested(); + void clicked(QQuickAbstractButton *button); + void positionChanged(); + void alignmentChanged(); + void standardButtonsChanged(); + void delegateChanged(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void applied(); + Q_REVISION(2, 3) void reset(); + Q_REVISION(2, 3) void discarded(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void buttonLayoutChanged(); + +protected: + void updatePolish() override; + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + bool isContent(QQuickItem *item) const override; + void itemAdded(int index, QQuickItem *item) override; + void itemRemoved(int index, QQuickItem *item) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + bool event(QEvent *e) override; + +private: + Q_DISABLE_COPY(QQuickDialogButtonBox) + Q_DECLARE_PRIVATE(QQuickDialogButtonBox) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDialogButtonBoxAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickDialogButtonBox *buttonBox READ buttonBox NOTIFY buttonBoxChanged FINAL) + Q_PROPERTY(QPlatformDialogHelper::ButtonRole buttonRole READ buttonRole WRITE setButtonRole NOTIFY buttonRoleChanged FINAL) + +public: + explicit QQuickDialogButtonBoxAttached(QObject *parent = nullptr); + + QQuickDialogButtonBox *buttonBox() const; + + QPlatformDialogHelper::ButtonRole buttonRole() const; + void setButtonRole(QPlatformDialogHelper::ButtonRole role); + +Q_SIGNALS: + void buttonBoxChanged(); + void buttonRoleChanged(); + +private: + Q_DISABLE_COPY(QQuickDialogButtonBoxAttached) + Q_DECLARE_PRIVATE(QQuickDialogButtonBoxAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIALOGBUTTONBOX_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0421b41bf30ad2f97593f9bbfd0301e56db2883f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdialogbuttonbox_p_p.h @@ -0,0 +1,80 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDIALOGBUTTONBOX_P_P_H +#define QQUICKDIALOGBUTTONBOX_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickDialogButtonBoxPrivate : public QQuickContainerPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickDialogButtonBox) + + static QQuickDialogButtonBoxPrivate *get(QQuickDialogButtonBox *box) + { + return box->d_func(); + } + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + + void resizeContent() override; + + void updateLayout(); + + qreal getContentWidth() const override; + qreal getContentHeight() const override; + + void handleClick(); + + static QString buttonText(QPlatformDialogHelper::StandardButton standardButton); + + QQuickAbstractButton *createStandardButton(QPlatformDialogHelper::StandardButton button); + void removeStandardButtons(); + + void updateLanguage(); + + QPlatformDialogHelper::StandardButton standardButton(QQuickAbstractButton *button) const; + + Qt::Alignment alignment; + QQuickDialogButtonBox::Position position = QQuickDialogButtonBox::Footer; + QPlatformDialogHelper::StandardButtons standardButtons = QPlatformDialogHelper::NoButton; + QPlatformDialogHelper::ButtonLayout buttonLayout = QPlatformDialogHelper::UnknownLayout; + QQmlComponent *delegate = nullptr; +}; + +class QQuickDialogButtonBoxAttachedPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickDialogButtonBoxAttached) + +public: + static QQuickDialogButtonBoxAttachedPrivate *get(QQuickDialogButtonBoxAttached *q) + { + return q->d_func(); + } + + void setButtonBox(QQuickDialogButtonBox *box); + + QQuickDialogButtonBox *buttonBox = nullptr; + QPlatformDialogHelper::ButtonRole buttonRole = QPlatformDialogHelper::InvalidRole; + QPlatformDialogHelper::StandardButton standardButton = QPlatformDialogHelper::NoButton; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDIALOGBUTTONBOX_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5fefbfd7877bfdb09c8763c09c89ade147b00d3b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p.h @@ -0,0 +1,76 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAWER_P_H +#define QQUICKDRAWER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickDrawerPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickDrawer : public QQuickPopup +{ + Q_OBJECT + Q_PROPERTY(Qt::Edge edge READ edge WRITE setEdge NOTIFY edgeChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal dragMargin READ dragMargin WRITE setDragMargin RESET resetDragMargin NOTIFY dragMarginChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2)) + QML_NAMED_ELEMENT(Drawer) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickDrawer(QObject *parent = nullptr); + + Qt::Edge edge() const; + void setEdge(Qt::Edge edge); + + qreal position() const; + void setPosition(qreal position); + + qreal dragMargin() const; + void setDragMargin(qreal margin); + void resetDragMargin(); + + // 2.2 (Qt 5.9) + bool isInteractive() const; + void setInteractive(bool interactive); + +Q_SIGNALS: + void edgeChanged(); + void positionChanged(); + void dragMarginChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void interactiveChanged(); + +protected: + bool childMouseEventFilter(QQuickItem *child, QEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + bool overlayEvent(QQuickItem *item, QEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + +private: + Q_DISABLE_COPY(QQuickDrawer) + Q_DECLARE_PRIVATE(QQuickDrawer) +}; + +QT_END_NAMESPACE + +#endif // QQUICKDRAWER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1c897cde4784a1ccb8c256f907473504166ee4cb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickdrawer_p_p.h @@ -0,0 +1,73 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKDRAWER_P_P_H +#define QQUICKDRAWER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickDrawerPrivate : public QQuickPopupPrivate +{ + Q_DECLARE_PUBLIC(QQuickDrawer) + +public: + static QQuickDrawerPrivate *get(QQuickDrawer *drawer) + { + return drawer->d_func(); + } + + qreal offsetAt(const QPointF &point) const; + qreal positionAt(const QPointF &point) const; + + QQuickPopupPositioner *getPositioner() override; + void showDimmer() override; + void hideDimmer() override; + void resizeDimmer() override; + + bool startDrag(QEvent *event); + bool grabMouse(QQuickItem *item, QMouseEvent *event); +#if QT_CONFIG(quicktemplates2_multitouch) + bool grabTouch(QQuickItem *item, QTouchEvent *event); +#endif + bool blockInput(QQuickItem *item, const QPointF &point) const override; + + bool handlePress(QQuickItem* item, const QPointF &point, ulong timestamp) override; + bool handleMove(QQuickItem* item, const QPointF &point, ulong timestamp) override; + bool handleRelease(QQuickItem* item, const QPointF &point, ulong timestamp) override; + void handleUngrab() override; + + bool prepareEnterTransition() override; + bool prepareExitTransition() override; + + QQuickPopup::PopupType resolvedPopupType() const override; + + bool setEdge(Qt::Edge edge); + Qt::Edge effectiveEdge() const; + bool isWithinDragMargin(const QPointF &point) const; + + Qt::Edge edge = Qt::LeftEdge; + qreal offset = 0; + qreal position = 0; + qreal dragMargin = 0; + QQuickVelocityCalculator velocityCalculator; + bool delayedEnterTransition = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKDRAWER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p.h new file mode 100644 index 0000000000000000000000000000000000000000..53e6ad6ea1945538a732f2ade54fbe415c50c310 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p.h @@ -0,0 +1,47 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFRAME_P_H +#define QQUICKFRAME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFramePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickFrame : public QQuickPane +{ + Q_OBJECT + QML_NAMED_ELEMENT(Frame) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickFrame(QQuickItem *parent = nullptr); + +protected: + QQuickFrame(QQuickFramePrivate &dd, QQuickItem *parent); + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickFrame) + Q_DECLARE_PRIVATE(QQuickFrame) +}; + +QT_END_NAMESPACE + +#endif // QQUICKFRAME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0c4d91a9f453f00ae4513e5f899b590795f1f4d5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickframe_p_p.h @@ -0,0 +1,30 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKFRAME_P_P_H +#define QQUICKFRAME_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFrame; + +class Q_QUICKTEMPLATES2_EXPORT QQuickFramePrivate : public QQuickPanePrivate +{ +}; + +QT_END_NAMESPACE + +#endif // QQUICKFRAME_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickgroupbox_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickgroupbox_p.h new file mode 100644 index 0000000000000000000000000000000000000000..11053fa27f6d6348825bf5616691f1fd4908828f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickgroupbox_p.h @@ -0,0 +1,74 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGROUPBOX_P_H +#define QQUICKGROUPBOX_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickGroupBoxPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickGroupBox : public QQuickFrame +{ + Q_OBJECT + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + Q_PROPERTY(QQuickItem *label READ label WRITE setLabel NOTIFY labelChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitLabelWidth READ implicitLabelWidth NOTIFY implicitLabelWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitLabelHeight READ implicitLabelHeight NOTIFY implicitLabelHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem,label") + QML_NAMED_ELEMENT(GroupBox) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickGroupBox(QQuickItem *parent = nullptr); + ~QQuickGroupBox(); + + QString title() const; + void setTitle(const QString &title); + + QQuickItem *label() const; + void setLabel(QQuickItem *label); + + // 2.5 (Qt 5.12) + qreal implicitLabelWidth() const; + qreal implicitLabelHeight() const; + +Q_SIGNALS: + void titleChanged(); + void labelChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void implicitLabelWidthChanged(); + Q_REVISION(2, 5) void implicitLabelHeightChanged(); + +protected: + void componentComplete() override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickGroupBox) + Q_DECLARE_PRIVATE(QQuickGroupBox) +}; + +QT_END_NAMESPACE + +#endif // QQUICKGROUPBOX_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..20264031795516d256c3c0b43931f75b4988f3d2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p.h @@ -0,0 +1,104 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKHEADERVIEW_P_H +#define QQUICKHEADERVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickHeaderViewBase; +class QQuickHeaderViewBasePrivate; +class Q_QUICKTEMPLATES2_EXPORT QQuickHeaderViewBase : public QQuickTableView +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickHeaderViewBase) + Q_PROPERTY(QString textRole READ textRole WRITE setTextRole NOTIFY textRoleChanged FINAL) + +public: + explicit QQuickHeaderViewBase(Qt::Orientation orient, QQuickItem *parent = nullptr); + ~QQuickHeaderViewBase(); + + QString textRole() const; + void setTextRole(const QString &role); + +protected: + QQuickHeaderViewBase(QQuickHeaderViewBasePrivate &dd, QQuickItem *parent); + +Q_SIGNALS: + void textRoleChanged(); + +private: + Q_DISABLE_COPY(QQuickHeaderViewBase) + friend class QQuickHorizontalHeaderView; + friend class QQuickVerticalHeaderView; +}; + +class QQuickHorizontalHeaderViewPrivate; +class Q_QUICKTEMPLATES2_EXPORT QQuickHorizontalHeaderView : public QQuickHeaderViewBase +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickHorizontalHeaderView) + Q_PROPERTY(bool movableColumns READ movableColumns WRITE setMovableColumns NOTIFY movableColumnsChanged REVISION(6, 8) FINAL) + QML_NAMED_ELEMENT(HorizontalHeaderView) + QML_ADDED_IN_VERSION(2, 15) + +public: + QQuickHorizontalHeaderView(QQuickItem *parent = nullptr); + ~QQuickHorizontalHeaderView() override; + + bool movableColumns() const; + void setMovableColumns(bool movableColumns); + +Q_SIGNALS: + Q_REVISION(6, 8) void movableColumnsChanged(); + +protected: + QQuickHorizontalHeaderView(QQuickHorizontalHeaderViewPrivate &dd, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickHorizontalHeaderView) +}; + +class QQuickVerticalHeaderViewPrivate; +class Q_QUICKTEMPLATES2_EXPORT QQuickVerticalHeaderView : public QQuickHeaderViewBase +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QQuickVerticalHeaderView) + Q_PROPERTY(bool movableRows READ movableRows WRITE setMovableRows NOTIFY movableRowsChanged REVISION(6, 8) FINAL) + QML_NAMED_ELEMENT(VerticalHeaderView) + QML_ADDED_IN_VERSION(2, 15) + +public: + QQuickVerticalHeaderView(QQuickItem *parent = nullptr); + ~QQuickVerticalHeaderView() override; + + bool movableRows() const; + void setMovableRows(bool movableRows); + +Q_SIGNALS: + Q_REVISION(6, 8) void movableRowsChanged(); + +protected: + QQuickVerticalHeaderView(QQuickVerticalHeaderViewPrivate &dd, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickVerticalHeaderView) +}; + +QT_END_NAMESPACE + +#endif // QQUICKHEADERVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..25f0cc175b7e6d2528a1f0921cca98df16f77bc4 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickheaderview_p_p.h @@ -0,0 +1,121 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKHEADERVIEW_P_P_H +#define QQUICKHEADERVIEW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#if QT_CONFIG(transposeproxymodel) +#include +#endif +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QHeaderDataProxyModel : public QAbstractItemModel +{ + Q_OBJECT + Q_DISABLE_COPY(QHeaderDataProxyModel) + Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel) +public: + explicit QHeaderDataProxyModel(QObject *parent = nullptr); + ~QHeaderDataProxyModel(); + + void setSourceModel(QAbstractItemModel *newSourceModel); + QPointer sourceModel() const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; + QModelIndex parent(const QModelIndex &child) const override; + QModelIndex sibling(int row, int column, const QModelIndex &idx) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; + bool hasChildren(const QModelIndex &parent = QModelIndex()) const override; + QHash roleNames() const override; + + inline QVariant variantValue() const; + inline Qt::Orientation orientation() const; + inline void setOrientation(Qt::Orientation o); + + QQuickHeaderViewBase *m_headerView = nullptr; + +private: + inline void connectToModel(); + inline void disconnectFromModel(); + QPointer m_model = nullptr; + Qt::Orientation m_orientation = Qt::Horizontal; +}; + +class QQuickHeaderViewBasePrivate : public QQuickTableViewPrivate +{ + Q_DECLARE_PUBLIC(QQuickHeaderViewBase) +public: + QQuickHeaderViewBasePrivate(); + ~QQuickHeaderViewBasePrivate(); + + void init(); + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + const QPointer delegateItemAt(int row, int col) const; + QVariant modelImpl() const override; + void setModelImpl(const QVariant &newModel) override; + void syncModel() override; + void syncSyncView() override; + QAbstractItemModel *selectionSourceModel() override; + +protected: + QHeaderDataProxyModel m_headerDataProxyModel; +#if QT_CONFIG(transposeproxymodel) + QTransposeProxyModel m_transposeProxyModel; +#endif + struct SectionSize + { + int section; + qreal previousSize; + }; + QStack m_hiddenSectionSizes; + bool m_modelExplicitlySetByUser = false; + QString m_textRole; + + int logicalRowIndex(const int visualIndex) const final; + int logicalColumnIndex(const int visualIndex) const final; + int visualRowIndex(const int logicalIndex) const final; + int visualColumnIndex(const int logicalIndex) const final; +}; + +class QQuickHorizontalHeaderViewPrivate : public QQuickHeaderViewBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickHorizontalHeaderView) +public: + QQuickHorizontalHeaderViewPrivate(); + ~QQuickHorizontalHeaderViewPrivate(); + + bool m_movableColumns = false; +}; + +class QQuickVerticalHeaderViewPrivate : public QQuickHeaderViewBasePrivate +{ + Q_DECLARE_PUBLIC(QQuickVerticalHeaderView) +public: + QQuickVerticalHeaderViewPrivate(); + ~QQuickVerticalHeaderViewPrivate(); + + bool m_movableRows = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKHEADERVIEW_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickicon_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickicon_p.h new file mode 100644 index 0000000000000000000000000000000000000000..fa54b9be473cded1a94082f14e3170e6d33370dc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickicon_p.h @@ -0,0 +1,87 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKICON_P_H +#define QQUICKICON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickIconPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickIcon +{ + Q_GADGET + Q_PROPERTY(QString name READ name WRITE setName RESET resetName FINAL) + Q_PROPERTY(QUrl source READ source WRITE setSource RESET resetSource FINAL) + Q_PROPERTY(int width READ width WRITE setWidth RESET resetWidth FINAL) + Q_PROPERTY(int height READ height WRITE setHeight RESET resetHeight FINAL) + Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor FINAL) + Q_PROPERTY(bool cache READ cache WRITE setCache RESET resetCache FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 3) + +public: + QQuickIcon(); + QQuickIcon(const QQuickIcon &other); + ~QQuickIcon(); + + QQuickIcon& operator=(const QQuickIcon &other); + bool operator==(const QQuickIcon &other) const; + bool operator!=(const QQuickIcon &other) const; + + bool isEmpty() const; + + QString name() const; + void setName(const QString &name); + void resetName(); + + QUrl source() const; + void setSource(const QUrl &source); + void resetSource(); + QUrl resolvedSource() const; + void ensureRelativeSourceResolved(const QObject *owner); + + int width() const; + void setWidth(int width); + void resetWidth(); + + int height() const; + void setHeight(int height); + void resetHeight(); + + QColor color() const; + void setColor(const QColor &color); + void resetColor(); + + bool cache() const; + void setCache(bool cache); + void resetCache(); + + QQuickIcon resolve(const QQuickIcon &other) const; + +private: + QExplicitlySharedDataPointer d; +}; + +QT_END_NAMESPACE + +#endif // QQUICKICON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickindicatorbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickindicatorbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..50604d9caf18f02b92c374a99cd4887f0ae2d224 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickindicatorbutton_p.h @@ -0,0 +1,89 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef QQUICKINDICATORBUTTON_H +#define QQUICKINDICATORBUTTON_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include "qquickdeferredpointer_p_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickIndicatorButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickIndicatorButton : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(QQuickItem *indicator READ indicator WRITE setIndicator NOTIFY indicatorChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitIndicatorWidth READ implicitIndicatorWidth NOTIFY implicitIndicatorWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitIndicatorHeight READ implicitIndicatorHeight NOTIFY implicitIndicatorHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "indicator") + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickIndicatorButton(QObject *parent); + ~QQuickIndicatorButton() override; + + bool isPressed() const; + void setPressed(bool pressed); + + QQuickItem *indicator() const; + void setIndicator(QQuickItem *indicator); + + bool isHovered() const; + void setHovered(bool hovered); + + qreal implicitIndicatorWidth() const; + qreal implicitIndicatorHeight() const; + +Q_SIGNALS: + void pressedChanged(); + void indicatorChanged(); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void hoveredChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void implicitIndicatorWidthChanged(); + Q_REVISION(2, 5) void implicitIndicatorHeightChanged(); + +private: + Q_DISABLE_COPY(QQuickIndicatorButton) + Q_DECLARE_PRIVATE(QQuickIndicatorButton) +}; + +class QQuickIndicatorButtonPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickIndicatorButton) + +public: + static QQuickIndicatorButtonPrivate *get(QQuickIndicatorButton *button) + { + return button->d_func(); + } + + void cancelIndicator(); + void executeIndicator(bool complete = false); + + bool pressed = false; + bool hovered = false; + QQuickDeferredPointer indicator; +}; + +QT_END_NAMESPACE + +#endif // QQUICKINDICATORBUTTON_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9ea4d438a8fc1c1811607f1bd3b35bcc244155b2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMDELEGATE_P_H +#define QQUICKITEMDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickItemDelegatePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickItemDelegate : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL) + QML_NAMED_ELEMENT(ItemDelegate) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickItemDelegate(QQuickItem *parent = nullptr); + + bool isHighlighted() const; + void setHighlighted(bool highlighted); + +Q_SIGNALS: + void highlightedChanged(); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +protected: + QQuickItemDelegate(QQuickItemDelegatePrivate &dd, QQuickItem *parent); + +private: + Q_DISABLE_COPY(QQuickItemDelegate) + Q_DECLARE_PRIVATE(QQuickItemDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..47352881375b82932f920f4dbea4da170b08b738 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickitemdelegate_p_p.h @@ -0,0 +1,34 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMDELEGATE_P_P_H +#define QQUICKITEMDELEGATE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickItemDelegatePrivate : public QQuickAbstractButtonPrivate +{ + Q_DECLARE_PUBLIC(QQuickItemDelegate) + +public: + QPalette defaultPalette() const override; + + bool highlighted = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMDELEGATE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3c842bada44c24dec3a31bdfe188c22957805475 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p.h @@ -0,0 +1,98 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLABEL_P_H +#define QQUICKLABEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickLabelPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickLabel : public QQuickText +{ + Q_OBJECT + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background") + QML_NAMED_ELEMENT(Label) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickLabel(QQuickItem *parent = nullptr); + ~QQuickLabel(); + + QFont font() const; + void setFont(const QFont &font); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + // 2.5 (Qt 5.12) + qreal implicitBackgroundWidth() const; + qreal implicitBackgroundHeight() const; + + qreal topInset() const; + void setTopInset(qreal inset); + void resetTopInset(); + + qreal leftInset() const; + void setLeftInset(qreal inset); + void resetLeftInset(); + + qreal rightInset() const; + void setRightInset(qreal inset); + void resetRightInset(); + + qreal bottomInset() const; + void setBottomInset(qreal inset); + void resetBottomInset(); + +Q_SIGNALS: + void fontChanged(); + void backgroundChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void implicitBackgroundWidthChanged(); + Q_REVISION(2, 5) void implicitBackgroundHeightChanged(); + Q_REVISION(2, 5) void topInsetChanged(); + Q_REVISION(2, 5) void leftInsetChanged(); + Q_REVISION(2, 5) void rightInsetChanged(); + Q_REVISION(2, 5) void bottomInsetChanged(); + +protected: + void classBegin() override; + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset); + +private: + Q_DISABLE_COPY(QQuickLabel) + Q_DECLARE_PRIVATE(QQuickLabel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKLABEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c948ec0da0ca56cf6b9487b012ff3a774e52056c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicklabel_p_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKLABEL_P_P_H +#define QQUICKLABEL_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +#if QT_CONFIG(accessibility) +#include +#endif + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT QQuickLabelPrivate : public QQuickTextPrivate, public QQuickItemChangeListener +#if QT_CONFIG(accessibility) + , public QAccessible::ActivationObserver +#endif +{ +public: + Q_DECLARE_PUBLIC(QQuickLabel) + + QQuickLabelPrivate(); + ~QQuickLabelPrivate(); + + static QQuickLabelPrivate *get(QQuickLabel *item) + { + return static_cast(QObjectPrivate::get(item)); + } + + inline QMarginsF getInset() const { return QMarginsF(getLeftInset(), getTopInset(), getRightInset(), getBottomInset()); } + inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; } + inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; } + inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; } + inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; } + + void setTopInset(qreal value, bool reset = false); + void setLeftInset(qreal value, bool reset = false); + void setRightInset(qreal value, bool reset = false); + void setBottomInset(qreal value, bool reset = false); + + void resizeBackground(); + + void resolveFont(); + void inheritFont(const QFont &font); + void updateFont(const QFont &font); + inline void setFont_helper(const QFont &font) { + if (sourceFont.resolveMask() == font.resolveMask() && sourceFont == font) + return; + updateFont(font); + } + + void textChanged(const QString &text); + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; + void maybeSetAccessibleName(const QString &name); +#endif + + void cancelBackground(); + void executeBackground(bool complete = false); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + QPalette defaultPalette() const override; + + struct ExtraData { + bool hasTopInset = false; + bool hasLeftInset = false; + bool hasRightInset = false; + bool hasBottomInset = false; + bool hasBackgroundWidth = false; + bool hasBackgroundHeight = false; + qreal topInset = 0; + qreal leftInset = 0; + qreal rightInset = 0; + qreal bottomInset = 0; + QFont requestedFont; + }; + QLazilyAllocated extra; + + bool resizingBackground = false; + QPalette resolvedPalette; + QQuickDeferredPointer background; +}; + +QT_END_NAMESPACE + +#endif // QQUICKLABEL_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d247f13ba2ec6561263b9ee4e87bab0fb2a5bc7a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p.h @@ -0,0 +1,142 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENU_P_H +#define QQUICKMENU_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include "qquickpopup_p.h" +#include + +QT_REQUIRE_CONFIG(qml_object_model); + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQmlComponent; +class QQuickMenuItem; +class QQuickMenuPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenu : public QQuickPopup +{ + Q_OBJECT + Q_PROPERTY(QVariant contentModel READ contentModel CONSTANT FINAL) + Q_PROPERTY(QQmlListProperty contentData READ contentData FINAL) + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(int count READ count NOTIFY countChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool cascade READ cascade WRITE setCascade RESET resetCascade NOTIFY cascadeChanged FINAL REVISION(2, 3)) + Q_PROPERTY(qreal overlap READ overlap WRITE setOverlap NOTIFY overlapChanged FINAL REVISION(2, 3)) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL REVISION(2, 3)) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL REVISION(2, 3)) + // 6.5 (Qt 6.5) + Q_PROPERTY(QQuickIcon icon READ icon WRITE setIcon NOTIFY iconChanged FINAL REVISION(6, 5)) + Q_CLASSINFO("DefaultProperty", "contentData") + QML_NAMED_ELEMENT(Menu) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickMenu(QObject *parent = nullptr); + ~QQuickMenu(); + + Q_INVOKABLE QQuickItem *itemAt(int index) const; + Q_INVOKABLE void addItem(QQuickItem *item); + Q_INVOKABLE void insertItem(int index, QQuickItem *item); + Q_INVOKABLE void moveItem(int from, int to); + Q_INVOKABLE void removeItem(QQuickItem *item); + + QVariant contentModel() const; + QQmlListProperty contentData(); + + QString title() const; + void setTitle(const QString &title); + + QQuickIcon icon() const; + void setIcon(const QQuickIcon &icon); + + bool cascade() const; + void setCascade(bool cascade); + void resetCascade(); + + qreal overlap() const; + void setOverlap(qreal overlap); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + int currentIndex() const; + void setCurrentIndex(int index); + + // 2.3 (Qt 5.10) + int count() const; + Q_REVISION(2, 3) Q_INVOKABLE QQuickItem *takeItem(int index); + + Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *menuAt(int index) const; + Q_REVISION(2, 3) Q_INVOKABLE void addMenu(QQuickMenu *menu); + Q_REVISION(2, 3) Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu); + Q_REVISION(2, 3) Q_INVOKABLE void removeMenu(QQuickMenu *menu); + Q_REVISION(2, 3) Q_INVOKABLE QQuickMenu *takeMenu(int index); + + Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *actionAt(int index) const; + Q_REVISION(2, 3) Q_INVOKABLE void addAction(QQuickAction *action); + Q_REVISION(2, 3) Q_INVOKABLE void insertAction(int index, QQuickAction *action); + Q_REVISION(2, 3) Q_INVOKABLE void removeAction(QQuickAction *action); + Q_REVISION(2, 3) Q_INVOKABLE QQuickAction *takeAction(int index); + + bool isVisible() const override; + void setVisible(bool visible) override; + + void popup(QQuickItem *menuItem = nullptr); + void popup(const QPointF &pos, QQuickItem *menuItem = nullptr); + + Q_REVISION(2, 3) Q_INVOKABLE void popup(QQmlV4FunctionPtr args); + Q_REVISION(2, 3) Q_INVOKABLE void dismiss(); + +protected: + void componentComplete() override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override; + void keyPressEvent(QKeyEvent *event) override; + +Q_SIGNALS: + void titleChanged(const QString &title); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void countChanged(); + Q_REVISION(2, 3) void cascadeChanged(bool cascade); + Q_REVISION(2, 3) void overlapChanged(); + Q_REVISION(2, 3) void delegateChanged(); + Q_REVISION(2, 3) void currentIndexChanged(); + // 6.5 (Qt 6.5) + Q_REVISION(6, 5) void iconChanged(const QQuickIcon &icon); + +protected: + void timerEvent(QTimerEvent *event) override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickMenu) + Q_DECLARE_PRIVATE(QQuickMenu) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENU_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..057c881ab633f489e326b4405ec6f0f6d2e4ef7f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenu_p_p.h @@ -0,0 +1,151 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENU_P_P_H +#define QQUICKMENU_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQmlComponent; +class QQmlObjectModel; +class QQuickMenuItem; +class QQuickNativeMenuItem; +class QQuickMenuBar; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuPrivate : public QQuickPopupPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickMenu) + + QQuickMenuPrivate(); + + static QQuickMenuPrivate *get(QQuickMenu *menu) + { + return menu->d_func(); + } + + void init(); + + QPlatformMenu *nativeHandle(); + QPlatformMenu *maybeNativeHandle() const; + QQuickMenu *rootMenu() const; + bool useNativeMenu() const; + bool createNativeMenu(); + void removeNativeMenu(); + void syncWithNativeMenu(); + void syncWithUseNativeMenu(); + static void recursivelyDestroyNativeSubMenus(QQuickMenu *menu); + void setNativeMenuVisible(bool visible); + + QQuickItem *itemAt(int index) const; + void insertItem(int index, QQuickItem *item); + void maybeCreateAndInsertNativeItem(int index, QQuickItem *item); + void moveItem(int from, int to); + enum class DestructionPolicy { + Destroy, + DoNotDestroy + }; + void removeItem(int index, QQuickItem *item, + DestructionPolicy destructionPolicy = DestructionPolicy::DoNotDestroy); + void removeNativeItem(int index); + void resetNativeData(); + + static void recursivelyCreateNativeMenuItems(QQuickMenu *menu); + + void printContentModelItems() const; + + QQuickItem *beginCreateItem(); + void completeCreateItem(); + + QQuickItem *createItem(QQuickMenu *menu); + QQuickItem *createItem(QQuickAction *action); + + void resizeItem(QQuickItem *item); + void resizeItems(); + + void itemChildAdded(QQuickItem *item, QQuickItem *child) override; + void itemSiblingOrderChanged(QQuickItem *item) override; + void itemParentChanged(QQuickItem *item, QQuickItem *parent) override; + void itemDestroyed(QQuickItem *item) override; + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange change, const QRectF &diff) override; + + QQuickPopupPositioner *getPositioner() override; + bool prepareEnterTransition() override; + bool prepareExitTransition() override; + bool blockInput(QQuickItem *item, const QPointF &point) const override; + bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp) override; + bool handleReleaseWithoutGrab(const QEventPoint &eventPoint) override; + + void onItemHovered(); + void onItemTriggered(); + void onItemActiveFocusChanged(); + void updateTextPadding(); + + QQuickMenu *currentSubMenu() const; + void setParentMenu(QQuickMenu *parent); + void resolveParentItem(); + + void propagateKeyEvent(QKeyEvent *event); + + void startHoverTimer(); + void stopHoverTimer(); + + void setCurrentIndex(int index, Qt::FocusReason reason); + bool activateNextItem(); + bool activatePreviousItem(); + + QQuickMenuItem *firstEnabledMenuItem() const; + + static void contentData_append(QQmlListProperty *prop, QObject *obj); + static qsizetype contentData_count(QQmlListProperty *prop); + static QObject *contentData_at(QQmlListProperty *prop, qsizetype index); + static void contentData_clear(QQmlListProperty *prop); + + QPalette defaultPalette() const override; + virtual QQuickPopup::PopupType resolvedPopupType() const override; + + bool cascade = false; + bool triedToCreateNativeMenu = false; + int hoverTimer = 0; + int currentIndex = -1; + qreal overlap = 0; + qreal textPadding = 0; + QPointer parentMenu; + QPointer currentItem; + QQuickItem *contentItem = nullptr; // TODO: cleanup + QList contentData; + QQmlObjectModel *contentModel; + QQmlComponent *delegate = nullptr; + QString title; + QQuickIcon icon; + + // For native menu support. + std::unique_ptr handle = nullptr; + QList nativeItems; + QPointer menuBar; + qreal lastDevicePixelRatio = 0; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENU_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ac28a630f55f49ce73baa537fef46002b17185bd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p.h @@ -0,0 +1,80 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUBAR_P_H +#define QQUICKMENUBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickMenu; +class QQuickMenuBarPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuBar : public QQuickContainer +{ + Q_OBJECT + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty menus READ menus NOTIFY menusChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickMenuBar::d_func(), QQmlListProperty contentData READ contentData FINAL) + QML_NAMED_ELEMENT(MenuBar) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickMenuBar(QQuickItem *parent = nullptr); + ~QQuickMenuBar() override; + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + Q_INVOKABLE QQuickMenu *menuAt(int index) const; + Q_INVOKABLE void addMenu(QQuickMenu *menu); + Q_INVOKABLE void insertMenu(int index, QQuickMenu *menu); + Q_INVOKABLE void removeMenu(QQuickMenu *menu); + Q_INVOKABLE QQuickMenu *takeMenu(int index); + +Q_SIGNALS: + void delegateChanged(); + void menusChanged(); + +protected: + bool eventFilter(QObject *object, QEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + + bool isContent(QQuickItem *item) const override; + void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) override; + void itemAdded(int index, QQuickItem *item) override; + void itemMoved(int index, QQuickItem *item) override; + void itemRemoved(int index, QQuickItem *item) override; + + void componentComplete() override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickMenuBar) + Q_DECLARE_PRIVATE(QQuickMenuBar) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..aaed06bfbb2a2c89157d4c2150ab73404b654896 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubar_p_p.h @@ -0,0 +1,101 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUBAR_P_P_H +#define QQUICKMENUBAR_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickMenuBarItem; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuBarPrivate : public QQuickContainerPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickMenuBar) + + static QQuickMenuBarPrivate *get(QQuickMenuBar *menuBar) + { + return menuBar->d_func(); + } + + QQmlListProperty menus(); + QQmlListProperty contentData(); + + QQuickItem *createItemFromDelegate(); + QQuickMenuBarItem *createMenuBarItem(QQuickMenu *menu); + + void openCurrentMenu(); + void closeCurrentMenu(); + void activateMenuItem(int index); + + void activateItem(QQuickMenuBarItem *item); + void activateNextItem(); + void activatePreviousItem(); + + void onItemHovered(); + void onItemTriggered(); + void onMenuAboutToHide(QQuickMenu *menu); + + void insertMenu(int index, QQuickMenu *menu, QQuickMenuBarItem *delegateItem); + QQuickMenu *takeMenu(int index); + void insertNativeMenu(QQuickMenu *menu); + void removeNativeMenu(QQuickMenu *menu); + void syncMenuBarItemVisibilty(QQuickMenuBarItem *menuBarItem); + + QWindow *window() const; + int menuIndex(QQuickMenu *menu) const; + + QPlatformMenuBar *nativeHandle() const; + bool useNativeMenuBar() const; + bool useNativeMenu(const QQuickMenu *menu) const; + void syncNativeMenuBarVisible(); + void createNativeMenuBar(); + void removeNativeMenuBar(); + + qreal getContentWidth() const override; + qreal getContentHeight() const override; + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + + static void contentData_append(QQmlListProperty *prop, QObject *obj); + + static void menus_append(QQmlListProperty *prop, QQuickMenu *obj); + static qsizetype menus_count(QQmlListProperty *prop); + static QQuickMenu *menus_at(QQmlListProperty *prop, qsizetype index); + static void menus_clear(QQmlListProperty *prop); + + QPalette defaultPalette() const override; + + bool closingCurrentMenu = false; + bool altPressed = false; + bool currentMenuOpen = false; + QQmlComponent *delegate = nullptr; + QPointer currentItem; + QPointer windowContentItem; + +private: + std::unique_ptr handle; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUBAR_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..28e0d735b5969d6e7b80a75c6851eb7ff35d491a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p.h @@ -0,0 +1,74 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUBARITEM_P_H +#define QQUICKMENUBARITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickMenu; +class QQuickMenuBar; +class QQuickMenuBarItemPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuBarItem : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(QQuickMenuBar *menuBar READ menuBar NOTIFY menuBarChanged FINAL) + Q_PROPERTY(QQuickMenu *menu READ menu WRITE setMenu NOTIFY menuChanged FINAL) + Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL) + QML_NAMED_ELEMENT(MenuBarItem) + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickMenuBarItem(QQuickItem *parent = nullptr); + + QQuickMenuBar *menuBar() const; + + QQuickMenu *menu() const; + void setMenu(QQuickMenu *menu); + + bool isHighlighted() const; + void setHighlighted(bool highlighted); + +Q_SIGNALS: + void triggered(); + void menuBarChanged(); + void menuChanged(); + void highlightedChanged(); + +protected: + bool event(QEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickMenuBarItem) + Q_DECLARE_PRIVATE(QQuickMenuBarItem) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUBARITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..547165e64709070a1987f32e0aee3907988eb23f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenubaritem_p_p.h @@ -0,0 +1,50 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUBARITEM_P_P_H +#define QQUICKMENUBARITEM_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMenu; +class QQuickMenuBar; + +class QQuickMenuBarItemPrivate : public QQuickAbstractButtonPrivate +{ + Q_DECLARE_PUBLIC(QQuickMenuBarItem) + +public: + static QQuickMenuBarItemPrivate *get(QQuickMenuBarItem *item) + { + return item->d_func(); + } + + void setMenuBar(QQuickMenuBar *menuBar); + + bool handlePress(const QPointF &point, ulong timestamp) override; + bool handleRelease(const QPointF &point, ulong timestamp) override; + + QPalette defaultPalette() const override; + + bool highlighted = false; + QQuickMenu *menu = nullptr; + QQuickMenuBar *menuBar = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUBARITEM_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..242fcdf0741a53782d57371569623093513ef4a8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p.h @@ -0,0 +1,89 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUITEM_P_H +#define QQUICKMENUITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_REQUIRE_CONFIG(qml_object_model); + +QT_BEGIN_NAMESPACE + +class QQuickMenu; +class QQuickMenuItemPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuItem : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(bool highlighted READ isHighlighted WRITE setHighlighted NOTIFY highlightedChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(QQuickItem *arrow READ arrow WRITE setArrow NOTIFY arrowChanged FINAL REVISION(2, 3)) + Q_PROPERTY(QQuickMenu *menu READ menu NOTIFY menuChanged FINAL REVISION(2, 3)) + Q_PROPERTY(QQuickMenu *subMenu READ subMenu NOTIFY subMenuChanged FINAL REVISION(2, 3)) + Q_PROPERTY(qreal implicitTextPadding READ implicitTextPadding WRITE setImplicitTextPadding NOTIFY implicitTextPaddingChanged REVISION(6, 8)) + Q_PROPERTY(qreal textPadding READ textPadding NOTIFY textPaddingChanged REVISION(6, 8)) + Q_CLASSINFO("DeferredPropertyNames", "arrow,background,contentItem,indicator") + QML_NAMED_ELEMENT(MenuItem) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickMenuItem(QQuickItem *parent = nullptr); + + bool isHighlighted() const; + void setHighlighted(bool highlighted); + + // 2.3 (Qt 5.10) + QQuickItem *arrow() const; + void setArrow(QQuickItem *arrow); + + QQuickMenu *menu() const; + QQuickMenu *subMenu() const; + + qreal textPadding() const; + qreal implicitTextPadding() const; + void setImplicitTextPadding(qreal newImplicitTextPadding); + +Q_SIGNALS: + void triggered(); + void highlightedChanged(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void arrowChanged(); + Q_REVISION(2, 3) void menuChanged(); + Q_REVISION(2, 3) void subMenuChanged(); + Q_REVISION(6, 8) void implicitTextPaddingChanged(); + Q_REVISION(6, 8) void textPaddingChanged(); + +protected: + void componentComplete() override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickMenuItem) + Q_DECLARE_PRIVATE(QQuickMenuItem) +}; + +#ifndef QT_NO_DEBUG_STREAM +Q_QUICKTEMPLATES2_EXPORT QDebug operator<<(QDebug debug, const QQuickMenuItem *menuItem); +#endif + +QT_END_NAMESPACE + +#endif // QQUICKMENUITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b4d6e6bf95dfe6ec0da3d31e52fd9634e7fab7d9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuitem_p_p.h @@ -0,0 +1,56 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUITEM_P_P_H +#define QQUICKMENUITEM_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMenu; + +class QQuickMenuItemPrivate : public QQuickAbstractButtonPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickMenuItem) + + static QQuickMenuItemPrivate *get(QQuickMenuItem *item) + { + return item->d_func(); + } + + void setMenu(QQuickMenu *menu); + void setSubMenu(QQuickMenu *subMenu); + + void updateEnabled(); + + void cancelArrow(); + void executeArrow(bool complete = false); + + bool acceptKeyClick(Qt::Key key) const override; + + QPalette defaultPalette() const override; + + bool highlighted = false; + QQuickDeferredPointer arrow; + QQuickMenu *menu = nullptr; + QQuickMenu *subMenu = nullptr; + qreal implicitTextPadding; +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUITEM_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuseparator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuseparator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..01f60658be77d42ee425ed48abc80bcc619bea3f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmenuseparator_p.h @@ -0,0 +1,47 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMENUSEPARATOR_P_H +#define QQUICKMENUSEPARATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMenuSeparator; + +class Q_QUICKTEMPLATES2_EXPORT QQuickMenuSeparator : public QQuickControl +{ + Q_OBJECT + QML_NAMED_ELEMENT(MenuSeparator) + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickMenuSeparator(QQuickItem *parent = nullptr); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickMenuSeparator) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMENUSEPARATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthgrid_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthgrid_p.h new file mode 100644 index 0000000000000000000000000000000000000000..16293d08f7822b004776344e2c9a16fe44038a12 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthgrid_p.h @@ -0,0 +1,82 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMONTHGRID_P_H +#define QQUICKMONTHGRID_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickMonthGridPrivate; + +class QQuickMonthGrid : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL) + Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL) + Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL) + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + QML_NAMED_ELEMENT(AbstractMonthGrid) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickMonthGrid(QQuickItem *parent = nullptr); + + int month() const; + void setMonth(int month); + + int year() const; + void setYear(int year); + + QVariant source() const; + void setSource(const QVariant &source); + + QString title() const; + void setTitle(const QString &title); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + +Q_SIGNALS: + void monthChanged(); + void yearChanged(); + void sourceChanged(); + void titleChanged(); + void delegateChanged(); + + void pressed(QDate date); + void released(QDate date); + void clicked(QDate date); + void pressAndHold(QDate date); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override; + void updatePolish() override; + + void timerEvent(QTimerEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickMonthGrid) + Q_DECLARE_PRIVATE(QQuickMonthGrid) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMONTHGRID_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthmodel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthmodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..680722690164ab60b73cbcf97ac9005d6cf6b64f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickmonthmodel_p.h @@ -0,0 +1,81 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKMONTHMODEL_P_H +#define QQUICKMONTHMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickMonthModelPrivate; + +class QQuickMonthModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL) + Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL) + Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL) + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged FINAL) + Q_PROPERTY(int count READ rowCount CONSTANT FINAL) + +public: + explicit QQuickMonthModel(QObject *parent = nullptr); + + int month() const; + void setMonth(int month); + + int year() const; + void setYear(int year); + + QLocale locale() const; + void setLocale(const QLocale &locale); + + QString title() const; + void setTitle(const QString &title); + + Q_INVOKABLE QDate dateAt(int index) const; + Q_INVOKABLE int indexOf(QDate date) const; + + enum { + DateRole = Qt::UserRole + 1, + DayRole, + TodayRole, + WeekNumberRole, + MonthRole, + YearRole + }; + + QHash roleNames() const override; + QVariant data(const QModelIndex &index, int role) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + +Q_SIGNALS: + void monthChanged(); + void yearChanged(); + void localeChanged(); + void titleChanged(); + +private: + Q_DISABLE_COPY(QQuickMonthModel) + Q_DECLARE_PRIVATE(QQuickMonthModel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKMONTHMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeicon_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeicon_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2ae04ef076f3478b044c3ae260e8003fe465c577 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeicon_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKNATIVEICON_P_H +#define QQUICKNATIVEICON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QObject; + +class QQuickNativeIcon +{ + Q_GADGET + QML_ANONYMOUS + Q_PROPERTY(QUrl source READ source WRITE setSource FINAL) + Q_PROPERTY(QString name READ name WRITE setName FINAL) + Q_PROPERTY(bool mask READ isMask WRITE setMask FINAL) + +public: + QUrl source() const; + void setSource(const QUrl &source); + + QString name() const; + void setName(const QString &name); + + bool isMask() const; + void setMask(bool mask); + + bool operator==(const QQuickNativeIcon &other) const; + bool operator!=(const QQuickNativeIcon &other) const; + +private: + bool m_mask = false; + QUrl m_source; + QString m_name; +}; + +QT_END_NAMESPACE + +#endif // QQUICKNATIVEICON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeiconloader_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeiconloader_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ea589b322933ce5dac5526e81c5f554fcda04e13 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativeiconloader_p.h @@ -0,0 +1,54 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKNATIVEICONLOADER_P_H +#define QQUICKNATIVEICONLOADER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +#include "qquicknativeicon_p.h" + +QT_BEGIN_NAMESPACE + +class QObject; + +class QQuickNativeIconLoader : public QQuickPixmap +{ +public: + QQuickNativeIconLoader(int slot, QObject *parent); + + bool isEnabled() const; + void setEnabled(bool enabled); + + QIcon toQIcon() const; + + QQuickIcon icon() const; + void setIcon(const QQuickIcon &icon); + +private: + void loadIcon(); + + QObject *m_parent; + int m_slot; + bool m_enabled; + QQuickIcon m_icon; +}; + +QT_END_NAMESPACE + +#endif // QQUICKNATIVEICONLOADER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativemenuitem_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativemenuitem_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3bcaa831335ebd4fcfd16fe6b7575e5b55aef59a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicknativemenuitem_p.h @@ -0,0 +1,81 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKNATIVEMENUITEM_P_H +#define QQUICKNATIVEMENUITEM_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickAction; +class QQuickNativeIconLoader; +class QQuickMenu; +class QQuickMenuSeparator; +class QPlatformMenuItem; + +class Q_QUICKTEMPLATES2_EXPORT QQuickNativeMenuItem : public QObject +{ + Q_OBJECT + +public: + static QQuickNativeMenuItem *createFromNonNativeItem( + QQuickMenu *parentMenu, QQuickItem *nonNativeItem); + ~QQuickNativeMenuItem(); + + QQuickAction *action() const; + QQuickMenu *subMenu() const; + QQuickMenuSeparator *separator() const; + QPlatformMenuItem *handle() const; + void sync(); + + QQuickIcon effectiveIcon() const; + QQuickNativeIconLoader *iconLoader() const; + void reloadIcon(); + + QString debugText() const; + +private Q_SLOTS: + void updateIcon(); + +private: + enum class Type { + Unknown, + // It's an Action or a MenuItem with an Action. + Action, + // It's a MenuItem without an Action. + MenuItem, + Separator, + SubMenu + }; + + explicit QQuickNativeMenuItem(QQuickMenu *parentMenu, QQuickItem *nonNativeItem, Type type); + + void addShortcut(); + void removeShortcut(); + + QQuickMenu *m_parentMenu = nullptr; + QQuickItem *m_nonNativeItem = nullptr; + Type m_type = Type::Unknown; + mutable QQuickNativeIconLoader *m_iconLoader = nullptr; + std::unique_ptr m_handle = nullptr; + int m_shortcutId = -1; + bool m_syncing = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKNATIVEMENUITEM_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5867025d4ae2ad3406d56ca69739489b4376fd47 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p.h @@ -0,0 +1,111 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKOVERLAY_P_H +#define QQUICKOVERLAY_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickOverlayPrivate; +class QQuickOverlayAttached; +class QQuickOverlayAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickOverlay : public QQuickItem +{ + Q_OBJECT + Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL) + Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL) + QML_NAMED_ELEMENT(Overlay) + QML_ATTACHED(QQuickOverlayAttached) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 3) + +public: + explicit QQuickOverlay(QQuickItem *parent = nullptr); + ~QQuickOverlay(); + + QQmlComponent *modal() const; + void setModal(QQmlComponent *modal); + + QQmlComponent *modeless() const; + void setModeless(QQmlComponent *modeless); + + static QQuickOverlay *overlay(QQuickWindow *window); + + static QQuickOverlayAttached *qmlAttachedProperties(QObject *object); + +Q_SIGNALS: + void modalChanged(); + void modelessChanged(); + void pressed(); + void released(); + +protected: + void itemChange(ItemChange change, const ItemChangeData &data) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + bool eventFilter(QObject *object, QEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickOverlay) + Q_DECLARE_PRIVATE(QQuickOverlay) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickOverlayAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickOverlay *overlay READ overlay NOTIFY overlayChanged FINAL) + Q_PROPERTY(QQmlComponent *modal READ modal WRITE setModal NOTIFY modalChanged FINAL) + Q_PROPERTY(QQmlComponent *modeless READ modeless WRITE setModeless NOTIFY modelessChanged FINAL) + +public: + explicit QQuickOverlayAttached(QObject *parent = nullptr); + + QQuickOverlay *overlay() const; + + QQmlComponent *modal() const; + void setModal(QQmlComponent *modal); + + QQmlComponent *modeless() const; + void setModeless(QQmlComponent *modeless); + +Q_SIGNALS: + void overlayChanged(); + void modalChanged(); + void modelessChanged(); + void pressed(); + void released(); + +private: + Q_DISABLE_COPY(QQuickOverlayAttached) + Q_DECLARE_PRIVATE(QQuickOverlayAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKOVERLAY_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..779bb06ccacd0d4f9862f45c36214d0cd77f2694 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickoverlay_p_p.h @@ -0,0 +1,75 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKOVERLAY_P_P_H +#define QQUICKOVERLAY_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickPopup; + +class Q_AUTOTEST_EXPORT QQuickOverlayPrivate : public QQuickItemPrivate, + public QQuickItemChangeListener +{ +public: + Q_DECLARE_PUBLIC(QQuickOverlay) + + static QQuickOverlayPrivate *get(QQuickOverlay *overlay) + { + return overlay->d_func(); + } + + bool startDrag(QEvent *event, const QPointF &pos); + bool handlePress(QQuickItem *source, QEvent *event, QQuickPopup *target); + bool handleMove(QQuickItem *source, QEvent *event, QQuickPopup *target); + bool handleRelease(QQuickItem *source, QEvent *event, QQuickPopup *target); + + bool handleMouseEvent(QQuickItem *source, QMouseEvent *event, QQuickPopup *target = nullptr); + bool handleHoverEvent(QQuickItem *source, QHoverEvent *event, QQuickPopup *target = nullptr); +#if QT_CONFIG(quicktemplates2_multitouch) + bool handleTouchEvent(QQuickItem *source, QTouchEvent *event, QQuickPopup *target = nullptr); +#endif + + void addPopup(QQuickPopup *popup); + void removePopup(QQuickPopup *popup); + void setMouseGrabberPopup(QQuickPopup *popup); + + QList stackingOrderPopups() const; + QList stackingOrderDrawers() const; + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemRotationChanged(QQuickItem *item) override; + + void updateGeometry(); + + QQmlComponent *modal = nullptr; + QQmlComponent *modeless = nullptr; + QList allPopups; + // Store drawers as QQuickPopup instead of QQuickDrawer because they're no longer + // QQuickDrawer by the time removePopup is called. + QList allDrawers; + QPointer mouseGrabberPopup; + QPointer lastActiveFocusItem; +}; + +QT_END_NAMESPACE + +#endif // QQUICKOVERLAY_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..da950cc180abc52ed32626f0a0d90abfd917476b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p.h @@ -0,0 +1,89 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPAGE_P_H +#define QQUICKPAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPagePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPage : public QQuickPane +{ + Q_OBJECT + Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged RESET resetTitle FINAL) + Q_PROPERTY(QQuickItem *header READ header WRITE setHeader NOTIFY headerChanged FINAL) + Q_PROPERTY(QQuickItem *footer READ footer WRITE setFooter NOTIFY footerChanged FINAL) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitHeaderWidth READ implicitHeaderWidth NOTIFY implicitHeaderWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitHeaderHeight READ implicitHeaderHeight NOTIFY implicitHeaderHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitFooterWidth READ implicitFooterWidth NOTIFY implicitFooterWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitFooterHeight READ implicitFooterHeight NOTIFY implicitFooterHeightChanged FINAL REVISION(2, 5)) + QML_NAMED_ELEMENT(Page) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickPage(QQuickItem *parent = nullptr); + ~QQuickPage(); + + QString title() const; + void setTitle(const QString &title); + void resetTitle(); + + QQuickItem *header() const; + void setHeader(QQuickItem *header); + + QQuickItem *footer() const; + void setFooter(QQuickItem *footer); + + // 2.5 (Qt 5.12) + qreal implicitHeaderWidth() const; + qreal implicitHeaderHeight() const; + + qreal implicitFooterWidth() const; + qreal implicitFooterHeight() const; + +Q_SIGNALS: + void titleChanged(); + void headerChanged(); + void footerChanged(); + // 2.5 (Qt 5.12) + void implicitHeaderWidthChanged(); + void implicitHeaderHeightChanged(); + void implicitFooterWidthChanged(); + void implicitFooterHeightChanged(); + +protected: + QQuickPage(QQuickPagePrivate &dd, QQuickItem *parent); + + void componentComplete() override; + + void spacingChange(qreal newSpacing, qreal oldSpacing) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickPage) + Q_DECLARE_PRIVATE(QQuickPage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPAGE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..76966b4de1a440c4240c091dda21f2ceea866227 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpage_p_p.h @@ -0,0 +1,46 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPAGE_P_P_H +#define QQUICKPAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickPane; + +class QQuickPagePrivate : public QQuickPanePrivate +{ + Q_DECLARE_PUBLIC(QQuickPage) + +public: + void relayout(); + void resizeContent() override; + + void itemVisibilityChanged(QQuickItem *item) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF & diff) override; + void itemDestroyed(QQuickItem *item) override; + + QString title; + QQuickItem *header = nullptr; + QQuickItem *footer = nullptr; + bool emittingImplicitSizeChangedSignals = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpageindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpageindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d68256b8dd98abc82749fcdd711e5452fd742825 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpageindicator_p.h @@ -0,0 +1,75 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPAGEINDICATOR_P_H +#define QQUICKPAGEINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickPageIndicatorPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPageIndicator : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int count READ count WRITE setCount NOTIFY countChanged FINAL) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + QML_NAMED_ELEMENT(PageIndicator) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickPageIndicator(QQuickItem *parent = nullptr); + ~QQuickPageIndicator() override; + + int count() const; + void setCount(int count); + + int currentIndex() const; + void setCurrentIndex(int index); + + bool isInteractive() const; + void setInteractive(bool interactive); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + +Q_SIGNALS: + void countChanged(); + void currentIndexChanged(); + void interactiveChanged(); + void delegateChanged(); + +protected: + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickPageIndicator) + Q_DECLARE_PRIVATE(QQuickPageIndicator) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPAGEINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p.h new file mode 100644 index 0000000000000000000000000000000000000000..66e3bda7fa68efe64d3a4235809cf34a3858766f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPANE_P_H +#define QQUICKPANE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPanePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPane : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth RESET resetContentWidth NOTIFY contentWidthChanged FINAL) + Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight RESET resetContentHeight NOTIFY contentHeightChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty contentData READ contentData FINAL) + Q_PRIVATE_PROPERTY(QQuickPane::d_func(), QQmlListProperty contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL) + Q_CLASSINFO("DefaultProperty", "contentData") + QML_NAMED_ELEMENT(Pane) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickPane(QQuickItem *parent = nullptr); + ~QQuickPane(); + + qreal contentWidth() const; + void setContentWidth(qreal width); + void resetContentWidth(); + + qreal contentHeight() const; + void setContentHeight(qreal height); + void resetContentHeight(); + +Q_SIGNALS: + void contentWidthChanged(); + void contentHeightChanged(); + void contentChildrenChanged(); + +protected: + QQuickPane(QQuickPanePrivate &dd, QQuickItem *parent); + + void componentComplete() override; + + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + virtual void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize); + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickPane) + Q_DECLARE_PRIVATE(QQuickPane) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPANE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..450e0144e4d31e12e7331ecfc6202dca5a0ee837 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpane_p_p.h @@ -0,0 +1,61 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPANE_P_P_H +#define QQUICKPANE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickPane; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPanePrivate : public QQuickControlPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickPane) + + void init(); + + virtual QQmlListProperty contentData(); + virtual QQmlListProperty contentChildren(); + virtual QList contentChildItems() const; + virtual QQuickItem *getFirstChild() const; + + QQuickItem *getContentItem() override; + + qreal getContentWidth() const override; + qreal getContentHeight() const override; + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + void contentChildrenChange(); + + void updateContentWidth(); + void updateContentHeight(); + + bool handlePress(const QPointF &point, ulong timestamp) override; + + bool hasContentWidth = false; + bool hasContentHeight = false; + qreal contentWidth = 0; + qreal contentHeight = 0; + QQuickItem *firstChild = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPANE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a2bc1ea2710ae159b00b5d27e1c626ff50d89209 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p.h @@ -0,0 +1,462 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUP_P_H +#define QQUICKPOPUP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if QT_CONFIG(accessibility) +#include +#endif + +QT_BEGIN_NAMESPACE + +class QQuickWindow; +class QQuickPopupAnchors; +class QQuickPopupPrivate; +class QQuickTransition; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopup : public QObject, public QQmlParserStatus +{ + Q_OBJECT + Q_INTERFACES(QQmlParserStatus) + Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged FINAL) + Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged FINAL) + Q_PROPERTY(qreal z READ z WRITE setZ RESET resetZ NOTIFY zChanged FINAL) + Q_PROPERTY(qreal width READ width WRITE setWidth RESET resetWidth NOTIFY widthChanged FINAL) + Q_PROPERTY(qreal height READ height WRITE setHeight RESET resetHeight NOTIFY heightChanged FINAL) + Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged FINAL) + Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged FINAL) + Q_PROPERTY(qreal contentWidth READ contentWidth WRITE setContentWidth NOTIFY contentWidthChanged FINAL) + Q_PROPERTY(qreal contentHeight READ contentHeight WRITE setContentHeight NOTIFY contentHeightChanged FINAL) + Q_PROPERTY(qreal availableWidth READ availableWidth NOTIFY availableWidthChanged FINAL) + Q_PROPERTY(qreal availableHeight READ availableHeight NOTIFY availableHeightChanged FINAL) + Q_PROPERTY(qreal margins READ margins WRITE setMargins RESET resetMargins NOTIFY marginsChanged FINAL) + Q_PROPERTY(qreal topMargin READ topMargin WRITE setTopMargin RESET resetTopMargin NOTIFY topMarginChanged FINAL) + Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin RESET resetLeftMargin NOTIFY leftMarginChanged FINAL) + Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin RESET resetRightMargin NOTIFY rightMarginChanged FINAL) + Q_PROPERTY(qreal bottomMargin READ bottomMargin WRITE setBottomMargin RESET resetBottomMargin NOTIFY bottomMarginChanged FINAL) + Q_PROPERTY(qreal padding READ padding WRITE setPadding RESET resetPadding NOTIFY paddingChanged FINAL) + Q_PROPERTY(qreal topPadding READ topPadding WRITE setTopPadding RESET resetTopPadding NOTIFY topPaddingChanged FINAL) + Q_PROPERTY(qreal leftPadding READ leftPadding WRITE setLeftPadding RESET resetLeftPadding NOTIFY leftPaddingChanged FINAL) + Q_PROPERTY(qreal rightPadding READ rightPadding WRITE setRightPadding RESET resetRightPadding NOTIFY rightPaddingChanged FINAL) + Q_PROPERTY(qreal bottomPadding READ bottomPadding WRITE setBottomPadding RESET resetBottomPadding NOTIFY bottomPaddingChanged FINAL) + Q_PROPERTY(QLocale locale READ locale WRITE setLocale RESET resetLocale NOTIFY localeChanged FINAL) + Q_PROPERTY(QFont font READ font WRITE setFont RESET resetFont NOTIFY fontChanged FINAL) + Q_PROPERTY(QQuickItem *parent READ parentItem WRITE setParentItem RESET resetParentItem NOTIFY parentChanged FINAL) + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QQuickItem *contentItem READ contentItem WRITE setContentItem NOTIFY contentItemChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQmlListProperty contentData READ contentData) + Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQmlListProperty contentChildren READ contentChildren NOTIFY contentChildrenChanged FINAL) + Q_PROPERTY(bool clip READ clip WRITE setClip NOTIFY clipChanged FINAL) + Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged FINAL) + Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged FINAL) + Q_PROPERTY(bool modal READ isModal WRITE setModal NOTIFY modalChanged FINAL) + Q_PROPERTY(bool dim READ dim WRITE setDim RESET resetDim NOTIFY dimChanged FINAL) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) + Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged FINAL) + Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged FINAL) + Q_PROPERTY(ClosePolicy closePolicy READ closePolicy WRITE setClosePolicy RESET resetClosePolicy NOTIFY closePolicyChanged FINAL) + Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin FINAL) + Q_PROPERTY(QQuickTransition *enter READ enter WRITE setEnter NOTIFY enterChanged FINAL) + Q_PROPERTY(QQuickTransition *exit READ exit WRITE setExit NOTIFY exitChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(qreal spacing READ spacing WRITE setSpacing RESET resetSpacing NOTIFY spacingChanged FINAL REVISION(2, 1)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool opened READ isOpened NOTIFY openedChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool mirrored READ isMirrored NOTIFY mirroredChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL REVISION(2, 3)) + Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPalette *palette READ palette WRITE setPalette RESET resetPalette NOTIFY paletteChanged REVISION(2, 3)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal horizontalPadding READ horizontalPadding WRITE setHorizontalPadding RESET resetHorizontalPadding NOTIFY horizontalPaddingChanged FINAL) + Q_PROPERTY(qreal verticalPadding READ verticalPadding WRITE setVerticalPadding RESET resetVerticalPadding NOTIFY verticalPaddingChanged FINAL) + Q_PRIVATE_PROPERTY(QQuickPopup::d_func(), QQuickPopupAnchors *anchors READ getAnchors DESIGNABLE false CONSTANT FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitContentWidth READ implicitContentWidth NOTIFY implicitContentWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitContentHeight READ implicitContentHeight NOTIFY implicitContentHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(PopupType popupType READ popupType WRITE setPopupType NOTIFY popupTypeChanged FINAL REVISION(6, 8)) + Q_CLASSINFO("DeferredPropertyNames", "background,contentItem") + Q_CLASSINFO("DefaultProperty", "contentData") + QML_NAMED_ELEMENT(Popup) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickPopup(QObject *parent = nullptr); + ~QQuickPopup(); + + qreal x() const; + void setX(qreal x); + + qreal y() const; + void setY(qreal y); + + QPointF position() const; + void setPosition(const QPointF &pos); + + qreal z() const; + void setZ(qreal z); + void resetZ(); + + qreal width() const; + void setWidth(qreal width); + void resetWidth(); + + qreal height() const; + void setHeight(qreal height); + void resetHeight(); + + qreal implicitWidth() const; + void setImplicitWidth(qreal width); + + qreal implicitHeight() const; + void setImplicitHeight(qreal height); + + qreal contentWidth() const; + void setContentWidth(qreal width); + + qreal contentHeight() const; + void setContentHeight(qreal height); + + qreal availableWidth() const; + qreal availableHeight() const; + + qreal margins() const; + void setMargins(qreal margins); + void resetMargins(); + + qreal topMargin() const; + void setTopMargin(qreal margin); + void resetTopMargin(); + + qreal leftMargin() const; + void setLeftMargin(qreal margin); + void resetLeftMargin(); + + qreal rightMargin() const; + void setRightMargin(qreal margin); + void resetRightMargin(); + + qreal bottomMargin() const; + void setBottomMargin(qreal margin); + void resetBottomMargin(); + + qreal padding() const; + void setPadding(qreal padding); + void resetPadding(); + + qreal topPadding() const; + void setTopPadding(qreal padding); + void resetTopPadding(); + + qreal leftPadding() const; + void setLeftPadding(qreal padding); + void resetLeftPadding(); + + qreal rightPadding() const; + void setRightPadding(qreal padding); + void resetRightPadding(); + + qreal bottomPadding() const; + void setBottomPadding(qreal padding); + void resetBottomPadding(); + + QLocale locale() const; + void setLocale(const QLocale &locale); + void resetLocale(); + + QFont font() const; + void setFont(const QFont &font); + void resetFont(); + + QQuickWindow *window() const; + QQuickItem *popupItem() const; + + QQuickItem *parentItem() const; + void setParentItem(QQuickItem *parent); + void resetParentItem(); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + QQuickItem *contentItem() const; + void setContentItem(QQuickItem *item); + + bool clip() const; + void setClip(bool clip); + + bool hasFocus() const; + void setFocus(bool focus); + + bool hasActiveFocus() const; + + bool isModal() const; + void setModal(bool modal); + + bool dim() const; + void setDim(bool dim); + void resetDim(); + + virtual bool isVisible() const; + virtual void setVisible(bool visible); + + qreal opacity() const; + virtual void setOpacity(qreal opacity); + + qreal scale() const; + void setScale(qreal scale); + + enum ClosePolicyFlag { + NoAutoClose = 0x00, + CloseOnPressOutside = 0x01, + CloseOnPressOutsideParent = 0x02, + CloseOnReleaseOutside = 0x04, + CloseOnReleaseOutsideParent = 0x08, + CloseOnEscape = 0x10 + }; + Q_DECLARE_FLAGS(ClosePolicy, ClosePolicyFlag) + Q_FLAG(ClosePolicy) + + ClosePolicy closePolicy() const; + void setClosePolicy(ClosePolicy policy); + void resetClosePolicy(); + + // keep in sync with Item.TransformOrigin + enum TransformOrigin { + TopLeft, Top, TopRight, + Left, Center, Right, + BottomLeft, Bottom, BottomRight + }; + Q_ENUM(TransformOrigin) + + TransformOrigin transformOrigin() const; + void setTransformOrigin(TransformOrigin); + + QQuickTransition *enter() const; + void setEnter(QQuickTransition *transition); + + QQuickTransition *exit() const; + void setExit(QQuickTransition *transition); + + bool filtersChildMouseEvents() const; + void setFiltersChildMouseEvents(bool filter); + + Q_INVOKABLE void forceActiveFocus(Qt::FocusReason reason = Qt::OtherFocusReason); + + // 2.1 (Qt 5.8) + qreal spacing() const; + void setSpacing(qreal spacing); + void resetSpacing(); + + // 2.3 (Qt 5.10) + bool isOpened() const; + bool isMirrored() const; + + bool isEnabled() const; + void setEnabled(bool enabled); + + // 2.5 (Qt 5.12) + qreal horizontalPadding() const; + void setHorizontalPadding(qreal padding); + void resetHorizontalPadding(); + + qreal verticalPadding() const; + void setVerticalPadding(qreal padding); + void resetVerticalPadding(); + + qreal implicitContentWidth() const; + qreal implicitContentHeight() const; + + qreal implicitBackgroundWidth() const; + qreal implicitBackgroundHeight() const; + + qreal topInset() const; + void setTopInset(qreal inset); + void resetTopInset(); + + qreal leftInset() const; + void setLeftInset(qreal inset); + void resetLeftInset(); + + qreal rightInset() const; + void setRightInset(qreal inset); + void resetRightInset(); + + qreal bottomInset() const; + void setBottomInset(qreal inset); + void resetBottomInset(); + + enum PopupType { + Item, + Window, + Native + }; + Q_ENUM(PopupType) + + PopupType popupType() const; + void setPopupType(PopupType); + +public Q_SLOTS: + void open(); + void close(); + +Q_SIGNALS: + void opened(); + void closed(); + void aboutToShow(); + void aboutToHide(); + void xChanged(); + void yChanged(); + void zChanged(); + void widthChanged(); + void heightChanged(); + void implicitWidthChanged(); + void implicitHeightChanged(); + void contentWidthChanged(); + void contentHeightChanged(); + void availableWidthChanged(); + void availableHeightChanged(); + void marginsChanged(); + void topMarginChanged(); + void leftMarginChanged(); + void rightMarginChanged(); + void bottomMarginChanged(); + void paddingChanged(); + void topPaddingChanged(); + void leftPaddingChanged(); + void rightPaddingChanged(); + void bottomPaddingChanged(); + void fontChanged(); + void localeChanged(); + void parentChanged(); + void backgroundChanged(); + void contentItemChanged(); + void contentChildrenChanged(); + void clipChanged(); + void focusChanged(); + void activeFocusChanged(); + void modalChanged(); + void dimChanged(); + void visibleChanged(); + void opacityChanged(); + void scaleChanged(); + void closePolicyChanged(); + void enterChanged(); + void exitChanged(); + void windowChanged(QQuickWindow *window); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void spacingChanged(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void openedChanged(); + Q_REVISION(2, 3) void mirroredChanged(); + Q_REVISION(2, 3) void enabledChanged(); + Q_REVISION(2, 3) void paletteChanged(); + Q_REVISION(2, 3) void paletteCreated(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void horizontalPaddingChanged(); + Q_REVISION(2, 5) void verticalPaddingChanged(); + Q_REVISION(2, 5) void implicitContentWidthChanged(); + Q_REVISION(2, 5) void implicitContentHeightChanged(); + Q_REVISION(2, 5) void implicitBackgroundWidthChanged(); + Q_REVISION(2, 5) void implicitBackgroundHeightChanged(); + Q_REVISION(2, 5) void topInsetChanged(); + Q_REVISION(2, 5) void leftInsetChanged(); + Q_REVISION(2, 5) void rightInsetChanged(); + Q_REVISION(2, 5) void bottomInsetChanged(); + Q_REVISION(6, 8) void popupTypeChanged(); + +protected: + QQuickPopup(QQuickPopupPrivate &dd, QObject *parent); + + void classBegin() override; + void componentComplete() override; + bool isComponentComplete() const; + + virtual bool childMouseEventFilter(QQuickItem *child, QEvent *event); + virtual void focusInEvent(QFocusEvent *event); + virtual void focusOutEvent(QFocusEvent *event); + virtual void keyPressEvent(QKeyEvent *event); + virtual void keyReleaseEvent(QKeyEvent *event); + virtual void mousePressEvent(QMouseEvent *event); + virtual void mouseMoveEvent(QMouseEvent *event); + virtual void mouseReleaseEvent(QMouseEvent *event); + virtual void mouseDoubleClickEvent(QMouseEvent *event); + virtual void mouseUngrabEvent(); + virtual bool overlayEvent(QQuickItem *item, QEvent *event); +#if QT_CONFIG(quicktemplates2_multitouch) + virtual void touchEvent(QTouchEvent *event); + virtual void touchUngrabEvent(); +#endif +#if QT_CONFIG(wheelevent) + virtual void wheelEvent(QWheelEvent *event); +#endif + + virtual void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem); + virtual void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize); + virtual void fontChange(const QFont &newFont, const QFont &oldFont); + virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry); + virtual void localeChange(const QLocale &newLocale, const QLocale &oldLocale); + virtual void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data); + virtual void marginsChange(const QMarginsF &newMargins, const QMarginsF &oldMargins); + virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding); + virtual void spacingChange(qreal newSpacing, qreal oldSpacing); + virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset); + + virtual QFont defaultFont() const; + +#if QT_CONFIG(accessibility) + QAccessible::Role effectiveAccessibleRole() const; +private: + virtual QAccessible::Role accessibleRole() const; +protected: + virtual void accessibilityActiveChanged(bool active); +#endif + + QString accessibleName() const; + void maybeSetAccessibleName(const QString &name); + + QVariant accessibleProperty(const char *propertyName); + bool setAccessibleProperty(const char *propertyName, const QVariant &value); + +private: + QQuickItem *findParentItem() const; + + Q_DISABLE_COPY(QQuickPopup) + Q_DECLARE_PRIVATE(QQuickPopup) + friend class QQuickPopupWindow; + friend class QQuickPopupItem; + friend class QQuickOverlay; + friend class QQuickOverlayPrivate; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QQuickPopup::ClosePolicy) + +QT_END_NAMESPACE + +#endif // QQUICKPOPUP_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..36d8018aafe9b3f62dae4a8194a6db619c13b839 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopup_p_p.h @@ -0,0 +1,209 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUP_P_P_H +#define QQUICKPOPUP_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTransition; +class QQuickTransitionManager; +class QQuickPopup; +class QQuickPopupAnchors; +class QQuickPopupItem; +class QQuickPopupWindow; +class QQuickPopupPrivate; +class QQuickPopupPositioner; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupTransitionManager : public QQuickTransitionManager +{ +public: + QQuickPopupTransitionManager(QQuickPopupPrivate *popup); + + void transitionEnter(); + void transitionExit(); + +protected: + void finished() override; + +private: + QQuickPopupPrivate *popup = nullptr; +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupPrivate + : public QObjectPrivate + , public QQuickItemChangeListener + , public QQuickPaletteProviderPrivateBase +{ +public: + Q_DECLARE_PUBLIC(QQuickPopup) + + QQuickPopupPrivate(); + + static QQuickPopupPrivate *get(QQuickPopup *popup) + { + return popup->d_func(); + } + + QQmlListProperty contentData(); + QQmlListProperty contentChildren(); + + void init(); + void closeOrReject(); + bool tryClose(const QPointF &pos, QQuickPopup::ClosePolicy flags); + + bool contains(const QPointF &scenePos) const; + +#if QT_CONFIG(quicktemplates2_multitouch) + virtual bool acceptTouch(const QTouchEvent::TouchPoint &point); +#endif + virtual bool blockInput(QQuickItem *item, const QPointF &point) const; + + virtual bool handlePress(QQuickItem* item, const QPointF &point, ulong timestamp); + virtual bool handleMove(QQuickItem* item, const QPointF &point, ulong timestamp); + virtual bool handleRelease(QQuickItem* item, const QPointF &point, ulong timestamp); + virtual bool handleReleaseWithoutGrab(const QEventPoint &) { return false; } + virtual void handleUngrab(); + + bool handleMouseEvent(QQuickItem *item, QMouseEvent *event); + bool handleHoverEvent(QQuickItem *item, QHoverEvent *event); +#if QT_CONFIG(quicktemplates2_multitouch) + bool handleTouchEvent(QQuickItem *item, QTouchEvent *event); +#endif + + QMarginsF windowInsets() const; + QPointF windowInsetsTopLeft() const; + void setEffectivePosFromWindowPos(const QPointF &windowPos); + void reposition(); + + bool usePopupWindow() const; + void adjustPopupItemParentAndWindow(); + void createOverlay(); + QQuickItem *createDimmer(QQmlComponent *component, QQuickPopup *popup, QQuickItem *parent) const; + void destroyDimmer(); + void toggleOverlay(); + void updateContentPalettes(const QPalette& parentPalette); + + virtual QQuickPopup::PopupType resolvedPopupType() const; + + virtual void showDimmer(); + virtual void hideDimmer(); + virtual void resizeDimmer(); + + virtual bool prepareEnterTransition(); + virtual bool prepareExitTransition(); + virtual void finalizeEnterTransition(); + virtual void finalizeExitTransition(); + + virtual void opened(); + + virtual Qt::WindowFlags popupWindowType() const; + + QMarginsF getMargins() const; + + void setTopMargin(qreal value, bool reset = false); + void setLeftMargin(qreal value, bool reset = false); + void setRightMargin(qreal value, bool reset = false); + void setBottomMargin(qreal value, bool reset = false); + + QQuickPopupAnchors *getAnchors(); + virtual QQuickPopupPositioner *getPositioner(); + + void setWindow(QQuickWindow *window); + void itemDestroyed(QQuickItem *item) override; + + QPalette defaultPalette() const override; + + enum TransitionState { + NoTransition, EnterTransition, ExitTransition + }; + + static const QQuickPopup::ClosePolicy DefaultClosePolicy; + + bool focus = false; + bool modal = false; + bool dim = false; + bool hasDim = false; + bool visible = false; + bool complete = true; + bool positioning = false; + bool hasWidth = false; + bool hasHeight = false; + bool hasTopMargin = false; + bool hasLeftMargin = false; + bool hasRightMargin = false; + bool hasBottomMargin = false; + bool hasZ = false; + bool allowVerticalFlip = false; + bool allowHorizontalFlip = false; + bool allowVerticalMove = true; + bool allowHorizontalMove = true; + bool allowVerticalResize = true; + bool allowHorizontalResize = true; + bool hadActiveFocusBeforeExitTransition = false; + bool interactive = true; + bool hasClosePolicy = false; + bool outsidePressed = false; + bool outsideParentPressed = false; + bool inDestructor = false; + bool relaxEdgeConstraint = false; + bool popupWindowDirty = false; + int touchId = -1; + qreal x = 0; + qreal y = 0; + QPointF effectivePos; + qreal margins = -1; + qreal topMargin = 0; + qreal leftMargin = 0; + qreal rightMargin = 0; + qreal bottomMargin = 0; + QPointF pressPoint; + TransitionState transitionState = NoTransition; + QQuickPopup::ClosePolicy closePolicy = DefaultClosePolicy; + QQuickItem *parentItem = nullptr; + QQuickItem *dimmer = nullptr; + QPointer window; + QQuickTransition *enter = nullptr; + QQuickTransition *exit = nullptr; + QQuickPopupItem *popupItem = nullptr; + QQuickPopupWindow *popupWindow = nullptr; + QQuickPopupPositioner *positioner = nullptr; + QList enterActions; + QList exitActions; + QQuickPopupTransitionManager transitionManager; + QQuickPopupAnchors *anchors = nullptr; + qreal explicitDimmerOpacity = 0; + qreal prevOpacity = 0; + qreal prevScale = 0; + QString m_title; + QQuickPopup::PopupType m_popupType = QQuickPopup::Item; + + friend class QQuickPopupTransitionManager; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUP_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d8a050383c77509e7d5b4e2bba182e32784cf8f7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p.h @@ -0,0 +1,56 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUPANCHORS_P_H +#define QQUICKPOPUPANCHORS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickPopupAnchorsPrivate; +class QQuickPopup; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupAnchors : public QObject, public QQuickItemChangeListener +{ + Q_OBJECT + Q_PROPERTY(QQuickItem *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged FINAL) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 5) + +public: + explicit QQuickPopupAnchors(QQuickPopup *popup); + ~QQuickPopupAnchors(); + + QQuickItem *centerIn() const; + void setCenterIn(QQuickItem *item); + void resetCenterIn(); + +Q_SIGNALS: + void centerInChanged(); + +private: + void itemDestroyed(QQuickItem *item) override; + + Q_DISABLE_COPY(QQuickPopupAnchors) + Q_DECLARE_PRIVATE(QQuickPopupAnchors) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUPANCHORS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9d2e9e51e5cfd03462f0816f1349c19af69fc2b3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupanchors_p_p.h @@ -0,0 +1,42 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUPANCHORS_P_P_H +#define QQUICKPOPUPANCHORS_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickPopup; + +class QQuickPopupAnchorsPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickPopupAnchors) + +public: + static QQuickPopupAnchorsPrivate *get(QQuickPopupAnchors *popupAnchors) + { + return popupAnchors->d_func(); + } + + QQuickPopup *popup = nullptr; + QQuickItem *centerIn = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUPANCHORS_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupitem_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupitem_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..16b5cfe022ca1c45a978fde8fe2007628bb4d666 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupitem_p_p.h @@ -0,0 +1,115 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUPITEM_P_P_H +#define QQUICKPOPUPITEM_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPopup; +class QQuickPopupItemPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupItem : public QQuickPage +{ + Q_OBJECT + +public: + explicit QQuickPopupItem(QQuickPopup *popup); + +protected: + void updatePolish() override; + + bool childMouseEventFilter(QQuickItem *child, QEvent *event) override; + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void mouseUngrabEvent() override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; + void touchUngrabEvent() override; +#endif +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override; + void fontChange(const QFont &newFont, const QFont &oldFont) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + void mirrorChange() override; + void itemChange(ItemChange change, const ItemChangeData &data) override; + void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override; + void enabledChange() override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickPopupItem) + Q_DECLARE_PRIVATE(QQuickPopupItem) + friend class QQuickPopup; +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupItemPrivate : public QQuickPagePrivate +{ + Q_DECLARE_PUBLIC(QQuickPopupItem) + +public: + QQuickPopupItemPrivate(QQuickPopup *popup); + + static QQuickPopupItemPrivate *get(QQuickPopupItem *popupItem); + + void implicitWidthChanged() override; + void implicitHeightChanged() override; + + void resolveFont() override; + + QQuickItem *getContentItem() override; + + void cancelContentItem() override; + void executeContentItem(bool complete = false) override; + + void cancelBackground() override; + void executeBackground(bool complete = false) override; + + QQuickPalette *palette() const override; + void setPalette(QQuickPalette* p) override; + void resetPalette() override; + + QPalette defaultPalette() const override; + bool providesPalette() const override; + + QPalette parentPalette(const QPalette &fallbackPalette) const override; + + int backId = 0; + int escapeId = 0; + QQuickPopup *popup = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUPITEM_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopuppositioner_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopuppositioner_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0c6e6736378123bbd99e2caaef5ce4d11abed4a7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopuppositioner_p_p.h @@ -0,0 +1,55 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUPPOSITIONER_P_P_H +#define QQUICKPOPUPPOSITIONER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QQuickPopup; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupPositioner : public QQuickItemChangeListener +{ +public: + explicit QQuickPopupPositioner(QQuickPopup *popup); + ~QQuickPopupPositioner(); + + QQuickPopup *popup() const; + + QQuickItem *parentItem() const; + void setParentItem(QQuickItem *parent); + + virtual void reposition(); + +protected: + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange, const QRectF &) override; + void itemParentChanged(QQuickItem *, QQuickItem *parent) override; + void itemChildRemoved(QQuickItem *, QQuickItem *child) override; + + void removeAncestorListeners(QQuickItem *item); + void addAncestorListeners(QQuickItem *item); + + bool m_positioning = false; + QQuickItem *m_parentItem = nullptr; + QQuickPopup *m_popup = nullptr; + qreal m_popupScale = 1.0; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUPPOSITIONER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupwindow_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupwindow_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0dd2b06aef05053dbdb2338f91d1c4144871deb6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpopupwindow_p_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPOPUPWINDOW_P_P_H +#define QQUICKPOPUPWINDOW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickPopup; +class QQuickPopupWindowPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickPopupWindow : public QQuickWindowQmlImpl +{ + Q_OBJECT + QML_ANONYMOUS + +public: + explicit QQuickPopupWindow(QQuickPopup *popup, QWindow *parent = nullptr); + ~QQuickPopupWindow(); + QQuickPopup *popup() const; + +protected: + void hideEvent(QHideEvent *e) override; + void moveEvent(QMoveEvent *e) override; + void resizeEvent(QResizeEvent *e) override; + bool event(QEvent *e) override; + +private: + void windowChanged(QWindow *window); + QPoint global2Local(const QPoint& pos) const; + void parentWindowXChanged(int newX); + void parentWindowYChanged(int newY); + void handlePopupPositionChangeFromWindowSystem(const QPoint &pos); + void implicitWidthChanged(); + void implicitHeightChanged(); + + Q_DISABLE_COPY(QQuickPopupWindow) + Q_DECLARE_PRIVATE(QQuickPopupWindow) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPOPUPWINDOW_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpresshandler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpresshandler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9f19dda9dba82a363d02e78fdbf300eeb7e46303 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickpresshandler_p_p.h @@ -0,0 +1,54 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPRESSHANDLER_P_P_H +#define QQUICKPRESSHANDLER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; +class QMouseEvent; +class QTimerEvent; + +struct QQuickPressHandler +{ + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); + void timerEvent(QTimerEvent *event); + + void clearDelayedMouseEvent(); + bool isActive(); + + static bool isSignalConnected(QQuickItem *item, const char *signalName, int &signalIndex); + + QQuickItem *control = nullptr; + QBasicTimer timer; + QPointF pressPos; + bool longPress = false; + int pressAndHoldSignalIndex = -1; + int pressedSignalIndex = -1; + int releasedSignalIndex = -1; + std::unique_ptr delayedMousePressEvent = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKPRESSHANDLER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickprogressbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickprogressbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9804fa7f1def3eea3857f4a902e3f894abd1f41d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickprogressbar_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKPROGRESSBAR_P_H +#define QQUICKPROGRESSBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickProgressBarPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickProgressBar : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL) + Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL) + Q_PROPERTY(bool indeterminate READ isIndeterminate WRITE setIndeterminate NOTIFY indeterminateChanged FINAL) + QML_NAMED_ELEMENT(ProgressBar) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickProgressBar(QQuickItem *parent = nullptr); + + qreal from() const; + void setFrom(qreal from); + + qreal to() const; + void setTo(qreal to); + + qreal value() const; + void setValue(qreal value); + + qreal position() const; + qreal visualPosition() const; + + bool isIndeterminate() const; + void setIndeterminate(bool indeterminate); + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void valueChanged(); + void positionChanged(); + void visualPositionChanged(); + void indeterminateChanged(); + +protected: + void mirrorChange() override; + void componentComplete() override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickProgressBar) + Q_DECLARE_PRIVATE(QQuickProgressBar) +}; + +QT_END_NAMESPACE + +#endif // QQUICKPROGRESSBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiobutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiobutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8ded91f5bcc79cbf8dd76362e8c4afe2dd188ff6 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiobutton_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRADIOBUTTON_P_H +#define QQUICKRADIOBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickRadioButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickRadioButton : public QQuickAbstractButton +{ + Q_OBJECT + QML_NAMED_ELEMENT(RadioButton) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickRadioButton(QQuickItem *parent = nullptr); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif +}; + +QT_END_NAMESPACE + +#endif // QQUICKRADIOBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiodelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiodelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b5d145e827480980efa6fd11ef56796dce2fb1dc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickradiodelegate_p.h @@ -0,0 +1,46 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRADIODELEGATE_P_H +#define QQUICKRADIODELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickRadioDelegatePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickRadioDelegate : public QQuickItemDelegate +{ + Q_OBJECT + QML_NAMED_ELEMENT(RadioDelegate) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickRadioDelegate(QQuickItem *parent = nullptr); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DECLARE_PRIVATE(QQuickRadioDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKRADIODELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickrangeslider_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickrangeslider_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0c64d9cdf4e76ade50f833ef9cf8684db164c22e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickrangeslider_p.h @@ -0,0 +1,194 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKRANGESLIDER_P_H +#define QQUICKRANGESLIDER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickRangeSliderPrivate; +class QQuickRangeSliderNode; + +class Q_QUICKTEMPLATES2_EXPORT QQuickRangeSlider : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(QQuickRangeSliderNode *first READ first CONSTANT FINAL) + Q_PROPERTY(QQuickRangeSliderNode *second READ second CONSTANT FINAL) + Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5)) + QML_NAMED_ELEMENT(RangeSlider) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickRangeSlider(QQuickItem *parent = nullptr); + ~QQuickRangeSlider(); + + qreal from() const; + void setFrom(qreal from); + + qreal to() const; + void setTo(qreal to); + + QQuickRangeSliderNode *first() const; + QQuickRangeSliderNode *second() const; + + qreal stepSize() const; + void setStepSize(qreal step); + + enum SnapMode { + NoSnap, + SnapAlways, + SnapOnRelease + }; + Q_ENUM(SnapMode) + + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + Q_INVOKABLE void setValues(qreal firstValue, qreal secondValue); + + // 2.2 (Qt 5.9) + bool live() const; + void setLive(bool live); + + // 2.3 (Qt 5.10) + bool isHorizontal() const; + bool isVertical() const; + + // 2.5 (Qt 5.12) + qreal touchDragThreshold() const; + void setTouchDragThreshold(qreal touchDragThreshold); + void resetTouchDragThreshold(); + Q_REVISION(2, 5) Q_INVOKABLE qreal valueAt(qreal position) const; + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void stepSizeChanged(); + void snapModeChanged(); + void orientationChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void liveChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void touchDragThresholdChanged(); + +protected: + void focusInEvent(QFocusEvent *event) override; + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + void mirrorChange() override; + void classBegin() override; + void componentComplete() override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + friend class QQuickRangeSliderNode; + + Q_DISABLE_COPY(QQuickRangeSlider) + Q_DECLARE_PRIVATE(QQuickRangeSlider) +}; + +class QQuickRangeSliderNodePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickRangeSliderNode : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL) + Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL) + Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "handle") + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickRangeSliderNode(qreal value, QQuickRangeSlider *slider); + ~QQuickRangeSliderNode(); + + qreal value() const; + void setValue(qreal value); + + qreal position() const; + qreal visualPosition() const; + + QQuickItem *handle() const; + void setHandle(QQuickItem *handle); + + bool isPressed() const; + void setPressed(bool pressed); + + // 2.1 (Qt 5.8) + bool isHovered() const; + void setHovered(bool hovered); + + // 2.5 (Qt 5.12) + qreal implicitHandleWidth() const; + qreal implicitHandleHeight() const; + +public Q_SLOTS: + void increase(); + void decrease(); + +Q_SIGNALS: + void valueChanged(); + void positionChanged(); + void visualPositionChanged(); + void handleChanged(); + void pressedChanged(); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void hoveredChanged(); + // 2.5 (Qt 5.12) + /*Q_REVISION(2, 5)*/ void moved(); + /*Q_REVISION(2, 5)*/ void implicitHandleWidthChanged(); + /*Q_REVISION(2, 5)*/ void implicitHandleHeightChanged(); + +private: + Q_DISABLE_COPY(QQuickRangeSliderNode) + Q_DECLARE_PRIVATE(QQuickRangeSliderNode) +}; + +QT_END_NAMESPACE + +#endif // QQUICKRANGESLIDER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickroundbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickroundbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1a1afc0c4f31aa6a2399f635b6bc7c623990e12f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickroundbutton_p.h @@ -0,0 +1,51 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKROUNDBUTTON_P_H +#define QQUICKROUNDBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickRoundButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickRoundButton : public QQuickButton +{ + Q_OBJECT + Q_PROPERTY(qreal radius READ radius WRITE setRadius RESET resetRadius NOTIFY radiusChanged FINAL) + QML_NAMED_ELEMENT(RoundButton) + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickRoundButton(QQuickItem *parent = nullptr); + + qreal radius() const; + void setRadius(qreal radius); + void resetRadius(); + +Q_SIGNALS: + void radiusChanged(); + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + +private: + Q_DISABLE_COPY(QQuickRoundButton) + Q_DECLARE_PRIVATE(QQuickRoundButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKROUNDBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c501859022d82d5f375da89ab72439d98839a407 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p.h @@ -0,0 +1,186 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCROLLBAR_P_H +#define QQUICKSCROLLBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +QT_BEGIN_NAMESPACE + +class QQuickScrollBarAttached; +class QQuickScrollBarPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickScrollBar : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL) + Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2)) + Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION(2, 2)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3)) + // 2.4 (Qt 5.11) + Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4)) + + Q_PROPERTY(QQuickIndicatorButton *__decreaseVisual READ decreaseVisual CONSTANT FINAL) + Q_PROPERTY(QQuickIndicatorButton *__increaseVisual READ increaseVisual CONSTANT FINAL) + + QML_NAMED_ELEMENT(ScrollBar) + QML_ATTACHED(QQuickScrollBarAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickScrollBar(QQuickItem *parent = nullptr); + + static QQuickScrollBarAttached *qmlAttachedProperties(QObject *object); + + qreal size() const; + qreal position() const; + + qreal stepSize() const; + void setStepSize(qreal step); + + bool isActive() const; + void setActive(bool active); + + bool isPressed() const; + void setPressed(bool pressed); + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + // 2.2 (Qt 5.9) + enum SnapMode { + NoSnap, + SnapAlways, + SnapOnRelease + }; + Q_ENUM(SnapMode) + + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + bool isInteractive() const; + void setInteractive(bool interactive); + void resetInteractive(); + + enum Policy { + AsNeeded = Qt::ScrollBarAsNeeded, + AlwaysOff = Qt::ScrollBarAlwaysOff, + AlwaysOn = Qt::ScrollBarAlwaysOn + }; + Q_ENUM(Policy) + + Policy policy() const; + void setPolicy(Policy policy); + + // 2.3 (Qt 5.10) + bool isHorizontal() const; + bool isVertical() const; + + // 2.4 (Qt 5.11) + qreal minimumSize() const; + void setMinimumSize(qreal minimumSize); + + qreal visualSize() const; + qreal visualPosition() const; + + QQuickIndicatorButton *decreaseVisual(); + QQuickIndicatorButton *increaseVisual(); + +public Q_SLOTS: + void increase(); + void decrease(); + void setSize(qreal size); + void setPosition(qreal position); + +Q_SIGNALS: + void sizeChanged(); + void positionChanged(); + void stepSizeChanged(); + void activeChanged(); + void pressedChanged(); + void orientationChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void snapModeChanged(); + Q_REVISION(2, 2) void interactiveChanged(); + Q_REVISION(2, 2) void policyChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void minimumSizeChanged(); + Q_REVISION(2, 4) void visualSizeChanged(); + Q_REVISION(2, 4) void visualPositionChanged(); + +protected: + void mousePressEvent(QMouseEvent *event) override; + +#if QT_CONFIG(quicktemplates2_hover) + void hoverChange() override; + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; +#endif + + void classBegin() override; + void componentComplete() override; + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickScrollBar) + Q_DECLARE_PRIVATE(QQuickScrollBar) +}; + +class QQuickScrollBarAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickScrollBarAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickScrollBar *horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged FINAL) + Q_PROPERTY(QQuickScrollBar *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL) + +public: + explicit QQuickScrollBarAttached(QObject *parent = nullptr); + ~QQuickScrollBarAttached(); + + QQuickScrollBar *horizontal() const; + void setHorizontal(QQuickScrollBar *horizontal); + + QQuickScrollBar *vertical() const; + void setVertical(QQuickScrollBar *vertical); + +Q_SIGNALS: + void horizontalChanged(); + void verticalChanged(); + +private: + Q_DISABLE_COPY(QQuickScrollBarAttached) + Q_DECLARE_PRIVATE(QQuickScrollBarAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSCROLLBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b8274601ff7f26960f4c573cc55a93c2d2d2ff1a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollbar_p_p.h @@ -0,0 +1,118 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCROLLBAR_P_P_H +#define QQUICKSCROLLBAR_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlickable; +class QQuickIndicatorButton; + +class QQuickScrollBarPrivate : public QQuickControlPrivate +{ + Q_DECLARE_PUBLIC(QQuickScrollBar) + +public: + static QQuickScrollBarPrivate *get(QQuickScrollBar *bar) + { + return bar->d_func(); + } + + struct VisualArea + { + VisualArea(qreal pos, qreal sz) + : position(pos), size(sz) { } + qreal position = 0; + qreal size = 0; + }; + VisualArea visualArea() const; + + qreal logicalPosition(qreal position) const; + + void setPosition(qreal position, bool notifyVisualChange = true); + qreal snapPosition(qreal position) const; + qreal positionAt(const QPointF &point) const; + void setInteractive(bool interactive); + void updateActive(); + void resizeContent() override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + + bool handlePress(const QPointF &point, ulong timestamp) override; + bool handleMove(const QPointF &point, ulong timestamp) override; + bool handleRelease(const QPointF &point, ulong timestamp) override; + void handleUngrab() override; + + void visualAreaChange(const VisualArea &newVisualArea, const VisualArea &oldVisualArea); + + void updateHover(const QPointF &pos, std::optional newHoverState = {}); + + QQuickIndicatorButton *decreaseVisual = nullptr; + QQuickIndicatorButton *increaseVisual = nullptr; + qreal size = 0; + qreal position = 0; + qreal stepSize = 0; + qreal offset = 0; + qreal minimumSize = 0; + bool active = false; + bool pressed = false; + bool moving = false; + bool interactive = true; + bool explicitInteractive = false; + Qt::Orientation orientation = Qt::Vertical; + QQuickScrollBar::SnapMode snapMode = QQuickScrollBar::NoSnap; + QQuickScrollBar::Policy policy = QQuickScrollBar::AsNeeded; +}; + +class QQuickScrollBarAttachedPrivate : public QObjectPrivate, public QQuickItemChangeListener +{ +public: + static QQuickScrollBarAttachedPrivate *get(QQuickScrollBarAttached *attached) + { + return attached->d_func(); + } + + void setFlickable(QQuickFlickable *flickable); + + void initHorizontal(); + void initVertical(); + void cleanupHorizontal(); + void cleanupVertical(); + void activateHorizontal(); + void activateVertical(); + void scrollHorizontal(); + void scrollVertical(); + void mirrorVertical(); + + void layoutHorizontal(bool move = true); + void layoutVertical(bool move = true); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + QQuickFlickable *flickable = nullptr; + QQuickScrollBar *horizontal = nullptr; + QQuickScrollBar *vertical = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSCROLLBAR_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollindicator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollindicator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a2158f080ced6c8dcabe480e11a594affc6f0311 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollindicator_p.h @@ -0,0 +1,126 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCROLLINDICATOR_P_H +#define QQUICKSCROLLINDICATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlickable; +class QQuickScrollIndicatorAttached; +class QQuickScrollIndicatorPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickScrollIndicator : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL) + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3)) + // 2.4 (Qt 5.11) + Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4)) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4)) + QML_NAMED_ELEMENT(ScrollIndicator) + QML_ATTACHED(QQuickScrollIndicatorAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickScrollIndicator(QQuickItem *parent = nullptr); + + static QQuickScrollIndicatorAttached *qmlAttachedProperties(QObject *object); + + qreal size() const; + qreal position() const; + + bool isActive() const; + void setActive(bool active); + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + // 2.3 (Qt 5.10) + bool isHorizontal() const; + bool isVertical() const; + + // 2.4 (Qt 5.11) + qreal minimumSize() const; + void setMinimumSize(qreal minimumSize); + + qreal visualSize() const; + qreal visualPosition() const; + +public Q_SLOTS: + void setSize(qreal size); + void setPosition(qreal position); + +Q_SIGNALS: + void sizeChanged(); + void positionChanged(); + void activeChanged(); + void orientationChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void minimumSizeChanged(); + Q_REVISION(2, 4) void visualSizeChanged(); + Q_REVISION(2, 4) void visualPositionChanged(); + +protected: +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickScrollIndicator) + Q_DECLARE_PRIVATE(QQuickScrollIndicator) +}; + +class QQuickScrollIndicatorAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickScrollIndicatorAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickScrollIndicator *horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged FINAL) + Q_PROPERTY(QQuickScrollIndicator *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL) + +public: + explicit QQuickScrollIndicatorAttached(QObject *parent = nullptr); + ~QQuickScrollIndicatorAttached(); + + QQuickScrollIndicator *horizontal() const; + void setHorizontal(QQuickScrollIndicator *horizontal); + + QQuickScrollIndicator *vertical() const; + void setVertical(QQuickScrollIndicator *vertical); + +Q_SIGNALS: + void horizontalChanged(); + void verticalChanged(); + +private: + Q_DISABLE_COPY(QQuickScrollIndicatorAttached) + Q_DECLARE_PRIVATE(QQuickScrollIndicatorAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSCROLLINDICATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4dd61391dd7f2f19118165892e3d242b2cde3795 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickscrollview_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSCROLLVIEW_P_H +#define QQUICKSCROLLVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickScrollViewPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickScrollView : public QQuickPane +{ + Q_OBJECT + QML_NAMED_ELEMENT(ScrollView) + QML_ADDED_IN_VERSION(2, 2) + Q_PROPERTY(qreal effectiveScrollBarWidth READ effectiveScrollBarWidth NOTIFY effectiveScrollBarWidthChanged FINAL REVISION(6, 6)) + Q_PROPERTY(qreal effectiveScrollBarHeight READ effectiveScrollBarHeight NOTIFY effectiveScrollBarHeightChanged FINAL REVISION(6, 6)) + +public: + explicit QQuickScrollView(QQuickItem *parent = nullptr); + ~QQuickScrollView(); + qreal effectiveScrollBarWidth(); + qreal effectiveScrollBarHeight(); + +protected: + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + bool eventFilter(QObject *object, QEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + + void componentComplete() override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +Q_SIGNALS: + Q_REVISION(6, 6) void effectiveScrollBarWidthChanged(); + Q_REVISION(6, 6) void effectiveScrollBarHeightChanged(); + +private: + Q_DISABLE_COPY(QQuickScrollView) + Q_DECLARE_PRIVATE(QQuickScrollView) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSCROLLVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b8e2cd2b7c4a5e1455157c13902157cd63e932d1 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p.h @@ -0,0 +1,110 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSELECTIONRECTANGLE_P_H +#define QQUICKSELECTIONRECTANGLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSelectionRectanglePrivate; +class QQuickSelectable; +class QQuickSelectionRectangleAttached; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSelectionRectangle : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(SelectionMode selectionMode READ selectionMode WRITE setSelectionMode NOTIFY selectionModeChanged FINAL) + Q_PROPERTY(QQuickItem *target READ target WRITE setTarget NOTIFY targetChanged FINAL) + Q_PROPERTY(QQmlComponent *topLeftHandle READ topLeftHandle WRITE setTopLeftHandle NOTIFY topLeftHandleChanged FINAL) + Q_PROPERTY(QQmlComponent *bottomRightHandle READ bottomRightHandle WRITE setBottomRightHandle NOTIFY bottomRightHandleChanged FINAL) + Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL) + Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL) + + QML_NAMED_ELEMENT(SelectionRectangle) + QML_ATTACHED(QQuickSelectionRectangleAttached) + QML_ADDED_IN_VERSION(6, 2) + +public: + enum SelectionMode { + Drag, + PressAndHold, + Auto + }; + Q_ENUM(SelectionMode) + + explicit QQuickSelectionRectangle(QQuickItem *parent = nullptr); + + QQuickItem *target() const; + void setTarget(QQuickItem *target); + + bool active(); + bool dragging(); + + SelectionMode selectionMode() const; + void setSelectionMode(SelectionMode selectionMode); + + QQmlComponent *topLeftHandle() const; + void setTopLeftHandle(QQmlComponent *topLeftHandle); + QQmlComponent *bottomRightHandle() const; + void setBottomRightHandle(QQmlComponent *bottomRightHandle); + + static QQuickSelectionRectangleAttached *qmlAttachedProperties(QObject *obj); + +Q_SIGNALS: + void targetChanged(); + void activeChanged(); + void draggingChanged(); + void topLeftHandleChanged(); + void bottomRightHandleChanged(); + void selectionModeChanged(); + +private: + Q_DISABLE_COPY(QQuickSelectionRectangle) + Q_DECLARE_PRIVATE(QQuickSelectionRectangle) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSelectionRectangleAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickSelectionRectangle *control READ control NOTIFY controlChanged FINAL) + Q_PROPERTY(bool dragging READ dragging NOTIFY draggingChanged FINAL) + +public: + QQuickSelectionRectangleAttached(QObject *parent); + + QQuickSelectionRectangle *control() const; + void setControl(QQuickSelectionRectangle *control); + + bool dragging() const; + void setDragging(bool dragging); + +Q_SIGNALS: + void controlChanged(); + void draggingChanged(); + +private: + QPointer m_control; + bool m_dragging = false; + + friend class QQuickSelectionRectanglePrivate; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSELECTIONRECTANGLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7740ea8c156b10c01b59f216296c3a9b9c59adbc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickselectionrectangle_p_p.h @@ -0,0 +1,78 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSELECTIONRECTANGLE_P_P_H +#define QQUICKSELECTIONRECTANGLE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickselectionrectangle_p.h" + +#include +#include + +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSelectionRectanglePrivate : public QQuickControlPrivate +{ +public: + Q_DECLARE_PUBLIC(QQuickSelectionRectangle) + + QQuickSelectionRectanglePrivate(); + + void updateDraggingState(bool isDragging); + void updateActiveState(bool isActive); + void updateHandles(); + void updateSelectionMode(); + void connectToTarget(); + void scrollTowardsPos(const QPointF &pos); + QQuickItem *handleUnderPos(const QPointF &pos); + + QQuickItem *createHandle(QQmlComponent *delegate, Qt::Corner corner); + + QQuickSelectionRectangleAttached *getAttachedObject(const QObject *object) const; + +public: + QPointer m_target; + + QQmlComponent *m_topLeftHandleDelegate = nullptr; + QQmlComponent *m_bottomRightHandleDelegate = nullptr; + QScopedPointer m_topLeftHandle; + QScopedPointer m_bottomRightHandle; + QPointer m_draggedHandle; + + QQuickSelectable *m_selectable = nullptr; + + QQuickTapHandler *m_tapHandler = nullptr; + QQuickDragHandler *m_dragHandler = nullptr; + + QTimer m_scrollTimer; + QPointF m_scrollToPoint; + QSizeF m_scrollSpeed = QSizeF(1, 1); + + QQuickSelectionRectangle::SelectionMode m_selectionMode = QQuickSelectionRectangle::Auto; + QQuickSelectionRectangle::SelectionMode m_effectiveSelectionMode = QQuickSelectionRectangle::Drag; + + bool m_enabled = true; + bool m_active = false; + bool m_dragging = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSELECTIONRECTANGLE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickshortcutcontext_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickshortcutcontext_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..aaa47c3e0058767c6be2cac0725811a7fe9d1b53 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickshortcutcontext_p_p.h @@ -0,0 +1,32 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSHORTCUTCONTEXT_P_P_H +#define QQUICKSHORTCUTCONTEXT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QObject; + +struct Q_QUICKTEMPLATES2_EXPORT QQuickShortcutContext +{ + static bool matcher(QObject *object, Qt::ShortcutContext context); +}; + +QT_END_NAMESPACE + +#endif // QQUICKSHORTCUTCONTEXT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickslider_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickslider_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0a2aa01fa11022eec9bab654147f28385169ee39 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickslider_p.h @@ -0,0 +1,155 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSLIDER_P_H +#define QQUICKSLIDER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSliderPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSlider : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL) + Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL) + Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL) + Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) + Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3)) + // 2.5 (Qt 5.12) + Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background,handle") + QML_NAMED_ELEMENT(Slider) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSlider(QQuickItem *parent = nullptr); + ~QQuickSlider(); + + qreal from() const; + void setFrom(qreal from); + + qreal to() const; + void setTo(qreal to); + + qreal value() const; + void setValue(qreal value); + + qreal position() const; + qreal visualPosition() const; + + qreal stepSize() const; + void setStepSize(qreal step); + + enum SnapMode { + NoSnap, + SnapAlways, + SnapOnRelease + }; + Q_ENUM(SnapMode) + + SnapMode snapMode() const; + void setSnapMode(SnapMode mode); + + bool isPressed() const; + void setPressed(bool pressed); + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + QQuickItem *handle() const; + void setHandle(QQuickItem *handle); + + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) Q_INVOKABLE qreal valueAt(qreal position) const; + + // 2.2 (Qt 5.9) + bool live() const; + void setLive(bool live); + + // 2.3 (Qt 5.10) + bool isHorizontal() const; + bool isVertical() const; + + // 2.5 (Qt 5.12) + qreal touchDragThreshold() const; + void setTouchDragThreshold(qreal touchDragThreshold); + void resetTouchDragThreshold(); + + qreal implicitHandleWidth() const; + qreal implicitHandleHeight() const; + +public Q_SLOTS: + void increase(); + void decrease(); + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void valueChanged(); + void positionChanged(); + void visualPositionChanged(); + void stepSizeChanged(); + void snapModeChanged(); + void pressedChanged(); + void orientationChanged(); + void handleChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void moved(); + Q_REVISION(2, 2) void liveChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void touchDragThresholdChanged(); + Q_REVISION(2, 5) void implicitHandleWidthChanged(); + Q_REVISION(2, 5) void implicitHandleHeightChanged(); + +protected: + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + void mirrorChange() override; + void componentComplete() override; + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickSlider) + Q_DECLARE_PRIVATE(QQuickSlider) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSLIDER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickspinbox_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickspinbox_p.h new file mode 100644 index 0000000000000000000000000000000000000000..95bd4f31dbd88d08c7c0cfb9525c477e5a027fc3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickspinbox_p.h @@ -0,0 +1,160 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPINBOX_P_H +#define QQUICKSPINBOX_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QValidator; +class QQuickSpinBoxPrivate; +class QQuickIndicatorButton; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSpinBox : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int from READ from WRITE setFrom NOTIFY fromChanged FINAL) + Q_PROPERTY(int to READ to WRITE setTo NOTIFY toChanged FINAL) + Q_PROPERTY(int value READ value WRITE setValue NOTIFY valueChanged FINAL) + Q_PROPERTY(int stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL) + Q_PROPERTY(bool editable READ isEditable WRITE setEditable NOTIFY editableChanged FINAL) + Q_PROPERTY(bool live READ isLive WRITE setLive NOTIFY liveChanged FINAL REVISION(6, 6)) + +#if QT_CONFIG(validator) + Q_PROPERTY(QValidator *validator READ validator WRITE setValidator NOTIFY validatorChanged FINAL) +#endif + Q_PROPERTY(QJSValue textFromValue READ textFromValue WRITE setTextFromValue NOTIFY textFromValueChanged FINAL) + Q_PROPERTY(QJSValue valueFromText READ valueFromText WRITE setValueFromText NOTIFY valueFromTextChanged FINAL) + Q_PROPERTY(QQuickIndicatorButton *up READ up CONSTANT FINAL) + Q_PROPERTY(QQuickIndicatorButton *down READ down CONSTANT FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints NOTIFY inputMethodHintsChanged FINAL REVISION(2, 2)) + Q_PROPERTY(bool inputMethodComposing READ isInputMethodComposing NOTIFY inputMethodComposingChanged FINAL REVISION(2, 2)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool wrap READ wrap WRITE setWrap NOTIFY wrapChanged FINAL REVISION(2, 3)) + // 2.4 (Qt 5.11) + Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged FINAL REVISION(2, 4)) + QML_NAMED_ELEMENT(SpinBox) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSpinBox(QQuickItem *parent = nullptr); + ~QQuickSpinBox(); + + int from() const; + void setFrom(int from); + + int to() const; + void setTo(int to); + + int value() const; + void setValue(int value); + + int stepSize() const; + void setStepSize(int step); + + bool isEditable() const; + void setEditable(bool editable); + + bool isLive() const; + void setLive(bool live); + +#if QT_CONFIG(validator) + QValidator *validator() const; + void setValidator(QValidator *validator); +#endif + + QJSValue textFromValue() const; + void setTextFromValue(const QJSValue &callback); + + QJSValue valueFromText() const; + void setValueFromText(const QJSValue &callback); + + QQuickIndicatorButton *up() const; + QQuickIndicatorButton *down() const; + + // 2.2 (Qt 5.9) + Qt::InputMethodHints inputMethodHints() const; + void setInputMethodHints(Qt::InputMethodHints hints); + + bool isInputMethodComposing() const; + + // 2.3 (Qt 5.10) + bool wrap() const; + void setWrap(bool wrap); + + // 2.4 (Qt 5.11) + QString displayText() const; + +public Q_SLOTS: + void increase(); + void decrease(); + +Q_SIGNALS: + void fromChanged(); + void toChanged(); + void valueChanged(); + void stepSizeChanged(); + void editableChanged(); + Q_REVISION(6, 6) void liveChanged(); +#if QT_CONFIG(validator) + void validatorChanged(); +#endif + void textFromValueChanged(); + void valueFromTextChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void valueModified(); + Q_REVISION(2, 2) void inputMethodHintsChanged(); + Q_REVISION(2, 2) void inputMethodComposingChanged(); + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void wrapChanged(); + // 2.4 (Qt 5.11) + Q_REVISION(2, 4) void displayTextChanged(); + +protected: + void focusInEvent(QFocusEvent *event) override; + void hoverEnterEvent(QHoverEvent *event) override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + void keyPressEvent(QKeyEvent *event) override; + void keyReleaseEvent(QKeyEvent *event) override; + void timerEvent(QTimerEvent *event) override; +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + void classBegin() override; + void componentComplete() override; + void itemChange(ItemChange change, const ItemChangeData &value) override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickSpinBox) + Q_DECLARE_PRIVATE(QQuickSpinBox) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPINBOX_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicksplitview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicksplitview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..08d3a989923b4b306037c3a39e0a4196d921ab67 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicksplitview_p.h @@ -0,0 +1,190 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSPLITVIEW_P_H +#define QQUICKSPLITVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickSplitViewPrivate; +class QQuickSplitViewAttached; +class QQuickSplitViewAttachedPrivate; +class QQuickSplitHandleAttached; +class QQuickSplitHandleAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSplitView : public QQuickContainer +{ + Q_OBJECT + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + Q_PROPERTY(bool resizing READ isResizing NOTIFY resizingChanged) + Q_PROPERTY(QQmlComponent *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) + QML_NAMED_ELEMENT(SplitView) + QML_ATTACHED(QQuickSplitViewAttached) + QML_ADDED_IN_VERSION(2, 13) + +public: + explicit QQuickSplitView(QQuickItem *parent = nullptr); + ~QQuickSplitView() override; + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + bool isResizing() const; + + QQmlComponent *handle(); + void setHandle(QQmlComponent *handle); + + bool isContent(QQuickItem *item) const override; + + static QQuickSplitViewAttached *qmlAttachedProperties(QObject *object); + + // Based on the same code in QMainWindow. + enum VersionMarkers { + VersionMarker = 0xff + }; + Q_INVOKABLE QVariant saveState(); + Q_INVOKABLE bool restoreState(const QVariant &state); + +Q_SIGNALS: + void orientationChanged(); + void resizingChanged(); + void handleChanged(); + +protected: + QQuickSplitView(QQuickSplitViewPrivate &dd, QQuickItem *parent); + + void componentComplete() override; + void hoverMoveEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; + bool childMouseEventFilter(QQuickItem *item, QEvent *event) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + void itemAdded(int index, QQuickItem *item) override; + void itemMoved(int index, QQuickItem *item) override; + void itemRemoved(int index, QQuickItem *item) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickSplitView) + Q_DECLARE_PRIVATE(QQuickSplitView) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSplitViewAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickSplitView *view READ view NOTIFY viewChanged FINAL) + Q_PROPERTY(qreal minimumWidth READ minimumWidth WRITE setMinimumWidth + RESET resetMinimumWidth NOTIFY minimumWidthChanged FINAL) + Q_PROPERTY(qreal minimumHeight READ minimumHeight WRITE setMinimumHeight + RESET resetMinimumHeight NOTIFY minimumHeightChanged FINAL) + Q_PROPERTY(qreal preferredWidth READ preferredWidth WRITE setPreferredWidth + RESET resetPreferredWidth NOTIFY preferredWidthChanged FINAL) + Q_PROPERTY(qreal preferredHeight READ preferredHeight WRITE setPreferredHeight + RESET resetPreferredHeight NOTIFY preferredHeightChanged FINAL) + Q_PROPERTY(qreal maximumWidth READ maximumWidth WRITE setMaximumWidth + RESET resetMaximumWidth NOTIFY maximumWidthChanged FINAL) + Q_PROPERTY(qreal maximumHeight READ maximumHeight WRITE setMaximumHeight + RESET resetMaximumHeight NOTIFY maximumHeightChanged FINAL) + Q_PROPERTY(bool fillHeight READ fillHeight WRITE setFillHeight NOTIFY fillHeightChanged FINAL) + Q_PROPERTY(bool fillWidth READ fillWidth WRITE setFillWidth NOTIFY fillWidthChanged FINAL) + +public: + explicit QQuickSplitViewAttached(QObject *parent = nullptr); + + QQuickSplitView *view() const; + + qreal minimumWidth() const; + void setMinimumWidth(qreal width); + void resetMinimumWidth(); + + qreal minimumHeight() const; + void setMinimumHeight(qreal height); + void resetMinimumHeight(); + + qreal preferredWidth() const; + void setPreferredWidth(qreal width); + void resetPreferredWidth(); + + qreal preferredHeight() const; + void setPreferredHeight(qreal height); + void resetPreferredHeight(); + + qreal maximumWidth() const; + void setMaximumWidth(qreal width); + void resetMaximumWidth(); + + qreal maximumHeight() const; + void setMaximumHeight(qreal height); + void resetMaximumHeight(); + + bool fillWidth() const; + void setFillWidth(bool fill); + + bool fillHeight() const; + void setFillHeight(bool fill); + +Q_SIGNALS: + void viewChanged(); + void minimumWidthChanged(); + void minimumHeightChanged(); + void preferredWidthChanged(); + void preferredHeightChanged(); + void maximumWidthChanged(); + void maximumHeightChanged(); + void fillWidthChanged(); + void fillHeightChanged(); + +private: + Q_DISABLE_COPY(QQuickSplitViewAttached) + Q_DECLARE_PRIVATE(QQuickSplitViewAttached) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSplitHandleAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL) + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) + QML_NAMED_ELEMENT(SplitHandle) + QML_ATTACHED(QQuickSplitHandleAttached) + QML_UNCREATABLE("") + QML_ADDED_IN_VERSION(2, 13) + +public: + explicit QQuickSplitHandleAttached(QObject *parent = nullptr); + + bool isHovered() const; + bool isPressed() const; + + static QQuickSplitHandleAttached *qmlAttachedProperties(QObject *object); + +Q_SIGNALS: + void hoveredChanged(); + void pressedChanged(); + +private: + Q_DISABLE_COPY(QQuickSplitHandleAttached) + Q_DECLARE_PRIVATE(QQuickSplitHandleAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSPLITVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackelement_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackelement_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..96e7bc5c14d6ca8d5860a061f9857b4bfddbe62f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackelement_p_p.h @@ -0,0 +1,88 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTACKELEMENT_P_P_H +#define QQUICKSTACKELEMENT_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#if QT_CONFIG(quick_viewtransitions) +#include +#endif +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQmlContext; +class QQmlComponent; +struct QQuickStackTransition; +class RequiredProperties; + +class QQuickStackElement : +#if QT_CONFIG(quick_viewtransitions) + public QQuickItemViewTransitionableItem, +#endif + public QQuickItemChangeListener +{ + QQuickStackElement(); + +public: + ~QQuickStackElement(); + + static QQuickStackElement *fromString(const QString &str, QQuickStackView *view, QString *error); + static QQuickStackElement *fromObject(QObject *object, QQuickStackView *view, QString *error); + static QQuickStackElement *fromStackViewArg(QQuickStackView *view, QQuickStackViewArg arg); + + bool load(QQuickStackView *parent); + void incubate(QObject *object, RequiredProperties *requiredProperties); + void initialize(RequiredProperties *requiredProperties); + + void setIndex(int index); + void setView(QQuickStackView *view); + void setStatus(QQuickStackView::Status status); + void setVisible(bool visible); + +#if QT_CONFIG(quick_viewtransitions) + void transitionNextReposition(QQuickItemViewTransitioner *transitioner, QQuickItemViewTransitioner::TransitionType type, bool asTarget); + bool prepareTransition(QQuickItemViewTransitioner *transitioner, const QRectF &viewBounds); + void startTransition(QQuickItemViewTransitioner *transitioner, QQuickStackView::Status status); + void completeTransition(QQuickTransition *quickTransition); +#endif + + void itemDestroyed(QQuickItem *item) override; + + int index = -1; + bool init = false; + bool removal = false; + bool ownItem = false; + bool ownComponent = false; + bool widthValid = false; + bool heightValid = false; + QQmlComponent *component = nullptr; + QQuickStackView *view = nullptr; + QPointer originalParent; + QQuickStackView::Status status = QQuickStackView::Inactive; + QV4::PersistentValue properties; + QV4::PersistentValue qmlCallingContext; +#if !QT_CONFIG(quick_viewtransitions) + QQuickItem *item; +#endif +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTACKELEMENT_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstacktransition_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstacktransition_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..054580abab57c329a47498c42ac9896869df195c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstacktransition_p_p.h @@ -0,0 +1,50 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTACKTRANSITION_P_P_H +#define QQUICKSTACKTRANSITION_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quick_viewtransitions); + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickStackElement; + +struct QQuickStackTransition +{ + static QQuickStackTransition popExit(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + static QQuickStackTransition popEnter(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + + static QQuickStackTransition pushExit(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + static QQuickStackTransition pushEnter(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + + static QQuickStackTransition replaceExit(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + static QQuickStackTransition replaceEnter(QQuickStackView::Operation operation, QQuickStackElement *element, QQuickStackView *view); + + bool target = false; + QQuickStackView::Status status = QQuickStackView::Inactive; + QQuickItemViewTransitioner::TransitionType type = QQuickItemViewTransitioner::NoTransition; + QRectF viewBounds; + QQuickStackElement *element = nullptr; + QQuickTransition *transition = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTACKTRANSITION_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6457dd4129413a2d4a2a0e5c23c80d37e0279bd5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p.h @@ -0,0 +1,251 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTACKVIEW_P_H +#define QQUICKSTACKVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTransition; +class QQuickStackElement; +class QQuickStackViewPrivate; +class QQuickStackViewAttached; +class QQuickStackViewAttachedPrivate; + +/*! + \internal + + Input from the user that is turned into QQuickStackElements. + + This was added to support the QML-compiler-friendly pushElement[s] + functions. +*/ +class QQuickStackViewArg +{ + Q_GADGET + QML_CONSTRUCTIBLE_VALUE + QML_ANONYMOUS + +public: + QQuickStackViewArg() = default; + Q_INVOKABLE QQuickStackViewArg(QQuickItem *item); + Q_INVOKABLE QQuickStackViewArg(const QUrl &url); + Q_INVOKABLE QQuickStackViewArg(QQmlComponent *component); + Q_INVOKABLE QQuickStackViewArg(const QVariantMap &properties); + +#ifndef QT_NO_DEBUG_STREAM + friend QDebug operator<<(QDebug debug, const QQuickStackViewArg &arg); +#endif + +private: + friend class QQuickStackViewPrivate; + friend class QQuickStackElement; + + QQuickItem *mItem = nullptr; + QQmlComponent *mComponent = nullptr; + QUrl mUrl; + QVariantMap mProperties; +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickStackView : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(bool busy READ isBusy NOTIFY busyChanged FINAL) + Q_PROPERTY(int depth READ depth NOTIFY depthChanged FINAL) + Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged FINAL) + Q_PROPERTY(QJSValue initialItem READ initialItem WRITE setInitialItem FINAL) +#if QT_CONFIG(quick_viewtransitions) + Q_PROPERTY(QQuickTransition *popEnter READ popEnter WRITE setPopEnter NOTIFY popEnterChanged FINAL) + Q_PROPERTY(QQuickTransition *popExit READ popExit WRITE setPopExit NOTIFY popExitChanged FINAL) + Q_PROPERTY(QQuickTransition *pushEnter READ pushEnter WRITE setPushEnter NOTIFY pushEnterChanged FINAL) + Q_PROPERTY(QQuickTransition *pushExit READ pushExit WRITE setPushExit NOTIFY pushExitChanged FINAL) + Q_PROPERTY(QQuickTransition *replaceEnter READ replaceEnter WRITE setReplaceEnter NOTIFY replaceEnterChanged FINAL) + Q_PROPERTY(QQuickTransition *replaceExit READ replaceExit WRITE setReplaceExit NOTIFY replaceExitChanged FINAL) +#endif + // 2.3 (Qt 5.10) + Q_PROPERTY(bool empty READ isEmpty NOTIFY emptyChanged FINAL REVISION(2, 3)) + QML_NAMED_ELEMENT(StackView) + QML_ATTACHED(QQuickStackViewAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickStackView(QQuickItem *parent = nullptr); + ~QQuickStackView(); + + static QQuickStackViewAttached *qmlAttachedProperties(QObject *object); + + bool isBusy() const; + int depth() const; + QQuickItem *currentItem() const; + + enum Status { + Inactive = 0, + Deactivating = 1, + Activating = 2, + Active = 3 + }; + Q_ENUM(Status) + + QJSValue initialItem() const; + void setInitialItem(const QJSValue &item); + +#if QT_CONFIG(quick_viewtransitions) + QQuickTransition *popEnter() const; + void setPopEnter(QQuickTransition *enter); + + QQuickTransition *popExit() const; + void setPopExit(QQuickTransition *exit); + + QQuickTransition *pushEnter() const; + void setPushEnter(QQuickTransition *enter); + + QQuickTransition *pushExit() const; + void setPushExit(QQuickTransition *exit); + + QQuickTransition *replaceEnter() const; + void setReplaceEnter(QQuickTransition *enter); + + QQuickTransition *replaceExit() const; + void setReplaceExit(QQuickTransition *exit); +#endif + + enum LoadBehavior { + DontLoad, + ForceLoad + }; + Q_ENUM(LoadBehavior) + + Q_INVOKABLE QQuickItem *get(int index, QQuickStackView::LoadBehavior behavior = DontLoad); + Q_INVOKABLE QQuickItem *find(const QJSValue &callback, QQuickStackView::LoadBehavior behavior = DontLoad); + + enum Operation { + Transition = -1, // ### Deprecated in Qt 6; remove in Qt 7. + Immediate = 0, + PushTransition = 1, + ReplaceTransition = 2, + PopTransition = 3, + }; + Q_ENUM(Operation) + + Q_INVOKABLE void push(QQmlV4FunctionPtr args); + Q_INVOKABLE void pop(QQmlV4FunctionPtr args); + Q_INVOKABLE void replace(QQmlV4FunctionPtr args); + + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *pushItems(QList args, + Operation operation = Immediate); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *pushItem(QQuickItem *item, const QVariantMap &properties = {}, + Operation operation = Immediate); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *pushItem(QQmlComponent *component, const QVariantMap &properties = {}, + Operation operation = Immediate); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *pushItem(const QUrl &url, const QVariantMap &properties = {}, + Operation operation = Immediate); + + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *popToItem(QQuickItem *item, Operation operation = PopTransition); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *popToIndex(int index, Operation operation = PopTransition); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *popCurrentItem(Operation operation = PopTransition); + + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *replaceCurrentItem(const QList &args, + Operation operation = ReplaceTransition); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *replaceCurrentItem(QQuickItem *item, + const QVariantMap &properties = {}, Operation operation = ReplaceTransition); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *replaceCurrentItem(QQmlComponent *component, + const QVariantMap &properties = {}, Operation operation = ReplaceTransition); + Q_REVISION(6, 7) Q_INVOKABLE QQuickItem *replaceCurrentItem(const QUrl &url, + const QVariantMap &properties = {}, Operation operation = ReplaceTransition); + + // 2.3 (Qt 5.10) + bool isEmpty() const; + +public Q_SLOTS: + void clear(Operation operation = Immediate); + +Q_SIGNALS: + void busyChanged(); + void depthChanged(); + void currentItemChanged(); +#if QT_CONFIG(quick_viewtransitions) + void popEnterChanged(); + void popExitChanged(); + void pushEnterChanged(); + void pushExitChanged(); + void replaceEnterChanged(); + void replaceExitChanged(); +#endif + // 2.3 (Qt 5.10) + Q_REVISION(2, 3) void emptyChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + bool childMouseEventFilter(QQuickItem *, QEvent *) override; + +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickStackView) + Q_DECLARE_PRIVATE(QQuickStackView) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickStackViewAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(QQuickStackView *view READ view NOTIFY viewChanged FINAL) + Q_PROPERTY(QQuickStackView::Status status READ status NOTIFY statusChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible RESET resetVisible NOTIFY visibleChanged FINAL) // REVISION(2, 2) + +public: + explicit QQuickStackViewAttached(QObject *parent = nullptr); + ~QQuickStackViewAttached(); + + int index() const; + QQuickStackView *view() const; + QQuickStackView::Status status() const; + + // 2.2 (Qt 5.9) + bool isVisible() const; + void setVisible(bool visible); + void resetVisible(); + +Q_SIGNALS: + void indexChanged(); + void viewChanged(); + void statusChanged(); + // 2.1 (Qt 5.8) + /*Q_REVISION(2, 1)*/ void activated(); + /*Q_REVISION(2, 1)*/ void activating(); + /*Q_REVISION(2, 1)*/ void deactivated(); + /*Q_REVISION(2, 1)*/ void deactivating(); + /*Q_REVISION(2, 1)*/ void removed(); + // 2.2 (Qt 5.9) + /*Q_REVISION(2, 2)*/ void visibleChanged(); + +private: + Q_DISABLE_COPY(QQuickStackViewAttached) + Q_DECLARE_PRIVATE(QQuickStackViewAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTACKVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b6f0f3e4bd7662008b8b92202ba08948c07f2060 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickstackview_p_p.h @@ -0,0 +1,114 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSTACKVIEW_P_P_H +#define QQUICKSTACKVIEW_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#if QT_CONFIG(quick_viewtransitions) +#include +#endif +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickStackElement; +struct QQuickStackTransition; + +class QQuickStackViewPrivate : public QQuickControlPrivate +#if QT_CONFIG(quick_viewtransitions) + , public QQuickItemViewTransitionChangeListener +#endif +{ + Q_DECLARE_PUBLIC(QQuickStackView) + +public: + static QQuickStackViewPrivate *get(QQuickStackView *view) + { + return view->d_func(); + } + + void warn(const QString &error); + void warnOfInterruption(const QString &attemptedOperation); + + void setCurrentItem(QQuickStackElement *element); + + QList parseElements(int from, QQmlV4FunctionPtr args, QStringList *errors); + QList parseElements(const QList &args); + QQuickStackElement *findElement(QQuickItem *item) const; + QQuickStackElement *findElement(const QV4::Value &value) const; + QQuickStackElement *createElement(const QV4::Value &value, const QQmlRefPointer &context, QString *error); + bool pushElements(const QList &elements); + bool pushElement(QQuickStackElement *element); + bool popElements(QQuickStackElement *element); + bool replaceElements(QQuickStackElement *element, const QList &elements); + + enum class CurrentItemPolicy { + DoNotPop, + Pop + }; + QQuickItem *popToItem(QQuickItem *item, QQuickStackView::Operation operation, CurrentItemPolicy currentItemPolicy); + +#if QT_CONFIG(quick_viewtransitions) + void ensureTransitioner(); + void startTransition(const QQuickStackTransition &first, const QQuickStackTransition &second, bool immediate); + void completeTransition(QQuickStackElement *element, QQuickTransition *transition, QQuickStackView::Status status); + + void viewItemTransitionFinished(QQuickItemViewTransitionableItem *item) override; +#endif + void setBusy(bool busy); + void depthChange(int newDepth, int oldDepth); + + bool busy = false; + bool modifyingElements = false; + QString operation; + QJSValue initialItem; + QQuickItem *currentItem = nullptr; + QSet removing; + QList removed; + QStack elements; +#if QT_CONFIG(quick_viewtransitions) + QQuickItemViewTransitioner *transitioner = nullptr; +#endif +}; + +class QQuickStackViewAttachedPrivate : public QObjectPrivate +//#if QT_CONFIG(quick_viewtransitions) + , public QQuickItemChangeListener +//#endif +{ + Q_DECLARE_PUBLIC(QQuickStackViewAttached) + +public: + static QQuickStackViewAttachedPrivate *get(QQuickStackViewAttached *attached) + { + return attached->d_func(); + } + +//#if QT_CONFIG(quick_viewtransitions) + void itemParentChanged(QQuickItem *item, QQuickItem *parent) override; +//#endif + + bool explicitVisible = false; + QQuickStackElement *element = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSTACKVIEW_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipe_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipe_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7e5d275cacbc42c111056222762d44d28e5244dd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipe_p.h @@ -0,0 +1,109 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWIPE_P_H +#define QQUICKSWIPE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickItem; +class QQuickTransition; +class QQuickSwipePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwipe : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(bool complete READ isComplete NOTIFY completeChanged FINAL) + Q_PROPERTY(QQmlComponent *left READ left WRITE setLeft NOTIFY leftChanged FINAL) + Q_PROPERTY(QQmlComponent *behind READ behind WRITE setBehind NOTIFY behindChanged FINAL) + Q_PROPERTY(QQmlComponent *right READ right WRITE setRight NOTIFY rightChanged FINAL) + Q_PROPERTY(QQuickItem *leftItem READ leftItem NOTIFY leftItemChanged FINAL) + Q_PROPERTY(QQuickItem *behindItem READ behindItem NOTIFY behindItemChanged FINAL) + Q_PROPERTY(QQuickItem *rightItem READ rightItem NOTIFY rightItemChanged FINAL) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged FINAL) // REVISION(2, 2) + Q_PROPERTY(QQuickTransition *transition READ transition WRITE setTransition NOTIFY transitionChanged FINAL) // REVISION(2, 2) + QML_ANONYMOUS + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSwipe(QQuickSwipeDelegate *control); + + qreal position() const; + void setPosition(qreal position); + + bool isComplete() const; + void setComplete(bool complete); + + QQmlComponent *left() const; + void setLeft(QQmlComponent *left); + + QQmlComponent *behind() const; + void setBehind(QQmlComponent *behind); + + QQmlComponent *right() const; + void setRight(QQmlComponent *right); + + QQuickItem *leftItem() const; + void setLeftItem(QQuickItem *item); + + QQuickItem *behindItem() const; + void setBehindItem(QQuickItem *item); + + QQuickItem *rightItem() const; + void setRightItem(QQuickItem *item); + + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) Q_INVOKABLE void close(); + + // 2.2 (Qt 5.9) + bool isEnabled() const; + void setEnabled(bool enabled); + + QQuickTransition *transition() const; + void setTransition(QQuickTransition *transition); + + Q_REVISION(2, 2) Q_INVOKABLE void open(QQuickSwipeDelegate::Side side); + +Q_SIGNALS: + void positionChanged(); + void completeChanged(); + void leftChanged(); + void behindChanged(); + void rightChanged(); + void leftItemChanged(); + void behindItemChanged(); + void rightItemChanged(); + // 2.1 (Qt 5.8) + /*Q_REVISION(2, 1)*/ void completed(); + // 2.2 (Qt 5.9) + /*Q_REVISION(2, 2)*/ void opened(); + /*Q_REVISION(2, 2)*/ void closed(); + /*Q_REVISION(2, 2)*/ void enabledChanged(); + /*Q_REVISION(2, 2)*/ void transitionChanged(); + +private: + Q_DISABLE_COPY(QQuickSwipe) + Q_DECLARE_PRIVATE(QQuickSwipe) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSWIPE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..539957a37d8be1a2f2f00a5ef933520212ade57e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p.h @@ -0,0 +1,91 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWIPEDELEGATE_P_H +#define QQUICKSWIPEDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSwipe; +class QQuickSwipeDelegatePrivate; +class QQuickSwipeDelegateAttached; +class QQuickSwipeDelegateAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeDelegate : public QQuickItemDelegate +{ + Q_OBJECT + Q_PROPERTY(QQuickSwipe *swipe READ swipe CONSTANT FINAL) + QML_NAMED_ELEMENT(SwipeDelegate) + QML_ATTACHED(QQuickSwipeDelegateAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSwipeDelegate(QQuickItem *parent = nullptr); + + QQuickSwipe *swipe() const; + + enum Side { Left = 1, Right = -1 }; + Q_ENUM(Side) + + static QQuickSwipeDelegateAttached *qmlAttachedProperties(QObject *object); + +protected: + bool childMouseEventFilter(QQuickItem *child, QEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseUngrabEvent() override; + void touchEvent(QTouchEvent *event) override; + + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickSwipeDelegate) + Q_DECLARE_PRIVATE(QQuickSwipeDelegate) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeDelegateAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool pressed READ isPressed NOTIFY pressedChanged FINAL) + +public: + explicit QQuickSwipeDelegateAttached(QObject *object = nullptr); + + bool isPressed() const; + void setPressed(bool pressed); + +Q_SIGNALS: + void pressedChanged(); + void clicked(); + +private: + Q_DISABLE_COPY(QQuickSwipeDelegateAttached) + Q_DECLARE_PRIVATE(QQuickSwipeDelegateAttached) +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QQuickSwipeDelegate::Side) + +#endif // QQUICKSWIPEDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d9af949d0ab2e0c2d6421151456ad3b4978ea5cb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipedelegate_p_p.h @@ -0,0 +1,50 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWIPEDELEGATE_P_P_H +#define QQUICKSWIPEDELEGATE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickSwipeDelegate; + +class QQuickSwipeDelegatePrivate : public QQuickItemDelegatePrivate +{ + Q_DECLARE_PUBLIC(QQuickSwipeDelegate) + +public: + QQuickSwipeDelegatePrivate(QQuickSwipeDelegate *control); + + bool handleMousePressEvent(QQuickItem *item, QMouseEvent *event); + bool handleMouseMoveEvent(QQuickItem *item, QMouseEvent *event); + bool handleMouseReleaseEvent(QQuickItem *item, QMouseEvent *event); + void forwardMouseEvent(QMouseEvent *event, QQuickItem *destination, QPointF localPos); + bool attachedObjectsSetPressed(QQuickItem *item, QPointF scenePos, bool pressed, bool cancel = false); + QQuickItem *getPressedItem(QQuickItem *childItem, QMouseEvent *event) const; + + void resizeContent() override; + void resizeBackground() override; + + QPalette defaultPalette() const override; + + QQuickSwipe swipe; + QQuickItem *pressedItem = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKSWIPEDELEGATE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipeview_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipeview_p.h new file mode 100644 index 0000000000000000000000000000000000000000..648601a925409efeef85289badd8b1af6274fe84 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswipeview_p.h @@ -0,0 +1,118 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWIPEVIEW_P_H +#define QQUICKSWIPEVIEW_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickSwipeViewAttached; +class QQuickSwipeViewPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeView : public QQuickContainer +{ + Q_OBJECT + // 2.1 (Qt 5.8) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION(2, 1)) + // 2.2 (Qt 5.9) + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL REVISION(2, 2)) + // 2.3 (Qt 5.10) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3)) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3)) + QML_NAMED_ELEMENT(SwipeView) + QML_ATTACHED(QQuickSwipeViewAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSwipeView(QQuickItem *parent = nullptr); + + static QQuickSwipeViewAttached *qmlAttachedProperties(QObject *object); + + // 2.1 (Qt 5.8) + bool isInteractive() const; + void setInteractive(bool interactive); + + // 2.2 (Qt 5.9) + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + // 2.3 (Qt 5.10) + bool isHorizontal() const; + bool isVertical() const; + +Q_SIGNALS: + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void interactiveChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void orientationChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void itemAdded(int index, QQuickItem *item) override; + void itemMoved(int index, QQuickItem *item) override; + void itemRemoved(int index, QQuickItem *item) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickSwipeView) + Q_DECLARE_PRIVATE(QQuickSwipeView) +}; + +class QQuickSwipeViewAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwipeViewAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY isCurrentItemChanged FINAL) + Q_PROPERTY(QQuickSwipeView *view READ view NOTIFY viewChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool isNextItem READ isNextItem NOTIFY isNextItemChanged FINAL REVISION(2, 1)) + Q_PROPERTY(bool isPreviousItem READ isPreviousItem NOTIFY isPreviousItemChanged FINAL REVISION(2, 1)) + +public: + explicit QQuickSwipeViewAttached(QObject *parent = nullptr); + + int index() const; + bool isCurrentItem() const; + QQuickSwipeView *view() const; + + // 2.1 (Qt 5.8) + bool isNextItem() const; + bool isPreviousItem() const; + +Q_SIGNALS: + void indexChanged(); + void isCurrentItemChanged(); + void viewChanged(); + // 2.1 (Qt 5.8) + /*Q_REVISION(2, 1)*/ void isNextItemChanged(); + /*Q_REVISION(2, 1)*/ void isPreviousItemChanged(); + +private: + Q_DISABLE_COPY(QQuickSwipeViewAttached) + Q_DECLARE_PRIVATE(QQuickSwipeViewAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSWIPEVIEW_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitch_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitch_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7953a818c8e71c83f62191da9f96953e46a91f0c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitch_p.h @@ -0,0 +1,64 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWITCH_P_H +#define QQUICKSWITCH_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSwitchPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwitch : public QQuickAbstractButton +{ + Q_OBJECT + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL) + QML_NAMED_ELEMENT(Switch) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSwitch(QQuickItem *parent = nullptr); + + qreal position() const; + void setPosition(qreal position); + + qreal visualPosition() const; + +Q_SIGNALS: + void positionChanged(); + void visualPositionChanged(); + +protected: + void mouseMoveEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + + void mirrorChange() override; + + void nextCheckState() override; + void buttonChange(ButtonChange change) override; + + QFont defaultFont() const override; + +private: + Q_DISABLE_COPY(QQuickSwitch) + Q_DECLARE_PRIVATE(QQuickSwitch) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSWITCH_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitchdelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitchdelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..dfde366f341ce542c497121a0f3bc7ca0d4b6f79 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickswitchdelegate_p.h @@ -0,0 +1,64 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKSWITCHDELEGATE_P_H +#define QQUICKSWITCHDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickSwitchDelegatePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickSwitchDelegate : public QQuickItemDelegate +{ + Q_OBJECT + Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL) + Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL) + QML_NAMED_ELEMENT(SwitchDelegate) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickSwitchDelegate(QQuickItem *parent = nullptr); + + qreal position() const; + void setPosition(qreal position); + + qreal visualPosition() const; + +Q_SIGNALS: + void positionChanged(); + void visualPositionChanged(); + +protected: + void mouseMoveEvent(QMouseEvent *event) override; +#if QT_CONFIG(quicktemplates2_multitouch) + void touchEvent(QTouchEvent *event) override; +#endif + + QFont defaultFont() const override; + + void mirrorChange() override; + + void nextCheckState() override; + void buttonChange(ButtonChange change) override; + +private: + Q_DISABLE_COPY(QQuickSwitchDelegate) + Q_DECLARE_PRIVATE(QQuickSwitchDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKSWITCHDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8d3329ac3c626b4e77eed283370db7a0fc335833 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbar_p.h @@ -0,0 +1,102 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTABBAR_P_H +#define QQUICKTABBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_REQUIRE_CONFIG(quicktemplates2_container); + +QT_BEGIN_NAMESPACE + +class QQuickTabBarPrivate; +class QQuickTabBarAttached; +class QQuickTabBarAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTabBar : public QQuickContainer +{ + Q_OBJECT + Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL) + QML_NAMED_ELEMENT(TabBar) + QML_ATTACHED(QQuickTabBarAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTabBar(QQuickItem *parent = nullptr); + + enum Position { + Header, + Footer + }; + Q_ENUM(Position) + + Position position() const; + void setPosition(Position position); + + static QQuickTabBarAttached *qmlAttachedProperties(QObject *object); + +Q_SIGNALS: + void positionChanged(); + +protected: + void updatePolish() override; + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + bool isContent(QQuickItem *item) const override; + void itemAdded(int index, QQuickItem *item) override; + void itemMoved(int index, QQuickItem *item) override; + void itemRemoved(int index, QQuickItem *item) override; +#if QT_CONFIG(wheelevent) + void wheelEvent(QWheelEvent *event) override; +#endif + + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickTabBar) + Q_DECLARE_PRIVATE(QQuickTabBar) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTabBarAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(int index READ index NOTIFY indexChanged FINAL) + Q_PROPERTY(QQuickTabBar *tabBar READ tabBar NOTIFY tabBarChanged FINAL) + Q_PROPERTY(QQuickTabBar::Position position READ position NOTIFY positionChanged FINAL) + +public: + explicit QQuickTabBarAttached(QObject *parent = nullptr); + + int index() const; + QQuickTabBar *tabBar() const; + QQuickTabBar::Position position() const; + +Q_SIGNALS: + void indexChanged(); + void tabBarChanged(); + void positionChanged(); + +private: + Q_DISABLE_COPY(QQuickTabBarAttached) + Q_DECLARE_PRIVATE(QQuickTabBarAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTABBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3691004481f37c267ba562158d9702388812f200 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktabbutton_p.h @@ -0,0 +1,46 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTABBUTTON_P_H +#define QQUICKTABBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickTabButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTabButton : public QQuickAbstractButton +{ + Q_OBJECT + QML_NAMED_ELEMENT(TabButton) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTabButton(QQuickItem *parent = nullptr); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DECLARE_PRIVATE(QQuickTabButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTABBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f7d6410e33bb42e8c31d39fde5e3093a2b90ba2e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p.h @@ -0,0 +1,179 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTAREA_P_H +#define QQUICKTEXTAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickText; +class QQuickTextAreaPrivate; +class QQuickTextAreaAttached; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTextArea : public QQuickTextEdit +{ + Q_OBJECT + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override + Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged3 FINAL) + Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged3 FINAL) + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL) + Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1)) + Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1)) + // 2.5 (Qt 5.12) + Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background") + QML_NAMED_ELEMENT(TextArea) + QML_ATTACHED(QQuickTextAreaAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTextArea(QQuickItem *parent = nullptr); + ~QQuickTextArea(); + + static QQuickTextAreaAttached *qmlAttachedProperties(QObject *object); + + QFont font() const; + void setFont(const QFont &font); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + QString placeholderText() const; + void setPlaceholderText(const QString &text); + + Qt::FocusReason focusReason() const; + void setFocusReason(Qt::FocusReason reason); + + bool contains(const QPointF &point) const override; + + // 2.1 (Qt 5.8) + bool isHovered() const; + void setHovered(bool hovered); + + bool isHoverEnabled() const; + void setHoverEnabled(bool enabled); + void resetHoverEnabled(); + + // 2.5 (Qt 5.12) + QColor placeholderTextColor() const; + void setPlaceholderTextColor(const QColor &color); + + qreal implicitBackgroundWidth() const; + qreal implicitBackgroundHeight() const; + + qreal topInset() const; + void setTopInset(qreal inset); + void resetTopInset(); + + qreal leftInset() const; + void setLeftInset(qreal inset); + void resetLeftInset(); + + qreal rightInset() const; + void setRightInset(qreal inset); + void resetRightInset(); + + qreal bottomInset() const; + void setBottomInset(qreal inset); + void resetBottomInset(); + +Q_SIGNALS: + void fontChanged(); + void implicitWidthChanged3(); + void implicitHeightChanged3(); + void backgroundChanged(); + void placeholderTextChanged(); + void focusReasonChanged(); + void pressAndHold(QQuickMouseEvent *event); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event); + Q_REVISION(2, 1) void released(QQuickMouseEvent *event); + Q_REVISION(2, 1) void hoveredChanged(); + Q_REVISION(2, 1) void hoverEnabledChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void placeholderTextColorChanged(); + Q_REVISION(2, 5) void implicitBackgroundWidthChanged(); + Q_REVISION(2, 5) void implicitBackgroundHeightChanged(); + Q_REVISION(2, 5) void topInsetChanged(); + Q_REVISION(2, 5) void leftInsetChanged(); + Q_REVISION(2, 5) void rightInsetChanged(); + Q_REVISION(2, 5) void bottomInsetChanged(); + +protected: + friend struct QQuickPressHandler; + + void classBegin() override; + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset); + + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override; + + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; +#if QT_CONFIG(quicktemplates2_hover) + void hoverEnterEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; +#endif + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void timerEvent(QTimerEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickTextArea) + Q_DECLARE_PRIVATE(QQuickTextArea) +}; + +class QQuickTextAreaAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTextAreaAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickTextArea *flickable READ flickable WRITE setFlickable NOTIFY flickableChanged FINAL) + +public: + explicit QQuickTextAreaAttached(QObject *parent); + + QQuickTextArea *flickable() const; + void setFlickable(QQuickTextArea *control); + +Q_SIGNALS: + void flickableChanged(); + +private: + Q_DISABLE_COPY(QQuickTextAreaAttached) + Q_DECLARE_PRIVATE(QQuickTextAreaAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTAREA_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b683d18772b851c730c13a4aa9cb8b2e64cb1a7c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextarea_p_p.h @@ -0,0 +1,133 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTAREA_P_P_H +#define QQUICKTEXTAREA_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickFlickable; + +class QQuickTextAreaPrivate : public QQuickTextEditPrivate, public QQuickItemChangeListener +{ +public: + Q_DECLARE_PUBLIC(QQuickTextArea) + + QQuickTextAreaPrivate(); + ~QQuickTextAreaPrivate(); + + static QQuickTextAreaPrivate *get(QQuickTextArea *item) + { + return static_cast(QObjectPrivate::get(item)); + } + + inline QMarginsF getInset() const { return QMarginsF(getLeftInset(), getTopInset(), getRightInset(), getBottomInset()); } + inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; } + inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; } + inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; } + inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; } + + void setTopInset(qreal value, bool reset = false); + void setLeftInset(qreal value, bool reset = false); + void setRightInset(qreal value, bool reset = false); + void setBottomInset(qreal value, bool reset = false); + + void resizeBackground(); + + void resolveFont(); + void inheritFont(const QFont &font); + void updateFont(const QFont &font); + inline void setFont_helper(const QFont &font) { + if (sourceFont.resolveMask() == font.resolveMask() && sourceFont == font) + return; + updateFont(font); + } + +#if QT_CONFIG(quicktemplates2_hover) + void updateHoverEnabled(bool h, bool e); +#endif + + void attachFlickable(QQuickFlickable *flickable); + void detachFlickable(); + void ensureCursorVisible(); + void resizeFlickableControl(); + void resizeFlickableContent(); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + + qreal getImplicitWidth() const override; + qreal getImplicitHeight() const override; + + void implicitWidthChanged() override; + void implicitHeightChanged() override; + + void readOnlyChanged(bool isReadOnly); + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; +#endif + + void cancelBackground(); + void executeBackground(bool complete = false); + + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + QPalette defaultPalette() const override; + + bool setLastFocusChangeReason(Qt::FocusReason reason) override; + +#if QT_CONFIG(quicktemplates2_hover) + bool hovered = false; + bool explicitHoverEnabled = false; +#endif + + struct ExtraData { + bool hasTopInset = false; + bool hasLeftInset = false; + bool hasRightInset = false; + bool hasBottomInset = false; + bool hasBackgroundWidth = false; + bool hasBackgroundHeight = false; + qreal topInset = 0; + qreal leftInset = 0; + qreal rightInset = 0; + qreal bottomInset = 0; + QFont requestedFont; + QPalette requestedPalette; + }; + QLazilyAllocated extra; + + bool resizingBackground = false; + QPalette resolvedPalette; + QQuickDeferredPointer background; + QString placeholder; + QColor placeholderColor; + QQuickPressHandler pressHandler; + QQuickFlickable *flickable = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTAREA_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p.h new file mode 100644 index 0000000000000000000000000000000000000000..dcefbba442a7be0a4594579bb6ec10f27aee1aa3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p.h @@ -0,0 +1,151 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTFIELD_P_H +#define QQUICKTEXTFIELD_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTextFieldPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTextField : public QQuickTextInput +{ + Q_OBJECT + Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) // override + Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged3 FINAL) + Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged3 FINAL) + Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL) + Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL) + Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1)) + Q_PROPERTY(bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1)) + // 2.5 (Qt 5.12) + Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5)) + Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5)) + Q_CLASSINFO("DeferredPropertyNames", "background") + QML_NAMED_ELEMENT(TextField) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTextField(QQuickItem *parent = nullptr); + ~QQuickTextField(); + + QFont font() const; + void setFont(const QFont &font); + + QQuickItem *background() const; + void setBackground(QQuickItem *background); + + QString placeholderText() const; + void setPlaceholderText(const QString &text); + + Qt::FocusReason focusReason() const; + void setFocusReason(Qt::FocusReason reason); + + // 2.1 (Qt 5.8) + bool isHovered() const; + void setHovered(bool hovered); + + bool isHoverEnabled() const; + void setHoverEnabled(bool enabled); + void resetHoverEnabled(); + + // 2.5 (Qt 5.12) + QColor placeholderTextColor() const; + void setPlaceholderTextColor(const QColor &color); + + qreal implicitBackgroundWidth() const; + qreal implicitBackgroundHeight() const; + + qreal topInset() const; + void setTopInset(qreal inset); + void resetTopInset(); + + qreal leftInset() const; + void setLeftInset(qreal inset); + void resetLeftInset(); + + qreal rightInset() const; + void setRightInset(qreal inset); + void resetRightInset(); + + qreal bottomInset() const; + void setBottomInset(qreal inset); + void resetBottomInset(); + +Q_SIGNALS: + void fontChanged(); + void implicitWidthChanged3(); + void implicitHeightChanged3(); + void backgroundChanged(); + void placeholderTextChanged(); + void focusReasonChanged(); + void pressAndHold(QQuickMouseEvent *event); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void pressed(QQuickMouseEvent *event); + Q_REVISION(2, 1) void released(QQuickMouseEvent *event); + Q_REVISION(2, 1) void hoveredChanged(); + Q_REVISION(2, 1) void hoverEnabledChanged(); + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) void placeholderTextColorChanged(); + Q_REVISION(2, 5) void implicitBackgroundWidthChanged(); + Q_REVISION(2, 5) void implicitBackgroundHeightChanged(); + Q_REVISION(2, 5) void topInsetChanged(); + Q_REVISION(2, 5) void leftInsetChanged(); + Q_REVISION(2, 5) void rightInsetChanged(); + Q_REVISION(2, 5) void bottomInsetChanged(); + +protected: + friend struct QQuickPressHandler; + + void classBegin() override; + void componentComplete() override; + + void itemChange(ItemChange change, const ItemChangeData &value) override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + virtual void insetChange(const QMarginsF &newInset, const QMarginsF &oldInset); + + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override; + + void focusInEvent(QFocusEvent *event) override; + void focusOutEvent(QFocusEvent *event) override; +#if QT_CONFIG(quicktemplates2_hover) + void hoverEnterEvent(QHoverEvent *event) override; + void hoverLeaveEvent(QHoverEvent *event) override; +#endif + void mousePressEvent(QMouseEvent *event) override; + void mouseMoveEvent(QMouseEvent *event) override; + void mouseReleaseEvent(QMouseEvent *event) override; + void mouseDoubleClickEvent(QMouseEvent *event) override; + void timerEvent(QTimerEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickTextField) + Q_DECLARE_PRIVATE(QQuickTextField) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTFIELD_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..27865846aefc03ec8b25600e745e3ccf8fe3b6e7 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktextfield_p_p.h @@ -0,0 +1,128 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTEXTFIELD_P_P_H +#define QQUICKTEXTFIELD_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include + +#include + +#if QT_CONFIG(accessibility) +#include +#endif + +QT_BEGIN_NAMESPACE + +class QQuickTextFieldPrivate : public QQuickTextInputPrivate, public QQuickItemChangeListener +#if QT_CONFIG(accessibility) + , public QAccessible::ActivationObserver +#endif +{ +public: + Q_DECLARE_PUBLIC(QQuickTextField) + + QQuickTextFieldPrivate(); + ~QQuickTextFieldPrivate(); + + static QQuickTextFieldPrivate *get(QQuickTextField *item) { + return static_cast(QObjectPrivate::get(item)); } + + inline QMarginsF getInset() const { return QMarginsF(getLeftInset(), getTopInset(), getRightInset(), getBottomInset()); } + inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; } + inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; } + inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; } + inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; } + + void setTopInset(qreal value, bool reset = false); + void setLeftInset(qreal value, bool reset = false); + void setRightInset(qreal value, bool reset = false); + void setBottomInset(qreal value, bool reset = false); + + void resizeBackground(); + + void resolveFont(); + void inheritFont(const QFont &font); + void updateFont(const QFont &font); + inline void setFont_helper(const QFont &font) { + if (sourceFont.resolveMask() == font.resolveMask() && sourceFont == font) + return; + updateFont(font); + } + +#if QT_CONFIG(quicktemplates2_hover) + void updateHoverEnabled(bool h, bool e); +#endif + + qreal getImplicitWidth() const override; + qreal getImplicitHeight() const override; + + void implicitWidthChanged() override; + void implicitHeightChanged() override; + + void readOnlyChanged(bool isReadOnly); + void echoModeChanged(QQuickTextField::EchoMode echoMode); + +#if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; +#endif + + void cancelBackground(); + void executeBackground(bool complete = false); + + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override; + void itemImplicitWidthChanged(QQuickItem *item) override; + void itemImplicitHeightChanged(QQuickItem *item) override; + void itemDestroyed(QQuickItem *item) override; + + QPalette defaultPalette() const override; + + bool setLastFocusChangeReason(Qt::FocusReason reason) override; + +#if QT_CONFIG(quicktemplates2_hover) + bool hovered = false; + bool explicitHoverEnabled = false; +#endif + + struct ExtraData { + bool hasTopInset = false; + bool hasLeftInset = false; + bool hasRightInset = false; + bool hasBottomInset = false; + bool hasBackgroundWidth = false; + bool hasBackgroundHeight = false; + qreal topInset = 0; + qreal leftInset = 0; + qreal rightInset = 0; + qreal bottomInset = 0; + QFont requestedFont; + }; + QLazilyAllocated extra; + + bool resizingBackground = false; + QQuickDeferredPointer background; + QString placeholder; + QColor placeholderColor; + QQuickPressHandler pressHandler; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTEXTFIELD_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ddf20e43255296f35fc4559a298a0212c4b41503 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p.h @@ -0,0 +1,75 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTHEME_P_H +#define QQUICKTHEME_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickThemePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTheme +{ +public: + QQuickTheme(); + ~QQuickTheme(); + + static QQuickTheme *instance(); + + enum Scope { + System, + Button, + CheckBox, + ComboBox, + GroupBox, + ItemView, + Label, + ListView, + Menu, + MenuBar, + RadioButton, + SpinBox, + Switch, + TabBar, + TextArea, + TextField, + ToolBar, + ToolTip, + Tumbler + }; + + static QFont font(Scope scope); + static QPalette palette(Scope scope); + + void setFont(Scope scope, const QFont &font); + void setPalette(Scope scope, const QPalette &palette); + + void setUsePlatformPalette(const bool enable) { preferPlatformTheme = enable; } + bool usePlatformPalette() { return preferPlatformTheme; } + +private: + Q_DISABLE_COPY(QQuickTheme) + Q_DECLARE_PRIVATE(QQuickTheme) + QScopedPointer d_ptr; + bool preferPlatformTheme = false; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTHEME_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7acadcd3c448ae62f58f4636837375de9aceb15c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktheme_p_p.h @@ -0,0 +1,42 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTHEME_P_P_H +#define QQUICKTHEME_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickThemePrivate +{ +public: + static QQuickThemePrivate *get(QQuickTheme *theme) + { + return theme->d_func(); + } + + static std::unique_ptr instance; + + static const int NScopes = QQuickTheme::Tumbler + 1; + + QScopedPointer defaultFont; + QScopedPointer defaultPalette; + QSharedPointer fonts[NScopes]; + QSharedPointer palettes[NScopes]; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTHEME_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbar_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbar_p.h new file mode 100644 index 0000000000000000000000000000000000000000..18919abd0c34c7513d38f2c794d7ac170143a201 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbar_p.h @@ -0,0 +1,60 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTOOLBAR_P_H +#define QQUICKTOOLBAR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickToolBarPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickToolBar : public QQuickPane +{ + Q_OBJECT + Q_PROPERTY(Position position READ position WRITE setPosition NOTIFY positionChanged FINAL) + QML_NAMED_ELEMENT(ToolBar) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickToolBar(QQuickItem *parent = nullptr); + + enum Position { + Header, + Footer + }; + Q_ENUM(Position) + + Position position() const; + void setPosition(Position position); + +Q_SIGNALS: + void positionChanged(); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickToolBar) + Q_DECLARE_PRIVATE(QQuickToolBar) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTOOLBAR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbutton_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbutton_p.h new file mode 100644 index 0000000000000000000000000000000000000000..19a16e2f6f049717aaae74339ece949f20bb2545 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolbutton_p.h @@ -0,0 +1,42 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTOOLBUTTON_P_H +#define QQUICKTOOLBUTTON_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickToolButtonPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickToolButton : public QQuickButton +{ + Q_OBJECT + QML_NAMED_ELEMENT(ToolButton) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickToolButton(QQuickItem *parent = nullptr); + +protected: + QFont defaultFont() const override; + +private: + Q_DECLARE_PRIVATE(QQuickToolButton) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTOOLBUTTON_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolseparator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolseparator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..9a709fe5cda50a314e039e6e4c9c8b39a1990b9f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktoolseparator_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTOOLSEPARATOR_P_H +#define QQUICKTOOLSEPARATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickToolSeparatorPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickToolSeparator : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) + Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL) + Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL) + QML_NAMED_ELEMENT(ToolSeparator) + QML_ADDED_IN_VERSION(2, 1) + +public: + explicit QQuickToolSeparator(QQuickItem *parent = nullptr); + + Qt::Orientation orientation() const; + void setOrientation(Qt::Orientation orientation); + + bool isHorizontal() const; + bool isVertical() const; + +Q_SIGNALS: + void orientationChanged(); + +protected: + QFont defaultFont() const override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; +#endif + +private: + Q_DISABLE_COPY(QQuickToolSeparator) + Q_DECLARE_PRIVATE(QQuickToolSeparator) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTOOLSEPARATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktooltip_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktooltip_p.h new file mode 100644 index 0000000000000000000000000000000000000000..224241c820b90a04a2c0ab1d0870f3afe96b87c5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktooltip_p.h @@ -0,0 +1,120 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTOOLTIP_P_H +#define QQUICKTOOLTIP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQuickToolTipPrivate; +class QQuickToolTipAttached; +class QQuickToolTipAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickToolTip : public QQuickPopup +{ + Q_OBJECT + Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL) + Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL) + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + QML_NAMED_ELEMENT(ToolTip) + QML_ATTACHED(QQuickToolTipAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickToolTip(QQuickItem *parent = nullptr); + + QString text() const; + void setText(const QString &text); + + int delay() const; + void setDelay(int delay); + + int timeout() const; + void setTimeout(int timeout); + + void setVisible(bool visible) override; + + static QQuickToolTipAttached *qmlAttachedProperties(QObject *object); + +Q_SIGNALS: + void textChanged(); + void delayChanged(); + void timeoutChanged(); + +public Q_SLOTS: + Q_REVISION(2, 5) void show(const QString &text, int ms = -1); + Q_REVISION(2, 5) void hide(); + +protected: + QFont defaultFont() const override; + + void itemChange(QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &data) override; + void timerEvent(QTimerEvent *event) override; + +#if QT_CONFIG(accessibility) + QAccessible::Role accessibleRole() const override; + void accessibilityActiveChanged(bool active) override; +#endif + +private: + Q_DISABLE_COPY(QQuickToolTip) + Q_DECLARE_PRIVATE(QQuickToolTip) +}; + +class Q_QUICKTEMPLATES2_EXPORT QQuickToolTipAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged FINAL) + Q_PROPERTY(int delay READ delay WRITE setDelay NOTIFY delayChanged FINAL) + Q_PROPERTY(int timeout READ timeout WRITE setTimeout NOTIFY timeoutChanged FINAL) + Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL) + Q_PROPERTY(QQuickToolTip *toolTip READ toolTip CONSTANT FINAL) + +public: + explicit QQuickToolTipAttached(QObject *parent = nullptr); + + QString text() const; + void setText(const QString &text); + + int delay() const; + void setDelay(int delay); + + int timeout() const; + void setTimeout(int timeout); + + bool isVisible() const; + void setVisible(bool visible); + + QQuickToolTip *toolTip() const; + +Q_SIGNALS: + void textChanged(); + void delayChanged(); + void timeoutChanged(); + void visibleChanged(); + +public Q_SLOTS: + void show(const QString &text, int ms = -1); + void hide(); + +private: + Q_DISABLE_COPY(QQuickToolTipAttached) + Q_DECLARE_PRIVATE(QQuickToolTipAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTOOLTIP_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktreeviewdelegate_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktreeviewdelegate_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c92ca57114b69b88ed52d56b0e7ed64ab8c6cbfa --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktreeviewdelegate_p.h @@ -0,0 +1,110 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTREEVIEWDELEGATE_P_H +#define QQUICKTREEVIEWDELEGATE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTreeViewDelegatePrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTreeViewDelegate : public QQuickItemDelegate +{ + Q_OBJECT + Q_PROPERTY(qreal indentation READ indentation WRITE setIndentation NOTIFY indentationChanged FINAL) + Q_PROPERTY(qreal leftMargin READ leftMargin WRITE setLeftMargin NOTIFY leftMarginChanged FINAL) + Q_PROPERTY(qreal rightMargin READ rightMargin WRITE setRightMargin NOTIFY rightMarginChanged FINAL) + + // Required properties + Q_PROPERTY(QQuickTreeView *treeView READ treeView WRITE setTreeView NOTIFY treeviewChanged REQUIRED FINAL) + Q_PROPERTY(bool isTreeNode READ isTreeNode WRITE setIsTreeNode NOTIFY isTreeNodeChanged REQUIRED FINAL) + Q_PROPERTY(bool hasChildren READ hasChildren WRITE setHasChildren NOTIFY hasChildrenChanged REQUIRED FINAL) + Q_PROPERTY(bool expanded READ expanded WRITE setExpanded NOTIFY expandedChanged REQUIRED FINAL) + Q_PROPERTY(int depth READ depth WRITE setDepth NOTIFY depthChanged REQUIRED FINAL) + Q_PROPERTY(bool current READ current WRITE setCurrent NOTIFY currentChanged REQUIRED FINAL REVISION(6, 4)) + Q_PROPERTY(bool selected READ selected WRITE setSelected NOTIFY selectedChanged REQUIRED FINAL REVISION(6, 4)) + Q_PROPERTY(bool editing READ editing WRITE setEditing NOTIFY editingChanged REQUIRED FINAL REVISION(6, 5)) + + QML_NAMED_ELEMENT(TreeViewDelegate) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickTreeViewDelegate(QQuickItem *parent = nullptr); + + qreal indentation() const; + void setIndentation(qreal indentation); + + bool isTreeNode() const; + void setIsTreeNode(bool isTreeNode); + + bool hasChildren() const; + void setHasChildren(bool hasChildren); + + bool expanded() const; + void setExpanded(bool expanded); + + bool current() const; + void setCurrent(bool current); + + bool selected() const; + void setSelected(bool selected); + + bool editing() const; + void setEditing(bool editing); + + int depth() const; + void setDepth(int depth); + + QQuickTreeView *treeView() const; + void setTreeView(QQuickTreeView *treeView); + + qreal leftMargin() const; + void setLeftMargin(qreal leftMargin); + + qreal rightMargin() const; + void setRightMargin(qreal rightMargin); + +Q_SIGNALS: + void indicatorChanged(); + void indentationChanged(); + void isTreeNodeChanged(); + void hasChildrenChanged(); + void expandedChanged(); + void depthChanged(); + void treeviewChanged(); + void leftMarginChanged(); + void rightMarginChanged(); + Q_REVISION(6, 4) void currentChanged(); + Q_REVISION(6, 4) void selectedChanged(); + Q_REVISION(6, 5) void editingChanged(); + +protected: + QFont defaultFont() const override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void componentComplete() override; + void mousePressEvent(QMouseEvent *event) override; + +private: + Q_DISABLE_COPY(QQuickTreeViewDelegate) + Q_DECLARE_PRIVATE(QQuickTreeViewDelegate) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTREEVIEWDELEGATE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..915afdcc9a38d6c7d324a3d0c6afff97b9663f4b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p.h @@ -0,0 +1,143 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTUMBLER_P_H +#define QQUICKTUMBLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickTumblerAttached; +class QQuickTumblerPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTumbler : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL) + Q_PROPERTY(int count READ count NOTIFY countChanged FINAL) + Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex NOTIFY currentIndexChanged FINAL) + Q_PROPERTY(QQuickItem *currentItem READ currentItem NOTIFY currentItemChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + Q_PROPERTY(int visibleItemCount READ visibleItemCount WRITE setVisibleItemCount NOTIFY visibleItemCountChanged FINAL) + // 2.1 (Qt 5.8) + Q_PROPERTY(bool wrap READ wrap WRITE setWrap RESET resetWrap NOTIFY wrapChanged FINAL REVISION(2, 1)) + // 2.2 (Qt 5.9) + Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged FINAL REVISION(2, 2)) + QML_NAMED_ELEMENT(Tumbler) + QML_ATTACHED(QQuickTumblerAttached) + QML_ADDED_IN_VERSION(2, 0) + +public: + explicit QQuickTumbler(QQuickItem *parent = nullptr); + ~QQuickTumbler(); + + QVariant model() const; + void setModel(const QVariant &model); + + int count() const; + + int currentIndex() const; + void setCurrentIndex(int currentIndex); + QQuickItem *currentItem() const; + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + + int visibleItemCount() const; + void setVisibleItemCount(int visibleItemCount); + + static QQuickTumblerAttached *qmlAttachedProperties(QObject *object); + + // 2.1 (Qt 5.8) + bool wrap() const; + void setWrap(bool wrap); + void resetWrap(); + + // 2.2 (Qt 5.9) + bool isMoving() const; + + enum PositionMode { + Beginning, + Center, + End, + Visible, // ListView-only + Contain, + SnapPosition + }; + Q_ENUM(PositionMode) + + // 2.5 (Qt 5.12) + Q_REVISION(2, 5) Q_INVOKABLE void positionViewAtIndex(int index, PositionMode mode); + +Q_SIGNALS: + void modelChanged(); + void countChanged(); + void currentIndexChanged(); + void currentItemChanged(); + void delegateChanged(); + void visibleItemCountChanged(); + // 2.1 (Qt 5.8) + Q_REVISION(2, 1) void wrapChanged(); + // 2.2 (Qt 5.9) + Q_REVISION(2, 2) void movingChanged(); + +protected: + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void componentComplete() override; + void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override; + void keyPressEvent(QKeyEvent *event) override; + void updatePolish() override; + + QFont defaultFont() const override; + +private: + Q_DISABLE_COPY(QQuickTumbler) + Q_DECLARE_PRIVATE(QQuickTumbler) + + Q_PRIVATE_SLOT(d_func(), void _q_updateItemWidths()) + Q_PRIVATE_SLOT(d_func(), void _q_updateItemHeights()) + Q_PRIVATE_SLOT(d_func(), void _q_onViewCurrentIndexChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_onViewCountChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_onViewOffsetChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_onViewContentYChanged()) +}; + +class QQuickTumblerAttachedPrivate; + +class Q_QUICKTEMPLATES2_EXPORT QQuickTumblerAttached : public QObject +{ + Q_OBJECT + Q_PROPERTY(QQuickTumbler *tumbler READ tumbler CONSTANT FINAL) + Q_PROPERTY(qreal displacement READ displacement NOTIFY displacementChanged FINAL) + +public: + explicit QQuickTumblerAttached(QObject *parent = nullptr); + + QQuickTumbler *tumbler() const; + qreal displacement() const; + +Q_SIGNALS: + void displacementChanged(); + +private: + Q_DISABLE_COPY(QQuickTumblerAttached) + Q_DECLARE_PRIVATE(QQuickTumblerAttached) +}; + +QT_END_NAMESPACE + +#endif // QQUICKTUMBLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3730b436127a43efe65d127797d8cfb95b7cda62 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquicktumbler_p_p.h @@ -0,0 +1,124 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKTUMBLER_P_P_H +#define QQUICKTUMBLER_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKTEMPLATES2_EXPORT QQuickTumblerPrivate : public QQuickControlPrivate +{ + Q_DECLARE_PUBLIC(QQuickTumbler) + +public: + enum ContentItemType { + NoContentItem, + UnsupportedContentItemType, + PathViewContentItem, + ListViewContentItem + }; + + QQuickItem *determineViewType(QQuickItem *contentItem); + void resetViewData(); + QList viewContentItemChildItems() const; + + static QQuickTumblerPrivate *get(QQuickTumbler *tumbler); + + QPalette defaultPalette() const override; + + QVariant model; + QQmlComponent *delegate = nullptr; + int visibleItemCount = 5; + bool wrap = true; + bool explicitWrap = false; + bool modelBeingSet = false; + bool currentIndexSetDuringModelChange = false; + QQuickItem *view = nullptr; + QQuickItem *viewContentItem = nullptr; + ContentItemType viewContentItemType = UnsupportedContentItemType; + union { + qreal viewOffset; // PathView + qreal viewContentY; // ListView + }; + int currentIndex = -1; + int pendingCurrentIndex = -1; + bool ignoreCurrentIndexChanges = false; + int count = 0; + bool ignoreSignals = false; + + void _q_updateItemHeights(); + void _q_updateItemWidths(); + void _q_onViewCurrentIndexChanged(); + void _q_onViewCountChanged(); + void _q_onViewOffsetChanged(); + void _q_onViewContentYChanged(); + + void calculateDisplacements(); + + void disconnectFromView(); + void setupViewData(QQuickItem *newControlContentItem); + void warnAboutIncorrectContentItem(); + void syncCurrentIndex(); + void setPendingCurrentIndex(int index); + + enum PropertyChangeReason { + UserChange, + InternalChange + }; + + static QString propertyChangeReasonToString(PropertyChangeReason changeReason); + + void setCurrentIndex(int newCurrentIndex, PropertyChangeReason changeReason = InternalChange); + void setCount(int newCount); + void setWrapBasedOnCount(); + void setWrap(bool shouldWrap, bool isExplicit); + void beginSetModel(); + void endSetModel(); + + void itemChildAdded(QQuickItem *, QQuickItem *) override; + void itemChildRemoved(QQuickItem *, QQuickItem *) override; + void itemGeometryChanged(QQuickItem *, QQuickGeometryChange , const QRectF &) override; +}; + +class QQuickTumblerAttachedPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QQuickTumblerAttached) + +public: + static QQuickTumblerAttachedPrivate *get(QQuickTumblerAttached *attached) + { + return attached->d_func(); + } + + void init(QQuickItem *delegateItem); + + void calculateDisplacement(); + void emitIfDisplacementChanged(qreal oldDisplacement, qreal newDisplacement); + + // The Tumbler that contains the delegate. Required to calculated the displacement. + QPointer tumbler; + // The index of the delegate. Used to calculate the displacement. + int index = -1; + // The displacement for our delegate. + qreal displacement = 0; +}; + +QT_END_NAMESPACE + +#endif // QQUICKTUMBLER_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickvelocitycalculator_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickvelocitycalculator_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..39ccc008fe6053f7c34d7c5b3c2c9237785363dd --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickvelocitycalculator_p_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKVELOCITYCALCULATOR_P_P_H +#define QQUICKVELOCITYCALCULATOR_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickVelocityCalculator +{ +public: + void startMeasuring(const QPointF &point1, qint64 timestamp = 0); + void stopMeasuring(const QPointF &m_point2, qint64 timestamp = 0); + void reset(); + QPointF velocity() const; + +private: + QPointF m_point1; + QPointF m_point2; + qint64 m_point1Timestamp = 0; + qint64 m_point2Timestamp = 0; + // When a timestamp isn't available, we must use a timer. + // When stopMeasuring() has been called, we store the elapsed time in point2timestamp. + QElapsedTimer m_timer; +}; + +QT_END_NAMESPACE + +#endif // QQUICKVELOCITYCALCULATOR_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbercolumn_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbercolumn_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7d36428d705e79f35be2a3d35cdf97734cf18607 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbercolumn_p.h @@ -0,0 +1,69 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKWEEKNUMBERCOLUMN_P_H +#define QQUICKWEEKNUMBERCOLUMN_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_NAMESPACE + +class QQmlComponent; +class QQuickWeekNumberColumnPrivate; + +class QQuickWeekNumberColumn : public QQuickControl +{ + Q_OBJECT + Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL) + Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL) + Q_PROPERTY(QVariant source READ source WRITE setSource NOTIFY sourceChanged FINAL) + Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL) + QML_NAMED_ELEMENT(AbstractWeekNumberColumn) + QML_ADDED_IN_VERSION(6, 3) + +public: + explicit QQuickWeekNumberColumn(QQuickItem *parent = nullptr); + + int month() const; + void setMonth(int month); + + int year() const; + void setYear(int year); + + QVariant source() const; + void setSource(const QVariant &source); + + QQmlComponent *delegate() const; + void setDelegate(QQmlComponent *delegate); + +Q_SIGNALS: + void monthChanged(); + void yearChanged(); + void sourceChanged(); + void delegateChanged(); + +protected: + void componentComplete() override; + void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override; + void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override; + void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override; + +private: + Q_DISABLE_COPY(QQuickWeekNumberColumn) + Q_DECLARE_PRIVATE(QQuickWeekNumberColumn) +}; + +QT_END_NAMESPACE + +#endif // QQUICKWEEKNUMBERCOLUMN_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbermodel_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbermodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..76aaf8c70935fd970a3ee7543048bb03315dbb66 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qquickweeknumbermodel_p.h @@ -0,0 +1,70 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKWEEKNUMBERMODEL_P_H +#define QQUICKWEEKNUMBERMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickWeekNumberModelPrivate; + +class QQuickWeekNumberModel : public QAbstractListModel +{ + Q_OBJECT + Q_PROPERTY(int month READ month WRITE setMonth NOTIFY monthChanged FINAL) + Q_PROPERTY(int year READ year WRITE setYear NOTIFY yearChanged FINAL) + Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged FINAL) + Q_PROPERTY(int count READ rowCount CONSTANT FINAL) + +public: + explicit QQuickWeekNumberModel(QObject *parent = nullptr); + + int month() const; + void setMonth(int month); + + int year() const; + void setYear(int year); + + QLocale locale() const; + void setLocale(const QLocale &locale); + + Q_INVOKABLE int weekNumberAt(int index) const; + Q_INVOKABLE int indexOf(int weekNumber) const; + + enum { + WeekNumberRole = Qt::UserRole + 1 + }; + + QHash roleNames() const override; + QVariant data(const QModelIndex &index, int role) const override; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + +Q_SIGNALS: + void monthChanged(); + void yearChanged(); + void localeChanged(); + +private: + Q_DISABLE_COPY(QQuickWeekNumberModel) + Q_DECLARE_PRIVATE(QQuickWeekNumberModel) +}; + +QT_END_NAMESPACE + +#endif // QQUICKWEEKNUMBERMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2-config_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2-config_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3da6192e99d7211afc030dfd56b2219589467217 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2-config_p.h @@ -0,0 +1,8 @@ +#define QT_FEATURE_quicktemplates2_hover 1 + +#define QT_FEATURE_quicktemplates2_multitouch 1 + +#define QT_FEATURE_quicktemplates2_calendar 1 + +#define QT_FEATURE_quicktemplates2_container 1 + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2global_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2global_p.h new file mode 100644 index 0000000000000000000000000000000000000000..6edf545ed54eb8ad395ae5100efd6baab467f65e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTemplates2/6.8.1/QtQuickTemplates2/private/qtquicktemplates2global_p.h @@ -0,0 +1,34 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKTEMPLATES2GLOBAL_P_H +#define QTQUICKTEMPLATES2GLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +Q_QUICKTEMPLATES2_EXPORT void QQuickTemplates_initializeModule(); +Q_QUICKTEMPLATES2_EXPORT void qml_register_types_QtQuick_Templates(); + +[[maybe_unused]] static inline QString backgroundName() { return QStringLiteral("background"); } +[[maybe_unused]] static inline QString handleName() { return QStringLiteral("handle"); } +[[maybe_unused]] static inline QString indicatorName() { return QStringLiteral("indicator"); } + +QT_END_NAMESPACE + +#endif // QTQUICKTEMPLATES2GLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/qtestoptions_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/qtestoptions_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a77726a52502b41e92b3d64bbf542acdc7bbefa5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/qtestoptions_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2018 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTESTOPTIONS_P_H +#define QTESTOPTIONS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +# include + +#include +#include + +QT_BEGIN_NAMESPACE + + +namespace QTest +{ + extern Q_TESTLIB_EXPORT bool printAvailableFunctions; + extern Q_TESTLIB_EXPORT QStringList testFunctions; + extern Q_TESTLIB_EXPORT QStringList testTags; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktest_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktest_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f440e7e3e5c0c1fe66369fb768451fe54a91e25b --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktest_p.h @@ -0,0 +1,92 @@ +// Copyright (C) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKTEST_P_H +#define QUICKTEST_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +#include +#include + +#include + +QT_BEGIN_NAMESPACE + +class Q_QMLTEST_EXPORT QTestRootObject : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool windowShown READ windowShown NOTIFY windowShownChanged) + Q_PROPERTY(bool hasTestCase READ hasTestCase WRITE setHasTestCase NOTIFY hasTestCaseChanged) + Q_PROPERTY(QObject *defined READ defined) + + QML_SINGLETON + QML_ELEMENT + QML_ADDED_IN_VERSION(1, 0) + +public: + static QTestRootObject *create(QQmlEngine *q, QJSEngine *) + { + QTestRootObject *result = instance(); + QQmlEngine *engine = qmlEngine(result); + // You can only test on one engine at a time + return (engine == nullptr || engine == q) ? result : nullptr; + } + + static QTestRootObject *instance() { + static QPointer object = new QTestRootObject; + if (!object) { + // QTestRootObject was deleted when previous test ended, create a new one + object = new QTestRootObject; + } + return object; + } + + bool hasQuit:1; + bool hasTestCase() const { return m_hasTestCase; } + void setHasTestCase(bool value) { m_hasTestCase = value; Q_EMIT hasTestCaseChanged(); } + + bool windowShown() const { return m_windowShown; } + void setWindowShown(bool value) { m_windowShown = value; Q_EMIT windowShownChanged(); } + QQmlPropertyMap *defined() const { return m_defined; } + + void init() { setWindowShown(false); setHasTestCase(false); hasQuit = false; } + +Q_SIGNALS: + void windowShownChanged(); + void hasTestCaseChanged(); + +private Q_SLOTS: + void quit() { hasQuit = true; } + +private: + QTestRootObject(QObject *parent = nullptr) + : QObject(parent), hasQuit(false), m_windowShown(false), m_hasTestCase(false) { + m_defined = new QQmlPropertyMap(this); +#if defined(QT_OPENGL_ES_2_ANGLE) + m_defined->insert(QLatin1String("QT_OPENGL_ES_2_ANGLE"), QVariant(true)); +#endif + } + + bool m_windowShown : 1; + bool m_hasTestCase :1; + QQmlPropertyMap *m_defined; +}; + +bool qWaitForSignal(QObject *obj, const char* signal, int timeout = 5000); + +QT_END_NAMESPACE + +#endif // QUICKTEST_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestevent_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestevent_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a1acde748f4882d8fc448b00b5d497e84ce75cbb --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestevent_p.h @@ -0,0 +1,100 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKTESTEVENT_P_H +#define QUICKTESTEVENT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QuickTestEvent; +class Q_QMLTEST_EXPORT QQuickTouchEventSequence : public QObject +{ + Q_OBJECT + QML_ANONYMOUS + QML_ADDED_IN_VERSION(1, 0) + +public: + explicit QQuickTouchEventSequence(QuickTestEvent *testEvent, QObject *item = nullptr); +public Q_SLOTS: + QObject* press(int touchId, QObject *item, qreal x, qreal y); + QObject* move(int touchId, QObject *item, qreal x, qreal y); + QObject* release(int touchId, QObject *item, qreal x, qreal y); + QObject* stationary(int touchId); + QObject* commit(); + +private: + QTest::QTouchEventSequence m_sequence; + QuickTestEvent * const m_testEvent; +}; + +class Q_QMLTEST_EXPORT QuickTestEvent : public QObject +{ + Q_OBJECT + Q_PROPERTY(int defaultMouseDelay READ defaultMouseDelay FINAL) + QML_NAMED_ELEMENT(TestEvent) + QML_ADDED_IN_VERSION(1, 0) +public: + QuickTestEvent(QObject *parent = nullptr); + ~QuickTestEvent() override; + int defaultMouseDelay() const; + +public Q_SLOTS: + bool keyPress(int key, int modifiers, int delay); + bool keyRelease(int key, int modifiers, int delay); + bool keyClick(int key, int modifiers, int delay); + + bool keyPressChar(const QString &character, int modifiers, int delay); + bool keyReleaseChar(const QString &character, int modifiers, int delay); + bool keyClickChar(const QString &character, int modifiers, int delay); + + Q_REVISION(1, 2) bool keySequence(const QVariant &keySequence); + + bool mousePress(QObject *item, qreal x, qreal y, int button, + int modifiers, int delay); + bool mouseRelease(QObject *item, qreal x, qreal y, int button, + int modifiers, int delay); + bool mouseClick(QObject *item, qreal x, qreal y, int button, + int modifiers, int delay); + bool mouseDoubleClick(QObject *item, qreal x, qreal y, int button, + int modifiers, int delay); + bool mouseDoubleClickSequence(QObject *item, qreal x, qreal y, int button, + int modifiers, int delay); + bool mouseMove(QObject *item, qreal x, qreal y, int delay, int buttons, int modifiers); + +#if QT_CONFIG(wheelevent) + bool mouseWheel(QObject *item, qreal x, qreal y, int buttons, + int modifiers, int xDelta, int yDelta, int delay); +#endif + + QQuickTouchEventSequence *touchEvent(QObject *item = nullptr); +private: + QWindow *eventWindow(QObject *item = nullptr); + QWindow *activeWindow(); + QPointingDevice *touchDevice(); + + Qt::MouseButtons m_pressedButtons; + + friend class QQuickTouchEventSequence; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0da9ef68b15aab8aebd7f8d7253c916b7def7841 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKTESTGLOBAL_P_H +#define QUICKTESTGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "quicktestglobal.h" +#include "private/qglobal_p.h" + +#endif // QUICKTESTGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestresult_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestresult_p.h new file mode 100644 index 0000000000000000000000000000000000000000..12756ea912ac4d0b87e5413e71a6baeff9bc8bb3 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestresult_p.h @@ -0,0 +1,158 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKTESTRESULT_P_H +#define QUICKTESTRESULT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QUrl; +class QuickTestResultPrivate; + +class Q_QMLTEST_EXPORT QuickTestResult : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString testCaseName READ testCaseName WRITE setTestCaseName NOTIFY testCaseNameChanged) + Q_PROPERTY(QString functionName READ functionName WRITE setFunctionName NOTIFY functionNameChanged) + Q_PROPERTY(QString dataTag READ dataTag WRITE setDataTag NOTIFY dataTagChanged) + Q_PROPERTY(bool failed READ isFailed) + Q_PROPERTY(bool skipped READ isSkipped WRITE setSkipped NOTIFY skippedChanged) + Q_PROPERTY(int passCount READ passCount) + Q_PROPERTY(int failCount READ failCount) + Q_PROPERTY(int skipCount READ skipCount) + Q_PROPERTY(QStringList functionsToRun READ functionsToRun) + Q_PROPERTY(QStringList tagsToRun READ tagsToRun) + + QML_NAMED_ELEMENT(TestResult) + QML_ADDED_IN_VERSION(1, 0) + +public: + QuickTestResult(QObject *parent = nullptr); + ~QuickTestResult() override; + + // Values must match QBenchmarkIterationController::RunMode. + enum RunMode + { + RepeatUntilValidMeasurement, + RunOnce + }; + Q_ENUM(RunMode) + + QString testCaseName() const; + void setTestCaseName(const QString &name); + + QString functionName() const; + void setFunctionName(const QString &name); + + QString dataTag() const; + void setDataTag(const QString &tag); + + bool isFailed() const; + + bool isSkipped() const; + void setSkipped(bool skip); + + int passCount() const; + int failCount() const; + int skipCount() const; + + QStringList functionsToRun() const; + QStringList tagsToRun() const; + +public Q_SLOTS: + void reset(); + + void startLogging(); + void stopLogging(); + + void initTestTable(); + void clearTestTable(); + + void finishTestData(); + void finishTestDataCleanup(); + void finishTestFunction(); + + void stringify(QQmlV4FunctionPtr args); + + void fail(const QString &message, const QUrl &location, int line); + bool verify(bool success, const QString &message, + const QUrl &location, int line); + bool compare(bool success, const QString &message, + const QVariant &val1, const QVariant &val2, + const QUrl &location, int line); + bool fuzzyCompare(const QVariant &actual, const QVariant &expected, qreal delta); + void skip(const QString &message, const QUrl &location, int line); + bool expectFail(const QString &tag, const QString &comment, + const QUrl &location, int line); + bool expectFailContinue(const QString &tag, const QString &comment, + const QUrl &location, int line); + void warn(const QString &message, const QUrl &location, int line); + + void ignoreWarning(const QJSValue &message); + Q_REVISION(6, 3) void failOnWarning(const QJSValue &message); + + void wait(int ms); + void sleep(int ms); + bool waitForRendering(QQuickItem *item, int timeout = 5000); + + void startMeasurement(); + void beginDataRun(); + void endDataRun(); + bool measurementAccepted(); + bool needsMoreMeasurements(); + + void startBenchmark(RunMode runMode, const QString &tag); + bool isBenchmarkDone() const; + void nextBenchmark(); + void stopBenchmark(); + + QObject *grabImage(QQuickItem *item); + + Q_REVISION(1, 1) QObject *findChild(QObject *parent, const QString &objectName); + + Q_REVISION(1, 13) bool isPolishScheduled(QObject *itemOrWindow) const; + Q_REVISION(6, 5) bool waitForPolish(QObject *itemOrWindow, int timeout) const; + +public: + // Helper functions for the C++ main() shell. + static void parseArgs(int argc, char *argv[]); + static void setProgramName(const char *name); + static void setCurrentAppname(const char *appname); + static int exitCode(); + +Q_SIGNALS: + void programNameChanged(); + void testCaseNameChanged(); + void functionNameChanged(); + void dataTagChanged(); + void skippedChanged(); + +private: + QScopedPointer d_ptr; + + Q_DECLARE_PRIVATE(QuickTestResult) + Q_DISABLE_COPY(QuickTestResult) +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestutil_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestutil_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8dbddd78c59274c5255089e96df2d0ab76bc43b2 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTest/6.8.1/QtQuickTest/private/quicktestutil_p.h @@ -0,0 +1,65 @@ +// Copyright (C) 2019 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QUICKTESTUTIL_P_H +#define QUICKTESTUTIL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QMLTEST_EXPORT QuickTestUtil : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool printAvailableFunctions READ printAvailableFunctions NOTIFY printAvailableFunctionsChanged) + Q_PROPERTY(int dragThreshold READ dragThreshold NOTIFY dragThresholdChanged) + QML_NAMED_ELEMENT(TestUtil) + QML_ADDED_IN_VERSION(1, 0) +public: + QuickTestUtil(QObject *parent = nullptr) :QObject(parent) {} + ~QuickTestUtil() override {} + + bool printAvailableFunctions() const; + int dragThreshold() const; + + Q_INVOKABLE void populateClipboardText(int lineCount); + +Q_SIGNALS: + void printAvailableFunctionsChanged(); + void dragThresholdChanged(); + +public Q_SLOTS: + + QJSValue typeName(const QVariant& v) const; + bool compare(const QVariant& act, const QVariant& exp) const; + + QJSValue callerFile(int frameIndex = 0) const; + int callerLine(int frameIndex = 0) const; + + Q_REVISION(6, 7) QString signalHandlerName(const QString &signalName) + { + if (QQmlSignalNames::isHandlerName(signalName)) + return signalName; + return QQmlSignalNames::signalNameToHandlerName(signalName); + } +}; + +QT_END_NAMESPACE + +#endif // QUICKTESTUTIL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/geometrytestutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/geometrytestutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..99820447c0539cf39ea1da32922401f40792be01 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/geometrytestutils_p.h @@ -0,0 +1,40 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QQUICKGEOMETRYTESTUTIL_P_H +#define QQUICKGEOMETRYTESTUTIL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickItem; + +class QSizeChangeListener : public QObject, public QVector +{ + Q_OBJECT +public: + explicit QSizeChangeListener(QQuickItem *item); +private Q_SLOTS: + void onSizeChanged(); +private: + QQuickItem *item; +}; + +QT_END_NAMESPACE + +#endif // QQUICKGEOMETRYTESTUTIL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platforminputcontext_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platforminputcontext_p.h new file mode 100644 index 0000000000000000000000000000000000000000..75cacc79d71efd3842f718d01b46b66887968947 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platforminputcontext_p.h @@ -0,0 +1,99 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef PLATFORMINPUTCONTEXT_P_H +#define PLATFORMINPUTCONTEXT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class PlatformInputContext : public QPlatformInputContext +{ +public: + PlatformInputContext() + : m_visible(false), m_action(QInputMethod::Click), m_cursorPosition(0), + m_invokeActionCallCount(0), m_showInputPanelCallCount(0), m_hideInputPanelCallCount(0), + m_updateCallCount(0), m_direction(Qt::LeftToRight) + { + } + + void showInputPanel() override + { + m_visible = true; + m_showInputPanelCallCount++; + } + void hideInputPanel() override + { + m_visible = false; + m_hideInputPanelCallCount++; + } + bool isInputPanelVisible() const override + { + return m_visible; + } + void invokeAction(QInputMethod::Action action, int cursorPosition) override + { + m_invokeActionCallCount++; + m_action = action; + m_cursorPosition = cursorPosition; + } + void update(Qt::InputMethodQueries) override + { + m_updateCallCount++; + } + + QLocale locale() const override + { + if (m_direction == Qt::RightToLeft) + return QLocale(QLocale::Arabic); + else + return QLocale(QLocale::English); + } + + Qt::LayoutDirection inputDirection() const override + { + return m_direction; + } + + void setInputDirection(Qt::LayoutDirection direction) { + m_direction = direction; + emitLocaleChanged(); + emitInputDirectionChanged(inputDirection()); + } + + void clear() { + m_cursorPosition = 0; + m_invokeActionCallCount = 0; + m_visible = false; + m_showInputPanelCallCount = 0; + m_hideInputPanelCallCount = 0; + m_updateCallCount = 0; + } + + bool m_visible; + QInputMethod::Action m_action; + int m_cursorPosition; + int m_invokeActionCallCount; + int m_showInputPanelCallCount; + int m_hideInputPanelCallCount; + int m_updateCallCount; + Qt::LayoutDirection m_direction; +}; + +QT_END_NAMESPACE + +#endif // PLATFORMINPUTCONTEXT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platformquirks_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platformquirks_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f4b58113698d0056f0827f6ca39fe8edf0837b06 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/platformquirks_p.h @@ -0,0 +1,58 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef PLATFORMQUIRKS_P_H +#define PLATFORMQUIRKS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#ifdef Q_OS_MACOS +#include +#endif + +QT_BEGIN_NAMESPACE + +struct PlatformQuirks +{ + static inline bool isClipboardAvailable() + { +#if !QT_CONFIG(clipboard) + return false; +#elif defined(Q_OS_MACOS) + PasteboardRef pasteboard; + OSStatus status = PasteboardCreate(0, &pasteboard); + if (status == noErr) + CFRelease(pasteboard); + return status == noErr; +#else + if (QGuiApplication::platformName() != QLatin1StringView("xcb")) + return true; + + // On XCB a clipboard may be dysfunctional due to platform restrictions + QClipboard *clipBoard = QGuiApplication::clipboard(); + if (!clipBoard) + return false; + const QString &oldText = clipBoard->text(); + QScopeGuard guard([&](){ clipBoard->setText(oldText); }); + const QLatin1StringView prefix("Something to prefix "); + const QString newText = prefix + oldText; + clipBoard->setText(newText); + return QTest::qWaitFor([&](){ return clipBoard->text() == newText; }); +#endif + } +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/qmlutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/qmlutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..91b53254087ec211464b13871ceb148411958d84 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/qmlutils_p.h @@ -0,0 +1,127 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QQMLTESTUTILS_P_H +#define QQMLTESTUTILS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +/* Base class for tests with data that are located in a "data" subfolder. */ + +class QQmlDataTest : public QObject +{ + Q_OBJECT +public: + enum class FailOnWarningsPolicy { + DoNotFailOnWarnings, + FailOnWarnings + }; + + QQmlDataTest( + const char *qmlTestDataDir, + FailOnWarningsPolicy failOnWarningsPolicy = FailOnWarningsPolicy::DoNotFailOnWarnings, + const char *dataSubdir = "data"); + virtual ~QQmlDataTest(); + + QString testFile(const QString &fileName) const; + inline QString testFile(const char *fileName) const + { return testFile(QLatin1String(fileName)); } + inline QUrl testFileUrl(const QString &fileName) const + { + const QString fn = testFile(fileName); + return fn.startsWith(QLatin1Char(':')) + ? QUrl(QLatin1String("qrc") + fn) + : QUrl::fromLocalFile(fn); + } + inline QUrl testFileUrl(const char *fileName) const + { return testFileUrl(QLatin1String(fileName)); } + + inline QString dataDirectory() const { return m_dataDirectory; } + inline QUrl dataDirectoryUrl() const { return m_dataDirectoryUrl; } + inline QString directory() const { return m_directory; } + + static inline QQmlDataTest *instance() { return m_instance; } + + bool canImportModule(const QString &importTestQmlSource) const; + +public Q_SLOTS: + virtual void initTestCase(); + virtual void init(); + +private: + static QQmlDataTest *m_instance; + + // The directory in which to search for m_dataSubDir. + const char *m_qmlTestDataDir = nullptr; + // The subdirectory containing the actual data. Typically "data" + const char *m_dataSubDir = nullptr; + // The path to m_dataSubDir, if found. + const QString m_dataDirectory; + const QUrl m_dataDirectoryUrl; + QTemporaryDir m_cacheDir; + QString m_directory; + bool m_usesOwnCacheDir = false; + FailOnWarningsPolicy m_failOnWarningsPolicy = FailOnWarningsPolicy::DoNotFailOnWarnings; +}; + +class QQmlTestMessageHandler +{ + Q_DISABLE_COPY(QQmlTestMessageHandler) +public: + QQmlTestMessageHandler(); + ~QQmlTestMessageHandler(); + + const QStringList &messages() const { return m_messages; } + const QString messageString() const { return m_messages.join(QLatin1Char('\n')); } + + void clear() { m_messages.clear(); } + + void setIncludeCategoriesEnabled(bool enabled) { m_includeCategories = enabled; } + +private: + static void messageHandler(QtMsgType, const QMessageLogContext &context, const QString &message); + + static QQmlTestMessageHandler *m_instance; + QStringList m_messages; + QtMessageHandler m_oldHandler; + bool m_includeCategories; +}; + +class QQmlEngine; + +namespace QV4 { +struct ExecutionEngine; +} + +enum class GCFlags { + None = 0, + DontSendPostedEvents = 1 +}; + +bool gcDone(const QV4::ExecutionEngine *engine); +void gc(QV4::ExecutionEngine &engine, GCFlags flags = GCFlags::None); +bool gcDone(QQmlEngine *engine); +void gc(QQmlEngine &engine, GCFlags flags = GCFlags::None); + +QT_END_NAMESPACE + +#endif // QQMLTESTUTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/testhttpserver_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/testhttpserver_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8c952e694aa596ef4979424a50e4ab6fa23b7f9f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/testhttpserver_p.h @@ -0,0 +1,123 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef TESTHTTPSERVER_P_H +#define TESTHTTPSERVER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class TestHTTPServer : public QObject +{ + Q_OBJECT +public: + TestHTTPServer(); + + bool listen(); + quint16 port() const; + QUrl baseUrl() const; + QUrl url(const QString &documentPath) const; + QString urlString(const QString &documentPath) const; + QString errorString() const; + + enum Mode { Normal, Delay, Disconnect }; + bool serveDirectory(const QString &, Mode = Normal); + + bool wait(const QUrl &expect, const QUrl &reply, const QUrl &body); + bool hasFailed() const; + + void addAlias(const QString &filename, const QString &aliasName); + void addRedirect(const QString &filename, const QString &redirectName); + + void registerFileNameForContentSubstitution(const QString &fileName); + + // In Delay mode, each item needs one call to this function to be sent + void sendDelayedItem(); + +private Q_SLOTS: + void newConnection(); + void disconnected(); + void readyRead(); + void sendOne(); + +private: + enum State { + AwaitingHeader, + AwaitingData, + Failed + }; + + void serveGET(QTcpSocket *, const QByteArray &); + bool reply(QTcpSocket *, const QByteArray &); + + QList > m_directories; + QHash m_dataCache; + QList > m_toSend; + QSet m_contentSubstitutedFileNames; + + struct WaitData { + QList headerExactMatches; + QList headerPrefixes; + QByteArray body; + } m_waitData; + QByteArray m_replyData; + QByteArray m_bodyData; + QByteArray m_data; + State m_state; + + QHash m_aliases; + QHash m_redirects; + + QTcpServer m_server; +}; + +class ThreadedTestHTTPServer : public QThread +{ + Q_OBJECT +public: + ThreadedTestHTTPServer(const QString &dir, TestHTTPServer::Mode mode = TestHTTPServer::Normal); + ThreadedTestHTTPServer(const QHash &dirs); + ~ThreadedTestHTTPServer(); + + QUrl baseUrl() const; + QUrl url(const QString &documentPath) const; + QString urlString(const QString &documentPath) const; + +protected: + void run() override; + +private: + void start(); + + QHash m_dirs; + quint16 m_port; + QMutex m_mutex; + QWaitCondition m_condition; +}; + +QT_END_NAMESPACE + +#endif // TESTHTTPSERVER_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/viewtestutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/viewtestutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0ebf52be4079d84464af06dd9987c47fcf951b97 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/viewtestutils_p.h @@ -0,0 +1,216 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QQUICKVIEWTESTUTILS_P_H +#define QQUICKVIEWTESTUTILS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include + +QT_FORWARD_DECLARE_CLASS(QQuickView) +QT_FORWARD_DECLARE_CLASS(QQuickItemViewPrivate) +QT_FORWARD_DECLARE_CLASS(FxViewItem) + +QT_BEGIN_NAMESPACE + +namespace QQuickViewTestUtils +{ + QQuickView *createView(); + + void centerOnScreen(QQuickWindow *window, const QSize &size); + void centerOnScreen(QQuickWindow *window); + void moveMouseAway(QQuickView *window); + + QList adjustIndexesForAddDisplaced(const QList &indexes, int index, int count); + QList adjustIndexesForMove(const QList &indexes, int from, int to, int count); + QList adjustIndexesForRemoveDisplaced(const QList &indexes, int index, int count); + + struct ListChange { + enum { Inserted, Removed, Moved, SetCurrent, SetContentY, Polish } type; + int index; + int count; + int to; // Move + qreal pos; // setContentY + + static ListChange insert(int index, int count = 1) { ListChange c = { Inserted, index, count, -1, 0.0 }; return c; } + static ListChange remove(int index, int count = 1) { ListChange c = { Removed, index, count, -1, 0.0 }; return c; } + static ListChange move(int index, int to, int count) { ListChange c = { Moved, index, count, to, 0.0 }; return c; } + static ListChange setCurrent(int index) { ListChange c = { SetCurrent, index, -1, -1, 0.0 }; return c; } + static ListChange setContentY(qreal pos) { ListChange c = { SetContentY, -1, -1, -1, pos }; return c; } + static ListChange polish() { ListChange c = { Polish, -1, -1, -1, 0.0 }; return c; } + }; + + class QaimModel : public QAbstractListModel + { + Q_OBJECT + public: + enum Roles { Name = Qt::UserRole+1, Number = Qt::UserRole+2 }; + + QaimModel(QObject *parent=0); + + int rowCount(const QModelIndex &parent=QModelIndex()) const override; + int columnCount(const QModelIndex &parent=QModelIndex()) const override; + QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override; + QHash roleNames() const override; + + int count() const; + QString name(int index) const; + QString number(int index) const; + + Q_INVOKABLE void addItem(const QString &name, const QString &number); + void addItems(const QList > &items); + void insertItem(int index, const QString &name, const QString &number); + void insertItems(int index, const QList > &items); + + Q_INVOKABLE void removeItem(int index); + void removeItems(int index, int count); + + void moveItem(int from, int to); + void moveItems(int from, int to, int count); + + void modifyItem(int idx, const QString &name, const QString &number); + + void clear(); + void reset(); + void resetItems(const QList > &items); + + void matchAgainst(const QList > &other, const QString &error1, const QString &error2); + + using QAbstractListModel::dataChanged; + + int columns = 1; + + private: + QList > list; + }; + + class ListRange + { + public: + ListRange(); + ListRange(const ListRange &other); + ListRange(int start, int end); + + ~ListRange(); + + ListRange operator+(const ListRange &other) const; + bool operator==(const ListRange &other) const; + bool operator!=(const ListRange &other) const; + + bool isValid() const; + int count() const; + + QList > getModelDataValues(const QaimModel &model); + + QList indexes; + bool valid; + }; + + template + static void qquickmodelviewstestutil_move(int from, int to, int n, T *items) + { + if (from > to) { + // Only move forwards - flip if backwards moving + int tfrom = from; + int tto = to; + from = tto; + to = tto+n; + n = tfrom-tto; + } + + T replaced; + int i=0; + typename T::ConstIterator it=items->begin(); it += from+n; + for (; ibegin(); it += from; + for (; ibegin(); t += from; + for (; f != replaced.end(); ++f, ++t) + *t = *f; + } + + class StressTestModel : public QAbstractListModel + { + Q_OBJECT + + public: + + StressTestModel(); + + int rowCount(const QModelIndex &) const override; + QVariant data(const QModelIndex &, int) const override; + + public Q_SLOTS: + void updateModel(); + + private: + int m_rowCount; + }; + +#if QT_CONFIG(quick_itemview) && defined(QT_BUILD_INTERNAL) + [[nodiscard]] bool testVisibleItems(const QQuickItemViewPrivate *priv, + bool *nonUnique, FxViewItem **failItem, int *expectedIdx); +#endif +} + +namespace QQuickTouchUtils { + void flush(QQuickWindow *window); +} + +namespace QQuickTest { + [[nodiscard]] bool initView(QQuickView &v, const QUrl &url, + bool moveMouseOut = true, QByteArray *errorMessage = nullptr); + [[nodiscard]] bool showView(QQuickView &v, const QUrl &url); + + void pointerPress(const QPointingDevice *dev, QQuickWindow *window, + int pointId, const QPoint &p, Qt::MouseButton button = Qt::LeftButton, + Qt::KeyboardModifiers modifiers = Qt::NoModifier, int delay = -1); + + void pointerMove(const QPointingDevice *dev, QQuickWindow *window, int pointId, + const QPoint &p, int delay = -1); + + void pointerRelease(const QPointingDevice *dev, QQuickWindow *window, int pointId, + const QPoint &p, Qt::MouseButton button = Qt::LeftButton, + Qt::KeyboardModifiers modifiers = Qt::NoModifier, int delay = -1); + + void pointerMoveAndPress(const QPointingDevice *dev, QQuickWindow *window, + int pointId, const QPoint &p, Qt::MouseButton button = Qt::LeftButton, + Qt::KeyboardModifiers modifiers = Qt::NoModifier, int delay = -1); + + void pointerMoveAndRelease(const QPointingDevice *dev, QQuickWindow *window, + int pointId, const QPoint &p, Qt::MouseButton button = Qt::LeftButton, + Qt::KeyboardModifiers modifiers = Qt::NoModifier, int delay = -1); + + void pointerFlick(const QPointingDevice *dev, QQuickWindow *window, + int pointId, const QPoint &from, const QPoint &to, int duration, + Qt::MouseButton button = Qt::LeftButton, + Qt::KeyboardModifiers modifiers = Qt::NoModifier, int delay = -1); +} + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QQuickViewTestUtils::QaimModel*) +Q_DECLARE_METATYPE(QQuickViewTestUtils::ListChange) +Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QQuickViewTestUtils::ListRange) + + +#endif // QQUICKVIEWTESTUTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/visualtestutils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/visualtestutils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..29b5ea7605e27294f0d97e31f69bd09021310aba --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickTestUtils/6.8.1/QtQuickTestUtils/private/visualtestutils_p.h @@ -0,0 +1,237 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#ifndef QQUICKVISUALTESTUTILS_P_H +#define QQUICKVISUALTESTUTILS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QQuickItemView; +class QQuickWindow; + +namespace QQuickVisualTestUtils +{ + QQuickItem *findVisibleChild(QQuickItem *parent, const QString &objectName); + + void dumpTree(QQuickItem *parent, int depth = 0); + + void moveMouseAway(QQuickWindow *window); + void centerOnScreen(QQuickWindow *window); + + template + void forEachStep(int steps, F &&func) + { + for (int i = 0; i < steps; ++i) { + const qreal progress = qreal(i) / steps; + func(progress); + } + } + + [[nodiscard]] QPoint lerpPoints(const QPoint &point1, const QPoint &point2, qreal t); + + class [[nodiscard]] PointLerper + { + public: + PointLerper(QQuickWindow *window, + const QPointingDevice *pointingDevice = QPointingDevice::primaryPointingDevice()); + + void move(const QPoint &pos, int steps = 10, int delayInMilliseconds = 1); + void move(int x, int y, int steps = 10, int delayInMilliseconds = 1); + + private: + QQuickWindow *mWindow = nullptr; + const QPointingDevice *mPointingDevice = nullptr; + QPoint mFrom; + }; + + [[nodiscard]] bool isDelegateVisible(QQuickItem *item); + + /* + Find an item with the specified objectName. If index is supplied then the + item must also evaluate the {index} expression equal to index + */ + template + T *findItem(QQuickItem *parent, const QString &objectName, int index = -1) + { + using namespace Qt::StringLiterals; + + const QMetaObject &mo = T::staticMetaObject; + for (int i = 0; i < parent->childItems().size(); ++i) { + QQuickItem *item = qobject_cast(parent->childItems().at(i)); + if (!item) + continue; + if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) { + if (index != -1) { + QQmlContext *context = qmlContext(item); + if (!context->isValid()) + continue; + QQmlExpression e(context, item, u"index"_s); + if (e.evaluate().toInt() == index) + return static_cast(item); + } else { + return static_cast(item); + } + } + item = findItem(item, objectName, index); + if (item) + return static_cast(item); + } + + return 0; + } + + template + QList findItems(QQuickItem *parent, const QString &objectName, bool visibleOnly = true) + { + QList items; + const QMetaObject &mo = T::staticMetaObject; + for (int i = 0; i < parent->childItems().size(); ++i) { + QQuickItem *item = qobject_cast(parent->childItems().at(i)); + if (!item || (visibleOnly && (!item->isVisible() || QQuickItemPrivate::get(item)->culled))) + continue; + if (mo.cast(item) && (objectName.isEmpty() || item->objectName() == objectName)) + items.append(static_cast(item)); + items += findItems(item, objectName); + } + + return items; + } + + template + QList findItems(QQuickItem *parent, const QString &objectName, const QList &indexes) + { + QList items; + for (int i=0; i(findItem(parent, objectName, indexes[i])); + return items; + } + + bool compareImages(const QImage &ia, const QImage &ib, QString *errorMessage); + + struct SignalMultiSpy : public QObject + { + Q_OBJECT + public: + QList senders; + QList signalNames; + + template + QMetaObject::Connection connectToSignal(const typename QtPrivate::FunctionPointer::Object *obj, Func1 signal, + Qt::ConnectionType type = Qt::AutoConnection) + { + return connect(obj, signal, this, &SignalMultiSpy::receive, type); + } + + void clear() { + senders.clear(); + signalNames.clear(); + } + + public Q_SLOTS: + void receive() { + QMetaMethod m = sender()->metaObject()->method(senderSignalIndex()); + senders << sender(); + signalNames << m.name(); + } + }; + + enum class FindViewDelegateItemFlag { + None = 0x0, + PositionViewAtIndex = 0x01 + }; + Q_DECLARE_FLAGS(FindViewDelegateItemFlags, FindViewDelegateItemFlag) + +#if QT_CONFIG(quick_itemview) + QQuickItem* findViewDelegateItem(QQuickItemView *itemView, int index, + FindViewDelegateItemFlags flags = FindViewDelegateItemFlag::PositionViewAtIndex); +#endif + + /*! + \internal + + Same as above except allows use in QTRY_* functions without having to call it again + afterwards to assign the delegate. + */ + template + [[nodiscard]] bool findViewDelegateItem(QQuickItemView *itemView, int index, T &delegateItem, + FindViewDelegateItemFlags flags = FindViewDelegateItemFlag::PositionViewAtIndex) + { + delegateItem = qobject_cast(findViewDelegateItem(itemView, index, flags)); + return delegateItem != nullptr; + } + + class QQuickApplicationHelper + { + public: + QQuickApplicationHelper(QQmlDataTest *testCase, const QString &testFilePath, + const QVariantMap &initialProperties = {}, + const QStringList &qmlImportPaths = {}); + + // Return a C-style string instead of QString because that's what QTest uses for error messages, + // so it saves code at the calling site. + inline const char *failureMessage() const + { + return errorMessage.constData(); + } + + QQmlEngine engine; + QScopedPointer cleanup; + QQuickWindow *window = nullptr; + + bool ready = false; + // Store as a byte array so that we can return its raw data safely; + // using qPrintable() in failureMessage() will construct a throwaway QByteArray + // that is destroyed before the function returns. + QByteArray errorMessage; + }; + + class MnemonicKeySimulator + { + Q_DISABLE_COPY(MnemonicKeySimulator) + public: + explicit MnemonicKeySimulator(QWindow *window); + + void press(Qt::Key key); + void release(Qt::Key key); + void click(Qt::Key key); + + private: + QPointer m_window; + Qt::KeyboardModifiers m_modifiers; + }; + + QPoint mapCenterToWindow(const QQuickItem *item); + QPoint mapToWindow(const QQuickItem *item, qreal relativeX, qreal relativeY); + QPoint mapToWindow(const QQuickItem *item, const QPointF &relativePos); +} + +#define QQUICK_VERIFY_POLISH(item) \ + QTRY_COMPARE(QQuickItemPrivate::get(item)->polishScheduled, false) + +#define SKIP_IF_NO_WINDOW_ACTIVATION \ +if (!(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowActivation))) \ + QSKIP("Window activation is not supported on this platform"); + +QT_END_NAMESPACE + +#endif // QQUICKVISUALTESTUTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c9fec01f85520fe881920a66f03385fcb7e8109f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKVECTORIMAGE_P_H +#define QQUICKVECTORIMAGE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +class QQuickVectorImagePrivate; + +class Q_QUICKVECTORIMAGE_EXPORT QQuickVectorImage : public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) + Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged) + Q_PROPERTY(RendererType preferredRendererType READ preferredRendererType WRITE setPreferredRendererType NOTIFY preferredRendererTypeChanged) + QML_NAMED_ELEMENT(VectorImage) + +public: + enum FillMode { + NoResize, + PreserveAspectFit, + PreserveAspectCrop, + Stretch + }; + Q_ENUM(FillMode) + + enum RendererType { + GeometryRenderer, + CurveRenderer + }; + Q_ENUM(RendererType) + + QQuickVectorImage(QQuickItem *parent = nullptr); + + QUrl source() const; + void setSource(const QUrl &source); + + FillMode fillMode() const; + void setFillMode(FillMode newFillMode); + + RendererType preferredRendererType() const; + void setPreferredRendererType(RendererType newPreferredRendererType); + +signals: + void sourceChanged(); + void fillModeChanged(); + + void preferredRendererTypeChanged(); + +private slots: + void updateSvgItemScale(); + +private: + Q_DISABLE_COPY(QQuickVectorImage) + Q_DECLARE_PRIVATE(QQuickVectorImage) +}; + +QT_END_NAMESPACE + +#endif // QQUICKVECTORIMAGE_P_H + diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p_p.h new file mode 100644 index 0000000000000000000000000000000000000000..2f0bd4555737b14f490c517545ef503bbf4bc5d8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImage/6.8.1/QtQuickVectorImage/private/qquickvectorimage_p_p.h @@ -0,0 +1,49 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKVECTORIMAGE_P_P_H +#define QQUICKVECTORIMAGE_P_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include "qquickvectorimage_p.h" + +QT_BEGIN_NAMESPACE + +class QQuickVectorImagePrivate : public QQuickItemPrivate +{ + Q_DECLARE_PUBLIC(QQuickVectorImage) +public: + QQuickVectorImagePrivate() = default; + virtual ~QQuickVectorImagePrivate() = default; + + void setSource(const QUrl &source); + void loadSvg(); + + enum Format { + Unknown, + Svg + }; + QQuickVectorImagePrivate::Format formatFromFilePath(const QString &filePath); + + QUrl sourceFile; + QQuickItem *svgItem = nullptr; + QQuickVectorImage::FillMode fillMode = QQuickVectorImage::Stretch; + QQuickVectorImage::RendererType preferredRendererType = QQuickVectorImage::GeometryRenderer; +}; + +QT_END_NAMESPACE + +#endif // QQUICKVECTORIMAGE_P_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickgenerator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickgenerator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8b7ea04107376fba8c0e45f8aa98e127dcc2231c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickgenerator_p.h @@ -0,0 +1,77 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKGENERATOR_P_H +#define QQUICKGENERATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QSvgVisitorImpl; +class QPainterPath; +class QGradient; +class QQuickShapePath; +class QQuadPath; +class QQuickItem; +class QQuickShape; +class QRectF; + +struct NodeInfo; +struct ImageNodeInfo; +struct PathNodeInfo; +struct TextNodeInfo; +struct UseNodeInfo; +struct StructureNodeInfo; + +class Q_QUICKVECTORIMAGEGENERATOR_EXPORT QQuickGenerator +{ +public: + QQuickGenerator(const QString fileName, QQuickVectorImageGenerator::GeneratorFlags flags); + virtual ~QQuickGenerator(); + + void setGeneratorFlags(QQuickVectorImageGenerator::GeneratorFlags flags); + QQuickVectorImageGenerator::GeneratorFlags generatorFlags(); + + bool generate(); + +protected: + virtual void generateNodeBase(const NodeInfo &info) = 0; + virtual bool generateDefsNode(const NodeInfo &info) = 0; + virtual void generateImageNode(const ImageNodeInfo &info) = 0; + virtual void generatePath(const PathNodeInfo &info, const QRectF &overrideBoundingRect = QRectF{}) = 0; + virtual void generateNode(const NodeInfo &info) = 0; + virtual void generateTextNode(const TextNodeInfo &info) = 0; + virtual void generateUseNode(const UseNodeInfo &info) = 0; + virtual bool generateStructureNode(const StructureNodeInfo &info) = 0; + virtual bool generateRootNode(const StructureNodeInfo &info) = 0; + virtual void outputShapePath(const PathNodeInfo &info, const QPainterPath *path, const QQuadPath *quadPath, QQuickVectorImageGenerator::PathSelector pathSelector, const QRectF &boundingRect) = 0; + void optimizePaths(const PathNodeInfo &info, const QRectF &overrideBoundingRect); + bool isNodeVisible(const NodeInfo &info); + +protected: + bool m_generationSucceeded = false; + QQuickVectorImageGenerator::GeneratorFlags m_flags; + +private: + QString m_fileName; + QSvgVisitorImpl *m_loader; + friend class QSvgVisitorImpl; +}; + +QT_END_NAMESPACE + +#endif // QQUICKGENERATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickitemgenerator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickitemgenerator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d312c7ec54c59451bfcc2a0841aa3c59ef33f3af --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickitemgenerator_p.h @@ -0,0 +1,57 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKITEMGENERATOR_P_H +#define QQUICKITEMGENERATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickgenerator_p.h" +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKVECTORIMAGEGENERATOR_EXPORT QQuickItemGenerator : public QQuickGenerator +{ +public: + QQuickItemGenerator(const QString fileName, QQuickVectorImageGenerator::GeneratorFlags flags, QQuickItem *parentItem); + ~QQuickItemGenerator(); + +protected: + void generateNodeBase(const NodeInfo &info) override; + bool generateDefsNode(const NodeInfo &info) override; + void generateImageNode(const ImageNodeInfo &info) override; + void generatePath(const PathNodeInfo &info, const QRectF &overrideBoundingRect) override; + void generateNode(const NodeInfo &info) override; + void generateTextNode(const TextNodeInfo &info) override; + void generateUseNode(const UseNodeInfo &info) override; + bool generateStructureNode(const StructureNodeInfo &info) override; + bool generateRootNode(const StructureNodeInfo &info) override; + void outputShapePath(const PathNodeInfo &info, const QPainterPath *path, const QQuadPath *quadPath, QQuickVectorImageGenerator::PathSelector pathSelector, const QRectF &boundingRect) override; + +private: + void generateGradient(const QGradient *grad, QQuickShapePath *shapePath); + void generatePathContainer(const StructureNodeInfo &info); + QQuickItem *currentItem(); + void addCurrentItem(QQuickItem *item, const NodeInfo &info); + + bool m_inShapeItem = false; + QQuickShape *m_parentShapeItem = nullptr; + + QStack m_items; + + QQuickItem *m_parentItem = nullptr; +}; + +QT_END_NAMESPACE + +#endif // QQUICKITEMGENERATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquicknodeinfo_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquicknodeinfo_p.h new file mode 100644 index 0000000000000000000000000000000000000000..65157252721e56343fa7def0c2090194e21c6e73 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquicknodeinfo_p.h @@ -0,0 +1,119 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKNODEINFO_P_H +#define QQUICKNODEINFO_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +struct NodeInfo +{ + QString nodeId; + QString typeName; + QTransform transform; + qreal opacity; + bool isDefaultTransform; + bool isDefaultOpacity; + bool isVisible; + bool isDisplayed; // TODO: Map to display enum in QtSvg +}; + +struct ImageNodeInfo : NodeInfo +{ + QImage image; + QRectF rect; + QString externalFileReference; +}; + +struct StrokeStyle +{ + Qt::PenCapStyle lineCapStyle = Qt::SquareCap; + Qt::PenJoinStyle lineJoinStyle = Qt::MiterJoin; + qreal miterLimit = 4; + qreal dashOffset = 0; + QList dashArray; + QColor color = QColorConstants::Transparent; + qreal width = 1.0; + + static StrokeStyle fromPen(const QPen &p) + { + StrokeStyle style; + style.lineCapStyle = p.capStyle(); + style.lineJoinStyle = p.joinStyle() == Qt::SvgMiterJoin ? Qt::MiterJoin : p.joinStyle(); //TODO support SvgMiterJoin + style.miterLimit = p.miterLimit(); + style.dashOffset = p.dashOffset(); + style.dashArray = p.dashPattern(); + style.width = p.widthF(); + + return style; + } +}; + +struct PathNodeInfo : NodeInfo +{ + QPainterPath painterPath; + Qt::FillRule fillRule = Qt::FillRule::WindingFill; + QColor fillColor; + StrokeStyle strokeStyle; + QGradient grad; + QTransform fillTransform; +}; + +struct TextNodeInfo : NodeInfo +{ + bool isTextArea; + bool needsRichText; + QPointF position; + QSizeF size; + QString text; + QFont font; + Qt::Alignment alignment; + QColor fillColor; + QColor strokeColor; +}; + +enum class StructureNodeStage +{ + Start, + End +}; + +struct UseNodeInfo : NodeInfo +{ + QPointF startPos; + StructureNodeStage stage; +}; + +struct StructureNodeInfo : NodeInfo +{ + StructureNodeStage stage; + bool forceSeparatePaths; + QRectF viewBox; + QSize size; + bool isPathContainer; +}; + + +QT_END_NAMESPACE + +#endif //QQUICKNODEINFO_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickqmlgenerator_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickqmlgenerator_p.h new file mode 100644 index 0000000000000000000000000000000000000000..aa0f662f438af60193a809a79b133b10e9d9bd6d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickqmlgenerator_p.h @@ -0,0 +1,104 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKQMLGENERATOR_P_H +#define QQUICKQMLGENERATOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickgenerator_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_QUICKVECTORIMAGEGENERATOR_EXPORT QQuickQmlGenerator : public QQuickGenerator +{ +public: + QQuickQmlGenerator(const QString fileName, QQuickVectorImageGenerator::GeneratorFlags flags, const QString &outFileName); + ~QQuickQmlGenerator(); + + void setShapeTypeName(const QString &name); + QString shapeTypeName() const; + + void setCommentString(const QString commentString); + QString commentString() const; + + void setRetainFilePaths(bool retainFilePaths) + { + m_retainFilePaths = retainFilePaths; + } + + bool retainFilePaths() const + { + return m_retainFilePaths; + } + + void setAssetFileDirectory(const QString &assetFileDirectory) + { + m_assetFileDirectory = assetFileDirectory; + } + + QString assetFileDirectory() const + { + return m_assetFileDirectory; + } + + void setAssetFilePrefix(const QString &assetFilePrefix) + { + m_assetFilePrefix = assetFilePrefix; + } + + QString assetFilePrefix() const + { + return m_assetFilePrefix; + } + +protected: + void generateNodeBase(const NodeInfo &info) override; + bool generateDefsNode(const NodeInfo &info) override; + void generateImageNode(const ImageNodeInfo &info) override; + void generatePath(const PathNodeInfo &info, const QRectF &overrideBoundingRect) override; + void generateNode(const NodeInfo &info) override; + void generateTextNode(const TextNodeInfo &info) override; + void generateUseNode(const UseNodeInfo &info) override; + bool generateStructureNode(const StructureNodeInfo &info) override; + bool generateRootNode(const StructureNodeInfo &info) override; + void outputShapePath(const PathNodeInfo &info, const QPainterPath *path, const QQuadPath *quadPath, QQuickVectorImageGenerator::PathSelector pathSelector, const QRectF &boundingRect) override; + +private: + void generateGradient(const QGradient *grad); + void generateTransform(const QTransform &xf); + void generatePathContainer(const StructureNodeInfo &info); + + QStringView indent(); + enum StreamFlags { NoFlags = 0x0, SameLine = 0x1 }; + QTextStream &stream(int flags = NoFlags); + const char *shapeName() const; + +private: + int m_indentLevel = 0; + QBuffer m_result; + QTextStream m_stream; + QString outputFileName; + bool m_inShapeItem = false; + QByteArray m_shapeTypeName; + QString m_commentString; + bool m_retainFilePaths = false; + QString m_assetFileDirectory; + QString m_assetFilePrefix; +}; + +QT_END_NAMESPACE + +#endif // QQUICKQMLGENERATOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickvectorimageglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickvectorimageglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..1a08a08e56064d748552bd4cd6093aa1472e7c9e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qquickvectorimageglobal_p.h @@ -0,0 +1,43 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTQUICKVECTORIMAGEGLOBAL_P_H +#define QTQUICKVECTORIMAGEGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QQuickVectorImageGenerator +{ + enum PathSelector { + FillPath = 0x1, + StrokePath = 0x2, + FillAndStroke = 0x3 + }; + + enum GeneratorFlag { + OptimizePaths = 0x01, + CurveRenderer = 0x02, + OutlineStrokeMode = 0x04 + }; + + Q_DECLARE_FLAGS(GeneratorFlags, GeneratorFlag); + Q_DECLARE_OPERATORS_FOR_FLAGS(GeneratorFlags); +} + +QT_END_NAMESPACE + +#endif //QTQUICKVECTORIMAGEGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qsvgvisitorimpl_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qsvgvisitorimpl_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4cb2d29b8b48cb62fc5c7187f0d2382cbbdb5830 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/qsvgvisitorimpl_p.h @@ -0,0 +1,72 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGVISITORIMPL_P_H +#define QSVGVISITORIMPL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qquickgenerator_p.h" + +QT_BEGIN_NAMESPACE + +class QTextStream; +class QSvgTinyDocument; +class QString; +class QQuickItem; + +class QSvgVisitorImpl : public QSvgVisitor +{ +public: + QSvgVisitorImpl(const QString svgFileName, QQuickGenerator *generator); + bool traverse(); + +protected: + void visitNode(const QSvgNode *node) override; + void visitImageNode(const QSvgImage *node) override; + void visitRectNode(const QSvgRect *node) override; + void visitEllipseNode(const QSvgEllipse *node) override; + void visitPathNode(const QSvgPath *node) override; + void visitLineNode(const QSvgLine *node) override; + void visitPolygonNode(const QSvgPolygon *node) override; + void visitPolylineNode(const QSvgPolyline *node) override; + void visitTextNode(const QSvgText *node) override; + void visitUseNode(const QSvgUse *node) override; + bool visitDefsNodeStart(const QSvgDefs *node) override; + bool visitStructureNodeStart(const QSvgStructureNode *node) override; + void visitStructureNodeEnd(const QSvgStructureNode *node) override; + + bool visitDocumentNodeStart(const QSvgTinyDocument *node) override; + void visitDocumentNodeEnd(const QSvgTinyDocument *node) override; + + bool visitSwitchNodeStart(const QSvgSwitch *node) override; + void visitSwitchNodeEnd(const QSvgSwitch *node) override; + +private: + void fillCommonNodeInfo(const QSvgNode *node, NodeInfo &info); + void handleBaseNodeSetup(const QSvgNode *node); + void handleBaseNode(const QSvgNode *node); + void handleBaseNodeEnd(const QSvgNode *node); + void handlePathNode(const QSvgNode *node, const QPainterPath &path); + void outputShapePath(QPainterPath pathCopy, const PathNodeInfo &info); + static QString gradientCssDescription(const QGradient *gradient); + static QString colorCssDescription(QColor color); + +private: + QString m_svgFileName; + QQuickGenerator *m_generator; +}; + +QT_END_NAMESPACE + +#endif // QSVGVISITORIMPL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/utils_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/utils_p.h new file mode 100644 index 0000000000000000000000000000000000000000..86e03710b44ec3bbea260987b1d7d3ff4916b5bc --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickVectorImageGenerator/6.8.1/QtQuickVectorImageGenerator/private/utils_p.h @@ -0,0 +1,264 @@ +// Copyright (C) 2024 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef UTILS_P_H +#define UTILS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QQuickVectorImageGenerator::Utils +{ + +class ViewBoxItem : public QQuickItem +{ +public: + ViewBoxItem(const QRectF viewBox, QQuickItem *parent = nullptr) : QQuickItem(parent), m_viewBox(viewBox) { setXForm(); } + +protected: + void geometryChange(const QRectF &/*newGeometry*/, const QRectF &/*oldGeometry*/) override + { + setXForm(); + } + +private: + void setXForm() + { + auto xformProp = transform(); + xformProp.clear(&xformProp); + bool translate = !qFuzzyIsNull(m_viewBox.x()) || !qFuzzyIsNull(m_viewBox.y()); + if (translate) { + auto *tr = new QQuickTranslate(this); + tr->setX(-m_viewBox.x()); + tr->setY(-m_viewBox.y()); + xformProp.append(&xformProp, tr); + } + if (!m_viewBox.isEmpty() && width() && height()) { + auto *scale = new QQuickScale(this); + qreal sx = width() / m_viewBox.width(); + qreal sy = height() / m_viewBox.height(); + + scale->setXScale(sx); + scale->setYScale(sy); + xformProp.append(&xformProp, scale); + } + } + QRectF m_viewBox; +}; + +inline QPainterPath polygonToPath(const QPolygonF &poly, bool closed) +{ + QPainterPath path; + if (poly.isEmpty()) + return path; + bool first = true; + for (const auto &p : poly) { + if (first) + path.moveTo(p); + else + path.lineTo(p); + first = false; + } + if (closed) + path.closeSubpath(); + return path; +} + +inline QString pathHintString(const QQuadPath &qp) +{ + QString res; + QTextStream str(&res); + auto flags = qp.pathHints(); + if (!flags) + return res; + str << "pathHints:"; + bool first = true; + +#define CHECK_PATH_HINT(flagName) \ + if (flags.testFlag(QQuadPath::flagName)) { \ + if (!first) \ + str << " |"; \ + first = false; \ + str << " ShapePath." #flagName; \ + } + + CHECK_PATH_HINT(PathLinear) + CHECK_PATH_HINT(PathQuadratic) + CHECK_PATH_HINT(PathConvex) + CHECK_PATH_HINT(PathFillOnRight) + CHECK_PATH_HINT(PathSolid) + CHECK_PATH_HINT(PathNonIntersecting) + CHECK_PATH_HINT(PathNonOverlappingControlPointTriangles) + + return res; +} + +// Find the square that gives the same gradient in QGradient::LogicalMode as +// objModeRect does in QGradient::ObjectMode + +// When the object's bounding box is not square, the stripes that are conceptually +// perpendicular to the gradient vector within object bounding box space shall render +// non-perpendicular relative to the gradient vector in user space due to application +// of the non-uniform scaling transformation from bounding box space to user space. +inline QRectF mapToQtLogicalMode(const QRectF &objModeRect, const QRectF &boundingRect) +{ + + QRect pixelRect(objModeRect.x() * boundingRect.width() + boundingRect.left(), + objModeRect.y() * boundingRect.height() + boundingRect.top(), + objModeRect.width() * boundingRect.width(), + objModeRect.height() * boundingRect.height()); + + if (pixelRect.isEmpty()) // pure horizontal/vertical gradient + return pixelRect; + + double w = boundingRect.width(); + double h = boundingRect.height(); + double objModeSlope = objModeRect.height() / objModeRect.width(); + double a = objModeSlope * w / h; + + // do calculation with origin == pixelRect.topLeft + double x2 = pixelRect.width(); + double y2 = pixelRect.height(); + double x = (x2 + a * y2) / (1 + a * a); + double y = y2 - (x - x2)/a; + + return QRectF(pixelRect.topLeft(), QSizeF(x,y)); +} + +inline QString toSvgString(const QPainterPath &path) +{ + QString svgPathString; + QTextStream strm(&svgPathString); + + for (int i = 0; i < path.elementCount(); ++i) { + QPainterPath::Element element = path.elementAt(i); + if (element.isMoveTo()) { + strm << "M " << element.x << " " << element.y << " "; + } else if (element.isLineTo()) { + strm << "L " << element.x << " " << element.y << " "; + } else if (element.isCurveTo()) { + QPointF c1(element.x, element.y); + ++i; + element = path.elementAt(i); + + QPointF c2(element.x, element.y); + ++i; + element = path.elementAt(i); + QPointF ep(element.x, element.y); + + strm << "C " + << c1.x() << " " + << c1.y() << " " + << c2.x() << " " + << c2.y() << " " + << ep.x() << " " + << ep.y() << " "; + } + } + + return svgPathString; +} + +inline QString toSvgString(const QQuadPath &path) +{ + QString svgPathString; + QTextStream strm(&svgPathString); + path.iterateElements([&](const QQuadPath::Element &e, int) { + if (e.isSubpathStart()) + strm << "M " << e.startPoint().x() << " " << e.startPoint().y() << " "; + if (e.isLine()) + strm << "L " << e.endPoint().x() << " " << e.endPoint().y() << " "; + else + strm << "Q " << e.controlPoint().x() << " " << e.controlPoint().y() << " " + << e.endPoint().x() << " " << e.endPoint().y() << " "; + }); + + return svgPathString; +} + +inline QString strokeCapStyleString(Qt::PenCapStyle strokeCapStyle) +{ + QString capStyle; + switch (strokeCapStyle) { + case Qt::FlatCap: + capStyle = QStringLiteral("ShapePath.FlatCap"); + break; + case Qt::SquareCap: + capStyle = QStringLiteral("ShapePath.SquareCap"); + break; + case Qt::RoundCap: + capStyle = QStringLiteral("ShapePath.RoundCap"); + break; + default: + Q_UNREACHABLE(); + break; + } + + return capStyle; +} + +inline QString strokeJoinStyleString(Qt::PenJoinStyle strokeJoinStyle) +{ + QString joinStyle; + switch (strokeJoinStyle) { + case Qt::MiterJoin: + joinStyle = QStringLiteral("ShapePath.MiterJoin"); + break; + case Qt::BevelJoin: + joinStyle = QStringLiteral("ShapePath.BevelJoin"); + break; + case Qt::RoundJoin: + joinStyle = QStringLiteral("ShapePath.RoundJoin"); + break; + default: + //TODO: Add support for SvgMiter case + Q_UNREACHABLE(); + break; + } + + return joinStyle; +} + +template +inline QString listString(QList list) +{ + if (list.isEmpty()) + return QStringLiteral("[]"); + + QString listString; + QTextStream stream(&listString); + stream << "["; + + if (list.length() > 1) { + for (int i = 0; i < list.length() - 1; i++) { + T v = list[i]; + stream << v << ", "; + } + } + + stream << list.last() << "]"; + return listString; +} + +} + +QT_END_NAMESPACE + +#endif // UTILS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidget_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidget_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3f64de21f47829943dc80d7a67f2661f8300c95c --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidget_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QACCESSIBLEQUICKWIDGET_H +#define QACCESSIBLEQUICKWIDGET_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickwidget.h" +#include + +#include + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(accessibility) + +// These classes implement the QQuickWiget accessibility switcharoo, +// where the child items of the QQuickWidgetOffscreenWindow are reported +// as child accessible interfaces of the QAccessibleQuickWidget. +class QAccessibleQuickWidget: public QAccessibleWidget +{ +public: + QAccessibleQuickWidget(QQuickWidget* widget); + ~QAccessibleQuickWidget(); + + QAccessibleInterface *child(int index) const override; + int childCount() const override; + int indexOfChild(const QAccessibleInterface *iface) const override; + QAccessibleInterface *childAt(int x, int y) const override; + +private: + void repairWindow(); + + std::unique_ptr m_accessibleWindow; + QMetaObject::Connection m_connection; + Q_DISABLE_COPY(QAccessibleQuickWidget) +}; + +class QAccessibleQuickWidgetOffscreenWindow: public QAccessibleQuickWindow +{ +public: + QAccessibleQuickWidgetOffscreenWindow(QQuickWindow *window); + QAccessibleInterface *child(int index) const override; + int childCount() const override; + int indexOfChild(const QAccessibleInterface *iface) const override; + QAccessibleInterface *childAt(int x, int y) const override; +}; + +#endif // accessibility + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidgetfactory_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidgetfactory_p.h new file mode 100644 index 0000000000000000000000000000000000000000..18827a60f04f940d320f026d048f522b28d99031 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qaccessiblequickwidgetfactory_p.h @@ -0,0 +1,31 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#include +#include + +#ifndef QACCESSIBLEQUICKWIDGETFACTORY_H +#define QACCESSIBLEQUICKWIDGETFACTORY_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(accessibility) + +QAccessibleInterface *qAccessibleQuickWidgetFactory(const QString &classname, QObject *object); + +#endif + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qquickwidget_p.h b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qquickwidget_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8232a8af9d28766a46ec9a507f935df4e14b15aa --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtQuickWidgets/6.8.1/QtQuickWidgets/private/qquickwidget_p.h @@ -0,0 +1,126 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QQUICKWIDGET_P_H +#define QQUICKWIDGET_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qquickwidget.h" +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "private/qquickitemchangelistener_p.h" + +QT_BEGIN_NAMESPACE + +class QQmlContext; +class QQmlError; +class QQuickItem; +class QQmlComponent; +class QQuickRenderControl; + +class QQuickWidgetPrivate + : public QWidgetPrivate, + public QQuickItemChangeListener +{ + Q_DECLARE_PUBLIC(QQuickWidget) +public: + static QQuickWidgetPrivate* get(QQuickWidget *view) { return view->d_func(); } + static const QQuickWidgetPrivate* get(const QQuickWidget *view) { return view->d_func(); } + + QQuickWidgetPrivate(); + + void destroy(); + void execute(); + void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &oldGeometry) override; + void initResize(); + void updateSize(); + void updatePosition(); + void updateFrambufferObjectSize(); + void setRootObject(QObject *); + void render(bool needsSync); + void renderSceneGraph(); + void initializeWithRhi(); + void handleContextCreationFailure(const QSurfaceFormat &format); + + QPlatformBackingStoreRhiConfig rhiConfig() const override; + TextureData texture() const override; + QPlatformTextureList::Flags textureListFlags() override; + QImage grabFramebuffer() override; + + void init(QQmlEngine* e = nullptr); + void ensureBackingScene(); + void initOffscreenWindow(); + void ensureEngine() const; + void handleWindowChange(); + void invalidateRenderControl(); + + QSize rootObjectSize() const; + + QPointer root; + + QUrl source; + + mutable QPointer engine; + QQmlComponent *component; + QBasicTimer resizetimer; + QQuickWindow *offscreenWindow; + QQuickRenderControl *renderControl; + + QRhi *rhi; + QRhiTexture *outputTexture; + QRhiRenderBuffer *depthStencil; + QRhiRenderBuffer *msaaBuffer; + QRhiTextureRenderTarget *rt; + QRhiRenderPassDescriptor *rtRp; + + QQuickWidget::ResizeMode resizeMode; + QSize initialSize; + QElapsedTimer frameTimer; + + QBasicTimer updateTimer; + bool eventPending; + bool updatePending; + bool fakeHidden; + + int requestedSamples; + + bool useSoftwareRenderer; + QImage softwareImage; + QRegion updateRegion; + bool forceFullUpdate; + bool deviceLost; + + QBackingStoreRhiSupport offscreenRenderer; +}; + +class QQuickWidgetOffscreenWindow: public QQuickWindow +{ + Q_OBJECT + +public: + QQuickWidgetOffscreenWindow(QQuickWindowPrivate &dd, QQuickRenderControl *control); +}; + +QT_END_NAMESPACE + +#endif // QQuickWidget_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qshaderrewriter_p.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qshaderrewriter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..d3c449cb36fe05d4f9cd8b4eb08f342cabeee2ba --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qshaderrewriter_p.h @@ -0,0 +1,30 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSHADERREWRITER_P_H +#define QSHADERREWRITER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +namespace QShaderRewriter { +void debugTokenizer(const QByteArray &input); +QByteArray addZAdjustment(const QByteArray &input, int vertexInputLocation); +} + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvcompiler_p.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvcompiler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8f599e827f47e81d16a41606754ea9c252c42e6d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvcompiler_p.h @@ -0,0 +1,59 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSPIRVCOMPILER_P_H +#define QSPIRVCOMPILER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +struct QSpirvCompilerPrivate; +class QIODevice; + +class Q_SHADERTOOLS_EXPORT QSpirvCompiler +{ +public: + QSpirvCompiler(); + ~QSpirvCompiler(); + + enum Flag { + RewriteToMakeBatchableForSG = 0x01, + FullDebugInfo = 0x02 + }; + Q_DECLARE_FLAGS(Flags, Flag) + + void setSourceFileName(const QString &fileName); + void setSourceFileName(const QString &fileName, QShader::Stage stage); + void setSourceDevice(QIODevice *device, QShader::Stage stage, const QString &fileName = QString()); + void setSourceString(const QByteArray &sourceString, QShader::Stage stage, const QString &fileName = QString()); + void setFlags(Flags flags); + void setPreamble(const QByteArray &preamble); + void setSGBatchingVertexInputLocation(int location); + + QByteArray compileToSpirv(); + QString errorMessage() const; + +private: + Q_DISABLE_COPY(QSpirvCompiler) + QSpirvCompilerPrivate *d = nullptr; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QSpirvCompiler::Flags) + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshader_p.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshader_p.h new file mode 100644 index 0000000000000000000000000000000000000000..82f914e98d9a31b012ea95f926d421e897c98cd5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshader_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSPIRVSHADER_P_H +#define QSPIRVSHADER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +struct QSpirvShaderPrivate; + +class Q_SHADERTOOLS_EXPORT QSpirvShader +{ +public: + enum class GlslFlag { + GlslEs = 0x01, + FixClipSpace = 0x02, + FragDefaultMediump = 0x04 + }; + Q_DECLARE_FLAGS(GlslFlags, GlslFlag) + + enum class MslFlag { + VertexAsCompute = 0x01, + WithUInt16Index = 0x02, + WithUInt32Index = 0x04 + }; + Q_DECLARE_FLAGS(MslFlags, MslFlag) + + enum class RemapFlag { + StripOnly = 0x01 + }; + Q_DECLARE_FLAGS(RemapFlags, RemapFlag) + + QSpirvShader(); + ~QSpirvShader(); + + void setSpirvBinary(const QByteArray &spirv, QShader::Stage stage); + + QShaderDescription shaderDescription() const; + + QByteArray spirvBinary() const; + QByteArray remappedSpirvBinary(RemapFlags flags = RemapFlags(), QString *errorMessage = nullptr) const; + + struct SeparateToCombinedImageSamplerMapping { + QByteArray textureName; + QByteArray samplerName; + QByteArray combinedSamplerName; + }; + + struct TessellationInfo { + // The tess.evaluation shader will likely declaer something like layout(triangles, fractional_odd_spacing, ccw) in; + // For Metal we need to know the tessellation mode (triangles) when generating the translated tess.control shader. + struct { + QShaderDescription::TessellationMode mode = QShaderDescription::TrianglesTessellationMode; + } infoForTesc; + // The tess.control shader will likely declare something like layout(vertices = 3) out; + // For Metal we need to know this value (3) when generating the translated tess.eval. shader. + struct { + int vertexCount = 3; + } infoForTese; + }; + + struct MultiViewInfo { + // layout(num_views = viewCount) in; see GL_OVR_multiview + int viewCount = 0; + }; + + QByteArray translateToGLSL(int version, + GlslFlags flags, + QShader::Stage stage, + const MultiViewInfo &multiViewInfo, + QVector *separateToCombinedImageSamplerMappings) const; + QByteArray translateToHLSL(int version, + QShader::NativeResourceBindingMap *nativeBindings) const; + QByteArray translateToMSL(int version, + MslFlags flags, + QShader::Stage stage, + QShader::NativeResourceBindingMap *nativeBindings, + QShader::NativeShaderInfo *shaderInfo, + const MultiViewInfo &multiViewInfo, + const TessellationInfo &tessInfo) const; + QString translationErrorMessage() const; + +private: + Q_DISABLE_COPY(QSpirvShader) + QSpirvShaderPrivate *d = nullptr; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QSpirvShader::GlslFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(QSpirvShader::MslFlags) +Q_DECLARE_OPERATORS_FOR_FLAGS(QSpirvShader::RemapFlags) + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshaderremap_p.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshaderremap_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4a07e7ea25b105ad35fa92c2a6162663e7eacfa5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qspirvshaderremap_p.h @@ -0,0 +1,38 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSPIRVSHADERREMAP_P_H +#define QSPIRVSHADERREMAP_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of a number of Qt sources files. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "qspirvshader_p.h" + +QT_BEGIN_NAMESPACE + +class Q_SHADERTOOLS_EXPORT QSpirvShaderRemapper +{ +public: + QByteArray remap(const QByteArray &ir, QSpirvShader::RemapFlags flags); + QString errorMessage() const { return remapErrorMsg; } + +private: + void remapErrorHandler(const std::string &s); + void remapLogHandler(const std::string &s); + + QString remapErrorMsg; +}; + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qtshadertoolsglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qtshadertoolsglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..bebdf45853c5033e80af4bd13d0c2df178855aad --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/private/qtshadertoolsglobal_p.h @@ -0,0 +1,21 @@ +// Copyright (C) 2021 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTSHADERTOOLSGLOBAL_P_H +#define QTSHADERTOOLSGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qtshadertoolsglobal.h" +#include + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/rhi/qshaderbaker.h b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/rhi/qshaderbaker.h new file mode 100644 index 0000000000000000000000000000000000000000..cda2baef9759422f0f761ab9837a222c0d7da03a --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtShaderTools/6.8.1/QtShaderTools/rhi/qshaderbaker.h @@ -0,0 +1,72 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSHADERBAKER_H +#define QSHADERBAKER_H + +// +// W A R N I N G +// ------------- +// +// This file is part of the RHI API, with limited compatibility guarantees. +// Usage of this API may make your code source and binary incompatible with +// future versions of Qt. +// + +#include +#include + +QT_BEGIN_NAMESPACE + +struct QShaderBakerPrivate; +class QIODevice; + +class Q_SHADERTOOLS_EXPORT QShaderBaker +{ +public: + enum class SpirvOption { + GenerateFullDebugInfo = 0x01, + StripDebugAndVarInfo = 0x02 + }; + Q_DECLARE_FLAGS(SpirvOptions, SpirvOption) + + QShaderBaker(); + ~QShaderBaker(); + + void setSourceFileName(const QString &fileName); + void setSourceFileName(const QString &fileName, QShader::Stage stage); + + void setSourceDevice(QIODevice *device, QShader::Stage stage, + const QString &fileName = QString()); + + void setSourceString(const QByteArray &sourceString, QShader::Stage stage, + const QString &fileName = QString()); + + typedef QPair GeneratedShader; + void setGeneratedShaders(const QList &v); + void setGeneratedShaderVariants(const QList &v); + + void setPreamble(const QByteArray &preamble); + void setBatchableVertexShaderExtraInputLocation(int location); + void setPerTargetCompilation(bool enable); + void setBreakOnShaderTranslationError(bool enable); + void setTessellationMode(QShaderDescription::TessellationMode mode); + void setTessellationOutputVertexCount(int count); + void setMultiViewCount(int count); + + void setSpirvOptions(SpirvOptions options); + + QShader bake(); + + QString errorMessage() const; + +private: + Q_DISABLE_COPY(QShaderBaker) + QShaderBakerPrivate *d = nullptr; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QShaderBaker::SpirvOptions) + +QT_END_NAMESPACE + +#endif diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlcachedresult_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlcachedresult_p.h new file mode 100644 index 0000000000000000000000000000000000000000..143e6a6d7b09f320db2506bfefc619868c2591bf --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlcachedresult_p.h @@ -0,0 +1,85 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLCACHEDRESULT_P_H +#define QSQLCACHEDRESULT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of other Qt classes. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include "QtSql/qsqlresult.h" +#include "QtSql/private/qsqlresult_p.h" +#include + +QT_BEGIN_NAMESPACE + +class QVariant; + +class QSqlCachedResultPrivate; + +class Q_SQL_EXPORT QSqlCachedResult: public QSqlResult +{ + Q_DECLARE_PRIVATE(QSqlCachedResult) + +public: + typedef QList ValueCache; + +protected: + QSqlCachedResult(QSqlCachedResultPrivate &d); + + void init(int colCount); + void cleanup(); + void clearValues(); + + virtual bool gotoNext(ValueCache &values, int index) = 0; + + QVariant data(int i) override; + bool isNull(int i) override; + bool fetch(int i) override; + bool fetchNext() override; + bool fetchPrevious() override; + bool fetchFirst() override; + bool fetchLast() override; + + int colCount() const; + ValueCache &cache(); + + void virtual_hook(int id, void *data) override; + void detachFromResultSet() override; + void setNumericalPrecisionPolicy(QSql::NumericalPrecisionPolicy policy) override; +private: + bool cacheNext(); +}; + +class Q_SQL_EXPORT QSqlCachedResultPrivate: public QSqlResultPrivate +{ + Q_DECLARE_PUBLIC(QSqlCachedResult) + +public: + using QSqlResultPrivate::QSqlResultPrivate; + + bool canSeek(int i) const; + inline int cacheCount() const; + void init(int count, bool fo); + void cleanup(); + int nextIndex(); + void revertLast(); + + QSqlCachedResult::ValueCache cache; + int rowCacheEnd = 0; + int colCount = 0; + bool atEnd = false; +}; + +QT_END_NAMESPACE + +#endif // QSQLCACHEDRESULT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqldriver_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqldriver_p.h new file mode 100644 index 0000000000000000000000000000000000000000..cc2c1f971899582772c02aadbb1b8a029beaa344 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqldriver_p.h @@ -0,0 +1,44 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLDRIVER_P_H +#define QSQLDRIVER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the QtSQL module. This header file may change from version to version +// without notice, or even be removed. +// +// We mean it. +// + +#include +#include "private/qobject_p.h" +#include "qsqldriver.h" +#include "qsqlerror.h" + +QT_BEGIN_NAMESPACE + +class QSqlDriverPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QSqlDriver) + +public: + QSqlDriverPrivate(QSqlDriver::DbmsType type = QSqlDriver::UnknownDbms) + : QObjectPrivate(), + dbmsType(type) + { } + + QSqlError error; + QSql::NumericalPrecisionPolicy precisionPolicy = QSql::LowPrecisionDouble; + QSqlDriver::DbmsType dbmsType; + bool isOpen = false; + bool isOpenError = false; +}; + +QT_END_NAMESPACE + +#endif // QSQLDRIVER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlnulldriver_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlnulldriver_p.h new file mode 100644 index 0000000000000000000000000000000000000000..4469c59315a2ed8338e290e5fd9c445d0297041d --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlnulldriver_p.h @@ -0,0 +1,76 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLNULLDRIVER_P_H +#define QSQLNULLDRIVER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. This header file may +// change from version to version without notice, or even be +// removed. +// +// We mean it. +// + +#include +#include "QtCore/qvariant.h" +#include "QtSql/qsqldriver.h" +#include "QtSql/qsqlerror.h" +#include "QtSql/qsqlresult.h" + +QT_BEGIN_NAMESPACE + +class QSqlNullResult : public QSqlResult +{ +public: + inline explicit QSqlNullResult(const QSqlDriver* d): QSqlResult(d) + { QSqlResult::setLastError( + QSqlError(QLatin1StringView("Driver not loaded"), QLatin1StringView("Driver not loaded"), QSqlError::ConnectionError)); } +protected: + inline QVariant data(int) override { return QVariant(); } + inline bool reset (const QString&) override { return false; } + inline bool fetch(int) override { return false; } + inline bool fetchFirst() override { return false; } + inline bool fetchLast() override { return false; } + inline bool isNull(int) override { return false; } + inline int size() override { return -1; } + inline int numRowsAffected() override { return 0; } + + inline void setAt(int) override {} + inline void setActive(bool) override {} + inline void setLastError(const QSqlError&) override {} + inline void setQuery(const QString&) override {} + inline void setSelect(bool) override {} + inline void setForwardOnly(bool) override {} + + inline bool exec() override { return false; } + inline bool prepare(const QString&) override { return false; } + inline bool savePrepare(const QString&) override { return false; } + inline void bindValue(int, const QVariant&, QSql::ParamType) override {} + inline void bindValue(const QString&, const QVariant&, QSql::ParamType) override {} +}; + +class QSqlNullDriver : public QSqlDriver +{ +public: + inline QSqlNullDriver(): QSqlDriver() + { QSqlDriver::setLastError( + QSqlError(QLatin1StringView("Driver not loaded"), QLatin1StringView("Driver not loaded"), QSqlError::ConnectionError)); } + inline bool hasFeature(DriverFeature) const override { return false; } + inline bool open(const QString &, const QString &, const QString &, const QString &, int, const QString&) override + { return false; } + inline void close() override {} + inline QSqlResult *createResult() const override { return new QSqlNullResult(this); } + +protected: + inline void setOpen(bool) override {} + inline void setOpenError(bool) override {} + inline void setLastError(const QSqlError&) override {} +}; + +QT_END_NAMESPACE + +#endif // QSQLNULLDRIVER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlquerymodel_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlquerymodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..c59f7e2b1a61472c30b11a543c8444d0bdb590f8 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlquerymodel_p.h @@ -0,0 +1,93 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLQUERYMODEL_P_H +#define QSQLQUERYMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of qsql*model.h . This header file may change from version to version +// without notice, or even be removed. +// +// We mean it. +// + +#include +#include "private/qabstractitemmodel_p.h" +#include "QtSql/qsqlerror.h" +#include "QtSql/qsqlquery.h" +#include "QtSql/qsqlrecord.h" +#include "QtCore/qhash.h" +#include "QtCore/qlist.h" +#include "QtCore/qvarlengtharray.h" + +QT_REQUIRE_CONFIG(sqlmodel); + +QT_BEGIN_NAMESPACE + +class QSqlQueryModelPrivate: public QAbstractItemModelPrivate +{ + Q_DECLARE_PUBLIC(QSqlQueryModel) +public: + QSqlQueryModelPrivate() : atEnd(false), nestedResetLevel(0) {} + ~QSqlQueryModelPrivate(); + + void prefetch(int); + void initColOffsets(int size); + int columnInQuery(int modelColumn) const; + + mutable QSqlQuery query = { QSqlQuery(nullptr) }; + mutable QSqlError error; + QModelIndex bottom; + QSqlRecord rec; + uint atEnd : 1; + QList> headers; + QVarLengthArray colOffsets; // used to calculate indexInQuery of columns + int nestedResetLevel; +}; + +// helpers for building SQL expressions +class QSqlQueryModelSql +{ +public: + // SQL keywords + inline const static QLatin1StringView as() { return QLatin1StringView("AS"); } + inline const static QLatin1StringView asc() { return QLatin1StringView("ASC"); } + inline const static QLatin1StringView comma() { return QLatin1StringView(","); } + inline const static QLatin1StringView desc() { return QLatin1StringView("DESC"); } + inline const static QLatin1StringView eq() { return QLatin1StringView("="); } + // "and" is a C++ keyword + inline const static QLatin1StringView et() { return QLatin1StringView("AND"); } + inline const static QLatin1StringView from() { return QLatin1StringView("FROM"); } + inline const static QLatin1StringView leftJoin() { return QLatin1StringView("LEFT JOIN"); } + inline const static QLatin1StringView on() { return QLatin1StringView("ON"); } + inline const static QLatin1StringView orderBy() { return QLatin1StringView("ORDER BY"); } + inline const static QLatin1StringView parenClose() { return QLatin1StringView(")"); } + inline const static QLatin1StringView parenOpen() { return QLatin1StringView("("); } + inline const static QLatin1StringView select() { return QLatin1StringView("SELECT"); } + inline const static QLatin1StringView sp() { return QLatin1StringView(" "); } + inline const static QLatin1StringView where() { return QLatin1StringView("WHERE"); } + + // Build expressions based on key words + inline const static QString as(const QString &a, const QString &b) { return b.isEmpty() ? a : concat(concat(a, as()), b); } + inline const static QString asc(const QString &s) { return concat(s, asc()); } + inline const static QString comma(const QString &a, const QString &b) { return a.isEmpty() ? b : b.isEmpty() ? a : QString(a).append(comma()).append(b); } + inline const static QString concat(const QString &a, const QString &b) { return a.isEmpty() ? b : b.isEmpty() ? a : QString(a).append(sp()).append(b); } + inline const static QString desc(const QString &s) { return concat(s, desc()); } + inline const static QString eq(const QString &a, const QString &b) { return QString(a).append(eq()).append(b); } + inline const static QString et(const QString &a, const QString &b) { return a.isEmpty() ? b : b.isEmpty() ? a : concat(concat(a, et()), b); } + inline const static QString from(const QString &s) { return concat(from(), s); } + inline const static QString leftJoin(const QString &s) { return concat(leftJoin(), s); } + inline const static QString on(const QString &s) { return concat(on(), s); } + inline const static QString orderBy(const QString &s) { return s.isEmpty() ? s : concat(orderBy(), s); } + inline const static QString paren(const QString &s) { return s.isEmpty() ? s : parenOpen() + s + parenClose(); } + inline const static QString select(const QString &s) { return concat(select(), s); } + inline const static QString where(const QString &s) { return s.isEmpty() ? s : concat(where(), s); } +}; + +QT_END_NAMESPACE + +#endif // QSQLQUERYMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlresult_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlresult_p.h new file mode 100644 index 0000000000000000000000000000000000000000..aef8f1870939cd8028c7dbdfe548879842b0d15e --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqlresult_p.h @@ -0,0 +1,108 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLRESULT_P_H +#define QSQLRESULT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of qsql*model.h . This header file may change from version to version +// without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include "qsqlerror.h" +#include "qsqlresult.h" +#include "qsqldriver.h" + +QT_BEGIN_NAMESPACE + +// convenience method Q*ResultPrivate::drv_d_func() returns pointer to private driver. Compare to Q_DECLARE_PRIVATE in qglobal.h. +#define Q_DECLARE_SQLDRIVER_PRIVATE(Class) \ + inline const Class##Private* drv_d_func() const { return !sqldriver ? nullptr : reinterpret_cast(static_cast(sqldriver))->d_func(); } \ + inline Class##Private* drv_d_func() { return !sqldriver ? nullptr : reinterpret_cast(static_cast(sqldriver))->d_func(); } + +struct QHolder { + QHolder(const QString &hldr = QString(), qsizetype index = -1): holderName(hldr), holderPos(index) { } + bool operator==(const QHolder &h) const { return h.holderPos == holderPos && h.holderName == holderName; } + bool operator!=(const QHolder &h) const { return h.holderPos != holderPos || h.holderName != holderName; } + QString holderName; + qsizetype holderPos; +}; + +class Q_SQL_EXPORT QSqlResultPrivate +{ + Q_DECLARE_PUBLIC(QSqlResult) + +public: + QSqlResultPrivate(QSqlResult *q, const QSqlDriver *drv) + : q_ptr(q), + sqldriver(const_cast(drv)) + { } + virtual ~QSqlResultPrivate() = default; + + void clearValues() + { + values.clear(); + bindCount = 0; + } + + void resetBindCount() + { + bindCount = 0; + } + + void clearIndex() + { + indexes.clear(); + holders.clear(); + types.clear(); + } + + void clear() + { + clearValues(); + clearIndex(); + } + + virtual QString fieldSerial(qsizetype) const; + QString positionalToNamedBinding(const QString &query) const; + QString namedToPositionalBinding(const QString &query); + QString holderAt(int index) const; + + QSqlResult *q_ptr = nullptr; + QPointer sqldriver; + QString sql; + QSqlError error; + + QString executedQuery; + QHash types; + QList values; + using IndexMap = QHash>; + IndexMap indexes; + + using QHolderVector = QList; + QHolderVector holders; + + QSqlResult::BindingSyntax binds = QSqlResult::PositionalBinding; + QSql::NumericalPrecisionPolicy precisionPolicy = QSql::LowPrecisionDouble; + int idx = QSql::BeforeFirstRow; + int bindCount = 0; + bool active = false; + bool isSel = false; + bool forwardOnly = false; + bool positionalBindingEnabled = true; + + static bool isVariantNull(const QVariant &variant); +}; + +QT_END_NAMESPACE + +#endif // QSQLRESULT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqltablemodel_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqltablemodel_p.h new file mode 100644 index 0000000000000000000000000000000000000000..7d0b415921871aa4c27470fa2d42fa29f28f99aa --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qsqltablemodel_p.h @@ -0,0 +1,158 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSQLTABLEMODEL_P_H +#define QSQLTABLEMODEL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of qsql*model.h . This header file may change from version to version +// without notice, or even be removed. +// +// We mean it. +// + +#include +#include "private/qsqlquerymodel_p.h" +#include "QtSql/qsqlindex.h" +#include "QtCore/qmap.h" + +QT_REQUIRE_CONFIG(sqlmodel); + +QT_BEGIN_NAMESPACE + +class Q_AUTOTEST_EXPORT QSqlTableModelPrivate: public QSqlQueryModelPrivate +{ + Q_DECLARE_PUBLIC(QSqlTableModel) + +public: + QSqlTableModelPrivate() + : sortColumn(-1), + sortOrder(Qt::AscendingOrder), + strategy(QSqlTableModel::OnRowChange), + busyInsertingRows(false) + {} + + void clear(); + virtual void clearCache(); + QSqlRecord record(const QList &values) const; + + bool exec(const QString &stmt, bool prepStatement, + const QSqlRecord &rec, const QSqlRecord &whereValues); + virtual void revertCachedRow(int row); + virtual int nameToIndex(const QString &name) const; + QString strippedFieldName(const QString &name) const; + int insertCount(int maxRow = -1) const; + void initRecordAndPrimaryIndex(); + + QSqlDatabase db; + + int sortColumn; + Qt::SortOrder sortOrder; + + QSqlTableModel::EditStrategy strategy; + bool busyInsertingRows; + + QSqlQuery editQuery = { QSqlQuery(nullptr) }; + QSqlIndex primaryIndex; + QString tableName; + QString filter; + QString autoColumn; + + enum Op { None, Insert, Update, Delete }; + + class ModifiedRow + { + public: + inline ModifiedRow(Op o = None, const QSqlRecord &r = QSqlRecord()) + : m_op(None), m_db_values(r), m_insert(o == Insert) + { setOp(o); } + inline Op op() const { return m_op; } + inline void setOp(Op o) + { + if (o == None) + m_submitted = true; + if (o == m_op) + return; + m_submitted = (o != Insert && o != Delete); + m_op = o; + m_rec = m_db_values; + setGenerated(m_rec, m_op == Delete); + } + inline const QSqlRecord &rec() const { return m_rec; } + inline QSqlRecord& recRef() { return m_rec; } + inline void setValue(int c, const QVariant &v) + { + m_submitted = false; + m_rec.setValue(c, v); + m_rec.setGenerated(c, true); + } + inline bool submitted() const { return m_submitted; } + inline void setSubmitted() + { + m_submitted = true; + setGenerated(m_rec, false); + if (m_op == Delete) { + m_rec.clearValues(); + } + else { + m_op = Update; + m_db_values = m_rec; + setGenerated(m_db_values, true); + } + } + inline void refresh(bool exists, const QSqlRecord& newvals) + { + m_submitted = true; + if (exists) { + m_op = Update; + m_db_values = newvals; + m_rec = newvals; + setGenerated(m_rec, false); + } else { + m_op = Delete; + m_rec.clear(); + m_db_values.clear(); + } + } + inline bool insert() const { return m_insert; } + inline void revert() + { + if (m_submitted) + return; + if (m_op == Delete) + m_op = Update; + m_rec = m_db_values; + setGenerated(m_rec, false); + m_submitted = true; + } + inline QSqlRecord primaryValues(const QSqlRecord& pi) const + { + if (m_op == None || m_op == Insert) + return QSqlRecord(); + + return m_db_values.keyValues(pi); + } + private: + inline static void setGenerated(QSqlRecord& r, bool g) + { + for (int i = r.count() - 1; i >= 0; --i) + r.setGenerated(i, g); + } + Op m_op; + QSqlRecord m_rec; + QSqlRecord m_db_values; + bool m_submitted; + bool m_insert; + }; + + typedef QMap CacheMap; + CacheMap cache; +}; + +QT_END_NAMESPACE + +#endif // QSQLTABLEMODEL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qtsql-config_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qtsql-config_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qtsqlglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qtsqlglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..84ec560bdd6ad1873c9be4dce0b00ca61852af08 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSql/6.8.1/QtSql/private/qtsqlglobal_p.h @@ -0,0 +1,22 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTSQLGLOBAL_P_H +#define QTSQLGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include + +#endif // QTSQLGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfilter_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfilter_p.h new file mode 100644 index 0000000000000000000000000000000000000000..b5915348b878b5d8c78373a5caf6db22df2e5ac5 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfilter_p.h @@ -0,0 +1,193 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGFILTER_P_H +#define QSVGFILTER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qsvgnode_p.h" +#include "qtsvgglobal_p.h" +#include "qsvgstructure_p.h" +#include "qgenericmatrix.h" + +#include "QtCore/qlist.h" +#include "QtCore/qhash.h" +#include "QtGui/qvector4d.h" + +QT_BEGIN_NAMESPACE + +class Q_SVG_EXPORT QSvgFeFilterPrimitive : public QSvgStructureNode +{ +public: + QSvgFeFilterPrimitive(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + bool shouldDrawNode(QPainter *, QSvgExtraStates &) const override; + QRectF internalFastBounds(QPainter *, QSvgExtraStates &) const override { return QRectF(); } + QRectF internalBounds(QPainter *, QSvgExtraStates &) const override { return QRectF(); } + QRectF localSubRegion(const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const; + QRectF globalSubRegion(QPainter *p, + const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const; + void clipToTransformedBounds(QImage *buffer, QPainter *p, const QRectF &localRect) const; + virtual QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const = 0; + virtual bool requiresSourceAlpha() const; + QString input() const { + return m_input; + } + QString result() const { + return m_result; + } + + static const QSvgFeFilterPrimitive *castToFilterPrimitive(const QSvgNode *node); + +protected: + QString m_input; + QString m_result; + QSvgRectF m_rect; + + +}; + +class Q_SVG_EXPORT QSvgFeColorMatrix : public QSvgFeFilterPrimitive +{ +public: + enum class ColorShiftType : quint8 { + Matrix, + Saturate, + HueRotate, + LuminanceToAlpha + }; + + typedef QGenericMatrix<5, 5, qreal> Matrix; + typedef QGenericMatrix<5, 1, qreal> Vector; + + QSvgFeColorMatrix(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect, + ColorShiftType type, Matrix matrix); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +private: + ColorShiftType m_type; + Matrix m_matrix; +}; + +class Q_SVG_EXPORT QSvgFeGaussianBlur : public QSvgFeFilterPrimitive +{ +public: + enum class EdgeMode : quint8 { + Duplicate, + Wrap, + None + }; + + QSvgFeGaussianBlur(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect, + qreal stdDeviationX, qreal stdDeviationY, EdgeMode edgemode); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +private: + qreal m_stdDeviationX; + qreal m_stdDeviationY; + EdgeMode m_edgemode; +}; + +class Q_SVG_EXPORT QSvgFeOffset : public QSvgFeFilterPrimitive +{ +public: + QSvgFeOffset(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect, + qreal dx, qreal dy); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +private: + qreal m_dx; + qreal m_dy; +}; + +class Q_SVG_EXPORT QSvgFeMerge : public QSvgFeFilterPrimitive +{ +public: + QSvgFeMerge(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; + bool requiresSourceAlpha() const override; +}; + +class Q_SVG_EXPORT QSvgFeMergeNode : public QSvgFeFilterPrimitive +{ +public: + QSvgFeMergeNode(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +}; + +class Q_SVG_EXPORT QSvgFeComposite : public QSvgFeFilterPrimitive +{ +public: + enum class Operator : quint8 { + Over, + In, + Out, + Atop, + Xor, + Lighter, + Arithmetic + }; + QSvgFeComposite(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect, + QString input2, Operator op, QVector4D k); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; + bool requiresSourceAlpha() const override; +private: + QString m_input2; + Operator m_operator; + QVector4D m_k; +}; + +class Q_SVG_EXPORT QSvgFeFlood : public QSvgFeFilterPrimitive +{ +public: + QSvgFeFlood(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect, const QColor &color); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +private: + QColor m_color; +}; + +class Q_SVG_EXPORT QSvgFeUnsupported : public QSvgFeFilterPrimitive +{ +public: + QSvgFeUnsupported(QSvgNode *parent, QString input, QString result, const QSvgRectF &rect); + Type type() const override; + QImage apply(const QMap &sources, + QPainter *p, const QRectF &itemBounds, const QRectF &filterBounds, + QtSvg::UnitTypes primitiveUnits, QtSvg::UnitTypes filterUnits) const override; +}; + +QT_END_NAMESPACE + +#endif // QSVGFILTER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfont_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfont_p.h new file mode 100644 index 0000000000000000000000000000000000000000..ff6a4e4d3cd522de50b27b595bbbbbd06e7e6515 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgfont_p.h @@ -0,0 +1,69 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGFONT_P_H +#define QSVGFONT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qpainterpath.h" +#include "qhash.h" +#include "qstring.h" +#include "qsvgstyle_p.h" +#include "qtsvgglobal_p.h" + +QT_BEGIN_NAMESPACE + +class Q_SVG_EXPORT QSvgGlyph +{ +public: + QSvgGlyph(QChar unicode, const QPainterPath &path, qreal horizAdvX); + QSvgGlyph() : m_unicode(0), m_horizAdvX(0) {} + + QChar m_unicode; + QPainterPath m_path; + qreal m_horizAdvX; +}; + + +class Q_SVG_EXPORT QSvgFont : public QSvgRefCounted +{ +public: + static constexpr qreal DEFAULT_UNITS_PER_EM = 1000; + QSvgFont(qreal horizAdvX); + + void setFamilyName(const QString &name); + QString familyName() const; + + void setUnitsPerEm(qreal upem); + + void addGlyph(QChar unicode, const QPainterPath &path, qreal horizAdvX = -1); + + void draw(QPainter *p, const QPointF &point, const QString &str, + qreal pixelSize, Qt::Alignment alignment) const; + QRectF boundingRect(QPainter *p, const QPointF &point, const QString &str, + qreal pixelSize, Qt::Alignment alignment) const; + +public: + QString m_familyName; + qreal m_unitsPerEm = DEFAULT_UNITS_PER_EM; + qreal m_horizAdvX; + QHash m_glyphs; + +private: + void draw_helper(QPainter *p, const QPointF &point, const QString &str, qreal pixelSize, + Qt::Alignment alignment, QRectF *boundingRect = nullptr) const; +}; + +QT_END_NAMESPACE + +#endif // QSVGFONT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvggraphics_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvggraphics_p.h new file mode 100644 index 0000000000000000000000000000000000000000..728504020d7ebe116cfd3e80cd202a0dde1cfd3f --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvggraphics_p.h @@ -0,0 +1,268 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGGRAPHICS_P_H +#define QSVGGRAPHICS_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qsvgnode_p.h" +#include "qtsvgglobal_p.h" + +#include "QtGui/qpainterpath.h" +#include "QtGui/qimage.h" +#include "QtGui/qtextlayout.h" +#include "QtGui/qtextoption.h" +#include "QtCore/qstack.h" + +QT_BEGIN_NAMESPACE + +class QTextCharFormat; + +class Q_SVG_EXPORT QSvgAnimation : public QSvgNode +{ +public: + void drawCommand(QPainter *, QSvgExtraStates &) override; + Type type() const override; +}; + +class Q_SVG_EXPORT QSvgEllipse : public QSvgNode +{ +public: + QSvgEllipse(QSvgNode *parent, const QRectF &rect); + bool separateFillStroke() const override; + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF rect() const { return m_bounds; } +private: + QRectF m_bounds; +}; + +class Q_SVG_EXPORT QSvgCircle : public QSvgEllipse +{ +public: + QSvgCircle(QSvgNode *parent, const QRectF &rect) : QSvgEllipse(parent, rect) { } + Type type() const override; +}; + +class Q_SVG_EXPORT QSvgImage : public QSvgNode +{ +public: + QSvgImage(QSvgNode *parent, + const QImage &image, + const QString &filename, + const QRectF &bounds); + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + + QRectF rect() const { return m_bounds; } + const QImage &image() const { return m_image; } + QString filename() const { return m_filename; } +private: + QString m_filename; + QImage m_image; + QRectF m_bounds; +}; + +class Q_SVG_EXPORT QSvgLine : public QSvgNode +{ +public: + QSvgLine(QSvgNode *parent, const QLineF &line); + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool requiresGroupRendering() const override; + QLineF line() const { return m_line; } +private: + QRectF internalBounds(QPainter *p, QSvgExtraStates &states, BoundsMode mode) const; + QLineF m_line; +}; + +class Q_SVG_EXPORT QSvgPath : public QSvgNode +{ +public: + QSvgPath(QSvgNode *parent, const QPainterPath &qpath); + bool separateFillStroke() const override; + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool requiresGroupRendering() const override; + const QPainterPath &path() const { return m_path; } +private: + QPainterPath m_path; +}; + +class Q_SVG_EXPORT QSvgPolygon : public QSvgNode +{ +public: + QSvgPolygon(QSvgNode *parent, const QPolygonF &poly); + bool separateFillStroke() const override; + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool requiresGroupRendering() const override; + const QPolygonF &polygon() const { return m_poly; } +private: + QRectF internalBounds(QPainter *p, QSvgExtraStates &states, BoundsMode mode) const; + QPolygonF m_poly; +}; + +class Q_SVG_EXPORT QSvgPolyline : public QSvgNode +{ +public: + QSvgPolyline(QSvgNode *parent, const QPolygonF &poly); + bool separateFillStroke() const override; + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool requiresGroupRendering() const override; + const QPolygonF &polygon() const { return m_poly; } +private: + QRectF internalBounds(QPainter *p, QSvgExtraStates &states, BoundsMode mode) const; + QPolygonF m_poly; +}; + +class Q_SVG_EXPORT QSvgRect : public QSvgNode +{ +public: + QSvgRect(QSvgNode *paren, const QRectF &rect, qreal rx=0, qreal ry=0); + Type type() const override; + bool separateFillStroke() const override; + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF rect() const { return m_rect; } + QPointF radius() const { return { m_rx, m_ry }; } +private: + QRectF internalBounds(QPainter *p, QSvgExtraStates &states, BoundsMode mode) const; + QRectF m_rect; + qreal m_rx, m_ry; +}; + +class QSvgTspan; + +class Q_SVG_EXPORT QSvgText : public QSvgNode +{ +public: + enum WhitespaceMode + { + Default, + Preserve + }; + + QSvgText(QSvgNode *parent, const QPointF &coord); + ~QSvgText(); + void setTextArea(const QSizeF &size); + + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + bool shouldDrawNode(QPainter *p, QSvgExtraStates &states) const override; + Type type() const override; + + void addTspan(QSvgTspan *tspan) {m_tspans.append(tspan);} + const QList tspans() const { return m_tspans; } + void addText(const QString &text); + void addLineBreak() {m_tspans.append(LINEBREAK);} + void setWhitespaceMode(WhitespaceMode mode) {m_mode = mode;} + + QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + + QPointF position() const { return m_coord; } + QSizeF size() const { return m_size; } + WhitespaceMode whitespaceMode() const { return m_mode; } + +private: + void draw_helper(QPainter *p, QSvgExtraStates &states, QRectF *boundingRect = nullptr) const; + + static QSvgTspan * const LINEBREAK; + + QPointF m_coord; + + // 'm_tspans' is also used to store characters outside tspans and line breaks. + // If a 'm_tspan' item is null, it indicates a line break. + QList m_tspans; + + Type m_type; + QSizeF m_size; + WhitespaceMode m_mode; +}; + +class Q_SVG_EXPORT QSvgTspan : public QSvgNode +{ +public: + // tspans are also used to store normal text, so the 'isProperTspan' is used to separate text from tspan. + QSvgTspan(QSvgNode *parent, bool isProperTspan = true) + : QSvgNode(parent), m_mode(QSvgText::Default), m_isTspan(isProperTspan) + { + } + ~QSvgTspan() { }; + Type type() const override { return Tspan; } + void drawCommand(QPainter *, QSvgExtraStates &) override { Q_ASSERT(!"Tspans should be drawn through QSvgText::draw()."); } + void addText(const QString &text) {m_text += text;} + const QString &text() const {return m_text;} + bool isTspan() const {return m_isTspan;} + void setWhitespaceMode(QSvgText::WhitespaceMode mode) {m_mode = mode;} + QSvgText::WhitespaceMode whitespaceMode() const {return m_mode;} +private: + QString m_text; + QSvgText::WhitespaceMode m_mode; + bool m_isTspan; +}; + +class QSvgUse : public QSvgNode +{ +public: + QSvgUse(const QPointF &start, QSvgNode *parent, QSvgNode *link); + QSvgUse(const QPointF &start, QSvgNode *parent, const QString &linkId) + : QSvgUse(start, parent, nullptr) + { m_linkId = linkId; } + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool isResolved() const { return m_link != nullptr; } + QString linkId() const { return m_linkId; } + void setLink(QSvgNode *link) { m_link = link; } + QSvgNode *link() const { return m_link; } + QPointF start() const { return m_start; } + bool isRecursing() const { return m_recursing; } + +private: + QSvgNode *m_link; + QPointF m_start; + QString m_linkId; + mutable bool m_recursing; +}; + +class QSvgVideo : public QSvgNode +{ +public: + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + Type type() const override; +}; + +QT_END_NAMESPACE + +#endif // QSVGGRAPHICS_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghandler_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghandler_p.h new file mode 100644 index 0000000000000000000000000000000000000000..f7416614d07406cec25e68a4b98445b47e7e0251 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghandler_p.h @@ -0,0 +1,170 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGHANDLER_P_H +#define QSVGHANDLER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "QtCore/qxmlstream.h" +#include "QtCore/qhash.h" +#include "QtCore/qstack.h" +#include +#include "qsvgstyle_p.h" +#if QT_CONFIG(cssparser) +#include "private/qcssparser_p.h" +#endif +#include "qsvggraphics_p.h" +#include "qtsvgglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QSvgNode; +class QSvgTinyDocument; +class QSvgHandler; +class QColor; +class QSvgStyleSelector; + +#ifndef QT_NO_CSSPARSER + +struct QSvgCssAttribute +{ + QString name; + QString value; +}; + +#endif + +class Q_SVG_EXPORT QSvgHandler +{ +public: + enum LengthType { + LT_PERCENT, + LT_PX, + LT_PC, + LT_PT, + LT_MM, + LT_CM, + LT_IN, + LT_OTHER + }; + +public: + QSvgHandler(QIODevice *device, QtSvg::Options options = {}); + QSvgHandler(const QByteArray &data, QtSvg::Options options = {}); + QSvgHandler(QXmlStreamReader *const data, QtSvg::Options options = {}); + ~QSvgHandler(); + + QIODevice *device() const; + QSvgTinyDocument *document() const; + + inline bool ok() const { + return document() != 0 && !xml->hasError(); + } + + inline QString errorString() const { return xml->errorString(); } + inline int lineNumber() const { return xml->lineNumber(); } + + void setDefaultCoordinateSystem(LengthType type); + LengthType defaultCoordinateSystem() const; + + void pushColor(const QColor &color); + void pushColorCopy(); + void popColor(); + QColor currentColor() const; + +#ifndef QT_NO_CSSPARSER + void setInStyle(bool b); + bool inStyle() const; + + QSvgStyleSelector *selector() const; +#endif + + void setAnimPeriod(int start, int end); + int animationDuration() const; + +#ifndef QT_NO_CSSPARSER + void parseCSStoXMLAttrs(const QString &css, QList *attributes); +#endif + + inline QPen defaultPen() const + { return m_defaultPen; } + + QtSvg::Options options() const; + bool trustedSourceMode() const; + +public: + bool startElement(const QString &localName, const QXmlStreamAttributes &attributes); + bool endElement(QStringView localName); + bool characters(QStringView str); + bool processingInstruction(const QString &target, const QString &data); + +private: + void init(); + + QSvgTinyDocument *m_doc; + QStack m_nodes; + // TODO: This is only needed during parsing, so it unnecessarily takes up space after that. + // Temporary container for : + // - nodes which haven't been resolved yet. + // - nodes to be checked for unsupported filter primitives. + QList m_toBeResolved; + + enum CurrentNode + { + Unknown, + Graphics, + Style, + Doc + }; + QStack m_skipNodes; + + /*! + Follows the depths of elements. The top is current xml:space + value that applies for a given element. + */ + QStack m_whitespaceMode; + + QSvgRefCounter m_style; + + LengthType m_defaultCoords; + + QStack m_colorStack; + QStack m_colorTagCount; + + int m_animEnd; + + QXmlStreamReader *const xml; +#ifndef QT_NO_CSSPARSER + bool m_inStyle; + QSvgStyleSelector *m_selector; + QCss::Parser m_cssParser; +#endif + void parse(); + void resolvePaintServers(QSvgNode *node, int nestedDepth = 0); + void resolveNodes(); + + QPen m_defaultPen; + /** + * Whether we own the variable xml, and hence whether + * we need to delete it. + */ + const bool m_ownsReader; + + const QtSvg::Options m_options; +}; + +Q_DECLARE_LOGGING_CATEGORY(lcSvgHandler) + +QT_END_NAMESPACE + +#endif // QSVGHANDLER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghelper_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghelper_p.h new file mode 100644 index 0000000000000000000000000000000000000000..5443173efdaded5a7803396dfebe50d80b6dd4ce --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvghelper_p.h @@ -0,0 +1,141 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGHELPER_P_H +#define QSVGHELPER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qtsvgglobal_p.h" + +#include + +QT_BEGIN_NAMESPACE + +class Q_SVG_EXPORT QSvgRectF : public QRectF +{ +public: + QSvgRectF(const QRectF &r = QRectF(), + QtSvg::UnitTypes unitX = QtSvg::UnitTypes::userSpaceOnUse, + QtSvg::UnitTypes unitY = QtSvg::UnitTypes::userSpaceOnUse, + QtSvg::UnitTypes unitW = QtSvg::UnitTypes::userSpaceOnUse, + QtSvg::UnitTypes unitH = QtSvg::UnitTypes::userSpaceOnUse) + : QRectF(r) + , m_unitX(unitX) + , m_unitY(unitY) + , m_unitW(unitW) + , m_unitH(unitH) + {} + + QPointF translationRelativeToBoundingBox(const QRectF &boundingBox) const { + QPointF result; + + if (m_unitX == QtSvg::UnitTypes::objectBoundingBox) + result.setX(x() * boundingBox.width()); + else + result.setX(x()); + if (m_unitY == QtSvg::UnitTypes::objectBoundingBox) + result.setY(y() * boundingBox.height()); + else + result.setY(y()); + return result; + } + + QRectF resolveRelativeLengths(const QRectF &localRect) const { + QRectF result; + if (m_unitX == QtSvg::UnitTypes::objectBoundingBox) + result.setX(localRect.x() + x() * localRect.width()); + else + result.setX(x()); + if (m_unitY == QtSvg::UnitTypes::objectBoundingBox) + result.setY(localRect.y() + y() * localRect.height()); + else + result.setY(y()); + if (m_unitW == QtSvg::UnitTypes::objectBoundingBox) + result.setWidth(localRect.width() * width()); + else + result.setWidth(width()); + if (m_unitH == QtSvg::UnitTypes::objectBoundingBox) + result.setHeight(localRect.height() * height()); + else + result.setHeight(height()); + return result; + } + + QRectF resolveRelativeLengths(const QRectF &localRect, QtSvg::UnitTypes units) const { + QRectF result; + if (units == QtSvg::UnitTypes::objectBoundingBox || + m_unitX == QtSvg::UnitTypes::objectBoundingBox) + result.setX(localRect.x() + x() * localRect.width()); + else + result.setX(x()); + if (units == QtSvg::UnitTypes::objectBoundingBox || + m_unitY == QtSvg::UnitTypes::objectBoundingBox) + result.setY(localRect.y() + y() * localRect.height()); + else + result.setY(y()); + if (units == QtSvg::UnitTypes::objectBoundingBox || + m_unitW == QtSvg::UnitTypes::objectBoundingBox) + result.setWidth(localRect.width() * width()); + else + result.setWidth(width()); + if (units == QtSvg::UnitTypes::objectBoundingBox || + m_unitH == QtSvg::UnitTypes::objectBoundingBox) + result.setHeight(localRect.height() * height()); + else + result.setHeight(height()); + + return result; + } + + QtSvg::UnitTypes unitX() const {return m_unitX;} + QtSvg::UnitTypes unitY() const {return m_unitY;} + QtSvg::UnitTypes unitW() const {return m_unitW;} + QtSvg::UnitTypes unitH() const {return m_unitH;} + + void setUnitX(QtSvg::UnitTypes unit) {m_unitX = unit;} + void setUnitY(QtSvg::UnitTypes unit) {m_unitY = unit;} + void setUnitW(QtSvg::UnitTypes unit) {m_unitW = unit;} + void setUnitH(QtSvg::UnitTypes unit) {m_unitH = unit;} + + +#ifndef QT_NO_DEBUG_STREAM + friend QDebug operator<<(QDebug debug, const QSvgRectF &r) + { + debug.space(); + debug.nospace() << "QSvgRectF(" << r.x() + << (r.unitX() == QtSvg::UnitTypes::unknown ? "(?)" : + (r.unitX() == QtSvg::UnitTypes::objectBoundingBox ? "(%)" : "")) + << "," << r.y() + << (r.unitY() == QtSvg::UnitTypes::unknown ? "(?)" : + (r.unitY() == QtSvg::UnitTypes::objectBoundingBox ? "(%)" : "")) + << " " << r.width() + << (r.unitW() == QtSvg::UnitTypes::unknown ? "(?)" : + (r.unitW() == QtSvg::UnitTypes::objectBoundingBox ? "(%)" : "")) + << "x" << r.height() + << (r.unitH() == QtSvg::UnitTypes::unknown ? "(?)" : + (r.unitH() == QtSvg::UnitTypes::objectBoundingBox ? "(%)" : "")) + << ")"; + return debug; + } +#endif + +protected: + QtSvg::UnitTypes m_unitX, + m_unitY, + m_unitW, + m_unitH; +}; + +QT_END_NAMESPACE + +#endif // QSVGHELPER_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgnode_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgnode_p.h new file mode 100644 index 0000000000000000000000000000000000000000..0e403428884baaac14897472ee9af7f3650a6171 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgnode_p.h @@ -0,0 +1,238 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGNODE_P_H +#define QSVGNODE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qsvgstyle_p.h" +#include "qtsvgglobal_p.h" +#include "qsvghelper_p.h" + +#include "QtCore/qstring.h" +#include "QtCore/qhash.h" + +QT_BEGIN_NAMESPACE + +class QPainter; +class QSvgTinyDocument; + +class Q_SVG_EXPORT QSvgNode +{ +public: + enum Type + { + Doc, + Group, + Defs, + Switch, + Animation, + Circle, + Ellipse, + Image, + Line, + Path, + Polygon, + Polyline, + Rect, + Text, + Textarea, + Tspan, + Use, + Video, + Mask, + Symbol, + Marker, + Pattern, + Filter, + FeMerge, + FeMergenode, + FeColormatrix, + FeGaussianblur, + FeOffset, + FeComposite, + FeFlood, + FeUnsupported + }; + enum DisplayMode { + InlineMode, + BlockMode, + ListItemMode, + RunInMode, + CompactMode, + MarkerMode, + TableMode, + InlineTableMode, + TableRowGroupMode, + TableHeaderGroupMode, + TableFooterGroupMode, + TableRowMode, + TableColumnGroupMode, + TableColumnMode, + TableCellMode, + TableCaptionMode, + NoneMode, + InheritMode + }; + +public: + QSvgNode(QSvgNode *parent=0); + virtual ~QSvgNode(); + void draw(QPainter *p, QSvgExtraStates &states); + virtual bool separateFillStroke() const {return false;} + virtual void drawCommand(QPainter *p, QSvgExtraStates &states) = 0; + void fillThenStroke(QPainter *p, QSvgExtraStates &states); + QImage drawIntoBuffer(QPainter *p, QSvgExtraStates &states, const QRect &boundsRect); + void applyMaskToBuffer(QImage *proxy, QImage mask) const; + void drawWithMask(QPainter *p, QSvgExtraStates &states, const QImage &mask, const QRect &boundsRect); + void applyBufferToCanvas(QPainter *p, QImage proxy) const; + + QSvgNode *parent() const; + bool isDescendantOf(const QSvgNode *parent) const; + + void appendStyleProperty(QSvgStyleProperty *prop, const QString &id); + void applyStyle(QPainter *p, QSvgExtraStates &states) const; + void applyStyleRecursive(QPainter *p, QSvgExtraStates &states) const; + void revertStyle(QPainter *p, QSvgExtraStates &states) const; + void revertStyleRecursive(QPainter *p, QSvgExtraStates &states) const; + QSvgStyleProperty *styleProperty(QSvgStyleProperty::Type type) const; + QSvgPaintStyleProperty *styleProperty(const QString &id) const; + + QSvgTinyDocument *document() const; + + virtual Type type() const = 0; + QString typeName() const; + virtual QRectF internalFastBounds(QPainter *p, QSvgExtraStates &states) const; + virtual QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const; + QRectF bounds(QPainter *p, QSvgExtraStates &states) const; + QRectF bounds() const; + virtual QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const; + virtual QRectF decoratedBounds(QPainter *p, QSvgExtraStates &states) const; + + void setRequiredFeatures(const QStringList &lst); + const QStringList & requiredFeatures() const; + + void setRequiredExtensions(const QStringList &lst); + const QStringList & requiredExtensions() const; + + void setRequiredLanguages(const QStringList &lst); + const QStringList & requiredLanguages() const; + + void setRequiredFormats(const QStringList &lst); + const QStringList & requiredFormats() const; + + void setRequiredFonts(const QStringList &lst); + const QStringList & requiredFonts() const; + + void setVisible(bool visible); + bool isVisible() const; + + void setDisplayMode(DisplayMode display); + DisplayMode displayMode() const; + + QString nodeId() const; + void setNodeId(const QString &i); + + QString xmlClass() const; + void setXmlClass(const QString &str); + + QString maskId() const; + void setMaskId(const QString &str); + bool hasMask() const; + + QString filterId() const; + void setFilterId(const QString &str); + bool hasFilter() const; + + QString markerStartId() const; + void setMarkerStartId(const QString &str); + bool hasMarkerStart() const; + + QString markerMidId() const; + void setMarkerMidId(const QString &str); + bool hasMarkerMid() const; + + QString markerEndId() const; + void setMarkerEndId(const QString &str); + bool hasMarkerEnd() const; + + bool hasAnyMarker() const; + + virtual bool requiresGroupRendering() const; + + virtual bool shouldDrawNode(QPainter *p, QSvgExtraStates &states) const; + const QSvgStyle &style() const { return m_style; } +protected: + mutable QSvgStyle m_style; + + QRectF filterRegion(QRectF bounds) const; + + static qreal strokeWidth(QPainter *p); + static void initPainter(QPainter *p); + + enum BoundsMode { + Simplistic, + IncludeMiterLimit + }; + static QRectF boundsOnStroke(QPainter *p, const QPainterPath &path, + qreal width, BoundsMode mode); + +private: + QSvgNode *m_parent; + + QStringList m_requiredFeatures; + QStringList m_requiredExtensions; + QStringList m_requiredLanguages; + QStringList m_requiredFormats; + QStringList m_requiredFonts; + + bool m_visible; + + QString m_id; + QString m_class; + QString m_maskId; + QString m_filterId; + QString m_markerStartId; + QString m_markerMidId; + QString m_markerEndId; + + + DisplayMode m_displayMode; + mutable QRectF m_cachedBounds; + + friend class QSvgTinyDocument; +}; + +inline QSvgNode *QSvgNode::parent() const +{ + return m_parent; +} + +inline bool QSvgNode::isVisible() const +{ + return m_visible; +} + +inline QString QSvgNode::nodeId() const +{ + return m_id; +} + +inline QString QSvgNode::xmlClass() const +{ + return m_class; +} + +QT_END_NAMESPACE + +#endif // QSVGNODE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstructure_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstructure_p.h new file mode 100644 index 0000000000000000000000000000000000000000..3a4172d328f177cdb98d989a5d678cbc33ed84e9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstructure_p.h @@ -0,0 +1,249 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGSTRUCTURE_P_H +#define QSVGSTRUCTURE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qsvgnode_p.h" + +#include "QtCore/qlist.h" +#include "QtCore/qhash.h" + +QT_BEGIN_NAMESPACE + +class QSvgTinyDocument; +class QSvgNode; +class QPainter; +class QSvgDefs; + +class Q_SVG_EXPORT QSvgStructureNode : public QSvgNode +{ +public: + QSvgStructureNode(QSvgNode *parent); + ~QSvgStructureNode(); + QSvgNode *scopeNode(const QString &id) const; + void addChild(QSvgNode *child, const QString &id); + QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + QSvgNode *previousSiblingNode(QSvgNode *n) const; + QList renderers() const { return m_renderers; } +protected: + QList m_renderers; + QHash m_scope; + QList m_linkedScopes; + mutable bool m_recursing = false; +}; + +class Q_SVG_EXPORT QSvgG : public QSvgStructureNode +{ +public: + QSvgG(QSvgNode *parent); + void drawCommand(QPainter *, QSvgExtraStates &) override; + bool shouldDrawNode(QPainter *p, QSvgExtraStates &states) const override; + Type type() const override; + bool requiresGroupRendering() const override; +}; + +class Q_SVG_EXPORT QSvgDefs : public QSvgStructureNode +{ +public: + QSvgDefs(QSvgNode *parent); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + bool shouldDrawNode(QPainter *p, QSvgExtraStates &states) const override; + Type type() const override; +}; + +class Q_SVG_EXPORT QSvgSymbolLike : public QSvgStructureNode +{ + // Marker, Symbol and potentially other elements share a lot of common + // attributes and functionality. By making a common base class we can + // avoid repetition. +public: + enum class Overflow : quint8 { + Visible, + Hidden, + Scroll = Visible, //Will not support scrolling + Auto = Visible + }; + + enum class PreserveAspectRatio : quint8 { + None = 0b000000, + xMin = 0b000001, + xMid = 0b000010, + xMax = 0b000011, + yMin = 0b000100, + yMid = 0b001000, + yMax = 0b001100, + meet = 0b010000, + slice = 0b100000, + xMask = xMin | xMid | xMax, + yMask = yMin | yMid | yMax, + xyMask = xMask | yMask, + meetSliceMask = meet | slice + }; + Q_DECLARE_FLAGS(PreserveAspectRatios, PreserveAspectRatio) + + QSvgSymbolLike(QSvgNode *parent, QRectF bounds, QRectF viewBox, QPointF refP, + QSvgSymbolLike::PreserveAspectRatios pAspectRatios, QSvgSymbolLike::Overflow overflow); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override; + bool requiresGroupRendering() const override; +protected: + void setPainterToRectAndAdjustment(QPainter *p) const; +protected: + QRectF m_rect; + QRectF m_viewBox; + QPointF m_refP; + PreserveAspectRatios m_pAspectRatios; + Overflow m_overflow; +}; + +Q_DECLARE_OPERATORS_FOR_FLAGS(QSvgSymbolLike::PreserveAspectRatios) + +class Q_SVG_EXPORT QSvgSymbol : public QSvgSymbolLike +{ +public: + QSvgSymbol(QSvgNode *parent, QRectF bounds, QRectF viewBox, QPointF refP, + QSvgSymbolLike::PreserveAspectRatios pAspectRatios, QSvgSymbolLike::Overflow overflow); + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; +}; + +class Q_SVG_EXPORT QSvgMarker : public QSvgSymbolLike +{ +public: + enum class Orientation : quint8 { + Auto, + AutoStartReverse, + Value + }; + enum class MarkerUnits : quint8 { + StrokeWidth, + UserSpaceOnUse + }; + + QSvgMarker(QSvgNode *parent, QRectF bounds, QRectF viewBox, QPointF refP, + QSvgSymbolLike::PreserveAspectRatios pAspectRatios, QSvgSymbolLike::Overflow overflow, + Orientation orientation, qreal orientationAngle, MarkerUnits markerUnits); + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + static void drawMarkersForNode(QSvgNode *node, QPainter *p, QSvgExtraStates &states); + static QRectF markersBoundsForNode(const QSvgNode *node, QPainter *p, QSvgExtraStates &states); + + Orientation orientation() const { + return m_orientation; + } + qreal orientationAngle() const { + return m_orientationAngle; + } + MarkerUnits markerUnits() const { + return m_markerUnits; + } + Type type() const override; + +private: + static void drawHelper(const QSvgNode *node, QPainter *p, + QSvgExtraStates &states, QRectF *boundingRect = nullptr); + + Orientation m_orientation; + qreal m_orientationAngle; + MarkerUnits m_markerUnits; +}; + +class Q_SVG_EXPORT QSvgFilterContainer : public QSvgStructureNode +{ +public: + + QSvgFilterContainer(QSvgNode *parent, const QSvgRectF &bounds, QtSvg::UnitTypes filterUnits, QtSvg::UnitTypes primitiveUnits); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + bool shouldDrawNode(QPainter *, QSvgExtraStates &) const override; + Type type() const override; + QImage applyFilter(const QImage &buffer, QPainter *p, const QRectF &bounds) const; + void setSupported(bool supported); + bool supported() const; + QRectF filterRegion(const QRectF &itemBounds) const; +private: + QSvgRectF m_rect; + QtSvg::UnitTypes m_filterUnits; + QtSvg::UnitTypes m_primitiveUnits; + bool m_supported; +}; + + +class Q_SVG_EXPORT QSvgSwitch : public QSvgStructureNode +{ +public: + QSvgSwitch(QSvgNode *parent); + void drawCommand(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + QSvgNode *childToRender() const; +private: + void init(); +private: + QString m_systemLanguage; + QString m_systemLanguagePrefix; +}; + +class Q_SVG_EXPORT QSvgMask : public QSvgStructureNode +{ +public: + QSvgMask(QSvgNode *parent, QSvgRectF bounds, + QtSvg::UnitTypes contentsUnits); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + bool shouldDrawNode(QPainter *, QSvgExtraStates &) const override; + Type type() const override; + QImage createMask(QPainter *p, QSvgExtraStates &states, QSvgNode *targetNode, QRectF *globalRect) const; + QImage createMask(QPainter *p, QSvgExtraStates &states, const QRectF &localRect, QRectF *globalRect) const; + + QSvgRectF rect() const + { + return m_rect; + } + + QtSvg::UnitTypes contentUnits() const + { + return m_contentUnits; + } + +private: + QSvgRectF m_rect; + QtSvg::UnitTypes m_contentUnits; +}; + +class Q_SVG_EXPORT QSvgPattern : public QSvgStructureNode +{ +public: + QSvgPattern(QSvgNode *parent, QSvgRectF bounds, QRectF viewBox, + QtSvg::UnitTypes contentUnits, QTransform transform); + void drawCommand(QPainter *, QSvgExtraStates &) override {}; + bool shouldDrawNode(QPainter *, QSvgExtraStates &) const override; + QImage patternImage(QPainter *p, QSvgExtraStates &states, const QSvgNode *patternElement); + Type type() const override; + const QTransform& appliedTransform() const { return m_appliedTransform; } + +private: + QImage renderPattern(QSize size, qreal contentScaleX, qreal contentScaleY); + void calculateAppliedTransform(QTransform& worldTransform, QRectF peLocalBB, QSize imageSize); + +private: + QTransform m_appliedTransform; + QSvgRectF m_rect; + QRectF m_viewBox; + QtSvg::UnitTypes m_contentUnits; + QTransform m_transform; +}; + +QT_END_NAMESPACE + +#endif // QSVGSTRUCTURE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstyle_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstyle_p.h new file mode 100644 index 0000000000000000000000000000000000000000..8cfff64ec61ee8107504c655a5b77e7008764cbe --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgstyle_p.h @@ -0,0 +1,833 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGSTYLE_P_H +#define QSVGSTYLE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "QtCore/qstack.h" +#include "QtGui/qpainter.h" +#include "QtGui/qpen.h" +#include "QtGui/qbrush.h" +#include "QtGui/qtransform.h" +#include "QtGui/qcolor.h" +#include "QtGui/qfont.h" +#include +#include "qtsvgglobal_p.h" + +QT_BEGIN_NAMESPACE + +class QPainter; +class QSvgNode; +class QSvgFont; +class QSvgTinyDocument; +class QSvgPattern; + +template class QSvgRefCounter +{ +public: + QSvgRefCounter() { t = nullptr; } + QSvgRefCounter(T *_t) + { + t = _t; + if (t) + t->ref(); + } + QSvgRefCounter(const QSvgRefCounter &other) + { + t = other.t; + if (t) + t->ref(); + } + QSvgRefCounter &operator =(T *_t) + { + if(_t) + _t->ref(); + if (t) + t->deref(); + t = _t; + return *this; + } + QSvgRefCounter &operator =(const QSvgRefCounter &other) + { + if(other.t) + other.t->ref(); + if (t) + t->deref(); + t = other.t; + return *this; + } + ~QSvgRefCounter() + { + if (t) + t->deref(); + } + + inline T *operator->() const { return t; } + inline operator T*() const { return t; } + + inline bool isDefault() const { return !t || t->isDefault(); } + +private: + T *t; +}; + +class Q_SVG_EXPORT QSvgRefCounted +{ +public: + QSvgRefCounted() { _ref = 0; } + virtual ~QSvgRefCounted() {} + void ref() { + ++_ref; +// qDebug() << this << ": adding ref, now " << _ref; + } + void deref() { +// qDebug() << this << ": removing ref, now " << _ref; + if(!--_ref) { +// qDebug(" deleting"); + delete this; + } + } +private: + int _ref; +}; + +struct Q_SVG_EXPORT QSvgExtraStates +{ + QSvgExtraStates(); + + qreal fillOpacity; + qreal strokeOpacity; + QSvgFont *svgFont; + Qt::Alignment textAnchor; + int fontWeight; + Qt::FillRule fillRule; + qreal strokeDashOffset; + int nestedUseLevel = 0; + int nestedUseCount = 0; + bool vectorEffect; // true if pen is cosmetic + qint8 imageRendering; // QSvgQualityStyle::ImageRendering + bool inUse = false; // true if currently in QSvgUseNode +}; + +class Q_SVG_EXPORT QSvgStyleProperty : public QSvgRefCounted +{ +public: + enum Type + { + QUALITY, + FILL, + VIEWPORT_FILL, + FONT, + STROKE, + SOLID_COLOR, + GRADIENT, + PATTERN, + TRANSFORM, + ANIMATE_TRANSFORM, + ANIMATE_COLOR, + OPACITY, + COMP_OP + }; +public: + virtual ~QSvgStyleProperty(); + virtual void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0; + virtual void revert(QPainter *p, QSvgExtraStates &states) =0; + virtual Type type() const=0; + bool isDefault() const { return false; } // [not virtual since called from templated class] +}; + +class Q_SVG_EXPORT QSvgPaintStyleProperty : public QSvgStyleProperty +{ +public: + virtual QBrush brush(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) = 0; + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; +}; + +class Q_SVG_EXPORT QSvgQualityStyle : public QSvgStyleProperty +{ +public: + enum ImageRendering: qint8 { + ImageRenderingAuto = 0, + ImageRenderingOptimizeSpeed = 1, + ImageRenderingOptimizeQuality = 2, + }; + + QSvgQualityStyle(int color); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + void setImageRendering(ImageRendering); +private: + // color-render ing v v 'auto' | 'optimizeSpeed' | + // 'optimizeQuality' | 'inherit' + //int m_colorRendering; + + // shape-rendering v v 'auto' | 'optimizeSpeed' | 'crispEdges' | + // 'geometricPrecision' | 'inherit' + //QSvgShapeRendering m_shapeRendering; + + + // text-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeLegibility' + // | 'geometricPrecision' | 'inherit' + //QSvgTextRendering m_textRendering; + + + // vector-effect v x 'default' | 'non-scaling-stroke' | 'inherit' + //QSvgVectorEffect m_vectorEffect; + + // image-rendering v v 'auto' | 'optimizeSpeed' | 'optimizeQuality' | + // 'inherit' + qint32 m_imageRendering: 4; + qint32 m_oldImageRendering: 4; + quint32 m_imageRenderingSet: 1; +}; + + + +class Q_SVG_EXPORT QSvgOpacityStyle : public QSvgStyleProperty +{ +public: + QSvgOpacityStyle(qreal opacity); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + qreal opacity() const { return m_opacity; } + bool isDefault() const { return qFuzzyCompare(m_opacity, qreal(1.0)); } + +private: + qreal m_opacity; + qreal m_oldOpacity; +}; + +class Q_SVG_EXPORT QSvgFillStyle : public QSvgStyleProperty +{ +public: + QSvgFillStyle(); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + void setFillRule(Qt::FillRule f); + void setFillOpacity(qreal opacity); + void setFillStyle(QSvgPaintStyleProperty* style); + void setBrush(QBrush brush); + + const QBrush & qbrush() const + { + return m_fill; + } + + qreal fillOpacity() const + { + return m_fillOpacity; + } + + Qt::FillRule fillRule() const + { + return m_fillRule; + } + + QSvgPaintStyleProperty* style() const + { + return m_style; + } + + void setPaintStyleId(const QString &Id) + { + m_paintStyleId = Id; + } + + QString paintStyleId() const + { + return m_paintStyleId; + } + + void setPaintStyleResolved(bool resolved) + { + m_paintStyleResolved = resolved; + } + + bool isPaintStyleResolved() const + { + return m_paintStyleResolved; + } + +private: + // fill v v 'inherit' | + // fill-opacity v v 'inherit' | + QBrush m_fill; + QBrush m_oldFill; + QSvgPaintStyleProperty *m_style; + + Qt::FillRule m_fillRule; + Qt::FillRule m_oldFillRule; + qreal m_fillOpacity; + qreal m_oldFillOpacity; + + QString m_paintStyleId; + uint m_paintStyleResolved : 1; + + uint m_fillRuleSet : 1; + uint m_fillOpacitySet : 1; + uint m_fillSet : 1; +}; + +class Q_SVG_EXPORT QSvgViewportFillStyle : public QSvgStyleProperty +{ +public: + QSvgViewportFillStyle(const QBrush &brush); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + const QBrush & qbrush() const + { + return m_viewportFill; + } +private: + // viewport-fill v x 'inherit' | + // viewport-fill-opacity v x 'inherit' | + QBrush m_viewportFill; + + QBrush m_oldFill; +}; + +class Q_SVG_EXPORT QSvgFontStyle : public QSvgStyleProperty +{ +public: + static const int LIGHTER = -1; + static const int BOLDER = 1; + + QSvgFontStyle(QSvgFont *font, QSvgTinyDocument *doc); + QSvgFontStyle(); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + void setSize(qreal size) + { + // Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call + // QFont::SetPointSize() instead. Set proper font size just before rendering. + m_qfont.setPointSizeF(size); + m_sizeSet = 1; + } + + void setTextAnchor(Qt::Alignment anchor) + { + m_textAnchor = anchor; + m_textAnchorSet = 1; + } + + void setFamily(const QString &family) + { + m_qfont.setFamilies({family}); + m_familySet = 1; + } + + void setStyle(QFont::Style fontStyle) { + m_qfont.setStyle(fontStyle); + m_styleSet = 1; + } + + void setVariant(QFont::Capitalization fontVariant) + { + m_qfont.setCapitalization(fontVariant); + m_variantSet = 1; + } + + void setWeight(int weight) + { + m_weight = weight; + m_weightSet = 1; + } + + QSvgFont * svgFont() const + { + return m_svgFont; + } + + const QFont &qfont() const + { + return m_qfont; + } + + QSvgTinyDocument *doc() const {return m_doc;} + +private: + QSvgFont *m_svgFont; + QSvgTinyDocument *m_doc; + QFont m_qfont; + + int m_weight; + Qt::Alignment m_textAnchor; + + QSvgFont *m_oldSvgFont; + QFont m_oldQFont; + Qt::Alignment m_oldTextAnchor; + int m_oldWeight; + + uint m_familySet : 1; + uint m_sizeSet : 1; + uint m_styleSet : 1; + uint m_variantSet : 1; + uint m_weightSet : 1; + uint m_textAnchorSet : 1; +}; + +class Q_SVG_EXPORT QSvgStrokeStyle : public QSvgStyleProperty +{ +public: + QSvgStrokeStyle(); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + void setStroke(QBrush brush) + { + m_stroke.setBrush(brush); + m_style = nullptr; + m_strokeSet = 1; + } + + void setStyle(QSvgPaintStyleProperty *style) + { + m_style = style; + m_strokeSet = 1; + } + + void setDashArray(const QList &dashes); + + void setDashArrayNone() + { + m_stroke.setStyle(Qt::SolidLine); + m_strokeDashArraySet = 1; + } + + void setDashOffset(qreal offset) + { + m_strokeDashOffset = offset; + m_strokeDashOffsetSet = 1; + } + + void setLineCap(Qt::PenCapStyle cap) + { + m_stroke.setCapStyle(cap); + m_strokeLineCapSet = 1; + } + + void setLineJoin(Qt::PenJoinStyle join) + { + m_stroke.setJoinStyle(join); + m_strokeLineJoinSet = 1; + } + + void setMiterLimit(qreal limit) + { + m_stroke.setMiterLimit(limit); + m_strokeMiterLimitSet = 1; + } + + void setOpacity(qreal opacity) + { + m_strokeOpacity = opacity; + m_strokeOpacitySet = 1; + } + + void setWidth(qreal width) + { + m_stroke.setWidthF(width); + m_strokeWidthSet = 1; + Q_ASSERT(!m_strokeDashArraySet); // set width before dash array. + } + + qreal width() + { + return m_stroke.widthF(); + } + + void setVectorEffect(bool nonScalingStroke) + { + m_vectorEffect = nonScalingStroke; + m_vectorEffectSet = 1; + } + + QSvgPaintStyleProperty* style() const + { + return m_style; + } + + void setPaintStyleId(const QString &Id) + { + m_paintStyleId = Id; + } + + QString paintStyleId() const + { + return m_paintStyleId; + } + + void setPaintStyleResolved(bool resolved) + { + m_paintStyleResolved = resolved; + } + + bool isPaintStyleResolved() const + { + return m_paintStyleResolved; + } + + QPen stroke() const + { + return m_stroke; + } + +private: + // stroke v v 'inherit' | + // stroke-dasharray v v 'inherit' | + // stroke-dashoffset v v 'inherit' | + // stroke-linecap v v 'butt' | 'round' | 'square' | 'inherit' + // stroke-linejoin v v 'miter' | 'round' | 'bevel' | 'inherit' + // stroke-miterlimit v v 'inherit' | + // stroke-opacity v v 'inherit' | + // stroke-width v v 'inherit' | + QPen m_stroke; + QPen m_oldStroke; + qreal m_strokeOpacity; + qreal m_oldStrokeOpacity; + qreal m_strokeDashOffset; + qreal m_oldStrokeDashOffset; + + QSvgPaintStyleProperty *m_style; + QString m_paintStyleId; + uint m_paintStyleResolved : 1; + uint m_vectorEffect : 1; + uint m_oldVectorEffect : 1; + + uint m_strokeSet : 1; + uint m_strokeDashArraySet : 1; + uint m_strokeDashOffsetSet : 1; + uint m_strokeLineCapSet : 1; + uint m_strokeLineJoinSet : 1; + uint m_strokeMiterLimitSet : 1; + uint m_strokeOpacitySet : 1; + uint m_strokeWidthSet : 1; + uint m_vectorEffectSet : 1; +}; + +class Q_SVG_EXPORT QSvgSolidColorStyle : public QSvgPaintStyleProperty +{ +public: + QSvgSolidColorStyle(const QColor &color); + Type type() const override; + + const QColor & qcolor() const + { + return m_solidColor; + } + + QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override + { + return m_solidColor; + } + +private: + // solid-color v x 'inherit' | + // solid-opacity v x 'inherit' | + QColor m_solidColor; + + QBrush m_oldFill; + QPen m_oldStroke; +}; + +class Q_SVG_EXPORT QSvgGradientStyle : public QSvgPaintStyleProperty +{ +public: + QSvgGradientStyle(QGradient *grad); + ~QSvgGradientStyle() { delete m_gradient; } + Type type() const override; + + void setStopLink(const QString &link, QSvgTinyDocument *doc); + QString stopLink() const { return m_link; } + void resolveStops(); + void resolveStops_helper(QStringList *visited); + + void setTransform(const QTransform &transform); + QTransform qtransform() const + { + return m_transform; + } + + QGradient *qgradient() const + { + return m_gradient; + } + + bool gradientStopsSet() const + { + return m_gradientStopsSet; + } + + void setGradientStopsSet(bool set) + { + m_gradientStopsSet = set; + } + + QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override; +private: + QGradient *m_gradient; + QTransform m_transform; + + QSvgTinyDocument *m_doc; + QString m_link; + bool m_gradientStopsSet; +}; + +class Q_SVG_EXPORT QSvgPatternStyle : public QSvgPaintStyleProperty +{ +public: + QSvgPatternStyle(QSvgPattern *pattern); + ~QSvgPatternStyle() = default; + Type type() const override; + + QBrush brush(QPainter *, const QSvgNode *, QSvgExtraStates &) override; + QSvgPattern *patternNode() { return m_pattern; } +private: + QSvgPattern *m_pattern; + QImage m_patternImage; + QRectF m_parentBound; +}; + + +class Q_SVG_EXPORT QSvgTransformStyle : public QSvgStyleProperty +{ +public: + QSvgTransformStyle(const QTransform &transform); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + const QTransform & qtransform() const + { + return m_transform; + } + bool isDefault() const { return m_transform.isIdentity(); } +private: + //7.6 The transform attribute + QTransform m_transform; + QStack m_oldWorldTransform; +}; + +class Q_SVG_EXPORT QSvgAnimate : public QSvgStyleProperty +{ +public: + QSvgAnimate(); + void setRepeatCount(qreal repeatCount); + void setRunningTime(int startMs, int durMs, int endMs, int by = 0); + +protected: + qreal lerp(qreal a, qreal b, qreal t) const; + qreal currentIterTimeFraction(qreal elapsedTime); + +protected: + qreal m_from; + qreal m_totalRunningTime; + qreal m_end; + qreal m_repeatCount; + bool m_finished; +}; + +class Q_SVG_EXPORT QSvgAnimateTransform : public QSvgAnimate +{ +public: + enum TransformType + { + Empty, + Translate, + Scale, + Rotate, + SkewX, + SkewY + }; + enum Additive + { + Sum, + Replace + }; +public: + QSvgAnimateTransform(); + void setArgs(TransformType type, Additive additive, const QList &args); + void setFreeze(bool freeze); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + QSvgAnimateTransform::Additive additiveType() const + { + return m_additive; + } + + bool animActive(qreal totalTimeElapsed) + { + if (totalTimeElapsed < m_from) + return false; + if (m_freeze || m_repeatCount < 0) // fill="freeze" or repeat="indefinite" + return true; + if (m_totalRunningTime == 0) + return false; + qreal animationFrame = (totalTimeElapsed - m_from) / m_totalRunningTime; + if (animationFrame > m_repeatCount) + return false; + return true; + } + + bool transformApplied() const + { + return m_transformApplied; + } + + // Call this instead of revert if you know that revert is unnecessary. + void clearTransformApplied() + { + m_transformApplied = false; + } + +protected: + void resolveMatrix(const QSvgNode *node); +private: + TransformType m_type; + Additive m_additive; + QList m_args; + int m_count; + QTransform m_transform; + QTransform m_oldWorldTransform; + bool m_freeze; + bool m_transformApplied; +}; + + +class Q_SVG_EXPORT QSvgAnimateColor : public QSvgAnimate +{ +public: + QSvgAnimateColor(); + void setArgs(bool fill, const QList &colors); + void setFreeze(bool freeze); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; +private: + QList m_colors; + QBrush m_oldBrush; + QPen m_oldPen; + bool m_fill; + bool m_freeze; +}; + + +class Q_SVG_EXPORT QSvgCompOpStyle : public QSvgStyleProperty +{ +public: + QSvgCompOpStyle(QPainter::CompositionMode mode); + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states) override; + void revert(QPainter *p, QSvgExtraStates &states) override; + Type type() const override; + + const QPainter::CompositionMode & compOp() const + { + return m_mode; + } +private: + //comp-op attribute + QPainter::CompositionMode m_mode; + + QPainter::CompositionMode m_oldMode; +}; + + +class Q_SVG_EXPORT QSvgStyle +{ +public: + QSvgStyle() + : quality(0), + fill(0), + viewportFill(0), + font(0), + stroke(0), + solidColor(0), + gradient(0), + pattern(0), + transform(0), + opacity(0), + compop(0) + {} + ~QSvgStyle(); + + void apply(QPainter *p, const QSvgNode *node, QSvgExtraStates &states); + void revert(QPainter *p, QSvgExtraStates &states); + QSvgRefCounter quality; + QSvgRefCounter fill; + QSvgRefCounter viewportFill; + QSvgRefCounter font; + QSvgRefCounter stroke; + QSvgRefCounter solidColor; + QSvgRefCounter gradient; + QSvgRefCounter pattern; + QSvgRefCounter transform; + QList > animateColors; + QList > animateTransforms; + QSvgRefCounter opacity; + QSvgRefCounter compop; +}; + +/********************************************************/ +// NOT implemented: + +// color v v 'inherit' | +//QColor m_color; + +// display v x 'inline' | 'block' | 'list-item' +// | 'run-in' | 'compact' | 'marker' | +// 'table' | 'inline-table' | +// 'table-row-group' | 'table-header-group' | +// 'table-footer-group' | 'table-row' | +// 'table-column-group' | 'table-column' | +// 'table-cell' | 'table-caption' | +// 'none' | 'inherit' +//QSvgDisplayStyle m_display; + +// display-align v v 'auto' | 'before' | 'center' | 'after' | 'inherit' +//QSvgDisplayAlign m_displayAlign; + +// line-increment v v 'auto' | 'inherit' | +//int m_lineIncrement; + +// text-anchor v v 'start' | 'middle' | 'end' | 'inherit' +//QSvgTextAnchor m_textAnchor; + +// visibility v v 'visible' | 'hidden' | 'inherit' +//QSvgVisibility m_visibility; + +/******************************************************/ +// the following do not make sense for us + +// pointer-events v v 'visiblePainted' | 'visibleFill' | 'visibleStroke' | +// 'visible' | 'painted' | 'fill' | 'stroke' | 'all' | +// 'none' | 'inherit' +//QSvgPointEvents m_pointerEvents; + +// audio-level v x 'inherit' | + +QT_END_NAMESPACE + +#endif // QSVGSTYLE_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgtinydocument_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgtinydocument_p.h new file mode 100644 index 0000000000000000000000000000000000000000..77ce93579409e44f304b0d8b24eda97160336fd9 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgtinydocument_p.h @@ -0,0 +1,177 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGTINYDOCUMENT_P_H +#define QSVGTINYDOCUMENT_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qsvgstructure_p.h" +#include "qtsvgglobal_p.h" + +#include "QtCore/qrect.h" +#include "QtCore/qlist.h" +#include "QtCore/qhash.h" +#include "QtCore/qdatetime.h" +#include "QtCore/qxmlstream.h" +#include "qsvgstyle_p.h" +#include "qsvgfont_p.h" + +QT_BEGIN_NAMESPACE + +class QPainter; +class QByteArray; +class QSvgFont; +class QTransform; + +class Q_SVG_EXPORT QSvgTinyDocument : public QSvgStructureNode +{ +public: + static QSvgTinyDocument *load(const QString &file, QtSvg::Options options = {}); + static QSvgTinyDocument *load(const QByteArray &contents, QtSvg::Options options = {}); + static QSvgTinyDocument *load(QXmlStreamReader *contents, QtSvg::Options options = {}); + static bool isLikelySvg(QIODevice *device, bool *isCompressed = nullptr); +public: + QSvgTinyDocument(QtSvg::Options options); + ~QSvgTinyDocument(); + Type type() const override; + + inline QSize size() const; + void setWidth(int len, bool percent); + void setHeight(int len, bool percent); + inline int width() const; + inline int height() const; + inline bool widthPercent() const; + inline bool heightPercent() const; + + inline bool preserveAspectRatio() const; + void setPreserveAspectRatio(bool on); + + inline QRectF viewBox() const; + void setViewBox(const QRectF &rect); + + QtSvg::Options options() const; + + void drawCommand(QPainter *, QSvgExtraStates &) override; + + void draw(QPainter *p); + void draw(QPainter *p, const QRectF &bounds); + void draw(QPainter *p, const QString &id, + const QRectF &bounds=QRectF()); + + QTransform transformForElement(const QString &id) const; + QRectF boundsOnElement(const QString &id) const; + bool elementExists(const QString &id) const; + + void addSvgFont(QSvgFont *); + QSvgFont *svgFont(const QString &family) const; + void addNamedNode(const QString &id, QSvgNode *node); + QSvgNode *namedNode(const QString &id) const; + void addNamedStyle(const QString &id, QSvgPaintStyleProperty *style); + QSvgPaintStyleProperty *namedStyle(const QString &id) const; + + void restartAnimation(); + inline int currentElapsed() const; + bool animated() const; + void setAnimated(bool a); + inline int animationDuration() const; + int currentFrame() const; + void setCurrentFrame(int); + void setFramesPerSecond(int num); + +private: + void mapSourceToTarget(QPainter *p, const QRectF &targetRect, const QRectF &sourceRect = QRectF()); +private: + QSize m_size; + bool m_widthPercent; + bool m_heightPercent; + + mutable bool m_implicitViewBox = true; + mutable QRectF m_viewBox; + bool m_preserveAspectRatio = false; + + QHash > m_fonts; + QHash m_namedNodes; + QHash > m_namedStyles; + + qint64 m_time; + bool m_animated; + int m_animationDuration; + int m_fps; + + QSvgExtraStates m_states; + + const QtSvg::Options m_options; +}; + +Q_SVG_EXPORT QDebug operator<<(QDebug debug, const QSvgTinyDocument &doc); + +inline QSize QSvgTinyDocument::size() const +{ + if (m_size.isEmpty()) + return viewBox().size().toSize(); + if (m_widthPercent || m_heightPercent) { + const int width = m_widthPercent ? qRound(0.01 * m_size.width() * viewBox().size().width()) : m_size.width(); + const int height = m_heightPercent ? qRound(0.01 * m_size.height() * viewBox().size().height()) : m_size.height(); + return QSize(width, height); + } + return m_size; +} + +inline int QSvgTinyDocument::width() const +{ + return size().width(); +} + +inline int QSvgTinyDocument::height() const +{ + return size().height(); +} + +inline bool QSvgTinyDocument::widthPercent() const +{ + return m_widthPercent; +} + +inline bool QSvgTinyDocument::heightPercent() const +{ + return m_heightPercent; +} + +inline QRectF QSvgTinyDocument::viewBox() const +{ + if (m_viewBox.isNull()) { + m_viewBox = bounds(); + m_implicitViewBox = true; + } + + return m_viewBox; +} + +inline bool QSvgTinyDocument::preserveAspectRatio() const +{ + return m_preserveAspectRatio; +} + +inline int QSvgTinyDocument::currentElapsed() const +{ + return QDateTime::currentMSecsSinceEpoch() - m_time; +} + +inline int QSvgTinyDocument::animationDuration() const +{ + return m_animationDuration; +} + +QT_END_NAMESPACE + +#endif // QSVGTINYDOCUMENT_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgvisitor_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgvisitor_p.h new file mode 100644 index 0000000000000000000000000000000000000000..81e0e2b98395094fcff9bf22a1b4272dc7917e23 --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qsvgvisitor_p.h @@ -0,0 +1,63 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QSVGVISITOR_P_H +#define QSVGVISITOR_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Q_SVG_EXPORT QSvgVisitor { +public: + void traverse(const QSvgStructureNode *node); + void traverse(const QSvgNode *node); + + virtual ~QSvgVisitor() {} + +protected: + virtual void visitNode(const QSvgNode *) {} + virtual bool visitStructureNodeStart(const QSvgStructureNode *node) { visitNode(node); return true; } + virtual void visitStructureNodeEnd(const QSvgStructureNode *) {} + virtual void visitAnimationNode(const QSvgAnimation *node) { visitNode(node); } + virtual void visitEllipseNode(const QSvgEllipse *node) { visitNode(node); } + virtual void visitImageNode(const QSvgImage *node) { visitNode(node); } + virtual void visitLineNode(const QSvgLine *node) { visitNode(node); } + virtual void visitPathNode(const QSvgPath *node) { visitNode(node); } + virtual void visitPolygonNode(const QSvgPolygon *node) { visitNode(node); } + virtual void visitPolylineNode(const QSvgPolyline *node) { visitNode(node); } + virtual void visitRectNode(const QSvgRect *node) { visitNode(node); } + virtual void visitTextNode(const QSvgText *node) { visitNode(node); } + virtual void visitTspanNode(const QSvgTspan *node) { visitNode(node); } + virtual void visitUseNode(const QSvgUse *node) { visitNode(node); } + virtual void visitVideoNode(const QSvgVideo *node) { visitNode(node); } + + virtual bool visitDocumentNodeStart(const QSvgTinyDocument *node) { return visitStructureNodeStart(node); } + virtual void visitDocumentNodeEnd(const QSvgTinyDocument *node) { visitStructureNodeEnd(node); } + virtual bool visitGroupNodeStart(const QSvgG *node) { return visitStructureNodeStart(node); } + virtual void visitGroupNodeEnd(const QSvgG *node) { visitStructureNodeEnd(node); } + virtual bool visitDefsNodeStart(const QSvgDefs *node) { return visitStructureNodeStart(node); } + virtual void visitDefsNodeEnd(const QSvgDefs *node) { visitStructureNodeEnd(node); }; + virtual bool visitSwitchNodeStart(const QSvgSwitch *node) { return visitStructureNodeStart(node); } + virtual void visitSwitchNodeEnd(const QSvgSwitch *node) { visitStructureNodeEnd(node); }; + virtual bool visitMaskNodeStart(const QSvgMask *node) { return visitStructureNodeStart(node); } + virtual void visitMaskNodeEnd(const QSvgMask *node) { visitStructureNodeEnd(node); } +}; + +QT_END_NAMESPACE + +#endif // QSVGVISITOR_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qtsvgglobal_p.h b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qtsvgglobal_p.h new file mode 100644 index 0000000000000000000000000000000000000000..e14cce4c09d786e0f92f9b4b1f9629b33119c7de --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtSvg/6.8.1/QtSvg/private/qtsvgglobal_p.h @@ -0,0 +1,35 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only + +#ifndef QTSVGGLOBAL_P_H +#define QTSVGGLOBAL_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qtsvgglobal.h" +#include + +QT_BEGIN_NAMESPACE + +namespace QtSvg { + +enum class UnitTypes : quint32 { + unknown, + objectBoundingBox, + userSpaceOnUse +}; + +} + +QT_END_NAMESPACE + +#endif // QTSVGGLOBAL_P_H diff --git a/qt/6.8.1/msvc2022_64/include/QtTest/6.8.1/QtTest/private/catch_p.h b/qt/6.8.1/msvc2022_64/include/QtTest/6.8.1/QtTest/private/catch_p.h new file mode 100644 index 0000000000000000000000000000000000000000..a89c855dda89f499c620115d72cf9c43e71513fe --- /dev/null +++ b/qt/6.8.1/msvc2022_64/include/QtTest/6.8.1/QtTest/private/catch_p.h @@ -0,0 +1,17978 @@ +/* + * Catch v2.13.10 + * Generated: 2022-10-16 11:01:23.452308 + * ---------------------------------------------------------- + * This file has been merged from multiple headers. Please don't edit it directly + * Copyright (c) 2022 Two Blue Cubes Ltd. All rights reserved. + * + * Distributed under the Boost Software License, Version 1.0. (See accompanying + * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + */ +#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED +// start catch.hpp + + +#define CATCH_VERSION_MAJOR 2 +#define CATCH_VERSION_MINOR 13 +#define CATCH_VERSION_PATCH 10 + +#ifdef __clang__ +# pragma clang system_header +#elif defined __GNUC__ +# pragma GCC system_header +#endif + +// start catch_suppress_warnings.h + +#ifdef __clang__ +# ifdef __ICC // icpc defines the __clang__ macro +# pragma warning(push) +# pragma warning(disable: 161 1682) +# else // __ICC +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wpadded" +# pragma clang diagnostic ignored "-Wswitch-enum" +# pragma clang diagnostic ignored "-Wcovered-switch-default" +# endif +#elif defined __GNUC__ + // Because REQUIREs trigger GCC's -Wparentheses, and because still + // supported version of g++ have only buggy support for _Pragmas, + // Wparentheses have to be suppressed globally. +# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details + +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wunused-variable" +# pragma GCC diagnostic ignored "-Wpadded" +#endif +// end catch_suppress_warnings.h +#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) +# define CATCH_IMPL +# define CATCH_CONFIG_ALL_PARTS +#endif + +// In the impl file, we want to have access to all parts of the headers +// Can also be used to sanely support PCHs +#if defined(CATCH_CONFIG_ALL_PARTS) +# define CATCH_CONFIG_EXTERNAL_INTERFACES +# if defined(CATCH_CONFIG_DISABLE_MATCHERS) +# undef CATCH_CONFIG_DISABLE_MATCHERS +# endif +# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) +# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER +# endif +#endif + +#if !defined(CATCH_CONFIG_IMPL_ONLY) +// start catch_platform.h + +// See e.g.: +// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h.auto.html +#ifdef __APPLE__ +# include +# if (defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1) || \ + (defined(TARGET_OS_MAC) && TARGET_OS_MAC == 1) +# define CATCH_PLATFORM_MAC +# elif (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE == 1) +# define CATCH_PLATFORM_IPHONE +# endif + +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX + +#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) +# define CATCH_PLATFORM_WINDOWS +#endif + +// end catch_platform.h + +#ifdef CATCH_IMPL +# ifndef CLARA_CONFIG_MAIN +# define CLARA_CONFIG_MAIN_NOT_DEFINED +# define CLARA_CONFIG_MAIN +# endif +#endif + +// start catch_user_interfaces.h + +namespace Catch { + unsigned int rngSeed(); +} + +// end catch_user_interfaces.h +// start catch_tag_alias_autoregistrar.h + +// start catch_common.h + +// start catch_compiler_capabilities.h + +// Detect a number of compiler features - by compiler +// The following features are defined: +// +// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? +// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? +// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? +// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? +// **************** +// Note to maintainers: if new toggles are added please document them +// in configuration.md, too +// **************** + +// In general each macro has a _NO_ form +// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. +// Many features, at point of detection, define an _INTERNAL_ macro, so they +// can be combined, en-mass, with the _NO_ forms later. + +#ifdef __cplusplus + +# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) +# define CATCH_CPP14_OR_GREATER +# endif + +# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) +# define CATCH_CPP17_OR_GREATER +# endif + +#endif + +// Only GCC compiler should be used in this block, so other compilers trying to +// mask themselves as GCC should be ignored. +#if defined(__GNUC__) && !defined(__clang__) && !defined(__ICC) && !defined(__CUDACC__) && !defined(__LCC__) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "GCC diagnostic pop" ) + +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) + +#endif + +#if defined(__clang__) + +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic push" ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION _Pragma( "clang diagnostic pop" ) + +// As of this writing, IBM XL's implementation of __builtin_constant_p has a bug +// which results in calls to destructors being emitted for each temporary, +// without a matching initialization. In practice, this can result in something +// like `std::string::~string` being called on an uninitialized value. +// +// For example, this code will likely segfault under IBM XL: +// ``` +// REQUIRE(std::string("12") + "34" == "1234") +// ``` +// +// Therefore, `CATCH_INTERNAL_IGNORE_BUT_WARN` is not implemented. +# if !defined(__ibmxl__) && !defined(__CUDACC__) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) (void)__builtin_constant_p(__VA_ARGS__) /* NOLINT(cppcoreguidelines-pro-type-vararg, hicpp-vararg) */ +# endif + +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ + _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") + +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) + +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) + +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS \ + _Pragma( "clang diagnostic ignored \"-Wunused-template\"" ) + +#endif // __clang__ + +//////////////////////////////////////////////////////////////////////////////// +// Assume that non-Windows platforms support posix signals by default +#if !defined(CATCH_PLATFORM_WINDOWS) + #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS +#endif + +//////////////////////////////////////////////////////////////////////////////// +// We know some environments not to support full POSIX signals +#if defined(__CYGWIN__) || defined(__QNX__) || defined(__ghs) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) + #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +#endif + +#ifdef __OS400__ +# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS +# define CATCH_CONFIG_COLOUR_NONE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Android somehow still does not support std::to_string +#if defined(__ANDROID__) +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING +# define CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Not all Windows environments support SEH properly +#if defined(__MINGW32__) +# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH +#endif + +//////////////////////////////////////////////////////////////////////////////// +// PS4 +#if defined(__ORBIS__) +# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE +#endif + +//////////////////////////////////////////////////////////////////////////////// +// Cygwin +#ifdef __CYGWIN__ + +// Required for some versions of Cygwin to declare gettimeofday +// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin +# define _BSD_SOURCE +// some versions of cygwin (most) do not support std::to_string. Use the libstd check. +// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 +# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + +# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING + +# endif +#endif // __CYGWIN__ + +//////////////////////////////////////////////////////////////////////////////// +// Visual C++ +#if defined(_MSC_VER) + +// Universal Windows platform does not support SEH +// Or console colours (or console at all...) +# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) +# define CATCH_CONFIG_COLOUR_NONE +# else +# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH +# endif + +# if !defined(__clang__) // Handle Clang masquerading for msvc + +// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ +// _MSVC_TRADITIONAL == 0 means new conformant preprocessor +// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor +# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) +# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +# endif // MSVC_TRADITIONAL + +// Only do this if we're not using clang on Windows, which uses `diagnostic push` & `diagnostic pop` +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION __pragma( warning(push) ) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION __pragma( warning(pop) ) +# endif // __clang__ + +#endif // _MSC_VER + +#if defined(_REENTRANT) || defined(_MSC_VER) +// Enable async processing, as -pthread is specified or no additional linking is required +# define CATCH_INTERNAL_CONFIG_USE_ASYNC +#endif // _MSC_VER + +//////////////////////////////////////////////////////////////////////////////// +// Check if we are compiled with -fno-exceptions or equivalent +#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) +# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED +#endif + +//////////////////////////////////////////////////////////////////////////////// +// DJGPP +#ifdef __DJGPP__ +# define CATCH_INTERNAL_CONFIG_NO_WCHAR +#endif // __DJGPP__ + +//////////////////////////////////////////////////////////////////////////////// +// Embarcadero C++Build +#if defined(__BORLANDC__) + #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// Use of __COUNTER__ is suppressed during code analysis in +// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly +// handled by it. +// Otherwise all supported compilers support COUNTER macro, +// but user still might want to turn it off +#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) + #define CATCH_INTERNAL_CONFIG_COUNTER +#endif + +//////////////////////////////////////////////////////////////////////////////// + +// RTX is a special version of Windows that is real time. +// This means that it is detected as Windows, but does not provide +// the same set of capabilities as real Windows does. +#if defined(UNDER_RTSS) || defined(RTX64_BUILD) + #define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH + #define CATCH_INTERNAL_CONFIG_NO_ASYNC + #define CATCH_CONFIG_COLOUR_NONE +#endif + +#if !defined(_GLIBCXX_USE_C99_MATH_TR1) +#define CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER +#endif + +// Various stdlib support checks that require __has_include +#if defined(__has_include) + // Check if string_view is available and usable + #if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW + #endif + + // Check if optional is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if byte is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # include + # if defined(__cpp_lib_byte) && (__cpp_lib_byte > 0) + # define CATCH_INTERNAL_CONFIG_CPP17_BYTE + # endif + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) + + // Check if variant is available and usable + # if __has_include() && defined(CATCH_CPP17_OR_GREATER) + # if defined(__clang__) && (__clang_major__ < 8) + // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 + // fix should be in clang 8, workaround in libstdc++ 8.2 + # include + # if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # define CATCH_CONFIG_NO_CPP17_VARIANT + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) + # else + # define CATCH_INTERNAL_CONFIG_CPP17_VARIANT + # endif // defined(__clang__) && (__clang_major__ < 8) + # endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) +#endif // defined(__has_include) + +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +# define CATCH_CONFIG_COUNTER +#endif +#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) +# define CATCH_CONFIG_WINDOWS_SEH +#endif +// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. +#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) +# define CATCH_CONFIG_POSIX_SIGNALS +#endif +// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. +#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) +# define CATCH_CONFIG_WCHAR +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) +# define CATCH_CONFIG_CPP11_TO_STRING +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) +# define CATCH_CONFIG_CPP17_OPTIONAL +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) +# define CATCH_CONFIG_CPP17_STRING_VIEW +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) +# define CATCH_CONFIG_CPP17_VARIANT +#endif + +#if defined(CATCH_INTERNAL_CONFIG_CPP17_BYTE) && !defined(CATCH_CONFIG_NO_CPP17_BYTE) && !defined(CATCH_CONFIG_CPP17_BYTE) +# define CATCH_CONFIG_CPP17_BYTE +#endif + +#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) +# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) +# define CATCH_CONFIG_NEW_CAPTURE +#endif + +#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +# define CATCH_CONFIG_DISABLE_EXCEPTIONS +#endif + +#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) +# define CATCH_CONFIG_POLYFILL_ISNAN +#endif + +#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_INTERNAL_CONFIG_NO_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) +# define CATCH_CONFIG_USE_ASYNC +#endif + +#if defined(CATCH_INTERNAL_CONFIG_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_NO_ANDROID_LOGWRITE) && !defined(CATCH_CONFIG_ANDROID_LOGWRITE) +# define CATCH_CONFIG_ANDROID_LOGWRITE +#endif + +#if defined(CATCH_INTERNAL_CONFIG_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_NO_GLOBAL_NEXTAFTER) && !defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) +# define CATCH_CONFIG_GLOBAL_NEXTAFTER +#endif + +// Even if we do not think the compiler has that warning, we still have +// to provide a macro that can be used by the code. +#if !defined(CATCH_INTERNAL_START_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_START_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION) +# define CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS +#endif +#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS +#endif + +// The goal of this macro is to avoid evaluation of the arguments, but +// still have the compiler warn on problems inside... +#if !defined(CATCH_INTERNAL_IGNORE_BUT_WARN) +# define CATCH_INTERNAL_IGNORE_BUT_WARN(...) +#endif + +#if defined(__APPLE__) && defined(__apple_build_version__) && (__clang_major__ < 10) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#elif defined(__clang__) && (__clang_major__ < 5) +# undef CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + +#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS) +# define CATCH_INTERNAL_SUPPRESS_UNUSED_TEMPLATE_WARNINGS +#endif + +#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) +#define CATCH_TRY if ((true)) +#define CATCH_CATCH_ALL if ((false)) +#define CATCH_CATCH_ANON(type) if ((false)) +#else +#define CATCH_TRY try +#define CATCH_CATCH_ALL catch (...) +#define CATCH_CATCH_ANON(type) catch (type) +#endif + +#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) +#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#endif + +// end catch_compiler_capabilities.h +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#include +#include +#include + +// We need a dummy global operator<< so we can bring it into Catch namespace later +struct Catch_global_namespace_dummy {}; +std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); + +namespace Catch { + + struct CaseSensitive { enum Choice { + Yes, + No + }; }; + + class NonCopyable { + NonCopyable( NonCopyable const& ) = delete; + NonCopyable( NonCopyable && ) = delete; + NonCopyable& operator = ( NonCopyable const& ) = delete; + NonCopyable& operator = ( NonCopyable && ) = delete; + + protected: + NonCopyable(); + virtual ~NonCopyable(); + }; + + struct SourceLineInfo { + + SourceLineInfo() = delete; + SourceLineInfo( char const* _file, std::size_t _line ) noexcept + : file( _file ), + line( _line ) + {} + + SourceLineInfo( SourceLineInfo const& other ) = default; + SourceLineInfo& operator = ( SourceLineInfo const& ) = default; + SourceLineInfo( SourceLineInfo&& ) noexcept = default; + SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; + + bool empty() const noexcept { return file[0] == '\0'; } + bool operator == ( SourceLineInfo const& other ) const noexcept; + bool operator < ( SourceLineInfo const& other ) const noexcept; + + char const* file; + std::size_t line; + }; + + std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); + + // Bring in operator<< from global namespace into Catch namespace + // This is necessary because the overload of operator<< above makes + // lookup stop at namespace Catch + using ::operator<<; + + // Use this in variadic streaming macros to allow + // >> +StreamEndStop + // as well as + // >> stuff +StreamEndStop + struct StreamEndStop { + std::string operator+() const; + }; + template + T const& operator + ( T const& value, StreamEndStop ) { + return value; + } +} + +#define CATCH_INTERNAL_LINEINFO \ + ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) + +// end catch_common.h +namespace Catch { + + struct RegistrarForTagAliases { + RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); + }; + +} // end namespace Catch + +#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ + CATCH_INTERNAL_START_WARNINGS_SUPPRESSION \ + CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ + namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ + CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION + +// end catch_tag_alias_autoregistrar.h +// start catch_test_registry.h + +// start catch_interfaces_testcase.h + +#include + +namespace Catch { + + class TestSpec; + + struct ITestInvoker { + virtual void invoke () const = 0; + virtual ~ITestInvoker(); + }; + + class TestCase; + struct IConfig; + + struct ITestCaseRegistry { + virtual ~ITestCaseRegistry(); + virtual std::vector const& getAllTests() const = 0; + virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; + }; + + bool isThrowSafe( TestCase const& testCase, IConfig const& config ); + bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); + std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); + std::vector const& getAllTestCasesSorted( IConfig const& config ); + +} + +// end catch_interfaces_testcase.h +// start catch_stringref.h + +#include +#include +#include +#include + +namespace Catch { + + /// A non-owning string class (similar to the forthcoming std::string_view) + /// Note that, because a StringRef may be a substring of another string, + /// it may not be null terminated. + class StringRef { + public: + using size_type = std::size_t; + using const_iterator = const char*; + + private: + static constexpr char const* const s_empty = ""; + + char const* m_start = s_empty; + size_type m_size = 0; + + public: // construction + constexpr StringRef() noexcept = default; + + StringRef( char const* rawChars ) noexcept; + + constexpr StringRef( char const* rawChars, size_type size ) noexcept + : m_start( rawChars ), + m_size( size ) + {} + + StringRef( std::string const& stdString ) noexcept + : m_start( stdString.c_str() ), + m_size( stdString.size() ) + {} + + explicit operator std::string() const { + return std::string(m_start, m_size); + } + + public: // operators + auto operator == ( StringRef const& other ) const noexcept -> bool; + auto operator != (StringRef const& other) const noexcept -> bool { + return !(*this == other); + } + + auto operator[] ( size_type index ) const noexcept -> char { + assert(index < m_size); + return m_start[index]; + } + + public: // named queries + constexpr auto empty() const noexcept -> bool { + return m_size == 0; + } + constexpr auto size() const noexcept -> size_type { + return m_size; + } + + // Returns the current start pointer. If the StringRef is not + // null-terminated, throws std::domain_exception + auto c_str() const -> char const*; + + public: // substrings and searches + // Returns a substring of [start, start + length). + // If start + length > size(), then the substring is [start, size()). + // If start > size(), then the substring is empty. + auto substr( size_type start, size_type length ) const noexcept -> StringRef; + + // Returns the current start pointer. May not be null-terminated. + auto data() const noexcept -> char const*; + + constexpr auto isNullTerminated() const noexcept -> bool { + return m_start[m_size] == '\0'; + } + + public: // iterators + constexpr const_iterator begin() const { return m_start; } + constexpr const_iterator end() const { return m_start + m_size; } + }; + + auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; + auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; + + constexpr auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { + return StringRef( rawChars, size ); + } +} // namespace Catch + +constexpr auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { + return Catch::StringRef( rawChars, size ); +} + +// end catch_stringref.h +// start catch_preprocessor.hpp + + +#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ +#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) +#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) + +#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ +// MSVC needs more evaluations +#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) +#else +#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) +#endif + +#define CATCH_REC_END(...) +#define CATCH_REC_OUT + +#define CATCH_EMPTY() +#define CATCH_DEFER(id) id CATCH_EMPTY() + +#define CATCH_REC_GET_END2() 0, CATCH_REC_END +#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 +#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 +#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT +#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) +#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) + +#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) + +#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) +#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) + +// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, +// and passes userdata as the first parameter to each invocation, +// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) +#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) + +#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) +#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ +#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ +#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) +#else +// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF +#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) +#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ +#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) +#endif + +#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ +#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) + +#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) + +#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) +#else +#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) +#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) +#endif + +#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ + CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) + +#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) +#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) +#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) +#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) +#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) +#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) +#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _3, _4, _5, _6) +#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) +#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) +#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) +#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) + +#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N + +#define INTERNAL_CATCH_TYPE_GEN\ + template struct TypeList {};\ + template\ + constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ + template class...> struct TemplateTypeList{};\ + template class...Cs>\ + constexpr auto get_wrapper() noexcept -> TemplateTypeList { return {}; }\ + template\ + struct append;\ + template\ + struct rewrap;\ + template class, typename...>\ + struct create;\ + template class, typename>\ + struct convert;\ + \ + template \ + struct append { using type = T; };\ + template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ + struct append, L2, Rest...> { using type = typename append, Rest...>::type; };\ + template< template class L1, typename...E1, typename...Rest>\ + struct append, TypeList, Rest...> { using type = L1; };\ + \ + template< template class Container, template class List, typename...elems>\ + struct rewrap, List> { using type = TypeList>; };\ + template< template class Container, template class List, class...Elems, typename...Elements>\ + struct rewrap, List, Elements...> { using type = typename append>, typename rewrap, Elements...>::type>::type; };\ + \ + template