digiKam
tagmngrtreeview.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 : 20013-08-05
7  * Description : Tag Manager Tree View derived from TagsFolderView to implement
8  * a custom context menu and some batch view options, such as
9  * expanding multiple items
10  *
11  * Copyright (C) 2013 by Veaceslav Munteanu <veaceslav dot munteanu90 at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_TAG_MNGR_TREE_VIEW_H
27 #define DIGIKAM_TAG_MNGR_TREE_VIEW_H
28 
29 // Qt includes
30 
31 #include <QList>
32 
33 // Local includes
34 
35 #include "album.h"
36 #include "tagfolderview.h"
37 
38 namespace Digikam
39 {
40 
41 class TagsManager;
42 
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit TagMngrTreeView(TagsManager* const parent, TagModel* const model);
50  ~TagMngrTreeView() override;
51 
56  CheckableAlbumFilterModel* const filterModel);
57 
59  {
60  return m_tfilteredModel;
61  }
62 
63 protected:
64 
74  void setContexMenuItems(ContextMenuHelper& cmh, const QList<TAlbum*>& albums) override;
75 
82  void contextMenuEvent(QContextMenuEvent* event) override;
83 
84 protected:
85 
87 
88 private:
89 
90  // Disable
91  TagMngrTreeView(QWidget*) = delete;
92 
93 private:
94 
95  class Private;
96  Private* const d;
97 };
98 
99 } // namespace Digikam
100 
101 #endif // DIGIKAM_TAG_MNGR_TREE_VIEW_H
Definition: albumfiltermodel.h:294
A helper class to add actions and special menus to the context menu.
Definition: contextmenuhelper.h:80
Definition: tagfolderview.h:44
Definition: tagmngrtreeview.h:44
void setContexMenuItems(ContextMenuHelper &cmh, const QList< TAlbum * > &albums) override
setContexMenuItems - Reimplemented method from TagsFolderView. Will set custom actions for Tags Manag...
Definition: tagmngrtreeview.cpp:116
TagMngrTreeView(TagsManager *const parent, TagModel *const model)
Definition: tagmngrtreeview.cpp:61
TagsManagerFilterModel * getFilterModel() const
Definition: tagmngrtreeview.h:58
~TagMngrTreeView() override
Definition: tagmngrtreeview.cpp:71
TagsManagerFilterModel * m_tfilteredModel
Definition: tagmngrtreeview.h:86
void contextMenuEvent(QContextMenuEvent *event) override
contextMenuEvent - Reimplement contextMenuEvent from AbstractAlbumTree to support multiple selection
Definition: tagmngrtreeview.cpp:76
void setAlbumFilterModel(TagsManagerFilterModel *const filteredModel, CheckableAlbumFilterModel *const filterModel)
setAlbumFilterModel - reimplement from AbstractAlbumTree
Definition: tagmngrtreeview.cpp:108
Definition: albummodel.h:63
TagPropertiesFilterModel * filteredModel() const
Contains only the tags filtered by properties - prefer to albumModel()
Definition: tagtreeview.cpp:117
Definition: albumfiltermodel.h:410
Definition: tagsmanager.h:43
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43