digiKam
tagtreeview.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-03-25
7  * Description : Tree View for album models
8  *
9  * Copyright (C) 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2010-2011 by Andi Clemens <andi dot clemens at gmail dot com>
11  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles 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_TREE_VIEW_H
27 #define DIGIKAM_TAG_TREE_VIEW_H
28 
29 // Local includes
30 
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit TagTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags);
43  ~TagTreeView() override;
44 
45  TagModel* albumModel() const;
46 
49 
56  TAlbum* currentAlbum() const;
57 
63 
64  TAlbum* albumForIndex(const QModelIndex& index) const;
66 
68  void setAlbumModel(TagModel* const model);
69 
70 public Q_SLOTS:
71 
72  void setCurrentAlbums(const QList<Album*>& tags, bool selectInAlbumManager = true);
73  void setCurrentAlbum(int tagId, bool selectInAlbumManager = true);
74 
75 Q_SIGNALS:
76 
77  void assignTags(int tagId, const QList<int>& imageIDs);
78 
79 protected:
80 
83 };
84 
85 } // namespace Digikam
86 
87 #endif // DIGIKAM_TAG_TREE_VIEW_H
@ DefaultFlags
Definition: abstractalbumtreeview.h:99
Definition: abstractcheckablealbumtreeview.h:37
Definition: albumfiltermodel.h:294
Definition: album.h:420
Definition: albummodel.h:63
Definition: tagmodificationhelper.h:53
Definition: albumfiltermodel.h:376
Definition: tagtreeview.h:37
QList< TAlbum * > selectedTagAlbums()
Definition: tagtreeview.cpp:132
TAlbum * currentAlbum() const
currentAlbum - even if multiple selection is enabled current Album can be only one,...
Definition: tagtreeview.cpp:122
TagPropertiesFilterModel * m_filteredModel
Definition: tagtreeview.h:81
void setAlbumFilterModel(TagPropertiesFilterModel *const filteredModel, CheckableAlbumFilterModel *const filterModel)
Definition: tagtreeview.cpp:64
TagTreeView(QWidget *const parent=nullptr, Flags flags=DefaultFlags)
Definition: tagtreeview.cpp:37
TagModificationHelper * m_modificationHelper
Definition: tagtreeview.h:82
~TagTreeView() override
Definition: tagtreeview.cpp:60
void setAlbumModel(TagModel *const model)
Definition: tagtreeview.cpp:74
void setCurrentAlbum(int tagId, bool selectInAlbumManager=true)
Definition: tagtreeview.cpp:152
QList< Album * > selectedTags()
selectedTags - return a list of all selected items in tag model
Definition: tagtreeview.cpp:127
void assignTags(int tagId, const QList< int > &imageIDs)
void setCurrentAlbums(const QList< Album * > &tags, bool selectInAlbumManager=true)
Definition: tagtreeview.cpp:147
TAlbum * albumForIndex(const QModelIndex &index) const
Definition: tagtreeview.cpp:137
TagModel * albumModel() const
Definition: tagtreeview.cpp:112
TagModificationHelper * tagModificationHelper() const
Definition: tagtreeview.cpp:142
TagPropertiesFilterModel * filteredModel() const
Contains only the tags filtered by properties - prefer to albumModel()
Definition: tagtreeview.cpp:117
Definition: datefolderview.cpp:43