9#include "texttranslator_export.h"
10#include <QNetworkReply>
13#include <TextTranslator/TranslatorUtil>
16namespace TextTranslator
18class TranslatorEnginePluginPrivate;
19class TEXTTRANSLATOR_EXPORT TranslatorEnginePlugin :
public QObject
23 explicit TranslatorEnginePlugin(
QObject *parent =
nullptr);
24 ~TranslatorEnginePlugin()
override;
26 virtual void translate() = 0;
28 [[nodiscard]]
QString resultTranslate()
const;
29 void setInputText(
const QString &text);
30 void setFrom(
const QString &language);
31 void setTo(
const QString &language);
32 void setResult(
const QString &result);
33 void setJsonDebug(
const QString &debug);
35 [[nodiscard]]
QString inputText()
const;
36 [[nodiscard]]
QString from()
const;
37 [[nodiscard]]
QString to()
const;
38 [[nodiscard]]
QString result()
const;
39 [[nodiscard]]
QString jsonDebug()
const;
45 void translateFailed(
const QString &errorMessage);
46 void languagesChanged();
49 void appendResult(
const QString &result);
51 [[nodiscard]]
bool verifyFromAndToLanguage();
52 [[nodiscard]]
bool hasDebug()
const;
54 [[nodiscard]]
virtual QString languageCode(
const QString &langStr);
57 std::unique_ptr<TranslatorEnginePluginPrivate>
const d;
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:56:02 by
doxygen 1.12.0 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.