digiKam
tagfolderview.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-03-22
7  * Description : tags folder view.
8  *
9  * Copyright (C) 2005-2006 by Joern Ahrens <joern dot ahrens at kdemail dot net>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_TAG_FOLDER_VIEW_H
26 #define DIGIKAM_TAG_FOLDER_VIEW_H
27 
28 // Qt includes
29 
30 #include <QTreeView>
31 #include <QList>
32 
33 // Local includes
34 
35 #include "tagtreeview.h"
36 #include "album.h"
37 
38 namespace Digikam
39 {
40 
41 class ContextMenuHelper;
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
55  TagFolderView(QWidget* const parent, TagModel* const model);
56 
60  ~TagFolderView() override;
61 
69  void setShowFindDuplicateAction(bool show);
70 
78  void setShowDeleteFaceTagsAction(bool show);
79 
80 Q_SIGNALS:
81 
82  void signalFindDuplicates(const QList<TAlbum*>& albums);
83 
84 protected:
85 
86  QString contextMenuTitle() const override;
87 
100  void addCustomContextMenuActions(ContextMenuHelper& cmh, Album* album) override;
101 
111  void handleCustomContextMenuAction(QAction* action, const AlbumPointer<Album>& album) override;
112 
119  void contextMenuEvent(QContextMenuEvent* event) override;
120 
129  virtual void setContexMenuItems(ContextMenuHelper& cmh, const QList<TAlbum*>& albums);
130 
131  void keyPressEvent(QKeyEvent* event) override;
132 
133 private Q_SLOTS:
134 
135  void slotTagNewFromABCMenu(const QString& personName);
136 
137 private:
138 
139  class Private;
140  Private* const d;
141 };
142 
143 } // namespace Digikam
144 
145 #endif // DIGIKAM_TAG_FOLDER_VIEW_H
Definition: albumpointer.h:48
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: tagfolderview.h:44
virtual void setContexMenuItems(ContextMenuHelper &cmh, const QList< TAlbum * > &albums)
Definition: tagfolderview.cpp:230
void keyPressEvent(QKeyEvent *event) override
Definition: tagfolderview.cpp:344
QString contextMenuTitle() const override
Definition: tagfolderview.cpp:111
void addCustomContextMenuActions(ContextMenuHelper &cmh, Album *album) override
Definition: tagfolderview.cpp:116
void handleCustomContextMenuAction(QAction *action, const AlbumPointer< Album > &album) override
Definition: tagfolderview.cpp:207
void signalFindDuplicates(const QList< TAlbum * > &albums)
void setShowFindDuplicateAction(bool show)
Definition: tagfolderview.cpp:101
~TagFolderView() override
Definition: tagfolderview.cpp:96
TagFolderView(QWidget *const parent, TagModel *const model)
Definition: tagfolderview.cpp:73
void contextMenuEvent(QContextMenuEvent *event) override
Definition: tagfolderview.cpp:280
void setShowDeleteFaceTagsAction(bool show)
Definition: tagfolderview.cpp:106
Definition: albummodel.h:63
Definition: tagtreeview.h:37
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43