| 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 "abstractcheckablealbumtreeview.h" |
| 22 |
|
| 23 |
namespace Digikam |
| 24 |
{ |
| 25 |
|
| 26 |
class SearchTreeView : public AbstractCheckableAlbumTreeView |
| 27 |
{ |
| 28 |
Q_OBJECT |
| 29 |
|
| 30 |
public: |
| 31 |
|
| 32 |
explicit SearchTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags); |
| 33 |
~SearchTreeView() override = default; |
| 34 |
|
| 35 |
/// @note: not filtered by search type |
| 36 |
SearchModel* salbumModel() const; |
| 37 |
|
| 38 |
/// @brief Contains only the searches with appropriate type - prefer to albumModel() |
| 39 |
SearchFilterModel* filteredModel() const; |
| 40 |
SAlbum* currentAlbum() const; |
| 41 |
|
| 42 |
void setSAlbumModel(SearchModel* const model); |
| 43 |
void setSAlbumFilterModel(SearchFilterModel* const filteredModel, CheckableAlbumFilterModel* const model); |
| 44 |
|
| 45 |
public Q_SLOTS: |
| 46 |
|
| 47 |
void setCurrentAlbum(int searchId, bool selectInAlbumManager = true); |
| 48 |
|
| 49 |
protected: |
| 50 |
|
| 51 |
SearchFilterModel* m_filteredModel = nullptr; |
| 52 |
}; |
| 53 |
|
| 54 |
} // namespace Digikam |