Qt
6.x
The Qt SDK
Loading...
Searching...
No Matches
qtextmarkdownwriter_p.h
Go to the documentation of this file.
1
// Copyright (C) 2019 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 QTEXTMARKDOWNWRITER_P_H
5
#define QTEXTMARKDOWNWRITER_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 <QtCore/QTextStream>
20
21
#include "
qtextdocument_p.h
"
22
#include "
qtextdocumentwriter.h
"
23
24
QT_BEGIN_NAMESPACE
25
26
class
QAbstractItemModel
;
27
28
class
Q_GUI_EXPORT
QTextMarkdownWriter
29
{
30
public
:
31
QTextMarkdownWriter
(
QTextStream
&
stream
, QTextDocument::MarkdownFeatures features);
32
bool
writeAll(
const
QTextDocument
*document);
33
#if QT_CONFIG(itemmodel)
34
void
writeTable(
const
QAbstractItemModel
*
table
);
35
#endif
36
37
int
writeBlock(
const
QTextBlock
&block,
bool
table
,
bool
ignoreFormat,
bool
ignoreEmpty);
38
void
writeFrame(
const
QTextFrame
*
frame
);
39
40
private
:
41
struct
ListInfo {
42
bool
loose;
43
};
44
45
ListInfo listInfo(
QTextList
*
list
);
46
47
private
:
48
QTextStream
&m_stream;
49
QTextDocument::MarkdownFeatures m_features;
50
QMap<QTextList *, ListInfo>
m_listInfo;
51
QString
m_linePrefix;
52
QString
m_codeBlockFence;
53
int
m_wrappedLineIndent = 0;
54
int
m_lastListIndent = 1;
55
bool
m_doubleNewlineWritten =
false
;
56
bool
m_indentedCodeBlock =
false
;
57
bool
m_fencedCodeBlock =
false
;
58
};
59
60
QT_END_NAMESPACE
61
62
#endif
// QTEXTMARKDOWNWRITER_P_H
QAbstractItemModel
\inmodule QtCore
Definition
qabstractitemmodel.h:234
QMap
Definition
qmap.h:186
QString
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition
qstring.h:127
QTextBlock
\reentrant
Definition
qtextobject.h:157
QTextDocument
\reentrant \inmodule QtGui
Definition
qtextdocument.h:57
QTextFrame
\reentrant
Definition
qtextobject.h:81
QTextList
\reentrant
Definition
qtextlist.h:18
QTextMarkdownWriter
Definition
qtextmarkdownwriter_p.h:29
QTextStream
\inmodule QtCore
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1545
stream
EGLStreamKHR stream
Definition
qeglstreamconvenience_p.h:67
table
GLenum GLenum GLsizei void * table
Definition
qopenglext.h:2745
qtextdocument_p.h
qtextdocumentwriter.h
list
QList< int > list
[14]
Definition
src_concurrent_qtconcurrentfilter.cpp:140
frame
QFrame frame
[0]
Definition
src_gui_painting_qdrawutil.cpp:6
qtbase
src
gui
text
qtextmarkdownwriter_p.h
Generated by
1.9.7