File indexing completed on 2025-01-19 03:53:22
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2009-03-25 0007 * Description : Tree View for album models 0008 * 0009 * SPDX-FileCopyrightText: 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2010-2011 by Andi Clemens <andi dot clemens at gmail dot com> 0011 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #ifndef DIGIKAM_SEARCH_TREE_VIEW_H 0018 #define DIGIKAM_SEARCH_TREE_VIEW_H 0019 0020 // Local includes 0021 0022 #include "abstractcheckablealbumtreeview.h" 0023 0024 namespace Digikam 0025 { 0026 0027 class SearchTreeView : public AbstractCheckableAlbumTreeView 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 0033 explicit SearchTreeView(QWidget* const parent = nullptr, Flags flags = DefaultFlags); 0034 ~SearchTreeView() override; 0035 0036 /// Note: not filtered by search type 0037 SearchModel* albumModel() const; 0038 0039 /// Contains only the searches with appropriate type - prefer to albumModel() 0040 SearchFilterModel* filteredModel() const; 0041 SAlbum* currentAlbum() const; 0042 0043 void setAlbumModel(SearchModel* const model); 0044 void setAlbumFilterModel(SearchFilterModel* const filteredModel, CheckableAlbumFilterModel* const model); 0045 0046 public Q_SLOTS: 0047 0048 void setCurrentAlbums(const QList<Album*>& albums, bool selectInAlbumManager = true); 0049 void setCurrentAlbum(int searchId, bool selectInAlbumManager = true); 0050 0051 protected: 0052 0053 SearchFilterModel* m_filteredModel; 0054 }; 0055 0056 } // namespace Digikam 0057 0058 #endif // DIGIKAM_SEARCH_TREE_VIEW_H