33 Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
34 Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged3 FINAL)
35 Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged3 FINAL)
36 Q_PROPERTY(QQuickItem *background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
37 Q_PROPERTY(QString placeholderText READ placeholderText WRITE setPlaceholderText NOTIFY placeholderTextChanged FINAL)
38 Q_PROPERTY(Qt::FocusReason focusReason READ focusReason WRITE setFocusReason NOTIFY focusReasonChanged FINAL)
40 Q_PROPERTY(
bool hovered READ isHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
41 Q_PROPERTY(
bool hoverEnabled READ isHoverEnabled WRITE setHoverEnabled RESET resetHoverEnabled NOTIFY hoverEnabledChanged FINAL REVISION(2, 1))
43 Q_PROPERTY(QColor placeholderTextColor READ placeholderTextColor WRITE setPlaceholderTextColor NOTIFY placeholderTextColorChanged FINAL REVISION(2, 5))
44 Q_PROPERTY(qreal implicitBackgroundWidth READ implicitBackgroundWidth NOTIFY implicitBackgroundWidthChanged FINAL REVISION(2, 5))
45 Q_PROPERTY(qreal implicitBackgroundHeight READ implicitBackgroundHeight NOTIFY implicitBackgroundHeightChanged FINAL REVISION(2, 5))
46 Q_PROPERTY(qreal topInset READ topInset WRITE setTopInset RESET resetTopInset NOTIFY topInsetChanged FINAL REVISION(2, 5))
47 Q_PROPERTY(qreal leftInset READ leftInset WRITE setLeftInset RESET resetLeftInset NOTIFY leftInsetChanged FINAL REVISION(2, 5))
48 Q_PROPERTY(qreal rightInset READ rightInset WRITE setRightInset RESET resetRightInset NOTIFY rightInsetChanged FINAL REVISION(2, 5))
49 Q_PROPERTY(qreal bottomInset READ bottomInset WRITE setBottomInset RESET resetBottomInset NOTIFY bottomInsetChanged FINAL REVISION(2, 5))
50 Q_CLASSINFO(
"DeferredPropertyNames",
"background")
51 QML_NAMED_ELEMENT(TextArea)
52 QML_ATTACHED(QQuickTextAreaAttached)
53 QML_ADDED_IN_VERSION(2, 0)
56 explicit QQuickTextArea(QQuickItem *parent =
nullptr);
59 static QQuickTextAreaAttached *qmlAttachedProperties(QObject *object);
62 void setFont(
const QFont &font);
64 QQuickItem *background()
const;
65 void setBackground(QQuickItem *background);
67 QString placeholderText()
const;
68 void setPlaceholderText(
const QString &text);
70 Qt::FocusReason focusReason()
const;
71 void setFocusReason(Qt::FocusReason reason);
73 bool contains(
const QPointF &point)
const override;
76 bool isHovered()
const;
77 void setHovered(
bool hovered);
79 bool isHoverEnabled()
const;
80 void setHoverEnabled(
bool enabled);
81 void resetHoverEnabled();
84 QColor placeholderTextColor()
const;
85 void setPlaceholderTextColor(
const QColor &color);
87 qreal implicitBackgroundWidth()
const;
88 qreal implicitBackgroundHeight()
const;
90 qreal topInset()
const;
91 void setTopInset(qreal inset);
94 qreal leftInset()
const;
95 void setLeftInset(qreal inset);
96 void resetLeftInset();
98 qreal rightInset()
const;
99 void setRightInset(qreal inset);
100 void resetRightInset();
102 qreal bottomInset()
const;
103 void setBottomInset(qreal inset);
104 void resetBottomInset();
108 void implicitWidthChanged3();
109 void implicitHeightChanged3();
110 void backgroundChanged();
111 void placeholderTextChanged();
112 void focusReasonChanged();
113 void pressAndHold(QQuickMouseEvent *event);
115 Q_REVISION(2, 1)
void pressed(QQuickMouseEvent *event);
116 Q_REVISION(2, 1)
void released(QQuickMouseEvent *event);
117 Q_REVISION(2, 1)
void hoveredChanged();
118 Q_REVISION(2, 1)
void hoverEnabledChanged();
120 Q_REVISION(2, 5)
void placeholderTextColorChanged();
121 Q_REVISION(2, 5)
void implicitBackgroundWidthChanged();
122 Q_REVISION(2, 5)
void implicitBackgroundHeightChanged();
123 Q_REVISION(2, 5)
void topInsetChanged();
124 Q_REVISION(2, 5)
void leftInsetChanged();
125 Q_REVISION(2, 5)
void rightInsetChanged();
126 Q_REVISION(2, 5)
void bottomInsetChanged();
129 friend struct QQuickPressHandler;
131 void classBegin() override;
132 void componentComplete() override;
134 void itemChange(ItemChange change,
const ItemChangeData &value) override;
135 void geometryChange(
const QRectF &newGeometry,
const QRectF &oldGeometry) override;
136 virtual void insetChange(
const QMarginsF &newInset,
const QMarginsF &oldInset);
138 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
140 void focusInEvent(QFocusEvent *event) override;
141 void focusOutEvent(QFocusEvent *event) override;
142#if QT_CONFIG(quicktemplates2_hover)
143 void hoverEnterEvent(QHoverEvent *event) override;
144 void hoverLeaveEvent(QHoverEvent *event) override;
146 void mousePressEvent(QMouseEvent *event) override;
147 void mouseMoveEvent(QMouseEvent *event) override;
148 void mouseReleaseEvent(QMouseEvent *event) override;
149 void mouseDoubleClickEvent(QMouseEvent *event) override;
150 void timerEvent(QTimerEvent *event) override;
153 Q_DISABLE_COPY(QQuickTextArea)
154 Q_DECLARE_PRIVATE(QQuickTextArea)