Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qtexttable.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
QTEXTTABLE_H
5
#
define
QTEXTTABLE_H
6
7
#
include
<
QtGui
/
qtguiglobal
.
h
>
8
#
include
<
QtCore
/
qobject
.
h
>
9
#
include
<
QtGui
/
qtextobject
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
14
class
QTextCursor;
15
class
QTextTable;
16
class
QTextTablePrivate;
17
18
class
Q_GUI_EXPORT
QTextTableCell
19
{
20
public
:
21
QTextTableCell() : table(
nullptr
) {}
22
~QTextTableCell() {}
23
QTextTableCell(
const
QTextTableCell &o) : table(o.table), fragment(o.fragment) {}
24
QTextTableCell &operator=(
const
QTextTableCell &o)
25
{ table = o.table; fragment = o.fragment;
return
*
this
; }
26
27
void
setFormat(
const
QTextCharFormat &format);
28
QTextCharFormat format()
const
;
29
30
int
row()
const
;
31
int
column()
const
;
32
33
int
rowSpan()
const
;
34
int
columnSpan()
const
;
35
36
inline
bool
isValid()
const
{
return
table !=
nullptr
; }
37
38
QTextCursor firstCursorPosition()
const
;
39
QTextCursor lastCursorPosition()
const
;
40
int
firstPosition()
const
;
41
int
lastPosition()
const
;
42
43
inline
bool
operator==(
const
QTextTableCell &other)
const
44
{
return
table == other.table && fragment == other.fragment; }
45
inline
bool
operator!=(
const
QTextTableCell &other)
const
46
{
return
!operator==(other); }
47
48
QTextFrame::iterator begin()
const
;
49
QTextFrame::iterator end()
const
;
50
51
int
tableCellFormatIndex()
const
;
52
53
private
:
54
friend
class
QTextTable;
55
QTextTableCell(
const
QTextTable *t,
int
f)
56
: table(t), fragment(f) {}
57
58
const
QTextTable *table;
59
int
fragment;
60
};
61
62
class
Q_GUI_EXPORT
QTextTable
:
public
QTextFrame
63
{
64
Q_OBJECT
65
public
:
66
explicit
QTextTable(QTextDocument *doc);
67
~QTextTable();
68
69
void
resize(
int
rows,
int
cols);
70
void
insertRows(
int
pos,
int
num);
71
void
insertColumns(
int
pos,
int
num);
72
void
appendRows(
int
count);
73
void
appendColumns(
int
count);
74
void
removeRows(
int
pos,
int
num);
75
void
removeColumns(
int
pos,
int
num);
76
77
void
mergeCells(
int
row,
int
col,
int
numRows,
int
numCols);
78
void
mergeCells(
const
QTextCursor &cursor);
79
void
splitCell(
int
row,
int
col,
int
numRows,
int
numCols);
80
81
int
rows()
const
;
82
int
columns()
const
;
83
84
QTextTableCell cellAt(
int
row,
int
col)
const
;
85
QTextTableCell cellAt(
int
position)
const
;
86
QTextTableCell cellAt(
const
QTextCursor &c)
const
;
87
88
QTextCursor rowStart(
const
QTextCursor &c)
const
;
89
QTextCursor rowEnd(
const
QTextCursor &c)
const
;
90
91
void
setFormat(
const
QTextTableFormat &format);
92
QTextTableFormat format()
const
{
return
QTextObject::format().toTableFormat(); }
93
94
private
:
95
Q_DISABLE_COPY(QTextTable)
96
Q_DECLARE_PRIVATE(QTextTable)
97
friend
class
QTextTableCell;
98
};
99
100
QT_END_NAMESPACE
101
102
#
endif
// QTEXTTABLE_H
QTextCopyHelper
Definition
qtextdocumentfragment_p.h:35
QTextCopyHelper::copy
void copy()
Definition
qtextdocumentfragment.cpp:127
QTextCursorPrivate
Definition
qtextcursor_p.h:28
QTextDocumentFragmentPrivate
Definition
qtextdocumentfragment_p.h:64
QTextDocumentFragmentPrivate::importedFromPlainText
uint importedFromPlainText
Definition
qtextdocumentfragment_p.h:74
QTextDocumentFragmentPrivate::~QTextDocumentFragmentPrivate
~QTextDocumentFragmentPrivate()
Definition
qtextdocumentfragment_p.h:67
QTextDocumentFragmentPrivate::insert
void insert(QTextCursor &cursor) const
Definition
qtextdocumentfragment.cpp:210
QTextDocumentFragmentPrivate::ref
QAtomicInt ref
Definition
qtextdocumentfragment_p.h:71
QTextDocumentFragmentPrivate::QTextDocumentFragmentPrivate
QTextDocumentFragmentPrivate(const QTextCursor &cursor=QTextCursor())
Definition
qtextdocumentfragment.cpp:192
QTextDocumentFragmentPrivate::doc
QTextDocument * doc
Definition
qtextdocumentfragment_p.h:72
QTextDocumentFragment
\reentrant
Definition
qtextdocumentfragment.h:19
QTextFragmentData
Definition
qtextdocument_p.h:59
QTextFragmentData::stringPosition
int stringPosition
Definition
qtextdocument_p.h:64
QTextHtmlImporter
Definition
qtextdocumentfragment_p.h:82
QTextHtmlImporter::QTextHtmlImporter
QTextHtmlImporter(QTextDocument *_doc, const QString &html, ImportMode mode, const QTextDocument *resourceProvider=nullptr)
Definition
qtextdocumentfragment.cpp:433
QTextHtmlImporter::import
void import()
Definition
qtextdocumentfragment.cpp:461
QTextHtmlImporter::ImportMode
ImportMode
Definition
qtextdocumentfragment_p.h:85
QTextHtmlImporter::ImportToDocument
@ ImportToDocument
Definition
qtextdocumentfragment_p.h:87
QTextHtmlImporter::ImportToFragment
@ ImportToFragment
Definition
qtextdocumentfragment_p.h:86
QTextTableCell
\reentrant
Definition
qtexttable.h:19
QTextTable
\reentrant
Definition
qtexttable.h:63
QTypeInfo< A >
[50]
Definition
src_corelib_global_qglobal.cpp:535
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
getText
static void getText(QString &text, QTextDocumentPrivate *priv, const QString &docText, int pos, int end)
Definition
qtextcursor.cpp:1709
setBlockCharFormatHelper
static void setBlockCharFormatHelper(QTextDocumentPrivate *priv, int pos1, int pos2, const QTextCharFormat &format, QTextDocumentPrivate::FormatChangeMode changeMode)
Definition
qtextcursor.cpp:687
AdjustDown
@ AdjustDown
Definition
qtextcursor.cpp:25
AdjustNext
@ AdjustNext
Definition
qtextcursor.cpp:24
AdjustPrev
@ AdjustPrev
Definition
qtextcursor.cpp:22
AdjustUp
@ AdjustUp
Definition
qtextcursor.cpp:23
QTextBeginningOfFrame
#define QTextBeginningOfFrame
Definition
qtextdocument_p.h:55
QTextEndOfFrame
#define QTextEndOfFrame
Definition
qtextdocument_p.h:56
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QTextHtmlImporter::Table, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QTextHtmlImporter::TableCellIterator, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QTextHtmlImporter::RowColSpanInfo, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO
Q_DECLARE_TYPEINFO(QTextHtmlImporter::List, Q_RELOCATABLE_TYPE)
qtbase
src
gui
text
qtexttable.h
Generated on
for Qt by
1.18.0