File indexing completed on 2025-01-19 03:52:36

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2022-08-26
0007  * Description : Text converter plugin action descriptions
0008  *
0009  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2022      by Quoc Hung Tran <quochungtran1999 at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_TEXT_CONVERTER_ACTIONS_H
0017 #define DIGIKAM_TEXT_CONVERTER_ACTIONS_H
0018 
0019 // Qt includes
0020 
0021 #include <QImage>
0022 #include <QUrl>
0023 
0024 // Local includes
0025 
0026 #include "ocrtesseractengine.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamGenericTextConverterPlugin
0031 {
0032 
0033 enum TextConverterAction
0034 {
0035     NONE = 0,
0036     PROCESS
0037 };
0038 
0039 class TextConverterActionData
0040 {
0041 
0042 public:
0043 
0044     TextConverterActionData()
0045       : starting(false),
0046         result  (OcrTesseractEngine::PROCESS_COMPLETE),
0047         action  (NONE)
0048     {
0049     }
0050 
0051     bool                 starting;
0052     int                  result;
0053 
0054     QString              destPath;
0055     QString              message;
0056 
0057     QString              outputText;
0058 
0059     QImage               image;
0060 
0061     QUrl                 fileUrl;
0062 
0063     TextConverterAction  action;
0064 };
0065 
0066 }  // namespace DigikamGenericTextConverterPlugin
0067 
0068 Q_DECLARE_METATYPE(DigikamGenericTextConverterPlugin::TextConverterActionData)
0069 
0070 #endif /// DIGIKAM_TEXT_CONVERTER_ACTIONS_H