Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickpopupitem_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQUICKPOPUPITEM_P_P_H
5#define QQUICKPOPUPITEM_P_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuickTemplates2/private/qquickpage_p.h>
19#include <QtQuickTemplates2/private/qquickpage_p_p.h>
20
22
23class QQuickPopup;
25
26class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopupItem : public QQuickPage
27{
29
30public:
31 explicit QQuickPopupItem(QQuickPopup *popup);
32
33protected:
34 void updatePolish() override;
35
37 void focusInEvent(QFocusEvent *event) override;
38 void focusOutEvent(QFocusEvent *event) override;
39 void keyPressEvent(QKeyEvent *event) override;
40 void keyReleaseEvent(QKeyEvent *event) override;
41 void mousePressEvent(QMouseEvent *event) override;
42 void mouseMoveEvent(QMouseEvent *event) override;
43 void mouseReleaseEvent(QMouseEvent *event) override;
45 void mouseUngrabEvent() override;
46#if QT_CONFIG(quicktemplates2_multitouch)
47 void touchEvent(QTouchEvent *event) override;
48 void touchUngrabEvent() override;
49#endif
50#if QT_CONFIG(wheelevent)
51 void wheelEvent(QWheelEvent *event) override;
52#endif
53
54 void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
55 void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override;
56 void fontChange(const QFont &newFont, const QFont &oldFont) override;
57 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
58 void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
59 void mirrorChange() override;
60 void itemChange(ItemChange change, const ItemChangeData &data) override;
61 void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
62 void enabledChange() override;
63
64 QFont defaultFont() const override;
65
66#if QT_CONFIG(accessibility)
67 QAccessible::Role accessibleRole() const override;
68 void accessibilityActiveChanged(bool active) override;
69#endif
70
71private:
72 Q_DISABLE_COPY(QQuickPopupItem)
73 Q_DECLARE_PRIVATE(QQuickPopupItem)
74 friend class QQuickPopup;
75};
76
77class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickPopupItemPrivate : public QQuickPagePrivate
78{
79 Q_DECLARE_PUBLIC(QQuickPopupItem)
80
81public:
83
84 void implicitWidthChanged() override;
85 void implicitHeightChanged() override;
86
87 void resolveFont() override;
88
89 QQuickItem *getContentItem() override;
90
91 void cancelContentItem() override;
92 void executeContentItem(bool complete = false) override;
93
94 void cancelBackground() override;
95 void executeBackground(bool complete = false) override;
96
97 QQuickPalette *palette() const override;
98 void setPalette(QQuickPalette* p) override;
99 void resetPalette() override;
100
101 QPalette defaultPalette() const override;
102 bool providesPalette() const override;
103
104 QPalette parentPalette(const QPalette &fallbackPalette) const override;
105
106 int backId = 0;
107 int escapeId = 0;
108 QQuickPopup *popup = nullptr;
109};
110
112
113#endif // QQUICKPOPUPITEM_P_P_H
\inmodule QtCore
Definition qcoreevent.h:45
The QFocusEvent class contains event parameters for widget focus events.
Definition qevent.h:469
\reentrant
Definition qfont.h:20
The QKeyEvent class describes a key event.
Definition qevent.h:423
\inmodule QtCore
Definition qmargins.h:274
\inmodule QtGui
Definition qevent.h:195
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
void focusInEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive focus-in events for an item.
void mouseReleaseEvent(QMouseEvent *event) override
This event handler can be reimplemented in a subclass to receive mouse release events for an item.
virtual QFont defaultFont() const
virtual void localeChange(const QLocale &newLocale, const QLocale &oldLocale)
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
virtual void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding)
void itemChange(ItemChange change, const ItemChangeData &value) override
Called when change occurs for this item.
void mousePressEvent(QMouseEvent *event) override
This event handler can be reimplemented in a subclass to receive mouse press events for an item.
void focusOutEvent(QFocusEvent *event) override
This event handler can be reimplemented in a subclass to receive focus-out events for an item.
virtual void enabledChange()
void mouseMoveEvent(QMouseEvent *event) override
This event handler can be reimplemented in a subclass to receive mouse move events for an item.
virtual void fontChange(const QFont &newFont, const QFont &oldFont)
virtual void mirrorChange()
void mouseUngrabEvent() override
This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has oc...
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
virtual void mouseDoubleClickEvent(QMouseEvent *event)
This event handler can be reimplemented in a subclass to receive mouse double-click events for an ite...
virtual void keyPressEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key press events for an item.
void implicitWidthChanged()
void implicitHeightChanged()
virtual void touchUngrabEvent()
This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has oc...
virtual void touchEvent(QTouchEvent *event)
This event handler can be reimplemented in a subclass to receive touch events for an item.
virtual bool childMouseEventFilter(QQuickItem *, QEvent *)
Reimplement this method to filter the pointer events that are received by this item's children.
virtual void updatePolish()
This function should perform any layout as required for this item.
virtual void keyReleaseEvent(QKeyEvent *event)
This event handler can be reimplemented in a subclass to receive key release events for an item.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:143
Contains color groups for each QML item state. \inmodule QtQuick.
void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override
virtual void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize)
\inmodule QtCore\reentrant
Definition qrect.h:483
\inmodule QtCore
Definition qsize.h:207
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:916
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
struct _cl_event * event
GLfloat GLfloat p
[1]
#define Q_OBJECT
QLayoutItem * child
[0]
\inmodule QtQuick
Definition qquickitem.h:158