Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKPOPUPITEM_P_P_H
6#define QQUICKPOPUPITEM_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickpage_p.h>
20#include <QtQuickTemplates2/private/qquickpage_p_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class QQuickPopup;
25class QQuickPopupItemPrivate;
26
27class Q_QUICKTEMPLATES2_EXPORT QQuickPopupItem : public QQuickPage
28{
29 Q_OBJECT
30
31public:
32 explicit QQuickPopupItem(QQuickPopup *popup);
33
34protected:
35 void updatePolish() override;
36
37 bool childMouseEventFilter(QQuickItem *child, QEvent *event) override;
38 void focusInEvent(QFocusEvent *event) override;
39 void focusOutEvent(QFocusEvent *event) override;
40 void keyPressEvent(QKeyEvent *event) override;
41 void keyReleaseEvent(QKeyEvent *event) override;
42 void mousePressEvent(QMouseEvent *event) override;
43 void mouseMoveEvent(QMouseEvent *event) override;
44 void mouseReleaseEvent(QMouseEvent *event) override;
45 void mouseDoubleClickEvent(QMouseEvent *event) override;
46 void mouseUngrabEvent() override;
47#if QT_CONFIG(quicktemplates2_multitouch)
48 void touchEvent(QTouchEvent *event) override;
49 void touchUngrabEvent() override;
50#endif
51#if QT_CONFIG(wheelevent)
52 void wheelEvent(QWheelEvent *event) override;
53#endif
54
55 void contentItemChange(QQuickItem *newItem, QQuickItem *oldItem) override;
56 void contentSizeChange(const QSizeF &newSize, const QSizeF &oldSize) override;
57 void fontChange(const QFont &newFont, const QFont &oldFont) override;
58 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
59 void localeChange(const QLocale &newLocale, const QLocale &oldLocale) override;
60 void mirrorChange() override;
61 void itemChange(ItemChange change, const ItemChangeData &data) override;
62 void paddingChange(const QMarginsF &newPadding, const QMarginsF &oldPadding) override;
63 void enabledChange() override;
64
65 QFont defaultFont() const override;
66
67#if QT_CONFIG(accessibility)
68 QAccessible::Role accessibleRole() const override;
69 void accessibilityActiveChanged(bool active) override;
70#endif
71
72private:
73 Q_DISABLE_COPY(QQuickPopupItem)
74 Q_DECLARE_PRIVATE(QQuickPopupItem)
75 friend class QQuickPopup;
76};
77
78class Q_QUICKTEMPLATES2_EXPORT QQuickPopupItemPrivate : public QQuickPagePrivate
79{
80 Q_DECLARE_PUBLIC(QQuickPopupItem)
81
82public:
83 QQuickPopupItemPrivate(QQuickPopup *popup);
84
85 static QQuickPopupItemPrivate *get(QQuickPopupItem *popupItem);
86
87 void implicitWidthChanged() override;
88 void implicitHeightChanged() override;
89
90 void resolveFont() override;
91
92 QQuickItem *getContentItem() override;
93
94 void cancelContentItem() override;
95 void executeContentItem(bool complete = false) override;
96
97 void cancelBackground() override;
98 void executeBackground(bool complete = false) override;
99
100 QQuickPalette *palette() const override;
101 void setPalette(QQuickPalette* p) override;
102 void resetPalette() override;
103
104 QPalette defaultPalette() const override;
105 bool providesPalette() const override;
106
107 QPalette parentPalette(const QPalette &fallbackPalette) const override;
108
109 int backId = 0;
110 int escapeId = 0;
111 QQuickPopup *popup = nullptr;
112};
113
114QT_END_NAMESPACE
115
116#endif // QQUICKPOPUPITEM_P_P_H
void readOnlyChanged(bool isReadOnly)
void implicitWidthChanged() override
qreal getImplicitWidth() const override
bool setLastFocusChangeReason(Qt::FocusReason reason) override
void setFont_helper(const QFont &font)
QQuickFlickable * flickable
QQuickDeferredPointer< QQuickItem > background
void setTopInset(qreal value, bool reset=false)
void setLeftInset(qreal value, bool reset=false)
void setRightInset(qreal value, bool reset=false)
void executeBackground(bool complete=false)
QLazilyAllocated< ExtraData > extra
void updateFont(const QFont &font)
void setBottomInset(qreal value, bool reset=false)
void itemDestroyed(QQuickItem *item) override
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
void itemImplicitWidthChanged(QQuickItem *item) override
void attachFlickable(QQuickFlickable *flickable)
void inheritFont(const QFont &font)
qreal getImplicitHeight() const override
QQuickPressHandler pressHandler
void itemImplicitHeightChanged(QQuickItem *item) override
QMarginsF getInset() const
static QQuickTextAreaPrivate * get(QQuickTextArea *item)
QPalette defaultPalette() const override
void implicitHeightChanged() override
void executeBackground(bool complete=false)
static QQuickTextFieldPrivate * get(QQuickTextField *item)
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
void echoModeChanged(QQuickTextField::EchoMode echoMode)
qreal getImplicitHeight() const override
void setBottomInset(qreal value, bool reset=false)
void inheritFont(const QFont &font)
QQuickDeferredPointer< QQuickItem > background
void setRightInset(qreal value, bool reset=false)
void itemImplicitWidthChanged(QQuickItem *item) override
void readOnlyChanged(bool isReadOnly)
void itemImplicitHeightChanged(QQuickItem *item) override
void setLeftInset(qreal value, bool reset=false)
qreal getImplicitWidth() const override
void setFont_helper(const QFont &font)
void implicitHeightChanged() override
void setTopInset(qreal value, bool reset=false)
void itemDestroyed(QQuickItem *item) override
QQuickPressHandler pressHandler
void implicitWidthChanged() override
QLazilyAllocated< ExtraData > extra
void updateFont(const QFont &font)
QPalette defaultPalette() const override
bool setLastFocusChangeReason(Qt::FocusReason reason) override
static bool isKeyFocusReason(Qt::FocusReason reason)
static QString contentItemName()