summaryrefslogtreecommitdiffstats
path: root/src/qdoc/qdoc/src/qdoc/enumitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qdoc/qdoc/src/qdoc/enumitem.h')
-rw-r--r--src/qdoc/qdoc/src/qdoc/enumitem.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/qdoc/qdoc/src/qdoc/enumitem.h b/src/qdoc/qdoc/src/qdoc/enumitem.h
new file mode 100644
index 000000000..06e9d42a9
--- /dev/null
+++ b/src/qdoc/qdoc/src/qdoc/enumitem.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#ifndef ENUMITEM_H
+#define ENUMITEM_H
+
+#include <QtCore/qglobal.h>
+#include <QtCore/qstring.h>
+
+#include <utility>
+
+QT_BEGIN_NAMESPACE
+
+class EnumItem
+{
+public:
+ EnumItem() = default;
+ EnumItem(QString name, QString value, QString since = QString())
+ : m_name(std::move(name)),
+ m_value(std::move(value)),
+ m_since(std::move(since)) {}
+
+ [[nodiscard]] const QString &name() const { return m_name; }
+ [[nodiscard]] const QString &value() const { return m_value; }
+ [[nodiscard]] const QString &since() const { return m_since; }
+ void setSince(const QString &since) { m_since = since; }
+
+private:
+ QString m_name {};
+ QString m_value {};
+ QString m_since {};
+};
+
+QT_END_NAMESPACE
+
+#endif // ENUMITEM_H