MauiKit Image Tools

ocs.h
1#pragma once
2
3#include <QObject>
4#include <QUrl>
5#include <QRect>
6#include "image2text_export.h"
7
8namespace tesseract
9{
10class TessBaseAPI;
11}
12
13class OCRLanguageModel;
14
15class IMAGE2TEXT_EXPORT OCS : public QObject
16{
17 Q_OBJECT
18 Q_PROPERTY(QString filePath READ filePath WRITE setFilePath NOTIFY filePathChanged)
19 Q_PROPERTY(QRect area READ area WRITE setArea NOTIFY areaChanged)
20
21public:
22 explicit OCS(QObject *parent = nullptr);
23 ~OCS();
24
25 QString filePath() const;
26
27 QRect area() const;
28
29public Q_SLOTS:
30 QString getText();
31
32 void setFilePath(QString filePath);
33
34 void setArea(QRect area);
35
36private:
37 tesseract::TessBaseAPI *m_tesseract;
38 OCRLanguageModel *m_languages;
39
40 QString m_filePath;
41
42 QRect m_area;
43
45 void filePathChanged(QString filePath);
46 void areaChanged(QRect area);
47};
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:53:30 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.