ScreenTranslator/src/ocr/recognizer.h
Gres 0920ed1f40 Bundle multiple tesseract versions
Load them via C api and allow user to select which one to use.
2020-07-18 12:26:59 +03:00

32 lines
579 B
C++

#pragma once
#include "stfwd.h"
#include <QObject>
#include <deque>
class Recognizer : public QObject
{
Q_OBJECT
public:
Recognizer(Manager &manager, const Settings &settings);
~Recognizer();
void updateSettings();
void recognize(const TaskPtr &task);
signals:
void recognizeImpl(const TaskPtr &task);
void reset(const QString &tessdataPath, const QString &tesseractLibrary);
private:
void recognized(const TaskPtr &task);
void processQueue();
Manager &manager_;
const Settings &settings_;
QThread *workerThread_;
std::deque<TaskPtr> queue_;
};