File indexing completed on 2024-11-24 04:16:57

0001 /*
0002   SPDX-FileCopyrightText: 2022-2024 Laurent Montel <montel@kde.org>
0003 
0004   SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <TextTranslator/TranslatorEngineClient>
0010 
0011 class YandexEngineClient : public TextTranslator::TranslatorEngineClient
0012 {
0013     Q_OBJECT
0014     Q_PLUGIN_METADATA(IID "org.kde.Translator.yandex")
0015     Q_INTERFACES(TextTranslator::TranslatorEngineClient)
0016 public:
0017     explicit YandexEngineClient(QObject *parent = nullptr);
0018     ~YandexEngineClient() override;
0019 
0020     [[nodiscard]] QString name() const override;
0021     [[nodiscard]] QString translatedName() const override;
0022     [[nodiscard]] TextTranslator::TranslatorEnginePlugin *createTranslator() override;
0023     [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedFromLanguages() override;
0024     [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedToLanguages() override;
0025     [[nodiscard]] TextTranslator::TranslatorEngineClient::EngineType engineType() const override;
0026 
0027 protected:
0028     [[nodiscard]] bool isSupported(TextTranslator::TranslatorUtil::Language lang) const override;
0029 };