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 QTEXTLIST_H
5#define QTEXTLIST_H
6
7#include <QtGui/qtguiglobal.h>
8#include <QtGui/qtextobject.h>
9#include <QtCore/qobject.h>
10
11QT_BEGIN_NAMESPACE
12
13
14class QTextListPrivate;
15class QTextCursor;
16
17class Q_GUI_EXPORT QTextList : public QTextBlockGroup
18{
19 Q_OBJECT
20public:
21 explicit QTextList(QTextDocument *doc);
22 ~QTextList();
23
24 int count() const;
25
26 QTextBlock item(int i) const;
27
28 int itemNumber(const QTextBlock &) const;
29 QString itemText(const QTextBlock &) const;
30
31 void removeItem(int i);
32 void remove(const QTextBlock &);
33
34 void add(const QTextBlock &block);
35
36 inline void setFormat(const QTextListFormat &format);
37 QTextListFormat format() const { return QTextObject::format().toListFormat(); }
38
39private:
40 Q_DISABLE_COPY(QTextList)
41 Q_DECLARE_PRIVATE(QTextList)
42};
43
44inline void QTextList::setFormat(const QTextListFormat &aformat)
45{ QTextObject::setFormat(aformat); }
46
47QT_END_NAMESPACE
48
49#endif // QTEXTLIST_H
50

source code of qtbase/src/gui/text/qtextlist.h