9#include <QtGui/qstylehints.h>
10#include <QtGui/private/qguiapplication_p.h>
11#include <QtQml/qqmlinfo.h>
12#include <QtQuick/private/qquickwindow_p.h>
13#include <QtQuick/private/qquickanimation_p.h>
14#include <QtQuick/private/qquicktransition_p.h>
169 return point.
y() /
q->height();
171 return point.
x() /
q->width();
201 switch (drawer->
edge()) {
250 switch (drawer->
edge()) {
273 switch (
event->type()) {
279 mouseEvent->addPassiveGrabber(mouseEvent->point(0),
popupItem);
285#if QT_CONFIG(quicktemplates2_multitouch)
292 touchEvent->addPassiveGrabber(point,
popupItem);
310 return item->keepMouseGrab() ||
item->keepTouchGrab();
321 const QPointF movePoint =
event->scenePosition();
327 bool overThreshold =
false;
332 overThreshold = xOverThreshold && !yOverThreshold;
334 overThreshold = yOverThreshold && !xOverThreshold;
357 return overThreshold;
360#if QT_CONFIG(quicktemplates2_multitouch)
364 bool handled = handleTouchEvent(
item,
event);
369 bool overThreshold =
false;
374 const QPointF movePoint = point.scenePosition();
384 overThreshold = xOverThreshold && !yOverThreshold;
386 overThreshold = yOverThreshold && !xOverThreshold;
403 event->setExclusiveGrabber(point,
popupItem);
409 return overThreshold;
506 velocity = -velocity;
605 qmlWarning(
q) <<
"invalid edge value - valid values are: "
606 <<
"Qt.TopEdge, Qt.LeftEdge, Qt.RightEdge, Qt.BottomEdge";
623 setFiltersChildMouseEvents(
true);
624 setClosePolicy(CloseOnEscape | CloseOnReleaseOutside);
650 if (!
d->setEdge(
edge))
700 return d->dragMargin;
709 d->dragMargin = margin;
732 return d->interactive;
743 emit interactiveChanged();
749 switch (
event->type()) {
750#if QT_CONFIG(quicktemplates2_multitouch)
771 d->grabMouse(
d->popupItem,
event);
777 switch (
event->type()) {
778#if QT_CONFIG(quicktemplates2_multitouch)
790#if QT_CONFIG(quicktemplates2_multitouch)
794 d->grabTouch(
d->popupItem,
event);
807#include "moc_qquickdrawer_p.cpp"
The QEventPoint class provides information about a point in a QPointerEvent.
static QStyleHints * styleHints()
Returns the application's style hints.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns fa...
The QQmlListProperty class allows applications to expose list-like properties of QObject-derived clas...
The QQmlProperty class abstracts accessing properties on objects created from QML.
void setDefaultTarget(const QQmlProperty &)
Side panel that can be opened and closed using a swipe gesture.
void reposition() override
QQuickDrawerPositioner(QQuickDrawer *drawer)
void handleUngrab() override
void hideOverlay() override
bool prepareEnterTransition() override
bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool delayedEnterTransition
bool setEdge(Qt::Edge edge)
qreal positionAt(const QPointF &point) const
QQuickPopupPositioner * getPositioner() override
void resizeOverlay() override
bool grabMouse(QQuickItem *item, QMouseEvent *event)
bool handleRelease(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool startDrag(QEvent *event)
qreal offsetAt(const QPointF &point) const
bool blockInput(QQuickItem *item, const QPointF &point) const override
bool handleMove(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool prepareExitTransition() override
void showOverlay() override
QQuickVelocityCalculator velocityCalculator
void setEdge(Qt::Edge edge)
void setPosition(qreal position)
void setDragMargin(qreal margin)
bool overlayEvent(QQuickItem *item, QEvent *event) override
QQuickDrawer(QObject *parent=nullptr)
bool childMouseEventFilter(QQuickItem *child, QEvent *event) override
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setInteractive(bool interactive)
bool isInteractive() const
void mouseMoveEvent(QMouseEvent *event) override
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setKeepTouchGrab(bool)
Sets whether the touch points grabbed by this item should remain exclusively with this item.
void setSize(const QSizeF &size)
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
QPointF mapFromScene(const QPointF &point) const
Maps the given point in the scene's coordinate system to the equivalent point within this item's coor...
qreal y
Defines the item's y position relative to its parent.
virtual Q_INVOKABLE bool contains(const QPointF &point) const
\qmlmethod bool QtQuick::Item::contains(point point)
bool keepTouchGrab() const
Returns whether the touch points grabbed by this item should exclusively remain with this item.
qreal width
This property holds the width of this item.
bool keepMouseGrab() const
Returns whether mouse input should exclusively remain with this item.
void setKeepMouseGrab(bool)
Sets whether the mouse input should remain exclusively with this item.
qreal height
This property holds the height of this item.
void setPosition(const QPointF &)
bool isAncestorOf(const QQuickItem *child) const
Returns true if this item is an ancestor of child (i.e., if this item is child's parent,...
QQmlListProperty< QQuickAbstractAnimation > animations
\qmlproperty list<Animation> QtQuick::Transition::animations \qmldefault
void startMeasuring(const QPointF &point1, qint64 timestamp=0)
void stopMeasuring(const QPointF &m_point2, qint64 timestamp=0)
static bool dragOverThreshold(qreal d, Qt::Axis axis, const QEventPoint *tp, int startDragThreshold=-1)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
QQuickItem * contentItem
\qmlattachedproperty Item Window::contentItem
\inmodule QtCore\reentrant
constexpr void setY(qreal pos) noexcept
Sets the top edge of the rectangle to the given finite y coordinate.
constexpr void setWidth(qreal w) noexcept
Sets the width of the rectangle to the given finite width.
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr void setHeight(qreal h) noexcept
Sets the height of the rectangle to the given finite height.
constexpr void setX(qreal pos) noexcept
Sets the left edge of the rectangle to the given finite x coordinate.
int startDragDistance
the distance, in pixels, that the mouse must be moved with a button held down before a drag and drop ...
QMap< int, QEventPoint > points
The QTouchEvent class contains parameters that describe a touch event.
int width
the width of the window's geometry
int height
the height of the window's geometry
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
GLfixed GLfixed GLint GLint GLfixed points
GLdouble GLdouble GLdouble GLdouble q
void qmlExecuteDeferred(QObject *object)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static const qreal openCloseVelocityThreshold
static bool isWithinDragMargin(const QQuickDrawer *drawer, const QPointF &pos)
static bool keepGrab(QQuickItem *item)
static QList< QQuickStateAction > prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
QLatin1StringView QLatin1String
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent