KTextAddons

deeplengineclient.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/TranslatorEngineClient>
10namespace QKeychain
11{
12class Job;
13}
14class DeeplEngineClient : public TextTranslator::TranslatorEngineClient
15{
17 Q_PLUGIN_METADATA(IID "org.kde.Translator.deepl")
18 Q_INTERFACES(TextTranslator::TranslatorEngineClient)
19public:
20 explicit DeeplEngineClient(QObject *parent = nullptr);
21 ~DeeplEngineClient() override;
22
23 [[nodiscard]] QString name() const override;
24 [[nodiscard]] QString translatedName() const override;
25 [[nodiscard]] TextTranslator::TranslatorEnginePlugin *createTranslator() override;
26 [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedFromLanguages() override;
27 [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedToLanguages() override;
28
29 [[nodiscard]] bool hasConfigurationDialog() const override;
30 [[nodiscard]] bool showConfigureDialog(QWidget *parentWidget) override;
31
32 [[nodiscard]] TextTranslator::TranslatorEngineClient::EngineType engineType() const override;
33
34protected:
35 [[nodiscard]] bool isSupported(TextTranslator::TranslatorUtil::Language lang) const override;
36
37private:
38 void slotPasswordWritten(QKeychain::Job *baseJob);
39};
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.