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 : file list view and items 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_LIST_H 0017 #define DIGIKAM_TEXT_CONVERTER_LIST_H 0018 0019 // Local includes 0020 0021 #include "ditemslist.h" 0022 0023 using namespace Digikam; 0024 0025 namespace DigikamGenericTextConverterPlugin 0026 { 0027 0028 class TextConverterListViewItem : public DItemsListViewItem 0029 { 0030 0031 public: 0032 0033 explicit TextConverterListViewItem(DItemsListView* const view, const QUrl& url); 0034 ~TextConverterListViewItem(); 0035 0036 void setDestFileName(const QString& str); 0037 QString destFileName() const; 0038 0039 void setRecognizedWords(const QString& str); 0040 QString recognizedWords() const; 0041 0042 void setStatus(const QString& str); 0043 0044 private: 0045 0046 class Private; 0047 Private* const d; 0048 }; 0049 0050 // ------------------------------------------------------------------------- 0051 0052 class TextConverterList : public DItemsList 0053 { 0054 Q_OBJECT 0055 0056 public: 0057 0058 /** 0059 * List the different columns in a list. 0060 */ 0061 enum FieldType 0062 { 0063 RECOGNIZEDWORDS = DItemsListView::User1, 0064 TARGETFILENAME = DItemsListView::User2, 0065 STATUS = DItemsListView::User3, 0066 }; 0067 0068 public: 0069 0070 explicit TextConverterList(QWidget* const parent = nullptr); 0071 ~TextConverterList(); 0072 0073 public Q_SLOTS: 0074 0075 void slotAddImages(const QList<QUrl>& list) override; 0076 0077 protected Q_SLOTS: 0078 0079 void slotRemoveItems() override; 0080 }; 0081 0082 } // namespace DigikamGenericTextConverterPlugin 0083 0084 #endif // DIGIKAM_TEXT_CONVERTER_LIST_H