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
link.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QDOC_IR_LINK_H
5#define QDOC_IR_LINK_H
6
7#include <QJsonObject>
8#include <QString>
9
10QT_BEGIN_NAMESPACE
11
12namespace IR {
13
14struct Link
15{
16 QString target; //! Pre-resolved URL or anchor
17 QString text; //! Display text for the link
18 QString title; //! Optional title/tooltip attribute
19
20 enum class State : unsigned char {
25 };
26
28
30
31 [[nodiscard]] QJsonObject toJson() const;
32
33 [[nodiscard]] bool isValid() const { return !target.isEmpty() || state == State::Unresolved; }
34 [[nodiscard]] bool isResolved() const { return state == State::Resolved; }
35 [[nodiscard]] bool isExternal() const { return state == State::External; }
36};
37
38} // namespace IR
39
40QT_END_NAMESPACE
41
42#endif // QDOC_IR_LINK_H
Definition builder.cpp:14
Combined button and popup list for selecting options.