feat(translate): add translation presets and custom instructions

This commit is contained in:
tri committed 2026-11-07 13:28:32 +07:00
1 parent cebce0915f
commit 18ba92a6e3
9 files changed
+172 -8

No files matched your search

+3
View File
@@ -8,6 +8,7 @@
#include <QObject>
#include <QStringList>
#include <QUrl>
#include <QVariantList>
#include <QVariantMap>
#include <QtQml/qqmlregistration.h>
@@ -28,6 +29,7 @@ class TranslationService : public QObject
Q_PROPERTY(QString statusText READ statusText NOTIFY statusTextChanged)
Q_PROPERTY(QString errorText READ errorText NOTIFY errorTextChanged)
Q_PROPERTY(QStringList availableModels READ availableModels NOTIFY availableModelsChanged)
Q_PROPERTY(QVariantList translationPresets READ translationPresets CONSTANT)
Q_PROPERTY(bool fetchingModels READ isFetchingModels NOTIFY fetchingModelsChanged)
public:
@@ -39,6 +41,7 @@ public:
QString statusText() const;
QString errorText() const;
QStringList availableModels() const;
QVariantList translationPresets() const;
bool isFetchingModels() const;
// \a track is an entry of MpvItem::subtitleTracks.