digiKam
datetreeview.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_DATE_TREE_VIEW_H
27 #define DIGIKAM_DATE_TREE_VIEW_H
28 
29 // Local includes
30 
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit DateTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags);
43 
44  DateAlbumModel* albumModel() const;
45  DAlbum* currentAlbum() const;
46  DAlbum* albumForIndex(const QModelIndex& index) const;
47 
48  void setAlbumModel(DateAlbumModel* const model);
49  void setAlbumFilterModel(AlbumFilterModel* const filterModel);
50 
51 public Q_SLOTS:
52 
53  void setCurrentAlbums(const QList<Album*>& albums, bool selectInAlbumManager = true);
54  void setCurrentAlbum(int dateId, bool selectInAlbumManager = true);
55 };
56 
57 } // namespace Digikam
58 
59 #endif // DIGIKAM_DATE_TREE_VIEW_H
@ DefaultFlags
Definition: abstractalbumtreeview.h:99
Definition: abstractcountingalbumtreeview.h:37
Definition: albumfiltermodel.h:45
Definition: album.h:460
Definition: albummodel.h:145
Definition: datetreeview.h:37
void setAlbumFilterModel(AlbumFilterModel *const filterModel)
Definition: datetreeview.cpp:56
DAlbum * albumForIndex(const QModelIndex &index) const
Definition: datetreeview.cpp:66
DateAlbumModel * albumModel() const
Definition: datetreeview.cpp:51
DateTreeView(QWidget *const parent=nullptr, Flags flags=DefaultFlags)
Definition: datetreeview.cpp:37
DAlbum * currentAlbum() const
Definition: datetreeview.cpp:61
void setCurrentAlbums(const QList< Album * > &albums, bool selectInAlbumManager=true)
Definition: datetreeview.cpp:71
void setCurrentAlbum(int dateId, bool selectInAlbumManager=true)
Definition: datetreeview.cpp:76
void setAlbumModel(DateAlbumModel *const model)
Definition: datetreeview.cpp:46
Definition: datefolderview.cpp:43