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
qquickclippedtext.cpp
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
5
6#include <QtQuick/private/qquickitem_p.h>
7
9
14
16{
17 return m_clipX;
18}
19
21{
22 if (qFuzzyCompare(x, m_clipX))
23 return;
24
25 m_clipX = x;
26 markClipDirty();
27}
28
30{
31 return m_clipY;
32}
33
35{
36 if (qFuzzyCompare(y, m_clipY))
37 return;
38
39 m_clipY = y;
40 markClipDirty();
41}
42
44{
45 return m_clipWidth ? m_clipWidth : width();
46}
47
49{
50 m_hasClipWidth = true;
51 if (qFuzzyCompare(width, m_clipWidth))
52 return;
53
54 m_clipWidth = width;
55 markClipDirty();
56}
57
59{
60 return m_clipHeight ? m_clipHeight : height();
61}
62
64{
65 m_hasClipHeight = true;
66 if (qFuzzyCompare(height, m_clipHeight))
67 return;
68
69 m_clipHeight = height;
70 markClipDirty();
71}
72
77
78void QQuickClippedText::markClipDirty()
79{
81}
82
84
85#include "moc_qquickclippedtext_p.cpp"
QRectF clipRect() const override
Returns the rectangular area within this item that is currently visible in \l viewportItem(),...
void setClipWidth(qreal width)
void setClipHeight(qreal height)
QQuickClippedText(QQuickItem *parent=nullptr)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
Definition qquickitem.h:72
qreal y
Defines the item's y position relative to its parent.
Definition qquickitem.h:73
qreal width
This property holds the width of this item.
Definition qquickitem.h:75
qreal height
This property holds the height of this item.
Definition qquickitem.h:76
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:333
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLint GLsizei width
GLint y
double qreal
Definition qtypes.h:187