File indexing completed on 2025-01-19 03:50:43

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-12-05
0007  * Description : Side Bar Widget for the fuzzy search.
0008  *
0009  * SPDX-FileCopyrightText: 2009-2010 by Johannes Wienke <languitar at semipol dot de>
0010  * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2014      by Mohamed_Anwer <m_dot_anwer at gmx dot com>
0012  * SPDX-FileCopyrightText: 2010      by Aditya Bhatt <adityabhatt1991 at gmail dot com>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef DIGIKAM_FUZZY_SEARCH_SIDE_BAR_WIDGET_H
0019 #define DIGIKAM_FUZZY_SEARCH_SIDE_BAR_WIDGET_H
0020 
0021 // Local includes
0022 
0023 #include "digikam_config.h"
0024 #include "albummodel.h"
0025 #include "searchmodificationhelper.h"
0026 #include "sidebarwidget.h"
0027 
0028 namespace Digikam
0029 {
0030 
0031 class FuzzySearchSideBarWidget : public SidebarWidget
0032 {
0033     Q_OBJECT
0034 
0035 public:
0036 
0037     explicit FuzzySearchSideBarWidget(QWidget* const parent,
0038                                       SearchModel* const searchModel,
0039                                       SearchModificationHelper* const searchModificationHelper);
0040     ~FuzzySearchSideBarWidget() override;
0041 
0042     void          setActive(bool active)                             override;
0043     void          doLoadState()                                      override;
0044     void          doSaveState()                                      override;
0045     void          applySettings()                                    override;
0046     void          changeAlbumFromHistory(const QList<Album*>& album) override;
0047     const QIcon   getIcon()                                          override;
0048     const QString getCaption()                                       override;
0049 
0050     void newDuplicatesSearch(const QList<PAlbum*>& albums);
0051     void newDuplicatesSearch(const QList<TAlbum*>& albums);
0052     void newSimilarSearch(const ItemInfo& imageInfo);
0053 
0054 Q_SIGNALS:
0055 
0056     void signalActive(bool);
0057 
0058 private:
0059 
0060     class Private;
0061     Private* const d;
0062 };
0063 
0064 } // namespace Digikam
0065 
0066 #endif // DIGIKAM_FUZZY_SEARCH_SIDE_BAR_WIDGET_H