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
qquicktextselection_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 QQUICKTEXTSELECTION_H
5
#define QQUICKTEXTSELECTION_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 <private/qtquickglobal_p.h>
19
20
#include <QtQuick/qquicktextdocument.h>
21
22
#include <QtQml/qqml.h>
23
24
#include <QtGui/qtextcursor.h>
25
26
QT_BEGIN_NAMESPACE
27
28
class
QFont
;
29
class
QQuickTextControl
;
30
31
class
Q_QUICK_EXPORT
QQuickTextSelection
:
public
QObject
32
{
33
Q_OBJECT
34
35
Q_PROPERTY
(
QString
text
READ
text
WRITE
setText
NOTIFY
textChanged
FINAL)
36
Q_PROPERTY
(
QFont
font
READ
font
WRITE setFont NOTIFY fontChanged FINAL)
37
Q_PROPERTY
(
QColor
color
READ
color
WRITE
setColor
NOTIFY
colorChanged
FINAL)
38
Q_PROPERTY
(
Qt
::Alignment
alignment
READ
alignment
WRITE
setAlignment
NOTIFY alignmentChanged FINAL)
39
40
QML_ANONYMOUS
41
QML_ADDED_IN_VERSION
(6, 7)
42
43
public:
44
explicit
QQuickTextSelection
(
QObject
*parent =
nullptr
);
45
46
QString
text
() const;
47
void
setText
(const
QString
&
text
);
48
49
QFont
font
() const;
50
void
setFont(const
QFont
&
font
);
51
52
QColor
color
() const;
53
void
setColor
(
QColor
color
);
54
55
Qt
::Alignment
alignment
() const;
56
void
setAlignment
(
Qt
::Alignment align);
57
58
Q_SIGNALS
:
59
void
textChanged
();
60
void
fontChanged();
61
void
colorChanged
();
62
void
alignmentChanged();
63
64
private
:
65
QTextCursor
cursor
() const;
66
void
updateFromCharFormat(const
QTextCharFormat
&
fmt
);
67
void
updateFromBlockFormat();
68
69
private
:
70
QTextCursor
m_cursor;
71
QTextCharFormat
m_charFormat;
72
QTextBlockFormat
m_blockFormat;
73
QQuickTextControl
*m_control =
nullptr
;
74
};
75
76
QT_END_NAMESPACE
77
78
QML_DECLARE_TYPE
(
QQuickTextSelection
)
79
80
#endif
// QQUICKTEXTSELECTION_H
QColor
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition
qcolor.h:31
QFont
\reentrant
Definition
qfont.h:22
QObject
\inmodule QtCore
Definition
qobject.h:103
QQuickTextControl
Definition
qquicktextcontrol_p.h:41
QQuickTextSelection
Definition
qquicktextselection_p.h:32
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:129
QTextBlockFormat
\reentrant
Definition
qtextformat.h:607
QTextCharFormat
\reentrant
Definition
qtextformat.h:383
QTextCursor
\reentrant \inmodule QtGui
Definition
qtextcursor.h:30
text
QString text
Definition
doc_src_properties.cpp:105
colorChanged
void colorChanged()
cursor
QCursor cursor
Definition
doc_src_properties.cpp:25
textChanged
void textChanged(const QString &newText)
alignment
uint alignment
Definition
doc_src_styles.cpp:74
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
Qt
Definition
qcompare.h:63
color
GLuint color
[2]
Definition
qopengles2ext.h:1140
QML_DECLARE_TYPE
#define QML_DECLARE_TYPE(TYPE)
Definition
qqml.h:19
QML_ANONYMOUS
#define QML_ANONYMOUS
Definition
qqmlintegration.h:49
QML_ADDED_IN_VERSION
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
Definition
qqmlintegration.h:100
Q_PROPERTY
#define Q_PROPERTY(...)
Definition
qtmetamacros.h:56
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
fmt
QVideoFrameFormat::PixelFormat fmt
Definition
qv4l2camera.cpp:21
explicit
#define explicit
Definition
qxcbconnection.cpp:33
setAlignment
label setAlignment(Qt::AlignLeft|Qt::AlignTop)
[0]
font
QFont font
Definition
src_gui_dialogs_qfontdialog.cpp:6
setColor
myFilter setColor(QColor(128, 0, 0))
setText
insertRed setText("insert red text")
private
#define private
Definition
vsp2hardwarelayerintegration.cpp:7
qtdeclarative
src
quick
util
qquicktextselection_p.h
Generated by
1.10.0