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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2022-08-26
0007  * Description : OCR settings widgets
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_SETTINGS_H
0017 #define DIGIKAM_TEXT_CONVERTER_SETTINGS_H
0018 
0019 // Qt includes
0020 
0021 #include <QWidget>
0022 #include <QString>
0023 #include <QStringList>
0024 
0025 // Local includes
0026 
0027 #include "ocroptions.h"
0028 
0029 namespace DigikamGenericTextConverterPlugin
0030 {
0031 
0032 class TextConverterSettings : public QWidget
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037 
0038     explicit TextConverterSettings(QWidget* const parent = nullptr);
0039     ~TextConverterSettings() override;
0040 
0041     OcrOptions ocrOptions() const;
0042     void setOcrOptions(const OcrOptions& opt);
0043 
0044     void readSettings();
0045     void saveSettings();
0046 
0047     void setDefaultSettings();
0048 
0049     void populateLanguagesMode(const QStringList& langs);
0050 
0051 Q_SIGNALS:
0052 
0053     void signalSettingsChanged();
0054 
0055 private Q_SLOTS:
0056 
0057     void slotLocalizeChanged();
0058 
0059 private:
0060 
0061     class Private;
0062     Private* const d;
0063 };
0064 
0065 } // namespace DigikamGenericTextConverterPlugin
0066 
0067 #endif // DIGIKAM_TEXT_CONVERTER_SETTINGS_H