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
injabridge.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 INJABRIDGE_H
5#define INJABRIDGE_H
6
7#include <inja/inja.hpp>
8
9#include <QJsonObject>
10#include <QJsonArray>
11#include <QJsonValue>
12#include <QString>
13
14QT_BEGIN_NAMESPACE
15
16class InjaBridge
17{
18public:
19 static nlohmann::json toInjaJson(const QJsonValue &value);
20 static nlohmann::json toInjaJson(const QJsonObject &obj);
21 static nlohmann::json toInjaJson(const QJsonArray &array);
22
23 static QString render(const QString &templateStr, const QJsonObject &data);
24 static QString renderFile(const QString &templatePath, const QJsonObject &data);
25
26private:
27 InjaBridge() = default;
28};
29
31
32#endif // INJABRIDGE_H
Combined button and popup list for selecting options.