KTextAddons

bingengineplugin.h
1/*
2 SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <TextTranslator/TranslatorEnginePlugin>
10
11class BingEnginePlugin : public TextTranslator::TranslatorEnginePlugin
12{
14public:
15 explicit BingEnginePlugin(QObject *parent = nullptr);
16 ~BingEnginePlugin() override;
17
18 void translate() override;
19
20 [[nodiscard]] QString languageCode(const QString &langStr) override;
21
22private:
23 void parseCredentials(QNetworkReply *reply);
24 void translateText();
25 void parseTranslation(QNetworkReply *reply);
26 static QByteArray sBingKey;
27 static QByteArray sBingToken;
28 static QString sBingIg;
29 static QString sBingIid;
30};
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.