digiKam
tagcheckview.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 : 2005-05-05
7  * Description : tags filter view
8  *
9  * Copyright (C) 2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  * Copyright (C) 2009-2010 by Andi Clemens <andi dot clemens at gmail dot com>
12  * Copyright (C) 2009-2010 by Johannes Wienke <languitar at semipol dot de>
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_TAG_CHECK_VIEW_H
28 #define DIGIKAM_TAG_CHECK_VIEW_H
29 
30 // Qt includes
31 
32 #include <QList>
33 
34 // Local includes
35 
36 #include "itemfiltersettings.h"
37 #include "tagfolderview.h"
38 #include "album.h"
39 
40 namespace Digikam
41 {
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
50  {
55  };
56 
57 public:
58 
59  explicit TagCheckView(QWidget* const parent, TagModel* const tagModel);
60 
63 
65  void setToggleAutoTags(ToggleAutoTags toggle);
66 
72  void setCheckNewTags(bool checkNewTags);
73  bool checkNewTags() const;
74 
75  ~TagCheckView() override;
76 
77  void doLoadState() override;
78  void doSaveState() override;
79 
80 Q_SIGNALS:
81 
87  void checkedTagsChanged(const QList<TAlbum*>& includedTags, const QList<TAlbum*>& excludedTags);
88 
89 public Q_SLOTS:
90 
94  void slotResetCheckState();
95 
96 protected:
97 
98  void addCustomContextMenuActions(ContextMenuHelper& cmh, Album* album) override;
99 
100 private Q_SLOTS:
101 
106  void slotCheckStateChange(Album* album, Qt::CheckState state);
107 
108  void slotCreatedNewTagByContextMenu(TAlbum* tag);
109  void toggleAutoActionSelected(QAction* action);
110 
111 private:
112 
113  class Private;
114  Private* const d;
115 };
116 
117 } // namespace Digikam
118 
119 #endif // DIGIKAM_TAG_CHECK_VIEW_H
Abstract base class for all album types.
Definition: album.h:67
A helper class to add actions and special menus to the context menu.
Definition: contextmenuhelper.h:80
Definition: album.h:420
Definition: tagcheckview.h:44
ToggleAutoTags
Definition: tagcheckview.h:50
@ Children
Definition: tagcheckview.h:52
@ NoToggleAuto
Definition: tagcheckview.h:51
@ Parents
Definition: tagcheckview.h:53
@ ChildrenAndParents
Definition: tagcheckview.h:54
void checkedTagsChanged(const QList< TAlbum * > &includedTags, const QList< TAlbum * > &excludedTags)
~TagCheckView() override
Definition: tagcheckview.cpp:110
QList< TAlbum * > getPartiallyCheckedTags() const
Definition: tagcheckview.cpp:192
void setToggleAutoTags(ToggleAutoTags toggle)
Definition: tagcheckview.cpp:214
void slotResetCheckState()
Definition: tagcheckview.cpp:115
QList< TAlbum * > getCheckedTags() const
Definition: tagcheckview.cpp:175
void addCustomContextMenuActions(ContextMenuHelper &cmh, Album *album) override
Definition: tagcheckview.cpp:255
TagCheckView(QWidget *const parent, TagModel *const tagModel)
Definition: tagcheckview.cpp:80
bool checkNewTags() const
Definition: tagcheckview.cpp:240
void setCheckNewTags(bool checkNewTags)
Definition: tagcheckview.cpp:219
void doSaveState() override
Definition: tagcheckview.cpp:166
void doLoadState() override
Definition: tagcheckview.cpp:157
ToggleAutoTags getToggleAutoTags() const
Definition: tagcheckview.cpp:209
Definition: tagfolderview.h:44
Definition: albummodel.h:63
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43