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
qquickmaterialplaceholdertext_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 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 QQUICKMATERIALPLACEHOLDERTEXT_P_H
5#define QQUICKMATERIALPLACEHOLDERTEXT_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 <QtCore/private/qglobal_p.h>
19#include <QtGui/qcolor.h>
20#include <QtQuickControls2Impl/private/qquickplaceholdertext_p.h>
21
22#include <QtCore/qpointer.h>
23
25
27
29{
31 Q_PROPERTY(bool filled READ isFilled WRITE setFilled NOTIFY filledChanged FINAL)
40 QML_NAMED_ELEMENT(FloatingPlaceholderText)
42
43public:
45
46 bool isFilled() const;
47 void setFilled(bool filled);
48
49 int largestHeight() const;
50
53
54 bool controlHasText() const;
56
59
62
65
73
75 void adjustTransformOrigin();
76
78 bool shouldFloat() const;
79 bool shouldAnimate() const;
80
81 void updateY();
82 qreal normalTargetY() const;
83 qreal floatingTargetY() const;
84
85 void controlGotActiveFocus();
86 void controlLostActiveFocus();
87
88 void maybeSetFocusAnimationProgress();
89
90 void componentComplete() override;
91
92 bool m_filled = false;
93 bool m_controlHasActiveFocus = false;
94 bool m_controlHasText = false;
95 int m_largestHeight = 0;
96 qreal m_verticalPadding = 0;
97 qreal m_controlImplicitBackgroundHeight = 0;
98 qreal m_controlHeight = 0;
99 QPointer<QParallelAnimationGroup> m_focusInAnimation;
100 QPointer<QParallelAnimationGroup> m_focusOutAnimation;
101};
102
104
105#endif // QQUICKMATERIALPLACEHOLDERTEXT_P_H
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
Definition qquickitem.h:67
void setControlImplicitBackgroundHeight(qreal controlImplicitBackgroundHeight)
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
void setControlHasActiveFocus(bool controlHasActiveFocus)
qreal y const
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define slots
#define signals
double qreal
Definition qtypes.h:187
#define explicit