Files
2026-03-01 20:47:36 +03:00

38 lines
821 B
C++

// This is the source code of AyuGram for Desktop.
//
// We do not and cannot prevent the use of our code,
// but be respectful and credit the original author.
//
// Copyright @Radolyn, 2026
#pragma once
#include "ayu/features/translator/implementations/base.h"
#include <QtCore/QObject>
#include <QtCore/QPointer>
#include <QtCore/QSet>
#include <QtCore/QString>
namespace Ayu::Translator {
class GoogleTranslator final : public MultiThreadTranslator
{
Q_OBJECT
public:
static GoogleTranslator &instance();
// all languages
[[nodiscard]] QSet<QString> supportedLanguages() const override { return {}; }
[[nodiscard]] QPointer<QNetworkReply> startSingleTranslation(
const MultiThreadArgs &args
) override;
private:
explicit GoogleTranslator(QObject *parent = nullptr);
QNetworkAccessManager _nam;
};
}