KTextAddons

lingvaengineclient.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>
10
11class LingvaEngineClient : public TextTranslator::TranslatorEngineClient
12{
14 Q_PLUGIN_METADATA(IID "org.kde.Translator.lingva")
15 Q_INTERFACES(TextTranslator::TranslatorEngineClient)
16public:
17 explicit LingvaEngineClient(QObject *parent = nullptr);
18 ~LingvaEngineClient() override;
19
20 [[nodiscard]] QString name() const override;
21 [[nodiscard]] QString translatedName() const override;
22 [[nodiscard]] TextTranslator::TranslatorEnginePlugin *createTranslator() override;
23 [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedFromLanguages() override;
24 [[nodiscard]] QMap<TextTranslator::TranslatorUtil::Language, QString> supportedToLanguages() override;
25
26 [[nodiscard]] bool hasConfigurationDialog() const override;
27 [[nodiscard]] bool showConfigureDialog(QWidget *parentWidget) override;
28 [[nodiscard]] TextTranslator::TranslatorEngineClient::EngineType engineType() const override;
29
30protected:
31 [[nodiscard]] bool isSupported(TextTranslator::TranslatorUtil::Language lang) const override;
32};
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 29 2024 11:47:38 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.