digiKam
abstractcountingalbumtreeview.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_ABSTRACT_COUNTING_ALBUM_TREE_VIEW_H
27 #define DIGIKAM_ABSTRACT_COUNTING_ALBUM_TREE_VIEW_H
28 
29 // Local includes
30 
31 #include "abstractalbumtreeview.h"
32 
33 namespace Digikam
34 {
35 
37 {
38  Q_OBJECT
39 
40 public:
41 
42  explicit AbstractCountingAlbumTreeView(QWidget* const parent, Flags flags);
43 
44 protected:
45 
46  void setAlbumModel(AbstractCountingAlbumModel* const model);
47  void setAlbumFilterModel(AlbumFilterModel* const filterModel);
48 
49  void rowsInserted(const QModelIndex& parent, int start, int end) override;
50 
51 private Q_SLOTS:
52 
53  void slotCollapsed(const QModelIndex& index);
54  void slotExpanded(const QModelIndex& index);
55  void setShowCountFromSettings();
56  void updateShowCountState(const QModelIndex& index, bool recurse);
57 
58 private:
59 
60  void init();
61 };
62 
63 } // namespace Digikam
64 
65 #endif // DIGIKAM_ABSTRACT_COUNTING_ALBUM_TREE_VIEW_H
Definition: abstractalbumtreeview.h:63
Definition: abstractalbummodel.h:271
Definition: abstractcountingalbumtreeview.h:37
AbstractCountingAlbumTreeView(QWidget *const parent, Flags flags)
Definition: abstractcountingalbumtreeview.cpp:37
void setAlbumModel(AbstractCountingAlbumModel *const model)
Definition: abstractcountingalbumtreeview.cpp:61
void setAlbumFilterModel(AlbumFilterModel *const filterModel)
Definition: abstractcountingalbumtreeview.cpp:71
void rowsInserted(const QModelIndex &parent, int start, int end) override
Definition: abstractcountingalbumtreeview.cpp:117
Definition: albumfiltermodel.h:45
Definition: datefolderview.cpp:43