mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
38 lines
783 B
C++
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;
|
|
};
|
|
|
|
} |