| 1 | // Copyright (C) 2024 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 QHELPCONTENTITEM_H |
| 5 | #define QHELPCONTENTITEM_H |
| 6 | |
| 7 | #include <QtHelp/qhelp_global.h> |
| 8 | |
| 9 | QT_BEGIN_NAMESPACE |
| 10 | |
| 11 | class QHelpContentItemPrivate; |
| 12 | class QString; |
| 13 | class QUrl; |
| 14 | |
| 15 | class QHELP_EXPORT QHelpContentItem final |
| 16 | { |
| 17 | Q_DISABLE_COPY_MOVE(QHelpContentItem) |
| 18 | public: |
| 19 | ~QHelpContentItem(); |
| 20 | |
| 21 | QHelpContentItem *child(int row) const; |
| 22 | int childCount() const; |
| 23 | QString title() const; |
| 24 | QUrl url() const; |
| 25 | int row() const; |
| 26 | QHelpContentItem *parent() const; |
| 27 | int childPosition(QHelpContentItem *child) const; |
| 28 | |
| 29 | private: |
| 30 | QHelpContentItem(const QString &name, const QUrl &link, QHelpContentItem *parent = nullptr); |
| 31 | |
| 32 | QHelpContentItemPrivate *d; |
| 33 | friend QHelpContentItem *createContentItem(const QString &, const QUrl &, QHelpContentItem *); |
| 34 | }; |
| 35 | |
| 36 | QT_END_NAMESPACE |
| 37 | |
| 38 | #endif // QHELPCONTENTITEM_H |
| 39 |
