digiKam
albumtreeview.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_ALBUM_TREE_VIEW_H
27 #define DIGIKAM_ALBUM_TREE_VIEW_H
28 
29 // Local includes
30 
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit AlbumTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags);
43  ~AlbumTreeView() override;
44 
45  AlbumModel* albumModel() const;
46  PAlbum* currentAlbum() const;
47  PAlbum* albumForIndex(const QModelIndex& index) const;
48 
49  void setAlbumFilterModel(CheckableAlbumFilterModel* const filterModel);
50  void setAlbumModel(AlbumModel* const model);
51 
52 public Q_SLOTS:
53 
54  void setCurrentAlbums(const QList<Album*>& albums, bool selectInAlbumManager = true);
55  void setCurrentAlbum(int albumId, bool selectInAlbumManager = true);
56 };
57 
58 } // namespace Digikam
59 
60 #endif // DIGIKAM_ALBUM_TREE_VIEW_H
@ DefaultFlags
Definition: abstractalbumtreeview.h:99
Definition: abstractcheckablealbumtreeview.h:37
Definition: albummodel.h:40
Definition: albumtreeview.h:37
~AlbumTreeView() override
Definition: albumtreeview.cpp:52
void setAlbumModel(AlbumModel *const model)
Definition: albumtreeview.cpp:56
AlbumModel * albumModel() const
Definition: albumtreeview.cpp:82
PAlbum * albumForIndex(const QModelIndex &index) const
Definition: albumtreeview.cpp:92
void setCurrentAlbums(const QList< Album * > &albums, bool selectInAlbumManager=true)
Definition: albumtreeview.cpp:97
PAlbum * currentAlbum() const
Definition: albumtreeview.cpp:87
AlbumTreeView(QWidget *const parent=nullptr, Flags flags=DefaultFlags)
Definition: albumtreeview.cpp:37
void setAlbumFilterModel(CheckableAlbumFilterModel *const filterModel)
Definition: albumtreeview.cpp:77
void setCurrentAlbum(int albumId, bool selectInAlbumManager=true)
Definition: albumtreeview.cpp:102
Definition: albumfiltermodel.h:294
Definition: album.h:357
Definition: datefolderview.cpp:43