| 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 |
* SPDX-FileCopyrightText: 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> |
| 10 |
* SPDX-FileCopyrightText: 2010-2011 by Andi Clemens <andi dot clemens at gmail dot com> |
| 11 |
* SPDX-FileCopyrightText: 2009-2026 by Gilles Caulier <caulier dot gilles at gmail dot com> |
| 12 |
* |
| 13 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 14 |
* |
| 15 |
* ============================================================ */ |
| 16 |
|
| 17 |
#pragma once |
| 18 |
|
| 19 |
// Local includes |
| 20 |
|
| 21 |
#include "abstractalbumtreeview.h" |
| 22 |
|
| 23 |
namespace Digikam |
| 24 |
{ |
| 25 |
|
| 26 |
class AbstractCountingAlbumTreeView : public AbstractAlbumTreeView |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
|
| 30 |
public: |
| 31 |
|
| 32 |
explicit AbstractCountingAlbumTreeView(QWidget* const parent, Flags flags); |
| 33 |
|
| 34 |
protected: |
| 35 |
|
| 36 |
void setAlbumModel(AbstractCountingAlbumModel* const model); |
| 37 |
virtual void setAlbumFilterModel(AlbumFilterModel* const filterModel) override; |
| 38 |
|
| 39 |
void rowsInserted(const QModelIndex& parent, int start, int end) override; |
| 40 |
|
| 41 |
private Q_SLOTS: |
| 42 |
|
| 43 |
void slotCollapsed(const QModelIndex& index); |
| 44 |
void slotExpanded(const QModelIndex& index); |
| 45 |
void setShowCountFromSettings(); |
| 46 |
void updateShowCountState(const QModelIndex& index, bool recurse); |
| 47 |
|
| 48 |
private: |
| 49 |
|
| 50 |
void init(); |
| 51 |
}; |
| 52 |
|
| 53 |
} // namespace Digikam |