Warning, file /utilities/skanpage/src/OCREngine.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /**
0002  * SPDX-FileCopyrightText: 2022 by Alexander Stippich <a.stippich@gmx.net>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 #ifndef OCR_ENGINE_H
0008 #define OCR_ENGINE_H
0009 
0010 #include "SkanpageUtils.h"
0011 
0012 #include <QObject>
0013 #include <QPainter>
0014 
0015 #include <memory>
0016 
0017 class OCREnginePrivate;
0018 class QPainter;
0019 class QPdfWriter;
0020 class OCRLanguageModel;
0021 
0022 class OCREngine : public QObject
0023 {
0024 public:
0025     explicit OCREngine(QObject *parent = nullptr);
0026     ~OCREngine();
0027 
0028     void InitForOCR();
0029 
0030     bool available() const;
0031 
0032     OCRLanguageModel *languages() const;
0033 
0034     void OCRPage(QPdfWriter &writer, QPainter &painter, const SkanpageUtils::PageProperties &page);
0035 
0036     void setColor(QColor color);
0037 
0038 private:
0039     std::unique_ptr<OCREnginePrivate> d;
0040 };
0041 
0042 #endif // #define OCR_ENGINE_H