digiKam
searchtreeview.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_SEARCH_TREE_VIEW_H
27 #define DIGIKAM_SEARCH_TREE_VIEW_H
28 
29 // Local includes
30 
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit SearchTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags);
43  ~SearchTreeView() override;
44 
46  SearchModel* albumModel() const;
47 
50  SAlbum* currentAlbum() const;
51 
52  void setAlbumModel(SearchModel* const model);
54 
55 public Q_SLOTS:
56 
57  void setCurrentAlbums(const QList<Album*>& albums, bool selectInAlbumManager = true);
58  void setCurrentAlbum(int searchId, bool selectInAlbumManager = true);
59 
60 protected:
61 
63 };
64 
65 } // namespace Digikam
66 
67 #endif // DIGIKAM_SEARCH_TREE_VIEW_H
@ DefaultFlags
Definition: abstractalbumtreeview.h:99
Definition: abstractcheckablealbumtreeview.h:37
Definition: albumfiltermodel.h:294
Definition: album.h:493
Definition: albumfiltermodel.h:327
Definition: albummodel.h:95
Definition: searchtreeview.h:37
SearchModel * albumModel() const
Note: not filtered by search type.
Definition: searchtreeview.cpp:68
~SearchTreeView() override
Definition: searchtreeview.cpp:54
void setAlbumFilterModel(SearchFilterModel *const filteredModel, CheckableAlbumFilterModel *const model)
Definition: searchtreeview.cpp:73
void setCurrentAlbums(const QList< Album * > &albums, bool selectInAlbumManager=true)
Definition: searchtreeview.cpp:93
SearchTreeView(QWidget *const parent=nullptr, Flags flags=DefaultFlags)
Definition: searchtreeview.cpp:37
SAlbum * currentAlbum() const
Definition: searchtreeview.cpp:88
SearchFilterModel * m_filteredModel
Definition: searchtreeview.h:62
void setCurrentAlbum(int searchId, bool selectInAlbumManager=true)
Definition: searchtreeview.cpp:98
SearchFilterModel * filteredModel() const
Contains only the searches with appropriate type - prefer to albumModel()
Definition: searchtreeview.cpp:83
void setAlbumModel(SearchModel *const model)
Definition: searchtreeview.cpp:58
Definition: datefolderview.cpp:43