File indexing completed on 2025-01-19 03:50:32

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2005-04-27
0007  * Description : a folder view for date albums.
0008  *
0009  * SPDX-FileCopyrightText: 2005      by Renchi Raju <renchi dot raju at gmail dot com>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2009-2010 by Johannes Wienke <languitar at semipol dot de>
0012  * SPDX-FileCopyrightText: 2014      by Michael G. Hansen <mike at mghansen dot de>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef DIGIKAM_DATE_FOLDER_VIEW_H
0019 #define DIGIKAM_DATE_FOLDER_VIEW_H
0020 
0021 // Qt includes
0022 
0023 #include <QScopedPointer>
0024 
0025 // Local includes
0026 
0027 #include "dlayoutbox.h"
0028 #include "albummanager.h"
0029 #include "statesavingobject.h"
0030 
0031 namespace Digikam
0032 {
0033 
0034 class Album;
0035 class DAlbum;
0036 class DateAlbumModel;
0037 class ItemFilterModel;
0038 
0039 template <class T>
0040 class AlbumPointer;
0041 
0042 class DateFolderView : public DVBox,
0043                        public StateSavingObject
0044 {
0045     Q_OBJECT
0046 
0047 public:
0048 
0049     explicit DateFolderView(QWidget* const parent, DateAlbumModel* const dateAlbumModel);
0050     ~DateFolderView() override;
0051 
0052     void setItemModel(ItemFilterModel* const model);
0053 
0054     void setActive(const bool val);
0055 
0056     void gotoDate(const QDate& dt);
0057 
0058     void changeAlbumFromHistory(DAlbum* const album);
0059 
0060     AlbumPointer<DAlbum> currentAlbum() const;
0061 
0062     void doLoadState() override;
0063     void doSaveState() override;
0064 
0065     void setConfigGroup(const KConfigGroup& group) override;
0066 
0067 private Q_SLOTS:
0068 
0069     void slotSelectionChanged(Album* selectedAlbum);
0070     void slotAllAlbumsLoaded();
0071 
0072 private:
0073 
0074     class Private;
0075     const QScopedPointer<Private> d;
0076 };
0077 
0078 } // namespace Digikam
0079 
0080 #endif // DIGIKAM_DATE_FOLDER_VIEW_H