Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qtexttable_p.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_P_H
5#define QTEXTTABLE_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 <QtGui/private/qtguiglobal_p.h>
19#include "private/qtextobject_p.h"
20#include "private/qtextdocument_p.h"
21
22#include <vector>
23
24QT_BEGIN_NAMESPACE
25
26class QTextTablePrivate : public QTextFramePrivate
27{
28 Q_DECLARE_PUBLIC(QTextTable)
29public:
30 QTextTablePrivate(QTextDocument *document) : QTextFramePrivate(document), nRows(0), nCols(0), dirty(true), blockFragmentUpdates(false) {}
31
32 static QTextTable *createTable(QTextDocumentPrivate *, int pos, int rows, int cols, const QTextTableFormat &tableFormat);
33 void fragmentAdded(QChar type, uint fragment) override;
34 void fragmentRemoved(QChar type, uint fragment) override;
35
36 void update() const;
37
38 int findCellIndex(int fragment) const;
39
40 QList<int> cells;
41 // symmetric to cells array and maps to indecs in grid,
42 // used for fast-lookup for row/column by fragment
43 mutable QList<int> cellIndices;
44 mutable std::vector<int> grid;
45 mutable int nRows;
46 mutable int nCols;
47 mutable bool dirty;
48 bool blockFragmentUpdates;
49};
50
51QT_END_NAMESPACE
52
53#endif // QTEXTTABLE_P_H
void insert(QTextCursor &cursor) const
QTextDocumentFragmentPrivate(const QTextCursor &cursor=QTextCursor())
QTextHtmlImporter(QTextDocument *_doc, const QString &html, ImportMode mode, const QTextDocument *resourceProvider=nullptr)
\reentrant
Definition qtexttable.h:19
\reentrant
Definition qtexttable.h:63
Combined button and popup list for selecting options.
@ AdjustDown
@ AdjustNext
@ AdjustPrev
@ AdjustUp
static void getText(QString &text, QTextDocumentPrivate *priv, const QString &docText, int pos, int end)
static void setBlockCharFormatHelper(QTextDocumentPrivate *priv, int pos1, int pos2, const QTextCharFormat &format, QTextDocumentPrivate::FormatChangeMode changeMode)
#define QTextBeginningOfFrame
#define QTextEndOfFrame
Q_DECLARE_TYPEINFO(QTextHtmlImporter::Table, Q_RELOCATABLE_TYPE)
Q_DECLARE_TYPEINFO(QTextHtmlImporter::TableCellIterator, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QTextHtmlImporter::RowColSpanInfo, Q_PRIMITIVE_TYPE)
Q_DECLARE_TYPEINFO(QTextHtmlImporter::List, Q_RELOCATABLE_TYPE)