digiKam
fuzzysearchview_p.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 : 2008-05-19
7  * Description : Fuzzy search sidebar tab contents - private container.
8  *
9  * Copyright (C) 2016-2018 by Mario Frank <mario dot frank at uni minus potsdam dot de>
10  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2008-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12  * Copyright (C) 2012 by Andi Clemens <andi dot clemens at gmail dot com>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_FUZZY_SEARCH_VIEW_P_H
28 #define DIGIKAM_FUZZY_SEARCH_VIEW_P_H
29 
30 #include "fuzzysearchview.h"
31 
32 // Qt includes
33 
34 #include <QFrame>
35 #include <QImage>
36 #include <QLabel>
37 #include <QLayout>
38 #include <QPushButton>
39 #include <QSpinBox>
40 #include <QTime>
41 #include <QTimer>
42 #include <QToolButton>
43 #include <QApplication>
44 #include <QStyle>
45 #include <QLineEdit>
46 #include <QIcon>
47 #include <QMessageBox>
48 
49 // KDE includes
50 
51 #include <klocalizedstring.h>
52 #include <kconfiggroup.h>
53 
54 // Local includes
55 
56 #include "dlayoutbox.h"
57 #include "digikam_debug.h"
58 #include "album.h"
59 #include "coredb.h"
60 #include "coredbalbuminfo.h"
61 #include "albummanager.h"
62 #include "albummodel.h"
63 #include "albumselectors.h"
64 #include "searchtreeview.h"
65 #include "coredbaccess.h"
66 #include "ddragobjects.h"
67 #include "editablesearchtreeview.h"
68 #include "findduplicatesview.h"
69 #include "haariface.h"
70 #include "iteminfo.h"
71 #include "itemlister.h"
73 #include "searchtextbardb.h"
74 #include "coredbsearchxml.h"
75 #include "sketchwidget.h"
76 #include "thumbnailloadthread.h"
77 #include "thumbnailsize.h"
78 #include "dhuesaturationselect.h"
79 #include "dcolorvalueselector.h"
80 #include "dexpanderbox.h"
81 #include "applicationsettings.h"
82 #include "drangebox.h"
83 #include "similaritydbaccess.h"
84 #include "similaritydb.h"
85 #include "dnotificationwidget.h"
86 
87 namespace Digikam
88 {
89 
90 class Q_DECL_HIDDEN FuzzySearchView::Private
91 {
92 
93 public:
94 
96  {
97  DUPLICATES = 0,
99  SKETCH
100  };
101 
102 public:
103 
104  explicit Private()
105  : configTabEntry (QLatin1String("FuzzySearch Tab")),
106  configPenSketchSizeEntry (QLatin1String("Pen Sketch Size")),
107  configResultSketchItemsEntry (QLatin1String("Result Sketch items")),
108  configPenSketchHueEntry (QLatin1String("Pen Sketch Hue")),
109  configPenSketchSaturationEntry (QLatin1String("Pen Sketch Saturation")),
110  configPenSkethValueEntry (QLatin1String("Pen Sketch Value")),
111  configSimilarsThresholdEntry (QLatin1String("Similars Threshold")),
112  configSimilarsMaxThresholdEntry (QLatin1String("Similars Maximum Threshold")),
113  active (false),
114  fingerprintsChecked (false),
115  resetButton (nullptr),
116  saveBtnSketch (nullptr),
117  undoBtnSketch (nullptr),
118  redoBtnSketch (nullptr),
119  saveBtnImage (nullptr),
120  penSize (nullptr),
121  resultsSketch (nullptr),
122  similarityRange (nullptr),
123  imageWidget (nullptr),
124  timerSketch (nullptr),
125  timerImage (nullptr),
126  folderView (nullptr),
127  nameEditSketch (nullptr),
128  nameEditImage (nullptr),
129  tabWidget (nullptr),
130  hsSelector (nullptr),
131  vSelector (nullptr),
132  labelFile (nullptr),
133  labelFolder (nullptr),
134  searchFuzzyBar (nullptr),
135  searchTreeView (nullptr),
136  sketchWidget (nullptr),
137  thumbLoadThread (nullptr),
138  findDuplicatesPanel (nullptr),
139  imageSAlbum (nullptr),
140  sketchSAlbum (nullptr),
141  fuzzySearchAlbumSelectors (nullptr),
142  sketchSearchAlbumSelectors (nullptr),
143  searchModel (nullptr),
144  searchModificationHelper (nullptr),
145  settings (nullptr)
146  {
147  }
148 
149  const QString configTabEntry;
152  const QString configPenSketchHueEntry;
157 
158  bool active;
160 
161  QColor selColor;
162 
163  QToolButton* resetButton;
164  QToolButton* saveBtnSketch;
165  QToolButton* undoBtnSketch;
166  QToolButton* redoBtnSketch;
167  QToolButton* saveBtnImage;
168 
169  QSpinBox* penSize;
170  QSpinBox* resultsSketch;
171 
173 
174  QLabel* imageWidget;
175 
176  QTimer* timerSketch;
177  QTimer* timerImage;
178 
180 
181  QLineEdit* nameEditSketch;
182  QLineEdit* nameEditImage;
183 
184  QTabWidget* tabWidget;
185 
187 
189 
192 
194  QUrl imageUrl;
195 
197 
199 
201 
203 
205 
208 
211 
214 
216 };
217 
218 } // namespace Digikam
219 
220 #endif // DIGIKAM_FUZZY_SEARCH_VIEW_P_H
Definition: albumpointer.h:48
Definition: albumselectors.h:39
Definition: applicationsettings.h:57
Definition: dexpanderbox.h:66
Definition: dcolorvalueselector.h:130
Definition: dhuesaturationselect.h:158
Definition: drangebox.h:39
Definition: dlayoutbox.h:75
Definition: editablesearchtreeview.h:43
Definition: findduplicatesview.h:45
Definition: fuzzysearchview_p.h:91
const QString configPenSketchHueEntry
Definition: fuzzysearchview_p.h:152
DHueSaturationSelector * hsSelector
Definition: fuzzysearchview_p.h:186
SketchWidget * sketchWidget
Definition: fuzzysearchview_p.h:200
QTabWidget * tabWidget
Definition: fuzzysearchview_p.h:184
Private()
Definition: fuzzysearchview_p.h:104
QToolButton * saveBtnSketch
Definition: fuzzysearchview_p.h:164
QSpinBox * resultsSketch
Definition: fuzzysearchview_p.h:170
bool active
Definition: fuzzysearchview_p.h:158
SearchModificationHelper * searchModificationHelper
Definition: fuzzysearchview_p.h:213
const QString configPenSketchSizeEntry
Definition: fuzzysearchview_p.h:150
QToolButton * resetButton
Definition: fuzzysearchview_p.h:163
FindDuplicatesView * findDuplicatesPanel
Definition: fuzzysearchview_p.h:204
const QString configPenSkethValueEntry
Definition: fuzzysearchview_p.h:154
QToolButton * redoBtnSketch
Definition: fuzzysearchview_p.h:166
AlbumPointer< SAlbum > imageSAlbum
Definition: fuzzysearchview_p.h:206
const QString configResultSketchItemsEntry
Definition: fuzzysearchview_p.h:151
const QString configSimilarsThresholdEntry
Definition: fuzzysearchview_p.h:155
DAdjustableLabel * labelFile
Definition: fuzzysearchview_p.h:190
const QString configPenSketchSaturationEntry
Definition: fuzzysearchview_p.h:153
QTimer * timerSketch
Definition: fuzzysearchview_p.h:176
ThumbnailLoadThread * thumbLoadThread
Definition: fuzzysearchview_p.h:202
ApplicationSettings * settings
Definition: fuzzysearchview_p.h:215
bool fingerprintsChecked
Definition: fuzzysearchview_p.h:159
const QString configSimilarsMaxThresholdEntry
Definition: fuzzysearchview_p.h:156
QColor selColor
Definition: fuzzysearchview_p.h:161
AlbumSelectors * sketchSearchAlbumSelectors
Definition: fuzzysearchview_p.h:210
FuzzySearchTab
Definition: fuzzysearchview_p.h:96
@ SIMILARS
Definition: fuzzysearchview_p.h:98
AlbumSelectors * fuzzySearchAlbumSelectors
Definition: fuzzysearchview_p.h:209
QToolButton * saveBtnImage
Definition: fuzzysearchview_p.h:167
QLineEdit * nameEditImage
Definition: fuzzysearchview_p.h:182
QToolButton * undoBtnSketch
Definition: fuzzysearchview_p.h:165
EditableSearchTreeView * searchTreeView
Definition: fuzzysearchview_p.h:198
DColorValueSelector * vSelector
Definition: fuzzysearchview_p.h:188
SearchModel * searchModel
Definition: fuzzysearchview_p.h:212
const QString configTabEntry
Definition: fuzzysearchview_p.h:149
DAdjustableLabel * labelFolder
Definition: fuzzysearchview_p.h:191
QLineEdit * nameEditSketch
Definition: fuzzysearchview_p.h:181
QUrl imageUrl
Definition: fuzzysearchview_p.h:194
ItemInfo imageInfo
Definition: fuzzysearchview_p.h:193
SearchTextBarDb * searchFuzzyBar
Definition: fuzzysearchview_p.h:196
DVBox * folderView
Definition: fuzzysearchview_p.h:179
QLabel * imageWidget
Definition: fuzzysearchview_p.h:174
DIntRangeBox * similarityRange
Definition: fuzzysearchview_p.h:172
QTimer * timerImage
Definition: fuzzysearchview_p.h:177
QSpinBox * penSize
Definition: fuzzysearchview_p.h:169
AlbumPointer< SAlbum > sketchSAlbum
Definition: fuzzysearchview_p.h:207
Definition: fuzzysearchview.h:57
Definition: iteminfo.h:78
Definition: albummodel.h:95
Definition: searchmodificationhelper.h:59
Definition: searchtextbardb.h:45
Definition: sketchwidget.h:38
Definition: thumbnailloadthread.h:46
Definition: datefolderview.cpp:43