Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicktextfield_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 QQUICKTEXTFIELD_P_P_H
5#define QQUICKTEXTFIELD_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 <QtQml/private/qlazilyallocated_p.h>
19#include <QtQuick/private/qquicktextinput_p_p.h>
20#include <QtQuick/private/qquickitemchangelistener_p.h>
21#include <QtQuickTemplates2/private/qquickpresshandler_p_p.h>
22#include <QtQuickTemplates2/private/qquickdeferredpointer_p_p.h>
23#include <QtQuickTemplates2/private/qquicktheme_p.h>
24
25#include <QtQuickTemplates2/private/qquicktextfield_p.h>
26
27#if QT_CONFIG(accessibility)
28#include <QtGui/qaccessible.h>
29#endif
30
32
34#if QT_CONFIG(accessibility)
35 , public QAccessible::ActivationObserver
36#endif
37{
38public:
39 Q_DECLARE_PUBLIC(QQuickTextField)
40
43
46
48 inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; }
49 inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; }
50 inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; }
51 inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; }
52
53 void setTopInset(qreal value, bool reset = false);
54 void setLeftInset(qreal value, bool reset = false);
55 void setRightInset(qreal value, bool reset = false);
56 void setBottomInset(qreal value, bool reset = false);
57
58 void resizeBackground();
59
60 void resolveFont();
61 void inheritFont(const QFont &font);
62 void updateFont(const QFont &font);
63 inline void setFont_helper(const QFont &font) {
65 return;
67 }
68
69#if QT_CONFIG(quicktemplates2_hover)
70 void updateHoverEnabled(bool h, bool e);
71#endif
72
73 qreal getImplicitWidth() const override;
74 qreal getImplicitHeight() const override;
75
76 void implicitWidthChanged() override;
77 void implicitHeightChanged() override;
78
79 void readOnlyChanged(bool isReadOnly);
81
82#if QT_CONFIG(accessibility)
83 void accessibilityActiveChanged(bool active) override;
84 QAccessible::Role accessibleRole() const override;
85#endif
86
87 void cancelBackground();
88 void executeBackground(bool complete = false);
89
90 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
93 void itemDestroyed(QQuickItem *item) override;
94
95 QPalette defaultPalette() const override;
96
97#if QT_CONFIG(quicktemplates2_hover)
98 bool hovered = false;
99 bool explicitHoverEnabled = false;
100#endif
101
115 QLazilyAllocated<ExtraData> extra;
116
117 bool resizingBackground = false;
118 QQuickDeferredPointer<QQuickItem> background;
122};
123
125
126#endif // QQUICKTEXTFIELD_P_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\reentrant
Definition qfont.h:22
uint resolveMask() const
Definition qfont.h:312
\inmodule QtCore
Definition qmargins.h:270
static QObjectPrivate * get(QObject *o)
Definition qobject_p.h:150
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
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
QQuickTextFieldPrivate()
Single-line text input field.
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
\inmodule QtCore\reentrant
Definition qrect.h:484
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLfloat GLfloat GLfloat GLfloat h
GLboolean reset
double qreal
Definition qtypes.h:187
QGraphicsItem * item