digiKam
Loading...
Searching...
No Matches
searchmodificationhelper.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2000-12-05
7 * Description : helper class used to modify search albums in views
8 *
9 * SPDX-FileCopyrightText: 2009-2010 by Johannes Wienke <languitar at semipol dot de>
10 * SPDX-FileCopyrightText: 2014-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QObject>
21
22// Local includes
23
24#include "album.h"
25
26namespace Digikam
27{
28
29class SketchWidget;
30class ItemInfo;
31
35typedef QPair<QDateTime, QDateTime> DateRange;
36
40typedef QList<DateRange> DateRangeList;
41
48class SearchModificationHelper: public QObject
49{
50 Q_OBJECT
51
52public:
53
60 SearchModificationHelper(QObject* const parent, QWidget* const dialogParent);
61
66
71 SAlbum* createFuzzySearchFromSketch(const QString& name,
72 SketchWidget* sketchWidget,
73 unsigned int numberOfResults,
74 const QList<int>& targetAlbums,
75 bool overwriteIfExisting = false);
76
81 SAlbum* createFuzzySearchFromDropped(const QString& name,
82 const QString& filePath,
83 float threshold,
84 float maxThreshold,
85 const QList<int>& targetAlbums,
86 bool overwriteIfExisting = false);
87
92 SAlbum* createFuzzySearchFromImage(const QString& name,
93 const ItemInfo& image,
94 float threshold,
95 float maxThreshold,
96 const QList<int>& targetAlbums,
97 bool overwriteIfExisting = false);
98
99public Q_SLOTS:
100
106 void slotSearchDelete(SAlbum* searchAlbum);
107
113 void slotSearchRename(SAlbum* searchAlbum);
114
127 SAlbum* slotCreateTimeLineSearch(const QString& desiredName,
128 const DateRangeList& dateRanges,
129 bool overwriteIfExisting = false);
130
143 void slotCreateFuzzySearchFromSketch(const QString& name,
144 SketchWidget* sketchWidget,
145 unsigned int numberOfResults,
146 const QList<int>& targetAlbums,
147 bool overwriteIfExisting = false);
148
162 void slotCreateFuzzySearchFromImage(const QString& name,
163 const ItemInfo& image,
164 float threshold,
165 float maxThreshold,
166 const QList<int>& targetAlbums,
167 bool overwriteIfExisting = false);
168
183 void slotCreateFuzzySearchFromDropped(const QString& name,
184 const QString& filePath,
185 float threshold,
186 float maxThreshold,
187 const QList<int>& targetAlbums,
188 bool overwriteIfExisting);
189
190private:
191
192 bool checkAlbum(const QString& name) const;
193 bool checkName(QString& name);
194
195private:
196
197 class Private;
198 Private* const d = nullptr;
199};
200
201} // namespace Digikam
Definition iteminfo.h:68
Definition album.h:494
Definition searchmodificationhelper.h:49
void slotCreateFuzzySearchFromImage(const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:401
void slotSearchDelete(SAlbum *searchAlbum)
Definition searchmodificationhelper.cpp:62
~SearchModificationHelper() override
Definition searchmodificationhelper.cpp:57
SAlbum * createFuzzySearchFromDropped(const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:273
void slotCreateFuzzySearchFromDropped(const QString &name, const QString &filePath, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting)
Definition searchmodificationhelper.cpp:320
SAlbum * createFuzzySearchFromSketch(const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:209
SAlbum * createFuzzySearchFromImage(const QString &name, const ItemInfo &image, float threshold, float maxThreshold, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:335
SAlbum * slotCreateTimeLineSearch(const QString &desiredName, const DateRangeList &dateRanges, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:160
void slotCreateFuzzySearchFromSketch(const QString &name, SketchWidget *sketchWidget, unsigned int numberOfResults, const QList< int > &targetAlbums, bool overwriteIfExisting=false)
Definition searchmodificationhelper.cpp:260
void slotSearchRename(SAlbum *searchAlbum)
Definition searchmodificationhelper.cpp:131
Definition sketchwidget.h:28
Definition datefolderview.cpp:34
QList< DateRange > DateRangeList
Definition searchmodificationhelper.h:40
QPair< QDateTime, QDateTime > DateRange
Definition searchmodificationhelper.h:35