1// Copyright (C) 2021 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 ENUMITEM_H
5#define ENUMITEM_H
6
7#include <QtCore/qglobal.h>
8#include <QtCore/qstring.h>
9
10#include <utility>
11
12QT_BEGIN_NAMESPACE
13
14class EnumItem
15{
16public:
17 EnumItem() = default;
18 EnumItem(QString name, QString value, QString since = QString())
19 : m_name(std::move(name)),
20 m_value(std::move(value)),
21 m_since(std::move(since)) {}
22
23 [[nodiscard]] const QString &name() const { return m_name; }
24 [[nodiscard]] const QString &value() const { return m_value; }
25 [[nodiscard]] const QString &since() const { return m_since; }
26 void setSince(const QString &since) { m_since = since; }
27
28private:
29 QString m_name {};
30 QString m_value {};
31 QString m_since {};
32};
33
34QT_END_NAMESPACE
35
36#endif // ENUMITEM_H
37

source code of qttools/src/qdoc/qdoc/enumitem.h