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
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// Qt-Security score:significant reason:default
4
5#ifndef QQUICKTEXTAREA_P_P_H
6#define QQUICKTEXTAREA_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 <QtQml/private/qlazilyallocated_p.h>
20#include <QtQuick/private/qquicktextedit_p_p.h>
21#include <QtQuick/private/qquickitemchangelistener_p.h>
22#include <QtQuickTemplates2/private/qquickpresshandler_p_p.h>
23#include <QtQuickTemplates2/private/qquickdeferredpointer_p_p.h>
24#include <QtQuickTemplates2/private/qquicktheme_p.h>
25
26#include <QtQuickTemplates2/private/qquicktextarea_p.h>
27
29
30class QQuickFlickable;
31
34{
35public:
36 Q_DECLARE_PUBLIC(QQuickTextArea)
37
40
41 static QQuickTextAreaPrivate *get(QQuickTextArea *item)
42 {
43 return static_cast<QQuickTextAreaPrivate *>(QObjectPrivate::get(item));
44 }
45
46 inline QMarginsF getInset() const { return QMarginsF(getLeftInset(), getTopInset(), getRightInset(), getBottomInset()); }
47 inline qreal getTopInset() const { return extra.isAllocated() ? extra->topInset : 0; }
48 inline qreal getLeftInset() const { return extra.isAllocated() ? extra->leftInset : 0; }
49 inline qreal getRightInset() const { return extra.isAllocated() ? extra->rightInset : 0; }
50 inline qreal getBottomInset() const { return extra.isAllocated() ? extra->bottomInset : 0; }
51
52 void setTopInset(qreal value, bool reset = false);
53 void setLeftInset(qreal value, bool reset = false);
54 void setRightInset(qreal value, bool reset = false);
55 void setBottomInset(qreal value, bool reset = false);
56
57 void resizeBackground();
58
59 void resolveFont();
60 void inheritFont(const QFont &font);
61 void updateFont(const QFont &font);
62 inline void setFont_helper(const QFont &font) {
63 if (sourceFont.resolveMask() == font.resolveMask() && sourceFont == font)
64 return;
65 updateFont(font);
66 }
67
68#if QT_CONFIG(quicktemplates2_hover)
69 void updateHoverEnabled(bool h, bool e);
70#endif
71
72 void attachFlickable(QQuickFlickable *flickable);
73 void detachFlickable();
77
78 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
79
80 qreal getImplicitWidth() const override;
81 qreal getImplicitHeight() const override;
82
85
86 void readOnlyChanged(bool isReadOnly);
87
88#if QT_CONFIG(accessibility)
90#endif
91
92 void cancelBackground();
93 void executeBackground(bool complete = false);
94
95 void itemImplicitWidthChanged(QQuickItem *item) override;
96 void itemImplicitHeightChanged(QQuickItem *item) override;
97 void itemDestroyed(QQuickItem *item) override;
98
99 QPalette defaultPalette() const override;
100
101 bool setLastFocusChangeReason(Qt::FocusReason reason) override;
102
103#if QT_CONFIG(quicktemplates2_hover)
104 bool hovered = false;
105 bool explicitHoverEnabled = false;
106#endif
107
123
124 bool resizingBackground = false;
130 QQuickFlickable *flickable = nullptr;
131};
132
133QT_END_NAMESPACE
134
135#endif // QQUICKTEXTAREA_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
static bool isKeyFocusReason(Qt::FocusReason reason)
static QString contentItemName()