digiKam
Loading...
Searching...
No Matches
albumselectcombobox.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 : 2009-05-09
7 * Description : A combo box for selecting albums
8 *
9 * SPDX-FileCopyrightText: 2008-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 * SPDX-FileCopyrightText: 2010-2011 by Andi Clemens <andi dot clemens at gmail dot com>
11 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
12 *
13 * SPDX-License-Identifier: GPL-2.0-or-later
14 *
15 * ============================================================ */
16
17#pragma once
18
19// Local includes
20
21#include "comboboxutilities.h"
22
23class QSortFilterProxyModel;
24
25namespace Digikam
26{
27
28class AlbumFilterModel;
29class AbstractCheckableAlbumModel;
30
32{
33 Q_OBJECT
34
35public:
36
37 explicit AlbumSelectComboBox(QWidget* const parent = nullptr);
38 ~AlbumSelectComboBox() override;
39
48 void setDefaultTagModel();
50 AlbumFilterModel* filterModel = nullptr);
51
55 void setCheckable(bool checkable);
56 bool isCheckable() const;
57
61 void setCloseOnActivate(bool close);
62
67 void setShowCheckStateSummary(bool show);
68
72 void setRecursive(bool recursive);
73
79 void setNoSelectionText(const QString& text);
80
84 void setAllSelectedText(bool all);
85
90
94 QSortFilterProxyModel* filterModel() const;
95
96public Q_SLOTS:
97
98 void hidePopup() override;
99
104 virtual void updateText();
105
106protected:
107
108 void installView(QAbstractItemView* view = nullptr) override;
109
110private:
111
112 class Private;
113 Private* const d = nullptr;
114};
115
116// ------------------------------------------------------------------------------------
117
119class AlbumModel;
120class AlbumTreeView;
123class TagModel;
124class TagTreeView;
125
127{
128 Q_OBJECT
129
130public:
131
138 explicit AbstractAlbumTreeViewSelectComboBox(QWidget* const parent = nullptr);
139
145 void setTreeView(AbstractAlbumTreeView* const treeView);
146
153
154protected:
155
156 void installView(QAbstractItemView* view = nullptr) override;
157 void sendViewportEventToView(QEvent* e) override;
158
159protected:
160
162};
163
164// ------------------------------------------------------------------------------------
165
167{
168 Q_OBJECT
169
170public:
171
172 explicit AlbumTreeViewSelectComboBox(QWidget* const parent = nullptr);
173
174 void setDefaultModel();
177 AlbumTreeView* view() const;
178};
179
180// ------------------------------------------------------------------------------------
181
183{
184 Q_OBJECT
185
186public:
187
188 explicit TagTreeViewSelectComboBox(QWidget* const parent = nullptr);
189
190 void setDefaultModel();
192 TagPropertiesFilterModel* filteredModel = nullptr,
194 TagTreeView* view() const;
195};
196
197} // namespace Digikam
Definition albumselectcombobox.h:127
void installView(QAbstractItemView *view=nullptr) override
Definition albumselectcombobox.cpp:345
void addCheckUncheckContextMenuActions()
Definition albumselectcombobox.cpp:399
void setTreeView(AbstractAlbumTreeView *const treeView)
Definition albumselectcombobox.cpp:362
AbstractAlbumTreeView * m_treeView
Definition albumselectcombobox.h:161
void sendViewportEventToView(QEvent *e) override
Definition albumselectcombobox.cpp:355
Definition abstractalbumtreeview.h:53
Definition abstractalbummodel.h:357
Definition albumfiltermodel.h:35
Definition albummodel.h:30
Definition albumselectcombobox.h:32
void setAllSelectedText(bool all)
Definition albumselectcombobox.cpp:226
void setDefaultAlbumModel()
Definition albumselectcombobox.cpp:84
~AlbumSelectComboBox() override
Definition albumselectcombobox.cpp:79
void setRecursive(bool recursive)
Definition albumselectcombobox.cpp:210
void setCloseOnActivate(bool close)
Definition albumselectcombobox.cpp:180
void setDefaultTagModel()
Definition albumselectcombobox.cpp:91
void hidePopup() override
Definition albumselectcombobox.cpp:248
void setCheckable(bool checkable)
Definition albumselectcombobox.cpp:143
virtual void updateText()
Definition albumselectcombobox.cpp:256
QSortFilterProxyModel * filterModel() const
Definition albumselectcombobox.cpp:243
void installView(QAbstractItemView *view=nullptr) override
Definition albumselectcombobox.cpp:124
AbstractCheckableAlbumModel * model() const
Definition albumselectcombobox.cpp:238
bool isCheckable() const
Definition albumselectcombobox.cpp:154
void setShowCheckStateSummary(bool show)
Definition albumselectcombobox.cpp:232
void setNoSelectionText(const QString &text)
Definition albumselectcombobox.cpp:220
void setAlbumModels(AbstractCheckableAlbumModel *model, AlbumFilterModel *filterModel=nullptr)
Definition albumselectcombobox.cpp:97
Definition albumselectcombobox.h:167
void setAlbumModels(AlbumModel *model, CheckableAlbumFilterModel *filterModel=nullptr)
Definition albumselectcombobox.cpp:425
AlbumTreeView * view() const
Definition albumselectcombobox.cpp:415
void setDefaultModel()
Definition albumselectcombobox.cpp:420
Definition albumtreeview.h:27
Definition albumfiltermodel.h:284
Definition albummodel.h:57
Definition albumfiltermodel.h:366
Definition albumselectcombobox.h:183
void setAlbumModels(TagModel *model, TagPropertiesFilterModel *filteredModel=nullptr, CheckableAlbumFilterModel *filterModel=nullptr)
Definition albumselectcombobox.cpp:468
void setDefaultModel()
Definition albumselectcombobox.cpp:463
TagTreeView * view() const
Definition albumselectcombobox.cpp:458
Definition tagtreeview.h:27
QTreeView * view() const
Definition comboboxutilities.cpp:401
Definition comboboxutilities.h:262
Definition datefolderview.cpp:34