Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquicktextarea_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 QQUICKTEXTAREA_P_P_H
5#define QQUICKTEXTAREA_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/qquicktextedit_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/qquicktextarea_p.h>
26
27#if QT_CONFIG(accessibility)
28#include <QtGui/qaccessible.h>
29#endif
30
32
33class QQuickFlickable;
34
36#if QT_CONFIG(accessibility)
37 , public QAccessible::ActivationObserver
38#endif
39{
40public:
41 Q_DECLARE_PUBLIC(QQuickTextArea)
42
45
47 {
48 return static_cast<QQuickTextAreaPrivate *>(QObjectPrivate::get(item));
49 }
50
52 inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; }
53 inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; }
54 inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; }
55 inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; }
56
57 void setTopInset(qreal value, bool reset = false);
58 void setLeftInset(qreal value, bool reset = false);
59 void setRightInset(qreal value, bool reset = false);
60 void setBottomInset(qreal value, bool reset = false);
61
62 void resizeBackground();
63
64 void resolveFont();
65 void inheritFont(const QFont &font);
66 void updateFont(const QFont &font);
67 inline void setFont_helper(const QFont &font) {
69 return;
71 }
72
73#if QT_CONFIG(quicktemplates2_hover)
74 void updateHoverEnabled(bool h, bool e);
75#endif
76
78 void detachFlickable();
82
83 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
84
85 qreal getImplicitWidth() const override;
86 qreal getImplicitHeight() const override;
87
88 void implicitWidthChanged() override;
89 void implicitHeightChanged() override;
90
91 void readOnlyChanged(bool isReadOnly);
92
93#if QT_CONFIG(accessibility)
94 void accessibilityActiveChanged(bool active) override;
95 QAccessible::Role accessibleRole() const override;
96#endif
97
98 void cancelBackground();
99 void executeBackground(bool complete = false);
100
103 void itemDestroyed(QQuickItem *item) override;
104
105 QPalette defaultPalette() const override;
106
107#if QT_CONFIG(quicktemplates2_hover)
108 bool hovered = false;
109 bool explicitHoverEnabled = false;
110#endif
111
112 struct ExtraData {
113 bool hasTopInset = false;
114 bool hasLeftInset = false;
115 bool hasRightInset = false;
116 bool hasBottomInset = false;
117 bool hasBackgroundWidth = false;
125 };
127
128 bool resizingBackground = false;
136};
137
139
140#endif // QQUICKTEXTAREA_P_P_H
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\reentrant
Definition qfont.h:20
uint resolveMask() const
Definition qfont.h:251
\inmodule QtCore
Definition qmargins.h:274
static QObjectPrivate * get(QObject *o)
Definition qobject_p.h:153
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:64
void readOnlyChanged(bool isReadOnly)
void implicitWidthChanged() override
qreal getImplicitWidth() const 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
QQuickTextAreaPrivate()
Multi-line text input area.
\inmodule QtCore\reentrant
Definition qrect.h:483
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
double e
Combined button and popup list for selecting options.
FocusReason
@ OtherFocusReason
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLfloat GLfloat GLfloat GLfloat h
GLboolean reset
double qreal
Definition qtypes.h:92
QGraphicsItem * item