ScreenTranslator/src/task.h

30 lines
494 B
C
Raw Normal View History

2020-02-21 00:45:53 +07:00
#pragma once
#include "stfwd.h"
#include <QPixmap>
class Task
{
public:
bool isNull() const { return captured.isNull() && !sourceLanguage.isEmpty(); }
bool isValid() const { return error.isEmpty(); }
QPoint capturePoint;
QPixmap captured;
QString recognized;
QString corrected;
2020-03-06 00:47:38 +07:00
QString translated;
2020-02-21 00:45:53 +07:00
2020-03-06 00:47:38 +07:00
LanguageId sourceLanguage;
LanguageId targetLanguage;
2020-02-21 00:45:53 +07:00
2020-03-06 00:47:38 +07:00
QStringList translators;
2020-02-21 00:45:53 +07:00
QString error;
};
using TaskPtr = std::shared_ptr<Task>;
Q_DECLARE_METATYPE(TaskPtr);