Files
AyuGramDesktop/Telegram/SourceFiles/ayu/features/translator/implementations/google.h
T
2026-02-19 16:37:30 +03:00

38 lines
783 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 <QtCore/QObject>
#include <QtCore/QPointer>
#include <QtCore/QSet>
#include <QtCore/QString>
#include "./base.h"
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;
};
}