digiKam
Loading...
Searching...
No Matches
albumlabelssearchhandler.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 : 2014-05-17
7 * Description : Album Labels Search Tree View.
8 *
9 * SPDX-FileCopyrightText: 2014-2015 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
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#include "labelstreeview.h"
19
20namespace Digikam
21{
22
23class AlbumLabelsSearchHandler : public QObject
24{
25 Q_OBJECT
26
27public:
28
29 explicit AlbumLabelsSearchHandler(LabelsTreeView* const treeWidget);
31
36
42 QList<QUrl> imagesUrls() const;
43
48 QString generatedName() const;
49
56 QList<int> >& neededLabels);
57
64
65private:
66
73 QString createXMLForCurrentSelection(const QHash<LabelsTreeView::Labels,
74 QList<int> >& selectedLabels);
75
83 SAlbum* search(const QString& xml) const;
84
91 void generateAlbumNameForExporting(const QList<int>& ratings,
92 const QList<int>& colorsList,
93 const QList<int>& picksList);
94
99 void imagesUrlsForCurrentAlbum();
100
105 QString getDefaultTitle() const;
106
107private Q_SLOTS:
108
109 void slotSelectionChanged();
110 void slotCheckStateChanged();
111 void slotSetCurrentAlbum();
112 void slotResult();
113 void slotData(const QList<ItemListerRecord>& data);
114
115Q_SIGNALS:
116
117 void checkStateChanged(Album* album, Qt::CheckState checkState);
118
119private:
120
121 class Private;
122 Private* const d = nullptr;
123};
124
125} // namespace Digikam
Definition albumlabelssearchhandler.h:24
QList< QUrl > imagesUrls() const
Gets the list of images generated, for exporting.
Definition albumlabelssearchhandler.cpp:101
QString generatedName() const
Definition albumlabelssearchhandler.cpp:106
bool isRestoringSelectionFromHistory() const
Definition albumlabelssearchhandler.cpp:120
void restoreSelectionFromHistory(const QHash< LabelsTreeView::Labels, QList< int > > &neededLabels)
Restores the selection of the tree-view from history.
Definition albumlabelssearchhandler.cpp:111
~AlbumLabelsSearchHandler() override
Definition albumlabelssearchhandler.cpp:91
void checkStateChanged(Album *album, Qt::CheckState checkState)
Album * albumForSelectedItems() const
Definition albumlabelssearchhandler.cpp:96
Abstract base class for all album types.
Definition album.h:57
Definition labelstreeview.h:33
Labels
Definition labelstreeview.h:39
Definition album.h:494
Definition datefolderview.cpp:34